How do I extend a selection in nano and pico with the keyboard, so I can move and copy blocks?

Sorry, this is a question I would normally find out by myself but I have searched a lot in different occasions now without success.

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted

I got this from inside the help screen in nano by pressing ctrl-g:

Ctrl    F-Key   Esc Key
^^      (F15)   (M-A)   Mark text at the cursor position  
M-^             (M-6)   Copy the current line and store it in the cutbuffer
^U      (F10)           Uncut from the cutbuffer into the current line

^ = ctrl
M = esc

So you position your cursor at the beginning of where you want to select and press esc-a or ctrl-shift-6 or F15 then move the cursor with the arrow keys to highlight the text. Once it is highlighted press esc-6 to copy the text. Lastly move to where you want to paste and press ctrl-u or F10. I just tested this in nano 2.0.6 on OS X but should work across the board.

link|improve this answer
When available, you can use the Alt key for Meta. So Alt-A toggles set-mark and release-mark – Dennis Williamson Jan 27 '10 at 21:22
Works great, thank you! Can someone tell me the reason why "M" stands for escape? – user12096 Jan 27 '10 at 21:28
Good question, I had to do some searching but found it here: en.wikipedia.org/wiki/Meta_key – einstiien Jan 27 '10 at 21:31
Also, I tried alt but it didn't work on my console. Could be my emulation though, I have some custom settings because of the servers I connect to. – einstiien Jan 27 '10 at 21:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.