| ๐๐ซ๐ข๐ ๐ข๐ง๐๐ฅ ๐๐ซ๐ฎ๐ฏ๐๐จ๐ฑ | ๐๐ซ๐ฎ๐ฏ๐๐จ๐ฑ ๐๐๐ญ๐๐ซ๐ข๐๐ฅ | |
|---|---|---|
| ๐๐๐๐ | ![]() |
![]() |
| ๐๐๐ ๐๐๐ | ![]() |
![]() |
| ๐๐๐๐ | ![]() |
![]() |
| ๐๐ซ๐ข๐ ๐ข๐ง๐๐ฅ ๐๐ซ๐ฎ๐ฏ๐๐จ๐ฑ | ๐๐ซ๐ฎ๐ฏ๐๐จ๐ฑ ๐๐๐ญ๐๐ซ๐ข๐๐ฅ | |
|---|---|---|
| ๐๐๐๐ | ![]() |
![]() |
| ๐๐๐ ๐๐๐ | ![]() |
![]() |
| ๐๐๐๐ | ![]() |
![]() |
In my opinion, the very first thing a color scheme should do is to be eye-friendly, anything else is secondary. This requires soft contrast and low blue light.
Gruvbox Material is based on Gruvbox, but with a very different color palette, I'm trying to adjust the foreground colors to match these requirements.
The syntax highlighting logic used in this branch is almost the same as the original gruvbox. In addition, I've developed neosyn branch that uses another syntax highlighting logic, and it has also been optimized for common file types and plugins.
Take vim-plug for example:
Plug 'sainnhe/gruvbox-material'For better syntax highlighting support, please install sheerun/vim-polyglot.
- Clone this repository.
- Copy
/path/to/gruvbox-material/colors/gruvbox-material.vimto~/.vim/colors/. - Copy
/path/to/gruvbox-material/doc/gruvbox-material.txtto~/.vim/doc/and execute:helptags ~/.vim/doc/to generate help tags. - To install airline theme, copy
/path/to/gruvbox-material/autoload/airline/themes/gruvbox_material.vimto~/.vim/autoload/airline/themes/gruvbox_material.vim. - To install lightline theme, copy
/path/to/gruvbox-material/autoload/lightline/colorscheme/gruvbox_material.vimto~/.vim/autoload/lightline/colorscheme/gruvbox_material.vim.
There is a package available for Arch Linux users in AUR: gruvbox-material-git
Put something like this in your vimrc:
" if you don't set this option, this color scheme will fall back to the original gruvbox
set termguicolors
" for dark version
set background=dark
" for light version
set background=light
" set contrast
" this configuration option should be placed before `colorscheme gruvbox-material`
" available values: 'hard', 'medium'(default), 'soft'
let g:gruvbox_material_background = 'soft'
colorscheme gruvbox-materialSee :help gruvbox-material-configuration for more configuration options.
If you want to apply this color scheme temporarily, run this command in vim(this may cause broken colors):
:colorscheme gruvbox-materialTo enable airline color scheme, put this in your vimrc:
let g:airline_theme = 'gruvbox_material'To apply it without reloading:
:AirlineTheme gruvbox_materialTo enable lightline color scheme, put this in your vimrc:
let g:lightline = {}
let g:lightline.colorscheme = 'gruvbox_material'
" or this line
let g:lightline = {'colorscheme' : 'gruvbox_material'}To apply it without reloading:
:let g:lightline.colorscheme = 'gruvbox_material'
:call lightline#init()
:call lightline#colorscheme()Q: It doesn't work as expected.
A:
-
This color scheme is mainly designed for true colors,
set termguicolorsis required. Check output ofvim --version, maybe your vim doesn't supporttermguicolors. -
Maybe your terminal emulator doesn't support true colors, you can test it using this script.
-
If you are running vim in tmux, you need to override default true colors of tmux, as tmux cannot display true color properly: #1246 How to use true colors in vim under tmux?
-
There are many highlight group links in syntax files while a color scheme may change them, enabling one color scheme based on another color scheme enabled is very likely to cause colors to break. If any color is broken, you can enable the color scheme in your vimrc instead of after vim startup.
Q: What's your status line configuration?
A: Check this gist.
Q: What's the font used here?
Check this gist for detailed instructions to hack this color scheme: hack-color-schemes.md
Note: The following projects are sorted by alphabet.
- morhetz/gruvbox: original gruvbox
- sainnhe/vim-color-desert-night: the
whitecolor in the dark variant - atom.io: the
whitecolor in the dark variant - zefei/cake16: the
blackcolor in the light variant - Google Material Design











