vim-code-dark
is a dark color scheme for Vim heavily inspired by the look of the Dark+ scheme of Visual Studio Code. While many of the colors are same, there are additional colors for specific usage or reserved for future use. The scheme also defines specific GUI colors (e.g. popup menu) and fully supports vim-airline
.
โ To install and enable this colorscheme, read installation instructions.
This colorscheme does also support 256 and 8/16 color terminals. See installation instructions step 3.
Simply as any other Vim plugins: download manually or follow the standard procedure of your plugin manager:
Plugin 'tomasiser/vim-code-dark'
Plug 'tomasiser/vim-code-dark'
# Regular Vim
mkdir -p ~/.vim/pack/themes/start
cd ~/.vim/pack/themes/start
git clone https://github.com/tomasiser/vim-code-dark
# Neovim
mkdir -p ~/.local/share/nvim/site/pack/themes/start
cd ~/.local/share/nvim/site/pack/themes/start
git clone https://github.com/tomasiser/vim-code-dark
Add the following line to your .vimrc
:
colorscheme codedark
๐ The colorscheme will work out of the box. No need to setup anything else!
If your terminal supports 256 colors (see this script if you want to test your terminal), you may need to set t_Co
to 256 and possibly also reset the t_ut
value in your .vimrc
before setting the colorscheme:
set t_Co=256
set t_ut=
colorscheme codedark
(Additionally, if you don't want to or cannot use t_Co
, you can let g:codedark_term256=1
.)
โ Before following those steps, first try step 3.2) - maybe your terminal does support 256 colors!
If your terminal does not support 256 colors, you may want to change your terminal colors:
Clone base16-shell
into ~/.config/base16-shell
:
git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell
Then copy a script from this (vim-code-dark
) repository (base16/templates/shell/scripts/base16-codedark.sh
) into ~/.config/base16-shell/scripts
.
Following the instructions from base16-shell
, you should now modify your ~/.bashrc
or ~/.zshrc
(depending on your shell) and insert the following lines:
BASE16_SHELL=$HOME/.config/base16-shell/
[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"
Now start a new shell and type the following command: base16_codedark
.
You should now be able to use Vim with your new colorscheme.
PuTTY should actually support 256 colors, try following steps on StackOverflow. If it does not work, run base16/templates/putty/putty/base16-codedark.reg
to modify your registry, then run PuTTY and load codedark
in the session list. This will modify your PuTTY terminal colors.
โ To enable any of the following customizations, put the specific lines before setting the colorscheme
" If you don't like many colors and prefer the conservative style of the standard Visual Studio
let g:codedark_conservative=1
" If you like the new dark modern colors (Needs feedback!)
let g:codedark_modern=1
" Activates italicized comments (make sure your terminal supports italics)
let g:codedark_italics=1
" Make the background transparent
let g:codedark_transparent=1
" If you have vim-airline, you can also enable the provided theme
let g:airline_theme = 'codedark'
colorscheme codedark
Try resetting the t_ut
value in your .vimrc
as described here:
set t_Co=256
set t_ut=
colorscheme codedark
Pull requests are welcome! Feel free to send one with an explanation!
Because Vim uses different syntax rules. This is just a colorscheme for vim, not a syntax definition.
There are a lot of syntax definitions with different highlight groups. Feel free to send a pull request with additional highlight groups!
Screenshots come from gVim on Windows with the following font options and vim-airline
enabled.
set enc=utf-8
set guifont=Powerline_Consolas:h11
set renderoptions=type:directx,gamma:1.5,contrast:0.5,geom:1,renmode:5,taamode:1,level:0.5