Code Monkey home page Code Monkey logo

onehalf's Introduction

Vim Installation & Usage

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

Installation

Using a plugin manager (recommended)

Use Pathogen, Vundle, Neobundle or your favourite Vim package manager.

To install with Vundle, put

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

in your .vimrc, restart vim then execute :PluginInstall. This will install both the color schemes and vim-airline themes.

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

onehalf's People

Contributors

bbcbruno avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.