A major update has been done to my sublimelint plugin (previously forked from linuxbochs’s version) which now includes a highlighter for user notes (inspired by the version from theblacklion).
From the help file (available from the console, as described below):
[code]SublimeLint help
SublimeLint is a plugin intended to support “lint” programs, highlighting
lines of code which are deemed to contain (potential) errors. It also
supports highlighting special user notes (for example: TODO) so that they
can be quickly located.
To enable a background linter to run by default
(provided one exists for the language/syntax the file being viewed), set
the user preference “sublimelint” to true. If you find that this slows
down the UI too much, you can unset this user preference (or set it to
false) and use the special commands (described below) to run it only
on demand.
Color: user notes
To customize the color used for highlighting user notes, add the following
to your theme (adapting the color to your liking):
name
Sublimelint UserNotes
scope
sublimelint.notes
settings
foreground
#FFFFAA
Color: lint “errors”
The color used to outline lint errors is the invalid.illegal scope
which should normally be defined in your default theme.
==================================================================
The following information is extracted dynamically from the source
code files and should be reflecting accurately all the available
options:
-
view.run_command(“lint”, “user notes”)
Turns background linter off and highlight user notes.User notes are "words" that can be specified as a user preference named "my_notes". If no user preferences has been set, the following will be assumed: my_notes = 'TODO', 'README']
-
view.run_command(“lint”, “PHP”)
Turns background linter off and runs the default PHP linter
(php - l, assumed to be on $PATH) on current view. -
view.run_command(“lint”, “Python”)
Turns background linter off and runs the default Python linter
(pyflakes) on current view. -
view.run_command(“lint”, “pylint”)
Turns background linter off and runs pylint on current view. -
view.run_command(“lint”):
Displays information about how to use this plugin -
view.run_command(“lint”, “help”):
Displays information about how to use this plugin -
view.run_command(“lint”, “reset”)
Removes existing lint marks and restore (if needed) the settings
so that the relevant “background” linter can run. -
view.run_command(“lint”, “on”)
Turns background linter on. -
view.run_command(“lint”, “off”)
Turns background linter off.
[/code]
The code is available from https://github.com/aroberge/sublimelint. User feedback is always welcome.