undofile_warn.vim : Warn when using the undofile.
script karma |
Rating 1/1,
Downloaded by 743 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Martin Tournoij |
|
script type |
utility |
|
description |
Homepage: http://arp242.net/code/undofile_warn.vim
-----------------------------------------
Introduction
============
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
year ago.
So what would happen is that sometimes I would accidentally undo changes from
ages ago.
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:
http://vi.stackexchange.com/q/2115/51
Mappings
========
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.
Options
=======
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 |
|
install details |
|
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 18.97.14.80
|