mirror of
https://github.com/morhetz/gruvbox.git
synced 2025-11-15 23:03:46 -05:00
EasyMotion colors, and updating screenshots
This commit is contained in:
30
README.md
30
README.md
@@ -14,24 +14,38 @@ Designed as a bright theme with pastel 'retro groove' colors and light/dark mode
|
|||||||
Screenshots
|
Screenshots
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Colorscheme is in early development stage, so this could serve as working preview.
|
Color scheme is in early development stage, so this could serve as working preview.
|
||||||
|
|
||||||
### Ruby
|
### Dark mode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### C
|
### Ligth mode
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Vim
|
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
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
Just setting background to an appropriate value would work as well
|
||||||
|
|
||||||
|
set bg=dark " Setting dark mode
|
||||||
|
set bg=light " Setting light mode
|
||||||
|
|
||||||
ToDo
|
ToDo
|
||||||
----
|
----
|
||||||
|
|
||||||
* Light mode
|
|
||||||
* Terminal low-color mode (<256)
|
* Terminal low-color mode (<256)
|
||||||
* More fyletype specific highlighting
|
* More fyletype specific highlighting
|
||||||
* Customizable options (overrides, background switch, etc.)
|
* Customizable options (overrides, background switch, etc.)
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
" Supporting code --------------------------------------------------------------
|
" -----------------------------------------------------------------------------
|
||||||
|
" File: gruvbox.vim
|
||||||
|
" Description: Retro groove color scheme for Vim
|
||||||
|
" Author: morhetz <morhetz@gmail.com>
|
||||||
|
" Source: https://github.com/morhetz/gruvbox
|
||||||
|
" Last Modified: 6 Dec 2012
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
" Supporting code -------------------------------------------------------------
|
||||||
" Initialisation {{{
|
" Initialisation {{{
|
||||||
|
|
||||||
"set background=dark
|
"set background=dark
|
||||||
|
|
||||||
if version > 580
|
if version > 580
|
||||||
hi clear
|
hi clear
|
||||||
if exists("syntax_on")
|
if exists("syntax_on")
|
||||||
syntax reset
|
syntax reset
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:colors_name="gruvbox"
|
let g:colors_name="gruvbox"
|
||||||
@@ -18,10 +26,10 @@ let g:colors_name="gruvbox"
|
|||||||
""" else
|
""" else
|
||||||
""" let s:low_color = 1
|
""" let s:low_color = 1
|
||||||
""" endif
|
""" endif
|
||||||
"}}}
|
" }}}
|
||||||
|
|
||||||
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
if !has("gui_running") && &t_Co != 88 && &t_Co != 256
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
@@ -30,110 +38,112 @@ endif
|
|||||||
let s:gb = {}
|
let s:gb = {}
|
||||||
|
|
||||||
if &background == "dark"
|
if &background == "dark"
|
||||||
let s:gb.dark0 = ['282828', 235]
|
let s:gb.dark0 = ['282828', 235]
|
||||||
let s:gb.dark1 = ['3c3836', 237]
|
let s:gb.dark1 = ['3c3836', 237]
|
||||||
let s:gb.dark2 = ['504945', 239]
|
let s:gb.dark2 = ['504945', 239]
|
||||||
let s:gb.dark3 = ['665c54', 241]
|
let s:gb.dark3 = ['665c54', 241]
|
||||||
let s:gb.dark4 = ['7c6f64', 243]
|
let s:gb.dark4 = ['7c6f64', 243]
|
||||||
|
|
||||||
let s:gb.medium = ['928374', 245]
|
let s:gb.medium = ['928374', 245]
|
||||||
|
|
||||||
let s:gb.light0 = ['fdf4c1', 247]
|
let s:gb.light0 = ['fdf4c1', 247]
|
||||||
let s:gb.light1 = ['ebdbb2', 223]
|
let s:gb.light1 = ['ebdbb2', 223]
|
||||||
let s:gb.light2 = ['d5c4a1', 251]
|
let s:gb.light2 = ['d5c4a1', 251]
|
||||||
let s:gb.light3 = ['bdae93', 253]
|
let s:gb.light3 = ['bdae93', 253]
|
||||||
let s:gb.light4 = ['a89984', 255]
|
let s:gb.light4 = ['a89984', 255]
|
||||||
|
|
||||||
let s:gb.red = ['fb4934', 167]
|
let s:gb.red = ['fb4934', 167]
|
||||||
let s:gb.orange = ['fe8019', 208]
|
let s:gb.orange = ['fe8019', 208]
|
||||||
let s:gb.yellow = ['fabd2f', 214]
|
let s:gb.yellow = ['fabd2f', 214]
|
||||||
let s:gb.green = ['b8bb26', 142]
|
let s:gb.green = ['b8bb26', 142]
|
||||||
let s:gb.aqua = ['8ec07c', 108]
|
let s:gb.aqua = ['8ec07c', 108]
|
||||||
let s:gb.blue = ['83a598', 109]
|
let s:gb.blue = ['83a598', 109]
|
||||||
let s:gb.purple = ['d3869b', 175]
|
let s:gb.purple = ['d3869b', 175]
|
||||||
else
|
else
|
||||||
let s:gb.dark0 = ['fdf4c1', 235]
|
let s:gb.dark0 = ['fdf4c1', 235]
|
||||||
let s:gb.dark1 = ['ebdbb2', 237]
|
let s:gb.dark1 = ['ebdbb2', 237]
|
||||||
let s:gb.dark2 = ['d5c4a1', 239]
|
let s:gb.dark2 = ['d5c4a1', 239]
|
||||||
let s:gb.dark3 = ['bdae93', 241]
|
let s:gb.dark3 = ['bdae93', 241]
|
||||||
let s:gb.dark4 = ['a89984', 243]
|
let s:gb.dark4 = ['a89984', 243]
|
||||||
|
|
||||||
let s:gb.medium = ['928374', 245]
|
let s:gb.medium = ['928374', 245]
|
||||||
|
|
||||||
let s:gb.light0 = ['282828', 247]
|
let s:gb.light0 = ['282828', 247]
|
||||||
let s:gb.light1 = ['3c3836', 223]
|
let s:gb.light1 = ['3c3836', 223]
|
||||||
let s:gb.light2 = ['504945', 251]
|
let s:gb.light2 = ['504945', 251]
|
||||||
let s:gb.light3 = ['665c54', 253]
|
let s:gb.light3 = ['665c54', 253]
|
||||||
let s:gb.light4 = ['7c6f64', 255]
|
let s:gb.light4 = ['7c6f64', 255]
|
||||||
|
|
||||||
let s:gb.red = ['9d0006', 167]
|
let s:gb.red = ['9d0006', 167]
|
||||||
let s:gb.orange = ['af3a03', 208]
|
let s:gb.orange = ['af3a03', 208]
|
||||||
let s:gb.yellow = ['b57614', 214]
|
let s:gb.yellow = ['b57614', 214]
|
||||||
let s:gb.green = ['79740e', 142]
|
let s:gb.green = ['79740e', 142]
|
||||||
let s:gb.aqua = ['427b58', 108]
|
let s:gb.aqua = ['427b58', 108]
|
||||||
let s:gb.blue = ['076678', 109]
|
let s:gb.blue = ['076678', 109]
|
||||||
let s:gb.purple = ['8f3f71', 175]
|
let s:gb.purple = ['8f3f71', 175]
|
||||||
endif
|
endif
|
||||||
|
|
||||||
"}}}
|
" }}}
|
||||||
" Highlighting Function {{{
|
" Highlighting Function {{{
|
||||||
|
|
||||||
function! s:HL(group, fg, ...)
|
function! s:HL(group, fg, ...)
|
||||||
" Arguments: group, guifg, guibg, gui, guisp
|
" Arguments: group, guifg, guibg, gui, guisp
|
||||||
|
|
||||||
let histring = 'hi ' . a:group . ' '
|
let histring = 'hi ' . a:group . ' '
|
||||||
|
|
||||||
if strlen(a:fg)
|
if strlen(a:fg)
|
||||||
if a:fg == 'fg'
|
if a:fg == 'fg'
|
||||||
let histring .= 'guifg=fg ctermfg=fg '
|
let histring .= 'guifg=fg ctermfg=fg '
|
||||||
elseif a:fg == 'bg'
|
elseif a:fg == 'bg'
|
||||||
let histring .= 'guifg=bg ctermfg=bg '
|
let histring .= 'guifg=bg ctermfg=bg '
|
||||||
elseif a:fg == 'none'
|
elseif a:fg == 'none'
|
||||||
let histring .= 'guifg=NONE ctermfg=NONE '
|
let histring .= 'guifg=NONE ctermfg=NONE '
|
||||||
else
|
else
|
||||||
let c = get(s:gb, a:fg)
|
let c = get(s:gb, a:fg)
|
||||||
let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
|
let histring .= 'guifg=#' . c[0] . ' ctermfg=' . c[1] . ' '
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
if a:0 >= 1 && strlen(a:1)
|
|
||||||
if a:1 == 'bg'
|
|
||||||
let histring .= 'guibg=bg ctermbg=bg '
|
|
||||||
elseif a:fg == 'fg'
|
|
||||||
let histring .= 'guibg=fg ctermbg=fg '
|
|
||||||
elseif a:1 == 'none'
|
|
||||||
let histring .= 'guibg=NONE ctermfg=NONE '
|
|
||||||
else
|
|
||||||
let c = get(s:gb, a:1)
|
|
||||||
let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let histring .= 'guibg=NONE ctermbg=NONE '
|
|
||||||
endif
|
|
||||||
|
|
||||||
if a:0 >= 2 && strlen(a:2)
|
|
||||||
if a:2 == 'none'
|
|
||||||
let histring .= 'gui=NONE cterm=NONE '
|
|
||||||
else
|
|
||||||
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
|
|
||||||
endif
|
endif
|
||||||
else
|
|
||||||
let histring .= 'gui=NONE cterm=NONE '
|
|
||||||
endif
|
|
||||||
|
|
||||||
if a:0 >= 3 && strlen(a:3)
|
if a:0 >= 1 && strlen(a:1)
|
||||||
if a:3 == 'none'
|
if a:1 == 'bg'
|
||||||
let histring .= 'guisp=NONE '
|
let histring .= 'guibg=bg ctermbg=bg '
|
||||||
|
elseif a:fg == 'fg'
|
||||||
|
let histring .= 'guibg=fg ctermbg=fg '
|
||||||
|
elseif a:1 == 'none'
|
||||||
|
let histring .= 'guibg=NONE ctermfg=NONE '
|
||||||
|
else
|
||||||
|
let c = get(s:gb, a:1)
|
||||||
|
let histring .= 'guibg=#' . c[0] . ' ctermbg=' . c[1] . ' '
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
let c = get(s:gb, a:3)
|
let histring .= 'guibg=NONE ctermbg=NONE '
|
||||||
let histring .= 'guisp=#' . c[0] . ' '
|
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
execute histring
|
if a:0 >= 2 && strlen(a:2)
|
||||||
|
if a:2 == 'none'
|
||||||
|
let histring .= 'gui=NONE cterm=NONE '
|
||||||
|
else
|
||||||
|
let histring .= 'gui=' . a:2 . ' cterm=' . a:2 . ' '
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let histring .= 'gui=NONE cterm=NONE '
|
||||||
|
endif
|
||||||
|
|
||||||
|
if a:0 >= 3 && strlen(a:3)
|
||||||
|
if a:3 == 'none'
|
||||||
|
let histring .= 'guisp=NONE '
|
||||||
|
else
|
||||||
|
let c = get(s:gb, a:3)
|
||||||
|
let histring .= 'guisp=#' . c[0] . ' '
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
execute histring
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Actual colorscheme -----------------------------------------------------------
|
" Actual colorscheme ----------------------------------------------------------
|
||||||
" Vanilla Vim {{{
|
" Vanilla Vim {{{
|
||||||
|
|
||||||
" General/UI {{{
|
" General/UI {{{
|
||||||
@@ -142,31 +152,31 @@ endfunction
|
|||||||
call s:HL('Normal', 'light1', 'dark0')
|
call s:HL('Normal', 'light1', 'dark0')
|
||||||
|
|
||||||
if version >= 700
|
if version >= 700
|
||||||
" Screen line that the cursor is
|
" Screen line that the cursor is
|
||||||
call s:HL('CursorLine', 'none', 'dark1')
|
call s:HL('CursorLine', 'none', 'dark1')
|
||||||
" Screen column that the cursor is
|
" Screen column that the cursor is
|
||||||
call s:HL('CursorColumn', 'none', 'dark1')
|
call s:HL('CursorColumn', 'none', 'dark1')
|
||||||
|
|
||||||
" Tab pages line filler
|
" Tab pages line filler
|
||||||
call s:HL('TabLineFill', 'dark4', 'bg')
|
call s:HL('TabLineFill', 'dark4', 'bg')
|
||||||
" Active tab page label
|
" Active tab page label
|
||||||
call s:HL('TabLineSel', 'bg', 'dark4', 'bold')
|
call s:HL('TabLineSel', 'bg', 'dark4', 'bold')
|
||||||
" Not active tab page label
|
" Not active tab page label
|
||||||
call s:HL('TabLine', 'dark4', 'bg')
|
call s:HL('TabLine', 'dark4', 'bg')
|
||||||
|
|
||||||
" Match paired bracket under the cursor
|
" Match paired bracket under the cursor
|
||||||
call s:HL('MatchParen', 'orange', 'dark3', 'bold')
|
call s:HL('MatchParen', 'orange', 'dark3', 'bold')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if version >= 703
|
if version >= 703
|
||||||
" Highlighted screen columns
|
" Highlighted screen columns
|
||||||
call s:HL('ColorColumn', 'none', 'dark1')
|
call s:HL('ColorColumn', 'none', 'dark1')
|
||||||
|
|
||||||
" Concealed element: \lambda → λ"
|
" Concealed element: \lambda → λ"
|
||||||
call s:HL('Conceal', 'blue', 'none')"
|
call s:HL('Conceal', 'blue', 'none')"
|
||||||
|
|
||||||
" Line number of CursorLine
|
" Line number of CursorLine
|
||||||
call s:HL('CursorLineNr', 'yellow', 'dark1')
|
call s:HL('CursorLineNr', 'yellow', 'dark1')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call s:HL('NonText', 'dark2')
|
call s:HL('NonText', 'dark2')
|
||||||
@@ -297,14 +307,14 @@ call s:HL('Typedef', 'yellow')
|
|||||||
" Completion Menu {{{
|
" Completion Menu {{{
|
||||||
|
|
||||||
if version >= 700
|
if version >= 700
|
||||||
" Popup menu: normal item
|
" Popup menu: normal item
|
||||||
call s:HL('Pmenu', 'light1', 'dark2')
|
call s:HL('Pmenu', 'light1', 'dark2')
|
||||||
" Popup menu: selected item
|
" Popup menu: selected item
|
||||||
call s:HL('PmenuSel', 'dark2', 'blue', 'bold')
|
call s:HL('PmenuSel', 'dark2', 'blue', 'bold')
|
||||||
" Popup menu: scrollbar
|
" Popup menu: scrollbar
|
||||||
call s:HL('PmenuSbar', 'none', 'dark2')
|
call s:HL('PmenuSbar', 'none', 'dark2')
|
||||||
" Popup menu: scrollbar thumb
|
" Popup menu: scrollbar thumb
|
||||||
call s:HL('PmenuThumb', 'none', 'dark4')
|
call s:HL('PmenuThumb', 'none', 'dark4')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
@@ -323,22 +333,30 @@ call s:HL('DiffText', 'dark0', 'yellow')
|
|||||||
" Spelling {{{
|
" Spelling {{{
|
||||||
|
|
||||||
if has("spell")
|
if has("spell")
|
||||||
" Not capitalised word
|
" Not capitalised word
|
||||||
call s:HL('SpellCap', 'none', 'none', 'undercurl', 'red')
|
call s:HL('SpellCap', 'none', 'none', 'undercurl', 'red')
|
||||||
" Not recognized word
|
" Not recognized word
|
||||||
call s:HL('SpellBad', 'none', 'none', 'undercurl', 'blue')
|
call s:HL('SpellBad', 'none', 'none', 'undercurl', 'blue')
|
||||||
" Wrong spelling for selected region
|
" Wrong spelling for selected region
|
||||||
call s:HL('SpellLocal', 'none', 'none', 'undercurl', 'aqua')
|
call s:HL('SpellLocal', 'none', 'none', 'undercurl', 'aqua')
|
||||||
" Rare word
|
" Rare word
|
||||||
call s:HL('SpellRare', 'none', 'none', 'undercurl', 'purple')
|
call s:HL('SpellRare', 'none', 'none', 'undercurl', 'purple')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
" Plugin specific -------------------------------------------------------------
|
||||||
|
" EasyMotion {{{
|
||||||
|
|
||||||
|
hi! def link EasyMotionTarget Search
|
||||||
|
hi! def link EasyMotionShade Comment
|
||||||
|
|
||||||
|
" }}}
|
||||||
|
|
||||||
" Filetype specific -----------------------------------------------------------
|
" Filetype specific -----------------------------------------------------------
|
||||||
"{{{ Diff
|
" Diff {{{
|
||||||
|
|
||||||
call s:HL('diffAdded', 'green')
|
call s:HL('diffAdded', 'green')
|
||||||
call s:HL('diffRemoved', 'red')
|
call s:HL('diffRemoved', 'red')
|
||||||
@@ -349,4 +367,4 @@ call s:HL('diffNewFile', 'yellow')
|
|||||||
|
|
||||||
call s:HL('diffLine', 'blue')
|
call s:HL('diffLine', 'blue')
|
||||||
|
|
||||||
"}}}
|
" }}}
|
||||||
|
|||||||
Reference in New Issue
Block a user