python-jedi

Autocomplete file name in strings?


I feel like this should be easy, but right now I have SuperTab (I can't install YouCompleteMe because I have vim with python3, not python2) and jedi-vim installed. Most jedi completions work well, but the following fails miserably:

file = './<tab>'

Autocompletes to:

file = '.self.

I honestly can't think of any reason a string containing '.self.' would be useful. Is this a bug, or is this a config error on my part?


Solution

  • The issue is the plugin snipmate.

    If you want to keep snipmate there's three options:

    1. Remove the self. snippet from snipmate (you can configure it).
    2. Replace snipmate with an other solution (e.g. ultisnips)
    3. I have fixed this issue a long while ago by patching snipmate: https://github.com/davidhalter/vim-snipmate However it's very outdated and I'm not using snipmate anymore.