GitHub - sainnhe/sonokai: High Contrast & Vivid Color Scheme based on Monoka...
source link: https://github.com/sainnhe/sonokai
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
README.md
๐๐ก๐ฎ๐ฌ๐ข๐
๐๐ง๐๐ซ๐จ๐ฆ๐๐๐
๐๐ญ๐ฅ๐๐ง๐ญ๐ข๐ฌ
๐๐๐ข๐
Sometimes I need a high contrast color scheme, and I think monokai is one of the best solutions, it's very beautiful and vivid.
However there is one thing I can't stand -- the contrast is too high, which is totally unacceptable to me.
This color scheme is based on Monokai Pro, the contrast is adjusted to be a bit lower while keeping the colors vivid enough.
The shusia
and maia
variants are based on monokai pro
and monokai machine
respectively. I'm not going to port all variants of Monokai Pro because I don't like some of them. In addition, I designed some new variants inspired by other color schemes.
Features
- High contrast but within acceptable range.
- Vivid colors.
- Customizable.
- Rich support for common file types and plugins.
- Italic support ๐
Installation
Via Plugin Manager
Take vim-plug for example:
Plug 'sainnhe/sonokai'
For better syntax highlighting support, please install sheerun/vim-polyglot.
Manually
- Clone this repository.
- Copy
/path/to/sonokai/colors/sonokai.vim
to~/.vim/colors/
. - To install airline theme, copy
/path/to/sonokai/autoload/airline/themes/sonokai.vim
to~/.vim/autoload/airline/themes/
. - To install lightline theme, copy
/path/to/sonokai/autoload/lightline/colorscheme/sonokai.vim
to~/.vim/autoload/lightline/colorscheme/
.
Usage
Vim
Put this in your vimrc:
" important!! set termguicolors " the configuration options should be placed before `colorscheme sonokai` let g:sonokai_style = 'andromeda' let g:sonokai_enable_italic = 1 let g:sonokai_disable_italic_comment = 1 colorscheme sonokai
See Configuration for more configuration options.
If you want to apply this color scheme temporarily, run this command in vim(this may cause colors to break):
:colorscheme sonokai
Airline
To enable airline color scheme, put this in your vimrc:
let g:airline_theme = 'sonokai'
To apply it without reloading:
:AirlineTheme sonokai
Lightline
To enable lightline color scheme, put this in your vimrc:
let g:lightline = {} let g:lightline.colorscheme = 'sonokai' " or this line let g:lightline = {'colorscheme' : 'sonokai'}
To apply it without reloading:
:let g:lightline.colorscheme = 'sonokai' :call lightline#init() :call lightline#colorscheme()
Configuration
Note: The configuration options should be placed before colorscheme sonokai
.
g:sonokai_style
: Customize the style of this color scheme.- Available values:
'shusia'
,'andromeda'
,'atlantis'
,'maia'
- Default value:
'shusia'
- Available values:
g:sonokai_transparent_background
: Set to1
to enable transparent background.- Available values:
0
,1
- Default value:
0
- Available values:
g:sonokai_menu_selection_background
: Control the background color ofPmenuSel
andWildMenu
.- Available values:
'green'
,'red'
,'blue'
- Default value:
'green'
- Available values:
g:sonokai_disable_italic_comment
: Set to1
to disable italic inComment
.- Available values:
0
,1
- Default value:
0
- Available values:
g:sonokai_enable_italic
: Set to1
to italicize keywords. This option is designed to use with fonts that support cursive italic styles, for example Fira Code iCursive Op.- Available values:
0
,1
- Default value:
0
- Available values:
g:sonokai_current_word
: Some plugins can highlight the word under current cursor(for example neoclide/coc-highlight), you can use this option to control their behavior.- Available values:
'bold'
,'underline'
,'italic'
,'grey background'
- Default value:
'grey background'
when not in transparent mode,'bold'
when in transparent mode.
- Available values:
g:sonokai_lightline_disable_bold
: Set to1
to disable bold in lightline theme.- Available values:
0
,1
- Default value:
0
- Available values:
FAQ
Q: It doesn't work as expected.
A:
- This color scheme is mainly designed for true colors,
set termguicolors
is 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 colors 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: How to enable cursive italic keywords?
A:
- Install a font that supports cursive italics, for example icursive-nerd-font.
- Enable italic keywords in this color scheme:
let g:sonokai_enable_italic = 1
- Disable italic comment(optional):
let g:sonokai_disable_italic_comment = 1
Related Projects
Inspiration
License
MIT ยฉ sainnhe
Recommend
-
106
vim-color-spring-night - Calm&low-contrast spring color scheme for Vim
-
98
README.md ?????? ?????
-
409
README.md ??????? ??????? ????????
-
19
Join GitHub today GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
-
30
README.md ๐ ๐จ๐ซ๐๐ฌ๐ญ ๐๐ข๐ ๐ก๐ญ
-
7
Vivid โ Vibrant Ink & Paint Experiments from Chroma Supply February 3, 2021 ...
-
46
๐๐ฏ๐๐ซ๐๐จ๐ซ๐๐ฌ๐ญ ๐๐๐ซ๐ค ๐๐ข๐ ๐ก๐ญ ๐๐๐ซ๐ ๐๐๐๐ข๐ฎ๐ฆ ๐๐จ๐๐ญ Introduction Everforest is a green based color scheme, it's designed to be warm and soft in order to protect developers' eyes. Features Green based but warm...
-
19
๐๐๐ ๐ ๐๐๐ ๐ ๐๐๐ซ๐ค ๐๐๐ ๐ ๐๐๐ซ๐ค (๐๐ฎ๐ซ๐) ๐๐๐ ๐ ๐๐๐ซ๐ค (๐๐๐จ๐ง) ๐๐๐ ๐ ๐๐ข๐ ๐ก๐ญ This color scheme is heavily inspired by Atom One
-
4
Vivid Money raises $73 million to build a European financial super app German startupย Vivid Moneyย has raised a new $73 million Series B funding round (โฌ60 million)...
-
3
4K USB-C with a twist โ IPS Black brings impressive contrast and vivid colors to Dellโsย UltraSharpย U2723QE Great port selection, clean looks, and a more vibrant picture tha...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK