1

Let me start off by saying that I've already read this post. The autocomplete window occasionally shows up, but sometimes it doesn't like when I try to get a list of available methods for an object. Here is an example:

As you can see, when I type in some code nothing happens:

enter image description here

But when I press control+space, the available methods show up:

enter image description here

Here are my relevant User settings:

{
    "auto_complete": true,
    "auto_complete_commit_on_tab": true,
    "auto_complete_selector": "source, text"
}
Community
  • 1
  • 1
Saad
  • 49,729
  • 21
  • 73
  • 112

1 Answers1

2

Try adding the following setting to your preferences:

"auto_complete_triggers":
[
    {
        "characters": ".",
        "selector": "source, text.html"
    }
]

This will make autocomplete appear every time you hit the . button.

MattDMo
  • 100,794
  • 21
  • 241
  • 231
  • Thanks, that did the trick. Do you have any idea about why I'm having this issue? – Saad Aug 22 '15 at 02:31
  • @saadq I'm not sure. I've had this setting in my User preferences ever since I started using Sublime years ago, so I honestly don't remember what it was like beforehand. I suspect that the autocomplete engine may run a bit slowly, and if it isn't *quite* ready to display when you are, it doesn't display at all. I'm don't know. You can also try checking out [tern_for_sublime](https://packagecontrol.io/packages/tern_for_sublime) that uses the popular TernJS autocomplete engine for JavaScript and Node. Some other languages have different ones, like Anaconda for Python. – MattDMo Aug 22 '15 at 14:28
  • I see, that makes sense. Thanks once again. – Saad Aug 22 '15 at 18:55