Vim, Python, and Django autocompletion (pysmell?)

前端 未结 5 724
北海茫月
北海茫月 2020-12-04 07:08

Does anyone know how to set up auto completion to work nicely with python, django, and vim?

I\'ve been trying to use pysmell, but I can\'t seem to get it set up corr

5条回答
  •  天涯浪人
    2020-12-04 07:10

    I've had good luck with exuberant-ctags for this.

    I use this macro in my vimrc:

    execute 'map  :!/usr/bin/exuberant-ctags -f '.&tags.' --recurse '.$_P4ROOT.' '
    

    You'll want to modify that slightly, so that it includes your python /site-packages/django/ directory as well as your own code.

    Then, hit F2 inside vim to update the tags, and use the regular vim tag bindings to navigate.

提交回复
热议问题