4 ms·
Ask HN: Python Code Jumping in Vim?
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 7y agoctags -R . $VIRTUAL_ENV (while in the virtualenv) works fine for me. I am able to jump to definitions for packaged modules. ymmv.
- sp527 7y agoThanks for the input. I was hoping for a less manual solution but maybe this is the only reasonable approach.
- datashaman 7y agoIf 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-inotifywait-to-watch-a-directory-for-creation-of-files-of-a-specific https://unix.stackexchange.com/questions/323901/how-to-use-i... 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-automatically-update-tag-file-in-vim https://stackoverflow.com/questions/1157410/how-to-automatic...
- pixency 7y agoGreat 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
- deleted 7y ago[deleted]
- niktar 7y agoUse https://github.com/davidhalter/jedi-vim https://github.com/davidhalter/jedi-vim It works very well
- sp527 7y agoThis turned out to be the best option once I figured out jedi-vim will target the VIRTUAL_ENV env var. Amazing!