5

I'm trying to disable viminfo completely, I tried to add something in the ~/.vimrc,

I tried 3 different methods, none of them works

set viminfo='0,:0,<0,@0,f0,n~/.viminfo
set viminfo=
set viminfo="None"

Any ideas? I just don't want viminfo to record what files was edited before

The vim version is:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 10 2016 23:06:12)
MacOS X (unix) version
Included patches: 1-130
Compiled by Homebrew
  • set viminfo= should do it. – Satō Katsura Dec 11 '16 at 6:33
  • @SatoKatsura Hmm, does not work for me .. – daisy Dec 11 '16 at 6:37
  • Now, that is an useful description of a problem. :) – Satō Katsura Dec 11 '16 at 6:57
  • Could you please accept one of these answers, if possible? – Herpes Free Engineer Apr 1 '18 at 19:26
7

Try invoking Vim with

$ vim -i NONE

From :help -i:

-i {viminfo}    The file "viminfo" is used instead of the default viminfo
                file.  If the name "NONE" is used (all uppercase), no viminfo
                file is read or written, even if 'viminfo' is set or when
                ":rv" or ":wv" are used.
  • This along with set clipboard=exclude:.* made it run faster. Thank you. – W.M. Oct 18 '17 at 6:34
5

Hope it ain't too late, but I think I figured out how to disable this.

Seems that Vim 8 is enabling the viminfo feature by default (maybe another features are enabled by default that were disabled on previous versions of Vim). So you need to put in your ~/.vimrc or the new /etc/vim/vimrc.local file (if you want to set this as global - you'll need to create that file if you don't have one) the following:

let skip_defaults_vim=1
set viminfo=""

The skip_defaults_vim tells Vim not to load the default Vim configuration file, defaults.vim (for example, located on my Gentoo box at /usr/share/vim/vim80/defaults.vim).

Hope this works on your Mac, as that was driving me insane.

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.