fixup! Fixes #37. Inserting date on new tasks

This commit is contained in:
Leandro Freitas
2015-05-18 19:03:57 -03:00
parent 77cfafb9f0
commit ddbcdd823f

View File

@@ -28,7 +28,7 @@ endfunction
function! todo#txt#prepend_date()
let current_line = getline('.')
if (current_line =~ '^\(([a-zA-Z]) \)\?\d\{2,4\}-\d\{2\}-\d\{2\} ') &&
exists('g:todo_existing_date') && g:todo_existing_date == 'n'
\ exists('g:todo_existing_date') && g:todo_existing_date == 'n'
return
endif
execute 's/^\(([a-zA-Z]) \)\?\(\d\{2,4\}-\d\{2\}-\d\{2\} \)\?/\1' . s:get_current_date() . ' /'