mirror of
https://github.com/freitass/todo.txt-vim.git
synced 2025-11-12 20:03:47 -05:00
fixup! Fixes #37. Inserting date on new tasks
This commit is contained in:
@@ -28,7 +28,7 @@ endfunction
|
|||||||
function! todo#txt#prepend_date()
|
function! todo#txt#prepend_date()
|
||||||
let current_line = getline('.')
|
let current_line = getline('.')
|
||||||
if (current_line =~ '^\(([a-zA-Z]) \)\?\d\{2,4\}-\d\{2\}-\d\{2\} ') &&
|
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
|
return
|
||||||
endif
|
endif
|
||||||
execute 's/^\(([a-zA-Z]) \)\?\(\d\{2,4\}-\d\{2\}-\d\{2\} \)\?/\1' . s:get_current_date() . ' /'
|
execute 's/^\(([a-zA-Z]) \)\?\(\d\{2,4\}-\d\{2\}-\d\{2\} \)\?/\1' . s:get_current_date() . ' /'
|
||||||
|
|||||||
Reference in New Issue
Block a user