comparison runtime/syntax/tcsh.vim @ 2034:7bc41231fbc7

Update runtime files.
author Bram Moolenaar <bram@zimbu.org>
date Wed, 06 Jan 2010 20:54:52 +0100
parents b9740fb41986
children 9c221ad9634a
comparison
equal deleted inserted replaced
2033:de5a43c5eedc 2034:7bc41231fbc7
1 " tcsh.vim: Vim syntax file for tcsh scripts 1 " tcsh.vim: Vim syntax file for tcsh scripts
2 " Maintainer: Gautam Iyer <gi1242@users.sourceforge.net> 2 " Maintainer: Gautam Iyer <gi1242@gmail.com>
3 " Modified: Sat 16 Jun 2007 04:52:12 PM PDT 3 " Modified: Thu 17 Dec 2009 06:05:07 PM EST
4 " 4 "
5 " Description: We break up each statement into a "command" and an "end" part. 5 " Description: We break up each statement into a "command" and an "end" part.
6 " All groups are either a "command" or part of the "end" of a statement (ie 6 " All groups are either a "command" or part of the "end" of a statement (ie
7 " everything after the "command"). This is because blindly highlighting tcsh 7 " everything after the "command"). This is because blindly highlighting tcsh
8 " statements as keywords caused way too many false positives. Eg: 8 " statements as keywords caused way too many false positives. Eg:
58 syn region tcshEnvEnd contained transparent matchgroup=tcshBuiltin start='' skip='\\$' end='$\|;' contains=tcshEnvVar,@tcshStatementEnds 58 syn region tcshEnvEnd contained transparent matchgroup=tcshBuiltin start='' skip='\\$' end='$\|;' contains=tcshEnvVar,@tcshStatementEnds
59 59
60 " alias and unalias (contains special aliases) 60 " alias and unalias (contains special aliases)
61 syn keyword tcshAliases contained beepcmd cwdcmd jobcmd helpcommand periodic precmd postcmd shell 61 syn keyword tcshAliases contained beepcmd cwdcmd jobcmd helpcommand periodic precmd postcmd shell
62 syn keyword tcshBuiltin nextgroup=tcshAliCmd skipwhite alias unalias 62 syn keyword tcshBuiltin nextgroup=tcshAliCmd skipwhite alias unalias
63 syn match tcshAliCmd contained nextgroup=tcshAliEnd skipwhite '\v[\w-]+' contains=tcshAliases 63 syn match tcshAliCmd contained nextgroup=tcshAliEnd skipwhite '\v(\w|-)+' contains=tcshAliases
64 syn region tcshAliEnd contained transparent matchgroup=tcshBuiltin start='' skip='\\$' end='$\|;' contains=@tcshStatementEnds 64 syn region tcshAliEnd contained transparent matchgroup=tcshBuiltin start='' skip='\\$' end='$\|;' contains=@tcshStatementEnds
65 65
66 " if statements 66 " if statements
67 syn keyword tcshIf nextgroup=tcshIfEnd skipwhite if 67 syn keyword tcshIf nextgroup=tcshIfEnd skipwhite if
68 syn region tcshIfEnd contained start='\S' skip='\\$' matchgroup=tcshBuiltin end='\v<then>|$' contains=@tcshConditions,tcshSpecial,@tcshStatementEnds 68 syn region tcshIfEnd contained start='\S' skip='\\$' matchgroup=tcshBuiltin end='\v<then>|$' contains=@tcshConditions,tcshSpecial,@tcshStatementEnds
195 "syn match tcshSpecial contained '\v\\@<!\\(\d{3}|.)' 195 "syn match tcshSpecial contained '\v\\@<!\\(\d{3}|.)'
196 syn match tcshSpecial contained '\v\\%([0-7]{3}|.)' 196 syn match tcshSpecial contained '\v\\%([0-7]{3}|.)'
197 197
198 " ----- Synchronising ----- 198 " ----- Synchronising -----
199 if exists('tcsh_minlines') 199 if exists('tcsh_minlines')
200 exec 'syn sync minlines=' . tcsh_minlines 200 if tcsh_minlines == 'fromstart'
201 syn sync fromstart
202 else
203 exec 'syn sync minlines=' . tcsh_minlines
204 endif
201 else 205 else
202 syn sync minlines=100 " Some completions can be quite long 206 syn sync minlines=100 " Some completions can be quite long
203 endif 207 endif
204 208
205 " Define highlighting of syntax groups 209 " Define highlighting of syntax groups