pub struct Options {Show 16 fields
pub tabstop: u32,
pub shiftwidth: u32,
pub expandtab: bool,
pub iskeyword: String,
pub ignorecase: bool,
pub smartcase: bool,
pub hlsearch: bool,
pub incsearch: bool,
pub wrapscan: bool,
pub autoindent: bool,
pub timeout_len: Duration,
pub undo_levels: u32,
pub undo_break_on_motion: bool,
pub readonly: bool,
pub wrap: WrapMode,
pub textwidth: u32,
}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.
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.
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.
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.
Trait Implementations§
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more