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(實現(xiàn)代碼補全)
#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打開,使用Ctrl+w,再按w可以在code窗口和taglist窗口間切換。
以上所述是小編給大家介紹的 Ubuntu 下 vim 搭建python 環(huán)境 配置,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復(fù)大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
Python MOCK SERVER moco模擬接口測試過程解析
這篇文章主要介紹了Python MOCK SERVER moco模擬過程解析,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2020-04-04
python設(shè)置windows桌面壁紙的實現(xiàn)代碼
每天換一個壁紙,每天好心情。喜歡的朋友可以參考下2013-01-01
Python3 字典dictionary入門基礎(chǔ)附實例
Python字典是另一種可變?nèi)萜髂P?,且可存儲任意類型對象,如字符串、?shù)字、元組等其他容器模型,字典由鍵和對應(yīng)值成對組成,字典也被稱作關(guān)聯(lián)數(shù)組或哈希表2020-02-02
python中關(guān)于數(shù)據(jù)類型的學(xué)習(xí)筆記
在本篇文章里小編給大家整理了關(guān)于python中關(guān)于數(shù)據(jù)類型的學(xué)習(xí)筆記內(nèi)容,需要的朋友們可以參考下。2020-07-07
python實現(xiàn)csdn全部博文下載并轉(zhuǎn)PDF
我們學(xué)習(xí)編程,在學(xué)習(xí)的時候,會有想把有用的知識點保存下來,我們可以把知識點的內(nèi)容爬下來轉(zhuǎn)變成pdf格式,方便我們拿手機可以閑時翻看,是很方便的,本文就介紹一下如何實現(xiàn)2021-06-06

