vis icon indicating copy to clipboard operation
vis copied to clipboard

move primary cursor independent from the other cursors

Open lammermann opened this issue 8 years ago • 4 comments

For my workflow it would be great if I could hit a shortcut and than move the primary cursor independent of the other cursors. This way I could place some cursors, make the primary cursor independent move to an arbitrary section in the text and place another cursor. The same shortcut could be used to move all cursors again (also, all text adding, deleting, changing commands should end the independent movement).

I haven't seen this workflow elsewhere so maybe I didn't got multiple cursors and want to use them wrongly. Does this workflow make sense to you?

lammermann avatar Jun 28 '16 15:06 lammermann

Most of the time, when I want to use multiple cursors, it is at places that have something in common, and most often again, I can use sam structural expressions:

  1. :x/pattern/ to place cursors at each match);
  2. Filter them with :g/pattern/ to only keep the lines that match;
  3. Eventually remove the few special case that remain.

To place the cursors at specific position, I use the t and f vim commands to reach the { or whatever char I was targeting.

But maybe there will be some special cases that would make placing cursors by hand more convenient.

ghost avatar Jun 29 '16 13:06 ghost

Thank you very much. I haven't read about toms cmd language before because I expected it to be just like vims cmd line. Now I'm pretty sure this will improve my workflow immensely. Could imagine there would still be some use for this kind of shortcut in special cases but for most things sams cmd lang will work out very well (even much better than manual placing)

lammermann avatar Jul 03 '16 18:07 lammermann

I haven't seen sam command language combined with multiple cursors elsewhere... It is really a nice feature indeed!

ghost avatar Jul 03 '16 22:07 ghost

Nobody seem to pick up on this. Do we need to keep this ticket around?

mcepl avatar Feb 14 '24 22:02 mcepl

Yes I think everything here is covered already with sam. Closing.

rnpnr avatar Feb 27 '24 13:02 rnpnr