Repository navigation
Configuration
Doing's main config file is stored in ~/.doingrc, and a skeleton file is created on the first run. Just run doing on its own to create the file.
A basic configuration looks like this:
---
doing_file: /Users/username/Dropbox/doing.taskpaper
current_section: Currently
default_template: '%date: %title%note'
default_date_format: '%Y-%m-%d %H:%M'
marker_tag: flagged
marker_color: yellow
tags_color: boldcyan
default_tags: []
editor_app: TaskPaper
config_editor_app: Sublime Text
:include_notes: true
views:
color:
date_format: '%F %_I:%M%P'
section: Currently
count: 10
wrap_width: 0
template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
order: desc
templates:
default:
date_format: '%Y-%m-%d %H:%M'
template: '%date | %title%note'
wrap_width: 0
today:
date_format: '%_I:%M%P'
template: '%date: %title%odnote'
wrap_width: 0
last:
date_format: '%_I:%M%P on %a'
template: '%title (at %date)%odnote'
wrap_width: 0
recent:
date_format: '%_I:%M%P'
template: '%date > %title%odnote'
wrap_width: 50
count: 10
autotag:
whitelist:
- coding
- design
synonyms:
brainstorming:
- thinking
- idea
html_template:
haml:
css:
markdown:
Any options found in a .doingrc anywhere in the hierarchy between your current folder and your home folder will be appended to the base configuration, overriding or extending existing options. This allows you to put a .doingrc file into the base of a project and add specific configurations (such as default tags) when working in that project on the command line. These can be cascaded, with the closest .doingrc to your current directory taking precedence, though I'm not sure why you'd want to deal with that.
Possible uses:
- Define custom HTML or Markdown output on a per-project basis using the html_template option for custom templates. Customize time tracking reports based on project or client.
- Define
default_tagsfor a project so that every time youdoing nowfrom within that project directory or its subfolders, it gets tagged with that project automatically.
Any part of the configuration can be copied into these local files and modified. You only need to include the parts you want to change or add.
The one thing you'll probably want to adjust is the file that the notes are stored in. That's the doing_file key:
doing_file: /Users/username/Dropbox/nvALT2.2/?? What was I doing.md
I keep mine in my nvALT folder for quick access and syncing between machines. If desired, you can give it a .taskpaper extension to make it more recognizable to other applications. (If you do that in nvALT, make sure to add taskpaper as a recognized extension in preferences).
You can rename the section that holds your current tasks. By default, this is Currently, but if you have some other bright idea, feel free:
current_section: Currently
The setting editor_app only applies to Mac OS X users. It's the default application that the command doing open will open your WWID file in. Personally, I use editor_app: TaskPaper. If this is blank, it will be opened by whatever the system default is for the doing file extension (default is .md), or you can use -a app_name or -b bundle_id to override.
You can define a separate app to open the config file in when running doing config. The key for this is config_editor_app.
In the case of the doing now -e command, your $EDITOR environment variable will be used to complete the entry text and notes. Set it in your ~/.bash_profile or whatever is appropriate for your system:
export EDITOR="mate -w"
The only requirements are that your editor be launchable from the command line and able to "wait." In the case of Sublime Text and TextMate, just use -w like this: export EDITOR="subl -w".
The config also contains templates for various command outputs. Include placeholders by placing a % before the keyword. The available tokens are:
-
%title: the "what was I doing" entry line. See below for additional format options -
%date: the date based on the template'sdate_formatsetting -
%shortdate: a custom date format for "relative" dates (see below) -
%note: Any note in the entry will be included here. A linebreak is included before, and each line is indented one tab. -
%idnote: The notes with an extra leading tab (indented note) -
%odnote: The notes with leading tab removed (outdented note) -
%>_3: note: Custom note formatting, see below -
%chompnote: Notes on one line, beginning and trailing whitespace removed. -
%section: The section/project the entry is currently in -
%hr: a horizontal rule (-) the width of the terminal -
%hr_under: a horizontal rule (_) the width of the terminal -
%n: inserts a newline -
%t: inserts a tab -
%[color]: color can beblack,red,green,blue,yellow,magenta,cyan, orwhite- you can prefix
bgto affect background colors (%bgyellow) - prefix
boldandboldbgfor strong colors (%boldgreen,%boldbgblue) - there are some random special combo colors. Use
doing colorsto see the list
- you can prefix
-
%interval: when used with the-tswitch on theshowcommand, it will display the time between a timestamp or @start(date) tag and the @done(date) tag, if it exists. Otherwise, it will remain empty.
Date formats are based on Ruby strftime formatting. You can try it out here.
%date uses the template's date_format string, or the default date format set in the config.
The %shortdate placeholder inserts a relative date. If the entry date is from today, it only shows the time in 12 hour format (3:00pm). If it's within the last week, it shows the abbreviated day name and the time (Wed 12:00pm). If it's within the last year, it shows the month/day and time (10/12 3:30pm). If it's from a previous year, it shows month/day/year and time (10/01/2020 4:30pm). I know this formatting is very US-centric. If anyone complains I'll figure out how to localize it better.
You can include an integer inside a %date placeholder (also works with %shortdate) to indicate a width to pad to, e.g. %20date or %15shortdate. If the number is present, spaces are added to the left side of the date string (based on template) to bring the total characters to that width.
If the number is negative, padding will be added on the right side.
With an ISO date format, %20date produces 2020-07-19 13:30. %-20date produces 2020-07-19 13:30 .
The %title placeholder accepts some formatting options. The first is a wrap width, specified as %60title, where 60 is the number of characters at which to wrap the title. This overrides the wrap_width setting if provided in the template. The title will be wrapped to new lines, but anything after the title in the template will stay on the first line. The wrap lines will automatically be indented to the character position of the % in %title.
If you specify a negative width, it becomes a minimum width. If the title is less than that width, it will be padded on the right. Titles longer than the minimum width will be left as is.
The second parameter is the indent, which is an indent character followed by a number. By default, wrapped lines are indented 2 spaces. You can control this by using a space or underscore, or a "t" for tab, followed by a number. The placeholder %60_4title would wrap lines at 60 characters, and indent the wrapped lines an additional 4 spaces. To remove indent, use %60_0.
You can use either or both parameters, but the width must come before the indent if both are used.
In addition to the static placeholders for inserting notes (%note, %idnote, %odnote), you can also provide custom formatting. A format string looks like %^> 8: note. Here's now it works:
There are three parts, all of them optional.
%(^>)( 8)(: )note
- The first part must start with
^(caret, Shift-6) followed by 1 character. This is a marker character that will go at the beginning of the line, before any indent. - The second part is a space character followed by a number. The space can be an actual space or an underscore to represent a space. If it's a "t", then tabs will be used. Any other non-alphanumeric character will be used as is. The number after it specifies how many of the character to insert. To indent by two tabs, you would use
%t2note. - The last part is one character followed by an optional space (or underscore). This is a line prefix that will be prepended to every line of the note, after the indent.
%^> 11: note displays notes as:
Mon 12:16pm | Adding flexible padding to note indent @doing
> : This is a note
> : with a couple of lines
You can use any combination of the parts:
%: note outputs:
Mon 12:16pm | Adding flexible padding to note indent @doing
: This is a note
: with a couple of lines
And %t2note is the same as %idnote, just the note indented by two tabs.
Here's how a formatted note can look. This line in a template:
template: "%blue%shortdate %boldgreen??? %boldwhite%title %cyan(%section) %yellow%interval%default%white%_12??? note%default"
Renders the view as:

Here's an example with wrapping and indent applied to title as well.
template: %blue%shortdate %boldgreen│ %boldwhite%80_4title %cyan(%section) %yellow%interval%default%white%_14┃_note%default

My normal template for the recent command looks like this:
recent:
date_format: '%_I:%M%P'
template: '%date > %title%odnote'
wrap_width: 88
And it outputs:
$ doing recent 3
4:30am > Made my `console` script smarter...
Checks first argument to see if it's a file, if it is, that's the log
Else, it checks the first argument for a ".log" suffix and does a search in the user
application logs with `find` for it.
Otherwise, system.log.
I also made an awesome Cope wrapper for it...
12:00pm > Working on `doing` again.
12:45pm > I think this thing (doing) is ready to document and distribute
$
You can get pretty clever and include line breaks and other formatting inside of double quotes. If you want multi-line templates, just use \n in the template line, and after the next run it will be rewritten as proper YAML automatically.
For example, this block:
recent:
date_format: '%_I:%M%P'
template: "\n%hr\n%date\n > %title%odnote\n%hr_under"
wrap_width: 100
will rewrite to:
recent:
date_format: '%_I:%M%P'
template: |2-
%hr
%date
> %title%odnote
%hr_under
wrap_width: 100
and output my recent entries like this:
$ doing recent 3
-----------------------------------------------------------------------
4:30am
> Made my `console` script smarter...
Checks first argument to see if it's a file, if it is, that's the log
Else, it checks the first argument for a ".log" suffix and does a search in the user application
logs with `find` for it.
Otherwise, system.log.
I also made an awesome Cope wrapper for it...
_______________________________________________________________________
-----------------------------------------------------------------------
12:00pm
> Working on `doing` again.
_______________________________________________________________________
-----------------------------------------------------------------------
12:45pm
> I think this thing (doing) is ready to document and distribute
_______________________________________________________________________
$
The recent template can include a count key to specify the number of entries shown when run without an argument. Default is 10.
You can create your own "views" in the ~/.doingrc file and view them with doing view view_name. Just add a section like this:
views:
old:
section: Archive
count: 5
wrap_width: 0
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
order: asc
tags: done finished cancelled
tags_bool: ANY
only_timed: false
tag_sort: time
tag_order: asc
totals: true
You can add additional custom views. Just nest them under the views key (indented two spaces from the edge). Multiple views would look like this:
views:
later:
title: Stuff to do later
section: Later
count: 5
wrap_width: 60
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
old:
section: Old
count: 5
wrap_width: 0
date_format: '%F %_I:%M%P'
template: '%date | %title%note'
The title key is optional, it only affects output options like HTML where there's a page title shown. If it's missing, the title will be generated from an appropriate combination of section or tag filters.
The section key is the default section to pull entries from. Count and section can be overridden at runtime with the -c and -s flags. Setting section to All will combine all sections in the output.
You can add new sections with doing add_section section_name. You can also create them on the fly by using the -s section_name flag when running doing now. For example, doing now -s Misc just a random side note would create the "just a random side note" entry in a new section called "Misc," if Misc didn't already exist.
The tags and tags_bool keys allow you to specify tags that the view is filtered by. You can list multiple tags separated by spaces, and then use tags_bool to specify ALL, ANY, or NONE to determine how it handles the multiple tags.
The order key defines the sort order of the output (asc or desc). This is applied after the tasks are retrieved and cut off at the maximum number specified in count.
You can include tag timers and totals in the output with totals: true. Control tag output using tag_sort (name or title) and tag_order (asc or desc). You can also output only timed entries using only_timed: true. All of these options can be overridden using flags on the doing view command.
Regarding colors, you can use them to create very nice displays if you're outputting to a color terminal. Example:
color:
date_format: '%F %_I:%M%P'
section: Currently
count: 10
wrap_width: 0
template: '%boldblack%date %boldgreen| %boldwhite%title%default%note'
Outputs:

You can also specify a default output format for a view. Most of the optional output formats override the template specification (html, csv, json, markdown). If the view command is used with the -o flag, it will override what's specified for the view in the config.
You can use the following colors in view templates. Set a foreground color with a named color:
%black
%red
%green
%yellow
%blue
%magenta
%cyan
%white
You can also add a background color (%bg[color]) by placing one after the foreground color:
%white%bgblack
%black%bgred
...etc.
There are bold variants for both foreground and background colors
%boldblack
%boldred
... etc.
%boldbgblack
%boldbgred
... etc.
And a few special colors you'll just have to try out to see (or just run doing colors):
%softpurple
%hotpants
%knightrider
%flamingo
%yeller
%whiteboard
Any time you use one of the foreground colors it will reset the bold and background settings to their default automatically. You can force a reset to default terminal colors using %default.
For commands that provide an HTML or Markdown output option, you can customize the templates used for markup and CSS. The HTML markup uses HAML, and the styles are pure CSS. The Markdown template uses Ruby ERB templating.
To export the default configurations for customization, use doing templates --type=[HAML|CSS|MARKDOWN]. This will output to STDOUT where you can pipe it to a file, e.g. doing templates --type=HAML > my_template.haml. You can modify the markup, the CSS, or both.
Once you have a template file prepared, edit .doingrc and look for the html_template: section. There are three sub-values, haml:, css:, and markdown:. Add the template paths to the appropriate keys. A tilde may be substituted for your home directory, e.g. css: ~/styles/doing.css.
Keywords in your entries can trigger automatic tagging, just to make life easier. There are three tools available: default tags, whitelisting, and synonym tagging.
Default tags are tags that are applied to every entry. You probably don't want to add these in the root configuration, but using a local .doingrc in a project directory that defines default tags for that project allows anything added from that directory to be tagged automatically. A local .doingrc in my Marked development directory might contain:
---
default_tags: [marked,coding]
And anything I enter while in the directory gets tagged with @marked and @coding.
A whitelist is a list of words that should be converted directly into @tags. If my whitelist contains "design" and I type doing now working on site design, that's automatically converted to "working on site @design."
Synonyms allow you to define keywords that will trigger their parent tag. If I have a tag called @design, I can add "typography" as a synonym. Then entering doing now working on site typography will become "working on site typography @design."
White lists and synonyms are defined like this:
autotag:
synonyms:
design:
- typography
- layout
brainstorming
- thinking
- idea
whitelist:
- brainstorming
- coding
Note that you can include a tag with synonyms in the whitelist as well to tag it directly when used.