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