1

Vim has a ~/.vim/view/ directory for storing file-specific settings, such as saved cursor position and any command manually ran while viewing a file. Sometime, when I would update and source my vimrc, my changes would be overwritten by the "cached" settings in view/, so it was necessary to delete the view file before my new vimrc could be sourced correctly in certain cases.

Where are the analogous view/ settings for neovim?

I removed a plugin from my init.vim, but the plugin is still loaded when I open project files. If I create and open a new file, my init.vim is sourced correctly. Thus, neovim must be caching old settings somewhere. How can I clear this cache?

Thank you in advance.

(FYI: I've been using vim for 4 years and switched to neovim about a month ago)

2
  • Note that is "overriding" behavior should only happen if you have an autocommand that does :loadview, which I advise against for this reason :) sessions are better, IMO. Then there's also viminfo, which in neovim is called the shada file I think
    – D. Ben Knoble
    Jan 12 at 14:50
  • I agree with your opinion completely. My problem was troublesome because I do not use loadview. The accepted answer by Matt is correct, but it turns out that my problem was not related to viewdir after all. I discovered a coc plugin (which I forgot I had) that was interfering with my other plugin. Removed the coc plugin and problem solved.
    – Eli
    Jan 12 at 15:07

1 Answer 1

2

See :h 'viewdir' and :set viewdir? This is the same option for both Vim and Neovim, but Neovim has different default settings.

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.