Skip to main content

Module file

Module file 

Source
Expand description

Tips declared in files: tips/<id>.md, a header between --- lines, then a # Title heading and the text.

---
id: photos.rate
surface: focusedPanel == 'photos.grid'
command: photos.rate
target: photos.rating
---
# Rate quickly

Press {key} to rate the selected photos, **0** to clear the rating.
HeaderWhatDefault
idthe tip’s id, prefixed by its plugin’sthe file’s name
surfacea when clause: where the tip makes senseanywhere
commandthe command it teaches; once used, the tip is not pickednone
targetthe name of what it is about (super::target)none: a corner
contextualtrue: shown only where the application asks (super::hint)false

The text keeps paragraphs (a blank line), **bold**, `code`, {key} (the command’s key binding) and {key:<command>} (another command’s).

Structs§

TipError
What is wrong with a tip’s file.

Constants§

HEADER_KEYS
The header’s keys.

Functions§

parse
Reads a tip from a file’s text; file is its name (photos.rate.md), whose stem is the id when the header has none.
read_dir
Reads every *.md file of a folder, in the order of their names: the tips read, and the files that could not be.