Hacker News new | ask | show | jobs
by Afal 4428 days ago
you can get multiple cursors with this plugin (works better than I expected) https://github.com/terryma/vim-multiple-cursors
1 comments

It works, and definitely better than other tries, but it's not even close to Sublime Text's caliber. Through no fault of the author, I assure you, as someone who's tried his hand at creating a similar plugin for vim and found many limitations of vim.

One easy limitation comes to mind - you can't copy-paste different cursors, then paste them as unique items. E.g., given a list "a, b, c", I want to be able to multi-cursor the letters, copy them, then paste them into 3 multi-cursors somewhere else. Hard, very hard to implement.

Do you have any links to a description of how they should work or should I just use Sublime Text to see a canonical example?

That doesn't sound hard to implement iff you plan for those features from the beginning. I have my own editor hobby project and during my reading I got convinced multiple cursors are great for the reasons you described in your other comment.

I hadn't thought about multi cursor copy/paste so I'm wondering what else I've missed.

You should probably just check out Sublime Text, that's the best (almost only) implementation I've seen.
Someone posted a demo video of a modal text editor with multiple cursors to HN a year or so ago and I've been trying to track it down. Any idea what that might have been?
Maybe I'm not understanding the example, but is what you're suggesting (copy/paste) even possible in sublime? The github plugin above is the closest I've seen to sublime's version. It's not perfect, but works for most of the basic use cases.
Yep, possible in Sublime Text. It's one of the harder things to get right, and Sublime also has (or had) weird behavior, but most of the time copying 20 items with 20 cursors and pasting them to 20 cursors works great.