feat(editor): open the Cmd-P palette from every mode

Insert/Visual/View/Command now accept Cmd-P by first bailing out as Esc
would (end insert session, drop selection, abandon the : line), then
opening the palette; closing always lands in Normal. Opening mid-change
aborts the `.` recording so a palette round-trip is never replayed.
This commit is contained in:
Julien Calixte
2026-07-14 10:33:16 +02:00
parent 6fe8c86708
commit 2a12f95165
2 changed files with 127 additions and 12 deletions

View File

@@ -38,8 +38,9 @@ pub enum Key {
/// ignored elsewhere.
Redo,
/// Cmd+P — open the file palette (fuzzy open, v0.5), VS Code "Go to File"
/// style. A Normal-mode gesture; **inside** the palette the same chord closes
/// it (toggle). Esc also closes. Ignored in Insert.
/// style. Available from **every** mode (Insert/Visual/View/Command included,
/// each first bailing out as Esc would); **inside** the palette the same
/// chord closes it (toggle). Esc also closes.
Palette,
/// Ctrl+N — move down: one line in Normal/View (vim `CTRL-N` ≡ `j`), or one
/// row in the file palette. Ignored in Insert.