Guide › Help

Using Dropbox, iCloud Drive or another sync folder

Mayhap keeps each document as an ordinary file, so Dropbox, iCloud Drive or any other sync app carries it between your computers like any other file. What a document keeps beside it, its history and its book's order, lives in a hidden .mayhap folder next to it, and travels with it.

Keeping documents in a sync folder

A document's .mayhap file holds everything in it: the page, every version, its maybes and Aside. To keep your documents in sync, save them anywhere inside your sync folder.

By default, Mayhap saves new documents in a Mayhap folder inside your system's documents folder. If you would like new documents to start in your sync folder instead, open Settings › Writing, click Change… beside Documents folder, and pick a folder inside Dropbox or iCloud Drive. For example, Dropbox › Writing.

The hidden .mayhap folder

Beside your documents, Mayhap keeps a hidden folder named .mayhap. It holds each document's history and, for a book, its chapters' order, its goal and its author. Since it sits next to the documents, a sync app carries it along with them. If your sync app lets you leave out hidden folders, you should keep this one in.

Inside your documents folder, every folder gets its .mayhap when it's needed. A folder elsewhere gets one only once you use it as a book: reorder its chapters, set its goal or author, add a cover or make a new chapter there. Until then, the history of its documents is kept in Mayhap's own folder on this computer, and it doesn't travel. In other words, if you'd like the history to come along, keep your documents inside the documents folder.

Now and then, a sync brings a history before all of its parts have arrived. When that happens, Mayhap says so once after the document's name, and adds nothing to that history until the rest arrives. Your saves go on as usual.

When a document changes on disk

Mayhap watches the file of each open document. When another app changes it, such as a sync bringing the copy you saved on your other computer, the top bar says Changed on disk after the document's name, with Reload. If the window holds unsaved changes, Keep mine is beside it:

Reload
Opens the file again, as it is now. Anything unsaved in the window goes, but its history keeps a Before Reload entry first, so you may still find it.
Keep mine
Keeps the text in the window, unsaved. Your next save writes it over the file.

Until you choose, saving writes nothing over the file, and neither does Save automatically. This is so a copy that came from your other computer is never lost to a save you didn't mean. Save As… still saves under another name. If the file can't be opened as it is now, because a sync is still writing it, Mayhap keeps your document and says why. Changed on disk stays, so you may press Reload again once the sync has finished.

If a sync deletes the file or moves it away, the document stays open, marked as unsaved. Press CtrlS⌘S to write it back; Save automatically never does that on its own.

One computer at a time

Mayhap doesn't merge two copies of a document. You should close a document on one computer before you write in it on another, and give your sync app a moment to bring the latest copy. If both computers change it anyway, Changed on disk lets you choose which text to keep, and History holds what was saved before.

On one computer, a document is open in one window at most. Opening it again brings its window to the front.

Your settings, recent files and recovery copies are kept in Mayhap's own folders on each computer, not in your sync folder. Only the documents and their .mayhap folders travel.

Nothing in the guide matches. Write to us