tags:

views:

116

answers:

2

Like most of you, I work in several source files of code every day. A lot of the time, my insane work flow has me doing stuff like:

# TODO
# clean up this code
# do something else with this code

Is there currently a vim plugin available that will search for TODO or a similar mnemonic and print a list of my current tasks that are on-going and in what source file it needs to be done? It would be a huge time saver instead of using grep constantly. Also with vim ctags, you can jump right in the code where you left the TODO off at.

+3  A: 

I've not tried it (yet), but this plugin looks promising.

Edit: I've just tried this plugin out. I will be keeping it around. It's very handy and interactively moves you around the buffer while you navigate the task list.

Also, there is a mirror on github if you use pathogen or another means of git submodules for your vim directory.

Randy Morris
+2  A: 

When you say grep, are you talking about grep from the command line, or :grep in vim? The latter allows you to view a quickfix list of matches and jump to them. If typing out :grep TODO -r . becomes cumbersome you could easily map that operation to a hotkey.

David Winslow
the ":grep TODO -r *" command looks nice! can you explain how to jump to e.g. the 3rd occurrence when displaying the result output?
mawimawi
Check out the docs for the quickfix list: http://vimdoc.sourceforge.net/htmldoc/quickfix.html (or just `:help quickfix`). Also note that you can switch windows to the quickfix list and navigate with the usual vim motions; `Enter` will jump to the line in the file.
David Winslow