PlainTasks
An opinionated todo-list plugin for Sublime Text.
Installation
The easiest way to install is using Package Control. It's listed as PlainTasks.
- Open
Command Palette using ctrl+shift+P or menu item Tools → Command Palette...
- Choose
Package Control: Install Package
- Find
PlainTasks and hit Enter
Start a new todo-list
Bring up the command palette (it’s ⌘ + shift + p in OS X and ctrl + shift + p in Windows) and type task and select Tasks: New document command.
[!NOTE]
Save your todo files with todo, todolist, tasks or taskpaper file extensions or just name them TODO with no extension.
For more portability you can use todolist.txt either as a filename or as suffix for any arbitrary filename.
Usage
[!NOTE]
In Windows or Linux use ctrl instead of ⌘
☐ ⌘ + enter or ⌘ + i: new task
☐ ⌘ + d: toggle task as completed.
☐ ctrl + c: toggle task as cancelled on Mac. alt + c on Windows/Linux.
☐ ⌘ + shift + a will archive the done tasks, by removing them from your list and appending them to the bottom of the file under Archive project
☐ ⌘ + shift + o will archive in Org-Mode style, removing the entire subtree after cursor and appending it to new file next to original one, e.g. if original is filename.TODO then new would be filename_archive.TODO
☐ ⌘ + shift + u will open the url under the cursor in your default browser, other than http(s) schemes must be enclosed within <>, e.g. <skype:nickname>
☐ Anything with colon at the end of the line is a project title, you can also nest projects by indenting them.
☐ You can write plain text as notes or descriptions wherever you want. Use _ or * for italic and bold just like in Markdown.
☐ You can add tags using @ sign
You can place cursors on tags, click right mouse button and Filter by tags under cursors:
pending tasks with selected tags will remain visible (and their notes and projects they belong to), but everything else will be hidden/folded; to unfold all press ⌘+k, ⌘+j or ⌘+k, ⌘+0
☐ You can navigate tags in current document via ⌘+shift+r.
☐ PlainTasks comes with a simple snippet for creating separators, if you feel that your task list is becoming too long you can split it into several sections (and fold some of them) using this snippet:
-- and then tab will give you this: --- ✄ -----------------------
☐ Completion rules (ctrl+space or alt+/ to see list of them):
type t, press tab — it’ll become @today — this one is highlighted differently than other tags;
c, tab — @critical;
h, tab — @high;
l, tab — @low;
s, tab — @started — press tab again and current date will be inserted, when you’ll complete or cancel a task with such tag, you’ll know how many time has passed since start; if you have to change done/cancelled/started time, then you can recalculate the time spent on task by pressing tab while cursor is placed on a tag;
tg, tab, tab work in the same manner as s, but inserts @toggle(current date) — so you can pause and resume to get more correct result when done/cancel; each toggle tag is either pause or resume depending on its place in sequence;
cr, tab, tab — @created(current date) (⌘ + shift + enter creates a new task with this tag);
d, tab — @due( )
If you press tab again, it’ll insert current date, same for @due( 0).
You can type short date (similar to OrgMode’s date prompt, but not the same) and then press tab to expand it into default format.
Short date should be @due(year-month-day hour:minute)
Dot can be used instead of hyphen, but should be consistent year.month.day
year, month, minute, hour can be omitted:
| Notation |
Meaning |
@due(1) |
1st day of next month always |
@due(--1) |
1st day of current month always |
@due(5) |
5th day of current month (or next month if current day is 5th or older) |
@due(2-3) |
February 3rd of current year or next one |
@due(31 23:) |
31st day of current/next month at 23 hours and minutes are equal to current moment |
@due(16.1.1 1:1) |
January 1st of 2016 at 01:01, i.e. @due(16-01-01 01:01) |
relative period of time starts with a plus sign, two plus signs, or a minus sign
[+[+]|-][number][DdWwHhMm][ [number][DdWwHhMm] ...][h:m] — the sign is optional
whenever at least one unit letter (d/w/h/m) is present, in which case a plain
number defaults to days. Multiple number+unit components may be combined in one tag,
separated by spaces, and their amounts are summed.
The resulting date is rounded up to the next whole unit
of the finest unit occurring in the tag,
where the day is the coarsest unit that is rounded to.
Thus @due(+1d) written at 01:23 is due at midnight following the next day,
@due(+1w) at the end of the day seven days from now,
and @due(+22d 21h) always at a full hour, i.e. with 0 minutes.
A tag without any unit letter counts as days,
so @due(+2) is rounded like @due(+2d),
while the h:m suffix contributes its own precision
and hence @due(+2 12:) is rounded to the hour.
Appending 0m makes the minute the finest unit
and therefore keeps the current time of day,
e.g. @due(+1d 0m) or @due(+22d 21h 0m).
The meanings in the table below denote the offset before rounding.
| Notation |
Meaning |
@due(+) |
tomorrow as well as @due( +1) or @due( +1d) |
@due(+w) |
one week since current date, i.e. @due( +7) |
@due(+3w) |
3 weeks since current date, i.e. @due( +21d) |
@due(++) |
one day since @created(date) if any, otherwise it is equal to @due(+) |
@due(+2:) |
two hours since current date |
@due(+:555) |
555 minutes since current date |
@due(+2 12:) |
2 days and 12 hours since current date |
@due(-1d) |
yesterday, i.e. one day before current date |
@due(-w) |
one week before current date |
@due(+2h) |
two hours since current date, same as @due(+2:) |
@due(+10m) |
ten minutes since current date |
@due(3h) |
three hours since current date, the sign may be omitted when a unit letter is present |
@due(+1d 3h) |
1 day and 3 hours since current date (components are summed) |
@due(-2w 1d 4h 30m) |
2 weeks, 1 day, 4 hours and 30 minutes before current date |
☐ You can create a link to a file within your project by prefixing the file name with a dot and (back)slash like: .\filename\ or ./another filename/.
The line and column can be specified by colons: .\filename:11:8.
In SublimeText 3 you can specify a symbol inside that file by using > character like: .\filename>symbol.
In SublimeText 2 you can specify a text inside that file by using inch characters like: .\filename"any text".
Pressing ctrl + o (alt + o on Windows/Linux) will open the file in Sublime and scroll to specific position if any.
Also in SublimeText 3 link may point to directory, open such link will add the directory to current project (sidebar).
In addition, Markdown and “wiki” (Org-Mode, NV, etc.) styles are supported as well, examples:
[](path)
[](path ":11:8")
[](path ">symbol")
[](path "any text")
[[path]]
[[path::11:8]]
[[path::*symbol]]
[[path::any text]]
[[path]] ":11:8"
[[path]] ">symbol"
[[path]] "any text"
☐ To convert current document to HTML, bring up the command palette ⌘ + shift + p and type Tasks: View as HTML — it will be opened in default webbrowser, so you can view and save it.
Tasks: Save as HTML… ask if you want to save and if yes, allow to choose directory and filename (but won’t open it in webbrowser).
Editor Useful Tools:
☐ Use ⌘ + control + up/down (ctrl + shift + up/down on Windows) to move tasks up and down.
☐ Use ⌘ + r to see a list of projects and quickly jump between them
★ See the Tutorial for more detailed information.
Settings
PlainTasks is an opinionated plugin, which means that it is highly configured to look in a specific way, but this does not mean that you can not customize it. If you feel that something does not look right and you want to change it, you can easily do it in your user settings file.
To customize settings, open Command Palette
and call Preferences: PlainTasks Settings
or go to Main Menu → Preferences → Package Settings → PlainTasks → Settings.
Task Settings
| Setting |
Default |
Options/Description |
| taskpaper_compatible |
false |
Enable taskpaper compatibility mode |
| before_tasks_bullet_margin |
1 |
Determines the number of spaces (default indent) before the task bullet |
| open_tasks_bullet |
□ |
- ❍ ■ □ ☐ 🔳 ❑ ▪ ▫ – — ≡ → › [ ] |
| done_tasks_bullet |
✓ |
+ 🗸 ✓ ✔ ☑ ✅ ☑️ √ [x] |
| cancelled_tasks_bullet |
× |
x × 🗙 ✖ ❌ ❎ ✘ [-] |
| tasks_bullet_space |
whitespace or tab |
String to place after bullet, might be any character(s) |
| header_to_task |
false |
If true, a project title line will be converted to a task on the certain keystroke |
Tags Settings
| Setting |
Default |
Options/Description |
| before_date_space |
" " |
Space to insert in front of dates |
| date_format |
(%y-%m-%d %H:%M) |
See strfti.me for quick reference; detailed documentation: python.org |
| done_date |
true |
Determines whether done tasks should gain a date or not |
| done_tag |
true |
Determines whether done tasks should gain a @done tag or not |
| project_tag |
true |
Postfix archived task with project tag, otherwise prefix |
| show_calendar_on_tags |
false |
Automatically show date picker when cursor is on tag (you can get date picker any time via context menu) |
| show_remain_due |
false |
Show remain or overdue time under due tags |
| due_preview_offset |
0 |
Place preview date outside of parens of @due(), 1 — within |
| due_remain_format |
"{time} remaining" |
{time} will be replaced with actual value |
| due_overdue_format |
"{time} overdue" |
{time} will be replaced with actual value |
| decimal_minutes |
false |
If true, minutes in lasted/wasted tags will be percent of hour, e.g. 1.50 instead of 1:30 |
| highlight_past_due |
true |
If true, highlight past, soon, and invalid @due(something) |
| highlight_due_soon |
24 |
Hours as int, threshold to define which @due will be soon |
| scope_past_due |
tring.other.tag.todo.critical |
Any scope, define color for past @due |
| scope_due_soon |
tring.other.tag.todo.high |
Any scope, define color for @due will be soon |
| scope_misformatted |
tring.other.tag.todo.low |
Any scope, define color for @due mismatch date_format |
Archive Settings
| Setting |
Default |
Options/Description |