1.自動補全
Pydiction
[root@localhost ~]# mkdir ~/.vim [root@localhost ~]# mkdir ~/.vim/bundle [root@localhost ~]# cd ~/.vim/bundle [root@localhost bundle]# git clone https://github.com/rkulla/pydiction.git #如果沒有git需要先行安裝 [root@localhost pydiction]# vim ~/.vimrc filetype plugin on let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict' #此路徑根據自己實際路徑 let g:pydiction_menu_height = 3
到此便可使用tab鍵補全代碼了
2.其他設置
set nocompatible "顯示行號" set number set guioptions-=r set guioptions-=L set guioptions-=b "隱藏頂部標簽欄" "set showtabline=0 ""設置字體" set guifont=Monaco:h13 syntax on "開啟語法高亮" let g:solarized_termcolors=256 "solarized主題設置在終端下的設置" set background=dark "設置背景色" set nowrap "設置不折行" set fileformat=unix "設置以unix的格式保存文件" set cindent "設置C樣式的縮進格式" set tabstop=4 "設置table長度" set shiftwidth=4 "同上" set showmatch "顯示匹配的括號" set scrolloff=5 "距離頂部和底部5行" set laststatus=2 "命令行為兩行" set fenc=utf-8 "文件編碼" set backspace=2 set selection=exclusive set selectmode=mouse,key set matchtime=5 set ignorecase "忽略大小寫" set incsearch set hlsearch "高亮搜索項" set noexpandtab "不允許擴展table" set whichwrap+=<,>,h,l set autoread set cursorline "突出顯示當前行" set cursorcolumn "突出顯示當前列" "括號補全" inoremap ' ''i inoremap " "" i inoremap ( () i inoremap [ [] i inoremap { { } O "自動換行" inoremap : :
(有需要再補充?。?/p>