Mercurial > vim
comparison runtime/syntax/sh.vim @ 36:125e80798a85 v7.0021
updated for version 7.0021
author | vimboss |
---|---|
date | Thu, 09 Dec 2004 21:34:53 +0000 |
parents | cc049b00ee70 |
children | e8f07016e34d |
comparison
equal
deleted
inserted
replaced
35:8f3a526c2fe1 | 36:125e80798a85 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: shell (sh) Korn shell (ksh) bash (sh) | 2 " Language: shell (sh) Korn shell (ksh) bash (sh) |
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> | 3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> |
4 " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> | 4 " Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int> |
5 " Last Change: Jul 26, 2004 | 5 " Last Change: Oct 17, 2004 |
6 " Version: 69 | 6 " Version: 70 |
7 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax | 7 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax |
8 " | 8 " |
9 " Using the following VIM variables: {{{1 | 9 " Using the following VIM variables: {{{1 |
10 " b:is_kornshell if defined, enhance with kornshell syntax | 10 " b:is_kornshell if defined, enhance with kornshell syntax |
11 " b:is_bash if defined, enhance with bash syntax | 11 " b:is_bash if defined, enhance with bash syntax |
51 endif | 51 endif |
52 endif | 52 endif |
53 | 53 |
54 if !exists("g:sh_fold_enabled") | 54 if !exists("g:sh_fold_enabled") |
55 let g:sh_fold_enabled= 0 | 55 let g:sh_fold_enabled= 0 |
56 elseif g:sh_fold_enabled != 0 && !has("folding") | |
57 let g:sh_fold_enabled= 0 | |
58 echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; re-compile vim for +fold support" | |
56 endif | 59 endif |
57 | 60 |
58 " sh syntax is case sensitive | 61 " sh syntax is case sensitive |
59 syn case match | 62 syn case match |
60 | 63 |
342 syn match bkshFunctionParen "[()]" contained | 345 syn match bkshFunctionParen "[()]" contained |
343 syn match bkshFunctionDelim "[{}]" contained | 346 syn match bkshFunctionDelim "[{}]" contained |
344 | 347 |
345 " Parameter Dereferencing: {{{1 | 348 " Parameter Dereferencing: {{{1 |
346 " ======================== | 349 " ======================== |
347 syn match shDerefSimple "\$\w\+" | 350 syn match shDerefSimple "\$\%(\h\w*\|\d\)" |
348 syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray | 351 syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray |
349 syn match shDerefWordError "[^}$[]" contained | 352 syn match shDerefWordError "[^}$[]" contained |
350 syn match shDerefSimple "\$[-#*@!?]" | 353 syn match shDerefSimple "\$[-#*@!?]" |
351 syn match shDerefSimple "\$\$" | 354 syn match shDerefSimple "\$\$" |
352 if exists("b:is_bash") || exists("b:is_kornshell") | 355 if exists("b:is_bash") || exists("b:is_kornshell") |