Skip to content
Advertisement

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?

Advertisement

Answer

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.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement