Ⅰ. 插件描述
Change the way K interacts with the current keyword.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'rglassett/vim-keyword'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'rglassett/vim-keyword'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'rglassett/vim-keyword'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/rglassett/vim-keyword
Ⅳ. 文档说明
# Keyword.vim
Keyword.vim aims to improve Vim's built-in K command. It acts the
same way by default, but it comes with a few handy configuration options.
Vim's native K mapping simply passes the current keyword as an
argument to the command specified by the keywordprg option, and only supports
shell commands and Vim's internal help.
By contrast, Keyword.vim supports both editor and shell commands, and keywords
may be interpolated anywhere in a command:
let g:keyword_command = 'silent grep {keyword} | cwindow | redraw!'
You can set a buffer-local keyword command through autocommands or ftplugins:
" ~/.vim/ftplugin/vim.vim
let b:keyword_command = 'help {keyword}'
Keyword maps itself to K in Normal and Visual modes by default, but
you're welcome to ignore those mappings and make your own:
let g:keyword_skip_mappings = 1
nmap <Leader>k <Plug>KeywordNormal
xmap <Leader>k <Plug>KeywordVisual