diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-07-11 04:05:51 +0000 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-07-29 02:12:31 +0000 |
commit | a98a6996c291b3e300d27b791eded9eed333d677 (patch) | |
tree | 51d92f6cac128f938cd0aaa9a8dd0ce7a83d63a9 /runtime/syntax/arduino.vim | |
parent | 66bc13163398786c88e20b7cdd61c66978b4d3fb (diff) | |
download | rneovim-a98a6996c291b3e300d27b791eded9eed333d677.tar.gz rneovim-a98a6996c291b3e300d27b791eded9eed333d677.tar.bz2 rneovim-a98a6996c291b3e300d27b791eded9eed333d677.zip |
re-integrate runtime/ vim-patch:0 #938
Vim runtime files based on 7.4.384 / hg changeset 7090d7f160f7
Excluding:
Amiga icons (*.info, icons/)
doc/hangulin.txt
tutor/
spell/
lang/ (only used for menu translations)
macros/maze/, macros/hanoi/, macros/life/, macros/urm/
These were used to test vi compatibility.
termcap
"Demonstration of a termcap file (for the Amiga and Archimedes)"
Helped-by: Rich Wareham <rjw57@cam.ac.uk>
Helped-by: John <john.schmidt.h@gmail.com>
Helped-by: Yann <yann@yann-salaun.com>
Helped-by: Christophe Badoit <c.badoit@lesiteimmo.com>
Helped-by: drasill <github@tof2k.com>
Helped-by: Tae Sandoval Murgan <taecilla@gmail.com>
Helped-by: Lowe Thiderman <lowe.thiderman@gmail.com>
Diffstat (limited to 'runtime/syntax/arduino.vim')
-rw-r--r-- | runtime/syntax/arduino.vim | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/runtime/syntax/arduino.vim b/runtime/syntax/arduino.vim new file mode 100644 index 0000000000..14299a441a --- /dev/null +++ b/runtime/syntax/arduino.vim @@ -0,0 +1,61 @@ +" Vim syntax file +" Language: Arduino +" Maintainer: Johannes Hoff <johannes@johanneshoff.com> +" Last Change: 2011 June 3 +" License: VIM license (:help license, replace vim by arduino.vim) + +" Syntax highlighting like in the Arduino IDE +" Keywords extracted from <arduino>/build/shared/lib/keywords.txt (arduino +" version 0021) + +" 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 HIGH LOW INPUT OUTPUT +syn keyword arduinoConstant DEC BIN HEX OCT BYTE +syn keyword arduinoConstant PI HALF_PI TWO_PI +syn keyword arduinoConstant LSBFIRST MSBFIRST +syn keyword arduinoConstant CHANGE FALLING RISING +syn keyword arduinoConstant SERIAL DISPLAY +syn keyword arduinoConstant DEFAULT EXTERNAL INTERNAL INTERNAL1V1 INTERNAL2V56 + +syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain +syn keyword arduinoStdFunc cos degrees exp floor log +syn keyword arduinoStdFunc map max min pow radians +syn keyword arduinoStdFunc round sin sq sqrt tan +syn keyword arduinoStdFunc randomSeed random + +syn keyword arduinoFunc analogReference analogRead analogWrite +syn keyword arduinoFunc attachInterrupt detachInterrupt interrupts noInterrupts +syn keyword arduinoFunc lowByte highByte bitRead bitWrite bitSet bitClear +syn keyword arduinoFunc millis micros delay delayMicroseconds +syn keyword arduinoFunc pinMode digitalWrite digitalRead +syn keyword arduinoFunc tone noTone pulseIn shiftOut + +syn keyword arduinoMethod setup loop +syn keyword arduinoMethod begin end available read flush print println write peek + +syn keyword arduinoType boolean byte word String + +syn keyword arduinoModule Serial Serial1 Serial2 Serial3 + +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 |