https://github.com/tmke8/vim-matchcounter
Display labels to jump to search results
https://github.com/tmke8/vim-matchcounter
nvim vim
Last synced: about 2 months ago
JSON representation
Display labels to jump to search results
- Host: GitHub
- URL: https://github.com/tmke8/vim-matchcounter
- Owner: tmke8
- License: mit
- Created: 2021-03-29T16:16:43.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-13T13:02:16.000Z (about 5 years ago)
- Last Synced: 2025-06-09T16:46:58.537Z (about 1 year ago)
- Topics: nvim, vim
- Language: Vim script
- Homepage:
- Size: 43.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
matchcounter.vim
================
When searching in vim with `/` or `?` you can jump to matches with `n`
where `` 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.

Usage
-----
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.
Install
-------
- [vim-plug](https://github.com/junegunn/vim-plug)
- `Plug 'thomkeh/vim-matchcounter', { 'branch': 'main' }`
- [Pathogen](https://github.com/tpope/vim-pathogen)
- `git clone git://github.com/thomkeh/vim-matchcounter.git ~/.vim/bundle/vim-sneak`
- Manual installation:
- Copy the files to your `.vim` directory.
Customization
-------------
The only thing that can be customized is the background color
of the counter labels (magenta by default).
See the help for details.
Related
-------
* [Sneak](http://github.com/justinmk/vim-sneak)
* [Seek](https://github.com/goldfeld/vim-seek)
* [EasyMotion](https://github.com/Lokaltog/vim-easymotion)
* [incsearch-easymotion](https://github.com/haya14busa/incsearch-easymotion.vim)
* [smalls](https://github.com/t9md/vim-smalls)
* [improvedft](https://github.com/chrisbra/improvedft)
* [clever-f](https://github.com/rhysd/clever-f.vim)
* [vim-extended-ft](https://github.com/svermeulen/vim-extended-ft)
* [Fanf,ingTastic;](https://github.com/dahu/vim-fanfingtastic)
License
-------
Distributed under the MIT license.