Ⅰ. 插件描述
HiCursorWords : Highlights words under the cursor.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ihacklog/hicursorwords'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ihacklog/hicursorwords'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ihacklog/hicursorwords'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ihacklog/hicursorwords
Ⅳ. 文档说明
# HiCursorWords MOD #
About
This script highlights words under the cursor like many IDEs.
This doesn't provide scope-aware highlighting nor language specific one.
You can control highlighting by highlighting group names.
this is forked from #4306 by Shuhei Kubota and made a little change by
荒野无灯
HiCursorWords : Highlights words under the cursor.
没错,这就是你要找的vim 高亮与当前光标下单词相同的所有单词 的功能。
the original plugin set highlight group to Underline,I changed it to MatchParen
Configuration
highlight group:
hicursorwords.vim line 49:
highlight! link WordUnderTheCursor MatchParen
You can change it to what you want.
default config:
let g:HiCursorWords_delay = 200
let g:HiCursorWords_hiGroupRegexp = ''
let g:HiCursorWords_debugEchoHiName = 0
Variables explanation:
(A right hand side value is a default value.)
g:HiCursorWords_delay = 200
A delay for highlighting in milliseconds.
Smaller value may cause your machine slow down.
g:HiCursorWords_hiGroupRegexp = ''If empty, all words are highlighted.
If not empty, only the specified highlight group is highlighted.
(my memo: 'Identifier|vimOperParen')
To investigate highlight group name, the next variable may help you.
g:HiCursorWords_debugEchoHiName = 0If not 0, echoes the highlight group name under the cursor.
Installation details
Just put this file into the plugin directory.
That's all. Have fun /*_*/