Commit ea7e7fd2a0

ea7e7fd2a0d65a2fb2df882c3ceeabcf86d3bd02

parent: 8aad24bb5c

Verified · cmc

cmc <hello@cleberg.net> · 2026-11-22 20:47 UTC

Mac: first run for people without Emacs

The welcome sheet starts on Mac keys unless it finds an Emacs or Doom configuration, and says that ⇧⌘P finds any command and the Org menu lists them.

Ref #222
Ref #138

Layout: unified · split

Changed files (4)
Sources/Orgstar/WelcomeView.swift +13 −1 · view
@@ -25,11 +25,12 @@ struct WelcomeView: View {
2525 var body: some View {
2626 VStack(alignment: .leading, spacing: 14) {
2727 Text("Welcome to orgstar").font(.title2.bold())
28 Text("orgstar edits a folder of plain-text org files in place. Add the folder your notes are in, or start a new one. Nothing is copied or moved, and you can add more folders later with File ▸ Add Folder….")
28 Text("orgstar edits a folder of plain-text org files in place. Add the folder your notes are in, or start a new one. Nothing is copied or moved, and you can add more folders later with File ▸ Add Folder…")
2929 Picker("Keys", selection: $preset) {
3030 ForEach(KeymapPreset.allCases, id: \.self) { Text($0.title).tag($0) }
3131 }
3232 Text(presetNote).font(.callout).foregroundStyle(.secondary)
33 Text("⇧⌘P finds any command. The Org menu lists them with their keys.").font(.callout).foregroundStyle(.secondary)
3334 #if APPSTORE
3435 Text("orgstar keeps its settings in a folder of its own. To use the ones in ~/.config/orgstar, choose that folder in Settings ▸ General ▸ Choose Configuration Folder….")
3536 .font(.callout).foregroundStyle(.secondary)
@@ -65,6 +66,17 @@ struct WelcomeView: View {
6566 }
6667 .padding(20)
6768 .frame(width: 480)
69 .onAppear {
70 if UserDefaults.standard.object(forKey: "keymap") == nil { preset = Self.suggestedPreset }
71 }
72 }
73
74 /// Doom keys when a Doom configuration is found, Emacs keys for another Emacs
75 /// configuration, and Mac keys without one.
76 static var suggestedPreset: KeymapPreset {
77 guard let found = EmacsImport.defaultLocations().first else { return .mac }
78 let doom = [ProcessInfo.processInfo.environment["DOOMDIR"], OrgPaths.home + "/.config/doom", OrgPaths.home + "/.doom.d"]
79 return doom.contains(found.path) ? .doom : .emacs
6880 }
6981
7082 private var presetNote: LocalizedStringKey {
docs/manual/guide/03-keys.org +1 −1 · view
@@ -14,7 +14,7 @@ Choose a preset in Settings ▸ General ▸ Keys, or with =keymap= in the =[orgs
1414
1515| Preset | =config.toml= value | What it is |
1616|-+-+-|
17| Emacs | ="emacs"= | Emacs and Org keys: =C-f=, =C-k=, =C-x C-s=, =C-c C-t=, =M-RET=, =M-<left>=. The default. |
17| Emacs | ="emacs"= | Emacs and Org keys: =C-f=, =C-k=, =C-x C-s=, =C-c C-t=, =M-RET=, =M-<left>=. The default when nothing else is chosen. |
1818| Mac | ="mac"= | Standard macOS text keys stay as they are. Org commands use Control-Command chords (=⌃⌘T=, =⌃⌘←=), which macOS text editing leaves free. |
1919| Doom (Vim keys) | ="doom"= | Modal editing as in Doom Emacs with evil and evil-org: normal, insert and visual states, the =SPC= leader and =SPC m= local leader, plus the Emacs preset's Org keys in every state. |
2020
docs/manual/quickstart.org +6 −1 · view
@@ -20,10 +20,15 @@ Finder or the sidebar.
2020
2121Open orgstar ▸ Settings… (=⌘,=) and pick *Keys* under General:
2222
23- *Emacs*: Org's own bindings, =C-c C-t= and friends. The default.
23- *Emacs*: Org's own bindings, =C-c C-t= and friends.
2424- *Mac*: standard Mac editing keys, with Org commands on =⌃⌘= combinations.
2525- *Doom (Vim keys)*: modal editing as in Doom Emacs, with =SPC= as the leader.
2626
27The welcome sheet starts on Doom keys when it finds a Doom configuration (=~/.config/doom= or
28=~/.doom.d=), on Emacs keys when it finds another Emacs configuration (=~/.config/emacs=,
29=~/.emacs.d= or =~/.emacs=), and on Mac keys otherwise. In every preset, =⇧⌘P= finds any
30command, and the Org menu lists them with their keys.
31
2732[[file:guide/03-keys.org][Keys and commands]] lists every binding in each preset. If you
2833already use Emacs, Settings ▸ General ▸ Import from Emacs… reads your configuration:
2934TODO keywords, agenda files, capture templates and more (see
l10n/Localizable.xcstrings +38 −4 · view
@@ -38931,7 +38931,7 @@
3893138931 }
3893238932 }
3893338933 },
38934 "orgstar edits a folder of plain-text org files in place. Add the folder your notes are in, or start a new one. Nothing is copied or moved, and you can add more folders later with File ▸ Add Folder….": {
38934 "orgstar edits a folder of plain-text org files in place. Add the folder your notes are in, or start a new one. Nothing is copied or moved, and you can add more folders later with File ▸ Add Folder…": {
3893538935 "localizations": {
3893638936 "de": {
3893738937 "stringUnit": {
@@ -38942,13 +38942,13 @@
3894238942 "es": {
3894338943 "stringUnit": {
3894438944 "state": "translated",
38945 "value": "orgstar edita en su sitio una carpeta de archivos Org en texto plano. Añade la carpeta donde están tus notas o empieza una nueva. No se copia ni se mueve nada, y puedes añadir más carpetas después con Archivo ▸ Añadir carpeta…."
38945 "value": "orgstar edita en su sitio una carpeta de archivos Org en texto plano. Añade la carpeta donde están tus notas o empieza una nueva. No se copia ni se mueve nada, y puedes añadir más carpetas después con Archivo ▸ Añadir carpeta…"
3894638946 }
3894738947 },
3894838948 "fr": {
3894938949 "stringUnit": {
3895038950 "state": "translated",
38951 "value": "orgstar modifie sur place un dossier de fichiers Org en texte brut. Ajoutez le dossier contenant vos notes, ou commencez-en un nouveau. Rien n'est copié ni déplacé, et vous pourrez ajouter d'autres dossiers plus tard avec Fichier ▸ Ajouter un dossier…."
38951 "value": "orgstar modifie sur place un dossier de fichiers Org en texte brut. Ajoutez le dossier contenant vos notes, ou commencez-en un nouveau. Rien n'est copié ni déplacé, et vous pourrez ajouter d'autres dossiers plus tard avec Fichier ▸ Ajouter un dossier…"
3895238952 }
3895338953 },
3895438954 "ja": {
@@ -38960,7 +38960,7 @@
3896038960 "pt-BR": {
3896138961 "stringUnit": {
3896238962 "state": "translated",
38963 "value": "O orgstar edita uma pasta de arquivos Org em texto simples no próprio lugar. Adicione a pasta onde estão suas notas ou comece uma nova. Nada é copiado ou movido, e você pode adicionar mais pastas depois com Arquivo ▸ Adicionar Pasta…."
38963 "value": "O orgstar edita uma pasta de arquivos Org em texto simples no próprio lugar. Adicione a pasta onde estão suas notas ou comece uma nova. Nada é copiado ou movido, e você pode adicionar mais pastas depois com Arquivo ▸ Adicionar Pasta…"
3896438964 }
3896538965 }
3896638966 }
@@ -40356,6 +40356,40 @@
4035640356 "·": {
4035740357 "shouldTranslate": false
4035840358 },
40359 "⇧⌘P finds any command. The Org menu lists them with their keys.": {
40360 "localizations": {
40361 "de": {
40362 "stringUnit": {
40363 "state": "translated",
40364 "value": "⇧⌘P findet jeden Befehl. Das Menü „Org“ listet sie mit ihren Tasten auf."
40365 }
40366 },
40367 "es": {
40368 "stringUnit": {
40369 "state": "translated",
40370 "value": "⇧⌘P encuentra cualquier comando. El menú Org los muestra con sus teclas."
40371 }
40372 },
40373 "fr": {
40374 "stringUnit": {
40375 "state": "translated",
40376 "value": "⇧⌘P trouve n'importe quelle commande. Le menu Org les liste avec leurs raccourcis."
40377 }
40378 },
40379 "ja": {
40380 "stringUnit": {
40381 "state": "translated",
40382 "value": "⇧⌘Pで任意のコマンドを検索できます。Orgメニューにはコマンドとそのキーが一覧表示されます。"
40383 }
40384 },
40385 "pt-BR": {
40386 "stringUnit": {
40387 "state": "translated",
40388 "value": "⇧⌘P encontra qualquer comando. O menu Org lista os comandos com suas teclas."
40389 }
40390 }
40391 }
40392 },
4035940393 "⋯": {
4036040394 "shouldTranslate": false
4036140395 },
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