You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feat(keymaps): the template pickers get their own shortcuts, ⌘⌥T on macOS (#847)
Creating a note from a template, or inserting one into the current
note, had exactly two keyboard routes: Vim's leader (Space t, Space i)
and the command palette. With Vim off there was nothing to bind, and
rebinding the leader entries could not help, since a leader binding is
the one key typed after Space: a chord like ⌘⌥T is not something it
can hold. A user on Discord asked for exactly that chord.
Two app shortcuts now open the same pickers. "New note from template"
ships as ⌘⌥T on macOS, free across the app; on Linux and Windows it
starts unbound, since Ctrl+Alt+T opens a terminal on most Linux
desktops. "Insert template into current note" ships unbound everywhere,
since ⌘⌥I is Electron's DevTools. Both list in Settings → Keymap, take
any chord from the recorder or config.toml, and stand down while
Settings, a palette, a menu or a dialog is open, the rule tab selection
already follows. Insert only answers with a note open, as its palette
entry does. The palette shows the chord once one is set and falls back
to the leader key only while Vim is on, and the manual lists both.
Tests: the Mac default and the unbound Linux and Windows ones, the
event a Mac actually sends for ⌘⌥T (Option turns the T into †), no
clash between two unbound actions, and the palette's shortcut text. The
portable-spelling test skips a default that is deliberately unbound.
Verified over CDP in the built app with both stores isolated
(check-template-shortcuts.mjs): the packaged 2.55.0 passes 1 of 5
(nothing opens, neither row exists), this build 8 of 8, with Vim off
(⌘⌥T from the editor, a template making a note, ⌘⌥Y bound through the
recorder opening the insert picker) and with Vim on (⌘⌥T from normal
mode, nothing typed). npm run test:run and npm run typecheck clean.
'Open the template picker with `Space t`, the `:template` (or `:tmpl`) ex command, or the “New Note from Template…” command palette entry. Pick a built-in template — engineering ones like ADR, RFC/Design Doc, Bug Report, Postmortem, Meeting Notes, and 1:1, or personal ones like Daily Note, Weekly Review, Reading Notes, Journal, Project Kickoff, and To-do — or one of your own. ZenNotes then asks which folder to create it in (defaulting to the folder you are viewing) and fills in variables like the date and week before placing your cursor where the template marks it. To create straight into a specific folder, right-click that folder in the sidebar and choose “New from template”.'
107
+
'Open the template picker with `Space t`, the `:template` (or `:tmpl`) ex command, or the “New Note from Template…” command palette entry. It has a shortcut of its own too, which works with Vim mode on or off: `Alt+Mod+T` (⌘⌥T) on macOS, and on Linux and Windows whatever key you give “New note from template” under Settings → Keymap. Pick a built-in template — engineering ones like ADR, RFC/Design Doc, Bug Report, Postmortem, Meeting Notes, and 1:1, or personal ones like Daily Note, Weekly Review, Reading Notes, Journal, Project Kickoff, and To-do — or one of your own. ZenNotes then asks which folder to create it in (defaulting to the folder you are viewing) and fills in variables like the date and week before placing your cursor where the template marks it. To create straight into a specific folder, right-click that folder in the sidebar and choose “New from template”.'
{keys: 'Shift+Mod+P',action: 'Open commands',detail: 'Open the command palette.'},
496
496
{keys: 'Mod+N',action: 'New note in current folder',detail: 'Create a note in the active note\u2019s folder (or the browsed folder when no note is open) and focus its title. On Linux and Windows this wins over Vim\u2019s Ctrl+N (cursor down). Rebindable under Settings \u2192 Keymaps.'},
497
497
{keys: 'Shift+Mod+N',action: 'New Quick Note',detail: 'Create a quick capture note in the main window and focus its title.'},
498
+
{keys: 'Alt+Mod+T (macOS)',action: 'New note from template',detail: 'Open the template picker to create a note, with Vim mode on or off. Bound by default on macOS; on Linux and Windows it starts unbound, since Ctrl+Alt+T opens a terminal on most Linux desktops, so set a key under Settings → Keymap.'},
499
+
{keys: 'Unbound',action: 'Insert template into current note',detail: 'Pick a template and insert it at the cursor of the active note, with Vim mode on or off. Unbound until you set a key under Settings → Keymap.'},
498
500
{keys: 'Shift+Mod+Space',action: 'Open quick capture window',detail: 'Open the floating, always-on-top capture window. Bound system-wide (CommandOrControl+Shift+Space by default) so it works over any app; change it under Settings → Editor.'},
499
501
{keys: 'Mod+,',action: 'Open Settings',detail: 'Open settings for appearance, editor behavior, fonts, vault controls, and app details. Settings opens on its search: type to filter, move through the results with ↑/↓ (or Ctrl+J / Ctrl+K), and press Enter to jump to the picked setting. From anywhere in Settings, Mod+F (or / in Vim mode) returns to the search.'},
500
502
{keys: 'Mod+1',action: 'Toggle sidebar',detail: 'Hide or show the left sidebar.'},
{keys: 'Space r',action: 'Review Cloud conflicts',detail: 'Open whatever Cloud sync is waiting on: the queue of files two devices changed at once, one decision at a time, or the vault settings question, which lists each setting that differs with this device’s value beside the cloud’s and lets you pick a side per setting. The binding and the command palette entry appear only while something is waiting, and open the same dialog as Review in the status bar.'},
556
558
{keys: 'Space g',action: 'Open atlas',detail: 'Open the Atlas view: the whole vault drawn as a map of notes and links.'},
557
559
{keys: 'Space q',action: 'Quick capture window',detail: 'Open the floating, always-on-top capture window, same as the global hotkey.'},
558
-
{keys: 'Space i',action: 'Insert template into note',detail: 'Pick a template and insert it at the cursor of the active note, instead of creating a new note from it.'},
560
+
{keys: 'Space i',action: 'Insert template into note',detail: 'Pick a template and insert it at the cursor of the active note, instead of creating a new note from it. Without Vim mode, give “Insert template into current note” a key under Settings → Keymap.'},
559
561
{keys: 'Space c',action: 'Toggle calendar',detail: 'Show or hide the calendar panel for the active pane.'},
560
562
{keys: 'Space l s',action: 'Toggle favorite',detail: 'Add or remove the active note from the Favorites section shown in the sidebar and on the home view. Folders join it from their context menu.'},
561
563
{keys: 'Space, then pause',action: 'Show leader hints',detail: 'If enabled in Settings, open a which-key style guide for the next available leader actions. Sticky mode keeps it open until `Space` or `Esc`.'},
"Create a note in the active note's folder (or the browsed folder when no note is open) and focus its title. Wins over Vim's Ctrl+N (cursor down) when Mod is Ctrl.",
226
228
defaultBinding: "Mod+N",
227
229
},
230
+
// The template actions were reachable only through Vim's leader (Space t,
231
+
// Space i) and the palette, so with Vim off no key could reach them (#847).
232
+
// Windows and Linux ship unbound: Ctrl+Alt+T opens a terminal on most Linux
233
+
// desktops, and Ctrl/Cmd+Alt+I is Electron's DevTools.
234
+
{
235
+
id: "global.newNoteFromTemplate",
236
+
kind: "shortcut",
237
+
scope: "app",
238
+
group: "global",
239
+
title: "New note from template",
240
+
description:
241
+
"Open the template picker to create a note, as Vim's Leader t does. Unbound on Windows and Linux until you set a key.",
242
+
defaultBinding: "",
243
+
defaultBindingMac: "Alt+Mod+T",
244
+
},
245
+
{
246
+
id: "global.insertTemplate",
247
+
kind: "shortcut",
248
+
scope: "app",
249
+
group: "global",
250
+
title: "Insert template into current note",
251
+
description:
252
+
"Render a template into the note you are editing, as Vim's Leader i does. Unbound until you set a key.",
0 commit comments