robcowie / SublimeTODO

**[DEPRECATED]** - See https://github.com/jonathandelgado/SublimeTodoReview - Extract TODO-type comments from open files and project folders
295 stars 54 forks source link

How do add custom patterns? #14

Closed Tolmark12 closed 12 years ago

Tolmark12 commented 12 years ago

I'm probably just missing something, but I've been trying to add a custom pattern to my user settings file, do you have a sample of what that looks like in json syntax?

This is what I've tried:

"patterns": {
    "BUG": "r'BUG[\\s]*?:+(?P<todo>.*)$'"
}
robcowie commented 12 years ago

In your user settings file, add a new item "todo": {}. Add patterns to that object. It should look like:

{
    //other, existing settings...

    "todo": {
        "patterns": {
            "BUG": "BUG[\\s]*?:+(?P<bug>.*)$"
        }
    }
}

Have a look at my user settings at https://gist.github.com/1719536

Tolmark12 commented 12 years ago

Perfect, thanks!