Mercurial > vim
annotate runtime/syntax/zsh.vim @ 9967:45098d7f72b6 v7.4.2257
commit https://github.com/vim/vim/commit/9f28953f0c1e3d9fffd49af76503f54eaa279acb
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Aug 26 16:39:03 2016 +0200
patch 7.4.2257
Problem: Coverity complains about not checking for NULL.
Solution: Check for out of memory.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 26 Aug 2016 16:45:07 +0200 |
parents | f16bfe02cef1 |
children | 0f8713fe20dc |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
6823 | 2 " Language: Zsh shell script |
3 " Maintainer: Christian Brabandt <cb@256bit.org> | |
4 " Previous Maintainer: Nikolai Weibull <now@bitwi.se> | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
5 " Latest Revision: 2016-02-15 |
6823 | 6 " License: Vim (see :h license) |
7 " Repository: https://github.com/chrisbra/vim-zsh | |
7 | 8 |
1125 | 9 if exists("b:current_syntax") |
7 | 10 finish |
11 endif | |
12 | |
1125 | 13 let s:cpo_save = &cpo |
14 set cpo&vim | |
15 | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
16 if v:version > 704 || (v:version == 704 && has("patch1142")) |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
17 syn iskeyword @,48-57,_,192-255,#,- |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
18 else |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
19 setlocal iskeyword+=- |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
20 endif |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
21 if get(g:, 'zsh_fold_enable', 0) |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
22 setlocal foldmethod=syntax |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
23 endif |
1125 | 24 |
25 syn keyword zshTodo contained TODO FIXME XXX NOTE | |
26 | |
6823 | 27 syn region zshComment oneline start='\%(^\|\s*\)#' end='$' |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
28 \ contains=zshTodo,@Spell fold |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
29 |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
30 syn region zshComment start='^\s*#' end='^\%(\s*#\)\@!' |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
31 \ contains=zshTodo,@Spell fold |
1125 | 32 |
33 syn match zshPreProc '^\%1l#\%(!\|compdef\|autoload\).*$' | |
34 | |
35 syn match zshQuoted '\\.' | |
36 syn region zshString matchgroup=zshStringDelimiter start=+"+ end=+"+ | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
37 \ contains=zshQuoted,@zshDerefs,@zshSubst fold |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
38 syn region zshString matchgroup=zshStringDelimiter start=+'+ end=+'+ fold |
1125 | 39 " XXX: This should probably be more precise, but Zsh seems a bit confused about it itself |
40 syn region zshPOSIXString matchgroup=zshStringDelimiter start=+\$'+ | |
41 \ end=+'+ contains=zshQuoted | |
42 syn match zshJobSpec '%\(\d\+\|?\=\w\+\|[%+-]\)' | |
43 | |
44 syn keyword zshPrecommand noglob nocorrect exec command builtin - time | |
45 | |
6823 | 46 syn keyword zshDelimiter do done end |
1125 | 47 |
48 syn keyword zshConditional if then elif else fi case in esac select | |
49 | |
1698 | 50 syn keyword zshRepeat while until repeat |
51 | |
52 syn keyword zshRepeat for foreach nextgroup=zshVariable skipwhite | |
1125 | 53 |
54 syn keyword zshException always | |
55 | |
56 syn keyword zshKeyword function nextgroup=zshKSHFunction skipwhite | |
57 | |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
58 syn match zshKSHFunction contained '\w\S\+' |
1125 | 59 syn match zshFunction '^\s*\k\+\ze\s*()' |
60 | |
61 syn match zshOperator '||\|&&\|;\|&!\=' | |
7 | 62 |
1125 | 63 syn match zshRedir '\d\=\(<\|<>\|<<<\|<&\s*[0-9p-]\=\)' |
64 syn match zshRedir '\d\=\(>\|>>\|>&\s*[0-9p-]\=\|&>\|>>&\|&>>\)[|!]\=' | |
65 syn match zshRedir '|&\=' | |
66 | |
1698 | 67 syn region zshHereDoc matchgroup=zshRedir |
68 \ start='<\@<!<<\s*\z([^<]\S*\)' | |
69 \ end='^\z1\>' | |
70 \ contains=@zshSubst | |
71 syn region zshHereDoc matchgroup=zshRedir | |
72 \ start='<\@<!<<\s*\\\z(\S\+\)' | |
73 \ end='^\z1\>' | |
74 \ contains=@zshSubst | |
1125 | 75 syn region zshHereDoc matchgroup=zshRedir |
1698 | 76 \ start='<\@<!<<-\s*\\\=\z(\S\+\)' |
77 \ end='^\s*\z1\>' | |
78 \ contains=@zshSubst | |
1125 | 79 syn region zshHereDoc matchgroup=zshRedir |
6823 | 80 \ start=+<\@<!<<\s*\(["']\)\z(\S\+\)\1+ |
1698 | 81 \ end='^\z1\>' |
82 syn region zshHereDoc matchgroup=zshRedir | |
83 \ start=+<\@<!<<-\s*\(["']\)\z(\S\+\)\1+ | |
1125 | 84 \ end='^\s*\z1\>' |
85 | |
1698 | 86 syn match zshVariable '\<\h\w*' contained |
87 | |
88 syn match zshVariableDef '\<\h\w*\ze+\==' | |
1125 | 89 " XXX: how safe is this? |
1698 | 90 syn region zshVariableDef oneline |
1125 | 91 \ start='\$\@<!\<\h\w*\[' end='\]\ze+\==' |
92 \ contains=@zshSubst | |
93 | |
94 syn cluster zshDerefs contains=zshShortDeref,zshLongDeref,zshDeref | |
7 | 95 |
1125 | 96 if !exists("g:zsh_syntax_variables") |
97 let s:zsh_syntax_variables = 'all' | |
98 else | |
99 let s:zsh_syntax_variables = g:zsh_syntax_variables | |
100 endif | |
101 | |
102 if s:zsh_syntax_variables =~ 'short\|all' | |
103 syn match zshShortDeref '\$[!#$*@?_-]\w\@!' | |
104 syn match zshShortDeref '\$[=^~]*[#+]*\d\+\>' | |
105 endif | |
7 | 106 |
1125 | 107 if s:zsh_syntax_variables =~ 'long\|all' |
108 syn match zshLongDeref '\$\%(ARGC\|argv\|status\|pipestatus\|CPUTYPE\|EGID\|EUID\|ERRNO\|GID\|HOST\|LINENO\|LOGNAME\)' | |
109 syn match zshLongDeref '\$\%(MACHTYPE\|OLDPWD OPTARG\|OPTIND\|OSTYPE\|PPID\|PWD\|RANDOM\|SECONDS\|SHLVL\|signals\)' | |
110 syn match zshLongDeref '\$\%(TRY_BLOCK_ERROR\|TTY\|TTYIDLE\|UID\|USERNAME\|VENDOR\|ZSH_NAME\|ZSH_VERSION\|REPLY\|reply\|TERM\)' | |
111 endif | |
112 | |
113 if s:zsh_syntax_variables =~ 'all' | |
114 syn match zshDeref '\$[=^~]*[#+]*\h\w*\>' | |
115 else | |
1698 | 116 syn match zshDeref transparent contains=NONE '\$[=^~]*[#+]*\h\w*\>' |
1125 | 117 endif |
7 | 118 |
1125 | 119 syn match zshCommands '\%(^\|\s\)[.:]\ze\s' |
120 syn keyword zshCommands alias autoload bg bindkey break bye cap cd | |
121 \ chdir clone comparguments compcall compctl | |
122 \ compdescribe compfiles compgroups compquote | |
123 \ comptags comptry compvalues continue dirs | |
124 \ disable disown echo echotc echoti emulate | |
125 \ enable eval exec exit export false fc fg | |
126 \ functions getcap getln getopts hash history | |
127 \ jobs kill let limit log logout popd print | |
128 \ printf pushd pushln pwd r read readonly | |
129 \ rehash return sched set setcap setopt shift | |
130 \ source stat suspend test times trap true | |
131 \ ttyctl type ulimit umask unalias unfunction | |
132 \ unhash unlimit unset unsetopt vared wait | |
133 \ whence where which zcompile zformat zftp zle | |
134 \ zmodload zparseopts zprof zpty zregexparse | |
135 \ zsocket zstyle ztcp | |
136 | |
6823 | 137 " Options, generated by: echo ${(j:\n:)options[(I)*]} | sort |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
138 " Create a list of option names from zsh source dir: |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
139 " #!/bin/zsh |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
140 " topdir=/path/to/zsh-xxx |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
141 " grep '^pindex([A-Za-z_]*)$' $topdir/Src/Doc/Zsh/optionsyo | |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
142 " while read opt |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
143 " do |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
144 " echo ${${(L)opt#pindex\(}%\)} |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
145 " done |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
146 |
6823 | 147 syn case ignore |
148 syn keyword zshOptions aliases allexport all_export alwayslastprompt | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
149 \ always_last_prompt always_lastprompt alwaystoend always_to_end appendcreate |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
150 \ append_create appendhistory append_history autocd auto_cd autocontinue |
6823 | 151 \ auto_continue autolist auto_list |
152 \ automenu auto_menu autonamedirs auto_name_dirs | |
153 \ autoparamkeys auto_param_keys autoparamslash | |
154 \ auto_param_slash autopushd auto_pushd autoremoveslash | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
155 \ auto_remove_slash autoresume auto_resume badpattern bad_pattern |
6823 | 156 \ banghist bang_hist bareglobqual bare_glob_qual |
157 \ bashautolist bash_auto_list bashrematch bash_rematch | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
158 \ beep bgnice bg_nice braceccl brace_ccl braceexpand brace_expand |
6823 | 159 \ bsdecho bsd_echo caseglob case_glob casematch case_match |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
160 \ cbases c_bases cdablevars cdable_vars cd_able_vars chasedots chase_dots |
6823 | 161 \ chaselinks chase_links checkjobs check_jobs |
162 \ clobber combiningchars combining_chars completealiases | |
163 \ complete_aliases completeinword complete_in_word | |
164 \ continueonerror continue_on_error correct | |
165 \ correctall correct_all cprecedences c_precedences | |
166 \ cshjunkiehistory csh_junkie_history cshjunkieloops | |
167 \ csh_junkie_loops cshjunkiequotes csh_junkie_quotes | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
168 \ csh_nullcmd csh_null_cmd cshnullcmd csh_null_cmd cshnullglob csh_null_glob |
6823 | 169 \ debugbeforecmd debug_before_cmd dotglob dot_glob dvorak |
170 \ emacs equals errexit err_exit errreturn err_return evallineno | |
171 \ eval_lineno exec extendedglob extended_glob extendedhistory | |
172 \ extended_history flowcontrol flow_control forcefloat | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
173 \ force_float functionargzero function_argzero function_arg_zero glob globalexport |
6823 | 174 \ global_export globalrcs global_rcs globassign glob_assign |
175 \ globcomplete glob_complete globdots glob_dots glob_subst | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
176 \ globsubst globstarshort glob_star_short hashall hash_all hashcmds |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
177 \ hash_cmds hashdirs hash_dirs hashexecutablesonly hash_executables_only |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
178 \ hashlistall hash_list_all histallowclobber hist_allow_clobber histappend |
6823 | 179 \ hist_append histbeep hist_beep hist_expand hist_expire_dups_first |
180 \ histexpand histexpiredupsfirst histfcntllock hist_fcntl_lock | |
181 \ histfindnodups hist_find_no_dups histignorealldups | |
182 \ hist_ignore_all_dups histignoredups hist_ignore_dups | |
183 \ histignorespace hist_ignore_space histlexwords hist_lex_words | |
184 \ histnofunctions hist_no_functions histnostore hist_no_store | |
185 \ histreduceblanks hist_reduce_blanks histsavebycopy | |
186 \ hist_save_by_copy histsavenodups hist_save_no_dups | |
187 \ histsubstpattern hist_subst_pattern histverify hist_verify | |
188 \ hup ignorebraces ignore_braces ignoreclosebraces ignore_close_braces | |
189 \ ignoreeof ignore_eof incappendhistory inc_append_history | |
190 \ incappendhistorytime inc_append_history_time interactive | |
191 \ interactivecomments interactive_comments ksharrays ksh_arrays | |
192 \ kshautoload ksh_autoload kshglob ksh_glob kshoptionprint | |
193 \ ksh_option_print kshtypeset ksh_typeset kshzerosubscript | |
194 \ ksh_zero_subscript listambiguous list_ambiguous listbeep | |
195 \ list_beep listpacked list_packed listrowsfirst list_rows_first | |
196 \ listtypes list_types localloops local_loops localoptions | |
197 \ local_options localpatterns local_patterns localtraps | |
198 \ local_traps log login longlistjobs long_list_jobs magicequalsubst | |
199 \ magic_equal_subst mailwarn mail_warn mail_warning mark_dirs | |
200 \ mailwarning markdirs menucomplete menu_complete monitor | |
201 \ multibyte multi_byte multifuncdef multi_func_def multios | |
202 \ multi_os nomatch no_match notify nullglob null_glob numericglobsort | |
203 \ numeric_glob_sort octalzeroes octal_zeroes onecmd one_cmd | |
204 \ overstrike over_strike pathdirs path_dirs pathscript | |
205 \ path_script physical pipefail pipe_fail posixaliases | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
206 \ posix_aliases posixargzero posix_arg_zero posix_argzero posixbuiltins |
6823 | 207 \ posix_builtins posixcd posix_cd posixidentifiers posix_identifiers |
208 \ posixjobs posix_jobs posixstrings posix_strings posixtraps | |
209 \ posix_traps printeightbit print_eight_bit printexitvalue | |
210 \ print_exit_value privileged promptbang prompt_bang promptcr | |
211 \ prompt_cr promptpercent prompt_percent promptsp prompt_sp | |
212 \ promptsubst prompt_subst promptvars prompt_vars pushdignoredups | |
213 \ pushd_ignore_dups pushdminus pushd_minus pushdsilent pushd_silent | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
214 \ pushdtohome pushd_to_home rcexpandparam rc_expandparam rc_expand_param rcquotes |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
215 \ rc_quotes rcs recexact rec_exact rematchpcre re_match_pcre rematch_pcre |
6823 | 216 \ restricted rmstarsilent rm_star_silent rmstarwait rm_star_wait |
217 \ sharehistory share_history shfileexpansion sh_file_expansion | |
218 \ shglob sh_glob shinstdin shin_stdin shnullcmd sh_nullcmd | |
219 \ shoptionletters sh_option_letters shortloops short_loops shwordsplit | |
220 \ sh_word_split singlecommand single_command singlelinezle single_line_zle | |
221 \ sourcetrace source_trace stdin sunkeyboardhack sun_keyboard_hack | |
222 \ trackall track_all transientrprompt transient_rprompt | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
223 \ trapsasync traps_async typesetsilent type_set_silent typeset_silent unset verbose vi |
6823 | 224 \ warncreateglobal warn_create_global xtrace zle |
225 | |
226 syn keyword zshOptions noaliases no_aliases noallexport no_allexport noall_export no_all_export noalwayslastprompt no_alwayslastprompt | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
227 \ noalways_lastprompt no_always_lastprompt no_always_last_prompt noalwaystoend no_alwaystoend noalways_to_end no_always_to_end |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
228 \ noappendcreate no_appendcreate no_append_create noappendhistory no_appendhistory noappend_history no_append_history noautocd |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
229 \ no_autocd no_auto_cd noautocontinue no_autocontinue noauto_continue no_auto_continue noautolist no_autolist noauto_list |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
230 \ no_auto_list noautomenu no_automenu noauto_menu no_auto_menu noautonamedirs no_autonamedirs noauto_name_dirs |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
231 \ no_auto_name_dirs noautoparamkeys no_autoparamkeys noauto_param_keys no_auto_param_keys noautoparamslash no_autoparamslash |
6823 | 232 \ noauto_param_slash no_auto_param_slash noautopushd no_autopushd noauto_pushd no_auto_pushd noautoremoveslash no_autoremoveslash |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
233 \ noauto_remove_slash no_auto_remove_slash noautoresume no_autoresume noauto_resume no_auto_resume nobadpattern no_badpattern no_bad_pattern |
6823 | 234 \ nobanghist no_banghist nobang_hist no_bang_hist nobareglobqual no_bareglobqual nobare_glob_qual no_bare_glob_qual |
235 \ nobashautolist no_bashautolist nobash_auto_list no_bash_auto_list nobashrematch no_bashrematch nobash_rematch no_bash_rematch | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
236 \ nobeep no_beep nobgnice no_bgnice no_bg_nice nobraceccl no_braceccl nobrace_ccl no_brace_ccl nobraceexpand no_braceexpand nobrace_expand no_brace_expand |
6823 | 237 \ nobsdecho no_bsdecho nobsd_echo no_bsd_echo nocaseglob no_caseglob nocase_glob no_case_glob nocasematch no_casematch nocase_match no_case_match |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
238 \ nocbases no_cbases no_c_bases nocdablevars no_cdablevars no_cdable_vars nocd_able_vars no_cd_able_vars nochasedots no_chasedots nochase_dots no_chase_dots |
6823 | 239 \ nochaselinks no_chaselinks nochase_links no_chase_links nocheckjobs no_checkjobs nocheck_jobs no_check_jobs |
240 \ noclobber no_clobber nocombiningchars no_combiningchars nocombining_chars no_combining_chars nocompletealiases no_completealiases | |
241 \ nocomplete_aliases no_complete_aliases nocompleteinword no_completeinword nocomplete_in_word no_complete_in_word | |
242 \ nocontinueonerror no_continueonerror nocontinue_on_error no_continue_on_error nocorrect no_correct | |
243 \ nocorrectall no_correctall nocorrect_all no_correct_all nocprecedences no_cprecedences noc_precedences no_c_precedences | |
244 \ nocshjunkiehistory no_cshjunkiehistory nocsh_junkie_history no_csh_junkie_history nocshjunkieloops no_cshjunkieloops | |
245 \ nocsh_junkie_loops no_csh_junkie_loops nocshjunkiequotes no_cshjunkiequotes nocsh_junkie_quotes no_csh_junkie_quotes | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
246 \ nocshnullcmd no_cshnullcmd no_csh_nullcmd nocsh_null_cmd no_csh_null_cmd nocshnullglob no_cshnullglob nocsh_null_glob no_csh_null_glob |
6823 | 247 \ nodebugbeforecmd no_debugbeforecmd nodebug_before_cmd no_debug_before_cmd nodotglob no_dotglob nodot_glob no_dot_glob nodvorak no_dvorak |
248 \ noemacs no_emacs noequals no_equals noerrexit no_errexit noerr_exit no_err_exit noerrreturn no_errreturn noerr_return no_err_return noevallineno no_evallineno | |
249 \ noeval_lineno no_eval_lineno noexec no_exec noextendedglob no_extendedglob noextended_glob no_extended_glob noextendedhistory no_extendedhistory | |
250 \ noextended_history no_extended_history noflowcontrol no_flowcontrol noflow_control no_flow_control noforcefloat no_forcefloat | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
251 \ noforce_float no_force_float nofunctionargzero no_functionargzero nofunction_arg_zero no_function_argzero no_function_arg_zero noglob no_glob noglobalexport no_globalexport |
6823 | 252 \ noglobal_export no_global_export noglobalrcs no_globalrcs noglobal_rcs no_global_rcs noglobassign no_globassign noglob_assign no_glob_assign |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
253 \ noglobcomplete no_globcomplete noglob_complete no_glob_complete noglobdots no_globdots noglob_dots no_glob_dots |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
254 \ noglobstarshort no_glob_star_short noglob_subst no_glob_subst |
6823 | 255 \ noglobsubst no_globsubst nohashall no_hashall nohash_all no_hash_all nohashcmds no_hashcmds nohash_cmds no_hash_cmds nohashdirs no_hashdirs |
256 \ nohash_dirs no_hash_dirs nohashexecutablesonly no_hashexecutablesonly nohash_executables_only no_hash_executables_only nohashlistall no_hashlistall | |
257 \ nohash_list_all no_hash_list_all nohistallowclobber no_histallowclobber nohist_allow_clobber no_hist_allow_clobber nohistappend no_histappend | |
258 \ nohist_append no_hist_append nohistbeep no_histbeep nohist_beep no_hist_beep nohist_expand no_hist_expand nohist_expire_dups_first no_hist_expire_dups_first | |
259 \ nohistexpand no_histexpand nohistexpiredupsfirst no_histexpiredupsfirst nohistfcntllock no_histfcntllock nohist_fcntl_lock no_hist_fcntl_lock | |
260 \ nohistfindnodups no_histfindnodups nohist_find_no_dups no_hist_find_no_dups nohistignorealldups no_histignorealldups | |
261 \ nohist_ignore_all_dups no_hist_ignore_all_dups nohistignoredups no_histignoredups nohist_ignore_dups no_hist_ignore_dups | |
262 \ nohistignorespace no_histignorespace nohist_ignore_space no_hist_ignore_space nohistlexwords no_histlexwords nohist_lex_words no_hist_lex_words | |
263 \ nohistnofunctions no_histnofunctions nohist_no_functions no_hist_no_functions nohistnostore no_histnostore nohist_no_store no_hist_no_store | |
264 \ nohistreduceblanks no_histreduceblanks nohist_reduce_blanks no_hist_reduce_blanks nohistsavebycopy no_histsavebycopy | |
265 \ nohist_save_by_copy no_hist_save_by_copy nohistsavenodups no_histsavenodups nohist_save_no_dups no_hist_save_no_dups | |
266 \ nohistsubstpattern no_histsubstpattern nohist_subst_pattern no_hist_subst_pattern nohistverify no_histverify nohist_verify no_hist_verify | |
267 \ nohup no_hup noignorebraces no_ignorebraces noignore_braces no_ignore_braces noignoreclosebraces no_ignoreclosebraces noignore_close_braces no_ignore_close_braces | |
268 \ noignoreeof no_ignoreeof noignore_eof no_ignore_eof noincappendhistory no_incappendhistory noinc_append_history no_inc_append_history | |
269 \ noincappendhistorytime no_incappendhistorytime noinc_append_history_time no_inc_append_history_time nointeractive no_interactive | |
270 \ nointeractivecomments no_interactivecomments nointeractive_comments no_interactive_comments noksharrays no_ksharrays noksh_arrays no_ksh_arrays | |
271 \ nokshautoload no_kshautoload noksh_autoload no_ksh_autoload nokshglob no_kshglob noksh_glob no_ksh_glob nokshoptionprint no_kshoptionprint | |
272 \ noksh_option_print no_ksh_option_print nokshtypeset no_kshtypeset noksh_typeset no_ksh_typeset nokshzerosubscript no_kshzerosubscript | |
273 \ noksh_zero_subscript no_ksh_zero_subscript nolistambiguous no_listambiguous nolist_ambiguous no_list_ambiguous nolistbeep no_listbeep | |
274 \ nolist_beep no_list_beep nolistpacked no_listpacked nolist_packed no_list_packed nolistrowsfirst no_listrowsfirst nolist_rows_first no_list_rows_first | |
275 \ nolisttypes no_listtypes nolist_types no_list_types nolocalloops no_localloops nolocal_loops no_local_loops nolocaloptions no_localoptions | |
276 \ nolocal_options no_local_options nolocalpatterns no_localpatterns nolocal_patterns no_local_patterns nolocaltraps no_localtraps | |
277 \ nolocal_traps no_local_traps nolog no_log nologin no_login nolonglistjobs no_longlistjobs nolong_list_jobs no_long_list_jobs nomagicequalsubst no_magicequalsubst | |
278 \ nomagic_equal_subst no_magic_equal_subst nomailwarn no_mailwarn nomail_warn no_mail_warn nomail_warning no_mail_warning nomark_dirs no_mark_dirs | |
279 \ nomailwarning no_mailwarning nomarkdirs no_markdirs nomenucomplete no_menucomplete nomenu_complete no_menu_complete nomonitor no_monitor | |
280 \ nomultibyte no_multibyte nomulti_byte no_multi_byte nomultifuncdef no_multifuncdef nomulti_func_def no_multi_func_def nomultios no_multios | |
281 \ nomulti_os no_multi_os nonomatch no_nomatch nono_match no_no_match nonotify no_notify nonullglob no_nullglob nonull_glob no_null_glob nonumericglobsort no_numericglobsort | |
282 \ nonumeric_glob_sort no_numeric_glob_sort nooctalzeroes no_octalzeroes nooctal_zeroes no_octal_zeroes noonecmd no_onecmd noone_cmd no_one_cmd | |
283 \ nooverstrike no_overstrike noover_strike no_over_strike nopathdirs no_pathdirs nopath_dirs no_path_dirs nopathscript no_pathscript | |
284 \ nopath_script no_path_script nophysical no_physical nopipefail no_pipefail nopipe_fail no_pipe_fail noposixaliases no_posixaliases | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
285 \ noposix_aliases no_posix_aliases noposixargzero no_posixargzero no_posix_argzero noposix_arg_zero no_posix_arg_zero noposixbuiltins no_posixbuiltins |
6823 | 286 \ noposix_builtins no_posix_builtins noposixcd no_posixcd noposix_cd no_posix_cd noposixidentifiers no_posixidentifiers noposix_identifiers no_posix_identifiers |
287 \ noposixjobs no_posixjobs noposix_jobs no_posix_jobs noposixstrings no_posixstrings noposix_strings no_posix_strings noposixtraps no_posixtraps | |
288 \ noposix_traps no_posix_traps noprinteightbit no_printeightbit noprint_eight_bit no_print_eight_bit noprintexitvalue no_printexitvalue | |
289 \ noprint_exit_value no_print_exit_value noprivileged no_privileged nopromptbang no_promptbang noprompt_bang no_prompt_bang nopromptcr no_promptcr | |
290 \ noprompt_cr no_prompt_cr nopromptpercent no_promptpercent noprompt_percent no_prompt_percent nopromptsp no_promptsp noprompt_sp no_prompt_sp | |
291 \ nopromptsubst no_promptsubst noprompt_subst no_prompt_subst nopromptvars no_promptvars noprompt_vars no_prompt_vars nopushdignoredups no_pushdignoredups | |
292 \ nopushd_ignore_dups no_pushd_ignore_dups nopushdminus no_pushdminus nopushd_minus no_pushd_minus nopushdsilent no_pushdsilent nopushd_silent no_pushd_silent | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
293 \ nopushdtohome no_pushdtohome nopushd_to_home no_pushd_to_home norcexpandparam no_rcexpandparam norc_expandparam no_rc_expandparam no_rc_expand_param norcquotes no_rcquotes |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
294 \ norc_quotes no_rc_quotes norcs no_rcs norecexact no_recexact norec_exact no_rec_exact norematchpcre no_rematchpcre nore_match_pcre no_re_match_pcre no_rematch_pcre |
6823 | 295 \ norestricted no_restricted normstarsilent no_rmstarsilent norm_star_silent no_rm_star_silent normstarwait no_rmstarwait norm_star_wait no_rm_star_wait |
296 \ nosharehistory no_sharehistory noshare_history no_share_history noshfileexpansion no_shfileexpansion nosh_file_expansion no_sh_file_expansion | |
297 \ noshglob no_shglob nosh_glob no_sh_glob noshinstdin no_shinstdin noshin_stdin no_shin_stdin noshnullcmd no_shnullcmd nosh_nullcmd no_sh_nullcmd | |
298 \ noshoptionletters no_shoptionletters nosh_option_letters no_sh_option_letters noshortloops no_shortloops noshort_loops no_short_loops noshwordsplit no_shwordsplit | |
299 \ nosh_word_split no_sh_word_split nosinglecommand no_singlecommand nosingle_command no_single_command nosinglelinezle no_singlelinezle nosingle_line_zle no_single_line_zle | |
300 \ nosourcetrace no_sourcetrace nosource_trace no_source_trace nostdin no_stdin nosunkeyboardhack no_sunkeyboardhack nosun_keyboard_hack no_sun_keyboard_hack | |
301 \ notrackall no_trackall notrack_all no_track_all notransientrprompt no_transientrprompt notransient_rprompt no_transient_rprompt | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
302 \ notrapsasync no_trapsasync notrapasync no_trapasync no_traps_async notypesetsilent no_typesetsilent notype_set_silent no_type_set_silent no_typeset_silent \nounset no_unset |
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
303 \ noverbose no_verbose novi no_vi nowarncreateglobal no_warncreateglobal nowarn_create_global no_warn_create_global noxtrace no_xtrace nozle no_zle |
6823 | 304 syn case match |
305 | |
7477
05cf4cc72a9f
commit https://github.com/vim/vim/commit/fa7353428f705f7a13465a1943dddeede4083023
Christian Brabandt <cb@256bit.org>
parents:
6823
diff
changeset
|
306 syn keyword zshTypes float integer local typeset declare private |
7 | 307 |
1125 | 308 " XXX: this may be too much |
309 " syn match zshSwitches '\s\zs--\=[a-zA-Z0-9-]\+' | |
7 | 310 |
1125 | 311 syn match zshNumber '[+-]\=\<\d\+\>' |
312 syn match zshNumber '[+-]\=\<0x\x\+\>' | |
313 syn match zshNumber '[+-]\=\<0\o\+\>' | |
314 syn match zshNumber '[+-]\=\d\+#[-+]\=\w\+\>' | |
315 syn match zshNumber '[+-]\=\d\+\.\d\+\>' | |
7 | 316 |
1698 | 317 " TODO: $[...] is the same as $((...)), so add that as well. |
1125 | 318 syn cluster zshSubst contains=zshSubst,zshOldSubst,zshMathSubst |
319 syn region zshSubst matchgroup=zshSubstDelim transparent | |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
320 \ start='\$(' skip='\\)' end=')' contains=TOP fold |
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
321 syn region zshParentheses transparent start='(' skip='\\)' end=')' fold |
1125 | 322 syn region zshMathSubst matchgroup=zshSubstDelim transparent |
323 \ start='\$((' skip='\\)' | |
324 \ matchgroup=zshSubstDelim end='))' | |
325 \ contains=zshParentheses,@zshSubst,zshNumber, | |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
326 \ @zshDerefs,zshString keepend fold |
1125 | 327 syn region zshBrackets contained transparent start='{' skip='\\}' |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
328 \ end='}' fold |
8246
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
329 syn region zshBrackets transparent start='{' skip='\\}' |
f16bfe02cef1
commit https://github.com/vim/vim/commit/f391327adbbffb11180cf6038a92af1ed144e907
Christian Brabandt <cb@256bit.org>
parents:
7924
diff
changeset
|
330 \ end='}' contains=TOP fold |
1125 | 331 syn region zshSubst matchgroup=zshSubstDelim start='\${' skip='\\}' |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
332 \ end='}' contains=@zshSubst,zshBrackets,zshQuoted,zshString fold |
1125 | 333 syn region zshOldSubst matchgroup=zshSubstDelim start=+`+ skip=+\\`+ |
7924
00d64eb49ce1
commit https://github.com/vim/vim/commit/681baaf4a4c81418693dcafb81421a8614832e91
Christian Brabandt <cb@256bit.org>
parents:
7477
diff
changeset
|
334 \ end=+`+ contains=TOP,zshOldSubst fold |
7 | 335 |
6823 | 336 syn sync minlines=50 maxlines=90 |
1698 | 337 syn sync match zshHereDocSync grouphere NONE '<<-\=\s*\%(\\\=\S\+\|\(["']\)\S\+\1\)' |
338 syn sync match zshHereDocEndSync groupthere NONE '^\s*EO\a\+\>' | |
339 | |
1125 | 340 hi def link zshTodo Todo |
341 hi def link zshComment Comment | |
342 hi def link zshPreProc PreProc | |
343 hi def link zshQuoted SpecialChar | |
344 hi def link zshString String | |
345 hi def link zshStringDelimiter zshString | |
346 hi def link zshPOSIXString zshString | |
347 hi def link zshJobSpec Special | |
348 hi def link zshPrecommand Special | |
349 hi def link zshDelimiter Keyword | |
350 hi def link zshConditional Conditional | |
351 hi def link zshException Exception | |
352 hi def link zshRepeat Repeat | |
353 hi def link zshKeyword Keyword | |
354 hi def link zshFunction None | |
355 hi def link zshKSHFunction zshFunction | |
356 hi def link zshHereDoc String | |
6823 | 357 hi def link zshOperator None |
358 hi def link zshRedir Operator | |
1125 | 359 hi def link zshVariable None |
1698 | 360 hi def link zshVariableDef zshVariable |
1125 | 361 hi def link zshDereferencing PreProc |
362 if s:zsh_syntax_variables =~ 'short\|all' | |
363 hi def link zshShortDeref zshDereferencing | |
364 else | |
365 hi def link zshShortDeref None | |
366 endif | |
367 if s:zsh_syntax_variables =~ 'long\|all' | |
368 hi def link zshLongDeref zshDereferencing | |
369 else | |
370 hi def link zshLongDeref None | |
371 endif | |
372 if s:zsh_syntax_variables =~ 'all' | |
373 hi def link zshDeref zshDereferencing | |
374 else | |
375 hi def link zshDeref None | |
376 endif | |
377 hi def link zshCommands Keyword | |
6823 | 378 hi def link zshOptions Constant |
1125 | 379 hi def link zshTypes Type |
380 hi def link zshSwitches Special | |
381 hi def link zshNumber Number | |
382 hi def link zshSubst PreProc | |
383 hi def link zshMathSubst zshSubst | |
384 hi def link zshOldSubst zshSubst | |
385 hi def link zshSubstDelim zshSubst | |
7 | 386 |
387 let b:current_syntax = "zsh" | |
388 | |
1125 | 389 let &cpo = s:cpo_save |
390 unlet s:cpo_save |