11

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?

16
+50

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).

  • 4
    (Under linux/unix) You can make this less of a mouthful by aliasing it (eg in your bash profile) ... alias virvim="vim -u NONE -U NONE -N -i NONE" then you can just use virvim from then on :) – Wossname Feb 17 '16 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.