From e1e2d8dfc5e79545ae63df5cc6550b1662b7d868 Mon Sep 17 00:00:00 2001 From: Daniel Chateau Date: Wed, 29 May 2024 13:04:41 -0400 Subject: [PATCH] Correct typos with overuse of backslashes. --- ch26_vimscript_conditionals_and_loops.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ch26_vimscript_conditionals_and_loops.md b/ch26_vimscript_conditionals_and_loops.md index c65e503..537307c 100644 --- a/ch26_vimscript_conditionals_and_loops.md +++ b/ch26_vimscript_conditionals_and_loops.md @@ -476,14 +476,14 @@ The difference between `catch` and `finally` is that `finally` is always run, er You can catch specific error with `:catch`. According to `:h :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 /.*/ +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 /.*/ ``` Inside a `try` block, an interrupt is considered a catchable error.