Sometimes a Vim command takes too much time to execute.
Typical example : gf
command with a huge path over a network. It can take up to 30 seconds to end. I would like to interrupt the execution while it is ongoing.
Is there a way to cancel the command execution and go back to normal mode (without having to kill Vim and restart) ?
You can interrupt it sending SIGINT (CTRL+C).
From the documentation:
CTRL-C Interrupt current (search) command. Use CTRL-Break on
MS-DOS |dos-CTRL-Break|.
In Normal mode, any pending command is aborted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With