Unlocking Your Vim Screen

Author: Sam Griffith

We have all been there. We go to save our script in vim, then all of a sudden we have a terminal that has become unresponsive.

Trying to press Esc :q Enter to exit fails.

Trying to force exit by pressing Esc :q! Enter fails.

Trying to press i to INSERT fails.

Then we remember, we were just trying to save our script. And what we did was what we have learned to do in any “sensical” program.

We hit the dreaded Ctrl s.

This automatically freezes the screen for you. It must be helpful for somebody… just not you or I when using vim.

There is a purpose to it though. When you want to stall the output of some command, hit Ctrl s. I’ve personally found this to be very useful for pausing the output of a tail -f /var/log/syslog command.

The Fix

Thankfully, the fix for this is just as easy.

Just press Ctrl q, and you are back on your way to writing excellent code!