Closed TSFoster closed 6 years ago
Hi,
I am aware of this and I believe this is more of a 'vim' limitation since the exrc
option triggers only during vim startup, switching sessions isn't exactly that and so it doesn't get sourced. I could potentially do this but not sure if it would be entirely safe.
I guess there would be no way to "un-read" a local .vimrc, so switching out of a project keeps the custom .vimrc config?
Thanks for the help!
Yeap that is also true
What can be done is perhaps add custom autocmds for before & after session swap. Those can then be used for executing custom logic such as this, for eg.) you could source a .vimrc.leave before switch from the previous directory and a .vimrc.enter file when you enter a directory (session).
Good idea!
I think there is a relevant event (DirChanged) in Neovim, and possibly in newer versions of vim
I'll close this issue for now, try making use of these custom events perhaps for your use case. If you face any issues reopen this issue and i'll take a look at it.
The last commit was referenced to this issue incorrectly.
Hi,
I have
set exrc
in~/.vimrc
. When I switch session via:Prosession /path/to/dir
,/path/to/dir/.[n]vimrc
doesn't seem to be executed. Am I right in thinking that? Is it possible to have that happen, or would it lead to problems?Thanks,
Toby
Neovim v0.2.2 macOS 10.13.3