Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
21–30 of 39 posts
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#22Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#23For everyone here writing that they don't see a need for this because vim has macros/regexp's: Please, please, try it out. I'm telling you, this is leaps and bounds above macros/regexp's for most use cases. It's the difference between a visual way to make changes, and a "disconnected" way in which you write commands and hope they work. Seriously, I consider Multiple Cursors one of the greatest advances in text editin…
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#24That's awesome tma. Thank you for hacking on this. I'll plan to include this into subvim (ST2 like Vim) :)
I'm linking it here so people can find it: https://github.com/fatih/subvim
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#25I have used this command for the purposes of changing a variable name. It could be better but gets the job done most of the time.
> :.,$s/\\>//gc
Short demo: http://cl.ly/image/403j153F3u1h
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#26For everyone here writing that they don't see a need for this because vim has macros/regexp's: Please, please, try it out. I'm telling you, this is leaps and bounds above macros/regexp's for most use cases. It's the difference between a visual way to make changes, and a "disconnected" way in which you write commands and hope they work. Seriously, I consider Multiple Cursors one of the greatest advances in text editin…
I've been trying it, and do find it nice for small things, but a bit tedious for bigger things. Taking one of the examples in the animated GIF on the linked page, if you want to split a line on commas, with multiple cursors you have to select every single comma to 'initialize' the cursors. If the line has 3 fields, this is easier than using the regex, but if it has 10, then I find it a lot easier to just regex-split…
I hear this. Hopefully, the author will be able to implement what Sublime has: a find all field (which accepts regular expressions), and results in multiple cursors on all the matches.
I do this all the time in Sublime and it's so natural:
Cmd+F, /regex/, opt+Enter, [replace, or commands or whatever]
It's just as fast as your usual find and replace or quick macro, except that you have instant feedback, are able to undo, jump around by word, or (with vim-mode), use t or f to find a character, ci", etc.
Selecting a match one case at a time is great, though, when you need to skip some matches. Say you have `old_var`, `old_var2`, and `old_var3`. Just start at the top of the function, and match, match, skip, match, skip, [type and replace]. Sure, you could do a regex on old_var[^\d], but depending on what you're matching and what you're skipping it sometimes is just not worth puzzling out the right regex.
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#27For everyone here writing that they don't see a need for this because vim has macros/regexp's: Please, please, try it out. I'm telling you, this is leaps and bounds above macros/regexp's for most use cases. It's the difference between a visual way to make changes, and a "disconnected" way in which you write commands and hope they work. Seriously, I consider Multiple Cursors one of the greatest advances in text editin…
I've been trying it, and do find it nice for small things, but a bit tedious for bigger things. Taking one of the examples in the animated GIF on the linked page, if you want to split a line on commas, with multiple cursors you have to select every single comma to 'initialize' the cursors. If the line has 3 fields, this is easier than using the regex, but if it has 10, then I find it a lot easier to just regex-split…
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#28If there is one thing I love about vim, sublime, light table, etc.. is it gives emacs fans new things to implement in elisp! But seriously, I love the work that has been going into all these different text editors. It seems to be net benefit for everyone. Multiple cursors are like a visual kbd-macro-edit.. Obligatory emacs equivalent source: - https://github.com/magnars/multiple-cursors.el - http://emacsrocks.com/e13…
I should probably put a reference to him on the project page, as watching his video recently was a big push towards making me implement this in Vim. His expand-region plugin also inspired me to create vim-expand-region. I wonder what I'll 'copy' next. :)
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#29For everyone here writing that they don't see a need for this because vim has macros/regexp's: Please, please, try it out. I'm telling you, this is leaps and bounds above macros/regexp's for most use cases. It's the difference between a visual way to make changes, and a "disconnected" way in which you write commands and hope they work. Seriously, I consider Multiple Cursors one of the greatest advances in text editin…
Exactly, it's like ed vs vi.
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#30If there is one thing I love about vim, sublime, light table, etc.. is it gives emacs fans new things to implement in elisp! But seriously, I love the work that has been going into all these different text editors. It seems to be net benefit for everyone. Multiple cursors are like a visual kbd-macro-edit.. Obligatory emacs equivalent source: - https://github.com/magnars/multiple-cursors.el - http://emacsrocks.com/e13…
I should probably put a reference to him on the project page, as watching his video recently was a big push towards making me implement this in Vim. His expand-region plugin also inspired me to create vim-expand-region. I wonder what I'll 'copy' next. :)
Used Emacs from a few years and I don't remember any more how to do all those things!