pythonpython-3.xsublimetext3sublimetextsublime-anaconda

Sublime Text 3: Anaconda 'Goto Definition' opening a blank window


In Sublime Text 3, this is the content of my User Settings (config) file, found through Sublime Text > Preferences > Package Settings > Anaconda > Settings - User:

{
    "python_interpreter": "/usr/local/bin/python3",
    "anaconda_linting": false,
    "pep8": false
}

However, with language set to Python, when I right-click on an object and use Anaconda > Goto Definition, a blank tab opens. I have watched a tutorial that shows this option opening the source __init__.py file where namedtuple is defined.

Any ideas? Several permutations of this questions have been asked but mainly refer to issues with virtualenvs or django. This is the sample code in which I was trying Goto Definition for namedtuple:

from collections import namedtuple

namedtuple

The above two lines are the contents of untitled tab below, and the empty new tab is the result of Goto Definition.

enter image description here

In a tutorial I'm following along with, the option works as intended:

enter image description here


Solution

  • This probably a bug/limitation in Anaconda plugin. The go to definition does this when the file is not saved. If you save the file it will work fine.

    When the go to definition is supposed to take you in the same file and the file is not saved, the plugin opens a blank window.

    But if you save the file it would work fine. So you should open a bug on their github repo for the same. Also since there is simple workaround to get this working I doubt the developer may entertain the fix for this issue.