Tip 99: Collect TODO Items in a Register
Return to the top: <<Practical Vim>>
-
view all the TODO items at a glance:
:g/TODO
-
yank each line containing the word "TODO" into register
a
:-
clear register
a
byqaq
, check the content by:reg a
-
:g/TODO/yank A
- uppercase means appending to the specified register.
- lowercase means overwriting the register's content.
-
clear register
Discussion
Copy all the TODO items to the end of the file:
:g/TODO/t$