I run a sourced vimscript like this:
exec 'g#' . WE_var_searchmode . ' ' . WE_var_pattertosearch . '#exec " A | B | C | make_CTRL-C | ... | LAST " '
execute '...' is needed to pass variables as patterns.
execute " ... " is needed so that the global command repeatedly executes some code.
On some condition, the repetition by
:global is to be broken, like breaking a while loop. The help states that for
CTRL-C interrupts. Thus typing
CTRL-C does work. But how can I write code in the script to interrupt?
I have not found a way; all my trials to produce
CTRL-C result in error messages.