3

I installed TodoReview for sublime 3 but I can't get it to catch my TODO statements. I'm coding in python and insert a TODO above a statement like this,

# TODO
print "This is just an example, I also tried varying number of hashes and cases, and typing the #TODO after the statement instead of above"

When then run Todo Review: Open files from the command palette, it only reads something like

// Thursday 05/07/15 at 03:03PM - 5 files in 0.03 secs

And nothing more (my file with the TODO is one of the five open files).

My TodoReview:sublime-settings file look like this.

{
"patterns": {
    "TODO": "TODO[\\s]*?:[\\s]*(?P<todo>.*)$"
},
"patterns_weight": {
},
"exclude_folders": [
    "*.git*"
],
"exclude_files": [
    "*.sublime-workspace",
    "*.sublime-project"
],
"case_sensitive": false,
"render_include_folder": true,
"render_folder_depth": 1,
"render_maxspaces": 50,
"render_header_format": "%d - %c files in %t secs",
"render_header_date": "%A %m/%d/%y at %I:%M%p",
"navigation_forward_skip" : 10,
"navigation_backward_skip" : 10
}
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Kirbies
  • 777
  • 1
  • 10
  • 17

1 Answers1

8

It's looking for TODO:, not just TODO.

There should be a user settings for TodoReview; in Preferences -> Package Settings, there should be an entry for 'TodoReview', which will have a Default and User settings option.

You can then open the default settings, copy the 'patterns' key/value pair and paste it into the user settings file; edit the pattern to your specification and you should be good to go!

Mike P
  • 742
  • 11
  • 26
  • This has turned up in the "Low Qualtiy Posts" queue because of brevity. Could you perhaps provide a little more detail as to whether the OP is forced to use "TODO:" or can modify their `patterns` value to allow "TODO". I know convention is to use "TODO:" and that "TODO" could easily turn up in unexpected places, but improving your answer with more explanation will also help improve Stack Overflow. – kdopen May 07 '15 at 14:05
  • @Mike P I tried `TODO:` and even tried copying the following ( `"TODO": "TODO[\\s]*?:[\\s]*(?P.*)$"` ) into one of my scripts, and still TodoReview does not catch anything. The setting file I posted above is the default settings, and my user settings file is blank. – Kirbies May 07 '15 at 17:57
  • I figured it out. I have to add something after TODO: , like TODO: Remember something after TODO. @Mike P Thanks a lot :) – Kirbies May 07 '15 at 18:31
  • If you look at settings files you'll see that is not case sensitive. U can also wrote `# todo: something` in case you don't like so much to switch to uppercase. – m3nda Feb 10 '17 at 23:50