vimsheet.controller.mode

Mode enum and state-machine transitions.

class vimsheet.controller.mode.Mode(*values)[source]

Bases: Enum

Application editing modes, mirroring vim modal behaviour.

NORMAL = 1
EDIT = 2
COMMAND = 3
SEARCH = 4
VISUAL = 5
VISUAL_LINE = 6
VISUAL_BLOCK = 7
label()[source]

Return the display label shown in the formula bar / status bar.

Return type:

str

css_class()[source]

Return a CSS class name for theme-dependent mode colour.

Return type:

str

is_visual()[source]

Return True for any Visual sub-mode.

Return type:

bool

vimsheet.controller.mode.can_transition(from_mode, to_mode)[source]

Return True if a direct mode transition is valid.

Parameters:
Return type:

bool