I want one vimrc to work with both Vim and NeoVim. The vimrc of Vim seems to work well with NeoVim. But not the other way around, given that there are many special new settings in NeoVim, e.g., terminal mode.

I want not to manage two individual vimrc files needed to be sync'd periodically.

Is there a way within .vimrc to let some statements work with NeoVim alone?


1 Answer 1


From NeoVim's Github issue tracker, you can use has('nvim'):

if has('nvim')
   "something for neovim
  • 3
    Or !has for plain vim (for those who aren't fluent in VimL)
    – Tom Hale
    Commented May 22, 2018 at 7:50

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