Editing Nano
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 2: | Line 2: | ||
== Syntax highlight == | == Syntax highlight == | ||
Nano can | Nano can extended to highlight octave code. The following can be added to ''~/.nanorc'': | ||
<pre> | |||
# Octave syntax colors | # Octave syntax colors | ||
syntax "octave" "\.m$" "\.octaverc$" | syntax "octave" "\.m$" "\.octaverc$" | ||
Line 17: | Line 18: | ||
# embraced | # embraced | ||
color brightred start="\(" end="\)" # this line needs to be fixed to work properly in all cases | |||
color brightred start="\(" end="\)" | |||
color blue start="\[|\{" end="\]|\}" | color blue start="\[|\{" end="\]|\}" | ||
Line 26: | Line 26: | ||
# comments | # comments | ||
color brightblue "#.*|%.*" | color brightblue "#.*|%.*" | ||
</pre> | </pre> | ||
Alternatively, it can be an individual file available system-wide such as | 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 | ||
<pre>include "/usr/share/nano/octave.nanorc"</pre> | <pre>include "/usr/share/nano/octave.nanorc"</pre> | ||