Code Monkey home page Code Monkey logo

vim-highlight-hero's Introduction

vim-highlight-hero

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!, ...

Highlight-Hero Screenshot

Installation

Pathogen
  1. In the terminal,
    git clone https://github.com/borisbrodski/vim-highlight-hero ~/.vim/bundle/vim-highlight-hero
  2. In vimrc,
    call pathogen#infect()
    syntax on
    filetype plugin indent on
  3. Restart Vim, and run :helptags ~/.vim/bundle/vim-highlight-hero/doc/ or :Helptags.
Vundle
  1. Add the following text to your vimrc.
    call vundle#begin()
      Plugin 'borisbrodski/vim-highlight-hero'
    call vundle#end()
  2. Restart Vim, and run the :PluginInstall statement to install your plugins.
Vim-Plug
  1. Add the following text to your vimrc.
call plug#begin()
  Plug 'borisbrodski/vim-highlight-hero'
call plug#end()
  1. Restart Vim, and run the :PlugInstall statement to install your plugins.
Dein
  1. Add the following text to your vimrc.
    call dein#begin()
      call dein#add('borisbrodski/vim-highlight-hero')
    call dein#end()
  2. 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

Getting started

" 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!

Documentation

" Open comprehensive docs
:help highlight-hero 

Frequently Asked Questions

Why are the default colors so weird?

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!

  1. Call :HHprint to see all the colors
  2. Go to the bottom of plugin/highlighter.vim
  3. Enter your color values for both dark and light modes
  4. 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.

License

Copyright (c) Boris Brodski. Distributed under the same terms as Vim itself. See :help license.

vim-highlight-hero's People

Contributors

borisbrodski avatar

Watchers

 avatar James Cloos avatar

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.