在vim中配置python補全,fedora 19

來源:互聯網
上載者:User

標籤:rem   ubuntu   通過   www   fedora   asc   ble   term   width   

近期發現python是個不錯的語言,值得一學,先配置下環境,讓vim具有keyword補全功能,步驟例如以下,我這個是fedora,其它發行版類似


$ su

********

# yum install vim-taglist -y

# wget http://www.pythonclub.org/_media/python-basic/pydiction-1.2.zip
# unzip pydiction-1.2.zip
 
# mkdir -p  ~/.vim/after/ftplugin
# mkdir -p ~/.vim/tools/pydiction/
# cp pydiction-1.2/python_pydiction.vim ~/.vim/after/ftplugin
# cp pydiction-1.2/complete-dict ~/.vim/tools/pydiction/complete-dict
 
# 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>  // 設定F8為taglist開關   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 autoindentset tabstop=4  set shiftwidth=4  set expandtab  set number

能夠通過tab鍵來補全,F8鍵開啟/關閉taglist,Ctrl+W在表單中切換



參考:

http://tntcastle.net/2012/09/ubuntu%E4%B8%8B%E5%B0%86vim%E9%85%8D%E7%BD%AE%E4%B8%BApython-ide/

http://www.pythonclub.org/linux/vim/pydiction

在vim中配置python補全,fedora 19

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.