Ubuntu 下 vim 搭建python 環(huán)境 配置
1. 安裝完整的vim
# apt-get install vim-gnome
2. 安裝ctags,ctags用于支持taglist,必需!
# apt-get install ctags
3. 安裝taglist
#apt-get install vim-scripts #apt-get install vim-addon-manager # vim-addons install taglist
4. 安裝pydiction(實(shí)現(xiàn)代碼補(bǔ)全)
#wget http://www.pythonclub.org/_media/Python-basic/pydiction-1.2.zip #unzip pydiction-1.2.zip // ~/.vim/after/ftplugin和~/.vim/tools/pydiction/目錄默認(rèn)不存在,需要自行創(chuàng)建 #cp pydiction-1.2/python_pydiction.vim ~/.vim/after/ftplugin #cp pydiction-1.2/complete-dict ~/.vim/tools/pydiction/complete-dict
5. 編輯配置文件
//~/.vimrc 修改當(dāng)前用戶配置,如果需要修改全局配置,vim /etc/vim/vimrc # vim ~/.vimrc 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 let g:pydiction_location='~/.vim/tools/pydiction/complete-dict' set autoindent set tabstop=4 set shiftwidth=4 set expandtab set number set lines=35 columns=118
右邊即為taglist窗口,按F8打開(kāi),使用Ctrl+w,再按w可以在code窗口和taglist窗口間切換。
以上所述是小編給大家介紹的 Ubuntu 下 vim 搭建python 環(huán)境 配置,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
相關(guān)文章
Python 中開(kāi)發(fā)pattern的string模板(template) 實(shí)例詳解
這篇文章主要介紹了Python 中開(kāi)發(fā)pattern的string模板(template) 實(shí)例詳解的相關(guān)資料,需要的朋友可以參考下2017-04-04python單線程實(shí)現(xiàn)多個(gè)定時(shí)器示例
這篇文章主要介紹了python單線程實(shí)現(xiàn)多個(gè)定時(shí)器示例,需要的朋友可以參考下2014-03-03解決python寫的windows服務(wù)不能啟動(dòng)的問(wèn)題
使用py2exe生成windows服務(wù)在win7下可以正常運(yùn)行,但是到了xp下面可以安裝,但是無(wú)法啟動(dòng)2014-04-04python3實(shí)現(xiàn)繪制二維點(diǎn)圖
今天小編就為大家分享一篇python3實(shí)現(xiàn)繪制二維點(diǎn)圖,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-12-12Pandas數(shù)據(jù)分析之批量拆分/合并Excel
怎樣將一個(gè)大的Excel拆分,或者將很多小Excel文件合并?下面這篇文章主要給大家介紹了關(guān)于Pandas數(shù)據(jù)分析之批量拆分/合并Excel的相關(guān)資料,需要的朋友可以參考下2021-09-09python中dict字典的查詢鍵值對(duì) 遍歷 排序 創(chuàng)建 訪問(wèn) 更新 刪除基礎(chǔ)操作方法
字典的每個(gè)鍵值(key=>value)對(duì)用冒號(hào)(:)分割,每個(gè)對(duì)之間用逗號(hào)(,)分割,整個(gè)字典包括在花括號(hào)({})中,本文講述了python中dict字典的查詢鍵值對(duì) 遍歷 排序 創(chuàng)建 訪問(wèn) 更新 刪除基礎(chǔ)操作方法2018-09-09pytorch之torch_scatter.scatter_max()用法
這篇文章主要介紹了pytorch之torch_scatter.scatter_max()用法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-09-09