2

I'm not sure if this is some kind of bug (probably not, otherwise everyone would complain) and without a google account, I can't use the google group, so I try my luck here in the hope that somebody has a suggestion.

I have YouCompleteMe installed with clang-completer and stuff works fine for C, C++. Now I edit a .py file, and the only completions offered are the words already in the buffer. No semantic completion. :YcmCompleter prints No semantic completer exists for filetypes: [u'py']. I have removed everything except the following from my .vimrc:

call pathogen#infect()
Helptags

filetype on

To no avail. Does anybody have an idea how to better diagnose the problem?

Edit: I realised I did not have jedi installed. So I ran pip install jedi which strangely changed nothing.

oarfish
  • 4,116
  • 4
  • 37
  • 66

2 Answers2

2

Python is an interpreted language.

The autocompletion works only for objects in the python library (eg: os, time,...) and in your vim buffer.

If you are using a buildout, you can add vim-buildout in your vim bundle => https://github.com/FBruynbroeck/vim-buildout

This plugin add your eggs (/parts/omelette) in syspath. (YouCompleteMe uses syspath vim for the python autocompletion)

Personally, I use jedi (autocompletion library). YouCompleteMe is too big for me. (I develop only in python for this moment)

FBruynbroeck
  • 499
  • 3
  • 15
2

It turns out hat I had an ftplugin for .py files which would set the filetype to py instead of python as is intended. Disabling it solved the issue.

oarfish
  • 4,116
  • 4
  • 37
  • 66