
Alternatively you can hit Ctrl T to go to a specific line.Ĭtrl C: Show current line number and file information.Ĭtrl G: Get help this provides information on navigating through files and common keyboard commands. At the prompt, use the cursor keys to go through previous search terms, or hit Ctrl R to move into replace mode. Note that after a Justify operation, this turns into unjustify.Ĭtrl W: Find a word or phrase.

By default, this reflows text to match the width of the editing window.Ĭtrl U: Uncut text, or rather, paste it from the clipboard. You can press this repeatedly to copy multiple lines, which are then stored as one chunk.Ĭtrl J: Justify (fill out) a paragraph of text. At the filename prompt, hit Ctrl T for the file navigator.Ĭtrl K: Cut a line into the clipboard. A filename prompt will appear press Ctrl T to open the file navigator shown above.Ĭtrl R: Read a text file into the current editing session. If you've edited text without saving, you'll be prompted as to whether you really want to exit.Ĭtrl O: Write (output) the current contents of the text buffer to a file. More information about this configuration file can be found at man nanorc.Ĭtrl X: Exit the editor. To enable soft line wrapping by default, add the below line to ~/.nanorc: set softwrap Well I've been trying to find something but the best I could see was enabling soft-line-wrap with the funky key-combination of: Alt + $ ( Alt + Shift + 4). In the some files, lines are truncated because those do not fit in the screen. To disable it permanently for certain file types, edit /etc/nanorc and put a hash mark ( #) before include "/usr/share/nano/*.nanorc". To toggle syntax highlighting, press Alt + Y. These are files that are loaded when nano loads which basically spell out the syntax highlighting.

How can I disable these colors?Ĭolours are loaded through the nanorc framework. Sometimes, if I manage to open a file, the text is unreadable due to its colors. You cannot use the mouse for moving the cursor position. You can use arrow keys, Page Up / Page Down and Home / End as in gedit.

It drops you in edit mode as soon as it opens. How to edit? I heard that you've to enter some commands to begin editing in vi, is this true for nano too?Īs above, no. How can I quit the editor without saving the changes?Ĭtrl + X, then N when it asks if you want to save. Press Y when it asks, and Enter to confirm the filename. Otherwise, Ctrl + X will prompt you if you've made changes. How can I save the file?į3 will let you save without exiting. Note: you won't be able to save unless you have write permissions for that file. Open and file and you're set to start editing: nano filename When you see ^G (et al) it means Ctrl + G. nano can do some pretty nice things so you might want to pootle around in there for a bit.
