VimPlugin: vim-localvimrc

From wikinotes

project-specific vimrc files.

  • all directories in the current CWD are checked for a .lvimrc file to load
  • they are loaded in order of rootmost-CWD
  • you are asked for confirmation before loading, allowlists can be created

Documentation

github https://github.com/embear/vim-localvimrc

Configuration

" allowlist directories so they do not re-confirm each time
let g:localvimrc_whitelist=[
    '/home/user/project1/',
    '/opt/project2/',
    '/usr/local/projects/vim-[^/]*/'
]

" disable sandboxing (if you need to use functions, autocmd, etc..)
let g:localvimrc_sandbox = 0