annotate runtime/syntax/arduino.vim @ 9894:b01afb4e8f66 v7.4.2221

commit https://github.com/vim/vim/commit/91984b9034d3b698459622be277d963e0c6df60e Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 16 21:58:41 2016 +0200 patch 7.4.2221 Problem: printf() does not support binary format. Solution: Add %b and %B. (Ozaki Kiichi)
author Christian Brabandt <cb@256bit.org>
date Tue, 16 Aug 2016 22:00:06 +0200
parents de28b1568fc2
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5577
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim syntax file
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: Arduino
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: Johannes Hoff <johannes@johanneshoff.com>
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 " Last Change: 2011 June 3
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 " License: VIM license (:help license, replace vim by arduino.vim)
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " Syntax highlighting like in the Arduino IDE
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 " Keywords extracted from <arduino>/build/shared/lib/keywords.txt (arduino
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 " version 0021)
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 " Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback!
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 " For version 5.x: Clear all syntax items
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 " For version 6.x: Quit when a syntax file was already loaded
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 if version < 600
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 syntax clear
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 elseif exists("b:current_syntax")
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 finish
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 endif
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 " Read the C syntax to start with
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 if version < 600
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 so <sfile>:p:h/cpp.vim
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 else
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 runtime! syntax/cpp.vim
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 endif
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 syn keyword arduinoConstant HIGH LOW INPUT OUTPUT
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 syn keyword arduinoConstant DEC BIN HEX OCT BYTE
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 syn keyword arduinoConstant PI HALF_PI TWO_PI
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 syn keyword arduinoConstant LSBFIRST MSBFIRST
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 syn keyword arduinoConstant CHANGE FALLING RISING
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 syn keyword arduinoConstant SERIAL DISPLAY
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 syn keyword arduinoConstant DEFAULT EXTERNAL INTERNAL INTERNAL1V1 INTERNAL2V56
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 syn keyword arduinoStdFunc cos degrees exp floor log
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 syn keyword arduinoStdFunc map max min pow radians
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 syn keyword arduinoStdFunc round sin sq sqrt tan
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 syn keyword arduinoStdFunc randomSeed random
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 syn keyword arduinoFunc analogReference analogRead analogWrite
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 syn keyword arduinoFunc attachInterrupt detachInterrupt interrupts noInterrupts
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 syn keyword arduinoFunc lowByte highByte bitRead bitWrite bitSet bitClear
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 syn keyword arduinoFunc millis micros delay delayMicroseconds
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 syn keyword arduinoFunc pinMode digitalWrite digitalRead
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 syn keyword arduinoFunc tone noTone pulseIn shiftOut
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 syn keyword arduinoMethod setup loop
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 syn keyword arduinoMethod begin end available read flush print println write peek
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 syn keyword arduinoType boolean byte word String
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 syn keyword arduinoModule Serial Serial1 Serial2 Serial3
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 hi def link arduinoType Type
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 hi def link arduinoConstant Constant
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 hi def link arduinoStdFunc Function
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59 hi def link arduinoFunc Function
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 hi def link arduinoMethod Function
de28b1568fc2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 hi def link arduinoModule Identifier