SublimeLinter
The code linting framework for Sublime Text
Details
Installs
- Total 2.26M
- Win 1.20M
- Mac 647K
- Linux 420K
Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 53 | 87 | 96 | 93 | 69 | 70 | 103 | 87 | 91 | 86 | 87 | 83 | 59 | 103 | 114 | 79 | 104 | 100 | 65 | 77 | 85 | 99 | 113 | 100 | 79 | 63 | 57 | 61 | 89 | 82 | 98 | 87 | 72 | 73 | 96 | 83 | 93 | 106 | 81 | 62 | 51 | 82 | 123 | 109 | 100 | 81 |
Mac | 21 | 45 | 32 | 35 | 25 | 20 | 39 | 37 | 38 | 29 | 38 | 23 | 17 | 43 | 47 | 49 | 29 | 41 | 20 | 18 | 37 | 49 | 49 | 43 | 30 | 25 | 17 | 37 | 38 | 46 | 38 | 33 | 17 | 26 | 38 | 37 | 36 | 44 | 49 | 16 | 20 | 37 | 24 | 46 | 45 | 44 |
Linux | 18 | 34 | 33 | 34 | 31 | 28 | 22 | 27 | 26 | 39 | 37 | 27 | 32 | 40 | 30 | 34 | 34 | 27 | 27 | 19 | 29 | 27 | 42 | 31 | 21 | 23 | 28 | 28 | 22 | 36 | 26 | 20 | 33 | 27 | 30 | 30 | 35 | 31 | 38 | 27 | 27 | 40 | 33 | 30 | 25 | 28 |
Readme
- Source
- raw.githubusercontent.com
SublimeLinter
The code linting framework for Sublime Text. No linters included: get them via Package Control.
Installation
Install SublimeLinter and linters via Package Control.
Settings
Settings are documented in the default settings.
Open the settings using the Command Palette (ctrl+shift+P
) searching for Preferences: SublimeLinter Settings
(mnemonic: sls
).
When you open the SublimeLinter settings you'll see the defaults on the left or top. Usually that's all that is needed for end-users but some additional information is in our docs at sublimelinter.com.
Quick Actions/Fixers
As we do just linting SublimeLinter naturally does not come with fixers and/or code formatters. However, we have a fixer API and ship (mostly) “fix by ignoring” actions. These allow you to quickly ignore specific error messages inline and ad hoc.[1]
SublimeLinter currently ships actions for eslint, stylelint, flake8, mypy, shellcheck, codespell and phpcs.
Want to see actions for your favourite linter? Please open a PR with your addition to quick_fix.py. We have tests for them!
[1] Why this limitation though? Well it is usually easy to add a semicolon here and a space there, but the inline ignore rules and syntaxes are very cumbersome to type and to remember. And there is basically no project of any size where you don't have to ignore ad-hoc something somewhere once.
Key Bindings
SublimeLinter comes with some pre-defined keyboard shortcuts. You can customize these via the Package Settings menu.
Command | Linux & Windows | MacOS |
---|---|---|
Lint this view | CTRL + K, L | CTRL + CMD + L |
Open diagnostics panel | CTRL + K, A | CTRL + CMD + A |
Goto next error | CTRL + K, N | CTRL + CMD + E |
Goto prev error | CTRL + K, P | CTRL + CMD + SHIFT + E |
Take also a look at the default bindings.sublime-keymap>) because we document other commands and have usually some tricks in there too.
For example, it is very advisable to bind sublime_linter_quick_actions
, e.g.
// To trigger a quick action
// { "keys": ["ctrl+k", "ctrl+f"],
// "command": "sublime_linter_quick_actions"
// },
Support & Bugs
Yeah, totally! Often if it doesn't work, Sublime will have something in the
console (View -> Show Console
). Enable debug
mode in the settings,
restart Sublime Text and look at the console output for anything.
If your issue is specific to a particular linter, please report it on that linter's repository, otherwise open it right here.
Creating a linter plugin
Use the template to get started on your plugin. It contains a how-to with all the information you need. Refer to https://www.sublimelinter.com/en/master/linter_plugin.html for more detailed information. Of course, take a look at a similar linter plugin and let it inspire you.
Also Support
❤️😒 Donate 🙄