Aller au contenu

Link Your Notes

Linking notes in Fern

Linking notes turns a collection of files into an interconnected knowledge base. Fern supports two link styles and keeps them up to date automatically.


Wikilinks use double square brackets around the note name (without the file extension):

[[meeting-notes]]

With a display alias (the text shown differs from the filename):

[[meeting-notes|last Thursday's meeting]]

Link to a note inside a subfolder using the vault-relative path:

[[community/events-calendar]]

Standard markdown link syntax:

[last Thursday's meeting](community/meeting-notes)

Which style to use

Both styles work in Fern. Choose based on your preferences or the tools you use to read your notes outside of Fern.

The link_format config option controls which style Fern uses when it inserts links automatically (for example, from search results):

# in ~/.config/fern/config  or  {vault}/.fern/config
link_format = wiki       # [[note-name]]  (default style)
link_format = markdown   # [title](note-name)

You can always write either style by hand regardless of this setting.


Inline completion

While typing in Insert mode, Fern shows a completion popup as you type a link or tag so you do not have to remember exact names.

Link completion activates the moment you type [[. As you continue typing, the popup narrows to note stems that match your prefix.

Tag completion activates when you type # at the start of a word (not inside a heading). The popup shows tags that already exist in your vault and match what you have typed so far.

Both popups show up to six suggestions at a time.

Key Action
Tab or Ctrl+Y Accept the highlighted suggestion
Shift+Tab Cycle to the previous suggestion
Up / Down Cycle through suggestions
Keep typing Narrows the suggestion list
Esc or any non-matching character Dismiss the popup

If you press Tab when no popup is open, the normal indent behaviour applies.


In Normal mode, place your cursor on a link and press gf. Fern resolves the link and opens the target note in the current pane.

In View mode the cursor is not positioned on individual links, so gf is not available. Use the command palette instead: press ctrl+p and search for "Open a Link from current Note". Fern lists every link in the open note and opens whichever one you select.


If a link points to a note that does not exist, Fern renders it in a different color to signal the broken reference. You can still press gf on it - Fern will offer to create the note.


Press / from anywhere to open the vault search. Results are ranked by relevance and support regular expressions. Press Enter on a result to open that note.

You can also select text in Visual mode and press s to search the vault for the selected text.


When you rename a note with :noteRename <new-name>, Fern uses it's database indexing to quickly find every note in your vault with a link to the old file and rewrites them to point to the old name. Both wikilinks and markdown links are updated. This means you can freely reorganize and rename notes without accumulating dead links!


You can open a linked note side-by-side using split panes:

  1. Split the pane first: ctrl+w v (vertical) or ctrl+w s (horizontal).
  2. Move focus to the new pane: ctrl+l (or ctrl+h / ctrl+j / ctrl+k).
  3. Navigate to the note you want.

Or, with the cursor on a link in Normal mode, split then press gf.


That covers the core workflow. Next, learn how to make Fern feel like yours: Personalizing Fern