Dendron: Copy Note Link
Summary
Copy the wikilink to the current note to clipboard.
Keybindings
- windows:
ctrl+shift+c
- mac:
cmd+shift+c
Details
Dendron: Copy Note Link is a command that lets you copy the wikilink to the current note into your clipboard.
If you use this command in a multi vault workspace, Dendron will create a cross vault link to this note.
You can also use this by right clicking in the note and selecting Dendron: Copy Note Link from the menu.
Configuration
Synopsis
commands:
copyNoteLink:
aliasMode: title|none
nonNoteFile:
anchorType: line|block|prompt
Options
aliasMode
- type:
enum
- default:
title
- required:
true
Description
Controls default alias behavior when generating a note link.
Example
commands:
copyNoteLink:
aliasMode: none
nonNoteFile.anchorType
- type:
enum
- default:
block
- options:
line
,block
,prompt
Description
In non-note files, Copy Note Link can use both block anchors and line numbers.
Line numbers link to a specific line number in the file, but they are less reliable as your links will become stale as the file changes and lines move around.
Block anchors are more reliable because they will always refer to the marked
line, but Dendron has to modify the file to insert a block anchor which looks
like ^this
. You are free to move the anchor anywhere in the file or to put
comment markers like //
or #
or anything else before them.
You can also set it to prompt
. When set to prompt, Dendron will instead prompt
which type of anchor to use each time.
Example
commands:
copyNoteLink:
nonNoteFile:
anchorType: line
Examples
Copying a link to a note
If your cursor is not on a header, and you don't have any selection made in the editor, this command will copy a link to the note. The title of the note will be used as the alias of the wikilink.
Copying a link to a specific header
If you place your cursor on a header in your note, this command will copy the relative link to the header. The header text will be used as the alias of the copied wikilink
Copying a link to part of the note
You can select any line of text, and Dendron will create a link to it by inserting a block anchor, or copy an existing anchor of the selection.
Copying a link to files that are not notes / files outside the vault
You can use this command in any file inside your workspace, including files that aren't notes or files that are not in any vault to get links to those files.
Similar to regular notes, you can also highlight a line of text to create a link to that line. Dendron will automatically insert a Block Anchor like it does in notes, and you can change what kind of anchor to use with the anchorType configuration.
Children
Backlinks