News for hackers. Stuff that matters.
Re:The Plain Text Project by keyle on Monday December 02, 2019 @05:52PM (#21687945)
I use IntelliJ as well for years, but don't underestimate

   grep -r "# TODO" .
Re:The Plain Text Project by imjasonmiller on Monday December 02, 2019 @07:11PM (#21688549)
That’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

Re:The Plain Text Project by tyingq on Monday December 02, 2019 @06:42PM (#21688350)
grep -H "# TODO" file1 dir1/* file2

Is also useful, as it prints the filename and the matching lines.

Re:The Plain Text Project by asicsp on Tuesday December 03, 2019 @10:06AM (#21692832)
if you are using GNU grep, -H option gets enabled by default when there are multiple input files
Re:The Plain Text Project by tyingq on Tuesday December 03, 2019 @10:31AM (#21693149)
Hopefully only when stdout isatty().

Edit: Nope, writes l̶i̶n̶e̶ ̶n̶u̶m̶b̶e̶r̶s̶ file names to output regardless. Boo.

Re:The Plain Text Project by asicsp on Tuesday December 03, 2019 @10:35AM (#21693196)
you mean filename, not line numbers?

option -h will disable filename in output

Re:The Plain Text Project by sverhagen on Monday December 02, 2019 @09:16PM (#21689341)
This 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.
Re:The Plain Text Project by microcolonel on Monday December 02, 2019 @09:41PM (#21689445)
I 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.
Re:The Plain Text Project by yakshaving_jgt on Tuesday December 03, 2019 @06:44AM (#21691588)
You could also include word boundaries if you cared enough.

    ag '\bTODO\b'
Re:The Plain Text Project by adrianN on Tuesday December 03, 2019 @01:20AM (#21690386)
Does IntelliJ do something smarter than a regex to find TODO?