Skip to content

tracyone/mark.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirror of script_id=2666

Latest version is 2.8.5, updated at 29-Oct-2014 by Ingo Karkat

DESCRIPTION

This plugin adds mappings and a :Mark command to highlight several words in different colors simultaneously, similar to the built-in 'hlsearch' highlighting of search results and the * |star| command. For example, when you are browsing a big program file, you could highlight multiple identifiers in parallel. This will make it easier to trace the source code.

This is a continuation of vimscript #1238 by Yuheng Xie, who doesn't maintain his original version anymore and recommends switching to this fork. This plugin offers the following advantages over the original:

  • Much faster, all colored words can now be highlighted, no more clashes with syntax highlighting (due to use of matchadd()).
  • Many bug fixes.
  • Jumps behave like the built-in search, including wrap and error messages.
  • Like the built-in commands, jumps take an optional [count] to quickly skip over some marks.
  • Marks can be persisted, and patterns can be added / subtracted from mark highlight groups.

SEE ALSO

  • SearchAlternatives.vim (vimscript #4146) provides mappings and commands to add and subtract alternative branches to the current search pattern.
  • SearchHighlighting.vim (vimscript #4320) can change the semantics of the start command *, extends it to visual mode (like Mark) and has auto-search functionality which instantly highlights the word under the cursor when typing or moving around, like in many IDEs.

RELATED WORKS

  • MultipleSearch (vimscript #479) can highlight in a single window and in all buffers, but still relies on the :syntax highlighting method, which is slower and less reliable.
  • Highlight_multiple_words offers control over the color used by mapping the 1-9 keys on the numeric keypad, persistence, and highlights only a single window.
  • highlight.vim (vimscript #1599) highlights lines or patterns of interest in different colors, using mappings that start with CTRL-H and work on cword.
  • quickhl.vim (vimscript #3692) can also list the matches with colors and in addition offers on-the-fly highlighting of the current word (like many IDEs do).
  • Highlight HIGHLIGHT has commands and mappings for highlighting and searching, uses matchadd(), but limits the scope of highlightings to the current window.
  • TempKeyword (vimscript #4636) is a simple plugin that can matchadd() the word under the cursor with \0 - \9 mappings. (And clear with \c0 etc.)
  • simple_highlighting (vimscript #4688) has commands and mappings to highlight 8 different slots in all buffers.
  • searchmatch (vimscript #4869) has commands and mappings for :[1,2,3]match, in the current window only.

About

a mirror of mark.vim in vim.org

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published