*todo.txt* ============================================================================== COMMANDS *todo-commands* `s` : Sort the file by priority `s+` : Sort the file on +Projects `s@` : Sort the file on @Contexts `s@` : Sort the file on due dates `sc` : Sort the file by context then by priority `scp` : Sort the file by context, project then by priority `sp` : Sort the file by project then by priority `spc` : Sort the file by project, context then by priority `-sd` : Sort the file by due-date. Entries with a due date appears sorted by at the beginning of the file, the rest of the file is not modified. `j` : Lower the priority of the current line `k` : Increase the priority of the current line `a` : Add the priority (A) to the current line `b` : Add the priority (B) to the current line `c` : Add the priority (C) to the current line `d` : Insert the current date `date` : (Insert mode) Insert the current date `due:` : (Insert mode) Insert `due:` followed by the current date `DUE:` : (Insert mode) Insert `DUE:` followed by the current date `x` : Toggle mark task as done (inserts or remove current date as completion date) `X` : Mark all tasks as completed `D` : Move completed tasks to done.txt is \ by default, so -s means you type \s =============================================================================== CONFIGURATION *todo-configuration* The user can give argument for the two calls to vim sort function by changing the following variables: g:Todo_txt_first_level_sort_mode g:Todo_txt_second_level_sort_mode Defaults values are: g:Todo_txt_first_level_sort_mode="i" g:Todo_txt_second_level_sort_mode="i" For more information on the available flags see help :sort We also provide a nice complete function for project and context, to use it add the following lines to your vimrc: " Use TodoComplete as the omni complete for todo files au filetype todo setlocal omnifunc=TodoComplete You can also start automatically the completion when entering '+' or '@' by adding the next lines to your vimrc: " Auto complete projects au filetype todo imap + + " Auto complete contexts au filetype todo imap @ @ =============================================================================== COMPLETION *todo-complete* The TodoComplete function is designed to complete projects (starting by '+') and context (starting by '@'). If you use it on a regular word, it will do a normal keyword completion (on all buffers). If you try to complete a project, it will propose all projects in all open buffers and for each of them, it will show their context and the name of the buffers in which they appears in the preview window. TodoCompelte does the same thing for context except that it gives in the preview the list of projects existing in each existing contexts.