mikaeljorhult / brackets-todo

Brackets/Edge Code extension that displays all TODO comments in current document or project.
144 stars 37 forks source link

Don't really get this plug in... #110

Closed UVLabs closed 9 years ago

UVLabs commented 9 years ago

I don't see any real documentation for this plug in that brakes down customization for people who do not know how to use regex!

So far i can only use this to work with "NOTE" in CSS files and not HTML or PHP... i have tried adding the regex from the site but it isnt working for TODO... what am i doin wrong...

{
    "regex": {
        "prefix": "(?:\\/\\*|\\/\\/|#) *@?(", "(?:<!--) *(",
        "suffix": "):? *(.*?) ?(?=\\*/|\\n|$)", "):? *(.*?) ?(?=-->)"
    },
    "tags": [
        "TODO",
        "NOTE",
        "FIX ?ME",
        "CHANGES",
        "FUTURE"
    ],
    "case": false,
    "search": {
        "scope": "project",
        "excludeFolders": [],
        "excludeFiles": []
    },
    "sort": {
        "done": true
    }
}
mikaeljorhult commented 9 years ago

I have been working on trying to add as many languages as possible in the default settings so you won't have to edit the regex. Last version of the extension do provide support for HTML, CSS, JS and PHP right out of the box so it should work. Have you tried the reset button?

Unfortunately different tags for different languages isn't supported as a feature right know so the selected tags will be used in all languages - HTML, CSS and whatever.

UVLabs commented 9 years ago

Out of the box i can only add todo's with css....i try to make a TODO comment in HTML and it doesn't work (even after i press save)

iv tried

"" "" "" "" "" ""

I notice that if i do //NOTE: Check this later it will do the "note" but this is not a form of commenting in HTML so it shows up on the page...

Also, the default regex has no "" within it so i don't think that it supports HTML commenting out the box.

mikaeljorhult commented 9 years ago

Try resetting your settings using the reset button in the lower left corner. HTML support was added in the latest release and is only used if you reset.

UVLabs commented 9 years ago

I have tried clicking the reset button in the plugin but no dice...see images.

todo list 2 todo list

mikaeljorhult commented 9 years ago

If you are using a .todo file you will need to regenerate it after resetting the settings as the dialog and .todo file won't automatically synchronize to avoid overwriting each other by accident.

On another note the FIXME tag will only work when typed as FIXME or FIX ME, not with a space. The question mark only makes the space optional.

UVLabs commented 9 years ago

Didn't work by default the regex is not in the .todo file so i dont think it will register. It works for all the other langues listed.

lightweightadventures commented 9 years ago

@Uriahs9 If you edit your .todo to read:

{
    "regex": {
        "prefix": "(?:\\/\\*|\\/\\/|#) *@?(",
        "suffix": "):? *(.*?) ?(?=\\*/|\\n|$)"
    },
    "regex": {
        "prefix": "(?:<!--) *(",
        "suffix": "):? *(.*?) ?(?=-->)"
    },
    "tags": [
        "TODO",
        "NOTE",
        "FIX ?ME",
        "CHANGES",
        "FUTURE"
    ],
    "case": false,
    "search": {
        "scope": "project",
        "excludeFolders": [],
        "excludeFiles": []
    },
    "sort": {
        "done": true
    }
}

instead of what you have in the first post it work fine. Hope this helps.

mikaeljorhult commented 9 years ago

Thanks for helping out @drevasvoyage!

@Uriahs9, please reopen issue if the problem isn't resolved using the above code.