codeKiller
codeKiller

Reputation: 5739

Sublime text 3 autocomplete not working

I have just installed Sublime text 3 on my Windows 7 machine to work with python.

I have installed a couple of packages via package control. The packages are SublimeJEDI and SublimeCodeIntel

I have tried to modify the configuration of SublimeJEDI adding this:

// additional python package path list
     "python_package_paths": ["C:/python27/Lib/site-packages"],

However, I am not being able to get the behaviour that I am expecting....what I am expecting is, for example, given this:

import numpy as np

If I write now: np. I would like to get a list with all of the suggestions from numpy package, but this is not happening

EDIT:

Seems like even getting rid of SublimeJEDI and SublimeCodeIntel, and installing Anaconda it is not working.

I am showing here my configuration file for python files (Python.sublime-settings), let me know if you see something wrong:

{

  "auto_indent": true,
  "auto_complete": true,
  "rulers": [79],
  "smart_indent": true,
  "tab_size": 4,
  "trim_automatic_white_space": true,
  "use_tab_stops": true,
  "word_wrap": true,
  "wrap_width": 80,

  "auto_complete_triggers": [{"selector": "source.python - string - comment - constant.numeric", "characters": "."}],
  "settings":
  {
    "extra_paths":
    [
      "C:/Python27/Lib"
    ],
    "python_interpreter": "C:/Python27/python.exe"
  }
}

Upvotes: 2

Views: 10165

Answers (3)

andyhasit
andyhasit

Reputation: 15289

On Windows installs I believe you have to to use double backslashes for the python path to get it to work:

"python_interpreter": "C:\\Python27\\python.exe"

Upvotes: 0

DamnWidget
DamnWidget

Reputation: 1457

I see that you are trying to save your anaconda preferences into the Python settings for Sublime Text, that is not gonna work. If you want to use the same configuration for all your Python projects, just put the configuration into the Anaconda's User Settings.

Anaconda is designed to use custom settings per-project so you can also add your related settings into your <project_name>.sublime-project file, anything that should be global must be configured in the global Anaconda (user) settings file.

Let me know if you need further assistance.

P.D: I just noticed this was asked long ago :(

Upvotes: 1

Enrique Ren&#233;
Enrique Ren&#233;

Reputation: 598

The first thing what you need is to save the file with ".py" extension. If you see your code with colors, it's saved with some extension. After, If no suggestions yet, press ctrl+space, shif+space, I don't remember which of these is the right (my pc is turned off).

Lemme know if this solved your problem.

Upvotes: 2

Related Questions