7
|
1 " Vim syntax file
|
11062
|
2 " Language: indent(1) configuration file
|
|
3 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
|
4 " Latest Revision: 2010-01-23
|
|
5 " indent_is_bsd: If exists, will change somewhat to match BSD implementation
|
375
|
6 "
|
11062
|
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
|
1621
|
18 setlocal iskeyword+=-,+
|
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
|
1213
|
29 if !exists("indent_is_bsd")
|
2072
|
30 syn match indentOptions '-i\|--indentation-level\|-il\|--indent-level'
|
1261
|
31 \ nextgroup=indentNumber skipwhite skipempty
|
1213
|
32 endif
|
1261
|
33 syn match indentOptions '-\%(bli\|c\%([bl]i\|[dip]\)\=\|di\=\|ip\=\|lc\=\|pp\=i\|sbi\|ts\|-\%(brace-indent\|comment-indentation\|case-brace-indentation\|declaration-comment-column\|continuation-indentation\|case-indentation\|else-endif-column\|line-comments-indentation\|declaration-indentation\|indent-level\|parameter-indentation\|line-length\|comment-line-length\|paren-indentation\|preprocessor-indentation\|struct-brace-indentation\|tab-size\)\)'
|
|
34 \ nextgroup=indentNumber skipwhite skipempty
|
1213
|
35
|
|
36 syn match indentNumber display contained '\d\+\>'
|
|
37
|
|
38 syn match indentOptions '-T'
|
1261
|
39 \ nextgroup=indentIdent skipwhite skipempty
|
1213
|
40
|
|
41 syn match indentIdent display contained '\h\w*\>'
|
|
42
|
375
|
43 syn keyword indentOptions -bacc --blank-lines-after-ifdefs
|
|
44 \ -bad --blank-lines-after-declarations
|
|
45 \ -badp --blank-lines-after-procedure-declarations
|
|
46 \ -bap --blank-lines-after-procedures
|
|
47 \ -bbb --blank-lines-before-block-comments
|
|
48 \ -bbo --break-before-boolean-operator
|
|
49 \ -bc --blank-lines-after-commas
|
|
50 \ -bfda --break-function-decl-args
|
|
51 \ -bfde --break-function-decl-args-end
|
|
52 \ -bl --braces-after-if-line
|
|
53 \ -blf --braces-after-func-def-line
|
|
54 \ -bls --braces-after-struct-decl-line
|
|
55 \ -br --braces-on-if-line
|
|
56 \ -brf --braces-on-func-def-line
|
|
57 \ -brs --braces-on-struct-decl-line
|
1213
|
58 \ -bs --Bill-Shannon --blank-before-sizeof
|
375
|
59 \ -c++ --c-plus-plus
|
|
60 \ -cdb --comment-delimiters-on-blank-lines
|
|
61 \ -cdw --cuddle-do-while
|
|
62 \ -ce --cuddle-else
|
|
63 \ -cs --space-after-cast
|
|
64 \ -dj --left-justify-declarations
|
|
65 \ -eei --extra-expression-indentation
|
|
66 \ -fc1 --format-first-column-comments
|
|
67 \ -fca --format-all-comments
|
|
68 \ -gnu --gnu-style
|
1213
|
69 \ -h --help --usage
|
375
|
70 \ -hnl --honour-newlines
|
1213
|
71 \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style
|
375
|
72 \ -lp --continue-at-parentheses
|
|
73 \ -lps --leave-preprocessor-space
|
|
74 \ -nbacc --no-blank-lines-after-ifdefs
|
|
75 \ -nbad --no-blank-lines-after-declarations
|
|
76 \ -nbadp --no-blank-lines-after-procedure-declarations
|
|
77 \ -nbap --no-blank-lines-after-procedures
|
|
78 \ -nbbb --no-blank-lines-before-block-comments
|
|
79 \ -nbbo --break-after-boolean-operator
|
|
80 \ -nbc --no-blank-lines-after-commas
|
|
81 \ -nbfda --dont-break-function-decl-args
|
|
82 \ -nbfde --dont-break-function-decl-args-end
|
1213
|
83 \ -nbs --no-Bill-Shannon --no-blank-before-sizeof
|
375
|
84 \ -ncdb --no-comment-delimiters-on-blank-lines
|
|
85 \ -ncdw --dont-cuddle-do-while
|
|
86 \ -nce --dont-cuddle-else
|
|
87 \ -ncs --no-space-after-casts
|
|
88 \ -ndj --dont-left-justify-declarations
|
|
89 \ -neei --no-extra-expression-indentation
|
|
90 \ -nfc1 --dont-format-first-column-comments
|
|
91 \ -nfca --dont-format-comments
|
|
92 \ -nhnl --ignore-newlines
|
1213
|
93 \ -nip --dont-indent-parameters --no-parameter-indentation
|
375
|
94 \ -nlp --dont-line-up-parentheses
|
|
95 \ -nlps --remove-preprocessor-space
|
|
96 \ -npcs --no-space-after-function-call-names
|
1213
|
97 \ -npmt
|
375
|
98 \ -npro --ignore-profile
|
|
99 \ -nprs --no-space-after-parentheses
|
|
100 \ -npsl --dont-break-procedure-type
|
|
101 \ -nsaf --no-space-after-for
|
|
102 \ -nsai --no-space-after-if
|
|
103 \ -nsaw --no-space-after-while
|
|
104 \ -nsc --dont-star-comments
|
|
105 \ -nsob --leave-optional-blank-lines
|
|
106 \ -nss --dont-space-special-semicolon
|
|
107 \ -nut --no-tabs
|
|
108 \ -nv --no-verbosity
|
|
109 \ -o --output
|
|
110 \ -o --output-file
|
1213
|
111 \ -orig --berkeley --berkeley-style --original --original-style
|
375
|
112 \ -pcs --space-after-procedure-calls
|
|
113 \ -pmt --preserve-mtime
|
|
114 \ -prs --space-after-parentheses
|
|
115 \ -psl --procnames-start-lines
|
|
116 \ -saf --space-after-for
|
|
117 \ -sai --space-after-if
|
|
118 \ -saw --space-after-while
|
|
119 \ -sc --start-left-side-of-comments
|
|
120 \ -sob --swallow-optional-blank-lines
|
|
121 \ -ss --space-special-semicolon
|
|
122 \ -st --standard-output
|
|
123 \ -ut --use-tabs
|
|
124 \ -v --verbose
|
|
125 \ -version --version
|
2072
|
126 \ -linux --linux-style
|
7
|
127
|
375
|
128 if exists("indent_is_bsd")
|
1261
|
129 syn keyword indentOptions -ip -ei -nei
|
375
|
130 endif
|
|
131
|
|
132 if exists("c_minlines")
|
|
133 let b:c_minlines = c_minlines
|
|
134 else
|
|
135 if !exists("c_no_if0")
|
|
136 let b:c_minlines = 50 " #if 0 constructs can be long
|
7
|
137 else
|
375
|
138 let b:c_minlines = 15 " mostly for () constructs
|
7
|
139 endif
|
375
|
140 endif
|
7
|
141
|
375
|
142 hi def link indentError Error
|
|
143 hi def link indentComment Comment
|
|
144 hi def link indentTodo Todo
|
|
145 hi def link indentOptions Keyword
|
|
146 hi def link indentNumber Number
|
|
147 hi def link indentIdent Identifier
|
7
|
148
|
|
149 let b:current_syntax = "indent"
|
|
150
|
375
|
151 let &cpo = s:cpo_save
|
|
152 unlet s:cpo_save
|