Created
June 21, 2022 09:11
-
-
Save ajitid/382304f8cc000ce4ebec1c0007410196 to your computer and use it in GitHub Desktop.
Persistent undo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has("persistent_undo") | |
let target_path = stdpath('data') . '/.undodir' | |
" create the directory and any parent directories | |
" if the location does not exist. | |
if !isdirectory(target_path) | |
call mkdir(target_path, "p", 0700) | |
endif | |
let &undodir=target_path | |
set undofile | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment