Commands

Notes

Browse Note

  • shortcuts: None

Open the github repository (if it exists) of the current note. If you have a multi vault workspace with different git repositories, this command will

Create Daily Journal Note

  • shortcuts:
    • key: ctrl+shift+i
    • mac: cmd+shift+i
    • when: editorFocus

Create a global journal note

  • shortcuts:
    • key: ctrl+shift+c
    • mac: cmd+shift+c
    • when: editorFocus

Copy wiki link to note. The title of the note will be applied as the note alias. If you highlight a header, dendron will create a relative link to the header with the alias set to the header value.

You can also highlight any line of text, and Dendron will create a link to it by inserting a block anchor, or copy an existing anchor.

If you use this command in a multi vault workspace, Dendron will create a cross vault link to the note in question.

You can also copy note link by Right Click on editor and select Dendron: Copy Note Link from the context menu.

Copy Note Ref

  • shortcuts:
    • key: ctrl+shift+r
    • mac: cmd+shift+r
    • when: editorFocus

Copies a reference to the current open document

This lets you quickly create a note reference to the current note.

Header Selection

If you have a header selected while running this command, it will copy the note ref with the selected header to the next note ref.

Block Selection

If you have some text selected, Dendron can insert block anchors to reference the region you have selected.

Range Selection

If you highlight multiple blocks, Dendron can create a range selection that spans the blocks selected. Watch the following video starting at the 10s mark for an example.

MultiVault

If you use this command in a multi vault workspace, Dendron will create a cross vault link to the note in question.

Delete Node

  • shortcuts:
    • key: ctrl+shift+de
    • mac: cmd+shift+d

Delete a note or schema

You can also delete a note from the explorer by: Right Click on the note > Dendron: Delete Node

Insert Note

Insert the contents from a note into another note. You can configure a starting hierarchy for this command. Useful if you designated a hierarchy (eg. templates) for insertions.

When inserting a note, all snippet variables will also be resolved.

Insert the note link into the current document using lookup.

There are two modifiers that can be passed into this command:

  1. multiSelect
  2. aliasMode

multiSelect

This modifier enables the multi-select mode. With multi-select enabled, you can select all the notes you want the links to be inserted.

This can be toggled on by clicking on the button, or setting multiSelect: true in dendron.yml as below:

...
insertNoteLink:
  multiSelect: true
...

You can also pass it as a command argument through a custom keybinding as below:

/* in keybindings.json. 
* Use `Preference: Open Keyboard Shortcuts (JSON)` to open.
*/ 
[
  ...
  {
    "key": "{desired keybinding}",
    "command": "dendron.insertNoteLink",
    "args": {
      "multiSelect": true
    }
  },
  ...
]

aliasMode

This modifier enables different alias modes.

Here is the list of available alias modes:

  1. snippet: Inserted note link resolves into a VSCode snippet string
  2. selection: Extracts the selection of the active note and use it as the alias.
  3. title: Use the note title of the linked note as alias.
  4. prompt: Open an input box that will prompt for an input for the alias.
  5. none: Does not add alias. (default)

You can override the default alias mode in dendron.yml as below:

// dendron.yml
insertNoteLink:
  aliasMode: "snippet" // choose one from the list

You can also pass it as a command argument through a custom keybinding as below:

/* in keybindings.json. 
* Use `Preference: Open Keyboard Shortcuts (JSON)` to open.
*/ 
[
  ...
  {
    "key": "{desired keybinding}",
    "command": "dendron.insertNoteLink",
    "args": {
      "aliasMode": "snippet" // choose one from the list
    }
  },
  ...
]
snippet

Inserted note link will resolve into a VSCode snippet in the form of

[[{$1: alias}|note-name]]$0

If multi-select is enabled, each subsequent alias field will be available as separate tabstops like so:

[[{$1: alias}|note1]]
[[{$2: alias}|note1]]
[[{$3: alias}|note1]]
[[{$4: alias}|note1]]
[[{$5: alias}|note1]]
...
[[{$n: alias}|note1]]$0
selection

Selection present in the active editor will be extracted and used as the alias.

The original selection will be replaced by the link inserted.

If multi-select is enabled, all inserted note links will have identical aliases.

title

The title of the note that is being linked is used as the link's alais.

prompt

An input box will be prompted that will let you type in the desired alias.

If multi-select is enabled, you will be prompted for each of the note links you want to insert.

none

No alias will be used for the inserted note link(s).

Insert Note Index

Insert a block that lists the direct children of the current note to cursor position.

The format of the block is as follows:

## Index
- [[{ch1}|{noteName}]]
...

If used in a multi-vault workspace and noXVaultWikiLink is not set, the wikilinks will have a vault prefix added to avoid ambiguity.

Given the following hierarchy:

├── recipe
├── recipe.eggs
├── recipe.eggs.royale
├── recipe.eggs.deviled
├── recipe.eggs.benedict
├── recipe.eggs.florentine
├── recipe.bagel 
├── recipe.bagel.with-gravlax
├── recipe.chicken
└── recipe.chicken.curry

Running this command with the note recipe open will insert the following at cursor position:

## Index
- [[Eggs|recipe.eggs]]
- [[Bagel|recipe.bagel]]
- [[Chicken|recipe.chicken]]

Running it in the note recipe.eggs will insert the following at cursor position:

## Index
- [[Royale|recipe.eggs.royale]]
- [[Deviled|recipe.eggs.deviled]]
- [[Benedict|recipe.eggs.benedict]]
- [[Florentine|recipe.eggs.florentine]]

Move Note

Move a note. Also includes option to move a note between vaults You can also move an open note from the explorer by: Right Click on the note > Dendron: Move Note

Transform URL in clipboard to nicely formatted markdown link

Random Note

Navigates to a random note in the workspace. By default, all notes are included in the set that can be navigated to with this command. This can be adjusted with the randomNote setting in the Dendron Config (see Configure (yaml)).

# Sample configuration in dendron.yml:
randomNote:
    include:
        - alpha
        - beta.foo
    exclude:
        - alpha.bar

This pattern would specify a set including all notes under alpha except for notes in the alpha.bar hierarchy. The set would also include notes under beta.foo*.

  • If include is not specified, then the include matching pattern will match all notes.
  • exclude takes precedence over include, so if the patterns are identical, no notes will match.

Rename Note

  • shortcuts: none

Rename a note and all backlinks.

If the title is the same as what Dendron would autogenerate (kebab-case capitalized), then refactor will change the title as well. Otherwise, it will preserve the existing title.

You can also simply rename a file in VSCode's explorer panel, and all of the backlinks to that note will be updated automatically. Here is an example loom video

Rename Header

  • shortcuts: none

Rename the selected header.

You must put the caret on the header you want to rename. All wikilinks that link to this header (like [[note#header]]) will automatically get updated to the new header.

Move Header

  • shortcuts: none

This command removes the selected header from the note and appends it to the end of the destination note body.

All wikilinks that link to this header will automatically get updated to the new header.

If the destination note does not exist yet, it will be created before moving the selected header.

Show Preview

  • shortcuts:
    • windows: windows+ctrl+p
    • mac: cmd+ctrl+p

Shows Markdown Preview. See Preview V2 (Private) for more details.

Show Preview (legacy)

⚠️ This is a deprecated command. Please consider using Show Preview instead.

  • shortcuts:
    • windows: windows+ctrl+p
    • mac: cmd+ctrl+p

Show Markdown Preview. See Preview for more details.


Lookup

  • shortcuts:
    • mac: cmd+L
    • key: ctrl+l

Initiate note lookup

To work with notes, Dendron uses lookups. Lookups help you create, find, and organize your notes. You can watch the following video to see some of the things you can do with lookups.

Lookups

Dendron supports look ups by keywords separated by spaces/' ' without having to know the order where the keywords occur in the note. As example: dendron rename & rename dendron will both match note dendron.dev.design.commands.rename.

As mentioned in Details, the look up is accomplished through utilization of fusejs. You can use fusejs extended search syntax when looking up notes.

For entries that have the same score, Dendron will sort results by their last updated time. Further info on lookup syntax can be found in Finding Notes

Look up Auto Complete

Pressing Tab while having lookup view open will attempt to auto complete results. This is especially useful when dealing with hierarchies which adds on one level of hierarchy (from the highest matched result) at a time.

Details

Behind the scenes, lookup uses fusejs to do fuzzy string matching based on the note hierarchy. You can see our parameters here.

Scoring is explained here.

You can see the pseudo code for how fusejs integrates with lookup here (Private).

Lookup (Journal Note)

  • shortcuts:
    • key: ctrl+shift+j
    • mac: cmd+shift+j
    • args: {'noteType': 'journal'}

Initiate note lookup with journal note pre-selected

Lookup (Scratch Note)

  • shortcuts:
    • key: ctrl+shift+s
    • mac: cmd+shift+s
    • args: {'noteType': 'scratch', 'selectionType': 'selection2link'}

Initiate note lookup with scratch note pre-selected

Lookup Note

  • shortcuts: none

Initiate a note lookup. This is the successor to the Lookup command, limited to just notes. It is significantly faster on large workspaces when compared to its predecessor and also comes with addiitional modifiers.

Task Create

  • shortcuts: none

Creates a task note, which comes with some extra features to keep track of work items.

Lookup Schema

  • shortcuts:
    • mac: cmd+shift+L
    • key: ctrl+shift+l

Initiate schema lookup

  • shortcuts: none

Open link to external file (eg. pdf, .mov, etc) use system default. Relative files paths will be opened relative to the vault that the note is in.


Hierarchies

Reload Index

  • shortcuts: none

Reload the index. Necessary for Dendron to pick up on schema changes.

Archive Hierarchy

  • shortcuts: none

Move current note and all children under the archive hierarchy

This is a convenience method around Refactor Hierarchy for the case of archiving hierarchies you are no longer using. For example, if you were currently at pro.foo, running Archive Hierarchy would be equivalent to running Refactor Hierarchy with the following arguments:

  • matcher: pro.foo
  • replacement: archive.pro.foo

Refactor Hierarchy

  • shortcuts: none

Update hierarchy using regular expressions.

This command works like Rename Note but on multiple notes. When using this command you will be prompted for three inputs:

  • Scope: The set of notes you want to apply the operations to.
  • Match text: Regular expression that matches text you want to capture for replacement.
  • Replace text: Given what has been captured with the match text, what the replaced hierarchy should look like.
    • This will provide a preview of renames, allowing you to confirm that the change is as expected.

Scope

The command will first prompt you to decide the scope of the operation.

  • If you have a selection in your active editor that contains at least one wikilink, the command will prompt you if you want to use the notes in the selection as the scope of refactor.
  • If you do not wish to limit the scope with selection, don't select anything in your active note. The behavior will default to the entire workspace and you will not be asked to determine the scope of refactor.

Match text

This text will be used to match and capture the parts of each note's hierarchy within the scope. If you leave this blank, the command will match and capture the entire hierarchy.

For example,

Given a set of notes:

- dendron.foo
- dendron.fries
- dendron.bar
- dendron.egg
- dendron.tree
- topic.cooking
- topic.gardening

The match text (dendron)\.(.*) will match all notes under the dendron. hierarchy. The first and second capture group (dendron) and (.*) will later be accessible in the Replace text prompt as $1 and $2 respectively.

See here to learn more about the regular expressions you can use to match and capture parts of your hierarchy.

Replace text

This text will be used to replace the hierarchy of the notes that matched with match text. If you omit the replace text, Dendron will prompt for one until you provide one or cancel the operation.

Continuing with the above example, if the replace text is awesome.$2.$1, the result of refactoring would be:

- awesome.foo.dendron
- awesome.fries.dendron
- awesome.bar.dendron
- awesome.egg.dendron
- awesome.tree.dendron
- topic.cooking
- topic.gardening

Refactor Preview

After running the command, you will be taken to a preview that shows all files that will be affected. You will be given an option in a dropdown to either proceed with the refactor or cancel the operation.

  • NOTE: Dendron will warn you if refactoring will overwrite existing files. You will need to either change your replace text or move the affected files before Dendron will perform a refactor.

Goto Note

  • shortcuts:
    • key: ctrl+enter
    • when: editorFocus

Goto to the note under the cursor, creating it if it doesn't exist.

Go Up

  • shortcuts:
    • mac: cmd+shift+up
    • key: ctrl+shift+up
    • when: editorFocus

Go to closet non-stub parent of the currently open note

Go Next Sibling

  • shortcuts:
    • key: ctrl+shift+]
    • when: editorFocus

Go to the next sibling

Siblings with numeric names will be sorted numerically, whereas siblings with alphabetical names will be sorted alphabetically when determining the next sibling.

Go Previous Sibling

  • shortcuts:
    • key: ctrl+shift+[
    • when: editorFocus

Go to the previous sibling

Siblings with numeric names will be sorted numerically, whereas siblings with alphabetical names will be sorted alphabetically when determining the previous sibling.

Go Down

  • shortcuts:
    • mac: cmd+shift+down
    • key: ctrl+shift+down
    • when: editorFocus

Go down the hierarchy


Hooks

Hook Create

Create a custom hook to trigger during Dendron's lifecycle. This command takes two parameters:

  • hookName: name of your hook
  • hookFilter: a glob pattern that filters what notes your hook applies to
    • default: *, apply hook to all notes by default
  • hookType: where to attach the hook (coming soon - we only support onCreate at the moment)
    • types: onCreate|onDelete|onChange
    • default: onCreate

Hook Delete

Delete a custom hook. Will remove the hook from dendron.yml and optionally, remove {workspace}/hooks/{hookName}.js

Parameters:

  • hookName: name of the hook to remove
  • shouldDeleteScript: whether you should also delete the hook script

Workspace

Disable Telemetry

Disable telemetry across all workspaces with Dendron

Enable Telemetry

Enable telemetry across all workspaces with Dendron

Vault Add

  • shortcuts: none

Add a new vault to your workspace.

When you add a vault, you can choose between adding a local vault or a remote vault. You can change this later with the Vault Convert command.

You can also add a vault from the explorer by: Right Click on the explorer > Dendron: Vault Add

Vault Remove

  • shortcuts: none

Remove a vault

Remove a vault from your workspace. Note that the underlying files will not be deleted - the vault will lose its association with your workspace.

You can also remove a vault from the explorer by: Right Click on the vault > Dendron: Vault Remove

Vault Convert

You can convert a local vault to a remote vault, or a remote vault to a local vault using this command. Simply run the command and follow the prompts.

Launch Tutorial

Prompt user to create an initial tutorial workspace and takes user through new tutorial

Initialize Workspace

  • shortcuts: none

Create a new workspace

Change Workspace

  • shortcuts: none

Change into existing workspace

Snapshot Vault

  • shortcuts: none

Create a snapshot of your vault

Takes a snapshot of your entire vault, including assets. This command will ignore version control folders like .git when making a snapshot. Snapshots are saved under {workspace}/snapshots/{timestamp}

Restore Vault

  • shortcuts: none

Restore your vault from a snapshot

Restores your vault based on a snapshot. When restoring, it will over-write any notes that have the same name as notes in the snapshot. It will ignore version control directories like .git when restoring your vault

Show Help

  • shortcuts: none

Dendron will open your current browser to the cheatsheet page.

Configure (yaml)

  • shortcuts: none

Modify Dendron Config as raw YAML

Configure

  • shortcuts: none

Modify Dendron Config using Dendron UI

Workspace: Add and Commit

Add and commit all notes across all vaults to git.

Workspace: Sync

Synchronizes all notes across all vaults with git. Any changes you made will be pushed back to remote, and any changes in the remote will be pulled.

In more detail: Dendron will first commit all your changes, then pull changes from the remote, and finally push everything back to the remote. This workflow is good in most cases: private notes, internal shared vaults, or your personal writings. This workflow doesn't work as well in some cases however, so we offer per-vault configuration options which you can use to adjust how your notes are synchronized.

You can set these configuration options in your dendron.yml, either for each vault with the sync option, or for all workspace vaults with the workspaceVaultSync option. The configuration will look like this:

... rest of your dendron.yml
workspaceVaultSync: noPush
vaults:
    -
        fsPath: my-website
        sync: noCommit
        remote:
            type: git
            url: 'git@github.com:my-username/my-website.git'
    -
        fsPath: my-notes
        sync: sync
        type: git
            url: 'git@github.com:my-username/my-notes.git'

configuration options

sync

Dendron will try to synchronize everything: Dendron will first commit all your changes, then pull changes from the remote, and finally push everything back to the remote. This is the default for regular vaults.

noCommit

Pull and push updates if the workspace is clean, but don't commit. You manually commit your local changes, but automatically share them once you committed. This is good for vaults where you want to write a meaningful commit message and control what is being committed, for example a shared knowledge base or wiki. This is the default for Workspace Vaults.

noPush

Commit any changes and pull updates, but don't push. You can watch the repository and make local changes without sharing them back. This is good if you want to watch the updates in a vault and maybe even note your own thoughts in the vault without sharing them, for example an organization handbook that you don't want to edit yourself.

skip

Don't do any synchronization. This may be useful if you use some other tool to synchronize this vault.

Workspace Types

Dendron recognized 2 types of workspaces, Code and Native. When you initialize your workspace with the Initialize Workspace command, you get a Code workspace. Code workspaces include a dendron.code-workspace file which sets up vaults and recommends installing some useful extensions. Code workspaces are great when you are setting up a knowledge base.

Native workspaces on the other hand don't have a dendron.code-workspace file. They are useful when you are writing notes or documentation, and you want to keep your notes as part of a project rather than a separate knowledge base.

See Native Workspace Setup to see how you can start using a native workspace!

Cookbook

Syncing your workspace with Git

Workspace Sync does not sync the workspace if all your vaults are separate git repos. In order to synchronize your workspace, you need to explicitly do a git pull from the workspace folder.

If you are inside VSCode, you should be able to run > Create Integrated Terminal..., choose the folder containing your workspace, and launch the terminal. After launching, run a git pull inside of it.


Pods

Build Pod

  • shortcuts: none

Build your notes for export. Currently, only export to github pages is supported.

Configure Pod

  • shortcuts: none

Update your pod configuration

Import Pod

  • shortcuts: none

Import notes from an external data source. Currently, only the local file system is supported

Export Pod

  • shortcuts: none

Export notes to an external data source. Currently only JSON is supported.

Publish Pod

  • shortcuts: none

Publish your note to a different format/location

Copy Note URL

  • shortcuts:
    • mac: cmd+shift+u
    • windows: ctrl+shift+u

Get URL of current note from published site

If you highlight a header, will copy the url with the header set as the anchor

The url is taken from the siteUrl property.


Seeds

Seed Browse

Browse the Seeds available in the Seed Registry and view detailed information about each one. You can also add seeds to your workspace through the UI.

Seed Add

Add a seed (Private) to your current workspace.

Seed Remove

Remove a seed (Private) from your current workspace.


Misc

Contribute

  • shortcuts: none

Become an environmentalist and keep Dendron sustainable

This command takes you to Dendron's Environmentalist plans. Environmentalists are users that can support Dendron financially through a monthly contribution. Environmentalist get access to insider builds, priority support, and access to exclusive dev channels.

Paste File

Takes the path currently in the clipboard, copies the file into {vault}/assets, and inserts markdown link in the current note. This is the file equivalent of Dendron's Paste Image command

Note that most file types won't be natively supported in the preview. You'll need to use the vscode built-in > Open Link command to open the file.

If you are on macOs, you can find instructions for getting the path to the current file here


Publishing

Publish

  • shortcuts: none

Build, commit and publish your notes with a single command

  • NOTE: this is meant for v1 publishing. V2 publishing currently does not have a publish command.

Publish Export

  • shortcuts: none

Build and export your notes using publishing v2

Publish Dev

  • shortcuts: none

Preview your notes on localhost using publishing v2.


Dev

Doctor

  • shortcuts: none

Automatically fix various issues with Dendron.

You can pick among various actions for the doctor to perform.

  • Doctor performs it's actions on the entire workspace by default
  • You can toggle this behavior with the Change Scope button on the top right corner of panel so that it runs only on the active open document.
  • This requires you to have a note open and in focus before running the doctor command.

Actions

fixFrontmatter
  • Fixes notes that are missing the frontmatter, or that have broken frontmatter.
  • Setup a docs folder if it doesn't exist. Required if you want to publish your notes

h1ToTitle
  • Remove initial h1 header and use it to replace contents of title field in frontmatter
h1ToH2
  • Convert all initial h1 header to h2 header
removeStubs:
  • Remove all stub docs
oldNoteRefToNew
  • Convert legacy note refs to new style note refs
createMissingLinkedNotes
  • Create notes that do not exist yet but has a wikilink to it.
  • A preview pane will appear with the notes that will be created before proceeding.
  • In a multi-vault workspace, wikilinks that do not specify a vault prefix will be omitted from the candidates.
    • In a workspace that has 2 vaults named foo and bar, the wikilink [[missing-note]] will not be a candidate for missing note creation with this command.
    • However, [[dendron://foo/missing-note]] and / or [[dendron://bar/missing-note]] will be recognized as a missing note and will be listed as candidates.

Dump State

  • shortcuts: none

Dump internal state of Dendron inside logs

This is useful when diagnosing issues in Dendron

Dendron:Dev: Open Logs

  • shortcuts: none

Open Dendron logs for current session

Dendron:Dev: Diagnostics Report

  • shortcuts: none

Copy last 3000 lines of all logs and config to clipboard. Use when submitting an issue to Dendron

Contextual UI

File Operations

New File

Dendron recognises a new markdown file created from vscode context menu and populate it with the frontmatter.

Rename

Dendron recognises the vscode rename and updates all the backlinks to the old file with new name.

Code Actions

Rename Header

Dendron autosuggests to rename a header if you tap on a header or highlight it. Rename Header

Copy Header Reference

Dendron autosuggests to copy the note ref with the selected header if you tap on a header or highlight it.

Copy Header Reference

Refactor Extract

You can extract highlighted text to a new note by clicking on the refactor extract lightbulb next to the selection, and click on Extract text to new note.

Refactor Exttract

You can fix a broken wikilink, tags or user mentions, by selecting Add missing note for wikilink declaration from the code action lightbulb displayed after taping on or next to the broken link.

Broken Links Code Action