3

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.

1 Answer 1

5

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.

4
  • When available, you can use the Alt key for Meta. So Alt-A toggles set-mark and release-mark Jan 27, 2010 at 21:22
  • Works great, thank you! Can someone tell me the reason why "M" stands for escape?
    – user12096
    Jan 27, 2010 at 21:28
  • Good question, I had to do some searching but found it here: en.wikipedia.org/wiki/Meta_key
    – einstiien
    Jan 27, 2010 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, 2010 at 21:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .