There is a cool vim script: http://vim.wikia.com/wiki/Highlight_multiple_words

I found the script today. This script is what I want exactly.

It works well with gvim 7.2. (Both of Windows and Linux)
But I wish I can use it on linux shell too. Unfortunately it doesn't work.

Is it possible? Or is there another script we can use.


  • I've found the alternative script. vim.org/scripts/script.php?script_id=479
    – Benjamin
    Jun 1, 2010 at 7:29
  • Oops, I found another script. I think this is better one. vim.org/scripts/script.php?script_id=1238
    – Benjamin
    Jun 1, 2010 at 8:50
  • @Benjamin: where do you put your downloaded scripts?
    – akira
    Jun 1, 2010 at 11:03
  • @akira Linux, ~/.vim/plugin. Windows, C:\Program Files\Vim\vimfiles\plugin
    – Benjamin
    Jun 1, 2010 at 15:09
  • @Benjamin: If you found something that answers your question, you can post it as an answer and accept it so others will have an easier time if they have this same issue.
    – Wuffers
    Jan 25, 2011 at 2:46

3 Answers 3


I found the script.

You can download the script at here.

Just \m on the word you want to highlight.
You could select visual block then \m
And you could add more colors.

enter image description here


If you are fine with multiple words being highlighted in the same color, simply go to search mode (type / in normal mode) and search words that are separated by \|


You can use n and N to navigate as usual.


put the plugins under %USERPROFILE%\vimfiles. maybe put the unixish .vimrc to %USERPROFILE%\_vimrc.

  • Is the path important? I can't understand why do you recommend the path. Please explain more about that.
    – Benjamin
    Jun 2, 2010 at 13:31
  • "Linux, ~/.vim/plugin. Windows, C:\Program Files\Vim\vimfiles\plugin" ... the path i mentioned is the windows equivalent for the linux one. on linux you put the files in your home, on windows you work on the global folders? bad bad bad behavior.
    – akira
    Oct 3, 2010 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.