]> git.r.bdr.sh - rbdr/dotfiles/blame - vim/syntax/arduino.vim
Turn off the blur
[rbdr/dotfiles] / vim / syntax / arduino.vim
CommitLineData
0d23b6e5
BB
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
17if version < 600
18 syntax clear
19elseif exists("b:current_syntax")
20 finish
21endif
22
23" Read the C syntax to start with
24if version < 600
25 so <sfile>:p:h/cpp.vim
26else
27 runtime! syntax/cpp.vim
28endif
29
30syn keyword arduinoConstant BIN BYTE CHANGE DEC DEFAULT EXTERNAL FALLING HALF_PI
31syn keyword arduinoConstant HEX HIGH INPUT INTERNAL INTERNAL1V1 INTERNAL2V56
32syn keyword arduinoConstant LOW LSBFIRST MSBFIRST OCT OUTPUT PI RISING TWO_PI
33
34syn keyword arduinoFunc analogRead analogReference analogWrite
35syn keyword arduinoFunc attachInterrupt bit bitClear bitRead bitSet
36syn keyword arduinoFunc bitWrite delay delayMicroseconds detachInterrupt
37syn keyword arduinoFunc digitalRead digitalWrite highByte interrupts
38syn keyword arduinoFunc lowByte micros millis noInterrupts noTone pinMode
39syn keyword arduinoFunc pulseIn shiftIn shiftOut tone
40
41syn keyword arduinoMethod available begin end flush loop peek print println
42syn keyword arduinoMethod read setup
43
44syn keyword arduinoModule Serial Serial1 Serial2 Serial3
45
46syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain cos degrees
47syn keyword arduinoStdFunc exp floor log map max min radians random randomSeed
48syn keyword arduinoStdFunc round sin sq sqrt tan
49
50syn keyword arduinoType boolean byte null String word
51
52hi def link arduinoType Type
53hi def link arduinoConstant Constant
54hi def link arduinoStdFunc Function
55hi def link arduinoFunc Function
56hi def link arduinoMethod Function
57hi def link arduinoModule Identifier