Ⅰ. 插件描述
⚙ Vim Plugin - Temporary keyword highlightingⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'flatcap/vim-keyword-it-has-you'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'flatcap/vim-keyword-it-has-you'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'flatcap/vim-keyword-it-has-you'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/flatcap/vim-keyword
Ⅳ. 文档说明
# keyword.vim
Temporary keyword highlighting
With this plugin you can temporarily highlight any words you like.
The words are defined by the 'iskeyword' variable.
The highlights are buffer-local, i.e. different for each file.
After highlighting, the search pattern is set to the work, so you can skip
between matches with 'n' or 'N'.
Mapping
To enable the plugin, simply create a mapping in your '.vimrc'
e.g.
map <F3> <plug>KeywordToggleConfiguration
Two global variables control the syntax highlight group and the colour.
let g:keyword_group = 'keyword_group'
let g:keyword_highlight = 'ctermbg=blue'List
The list of keywords is kept in the variable "b:keyword_list".
You can display the list by typing either:
:call keyword#KeywordList()
echo b:keyword_listFunctions
The plugin exports five autoload functions (their names are self-explanatory).
You can call them directly from a script.
call keyword#KeywordClear()
call keyword#KeywordAdd ('my_keyword')
call keyword#KeywordRemove ('my_keyword')
call keyword#KeywordToggle ('my_keyword')
call keyword#KeywordList()License
Copyright © Richard Russon (flatcap).
Distributed under the GPLv3 http://fsf.org/