Commit bb0f452e7f
bb0f452e7f55fe1f43d396aeff6b94efa72d3a2f
parent: 331f58de77
Verified · cmc
cmc <hello@cleberg.net> · 2026-10-08 05:34 UTC
Truncate long lines from the View menu and Settings
View ▸ Truncate or Wrap Long Lines toggles the current file, and Settings ▸
Editing has a checkbox for org-startup-truncated.
Layout: unified · split
Sources/Orgstar/OrgstarApp.swift
+9 −1
| @@ -356,6 +356,7 @@ struct OrgstarApp: App { |
| 356 | 356 | Button("Show or Hide Columns and Clock") { commands.run("app.toggle-inspector") } |
| 357 | 357 | .keyboardShortcut("i", modifiers: [.command, .option]) |
| 358 | 358 | MarkupToggle() |
| 359 | Button("Truncate or Wrap Long Lines") { commands.run("editor.toggle-truncate-lines") } |
| 359 | 360 | } |
| 360 | 361 | CommandGroup(after: .pasteboard) { |
| 361 | 362 | Divider() |
| @@ -480,6 +481,7 @@ struct SettingsView: View { |
| 480 | 481 | @AppStorage("fillColumn") private var fillColumn = 80 |
| 481 | 482 | @AppStorage("hiddenMarkers") private var hiddenMarkers = true |
| 482 | 483 | @AppStorage("prettyEntities") private var prettyEntities = true |
| 484 | @AppStorage("startupTruncated") private var startupTruncated = false |
| 483 | 485 | @AppStorage("todoKeywords") private var todoKeywords = Preferences.defaultTodoKeywords |
| 484 | 486 | @AppStorage("agendaSpan") private var agendaSpan = 10 |
| 485 | 487 | @AppStorage("agendaStartOffset") private var agendaStartOffset = -3 |
| @@ -573,6 +575,12 @@ struct SettingsView: View { |
| 573 | 575 | Toggle("Lists can use letters (a. b. c.)", isOn: $alphabeticalLists) |
| 574 | 576 | Stepper("M-q fills to column \(fillColumn)", value: $fillColumn, in: 40...200) |
| 575 | 577 | } |
| 578 | Section { |
| 579 | Toggle("Long lines run off the edge instead of wrapping (org-startup-truncated)", isOn: $startupTruncated) |
| 580 | } footer: { |
| 581 | Text("Applies to files as they open. View ▸ Truncate or Wrap Long Lines switches the current file.") |
| 582 | .settingsFooter() |
| 583 | } |
| 576 | 584 | Section { |
| 577 | 585 | Toggle("Emacs hides emphasis markers (org-hide-emphasis-markers)", isOn: $hiddenMarkers) |
| 578 | 586 | Toggle("Emacs shows entities as characters (org-pretty-entities)", isOn: $prettyEntities) |
| @@ -588,7 +596,7 @@ struct SettingsView: View { |
| 588 | 596 | } |
| 589 | 597 | } |
| 590 | 598 | .formStyle(.grouped) |
| 591 | | .frame(height: 450) |
| 599 | .frame(height: 520) |
| 592 | 600 | } |
| 593 | 601 | |
| 594 | 602 | private var appearance: some View { |
docs/manual/guide/02-the-editor.org
+4 −4
| @@ -260,15 +260,15 @@ On iOS, spell checking follows =spell-check= in the synced =config.toml=, and is |
| 260 | 260 | |
| 261 | 261 | * Wrapping and filling |
| 262 | 262 | |
| 263 | | Long lines wrap at the edge of the editor by default. Truncate or Wrap Long Lines (=toggle-truncate-lines=) switches the current buffer to long lines that run off the right edge, with a horizontal scroll bar, and back. The echo area says which is now in effect. |
| 263 | Long lines wrap at the edge of the editor by default. View ▸ Truncate or Wrap Long Lines (=toggle-truncate-lines=) switches the current buffer to long lines that run off the right edge, with a horizontal scroll bar, and back. The echo area says which is now in effect. |
| 264 | 264 | |
| 265 | 265 | | Preset | Key | |
| 266 | 266 | |--------+------------------------------| |
| 267 | 267 | | Emacs | =C-x x t= | |
| 268 | 268 | | Doom | =SPC t w= in normal state | |
| 269 | | | Mac | palette only | |
| 269 | | Mac | menu or palette only | |
| 270 | 270 | |
| 271 | | To truncate lines in every file, set =org-startup-truncated = true= in =config.toml=. The default is to wrap, as Doom does; Emacs's own default is to truncate. |
| 271 | To truncate lines in every file, turn on Settings ▸ Editing ▸ "Long lines run off the edge instead of wrapping", or set =org-startup-truncated = true= in =config.toml=. The default is to wrap, as Doom does; Emacs's own default is to truncate. |
| 272 | 272 | |
| 273 | 273 | Wrapping is display only. To rewrap the text of a paragraph, use Org ▸ Fill Paragraph (=org-fill-paragraph=), which breaks the paragraph's lines at the fill column: =M-q= in the Emacs preset and in every Doom state, =⌃⌘P= in the Mac preset. With a selection, it fills every paragraph the selection touches. In Doom's normal and visual states, =gq= and =gw= with a motion fill the paragraphs in the lines it covers (=gqq= and =gww= for the current lines); =gq= leaves the caret on the last line, =gw= where it was. Unlike Fill Paragraph, =gq= and =gw= keep extra spaces between words and at the ends of lines, as Doom does. See [[file:03-keys.org][Keys and commands]]. The fill column is Settings ▸ Editing ▸ "M-q fills to column N" (80 by default, 40 to 200), or =fill-column= in =config.toml=. Orgstar has no auto-fill: lines are not broken as you type. |
| 274 | 274 | |
| @@ -280,7 +280,7 @@ Wrapping is display only. To rewrap the text of a paragraph, use Org ▸ Fill Pa |
| 280 | 280 | | Show Line Numbers | View ▸ Show Line Numbers | =⇧⌘L= | on | =display-line-numbers-type= | every buffer | |
| 281 | 281 | | Inline images | Org ▸ Show or Hide Inline Images | =C-c C-x C-v= (Emacs, Doom) | off | =org-startup-with-inline-images= | current buffer | |
| 282 | 282 | | Spell checking | palette | =SPC t s= (Doom) | off | =spell-check= | current buffer | |
| 283 | | | Truncate long lines | palette | =C-x x t= (Emacs), =SPC t w= (Doom) | off | =org-startup-truncated= | current buffer | |
| 283 | | Truncate long lines | View ▸ Truncate or Wrap Long Lines | =C-x x t= (Emacs), =SPC t w= (Doom) | off | =org-startup-truncated= | current buffer | |
| 284 | 284 | |
| 285 | 285 | Toggles that apply to the current buffer last until it closes; the =config.toml= setting decides how each file starts. Changing those settings, and =org-startup-indented= and =org-hide-leading-stars=, affects files opened afterwards, not buffers already open. |
| 286 | 286 | |
docs/manual/guide/13-configuration.org
+3 −1
| @@ -71,6 +71,7 @@ Automatic saving writes a file one second after you stop typing. The keymap pres |
| 71 | 71 | | M-RET splits the line at the caret | On or off | Off | =org-M-RET-may-split-line= | |
| 72 | 72 | | Lists can use letters (a. b. c.) | On or off | On | =org-list-allow-alphabetical= | |
| 73 | 73 | | M-q fills to column N | 40 to 200 | 80 | =fill-column= | |
| 74 | | Long lines run off the edge instead of wrapping (org-startup-truncated) | On or off | Off | =org-startup-truncated= | |
| 74 | 75 | | Emacs hides emphasis markers (org-hide-emphasis-markers) | On or off | On | =org-hide-emphasis-markers= | |
| 75 | 76 | | Emacs shows entities as characters (org-pretty-entities) | On or off | On | =org-pretty-entities= | |
| 76 | 77 | | Default TODO keywords | Text in =#+TODO= syntax, one sequence per line | See below | =org-todo-keywords= | |
| @@ -79,6 +80,8 @@ The two "Emacs hides" and "Emacs shows" switches describe your Emacs, not Orgsta |
| 79 | 80 | |
| 80 | 81 | The Tags picker offers two values. =config.toml= accepts any integer; with a value other than =-77= or =0= the picker shows no selection. |
| 81 | 82 | |
| 83 | The long-lines switch applies to files as they open; View ▸ Truncate or Wrap Long Lines switches the file in front. |
| 84 | |
| 82 | 85 | Default TODO keywords apply to files without a =#+TODO= line. Orgstar reads them at launch, so a change takes effect after you quit and reopen Orgstar. |
| 83 | 86 | |
| 84 | 87 | ** Appearance |
| @@ -127,7 +130,6 @@ These settings have no control in the Settings window. Some are in the View menu |
| 127 | 130 | | =org-startup-indented= | | |
| 128 | 131 | | =org-hide-leading-stars= | | |
| 129 | 132 | | =org-startup-align-all-tables= | | |
| 130 | | | =org-startup-truncated= | | |
| 131 | 133 | | =org-startup-with-inline-images= | | |
| 132 | 134 | | =org-cycle-hide-drawer-startup= | | |
| 133 | 135 | | =org-cycle-hide-block-startup= | | |