Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text, On Object Dot Show Intellisense

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?

like image 822
iWarrior Avatar asked Nov 19 '13 04:11

iWarrior


1 Answers

Go to Preferences -> Settings - User and add the following (remove the last comma if it's the last entry in the array):

"auto_complete": true,
"auto_complete_commit_on_tab": true,
"auto_complete_selector": "source, meta.tag", // you can make this "source - comment, meta.tag" if you don't want autocomplete in comments
"auto_complete_triggers": [
    {"selector": "text.html", "characters": "<"},
    {"selector": "source, text.html", "characters": "."}
],

and you should be all set.

BTW, "IntelliSense" is a trademark of Microsoft, in other contexts it's just called auto-complete or autocomplete.

like image 190
MattDMo Avatar answered Sep 20 '22 03:09

MattDMo