mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-17 07:43:38 -05:00
Updated Usage (markdown)
12
Usage.md
12
Usage.md
@@ -5,16 +5,14 @@ gruvbox comes in two modes, dark and light. To toggle between them just set back
|
||||
|
||||
If you have [tpope's vim-unimpaired](https://github.com/tpope/vim-unimpaired) installed, you could easily switch with `cob` mapping.
|
||||
|
||||
Since gruvbox inverts cursor color, it could be awkward to determine current position, when the search is highlighted. To get single cursor color while searching, map these gruvbox functions same way:
|
||||
Since gruvbox inverts cursor color, it could be awkward to determine current position, when the search is highlighted. To get single cursor color while searching, map these gruvbox functions somewhere _after_ unimpaired is loaded:
|
||||
|
||||
nnoremap <silent> <Leader><Space> :call gruvbox#hls_toggle()<CR>
|
||||
inoremap <silent> <Leader><Space> <ESC>:call gruvbox#hls_toggle()<CR>a
|
||||
vnoremap <silent> <Leader><Space> <ESC>:call gruvbox#hls_toggle()<CR>gv
|
||||
|
||||
nnoremap <silent> <CR> :call gruvbox#hls_hide()<CR><CR>
|
||||
nnoremap <silent> [oh :call gruvbox#hls_show()<CR>
|
||||
nnoremap <silent> ]oh :call gruvbox#hls_hide()<CR>
|
||||
nnoremap <silent> coh :call gruvbox#hls_toggle()<CR>
|
||||
|
||||
nnoremap * :let @/ = ""<CR>:call gruvbox#hls_show()<CR>*
|
||||
nnoremap / :let @/ = ""<CR>:call gruvbox#hls_show()<CR>/
|
||||
nnoremap ? :let @/ = ""<CR>:call gruvbox#hls_show()<CR>?
|
||||
|
||||
So you'll get `g:gruvbox_hls_cursor` (orange by default) cursor color when highlight search is on and inverted one otherwise. With such mappings you could also toggle search highlight on and off with <Leader><Space> and hide it with Enter.
|
||||
So you'll get `g:gruvbox_hls_cursor` (orange by default) cursor color when highlight search is on and inverted one otherwise.
|
||||
Reference in New Issue
Block a user