vimpython-jedi

How to remove the implicit "self" argument on autocompletion in jedi-vim


I just installed jedi-vim. When Jedi autocompletes a method, the first argument is always self, that is implicit in the method call.

How can I get rid of self?

autocomplete an object


Solution

  • This is a Jedi bug. It used to work once - and still does for normal classes:

    str.center(  # Yields self, width, fieldchar=None
    str().center(  # Yields width, fieldchar=None
    

    However it doesn't seem to work for literals. So please either report it here: https://github.com/davidhalter/jedi/ or fix the bug yourself and make a pull request on github.