Forums

Vim: code completion

For the vim enthusiasts... any code completion plugins for vim/python that are known to work well in the PythonAnywhere bash shell?

I keep hearing rave reviews about YouCompleteMe, and I've got Vundle installed, but I'm a little confused / worried about the bit where YCM needs to be compiled, and uses a client/server architecture. Seems like that might be a bit of a problem on something like PAW?

Is YCM simpler than I'm thinking, and good to go on PAW? If not, what do you guys recommend for code completion, code checking (linting), etc.?

Thanks,

Monte

The client-server nature of TCM means it doesn't work particularly well on PythonAnywhere, but it does sort-of work.

I use python-mode with rope completion enabled. You might like to give that a go.

How does python-mode + rope compare to jedi-vim?

Eventually I'd like to get full PEP8 and lint (pylint, etc.) support set up. On my laptop I've been spoiled by PyCharm with the idea.vim plugin, giving me vim keystrokes and navigation, with nearly effortless code completion, linting, etc. for Python, Django, html templates, javascript. Setting even a basic version up on the console version of vim is a bit... intimidating ;)

I've never used jedi-vim so I can't comment, but I'm pretty happy with python-mode. Try them both and see what you like.

I use YCM on PythonAnywhere, it should compile just fine and then work pretty well. The only problem is that it spawns so many background threads that it tends to max out the resource limits, if you run multiple copies of vim simultaneously on the same server. So you just have to be a bit careful about that...