diff options
| author | Ben Beltran <ben@freshout.us> | 2012-10-08 11:44:10 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@freshout.us> | 2012-10-08 11:44:10 -0500 |
| commit | 0d23b6e515a01a5782532351821ebfa11f3d6cf2 (patch) | |
| tree | aa395b7e50ccb533d6b48b809016ac06f2d5bc8c /vim/syntax/arduino.vim | |
| parent | a91731eac872b7837c2821341db5888702125cef (diff) | |
Add vim again :)
Diffstat (limited to 'vim/syntax/arduino.vim')
| -rw-r--r-- | vim/syntax/arduino.vim | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/vim/syntax/arduino.vim b/vim/syntax/arduino.vim new file mode 100644 index 0000000..fb52283 --- /dev/null +++ b/vim/syntax/arduino.vim @@ -0,0 +1,57 @@ +" Vim syntax file +" Language: Arduino +" Maintainer: Johannes Hoff <johannes@johanneshoff.com> +" Last Change: 06 June 2011 +" License: VIM license (:help license, replace vim by arduino.vim) + +" Syntax highlighting like in the Arduino IDE +" Automatically generated by the script available at +" https://bitbucket.org/johannes/arduino-vim-syntax +" Using keywords from <arduino>/build/shared/lib/keywords.txt +" From version: ARDUINO 0022 - 2010.12.24 + +" Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback! + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Read the C syntax to start with +if version < 600 + so <sfile>:p:h/cpp.vim +else + runtime! syntax/cpp.vim +endif + +syn keyword arduinoConstant BIN BYTE CHANGE DEC DEFAULT EXTERNAL FALLING HALF_PI +syn keyword arduinoConstant HEX HIGH INPUT INTERNAL INTERNAL1V1 INTERNAL2V56 +syn keyword arduinoConstant LOW LSBFIRST MSBFIRST OCT OUTPUT PI RISING TWO_PI + +syn keyword arduinoFunc analogRead analogReference analogWrite +syn keyword arduinoFunc attachInterrupt bit bitClear bitRead bitSet +syn keyword arduinoFunc bitWrite delay delayMicroseconds detachInterrupt +syn keyword arduinoFunc digitalRead digitalWrite highByte interrupts +syn keyword arduinoFunc lowByte micros millis noInterrupts noTone pinMode +syn keyword arduinoFunc pulseIn shiftIn shiftOut tone + +syn keyword arduinoMethod available begin end flush loop peek print println +syn keyword arduinoMethod read setup + +syn keyword arduinoModule Serial Serial1 Serial2 Serial3 + +syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain cos degrees +syn keyword arduinoStdFunc exp floor log map max min radians random randomSeed +syn keyword arduinoStdFunc round sin sq sqrt tan + +syn keyword arduinoType boolean byte null String word + +hi def link arduinoType Type +hi def link arduinoConstant Constant +hi def link arduinoStdFunc Function +hi def link arduinoFunc Function +hi def link arduinoMethod Function +hi def link arduinoModule Identifier |