pi_paren.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. *pi_paren.txt* For Vim version 9.0. Last change: 2013 May 08
  2. VIM REFERENCE MANUAL by Bram Moolenaar
  3. Highlighting matching parens *matchparen*
  4. The functionality mentioned here is a |standard-plugin|.
  5. This plugin is only available if 'compatible' is not set.
  6. You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
  7. :let loaded_matchparen = 1
  8. The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
  9. redefine the match highlighting.
  10. *:NoMatchParen* *:DoMatchParen*
  11. To disable the plugin after it was loaded use this command: >
  12. :NoMatchParen
  13. And to enable it again: >
  14. :DoMatchParen
  15. The highlighting used is MatchParen. You can specify different colors with
  16. the ":highlight" command. Example: >
  17. :hi MatchParen ctermbg=blue guibg=lightblue
  18. The characters to be matched come from the 'matchpairs' option. You can
  19. change the value to highlight different matches. Note that not everything is
  20. possible. For example, you can't highlight single or double quotes, because
  21. the start and end are equal.
  22. The syntax highlighting attributes are used. When the cursor currently is not
  23. in a string or comment syntax item, then matches inside string and comment
  24. syntax items are ignored. Any syntax items with "string" or "comment"
  25. somewhere in their name are considered string or comment items.
  26. The search is limited to avoid a delay when moving the cursor. The limits
  27. are:
  28. - What is visible in the window.
  29. - 100 lines above or below the cursor to avoid a long delay when there are
  30. closed folds.
  31. - 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay
  32. in a long line with syntax highlighting.
  33. - A timeout of 300 msec (60 msec in Insert mode). This can be changed with the
  34. g:matchparen_timeout and g:matchparen_insert_timeout variables and their
  35. buffer-local equivalents b:matchparen_timeout and
  36. b:matchparen_insert_timeout.
  37. If you would like the |%| command to work better, the matchit plugin can be
  38. used, see |matchit-install|. This plugin also helps to skip matches in
  39. comments. This is unrelated to the matchparen highlighting, they use a
  40. different mechanism.
  41. ==============================================================================
  42. vim:tw=78:ts=8:noet:ft=help:norl: