Skip to content

Context Menu ​

Right-clicking inside the editor opens a context menu with actions specific to the editing context. The menu provides access to view mode controls, split editor operations, focus mode toggles, and per-file configuration. It supplements the keyboard shortcuts and command palette, offering a discoverable interface for features you might not use often enough to memorize a shortcut for.

Opening the Context Menu ​

Right-click anywhere inside the editor content area. The context menu appears at the mouse position. It can be dismissed by clicking elsewhere, pressing Escape, or selecting an action.

The context menu is available in all three view modes (live, source, and view) and in both panes of the split editor. The actions in the menu apply to the pane where you right-clicked.

The context menu is organized into logical groups separated by dividers:

Clipboard Actions ​

The top section contains standard clipboard operations:

ActionDescription
CutCut the selected text to the clipboard (Ctrl+X)
CopyCopy the selected text to the clipboard (Ctrl+C)
PastePaste clipboard content at the cursor (Ctrl+V)
Paste as Plain TextPaste without formatting, stripping any rich text from the clipboard (Ctrl+Shift+V)

If no text is selected, Cut and Copy operate on the entire current line (matching standard CodeMirror behavior).

View Mode ​

The view mode section lets you change how the current note is displayed:

ActionDescription
Live ModeSwitch to live mode (inline rendering)
Source ModeSwitch to source mode (raw Markdown)
View ModeSwitch to view mode (read-only preview)

The currently active mode is indicated with a checkmark. Selecting a different mode switches immediately. This is equivalent to using the status bar mode toggle or the command palette.

Default View Mode ​

This section controls the per-file default view mode:

ActionDescription
Set Default: LiveSet this file's default view mode to Live
Set Default: SourceSet this file's default view mode to Source
Set Default: ViewSet this file's default view mode to View
Clear DefaultRemove the per-file default (use the global setting)

The current default (if set) is indicated with a checkmark. See the Per-File Default View Mode section below for details.

Split Editor ​

ActionDescription
Open in SplitOpen the current note in a split pane (Ctrl+\)
Close SplitClose the split editor (Ctrl+Shift+\)

"Open in Split" is available when a single pane is active. "Close Split" is available when the split editor is open.

Focus and Zen Mode ​

ActionDescription
Focus ModeToggle focus mode (Ctrl+Shift+D)
Zen ModeToggle Zen mode (Ctrl+Shift+E)

Each item shows a checkmark when the corresponding mode is active.

Note Actions ​

The bottom section contains actions related to the note file:

ActionDescription
Reveal in File ExplorerHighlight the current note in the sidebar file explorer
Copy File PathCopy the absolute file path of the current note to the clipboard
Copy Relative PathCopy the vault-relative path of the current note
Open in System EditorOpen the file in the operating system's default text editor

Per-File Default View Mode ​

One of the context menu's most useful features is the ability to set a default view mode on a per-file basis. This setting is independent of the global default view mode in Settings and overrides it for the specific file.

How It Works ​

When you set a per-file default:

  1. The setting is stored in the workspace configuration file (.noteriv/workspace.json in your vault root).
  2. Every time you open that file, it automatically opens in the specified mode instead of the global default.
  3. You can still switch modes manually after opening -- the default only controls the initial mode.
  4. The setting persists across Noteriv restarts, vault switches, and application updates.

Use Cases ​

  • Reference notes: Set frequently-read reference notes to open in View mode so they are immediately readable without switching modes.
  • Template files: Set template files to open in Source mode so you can see and edit the raw Markdown structure, including frontmatter and placeholder syntax.
  • Journal entries: Set daily notes or journal entries to open in Live mode for comfortable writing with inline rendering.
  • Complex documents: Set notes with complex tables or deeply nested structures to open in Source mode for easier editing.

Clearing the Default ​

Select Clear Default from the context menu to remove the per-file override. The note will then open in whatever the global default view mode is (set in Settings > Editor > Default View Mode).

Storage Format ​

Per-file defaults are stored as a mapping from file paths (relative to the vault root) to mode names in the workspace configuration:

json
{
  "fileViewModes": {
    "notes/reference.md": "view",
    "templates/meeting.md": "source",
    "journal/2026-03-20.md": "live"
  }
}

This file is inside the .noteriv directory in your vault, which you can include or exclude from version control as you prefer.

Context Menu in Different Modes ​

The context menu adapts slightly based on the active view mode:

In Live Mode ​

All sections are available. Clipboard actions operate on the raw Markdown text, not the rendered output. For example, copying a bold word copies **word**, not just the rendered bold text.

In Source Mode ​

All sections are available. The behavior is identical to live mode since source mode shows raw Markdown.

In View Mode ​

Clipboard actions (Cut, Paste) are disabled since view mode is read-only. Copy still works -- it copies the rendered text content of the selection. The view mode section is available for switching to an editable mode. All other sections work normally.

Context Menu on Special Elements ​

Right-clicking on certain elements provides additional context-specific actions:

ActionDescription
Open LinkOpen the URL in the default browser
Copy Link URLCopy the link destination to the clipboard
Edit LinkPlace the cursor on the link syntax for editing (live mode)
ActionDescription
Open NoteNavigate to the linked note
Open in SplitOpen the linked note in a split pane
Copy Note PathCopy the linked note's path

On an Image ​

ActionDescription
Open ImageOpen the image in the system's default viewer
Copy Image PathCopy the image file path
Resize ImageOpen a dialog to set the image display dimensions

On a Code Block ​

ActionDescription
Copy CodeCopy the code block contents (without the fence markers)
Change LanguageEdit the language identifier

Context Menu in Split Editor ​

When the split editor is open, the context menu actions apply to the pane where you right-clicked. Mode changes, focus mode toggles, and per-file defaults are all pane-specific. The split editor section of the menu shows "Close Split" instead of "Open in Split" since the split is already active.

Keyboard Navigation ​

After the context menu is open, you can navigate it with the keyboard:

KeyAction
Arrow Up / Arrow DownMove between menu items
EnterSelect the highlighted item
EscapeClose the menu
Left ArrowClose a submenu
Right ArrowOpen a submenu

Menu items with keyboard shortcuts display the shortcut on the right side of the menu item for reference.

Released under the MIT License.