5 ms·
I use IntelliJ as well for years, but don't underestimate grep -r "# TODO" .
by keyle 7y ago
I use IntelliJ as well for years, but don't underestimate
grep -r "# TODO" .
- tyingq 7y agogrep -H "# TODO" file1 dir1/* file2 Is also useful, as it prints the filename and the matching lines.
- asicsp 7y agoif you are using GNU grep, -H option gets enabled by default when there are multiple input files
- imjasonmiller 7y agoThat’s great! Using ripgrep [1], I think it would even exclude all from your .gitignore by default. I’ll give this a try before adding something to my .vimrc again. 1. https://github.com/BurntSushi/ripgrep https://github.com/BurntSushi/ripgrep
- sverhagen 7y agoThis only works depending on how diligently you formatted those TODOs. Before you know it your regex explodes. I use IntelliJ as well, so I don't have to think about these problems.
- microcolonel 7y agoI mean, how often do you place the four characters "TODO" in your code when you don't mean to mark a TODO? The only common English word I know of that contains that substring is "mastodon", and it'd have to be all-caps.
- yakshaving_jgt 7y agoYou could also include word boundaries if you cared enough. ag '\bTODO\b'
- adrianN 7y agoDoes IntelliJ do something smarter than a regex to find TODO?