Skip to content

Latest commit

 

History

History
200 lines (149 loc) · 5.91 KB

docs.md

File metadata and controls

200 lines (149 loc) · 5.91 KB

Filter

By default filter applied as case-insensitive text search

filter_demo

Filter uses AND logic

For instance, filter #html #css will only return items containing both tags (1 and 4)

1 #html #css
2 #html
3 #css
4 #css #html #js

filter_demo

Set due date helper function todomd.setDueDate

Syntax

example description
+0 today (plus needed)
+1 tomorrow
-1 yesterday
+1d tomorrow
+1w in one week
-1w one week ago
+1m in one month
-1m one month ago
0 last day of the month
20 closest future 20th date. If current date is <= 20, then it would be 20th of the current month. Otherwise, 20th of the next month.
this week This week date (depends on todomd.setDueDateThisWeekDay setting)
next week Next week date (depends on todomd.setDueDateNextWeekDay setting)
fri or friday closest future friday.
nov 20 or november 20 closest future 20th of November.
e3d every 3 days with today as a starting date

Use set due date helper with autocomplete

It's also possible to set due date by typing $ at the end of the word of the future date:

  1. Type the relative date
  2. Trigger suggest editor.action.triggerSuggest
  3. Accept the suggestion
+10$

Advanced editor decorations

It's possible to tweak some of the editor decorations with todomd.decorations setting.

Example: use background and gutter icon for completed task:

"todomd.decorations": {
	"completedTask": {
		"backgroundColor": "#80e73c10",
		"overviewRulerColor": "#80e73caa",
		"gutterIconPath": "C:/icons/check.png",
		"gutterIconSize": "20px",
	},
}

completed_task_gif

Change appearance of a chosen project/tag/context:

"todomd.decorations": {
	"#important": {
		"color": "#ff000080",
		"fontWeight": "bold"
	},
},

advanced_decoration_specific_tag

Webview

Tasks are rendered as markdown

Treating each line as a separate markdown line (no multi-line features).

<kbd>Ctrl</kbd>+<kbd>Enter</kbd>
Some text <mark>Important</mark> text text text
**BOLD** *italic* `inline code`
A markdown link [GitHub](https://github.com)
<span style="display:inline-block;background:linear-gradient(0.25turn,#3f87a6,#ebf8e1,#f69d3c);color:#fff;padding:0.5rem;border-radius:3px;font-style:bold;">==========</span>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256" preserveAspectRatio="xMidYMid"><path d="M191.979 0v219.867L0 191.354l191.979 64.644 64-26.623V30.592l.021-.01-.021-.042v-3.915L191.979 0zm-67.183 37.458L65.994 95.583 30.592 68.921l-14.59 4.873 36.017 35.604L16.002 145l14.59 4.875 35.402-26.663h.002l58.798 58.121 35.217-14.963V52.421l-35.215-14.963zm-.002 41.473v60.927L84.34 109.394l40.454-30.463z" fill="#016ec5"/></svg> Inline svg icon
Image: <br> <img width="100" height="100" src="https://unsplash.it/200/200">

webview renders markdown demo

Webview Hotkeys

Key Description
Select next task
Select previous task
Toggle collapsing of nested tasks
Home Select first task
End Select last task
Insert Add new task to root
Ctrl+Insert Add new task as a subtask to selected task
Shift+Delete Delete selected task
Alt+D Toggle selected task completion
F2 Edit selected task title
Ctrl+Space Open autocomplete (When todomd.webview.autoShowSuggest is disabled)
Alt + L Mouse Button (on a task) Reveals task in the file
L Mouse Button (on tag/project/context) Set filter to the value of the item
Ctrl + L Mouse Button (on tag/project/context) Append item value to the filter
Alt + L Mouse Button on twistie (folding icon) Collapse/uncollapse all nested tasks

Button link

Just a link styled like a button.

[btn:Google](https://www.google.com)

Command Uri

You can make links that execute vscode commands:

[Open Settings](command:workbench.action.openSettings2)

Also with arguments:

[Open Workbench Settings](command:workbench.action.openSettings?%22workbench%22)

Arguments should be encoded: encodeURIComponent(JSON.stringify(args))

https://code.visualstudio.com/api/extension-guides/command#command-uris

File Uri

File scheme will open file in VSCode:

[Config File](file:///C:config/config.txt)

App Uri

App scheme will open file in default app:

[Open image preview](app:///C:/temp/img.png)

Highlight specific tags

From Settings:

"todomd.webview.tagStyles": {
    "important": {
        "backgroundColor": "#ff5151",
        "color": "#fff",
        "border": "1px solid #000000"
    }
}

Custom tag style in webview