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.
精彩评论