Apprentice

Apprentice is a dark, low-contrast colorscheme for Vim based on the awesome Sorcerer by Jeet Sukumaran.

It is essentially a streamlined version of the original, with a reduced number of colors entirely taken from the default xterm palette to ensure a similar look in 256colors-ready terminal emulators and GUI Vim.

Some code in MacVim:

MacVim

Some code in iTerm, with TERM=xterm-256color:

iTerm, xterm-256color

Some code in mintty on Windows 7, with TERM=xterm-256color:

mintty, xterm-256color

Some code in iTerm, with TERM=xterm, using the tango color palette:

iTerm, xterm, tango

Preparing your environment.

Apprentice is designed first and foremost to look “good” in terminal emulators supporting 256 colors and in GUI Vim (GVim/MacVim). It supports lesser terminal emulators in the sense that it doesn’t break but it will definitely look “better” in more capable environments.

GVim/MacVim

There is nothing to do for GVim/MacVim as GUI Vim supports millions of colors by default.

256color-ready Terminal emulators

Most terminal emulators in use nowadays can display 256 colors but most of them use a default TERM that tells Vim otherwise. Assuming your terminal emulator actually supports 256 colors, you must instruct it to brag about its terminal-hood by setting the correct TERM environment variable.

The “ideal” TERM usually includes the string 256color, like xterm-256color. The actual value is highly dependent on your terminal emulator and/or your terminal multiplexer, though, so you will have to refer to their manual.

Working with 8/16 colors

As an alternative to changing your default TERM to xterm-256color or similar, you can keep its default value (usually something like xterm or screen) and set your terminal emulator to use the Apprentice colorscheme instead of its default colors.

The table below contains a subset of Apprentice’s palette. You can use a color picker or copy/paste these values:

Intensity Normal Intensity Bright
0#1C1C1C8#444444
1#AF5F5F9#FF8700
2#5F875F10#87AF87
3#87875F11#FFFFAF
4#5F87AF12#8FAFD7
5#5F5F8713#8787AF
6#5F878714#5FAFAF
7#6C6C6C15#FFFFFF
Foreground color#BCBCBCBackground color#262626

Here is a sample ~/.Xresources for you Linux/BSD users:

*.foreground: #BCBCBC
*.background: #262626
*.color0:     #1C1C1C
*.color8:     #444444
*.color1:     #AF5F5F
*.color9:     #FF8700
*.color2:     #5F875F
*.color10:    #87AF87
*.color3:     #87875F
*.color11:    #FFFFAF
*.color4:     #5F87AF
*.color12:    #8FAFD7
*.color5:     #5F5F87
*.color13:    #8787AF
*.color6:     #5F8787
*.color14:    #5FAFAF
*.color7:     #6C6C6C
*.color15:    #FFFFFF

Some code in iTerm, with TERM=xterm, using the color palette above:

iTerm, xterm, Apprentice colors

Some code in the Windows console, with TERM=cygwin, using the color palette above:

console, cygwin, Apprentice colors

All terminal emulators

For best results, it is recommended to adjust your background color to the one used in the GUI/256color version of Apprentice:

Installing Apprentice.

The canonical location is:

~/.vim/colors/apprentice.vim

but it could be:

~/.vim/bundle/apprentice/colors/apprentice.vim

or whatever works for you.

Enabling Apprentice.

To test Apprentice, just type this command from normal mode and hit Enter:

:colorscheme apprentice

If you like what you see and want to make Apprentice your default colorscheme, add this line to your ~/.vimrc:

colorscheme apprentice

What they say about Apprentice.

;-)


If light colorschemes are more your thing, Disciple is an experimental and mostly unmaintained negative version of Apprentice.