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.

0

3 Answers 3

15

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

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

1
  • Surely those double quotes are wrong?
    – D. Ben Knoble
    Sep 1 at 1:12
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'
1
  • 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
3

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

vim.opt.shadafile = "NONE"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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