‹ BackHN Continuity

Thread

On caring for user data: NeoVim caused Vim undo files to be deleted

384 points · 346 comments · jandeboevrie

  1. RVuRnvbM2e · · focus · HN ↗
    Undo files and persistent undo are not meant to work that way. They are just persistent across process restarts. That's all.

    They live in ~/.cache which is defined as "user-specific non-essential (cached) data".

    Despite this user's impressive résumé, they simply misunderstood the feature.

    1. jorams · · focus · HN ↗
      Unless something changed very recently neither vim nor neovim defaults to storing persistent undo files in ~/.cache. It's application state, not cached data.

      The undodir option in vim defaults to the directory of the file, and in neovim it defaults to ~/.local/state/nvim/undo/.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.