Per Stenebo
2017-11-28 18:32:14
2018-03-25 07:28:41
nano cheat sheet
Handy commands in the terminal text editor nano.
Scroll
Ctrl a and then Esc
Move with arrow keys.
Esc to get back.
Search
Ctrl a and then w
Enter your search term [press return]
Search and replace
Ctrl \
Enter your search term [press return]
Enter your replacement term [press return]
A [to replace all instances]
Cut and paste lines
Ctrl k one or multiple lines.
Ctrl u to paste everything.
Copy and paste selection
This is a workaround since I can't get the proper way to work.
Help text: M-^ (M-6) Copy the current line and store it in the cutbuffer
Ctrl 6 or Alt a to enter Mark set mode. Help text: ^^ (M-A) Mark text starting from the cursor position
Navigate with arrow buttons to select section
Ctrl k to cut selection
Ctrl u to paste selection back to original position
Move with arrow keys to the paste point
Ctrl u to paste selection
Undo/redo
Alt u to undo action, can be repeated until end of undo buffer.
Alt e to redo last undo action.