Skip to content
Discussion options

You must be logged in to vote

The divergence comes from one sentence Nvim added to 'undodir' that Vim doesn't have. Compare the two docs:

Nvim (:h 'undodir'):

When writing: The first directory that exists is used. "." always works, no directories after "." will be used for writing. If none of the directories exist Nvim will attempt to create the last directory in the list.

Vim (:h 'undodir') stops at "...will be used for writing." with no auto-create.

The reason it exists is tied to the changed default. Vim's default 'undodir' is ., so an undo file only ever lands next to the file you edit. Nvim's default is $XDG_STATE_HOME/nvim/undo// (a single dir that won't exist on a fresh install), so without auto-creation set …

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@nyngwang
Comment options

Comment options

You must be logged in to vote
5 replies
@nyngwang
Comment options

@ELHart05
Comment options

@justinmk
Comment options

@nyngwang
Comment options

@nyngwang
Comment options

Answer selected by justinmk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
security security or privacy implications defaults Nvim defaults for options, colorscheme/theme, autocmds/events, etc. options configuration, settings workspace-project workspace/project concept, 'exrc', :trust, CWD
3 participants