[VIM] 安裝第三方 Color Scheme

如果家目錄沒有.vim/colors資料夾,就先創一個

mkdir -p ~/.vim/colors

 

這裡直接git clone第三方color scheme,以 jacoborus/tender  為例

git clone git@github.com:jacoborus/tender.git

 

tender/colors/tender.vim 這個就是color scheme檔,把這個檔案丟到 ~/.vim/colors/

cp tender/colors/tender.vim ~/.vim/colors/

 

修改vimrc檔案,加入底下這行

colorscheme tender

 

重新啟動vim,就會自動套用新的color scheme了

 

[VIM] Vim Example setting

 

source $VIMRUNTIME/indent.vim
behave mswin
set guifont=Monaco:h14
set ai
set nocp
set nocompatible
set nopaste
set pastetoggle=
set hls
set shiftwidth=4
set tabstop=4
set showmatch
set background=light
set display=lastline
colorscheme desert
syntax on
highlight Comment ctermfg=darkcyan
highlight Search term=reverse ctermbg=4 ctermfg=7
highlight Normal ctermbg=black ctermfg=white
filetype plugin on
filetype indent on
autocmd BufWritePre * :%s/\s\+$//e
autocmd BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
autocmd BufWritePre *.py normal m`:%s/\s\+$//e ``
autocmd BufEnter *.php :%s/[ \t\r]\+$//e
autocmd BufWritePre *.pl :%s/\s\+$//e
set fileencodings=utf8,big5,euc-jp,gbk,euc-kr,utf-bom,iso8859-1
set encoding=utf8
set tenc=utf8
set termencoding=utf-8
autocmd FileType python set expandtab
set ru
set sc
set smd
set nu
set ch=2
set nocompatible
set backspace=2