pub struct Settings {Show 57 fields
pub shiftwidth: usize,
pub tabstop: usize,
pub ignore_case: bool,
pub smartcase: bool,
pub wrapscan: bool,
pub textwidth: usize,
pub expandtab: bool,
pub softtabstop: usize,
pub wrap: Wrap,
pub readonly: bool,
pub modifiable: bool,
pub autoindent: bool,
pub smartindent: bool,
pub undo_levels: u32,
pub undo_break_on_motion: bool,
pub iskeyword: String,
pub timeout_len: Duration,
pub number: bool,
pub relativenumber: bool,
pub numberwidth: usize,
pub cursorline: bool,
pub cursorcolumn: bool,
pub signcolumn: SignColumnMode,
pub foldcolumn: u32,
pub foldmethod: FoldMethod,
pub foldenable: bool,
pub foldlevelstart: u32,
pub foldmarker: String,
pub colorcolumn: String,
pub formatoptions: String,
pub filetype: String,
pub commentstring: String,
pub makeprg: String,
pub errorformat: String,
pub autopair: bool,
pub autoclose_tag: bool,
pub scrolloff: usize,
pub sidescrolloff: usize,
pub autoreload: bool,
pub motion_sneak: bool,
pub list: bool,
pub tabline_icons: bool,
pub blame_inline: bool,
pub diagnostics_inline: DiagInlineMode,
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,
pub scroll_duration_ms: u16,
pub selection_exclusive: bool,
pub undo_granularity: UndoGranularity,
}Expand description
Vim-style options surfaced by :set. New fields land here as
individual ex commands gain :set plumbing.
Fields§
§shiftwidth: usizeSpaces per shift step for >> / << / Ctrl-T / Ctrl-D.
tabstop: usizeVisual width of a \t character. Stored for future render
hookup; not yet consumed by the buffer renderer.
ignore_case: boolWhen true, / / ? patterns and :s/.../.../ ignore case
without an explicit i flag.
smartcase: boolWhen true and ignore_case is true, an uppercase letter in
the pattern flips that search back to case-sensitive. Matches
vim’s :set smartcase. Default false.
wrapscan: boolWrap searches past buffer ends. Matches vim’s :set wrapscan.
Default true.
textwidth: usizeWrap column for gq{motion} text reflow. Vim’s default is 79.
expandtab: boolWhen true, the Tab key in insert mode inserts tabstop spaces
instead of a literal \t. Matches vim’s :set expandtab.
Default false.
softtabstop: usizeSoft tab stop in spaces. When > 0, Tab inserts spaces to the
next softtabstop boundary (when expandtab), and Backspace at the
end of a softtabstop-aligned space run deletes the entire run as
if it were one tab. 0 disables. Matches vim’s :set softtabstop.
wrap: WrapSoft-wrap mode the renderer + scroll math + gj / gk use.
Default is hjkl_buffer::Wrap::None — long lines extend
past the right edge and top_col clips the left side.
:set wrap flips to char-break wrap; :set linebreak flips
to word-break wrap; :set nowrap resets.
readonly: boolWhen true, the engine drops every edit before it touches the
buffer — undo, dirty flag, and change log all stay clean.
Matches vim’s :set readonly / :set ro. Default false.
modifiable: boolWhen false, ALL buffer modifications are blocked, including entering
insert/replace mode. Matches vim’s :set nomodifiable / :set noma.
Default true.
autoindent: boolWhen true, pressing Enter in insert mode copies the leading
whitespace of the current line onto the new line. Matches vim’s
:set autoindent. Default true (vim parity).
smartindent: boolWhen true, bumps indent by one shiftwidth after a line ending
in { / ( / [, and strips one indent unit when the user types
} / ) / ] on a whitespace-only line. See compute_enter_indent
in vim.rs for the tree-sitter plug-in seam. Default true.
undo_levels: u32Cap on undo-stack length. Older entries are pruned past this
bound. 0 means unlimited. Matches vim’s :set undolevels.
Default 1000.
undo_break_on_motion: boolWhen true, cursor motions inside insert mode break the
current undo group (so a single u only reverses the run of
keystrokes that preceded the motion). Default true.
Currently a no-op — engine doesn’t yet break the undo group
on insert-mode motions; field is wired through :set undobreak for forward compatibility.
iskeyword: StringVim-flavoured “what counts as a word” character class.
Comma-separated tokens: @ = is_alphabetic(), _ = literal
_, 48-57 = decimal char range, bare integer = single char
code, single ASCII punctuation = literal. Default
"@,48-57,_,192-255" matches vim.
timeout_len: DurationMulti-key sequence timeout (e.g. gg, dd). When the user
pauses longer than this between keys, any pending prefix is
abandoned and the next key starts a fresh sequence. Matches
vim’s :set timeoutlen / :set tm (millis). Default 1000ms.
number: boolWhen true, render absolute line numbers in the gutter. Matches
vim’s :set number / :set nu. Default true.
relativenumber: boolWhen true, render line numbers as offsets from the cursor row.
Combined with number, the cursor row shows its absolute number
while other rows show the relative offset (vim’s nu+rnu hybrid).
Matches vim’s :set relativenumber / :set rnu. 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 false.
cursorcolumn: boolHighlight the column where the cursor sits. Matches vim’s :set cursorcolumn.
Default false.
signcolumn: SignColumnModeSign-column display mode. Matches vim’s :set signcolumn.
Default crate::types::SignColumnMode::Auto.
foldcolumn: u32Number of cells reserved for a fold-marker gutter.
Matches vim’s :set foldcolumn. Default 0.
foldmethod: FoldMethodHow folds are automatically generated. Default Expr (tree-sitter).
Alias fdm. Matches vim’s :set foldmethod.
foldenable: boolEnable automatic folds. Default true. Alias fen.
Matches vim’s :set foldenable.
foldlevelstart: u32Level at which auto-folds start open. 99 = all open (default). Alias fls.
Matches vim’s :set foldlevelstart.
foldmarker: StringOpen/close markers for foldmethod=marker, comma-separated open,close.
Matches vim’s :set foldmarker / fmr. Default "{{{,}}}".
colorcolumn: StringComma-separated 1-based column indices for vertical rulers.
Matches vim’s :set colorcolumn. Default "".
formatoptions: StringFormat options flags (subset of vim’s formatoptions).
r — auto-continue line comments on <Enter> in insert mode.
o — auto-continue line comments on o / O in normal mode.
Default: both on ("ro").
filetype: StringActive filetype (language name) for the current buffer.
Used by comment-continuation and future language-aware features.
Matches vim’s :set filetype / :set ft. Default "" (plain text).
commentstring: StringOverride comment-string for the current buffer.
When non-empty, used by toggle_comment_range instead of the
per-filetype default from hjkl_lang::comment::commentstring_for_lang.
Follows vim’s :set commentstring=… — use %s as the text placeholder
(e.g. "// %s") for compatibility; the toggle strips/inserts only the
prefix/suffix portion (before/after %s). An empty string means “use
the filetype default”. Default "".
makeprg: StringProgram run by :make (vim’s makeprg). Its stdout+stderr are parsed
via the errorformat into the quickfix list. Default "cargo check".
errorformat: StringComma-separated list of errorformat patterns used by :cexpr /
:lgetexpr etc. to parse text into quickfix entries. Follows vim’s
'errorformat' / 'efm'. Default: "%f:%l:%c:%m,%f:%l:%m,%l:%c:%m".
autopair: boolWhen true, typing an opening bracket or quote automatically inserts
the matching close character and parks the cursor between them.
Matches vim’s set autopairs (Neovim) / nvim-autopairs behaviour.
Default true.
autoclose_tag: boolWhen true, typing > to close an HTML/XML opening tag automatically
inserts </tagname> after the cursor. Only fires for filetypes in the
HTML/XML family (html, xml, svg, jsx, tsx, vue, svelte).
Matches common editor “autoclose tag” behaviour. Default: true for
those filetypes (the caller gates on filetype), true stored here so
:set noautoclose-tag can disable it globally.
scrolloff: usizeMinimum context rows kept visible above/below the cursor when scrolling.
Capped at (height - 1) / 2 for tiny viewports. 0 = no margin.
Matches vim’s :set scrolloff / :set so. Default 5.
sidescrolloff: usizeMinimum context columns kept visible left/right of the cursor (no-wrap
mode only). 0 = no margin (vim default). Matches :set sidescrolloff.
Default 0.
autoreload: boolAuto-reload a clean buffer when its file changes on disk. Matches vim’s
:set autoread. Default true. Consumed by the host’s :checktime.
motion_sneak: boolEnable vim-sneak style two-char digraph jump via s (forward) and
S (backward). When true (default), s/S no longer behave as
vim’s built-in substitute-char / substitute-line; ;/, smart-fall-
back to sneak-repeat when the last horizontal motion was a sneak.
Set :set nomotion_sneak to revert s/S to stock 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.
tabline_icons: boolShow Nerd-Font filetype icons in the tabline. :set tabline_icons /
:set notabline_icons. Default true.
blame_inline: boolShow inline git blame as end-of-line virtual text on the cursor line
(gitsigns-style). Default true. (#202)
diagnostics_inline: DiagInlineModeInline diagnostic ghost-text mode (Error-Lens style // message at the
end of the line). Default crate::types::DiagInlineMode::All.
listchars: ListCharsCharacters used to represent invisibles when list is on.
Matches vim’s :set listchars / :set lcs.
indent_guides: boolRender thin vertical indent guides at every shiftwidth-aligned
column. hjkl-specific. Default true.
indent_guide_char: charCharacter used to draw indent guides. Default '│'.
colorizer: boolEnable inline color-literal preview. hjkl-specific. Default true.
colorizer_filetypes: Vec<String>Filetype allowlist for the colorizer. Default CSS/template languages.
format_on_save: boolRun hjkl-mangler formatter before each :w save. Default false.
trim_trailing_whitespace: boolStrip trailing whitespace before each :w save. Default false.
rainbow_brackets: boolEnable helix-style rainbow bracket coloring. hjkl-specific. Default true.
updatetime: u32Milliseconds of inactivity before swap-file write. Default 4000.
Matches Vim’s updatetime; alias ut.
matchparen: boolHighlight matching bracket pair under the cursor. hjkl-specific. Default true.
:set nomatchparen / :set mps to toggle. Only the char-scan path
(C-style brackets) is active; tag-pair matching is pending #240.
scroll_duration_ms: u16Smooth-scroll animation duration for page/recenter motions, ms.
:set scroll_duration_ms. Default 0 (instant — animation off).
selection_exclusive: boolWhen true, char-wise Visual selections are treated as
half-open (exclusive end): the cell at the cursor/head position
is NOT included in the selection. This matches VSCode / kakoune
bar-cursor semantics where the caret sits between characters.
Default false (vim inclusive). The vim oracle path must leave this
at false; set it programmatically for VSCode keybinding mode.
undo_granularity: UndoGranularityHow coarsely a single u (or Ctrl+Z) step walks back through
changes made during an insert session.
InsertSession(default, vim parity): one undo step reverts the entire session fromito<Esc>. This is byte-identical to vim’s behaviour and must never be changed for the vim path.Word: mid-session undo breaks are inserted at word boundaries (non-whitespace char following whitespace, or a newline). One step ofuthen reverts roughly one word of typing at a time — matching VSCode’s “edit-chunked Ctrl+Z” experience.
The vim oracle path must leave this at InsertSession.
VSCode keybinding mode sets it to Word via
propagate_vscode_settings. Other future FSMs may choose freely.