diff options
author | David Beniamine <david.beniamine@tetras-libre.fr> | 2020-03-12 10:25:23 +0000 |
---|---|---|
committer | David Beniamine <david.beniamine@tetras-libre.fr> | 2020-03-12 10:25:23 +0000 |
commit | ff4334906a881046c876e06af60348b5e9890cb4 (patch) | |
tree | b5d1e43c62bb16c6f4637b2c88eca68de4b97cb7 | |
parent | 11811d90a7693c8e92e5c00c36b4557d14b775a7 (diff) | |
parent | 5585652ca6a768a809dc14a0e09f19b637b7a9cb (diff) | |
download | todo.txt-vim-ff4334906a881046c876e06af60348b5e9890cb4.zip |
Merge branch 'fix_done_today_files' into 'master'
Fix generation of [Dd]one-[Td]oday.txt files
See merge request dbeniamine/todo.txt-vim!36
-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 |