The highlight-hero highlights multiple words and visual selections. On the fly and statically. It is particularly useful for
- spotting typos
- finding variable usages
- resolving merge conflicts (see
:help highlight-hero-merge-conflicts
)
Quick start >> :HHauto
or :HH
, :1HH!
, ...
Pathogen
- In the terminal,
git clone https://github.com/borisbrodski/vim-highlight-hero ~/.vim/bundle/vim-highlight-hero
- In
vimrc
,call pathogen#infect() syntax on filetype plugin indent on
- Restart Vim, and run
:helptags ~/.vim/bundle/vim-highlight-hero/doc/
or:Helptags
.
Vundle
- Add the following text to your
vimrc
.call vundle#begin() Plugin 'borisbrodski/vim-highlight-hero' call vundle#end()
- Restart Vim, and run the
:PluginInstall
statement to install your plugins.
Vim-Plug
- Add the following text to your
vimrc
.
call plug#begin()
Plug 'borisbrodski/vim-highlight-hero'
call plug#end()
- Restart Vim, and run the
:PlugInstall
statement to install your plugins.
Dein
- Add the following text to your
vimrc
.call dein#begin() call dein#add('borisbrodski/vim-highlight-hero') call dein#end()
- Restart Vim, and run the
:call dein#install()
statement to install your plugins.
Vim 8+ packages
From Vim 8+ you can use its own built-in package management. See :help packages
for details.
Execute the following in your console:
git clone https://github.com/borisbrodski/vim-highlight-hero ~/.vim/pack/vendor/start/vim-highlight-hero
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/vim-highlight-hero/doc" -c q
" Turn on auto-highlighing! (Navigate around to see the impact)
:HHauto
" Highlight current word with color 0
:HH
" Highlight another word with color 1
:1HH
" Highlight "String args" color 2
:2HH String args
" Turn all highlights OFF
:HHoff!
" Open comprehensive docs
:help highlight-hero
Well, getting decent foreground and background colors is the most challenging part. The foreground and the background colors should work well for
- different color schemes
- different terminals & UIs
- for color-blind people
Please, help me with it and contribute your colors!
- Call
:HHprint
to see all the colors - Go to the bottom of
plugin/highlighter.vim
- Enter your color values for both dark and light modes
- Create a push request.
Defining colors in the plugin/highlighter.vim
:
call s:add_highlight('highlight HighlightHeroCurrent <<<DARK>>>',
\ 'highlight HighlightHeroCurrent <<<LIGHT>>>')
TODO: Support different color configurations and providing simple commands to change individual colors.
Copyright (c) Boris Brodski.
Distributed under the same terms as Vim itself.
See :help license
.