Snow
a blue-tinted winter vimscape (vim theme/colorscheme)
Install / Use
/learn @Mitgorakh/SnowREADME
because <img height="16" src='https://github.com/nightsense/snow/raw/master/images/red.png' /> red is the color of life, reddish text is for...
<img src="http://www.colorhexa.com/a6569c.png" height='12' width='12'> names, which give life <img height="9" src='https://github.com/nightsense/snow/raw/master/images/name.png' /> to abstractions (like variables and functions)
<img src="http://www.colorhexa.com/bc4b48.png" height='12' width='12'> types ("meta-names" <img height="15" src='https://github.com/nightsense/snow/raw/master/images/type.png' />), such as variable type (int, char...) or storage class (static, register...)
<br>because <img height="16" src='https://github.com/nightsense/snow/raw/master/images/gold.png' /> gold is a special color, gold text is for...
<img src="http://www.colorhexa.com/907015.png" height='12' width='12'> specials (elements that unlock <img height="16" src='https://github.com/nightsense/snow/raw/master/images/special.png' /> special features), such as delimiters and debug statements
<br>because <img height="15" src='https://github.com/nightsense/snow/raw/master/images/green.png' /> green is the color of proceeding with action, greenish text is for...
<img src="http://www.colorhexa.com/438138.png" height='12' width='12'> statements (the magic <img height="11" src='https://github.com/nightsense/snow/raw/master/images/statement.png' /> "action words" of code), such as conditions (if, then...) or loops (for, do...)
<img src="http://www.colorhexa.com/008685.png" height='12' width='12'> meta-statements ("meta-actions", or "meta-magic" <img height="16" src='https://github.com/nightsense/snow/raw/master/images/meta-statement.png' />), such as macros and "include module" statements
<br>because <img height="14" src='https://github.com/nightsense/snow/raw/master/images/blue.png' /> blue is the calm color of sea and sky, evoking enduring constancy, blue text is for...
<img src="http://www.colorhexa.com/0779c5.png" height='12' width='12'> constants (values that are fixed <img height="22" src='https://github.com/nightsense/snow/raw/master/images/constant.png' /> in place), such as booleans, integers, and strings
</td> </tbody></table>installation
If you don’t have a preferred plugin helper, consider trying vim-plug, which can be installed (on Unix-like systems) with:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Having installed vim-plug, snow can be installed by adding the following to the top of your vimrc...
call plug#begin('~/.vim/plugged')
Plug 'nightsense/snow'
call plug#end()
...then restarting vim, followed by running :PlugUpdate (at the vim command line).
activation
For a snow day, add the following to vimrc:
colorscheme snow
set background=light
For a snowy evening:
colorscheme snow
set background=dark
To set the background automatically based on the time at which vim is launched:
colorscheme snow
if strftime('%H') >= 7 && strftime('%H') < 19
set background=light
else
set background=dark
endif
...which activates the light version of snow during the day (defined here as 7AM-7PM), dark version at night.
The night-and-day plugin can switch themes and/or backgrounds automatically, using absolute or sun-relative time.
status line themes
snow comes with themes for airline and lightline, which can be activated with the following vimrc code:
<table><tbody align='center'> <tr> <td width='88'></td> <td width='340'><strong>airline</strong></td> <td width='470'><strong>lightline</strong></td> </tr> <tr> <td><strong>light</strong></td> <td><code>let g:airline_theme='snow_light'</code></td> <td><code>let g:lightline = { 'colorscheme': 'snow_light' }</code></td> </tr> <tr> <td><strong>dark</strong></td> <td><code>let g:airline_theme='snow_dark'</code></td> <td><code>let g:lightline = { 'colorscheme': 'snow_dark' }</code></td> </tr> </tbody></table>Status line themes can be added to the time-based snippet above:
colorscheme snow
if strftime('%H') >= 7 && strftime('%H') < 19
set background=light
let g:lightline = { 'colorscheme': 'snow_light' }
else
set background=dark
let g:lightline = { 'colorscheme': 'snow_dark' }
endif
terminal vim
colors
Terminals/multiplexers with true-color support (see list) can display the exact snow colors.
In most cases, the only vimrc setting you need is:
set termguicolors
In some cases you'll also need:
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
If termguicolors is not set, terminal vim will fall back to an xterm-color approximation of snow.
cursor shape
To set mode-specific cursor shapes in terminal vim, see the Vim Tips Wiki.
For instance, to set cursor shapes in vte-compatible terminals, 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.
