cd ~/.vim/autoload
wget https://github.com/junegunn/vim-plug/archive/0.10.0.tar.gz
tar -xvf 0.10.0.tar.gz
cp vim-plugxxxxxxx/plug.vim ./
vim ~/.vimrc
输入:
" vim
set nocompatible
" vim-plug
call plug#begin('~/.vim/plugged')
Plug 'flazz/vim-colorschemes'
Plug 'scrooloose/nerdtree'
call plug#end()
" colorscheme
colorscheme molokai
:PlugInstall
不要下载github上推荐的链接,否则运行的时候,会有很多报错。
正确的做法是下载历史的tag,如:
https://github.com/junegunn/vim-plug/archive/0.10.0.tar.gz
并将其中的plug.vim 拷贝到 ~/.vim/autoload中即可。
" vim
set nocompatible
" vim-plug
call plug#begin('~/.vim/plugged')
Plug 'flazz/vim-colorschemes'
Plug 'scrooloose/nerdtree'
call plug#end()
" vim-plug colorscheme
colorscheme molokai
" tab
" a tab takes 4-spaces-wide
set tabstop=4
" a indent takes 4-spaces-wide
set shiftwidth=4
" a tab consist of 4 spaces
set expandtab
set smarttab
" this is for tab party,disable it
set softtabstop=0