Linux Vim中自動補全Python外掛程式:Pydiction

來源:互聯網
上載者:User

標籤:python 自動補全 vim

Pydiction 可以是我們使用Tab鍵自動補全Python代碼在Vim,是一款非常不錯的外掛程式。

Pydiction不需要安裝,所有沒有任何依賴包問題,Pydiction主要包含三個檔案。

python_pydiction.vim  -- Vim plugin that autocompletes Python code.

complete-dict         -- Dictionary file of Python keywords, modules, etc.

pydiction.py          -- Python script to add more words to complete-dict.

1、下載Pydiction:

(1)wget https://github.com/rkulla/pydiction/archive/master.zip #自行下載上傳Linux

(2)#這裡我使用Git直接下載:git clone https://github.com/rkulla/pydiction.git

2、建立目錄並複製檔案:

mkdir -pv  ~/.vim/tools/pydiction

cp -r pydiction/after ~/.vim

cp pydiction/complete-dict ~/.vim/tools/pydiction

確保目錄結構如下:

[[email protected] ~]# tree .vim

.vim

├── after

│   └── ftplugin

│       └── python_pydiction.vim

└── tools

└── pydiction

└── complete-dict

4 directories, 2 files

rm -f pydiction #刪除程式檔案

3、建立.vimrc檔案

vim ~/.vimrc

添加如下配置:

filetype plugin on

let g:pydiction_location = ‘~/.vim/tools/pydiction/complete-dict‘

let g:pydiction_menu_height = 3

到此配置完成,效果



本文出自 “Ljohn” 部落格,請務必保留此出處http://ljohn.blog.51cto.com/11932290/1931985

Linux Vim中自動補全Python外掛程式:Pydiction

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.