pub struct Options {Show 45 fields
pub tabstop: u32,
pub shiftwidth: u32,
pub expandtab: bool,
pub softtabstop: u32,
pub iskeyword: String,
pub ignorecase: bool,
pub smartcase: bool,
pub hlsearch: bool,
pub incsearch: bool,
pub wrapscan: bool,
pub autoindent: bool,
pub smartindent: bool,
pub timeout_len: Duration,
pub undo_levels: u32,
pub undo_break_on_motion: bool,
pub readonly: bool,
pub wrap: WrapMode,
pub textwidth: u32,
pub number: bool,
pub relativenumber: bool,
pub numberwidth: usize,
pub cursorline: bool,
pub cursorcolumn: bool,
pub signcolumn: SignColumnMode,
pub foldcolumn: u32,
pub colorcolumn: String,
pub formatoptions: String,
pub filetype: String,
pub scrolloff: usize,
pub sidescrolloff: usize,
pub modeline: bool,
pub modelines: u32,
pub autoreload: bool,
pub motion_sneak: bool,
pub list: bool,
pub listchars: ListChars,
pub indent_guides: bool,
pub indent_guide_char: char,
pub colorizer: bool,
pub colorizer_filetypes: Vec<String>,
pub format_on_save: bool,
pub trim_trailing_whitespace: bool,
pub rainbow_brackets: bool,
pub updatetime: u32,
pub matchparen: bool,
}Expand description
Editor settings surfaced via :set. Per SPEC. Consumed once trait
extraction lands; today’s legacy Settings (in [crate::editor])
continues to drive runtime behaviour.
Fields§
§tabstop: u32Display width of \t for column math + render. Default 8.
shiftwidth: u32Spaces per shift step (>>, <<, Ctrl-T, Ctrl-D).
expandtab: boolInsert spaces (true) or literal \t (false) for the Tab key.
softtabstop: u32Soft tab stop in spaces. When > 0, the Tab key (with expandtab)
inserts spaces to the next softtabstop boundary, and Backspace at
the end of a softtabstop-aligned space run deletes the whole run.
0 disables softtabstop semantics. Matches vim’s :set softtabstop.
iskeyword: StringCharacters considered part of a “word” for w/b/*/#.
Default "@,48-57,_,192-255" (ASCII letters, digits, _, plus
extended Latin); host may override per language.
ignorecase: boolDefault false: search is case-sensitive.
smartcase: boolWhen true and ignorecase is true, an uppercase letter in the
pattern flips back to case-sensitive for that search.
hlsearch: boolHighlight all matches of the last search.
incsearch: boolIncrementally highlight matches while typing the search pattern.
wrapscan: boolWrap searches around the buffer ends.
autoindent: boolCopy previous line’s leading whitespace on Enter in insert mode.
smartindent: boolWhen true, bump indent by one shiftwidth after a line ending in
{ / ( / [, and strip one indent unit when the user types the
matching } / ) / ] on an otherwise-whitespace-only line.
Supersedes autoindent’s plain copy when on. Future: a
tree-sitter indents.scm provider will replace the heuristic; see
compute_enter_indent in vim.rs for the plug-in point.
timeout_len: DurationMulti-key sequence timeout (e.g., <C-w>v). Vim’s timeoutlen.
undo_levels: u32Maximum undo-tree depth. Older entries pruned.
undo_break_on_motion: boolBreak the current undo group on cursor motion in insert mode. Matches vim default; turn off to merge multi-segment edits.
readonly: boolReject every edit. :set ro sets this; :w! clears it.
wrap: WrapModeSoft-wrap behavior for lines that exceed the viewport width.
Maps directly to :set wrap / :set linebreak / :set nowrap.
textwidth: u32Wrap column for gq{motion} text reflow. Vim’s default is 79.
number: boolShow absolute line numbers in the gutter. Matches :set number.
Default true.
relativenumber: boolShow relative line offsets in the gutter. Combined with number,
enables hybrid mode. Matches :set relativenumber. Default false.
numberwidth: usizeMinimum gutter width in cells for the line-number column.
Width grows past this to fit the largest displayed number.
Matches vim’s :set numberwidth / :set nuw. Default 4. Range 1..=20.
cursorline: boolHighlight the row where the cursor sits. Matches vim’s :set cursorline.
Default true (hjkl diverges from vim’s false — improves visual
orientation, matches most modern editor defaults).
cursorcolumn: boolHighlight the column where the cursor sits. Matches vim’s :set cursorcolumn.
Default false.
signcolumn: SignColumnModeWhether to reserve a 1-cell sign column for diagnostics and git signs.
Matches vim’s :set signcolumn. Default SignColumnMode::Auto.
foldcolumn: u32Number of cells reserved for a fold-marker gutter (0 = none, max 12).
Matches vim’s :set foldcolumn. Default 0.
colorcolumn: StringComma-separated 1-based column indices for vertical rulers.
Empty string = no rulers. Matches vim’s :set colorcolumn. Default "".
formatoptions: StringFormat-options flags (subset of vim’s formatoptions / fo).
r — auto-continue line comments on <Enter> in insert mode.
o — auto-continue line comments on o / O in normal mode.
Default "ro" (both on).
filetype: StringActive filetype for the current buffer (e.g. "rust", "python").
Matches vim’s :set filetype / :set ft. Default "" (plain text).
scrolloff: usizeMinimum number of context rows kept visible above and below the cursor
when scrolling. 999 (or any value ≥ half the viewport height) keeps
the cursor centred. 0 disables the margin. Matches vim’s
:set scrolloff / :set so. Default 5.
sidescrolloff: usizeMinimum number of context columns kept visible left and right of the
cursor when scrolling horizontally (no-wrap mode only). 0 disables.
Matches vim’s :set sidescrolloff / :set siso. Default 0.
modeline: boolEnable vim modeline parsing on file open. When true, hjkl scans
the first/last modelines lines for vim: / ex: / vi: markers
and applies per-buffer option overrides. Matches vim’s :set modeline.
Default true.
modelines: u32Number of lines from each end to scan for vim modelines.
Matches vim’s :set modelines. Default 5.
autoreload: boolAuto-reload a clean (non-dirty) buffer when its file changes on disk
(detected by :checktime / focus-regain). When false, an external
change is reported as a warning and the buffer is left untouched.
Matches vim’s :set autoread. Default true.
motion_sneak: boolEnable vim-sneak style two-char digraph jump on s / S in normal
mode. When true (default), s/S operate as sneak jumps rather
than vim’s built-in substitute-char / substitute-line.
:set nomotion_sneak reverts to standard vim behavior.
Default true — BREAKING for users relying on s = substitute-char.
list: boolRender invisible characters (tabs, trailing spaces, EOL markers).
Matches vim’s :set list / :set nolist. Default false.
listchars: ListCharsCharacters used to represent invisibles when list is on.
Matches vim’s :set listchars / :set lcs.
Default matches vim: tab:^I,eol:$.
indent_guides: boolRender thin vertical indent guides at every shiftwidth-aligned
column in the viewport. hjkl-specific option. Default true.
:set noindent_guides / :set noig disables.
indent_guide_char: charCharacter painted as the indent guide. Default '│'.
:set indent_guide_char=<char> / :set igc=<char> to customize.
colorizer: boolEnable inline color-literal preview (hex, rgb, hsl, named CSS colors).
hjkl-specific. Default true.
:set nocolorizer disables globally regardless of filetype.
colorizer_filetypes: Vec<String>Allowlist of filetypes for which the colorizer runs.
Comma-separated in :set colorizer_filetypes=css,scss,toml.
Default: ["css","scss","sass","less","html","vue","svelte","tailwindcss","toml","lua","vim"].
format_on_save: boolRun the registered hjkl-mangler formatter for the buffer’s path before
each :w save. On formatter error the save is aborted. When no formatter
is registered for the file extension, or the tool is not installed, the
save proceeds without formatting (warn-and-fall-through for missing tool).
hjkl-specific. Alias fos. Default false.
trim_trailing_whitespace: boolStrip trailing [ \t] from every line in the buffer before each :w
save. Applied in-place so post-save :e reflects the trimmed content.
hjkl-specific. Alias tts. Default false.
rainbow_brackets: boolEnable helix-style rainbow bracket coloring via tree-sitter.
hjkl-specific. Alias rb. Default true.
updatetime: u32Milliseconds of inactivity after which the swap file is written.
Matches Vim’s :set updatetime / :set ut. Default 4000.
hjkl-specific swap-file write cadence; does NOT affect CursorHold.
matchparen: boolHighlight matching bracket pair under the cursor (vim matchparen).
When true (default), both the bracket under the cursor and its
matching partner are highlighted with the match_paren theme style.
C-style brackets only: ()[]{} and <>. Alias mps.
:set nomatchparen disables. hjkl-specific.
Implementations§
Source§impl Options
impl Options
Sourcepub fn set_by_name(
&mut self,
name: &str,
val: OptionValue,
) -> Result<(), EngineError>
pub fn set_by_name( &mut self, name: &str, val: OptionValue, ) -> Result<(), EngineError>
Set an option by name. Vim-flavored option naming. Returns
EngineError::Ex for unknown names or type-mismatched values.
Booleans accept OptionValue::Bool(_) directly or
OptionValue::Int(0)/Int(non_zero). Integers accept only
Int(_). Strings accept only String(_).
Sourcepub fn get_by_name(&self, name: &str) -> Option<OptionValue>
pub fn get_by_name(&self, name: &str) -> Option<OptionValue>
Read an option by name. None for unknown names.