Reputation: 2422
I'm working on a huge project that has thousands of TODO items. So when I go to the TODO tool window in IntelliJ IDEA it shows all of them. How can I search for a specific one?
Upvotes: 14
Views: 15781
Reputation: 52
In the latest version of IntelliJ Idea(version 2023.2.1), you could use the 'TODO tool window'. The path is View -> Tool Windows -> TODO.
Upvotes: -1
Reputation: 1583
If you want to define which TODOs should be found, you are able to set filter and patterns.
In TODO panel click on Filter TODO Items and select Edit Filters
Here you are able to set filters and patterns which should be used. More about that is on their site https://www.jetbrains.com/help/idea/2016.2/defining-todo-patterns-and-filters.html. Keep in mind that after you define a new filter, Intellij will start with Indexing (long proccess for huge projects:( )
Also Intellij IDEA TODO tool lets you select from which part you want to see a TODOs (top bar on uploaded image) or you can simply show all TODOs and start typing (classic searching).
Upvotes: 11
Reputation: 4583
You might also want to view only the TODOs you have added in your current branch. You can use the Default Changelist tab for this:
The Scope Based tab also gives you some useful options for narrowing down the TODOs too:
Upvotes: 2
Reputation: 595
If you are using a mac, keys ⌘6 (command key and number 6 key) will do the magic.
Upvotes: 4
Reputation: 51
This is not the exact answer to the given question, but it helped for me, so maybe it will also help someone else :)
What I haven't notice earlier is that TODO Tool Window/tab has some child tabs on the top. For me, the most usefull one, was the tab „Current file”. I was made aware of this feature after looking in official IDE documentation:
https://www.jetbrains.com/help/idea/todo-tool-window.html
Upvotes: 1
Reputation: 311883
First, expand all the todos (view the side menu or by pressing CTRL+numpad +. Then just start typing, and IntelliJ will take you to the first place the string you searched for appears, be it a name of a folder, file or the text of the todo comment itself. Like any other search in IntelliJ, you can use the ↑ and ↓ keys to jump between items matching your search string.
Upvotes: 6