Managing project-specific settings for Vim/Neovim projects.
I talked about managing multiple databases and projects in my previous articles. On some occasions, you may have a need to manage multiple projects with configurations only specific to the projects.
In this article, let’s explore the available options we have in Vim/Neovim. I will start with the simplest solution and then move on to explore plugins we can use.
Vim/Neovim — Managing Databases
Managing databases and run SQL statements, all within Vim/Neovim.
Vim/Neovim — Managing Multiple Projects
Managing multiple projects from Vim/Neovim.
exrc, vimrc, nvimrc
If you set the
exrc option in your
init.vim file, Vim/Neovim will execute
.exrc (for both Vim/Neovim),
.nvimrc (Neovim) found in the current directory when Vim/Neovim is started.
For security reasons, you may also want to set the
secure option together (refer to
set secure exrc
secure is on,
write commands are not allowed in
.exrc in the current directory and map commands are displayed.
From the documentation for the
When on, “:autocmd”, shell and write commands are not allowed in
“.nvimrc” and “.exrc” in the current directory and map commands are
displayed. Switch it off only if you know that you will not run into
problems, or when the ‘exrc’ option is off. On Unix this option is
only used if the “.nvimrc” or “.exrc” is not owned by you. This can be
dangerous if the systems allows users to do a “chown”. You better set
‘secure’ at the end of your |init.vim| then.
This option cannot be set from a |modeline| or in the |sandbox|, for