This post shows you some shortcut commands used by developers, working with files in the Nano editor.
Nano editor shortcut commands
Shortcut | Description |
---|---|
help page | Ctrl + G |
Exit page | Ctrl + E |
Justify the line | Ctrl + J |
UnJustify the line | Ctrl + U |
Previous Page | |
Next page | Ctrl + V |
Cut Text | Ctrl + K |
spell check | Ctrl + T |
Shortcut cursor navigation through in nano editor
Shortcut | Description |
---|---|
Move one word forward | Ctrl + Space |
One word backward | Alt + Space |
One character forward | Ctrl + f |
one character backward | Ctrl + b |
Move to line start or beginning | Ctrl + a |
Move to end of line | Ctrl + e |
Move to specific line number | Ctrl + / |
Nano Cut copy page commands
First, go to the line, and use Ctrl + K
to Cut
To paste it, use the Ctrl + U
command on the target line
Nano File Shortcuts
Shortcut | Description |
---|---|
Save File | Ctrl + O |
Open a new file | Ctrl + r Alt + f |
Change to another previous file | Alt + < |
Change to another next file | Alt + > |
Move to line start or beginning | Ctrl + a |
Move to end of line | Ctrl + e |
Move to specific line number | Ctrl + / |
Jump to line X in the nano editor
You can use a shortcut or via command line.
Ctrl + /
Or open a nano editor with a line number option in the opening file
nano +6 test.txt
Nano Search and replace commands
Shortcut | Description |
---|---|
Find text | Ctrl + w |
Repeat last search | Alt + w |
Find and replace | Ctrl + \ or Alt + r |
Change to another next file | Alt + > |
Move to line start or beginning | Ctrl + a |
Move to end of line | Ctrl + e |
Move to specific line number | Ctrl + / |
Reference