Dup Ver Goto 📝

Vim's Runtime Path

PT2/editor/vim vim path does not exist
To
21 lines, 136 words, 810 chars Page 'RuntimePath' does not exist.

You can tell vim to use an alternative .vimrc via

vim -u newvimrc

But this still has the ordinary runtime path. To prepend a new runtime path, use

set rtp^=~/another.vim

To source a file from within the runtime path, use

runtime myfile.vim

and if this myfile.vim is in the another.vim you prepended to your runtime path, it will load it. If it fails to find it here, it will search the rest of your runtime path. You can set the VIMRUNTIME path as well. But if the new VIMRUNTIME path doesn't contain standard .vim files that the systemwide vimrc files point to, bad things will happen.

With Neovim, you can use the $NVIM_APPNAME environment variable to tell it which subdirectory under ~/.config to use as its config (default is ~/.config/nvim.