Ⅰ. 插件描述
Integration between Vim and the graphical file browser on your systemⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'erichdongubler/vim-file-browser-integration'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'erichdongubler/vim-file-browser-integration'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'erichdongubler/vim-file-browser-integration'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/erichdongubler/vim-file-browser-integration
Ⅳ. 文档说明
# vim-file-browser-integration
This plugin integrates Vim with your graphical file browser by providing commands and functions to open and select files in your graphical file browser.
Installation
My favorite way is with VimPlug:
Plug 'ErichDonGubler/vim-file-browser-integration'Usage
Quick demo GIF:

End-users of this particular plugin will probably be interested in these convenience :commands:
:SelectCurrentFile: shows the current buffer in your file browser:OpenCWD: shows the current working directory in your file browser:OpenCurrentBuffer: opens the current buffer using your file browser
For plugin/library writers, several useful functions are provided out of the box:
file_browser_integration#OpenFile: opens a filepath, similar to a double-click in your file browser application.file_browser_integration#SelectFile: opens your file browser to the location of the filepath given, with the file itself selected.
No bindings to these commands are provided by default. I'd recommend something like:
nnoremap <Leader>e :SelectCurrentFile<CR>
nnoremap <Leader>x :OpenCurrentFile<CR>
nnoremap <Leader>E :OpenCWD<CR>Configuration
TODO.
However, if you actually DO need to change the configuration in order to use this plugin, realize that you should probably submit a bug! :) The entire point of this plugin/library is to encapsulate file opening and selection in a cross-platform way.