1

I'm trying to configure Sumblime CodeIntel so that it works with django. The official docs state that:

For adding additional library paths (django for example), either add those paths as folders to your project, or create an optional codeintel configuration file in your home or in your project's root.

Configuration files (~/.codeintel/config or project_root/.codeintel/config). All configurations are optional.

I localized and edited the ~/.codeintel/config file, so that config now looks like this(added the bolded part):

{
    "Python": {
        **"python": "C:/Python27/django-tom/Lib/site-packages",**
        "pythonExtraPaths": [
            "libs",
            "~/Applications/Sublime Text 2.app/Contents/MacOS",
            "/Applications/Sublime Text 2.app/Contents/MacOS",
         ]
     }
}

`django-tom is my virtualenv django folder. However the autocompletion is not working for django (but works fine with the rest of python).

2
  • are you running sublime from within your virtual environment? Commented Aug 27, 2013 at 0:18
  • No, I only run django within my virtual env Commented Aug 27, 2013 at 6:22

1 Answer 1

1

this is how i have it

{
"Python": {
    "python": 'path to python/bin/python',
    "pythonExtraPaths": ['path to pytho/python2.7/site-packages/',
    ]
},

}

if you're using env you can have hooks with virtualenvwrapper let me know if you need help on setting that up also there a sublimeRope package which is python specific

Sign up to request clarification or add additional context in comments.

3 Comments

I installed the Rope, via Package Control. I guess it's expected to be working just after the installation is completed and in my case Sumlime Rope never took off. If you could elaborate on the virtualenvwrapper and how it can get CodeIntel working for django, I'd be grateful.
for the rope to work you have to make a new rope project. while in your project dir press ctrl+shift+p, and look for ROPE, then just press New Project. it's gonna ask you for project root and the for env root.
for virtualenvwrapper virtualenvwrapper.readthedocs.org/en/latest/install.html and the script for code intel gist.github.com/jaysw/3567725 you have to put this code in your postmkvirtualenv.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.