Vim probably did this by default, whenever I invoke files from a project that has its own .vimrcs it's auto-sourced. Neovim, however, doesn't import vimrcs. How can I make Neovim scan and use project-specific configuration files?

1 Answer 1


Vim doesn't do that by default, you probably had set exrc in your .vimrc, see :h 'exrc'.

As the doc says if you add set exrc to your vimrc you also probably want to add set secure (:h 'secure').

Both of these options are also available in neovim.

You may also want to have a look at this Luc Hermitte's plugin which also allows to enable local configurations files with more options.

  • Thanks for the advice! Does Neovim recognise all the original vimrcs, or do I have to change the file name?
    – Paul Kim
    Mar 13, 2019 at 15:22
  • Well their doc (:h 'exrc') says Enables the reading of .vimrc and .exrc in the current directory. so I would say that either they read .vimrc and .exrc files or they forgot to update the doc (but I doubt it is the case)
    – statox
    Mar 13, 2019 at 15:50
  • 1
    I'll make sure to try both. Thanks!
    – Paul Kim
    Mar 13, 2019 at 15:54
  • 2
    If I'm not mistaken, exrc was deprecated in Neovim shortly after this answer was published. github.com/neovim/neovim/issues/5784 Apr 8, 2020 at 19:29
  • Setting exrc no longer supports execution of .vimrc, you've got to use a file named .nvim.lua, .nvimrc, or .exrc (as described by the current :h 'exrc')
    – beyarkay
    Dec 4, 2023 at 8:04

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.