Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
nano [2022/04/30 01:02] – added link to nano peteyboy | nano [2022/04/30 01:38] – emphasized sections peteyboy |
---|
=== The nano editor === | ====== The nano editor ====== |
The 'nano' editor is a [[https://www.nano-editor.org/dist/latest/faq.html#1.1 | GNU-project editor]] based on 'pico' a simple but easy to use editor created for the PINE email program for creating and editing emails. It has been expanded quite a bit: there is enhanced navigation, and search which include regex search. | The 'nano' editor is a [[https://www.nano-editor.org/dist/latest/faq.html#1.1 | GNU-project editor]] based on 'pico' a simple but easy to use editor created for the PINE email program for creating and editing emails. It has been expanded quite a bit: there is enhanced navigation, and search which include regex search. |
| |
A great addition, especially if you connect to SDF on a color terminal, is nano's use of "syntax" files, which provide syntax highlighting for several programming languages and related filetypes, such as HTML files, shell scripts, shell resource files (like ''.bashrc'') and even the nano resource file ''.nanorc'', where the settings for syntax file are kept. | A great addition, especially if you connect to SDF on a color terminal, is nano's use of "syntax" files, which provide syntax highlighting for several programming languages and related filetypes, such as HTML files, shell scripts, shell resource files (like ''.bashrc'') and even the nano resource file ''.nanorc'', where the settings for syntax file are kept. |
| |
== How to Activate Syntax Hightlighting == | ==== How to Activate Syntax Hightlighting ==== |
To activate syntax highlighting, we are going to copy the default ''nanorc'' file to your user space and edit it. The steps are: | To activate syntax highlighting, we are going to copy the default ''nanorc'' file to your user space and edit it. The steps are: |
- copy the default file ''nanorc'' to your local as a resource file, ''.nanorc'' (yes, with the dot)<code> | - copy the default file ''nanorc'' to your local as a resource file, ''.nanorc'' (yes, with the dot)<code> |
| |
The next time you open nano on an HTML or other file (it keys off the file extension, like ''index.html''), you should see the code hightlighted, which should help your editing significantly! | The next time you open nano on an HTML or other file (it keys off the file extension, like ''index.html''), you should see the code hightlighted, which should help your editing significantly! |
| |
| |
| ==== nano cheatsheet ==== |
| Nano, like 'pico', has Help. So if you start with the [[pico_cheat_sheet|pico cheatsheet]] and read the Help, you'll get what you need. |
| |
| |