Pietro Passarelli

Sublime text 2 setup for Node/javascript

How to best setup sublime text to work with Node/Javascript

Sublime text 2 setup for javascript

I am using sublime text 2 because 3 is still in beta.


Auto formats javascript code



https://github.com/victorporof/Sublime-JSHint can configure it so that on save and on load, flags things to change in js code visually

cmd + shift + j gives the list of issues with line numbers cmd + esc hides annotation

Build tool

add Node build to sublime text 2 new build option under tools

    "cmd": ["/usr/local/bin/node","$file"]

Javascript next - better syntax hilight for js



Adding comments to your code can be a real pain sometimes. I don’t know many people who claim to enjoy it, but it’s absolutely essential. DocBlockr helps ease some of that pain by making commenting simple. After installing DocBlockr, all you need to do is start a line out with /* or /** and it does the rest for you. If you start with /** above a function, it will even generate comments for you based on the JSDoc format. DocBlockr is one of those things that if you’ve never used anything similar before, you’ll wonder how you ever lived without it.

DocBlockr also supports many other languages, including: CoffeeScript, TypeScript, PHP, ActionScript, Haxe, Java, Apex, Groovy, Objective C, C, C++, and Rust.

add comments type /** above a functio hit enter and will ad param and return place holders

auto completion


For Mac OS X:
  * Jump to definition = ``Control+Click``
  * Jump to definition = ``Control+Command+Alt+Up``
  * Go back = ``Control+Command+Alt+Left``
  * Manual CodeIntel = ``Control+Shift+space``