Customizing TODO filters

Note   Contributed by: Esko Luontola

Probably, you already know about IntelliJ IDEA TODO window that finds your “TODO” comments and helps you quickly navigate to them. But did you know that you can work not only with TODO comments, but with any custom pattern?
For example, when you create a quick fix for a problem and don’t have the time to create a proper solution, you write a “hack” and leave a comment. You can start the comment from “Hack” and then explain why this code is bad and what should be done to fix it. Of course, it would be useful to find these comments later and navigate to them like you can do with TODO.
To add a new comments pattern, you need to press “Filter TODO Items” icon in the TODO tool window, and then select Edit Filters.

This will open the TODO dialog, where you can add, delete and modify your patterns. You can also apply filters that will display only certain patterns in the TODO window (to switch between filters, use the same “Filter TODO Items” icon).

When you add a new pattern, you can also specify the text color (it will appear in both the editor and TODO tool window) and the icon that can be used to show the priority.

After that, you can find your “hack” comments in the TODO window.

Technorati tags: , ,
This entry was posted in Tips & Tricks. Bookmark the permalink.

14 Responses to Customizing TODO filters

  1. Brian Schaad says:

    Is there a way to share todo tags with the team?

    • Ted says:

      Shareable todo patterns and filters would be really cool. In a scenario where you are multiple people working on the same user story you could share the patterns for keeping track of the todos/fixmes

  2. Gabriel Falkenberg says:

    Is there a way to have multi-line todo-items?

  3. Uzbekjon says:

    I would also love to know if there is a way to have multi-line TODO’s !

    I have very long todo’s with explanation of what should be done, but IDEA is turning only the first line into blue …

    Woudl really apreciate any directions …

  4. Larry says:

    Will removing todo comments eventually make the files go off the list? :-/


  5. flex-developer says:

    I have flex and php code in my project. TODO works only for .php files(not for .mxml files).

  6. Anton says:

    what about multiline TODO?

  7. Victor says:

    Will very appreciate if somebody answers question about multi-line TODOs.

    • Tom says:

      I think I found a roundabout way to do Multi-Line TODOs with the filters.

      1 – Edit Filters in the TODO panel.
      2 – Add a new pattern that looks like this:


      You can replace the ‘-t’ part with anything really, just something that marks its another line in the same TODO.

      The only problem here is this has to be repeated…

      So the above pattern just lets you do a 2 line TODO, but if you want more than one, you have to keep adding to the pattern with this:


  8. yole says:

    Right now there is no support for multiline TODOs. See for more information.

  9. abercrombie says:

    Is the TODO works only for php file?

  10. hubert says:

    is there a way to automatically generate and assign a unique number to a todo ?

  11. Chris says:

    I’d like the TODO window to show only TODOs that I’ve added (maybe based on VCS/local history diffing). As is, I can switch to ‘Default Changelist’ in the TODO window but that shows *all* TODOs in files I’ve edited not just ‘my’ TODOs.

  12. Yaroslav says:


Leave a Reply

Your email address will not be published. Required fields are marked *