mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-15 23:03:46 -05:00
Additional functions
This commit is contained in:
36
README.md
36
README.md
@@ -44,16 +44,9 @@ Usage
|
||||
|
||||
gruvbox comes in two modes, dark and light. To toggle between them with F5 you can add these to your .vimrc:
|
||||
|
||||
map <F5> :call ToggleBg()<CR>
|
||||
function! ToggleBg()
|
||||
if &background == 'dark'
|
||||
set bg=light
|
||||
else
|
||||
set bg=dark
|
||||
endif
|
||||
|
||||
colo gruvbox
|
||||
endfunc
|
||||
map <silent> <F5> :call gruvbox#bg_toggle()<CR>
|
||||
imap <silent> <F5> <ESC>:call gruvbox#bg_toggle()<CR>a
|
||||
vmap <silent> <F5> <ESC>:call gruvbox#bg_toggle()<CR>gv
|
||||
|
||||
Just setting background to an appropriate value would work as well:
|
||||
|
||||
@@ -159,6 +152,29 @@ default: `0`
|
||||
Inverts indent guides. Could be nice paired with `set list` so it would highlight only tab symbols instead of it's background.
|
||||
default: `0`
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
### gruvbox#bg_toggle()
|
||||
|
||||
(...)
|
||||
|
||||
### gruvbox#invert_signs_toggle()
|
||||
|
||||
(...)
|
||||
|
||||
### gruvbox#hls_show()
|
||||
|
||||
(...)
|
||||
|
||||
### gruvbox#hls_hide()
|
||||
|
||||
(...)
|
||||
|
||||
### gruvbox#hls_toggle()
|
||||
|
||||
(...)
|
||||
|
||||
Contributions
|
||||
-------------
|
||||
|
||||
|
||||
27
autoload/gruvbox.vim
Normal file
27
autoload/gruvbox.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" -----------------------------------------------------------------------------
|
||||
" File: gruvbox.vim
|
||||
" Description: Retro groove color scheme for Vim
|
||||
" Author: morhetz <morhetz@gmail.com>
|
||||
" Source: https://github.com/morhetz/gruvbox
|
||||
" Last Modified: 16 Dec 2013
|
||||
" -----------------------------------------------------------------------------
|
||||
|
||||
function! gruvbox#bg_toggle()
|
||||
if &background == 'dark'
|
||||
set background=light
|
||||
else
|
||||
set background=dark
|
||||
endif
|
||||
|
||||
colo gruvbox
|
||||
endfunction
|
||||
|
||||
function! gruvbox#invert_signs_toggle()
|
||||
if g:gruvbox_invert_signs == 0
|
||||
let g:gruvbox_invert_signs=1
|
||||
else
|
||||
let g:gruvbox_invert_signs=0
|
||||
endif
|
||||
|
||||
colo gruvbox
|
||||
endfunction
|
||||
@@ -3,7 +3,7 @@
|
||||
" Description: Retro groove color scheme for Vim
|
||||
" Author: morhetz <morhetz@gmail.com>
|
||||
" Source: https://github.com/morhetz/gruvbox
|
||||
" Last Modified: 12 Dec 2013
|
||||
" Last Modified: 16 Dec 2013
|
||||
" -----------------------------------------------------------------------------
|
||||
|
||||
" Supporting code -------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user