Nano » History » Version 1
iri, 09/24/2012 09:16 PM
| 1 | 1 | iri | h1. Nano |
|---|---|---|---|
| 2 | |||
| 3 | "Nano":http://www.nano-editor.org/ is a free text editor on Unix-like system, using a command line interface. |
||
| 4 | To configure nano as you want, edit _.nanorc_ file in /usr/share/nano directory (all users) or in the home user (for one user only). |
||
| 5 | |||
| 6 | Note : if you are on MS Windows, you can get a MS Windows version. For that, go to the nano web site (see above) and select _Download_ > _Get nano_. |
||
| 7 | |||
| 8 | h2. Syntax highlighting |
||
| 9 | |||
| 10 | Edit the _.nanorc_ file in /usr/share/nano directory (or create it, if any). |
||
| 11 | Add it these lines (you can adpat them at your convenience) |
||
| 12 | |||
| 13 | <pre> |
||
| 14 | ## Here is an example for Scol/Pkg. |
||
| 15 | ## |
||
| 16 | syntax "scol" "\.pkg$" "\.scol$" |
||
| 17 | |||
| 18 | ## Types |
||
| 19 | color brightred "\<(typeof|var|typedef|defcom|defcomvar|struct|S|I|F|r1|r2|Chn|Srv|Env|Comm;;|;)\>" |
||
| 20 | |||
| 21 | ## Functions and instructions |
||
| 22 | color brightred "\<(fun|proto|exec|match|with|;|;;)\>" |
||
| 23 | |||
| 24 | ## Loops and conditions |
||
| 25 | color brightgreen "\<(if|then|else|while|do)\>" |
||
| 26 | |||
| 27 | ## Affectations |
||
| 28 | color brightcyan "\<(set|let|mutate|in|->|<-)\>" |
||
| 29 | |||
| 30 | ## Strings and numbers |
||
| 31 | color yellow "<[^= ]*>" ""(\.|[^"])*"" |
||
| 32 | |||
| 33 | ## |
||
| 34 | ## Launchers |
||
| 35 | color blue "[[:space:]]*_load[[:space:]]*" |
||
| 36 | |||
| 37 | ## Comment |
||
| 38 | color green "//.*" |
||
| 39 | color green start="/\*" end="\*/ |
||
| 40 | </pre> |
||
| 41 | |||
| 42 | !http://www.irizone.net/img/app_greffons_nano.png! |