undofile_warn.vim : Warn when using the undofile.
| script karma
Downloaded by 620
Comments, bugs, improvements
script versions (upload new version)
The 'undofile' is a great feature, and I use it a lot. However, one annoyance
is that it's very easy to accidentally undo changes that I did the last time I
opened the file; which may be 2 minutes ago, an hour ago, last week, or a
So what would happen is that sometimes I would accidentally undo changes from
This plugin fixes that by showing a warning.
I originally posted this as an answer on vi StackExchange, which also has some
other solutions to the same problem:
This plugin overwrites the `u` and `CTRL-R` mappings:
nmap u <Plug>(undofile-warn-undo)
nmap <C-r> <Plug>(undofile-warn-redo)
You can prevent this by setting `g:undofile_warn_no_map` to 1.
g:undofile_warn_mode (Boolean, default: 1)
0 Show a warning for a second but don't actually change behaviour.
1 Show a warning and do nothing on the first u press, confirm with pressing u again.
2 Ask for explicit confirmation
Click on the package to download.
ip used for rating: 22.214.171.124