40

Is there a way to tell Sublime to highlight comments that contain the word "TODO"?

I've looked for plugins that do this but haven't really been able to find much.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
samturner
  • 2,213
  • 5
  • 25
  • 31

5 Answers5

36

Sublime Linter should do the trick. You can add underlining for custom static text.

All you need is the Sublime Package Manager:

  1. Press Ctrl/Cmd+Shift+P
  2. Search for "Package Control: Install Package"
  3. Search for "SublimeLinter"

As stated by jon in the first comment:

For ST3, the SublimeLinter-annotations plugin highlights TODO, FIXME etc.

Ilario Pierbattista
  • 3,175
  • 2
  • 31
  • 41
jstaab
  • 3,449
  • 1
  • 27
  • 40
  • 29
    For ST3, the [SublimeLinter-annotations](https://github.com/SublimeLinter/SublimeLinter-annotations) plugin highlights TODO, FIXME etc. – jon Oct 22 '14 at 10:35
  • 2
    For ST2, do "Preferences" -> "Package Settings" -> "SublimeLinter" -> "Settings-default", set "sublimelinter_notes" to true – vpekar Aug 11 '15 at 05:57
  • 1
    I cannot find out how to do this inside of Sublime Linter. I read through the settings and through their readme page (I could not find more documentation on this plugin) I did not see any static highlighting in the current settings. Could you (or someone) show where this is done in this plugin? – Steven Rogers May 17 '16 at 17:29
  • 3
    I also installed SublimeLinter-annotations and that did just what I wanted and worked like a charm! It did however require SublimeLinter as a prereq of course. – Jared Jun 16 '16 at 07:05
9

I'm using the TodoReview plugin. It's very good and simple.

After installing it via Package Control, in order to use it on Windows, press Ctrl+Shift+p and type TodoReview: Project Files.

It will open up a tab with all TODOs in your project, where you can navigate with up/down and go to the TODOs location with enter.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Fabricio
  • 7,705
  • 9
  • 52
  • 87
3

Try this plugin : https://github.com/robcowie/SublimeTODO Maybe it can meet your requirement.

Chris Li
  • 3,715
  • 3
  • 29
  • 31
  • 3
    it searches for all TODO comments and displays them in a separate tab = nice, but it does not highlight them in the "edit" mode, like Vim does... – webwesen May 13 '13 at 15:19
2

The "highlight_code_remarks.py" plugin seems to do what you are looking for. It can be found on: https://bitbucket.org/theblacklion/sublime_plugins/src/

It requires some handwork to install, especially note that:

  1. You don't just need to copy the highlight_code_remarks.py file, but also the entire "support" folder.
  2. Read the Instructions on the beginning of highlight_code_remarks.py file. If you just want keyword highlighting, you may skip the part which explains how to install the key bindings.

In case of trouble also have a look at this forum post, that's where I originally found the plugin: http://www.sublimetext.com/forum/viewtopic.php?f=5&t=1745


...and just in case someone reading this has never installed a sublime plugin before: In Sublime Text, click "Preferences", then "Browse Packages..."

  • Copy the files mentioned above belong to your "User" subfolder.
  • The color scheme configuration files can be found in the "Color Scheme - Default" subfolder.
Stefan K.
  • 21
  • 3
1

Try the HighlightWordsPlugin. Worked great for me on Sublime Text 3

andrewcockerham
  • 2,676
  • 3
  • 23
  • 19