dotfiles/nanorc/highlighting/c-file.nanorc

11 lines
640 B
Plaintext

syntax "c-file" "\.(c|h)$"
color red "\<[A-Z_]{2,}\>"
color green "\<(float|double|char|int|short|long|enum|void|static|const|struct|union|typedef|extern|signed|unsigned|inline)\>"
color brightyellow "\<(for|if|while|do|else|case|switch|goto|continue|break|return)\>"
color brightcyan "^ *# *(define|undef|include|ifn?def|endif|elif|else|if)"
color brightmagenta "'([^\]|(\\['abfnrtv\\]))'" "'\\(([0-7][0-7]?)|([0-3][0-7][0-7]))'" "'\\x[0-9A-Fa-f][0-9A-Fa-f]?'"
color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
color brightyellow start=""(\\.|[^\"])*\\ *$" end="^(\\.|[^\"])*""
color brightblue "//.*"
color brightblue start="/\*" end="\*/"