Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ Install via the Omarchy Package Repository via the `omawrite` package. It's inst

## Shortcuts

- `Ctrl+S` saves. Unsaved documents use the XDG desktop portal file picker.
- `Ctrl+S` saves, though writing is saved for you anyway. Naming a document
yourself uses the XDG desktop portal file picker.
- `Ctrl+Shift+S` saves as.
- `Ctrl+O` opens a Markdown file through the portal picker.
- `Ctrl+P` opens the system print dialog.
- `Ctrl+E` shows the sidebar listing the Markdown in the current document's
folder, and puts the keyboard in it. Pressing it again takes the sidebar away
and hands the keyboard back to the text — it never reaches into the panel
while you are writing. It starts closed.
- `Ctrl+N` opens a new Omawrite window.
- `Ctrl+Z`, `Ctrl+Shift+Z`, and `Ctrl+Y` handle undo and redo.
- `Super+F` toggles fullscreen. Qt maps this key as `Meta+F`.
Expand All @@ -24,6 +29,43 @@ Install via the Omarchy Package Repository via the `omawrite` package. It's inst
- `Ctrl+B`, `Ctrl+I`, and `Ctrl+K` insert bold, italic, and link Markdown.
- `Ctrl+?` shows the keyboard shortcut reference.

## Sidebar

The sidebar lists the folder the open document lives in — Markdown files and
the folders beside them, nothing else. Opening a document puts the cursor after
everything already written in it, so writing carries on with the sidebar still
open, and the document you are leaving is saved on the way out rather than
asked about.

With the keyboard, once `Ctrl+E` has put focus there:

- `Up`/`Down` or `j`/`k` move through the folder.
- `Enter`, `Right`, or `l` opens a document and hands the keyboard back to the
text, or walks into a folder and stays put.
- `Backspace`, `Left`, or `h` goes up a level.
- `a` starts a new Markdown file and `A` a new folder; type the name and press
`Enter`, or `Esc` to abandon it. A new document opens straight away, and an
existing name is reported rather than overwritten.
- `Esc` returns to writing, leaving the sidebar open.

The folder is re-read whenever anything in it changes, and the selection keeps
its place through that rather than snapping back to the top. Opening the panel
starts from the document being written.

Drag its right edge to widen it; the width is remembered, and stops short of
squeezing the writing column below its usual measure.

## Saving

Writing is saved a moment after you stop typing, and again whenever you leave
the document — switching files, closing the window, or moving to another app.
There is no prompt to answer and nothing to remember to press; `Ctrl+Z` is the
way back rather than a discard button.

A document you never named takes its name from its first line when you leave
it, landing in the folder the sidebar is showing; if the same name is taken
already it becomes `... 2`. One with nothing written in it is not kept.

Unsaved drafts are recovered after an abnormal exit. Omawrite also watches open files
and warns before an external change can replace local work.

Expand Down
5 changes: 4 additions & 1 deletion src/ExternalChangeDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ Dialog {

modal: true
focus: true
closePolicy: Popup.CloseOnEscape
// Both ways out are answers. Escape would be a third, and every meaning it
// could be given — keep, reload, or neither — decides the thing being
// asked, so it is not offered.
closePolicy: Popup.NoAutoClose
width: Math.min(520, containerWidth - 48)
x: Math.round((containerWidth - width) / 2)
y: Math.round((containerHeight - height) / 2)
Expand Down
Loading