annotate runtime/syntax/indent.vim @ 27404:de98b9219c15 v8.2.4230

patch 8.2.4230: MS-Windows: set_guifontwide() is included but won't work Commit: https://github.com/vim/vim/commit/94373c48e7e438e5b924b34ce820e9b2eb9f810c Author: K.Takata <kentkt@csc.jp> Date: Thu Jan 27 15:04:22 2022 +0000 patch 8.2.4230: MS-Windows: set_guifontwide() is included but won't work Problem: MS-Windows: set_guifontwide() is included but won't work. Solution: Include set_guifontwide() only for X11. (Ken Takata, closes https://github.com/vim/vim/issues/9640)
author Bram Moolenaar <Bram@vim.org>
date Thu, 27 Jan 2022 16:15:04 +0100
parents 786b2a8ec970
children 382b2b7da177
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
26219
786b2a8ec970 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
2 " Language: indent(1) configuration file
786b2a8ec970 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
786b2a8ec970 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se>
786b2a8ec970 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
5 " Last Change: 2021 Nov 17
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 2072
diff changeset
6 " indent_is_bsd: If exists, will change somewhat to match BSD implementation
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
7 "
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 2072
diff changeset
8 " TODO: is the deny-all (a la lilo.vim nice or no?)...
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
9 " irritating to be wrong to the last char...
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
10 " would be sweet if right until one char fails
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
12 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
16 let s:cpo_save = &cpo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
17 set cpo&vim
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
18
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 1261
diff changeset
19 setlocal iskeyword+=-,+
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
20
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
21 syn match indentError '\S\+'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
23 syn keyword indentTodo contained TODO FIXME XXX NOTE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
25 syn region indentComment start='/\*' end='\*/'
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
26 \ contains=indentTodo,@Spell
389
4fe8e1a7758e updated for version 7.0102
vimboss
parents: 375
diff changeset
27 syn region indentComment start='//' skip='\\$' end='$'
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
28 \ contains=indentTodo,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
30 if !exists("indent_is_bsd")
26219
786b2a8ec970 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 11062
diff changeset
31 syn match indentOptions '-i\|--indent-level\|-il\|--indent-label'
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
32 \ nextgroup=indentNumber skipwhite skipempty
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
33 endif
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
34 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
35 \ nextgroup=indentNumber skipwhite skipempty
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
36
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
37 syn match indentNumber display contained '\d\+\>'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
38
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
39 syn match indentOptions '-T'
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
40 \ nextgroup=indentIdent skipwhite skipempty
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
41
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
42 syn match indentIdent display contained '\h\w*\>'
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
43
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
44 syn keyword indentOptions -bacc --blank-lines-after-ifdefs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
45 \ -bad --blank-lines-after-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
46 \ -badp --blank-lines-after-procedure-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
47 \ -bap --blank-lines-after-procedures
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
48 \ -bbb --blank-lines-before-block-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
49 \ -bbo --break-before-boolean-operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
50 \ -bc --blank-lines-after-commas
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
51 \ -bfda --break-function-decl-args
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
52 \ -bfde --break-function-decl-args-end
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
53 \ -bl --braces-after-if-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
54 \ -blf --braces-after-func-def-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
55 \ -bls --braces-after-struct-decl-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
56 \ -br --braces-on-if-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
57 \ -brf --braces-on-func-def-line
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
58 \ -brs --braces-on-struct-decl-line
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
59 \ -bs --Bill-Shannon --blank-before-sizeof
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
60 \ -c++ --c-plus-plus
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
61 \ -cdb --comment-delimiters-on-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
62 \ -cdw --cuddle-do-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
63 \ -ce --cuddle-else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
64 \ -cs --space-after-cast
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
65 \ -dj --left-justify-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
66 \ -eei --extra-expression-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
67 \ -fc1 --format-first-column-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
68 \ -fca --format-all-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
69 \ -gnu --gnu-style
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
70 \ -h --help --usage
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
71 \ -hnl --honour-newlines
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
72 \ -kr --k-and-r-style --kernighan-and-ritchie --kernighan-and-ritchie-style
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
73 \ -lp --continue-at-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
74 \ -lps --leave-preprocessor-space
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
75 \ -nbacc --no-blank-lines-after-ifdefs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
76 \ -nbad --no-blank-lines-after-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
77 \ -nbadp --no-blank-lines-after-procedure-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
78 \ -nbap --no-blank-lines-after-procedures
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
79 \ -nbbb --no-blank-lines-before-block-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
80 \ -nbbo --break-after-boolean-operator
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
81 \ -nbc --no-blank-lines-after-commas
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
82 \ -nbfda --dont-break-function-decl-args
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
83 \ -nbfde --dont-break-function-decl-args-end
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
84 \ -nbs --no-Bill-Shannon --no-blank-before-sizeof
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
85 \ -ncdb --no-comment-delimiters-on-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
86 \ -ncdw --dont-cuddle-do-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
87 \ -nce --dont-cuddle-else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
88 \ -ncs --no-space-after-casts
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
89 \ -ndj --dont-left-justify-declarations
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
90 \ -neei --no-extra-expression-indentation
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
91 \ -nfc1 --dont-format-first-column-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
92 \ -nfca --dont-format-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
93 \ -nhnl --ignore-newlines
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
94 \ -nip --dont-indent-parameters --no-parameter-indentation
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
95 \ -nlp --dont-line-up-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
96 \ -nlps --remove-preprocessor-space
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
97 \ -npcs --no-space-after-function-call-names
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
98 \ -npmt
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
99 \ -npro --ignore-profile
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
100 \ -nprs --no-space-after-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
101 \ -npsl --dont-break-procedure-type
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
102 \ -nsaf --no-space-after-for
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
103 \ -nsai --no-space-after-if
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
104 \ -nsaw --no-space-after-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
105 \ -nsc --dont-star-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
106 \ -nsob --leave-optional-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
107 \ -nss --dont-space-special-semicolon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
108 \ -nut --no-tabs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
109 \ -nv --no-verbosity
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
110 \ -o --output
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
111 \ -o --output-file
1213
8906c10ecbb0 updated for version 7.1b
vimboss
parents: 839
diff changeset
112 \ -orig --berkeley --berkeley-style --original --original-style
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
113 \ -pcs --space-after-procedure-calls
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
114 \ -pmt --preserve-mtime
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
115 \ -prs --space-after-parentheses
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
116 \ -psl --procnames-start-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
117 \ -saf --space-after-for
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
118 \ -sai --space-after-if
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
119 \ -saw --space-after-while
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
120 \ -sc --start-left-side-of-comments
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
121 \ -sob --swallow-optional-blank-lines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
122 \ -ss --space-special-semicolon
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
123 \ -st --standard-output
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
124 \ -ut --use-tabs
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
125 \ -v --verbose
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
126 \ -version --version
2072
4a1bcdd9ea55 Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
127 \ -linux --linux-style
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
129 if exists("indent_is_bsd")
1261
8fe7832b1e10 updated for version 7.1
vimboss
parents: 1213
diff changeset
130 syn keyword indentOptions -ip -ei -nei
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
131 endif
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
132
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
133 if exists("c_minlines")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
134 let b:c_minlines = c_minlines
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
135 else
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
136 if !exists("c_no_if0")
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
137 let b:c_minlines = 50 " #if 0 constructs can be long
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 else
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
139 let b:c_minlines = 15 " mostly for () constructs
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 endif
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
141 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
143 hi def link indentError Error
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
144 hi def link indentComment Comment
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
145 hi def link indentTodo Todo
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
146 hi def link indentOptions Keyword
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
147 hi def link indentNumber Number
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
148 hi def link indentIdent Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 let b:current_syntax = "indent"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
375
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
152 let &cpo = s:cpo_save
f14cbd913415 updated for version 7.0097
vimboss
parents: 7
diff changeset
153 unlet s:cpo_save