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:
objectApplication-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)
- get_scripts_dir()[source]
Return the resolved scripts directory, creating it if needed.
- Return type:
- get_functions_file()[source]
Return the resolved path to the auto-load functions registry file.
- Return type:
- classmethod load(path)[source]
Read configuration from a JSON file, using defaults for missing keys.
- save(path)[source]
Write current configuration to a JSON file.
- Parameters:
path (Path)
- Return type:
None
- __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)
- Return type:
None