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 #如果沒有g(shù)it需要先行安裝 [root@localhost pydiction]# vim ~/.vimrc filetype plugin on let g:pydiction_location = '~/.vim/bundle/pydiction/complete-dict' #此路徑根據(jù)自己實際路徑 let g:pydiction_menu_height = 3
到此便可使用tab鍵補全代碼了
2.其他設(shè)置
set nocompatible "顯示行號" set number set guioptions-=r set guioptions-=L set guioptions-=b "隱藏頂部標(biāo)簽欄" "set showtabline=0 ""設(shè)置字體" set guifont=Monaco:h13 syntax on "開啟語法高亮" let g:solarized_termcolors=256 "solarized主題設(shè)置在終端下的設(shè)置" set background=dark "設(shè)置背景色" set nowrap "設(shè)置不折行" set fileformat=unix "設(shè)置以unix的格式保存文件" set cindent "設(shè)置C樣式的縮進(jìn)格式" set tabstop=4 "設(shè)置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 "不允許擴(kuò)展table" set whichwrap+=<,>,h,l set autoread set cursorline "突出顯示當(dāng)前行" set cursorcolumn "突出顯示當(dāng)前列" "括號補全" inoremap ' ''i inoremap " "" i inoremap ( () i inoremap [ [] i inoremap { { } O "自動換行" inoremap : :
(有需要再補充!)