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/目錄默認不存在,需要自行創(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 修改當前用戶配置,如果需要修改全局配置,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)境 配置,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網(wǎng)站的支持!
相關(guān)文章
Python 中開發(fā)pattern的string模板(template) 實例詳解
這篇文章主要介紹了Python 中開發(fā)pattern的string模板(template) 實例詳解的相關(guān)資料,需要的朋友可以參考下2017-04-04Pandas數(shù)據(jù)分析之批量拆分/合并Excel
怎樣將一個大的Excel拆分,或者將很多小Excel文件合并?下面這篇文章主要給大家介紹了關(guān)于Pandas數(shù)據(jù)分析之批量拆分/合并Excel的相關(guān)資料,需要的朋友可以參考下2021-09-09python中dict字典的查詢鍵值對 遍歷 排序 創(chuàng)建 訪問 更新 刪除基礎(chǔ)操作方法
字典的每個鍵值(key=>value)對用冒號(:)分割,每個對之間用逗號(,)分割,整個字典包括在花括號({})中,本文講述了python中dict字典的查詢鍵值對 遍歷 排序 創(chuàng)建 訪問 更新 刪除基礎(chǔ)操作方法2018-09-09pytorch之torch_scatter.scatter_max()用法
這篇文章主要介紹了pytorch之torch_scatter.scatter_max()用法,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2023-09-09