I just installed TernJS and I can get intellisense by entering ctrl+space. However, I want to get intellisense, autocomplete, options when I enter a dot after an object in JavaScript.
I tried the following without luck
“auto_complete_selector”: “source, text”,
I tried the suggestions in Sublime Text 2 auto completion popup does not work properly without luck
Any suggestions?
Advertisement
Answer
Go to Preferences -> Settings - User
and add the following (remove the last comma if it’s the last entry in the array):
JavaScript
x
8
1
"auto_complete": true,
2
"auto_complete_commit_on_tab": true,
3
"auto_complete_selector": "source, meta.tag", // you can make this "source - comment, meta.tag" if you don't want autocomplete in comments
4
"auto_complete_triggers": [
5
{"selector": "text.html", "characters": "<"},
6
{"selector": "source, text.html", "characters": "."}
7
],
8
and you should be all set.
BTW, “IntelliSense” is a trademark of Microsoft, in other contexts it’s just called auto-complete or autocomplete.