vim

How to interrupt a Vim command taking too much time?


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) ?


Solution

  • You can interrupt it sending SIGINT (CTRL+C).