|
|
||||||
Normal bg |
Identifier |
Normal bg |
|||||
ColorColumn |
Special |
ColorColumn |
|||||
MatchParen |
Statement |
MatchParen |
|||||
Comment |
PreProc |
Comment |
|||||
Normal fg |
Constant |
Normal fg |
|||||
Cursor |
Type |
Cursor |
|||||
Search |
Spell |
Search |
|||||
All colors are derived from the average color of the universe See the snow repository for syntax highlighting color logic. |
If you don’t have a preferred plugin management method, consider vim-plug, which can be installed (on *nix systems) with:
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
With vim-plug, cosmic_latte can be installed by adding the following to the top of your vimrc:
call plug#begin('~/.vim/plugged')
Plug 'nightsense/cosmic_latte'
call plug#end()
...then restarting vim, followed by running :PlugUpdate
(at the vim command line).
To activate the light version of cosmic_latte:
set background=light
colorscheme cosmic_latte
Or the dark version:
set background=dark
colorscheme cosmic_latte
To set the version automatically based on vim launch time:
if strftime('%H') >= 7 && strftime('%H') < 19
set background=light
else
set background=dark
endif
colorscheme cosmic_latte
...which activates the light version during the day (defined here as 7AM-7PM), dark version at night.
Be sure to set
colorscheme
afterbackground
, otherwise some theme colors may not be applied.
Themes for airline and lightline can be activated with the following vimrc code:
airline | lightline |
let g:airline_theme='cosmic_latte_light' |
let g:lightline = { 'colorscheme': 'cosmic_latte_light' } |
let g:airline_theme='cosmic_latte_dark' |
let g:lightline = { 'colorscheme': 'cosmic_latte_dark' } |
Status line themes can be added to the time-based snippet above:
if strftime('%H') >= 7 && strftime('%H') < 19
set background=light
let g:lightline = { 'colorscheme': 'cosmic_latte_light' }
else
set background=dark
let g:lightline = { 'colorscheme': 'cosmic_latte_dark' }
endif
colorscheme cosmic_latte
Terminals/multiplexers with true-color support can precisely display the theme colors.
In most cases, the only required vimrc setting is:
set termguicolors
In some cases (see :h xterm-true-color
for explanation) it may be necessary to add:
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 a rough approximation of the theme, drawing from the terminal emulator's 256-color palette (if present).
The fallback version of cosmic_latte defines colors using numbers in the range 0-255 (as opposed to 6-character hex codes, whose range of 224 values provides "true color"). Terminal emulators with 256-color support understand this encoding, though they vary in the exact color associated with each number. The closest thing to a standard 256-color *nix palette is that used by xterm, the default X Windows terminal emulator.
To set mode-specific cursor shapes in terminal vim, see the Vim Tips Wiki.
For instance, to set cursor shapes in vte-compatible terminals:
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.
Many terminal emulators (including iTerm2, GNOME Terminal, Pantheon Terminal, MATE Terminal, Xfce Terminal, LXTerminal, Terminator, Guake, Alacritty, and kitty) can be themed by sourcing the color-setting shell scripts included with cosmic_latte. You can download these scripts directly to a folder of your choosing, and source them from there; or, if cosmic_latte is already installed as a vim plugin, you can source them from the vim plugin path (which varies by plugin management method).
For instance, if you use vim-plug and want to apply the dark cosmic_latte theme to your bash or zsh shell, add the following to ~/.bashrc
or ~/.zshrc
:
[ -n "$PS1" ] && sh ~/.vim/plugged/cosmic_latte/shell/cosmic_latte_dark.sh
Or for the fish shell, add to ~/.config/fish/config.fish
:
if status --is-interactive
sh ~/.vim/plugged/cosmic_latte/shell/cosmic_latte_dark.sh
end
If you use vundle, replace plugged
in the above paths with bundle
.
Replace dark
with light
for the light theme.
Color output (for distinguishing file types) of the ls
command can be themed by sourcing the included "dircolors" file. The path to this file will depend on your vim plugin management method.
For instance, if you use vim-plug and want to apply the cosmic_latte dircolors to your bash or zsh shell, add the following to ~/.bashrc
or ~/.zshrc
:
eval `dircolors ~/.vim/plugged/cosmic_latte/shell/dircolors`
Or for the fish shell, add to ~/.config/fish/config.fish
:
eval (dircolors -c ~/.vim/plugged/cosmic_latte/shell/dircolors)
If you use vundle, replace plugged
in the above paths with bundle
.
Again, the script path will depend on your plugin management method.
For the dark theme in a vim-plug setup, add to ~/.config/fish/config.fish
:
source ~/.vim/plugged/cosmic_latte/shell/cosmic_latte_dark.fish
- put these files somewhere in your
load-path
: dash.el + cosmic_latte_light.el | cosmic_latte_dark.el- for instance, you could put them in
~/.emacs.d/load
- and put
(add-to-list 'load-path "~/.emacs.d/load")
in yourinit.el
- for instance, you could put them in
- put these files in
~/.emacs.d/themes
: cosmic_latte_light-theme.el | cosmic_latte_dark-theme.el - put
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
in yourinit.el
- load cosmic_latte manually with
M-x load-theme
- or automatically with
(load-theme 'cosmic_latte_light' t)
in yourinit.el
, for the light version - or
(load-theme 'cosmic_latte_dark' t)
for the dark version
- or automatically with
This emacs theme is, for now, simply a find/replace conversion of bbatsov/solarized-emacs.
- download theme file (light | dark)
- for TextMate: double-click the file to install and activate it
- the theme will become available in Preferences > Fonts & Colors
- for Sublime Text:
- find your Packages folder by opening Sublime Text and navigating: Preferences > Browse Packages...
- e.g.
~/.config/sublime-text-3/Packages/User/
- e.g.
- place theme file in Packages folder
- activate from the list at: Preferences > Color Scheme...
- find your Packages folder by opening Sublime Text and navigating: Preferences > Browse Packages...
This theme is, for now, simply a find/replace conversion of deplorableword/textmate-solarized.
- add contents of theme file (light | dark) to your
styles.less
- you can open this file from Atom by navigating: Edit > Preferences > Themes > "your stylesheet"
- alternatively, save the theme file somewhere else and add an @import to
styles.less
- e.g.
@import "/home/username/.atom/cosmic_latte_light.less";
- e.g.
These themes are based on One Light/Dark Syntax.