The Kalem Book GitHub

This Book describes Kalem's main branch, which may be ahead of the latest release.

Views

Source view (Ctrl+/)
the file's own text, with colors, line numbers and every character shown.
Split view (Ctrl+\)
the source beside the rich view of the same document; a click makes a side the active one.
Outline (Ctrl+Shift+O)
the headings in a sidebar. A click jumps to a heading; dragging one moves its subtree before the heading it is dropped on or, on the lower half, after it.
Focus mode (F8)
only the section you are writing in.
Narrowing
Narrow to Subtree, Element or Block in the command palette shows only that part of an Org document, and Narrow to Lines the selected lines of any document, Markdown and code too (a plugin names the lines it narrows to: an outliner's zoom into a block). The cursor, Find and Vim's gg, G, searches and :%s keep to the part shown; Widen shows everything again.
Soft wrap (Alt+Z)
long lines wrap at the window's edge, or scroll sideways.
Word counts
the status bar counts the words of the document and of the section at the cursor. Set Document Word Target writes #+PROPERTY: WORD_TARGET 80000 and Set Section Word Target a WORD_TARGET property on the heading (80,000 and 80k work too; 0 removes it); the counts then show against them, "12,400 of 80,000 (15%) words, 900 of 4,000 (22%) in section". Word Count by Chapter (View menu) lists the headings of the first two levels with their words and targets; choosing one goes there. Go to Line moves to a line by its number.

Headings move right by level, and the text under a heading starts where its title does, as with Emacs's org-indent-mode: two characters a level in the window, after the heading's sign in the terminal. editor.outline_indent = false, or #+STARTUP: noindent in a file, keeps all text at the left edge. The text takes the whole window; editor.line_width narrows it to a column that many characters wide (80 reads like a page), and editor.center_text = true puts that column in the middle. Code files take the whole window, and a long line of code wraps under its own indentation.