diff options
author | Manu Hernandez <manu@littlemousetrap.com> | 2020-03-12 10:25:23 +0000 |
---|---|---|
committer | David Beniamine <david.beniamine@tetras-libre.fr> | 2020-03-12 10:25:23 +0000 |
commit | 5585652ca6a768a809dc14a0e09f19b637b7a9cb (patch) | |
tree | b5d1e43c62bb16c6f4637b2c88eca68de4b97cb7 | |
parent | 11811d90a7693c8e92e5c00c36b4557d14b775a7 (diff) | |
download | todo.txt-vim-5585652ca6a768a809dc14a0e09f19b637b7a9cb.zip |
Fix generation of [Dd]one-[Td]oday.txt files
-rw-r--r-- | autoload/todo.vim | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/autoload/todo.vim b/autoload/todo.vim index 74a54dd..c16cc52 100644 --- a/autoload/todo.vim +++ b/autoload/todo.vim @@ -144,7 +144,13 @@ function! todo#RemoveCompleted() if exists("g:TodoTxtForceDoneName") let l:done=g:TodoTxtForceDoneName else - let l:done=substitute(substitute(expand('%:t'),'todo','done',''),'Todo','Done','') + let l:currentfile=expand('%:t') + + if l:currentfile =~ '[Tt]oday.txt' + let l:done=substitute(substitute(l:currentfile,'today','done-today',''),'Today','Done-Today','') + else + let l:done=substitute(substitute(l:currentfile,'todo','done',''),'Todo','Done','') + endif endif let l:done_file = l:target_dir.'/'.l:done echo "Writing to ".l:done_file |