Nano: Difference between revisions

19 bytes added ,  6 December 2011
m
using templates
(Moved nano section from the old wiki)
 
m (using templates)
Line 2: Line 2:


== Syntax highlight ==
== Syntax highlight ==
Nano can extended to highlight octave code. The following can be added to ''~/.nanorc'':
Nano can extended to highlight octave code. The following can be added to {{File|~/.nanorc|<pre>
<pre>
# Octave syntax colors
# Octave syntax colors
syntax "octave" "\.m$" "\.octaverc$"
syntax "octave" "\.m$" "\.octaverc$"
Line 26: Line 25:
# comments
# comments
color brightblue "#.*|%.*"
color brightblue "#.*|%.*"
</pre>
</pre>}}


Alternatively, it can be an individual file available system-wide such as ''/usr/share/nano/octave.nanorc'' which can then be included in ''/etc/nanorc'' (again, system-wide), or in ''~/.nanorc'' with
Alternatively, it can be an individual file available system-wide such as {{Path|/usr/share/nano/octave.nanorc}} which can then be included in {{Path|/etc/nanorc}} (again, system-wide), or in {{Path|~/.nanorc}} with
<pre>include "/usr/share/nano/octave.nanorc"</pre>
<pre>include "/usr/share/nano/octave.nanorc"</pre>