More flexible file naming (Request #2)

CHG: More flexible file naming files matching one of the following are todo
files:
    YYYY-MM-[Tt]odo.txt
    YYYY-MM-DD[Tt]odo.txt
    [Tt]odo-YYYY-MM.txt
    [Tt]odo-YYYY-MM-DD.txt
    [Tt]odo.txt
    [Tt]oday.txt
    YYYY-MM-[Dd]one.txt
    YYYY-MM-DD[Dd]one.txt
    [Dd]one-YYYY-MM.txt
    [Dd]one-YYYY-MM-DD.txt
    [Dd]one.txt
    [Dd]one-[Tt]oday.txt
 Moreover, remove complete tasks (<LocalLeader>D) moves the task to the
 done.txt file corresponding to the current todo.txt, aka if you are editing
 2015-07-07-todo.txt, the done file while be 2015-07-07-done.txt.
 This behaviour can be cancelled by fixing the done filename using
 g:TodoTxtForceDoneName
FIX: Bug while completing empty file
This commit is contained in:
David Beniamine
2015-07-08 09:27:59 +02:00
parent 53ad73ebda
commit 9f87eec204
4 changed files with 144 additions and 58 deletions

View File

@@ -3,9 +3,11 @@
## What is this plugin ?
This plugin is a fork of [freitass
todo.txt](https://github.com/freitass/todo.txt-vim). It add severals functionalities including a [hierarchical sort](#sort), a
[complete](#completion) function, some stuff to handle [due dates](#due-dates)
and others stuff see [new features](#new-features).
todo.txt](https://github.com/freitass/todo.txt-vim). It add severals
functionalities including a [hierarchical sort](#sort), a
[complete](#completion) function, some stuff to handle [due
dates](#due-dates), a more [flexible file naming](#flexible-file-naming), and
others stuff see [new features](#new-features).
Freitass announced on october 30th 2014 that he is not going to merge his version.
@@ -120,6 +122,34 @@ sorted by at the beginning of the file, the rest of the file is not modified.
`DUE:` : (Insert mode) Insert `DUE:` followed by the current date
### Flexible File naming
This plugin provides a Flexible file naming for todo.txt, all the following
names are recognized as todo:
YYYY-MM-[Tt]odo.txt
YYYY-MM-DD[Tt]odo.txt
[Tt]odo-YYYY-MM.txt
[Tt]odo-YYYY-MM-DD.txt
[Tt]odo.txt
[Tt]oday.txt
And obviously the same are recognize as done:
YYYY-MM-[Dd]one.txt
YYYY-MM-DD[Dd]one.txt
[Dd]one-YYYY-MM.txt
[Dd]one-YYYY-MM-DD.txt
[Dd]one.txt
[Dd]one-[Tt]oday.txt
Moreover, remove complete tasks `<LocalLeader>D` moves the task to the
done.txt file corresponding to the current todo.txt, aka if you are editing
2015-07-07-todo.txt, the done file while be 2015-07-07-done.txt. If you don't
like this behavior, you can set the default done.txt name:
let g:TodoTxtForceDoneName='done.txt'
### Others
`<LocalLeader>x` is a toggle which allow you to unmark a task as done.