Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
add comment

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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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