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.
3 Answers
set shada="NONE"
will prevent shada files from being generated or read in Neovim.
For vim, set viminfo="NONE"
will disable viminfo files.
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'
-
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. Sep 11, 2020 at 15:52
For those looking for the same answer but in Lua. You can set in your init.lua file:
vim.opt.shadafile = "NONE"