Sometimes, I would like to try a trick I find in the internet. It is often helpful to try this in vim (gvim if it is a gui trick), in virgin mode, i.e., without loading all my ~/.vimrc stuff.
Do you have any tips for doing this efficiently?
Vi and Vim Stack Exchange is a question and answer site for people using the vi and Vim families of text editors. It only takes a minute to sign up.
Sign up to join this communitySometimes, I would like to try a trick I find in the internet. It is often helpful to try this in vim (gvim if it is a gui trick), in virgin mode, i.e., without loading all my ~/.vimrc stuff.
Do you have any tips for doing this efficiently?
From Vim FAQ 2.5:
vim -u NONE -U NONE -N -i NONE
This starts Vim in nocompatible mode (-N), without reading your viminfo file (-i NONE), without reading any configuration file (-u NONE for not reading .vimrc file and -U NONE for not reading a .gvimrc file) or even plugin.
After opening Vim/gVim you can use :source <path>
to load a test vimrc or plugin.
You could also use -u NORC
to skip only the vimrc but load the plugins (more details at :help -u
).