The solarized theme, inspired by reading a book under |
If you don’t have a preferred plugin helper, consider trying vim-plug, which can be installed with:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
With vim-plug, stellarized can be installed by adding the following to the top of your vimrc...
call plug#begin('~/.vim/plugged')
Plug 'nightsense/stellarized'
call plug#end()
...then reloading vimrc (by running :so %
at the vim command line, or by restarting vim), followed by :PlugUpdate
.
For a sunny day, add the following to vimrc:
colorscheme stellarized
set background=light
For a starry night:
colorscheme stellarized
set background=dark
If you'd like the background to switch automatically at sunrise/set (or any other time), consider trying night-and-day.
stellarized should work in 256-color and true-color terminals. You may need the following in vimrc:
set termguicolors
To set mode-specific cursor shapes in terminal vim, see the Vim Tips Wiki.
For instance, to set cursor shapes in vte-compatible terminals (like urxvt), you could add to vimrc:
let &t_SI = "\<Esc>[6 q"
let &t_SR = "\<Esc>[4 q"
let &t_EI = "\<Esc>[2 q"
...which sets the cursor to a vertical line for insert mode, underline for replace mode, and block for normal mode.
stellarized comes with themes for airline and lightline. A separate theme is provided for each variant+background.
For instance, to activate the dark airline theme:
let g:airline_theme='stellarized_dark'
For lightline:
let g:lightline = { 'colorscheme': 'stellarized_dark' }
dark
can be replaced with light
.