2016-11-07 17:33:58 +00:00
|
|
|
Highlight
|
|
|
|
=========
|
|
|
|
|
|
|
|
[VERSION: 0.1]
|
|
|
|
|
|
|
|
Builds a custom registry for manipulating highlights. In particular, I found it
|
|
|
|
necessary to search for different keywords without overriding previous searches;
|
|
|
|
that is, I wanted to be able to continue adding more words to a search without
|
|
|
|
having to keep track of which words I've already searched for.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]&``` Highlights the <cword> under the cursor
|
2016-11-08 01:53:43 +00:00
|
|
|
into register x.
|
2016-11-07 17:33:58 +00:00
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]y&``` Sets the search register to the contents of
|
2016-11-08 01:53:43 +00:00
|
|
|
register x.
|
2016-11-07 17:33:58 +00:00
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]d&``` Removes the <cword> from register x.
|
2016-11-07 17:33:58 +00:00
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]c&``` Emptys register x. No patterns previously
|
2016-11-08 01:53:43 +00:00
|
|
|
belonging inside this register will be
|
|
|
|
highlighted.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]*``` Highlights the <cword> under the cursor
|
2016-11-08 01:53:43 +00:00
|
|
|
into register x. Moves to the next
|
|
|
|
occurrence of the <cword>.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]#``` Highlights the <cword> under the cursor
|
2016-11-08 01:53:43 +00:00
|
|
|
into register x. Moves to the previous
|
|
|
|
occurrence of the <cword>.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]g&``` Highlights the <cword> under the cursor, but
|
2016-11-08 01:53:43 +00:00
|
|
|
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:57:06 +00:00
|
|
|
```["x]g*``` Works like ["x]g& but also moves to the next
|
2016-11-08 01:53:43 +00:00
|
|
|
occurrence of the pattern.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```["x]g#``` Works like ["x]g& but also moves to the
|
2016-11-08 01:53:43 +00:00
|
|
|
previous occurrence of the pattern.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```v_["x]&``` Note the v indicates visual mode. Works like
|
2016-11-08 01:53:43 +00:00
|
|
|
g&, but with the visually selected region.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```v_["x]*``` Note the v indicates visual mode. Works like
|
2016-11-08 01:53:43 +00:00
|
|
|
g*, but with the visually selected region.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```v_["x]#``` Note the v indicates visual mode. Works like
|
2016-11-08 01:53:43 +00:00
|
|
|
g#, but with the visually selected region.
|
|
|
|
|
2016-11-08 01:57:06 +00:00
|
|
|
```v_["x]d&``` Note the v indicates visual mode. Removes
|
2016-11-08 01:53:43 +00:00
|
|
|
the visually selected region from register
|
|
|
|
x.
|
2016-11-07 17:33:58 +00:00
|
|
|
|
|
|
|
Variables
|
|
|
|
---------
|
|
|
|
|
|
|
|
Refers to the color used for highlighting when a registry had not been initialized.
|
|
|
|
|
|
|
|
```
|
|
|
|
g:highlight_register_default_color = 'Yellow'
|
|
|
|
```
|