Up: Preview theme colors [Index]


5.1 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 bindingName of the command
wmodus-themes-preview-mode-copy-color
Wmodus-themes-preview-mode-copy-entry
mmodus-themes-preview-mode-mark
Mmodus-themes-preview-mode-mark-all
umodus-themes-preview-mode-unmark
Umodus-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.

AltStyle によって変換されたページ (->オリジナル) /