Add checkbox highlighting to
(Note: Much of the content in the Developing and Building / Installing sections below comes from text generated by Yeoman.)
This grammar for the VSCode text editor adds coloring for unordered list checkboxes in
markdown text. This facilitates creating simple Bullet Journal files using
org-mode or markdown syntax.
The package is written by Jacob Levernier, and is a port of a similar extension for the Atom text editor, also by Jacob Levernier, which was released under an MIT license.
It highlights the following:
- [ ]: Todo
- [x]: Done
- [V]: Done, but on a different day (Date or reference goes in parentheses at the end of the line)
- [>]: Next / Scheduled
- [<]: Migrated
- [/]: Right now / In progress
- [o]: Waiting on someone else
The package also renders highlighting for
- Install the extension through VScode (see below).
- (Optional) Enable colors (vs. manually setting colors): In VSCode, enable the sidebar (
Cmd + b), go to the Extensions tab, scroll through the enabled extensions until you find
org-checkbox. Click on the cogwheel icon next to
org-checkbox, and click "Set Color Theme". Doing so will set the editor to a modified version of the Solarized Light color scheme (as in the screenshot above).
- In VSCode, set the language for the document as
I recommend this
org-mode-based style for bullet-journal entries:
* 1970-01-01 Thursday
- [ ] Item 1
- [ ] Sub-item 1
- [ ] Item 2
- O Event 1
- O Event 2
- Note 1
- Sub-note 1
Some block-quote contents.
By indenting, you can use VSCode's
Editor: Fold Current Row /
Editor: Unfold Current Row commands (from the
Ctrl + Shift + P /
Cmd + Shift + P menu) to collapse sections of your journal for easier reading.
This approach also works well with
Orgzly for Android, which can sync org-mode files using a service such as Dropbox or SyncThing, and allows checking boxes with a tap.
F5 to open a new window with your extension loaded.
- You can relaunch the extension from the debug toolbar after making changes to the files listed above.
- You can also reload (
Cmd+R on Mac) the VS Code window with your extension to load your changes.
- Examine tokenization using
Cmd+Shift+P -> Developer: Inspect TM Scopes
- To add features such as intellisense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs
Building / Installing
- Rather than manually copying the extension into
~/.vscode/extensions/, this step will show any errors in the package.
code --install-extension <path/to/package/file> to copy the extension into
Cmd+Shift+P --> Developer: Reload Window to reload VSCode.
- Confirm that the extension is listed in the sidebar Extensions tab.
This repository, except where a separate license file is specified, is released under a BSD 3-Clause license, Copyright 2019 Jacob Levernier.