The Kalem Book GitHub

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

Finding and commands

Ctrl+F finds, Ctrl+H finds and replaces. Every match is marked; Enter and Shift+Enter step through them. In the replace field, Enter replaces one match and Alt+Enter all of them, in one undo step. Alt+R, or the .* button, makes the search a regular expression, with $1 for its groups in the replacement.

Ctrl+Shift+P (or F1; Ctrl+G in a terminal) opens the command palette: every command that applies, by its title, with its category and keys. Type part of a title, or a command's ID (org.todo.cycle, or org todo cycle; kalem commands lists them). Commands that need something, such as a heading level, ask for it. What you type there, as in any question Kalem asks, is edited as a line: the arrows, Home, End, Backspace and Delete, by words with Ctrl (Option on macOS).

Search Lines (SPC s b with Vim keys, and SPC s s) lists the lines of the document that hold every word typed, in any order, and the cursor follows the list: Enter stays there, Escape goes back. Lower-case words match either case; a word with a capital matches exactly. SPC s B searches every open document, SPC s i lists the headings (SPC s I of every open document), SPC s S starts with the word at the cursor, SPC s d searches the files under the document's folder, SPC s D another folder, SPC s P another project, SPC s o looks the word or the selection up online (search.online_url says where), and SPC * searches the project for the word at the cursor or the selection.

Bookmarks are named places in files: Set Bookmark (SPC b m) names the cursor's place (the file and line when you give no name), Jump to Bookmark (SPC RET or SPC s m) lists them and opens one at its place, and Delete Bookmark (SPC b M) takes one away. They are kept in bookmarks.json in Kalem's state folder, for every project, with the text of their line, so a bookmark follows its line when lines are added above it.

The menus hold the commands of the document you are in: a LaTeX file has LaTeX's, a CSV file a Table menu, a workbook Excel's (its cells' commands in File, Edit, Format, Insert, Review and View, and the menus Data, Formulas and Chart), with its buttons on the toolbar. On macOS they are in the menu bar at the top of the screen; on Linux and Windows the window has its own menu bar above the toolbar (ui.menu_bar = false hides it). F10 lists every menu item in the palette, titled with its menu (Edit › Select All), in both editors; it is how the terminal editor, which has no menu bar, reaches them. Where this book names a menu item, F10 and its name find it.