5577
|
1 " Vim syntax file
|
|
2 " Language: Arduino
|
|
3 " Maintainer: Johannes Hoff <johannes@johanneshoff.com>
|
26050
|
4 " Last Change: 21 October 2021
|
5577
|
5 " License: VIM license (:help license, replace vim by arduino.vim)
|
|
6
|
|
7 " Syntax highlighting like in the Arduino IDE
|
26050
|
8 " Automatically generated by the script available at
|
26100
|
9 " https://github.com/johshoff/arduino-vim-syntax
|
26050
|
10 " Using keywords from <arduino>/build/shared/lib/keywords.txt
|
|
11 " From version: 1.8.16
|
5577
|
12
|
26050
|
13 " Thanks to Rik, Erik Nomitch, Adam Obeng, Graeme Cross and Niall Parker
|
|
14 " for helpful feedback!
|
5577
|
15
|
26050
|
16 " For version 5.x: Clear all syntax items
|
|
17 " For version 6.x: Quit when a syntax file was already loaded
|
|
18 if version < 600
|
|
19 syntax clear
|
|
20 elseif exists("b:current_syntax")
|
5577
|
21 finish
|
|
22 endif
|
|
23
|
|
24 " Read the C syntax to start with
|
26050
|
25 if version < 600
|
|
26 so <sfile>:p:h/cpp.vim
|
|
27 else
|
|
28 runtime! syntax/cpp.vim
|
|
29 endif
|
5577
|
30
|
26050
|
31 syn keyword arduinoConstant BIN CHANGE DEC DEFAULT EXTERNAL FALLING HALF_PI HEX
|
|
32 syn keyword arduinoConstant HIGH INPUT INPUT_PULLUP INTERNAL INTERNAL1V1
|
|
33 syn keyword arduinoConstant INTERNAL2V56 LED_BUILTIN LED_BUILTIN_RX
|
|
34 syn keyword arduinoConstant LED_BUILTIN_TX LOW LSBFIRST MSBFIRST OCT OUTPUT PI
|
|
35 syn keyword arduinoConstant RISING TWO_PI
|
|
36
|
|
37 syn keyword arduinoFunc analogRead analogReadResolution analogReference
|
|
38 syn keyword arduinoFunc analogWrite analogWriteResolution attachInterrupt
|
|
39 syn keyword arduinoFunc bit bitClear bitRead bitSet bitWrite delay
|
|
40 syn keyword arduinoFunc delayMicroseconds detachInterrupt
|
|
41 syn keyword arduinoFunc digitalPinToInterrupt digitalRead digitalWrite
|
|
42 syn keyword arduinoFunc highByte interrupts lowByte micros millis
|
|
43 syn keyword arduinoFunc noInterrupts noTone pinMode pulseIn pulseInLong
|
|
44 syn keyword arduinoFunc shiftIn shiftOut tone yield
|
5577
|
45
|
26050
|
46 syn keyword arduinoMethod available availableForWrite begin charAt compareTo
|
|
47 syn keyword arduinoMethod concat end endsWith equals equalsIgnoreCase export
|
|
48 syn keyword arduinoMethod final find findUntil flush getBytes indexOf
|
|
49 syn keyword arduinoMethod lastIndexOf length loop override parseFloat
|
|
50 syn keyword arduinoMethod parseInt peek print println read readBytes
|
|
51 syn keyword arduinoMethod readBytesUntil readString readStringUntil replace
|
|
52 syn keyword arduinoMethod setCharAt setTimeout setup startsWith Stream
|
|
53 syn keyword arduinoMethod substring toCharArray toInt toLowerCase toUpperCase
|
|
54 syn keyword arduinoMethod trim
|
|
55
|
|
56 syn keyword arduinoModule Keyboard Mouse Serial Serial1 Serial2 Serial3
|
|
57 syn keyword arduinoModule SerialUSB
|
5577
|
58
|
26050
|
59 syn keyword arduinoStdFunc abs accept acos acosf asin asinf atan atan2 atan2f
|
|
60 syn keyword arduinoStdFunc atanf cbrt cbrtf ceil ceilf click constrain
|
|
61 syn keyword arduinoStdFunc copysign copysignf cos cosf cosh coshf degrees exp
|
|
62 syn keyword arduinoStdFunc expf fabs fabsf fdim fdimf floor floorf fma fmaf
|
|
63 syn keyword arduinoStdFunc fmax fmaxf fmin fminf fmod fmodf hypot hypotf
|
|
64 syn keyword arduinoStdFunc isfinite isinf isnan isPressed ldexp ldexpf log
|
|
65 syn keyword arduinoStdFunc log10 log10f logf lrint lrintf lround lroundf map
|
|
66 syn keyword arduinoStdFunc max min move pow powf press radians random
|
|
67 syn keyword arduinoStdFunc randomSeed release releaseAll round roundf signbit
|
|
68 syn keyword arduinoStdFunc sin sinf sinh sinhf sq sqrt sqrtf tan tanf tanh
|
|
69 syn keyword arduinoStdFunc tanhf trunc truncf
|
5577
|
70
|
26050
|
71 syn keyword arduinoType _Bool _Complex _Imaginary array atomic_bool
|
|
72 syn keyword arduinoType atomic_char atomic_int atomic_llong atomic_long
|
|
73 syn keyword arduinoType atomic_schar atomic_short atomic_uchar atomic_uint
|
|
74 syn keyword arduinoType atomic_ullong atomic_ulong atomic_ushort boolean
|
|
75 syn keyword arduinoType byte char16_t char32_t complex NULL null PROGMEM
|
|
76 syn keyword arduinoType String word
|
5577
|
77
|
|
78 hi def link arduinoType Type
|
|
79 hi def link arduinoConstant Constant
|
|
80 hi def link arduinoStdFunc Function
|
|
81 hi def link arduinoFunc Function
|
|
82 hi def link arduinoMethod Function
|
|
83 hi def link arduinoModule Identifier
|