Mercurial > vim
annotate runtime/syntax/sh.vim @ 6539:6da912e32896 v7.4.596
updated for version 7.4.596
Problem: Tiny build doesn't compile. (Ike Devolder)
Solution: Add #ifdef.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 27 Jan 2015 13:33:23 +0100 |
parents | b3bc99b909c3 |
children | dff4e29c6905 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: shell (sh) Korn shell (ksh) bash (sh) | |
3920 | 3 " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> |
7 | 4 " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> |
6479 | 5 " Last Change: Jan 08, 2015 |
6 " Version: 134 | |
7 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH | |
8 " For options and settings, please use: :help ft-sh-syntax | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
9 " This file includes many ideas from ?ric Brunet (eric.brunet@ens.fr) |
7 | 10 |
22 | 11 " For version 5.x: Clear all syntax items {{{1 |
7 | 12 " For version 6.x: Quit when a syntax file was already loaded |
13 if version < 600 | |
14 syntax clear | |
15 elseif exists("b:current_syntax") | |
16 finish | |
17 endif | |
18 | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
19 " AFAICT "." should be considered part of the iskeyword. Using iskeywords in |
6479 | 20 " syntax is dicey, so the following code permits the user to prevent/override |
3920 | 21 " g:sh_isk set to a string : specify iskeyword. |
22 " g:sh_noisk exists : don't change iskeyword | |
23 " g:sh_noisk does not exist : (default) append "." to iskeyword | |
24 if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword | |
25 exe "setl isk=".g:sh_isk | |
26 elseif !exists("g:sh_noisk") " optionally prevent appending '.' to iskeyword | |
27 setl isk+=. | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
28 endif |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
29 |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
30 " trying to answer the question: which shell is /bin/sh, really? |
3920 | 31 " If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
32 if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
33 let s:shell = "" |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
34 if executable("/bin/sh") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
35 let s:shell = resolve("/bin/sh") |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
36 elseif executable("/usr/bin/sh") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
37 let s:shell = resolve("/usr/bin/sh") |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
38 endif |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
39 if s:shell =~ 'bash$' |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
40 let g:is_bash= 1 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
41 elseif s:shell =~ 'ksh$' |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
42 let g:is_kornshell = 1 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
43 elseif s:shell =~ 'dash$' |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
44 let g:is_posix = 1 |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
45 endif |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
46 unlet s:shell |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
47 endif |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
48 |
22 | 49 " handling /bin/sh with is_kornshell/is_sh {{{1 |
7 | 50 " b:is_sh is set when "#! /bin/sh" is found; |
51 " However, it often is just a masquerade by bash (typically Linux) | |
52 " or kornshell (typically workstations with Posix "sh"). | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
53 " So, when the user sets "g:is_bash", "g:is_kornshell", |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
54 " or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell, |
7 | 55 " respectively. |
56 if !exists("b:is_kornshell") && !exists("b:is_bash") | |
828 | 57 if exists("g:is_posix") && !exists("g:is_kornshell") |
58 let g:is_kornshell= g:is_posix | |
59 endif | |
60 if exists("g:is_kornshell") | |
7 | 61 let b:is_kornshell= 1 |
62 if exists("b:is_sh") | |
63 unlet b:is_sh | |
64 endif | |
828 | 65 elseif exists("g:is_bash") |
7 | 66 let b:is_bash= 1 |
67 if exists("b:is_sh") | |
68 unlet b:is_sh | |
69 endif | |
70 else | |
71 let b:is_sh= 1 | |
72 endif | |
73 endif | |
74 | |
199 | 75 " set up default g:sh_fold_enabled {{{1 |
7 | 76 if !exists("g:sh_fold_enabled") |
77 let g:sh_fold_enabled= 0 | |
36 | 78 elseif g:sh_fold_enabled != 0 && !has("folding") |
79 let g:sh_fold_enabled= 0 | |
199 | 80 echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support" |
81 endif | |
1668 | 82 if !exists("s:sh_fold_functions") |
3920 | 83 let s:sh_fold_functions= and(g:sh_fold_enabled,1) |
1668 | 84 endif |
85 if !exists("s:sh_fold_heredoc") | |
3920 | 86 let s:sh_fold_heredoc = and(g:sh_fold_enabled,2) |
1668 | 87 endif |
88 if !exists("s:sh_fold_ifdofor") | |
3920 | 89 let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4) |
1668 | 90 endif |
199 | 91 if g:sh_fold_enabled && &fdm == "manual" |
3920 | 92 " Given that the user provided g:sh_fold_enabled |
93 " AND g:sh_fold_enabled is manual (usual default) | |
94 " implies a desire for syntax-based folding | |
95 setl fdm=syntax | |
7 | 96 endif |
97 | |
199 | 98 " sh syntax is case sensitive {{{1 |
7 | 99 syn case match |
100 | |
22 | 101 " Clusters: contains=@... clusters {{{1 |
7 | 102 "================================== |
2034 | 103 syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK |
1668 | 104 if exists("b:is_kornshell") |
105 syn cluster ErrorList add=shDTestError | |
106 endif | |
6479 | 107 syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shComment,shDeref,shDerefSimple,shDo,shEcho,shEscape,shIf,shFor,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement |
1668 | 108 syn cluster shArithList contains=@shArithParenList,shParenError |
2034 | 109 syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
110 syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq |
3281 | 111 "syn cluster shColonList contains=@shCaseList |
4229 | 112 syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOption,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial,shCmdParenRegion |
464 | 113 syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial |
3920 | 114 syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial |
482 | 115 syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS |
7 | 116 syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError |
3920 | 117 syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote |
2497 | 118 syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq |
119 | 119 syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
120 syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq |
1201 | 121 if exists("b:is_kornshell") || exists("b:is_bash") |
1668 | 122 syn cluster shFunctionList add=shRepeat |
1201 | 123 syn cluster shFunctionList add=shDblBrace,shDblParen |
124 endif | |
7 | 125 syn cluster shHereBeginList contains=@shCommandSubList |
126 syn cluster shHereList contains=shBeginHere,shHerePayload | |
127 syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
128 syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr |
3281 | 129 syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo |
6479 | 130 syn cluster shLoopList contains=@shCaseList,shIf,shFor,shForPP,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
131 syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
132 syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq |
22 | 133 " Echo: {{{1 |
7 | 134 " ==== |
135 " This one is needed INSIDE a CommandSub, so that `echo bla` be correct | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
136 syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
137 syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment |
2034 | 138 syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' |
7 | 139 |
1668 | 140 " This must be after the strings, so that ... \" will be correct |
2497 | 141 syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq |
7 | 142 |
22 | 143 " Alias: {{{1 |
7 | 144 " ===== |
145 if exists("b:is_kornshell") || exists("b:is_bash") | |
146 syn match shStatement "\<alias\>" | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
147 syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
148 syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" |
7 | 149 endif |
150 | |
22 | 151 " Error Codes: {{{1 |
152 " ============ | |
3281 | 153 if !exists("g:sh_no_error") |
6479 | 154 syn match shDoError "\<done\>" |
155 syn match shIfError "\<fi\>" | |
156 syn match shInError "\<in\>" | |
157 syn match shCaseError ";;" | |
158 syn match shEsacError "\<esac\>" | |
159 syn match shCurlyError "}" | |
160 syn match shParenError ")" | |
161 syn match shOK '\.\(done\|fi\|in\|esac\)' | |
3281 | 162 if exists("b:is_kornshell") |
6479 | 163 syn match shDTestError "]]" |
3281 | 164 endif |
6479 | 165 syn match shTestError "]" |
7 | 166 endif |
167 | |
1668 | 168 " Options: {{{1 |
22 | 169 " ==================== |
3920 | 170 syn match shOption "\s\zs[-+][-_a-zA-Z0-9#]\+" |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
171 syn match shOption "\s\zs--[^ \t$`'"|);]\+" |
7 | 172 |
1201 | 173 " File Redirection Highlighted As Operators: {{{1 |
174 "=========================================== | |
175 syn match shRedir "\d\=>\(&[-0-9]\)\=" | |
176 syn match shRedir "\d\=>>-\=" | |
177 syn match shRedir "\d\=<\(&[-0-9]\)\=" | |
178 syn match shRedir "\d<<-\=" | |
179 | |
22 | 180 " Operators: {{{1 |
181 " ========== | |
1201 | 182 syn match shOperator "<<\|>>" contained |
1668 | 183 syn match shOperator "[!&;|]" contained |
184 syn match shOperator "\[[[^:]\|\]]" contained | |
7 | 185 syn match shOperator "!\==" skipwhite nextgroup=shPattern |
2497 | 186 syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref |
7 | 187 |
22 | 188 " Subshells: {{{1 |
189 " ========== | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
190 syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
191 syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shMoreSpecial |
7 | 192 |
22 | 193 " Tests: {{{1 |
194 "======= | |
2152 | 195 syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial |
2034 | 196 syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 |
1121 | 197 syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]" |
198 syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern | |
199 syn match shTestPattern contained '\w\+' | |
6479 | 200 syn region shTestDoubleQuote contained start='"' skip='\\"' end='"' contains=shBQpairs |
1121 | 201 syn match shTestSingleQuote contained '\\.' |
202 syn match shTestSingleQuote contained "'[^']*'" | |
6479 | 203 syn match shBQpairs contained '\\\\' |
7 | 204 if exists("b:is_kornshell") || exists("b:is_bash") |
205 syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList | |
206 syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList | |
207 endif | |
208 | |
22 | 209 " Character Class In Range: {{{1 |
210 " ========================= | |
7 | 211 syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]" |
212 | |
22 | 213 " Loops: do, if, while, until {{{1 |
214 " ====== | |
3920 | 215 if s:sh_fold_ifdofor |
820 | 216 syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList |
3281 | 217 syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList |
3920 | 218 syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn |
820 | 219 else |
6479 | 220 syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList |
3281 | 221 syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList |
3920 | 222 syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn |
820 | 223 endif |
6479 | 224 syn region shForPP matchgroup=shLoop start='\<for\>\_s*((' end='))' contains=shTestOpr |
7 | 225 if exists("b:is_kornshell") || exists("b:is_bash") |
1668 | 226 syn cluster shCaseList add=shRepeat |
227 syn cluster shFunctionList add=shRepeat | |
228 syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace | |
229 syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace | |
230 syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList | |
7 | 231 else |
1668 | 232 syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList |
233 syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList | |
7 | 234 endif |
464 | 235 syn region shCurlyIn contained matchgroup=Delimiter start="{" end="}" contains=@shCurlyList |
236 syn match shComma contained "," | |
7 | 237 |
22 | 238 " Case: case...esac {{{1 |
7 | 239 " ==== |
1668 | 240 syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote |
7 | 241 syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar |
3920 | 242 if s:sh_fold_ifdofor |
2034 | 243 syn region shCase fold contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment |
820 | 244 syn region shCaseEsac fold matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList |
245 else | |
2034 | 246 syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment |
820 | 247 syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList |
248 endif | |
167 | 249 syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote |
250 if exists("b:is_bash") | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
251 syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained |
3281 | 252 elseif !exists("g:sh_no_error") |
167 | 253 syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained |
254 endif | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
255 syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained |
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
256 syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained |
7 | 257 syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained |
3920 | 258 if exists("b:is_bash") |
259 syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained contains=shCharClass | |
260 syn match shCharClass '\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]' contained | |
261 else | |
262 syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained | |
263 endif | |
22 | 264 " Misc: {{{1 |
265 "====== | |
7 | 266 syn match shWrapLineOperator "\\$" |
3920 | 267 syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
268 syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' |
7 | 269 |
22 | 270 " $() and $(()): {{{1 |
7 | 271 " $(..) is not supported by sh (Bourne shell). However, apparently |
272 " some systems (HP?) have as their /bin/sh a (link to) Korn shell | |
273 " (ie. Posix compliant shell). /bin/ksh should work for those | |
274 " systems too, however, so the following syntax will flag $(..) as | |
275 " an Error under /bin/sh. By consensus of vimdev'ers! | |
276 if exists("b:is_kornshell") || exists("b:is_bash") | |
277 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList | |
1668 | 278 syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList |
3445 | 279 syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList |
7 | 280 syn match shSkipInitWS contained "^\s\+" |
3281 | 281 elseif !exists("g:sh_no_error") |
167 | 282 syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList |
7 | 283 endif |
6479 | 284 syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(\ze[^(]" skip='\\\\\|\\.' end=")" contains=@shCommandSubList |
7 | 285 |
286 if exists("b:is_bash") | |
287 syn cluster shCommandSubList add=bashSpecialVariables,bashStatement | |
288 syn cluster shCaseList add=bashAdminStatement,bashStatement | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
289 syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE MAPFILE OLDPWD OPTARG OPTERR OPTIND OSTYPE PATH PIPESTATUS POSIXLY_CORRECT POSIXLY_CORRECT PPID PROMPT_COMMAND PS1 PS2 PS3 PS4 PWD RANDOM READLINE_LINE READLINE_LINE READLINE_POINT READLINE_POINT REPLY SECONDS SHELL SHELL SHELLOPTS SHLVL TIMEFORMAT TIMEOUT TMPDIR TMPDIR UID |
3920 | 290 syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch |
7 | 291 syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop |
3920 | 292 syn keyword bashStatement command compgen |
7 | 293 endif |
294 | |
295 if exists("b:is_kornshell") | |
296 syn cluster shCommandSubList add=kshSpecialVariables,kshStatement | |
297 syn cluster shCaseList add=kshStatement | |
298 syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL | |
3920 | 299 syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput |
300 syn keyword kshStatement command setgroups setsenv | |
7 | 301 endif |
302 | |
303 syn match shSource "^\.\s" | |
304 syn match shSource "\s\.\s" | |
2034 | 305 "syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList |
3281 | 306 "syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2 |
307 syn match shColon '^\s*\zs:' | |
7 | 308 |
22 | 309 " String And Character Constants: {{{1 |
310 "================================ | |
1121 | 311 syn match shNumber "-\=\<\d\+\>#\=" |
312 syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained | |
167 | 313 if exists("b:is_bash") |
2034 | 314 syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained |
167 | 315 endif |
316 if exists("b:is_bash") | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
317 syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial |
2497 | 318 syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial |
3281 | 319 elseif !exists("g:sh_no_error") |
1121 | 320 syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial |
2497 | 321 syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial |
167 | 322 endif |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
323 syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
324 syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell |
6479 | 325 "syn region shDoubleQuote matchgroup=shQuote start=+"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell |
1698 | 326 syn match shStringSpecial "[^[:print:] \t]" contained |
1201 | 327 syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]" |
6479 | 328 syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment |
329 syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment | |
330 syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial contained | |
7 | 331 |
22 | 332 " Comments: {{{1 |
333 "========== | |
2034 | 334 syn cluster shCommentGroup contains=shTodo,@Spell |
335 syn keyword shTodo contained COMBAK FIXME TODO XXX | |
336 syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup | |
337 syn match shComment "\s\zs#.*$" contains=@shCommentGroup | |
3920 | 338 syn match shComment contained "#.*$" contains=@shCommentGroup |
2034 | 339 syn match shQuickComment contained "#.*$" |
7 | 340 |
22 | 341 " Here Documents: {{{1 |
342 " ========================================= | |
7 | 343 if version < 600 |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
344 syn region shHereDoc matchgroup=shRedir01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
345 syn region shHereDoc matchgroup=shRedir02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
346 syn region shHereDoc matchgroup=shRedir03 start="<<\s*\**EOF\**" matchgroup=shRedir03 end="^EOF$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
347 syn region shHereDoc matchgroup=shRedir04 start="<<-\s*\**EOF\**" matchgroup=shRedir04 end="^\s*EOF$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
348 syn region shHereDoc matchgroup=shRedir05 start="<<\s*\**\.\**" matchgroup=shRedir05 end="^\.$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
349 syn region shHereDoc matchgroup=shRedir06 start="<<-\s*\**\.\**" matchgroup=shRedir06 end="^\s*\.$" contains=@shDblQuoteList |
7 | 350 |
3920 | 351 elseif s:sh_fold_heredoc |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
352 syn region shHereDoc matchgroup=shRedir07 fold start="<<\s*\z([^ \t|]*\)" matchgroup=shRedir07 end="^\z1\s*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
353 syn region shHereDoc matchgroup=shRedir08 fold start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir08 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
354 syn region shHereDoc matchgroup=shRedir09 fold start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir09 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
355 syn region shHereDoc matchgroup=shRedir10 fold start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir10 end="^\s*\z1\s*$" contains=@shDblQuoteList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
356 syn region shHereDoc matchgroup=shRedir11 fold start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir11 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
357 syn region shHereDoc matchgroup=shRedir12 fold start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir12 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
358 syn region shHereDoc matchgroup=shRedir13 fold start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir13 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
359 syn region shHereDoc matchgroup=shRedir14 fold start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir14 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
360 syn region shHereDoc matchgroup=shRedir15 fold start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir15 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
361 syn region shHereDoc matchgroup=shRedir16 fold start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir16 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
362 syn region shHereDoc matchgroup=shRedir17 fold start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir17 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
363 syn region shHereDoc matchgroup=shRedir18 fold start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir18 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
364 syn region shHereDoc matchgroup=shRedir19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shRedir19 end="^\z1\s*$" |
7 | 365 |
366 else | |
6479 | 367 syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
368 syn region shHereDoc matchgroup=shRedir21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir21 end="^\z1\s*$" |
6479 | 369 syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
370 syn region shHereDoc matchgroup=shRedir23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir23 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
371 syn region shHereDoc matchgroup=shRedir24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir24 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
372 syn region shHereDoc matchgroup=shRedir25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir25 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
373 syn region shHereDoc matchgroup=shRedir26 start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir26 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
374 syn region shHereDoc matchgroup=shRedir27 start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir27 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
375 syn region shHereDoc matchgroup=shRedir28 start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir28 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
376 syn region shHereDoc matchgroup=shRedir29 start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir29 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
377 syn region shHereDoc matchgroup=shRedir30 start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir30 end="^\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
378 syn region shHereDoc matchgroup=shRedir31 start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir31 end="^\s*\z1\s*$" |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
379 syn region shHereDoc matchgroup=shRedir32 start="<<\\\z([^ \t|]*\)" matchgroup=shRedir32 end="^\z1\s*$" |
7 | 380 endif |
381 | |
22 | 382 " Here Strings: {{{1 |
383 " ============= | |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
384 " available for: bash; ksh (really should be ksh93 only) but not if its a posix |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
385 if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix")) |
3920 | 386 syn match shRedir "<<<" skipwhite nextgroup=shCmdParenRegion |
22 | 387 endif |
388 | |
389 " Identifiers: {{{1 | |
390 "============= | |
1668 | 391 syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained |
392 syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier | |
3920 | 393 syn match shSetIdentifier "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
394 syn region shAtExpr contained start="@(" end=")" contains=@shIdList |
7 | 395 if exists("b:is_bash") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
396 syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
397 syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList |
7 | 398 elseif exists("b:is_kornshell") |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
399 syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
400 syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList |
7 | 401 else |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
402 syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList |
7 | 403 endif |
404 | |
22 | 405 " Functions: {{{1 |
1668 | 406 if !exists("g:is_posix") |
407 syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo | |
408 endif | |
409 | |
410 if exists("b:is_bash") | |
3920 | 411 if s:sh_fold_functions |
412 syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
1668 | 413 syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment |
414 else | |
415 syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList | |
416 syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained | |
417 endif | |
7 | 418 else |
3920 | 419 if s:sh_fold_functions |
1668 | 420 syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment |
421 syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
422 else | |
423 syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList | |
424 syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained | |
425 endif | |
7 | 426 endif |
427 | |
22 | 428 " Parameter Dereferencing: {{{1 |
429 " ======================== | |
3920 | 430 syn match shDerefSimple "\$\%(\k\+\|\d\)" |
7 | 431 syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray |
3281 | 432 if !exists("g:sh_no_error") |
433 syn match shDerefWordError "[^}$[]" contained | |
434 endif | |
7 | 435 syn match shDerefSimple "\$[-#*@!?]" |
436 syn match shDerefSimple "\$\$" | |
437 if exists("b:is_bash") || exists("b:is_kornshell") | |
438 syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList | |
1668 | 439 syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList |
7 | 440 endif |
441 | |
22 | 442 " bash: ${!prefix*} and ${#parameter}: {{{1 |
443 " ==================================== | |
7 | 444 if exists("b:is_bash") |
445 syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp | |
3920 | 446 syn match shDerefVar contained "{\@<=!\k\+" nextgroup=@shDerefVarList |
7 | 447 endif |
448 | |
449 syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError | |
450 syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp | |
3920 | 451 syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList |
7 | 452 |
22 | 453 " sh ksh bash : ${var[... ]...} array reference: {{{1 |
6479 | 454 syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError |
7 | 455 |
22 | 456 " Special ${parameter OPERATOR word} handling: {{{1 |
6479 | 457 " sh ksh bash : ${parameter:-word} word is default value |
458 " sh ksh bash : ${parameter:=word} assign word as default value | |
459 " sh ksh bash : ${parameter:?word} display word if parameter is null | |
460 " sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing | |
461 " ksh bash : ${parameter#pattern} remove small left pattern | |
462 " ksh bash : ${parameter##pattern} remove large left pattern | |
463 " ksh bash : ${parameter%pattern} remove small right pattern | |
464 " ksh bash : ${parameter%%pattern} remove large right pattern | |
465 " bash : ${parameter^pattern} Case modification | |
466 " bash : ${parameter^^pattern} Case modification | |
467 " bash : ${parameter,pattern} Case modification | |
468 " bash : ${parameter,,pattern} Case modification | |
7 | 469 syn cluster shDerefPatternList contains=shDerefPattern,shDerefString |
3281 | 470 if !exists("g:sh_no_error") |
471 syn match shDerefOpError contained ":[[:punct:]]" | |
472 endif | |
7 | 473 syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList |
474 syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList | |
475 if exists("b:is_bash") || exists("b:is_kornshell") | |
476 syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList | |
477 syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList | |
482 | 478 syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern |
7 | 479 syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern |
482 | 480 syn match shDerefEscape contained '\%(\\\\\)*\\.' |
7 | 481 endif |
3099
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
482 if exists("b:is_bash") |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
483 syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList |
887d6d91882e
Updated a few runtime files.
Bram Moolenaar <bram@vim.org>
parents:
2751
diff
changeset
|
484 endif |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
485 syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial |
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
486 syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial |
1668 | 487 syn match shDerefString contained "\\["']" nextgroup=shDerefPattern |
7 | 488 |
489 if exists("b:is_bash") | |
482 | 490 " bash : ${parameter:offset} |
491 " bash : ${parameter:offset:length} | |
7 | 492 syn region shDerefOp contained start=":[$[:alnum:]_]"me=e-1 end=":"me=e-1 end="}"me=e-1 contains=@shCommandSubList nextgroup=shDerefPOL |
482 | 493 syn match shDerefPOL contained ":[^}]\+" contains=@shCommandSubList |
494 | |
495 " bash : ${parameter//pattern/string} | |
496 " bash : ${parameter//pattern} | |
497 syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft | |
3920 | 498 syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList |
499 syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shCommandSubList | |
7 | 500 endif |
501 | |
1668 | 502 " Arithmetic Parenthesized Expressions: {{{1 |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
503 "syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
504 syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList |
1668 | 505 |
22 | 506 " Useful sh Keywords: {{{1 |
507 " =================== | |
7 | 508 syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait |
509 syn keyword shConditional contained elif else then | |
3281 | 510 if !exists("g:sh_no_error") |
511 syn keyword shCondError elif else then | |
512 endif | |
7 | 513 |
22 | 514 " Useful ksh Keywords: {{{1 |
515 " ==================== | |
7 | 516 if exists("b:is_kornshell") || exists("b:is_bash") |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
517 syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence |
1668 | 518 if exists("g:is_posix") |
519 syn keyword shStatement command | |
520 else | |
521 syn keyword shStatement time | |
522 endif | |
7 | 523 |
22 | 524 " Useful bash Keywords: {{{1 |
525 " ===================== | |
7 | 526 if exists("b:is_bash") |
527 syn keyword shStatement bind builtin dirs disown enable help local logout popd pushd shopt source | |
528 else | |
529 syn keyword shStatement login newgrp | |
530 endif | |
531 endif | |
532 | |
22 | 533 " Synchronization: {{{1 |
534 " ================ | |
7 | 535 if !exists("sh_minlines") |
536 let sh_minlines = 200 | |
537 endif | |
538 if !exists("sh_maxlines") | |
539 let sh_maxlines = 2 * sh_minlines | |
540 endif | |
541 exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines | |
542 syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" | |
543 syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" | |
544 syn sync match shDoSync grouphere shDo "\<do\>" | |
545 syn sync match shDoSync groupthere shDo "\<done\>" | |
546 syn sync match shForSync grouphere shFor "\<for\>" | |
547 syn sync match shForSync groupthere shFor "\<in\>" | |
548 syn sync match shIfSync grouphere shIf "\<if\>" | |
549 syn sync match shIfSync groupthere shIf "\<fi\>" | |
550 syn sync match shUntilSync grouphere shRepeat "\<until\>" | |
551 syn sync match shWhileSync grouphere shRepeat "\<while\>" | |
552 | |
22 | 553 " Default Highlighting: {{{1 |
554 " ===================== | |
7 | 555 hi def link shArithRegion shShellVariables |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
556 hi def link shAtExpr shSetList |
167 | 557 hi def link shBeginHere shRedir |
7 | 558 hi def link shCaseBar shConditional |
559 hi def link shCaseCommandSub shCommandSub | |
560 hi def link shCaseDoubleQuote shDoubleQuote | |
167 | 561 hi def link shCaseIn shConditional |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
562 hi def link shQuote shOperator |
7 | 563 hi def link shCaseSingleQuote shSingleQuote |
564 hi def link shCaseStart shConditional | |
565 hi def link shCmdSubRegion shShellVariables | |
2034 | 566 hi def link shColon shComment |
167 | 567 hi def link shDerefOp shOperator |
568 hi def link shDerefPOL shDerefOp | |
482 | 569 hi def link shDerefPPS shDerefOp |
7 | 570 hi def link shDeref shShellVariables |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
571 hi def link shDerefDelim shOperator |
7 | 572 hi def link shDerefSimple shDeref |
573 hi def link shDerefSpecial shDeref | |
574 hi def link shDerefString shDoubleQuote | |
167 | 575 hi def link shDerefVar shDeref |
7 | 576 hi def link shDoubleQuote shString |
577 hi def link shEcho shString | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
578 hi def link shEchoDelim shOperator |
1668 | 579 hi def link shEchoQuote shString |
6479 | 580 "hi def link shForPP shLoop |
7 | 581 hi def link shEmbeddedEcho shString |
1668 | 582 hi def link shEscape shCommandSub |
2497 | 583 hi def link shExDoubleQuote shDoubleQuote |
167 | 584 hi def link shExSingleQuote shSingleQuote |
1668 | 585 hi def link shFunction Function |
7 | 586 hi def link shHereDoc shString |
167 | 587 hi def link shHerePayload shHereDoc |
7 | 588 hi def link shLoop shStatement |
2034 | 589 hi def link shMoreSpecial shSpecial |
7 | 590 hi def link shOption shCommandSub |
591 hi def link shPattern shString | |
1668 | 592 hi def link shParen shArithmetic |
7 | 593 hi def link shPosnParm shShellVariables |
1668 | 594 hi def link shQuickComment shComment |
7 | 595 hi def link shRange shOperator |
596 hi def link shRedir shOperator | |
2473
d55e70cabe2c
Syntax file updates. (Charles Campbell)
Bram Moolenaar <bram@vim.org>
parents:
2357
diff
changeset
|
597 hi def link shSetListDelim shOperator |
1668 | 598 hi def link shSetOption shOption |
7 | 599 hi def link shSingleQuote shString |
600 hi def link shSource shOperator | |
601 hi def link shStringSpecial shSpecial | |
602 hi def link shSubShRegion shOperator | |
603 hi def link shTestOpr shConditional | |
1121 | 604 hi def link shTestPattern shString |
605 hi def link shTestDoubleQuote shString | |
606 hi def link shTestSingleQuote shString | |
6479 | 607 hi def link shBQpairs shString |
7 | 608 hi def link shVariable shSetList |
609 hi def link shWrapLineOperator shOperator | |
610 | |
611 if exists("b:is_bash") | |
612 hi def link bashAdminStatement shStatement | |
613 hi def link bashSpecialVariables shShellVariables | |
614 hi def link bashStatement shStatement | |
199 | 615 hi def link shFunctionParen Delimiter |
616 hi def link shFunctionDelim Delimiter | |
3920 | 617 hi def link shCharClass shSpecial |
7 | 618 endif |
619 if exists("b:is_kornshell") | |
620 hi def link kshSpecialVariables shShellVariables | |
621 hi def link kshStatement shStatement | |
199 | 622 hi def link shFunctionParen Delimiter |
7 | 623 endif |
624 | |
3281 | 625 if !exists("g:sh_no_error") |
626 hi def link shCaseError Error | |
627 hi def link shCondError Error | |
628 hi def link shCurlyError Error | |
629 hi def link shDerefError Error | |
630 hi def link shDerefOpError Error | |
631 hi def link shDerefWordError Error | |
632 hi def link shDoError Error | |
633 hi def link shEsacError Error | |
634 hi def link shIfError Error | |
635 hi def link shInError Error | |
636 hi def link shParenError Error | |
637 hi def link shTestError Error | |
638 if exists("b:is_kornshell") | |
639 hi def link shDTestError Error | |
640 endif | |
7 | 641 endif |
642 | |
643 hi def link shArithmetic Special | |
644 hi def link shCharClass Identifier | |
645 hi def link shSnglCase Statement | |
646 hi def link shCommandSub Special | |
647 hi def link shComment Comment | |
648 hi def link shConditional Conditional | |
1121 | 649 hi def link shCtrlSeq Special |
7 | 650 hi def link shExprRegion Delimiter |
199 | 651 hi def link shFunctionKey Function |
7 | 652 hi def link shFunctionName Function |
653 hi def link shNumber Number | |
654 hi def link shOperator Operator | |
655 hi def link shRepeat Repeat | |
656 hi def link shSet Statement | |
657 hi def link shSetList Identifier | |
658 hi def link shShellVariables PreProc | |
659 hi def link shSpecial Special | |
660 hi def link shStatement Statement | |
661 hi def link shString String | |
662 hi def link shTodo Todo | |
663 hi def link shAlias Identifier | |
5138
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
664 hi def link shRedir01 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
665 hi def link shRedir02 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
666 hi def link shRedir03 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
667 hi def link shRedir04 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
668 hi def link shRedir05 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
669 hi def link shRedir06 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
670 hi def link shRedir07 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
671 hi def link shRedir08 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
672 hi def link shRedir09 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
673 hi def link shRedir10 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
674 hi def link shRedir11 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
675 hi def link shRedir12 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
676 hi def link shRedir13 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
677 hi def link shRedir14 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
678 hi def link shRedir15 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
679 hi def link shRedir16 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
680 hi def link shRedir17 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
681 hi def link shRedir18 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
682 hi def link shRedir19 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
683 hi def link shRedir20 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
684 hi def link shRedir21 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
685 hi def link shRedir22 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
686 hi def link shRedir23 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
687 hi def link shRedir24 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
688 hi def link shRedir25 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
689 hi def link shRedir26 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
690 hi def link shRedir27 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
691 hi def link shRedir28 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
692 hi def link shRedir29 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
693 hi def link shRedir30 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
694 hi def link shRedir31 shRedir |
0d4e0cde36e1
A few updated runtime files.
Bram Moolenaar <bram@vim.org>
parents:
4229
diff
changeset
|
695 hi def link shRedir32 shRedir |
7 | 696 |
22 | 697 " Set Current Syntax: {{{1 |
698 " =================== | |
7 | 699 if exists("b:is_bash") |
700 let b:current_syntax = "bash" | |
701 elseif exists("b:is_kornshell") | |
702 let b:current_syntax = "ksh" | |
703 else | |
704 let b:current_syntax = "sh" | |
705 endif | |
706 | |
22 | 707 " vim: ts=16 fdm=marker |