␣⌘ Space Command

Help

Space Command for VS Code

Space Command for VS Code is an extension for writing tasks, ideas, and principles in VS Code, Cursor, and VSCodium, with the same tag rules Space Command reads. It adds commands to mark tasks done, set a focus, priority, or snooze, and tidy tags. It shows tags in Space Command's colours, in the editor and the Markdown preview, lets you tick a box with a click, and switches to Space Command at the line you're on.

It's an early test. Version 0.7.0 is for early testers, and it will change. Tell us what works and what doesn't.

You don't need it. Space Command reads your folders the same way with or without the extension, and your editor stays an ordinary editor. The extension is handy if you write tasks in VS Code: fewer tags to type, and fewer to get wrong.

The extension doesn't scan your folders or keep a list of tasks. It only writes when you choose a command or click a box, never in the background.

You need VS Code 1.90 or later, Cursor, or VSCodium.

Download

Download Space Command for VS Code 0.7.0 (zip, 21 KB)

Its SHA-256 checksum is b2ce6a3a4531c19f727f5d18293ca175d979bfac57b3fc2344aabfa7573f762f.

Install the extension

To install it:

  1. Download the zip above.
  2. Unzip it. You get a space-command-vscode folder holding space-command-0.7.0.vsix.
  3. In VS Code, open the Extensions view with ⇧⌘X.
  4. Click ⋯ at the top of the view.
  5. Choose Install from VSIX….
  6. Pick space-command-0.7.0.vsix.
  7. Reload the window when VS Code asks.

Cursor and VSCodium install it the same way.

From Terminal, you can install it with one command instead:

code --install-extension space-command-0.7.0.vsix

Use cursor or codium in place of code for those editors.

Commands

In a Markdown file, right-click in the editor, or open the command palette with ⇧⌘P and type "Space Command".

Command Does
Mark Done or Reopen Ticks a task, or opens it again
Toggle Focus Adds or takes off #focus
Toggle Snooze Adds or takes off #snooze
Priority Sets #p0 to #p4, or Remove Priority takes it off
Convert to Tasks Turns the lines you've selected into tasks
Make Task from Idea Turns an #idea into a task
Tidy Tags Puts a line's tags in order
Complete All Under Heading Ticks every open task under the tagged heading you're in
Open in Space Command Shows the line you're on in Space Command

Each command works on the line you're on, on every task in a selection, or on the tasks under a tagged heading. One ⌘Z takes it back.

In TODO.md, PLAN.md, and the other well-known task files, a box with no tag counts as a task. Mark Done ticks it and adds no tag, as Space Command does.

Quick actions

Press ⌘. on a task line for a short menu of what would change it: Mark Done or Reopen, Focus, Snooze, P0 to P4, Remove Priority, and Make Task from Idea. Only the actions that would change the line are listed. ⌥⌘. marks the task done straight away.

Keys

On a task line or a tagged heading in Markdown:

Keys Does
⌘↩ Mark Done or Reopen
⌥⌘F Focus

There, they take the place of VS Code's Insert Line Below and Replace, which still work everywhere else. Snooze and the priorities have no keys. To give them some, search "Space Command" in VS Code's Keyboard Shortcuts.

Heading progress

Over a tagged heading, and over any heading with boxes in a task file such as TODO.md, a line shows the block's progress and actions:

1 of 3 | Sort | Complete All
  • Sort puts the block's tasks in order.
  • Complete All ticks every open task under the heading. It shows only while some are open.

Sort Block at Cursor does the same as Sort, from the command palette or the right-click menu.

The rules are the same as Space Command's and Space Command for Obsidian's: a task ticked in VS Code reads as done in Space Command, and the other way round.

Tag colours

In Markdown files, tags show in Space Command's colours, each on a soft chip, in light and dark:

Tag Colour
#p0 Terracotta
#p1 Clay
#p2 Amber
#idea Sage
#snooze A dashed outline
Every other tag Dim

Done tasks are dimmed and struck through, with their tags faded.

Beside the line number, a Leaf ring marks a task in focus, and a Terracotta dot marks a task at #p0.

To turn all of it off, clear Space Command › Tag Colours in VS Code's Settings.

Click a box

Click a box to tick it, as in Obsidian. On a task, #todo becomes #todone with it, and one ⌘Z puts both back. The pointer turns to a hand over a box.

To turn it off, clear Space Command › Click Boxes in VS Code's Settings.

The Markdown preview

In the Markdown preview:

  • Tags show as chips in their colours, as in the editor.
  • A done task's own text is dimmed and struck through. Its sub-items aren't.
  • Boxes are drawn as real boxes, and clicking one ticks it.

A click in the preview ticks the box only when the file is open in the editor and its line hasn't changed since the preview drew it. It's one change, so one ⌘Z in the editor takes it back.

The first time you click a box, VS Code may ask whether to let the extension open the link. Allow it. VS Code also lets you tell it not to ask again.

Space Command › Tag Colours turns off the preview's colours and boxes too.

Switching between the apps

Open in Space Command shows the line you're on in Space Command.

To come back, choose VS Code as your code or Markdown editor in Settings › Open In (see Choose your editors). Space Command then opens a task's file in VS Code, at its line.

Check which editors have it

Settings › Integrations › Space Command for VS Code, in Space Command, shows where the extension is installed:

It reads Which means
In VS Code VS Code has it
In VS Code, Cursor, and VSCodium All three have it
In VS Code · an update is available One of them has an older version
Not installed None of your editors has it

It only reads, and never installs anything. Get Extension… opens this page.

Coming

These are coming in later versions:

  • Suggestions as you type # and @.