Ⅰ. 插件描述
Fix file paths from git diff output to DoTheRightThing(tm)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'alikins/fix-git-diff-path-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'alikins/fix-git-diff-path-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'alikins/fix-git-diff-path-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/alikins/vim-fix-git-diff-path
Ⅳ. 文档说明
vim-fix-git-diff-path v 37.4.0
Adrian Likins <adrian@likins.com>
git diff includes a "a/path/to/file" in git diff
- This is a pain, if you want to cut and
- that path. This tries to let you just
c&p that entire prefixed path and do the
right thing. Ie, open the file referenced.
It should work anywhere in the git project
of the current working dir. It's mostly
intended for use from the command line but
in theory, any file loading command should work
we well.
bugs: - doesn't work if you are out of the git project
directory.
- probably confused if you have an actual file
name something like a/path/to/file
this is based heavily on file_line.vim form
https://github.com/bogado/file-line