I am trying to execute some custom settings based on the directory on startup. For this I am trying:
autocmd VimEnter /path/to/dir/* :source /custom.vim
When I now execute:
cd /path/to/dir
vim
I would expect the config to have been loaded. This does not seem to work. However, this works:
autocmd VimEnter * :source /custom.vim
Is there a way to load a config once on startup based on the directory that vim was started in?
Note: I am aware of Applying settings to a directory tree only but would prefer to make it work this way.