Skip to content
This repository

This package contains a syntax file and a file-type plugin for the simple format used by the TaskPaper application.

branch: master
taskpaper.txt   For Vim version 6.0     Last change: 2012 March 13

David O'Callaghan <>

13th March 2012


*Latest version from*

From the TaskPaper website (<>):

"TaskPaper is a simple to-do list application that helps you stay
organized. Unlike competing applications, TaskPaper is based on plain text
files which offer you paper-like simplicity and ease of use." 

TaskPaper is a to-do list application for Mac OS X based on the "Getting
Things Done" approach of David Allen (<>). It supports
the GTD notions of projects, tasks and contexts.

This package contains a syntax file and a file-type plugin for the simple
format used by the TaskPaper application. It is intended for Mac users who
want to edit their TaskPaper lists in Vim from time to time (for example, in
a SSH session, or on a non-Mac system) and for anyone who is looking for a
simple to-do list format.


It should be safe to simply unpack the package into your .vim directory.
It contains the following files:


To access this help file from within Vim you must first update your help 

    :helptags ~/.vim/doc

The path may need to be modified depending on where you install to. Once
you have done this you can access the help with this command:

    :help taskpaper


The syntax file highlights project headings and task contexts (tags), and
"greys out" completed tasks. The exact style of the displayed file depends
on your Vim colour scheme.

A project heading is a piece of text ending in a colon.

A task is a line beginning with a hyphen '-' and can have zero or more
context tags.

A context tag has the form "@tag".

Other text is considered as a "note" and is displayed as a Vim comment.

File-type Plugin

The file-type plugin tries to make editing TaskPaper files in Vim more

Vim can complete context names after the '@' using the keyword completion
commands (e.g. Ctrl-X Ctrl-N).

The plugin defines some new mappings:

    \td     Mark task as done
    \tx     Mark task as cancelled
    \tt     Mark task as today
    \tD     Archive @done items
    \tX     Show tasks marked as cancelled
    \tT     Show tasks marked as today
    \t/     Search for items including keyword
    \ts     Search for items including tag
    \tp     Fold all projects
    \t.     Fold all notes
    \tP     Focus on the current project
    \tj     Go to next project
    \tk     Go to previous project
    \tg     Go to specified project
    \tm     Move task to specified project

Note: if `<Leader>` has been changed (e.g. `:let mapleader=",,"`)
then its value should be used instead of `\` in the mappings.

Marking a task as done will add the "@done" context tag to the end of the
task, and it will be greyed out by the syntax file.

To show all tasks with a particular context tag, type `\ts` and a tag name to
search.  If you use the `\ts` command over the desired context tag, the tag
name is set as default value.  This will fold all the irrelevant tasks leaving
only the tasks in the current context visible.

To fold all top-level projects leaving only the headings visible use the `\tp`
command. Standard fold commands can be used to open (`zo`) and close (`zc`)
individual projects.

To show all projects and tasks use the `zR` command. This disables folding so
that the entire file is expanded.

To go to next or previous project use the `\tj` command or `\tk` command.  To
go to a project you specify use the `\tg` command.  You can complete project
names with <Tab> on prompt.


The plugin supports a number of configuration variables, which can be set in
your .vimrc file.

To change the default date format string used when marking a task complete,
define the `task_paper_date_format` variable. The format matches your system's
`strftime()` function.

For example, to include the date and time in ISO8601 format:

    let g:task_paper_date_format = "%Y-%m-%dT%H:%M:%S%z"

To change the default archive project name, define the
`task_paper_archive_project` variable.  The default value is "Archive".

    let g:task_paper_archive_project = "Archive"

By default, when you move a task, the cursor will follow that task to its new
location.  To make the cursor stay in it's current location, change the
`task_paper_follow_move` variable.

    let g:task_paper_follow_move = 0

If you want to hide done tasks when searching you can change the
`task_paper_search_hide_done` variable.

    let g:task_paper_search_hide_done = 1

To set a custom style (colour, bold, etc.) for tags task_paper_styles variable,
which is a dictionary.

    let g:task_paper_styles={'wait': 'ctermfg=Blue guifg=Blue', 'FAIL':
'ctermbg=Red guibg=Red'}

See |highlight-args| for a full description of the syntax.

File-type Detection

This package also contains a script to automatically use the TaskPaper file
type for all files with the ".taskpaper" extension.


You can create your own shortcut for tagging.  To define your own shortcut,
write settings in ~/.vim/ftplugin/taskpaper.vim or ~/.vimrc.  If you use the
.vimrc file, define settings like:

    function! s:taskpaper_setup()
    " Your settings
    nnoremap <buffer> <silent> <Leader>tn
    \    :<C-u>call taskpaper#toggle_tag('next', '')<CR>

    augroup vimrc-taskpaper
    autocmd FileType taskpaper call s:taskpaper_setup()
    augroup END

To add a tag without argument:

    nnoremap <buffer> <silent> <Leader>tn
    \    :<C-u>call taskpaper#add_tag('next', '')<CR>

To delete a tag:

    nnoremap <buffer> <silent> <Leader>tN
    \    :<C-u>call taskpaper#delete_tag('next', '')<CR>

To toggle a tag:

    nnoremap <buffer> <silent> <Leader>tn
    \    :<C-u>call taskpaper#toggle_tag('next', '')<CR>

To add a tag with an argument:

    nnoremap <buffer> <silent> <Leader>tq
    \    :<C-u>call taskpaper#add_tag('priority')<CR>

You can specify the priority value on prompt.

To delete the priority tag with any argument:

    nnoremap <buffer> <silent> <Leader>tQ
    \    :<C-u>call taskpaper#delete_tag('priority', '')<CR>

To delete only the level 1 of priority tag:

    nnoremap <buffer> <silent> <Leader>tQ
    \    :<C-u>call taskpaper#delete_tag('priority', '1')<CR>

To toggle a tag with an argument:

    nnoremap <buffer> <silent> <Leader>tq
    \    :<C-u>call taskpaper#toggle_tag('priority')<CR>

To update a tag (not delete if the tag exists):

    nnoremap <buffer> <silent> <Leader>tq
    \    :<C-u>call taskpaper#update_tag('priority')<CR>


Copyright (C) 2007--2012 by David O'Callaghan <>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


The initial version of the ToggleDone() function was based on SwitchBox()
from the VimOutliner Checkboxes script written by Noel Henson (available
from <>).

Context folding expression was based on a snippet from Vim Tip 282

Thanks are due to a number of contributors who have supplied suggestions
or patches to improve TaskPaper.vim:

 * Alexander Wodniok
   - hint to allow this file to be used as a help file
 * Ben Armstron 
   - various fixes that make the scripts more robust
   - fix to show only complete tag matches
   - include `_` in contexts
 * Huahai Yang 
   - fixed handling of indented tasks
 * Steve Audette
   - suggested change to folding
 * Andreas Kühntopf 
   - display non-tasks as comments
 * Julien Blanchard (
   - added ToggleCancelled
 * Robert James Kaes (
   - added task_paper_date_format
 * Adriano Castro (
   - use tabs not spaces (noexpandtab)
 * Morgan Sutherland (
   - Use <Leader> rather than <LocalLeader>
   - Start new task after <CR>
 * Matt Sacks (
   - Optional (date) syntax for @done tasks
   - Add Tag command for add/removing tag
   - Fix lagging space after removing a tag
   - Better syntax 
 * Anyakichi (
   - Add useful functions for users to define his own mappings easily
    - Add, delete, toggle, and update tags
    - Go previous or next project
    - Move projects, tasks and notes to another project
    - Search for keywords or tags with regexp
   - More compatible with HogBaySoftware's TaskPaper
    - Tag to projects and notes not only tasks
    - Shortcut to @today tag
    - Archiving done support
   - Multi-level folding of projects work perfectly
   - Add a new feature to fold only notes


The author of these Vim scripts is David O'Callaghan

For all information regarding the TaskPaper application itself please visit
Something went wrong with that request. Please try again.