Hello. Sublime Text 3 has a great
Sublime Linter plugin that allows you to check code for syntax errors. I somehow suffered with setting this SublimeLinter, as much as three days. But still, my torment was not in vain, and now Sublime checks the syntax in HTML, CSS, PHP and JS files on the fly. It seems that everything is described in detail in various forums, and in some cases it does not work - and that’s it, kill me. Therefore, I am writing this article to cover everything at once.

ATTENTION! This article describes how to configure Sublime Text 3 (hereinafter ST3) on Windows 7 x64 Professional.
So let's go.
')
1. Imagine that you have already installed
ST3 on your Win 7 and installed
Package Control .
2. Now you need to put additional packages in ST3. Go to Preferences -> Package Control -> Install Packages
And install the following packages:
- SublimeLinter
- SublimeLinter-html-tidy
- SublimeLinter-csslint
- SublimeLinter-jsl
- SublimeLinter-jshint
- SublimeLinter-php
- SublimeLinter-phplint
- LESS
- jshint
3. Configure HTML syntax error checking3.1. Download
tidy.exe and put it in any folder you like.
3.2. Add the path to this folder! with tidy.exe in the windows user variable (PATH), the settings of which are in My Computer -> Properties -> Advanced System Settings -> Environment Variables ... -> Select the “PATH” variable -> Click “Edit”, add the path.
ATTENTION! Note the semicolon ";" after each path and do not forget to register it, as well as pay attention to the reverse \ slash.
4. Configure CSS syntax error checking4.1. Download and install
node.js4.2. Add the path to the folder (to the folder!) With node.js in the PATH (the path is approximately the following: C: \ Users \ User_name \ AppData \ Roaming \ npm)! Unforgettable about the semicolon.
4.3. Install csslint. To do this, run the Windows command line as the admin and write:
npm install -g csslint
5. Configuring JavaScript syntax error checking5.1. If did not do points 4.1. and 4.2. - we do it.
5.2. Install jslint and jshint, for this we perform the same operation as in clause 4.3. just write instead of csslint - jslint and jshint respectively.
6. Setting up PHP syntax error checking6.1. Here with these just do hemorrhoids. Personally, I have been looking for a problem for a long time, why does the backlight not work?
6.2. (UPDATE) The fact is that many (including me) set Denwer as a local server. And the devil knows why (did not go into details), but PHP Denver does not perceive ST3, for the life of me. It can output PHP errors to the ST3 console, but there will be no syntax highlighting.
PS I specifically added this item, because in many forums they write that we install PHP, configure ST3 packages and you will be happy. But happiness does not happen, because An item with PHP installation is usually immediately dropped because of the hope for operability (suitability) denwer.
6.3. Therefore, we immediately go
syudy and download PHP. Install PHP - just unzip the archive to any folder and list the path to this folder in PATH (paragraph 3.2.)
6.4. If you had a path to the folder with PHP Denver in your PATH, be sure to delete it.
7. SublimeLinter.sublime.settings configuration fileIT IS NECESSARY TO CORRECT PATHS TO tidy.exe and php.exe
{ "user": { "debug": true, "delay": 0.25, "error_color": "D02000", "gutter_theme": "Packages/SublimeLinter/gutter-themes/Circle/Circle.gutter-theme", "gutter_theme_excludes": [], "lint_mode": "background", "linters": { "csslint": { "@disable": false, "args": [], "errors": "", "excludes": [], "ignore": "", "warnings": "" }, "hlint": { "@disable": false, "args": [], "excludes": [] }, "htmltidy": { "@disable": false, "args": [], "excludes": [] }, "jscs": { "@disable": false, "args": [], "excludes": [] }, "jshint": { "@disable": false, "args": [], "excludes": [] }, "jsl": { "@disable": false, "args": [], "excludes": [] }, "php": { "@disable": false, "args": [], "excludes": [] }, "phplint": { "@disable": false, "args": [], "excludes": [] } }, "mark_style": "outline", "no_column_highlights_line": false, "passive_warnings": false, "paths": { "linux": [], "osx": [], "windows": [] }, "python_paths": { "linux": [], "osx": [], "windows": [] }, "rc_search_limit": 3, "shell_timeout": 10, "show_errors_on_save": false, "show_marks_in_minimap": true, "sublimelinter": true, "sublimelinter_executable_map": { "css": "node", "html": "Z:\\usr\\bin\\tidy.exe", // tidy.exe, , "php": "C:\\Program Files\\PHP_5.6\\php.exe" // php.exe }, "syntax_map": { "css": "css", "html (django)": "html", "html (rails)": "html", "html 5": "html", "js": "js", "php": "php", "python django": "python" }, "warning_color": "DDB700", "wrap_find": true } }
8. Restart Sublime. Profit.Still! It happens that some people forget about the debug mode of Sublimelinter. To enable it, right-click anywhere in the ST3 editing area -> SublimeLinter -> Debug Mode