Skip to content

Clean, vibrant and pleasing color schemes for Vim, Sublime Text, iTerm, gnome-terminal and more.

Notifications You must be signed in to change notification settings

IAmAMaggot/onehalfvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Vim Installation & Usage

screenshot: vim NeoVim + Tmux with true colors on iTerm2.

Installation

Using a plugin manager (recommended)

vim-plug:

Plug 'sonph/onehalf', { 'rtp': 'vim' }

The 'rtp' option is necessary as the vim theme resides in a subdirectory of the git repo.

Manual Installation

Download the files in vim/ and put them in their respective folders (./vim/colors/ and ./vim/autoload/airline/themes/)

Usage

Put colorscheme <scheme> and let g:airline_theme='<theme>', if using airline or let g:lightline = { 'colorscheme': '<theme>' }, if using lightline, in your .vimrc to set the color scheme and airline (or lightline) theme. Make sure you have syntax highlighting on, and 256 colors set. Vim version >= 7.4 recommended.

For example:

syntax on
set t_Co=256
set cursorline
colorscheme onehalflight
let g:airline_theme='onehalfdark'
" lightline
" let g:lightline = { 'colorscheme': 'onehalfdark' }

True Colors

By default vim only allows specifying one of the 256 (8 bit) predefined colors (wikipedia).

If you want to match colors in vim and in your terminal exactly, you must enable true colors (24 bit).

In vim/neovim, use set termguicolors option:

if exists('+termguicolors')
  let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
  let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
  set termguicolors
endif

If you use tmux, you must use version 2.2 or newer. Put this in your config:

set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"

(source)

To test if your neovim/tmux/terminal combination supports true colors or not, use this test script:

truecolors

About

Clean, vibrant and pleasing color schemes for Vim, Sublime Text, iTerm, gnome-terminal and more.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vim Script 100.0%