From a0c57d027968586b3f4e84fca03af498408e458a Mon Sep 17 00:00:00 2001 From: Pavel Pertsev Date: Mon, 7 Apr 2014 16:48:01 -0700 Subject: [PATCH] Created Usage (markdown) --- Usage.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Usage.md diff --git a/Usage.md b/Usage.md new file mode 100644 index 0000000..a55a7ba --- /dev/null +++ b/Usage.md @@ -0,0 +1,27 @@ +sage +----- + +gruvbox comes in two modes, dark and light. To toggle between them with F5 you can add these to your .vimrc: + + map :call gruvbox#bg_toggle() + imap :call gruvbox#bg_toggle()a + vmap :call gruvbox#bg_toggle()gv + +Just setting background to an appropriate value would work as well: + + set bg=dark " Setting dark mode + set bg=light " Setting light mode + +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: + + nnoremap :call gruvbox#hls_toggle() + inoremap :call gruvbox#hls_toggle()a + vnoremap :call gruvbox#hls_toggle()gv + + nnoremap :call gruvbox#hls_hide() + + nnoremap * :let @/ = "":call gruvbox#hls_show()* + nnoremap / :let @/ = "":call gruvbox#hls_show()/ + nnoremap ? :let @/ = "":call gruvbox#hls_show()? + +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 and hide it with Enter. \ No newline at end of file