I'm using vim (actually, neovim) on macOS and whenever I run a command which outputs text (e.g. :version) and switch to another Desktop (so iTerm looses focus) and get back to it, the output window/pane is gone.

How can I stop it from automatically closing, even when the Press ENTER or type command to continue is shown? (which is actually a lie, as it continues without me pressing ENTER or typing a command)

  • 1
    probably a FocusLost/FocusGaines autocommand that closes the message Commented Dec 30, 2016 at 12:43

1 Answer 1


It's a known Neovim bug: Focus events make messages disappear (as if Enter was pressed).

The workaround is either using Vim (which doesn't have this bug) or using a terminal emulator which doesn't send focus events (or disable sending focus events for your terminal emulator, if possible).

  • 1
    Any idea if I can disable focus events sending in iTerm? Commented Jan 4, 2017 at 6:34
  • This seems to be fixed now. Commented Mar 6, 2020 at 9:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.