annotate runtime/syntax/indent.vim @ 927:6632670ff6fc v7.0.053

updated for version 7.0-053
author vimboss
date Tue, 15 Aug 2006 20:24:14 +0000
parents 1f3b1021f002
children 8906c10ecbb0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
2 " Language: indent(1) configuration file
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 389
diff changeset
3 " Maintainer: Nikolai Weibull <now@bitwi.se>
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 389
diff changeset
4 " Latest Revision: 2006-04-19
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
5 " indent_is_bsd: If exists, will change somewhat to match BSD implementation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
6 "
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " TODO: is the deny-all (a la lilo.vim nice or no?)...
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
8 " irritating to be wrong to the last char...
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
9 " would be sweet if right until one char fails
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
11 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
15 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
16 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
17
839
1f3b1021f002 updated for version 7.0e05
vimboss
parents: 389
diff changeset
18 setlocal iskeyword=@,48-57,-,+,_
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
19
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
20 syn match indentError '\S\+'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
22 syn keyword indentTodo contained TODO FIXME XXX NOTE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
24 syn region indentComment start='/\*' end='\*/'
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
25 \ contains=indentTodo,@Spell
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
26 syn region indentComment start='//' skip='\\$' end='$'
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
27 \ contains=indentTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
29 syn keyword indentOptions -bacc --blank-lines-after-ifdefs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
30 \ -bad --blank-lines-after-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
31 \ -badp --blank-lines-after-procedure-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
32 \ -bap --blank-lines-after-procedures
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
33 \ -bbb --blank-lines-before-block-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
34 \ -bbo --break-before-boolean-operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
35 \ -bc --blank-lines-after-commas
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
36 \ -bfda --break-function-decl-args
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
37 \ -bfde --break-function-decl-args-end
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
38 \ -bl --braces-after-if-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
39 \ -blf --braces-after-func-def-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
40 \ -bls --braces-after-struct-decl-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
41 \ -br --braces-on-if-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
42 \ -brf --braces-on-func-def-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
43 \ -brs --braces-on-struct-decl-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
44 \ -bs --Bill-Shannon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
45 \ -bs --blank-before-sizeof
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
46 \ -c++ --c-plus-plus
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
47 \ -cdb --comment-delimiters-on-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
48 \ -cdw --cuddle-do-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
49 \ -ce --cuddle-else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
50 \ -cs --space-after-cast
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
51 \ -dj --left-justify-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
52 \ -eei --extra-expression-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
53 \ -fc1 --format-first-column-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
54 \ -fca --format-all-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
55 \ -gnu --gnu-style
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
56 \ -h --help
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
57 \ -h --usage
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
58 \ -hnl --honour-newlines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
59 \ -kr --k-and-r-style
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
60 \ -kr --kernighan-and-ritchie
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
61 \ -kr --kernighan-and-ritchie-style
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
62 \ -lp --continue-at-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
63 \ -lps --leave-preprocessor-space
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
64 \ -nbacc --no-blank-lines-after-ifdefs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
65 \ -nbad --no-blank-lines-after-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
66 \ -nbadp --no-blank-lines-after-procedure-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
67 \ -nbap --no-blank-lines-after-procedures
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
68 \ -nbbb --no-blank-lines-before-block-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
69 \ -nbbo --break-after-boolean-operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
70 \ -nbc --no-blank-lines-after-commas
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
71 \ -nbfda --dont-break-function-decl-args
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
72 \ -nbfde --dont-break-function-decl-args-end
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
73 \ -nbs --no-Bill-Shannon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
74 \ -nbs --no-blank-before-sizeof
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
75 \ -ncdb --no-comment-delimiters-on-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
76 \ -ncdw --dont-cuddle-do-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
77 \ -nce --dont-cuddle-else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
78 \ -ncs --no-space-after-casts
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
79 \ -ndj --dont-left-justify-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
80 \ -neei --no-extra-expression-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
81 \ -nfc1 --dont-format-first-column-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
82 \ -nfca --dont-format-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
83 \ -nhnl --ignore-newlines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
84 \ -nip --dont-indent-parameters
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
85 \ -nip --no-parameter-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
86 \ -nlp --dont-line-up-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
87 \ -nlps --remove-preprocessor-space
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
88 \ -npcs --no-space-after-function-call-names
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
89 \ -npro --ignore-profile
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
90 \ -nprs --no-space-after-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
91 \ -npsl --dont-break-procedure-type
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
92 \ -nsaf --no-space-after-for
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
93 \ -nsai --no-space-after-if
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
94 \ -nsaw --no-space-after-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
95 \ -nsc --dont-star-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
96 \ -nsob --leave-optional-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
97 \ -nss --dont-space-special-semicolon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
98 \ -nut --no-tabs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
99 \ -nv --no-verbosity
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
100 \ -o --output
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
101 \ -o --output-file
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
102 \ -orig --berkeley
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
103 \ -orig --berkeley-style
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
104 \ -orig --original
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
105 \ -orig --original-style
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
106 \ -pcs --space-after-procedure-calls
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
107 \ -pmt --preserve-mtime
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
108 \ -prs --space-after-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
109 \ -psl --procnames-start-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
110 \ -saf --space-after-for
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
111 \ -sai --space-after-if
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
112 \ -saw --space-after-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
113 \ -sc --start-left-side-of-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
114 \ -sob --swallow-optional-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
115 \ -ss --space-special-semicolon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
116 \ -st --standard-output
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
117 \ -ut --use-tabs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
118 \ -v --verbose
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
119 \ -version --version
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
121 syn keyword indentOptions -bli --brace-indent
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
122 \ -c --comment-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
123 \ -bli --brace-indent
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
124 \ -c --comment-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
125 \ -cbi --case-brace-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
126 \ -cd --declaration-comment-column
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
127 \ -ci --continuation-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
128 \ -cli --case-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
129 \ -cp --else-endif-column
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
130 \ -d --line-comments-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
131 \ -di --declaration-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
132 \ -i --indent-level
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
133 \ -ip --parameter-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
134 \ -l --line-length
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
135 \ -lc --comment-line-length
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
136 \ -pi --paren-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
137 \ -ppi --preprocessor-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
138 \ -sbi --struct-brace-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
139 \ -ts --tab-size
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
140 \ nextgroup=indenNumber skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
141 if !exists("indent_is_bsd")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
142 syn keyword indentOptions -i --indentation-level
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
143 \ nextgroup=indentNumber skipwhite
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
146 syn match indentNumber display '\<\d\+\>'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
147
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
148 syn keyword indentOptions -T nextgroup=indentIdent skipwhite
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
149
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
150 syn match indentIdent display '\<\h\w*\>'
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
151
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
152 if exists("indent_is_bsd")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
153 syn keyword indentOptions -ip -nip -dj -ndj -ei -nei
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
154 endif
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
155
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
156 if exists("c_minlines")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
157 let b:c_minlines = c_minlines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
158 else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
159 if !exists("c_no_if0")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
160 let b:c_minlines = 50 " #if 0 constructs can be long
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 else
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
162 let b:c_minlines = 15 " mostly for () constructs
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
164 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
166 hi def link indentError Error
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
167 hi def link indentComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
168 hi def link indentTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
169 hi def link indentOptions Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
170 hi def link indentNumber Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
171 hi def link indentIdent Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 let b:current_syntax = "indent"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
175 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
176 unlet s:cpo_save