atom-multi-cursor-plus
atom-multi-cursor-plus copied to clipboard
Other workflow
I like the workflow from the sublime text package: PowerCursors much better, because then you do not have to override all of your alt-keybindings to add and especially move around with multiple cursors.
In contrast in the Sublime text package PowerCursors you only need two keybindings: First you use the "mark" command to add an (inactive) cursor. After that you can move around freely with your normal keybindigs and mark some other positions. Then you need an "activate" command to activate the inactive cursors all at once. Of course adding and removing cursors is also possible, as well as switching between inactive/active cursors.
What do you think is a better workflow and why? I really do not want to override my alt-keybindings! Is there a (easy) way to change the behavior from the current situation to the one from PowerCursors?
That actually sounds like a nice workflow, and probably simpler to use than the current functionality.
One way that this could be possible in Atom would require overriding the default Atom movement keybindings. But that sounds a bit hacky, if it would work at all. And this would be pretty invasive, and may break core functionality somewhere down the line.
A better way to implement this would be for "mark" to just save the position of the cursor (currently it just creates a new cursor, and alt+arrows move the latest created cursor, instead of all cursors, which is Atom's default). Then "activate" would convert these marks to cursors (and vice versa for "unactivate").
This would basically require a rewrite of the entire package, though. But it may not be an insurmountable amount of work, I remember something being introduced into the Atom API that could be used to do this. I can't remember what it was called, but it allowed you to mark positions that would move with the text. Without something like that, this would be difficult to implement (imagine marking some positions, and then removing some text so that those positions move around, etc.).
I don't currently have the time to implement this, but that workflow does sound interesting, so I may take a look at some point (don't hold your breath). PRs are always welcome!
thanks for thinking about that. But it is not so nice, that it needs a rewrite... Maybe I will look into the code too, someday.