sponsor Vim development Vim logo Vim Book Ad

gruvbox : Retro groove color scheme for Vim

 script karma  Rating 2199/695, Downloaded by 5586  Comments, bugs, improvements  Vim wiki

created by
Pavel Pertsev
script type
color scheme
Homesite: https://github.com/morhetz/gruvbox

Gruvbox is heavily inspired by badwolf (https://github.com/sjl/badwolf), jellybeans (https://github.com/nanotech/jellybeans.vim) and solarized (http://ethanschoonover.com/solarized).

Designed as a bright theme with pastel 'retro groove' colors and light/dark mode switching in the way of solarized. The main focus when developing Gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes.


Refer Gallery (https://github.com/morhetz/gruvbox/wiki/Gallery) for more syntax-specific screenshots.

Dark mode (http://i.imgur.com/2870c.png)
Light mode (http://i.imgur.com/oS9I3.png)


* Lots of style-customization options (contrast, color invertion, italics usage etc.)
* Extended filetype highlighting: Html, Xml, Vim, Clojure, C, Python, JavaScript, CoffeeScript, Ruby, Objective-C, Go, Lua, MoonScript, Java
* Supported plugins: EasyMotion, vim-sneak, Indent Guides, indentLine, Rainbow Parentheses, Airline, GitGutter, Signify, ShowMarks, Signature, Syntastic, CtrlP, Startify


gruvbox comes in two modes, dark and light. To toggle between them with F5 you can add these to your .vimrc

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

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 <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 * :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.


* Filetype syntax highlighting (R, TeX and I'm still dissatisfied with CSS)
* Plugin support (MiniBufExplorer, Tagbar)
* Airline theme

Troubleshooting, Configuration, Functions

Please refer homesite (https://github.com/morhetz/gruvbox)

Licensed under MIT/X11
install details

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
gruvbox-1.3.5.zip 1.3.5 2014-03-19 7.0 Pavel Pertsev First full-featured release
gruvbox-0.0.8.zip 0.0.8 2012-12-09 7.0 Pavel Pertsev Initial upload
ip used for rating:

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
Vim at Github