Commands for the preview palette buffer
The palette preview buffer uses the major mode modus-themes-preview-mode, which provides the modus-themes-preview-mode-map (Preview theme colors). The following key bindings are available by default:
| Default key binding | Name of the command |
|---|---|
‘w’ | modus-themes-preview-mode-copy-color |
‘W’ | modus-themes-preview-mode-copy-entry |
‘m’ | modus-themes-preview-mode-mark |
‘M’ | modus-themes-preview-mode-mark-all |
‘u’ | modus-themes-preview-mode-unmark |
‘U’ | modus-themes-preview-mode-unmark-all |
The command modus-themes-preview-mode-copy-color copies the resolved color value of the entry at point or of all the marked entries. This means that it always returns a string with the value of the color, not a symbolic representation of it. For example, if ‘cursor’ is mapped to ‘red-warmer’, this command will return ‘"#972500"’ while previewing the palette of the modus-operandi theme.
The command modus-themes-preview-mode-copy-entry copies the palette entry as such. This is how the entry is in the underlying palette definition. For example, it will return ‘(magenta-cooler "#531ab6")’ or ‘(keybind blue-warmer)’. Copying those is useful as a starting point for writing palette overrides (Option for palette overrides).
The commands modus-themes-preview-mode-mark, modus-themes-preview-mode-mark-all, modus-themes-preview-mode-unmark, and modus-themes-preview-mode-unmark-all, will add or remove a marker from the current or affected lines. These marks influence the result of the aforementioned commands for copying colors and palette entries.