File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- *eval.txt* For Vim version 9.1. Last change: 2025 Dec 21
1+ *eval.txt* For Vim version 9.1. Last change: 2025 Dec 23
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3718,12 +3718,15 @@ text...
37183718 matching {pattern} is being thrown and has not yet
37193719 been caught by a previous `:catch ` . Otherwise, these
37203720 commands are skipped.
3721- When {pattern} is omitted all errors are caught.
3722- Examples: >
3721+ Pattern can start with "Vim({cmd} )" to indicate an
3722+ exception that occurred when executing the Ex command
3723+ {cmd} . When {pattern} is omitted all errors are
3724+ caught. Examples: >
37233725 :catch /^Vim:Interrupt$/ " catch interrupts (CTRL-C)
37243726 :catch /^Vim\%((\a\+)\)\=:E/ " catch all Vim errors
37253727 :catch /^Vim\%((\a\+)\)\=:/ " catch errors and interrupts
37263728 :catch /^Vim(write):/ " catch all errors in :write
3729+ :catch /^Vim(!):/ " catch all errors in :!
37273730 :catch /^Vim\%((\a\+)\)\=:E123:/ " catch error E123
37283731 :catch /my-exception/ " catch user exception
37293732 :catch /.*/ " catch everything
You can’t perform that action at this time.
0 commit comments