pub struct Options {Show 26 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,
}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 "".
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.