From 082d35c8fcd1aee27de5b4282fa4a6cdd52235cc Mon Sep 17 00:00:00 2001 From: Austin Jackson Date: Wed, 24 Apr 2019 20:07:13 -0500 Subject: [PATCH] Create octave.nanorc --- octave.nanorc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 octave.nanorc diff --git a/octave.nanorc b/octave.nanorc new file mode 100644 index 0000000..0b188b9 --- /dev/null +++ b/octave.nanorc @@ -0,0 +1,24 @@ +# Source: https://wiki.octave.org/Nano +# Octave syntax colors +syntax "octave" "\.m$" "\.octaverc$" + +# keywords +color brightyellow "(case|catch|do|else(if)?|for|function|if|otherwise|switch|try|until|unwind_protect(_cleanup)?|vararg(in|out)|while)" +color brightyellow "end(_try_catch|_unwind_protect|for|function|if|switch|while)?" +color magenta "(break|continue|return)" + +# storage-type +color green "(global|persistent|static)" +# data-type +color green "(cell(str)?|char|double|(u)?int(8|16|32|64)|logical|single|struct)" + +# embraced +# TODO: the next line needs to be fixed to work properly in all cases +color brightred start="\(" end="\)" +color blue start="\[|\{" end="\]|\}" + +# strings +color yellow ""(\\.|[^\"])*"|'(\\.|[^\"])*'" + +# comments +color brightblue "#.*|%.*"