richrd / suplemon

:lemon: Console (CLI) text editor with multi cursor support. Suplemon replicates Sublime Text like functionality in the terminal. Try it out, give feedback, fork it!
MIT License
789 stars 43 forks source link

Mention in the docs that we actually have a selection like feature #225

Open Consolatis opened 6 years ago

Consolatis commented 6 years ago

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.

richrd commented 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.

Consolatis commented 6 years ago

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:

5. Working with multiple lines at once

[[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.

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.