vimsheet.model.config

Runtime configuration for VimSheet.

class vimsheet.model.config.Config(autosave=False, autosave_interval=300, default_col_width=10, theme='default', show_grid_lines=True, show_row_headers=True, show_col_headers=True, formula_bar_visible=True, status_bar_visible=True, max_undo=1000, history_size=50, message_history_size=200, autocalc=True, scroll_speed=3, tab_size=1, enter_moves='down', decimal_separator='.', thousands_separator=', ', scripts_dir='', functions_file='', save_cursor=True, theme_overrides=<factory>)[source]

Bases: object

Application-level runtime configuration.

Parameters:
  • autosave (bool)

  • autosave_interval (int)

  • default_col_width (int)

  • theme (str)

  • show_grid_lines (bool)

  • show_row_headers (bool)

  • show_col_headers (bool)

  • formula_bar_visible (bool)

  • status_bar_visible (bool)

  • max_undo (int)

  • history_size (int)

  • message_history_size (int)

  • autocalc (bool)

  • scroll_speed (int)

  • tab_size (int)

  • enter_moves (str)

  • decimal_separator (str)

  • thousands_separator (str)

  • scripts_dir (str)

  • functions_file (str)

  • save_cursor (bool)

  • theme_overrides (dict[str, dict[str, str]])

autosave: bool = False
autosave_interval: int = 300
default_col_width: int = 10
theme: str = 'default'
show_grid_lines: bool = True
show_row_headers: bool = True
show_col_headers: bool = True
formula_bar_visible: bool = True
status_bar_visible: bool = True
max_undo: int = 1000
history_size: int = 50
message_history_size: int = 200
autocalc: bool = True
scroll_speed: int = 3
tab_size: int = 1
enter_moves: str = 'down'
decimal_separator: str = '.'
thousands_separator: str = ','
scripts_dir: str = ''
functions_file: str = ''
save_cursor: bool = True
theme_overrides: dict[str, dict[str, str]]
get_scripts_dir()[source]

Return the resolved scripts directory, creating it if needed.

Return type:

Path

get_functions_file()[source]

Return the resolved path to the auto-load functions registry file.

Return type:

Path

classmethod load(path)[source]

Read configuration from a JSON file, using defaults for missing keys.

Parameters:

path (Path)

Return type:

Config

save(path)[source]

Write current configuration to a JSON file.

Parameters:

path (Path)

Return type:

None

classmethod default_path()[source]

Return the default config file path.

Return type:

Path

__init__(autosave=False, autosave_interval=300, default_col_width=10, theme='default', show_grid_lines=True, show_row_headers=True, show_col_headers=True, formula_bar_visible=True, status_bar_visible=True, max_undo=1000, history_size=50, message_history_size=200, autocalc=True, scroll_speed=3, tab_size=1, enter_moves='down', decimal_separator='.', thousands_separator=', ', scripts_dir='', functions_file='', save_cursor=True, theme_overrides=<factory>)
Parameters:
  • autosave (bool)

  • autosave_interval (int)

  • default_col_width (int)

  • theme (str)

  • show_grid_lines (bool)

  • show_row_headers (bool)

  • show_col_headers (bool)

  • formula_bar_visible (bool)

  • status_bar_visible (bool)

  • max_undo (int)

  • history_size (int)

  • message_history_size (int)

  • autocalc (bool)

  • scroll_speed (int)

  • tab_size (int)

  • enter_moves (str)

  • decimal_separator (str)

  • thousands_separator (str)

  • scripts_dir (str)

  • functions_file (str)

  • save_cursor (bool)

  • theme_overrides (dict[str, dict[str, str]])

Return type:

None