Giter VIP home page Giter VIP logo

vim-matchcounter's Introduction

matchcounter.vim

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.

example

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
    • 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.

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

License

Distributed under the MIT license.

vim-matchcounter's People

Contributors

tmke8 avatar

Watchers

James Cloos avatar  avatar

vim-matchcounter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.