1.安装vim
sudo apt-get install vim-gnome
2.在用户目录下创建.vim目录,再建bundle目录
mkdir .vim bundle
3.安装Bundle/Vundle:
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
4.创建或编辑用户目录下的.vimrc文件
mkdir ~/.vimrc
5.再.vimrc文件中配置自己的vim插件:
set nocompatible
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
" required!
Bundle 'gmarik/vundle'
" The bundles you install will be listed here
Bundle 'scrooloose/nerdtree'
Bundle 'davidhalter/jedi-vim'
filetype plugin indent on
" The rest of your config follows here.
augroup vimrc_autocmds
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python match Excess /\%120v.*/
autocmd FileType python set nowrap
augroup END
" NerdTree Shortcut.
map <f2> :NERDTreeToggle<cr>
" automatically change window’s cwd to file’s dir
set autochdir
" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
set nu!
let g:pydiction_location = '/usr/share/vim/vim74/pydiction/complete-dict'
let g:pydiction_menu_height = 20
autocmd FileType python set omnifunc=pythoncomplete#Complete
let Tlist_Show_One_File = 1
let Tlist_Exit_OnlyWindow = 1
let Tlist_Use_Right_Window = 1
let Tlist_Auto_Open=1
let Tlist_File_Fold_Auto_Close=1
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set foldmethod=indent
let Tlist_Auto_Highlight_Tag=1
let Tlist_Auto_Open=1
let Tlist_Auto_Update=1
let Tlist_Display_Tag_Scope=1
let Tlist_Exit_OnlyWindow=1
let Tlist_Enable_Dold_Column=1
let Tlist_File_Fold_Auto_Close=1
let Tlist_Show_One_File=1
let Tlist_Use_Right_Window=1
let Tlist_Use_SingleClick=1
nnoremap <silent> <F8> :TlistToggle<CR>
filetype plugin on
autocmd FileType python set omnifunc=pythoncomplete#Complete
autocmd FileType javascrīpt set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
autocmd FileType css set omnifunc=csscomplete#CompleteCSS
autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
autocmd FileType php set omnifunc=phpcomplete#CompletePHP
autocmd FileType c set omnifunc=ccomplete#Complete
autocmd FileType python set omnifunc=pythoncomplete#Complete
let g:pydiction_location = '/usr/share/vim/vim74/pydiction/complete-dict'
let g:pydiction_menu_height = 20
set foldmethod=indent
set mouse=a
set number
6.
打开vim,键入命令“:BundleInstall”,等待自动安装插件完成(下面显示“done”)