Ⅰ. 插件描述
Save vim undo files as /path/to/file instead of %path%to%file.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'pixelastic/vim-undodir-tree'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'pixelastic/vim-undodir-tree'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'pixelastic/vim-undodir-tree'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/pixelastic/vim-undodir-tree
Ⅳ. 文档说明
# vim-undodir-tree
The main goal of this plugin is to avoid the E828 error one can get in vim
when trying to save a file with a very long file path and undofile enabled.
As vim saves undo files in undodir with a name equal to the original
filepath, with all / replaced with %, one can hit the OS maximum length for
- If this happens, vim won't be able to save the undo file and will throw
E828error.
What does this plugin do ?
Well, instead of saving undo files as %original%path%of%the%file, it will
create the original/path/of/the/ folder structure inside of undodir, and
save the undo file in it.
This way, we avoid the length limit on filenames, and as an added bonus it
makes pruning the undo folder much more easier.
Installation
Just use pathogen.
Notes
You still need to enable set undofile for the plugin to kick in.