-
Notifications
You must be signed in to change notification settings - Fork 0
/
c-file.nanorc
26 lines (24 loc) · 906 Bytes
/
c-file.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
syntax "c-file" "(\.(c|h)$)|((^|/)[ch]/[^/]*$)"
magic "^(C|C\+\+) (source|program)"
comment "//"
# Constants
color yellow "\<[A-Z_][0-9A-Z_]+\>"
color blue "\<(float|double|bool|char|int|short|long|sizeof|enum|void|auto|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
color yellow "\<(if|while|do|else|case|switch)\>"
color yellow "\<(goto|continue|break|return)\>"
color yellow "^#( )*(define|undef|include|ifn?def|endif|elif|else|if)"
##
## You will in general want your comments and strings to come last,
## because syntax highlighting rules will be applied in the order they
## are read in.
##
# color brightyellow "<[^= ]*>" ""(\\.|[^\"])*""
##
## This string is VERY resource intensive!!!
color brightyellow start=""(\\.|[^\"])*\\( | )*$" end="^(\\.|[^\"])*""
##
## Comments.
color green "//.*"
color green start="/\*" end="\*/"
## Trailing whitespace.
color ,red "[[:space:]]+$"