Sublime Forum

JavaScript code hints

#1

Hey,

I am coding in JS (DOM mostly) and I am struggling to find some good ST3 plugin that would give me some nice JS code hints for the DOM (but not only of course, core JS is a must too).
I think I have browsed through all of the available plugins…

Any hints?
Thanks in advance,
Greg

0 Likes

#2

I recommend Tern (https://packagecontrol.io/packages/tern_for_sublime). It provides excellent code completion and documentation. Install it through package control. I had to manually run npm install in the tern_for_sublime directory and restart Sublime to get it going.

Out of the box it is configured to provide completions based on the code in the current project, as well as standard library functions. You can add support for other environments through a .tern-project file in your project. A .tern-project file setup with completions for the browser and jQuery would look like this:

{ "libs": "browser", "jquery" ] }
Hope this helps - couldn’t be more pleased with it myself.

0 Likes

#3

Thanks lukasbob, I will definitely try tern!
Cheers, greg

0 Likes