Sunday, May 6, 2012

Catch error E123: is help correct?

At ':help :catch' we see this example to catch error E123:
:catch /^Vim\%((\a\+)\)\=:E123/

Isn't the above wrong? Why not just:
:catch /E123:/

The help example has ':E123' but it means 'E123:'?

What is the '^Vim...' stuff for? The messages on my system do
not start with 'Vim' (use :s/xxx/xxx/ on an empty line to see
error E486, or :xxx to see error E492).

Other examples at ':help :catch' seem wrong to me. The list is:
: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

Is a change needed at ':help :catch'?

John

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: