1
Fork 0

Quick docs

master
Joshua Potter 2016-11-07 17:49:02 -08:00
parent d1bcc8a8e6
commit d23fd5166d
3 changed files with 65 additions and 1 deletions

57
doc/highlight.txt Normal file
View File

@ -0,0 +1,57 @@
*highlight.txt* functionality of the highlight registry
============================================================================
CONTENTS *highlight-contents*
1. Usage .................................................. |highlight-usage|
============================================================================
Section 1: Usage *highlight-usage*
["x]& Highlights the <cword> under the cursor
into register x.
["x]y& Sets the search register to the contents of
register x.
["x]d& Removes the <cword> from register x.
["x]c& Emptys register x. No patterns previously
belonging inside this register will be
highlighted.
["x]* Highlights the <cword> under the cursor
into register x. Moves to the next
occurrence of the <cword>.
["x]# Highlights the <cword> under the cursor
into register x. Moves to the previous
occurrence of the <cword>.
["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.
["x]g* Works like ["x]g& but also moves to the next
occurrence of the pattern.
["x]g# Works like ["x]g& but also moves to the
previous occurrence of the pattern.
v_["x]& Note the v indicates visual mode. Works like
g&, but with the visually selected region.
v_["x]* Note the v indicates visual mode. Works like
g*, but with the visually selected region.
v_["x]# Note the v indicates visual mode. Works like
g#, but with the visually selected region.
v_["x]d& Note the v indicates visual mode. Removes
the visually selected region from register
x.
vim:tw=78:ts=8:ft=help:norl:

3
doc/tags Normal file
View File

@ -0,0 +1,3 @@
highlight-contents highlight.txt /*highlight-contents*
highlight-usage highlight.txt /*highlight-usage*
highlight.txt highlight.txt /*highlight.txt*

View File

@ -183,12 +183,14 @@ call s:InitRegister('9', 'Black')
call s:AppendToSearch(v:register, @/) call s:AppendToSearch(v:register, @/)
" Word Boundary Search Modifications
noremap <unique> <silent> <Plug>HighlightRegistry_AppendToSearch noremap <unique> <silent> <Plug>HighlightRegistry_AppendToSearch
\ :call <SID>AppendToSearch(v:register, '\<'.expand('<cword>').'\>')<CR> \ :call <SID>AppendToSearch(v:register, '\<'.expand('<cword>').'\>')<CR>
\ :call <SID>CountLastSeen()<CR> \ :call <SID>CountLastSeen()<CR>
noremap <unique> <silent> <Plug>HighlightRegistry_RemoveFromSearch noremap <unique> <silent> <Plug>HighlightRegistry_RemoveFromSearch
\ :call <SID>RemoveFromSearch(v:register, '\<'.expand('<cword>').'\>')<CR> \ :call <SID>RemoveFromSearch(v:register, '\<'.expand('<cword>').'\>')<CR>
" Arbitrary Search Modifications
noremap <unique> <silent> <Plug>HighlightRegistry_GlobalAppendToSearch noremap <unique> <silent> <Plug>HighlightRegistry_GlobalAppendToSearch
\ :call <SID>AppendToSearch(v:register, expand('<cword>'))<CR> \ :call <SID>AppendToSearch(v:register, expand('<cword>'))<CR>
\ :call <SID>CountLastSeen()<CR> \ :call <SID>CountLastSeen()<CR>
@ -198,15 +200,17 @@ noremap <unique> <silent> <Plug>HighlightRegistry_VisualAppendToSearch
noremap <unique> <silent> <Plug>HighlightRegistry_VisualRemoveFromSearch noremap <unique> <silent> <Plug>HighlightRegistry_VisualRemoveFromSearch
\ :call <SID>RemoveFromSearch(v:register, <SID>GetVisualSelection())<CR> \ :call <SID>RemoveFromSearch(v:register, <SID>GetVisualSelection())<CR>
" Register Modifications
noremap <unique> <silent> <Plug>HighlightRegistry_ClearRegister noremap <unique> <silent> <Plug>HighlightRegistry_ClearRegister
\ :call <SID>ClearRegister(v:register)<CR> \ :call <SID>ClearRegister(v:register)<CR>
noremap <unique> <silent> <Plug>HighlightRegistry_ActivateRegister noremap <unique> <silent> <Plug>HighlightRegistry_ActivateRegister
\ :call <SID>ActivateRegister(v:register)<CR> \ :call <SID>ActivateRegister(v:register)<CR>
" Miscellaneous Mappings
noremap <unique> <silent> <Plug>HighlightRegistry_CountLastSeen noremap <unique> <silent> <Plug>HighlightRegistry_CountLastSeen
\ :call <SID>CountLastSeen()<CR> \ :call <SID>CountLastSeen()<CR>
" Basic Mappings " Default Mappings
nmap & <Plug>HighlightRegistry_AppendToSearch nmap & <Plug>HighlightRegistry_AppendToSearch
nmap * :silent norm! *<CR>& nmap * :silent norm! *<CR>&
nmap # :silent norm! #<CR>& nmap # :silent norm! #<CR>&