annotate runtime/syntax/cterm.vim @ 9:6a13985590e6

*** empty log message ***
author axmo
date Fri, 29 Aug 2008 15:41:29 +0900
parents 76efa0be13f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 " Vim syntax file
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 " Language: Century Term Command Script
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 " Maintainer: Sean M. McKee <mckee@misslink.net>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 " Last Change: 2002 Apr 13
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 " Version Info: @(#)cterm.vim 1.7 97/12/15 09:23:14
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 " For version 5.x: Clear all syntax items
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 " For version 6.x: Quit when a syntax file was already loaded
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 syntax clear
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 elseif exists("b:current_syntax")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 finish
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 syn case ignore
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17 "FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 syn keyword ctermFunction abort addcr addlf answer at attr batch baud
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 syn keyword ctermFunction break call capture cd cdelay charset cls color
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 syn keyword ctermFunction combase config commect copy cread
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 syn keyword ctermFunction creadint devprefix dialer dialog dimint
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 syn keyword ctermFunction dimlog dimstr display dtimeout dwait edit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 syn keyword ctermFunction editor emulate erase escloop fcreate
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 syn keyword ctermFunction fflush fillchar flags flush fopen fread
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25 syn keyword ctermFunction freadln fseek fwrite fwriteln get hangup
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 syn keyword ctermFunction help hiwait htime ignore init itime
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 syn keyword ctermFunction keyboard lchar ldelay learn lockfile
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 syn keyword ctermFunction locktime log login logout lowait
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29 syn keyword ctermFunction lsend ltime memlist menu mkdir mode
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 syn keyword ctermFunction modem netdialog netport noerror pages parity
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 syn keyword ctermFunction pause portlist printer protocol quit rcv
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 syn keyword ctermFunction read readint readn redial release
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33 syn keyword ctermFunction remote rename restart retries return
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 syn keyword ctermFunction rmdir rtime run runx scrollback send
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 syn keyword ctermFunction session set setcap setcolor setkey
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 syn keyword ctermFunction setsym setvar startserver status
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 syn keyword ctermFunction stime stopbits stopserver tdelay
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 syn keyword ctermFunction terminal time trans type usend version
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39 syn keyword ctermFunction vi vidblink vidcard vidout vidunder wait
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 syn keyword ctermFunction wildsize wclose wopen wordlen wru wruchar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41 syn keyword ctermFunction xfer xmit xprot
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 syn match ctermFunction "?"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 "syn keyword ctermFunction comment remark
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 "END FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 "INTEGER FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 syn keyword ctermIntFunction asc atod eval filedate filemode filesize ftell
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 syn keyword ctermIntFunction len termbits opsys pos sum time val mdmstat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 "END INTEGER FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 "STRING FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52 syn keyword ctermStrFunction cdate ctime chr chrdy chrin comin getenv
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53 syn keyword ctermStrFunction gethomedir left midstr right str tolower
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 syn keyword ctermStrFunction toupper uniq comst exists feof hascolor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56 "END STRING FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 "PREDEFINED TERM VARIABLES R/W
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 syn keyword ctermPreVarRW f _escloop _filename _kermiteol _obufsiz
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 syn keyword ctermPreVarRW _port _rcvsync _cbaud _reval _turnchar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 syn keyword ctermPreVarRW _txblksiz _txwindow _vmin _vtime _cparity
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62 syn keyword ctermPreVarRW _cnumber false t true _cwordlen _cstopbits
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 syn keyword ctermPreVarRW _cmode _cemulate _cxprot _clogin _clogout
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 syn keyword ctermPreVarRW _cstartsrv _cstopsrv _ccmdfile _cwru
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 syn keyword ctermPreVarRW _cprotocol _captfile _cremark _combufsiz
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 syn keyword ctermPreVarRW logfile
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 "END PREDEFINED TERM VARIABLES R/W
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 "PREDEFINED TERM VARIABLES R/O
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 syn keyword ctermPreVarRO _1 _2 _3 _4 _5 _6 _7 _8 _9 _cursess
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 syn keyword ctermPreVarRO _lockfile _baud _errno _retval _sernum
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 syn keyword ctermPreVarRO _timeout _row _col _version
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 "END PREDEFINED TERM VARIABLES R/O
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 syn keyword ctermOperator not mod eq ne gt le lt ge xor and or shr not shl
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 "SYMBOLS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 syn match CtermSymbols "|"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 "syn keyword ctermOperators + - * / % = != > < >= <= & | ^ ! << >>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 "END SYMBOLS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 "STATEMENT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 syn keyword ctermStatement off
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 syn keyword ctermStatement disk overwrite append spool none
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 syn keyword ctermStatement echo view wrap
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 "END STATEMENT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 "TYPE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 "syn keyword ctermType
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 "END TYPE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 "USERLIB FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 "syn keyword ctermLibFunc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94 "END USERLIB FUNCTIONS
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
96 "LABEL
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
97 syn keyword ctermLabel case default
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
98 "END LABEL
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
99
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
100 "CONDITIONAL
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
101 syn keyword ctermConditional on endon
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
102 syn keyword ctermConditional proc endproc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
103 syn keyword ctermConditional for in do endfor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
104 syn keyword ctermConditional if else elseif endif iferror
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
105 syn keyword ctermConditional switch endswitch
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
106 syn keyword ctermConditional repeat until
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
107 "END CONDITIONAL
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
108
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
109 "REPEAT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
110 syn keyword ctermRepeat while
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
111 "END REPEAT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
112
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
113 " Function arguments (eg $1 $2 $3)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
114 syn match ctermFuncArg "\$[1-9]"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
115
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
116 syn keyword ctermTodo contained TODO
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
117
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
118 syn match ctermNumber "\<\d\+\(u\=l\=\|lu\|f\)\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
119 "floating point number, with dot, optional exponent
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
120 syn match ctermNumber "\<\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
121 "floating point number, starting with a dot, optional exponent
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
122 syn match ctermNumber "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
123 "floating point number, without dot, with exponent
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
124 syn match ctermNumber "\<\d\+e[-+]\=\d\+[fl]\=\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
125 "hex number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
126 syn match ctermNumber "0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
127
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
128 syn match ctermComment "![^=].*$" contains=ctermTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
129 syn match ctermComment "!$"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
130 syn match ctermComment "\*.*$" contains=ctermTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
131 syn region ctermComment start="comment" end="$" contains=ctermTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
132 syn region ctermComment start="remark" end="$" contains=ctermTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
133
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
134 syn region ctermVar start="\$(" end=")"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
135
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
136 " String and Character contstants
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
137 " Highlight special characters (those which have a backslash) differently
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
138 syn match ctermSpecial contained "\\\d\d\d\|\\."
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
139 syn match ctermSpecial contained "\^."
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
140 syn region ctermString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=ctermSpecial,ctermVar,ctermSymbols
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
141 syn match ctermCharacter "'[^\\]'"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
142 syn match ctermSpecialCharacter "'\\.'"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
143
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
144 " Define the default highlighting.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
145 " For version 5.7 and earlier: only when not done already
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
146 " For version 5.8 and later: only when an item doesn't have highlighting yet
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
147 if version >= 508 || !exists("did_cterm_syntax_inits")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
148 if version < 508
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
149 let did_cterm_syntax_inits = 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
150 command -nargs=+ HiLink hi link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
151 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
152 command -nargs=+ HiLink hi def link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
153 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
154
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
155 HiLink ctermStatement Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
156 HiLink ctermFunction Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
157 HiLink ctermStrFunction Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
158 HiLink ctermIntFunction Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
159 HiLink ctermLabel Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
160 HiLink ctermConditional Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
161 HiLink ctermRepeat Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
162 HiLink ctermLibFunc UserDefFunc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
163 HiLink ctermType Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
164 HiLink ctermFuncArg PreCondit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
165
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
166 HiLink ctermPreVarRO PreCondit
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
167 HiLink ctermPreVarRW PreConditBold
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
168 HiLink ctermVar Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
169
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
170 HiLink ctermComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
171
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
172 HiLink ctermCharacter SpecialChar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
173 HiLink ctermSpecial Special
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
174 HiLink ctermSpecialCharacter SpecialChar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
175 HiLink ctermSymbols Special
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
176 HiLink ctermString String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
177 HiLink ctermTodo Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
178 HiLink ctermOperator Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
179 HiLink ctermNumber Number
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
180
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
181 " redefine the colors
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
182 "hi PreConditBold term=bold ctermfg=1 cterm=bold guifg=Purple gui=bold
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
183 "hi Special term=bold ctermfg=6 guifg=SlateBlue gui=underline
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
184
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
185 delcommand HiLink
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
186 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
187
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
188 let b:current_syntax = "cterm"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
189
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
190 " vim: ts=8