From a sourced file I am running my vim script. The aim of the script is to run :global
. I am searching for
\\%(pattern1.*/)\@<!pattern2
The patterns are variables, so I use execute
; for the work to be done, I use a second nested level of execute.
It turns out that within the execute
I must use |
, not newlines, to separate commands.
execute ' g#' . WE_pattern1 . ' ' . WE_patter2 . '#execute " try | ...work | to | be | done... | catch ... | endtry | " '
How can I get the depth of
execute
-nesting?How can I
:finish
the script under some condition?:finish
always gives the error messageE168: only in sourced ...
.I catch
CTRL-C
interrupts, but after some processing how can I write thatCTRL-C
will be executed?