]> git.r.bdr.sh - rbdr/dotfiles/blob - vim/syntax/arduino.vim
Add two new submodules
[rbdr/dotfiles] / vim / syntax / arduino.vim
1 " Vim syntax file
2 " Language: Arduino
3 " Maintainer: Johannes Hoff <johannes@johanneshoff.com>
4 " Last Change: 06 June 2011
5 " License: VIM license (:help license, replace vim by arduino.vim)
6
7 " Syntax highlighting like in the Arduino IDE
8 " Automatically generated by the script available at
9 " https://bitbucket.org/johannes/arduino-vim-syntax
10 " Using keywords from <arduino>/build/shared/lib/keywords.txt
11 " From version: ARDUINO 0022 - 2010.12.24
12
13 " Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback!
14
15 " For version 5.x: Clear all syntax items
16 " For version 6.x: Quit when a syntax file was already loaded
17 if version < 600
18 syntax clear
19 elseif exists("b:current_syntax")
20 finish
21 endif
22
23 " Read the C syntax to start with
24 if version < 600
25 so <sfile>:p:h/cpp.vim
26 else
27 runtime! syntax/cpp.vim
28 endif
29
30 syn keyword arduinoConstant BIN BYTE CHANGE DEC DEFAULT EXTERNAL FALLING HALF_PI
31 syn keyword arduinoConstant HEX HIGH INPUT INTERNAL INTERNAL1V1 INTERNAL2V56
32 syn keyword arduinoConstant LOW LSBFIRST MSBFIRST OCT OUTPUT PI RISING TWO_PI
33
34 syn keyword arduinoFunc analogRead analogReference analogWrite
35 syn keyword arduinoFunc attachInterrupt bit bitClear bitRead bitSet
36 syn keyword arduinoFunc bitWrite delay delayMicroseconds detachInterrupt
37 syn keyword arduinoFunc digitalRead digitalWrite highByte interrupts
38 syn keyword arduinoFunc lowByte micros millis noInterrupts noTone pinMode
39 syn keyword arduinoFunc pulseIn shiftIn shiftOut tone
40
41 syn keyword arduinoMethod available begin end flush loop peek print println
42 syn keyword arduinoMethod read setup
43
44 syn keyword arduinoModule Serial Serial1 Serial2 Serial3
45
46 syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain cos degrees
47 syn keyword arduinoStdFunc exp floor log map max min radians random randomSeed
48 syn keyword arduinoStdFunc round sin sq sqrt tan
49
50 syn keyword arduinoType boolean byte null String word
51
52 hi def link arduinoType Type
53 hi def link arduinoConstant Constant
54 hi def link arduinoStdFunc Function
55 hi def link arduinoFunc Function
56 hi def link arduinoMethod Function
57 hi def link arduinoModule Identifier