Libraries

Since version 3.0, not only plain text documents can be opened, but also folders. This feature allows you to organize your documents in a structured way, such as when you’re writing a book and want to keep separate files for each chapter. In order to open a folder, drag it to the application dock icon or select it from the Open panel, just as you would do for a regular file.

Since version 3.1, folders can be permanently linked as libraries to the sidebar. The sidebar can be opened either with a two-finger swipe to the right in any document window or from the View menu. Folders can be linked by dragging them to the popup button at the top of the sidebar or by opening them as described earlier and selecting “Link [folder]” from the same popup menu. If you later decide that you no longer want a specific folder linked to the sidebar, you can unlink it by selecting “Unlink [folder]”. Linked folders will appear with their plain name in the popup button, while open folders which are currently unlinked will appear with a “–” (dash) prepended to their name. Unlinked folders will disappear from the popup button when relaunching the app.

The sidebar displays all plain text documents contained in the selected library’s folder hierarchy. Documents can be opened by selecting them, while other actions are available from the context menu, such as opening a document in the Finder or printing it. Some actions are available for folders as well, so for example a print action executed on a folder will print all contained documents as a single file.

Custom font

uFocus has a default font which applies to the whole text in a document. Usually, this font should be fine, but you may wish to change it in order to support other character sets.

Once you know which font is suitable for your needs, open the Terminal (you can find it under Utilities in the Application folder) and paste these two lines into it:

defaults write org.desairem.uFocus useCustomFont -bool yes
defaults write org.desairem.uFocus customFont "your_font"

replacing your_font with the name of your font, then press RETURN. When you restart uFocus, your documents will be shown using the new font.

If you want to choose another font, just repeat the step above. To reset the default font, paste the following line into the Terminal:

defaults write org.desairem.uFocus useCustomFont -bool no

Markdown

Markdown is a special syntax created by John Gruber and Aaron Swartz that allows you to add a little bit of formatting to your text. The advantage of the markdown syntax is that you can use it even (or especially) in a plain text document format, so any plain text reader can understand your text. This doesn’t mean any plain text reader can show you how the final result will be: you still need it to support the markdown language.

To enable markdown, select Modus > Markdown.

When printing a document, you can apply the markdown formatting by enabling the option Apply Markdown in the print panel. If you leave this option unchecked, the document will be printed as you see it in the editor.

To add a first-level-heading, type a # (hash) followed by a whitespace at the very beginning of a line and the text in this line will be underlined. To add a n-level-heading, type n times # (n hashes).

To mark some text as italic, type a * (asterisk) or a _ (underscore) and your desired text followed by another *, respectively _. To mark some text as bold or bold and italic, type **/__ (two asterisks/underscores) or respectively ***/___ (three asterisks/underscores). Note that any of these markdown sequences ranging over the end of a line won’t be applied.

To add an ordered list item, type a number followed by a dot or a parenthesis and a whitespace.

To add an unordered list item, type a * (asterisk) or a – (minus sign) followed by a whitespace.

To add a first-level-block quote, type > (greater sign) followed by a whitespace, or a tab. To add a n-level-block quote, type n > (greater signs) each one followed by a whitespace, or n tabs.

Modus

You can customize your writing atmosphere by enabling one or more of the supplied modi. A modus actively stands by as you type your text.

You can find all available modi in the Modus menu.

  • Markdown: allows markdown characters to change how the text is rendered. Regardless of this setting, a document is always saved as plain text.
  • Typewriter scrolling: the text automatically scrolls as you type to keep the blinking cursor at the same distance from the bottom of the window.
  • Sound: experience the feeling of a typewriter. There are different sounds played back when you delete text, enter a space, a newline and any other character.
  • Highlights: the current sentence gets highlighted.
  • NoWayBack: just write! You are not allowed to delete or correct any typed text. Please note that you cannot undo/redo changes applied while having this modus enabled but you are allowed to undo/redo changes after disabling it.

Sentence highlighting and jumping to the previous/next sentence

The Highlights feature can be quite useful if you want to focus on one sentence at a time by highlighting the current sentence and fading out the rest of the text. Note that, as any other modus, sentence highlighting doesn’t modify the text itself but just it’s visual appearance within the editor.

To enable this feature, select Modus > Highlights.

In addition you can jump to the previous and to the next sentence, too, without having necessarily the Highlights modus enabled. When you use one of these two features, the blinking cursor moves automatically to the end of the previous/next sentence. When jumping to the end of the next sentence, the blinking cursor actually moves the the end of the current sentence; only if it already is at the end of the current sentence it moves to the end of the next one.

Shortcuts for these two commands are CMD-LEFTARROW and respectively CMD-RIGHTARROW.

How do sentence ranges work? The range of a sentence is found by looking for the previous and the next stop for a given location in the text. We refer to “stop” as a dot (“.”, “?”, “!”), a newline character or the bounds of the text. Once the right and left stops have been found, it’s easy to find the start and the end of the sentence: the non-whitespace character following the first whitespace after the stops is set to be the start/end of the sentence.

Just keep in mind that after the end of a sentence there should be some whitespace. This allows sentence boundaries to be detected properly and at the same time it’s a good writing habit.