Sublime Forum

SublimeLinter

#48

[quote=“facelessuser”]@viisual, it is an old version I believe. I am not at all picking on your code, trust me.

No hard feeling hopefully. I think your plugin is pretty cool, I wouldn’t have had it on my computer to use if I didn’t like it :smile:.[/quote]

Maybe I should have been more playful with my response, surely I wasn’t sincere.

In fact I used the Linter on a production JS file, which had countless lines of things highlighted I was … unaware were even plausible issues… but knowing how finicky some issues can be (trailing comma gotcha in IE6, for instance) I went ahead and applied the suggested Linter changes.

What would have taken me 30m-6h of debugging (IE6 really is a jerk, and terrible to deduce issues with) took all of 5 minutes.

Linter rocks.

And your idea is a good one.

0 Likes

#49

[quote=“bizoo”]Just to start discussion:

Gutter icons are nice, but too many gutter icons is… too much.

IMHO, when there is so many gutter icons like the print screen of low profile linting mode, it become almost useless.
[/quote]

A very fair argument. This is just one proposal. What I am most interested in is getting the linter out of the way to let me code, but still alerting me. So what about this: Remove the outline in low profile mode and show a permanent lint status in the status bar like: SublimeLinter: 24 issues. The underlines could possibly remain.

[quote=“bizoo”]
Same for BracketHighlighter, I first liked the idea but now find it counter productive.

Add to the equation that only one gutter icon could be displayed per line, and it become a mess when used by more than one plugin.
But I like the idea of low profile mode for linter :smile:[/quote]

True. On the topic of BracketHighlighter, would you be interested in an option to only show icons when there is only one selection and no icons on multi-select? I understand that the effectiveness of the icons is lost when a bunch of selections are made. I think this might be a good compromise.

0 Likes

#50

Good idea, IMHO underlines are not too distracting.

0 Likes

#51

Most of those errors are PEP8 errors, which you can ignore with the pep8_ignore setting.

0 Likes

#52

The problem with hiding outlines is that some linters don’t underline at all because they don’t give character position information. You can also hide outlines by setting the outline color in the color theme to the background color of the window, which will effectively hide them.

0 Likes

#53

Did anyone ever figure out how to get this to work on Windows 7 64-bit? I installed WAMP and my SublimeLinter.sublime-settings looks like this:

"sublimelinter_executable_map":
{
    "php": "c:/wamp/bin/php/php5.3.8/php"
},

But it still says PHP is not found (and that’s the correct directory path). Sublime Text 2 beta 2181. Thanks

0 Likes

#54

The SublimeLinter prefs moved from Base File.sublime-settings to SublimeLinter.sublime-settings. Use Package Control to update to the latest version (v1.5.5), and select Preferences->Package Settings->SublimeLinter->Change log. There are instructions there on how to migrate your settings.

0 Likes

#55

Thanks for the reply aparajita, but I did a totally fresh install and the php setting I mentioned is in SublimeLinter.sublime-settings. That’s the only setting I’ve changed in SublimeLinter. Everyone else in the office has had the same results. Don’t know what else we’re missing :cry:

0 Likes

#56

great plugin :smile:

i want to turn off smarttabs or “mixed space with tabs” warnings, how can i do that?

0 Likes

#57

Which SublimeLinter.sublime-settings? You should only be editing the one reached via Preferences->Package Settings->SublimeLinter->Settings - User.

0 Likes

#58

[quote=“ManFromEarth”]great plugin :smile:

i want to turn off smarttabs or “mixed space with tabs” warnings, how can i do that?[/quote]

Thanks. SublimeLinter supports a dozen languages. I can’t magically figure out which one you are talking about.

0 Likes

#59

[quote=“aparajita”]

[quote=“ManFromEarth”]great plugin :smile:

i want to turn off smarttabs or “mixed space with tabs” warnings, how can i do that?[/quote]

Thanks. SublimeLinter supports a dozen languages. I can’t magically figure out which one you are talking about.[/quote]

JavaScript ;p

0 Likes

#60

@ManFromEarth: Open the SublimeLinter User settings file (Preferences > Package Settings > SublimeLinter > Settings - User) and set the “smarttabs” jshint setting to true.

If you have nothing in there to start with, that looks like this:

{
    "jshint_options":
    {
        "smarttabs": true
    }
}

This and other jshint options are documented on jshint.com/options/.

The README file (Preferences > Package Settings > SublimeLinter > README) is worth a look.

Thanks for a great plugin!

0 Likes

#61

[quote=“lukasbob”]@ManFromEarth: Open the SublimeLinter User settings file (Preferences > Package Settings > SublimeLinter > Settings - User) and set the “smarttabs” jshint setting to true.

If you have nothing in there to start with, that looks like this:

{
    "jshint_options":
    {
        "smarttabs": true
    }
}

This and other jshint options are documented on jshint.com/options/.

The README file (Preferences > Package Settings > SublimeLinter > README) is worth a look.

Thanks for a great plugin![/quote]

i tryed that longtime ago ;\ i was writing that to base sublimelinter.sublime-settings and setting smarttabs to false(i want to turn it off), but it doesnt work ;\ tryed ur way with user settings, still doesnt work

“evil”: true,
“regexdash”: true,
“browser”: true,
“wsh”: true,
“trailing”: false,
“sub”: true

we can change these rules, but cant add new?

0 Likes

#62

NEVER edit the default SublimeLinter.sublime-settings, that gets overwritten when SublimeLinter is updated.

Settings in SublimeLinter are not merged on a per-item basis. If you override or add anything in a setting, you have to copy all of the settings to your user settings. So you can’t just add or change one jshint option, you have to include ALL of them. Hope this makes it clear.

  • Aparajita
0 Likes

#63

Actually, I would consider it obligatory.

  • Aparajita
    SublimeLinter maintainer
0 Likes

#64

Thanks Aparajita, got it working now, I guess I was updating the default and not the user linter settings.

0 Likes

#65

[quote=“aparajita”]NEVER edit the default SublimeLinter.sublime-settings, that gets overwritten when SublimeLinter is updated.

Settings in SublimeLinter are not merged on a per-item basis. If you override or add anything in a setting, you have to copy all of the settings to your user settings. So you can’t just add or change one jshint option, you have to include ALL of them. Hope this makes it clear.

  • Aparajita[/quote]

thx for info, but smarttabs option doesnt exist here…when i add it, it doesnt work, i want to turn off “mixed spaces and tabs” warnings in jshint

0 Likes

#66

I am very confused… I have installed Sublime Linter and followed all the setup instructions I could find, but I see absolutely no indication of it working at all. If I invoke the command palette see the option to ‘export annotations’ which takes all my comments and puts them in a new file… but I have seen no evidence whatsoever of any error detection.

I installed node.js, but I keep getting the message ‘SublimeLinter: javascript disabled (One of the following Javascript engines must be installed: node.js, JavaScriptCore)’ Does it have to be running? (I’m getting the same error for CSS).

For PHP I’m getting the error ‘SublimeLinter: php disabled (“php” cannot be found)’. I don’t know how I’m supposed to go about installing PHP. I’m working on a local apache server, I don’t have php installed on my machine and wouldn’t know how to get it… :confused:

I am working in PHP, JS, HTML and CSS, which I was under the impression were built-in. I’m not amazing with this kind of thing, so I’m not sure what ‘getting PHP’ or ‘having Node’ entails exactly. (on a 64-bit windows machine)

0 Likes

#67

Hello,

this plugin is really really nice but I have some trouble to edit settings about javascript.
Firstly, I dont know how to discover what js linter engine is used by default… Is there a javascript command about it?
BTW I try “jshint_options.eqeqeq”: false, with [jshint] replaced by other engine, or [eqeqeq] with “eqeq” and another option (“eqnull”) but I never success to hide warning about comparison operator (== in place of ===).
What I do wrong?

Edit:

  • it looks like (following default data) that my linter is jshint.
  • I also override some CSS options and options for both css and js are not taken. Other option in my sublimelinter settings (= in user) are correctly working (ex: “sublimelinter_notes”: true //highlight annotations like TODO/README
0 Likes