13

I really don't care about any of the "value" that viminfo or its replacement in neovim, ShaDa, provide. I couldn't care less about whether or not my cursor is in the exact place I left it when I open a file or whether my registers are restored, but I am very tired of seeing seemingly random ShaDa-related errors. Is there a way that I can just turn off shared data? :help shada has not been very helpful in this endeavor.

Floegipoky
  • 457
  • 5
  • 13

3 Answers3

16

set shada="NONE" will prevent shada files from being generated or read in Neovim.

For vim, set viminfo="NONE" will disable viminfo files.

euclio
  • 276
  • 2
  • 3
6

According to the neovim docs, if you invoke neovim with -i NONE, it will ignore the ShaDa file.

Insert the following into your bashrc:

alias nvim='nvim -i NONE'
Floegipoky
  • 457
  • 5
  • 13
  • I expected -u NONE to ignore all local config, including shada, but it doesn't; you have to use -u NONE -i NONE (or --clean to disable both vimrc and shada). Was driving me nuts when neovim hung for 10 seconds on :q because shada was trying to access files on an ephemeral mounted filesystem. – Jim Stewart Sep 11 '20 at 15:52
3

For those looking for the same answer but in Lua. You can set in your init.lua file:

vim.opt.shadafile = "NONE"
Sofa44
  • 31
  • 1