Ⅰ. 插件描述
Warn when using the undofileⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'carpetsmoker/undofile-warn-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'carpetsmoker/undofile-warn-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'carpetsmoker/undofile-warn-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/carpetsmoker/undofile_warn.vim
Ⅳ. 文档说明
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 Stack Exchange,
which also has some other solutions to the same problem.
See :help undofile-warn for the full documentation.