Created
March 29, 2011 06:08
-
-
Save kennyp/891877 to your computer and use it in GitHub Desktop.
Find todos under current directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:ToDoList () | |
cclose | |
let task_list = [] | |
for row in split(system('ack --column "(TODO|CHANGED|FIXME)"'), '\n') | |
let t = split(row, ':') | |
let task_dict = {'filename': t[0], 'lnum': t[1], 'col': t[2]} | |
let task_dict.text = substitute(join(t[3:-1]), '\s\+', ' ', '') | |
let task_list += [task_dict] | |
endfor | |
call setqflist(task_list, 'r') | |
copen | |
endfunction | |
command! ToDoList call <SID>ToDoList() | |
map <silent> <Leader>td :ToDoList<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment