diff --git a/README.markdown b/README.markdown index 999d1fe..4fefb43 100644 --- a/README.markdown +++ b/README.markdown @@ -12,9 +12,11 @@ mappings, to help with edition of these files: `-d` : Insert the current date -`-D` : Insert the current date with leading `x` (completed) +`-D` : Mark task as done (inserts current date as completion date) -`date` : (Insert mode) Insert the current date +`DD` : Mark all tasks as completed + +`date` : (Insert mode) Insert the current date If you want the help installed run ":helptags ~/.vim/doc" inside vim after having copied the files. Then you will be able to get the commands help with: :h todo.txt diff --git a/Todo.txt b/Todo.txt index cdedbd2..ad5e0cb 100644 --- a/Todo.txt +++ b/Todo.txt @@ -3,11 +3,11 @@ (B) 2011-05-31 Start documentation @doc (C) 2011-06-01 Improve syntax file @syntax x 2014-04-27 2011-05-30 Contact main project for reference -X 2011-05-30 Create README.markdown to be published in github @doc -X 2011-05-30 Implement colorized priorities @syntax -X 2011-05-30 Implement filetype detection @ftdetect -X 2011-05-30 Sort lines per priority @ftplugin -X 2011-05-31 Highlight date, project and context of tasks with no priority @syntax -X 2011-05-31 Stop breaking lines automatically @ftplugin -X 2011-06-06 Easier date input @ftplugin -X 2011-06-06 Implement foldings @ftplugin +x 2011-05-30 Create README.markdown to be published in github @doc +x 2011-05-30 Implement colorized priorities @syntax +x 2011-05-30 Implement filetype detection @ftdetect +x 2011-05-30 Sort lines per priority @ftplugin +x 2011-05-31 Highlight date, project and context of tasks with no priority @syntax +x 2011-05-31 Stop breaking lines automatically @ftplugin +x 2011-06-06 Easier date input @ftplugin +x 2011-06-06 Implement foldings @ftplugin diff --git a/doc/todo.txt b/doc/todo.txt index c1a4ca6..fee59eb 100644 --- a/doc/todo.txt +++ b/doc/todo.txt @@ -3,12 +3,14 @@ ============================================================================== COMMANDS *todo-commands* -`-s` : Sort the file +`-s` : Sort the file -`-d` : Insert the current date +`-d` : Insert the current date -`-D` : Insert the current date with leading `x` (completed) +`-D` : Mark task as done (inserts current date as completion date) -`date` : (Insert mode) Insert the current date +`DD` : Mark all tasks as completed - is \ by default, so -s means you type \s +`date` : (Insert mode) Insert the current date + + is \ by default, so -s means you type \s diff --git a/ftplugin/todo.vim b/ftplugin/todo.vim index d3ec73a..e3c09d2 100644 --- a/ftplugin/todo.vim +++ b/ftplugin/todo.vim @@ -31,6 +31,10 @@ function! TodoTxtMarkAsDone() normal! Ix endfunction +function! TodoTxtMarkAllAsDone() + :g!/^x /TodoTxtMarkAsDone() +endfunction + " Mappings {{{1 " Sort tasks {{{2 if !hasmapto("s",'n') @@ -59,6 +63,11 @@ if !hasmapto("D",'v') vnoremap