summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/options.lua
AgeCommit message (Collapse)AuthorFiles
2025-07-11vim-patch:9.1.1535: the maximum search count uses hard-coded value 99 (#34873)zeertzjq1
Problem: The maximum search count uses a hard-coded value of 99 (Andres Monge, Joschua Kesper) Solution: Make it configurable using the 'maxsearchcount' option. related: vim/vim#8855 fixes: vim/vim#17527 closes: vim/vim#17695 https://github.com/vim/vim/commit/b7b7fa04bf79f2f13ed6e789b76262753da31dde Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-07-09feat(option): custom chars in 'winborder' #33772glepnir1
Problem: winborder option only supported predefined styles and lacked support for custom border characters. Solution: implement parsing for comma-separated list format that allows specifying 8 individual border characters (topleft, top, topright, right, botright, bottom, botleft, left).
2025-07-09vim-patch:9.1.1526: completion: search completion match may differ in casezeertzjq1
Problem: completion: search completion match may differ in case (techntools) Solution: add "exacttext" to 'wildoptions' value (Girish Palya) This flag does the following: exacttext When this flag is present, search pattern completion (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|) shows exact buffer text as menu items, without preserving regex artifacts like position anchors (e.g., |/\<|). This provides more intuitive menu items that match the actual buffer text. However, searches may be less accurate since the pattern is not preserved exactly. By default, Vim preserves the typed pattern (with anchors) and appends the matched word. This preserves search correctness, especially when using regular expressions or with 'smartcase' enabled. However, the case of the appended matched word may not exactly match the case of the word in the buffer. fixes: vim/vim#17654 closes: vim/vim#17667 https://github.com/vim/vim/commit/93c2d5bf7f01db594a3f5ebecbd5a31dfd411544 Co-authored-by: Girish Palya <girishji@gmail.com>
2025-07-06feat(options): per-buffer 'busy' status #34493Shadman1
Problem: Plugins cannot mark a buffer as "busy". Solution: - Add a buffer-local 'busy' option. - Show a busy indicator in the default 'statusline'.
2025-07-06vim-patch:9.1.1512: completion: can only complete from keyword characters ↵zeertzjq1
(#34798) Problem: completion: can only complete from keyword characters Solution: remove this restriction, allow completion functions when called from i_CTRL-N/i_CTRL-P to be triggered from non-keyword characters (Girish Palya) Previously, functions specified in the `'complete'` option were restricted to starting completion only from keyword characters (as introduced in PR 17065). This change removes that restriction. With this change, user-defined functions (e.g., `omnifunc`, `userfunc`) used in `'complete'` can now initiate completion even when triggered from non-keyword characters. This makes it easier to reuse existing functions alongside other sources without having to consider whether the cursor is on a keyword or non-keyword character, or worry about where the replacement should begin (i.e., the `findstart=1` return value). The logic for both the “collection” and “filtering” phases now fully respects each source’s specified start column. This also extends to fuzzy matching, making completions more predictable. Internally, this builds on previously merged infrastructure that tracks per-source metadata. This PR focuses on applying that metadata to compute the leader string and insertion text appropriately for each match. Also, a memory corruption has been fixed in prepare_cpt_compl_funcs(). closes: vim/vim#17651 https://github.com/vim/vim/commit/ba11e78f1d5342786faed0ebd5b09ffee7f7ff86 Co-authored-by: Girish Palya <girishji@gmail.com>
2025-07-05vim-patch:9.1.1490: 'wildchar' does not work in search contextszeertzjq1
Problem: 'wildchar' does not work in search contexts Solution: implement search completion when 'wildchar' is typed (Girish Palya). This change enhances Vim's command-line completion by extending 'wildmode' behavior to search pattern contexts, including: - '/' and '?' search commands - ':s', ':g', ':v', and ':vim' commands Completions preserve the exact regex pattern typed by the user, appending the completed word directly to the original input. This ensures that all regex elements — such as '<', '^', grouping brackets '()', wildcards '\*', '.', and other special characters — remain intact and in their original positions. --- **Use Case** While searching (using `/` or `?`) for lines containing a pattern like `"foobar"`, you can now type a partial pattern (e.g., `/f`) followed by a trigger key (`wildchar`) to open a **popup completion menu** showing all matching words. This offers two key benefits: 1. **Precision**: Select the exact word you're looking for without typing it fully. 2. **Memory aid**: When you can’t recall a full function or variable name, typing a few letters helps you visually identify and complete the correct symbol. --- **What’s New** Completion is now supported in the following contexts: - `/` and `?` search commands - `:s`, `:g`, `:v`, and `:vimgrep` ex-commands --- **Design Notes** - While `'wildchar'` (usually `<Tab>`) triggers completion, you'll have to use `<CTRL-V><Tab>` or "\t" to search for a literal tab. - **Responsiveness**: Search remains responsive because it checks for user input frequently. --- **Try It Out** Basic setup using the default `<Tab>` as the completion trigger: ```vim set wim=noselect,full wop=pum wmnu ``` Now type: ``` /foo<Tab> ``` This opens a completion popup for matches containing "foo". For matches beginning with "foo" type `/\<foo<Tab>`. --- **Optional: Autocompletion** For automatic popup menu completion as you type in search or `:` commands, include this in your `.vimrc`: ```vim vim9script set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu autocmd CmdlineChanged [:/?] CmdComplete() def CmdComplete() var [cmdline, curpos, cmdmode] = [getcmdline(), getcmdpos(), expand('<afile>') == ':'] var trigger_char = '\%(\w\|[*/:.-]\)$' var not_trigger_char = '^\%(\d\|,\|+\|-\)\+$' # Exclude numeric range if getchar(1, {number: true}) == 0 # Typehead is empty, no more pasted input && !wildmenumode() && curpos == cmdline->len() + 1 && (!cmdmode || (cmdline =~ trigger_char && cmdline !~ not_trigger_char)) SkipCmdlineChanged() feedkeys("\<C-@>", "t") timer_start(0, (_) => getcmdline()->substitute('\%x00', '', 'ge')->setcmdline()) # Remove <C-@> endif enddef def SkipCmdlineChanged(key = ''): string set ei+=CmdlineChanged timer_start(0, (_) => execute('set ei-=CmdlineChanged')) return key == '' ? '' : ((wildmenumode() ? "\<C-E>" : '') .. key) enddef **Optional: Preserve history recall behavior** cnoremap <expr> <Up> SkipCmdlineChanged("\<Up>") cnoremap <expr> <Down> SkipCmdlineChanged("\<Down>") **Optional: Customize popup height** autocmd CmdlineEnter : set bo+=error | exec $'set ph={max([10, winheight(0) - 4])}' autocmd CmdlineEnter [/?] set bo+=error | set ph=8 autocmd CmdlineLeave [:/?] set bo-=error ph& ``` closes: vim/vim#17570 https://github.com/vim/vim/commit/6b49fba8c8b97b178ddf81a9ca0c6f36c66f942f Co-authored-by: Girish Palya <girishji@gmail.com>
2025-07-04feat(pack): add built-in plugin manager `vim.pack`Evgeni Chasnovski1
Problem: No built-in plugin manager Solution: Add built-in plugin manager Co-authored-by: Lewis Russell <lewis6991@gmail.com>
2025-07-04vim-patch:9.1.1507: symlinks are resolved on :cd commands (#34758)glepnir1
Problem: File paths change from symlink to target path after :cd command when editing files through symbolic links Solution: Add "~" flag to 'cpoptions' to control symlink resolution. When not included (default), symlinks are resolved maintaining backward compatibility. When included, symlinks are preserved providing the improved behavior. (glepnir) related: neovim/neovim#15695 closes: vim/vim#17628 https://github.com/vim/vim/commit/4ade668fb62ebf3f8be537fe451caed6bd1eba9a
2025-06-29fix(exrc): exrc knows its own location (#34638)Yochem van Rosmalen1
fix(exrc): lua exrc files know their location Problem: 'exrc' files are inherently bound to their location / workspace and therefore require to "know" their location on the filesystem. However, currently using `debug.getinfo(1, 'S')` returns `"<nvim>"`. Solution: Include the filepath as chunkname in `loadstring()` and `nlua_exec()`.
2025-06-16vim-patch:631a50c: runtime(doc): mention cannot ignored events in ↵zeertzjq1
eventignorewin (#34522) closes: vim/vim#17545 https://github.com/vim/vim/commit/631a50ceb9a312a9042a8e8420afd8e948497d90 Co-authored-by: glepnir <glephunter@gmail.com>
2025-06-16docs(meta): fix incorrect bar -> backtick replacement (#34520)zeertzjq1
2025-06-13vim-patch:91af4c4: runtime(doc): improve the wording of 'sts', 'varts' and ↵zeertzjq1
'varsts' values (#34480) closes: vim/vim#17522 https://github.com/vim/vim/commit/91af4c41809c4089d15857c1be13315b1969ea3b Co-authored-by: Damien Lejay <damien@lejay.be> Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-06-12vim-patch:053aee0: runtime(doc): add more pointers to 'completeopt' (#34460)zeertzjq1
Before this commit, I had trouble finding information about configuring the insert mode completion. In particular, it was not clear that the 'wildopt' config that I already had in my vimrc does not apply here. Also, `insert.txt` barely mentioned 'completeopt' except when describing popups (I was more interested in bash-like behavior where the unique prefix of all completions is completed first). I'm hoping these edits will make the relevant docs easier to find. closes: vim/vim#17515 https://github.com/vim/vim/commit/053aee01f7374fc8c985300399b1ad3b3626e40f Co-authored-by: Ilya Grigoriev <ilyagr@users.noreply.github.com>
2025-06-10vim-patch:bfa1636: runtime(doc): update documentation on tabstop settings ↵zeertzjq1
(#34433) Unify the treatment of tabstop, correct errors and deprecate smarttab usage. closes: vim/vim#17444 https://github.com/vim/vim/commit/bfa16364f104f336fc7407ee4533ae9045f040c4 Co-authored-by: Damien Lejay <damien@lejay.be>
2025-06-08vim-patch:partial:8f7256a (#34368)zeertzjq1
vim-patch:partial:8f7256a: runtime(doc): fix some style issues and remove obsolete docs https://github.com/vim/vim/commit/8f7256a5ee5b827722de4e7524da1c2adb68bbae Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-06-05vim-patch:d6c9ac9: runtime(doc): clarify the effect of 'smarttab'zeertzjq1
closes: vim/vim#17426 https://github.com/vim/vim/commit/d6c9ac97a009f7099b7d3636548aa3a4fabb5f1a Co-authored-by: Damien Lejay <damien@lejay.be>
2025-06-02vim-patch:bfeefc4: runtime(doc): clarify the effect of exclusive single char ↵zeertzjq1
selections (#34289) closes: vim/vim#17410 https://github.com/vim/vim/commit/bfeefc474a3ed25852491a93e1e5610774f4de8c Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-06-03vim-patch:9.1.1409: using f-flag in 'complete' conflicts with Neovimzeertzjq1
Problem: using f-flag in 'complete' conflicts with Neovims filename completion (glepnir, after v9.1.1301). Solution: use upper-case "F" flag for completion functions (Girish Palya). fixes: vim/vim#17347 closes: vim/vim#17378 https://github.com/vim/vim/commit/14f6da5ba8d602263fc7bf6cb899c8520f4c3060 Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03vim-patch:fa8b7db: runtime(doc): tweak documentation style in options.txtzeertzjq1
closes: vim/vim#17229 https://github.com/vim/vim/commit/fa8b7db99afad9074e4e1f89b49046836ac61d5b Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-06-03vim-patch:9.1.1311: completion: not possible to limit number of matcheszeertzjq1
Problem: completion: not possible to limit number of matches Solution: allow to limit the matches for 'complete' sources by using the "{flag}^{limit}" notation (Girish Palya) This change extends the 'complete' option to support limiting the number of matches returned from individual completion sources. **Rationale:** In large files, certain sources (such as the current buffer) can generate an overwhelming number of matches, which may cause more relevant results from other sources (e.g., LSP or tags) to be pushed out of view. By specifying per-source match limits, the completion menu remains balanced and diverse, improving visibility and relevance of suggestions. A caret (`^`) followed by a number can be appended to a source flag to specify the maximum number of matches for that source. For example: ``` :set complete=.^9,w,u,t^5 ``` In this configuration: - The current buffer (`.`) will return up to 9 matches. - The tag completion (`t`) will return up to 5 matches. - Other sources (`w`, `u`) are not limited. This feature is fully backward-compatible and does not affect behavior when the `^count` suffix is not used. The caret (`^`) was chosen as the delimiter because it is least likely to appear in file names. closes: vim/vim#17087 https://github.com/vim/vim/commit/0ac1eb3555445f4c458c06cef7c411de1c8d1020 Cherry-pick test_options.vim change from patch 9.1.1325. Co-authored-by: Girish Palya <girishji@gmail.com>
2025-06-03vim-patch:9.1.1301: completion: cannot configure completion functions with ↵zeertzjq1
'complete' Problem: completion: cannot configure completion functions with 'complete' Solution: add support for setting completion functions using the f and o flag for 'complete' (Girish Palya) This change adds two new values to the `'complete'` (`'cpt'`) option: - `f` – invokes the function specified by the `'completefunc'` option - `f{func}` – invokes a specific function `{func}` (can be a string or `Funcref`) These new flags extend keyword completion behavior (e.g., via `<C-N>` / `<C-P>`) by allowing function-based sources to participate in standard keyword completion. **Key behaviors:** - Multiple `f{func}` values can be specified, and all will be called in order. - Functions should follow the interface defined in `:help complete-functions`. - When using `f{func}`, escaping is required for spaces (with `\`) and commas (with `\\`) in `Funcref` names. - If a function sets `'refresh'` to `'always'`, it will be re-invoked on every change to the input text. Otherwise, Vim will attempt to reuse and filter existing matches as the input changes, which matches the default behavior of other completion sources. - Matches are inserted at the keyword boundary for consistency with other completion methods. - If finding matches is time-consuming, `complete_check()` can be used to maintain responsiveness. - Completion matches are gathered in the sequence defined by the `'cpt'` option, preserving source priority. This feature increases flexibility of standard completion mechanism and may reduce the need for external completion plugins for many users. **Examples:** Complete matches from [LSP](https://github.com/yegappan/lsp) client. Notice the use of `refresh: always` and `function()`. ```vim set cpt+=ffunction("g:LspCompletor"\\,\ [5]). # maxitems = 5 def! g:LspCompletor(maxitems: number, findstart: number, base: string): any if findstart == 1 return g:LspOmniFunc(findstart, base) endif return {words: g:LspOmniFunc(findstart, base)->slice(0, maxitems), refresh: 'always'} enddef autocmd VimEnter * g:LspOptionsSet({ autoComplete: false, omniComplete: true }) ``` Complete matches from `:iabbrev`. ```vim set cpt+=fAbbrevCompletor def! g:AbbrevCompletor(findstart: number, base: string): any if findstart > 0 var prefix = getline('.')->strpart(0, col('.') - 1)->matchstr('\S\+$') if prefix->empty() return -2 endif return col('.') - prefix->len() - 1 endif var lines = execute('ia', 'silent!') if lines =~? gettext('No abbreviation found') return v:none # Suppresses warning message endif var items = [] for line in lines->split("\n") var m = line->matchlist('\v^i\s+\zs(\S+)\s+(.*)$') if m->len() > 2 && m[1]->stridx(base) == 0 items->add({ word: m[1], info: m[2], dup: 1 }) endif endfor return items->empty() ? v:none : items->sort((v1, v2) => v1.word < v2.word ? -1 : v1.word ==# v2.word ? 0 : 1) enddef ``` **Auto-completion:** Vim's standard completion frequently checks for user input while searching for new matches. It is responsive irrespective of file size. This makes it well-suited for smooth auto-completion. You can try with above examples: ```vim set cot=menuone,popup,noselect inf autocmd TextChangedI * InsComplete() def InsComplete() if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$' SkipTextChangedIEvent() feedkeys("\<c-n>", "n") endif enddef inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedIEvent()<cr><c-e> def SkipTextChangedIEvent(): string # Suppress next event caused by <c-e> (or <c-n> when no matches found) set eventignore+=TextChangedI timer_start(1, (_) => { set eventignore-=TextChangedI }) return '' enddef ``` closes: vim/vim#17065 https://github.com/vim/vim/commit/cbe53191d01926c045a39198b3a9517e3c5077d2 Temporarily remove bufname completion with #if 0 to make merging easier. Co-authored-by: Girish Palya <girishji@gmail.com> Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: glepnir <glephunter@gmail.com>
2025-06-02vim-patch:95ea0b0: runtime(doc): make 'shiftwidth' setting more precise (#34266)zeertzjq1
closes: vim/vim#17414 https://github.com/vim/vim/commit/95ea0b0f8de4ab6e13bf090f33b8cbfe5b6e5c9f Co-authored-by: Damien Lejay <damien@lejay.be>
2025-05-31vim-patch:9.1.1419: It is difficult to ignore all but some events (#34245)luukvbaal1
Problem: It is difficult to ignore all but some events. Solution: Add support for a "-" prefix syntax in '(win)eventignore' that subtracts an event from the ignored set if present (Luuk van Baal). https://github.com/vim/vim/commit/8cc6d8b187d53c70c5fdc8fb83d4d3cef35e6d44
2025-05-31vim-patch:a4a3f71: runtime(doc): clarify tabstop settings and guidancezeertzjq1
closes: vim/vim#17381 https://github.com/vim/vim/commit/a4a3f712e250299bb788a1de9c7557ba0de92f06 Co-authored-by: Damien Lejay <damien@lejay.be> Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com> Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-28vim-patch:9.1.1408: not easily possible to complete from register content ↵glepnir1
(#34198) Problem: not easily possible to complete from register content Solution: add register-completion submode using i_CTRL-X_CTRL-R (glepnir) closes: vim/vim#17354 https://github.com/vim/vim/commit/0546068aaef2b1a40faa2945ef7eba249739f219
2025-05-27vim-patch:a6172f8: runtime(doc): Correct allowed characters at :help 'filetype'zeertzjq1
closes: vim/vim#17366 https://github.com/vim/vim/commit/a6172f8c5ce136d877965bf49881fc6e71ea4edf Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-20feat(exrc): stop searching in parent directories by unsetting 'exrc'Yochem van Rosmalen1
Problem: No way for a user to limit 'exrc' search in parent directories (compare editorconfig.root). Solution: A configuration file can unset 'exrc', disabling the search for its parent directories.
2025-05-17vim-patch:9.1.1396: 'grepformat' is a global option (#34060)zeertzjq1
Problem: The 'grepformat' option is global option, but it would be useful to have it buffer-local, similar to 'errorformat' and other quickfix related options (Dani Dickstein) Solution: Add the necessary code to support global-local 'grepformat', allowing different buffers to parse different grep output formats (glepnir) fixes: vim/vim#17316 closes: vim/vim#17315 https://github.com/vim/vim/commit/7b9eb6389d693dafcd502cda2ffc62564a2dbba9 Co-authored-by: glepnir <glephunter@gmail.com>
2025-05-11feat(exrc): search in parent directories (#33889)Yochem van Rosmalen1
feat(exrc): search exrc in parent directories Problem: `.nvim.lua` is only loaded from current directory, which is not flexible when working from a subfolder of the project. Solution: Also search parent directories for configuration file.
2025-05-10vim-patch:0553f2f: runtime(doc): clarify single/multibyte support for ↵zeertzjq1
'fillchars' (#33941) closes: vim/vim#17287 https://github.com/vim/vim/commit/0553f2ff0d170db3f4649a7aaa74b635b1101eed Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-05-09vim-patch:9.1.1374: completion: 'smartcase' not respected when filtering matcheszeertzjq1
Problem: Currently, 'smartcase' is respected when completing keywords using <C-N>, <C-P>, <C-X><C-N>, and <C-X><C-P>. However, when a user continues typing and the completion menu is filtered using cached matches, 'smartcase' is not applied. This leads to poor-quality or irrelevant completion suggestions, as shown in the example below. Solution: When filtering cached completion items after typing additional characters, apply case-sensitive comparison if 'smartcase' is enabled and the typed pattern includes uppercase characters. This ensures consistent and expected completion behavior. (Girish Palya) closes: vim/vim#17271 https://github.com/vim/vim/commit/dc314053e121b0a995bdfbcdd2f03ce228e14eb3 Co-authored-by: Girish Palya <girishji@gmail.com>
2025-05-01vim-patch:fb08192: runtime(doc): clarify the use of 'tagfunc', update a ↵zeertzjq1
comment in tags.c related: vim/vim#17228 https://github.com/vim/vim/commit/fb08192ca75344d6467f9e7f9b9e6d4509df308a Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-01vim-patch:partial:fa8b7db: runtime(doc): tweak documentation style in ↵zeertzjq1
options.txt closes: vim/vim#17229 https://github.com/vim/vim/commit/fa8b7db99afad9074e4e1f89b49046836ac61d5b Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-04-29Merge pull request #33667 from glepnir/vim-9.1.1341zeertzjq1
vim-patch: 9.1.{1341,1344}
2025-04-29vim-patch:ffc89e4 runtime(doc): clarify complete_match() and 'isexpand' optionglepnir1
clarify complete_match() documentation to better explain its backward search behavior, argument handling, and return value format and add an example of isexpand closes: https://github.com/vim/vim/pull/17212 https://github.com/vim/vim/commit/ffc89e47d014178bcd0a681ff2c8e18470cc972b
2025-04-27Merge #33542 shada improvementsJustin M. Keyes1
* feat(shada): don't store jumplist if '0 in 'shada' * fix(shada): don't store search and sub patterns if /0 in 'shada' * fix(shada): don't store empty replacement string * fix(shada): don't add '0' mark if f0 in 'shada'
2025-04-27docs: lsp, emoji, startup #33446Justin M. Keyes1
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
2025-04-27feat(shada): don't store jumplist if '0 in 'shada'Andre Toerien1
2025-04-27vim-patch:9.1.1341: cannot define completion triggersglepnir1
Problem: Cannot define completion triggers and act upon it Solution: add the new option 'isexpand' and add the complete_match() function to return the completion matches according to the 'isexpand' setting (glepnir) Currently, completion trigger position is determined solely by the 'iskeyword' pattern (\k\+$), which causes issues when users need different completion behaviors - such as triggering after '/' for comments or '.' for methods. Modifying 'iskeyword' to include these characters has undesirable side effects on other Vim functionality that relies on keyword definitions. Introduce a new buffer-local option 'isexpand' that allows specifying different completion triggers and add the complete_match() function that finds the appropriate start column for completion based on these triggers, scanning backwards from cursor position. This separation of concerns allows customized completion behavior without affecting iskeyword-dependent features. The option's buffer-local nature enables per-filetype completion triggers. closes: vim/vim#16716 https://github.com/vim/vim/commit/bcd5995b40a1c26e735bc326feb2e3ac4b05426b Co-authored-by: glepnir <glephunter@gmail.com>
2025-04-21feat(options): default statusline expression #33036Shadman1
Problem: Default 'statusline' is implemented in C and not representable as a statusline expression. This makes it hard for user configs/plugins to extend it. Solution: - Change the default 'statusline' slightly to a statusline expression. - Remove the C implementation.
2025-04-19vim-patch:2398460: runtime(doc): clarify 'includeexpr' is not used for ↵zeertzjq1
<cfile> (#33540) fixes: vim/vim#17139 https://github.com/vim/vim/commit/23984602327600b7ef28dcedc772949d5c66b57f Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-19vim-patch:cb3b752: runtime(doc): clarify "nearest" value for 'completeopt' ↵zeertzjq1
(#33534) closes: vim/vim#17146 https://github.com/vim/vim/commit/cb3b752f9523060d3feaee33049d2092c288fca2 Co-authored-by: Girish Palya <girishji@gmail.com>
2025-04-18fix(spell): save spell files to stdpath('data')/site/spell #33528Au.1
2025-04-17vim-patch:9.1.1296: completion: incorrect truncation logiczeertzjq1
Problem: completion: incorrect truncation logic (after: v9.1.1284) Solution: replace string allocation with direct screen rendering and fixe RTL/LTR truncation calculations (glepnir) closes: vim/vim#17081 https://github.com/vim/vim/commit/d4dbf822dcb9fd95379bebab85def391e1179b21 Co-authored-by: glepnir <glephunter@gmail.com>
2025-04-17vim-patch:9.1.1284: not possible to configure pum truncation charzeertzjq1
Problem: not possible to configure the completion menu truncation character Solution: add the "trunc" suboption to the 'fillchars' setting to configure the truncation indicator (glepnir). closes: vim/vim#17006 https://github.com/vim/vim/commit/b87620466c6500fb37fd9be1016a27fa9626749a Co-authored-by: glepnir <glephunter@gmail.com>
2025-04-16vim-patch:9.1.1308: completion: cannot order matches by distance to cursor ↵zeertzjq1
(#33491) Problem: During insert-mode completion, the most relevant match is often the one closest to the cursor—frequently just above the current line. However, both `<C-N>` and `<C-P>` tend to rank candidates from the current buffer that appear above the cursor near the bottom of the completion menu, rather than near the top. This ordering can feel unintuitive, especially when `noselect` is active, as it doesn't prioritize the most contextually relevant suggestions. Solution: This change introduces a new sub-option value "nearest" for the 'completeopt' setting. When enabled, matches from the current buffer are prioritized based on their proximity to the cursor position, improving the relevance of suggestions during completion (Girish Palya). Key Details: - Option: "nearest" added to 'completeopt' - Applies to: Matches from the current buffer only - Effect: Sorts completion candidates by their distance from the cursor - Interaction with other options: - Has no effect if the `fuzzy` option is also present This feature is helpful especially when working within large buffers where multiple similar matches may exist at different locations. You can test this feature with auto-completion using the snippet below. Try it in a large file like `vim/src/insexpand.c`, where you'll encounter many potential matches. You'll notice that the popup menu now typically surfaces the most relevant matches—those closest to the cursor—at the top. Sorting by spatial proximity (i.e., contextual relevance) often produces more useful matches than sorting purely by lexical distance ("fuzzy"). Another way to sort matches is by recency, using an LRU (Least Recently Used) cache—essentially ranking candidates based on how recently they were used. However, this is often overkill in practice, as spatial proximity (as provided by the "nearest" option) is usually sufficient to surface the most relevant matches. ```vim set cot=menuone,popup,noselect,nearest inf def SkipTextChangedIEvent(): string # Suppress next event caused by <c-e> (or <c-n> when no matches found) set eventignore+=TextChangedI timer_start(1, (_) => { set eventignore-=TextChangedI }) return '' enddef autocmd TextChangedI * InsComplete() def InsComplete() if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$' SkipTextChangedIEvent() feedkeys("\<c-n>", "n") endif enddef inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedIEvent()<cr><c-e> inoremap <silent><expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>" inoremap <silent><expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>" ``` closes: vim/vim#17076 https://github.com/vim/vim/commit/b156588eb707a084bbff8685953a8892e1e45bca Co-authored-by: Girish Palya <girishji@gmail.com>
2025-04-14vim-patch:f4b1a60: runtime(doc): update options.txt and clarify 'wildmode' ↵zeertzjq1
further related: vim/vim#17100 https://github.com/vim/vim/commit/f4b1a60dd145c8dddd2b6a37699e96772cd69402 Co-authored-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Girish Palya <girishji@gmail.com>
2025-04-14vim-patch:eded336: runtime(doc): Improve 'wildmode' setting desciptionzeertzjq1
closes: vim/vim#17100 https://github.com/vim/vim/commit/eded33621be29b9fdc51466efdc946fa8d3e756f Co-authored-by: Girish Palya <girishji@gmail.com>
2025-04-12feat(defaults): shelltemp=false #33012Alexej Kowalew1
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-04-09vim-patch:9.1.1288: Using wrong window in ll_resize_stack() (#33397)zeertzjq1
Problem: Using wrong window in ll_resize_stack() (after v9.1.1287) Solution: Use "wp" instead of "curwin", even though they are always the same value. Fix typos in documentation (zeertzjq). closes: vim/vim#17080 https://github.com/vim/vim/commit/b71f1309a210bf8f61a24f4eda336de64c6f0a07