开发者

How to interrupt a Vim command taking too much time?

开发者 https://www.devze.com 2023-02-10 09:47 出处:网络
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

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.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号