Manage #TODO (lots of files) with VIM


I use VIM/GVIM to develop my python projects and I randomly I leave #TODO comments in my code.

Is there any way to manage (search, list and link) all the #TODO occurrences inside VIM? I tried the tasklist plugin, it's almost what I need, but it only lists the current file #TODO occurrences. Generally my projects has some sub-folders and many .py files, so I'd like to find a way to search through all folders and files in the current working directory and list them.

11/1/2017 9:42:05 AM

Accepted Answer

If you just want a list of the occurences of "TODO" in .py files in the working directory, you can just use :vimgrep like so:

:vimgrep TODO **/*.py

Then open the quickfix window with:


(it might open it automatically anyway, not sure) and just scroll through the results, hitting Enter to go to each occurrence.

For more complicated management, I'd probably recommend setting up an issue tracker.

11/5/2010 1:26:27 PM

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow