Customizing TODO filters
July 7th, 2006 by Alexandra RusinaNote 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.


February 27th, 2007 at 12:52 am
Is there a way to share todo tags with the team?
November 28th, 2007 at 9:35 am
Is there a way to have multi-line todo-items?
December 4th, 2009 at 6:19 am
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 …
April 14th, 2010 at 11:47 am
Will removing todo comments eventually make the files go off the list? :-/
Grr…
September 21st, 2010 at 12:35 am
I have flex and php code in my project. TODO works only for .php files(not for .mxml files).
November 26th, 2010 at 9:20 pm
what about multiline TODO?
March 25th, 2011 at 11:48 am
Will very appreciate if somebody answers question about multi-line TODOs.
March 26th, 2011 at 12:59 pm
Right now there is no support for multiline TODOs. See http://youtrack.jetbrains.net/issue/IDEA-62161 for more information.
January 24th, 2012 at 5:20 am
Is the TODO works only for php file?
February 29th, 2012 at 8:36 am
is there a way to automatically generate and assign a unique number to a todo ?
May 9th, 2012 at 9:09 am
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.