mirror of
https://github.com/freitass/todo.txt-vim.git
synced 2025-11-14 12:53:46 -05:00
Fixes #39: Completion date replaces creation date.
This commit is contained in:
@@ -25,6 +25,10 @@ function! s:get_current_date()
|
||||
return strftime('%Y-%m-%d')
|
||||
endfunction
|
||||
|
||||
function! todo#txt#prepend_date()
|
||||
execute 'normal! I' . s:get_current_date() . ' '
|
||||
endfunction
|
||||
|
||||
function! todo#txt#replace_date()
|
||||
let current_line = getline('.')
|
||||
if (current_line =~ '^\(([a-zA-Z]) \)\?\d\{2,4\}-\d\{2\}-\d\{2\} ') &&
|
||||
|
||||
Reference in New Issue
Block a user