This color scheme is heavily inspired by Atom One and Material, I'm trying to combine my favorite designs of them in this color scheme.
- Vivid colors.
- Designed to have a soft contrast for eye protection.
- Customizable.
- Rich support for common file types and plugins.
- Italic support 🎉
Take vim-plug for example:
Plug 'sainnhe/edge'
For better syntax highlighting support, please install sheerun/vim-polyglot.
- Clone this repository.
- Copy
/path/to/edge/colors/*
to~/.vim/colors/
. - To install airline theme, copy
/path/to/edge/autoload/airline/themes/*
to~/.vim/autoload/airline/themes/
. - To install lightline theme, copy
/path/to/edge/autoload/lightline/colorscheme/*
to~/.vim/autoload/lightline/colorscheme/
.
Put this in your vimrc:
" important!!
set termguicolors
" for dark version
set background=dark
" for light version
set background=light
" the configuration options should be placed before `colorscheme edge`
let g:edge_style = 'neon'
let g:edge_disable_italic_comment = 1
colorscheme edge
See 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 edge
To enable airline color scheme, put this in your vimrc:
let g:airline_theme = 'edge'
To apply it without reloading:
:AirlineTheme edge
To enable lightline color scheme, put this in your vimrc:
let g:lightline = {}
let g:lightline.colorscheme = 'edge'
" or this line
let g:lightline = {'colorscheme' : 'edge'}
To apply it without reloading:
:let g:lightline.colorscheme = 'edge'
:call lightline#init()
:call lightline#colorscheme()
Note: The configuration options should be placed before colorscheme edge
.
g:edge_style
: Customize the style of this color scheme.- Available values:
'default'
,'aura'
,'neon'
- Default value:
'default'
- Available values:
g:edge_transparent_background
: Set to1
to enable transparent background.- Available values:
0
,1
- Default value:
0
- Available values:
g:edge_menu_selection_background
: Control the background color ofPmenuSel
andWildMenu
.- Available values:
'blue'
,'green'
,'purple'
- Default value:
'blue'
- Available values:
g:edge_disable_italic_comment
: Set to1
to disable italic inComment
.- Available values:
0
,1
- Default value:
0
- Available values:
g:edge_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:edge_cursor
: Customize the cursor color, only works in GUI clients.- Available values:
'auto'
,'red'
,'green'
,'blue'
,'purple'
- Default value:
'auto'
- Available values:
g:edge_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:edge_lightline_disable_bold
: Set to1
to disable bold in lightline theme.- Available values:
0
,1
- Default value:
0
- Available values:
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:edge_enable_italic = 1
- Disable italic comment(optional):
let g:edge_disable_italic_comment = 1
Q: What's your status line configuration?
A: See this article.
- manfredmjka: termite and fzf support