1
Fork 0
vim-highlight/doc/highlight.txt

103 lines
4.2 KiB
Plaintext
Raw Normal View History

2016-11-11 00:15:52 +00:00
*highlight-registry* functionality of the highlight registry
2016-11-08 01:49:02 +00:00
==============================================================================
CONTENTS *highlight-contents*
2016-11-08 01:49:02 +00:00
1. Usage ................................................... |highlight-usage|
2017-05-24 04:25:37 +00:00
2. Variables ........................................... |highlight-variables|
3. Statusline ......................................... |highlight-statusline|
4. Commands ............................................. |highlight-commands|
2016-11-08 01:49:02 +00:00
==============================================================================
Section 1: Usage *highlight-usage*
2016-11-08 01:49:02 +00:00
["x]& Highlights the <cword> under the cursor into register x.
2016-11-08 01:49:02 +00:00
["x]y& Sets the search register to the contents of register x.
2016-11-08 01:49:02 +00:00
["x]d& Removes the <cword> from register x.
2016-11-08 01:49:02 +00:00
["x]c& Emptys register x. No patterns previously belonging
inside this register will be highlighted.
2016-11-08 01:49:02 +00:00
["x]* Highlights the <cword> under the cursor into register x.
Moves to the next occurrence of the <cword>.
2016-11-08 01:49:02 +00:00
["x]# Highlights the <cword> under the cursor into register x.
Moves to the previous occurrence of the <cword>.
2016-11-08 01:49:02 +00:00
["x]g& Highlights the <cword> under the cursor, but without
forcing any highlighted occurrences to be a word. That
is, if the selected <cword> is a substring of any text
in the current buffer, the substring will also be
highlighted.
2016-11-08 01:49:02 +00:00
["x]g* Works like ["x]g& but also moves to the next occurrence
of the pattern.
2016-11-08 01:49:02 +00:00
["x]g# Works like ["x]g& but also moves to the previous
occurrence of the pattern.
2016-11-08 01:49:02 +00:00
v_["x]& Note the v indicates visual mode. Works like g&, but
with the visually selected region.
2016-11-08 01:49:02 +00:00
v_["x]* Note the v indicates visual mode. Works like g*, but
with the visually selected region.
2016-11-08 01:49:02 +00:00
v_["x]# Note the v indicates visual mode. Works like g#, but
with the visually selected region.
2016-11-08 01:49:02 +00:00
v_["x]d& Note the v indicates visual mode. Removes the visually
selected region from register x.
2016-11-08 01:49:02 +00:00
==============================================================================
2017-07-25 17:50:11 +00:00
Section 2: Variables *highlight-variables*
2017-05-24 04:25:37 +00:00
g:highlight_registry
Corresponds to registers and their respective syntax attributes. Adjust this
to set the properties for a given highlight group. Allowed keys in the
nested dictionary are listed in *synIDattr*, except for the 'name'
attribute. Unrecognized keys are simply ignored. Only 'cterm' related
attributes are supported (that is, gui specific attributes are not
supported).
g:persist_unnamed_register
Determines how to manage the unnamed register '"'. If set to false, we
regard the unnamed register to implicitly imply use of the last activated
register.
2017-05-26 17:05:27 +00:00
g:highlight_register_prefix
Prefix used in naming the generating highlight register highlight groups.
g:highlight_register_prefix_link
Default link the highligh group g:highlight_register_prefix points to.
2017-05-24 04:25:37 +00:00
==============================================================================
Section 3: Statusline *highlight-statusline*
2016-11-08 01:53:43 +00:00
highlight#statusline()
2016-11-08 01:53:43 +00:00
Use the following function to append the currently active highlight
register into the statusline. This can be done as:
2016-11-08 01:53:43 +00:00
:set statusline+=%{highlight#statusline()}
If you would like the statusline to be highlighted the same as the active
h_register, use:
:set statusline+=%#Search#%{highlight#statusline()}%*
==============================================================================
2017-05-24 04:25:37 +00:00
Section 4: Commands *highlight-commands*
ResetHighlightRegistry
Removes all custom highlights done. Reverts back to when the plugin was
first loaded.
2016-11-08 01:49:02 +00:00
vim:tw=78:ts=8:ft=help:norl: