Earlier quoted context omitted.
yes agreed - JetBrains has IdeaVim, but it is so lame compared to the real thing.
How is the speed? Last time I tried it, about 6 months ago, there was a very noticeable lag when switching between modes. I ran into the maintainer of IdeaVim at PyCon and he said it should be better but my trial period expired and I never got a chance to try it again.
Show HN: Subvim – Vim customized to be like SublimeText
61–68 of 68 posts
Re: Show HN: Subvim – Vim customized to be like SublimeText
#62Earlier quoted context omitted.
I'm a Vim user and this is the only Sublime feature that I think I'd like to see in a future version of core Vim. Another comment called it "syntactic sugar for macros"[1] and that's true. Multicursor functionality allows you to avoid repetition in so many cases that it's worthy of inclusion as a feature in its own right. [1] https://news.ycombinator.com/item?id=5504507
I think what we already have in vim is even better: just use dot (.) to repeat the last action. So you make some edits in your first cursor position, move to the next cursor position and press dot to repeat the edit.
Examples:
- Cmd-Shift-L creates a cursor at the end of every line of the selected area.
- Find all, integrated with Regex, creates multicursors on every match.
- Once you get multicursors, you can still add some manually by holding down Cmd and double clicking at a cursor position.
After you get multicursors, you can then move them around using standard editor commands - that's the real power of this construct, since I'm able to match something much simpler than I actually want to edit (for example end/beginning of line), move to the meat, edit.
Re: Show HN: Subvim – Vim customized to be like SublimeText
#63Earlier quoted context omitted.
visual selection replacement is good too. :' s/this/to that/g I think vim does that automatically when you have a selection active and hit :
Note that this will replace over the entirely lines even if it's a blockwise selection. So you might consider using :' s/\%Vthis/to that/g
this ipsum dolor sit amet
this ipsum dolor sit amet
this ipsum dolor sit amet
this ipsum dolor sit amet
this ipsum dolor sit amet
select the middle 3 lines and do what I said will give you:
this ipsum dolor sit amet
to that ipsum dolor sit amet
to that ipsum dolor sit amet
to that ipsum dolor sit amet
this ipsum dolor sit amet
Re: Show HN: Subvim – Vim customized to be like SublimeText
#64Earlier quoted context omitted.
Because i love Vim :) Then there was Sublime that really changed the way of editing in some way. I first tried vintage and make it vim-like. However it was slow and not much was I wanted. Thus finally creates this project. For Vim users who like Sublime.
ST3 will be released soon and is supposedly going go fully support all vim commands in vintage mode with better performance.
Because I didn't see anything being announced regarding vintage mode. Some guys forked the ST vintage package but that's 3rd party.
Re: Show HN: Subvim – Vim customized to be like SublimeText
#65slightly off topic, but I think a thing that is sorely needed is a kind of libvim that provides proper vim functionality, which can then be linke
It's a decent idea. I'm sure there might be something else that's further along than I got.
Re: Show HN: Subvim – Vim customized to be like SublimeText
#66slightly off topic, but I think a thing that is sorely needed is a kind of libvim that provides proper vim functionality, which can then be linke
I once started work on https://github.com/Julian/PyVi which was meant to be this, but other things caught my interest so I abandoned it for a bit. Every once in a while I do a bit more work on it though. It's a decent idea. I'm sure there might be something else that's further along than I got.
Re: Show HN: Subvim – Vim customized to be like SublimeText
#67Earlier quoted context omitted.
This would be easily done by recording a macro and replaying it numlines/2-1 times. Possibly if starting on the first line: q,a,j,$,i, odd,esc,j,q,4@a qa // start recording into 'a' register j // move down $ // move last char on line i // insert mode odd // esc // back to command mode j // move down 4@a // replay macro 4 times (if there are 8 more lines)
Yep, using macros are the way to go for a task like this one. I'd use 'A' here to jump into the insert mode at the end of line though (commenting because '$i' part made me realize that I had probably never used '$' for movement at all).
Re: Show HN: Subvim – Vim customized to be like SublimeText
#68Earlier quoted context omitted.
yes agreed - JetBrains has IdeaVim, but it is so lame compared to the real thing.
How is the speed? Last time I tried it, about 6 months ago, there was a very noticeable lag when switching between modes. I ran into the maintainer of IdeaVim at PyCon and he said it should be better but my trial period expired and I never got a chance to try it again.
It's still not the greatest vim emulator, but it's much more usable now IMO.