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

TODO does not work with Latex files. #54

Open rumpelsepp opened 11 years ago

rumpelsepp commented 11 years ago

The plugin does not find TODOs in latex files.

vovkkk commented 11 years ago

Works for me.

Could you @statschner , please, provide an example which doesn't found?

rumpelsepp commented 11 years ago

Hm okay, I figured out the problem. I'm writing my Bachelor Thesis and I often use something like this:


% TODO
Paragraph which has to be improved... blabla bla.

When I use this:


% TODO: improve this
Paragraph which has to be improved... blabla bla.

it works. In my opinion the plugin should also find those todos without a :.

vovkkk commented 11 years ago

You can customize it; to find line with todo and text w/o colon simply add this into your 'Settings - User'

{
    "todo":
    {
        "core_patterns": {
            "TODO": "TODO[\\s]*?:?(?P<todo>.*)$"
    }
}

To find todo w/o text at all add this:

{
    "todo":
    {
        "patterns":
        {
            "empty_todo": "TODO(?P<emptytodo>(\\s?|\\s*)$)"
        }
    }
}

If you want both of them then:

{
    "todo":
    {
        "core_patterns": {
            "TODO": "TODO[\\s]*?:?(?P<todo>.*)$"
        },
        "patterns":
        {
            "empty_todo": "TODO(?P<emptytodo>(\\s?|\\s*)$)"
        }
    }
}
rumpelsepp commented 11 years ago

Thank you very much! :)