That's awesome tma. Thank you for hacking on this. I'll plan to include this into subvim (ST2 like Vim) :)
Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
31–39 of 39 posts
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#32I must admit that I see little value in it given great capabilities that Vim already has. The three example edits can be made using regular expressions and macros.
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#33It looks to me like using a regex is more practical, something like :10,20s/poorly_named_var/nice_var/g
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#34For 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 used to also have plugin for ST1, which allowed you to do common things like selecting a line, then splitting it by a separator. For example, you'd select a line, split it by ", ", and get a cursor on each paramater. It worked wonderfully for these kinds of things.
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#35Earlier quoted context omitted.
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. :)
Thanks for mentioning (& developing) this, vim-expand-region is awesome.
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#36For 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
#37That's awesome tma. Thank you for hacking on this. I'll plan to include this into subvim (ST2 like Vim) :)
Re: Show HN: vim-multiple-cursors - True Sublime Text style multiple selection
#38The rendering of multiple cursors is really buggy in tmux + vim, to the extent that it's hard to tell what has been selected. I 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
#39Mine supports things like multi-key commands and has predictable (if not entirely desirable) undo behavior, but it has issues in its own right. I figure we may both learn a thing or two from each other's attempts.
Vim really does need this feature to get some mindshare back from ST2, and I'd love to see this well-implemented, even if its by someone else.