:help starting, we can specify a specific vimrc file using the following command
$ vim -u /path/to/vimrc
How can I access the path of that vimrc/init.vim file in vim/neovim?
I have tried the following.
expand('%:p') " returns different path based on opened file stdpath('config') " returns default vimrc or init.vim path $MYVIMRC " it is not set when using -u switch