Mercurial > vim
annotate runtime/syntax/arduino.vim @ 16582:9a7d98e11954 v8.1.1294
patch 8.1.1294: MS-Windows: Some fonts return wrong average char width
commit https://github.com/vim/vim/commit/93d77b2cbec08518ee426d0c44c50cf505732443
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue May 7 22:52:50 2019 +0200
patch 8.1.1294: MS-Windows: Some fonts return wrong average char width
Problem: MS-Windows: Some fonts return wrong average char width.
Solution: Compute the average ourselves. (Ken Takata, closes https://github.com/vim/vim/issues/4356)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 May 2019 23:00:06 +0200 |
parents | 43efa4f5a8ea |
children | ebedba7a4898 |
rev | line source |
---|---|
5577 | 1 " Vim syntax file |
2 " Language: Arduino | |
3 " Maintainer: Johannes Hoff <johannes@johanneshoff.com> | |
4 " Last Change: 2011 June 3 | |
5 " License: VIM license (:help license, replace vim by arduino.vim) | |
6 | |
7 " Syntax highlighting like in the Arduino IDE | |
8 " Keywords extracted from <arduino>/build/shared/lib/keywords.txt (arduino | |
9 " version 0021) | |
10 | |
11 " Thanks to Rik, Erik Nomitch, Adam Obeng and Graeme Cross for helpful feedback! | |
12 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5577
diff
changeset
|
13 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5577
diff
changeset
|
14 if exists("b:current_syntax") |
5577 | 15 finish |
16 endif | |
17 | |
18 " Read the C syntax to start with | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
5577
diff
changeset
|
19 runtime! syntax/cpp.vim |
5577 | 20 |
21 syn keyword arduinoConstant HIGH LOW INPUT OUTPUT | |
22 syn keyword arduinoConstant DEC BIN HEX OCT BYTE | |
23 syn keyword arduinoConstant PI HALF_PI TWO_PI | |
24 syn keyword arduinoConstant LSBFIRST MSBFIRST | |
25 syn keyword arduinoConstant CHANGE FALLING RISING | |
26 syn keyword arduinoConstant SERIAL DISPLAY | |
27 syn keyword arduinoConstant DEFAULT EXTERNAL INTERNAL INTERNAL1V1 INTERNAL2V56 | |
28 | |
29 syn keyword arduinoStdFunc abs acos asin atan atan2 ceil constrain | |
30 syn keyword arduinoStdFunc cos degrees exp floor log | |
31 syn keyword arduinoStdFunc map max min pow radians | |
32 syn keyword arduinoStdFunc round sin sq sqrt tan | |
33 syn keyword arduinoStdFunc randomSeed random | |
34 | |
35 syn keyword arduinoFunc analogReference analogRead analogWrite | |
36 syn keyword arduinoFunc attachInterrupt detachInterrupt interrupts noInterrupts | |
37 syn keyword arduinoFunc lowByte highByte bitRead bitWrite bitSet bitClear | |
38 syn keyword arduinoFunc millis micros delay delayMicroseconds | |
39 syn keyword arduinoFunc pinMode digitalWrite digitalRead | |
40 syn keyword arduinoFunc tone noTone pulseIn shiftOut | |
41 | |
42 syn keyword arduinoMethod setup loop | |
43 syn keyword arduinoMethod begin end available read flush print println write peek | |
44 | |
45 syn keyword arduinoType boolean byte word String | |
46 | |
47 syn keyword arduinoModule Serial Serial1 Serial2 Serial3 | |
48 | |
49 hi def link arduinoType Type | |
50 hi def link arduinoConstant Constant | |
51 hi def link arduinoStdFunc Function | |
52 hi def link arduinoFunc Function | |
53 hi def link arduinoMethod Function | |
54 hi def link arduinoModule Identifier |