annotate runtime/syntax/indent.vim @ 2641:b803b2776880 v7.3.062

updated for version 7.3.062 Problem: Python doesn't work properly when installed in another directory than expected. Solution: Figure out home directory in configure and use Py_SetPythonHome() at runtime. (Roland Puntaier)
author Bram Moolenaar <bram@vim.org>
date Tue, 16 Nov 2010 19:26:02 +0100
parents 4a1bcdd9ea55
children 1218c5353e2b
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>
2072
4a1bcdd9ea55 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
4 " Latest Revision: 2010-01-23
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
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1261
diff changeset
18 setlocal iskeyword+=-,+
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
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
29 if !exists("indent_is_bsd")
2072
4a1bcdd9ea55 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
30 syn match indentOptions '-i\|--indentation-level\|-il\|--indent-level'
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
31 \ nextgroup=indentNumber skipwhite skipempty
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
32 endif
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
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\)\)'
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
34 \ nextgroup=indentNumber skipwhite skipempty
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
35
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
36 syn match indentNumber display contained '\d\+\>'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
37
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
38 syn match indentOptions '-T'
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
39 \ nextgroup=indentIdent skipwhite skipempty
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
40
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
41 syn match indentIdent display contained '\h\w*\>'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
42
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
43 syn keyword indentOptions -bacc --blank-lines-after-ifdefs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
44 \ -bad --blank-lines-after-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
45 \ -badp --blank-lines-after-procedure-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
46 \ -bap --blank-lines-after-procedures
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
47 \ -bbb --blank-lines-before-block-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
48 \ -bbo --break-before-boolean-operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
49 \ -bc --blank-lines-after-commas
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
50 \ -bfda --break-function-decl-args
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
51 \ -bfde --break-function-decl-args-end
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
52 \ -bl --braces-after-if-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
53 \ -blf --braces-after-func-def-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
54 \ -bls --braces-after-struct-decl-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
55 \ -br --braces-on-if-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
56 \ -brf --braces-on-func-def-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
57 \ -brs --braces-on-struct-decl-line
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
58 \ -bs --Bill-Shannon --blank-before-sizeof
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
59 \ -c++ --c-plus-plus
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
60 \ -cdb --comment-delimiters-on-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
61 \ -cdw --cuddle-do-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
62 \ -ce --cuddle-else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
63 \ -cs --space-after-cast
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
64 \ -dj --left-justify-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
65 \ -eei --extra-expression-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
66 \ -fc1 --format-first-column-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
67 \ -fca --format-all-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
68 \ -gnu --gnu-style
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
69 \ -h --help --usage
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
70 \ -hnl --honour-newlines
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
71 \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
72 \ -lp --continue-at-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
73 \ -lps --leave-preprocessor-space
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
74 \ -nbacc --no-blank-lines-after-ifdefs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
75 \ -nbad --no-blank-lines-after-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
76 \ -nbadp --no-blank-lines-after-procedure-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
77 \ -nbap --no-blank-lines-after-procedures
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
78 \ -nbbb --no-blank-lines-before-block-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
79 \ -nbbo --break-after-boolean-operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
80 \ -nbc --no-blank-lines-after-commas
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
81 \ -nbfda --dont-break-function-decl-args
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
82 \ -nbfde --dont-break-function-decl-args-end
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
83 \ -nbs --no-Bill-Shannon --no-blank-before-sizeof
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
84 \ -ncdb --no-comment-delimiters-on-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
85 \ -ncdw --dont-cuddle-do-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
86 \ -nce --dont-cuddle-else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
87 \ -ncs --no-space-after-casts
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
88 \ -ndj --dont-left-justify-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
89 \ -neei --no-extra-expression-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
90 \ -nfc1 --dont-format-first-column-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
91 \ -nfca --dont-format-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
92 \ -nhnl --ignore-newlines
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
93 \ -nip --dont-indent-parameters --no-parameter-indentation
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
94 \ -nlp --dont-line-up-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
95 \ -nlps --remove-preprocessor-space
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
96 \ -npcs --no-space-after-function-call-names
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
97 \ -npmt
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
98 \ -npro --ignore-profile
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
99 \ -nprs --no-space-after-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
100 \ -npsl --dont-break-procedure-type
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
101 \ -nsaf --no-space-after-for
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
102 \ -nsai --no-space-after-if
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
103 \ -nsaw --no-space-after-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
104 \ -nsc --dont-star-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
105 \ -nsob --leave-optional-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
106 \ -nss --dont-space-special-semicolon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
107 \ -nut --no-tabs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
108 \ -nv --no-verbosity
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
109 \ -o --output
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
110 \ -o --output-file
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
111 \ -orig --berkeley --berkeley-style --original --original-style
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
112 \ -pcs --space-after-procedure-calls
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
113 \ -pmt --preserve-mtime
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
114 \ -prs --space-after-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
115 \ -psl --procnames-start-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
116 \ -saf --space-after-for
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
117 \ -sai --space-after-if
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
118 \ -saw --space-after-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
119 \ -sc --start-left-side-of-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
120 \ -sob --swallow-optional-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
121 \ -ss --space-special-semicolon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
122 \ -st --standard-output
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
123 \ -ut --use-tabs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
124 \ -v --verbose
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
125 \ -version --version
2072
4a1bcdd9ea55 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
126 \ -linux --linux-style
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
128 if exists("indent_is_bsd")
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
129 syn keyword indentOptions -ip -ei -nei
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
130 endif
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
131
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
132 if exists("c_minlines")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
133 let b:c_minlines = c_minlines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
134 else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
135 if !exists("c_no_if0")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
136 let b:c_minlines = 50 " #if 0 constructs can be long
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 else
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
138 let b:c_minlines = 15 " mostly for () constructs
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
140 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
142 hi def link indentError Error
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
143 hi def link indentComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
144 hi def link indentTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
145 hi def link indentOptions Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
146 hi def link indentNumber Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
147 hi def link indentIdent Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 let b:current_syntax = "indent"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
151 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
152 unlet s:cpo_save