Skip to content
/ snow Public

a blue-tinted winter vimscape (vim theme/colorscheme)

Notifications You must be signed in to change notification settings

Mitgorakh/snow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snow

a blue-tinted winter vimscape


screenshot of the snow vim theme, light version


screenshot of the snow vim theme, dark version

background
snowy noon
name
icewine red-purple
background
snowy midnight
highlight
snowy day
type
poinsettia red
highlight
snowy night
comment
snowy dusk
special
lichen gold
comment
snowy dusk
text
snowy twilight
statement
conifer green
text
snowy evening
cursor
snowy night
meta-statement
iceberg green-blue
cursor
snowy day
search
light lichen
constant
frost blue
search
dark icewine

because red is the color of life, reddish text is for...

     names, which give life to abstractions (like variables and functions)

     types ("meta-names" ), such as variable type (int, char...) or storage class (static, register...)


because gold is a special color, gold text is for...

     specials (elements that unlock special features), such as delimiters and debug statements


because green is the color of proceeding with action, greenish text is for...

     statements (the magic "action words" of code), such as conditions (if, then...) or loops (for, do...)

     meta-statements ("meta-actions", or "meta-magic" ), such as macros and "include module" statements


because blue is the calm color of sea and sky, evoking enduring constancy, blue text is for...

     constants (values that are fixed in place), such as booleans, integers, and strings

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:

airline lightline
light let g:airline_theme='snow_light' let g:lightline = { 'colorscheme': 'snow_light' }
dark let g:airline_theme='snow_dark' let g:lightline = { 'colorscheme': 'snow_dark' }

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.


released under the MIT license
generated with Colortemplate
snowflake macrophoto by Olga & Alexey (CC BY-NC 2.0)

About

a blue-tinted winter vimscape (vim theme/colorscheme)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published