Skip to content

tkntjsdw/srcery-vim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Check Them Vim Files

Color scheme with clearly defined contrasting colors and a slightly earthy tone.

Requirements

GUI

You don’t need to do anything for this colorscheme to work in gVim or MacVim.

TUI

To use Srcery in the terminal you need to change your terminal emulator’s so-called “ASCII” colors to the ones in the table below. There's a list of terminal configurations in the srcery-terminal repository.

TERMCOL NR VAR HEX RGB IMG
black 0 g:srcery_black #1C1B19 28, 27, 25 black
red 1 g:srcery_red #EF2F27 239, 47, 39 red
green 2 g:srcery_green #519F50 81, 159, 80 green
yellow 3 g:srcery_yellow #FBB829 251, 184, 41 yellow
blue 4 g:srcery_blue #2C78BF 44, 120, 191 blue
magenta 5 g:srcery_magenta #E02C6D 224, 44, 109 magenta
cyan 6 g:srcery_cyan #0AAEB3 10, 174, 179 cyan
white 7 g:srcery_white #BAA67F 186, 166, 127 white
brightblack 8 g:srcery_bright_black #918175 145, 129, 117 bright_black
brightred 9 g:srcery_bright_red #F75341 247, 83, 65 bright_red
brightgreen 10 g:srcery_bright_green #98BC37 152, 188, 55 bright_green
brightyellow 11 g:srcery_bright_yellow #FED06E 254, 208, 110 bright_yellow
brightblue 12 g:srcery_bright_blue #68A8E4 104, 168, 228 bright_blue
brightmagenta 13 g:srcery_bright_magenta #FF5C8F 255, 92, 143 bright_magenta
brightcyan 14 g:srcery_bright_cyan #2BE4D0 43, 228, 208 bright_cyan
brightwhite 15 g:srcery_bright_white #FCE8C3 252, 232, 195 bright_white

Additionally Srcery uses some xterm 256 colors to pad out the color selection, no extra configuration needed.

NAME NR VAR HEX RGB IMG
orange 202 g:srcery_orange #FF5F00 255, 95, 0 orange
bright_orange 208 g:srcery_bright_orange #FF8700 255, 135, 0 bright_orange
hard_black 233 g:srcery_hard_black #121212 18, 18, 18 hard_black
xgray1 235 g:srcery_xgray1 #262626 38, 38, 38 xgray1
xgray2 236 g:srcery_xgray2 #303030 48, 48, 48 xgray2
xgray3 237 g:srcery_xgray3 #3A3A3A 58, 58, 58 xgray3
xgray4 238 g:srcery_xgray4 #444444 68, 68, 68 xgray4
xgray5 239 g:srcery_xgray5 #4E4E4E 78, 78, 78 xgray5
xgray6 240 g:srcery_xgray6 #585858 88, 88, 88 xgray6

Installation

Manually

Put srcery.vim in ~/.vim/colors/ (on unix-like systems) or %userprofile%\vimfiles\colors\ (on Windows).

Vim 8

Vim 8 has native support for loading plugins. All you need to do to is to clone this repository into ~/.vim/pack/default/opt.

git clone https://github.com/srcery-colors/srcery-vim ~/.vim/pack/default/opt/srcery-vim

The same works for Neovim, but you have to clone it into a path where Neovim can find it.

git clone https://github.com/srcery-colors/srcery-vim ~/.config/nvim/plug/default/opt/srcery-vim
call dein#add('srcery-colors/srcery-vim')
cd ~/.vim/bundle
git clone https://github.com/srcery-colors/srcery-vim
Plug 'srcery-colors/srcery-vim'
  use {'srcery-colors/srcery-vim', as = 'srcery'}

Usage

:color srcery

If you like what you see and decide to make srcery your default colorscheme, add the relevant line to your .vimrc:

colorscheme srcery

Configuration

Srcery includes a few toggles due to discrepancies in the various setups possible. To change any of these you'd put something like this in your .vimrc

let g:srcery_italic = 1

Make sure that you set these variables before assigning colorscheme.

Colors

You can customize each of Srcery's colors, to customize say the red color:

let g:srcery_red = '#FF0000'

Refer to the table for a full list of color variables, hexes and more.

This will only work on set termguicolors and in gVim, to override terminal colors, do so in your terminal configuration.

Options

g:srcery_bold

Enables bold text.

Default: 1

g:srcery_italic

Enables italic text.

Default: gui 1, term 0

g:srcery_underline

Enables underlined text.

Default: 1

g:srcery_undercurl

Enables undercurled text.

Default: 1

g:srcery_inverse

Enable or disable inverse highlighting (foreground becomes background, vice versa). This is used for visual selection, search highlights and some other things.

Srcery will fall back to other methods of highlighting if this is disabled.

Default: 1

g:srcery_inverse_matches

Highlight search matches using inverse colors.

Default: 0

g:srcery_inverse_match_paren

When enabled will highlight matching delimiters using inverse colors. (:DoMatchParen)

Works best with Rainbow parenthesis.

Default: 0

g:srcery_dim_lisp_paren

Dims lisp dialects delimiters to a fairly dark gray (xgray5 specifically).

Default: 0

g:srcery_bg_passthrough

Lets the terminal control the background color in Vim by setting the background to NONE.

A possible use case for this could be you want to manipulate the background color in the terminal, and let the results bubble up to Vim, like this.

This is a bit of an experimental option, and can cause issues in certain terminals.

Default: 0

g:srcery_guisp_fallback

Sets up alternate highlighting for colored underline/undercurl. Some environments are unable to color underline, so this setting will set either the background or foreground to whatever color the underline is supposed to be.

This comes in handy if colored underline doesn't work, or underline is disabled entirely.

Default: 'NONE'

Possible Values: 'fg', 'bg'

g:srcery_italic_types

Italicize types if italic is enabled.

Default: 0

g:srcery_hard_black_terminal_bg

If enabled, will set the terminal background in vim to hard black. Note that this currently only works in Vim, not Neovim.

Default: 1

Screenshots

viml, bash viml_bash

clojure, elisp lisp

c, rust c_rust

python, js py_js

git, terminal git_term

Typeface used in screenshots is Iosevka

Plugin support

Lightline

lightline

Lightline colorscheme. To use it, include 'srcery' value in lightline configuration, like so:

let g:lightline = {
      \ 'colorscheme': 'srcery',
      \ }

Airline

airline

Thanks to MindTooth, Srcery now includes an Airline theme.

Other

These don't require any additional configuration.

Plugin support is still a work in progress and more will come, if there is anything missing that you'd like to add please open an issue and let me know.

Attribution

This project started as essentially a palette swap of Gruvbox and all credit goes to the maintainers of that fantastic color scheme. I wanted something a bit sharper, but I loved the syntax color choices of Gruvbox. I also tried to make the theme as simple to use as possible, which was inspired by Flattened. Other themes that influenced Srcery:

Troubleshooting

Colors don't look right

Ensure that 256 colors are enabled in vim by setting this option before setting the colorscheme.

set t_Co=256

24-bit color, tmux and Neovim

If you want to use GUI colors in terminal make sure that tmux pass through 24-bit color codes. For example, if you use Termite add it to the terminal overrides setting:

set -ga terminal-overrides ",xterm-termite:Tc"

For other terminals, replace xterm-termite with the relevant terminal type. (stored in $TERM).

See Arch wiki and this issue.

Extra

Emacs

Check out srcery-emacs

About

Dark colorscheme for gvim and vim

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Vim Script 100.0%