Vim Tips Wiki


1,624pages on
this wiki
Add New Page

Use this page to discuss script 2666 mark: highlight several words in different colors

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.


I have installed it with Vundle, but can't seem to map <leader>m/n to another keys. I see it should be done before the plugin loads, but moving the mapping commands around didn't help.


Is there anyway to install it with vundle. I use 'BundleSearch mark', and tried some, it turned out to be the other plugin.

--July 23, 2014

You can use the vim-scripts/Mark--Karkat repo, mirrored by; unfortunately, their scraper apparently still doesn't work well with plugins (forks) having identical names, so that version is out-of-date, but usable.
-- Inkarkat (talk) 06:54, July 24, 2014 (UTC)

--Dec. 8, 2014

I have been able to install it by just using "Plugin 'Mark'" on the Vundle setup part on vimrc


Its mappings may be in conflict with IndexedSearch. --July 19, 2012

You can easily change them; the plugin uses the canonical <Plug>-mechanism. I personally don't like the default mappings and have redefined them all, but I kept the original ones for backward compatibility.
-- Inkarkat (talk) 07:17, July 24, 2014 (UTC)


After playing with this script for a few hours, I still failed to figure out how to use it for two important scenario:

1, Suppose I am edit a big file, and I want to search for a pattern using <Leader>r, after I input the regular expression and press Return, I don't know if there is any match since the cursor does not jump to the first match. I have to return to the old Vim search way.

As the <Leader>r command sets the last search to the entered mark, you can just press <Leader>* to jump to the next occurrence of it.
-- Inkarkat (talk) 07:15, July 24, 2014 (UTC)

2, Suppose I have a few patterns highlighted, for example, 'foo', 'bar' and 'qaz'. Now I just searched for 'qaz' and it is in the screen, now if I want to jump to the occurrence of 'bar', I don't know what to do other than randomly srolling the screen up and down for that pattern. I don't know if this script has a search command which accepts a marker number [N].

You can use the <k1>, etc. keypad mappings to jump to the next occurrence of mark 1 etc.; it's also possible to define a separate mapping that interprets the [count] as the mark group (I personally use such). If you've forgotten the mark number, :Marks lists them all.
-- Inkarkat (talk) 07:15, July 24, 2014 (UTC)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.