Skip to content

Commit

Permalink
Create octave.nanorc
Browse files Browse the repository at this point in the history
  • Loading branch information
au5ton authored Apr 25, 2019
1 parent 28f1aaa commit 082d35c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions octave.nanorc
Original file line number Diff line number Diff line change
@@ -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 "#.*|%.*"

0 comments on commit 082d35c

Please sign in to comment.