开发者

Manage #TODO (lots of files) with VIM

开发者 https://www.devze.com 2023-01-23 10:44 出处:网络
I use VIM/GVIM to develop my py开发者_Go百科thon projects and I randomly I leave #TODO comments in my code.

I use VIM/GVIM to develop my py开发者_Go百科thon 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.


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:

:cw

(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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号