Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (47 sloc) 2.07 KB

Vim color scheme

雖然我大部分的時間是使用 Sublime Text 3 作為我的文字編譯工具,但在操作 terminal 終端機時仍然不可避免使用文字介面下的文書編輯器。在眾多文書編輯器中,我個人較常使用的是 Vim。這篇筆記將簡單介紹如何安裝 color scheme 在 Vim 中,並顯示文件行號。


In this note, I am going to use jellybeans as the example color scheme. You can download the color scheme you prefer and extract the archive file under Downloads folder.

Vim Color Scheme Download

Create ~/.vim/colors directory if it doesn't exist:

$ mkdir -p ~/.vim/colors

Move the downloaded .vim file under colors directory to ~/.vim/colors:

$ mv ~/Downloads/jellybeans.vim-master/colors/*.vim ~/.vim/colors

Finally, edit your ~/.vimrc file as follow to enable your color scheme:

syntax on
colorscheme jellybeans
set nu




You may also enable powerline for your vim editor. To install powerline on you machine, please refer to my another article: Zsh / Oh-My-Zsh + iTerm2 + Powerline.

Once setting up powerline on your machine, get the powerline location via pip:

$ pip show powerline-status

Name: powerline-status
Version: 2.6
Summary: The ultimate statusline/prompt utility.
Author: Kim Silkebaekken
License: MIT
Location: /Users/tsoliang/Library/Python/2.7/lib/python/site-packages

Now enable powerline on vim by editting ~/.vimrc:

syntax on
colorscheme jellybeans
set nu

set rtp+=<path_to_powerline>/powerline/bindings/vim/
set laststatus=2
set t_Co=256