Skip to content

[Feature] Toggle Edit / Preview with a single shortcut #974

Open

Description

@er-sarjan

Summary

Add a Toggle Edit / Preview action: one key that switches the active note to Preview when it's in Edit, and back to Edit when it's in Preview.

Current behavior

There are only fixed-mode actions: global.modeEdit (Cmd+4), global.modeSplit (Cmd+5) and global.modePreview (Cmd+6), plus the matching palette commands. Pressing the Preview key while already in Preview leaves you in Preview, so getting back always needs a second, different key. Each action takes one binding, so you can't put Edit and Preview on the same key to get a toggle either.

Proposal

One new app-level keymap action:

Action id (suggestion) Title Behavior
global.toggleEditPreview Toggle Edit / Preview Edit → Preview, Preview → Edit.
  • Unbound by default (or a default you prefer), rebindable like the other mode actions.
  • A matching Toggle Edit / Preview command in the command palette.
  • Leaving Preview through the toggle should keep the position behaviour from Preview to Edit Mode #822 (open the editor at the section you were reading).

Motivation

This is the single-key "Toggle reading view" (Cmd+E) people know from Obsidian, and it fits ZenNotes' keyboard-first approach: one key to glance at the rendered note and the same key to go back to writing. Split keeps its own key.

Environment

  • ZenNotes 2.73.0 (desktop)
  • macOS 26.5.1, Apple Silicon (arm64)
  • Vim mode: off

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions