Commit 97747b094d

97747b094d086278e81ed74839087570090a5691

parent: 29b57626b6

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-26 03:44 UTC

iOS Commands: list named keyboard macros under Edit

Ref #136

Layout: unified · split

Changed files (4)
Sources/OrgApp/CommandRanking.swift +1 −1 · view
@@ -95,7 +95,7 @@ public enum CommandGroups {
9595 Group(title: String(localized: "Clock", comment: "Commands list section"), prefixes: ["app.clock."]),
9696 Group(title: String(localized: "Export", comment: "Commands list section"), prefixes: ["app.export", "app.copy-rich-text", "app.publish"]),
9797 Group(title: String(localized: "File", comment: "Commands list section"), prefixes: ["app.save", "app.word-count", "app.recovery", "app.sync-conflicts"]),
98 Group(title: String(localized: "Edit", comment: "Commands list section"), prefixes: ["edit."]),
98 Group(title: String(localized: "Edit", comment: "Commands list section"), prefixes: ["edit.", "macro."]),
9999 Group(title: String(localized: "View", comment: "Commands list section"), prefixes: ["app.toggle-markup", "editor.", "app.split-", "app.pane-"]),
100100 ]
101101
Sources/OrgstarMobile/EditorScreen.swift +2 −1 · view
@@ -1232,7 +1232,8 @@ struct CommandPalette: View {
12321232 let paneCommands: [(id: String, title: String)] = !panes ? [] : [("app.split-right", "Split Pane Right"), ("app.split-below", "Split Pane Below")]
12331233 + (split ? [("app.pane-next", "Next Pane"), ("app.pane-close", "Close Pane"), ("app.pane-only", "Close Other Panes")] : [])
12341234 var seen = Set<String>()
1235 return (paneCommands + Self.viewCommands + Commands.everything.map { ($0.id, $0.title) })
1235 let macros = editor.namedMacros.names.map { (id: NamedMacros.commandPrefix + $0, title: $0) }
1236 return (paneCommands + Self.viewCommands + Commands.everything.map { ($0.id, $0.title) } + macros)
12361237 .filter { !AppStoreCommands.hidden.contains($0.id) && Self.offered($0.id) && seen.insert($0.id).inserted }
12371238 .map { command in
12381239 CommandRow(id: command.id, title: CommandTitle.localized(command.title), keys: editor.keymap.keyLabels(for: command.id).first,
Sources/OrgstarMobile/MobileEditor.swift +1 · view
@@ -479,6 +479,7 @@ final class MobileEditor: NSObject, DocumentBuffer {
479479 case "app.crypt.open-entry", "app.crypt.decrypt-entry": return onAppCommand != nil && OrgCrypt.encryptedRange(context.text, at: context.caret) != nil
480480 case "app.table-export", "app.table-export.tsv", "app.plot": return onAppCommand != nil && ImportTable.exportText(context.text, at: context.caret, path: "") != nil
481481 case "app.word-count", "app.recovery", "app.sync-conflicts", "app.attach.photo", "app.attach.camera", "app.attach.scan": return onAppCommand != nil
482 case _ where id.hasPrefix(NamedMacros.commandPrefix): return true
482483 case "app.refile", "app.refile.copy", "app.archive": return onAppCommand != nil && Presentation.heading(containing: context.caret, in: context.tree) != nil
483484 case "app.copy-rich-text", "app.export.html-open", "app.export-body-only", "app.export.icalendar-agenda", "app.export.icalendar-combined": return onAppCommand != nil
484485 case _ where id.hasPrefix("app.publish"): return onAppCommand != nil
docs/manual/guide/14-ios.org +1 −1 · view
@@ -156,7 +156,7 @@ Bold, Italic and Code are in the edit menu of a selection, under Format: each pu
156156
157157Commands, in the key bar and in the toolbar of the editor, the reader and the agenda, lists the commands of the screen. With nothing typed, the ten you ran from Commands most recently come first under Recent, then every command by subject, in the Org menu's groups (Visibility, Headings, TODO and Tags, and so on) followed by Clock, Export, File, Edit and View. Type to search: the letters you type must appear in the title in order, as in the Mac's command palette, and commands you run often rank a little higher. The command runs once the list closes.
158158
159In the editor, a command that doesn't apply at the caret is listed greyed, with the reason, such as =Not in a list= or =No table at point=, so a search finds everything the editor can do. With a hardware keyboard attached, each command shows its Emacs key.
159Named keyboard macros are listed by name under Edit. In the editor, a command that doesn't apply at the caret is listed greyed, with the reason, such as =Not in a list= or =No table at point=, so a search finds everything the editor can do. With a hardware keyboard attached, each command shows its Emacs key.
160160
161161The reader's list has Find, Outline, Show or Hide Markup, Capture… and the clock commands that need no caret. The agenda's has its views, Tags and Properties…, Search…, Save as View…, Today, Earlier, Later, Go to Date…, Log Mode, Filter…, Select, Board, Capture… and the same clock commands.
162162
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form