I recently started a transition from vim to neovim and one of the things that I noticed that changed is that typing :! doesn't do anything in neovim but in vim it displays the content of the terminal before vim was launched.

Turn out that I use this feature quiet often. does anyone know how can I get the same result in neovim ?

  • 1
    I think you need to use Ctrl-Z and fg commands. By default, in my case, Vim doesn't show background terminal with :!, it just shows the output of the command I used after the bang. But I think I know what you issue is. I guess you could understand what is going on if you try to do :!w !sudo tee > /dev/null % which will not work in Neovim because neovim doesn't actually have a valid tty terminal behind it. There are reasons for doing that, see here. I don't think you can get back what you want. But there is :term buffer for most use case – klaus May 5 at 13:31
  • if you depend on :! to have Vim switch the alternate screen, I suggest to stay with Vim. – Christian Brabandt May 6 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.