2

Is it possible for Neovim to understand vanilla Vim's undo (*~ & .*.un~) files?

Even if I have vim.opt.undodir = vim.fn.expand("~/.config/nvim/undo") set in ~/.config/nvim/init.lua?

1
  • 1
    Note that undo files are invalidated when the original file is modified outside of Vim, see :help undo-persistence. An external formatting tool will break undo persistence. While this is without doubt a highly useful feature, I'd not rely too much on it. They're notably not a replacement for a proper VCS. Commented Apr 17 at 20:17

1 Answer 1

3

Unfortunately the undo file format is not the same for Vim and Neovim since Neovim 0.4.4. See the following commit of 3rd of March 2021.

In consequence you can't simply copy your Vim undo files of Vim to the Neovim undo file folder and expect that Neovim will use them.

Conclusion: If you switch to Neovim you'll lose your Vim undo files.

2
  • 1
    Are there ways to convert Vim to Neovim undo files? Commented Apr 17 at 18:18
  • 2
    I believe that nobody did the effort. Commented Apr 17 at 20:16

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.