Open Consolatis opened 6 years ago
This sure could be mentioned more explicitly in the readme, but I'm not sure where and what the best wording would be.
I think it would be useful to have it inside the integrated help screen (c-h). For the wording maybe different topics would work. Something like this maybe:
[[Some small text describing the concept of multiple cursors and pointing out the missing selection feature.]] Multiple cursors are just what the name suggests: Multiple cursors which are in different lines and all react the same to single user input.
Creating multiple cursors There are two ways to create multiple cursors:
Moving lines inside the same file Create multiple cursors and press alt+pageup / alt+pagedown
Copying / Cutting multiple lines Create multiple cursors and press ctrl+x to cut / ctrl+c to copy
Pasting previously copied / cut lines Press ESC to switch back to a single cursor, press ctrl+v
Indention manipulation for multiple lines Create multiple cursors and press home to move all the cursors to the beginning of their line. Then press tab / shift+tab
Getting rid of multiple cursors Press ESC
As you pointed out in https://github.com/richrd/suplemon/issues/147#issuecomment-221057650 the first section about creating cursors should likely be rewritten :) ctrl+d actually detaches my tmux so i never tried that and instead use the ctrl+f -> enter path to archive the same.
I just now figured out that to move multiple lines the multi-cursor feature can be used: alt-{up,down} to select, c-x to cut and c-v to paste (also works across files).
Before that I was actually either moving line by line (including creating a new empty line before pasting) or using nano with [c-k]* -> c-u.
Copying won't work that way though because multi cursor copy does not include the line breaks and pressing Enter in multi cursor mode (correctly) inserts a line break after every cursor. To work around this one can create a free pasting space by manually pressing Return in single cursor mode a few times, and c-v on the first line. Edit: Copying works just fine if pressing ESC first to return back to single cursor mode before pasting.
Multi cursors also work for indention: [alt-{up,down}]* -> Home -> Tab/shift-Tab
Edit: There is actually a line moving feature as well: As default bound to alt+{pageup,pagedown} (I prefer ctrl-{up,down} though) and it works for multi cursors as well.