I have two different machines (home and work) running Ubuntu 18.04. Last night vim froze at home. I was in insert mode and typing and went to save (esc :w) and nothing happened. The status bar still reads -- INSERT --, the cursor is still blinking where it was. I was stuck. I couldn't find a way out. I couldn't type (nothing happened when I type), I couldn't move around (the up and down arrows did nothing). It was stuck in insert mode with the cursor blinking where it was.

I was definitely multitasking and probably hit some other keys in there, but I don't know what keys. It was late, though, so I closed the terminal window and tried again (I was entering a git commit message). It happened again partway through my typing so I switched to git commit -m "don't need an editor for this" instead. And then I shut down my computer and stopped working.

I figured I was just tired, but then it happened to me today at work on a different laptop altogether. Again I was multitasking and can't swear I didn't type any bizarro key sequence but if I did it was accidental. And other tabs in the same terminal aren't frozen.

I'm used to getting trapped in visual mode in vim. That's a trick I've learned. But stuck in insert mode? Any ideas on what I might've done and how to get out of it?

Per a comment suggestion I tried looking at .viminfo but the only .viminfo I see is owned exclusively by root and only appears to show things I would have edited with sudo:

# Input Line History (newest to oldest):

# Debug Line History (newest to oldest):

# Registers:

# File marks:
'0  1  0  /etc/neomuttrc
'1  1  66  /etc/apt/sources.list.d/signal-bionic.list
'2  51  0  /etc/apt/sources.list

# Jumplist (newest first):
-'  1  0  /etc/neomuttrc
-'  1  66  /etc/apt/sources.list.d/signal-bionic.list
-'  1  66  /etc/apt/sources.list.d/signal-bionic.list
-'  51  0  /etc/apt/sources.list
-'  51  0  /etc/apt/sources.list
-'  51  0  /etc/apt/sources.list
-'  51  0  /etc/apt/sources.list
-'  1  0  /etc/apt/sources.list
-'  1  0  /etc/apt/sources.list
-'  1  0  /etc/apt/sources.list
-'  1  0  /etc/apt/sources.list

# History of marks within files (newest to oldest):

> /etc/neomuttrc
    *   1531789952  0
    "   1   0

> /etc/apt/sources.list.d/signal-bionic.list
    *   1530816564  0
    "   1   66
    ^   1   67
    .   1   66
    +   1   66

> /etc/apt/sources.list
    *   1530816454  0
    "   51  0

It seems odd that I wouldn't have an unprivileged .viminfo but I did sudo udpatedb and locate .viminfo and still didn't surface more than the one root-owned file.


3 Answers 3


One key that I frequently fat-finger by mistake is CtrlS; that stops all terminal output until a CtrlQ is typed.

That's the XON/XOFF control-flow, which is enabled by default, and ^S and ^Q are the default VSTART and VSTOP keys respectively -- see the stty(1) and termios(3) manpages.

You can disable it with:

stty -ixon

vim will not reenable it as part of its changing the terminal settings.

  • @user313992: Thank you very much for this answer. This issue was very disruptive for me recently.
    – TFuto
    Sep 24 at 23:10

vim is frozen; vim version 81 on KNOPPIX 8.6;

it happens very often, and I have found the reason for my case;

Even if I do not forget to make the change in options to "noincsearch" vim begins to search and is busy for 10 to 20 hours. Because the file, I am editing is very large.

This may be caused by a typo or by a "normal" search backwards for a seldom text.

The problem is, that in this state vim is not interruptible.

CTRL-C does not work. No other key sequence or mouse event can stop vim.

And no command I am sending to vim or to the shell bash by "writevt" has an effect.

At least vim should be responsible to a SIGNAL, e.g. USR1. But Vim does not react.

In addition it is bad that vim does not show in any way that vim is busy and that it is e.g. searching.

The utilities of the operatin system only show that process is running. I can send the signals SIGSTOP and SIGCONT. But these do not help.

Best regards [email protected]


If you have CoC installed, try waiting a couple minutes.

I've been having occasional Vim freezes. While searching for an answer just now, it unfroze itself and a CoC error popped up.

I'll update this post with more details once (or if) I get to the actual root of the problem, but for now, just wait for a couple minutes before you nuke your session.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .