sudo apt-get install vim
mkdir -p ~/.vim/bundle
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
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
autocmd vimenter * NERDTree " 當打開vim時就顯示NERDTree 可以通過F2來打開或關閉它
" Prefer spaces to tabs
set tabstop=4
set shiftwidth=4
set expandtab
set nu!
例如: vim hello.py
當按下F2時就可以關掉NERDTree(如果你屏幕小的話),如下:
Linux下編譯安裝Vim8.0 http://www.linuxidc.com/Linux/2017-01/139210.htm
Vim學習指南 http://www.linuxidc.com/Linux/2013-08/89096.htm
Vim編輯器配置 http://www.linuxidc.com/Linux/2016-09/135460.htm
Vim編輯器使用 http://www.linuxidc.com/Linux/2016-09/135043.htm
快速學會 Vi編輯器 http://www.linuxidc.com/Linux/2013-08/88586.htm
強大的Vim 編輯器 http://www.linuxidc.com/Linux/2013-07/87544.htm
Linux文本編輯器Vim的一般用法 http://www.linuxidc.com/Linux/2016-11/137263.htm
把Vim打造成優秀的C++ IDE http://www.linuxidc.com/Linux/2016-06/132262.htm
Ubuntu 14.04升級Vim7.4到8.0 http://www.linuxidc.com/Linux/2016-11/136816.htm
Vim安裝youcompleteme自動補全插件 http://www.linuxidc.com/Linux/2016-11/137665.htm
Linux Vim編輯器使用簡單講解 http://www.linuxidc.com/Linux/2016-12/138930.htm