This is the first push to this repo with my dotfiles
[dotfilesold/.git] / .nano / arduino.nanorc
1
2 ## FILENAME:    arduino.nanorc
3 ##
4 ## DESCRIPTION: The arduino.nanorc syntax files allows syntax highlighting
5 ##              for Arduino sketch files in the GNU nano text editor.
6 ##
7 ## Maintainer:  Nicholas Wilde
8 ## Version:     0.1
9 ## DATE:        06/23/2011
10 ##
11 ## HOMEPAGE:    http://code.google.com/p/arduino-nano-editor-syntax/
12 ##
13 ## COMMENTS:    -Most of the code was taken from the c.nanorc code found with 
14 ##               GNU nano 2.2.6.
15 ##              -Direction was taken from the arduino vim syntax code by johannes
16 ##               <https://bitbucket.org/johannes/arduino-vim-syntax/>
17 ##              -Tested on Ubuntu Server 11.04 Natty Narwhal and GNU nano 2.2.6
18 ##
19 ## DIRECTIONS:  For Ubuntu Server 11.04 Natty Narwhal:
20 ##              -Move this file <arduino.nanorc> to the nano directory
21 ##               /usr/share/nano/
22 ##              -Add arduino.nanorc reference to the nanorc settings file
23 ##               /etc/nanorc
24 ##               ...
25 ##               ## Arduino
26 ##               /usr/share/nano/arduino.nanorc
27 ##               ...
28
29 syntax "INO"  "\.?ino$"
30
31 ## 
32 color brightred "\<[A-Z_][0-9A-Z_]+\>" 
33
34 ## 
35 color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>"
36
37 ## Constants
38 icolor green "\<(HIGH|LOW|INPUT|OUTPUT)\>"
39
40 ## Serial Print
41 icolor red "\<(DEC|BIN|HEX|OCT|BYTE)\>"
42
43 ## PI Constants
44 icolor green "\<(PI|HALF_PI|TWO_PI)\>"
45
46 ## ShiftOut
47 icolor green "\<(LSBFIRST|MSBFIRST)\>"
48
49 ## Attach Interrupt
50 icolor green "\<(CHANGE|FALLING|RISING)\>"
51
52 ## Analog Reference
53 icolor green "\<(DEFAULT|EXTERNAL|INTERNAL|INTERNAL1V1|INTERNAL2V56)\>"
54
55 ## === FUNCTIONS === ##
56
57 ## Data Types
58 color green "\<(boolean|byte|char|float|int|long|word)\>"
59
60 ## Control Structions
61 color brightyellow "\<(case|class|default|do|double|else|false|for|if|new|null|private|protected|public|short|signed|static|String|switch|this|throw|try|true|unsigned|void|while)\>" 
62 color magenta "\<(goto|continue|break|return)\>"
63
64 ## Math
65 color brightyellow "\<(abs|acos|asin|atan|atan2|ceil|constrain|cos|degrees|exp|floor|log|map|max|min|radians|random|randomSeed|round|sin|sq|sqrt|tan)\>"
66
67 ## Bits & Bytes
68 color brightyellow "\<(bitRead|bitWrite|bitSet|bitClear|bit|highByte|lowByte)\>"
69
70 ## Analog I/O
71 color brightyellow "\<(analogReference|analogRead|analogWrite)\>"
72
73 ## External Interrupts
74 color brightyellow "\<(attachInterrupt|detachInterrupt)\>"
75
76 ## Time
77 color brightyellow "\<(delay|delayMicroseconds|millis|micros)\>"
78
79 ## Digital I/O
80 color brightyellow "\<(pinMode|digitalWrite|digitalRead)\>"
81
82 ## Interrupts
83 color brightyellow "\<(interrupts|noInterrupts)\>"
84
85 ## Advanced I/O
86 color brightyellow "\<(noTone|pulseIn|shiftIn|shiftOut|tone)\>"
87
88 ## Serial
89 color magenta "\<(Serial|Serial1|Serial2|Serial3|begin|end|peek|read|print|println|available|flush)\>"
90
91 ## Structure
92 color brightyellow "\<(setup|loop)\>"
93
94 ## 
95 color brightcyan "^[[:space:]]*#[[:space:]]*(define|include(_next)?|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)"
96
97 ## 
98 color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
99
100 ## GCC builtins
101 color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
102
103 ## String highlighting.  You will in general want your comments and
104 ## strings to come last, because syntax highlighting rules will be
105 ## applied in the order they are read in.
106 color brightyellow "<[^=    ]*>" ""(\\.|[^"])*""
107
108 ## This string is VERY resource intensive!
109 color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
110
111 ## Comments
112 color brightblue "^\s*//.*"
113 color brightblue start="/\*" end="\*/"
114
115 ## Trailing whitespace
116 color ,green "[[:space:]]+$"