Vim-atomic is a dark & light color scheme designed to use on vim, gvim and neovim. It consists of 16 colors selected procedurally (algorithms) and it's part of a bigger project: Atomic, which also includes themes and color schemes for terminals (URxvt, XTerm) and some terminal programs (tmux, zsh, irssi, cmus).
Atomic has support for 8, 16 and 256 colors, and True Color (24 bits) on the last versions of vim, gvim, neovim and nvim-qt. It uses the setting termguicolors
properly (some color schemes don't).
It also includes 7 modes of color (6 darks and 1 light):
Each mode has 3 contrasts:
atomic.vim
to your ~/.vim/colors/
directory (for vim) or ~/.config/nvim/colors/
directory (for neovim).$ cd vim-atomic
$ cp atomic.vim ~/.vim/colors/
.vimrc
file:
Plug 'gerardbm/vim-atomic'
:source $MYVIMRC
:PlugInstall
.vimrc
configuration file:
syntax enable
colorscheme atomic
If your terminal does not support True color, you can take a look at the main Atomic repository to see if Atomic colors are available for your terminal and how to install them.
If your terminal supports True color (1), you can enable it configuring your ~/.vimrc
file with the setting set termguicolors
(2) before the color scheme definition (colorscheme atomic
).
See https://gist.github.com/XVilka/8346728 for a list of terminals that support True color.
Sometimes setting termguicolors
is not enough and one has to set the t_8f
and t_8b
options explicitly, also before the color scheme definition:
if has("termguicolors")
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
Use it when $TERM
is not xterm
, for example, running vim into tmux or using a terminal with different $TERM
, like st case.
More info, see :h xterm-true-color
.
If your terminal have True color support or if you are using a GUI (like gvim or nvim-qt), you have the following commands to switch between the different color palettes:
AtomicSpaceHC
: sets the space mode (blue hue, dark background) in hard contrast (+3%).AtomicSpaceMC
: sets the space mode (blue hue, dark background) in medium contrast (default).AtomicSpaceLC
: sets the space mode (blue hue, dark background) in hard contrast (-3%).AtomicOnionHC
: sets the onion mode (purple hue, dark background) in hard contrast (+3%).AtomicOnionMC
: sets the onion mode (purple hue, dark background) in medium contrast (default).AtomicOnionLC
: sets the onion mode (purple hue, dark background) in hard contrast (-3%).AtomicBloodHC
: sets the blood mode (red hue, dark background) in hard contrast (+3%).AtomicBloodMC
: sets the blood mode (red hue, dark background) in medium contrast (default).AtomicBloodLC
: sets the blood mode (red hue, dark background) in hard contrast (-3%).AtomicNightHC
: sets the night mode (orange hue, dark background) in hard contrast (+3%).AtomicNightMC
: sets the night mode (orange hue, dark background) in medium contrast (default).AtomicNightLC
: sets the night mode (orange hue, dark background) in hard contrast (-3%).AtomicGrassHC
: sets the grass mode (green hue, dark background) in hard contrast (+3%).AtomicGrassMC
: sets the grass mode (green hue, dark background) in medium contrast (default).AtomicGrassLC
: sets the grass mode (green hue, dark background) in hard contrast (-3%).AtomicOceanHC
: sets the ocean mode (cyan hue, dark background) in hard contrast (+3%).AtomicOceanMC
: sets the ocean mode (cyan hue, dark background) in medium contrast (default).AtomicOceanLC
: sets the ocean mode (cyan hue, dark background) in hard contrast (-3%).AtomicLightHC
: sets the light mode (orange hue, light background) in hard contrast (+3%).AtomicLightMC
: sets the light mode (orange hue, light background) in medium contrast (default).AtomicLightLC
: sets the light mode (orange hue, light background) in hard contrast (-3%).Use one of them after the color scheme definition in your ~/.vimrc
or ~/.gvimrc
.
Switch them automatically depending on the current time. For example, if you would like to use the AtomicLightHC between 8 am and 8 pm and switch to AtomicNightHC at night, simply paste this in your ~/.vimrc
or ~/.gvimrc
:
function! AtomicSwitcher()
if (strftime('%H') > 8) && (strftime('%H') < 20)
AtomicLightHC
else
AtomicNightHC
endif
endfunction
Alternatively, you can cycle them (from 1 to 21) with a shortcut (for example: Shift+F9). Paste this in your ~/.vimrc
or ~/.gvimrc
:
nnoremap <S-F9> :call CycleModes()<CR>:colorscheme atomic<CR>
Some terminals don't handle italics correctly, so in case you need to disable italics set let g:atomic_italic=0
in your ~/.vimrc
, before the color scheme definition.
Full list of options to disable italic text, bold, underline and undercurl:
let g:atomic_italic = 0
let g:atomic_bold = 0
let g:atomic_underline = 0
let g:atomic_undercurl = 0
If this options are not defined, default value is 1 for all of them.
By default, Atomic will use an orange color to highlight the background for MatchParen
. To use the orange color for the foreground instead, use the following option:
let g:atomic_matchparen = 0
As with emphasis cases, add this to your ~/.vimrc
, before the color scheme definition.
if has("termguicolors")
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
syntax enable
let g:atomic_italic = 0
colorscheme atomic
AtomicNightMC