comparison runtime/syntax/readline.vim @ 2826:3c7da93eb7f9

Updated runtime files.
author Bram Moolenaar <bram@vim.org>
date Tue, 10 May 2011 17:18:44 +0200
parents 7bc41231fbc7
children 3482d151136b
comparison
equal deleted inserted replaced
2825:4ec043ec556c 2826:3c7da93eb7f9
1 " Vim syntax file 1 " Vim syntax file
2 " Language: readline(3) configuration file 2 " Language: readline(3) configuration file
3 " Maintainer: Nikolai Weibull <now@bitwi.se> 3 " Maintainer: Nikolai Weibull <now@bitwi.se>
4 " Latest Revision: 2009-05-25 4 " Latest Revision: 2011-05-02
5 " readline_has_bash - if defined add support for bash specific 5 " readline_has_bash - if defined add support for bash specific
6 " settings/functions 6 " settings/functions
7 7
8 if exists("b:current_syntax") 8 if exists('b:current_syntax')
9 finish 9 finish
10 endif 10 endif
11 11
12 let s:cpo_save = &cpo 12 let s:cpo_save = &cpo
13 set cpo&vim 13 set cpo&vim
14 14
15 setlocal iskeyword+=- 15 setlocal iskeyword+=-
16 16
17 syn keyword readlineTodo contained TODO FIXME XXX NOTE 17 syn match readlineKey contained
18 18 \ '\S'
19 syn region readlineComment display oneline start='^\s*#' end='$' 19 \ nextgroup=readlineKeyTerminator
20 \ contains=readlineTodo,@Spell 20
21 21 syn match readlineBegin display '^'
22 syn match readlineString '^\s*[A-Za-z-]\+:'me=e-1 contains=readlineKeys 22 \ nextgroup=readlineComment,
23 syn region readlineString display oneline start=+"+ skip=+\\\\\|\\"+ 23 \ readlineConditional,
24 \ end=+"+ contains=readlineKeysTwo 24 \ readlineInclude,
25 \ readlineKeyName,
26 \ readlineKey,
27 \ readlineKeySeq,
28 \ readlineKeyword
29 \ skipwhite
30
31 syn region readlineComment contained display oneline
32 \ start='#'
33 \ end='$'
34 \ contains=readlineTodo,
35 \ @Spell
36
37 syn keyword readlineTodo contained
38 \ TODO
39 \ FIXME
40 \ XXX
41 \ NOTE
42
43 syn match readlineConditional contained
44 \ '$if\>'
45 \ nextgroup=readlineTest,
46 \ readlineTestApp
47 \ skipwhite
48
49 syn keyword readlineTest contained
50 \ mode
51 \ nextgroup=readlineTestModeEq
52
53 syn match readlineTestModeEq contained
54 \ '='
55 \ nextgroup=readlineEditingMode
56
57 syn keyword readlineTest contained
58 \ term
59 \ nextgroup=readlineTestTermEq
60
61 syn match readlineTestTermEq contained
62 \ '='
63 \ nextgroup=readlineTestTerm
64
65 syn match readlineTestTerm contained
66 \ '\S\+'
67
68 syn match readlineTestApp contained
69 \ '\S\+'
70
71 syn match readlineConditional contained display
72 \ '$\%(else\|endif\)\>'
73
74 syn match readlineInclude contained display
75 \ '$include\>'
76 \ nextgroup=readlinePath
77
78 syn match readlinePath contained display
79 \ '.\+'
25 80
26 syn case ignore 81 syn case ignore
27 syn keyword readlineKeys contained Control Meta Del Esc Escape LFD 82 syn match readlineKeyName contained display
28 \ Newline Ret Return Rubout Space Spc Tab 83 \ nextgroup=readlineKeySeparator,
84 \ readlineKeyTerminator
85 \ '\%(Control\|Del\|Esc\|Escape\|LFD\|Meta\|Newline\|Ret\|Return\|Rubout\|Space\|Spc\|Tab\)'
29 syn case match 86 syn case match
30 87
31 syn match readlineKeysTwo contained display 88 syn match readlineKeySeparator contained
32 \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{3}\)+ 89 \ '-'
33 90 \ nextgroup=readlineKeyName,
34 syn match readlineKeymaps contained display 91 \ readlineKey
35 \ 'emacs\(-standard\|-meta\|-ctlx\)\=' 92
36 syn match readlineKeymaps contained display 93 syn match readlineKeyTerminator contained
37 \ 'vi\(-move\|-command\|-insert\)\=' 94 \ ':'
38 95 \ nextgroup=readlineFunction
39 syn keyword readlineBellStyles contained audible visible none 96 \ skipwhite
40 97
41 syn match readlineNumber contained display '\<\d\+\>' 98 syn region readlineKeySeq contained display oneline
99 \ start=+"+
100 \ skip=+\\\\\|\\"+
101 \ end=+"+
102 \ contains=readlineKeyEscape
103 \ nextgroup=readlineKeyTerminator
104
105 syn match readlineKeyEscape contained display
106 \ +\\\([CM]-\|[e\\"'abdfnrtv]\|\o\{3}\|x\x\{2}\)+
107
108 syn keyword readlineKeyword contained
109 \ set
110 \ nextgroup=readlineVariable
111 \ skipwhite
112
113 syn keyword readlineVariable contained
114 \ nextgroup=readlineBellStyle
115 \ skipwhite
116 \ bell-style
117
118 syn keyword readlineVariable contained
119 \ nextgroup=readlineBoolean
120 \ skipwhite
121 \ bind-tty-special-chars
122 \ completion-ignore-case
123 \ completion-map-case
124 \ convert-meta
125 \ disable-completion
126 \ echo-control-characters
127 \ enable-keypad
128 \ enable-meta-key
129 \ expand-tilde
130 \ history-preserve-point
131 \ horizontal-scroll-mode
132 \ input-meta
133 \ meta-flag
134 \ mark-directories
135 \ mark-modified-lines
136 \ mark-symlinked-directories
137 \ match-hidden-files
138 \ menu-complete-display-prefix
139 \ output-meta
140 \ page-completions
141 \ print-completions-horizontally
142 \ revert-all-at-newline
143 \ show-all-if-ambiguous
144 \ show-all-if-unmodified
145 \ skip-completed-text
146 \ visible-stats
147
148 syn keyword readlineVariable contained
149 \ nextgroup=readlineString
150 \ skipwhite
151 \ comment-begin
152 \ isearch-terminators
153
154 syn keyword readlineVariable contained
155 \ nextgroup=readlineNumber
156 \ skipwhite
157 \ completion-display-width
158 \ completion-prefix-display-length
159 \ completion-query-items
160 \ history-size
161
162 syn keyword readlineVariable contained
163 \ nextgroup=readlineEditingMode
164 \ skipwhite
165 \ editing-mode
166
167 syn keyword readlineVariable contained
168 \ nextgroup=readlineKeymap
169 \ skipwhite
170 \ keymap
171
172 syn keyword readlineBellStyle contained
173 \ audible
174 \ visible
175 \ none
42 176
43 syn case ignore 177 syn case ignore
44 syn keyword readlineBoolean contained on off 178 syn keyword readlineBoolean contained
179 \ on
180 \ off
45 syn case match 181 syn case match
46 182
47 syn keyword readlineIfOps contained mode term 183 syn region readlineString contained display oneline
48 184 \ matchgroup=readlineStringDelimiter
49 syn region readlineConditional display oneline transparent 185 \ start=+"+
50 \ matchgroup=readlineConditional 186 \ skip=+\\\\\|\\"+
51 \ start='^\s*$if' end="$" 187 \ end=+"+
52 \ contains=readlineIfOps,readlineKeymaps 188
53 syn match readlineConditional display '^\s*$\(else\|endif\)\>' 189 syn match readlineNumber contained display
54 190 \ '[+-]\d\+\>'
55 syn match readlineInclude display '^\s*$include\>' 191
56 192 syn keyword readlineEditingMode contained
57 syn region readlineSet display oneline transparent 193 \ emacs
58 \ matchgroup=readlineKeyword start='^\s*set\>' 194 \ vi
59 \ end="$"me=e-1 contains=readlineNumber, 195
60 \ readlineBoolean,readlineKeymaps, 196 syn match readlineKeymap contained display
61 \ readlineBellStyles,readlineSettings 197 \ 'emacs\%(-\%(standard\|meta\|ctlx\)\)\=\|vi\%(-\%(move\|command\|insert\)\)\='
62 198
63 syn keyword readlineSettings contained bell-style comment-begin 199 syn keyword readlineFunction contained
64 \ completion-ignore-case completion-query-items 200 \ beginning-of-line
65 \ convert-meta disable-completion editing-mode 201 \ end-of-line
66 \ enable-keypad expand-tilde 202 \ forward-char
67 \ horizontal-scroll-mode mark-directories 203 \ backward-char
68 \ keymap mark-modified-lines meta-flag 204 \ forward-word
69 \ input-meta output-meta 205 \ backward-word
70 \ print-completions-horizontally 206 \ clear-screen
71 \ show-all-if-ambiguous visible-stats 207 \ redraw-current-line
72 \ prefer-visible-bell blink-matching-paren 208 \
73 \ match-hidden-files history-preserve-point 209 \ accept-line
74 \ isearch-terminators 210 \ previous-history
75 211 \ next-history
76 syn region readlineBinding display oneline transparent 212 \ beginning-of-history
77 \ matchgroup=readlineKeyword start=':' end='$' 213 \ end-of-history
78 \ contains=readlineKeys,readlineFunctions 214 \ reverse-search-history
79 215 \ forward-search-history
80 syn keyword readlineFunctions contained display 216 \ non-incremental-reverse-search-history
81 \ beginning-of-line end-of-line forward-char 217 \ non-incremental-forward-search-history
82 \ backward-char forward-word backward-word 218 \ history-search-forward
83 \ clear-screen redraw-current-line 219 \ history-search-backward
84 \ accept-line previous-history 220 \ yank-nth-arg
85 \ next-history beginning-of-history 221 \ yank-last-arg
86 \ end-of-history reverse-search-history 222 \
87 \ forward-search-history 223 \ delete-char
88 \ non-incremental-reverse-search-history 224 \ backward-delete-char
89 \ non-incremental-forward-search-history 225 \ forward-backward-delete-char
90 \ history-search-forward 226 \ quoted-insert
91 \ history-search-backward 227 \ tab-insert
92 \ yank-nth-arg yank-last-arg 228 \ self-insert
93 \ delete-char backward-delete-char 229 \ transpose-chars
94 \ forward-backward-delete-char quoted-insert 230 \ transpose-words
95 \ tab-insert self-insert transpose-chars 231 \ upcase-word
96 \ transpose-words upcase-word downcase-word 232 \ downcase-word
97 \ capitalize-word overwrite-mode kill-line 233 \ capitalize-word
98 \ backward-kill-line unix-line-discard 234 \ overwrite-mode
99 \ kill-whole-line kill-word backward-kill-word 235 \
100 \ unix-word-rubout unix-filename-rubout 236 \ kill-line
101 \ delete-horizontal-space kill-region 237 \ backward-kill-line
102 \ copy-region-as-kill copy-backward-word 238 \ unix-line-discard
103 \ copy-forward-word yank yank-pop 239 \ kill-whole-line
104 \ digit-argument universal-argument complete 240 \ kill-word
105 \ possible-completions insert-completions 241 \ backward-kill-word
106 \ menu-complete delete-char-or-list 242 \ unix-word-rubout
107 \ start-kbd-macro end-kbd-macro 243 \ unix-filename-rubout
108 \ call-last-kbd-macro re-read-init-file 244 \ delete-horizontal-space
109 \ abort do-uppercase-version prefix-meta 245 \ kill-region
110 \ undo revert-line tilde-expand set-mark 246 \ copy-region-as-kill
111 \ exchange-point-and-mark character-search 247 \ copy-backward-word
112 \ character-search-backward insert-comment 248 \ copy-forward-word
113 \ dump-functions dump-variables dump-macros 249 \ yank
114 \ emacs-editing-mode vi-editing-mode 250 \ yank-pop
115 \ vi-complete vi-char-search vi-redo 251 \
116 \ vi-search vi-arg-digit vi-append-eol 252 \ digit-argument
117 \ vi-prev-word vi-change-to vi-delete-to 253 \ universal-argument
118 \ vi-end-word vi-fetch-history vi-insert-beg 254 \
119 \ vi-search-again vi-put vi-replace 255 \ complete
120 \ vi-subst vi-yank-to vi-first-print 256 \ possible-completions
121 \ vi-yank-arg vi-goto-mark vi-append-mode 257 \ insert-completions
122 \ vi-insertion-mode prev-history vi-set-mark 258 \ menu-complete
123 \ vi-search-again vi-put vi-change-char 259 \ menu-complete-or-backward
124 \ vi-subst vi-delete vi-yank-to 260 \ delete-char-or-list
125 \ vi-column vi-change-case vi-overstrike 261 \
126 \ vi-overstrike-delete do-lowercase-version 262 \ start-kbd-macro
127 \ delete-char-or-list tty-status 263 \ end-kbd-macro
128 \ arrow-key-prefix vi-back-to-indent vi-bword 264 \ call-last-kbd-macro
129 \ vi-bWord vi-eword vi-eWord vi-fword vi-fWord 265 \
130 \ vi-next-word 266 \ re-read-init-file
131 \ vi-movement-mode 267 \ abort
268 \ do-uppercase-version
269 \ prefix-meta
270 \ undo
271 \ revert-line
272 \ tilde-expand
273 \ set-mark
274 \ exchange-point-and-mark
275 \ character-search
276 \ character-search-backward
277 \ skip-csi-sequence
278 \ insert-comment
279 \ dump-functions
280 \ dump-variables
281 \ dump-macros
282 \ emacs-editing-mode
283 \ vi-editing-mode
284 \
285 \ vi-eof-maybe
286 \ vi-movement-mode
287 \ vi-undo
288 \ vi-match
289 \ vi-tilde-expand
290 \ vi-complete
291 \ vi-char-search
292 \ vi-redo
293 \ vi-search
294 \ vi-arg-digit
295 \ vi-append-eol
296 \ vi-prev-word
297 \ vi-change-to
298 \ vi-delete-to
299 \ vi-end-word
300 \ vi-char-search
301 \ vi-fetch-history
302 \ vi-insert-beg
303 \ vi-search-again
304 \ vi-put
305 \ vi-replace
306 \ vi-subst
307 \ vi-char-search
308 \ vi-next-word
309 \ vi-yank-to
310 \ vi-first-print
311 \ vi-yank-arg
312 \ vi-goto-mark
313 \ vi-append-mode
314 \ vi-prev-word
315 \ vi-change-to
316 \ vi-delete-to
317 \ vi-end-word
318 \ vi-char-search
319 \ vi-insert-mode
320 \ vi-set-mark
321 \ vi-search-again
322 \ vi-put
323 \ vi-change-char
324 \ vi-subst
325 \ vi-char-search
326 \ vi-undo
327 \ vi-next-word
328 \ vi-delete
329 \ vi-yank-to
330 \ vi-column
331 \ vi-change-case
132 332
133 if exists("readline_has_bash") 333 if exists("readline_has_bash")
134 syn keyword readlineFunctions contained 334 syn keyword readlineFunction contained
135 \ shell-expand-line history-expand-line 335 \ shell-expand-line
136 \ magic-space alias-expand-line 336 \ history-expand-line
137 \ history-and-alias-expand-line 337 \ magic-space
138 \ insert-last-argument operate-and-get-next 338 \ alias-expand-line
139 \ forward-backward-delete-char 339 \ history-and-alias-expand-line
140 \ delete-char-or-list complete-filename 340 \ insert-last-argument
141 \ possible-filename-completions 341 \ operate-and-get-next
142 \ complete-username 342 \ forward-backward-delete-char
143 \ possible-username-completions 343 \ delete-char-or-list
144 \ complete-variable 344 \ complete-filename
145 \ possible-variable-completions 345 \ possible-filename-completions
146 \ complete-hostname 346 \ complete-username
147 \ possible-hostname-completions 347 \ possible-username-completions
148 \ complete-command 348 \ complete-variable
149 \ possible-command-completions 349 \ possible-variable-completions
150 \ dynamic-complete-history 350 \ complete-hostname
151 \ complete-into-braces 351 \ possible-hostname-completions
152 \ glob-expand-word glob-list-expansions 352 \ complete-command
153 \ display-shell-version glob-complete-word 353 \ possible-command-completions
154 \ edit-and-execute-command 354 \ dynamic-complete-history
355 \ complete-into-braces
356 \ glob-expand-word
357 \ glob-list-expansions
358 \ display-shell-version
359 \ glob-complete-word
360 \ edit-and-execute-command
155 endif 361 endif
156 362
157 hi def link readlineComment Comment 363 hi def link readlineKey readlineKeySeq
158 hi def link readlineTodo Todo 364 hi def link readlineComment Comment
159 hi def link readlineString String 365 hi def link readlineTodo Todo
160 hi def link readlineKeys SpecialChar 366 hi def link readlineConditional Conditional
161 hi def link readlineKeysTwo SpecialChar 367 hi def link readlineTest Type
162 hi def link readlineKeymaps Constant 368 hi def link readlineDelimiter Delimiter
163 hi def link readlineBellStyles Constant 369 hi def link readlineTestModeEq readlineEq
164 hi def link readlineNumber Number 370 hi def link readlineTestTermEq readlineEq
165 hi def link readlineBoolean Boolean 371 hi def link readlineTestTerm readlineString
166 hi def link readlineIfOps Type 372 hi def link readlineTestAppEq readlineEq
167 hi def link readlineConditional Conditional 373 hi def link readlineTestApp readlineString
168 hi def link readlineInclude Include 374 hi def link readlineInclude Include
169 hi def link readlineKeyword Keyword 375 hi def link readlinePath String
170 hi def link readlineSettings Type 376 hi def link readlineKeyName SpecialChar
171 hi def link readlineFunctions Type 377 hi def link readlineKeySeparator readlineKeySeq
172 378 hi def link readlineKeyTerminator readlineDelimiter
173 let b:current_syntax = "readline" 379 hi def link readlineKeySeq String
380 hi def link readlineKeyEscape SpecialChar
381 hi def link readlineKeyword Keyword
382 hi def link readlineVariable Identifier
383 hi def link readlineBellStyle Constant
384 hi def link readlineBoolean Boolean
385 hi def link readlineString String
386 hi def link readlineStringDelimiter readlineString
387 hi def link readlineNumber Number
388 hi def link readlineEditingMode Constant
389 hi def link readlineKeymap Constant
390 hi def link readlineFunction Function
391
392 let b:current_syntax = 'readline'
174 393
175 let &cpo = s:cpo_save 394 let &cpo = s:cpo_save
176 unlet s:cpo_save 395 unlet s:cpo_save