Both: pydiction
Pydiction allows you to implement TAB code completion in Vim, including: Standard, Custom, and third-party modules and packages. Plus keywords, bifs, and strings.
The pydiction consists mainly of three parts:
- python_pydiction.vim– This file is Vim's plugin file, realizing the TAB completion function of Python file
- complete-dict– the file is a Vim dictionary file that contains information such as the Python keyword and the structure of the module. Is the reference file that plugin is looking for when you complete the completion
- pydiction.py– the file is a Python script file that is used to generate the dictionary file. Additional TAB completion modules can be added by executing the script
Configuration of the Pydiction
- Put the Python_pydiction.vim under the Ftplugin folder, like mine:
/usr/share/vim/vimfiles/ftplugin/python_pydiction.vim
- Generate a dictionary file
python pydiction.py django.db.models# 比如将pydiction.py放到settings.py的文件夹下执行上面的命令,更多的在本文最后
- Edit the VIMRC file to add three lines of code
# 开启插件let‘/path/to/your/complete-dict‘let20# 上一步生成的字典文件:/data/www/xtyw/xtyw/complete-dict# 那么上面的path就是它了
Use of Pydiction
tab Auto-Complete,
Finally, fill in the usual Django dictionary that needs to be imported:
Python pydiction.py Django django.conf django.contrib django.core django.db django.dispatch django.forms django.http Django.middleware django.shortuts django.template django.templatetags django.utils django.views
Finally: Markdown Editor Well, ~CSDN, I like you again.
vim-an easy-to-understand Django code completion method