Skip to content

Classic: match preferences

Andy Massimino edited this page Jan 15, 2022 · 2 revisions

There are some select filetype specific configuration options when using classic matching. You can configure them using

let g:matchup_matchpref[&filetype] = {'option': 1}

Currently, all supported preferences are indicators specified with 0 and 1.

tex

  • relax_env: this causes match-up to ignore the environment's text such that \begin{foo} matches with \end{bar}. Ordinarily, match-up requires the environment name matches exactly.

html and xml

  • tagnameonly: only highlight the name of the tag, not any attributes.
  • classic_textobj: when using i% and a%, match-up tries to be smarter about selection. This is called a filetype quirk, or a hard-coded special behavioral pattern. This preference disables the special handling. The default is most likely good for you.

html

  • nolists: do not specially match <li> and similar in html, i.e., treat these as normal tags.

cpp

  • template: attempt to match template angle brackets <:>. Best effort- this often doesn't work, as parsing C++ with regular expressions is impossible.
Clone this wiki locally