summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkearns <dougkearns@gmail.com>2024-06-14 01:48:10 +1000
committerGitHub <noreply@github.com>2024-06-13 17:48:10 +0200
commita3bddb759e77c52431a93a68674790dd02647cd1 (patch)
treece1c40fb540b28c19e16b946b52fc4f208c846ef
parent902b766858fad89ab30b4e0a92ddd1244b2a4cbe (diff)
runtime(vim): Update base-syntax, match :catch and :throw args (#14989)
Match :catch /{pattern}/ and :throw {expr1}. Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/syntax/generator/gen_syntax_vim.vim1
-rw-r--r--runtime/syntax/generator/vim.vim.base11
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_catch_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_catch_99.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_throw_00.dump20
-rw-r--r--runtime/syntax/testdir/dumps/vim_ex_throw_99.dump20
-rw-r--r--runtime/syntax/testdir/input/vim_ex_catch.vim17
-rw-r--r--runtime/syntax/testdir/input/vim_ex_throw.vim5
-rw-r--r--runtime/syntax/vim.vim25
9 files changed, 128 insertions, 11 deletions
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim
index 4843aacac0..deb490fa07 100644
--- a/runtime/syntax/generator/gen_syntax_vim.vim
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -287,6 +287,7 @@ function! s:get_vim_command_type(cmd_name)
\ 'Next', 'Print', 'X',
\ 'new', 'popup',
\ 'vim9script',
+ \ 'catch', 'throw',
\ ]
" Required for original behavior
" \ 'global', 'vglobal'
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index bd597e9d54..743c0cd1e1 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: 2024 Jun 11
+" Last Change: 2024 Jun 13
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -175,7 +175,7 @@ syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSub
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCatch,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
@@ -206,6 +206,11 @@ syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vi
syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
syn keyword vimBehaveModel contained mswin xterm
+" Exception Handling {{{2
+syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
+syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern
+syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline
+
" Filetypes {{{2
" =========
syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
@@ -1069,6 +1074,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
hi def link vimBracket Delimiter
+ hi def link vimCatch vimCommand
hi def link vimCmplxRepeat SpecialChar
hi def link vimCommand Statement
hi def link vimComment Comment
@@ -1226,6 +1232,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSynReg Type
hi def link vimSyntax vimCommand
hi def link vimSynType vimSpecial
+ hi def link vimThrow vimCommand
hi def link vimTodo Todo
hi def link vimType Type
hi def link vimUnlet vimCommand
diff --git a/runtime/syntax/testdir/dumps/vim_ex_catch_00.dump b/runtime/syntax/testdir/dumps/vim_ex_catch_00.dump
new file mode 100644
index 0000000000..748c48b820
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_catch_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|c|a|t|c|h| |c|o|m@1|a|n|d| +0#0000000&@54
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|c|a|t|c|h| +0#0000000&@60
+@75
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|:|I|n|t|e|r@1|u|p|t|$|/+0#e000e06&| +0#0000000&@8|"+0#0000e05&| |c|a|t|c|h| |i|n|t|e|r@1|u|p|t|s| |(|C|T|R|L|-|C|)| +0#0000000&@15
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|\+0#e000e06&|%|(|(+0#0000000&|\|a|\|+|)|\+0#e000e06&|)|\+0#0000000&|=|:|E|/+0#e000e06&| +0#0000000&@4|"+0#0000e05&| |c|a|t|c|h| |a|l@1| |V|i|m| |e|r@1|o|r|s| +0#0000000&@20
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|\+0#e000e06&|%|(|(+0#0000000&|\|a|\|+|)|\+0#e000e06&|)|\+0#0000000&|=|:|/+0#e000e06&| +0#0000000&@5|"+0#0000e05&| |c|a|t|c|h| |e|r@1|o|r|s| |a|n|d| |i|n|t|e|r@1|u|p|t|s| +0#0000000&@13
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|(|w|r|i|t|e|)|:|/+0#e000e06&| +0#0000000&@11|"+0#0000e05&| |c|a|t|c|h| |a|l@1| |e|r@1|o|r|s| |i|n| |:|w|r|i|t|e| +0#0000000&@14
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|\+0#e000e06&|%|(|(+0#0000000&|\|a|\|+|)|\+0#e000e06&|)|\+0#0000000&|=|:|E|1|2|3|:|/+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|a|t|c|h| |e|r@1|o|r| |E|1|2|3| +0#0000000&@24
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|m+0#0000000&|y|-|e|x|c|e|p|t|i|o|n|/+0#e000e06&| +0#0000000&@11|"+0#0000e05&| |c|a|t|c|h| |u|s|e|r| |e|x|c|e|p|t|i|o|n| +0#0000000&@20
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|.+0#0000000&|*|/+0#e000e06&| +0#0000000&@21|"+0#0000e05&| |c|a|t|c|h| |e|v|e|r|y|t|h|i|n|g| +0#0000000&@24
+|c+0#af5f00255&|a|t|c|h| +0#0000000&@26|"+0#0000e05&| |s|a|m|e| |a|s| |/|.|*|/| +0#0000000&@28
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|t|r|y| +0#0000000&@62
+@75
+|t+0#af5f00255&|r|y| +0#0000000&||| |s+0#af5f00255&|l|e@1|p| +0#0000000&|1+0#e000002&|0@1| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|:|I|n|t|e|r@1|u|p|t|$|/+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@24
+|t+0#af5f00255&|r|y| +0#0000000&||| |e+0#af5f00255&|d|i|t| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|(|e|d|i|t|)|:|E|\|d|\|+|/+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|e|r@1|o|r|"| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@13
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_catch_99.dump b/runtime/syntax/testdir/dumps/vim_ex_catch_99.dump
new file mode 100644
index 0000000000..39e47c197a
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_catch_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |V|i|m| |:|c|a|t|c|h| |c|o|m@1|a|n|d| +0#0000000&@54
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|c|a|t|c|h| +0#0000000&@60
+@75
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|:|I|n|t|e|r@1|u|p|t|$|/+0#e000e06&| +0#0000000&@8|"+0#0000e05&| |c|a|t|c|h| |i|n|t|e|r@1|u|p|t|s| |(|C|T|R|L|-|C|)| +0#0000000&@15
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|\+0#e000e06&|%|(|(+0#0000000&|\|a|\|+|)|\+0#e000e06&|)|\+0#0000000&|=|:|E|/+0#e000e06&| +0#0000000&@4|"+0#0000e05&| |c|a|t|c|h| |a|l@1| |V|i|m| |e|r@1|o|r|s| +0#0000000&@20
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|\+0#e000e06&|%|(|(+0#0000000&|\|a|\|+|)|\+0#e000e06&|)|\+0#0000000&|=|:|/+0#e000e06&| +0#0000000&@5|"+0#0000e05&| |c|a|t|c|h| |e|r@1|o|r|s| |a|n|d| |i|n|t|e|r@1|u|p|t|s| +0#0000000&@13
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|(|w|r|i|t|e|)|:|/+0#e000e06&| +0#0000000&@11|"+0#0000e05&| |c|a|t|c|h| |a|l@1| |e|r@1|o|r|s| |i|n| |:|w|r|i|t|e| +0#0000000&@14
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|\+0#e000e06&|%|(|(+0#0000000&|\|a|\|+|)|\+0#e000e06&|)|\+0#0000000&|=|:|E|1|2|3|:|/+0#e000e06&| +0#0000000&|"+0#0000e05&| |c|a|t|c|h| |e|r@1|o|r| |E|1|2|3| +0#0000000&@24
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|m+0#0000000&|y|-|e|x|c|e|p|t|i|o|n|/+0#e000e06&| +0#0000000&@11|"+0#0000e05&| |c|a|t|c|h| |u|s|e|r| |e|x|c|e|p|t|i|o|n| +0#0000000&@20
+|c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|.+0#0000000&|*|/+0#e000e06&| +0#0000000&@21|"+0#0000e05&| |c|a|t|c|h| |e|v|e|r|y|t|h|i|n|g| +0#0000000&@24
+|c+0#af5f00255&|a|t|c|h| +0#0000000&@26|"+0#0000e05&| |s|a|m|e| |a|s| |/|.|*|/| +0#0000000&@28
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|t|r|y| +0#0000000&@62
+@75
+|t+0#af5f00255&|r|y| +0#0000000&||| |s+0#af5f00255&|l|e@1|p| +0#0000000&|1+0#e000002&|0@1| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|:|I|n|t|e|r@1|u|p|t|$|/+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@24
+>t+0#af5f00255&|r|y| +0#0000000&||| |e+0#af5f00255&|d|i|t| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|V|i|m|(|e|d|i|t|)|:|E|\|d|\|+|/+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|e|r@1|o|r|"| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@13
+|~+0#4040ff13&| @73
+|~| @73
+| +0#0000000&@56|1|7|,|1| @9|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_throw_00.dump b/runtime/syntax/testdir/dumps/vim_ex_throw_00.dump
new file mode 100644
index 0000000000..c4089e8ec9
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_throw_00.dump
@@ -0,0 +1,20 @@
+>"+0#0000e05#ffffff0| |V|i|m| |:|t|h|r|o|w| |c|o|m@1|a|n|d| +0#0000000&@54
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|t|h|r|o|w| +0#0000000&@60
+@75
+|t+0#af5f00255&|r|y| +0#0000000&||| |t+0#af5f00255&|h|r|o|w| +0#0000000&|"+0#e000002&|o@1|p|s|"| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|o@1|/+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|c|a|u|g|h|t|"| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@17
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|1|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/dumps/vim_ex_throw_99.dump b/runtime/syntax/testdir/dumps/vim_ex_throw_99.dump
new file mode 100644
index 0000000000..b53fff4575
--- /dev/null
+++ b/runtime/syntax/testdir/dumps/vim_ex_throw_99.dump
@@ -0,0 +1,20 @@
+|"+0#0000e05#ffffff0| |V|i|m| |:|t|h|r|o|w| |c|o|m@1|a|n|d| +0#0000000&@54
+@75
+|"+0#0000e05&| |:|h|e|l|p| |:|t|h|r|o|w| +0#0000000&@60
+@75
+>t+0#af5f00255&|r|y| +0#0000000&||| |t+0#af5f00255&|h|r|o|w| +0#0000000&|"+0#e000002&|o@1|p|s|"| +0#0000000&||| |c+0#af5f00255&|a|t|c|h| +0#0000000&|/+0#e000e06&|^+0#0000000&|o@1|/+0#e000e06&| +0#0000000&||| |e+0#af5f00255&|c|h|o| +0#0000000&|"+0#e000002&|c|a|u|g|h|t|"| +0#0000000&||| |e+0#af5f00255&|n|d|t|r|y| +0#0000000&@17
+|~+0#4040ff13&| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+| +0#0000000&@56|5|,|1| @10|A|l@1|
diff --git a/runtime/syntax/testdir/input/vim_ex_catch.vim b/runtime/syntax/testdir/input/vim_ex_catch.vim
new file mode 100644
index 0000000000..f0e2a8fdc3
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_catch.vim
@@ -0,0 +1,17 @@
+" Vim :catch command
+
+" :help :catch
+
+catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
+catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
+catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
+catch /^Vim(write):/ " catch all errors in :write
+catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
+catch /my-exception/ " catch user exception
+catch /.*/ " catch everything
+catch " same as /.*/
+
+" :help :try
+
+try | sleep 100 | catch /^Vim:Interrupt$/ | endtry
+try | edit | catch /^Vim(edit):E\d\+/ | echo "error" | endtry
diff --git a/runtime/syntax/testdir/input/vim_ex_throw.vim b/runtime/syntax/testdir/input/vim_ex_throw.vim
new file mode 100644
index 0000000000..4adbc88485
--- /dev/null
+++ b/runtime/syntax/testdir/input/vim_ex_throw.vim
@@ -0,0 +1,5 @@
+" Vim :throw command
+
+" :help :throw
+
+try | throw "oops" | catch /^oo/ | echo "caught" | endtry
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 720866146c..c1f4341222 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: 2024 Jun 11
+" Last Change: 2024 Jun 13
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -28,12 +28,12 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR=''
-syn keyword vimCommand contained abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cal[l] cat[ch] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] class clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear]
-syn keyword vimCommand contained comp[iler] con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delc[ommand] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] elsei[f] em[enu] en[dif] endin[terface] endc[lass] ende[num] endfo[r] endt[ry] endw[hile] ene[w] enu[m] ev[al] ex exi[t] exp[ort] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[l] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] for g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind]
-syn keyword vimCommand contained helpg[rep] helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] if ij[ump] il[ist] imp[ort] int[ro] inte[rface] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] let lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loadk[eymap] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow]
-syn keyword vimCommand contained ls m[ove] ma[rk] mak[e] marks mat[ch] menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pub[lic] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize]
-syn keyword vimCommand contained ret[ab] retu[rn] rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sl[eep] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stat[ic] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit]
-syn keyword vimCommand contained tabf[ind] tabfir[st] tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] th[row] thi[s] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] ty[pe] u[ndo] undoj[oin] undol[ist] unh[ide] unl[et] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wh[ile] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i
+syn keyword vimCommand contained abo[veleft] abs[tract] al[l] ar[gs] arga[dd] argd[elete] argdo argded[upe] arge[dit] argg[lobal] argl[ocal] argu[ment] as[cii] b[uffer] bN[ext] ba[ll] bad[d] balt bd[elete] bel[owright] bf[irst] bl[ast] bm[odified] bn[ext] bo[tright] bp[revious] br[ewind] brea[k] breaka[dd] breakd[el] breakl[ist] bro[wse] buffers bufd[o] bun[load] bw[ipeout] c[hange] cN[ext] cNf[ile] cabo[ve] cad[dbuffer] cadde[xpr] caddf[ile] caf[ter] cal[l] cb[uffer] cbe[fore] cbel[ow] cbo[ttom] cc ccl[ose] cd cdo ce[nter] cex[pr] cf[ile] cfd[o] cfir[st] cg[etfile] cgetb[uffer] cgete[xpr] chd[ir] changes che[ckpath] checkt[ime] chi[story] cl[ist] cla[st] class clo[se] cle[arjumps] cn[ext] cnew[er] cnf[ile] co[py] col[der] colo[rscheme] com[mand] comc[lear] comp[iler]
+syn keyword vimCommand contained con[tinue] conf[irm] cons[t] cope[n] cp[revious] cpf[ile] cq[uit] cr[ewind] cs[cope] cst[ag] cw[indow] d[elete] delm[arks] deb[ug] debugg[reedy] defc[ompile] defe[r] delc[ommand] delf[unction] di[splay] dif[fupdate] diffg[et] diffo[ff] diffp[atch] diffpu[t] diffs[plit] difft[his] dig[raphs] disa[ssemble] dj[ump] dli[st] dr[op] ds[earch] dsp[lit] e[dit] ea[rlier] el[se] elsei[f] em[enu] en[dif] endin[terface] endc[lass] ende[num] endfo[r] endt[ry] endw[hile] ene[w] enu[m] ev[al] ex exi[t] exp[ort] exu[sage] f[ile] files filet[ype] filt[er] fin[d] fina[l] finall[y] fini[sh] fir[st] fix[del] fo[ld] foldc[lose] foldd[oopen] folddoc[losed] foldo[pen] for g[lobal] go[to] gr[ep] grepa[dd] gu[i] gv[im] h[elp] helpc[lose] helpf[ind] helpg[rep]
+syn keyword vimCommand contained helpt[ags] ha[rdcopy] hi[ghlight] hid[e] his[tory] ho[rizontal] if ij[ump] il[ist] imp[ort] int[ro] inte[rface] is[earch] isp[lit] j[oin] ju[mps] k kee[pmarks] keepj[umps] keepp[atterns] keepa[lt] l[ist] lN[ext] lNf[ile] la[st] lab[ove] lan[guage] lad[dexpr] laddb[uffer] laddf[ile] laf[ter] lat[er] lb[uffer] lbe[fore] lbel[ow] lbo[ttom] lc[d] lch[dir] lcl[ose] lcs[cope] ld[o] le[ft] lefta[bove] let lex[pr] leg[acy] lf[ile] lfd[o] lfir[st] lg[etfile] lgetb[uffer] lgete[xpr] lgr[ep] lgrepa[dd] lh[elpgrep] lhi[story] ll lla[st] lli[st] lmak[e] lne[xt] lnew[er] lnf[ile] lo[adview] loadk[eymap] loc[kmarks] lockv[ar] lol[der] lop[en] lp[revious] lpf[ile] lr[ewind] lt[ag] lua luad[o] luaf[ile] lv[imgrep] lvimgrepa[dd] lw[indow] ls m[ove]
+syn keyword vimCommand contained ma[rk] mak[e] marks mat[ch] menut[ranslate] mes[sages] mk[exrc] mks[ession] mksp[ell] mkv[imrc] mkvie[w] mod[e] mz[scheme] mzf[ile] n[ext] nb[key] nbc[lose] nbs[tart] noa[utocmd] noh[lsearch] nos[wapfile] nu[mber] o[pen] ol[dfiles] on[ly] opt[ions] ow[nsyntax] p[rint] pa[ckadd] packl[oadall] pc[lose] pe[rl] perld[o] ped[it] po[p] pp[op] pre[serve] prev[ious] pro[mptfind] promptr[epl] prof[ile] profd[el] ps[earch] pt[ag] ptN[ext] ptf[irst] ptj[ump] ptl[ast] ptn[ext] ptp[revious] ptr[ewind] pts[elect] pu[t] pub[lic] pw[d] py[thon] pyd[o] pyf[ile] py3 py3d[o] python3 py3f[ile] pyx pyxd[o] pythonx pyxf[ile] q[uit] quita[ll] qa[ll] r[ead] rec[over] red[o] redi[r] redr[aw] redraws[tatus] redrawt[abline] reg[isters] res[ize] ret[ab] retu[rn]
+syn keyword vimCommand contained rew[ind] ri[ght] rightb[elow] ru[ntime] rub[y] rubyd[o] rubyf[ile] rund[o] rv[iminfo] sN[ext] sa[rgument] sal[l] san[dbox] sav[eas] sb[uffer] sbN[ext] sba[ll] sbf[irst] sbl[ast] sbm[odified] sbn[ext] sbp[revious] sbr[ewind] sc[riptnames] scripte[ncoding] scriptv[ersion] scs[cope] setf[iletype] sf[ind] sfir[st] sh[ell] si[malt] sig[n] sil[ent] sl[eep] sla[st] sn[ext] so[urce] sor[t] sp[lit] spe[llgood] spelld[ump] spelli[nfo] spellr[epall] spellra[re] spellu[ndo] spellw[rong] spr[evious] sr[ewind] st[op] sta[g] star[tinsert] startg[replace] startr[eplace] stat[ic] stopi[nsert] stj[ump] sts[elect] sun[hide] sus[pend] sv[iew] sw[apname] synti[me] sync[bind] smi[le] t tN[ext] ta[g] tags tab tabc[lose] tabd[o] tabe[dit] tabf[ind] tabfir[st]
+syn keyword vimCommand contained tabm[ove] tabl[ast] tabn[ext] tabnew tabo[nly] tabp[revious] tabN[ext] tabr[ewind] tabs tc[d] tch[dir] tcl tcld[o] tclf[ile] te[aroff] ter[minal] tf[irst] thi[s] tj[ump] tl[ast] tn[ext] to[pleft] tp[revious] tr[ewind] try ts[elect] ty[pe] u[ndo] undoj[oin] undol[ist] unh[ide] unl[et] unlo[ckvar] uns[ilent] up[date] v[global] ve[rsion] verb[ose] vert[ical] vi[sual] vie[w] vim[grep] vimgrepa[dd] vim9[cmd] viu[sage] vne[w] vs[plit] w[rite] wN[ext] wa[ll] wh[ile] wi[nsize] winc[md] wind[o] winp[os] wn[ext] wp[revious] wq wqa[ll] wu[ndo] wv[iminfo] x[it] xa[ll] xr[estore] y[ank] z dl dell delel deletl deletel dp dep delp delep deletp deletep a i
syn keyword vimCommand contained 2mat[ch] 3mat[ch]
@@ -98,7 +98,7 @@ syn keyword vimGroup contained Comment Constant String Character Number Boolean
" Default highlighting groups {{{2
" GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR=''
-syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuExtra PmenuExtraSel Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow
+syn keyword vimHLGroup contained ErrorMsg IncSearch ModeMsg NonText StatusLine StatusLineNC EndOfBuffer VertSplit VisualNOS DiffText PmenuSbar TabLineSel TabLineFill Cursor lCursor QuickFixLine CursorLineSign CursorLineFold CurSearch PmenuKind PmenuKindSel PmenuMatch PmenuMatchSel PmenuExtra PmenuExtraSel Normal Directory LineNr CursorLineNr MoreMsg Question Search SpellBad SpellCap SpellRare SpellLocal PmenuThumb Pmenu PmenuSel SpecialKey Title WarningMsg WildMenu Folded FoldColumn SignColumn Visual DiffAdd DiffChange DiffDelete TabLine CursorColumn CursorLine ColorColumn MatchParen StatusLineTerm StatusLineTermNC ToolbarLine ToolbarButton Menu Tooltip Scrollbar CursorIM LineNrAbove LineNrBelow
syn match vimHLGroup contained "\<Conceal\>"
syn case match
@@ -213,7 +213,7 @@ syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSub
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCatch,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
@@ -244,6 +244,11 @@ syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vi
syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
syn keyword vimBehaveModel contained mswin xterm
+" Exception Handling {{{2
+syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
+syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern
+syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline
+
" Filetypes {{{2
" =========
syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError
@@ -1114,6 +1119,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
hi def link vimBracket Delimiter
+ hi def link vimCatch vimCommand
hi def link vimCmplxRepeat SpecialChar
hi def link vimCommand Statement
hi def link vimComment Comment
@@ -1271,6 +1277,7 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSynReg Type
hi def link vimSyntax vimCommand
hi def link vimSynType vimSpecial
+ hi def link vimThrow vimCommand
hi def link vimTodo Todo
hi def link vimType Type
hi def link vimUnlet vimCommand