When searching in vim with /
or ?
you can jump to matches with <number>n
where <number>
is for example 3
or 42
. (So, 3n
will jump to the 3rd match.)
The problem with that is that you have to know the right number for the match your interested in.
And this is what matchcounter.vim
solves.
If a search performed with /
or ?
finds more than 1 match in the visible area,
then this plugin displays a counter for each match,
so that you know which number to type to jump there.
If you don't type a number, then the counter disappears immediately.
Just search something with /
, and if there are multiple matches visible in your window,
labels will appear that allow you to jump directly to any of the matches.
This plugin does not change any mappings.
It uses the CmdlineLeave
autocommand to know when a search happened,
and merely displays some labels for a while.
- vim-plug
Plug 'thomkeh/vim-matchcounter', { 'branch': 'main' }
- Pathogen
git clone git://github.com/thomkeh/vim-matchcounter.git ~/.vim/bundle/vim-sneak
- Manual installation:
- Copy the files to your
.vim
directory.
- Copy the files to your
The only thing that can be customized is the background color of the counter labels (magenta by default). See the help for details.
- Sneak
- Seek
- EasyMotion
- incsearch-easymotion
- smalls
- improvedft
- clever-f
- vim-extended-ft
- Fanf,ingTastic;
Distributed under the MIT license.