
Ask HN: Python Code Jumping in Vim? - sp527
I’m having trouble finding a good vim solution for jumping to definitions and renaming that also supports pipenv. So far I’ve tried ctags (which sucks) and am now giving python language server a try but it’s proving to be a complex setup and pipenv support is rough. Any ideas? Not sure why all the solutions out there seem to suck so much.
======
datashaman

        ctags -R . $VIRTUAL_ENV
    

(while in the virtualenv) works fine for me. I am able to jump to definitions
for packaged modules. ymmv.

~~~
sp527
Thanks for the input. I was hoping for a less manual solution but maybe this
is the only reasonable approach.

~~~
datashaman
If you add a background file watcher (like inotify), you can automate the
upkeep of the ctags file.

[https://unix.stackexchange.com/questions/323901/how-to-
use-i...](https://unix.stackexchange.com/questions/323901/how-to-use-
inotifywait-to-watch-a-directory-for-creation-of-files-of-a-specific)

There are some solutions to be found here (not used any of them myself, just
pointing them out).

[https://stackoverflow.com/questions/1157410/how-to-
automatic...](https://stackoverflow.com/questions/1157410/how-to-
automatically-update-tag-file-in-vim)

------
niktar
Use [https://github.com/davidhalter/jedi-
vim](https://github.com/davidhalter/jedi-vim)

It works very well

~~~
sp527
This turned out to be the best option once I figured out jedi-vim will target
the VIRTUAL_ENV env var. Amazing!

------
pixency
Great Post

if anyone find Graphic And Webdesign Agency i suggest you go here
[https://pixency.com/](https://pixency.com/) this agency provide amazing
services.

by the way thanks for sharing amazing post

