Sublime Forum

Any plugin that warns you if the code is incorrect?

#1

Hey!

Is there a plugin where you will be automatically warned if you made a typo or typed incorrect code? Such as in Dreamweaver CS5 where a message is displayed if you typed something wrong. Thanks!

0 Likes

SublimeLinter & javascript!?
#2

I use SublimeLinter, but it depends on what language you’re using.

github.com/Kronuz/SublimeLinter

0 Likes

#3

Thank you. But I cannot make it work. I install it trough the package control but do I have to enable something first in order to see the highlighting?

0 Likes

#4

There are some things you need to have setup depending on which OS you’re on. Be sure to read the Linter-specific notes section on the GitHub page: github.com/Kronuz/SublimeLinter – you’ll find what you need based on your OS there. I’m on Windows, so I had to get node.js up and running (and in my path) before it would work.

There’s an existing discussion for SublimeLinter here where you can get any specific questions answered:

EDIT: Oops, wrong link. Here’s the right link to the discussion: SublimeLinter

0 Likes

#5

Hmm well I installed Node.js but still no luck! What do you mean by path? I just installed Node.js & SublimeLinter but still my Javascript files wont highlight an error. I’m on Windows btw.

0 Likes

#6

By path I mean that any program can run node.js without knowing where it is. If you open a command prompt and type in ‘node’ and hit enter, you should see your prompt change to a > sign and be ready for input (if that works, then press ctrl-c twice to quit). If that doesn’t work, then you may have node.js installed but not yet configured correctly. I don’t remember if the Windows installer sets that up for you or not.

Another thing to check - in ST2, press ctrl-~ to open the console. Close ST2, then open it. Then open the console and scroll up. If SublimeLinter is loading correctly you’ll see some lines like this:

Reloading plugin C:\SomeFolder\Sublime Text 2\Data\Packages\SublimeLinter\SublimeLinter.py SublimeLinter: coffeescript loaded SublimeLinter: java loaded SublimeLinter: JavaScript loaded SublimeLinter: annotations loaded SublimeLinter: Objective-J loaded SublimeLinter: perl loaded SublimeLinter: php loaded SublimeLinter: python loaded SublimeLinter: ruby loaded SublimeLinter: pylint loaded

0 Likes

#7

Actually, all that tells you is that the python module loaded, not if the executable necessary to run the linter is available. That isn’t checked until the first time the linter is needed. Then you will see something like this:

SublimeLinter: javascript enabled (using JavaScriptCore)
0 Likes