5
edits
Carandraug (talk | contribs) m (using templates) |
Waldyrious (talk | contribs) (fix syntax error (tested with nano 2.9.3)) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
== Syntax highlight == | == Syntax highlight == | ||
Nano can extended to highlight octave code. The following can be added to {{File|~/.nanorc|<pre> | Nano can be extended to highlight octave code. The following can be added to {{File|~/.nanorc|<pre> | ||
# Octave syntax colors | # Octave syntax colors | ||
syntax "octave" "\.m$" "\.octaverc$" | syntax "octave" "\.m$" "\.octaverc$" | ||
Line 17: | Line 17: | ||
# embraced | # embraced | ||
color brightred start="\(" end="\)" | # TODO: the next line needs to be fixed to work properly in all cases | ||
color brightred start="\(" end="\)" | |||
color blue start="\[|\{" end="\]|\}" | color blue start="\[|\{" end="\]|\}" | ||
Line 29: | Line 30: | ||
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 | 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> | ||
[[Category:Editors]] |
edits