DamZiobro / vim-ide

VIM configured as powerful IDE (Integrated Development Environment)
MIT License
471 stars 94 forks source link

How to use CTAGS for python projects #9

Closed sidneijp closed 6 years ago

sidneijp commented 6 years ago

Hi,

I' like some help to setup ctags with vim-ide when working with python projects(actually it's a web application, so it would be good to have js, css either).

I saw a function doing that for C++ on the .vimrc but I couldn't dup that for python, especially when working with virtualenvs (to get the references inside the dependecies too).

Could you help me?

DamZiobro commented 6 years ago

Open some file from the root directory of your project and use following shortcut ',ud'. After few seconds/minutes you will have full project indexed by ctags and cscope (you can see new files .vim/tags/last_project_tags and .vim/cscope_databases/last_project_cscope).

Now you can use ctags/cscope shortcuts to navigate through your project ex.

Generally, that's it. For more detailed info and more shortcuts please read cscope_maps file in the repo.

sidneijp commented 6 years ago

Thanks!

One more quesiton, does it should work inside virtualenvs?

DamZiobro commented 6 years ago

I haven't tested, but I think it should. I tested it with inside docker containers and everything works fine, so hopefully virtualenv will work, too.