diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index bfd22e464e..d904e1c95a 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -289,6 +289,7 @@ runtime/ftplugin/slint.vim @ribru17 runtime/ftplugin/snakemake.vim @ribru17 runtime/ftplugin/solidity.vim @coti-z runtime/ftplugin/solution.vim @dkearns +runtime/ftplugin/soy.vim @ribru17 runtime/ftplugin/spajson.vim @dseomn runtime/ftplugin/spec.vim @ignatenkobrain runtime/ftplugin/squirrel.vim @ribru17 diff --git a/.github/actions/test_artifacts/action.yml b/.github/actions/test_artifacts/action.yml index cbab486c69..e68fec961b 100644 --- a/.github/actions/test_artifacts/action.yml +++ b/.github/actions/test_artifacts/action.yml @@ -3,11 +3,39 @@ description: "Upload failed test artifacts" runs: using: "composite" steps: + - name: Collect matrix properties for naming + uses: actions/github-script@v8 + id: matrix-props + env: + MATRIX_PROPS: ${{ toJSON(matrix) }} + with: + # An array-flattening-to-string JavaScript function. + script: | + const f = function (x) { return x.toString().length > 0; } + const g = function (x) { + return (Array.isArray(x)) + ? x.filter(f) + .map((function (h) { return function (y) { return h(y); }; })(g)) + .join('-') + : x; + } + return Object.values(JSON.parse(process.env.MATRIX_PROPS)) + .filter(f) + .map(g) + .join('-'); + # By default, the JSON-encoded return value of the function is + # set as the "result". + result-encoding: string - name: Upload failed tests uses: actions/upload-artifact@v4 with: # Name of the artifact to upload. - name: GH-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-tests + name: ${{ format('GH-{0}-{1}-{2}-{3}-{4}-failed-tests', + github.run_id, + github.run_attempt, + github.job, + strategy.job-index, + steps.matrix-props.outputs.result) }} # A file, directory or wildcard pattern that describes what # to upload. diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 5969e95e33..ac9e71ae52 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -48,7 +48,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -59,7 +59,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -73,4 +73,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 6131cf5732..39ee2a94c9 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -2714,6 +2714,8 @@ const ft_from_ext = { "hlp": "smcl", "ihlp": "smcl", "smcl": "smcl", + # Soy + "soy": "soy", # Stored Procedures "stp": "stp", # Standard ML diff --git a/runtime/autoload/tutor.vim b/runtime/autoload/tutor.vim index b21e20f814..c3b5df37d9 100644 --- a/runtime/autoload/tutor.vim +++ b/runtime/autoload/tutor.vim @@ -211,7 +211,7 @@ function! tutor#TutorCmd(tutor_name) endif call tutor#SetupVim() - exe "edit ".l:to_open + exe "drop ".l:to_open call tutor#EnableInteractive(v:true) endfunction @@ -225,7 +225,7 @@ endfunction function! tutor#EnableInteractive(enable) let enable = a:enable if enable - setlocal buftype=nofile + setlocal buftype=nowrite setlocal concealcursor+=inv setlocal conceallevel=2 call tutor#ApplyMarks() diff --git a/runtime/autoload/vimcomplete.vim b/runtime/autoload/vimcomplete.vim index d75dfe634d..d95c8b1caa 100644 --- a/runtime/autoload/vimcomplete.vim +++ b/runtime/autoload/vimcomplete.vim @@ -3,7 +3,7 @@ vim9script # Vim completion script # Language: Vim script # Maintainer: Maxim Kim -# Last Change: 2025-08-27 +# Last Change: 2025-10-15 # # Usage: # setlocal omnifunc=vimcomplete#Complete @@ -22,12 +22,15 @@ def GetTrigger(line: string): list result = 'function' elseif line =~ '\v%(^|\s+)\&\k*$' result = 'option' + elseif line =~ '\vse%[t]\s+(\k+\s+)*no\k*$' + result = 'nooption' + result_len = -2 elseif line =~ '[\[(]\s*$' result = 'expression' elseif line =~ '[lvgsb]:\k*$' result = 'var' result_len = 2 - else + elseif line !~ '^\s*$' result = getcompletiontype(line) ?? 'cmdline' endif return [result, result_len] @@ -35,6 +38,7 @@ enddef export def Complete(findstart: number, base: string): any if findstart > 0 + prefix = "" var line = getline('.')->strpart(0, col('.') - 1) var keyword = line->matchstr('\k\+$') var stx = synstack(line('.'), col('.') - 1)->map('synIDattr(v:val, "name")')->join() @@ -57,6 +61,9 @@ export def Complete(findstart: number, base: string): any elseif trigger == 'option' items = getcompletion(base, 'option') ->mapnew((_, v) => ({word: v, kind: 'v', menu: 'Option', dup: 0})) + elseif trigger == 'nooption' + items = getcompletion(base[2 : ], 'option') + ->mapnew((_, v) => ({word: v, kind: 'v', menu: 'Option', dup: 0})) elseif trigger == 'var' items = getcompletion(base, 'var') ->mapnew((_, v) => ({word: v, kind: 'v', menu: 'Variable', dup: 0})) @@ -71,8 +78,11 @@ export def Complete(findstart: number, base: string): any items = commands + functions else try - items = getcompletion(prefix, 'cmdline') - ->mapnew((_, v) => ({word: v->matchstr('\k\+'), kind: 'v', dup: 0})) + # :! and :term completion is very slow on Windows and WSL, disable it there. + if !((has("win32") || has("win32unix") || exists("$WSLENV")) && getcompletiontype(prefix) == 'shellcmd') + items = getcompletion(prefix, 'cmdline') + ->mapnew((_, v) => ({word: v->matchstr('\k\+'), kind: 'v', dup: 0})) + endif catch /E220/ endtry diff --git a/runtime/autoload/vimgoto.vim b/runtime/autoload/vimgoto.vim index 421732ce89..cb41cc7de2 100644 --- a/runtime/autoload/vimgoto.vim +++ b/runtime/autoload/vimgoto.vim @@ -4,9 +4,9 @@ vim9script # Contributers: @lacygoill # Shane-XB-Qian # Andrew Radev -# Last Change: 2025 Sep 21 +# Last Change: 2025 Oct 17 # -# Vim Script to handle jumping to the targets of several types of Vim commands +# Vim script to handle jumping to the targets of several types of Vim commands # (:import, :packadd, :runtime, :colorscheme), and to autoloaded functions of # the style #. # diff --git a/runtime/colors/blue.vim b/runtime/colors/blue.vim index bae46cec0b..5179667f5a 100644 --- a/runtime/colors/blue.vim +++ b/runtime/colors/blue.vim @@ -4,7 +4,7 @@ " Maintainer: Original maintainer Steven Vertigan " URL: https://github.com/vim/colorschemes " License: Same as Vim -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 14 " Generated by Colortemplate v3.0.0-beta10 @@ -95,10 +95,12 @@ hi ModeMsg guifg=#000087 guibg=#00ff00 guisp=NONE gui=NONE ctermfg=18 ctermbg=46 hi MoreMsg guifg=#5fffff guibg=NONE guisp=NONE gui=NONE ctermfg=87 ctermbg=NONE cterm=NONE term=NONE hi NonText guifg=#d787d7 guibg=NONE guisp=NONE gui=NONE ctermfg=176 ctermbg=NONE cterm=NONE term=NONE hi Pmenu guifg=#ffffff guibg=#008787 guisp=NONE gui=NONE ctermfg=231 ctermbg=30 cterm=NONE term=reverse +hi PmenuBorder guifg=#ffffff guibg=#008787 guisp=NONE gui=NONE ctermfg=231 ctermbg=30 cterm=NONE term=NONE hi PmenuMatch guifg=#ffd700 guibg=#008787 guisp=NONE gui=NONE ctermfg=220 ctermbg=30 cterm=NONE term=NONE hi PmenuMatchSel guifg=#ff7f50 guibg=#ffffff guisp=NONE gui=NONE ctermfg=209 ctermbg=231 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=#008787 guibg=#ffffff guisp=NONE gui=NONE ctermfg=30 ctermbg=231 cterm=NONE term=bold +hi PmenuShadow guifg=#008787 guibg=#121212 guisp=NONE gui=NONE ctermfg=30 ctermbg=233 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#ffffff guisp=NONE gui=NONE ctermfg=NONE ctermbg=231 cterm=NONE term=NONE hi PreProc guifg=#00ff00 guibg=NONE guisp=NONE gui=NONE ctermfg=46 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#00ff00 guibg=NONE guisp=NONE gui=NONE ctermfg=46 ctermbg=NONE cterm=NONE term=standout @@ -166,10 +168,12 @@ if s:t_Co >= 16 hi MoreMsg ctermfg=cyan ctermbg=NONE cterm=NONE hi NonText ctermfg=magenta ctermbg=NONE cterm=NONE hi Pmenu ctermfg=black ctermbg=darkcyan cterm=NONE + hi PmenuBorder ctermfg=NONE ctermbg=darkcyan cterm=NONE hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold hi PmenuMatchSel ctermfg=black ctermbg=white cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=white cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE hi PreProc ctermfg=green ctermbg=NONE cterm=NONE hi Question ctermfg=green ctermbg=NONE cterm=NONE @@ -234,10 +238,12 @@ if s:t_Co >= 8 hi MoreMsg ctermfg=cyan ctermbg=NONE cterm=NONE hi NonText ctermfg=magenta ctermbg=NONE cterm=NONE hi Pmenu ctermfg=black ctermbg=cyan cterm=NONE + hi PmenuBorder ctermfg=white ctermbg=darkcyan cterm=NONE hi PmenuMatch ctermfg=black ctermbg=cyan cterm=bold hi PmenuMatchSel ctermfg=black ctermbg=gray cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=gray cterm=NONE + hi PmenuShadow ctermfg=darkcyan ctermbg=black cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE hi PreProc ctermfg=green ctermbg=NONE cterm=NONE hi Question ctermfg=green ctermbg=NONE cterm=NONE diff --git a/runtime/colors/darkblue.vim b/runtime/colors/darkblue.vim index 5b6c834e3f..b490b0599a 100644 --- a/runtime/colors/darkblue.vim +++ b/runtime/colors/darkblue.vim @@ -3,7 +3,7 @@ " Author: Original author Bohdan Vlasyuk " URL: https://github.com/vim/colorschemes " License: Same as Vim -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 14 " Generated by Colortemplate v3.0.0-beta10 @@ -95,10 +95,12 @@ hi ModeMsg guifg=#90fff0 guibg=NONE guisp=NONE gui=NONE ctermfg=123 ctermbg=NONE hi MoreMsg guifg=#006400 guibg=NONE guisp=NONE gui=NONE ctermfg=22 ctermbg=NONE cterm=NONE term=NONE hi NonText guifg=#0030ff guibg=NONE guisp=NONE gui=NONE ctermfg=27 ctermbg=NONE cterm=NONE term=NONE hi Pmenu guifg=#ffffff guibg=#0030ff guisp=NONE gui=NONE ctermfg=231 ctermbg=27 cterm=NONE term=reverse +hi PmenuBorder guifg=NONE guibg=#0030ff guisp=NONE gui=NONE ctermfg=NONE ctermbg=27 cterm=NONE term=NONE hi PmenuMatch guifg=#ff80ff guibg=#0030ff guisp=NONE gui=NONE ctermfg=213 ctermbg=27 cterm=NONE term=NONE hi PmenuMatchSel guifg=#ff00ff guibg=#ffffff guisp=NONE gui=NONE ctermfg=201 ctermbg=231 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=#0030ff guibg=#ffffff guisp=NONE gui=NONE ctermfg=27 ctermbg=231 cterm=NONE term=bold +hi PmenuShadow guifg=#808080 guibg=#000000 guisp=NONE gui=NONE ctermfg=102 ctermbg=233 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#ffffff guisp=NONE gui=NONE ctermfg=NONE ctermbg=231 cterm=NONE term=NONE hi PreProc guifg=#ff80ff guibg=NONE guisp=NONE gui=NONE ctermfg=213 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#90f020 guibg=NONE guisp=NONE gui=NONE ctermfg=118 ctermbg=NONE cterm=NONE term=standout @@ -163,10 +165,12 @@ if s:t_Co >= 16 hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE hi NonText ctermfg=blue ctermbg=NONE cterm=NONE hi Pmenu ctermfg=white ctermbg=blue cterm=NONE + hi PmenuBorder ctermfg=NONE ctermbg=blue cterm=NONE hi PmenuMatch ctermfg=magenta ctermbg=blue cterm=NONE hi PmenuMatchSel ctermfg=darkmagenta ctermbg=white cterm=NONE hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=blue ctermbg=white cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE hi PreProc ctermfg=magenta ctermbg=NONE cterm=NONE hi Question ctermfg=green ctermbg=NONE cterm=NONE @@ -229,10 +233,12 @@ if s:t_Co >= 8 hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE hi NonText ctermfg=blue ctermbg=NONE cterm=NONE hi Pmenu ctermfg=grey ctermbg=blue cterm=NONE + hi PmenuBorder ctermfg=NONE ctermbg=blue cterm=NONE hi PmenuMatch ctermfg=grey ctermbg=blue cterm=bold hi PmenuMatchSel ctermfg=blue ctermbg=grey cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=blue ctermbg=grey cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE hi PreProc ctermfg=darkmagenta ctermbg=NONE cterm=bold hi Question ctermfg=darkgreen ctermbg=NONE cterm=bold diff --git a/runtime/colors/habamax.vim b/runtime/colors/habamax.vim index f09d49628e..ed9fba0651 100644 --- a/runtime/colors/habamax.vim +++ b/runtime/colors/habamax.vim @@ -3,7 +3,7 @@ " Author: Maxim Kim " URL: https://github.com/vim/colorschemes " License: Same as Vim -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 22 " Generated by Colortemplate v3.0.0-beta10 @@ -26,7 +26,7 @@ hi! link LineNrAbove LineNr hi! link LineNrBelow LineNr hi! link MessageWindow Pmenu hi! link Number Constant -hi! link PopupNotification Todo +hi! link PopupNotification Normal hi! link PopupSelected PmenuSel hi! link PreInsert NonText hi! link Quote String @@ -102,6 +102,7 @@ hi ModeMsg guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE c hi MoreMsg guifg=#5faf5f guibg=NONE guisp=NONE gui=NONE ctermfg=71 ctermbg=NONE cterm=NONE term=NONE hi NonText guifg=#585858 guibg=NONE guisp=NONE gui=NONE ctermfg=240 ctermbg=NONE cterm=NONE term=NONE hi Pmenu guifg=NONE guibg=#3a3a3a guisp=NONE gui=NONE ctermfg=NONE ctermbg=237 cterm=NONE term=reverse +hi PmenuBorder guifg=#767676 guibg=#3a3a3a guisp=NONE gui=NONE ctermfg=243 ctermbg=237 cterm=NONE term=NONE hi PmenuExtra guifg=#767676 guibg=#3a3a3a guisp=NONE gui=NONE ctermfg=243 ctermbg=237 cterm=NONE term=NONE hi PmenuExtraSel guifg=#9e9e9e guibg=#585858 guisp=NONE gui=NONE ctermfg=247 ctermbg=240 cterm=NONE term=NONE hi PmenuKind guifg=#5f8787 guibg=#3a3a3a guisp=NONE gui=NONE ctermfg=66 ctermbg=237 cterm=NONE term=NONE @@ -110,6 +111,7 @@ hi PmenuMatch guifg=#ffaf5f guibg=#3a3a3a guisp=NONE gui=NONE ctermfg=215 ctermb hi PmenuMatchSel guifg=#ffaf5f guibg=#585858 guisp=NONE gui=NONE ctermfg=215 ctermbg=240 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#585858 guisp=NONE gui=NONE ctermfg=NONE ctermbg=240 cterm=NONE term=bold +hi PmenuShadow guifg=#767676 guibg=#121212 guisp=NONE gui=NONE ctermfg=243 ctermbg=233 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#767676 guisp=NONE gui=NONE ctermfg=NONE ctermbg=243 cterm=NONE term=NONE hi PreProc guifg=#af875f guibg=NONE guisp=NONE gui=NONE ctermfg=137 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#d7af87 guibg=NONE guisp=NONE gui=NONE ctermfg=180 ctermbg=NONE cterm=NONE term=standout @@ -195,6 +197,7 @@ if s:t_Co >= 16 hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE hi NonText ctermfg=darkgrey ctermbg=NONE cterm=NONE hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse + hi PmenuBorder ctermfg=NONE ctermbg=NONE cterm=reverse hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse @@ -203,6 +206,7 @@ if s:t_Co >= 16 hi PmenuMatchSel ctermfg=darkyellow ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=darkyellow ctermbg=NONE cterm=reverse + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkyellow ctermbg=NONE cterm=NONE hi Question ctermfg=yellow ctermbg=NONE cterm=NONE @@ -275,6 +279,7 @@ if s:t_Co >= 8 hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE hi NonText ctermfg=NONE ctermbg=NONE cterm=NONE hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse + hi PmenuBorder ctermfg=NONE ctermbg=NONE cterm=reverse hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse @@ -283,6 +288,7 @@ if s:t_Co >= 8 hi PmenuMatchSel ctermfg=darkyellow ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=darkyellow ctermbg=NONE cterm=reverse + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkyellow ctermbg=NONE cterm=NONE hi Question ctermfg=darkyellow ctermbg=NONE cterm=NONE diff --git a/runtime/colors/lunaperche.vim b/runtime/colors/lunaperche.vim index 61cab9a4f2..af745e2cf2 100644 --- a/runtime/colors/lunaperche.vim +++ b/runtime/colors/lunaperche.vim @@ -2,7 +2,7 @@ " Description: White(perchè il sole)/Black(la luna perchè?) background colorscheme. " Author: Maxim Kim " URL: https://www.github.com/vim/colorschemes -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 22 " Generated by Colortemplate v3.0.0-beta10 @@ -21,7 +21,7 @@ hi! link LineNrAbove LineNr hi! link LineNrBelow LineNr hi! link MessageWindow PMenu hi! link Number Constant -hi! link PopupNotification Todo +hi! link PopupNotification Normal hi! link PreInsert NonText hi! link StatusLineTerm Statusline hi! link StatusLineTermNC StatuslineNC @@ -142,6 +142,7 @@ if &background == 'dark' hi PmenuMatchSel guifg=#d787d7 guibg=#4e4e4e guisp=NONE gui=NONE ctermfg=176 ctermbg=239 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#4e4e4e guisp=NONE gui=NONE ctermfg=NONE ctermbg=239 cterm=NONE term=bold + hi PmenuShadow guifg=#767676 guibg=#121212 guisp=NONE gui=NONE ctermfg=243 ctermbg=233 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#c6c6c6 guisp=NONE gui=NONE ctermfg=NONE ctermbg=251 cterm=NONE term=NONE hi PreProc guifg=#5fd7d7 guibg=NONE guisp=NONE gui=NONE ctermfg=116 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#ff87ff guibg=NONE guisp=NONE gui=NONE ctermfg=213 ctermbg=NONE cterm=NONE term=standout @@ -236,6 +237,7 @@ if &background == 'dark' hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=cyan ctermbg=NONE cterm=NONE hi Question ctermfg=magenta ctermbg=NONE cterm=NONE @@ -322,6 +324,7 @@ if &background == 'dark' hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold + hi PmenuShadow ctermfg=darkgrey ctermbg=black cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE hi Question ctermfg=darkmagenta ctermbg=NONE cterm=NONE @@ -427,6 +430,7 @@ if &background == 'light' hi PmenuMatchSel guifg=#af00af guibg=#c6c6c6 guisp=NONE gui=NONE ctermfg=127 ctermbg=251 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#c6c6c6 guisp=NONE gui=NONE ctermfg=NONE ctermbg=251 cterm=NONE term=bold + hi PmenuShadow guifg=#767676 guibg=#303030 guisp=NONE gui=NONE ctermfg=243 ctermbg=236 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#767676 guisp=NONE gui=NONE ctermfg=NONE ctermbg=243 cterm=NONE term=NONE hi PreProc guifg=#005f5f guibg=NONE guisp=NONE gui=NONE ctermfg=23 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#af00af guibg=NONE guisp=NONE gui=bold ctermfg=127 ctermbg=NONE cterm=bold term=standout @@ -524,6 +528,7 @@ if &background == 'light' hi PmenuMatchSel ctermfg=darkmagenta ctermbg=darkcyan cterm=NONE hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE hi Question ctermfg=darkmagenta ctermbg=NONE cterm=bold @@ -613,6 +618,7 @@ if &background == 'light' hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold + hi PmenuShadow ctermfg=darkgrey ctermbg=black cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE hi Question ctermfg=darkmagenta ctermbg=NONE cterm=NONE diff --git a/runtime/colors/peachpuff.vim b/runtime/colors/peachpuff.vim index 12654db633..cff502b496 100644 --- a/runtime/colors/peachpuff.vim +++ b/runtime/colors/peachpuff.vim @@ -4,7 +4,7 @@ " Maintainer: Original maintainer David Ne\v{c}as (Yeti) " URL: https://github.com/vim/colorschemes " License: Same as Vim -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 14 " Generated by Colortemplate v3.0.0-beta10 @@ -60,10 +60,12 @@ hi ModeMsg guifg=#000000 guibg=#ffdab9 guisp=NONE gui=bold ctermfg=16 ctermbg=22 hi MoreMsg guifg=#2e8b57 guibg=#ffdab9 guisp=NONE gui=bold ctermfg=29 ctermbg=223 cterm=bold term=NONE hi NonText guifg=#737373 guibg=NONE guisp=NONE gui=NONE ctermfg=243 ctermbg=NONE cterm=NONE term=NONE hi Pmenu guifg=#000000 guibg=#ffaf87 guisp=NONE gui=NONE ctermfg=16 ctermbg=216 cterm=NONE term=reverse +hi PmenuBorder guifg=#5f5f5f guibg=#ffaf87 guisp=NONE gui=NONE ctermfg=59 ctermbg=216 cterm=NONE term=NONE hi PmenuMatch guifg=#a52a2a guibg=#ffaf87 guisp=NONE gui=NONE ctermfg=124 ctermbg=216 cterm=NONE term=NONE hi PmenuMatchSel guifg=#a52a2a guibg=#f5c195 guisp=NONE gui=bold ctermfg=124 ctermbg=180 cterm=bold term=bold hi PmenuSbar guifg=NONE guibg=#ffdab9 guisp=NONE gui=NONE ctermfg=NONE ctermbg=223 cterm=NONE term=reverse hi PmenuSel guifg=#000000 guibg=#f5c195 guisp=NONE gui=bold ctermfg=16 ctermbg=180 cterm=bold term=bold +hi PmenuShadow guifg=#737373 guibg=#303030 guisp=NONE gui=NONE ctermfg=243 ctermbg=236 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#737373 guisp=NONE gui=NONE ctermfg=NONE ctermbg=243 cterm=NONE term=NONE hi PreProc guifg=#cd00cd guibg=NONE guisp=NONE gui=NONE ctermfg=164 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#c00058 guibg=NONE guisp=NONE gui=bold ctermfg=161 ctermbg=NONE cterm=bold term=standout @@ -132,10 +134,12 @@ if s:t_Co >= 16 hi MoreMsg ctermfg=darkgreen ctermbg=white cterm=bold hi NonText ctermfg=darkgrey ctermbg=NONE cterm=NONE hi Pmenu ctermfg=black ctermbg=grey cterm=NONE + hi PmenuBorder ctermfg=NONE ctermbg=grey cterm=NONE hi PmenuMatch ctermfg=black ctermbg=grey cterm=bold hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=white cterm=NONE hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=darkgrey cterm=NONE hi PreProc ctermfg=darkmagenta ctermbg=NONE cterm=NONE hi Question ctermfg=darkred ctermbg=NONE cterm=bold @@ -202,10 +206,12 @@ if s:t_Co >= 8 hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=bold hi NonText ctermfg=darkblue ctermbg=NONE cterm=bold hi Pmenu ctermfg=black ctermbg=darkcyan cterm=NONE + hi PmenuBorder ctermfg=darkgray ctermbg=grey cterm=NONE hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=darkgreen cterm=NONE hi PreProc ctermfg=darkmagenta ctermbg=NONE cterm=NONE hi Question ctermfg=darkred ctermbg=NONE cterm=bold diff --git a/runtime/colors/retrobox.vim b/runtime/colors/retrobox.vim index 5ebffa210a..afe53ee5a5 100644 --- a/runtime/colors/retrobox.vim +++ b/runtime/colors/retrobox.vim @@ -2,7 +2,7 @@ " Description: Retro groove color scheme similar to gruvbox originally designed by morhetz " Author: Maxim Kim , ported from gruvbox8 of Lifepillar " URL: https://www.github.com/vim/colorschemes -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 22 " Generated by Colortemplate v3.0.0-beta10 @@ -19,7 +19,7 @@ hi! link CursorLineSign FoldColumn hi! link LineNrAbove LineNr hi! link LineNrBelow LineNr hi! link MessageWindow PMenu -hi! link PopupNotification Todo +hi! link PopupNotification Normal hi! link PreInsert LineNr hi! link StatusLineTerm StatusLine hi! link StatusLineTermNC StatusLineNC @@ -83,6 +83,7 @@ if &background == 'dark' hi PmenuMatchSel guifg=#d3869b guibg=#504945 guisp=NONE gui=NONE ctermfg=175 ctermbg=239 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=#3c3836 guisp=NONE gui=NONE ctermfg=NONE ctermbg=237 cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#504945 guisp=NONE gui=NONE ctermfg=NONE ctermbg=239 cterm=NONE term=bold + hi PmenuShadow guifg=#a89984 guibg=#121212 guisp=NONE gui=NONE ctermfg=102 ctermbg=233 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#7c6f64 guisp=NONE gui=NONE ctermfg=NONE ctermbg=243 cterm=NONE term=NONE hi PreCondit guifg=#8ec07c guibg=NONE guisp=NONE gui=NONE ctermfg=107 ctermbg=NONE cterm=NONE term=NONE hi PreProc guifg=#8ec07c guibg=NONE guisp=NONE gui=NONE ctermfg=107 ctermbg=NONE cterm=NONE term=NONE @@ -185,6 +186,7 @@ if &background == 'dark' hi PmenuMatchSel ctermfg=Black ctermbg=White cterm=bold,reverse hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=White ctermbg=Black cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreCondit ctermfg=Cyan ctermbg=NONE cterm=NONE hi PreProc ctermfg=Cyan ctermbg=NONE cterm=NONE @@ -279,6 +281,7 @@ if &background == 'dark' hi PmenuMatchSel ctermfg=Red ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreCondit ctermfg=Cyan ctermbg=NONE cterm=NONE hi PreProc ctermfg=Cyan ctermbg=NONE cterm=NONE @@ -390,6 +393,7 @@ if &background == 'light' hi PmenuMatchSel guifg=#8f3f71 guibg=#bdae93 guisp=NONE gui=NONE ctermfg=126 ctermbg=144 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=#e5d4b1 guisp=NONE gui=NONE ctermfg=NONE ctermbg=187 cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#bdae93 guisp=NONE gui=NONE ctermfg=NONE ctermbg=144 cterm=NONE term=bold + hi PmenuShadow guifg=#7c6f64 guibg=#303030 guisp=NONE gui=NONE ctermfg=243 ctermbg=236 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#a89984 guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=reverse term=NONE hi PreCondit guifg=#427b58 guibg=NONE guisp=NONE gui=NONE ctermfg=29 ctermbg=NONE cterm=NONE term=NONE hi PreProc guifg=#427b58 guibg=NONE guisp=NONE gui=NONE ctermfg=29 ctermbg=NONE cterm=NONE term=NONE @@ -492,6 +496,7 @@ if &background == 'light' hi PmenuMatchSel ctermfg=Black ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=Grey cterm=NONE hi PmenuSel ctermfg=Black ctermbg=White cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreCondit ctermfg=Cyan ctermbg=NONE cterm=NONE hi PreProc ctermfg=Cyan ctermbg=NONE cterm=NONE @@ -586,6 +591,7 @@ if &background == 'light' hi PmenuMatchSel ctermfg=Red ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreCondit ctermfg=Cyan ctermbg=NONE cterm=NONE hi PreProc ctermfg=Cyan ctermbg=NONE cterm=NONE diff --git a/runtime/colors/wildcharm.vim b/runtime/colors/wildcharm.vim index 63f552956c..fd52078dc4 100644 --- a/runtime/colors/wildcharm.vim +++ b/runtime/colors/wildcharm.vim @@ -3,7 +3,7 @@ " Author: Maxim Kim " URL: https://github.com/vim/colorschemes " License: Same as Vim -" Last Change: 2025 Oct 08 +" Last Change: 2025 Oct 22 " Generated by Colortemplate v3.0.0-beta10 @@ -22,7 +22,7 @@ hi! link LineNrAbove LineNr hi! link LineNrBelow LineNr hi! link MessageWindow PMenu hi! link Number Constant -hi! link PopupNotification Todo +hi! link PopupNotification Normal hi! link PreInsert NonText hi! link StatusLineTerm Statusline hi! link StatusLineTermNC StatuslineNC @@ -71,6 +71,7 @@ if &background == 'dark' hi PmenuMatchSel guifg=#d787d7 guibg=#585858 guisp=NONE gui=NONE ctermfg=176 ctermbg=240 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#585858 guisp=NONE gui=NONE ctermfg=NONE ctermbg=240 cterm=NONE term=bold + hi PmenuShadow guifg=#767676 guibg=#121212 guisp=NONE gui=NONE ctermfg=243 ctermbg=233 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#d0d0d0 guisp=NONE gui=NONE ctermfg=NONE ctermbg=252 cterm=NONE term=NONE hi PreProc guifg=#00d7d7 guibg=NONE guisp=NONE gui=NONE ctermfg=44 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#ff87ff guibg=NONE guisp=NONE gui=NONE ctermfg=213 ctermbg=NONE cterm=NONE term=standout @@ -161,6 +162,7 @@ if &background == 'dark' hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=cyan ctermbg=NONE cterm=NONE hi Question ctermfg=magenta ctermbg=NONE cterm=NONE @@ -238,6 +240,7 @@ if &background == 'dark' hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE hi Question ctermfg=darkmagenta ctermbg=NONE cterm=NONE @@ -335,6 +338,7 @@ if &background == 'light' hi PmenuMatchSel guifg=#870087 guibg=#d0d0d0 guisp=NONE gui=NONE ctermfg=90 ctermbg=252 cterm=NONE term=NONE hi PmenuSbar guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE term=reverse hi PmenuSel guifg=NONE guibg=#d0d0d0 guisp=NONE gui=NONE ctermfg=NONE ctermbg=252 cterm=NONE term=bold + hi PmenuShadow guifg=#808080 guibg=#303030 guisp=NONE gui=NONE ctermfg=240 ctermbg=236 cterm=NONE term=NONE hi PmenuThumb guifg=NONE guibg=#808080 guisp=NONE gui=NONE ctermfg=NONE ctermbg=240 cterm=NONE term=NONE hi PreProc guifg=#008787 guibg=NONE guisp=NONE gui=NONE ctermfg=30 ctermbg=NONE cterm=NONE term=NONE hi Question guifg=#870087 guibg=NONE guisp=NONE gui=NONE ctermfg=90 ctermbg=NONE cterm=NONE term=standout @@ -425,6 +429,7 @@ if &background == 'light' hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=darkgreen cterm=NONE hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE hi Question ctermfg=darkmagenta ctermbg=NONE cterm=NONE @@ -502,6 +507,7 @@ if &background == 'light' hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold + hi PmenuShadow ctermfg=NONE ctermbg=NONE cterm=NONE hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=reverse hi PreProc ctermfg=darkcyan ctermbg=NONE cterm=NONE hi Question ctermfg=darkmagenta ctermbg=NONE cterm=NONE diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index b8fccf241a..72c9ed8e12 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -1,7 +1,7 @@ -*arabic.txt* For Vim version 9.1. Last change: 2021 Jun 22 +*arabic.txt* For Vim version 9.1. Last change: 2025 Oct 26 - VIM REFERENCE MANUAL by Nadim Shaikli + VIM REFERENCE MANUAL by Nadim Shaikli Arabic Language support (options & mappings) for Vim *Arabic* @@ -191,7 +191,7 @@ o Enable Arabic settings [short-cut] To activate the Arabic keymap (i.e. to remap your English/Latin keyboard to look-n-feel like a standard Arabic one), set the - 'keymap' command to "arabic". This is done by entering + 'keymap' option to "arabic". This is done by entering > :set keymap=arabic < diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index f96309688b..318b57b548 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 9.1. Last change: 2025 Sep 14 +*autocmd.txt* For Vim version 9.1. Last change: 2025 Oct 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -236,7 +236,7 @@ autocmds. *:autocmd-verbose* When 'verbose' is non-zero, listing an autocommand will also display where it -was last defined. Example: > +was last defined. Example: > :verbose autocmd BufEnter FileExplorer BufEnter @@ -346,7 +346,8 @@ Name triggered by ~ |GUIEnter| after starting the GUI successfully |GUIFailed| after starting the GUI failed |TermResponse| after the terminal response to |t_RV| is received -|TermResponseAll| after the terminal response to |t_RV| and others is received +|TermResponseAll| after the terminal response to |t_RV| and others is + received |QuitPre| when using `:quit`, before deciding whether to exit |ExitPre| when using a command that may make Vim exit @@ -383,7 +384,8 @@ Name triggered by ~ |FocusGained| Vim got input focus |FocusLost| Vim lost input focus |CursorHold| the user doesn't press a key for a while -|CursorHoldI| the user doesn't press a key for a while in Insert mode +|CursorHoldI| the user doesn't press a key for a while in Insert + mode |CursorMoved| the cursor was moved in Normal mode |CursorMovedC| the cursor was moved in the |Command-line| |CursorMovedI| the cursor was moved in Insert mode @@ -568,7 +570,8 @@ BufWinEnter After a buffer is displayed in a window. This since it reloads that buffer. Does not happen for a terminal window, because it starts in Terminal-Job mode and Normal mode - commands won't work. Use |TerminalOpen| instead. + commands won't work. Use |TerminalOpen| + instead. *BufWinLeave* BufWinLeave Before a buffer is removed from a window. Not when it's still visible in another window. @@ -681,7 +684,7 @@ ColorScheme After loading a color scheme. |:colorscheme| Not triggered if the color scheme is not found. The pattern is matched against the - colorscheme name. can be used for the + colorscheme name. can be used for the name of the actual file where this option was set, and for the new colorscheme name. @@ -750,7 +753,7 @@ CursorHold When the user doesn't press a key for the time triggered. |q| ** Internally the autocommand is triggered by the - key. In an expression mapping + key. In an expression mapping |getchar()| may see this character. Note: Interactive commands cannot be used for @@ -1016,7 +1019,7 @@ InsertLeave Just after leaving Insert mode. Also when using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|. *KeyInputPre* KeyInputPre Just before a key is processed after mappings - have been applied. The pattern is matched + have been applied. The pattern is matched against a string that indicates the current mode, which is the same as what is returned by `mode(1)`. @@ -1048,7 +1051,7 @@ MenuPopup Just before showing the popup menu (under the c Command line tl Terminal *ModeChanged* -ModeChanged After changing the mode. The pattern is +ModeChanged After changing the mode. The pattern is matched against `'old_mode:new_mode'`, for example match against `*:c*` to simulate |CmdlineEnter|. @@ -1084,7 +1087,7 @@ OptionSet After setting an option. The pattern is |v:option_oldlocal| is only set when |:set| or |:setlocal| or a |modeline| was used to set - the option. Similarly |v:option_oldglobal| is + the option. Similarly |v:option_oldglobal| is only set when |:set| or |:setglobal| was used. This does not set ||, you could use @@ -1092,10 +1095,10 @@ OptionSet After setting an option. The pattern is Note that when setting a |global-local| string option with |:set|, then |v:option_old| is the - old global value. However, for all other kinds - of options (local string options, global-local - number options, ...) it is the old local - value. + old global value. However, for all other + kinds of options (local string options, + global-local number options, ...) it is the + old local value. OptionSet is not triggered on startup and for the 'key' option for obvious reasons. @@ -1107,7 +1110,7 @@ OptionSet After setting an option. The pattern is Note: It's a bad idea to reset an option during this autocommand, this may break a - plugin. You can always use `:noa` to prevent + plugin. You can always use `:noa` to prevent triggering this autocommand. When using |:set| in the autocommand the event @@ -1138,7 +1141,7 @@ QuickFixCmdPre Before a quickfix command is run (|:make|, *QuickFixCmdPost* QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix command is run, before jumping to the first - location. For |:cfile| and |:lfile| commands + location. For |:cfile| and |:lfile| commands it is run after the error file is read and before moving to the first error. See |QuickFixCmdPost-example|. @@ -1182,7 +1185,7 @@ SafeState When nothing is pending, going to wait for the screen was scrolled for messages. *SafeStateAgain* SafeStateAgain Like SafeState but after processing any - messages and invoking callbacks. This may be + messages and invoking callbacks. This may be triggered often, don't do something that takes time. @@ -1286,12 +1289,12 @@ TermChanged After the value of 'term' has changed. Useful settings. Executed for all loaded buffers. *TerminalOpen* TerminalOpen Just after a terminal buffer was created, with - `:terminal` or |term_start()|. This event is + `:terminal` or |term_start()|. This event is triggered even if the buffer is created without a window, with the ++hidden option. *TerminalWinOpen* TerminalWinOpen Just after a terminal buffer was created, with - `:terminal` or |term_start()|. This event is + `:terminal` or |term_start()|. This event is triggered only if the buffer is created with a window. Can be used to set window local options for the terminal window. @@ -1488,7 +1491,7 @@ WinLeave Before leaving a window. If the window to be Not used for ":qa" or ":q" when exiting Vim. *WinNewPre* -WinNewPre Before creating a new window. Triggered +WinNewPre Before creating a new window. Triggered before commands that modify window layout by creating a split. Not done when creating tab pages and for the @@ -1797,8 +1800,8 @@ option will not cause any commands to be executed. After applying the autocommands the modelines are processed, so that their settings overrule the settings from autocommands, like what happens when - editing a file. This is skipped when the - argument is present. You probably want to use + editing a file. This is skipped when the + argument is present. You probably want to use for events that are not used when loading a buffer, such as |User|. Processing modelines is also skipped when no @@ -1810,7 +1813,7 @@ option will not cause any commands to be executed. loaded buffer. The current buffer is done last. Note that [fname] is used to select the autocommands, - not the buffers to which they are applied. Example: > + not the buffers to which they are applied. Example: > augroup mine autocmd! autocmd FileType * echo expand('') diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index c9038ec406..e0ef87ea61 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -1,7 +1,7 @@ -*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 01 +*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 26 - VIM REFERENCE MANUAL by Bram Moolenaar + VIM REFERENCE MANUAL by Bram Moolenaar Builtin functions *builtin-functions* @@ -799,7 +799,7 @@ Not all functions are here, some have been moved to a help file covering the specific functionality. Return type specifies the type for |Vim9-script|, see |vim9-types| -abs({expr}) *abs()* +abs({expr}) *abs()* Return the absolute value of {expr}. When {expr} evaluates to a |Float| abs() returns a |Float|. When {expr} can be converted to a |Number| abs() returns a |Number|. Otherwise @@ -818,7 +818,7 @@ abs({expr}) *abs()* Return type: |Number| or |Float| depending on {expr} -acos({expr}) *acos()* +acos({expr}) *acos()* Return the arc cosine of {expr} measured in radians, as a |Float| in the range of [0, pi]. {expr} must evaluate to a |Float| or a |Number| in the range @@ -856,7 +856,7 @@ add({object}, {expr}) *add()* and({expr}, {expr}) *and()* Bitwise AND on the two arguments. The arguments are converted to a number. A List, Dict or Float argument causes an error. - Also see `or()` and `xor()`. + Also see |or()| and |xor()|. Example: > :let flag = and(bits, 0x80) < Can also be used as a |method|: > @@ -891,7 +891,7 @@ append({lnum}, {text}) *append()* appendbufline({buf}, {lnum}, {text}) *appendbufline()* Like |append()| but append the text in buffer {buf}. - This function works only for loaded buffers. First call + This function works only for loaded buffers. First call |bufload()| if needed. For the use of {buf}, see |bufname()|. @@ -905,7 +905,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()* In |Vim9| script an error is given for an invalid {lnum}. If {buf} is not a valid buffer or {lnum} is not valid, an - error message is given. Example: > + error message is given. Example: > :let failed = appendbufline(13, 0, "# THE START") < However, when {text} is an empty list then no error is given for an invalid {lnum}, since {lnum} isn't actually used. @@ -917,7 +917,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()* Return type: |Number| -argc([{winid}]) *argc()* +argc([{winid}]) *argc()* The result is the number of files in the argument list. See |arglist|. If {winid} is not supplied, the argument list of the current @@ -929,14 +929,15 @@ argc([{winid}]) *argc()* Return type: |Number| - *argidx()* -argidx() The result is the current index in the argument list. 0 is - the first file. argc() - 1 is the last one. See |arglist|. + +argidx() *argidx()* + The result is the current index in the argument list. 0 is + the first file. |argc()| - 1 is the last one. See |arglist|. Return type: |Number| - *arglistid()* -arglistid([{winnr} [, {tabnr}]]) + +arglistid([{winnr} [, {tabnr}]]) *arglistid()* Return the argument list ID. This is a number which identifies the argument list being used. Zero is used for the global argument list. See |arglist|. @@ -950,8 +951,8 @@ arglistid([{winnr} [, {tabnr}]]) Return type: |Number| - *argv()* -argv([{nr} [, {winid}]]) + +argv([{nr} [, {winid}]]) *argv()* The result is the {nr}th file in the argument list. See |arglist|. "argv(0)" is the first one. Example: > :let i = 0 @@ -1038,19 +1039,19 @@ autocmd_add({acmds}) *autocmd_add()* If this item is specified, then the "pattern" item is ignored. cmd Ex command to execute for this autocmd event - event autocmd event name. Refer to |autocmd-events|. + event autocmd event name. Refer to |autocmd-events|. This can be either a String with a single event name or a List of event names. - group autocmd group name. Refer to |autocmd-groups|. + group autocmd group name. Refer to |autocmd-groups|. If this group doesn't exist then it is created. If not specified or empty, then the default group is used. nested boolean flag, set to v:true to add a nested autocmd. Refer to |autocmd-nested|. once boolean flag, set to v:true to add an autocmd - which executes only once. Refer to + which executes only once. Refer to |autocmd-once|. - pattern autocmd pattern string. Refer to + pattern autocmd pattern string. Refer to |autocmd-patterns|. If "bufnr" item is present, then this item is ignored. This can be a String with a single pattern or a List of @@ -1059,7 +1060,8 @@ autocmd_add({acmds}) *autocmd_add()* commands associated with the specified autocmd event and group and add the {cmd}. This is useful to avoid adding the same command - multiple times for an autocmd event in a group. + multiple times for an autocmd event in a + group. Returns v:true on success and v:false on failure. Examples: > @@ -1082,21 +1084,21 @@ autocmd_delete({acmds}) *autocmd_delete()* The {acmds} argument is a List where each item is a Dict with the following optional items: - bufnr buffer number to delete a buffer-local autocmd. - If this item is specified, then the "pattern" - item is ignored. + bufnr buffer number to delete a buffer-local + autocmd. If this item is specified, then the + "pattern" item is ignored. cmd Ex command for this autocmd event - event autocmd event name. Refer to |autocmd-events|. + event autocmd event name. Refer to |autocmd-events|. If '*' then all the autocmd events in this group are deleted. - group autocmd group name. Refer to |autocmd-groups|. + group autocmd group name. Refer to |autocmd-groups|. If not specified or empty, then the default group is used. nested set to v:true for a nested autocmd. Refer to |autocmd-nested|. once set to v:true for an autocmd which executes - only once. Refer to |autocmd-once|. - pattern autocmd pattern string. Refer to + only once. Refer to |autocmd-once|. + pattern autocmd pattern string. Refer to |autocmd-patterns|. If "bufnr" item is present, then this item is ignored. @@ -1130,22 +1132,22 @@ autocmd_delete({acmds}) *autocmd_delete()* autocmd_get([{opts}]) *autocmd_get()* - Returns a |List| of autocmds. If {opts} is not supplied, then + Returns a |List| of autocmds. If {opts} is not supplied, then returns the autocmds for all the events in all the groups. The optional {opts} Dict argument supports the following items: - group Autocmd group name. If specified, returns only - the autocmds defined in this group. If the - specified group doesn't exist, results in an - error message. If set to an empty string, + group Autocmd group name. If specified, returns + only the autocmds defined in this group. If + the specified group doesn't exist, results in + an error message. If set to an empty string, then the default autocmd group is used. - event Autocmd event name. If specified, returns only - the autocmds defined for this event. If set - to "*", then returns autocmds for all the + event Autocmd event name. If specified, returns + only the autocmds defined for this event. If + set to "*", then returns autocmds for all the events. If the specified event doesn't exist, results in an error message. - pattern Autocmd pattern. If specified, returns only + pattern Autocmd pattern. If specified, returns only the autocmds defined for this pattern. A combination of the above three times can be supplied in {opts}. @@ -1157,11 +1159,12 @@ autocmd_get([{opts}]) *autocmd_get()* event Autocmd event name. group Autocmd group name. nested Boolean flag, set to v:true for a nested - autocmd. See |autocmd-nested|. + autocmd. See |autocmd-nested|. once Boolean flag, set to v:true, if the autocmd - will be executed only once. See |autocmd-once|. + will be executed only once. See |autocmd-once|. pattern Autocmd pattern. For a buffer-local - autocmd, this will be of the form "". + autocmd, this will be of the form + "". If there are multiple commands for an autocmd event in a group, then separate items are returned for each command. @@ -1245,6 +1248,7 @@ balloon_split({msg}) *balloon_split()* Return type: list or list + base64_decode({string}) *base64_decode()* Return a Blob containing the bytes decoded from the base64 encoded characters in {string}. @@ -1293,6 +1297,7 @@ bindtextdomain({package}, {path}) *bindtextdomain()* Return type: |vim9-boolean| + blob2list({blob}) *blob2list()* Return a List containing the number value of each byte in Blob {blob}. Examples: > @@ -1348,8 +1353,7 @@ blob2str({blob} [, {options}]) *blob2str()* Return type: list - *browse()* -browse({save}, {title}, {initdir}, {default}) +browse({save}, {title}, {initdir}, {default}) *browse()* Put up a file requester. This only works when "has("browse")" returns |TRUE| (only in some GUI versions). The input fields are: @@ -1512,7 +1516,7 @@ bufnr([{buf} [, {create}]]) *bufnr()* {create} argument is present and TRUE, a new, unlisted, buffer is created and its number is returned. Example: > let newbuf = bufnr('Scratch001', 1) -< Using an empty name uses the current buffer. To create a new +< Using an empty name uses the current buffer. To create a new buffer with an empty name use |bufadd()|. bufnr("$") is the last buffer: > @@ -1520,7 +1524,7 @@ bufnr([{buf} [, {create}]]) *bufnr()* < The result is a Number, which is the highest buffer number of existing buffers. Note that not all buffers with a smaller number necessarily exist, because ":bwipeout" may have removed - them. Use bufexists() to test for the existence of a buffer. + them. Use |bufexists()| to test for the existence of a buffer. Can also be used as a |method|: > echo bufref->bufnr() @@ -1581,8 +1585,7 @@ byte2line({byte}) *byte2line()* < Return type: |Number| - {not available when compiled without the |+byte_offset| - feature} + {not available when compiled without the |+byte_offset| feature} byteidx({expr}, {nr} [, {utf16}]) *byteidx()* @@ -1627,7 +1630,7 @@ byteidx({expr}, {nr} [, {utf16}]) *byteidx()* byteidxcomp({expr}, {nr} [, {utf16}]) *byteidxcomp()* - Like byteidx(), except that a composing character is counted + Like |byteidx()|, except that a composing character is counted as a separate character. Example: > let s = 'e' .. nr2char(0x301) echo byteidx(s, 1) @@ -1636,7 +1639,7 @@ byteidxcomp({expr}, {nr} [, {utf16}]) *byteidxcomp()* < The first and third echo result in 3 ('e' plus composing character is 3 bytes), the second echo results in 1 ('e' is one byte). - Only works differently from byteidx() when 'encoding' is set + Only works differently from |byteidx()| when 'encoding' is set to a Unicode encoding. Can also be used as a |method|: > @@ -1660,7 +1663,7 @@ call({func}, {arglist} [, {dict}]) *call()* *E699* Return type: any, depending on {func} -ceil({expr}) *ceil()* +ceil({expr}) *ceil()* Return the smallest integral value greater than or equal to {expr} as a |Float| (round up). {expr} must evaluate to a |Float| or a |Number|. @@ -1695,12 +1698,13 @@ changenr() *changenr()* Return type: |Number| -char2nr({string} [, {utf8}]) *char2nr()* +char2nr({string} [, {utf8}]) *char2nr()* Return Number value of the first char in {string}. Examples: > char2nr(" ") returns 32 char2nr("ABC") returns 65 -< When {utf8} is omitted or zero, the current 'encoding' is used. +< When {utf8} is omitted or zero, the current 'encoding' is + used. Example for "utf-8": > char2nr("á") returns 225 char2nr("á"[0]) returns 195 @@ -1748,8 +1752,8 @@ charcol({expr} [, {winid}]) *charcol()* < Return type: |Number| - *charidx()* -charidx({string}, {idx} [, {countcc} [, {utf16}]]) + +charidx({string}, {idx} [, {countcc} [, {utf16}]]) *charidx()* Return the character index of the byte at {idx} in {string}. The index of the first character is zero. If there are no multibyte characters the returned value is @@ -1765,7 +1769,7 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]]) index in the String {expr} instead of as the byte index. Returns -1 if the arguments are invalid or if there are less - than {idx} bytes. If there are exactly {idx} bytes the length + than {idx} bytes. If there are exactly {idx} bytes the length of the string in characters is returned. An error is given and -1 is returned if the first argument is @@ -1857,7 +1861,7 @@ cmdcomplete_info() *cmdcomplete_info()* completion began. pum_visible |TRUE| if popup menu is visible. See |pumvisible()|. - matches List of all completion candidates. Each item + matches List of all completion candidates. Each item is a string. selected Selected item index. First index is zero. Index is -1 if no item is selected (showing @@ -1879,7 +1883,7 @@ col({expr} [, {winid}]) *col()* When {expr} is "$", it means the end of the cursor line, so the result is the number of bytes in the cursor line plus one. Additionally {expr} can be [lnum, col]: a |List| with the line - and column number. Most useful when the column is "$", to get + and column number. Most useful when the column is "$", to get the last column of a specific line. When "lnum" or "col" is out of range then col() returns zero. @@ -1915,8 +1919,8 @@ col({expr} [, {winid}]) *col()* Return type: |Number| -complete({startcol}, {matches}) *complete()* *E785* - Set the matches for Insert mode completion. Can only be +complete({startcol}, {matches}) *complete()* *E785* + Set the matches for Insert mode completion. Can only be used in Insert mode. Typically invoked from a mapping with CTRL-R = (see |i_CTRL-R|), but may also be called from a || or || mapping. It does not work after @@ -1969,7 +1973,7 @@ complete({startcol}, {matches}) *complete()* *E785* Return type: |Number| -complete_add({expr}) *complete_add()* +complete_add({expr}) *complete_add()* Add {expr} to the list of matches. Only to be used by the function specified with the 'completefunc' option. Returns 0 for failure (empty string or out of memory), @@ -1984,7 +1988,7 @@ complete_add({expr}) *complete_add()* Return type: |Number| -complete_check() *complete_check()* +complete_check() *complete_check()* Check for a key typed while looking for completion matches. This is to be used when looking for matches takes some time. Returns |TRUE| when searching for matches is to be aborted, @@ -1995,30 +1999,34 @@ complete_check() *complete_check()* Return type: |Number| -complete_info([{what}]) *complete_info()* +complete_info([{what}]) *complete_info()* Returns a |Dictionary| with information about Insert mode completion. See |ins-completion|. The items are: - mode Current completion mode name string. - See |complete_info_mode| for the values. - pum_visible |TRUE| if popup menu is visible. - See |pumvisible()|. - items List of all completion candidates. Each item + completed Return a dictionary containing the entries of + the currently selected index item. + items List of all completion candidates. Each item is a dictionary containing the entries "word", - "abbr", "menu", "kind", "info" and "user_data". + "abbr", "menu", "kind", "info" and + "user_data". See |complete-items|. matches Same as "items", but only returns items that - are matching current query. If both "matches" + are matching current query. If both "matches" and "items" are in "what", the returned list will still be named "items", but each item will have an additional "match" field. + mode Current completion mode name string. + See |complete_info_mode| for the values. + preinserted_text + The actual text that is pre-inserted, see + |preinserted()|. + pum_visible |TRUE| if popup menu is visible. + See |pumvisible()|. selected Selected item index. First index is zero. Index is -1 if no item is selected (showing typed text only, or the last completion after no item is selected when using the or keys) - completed Return a dictionary containing the entries of - the currently selected index item. *complete_info_mode* mode values are: @@ -2047,7 +2055,7 @@ complete_info([{what}]) *complete_info()* {what} are silently ignored. To get the position and size of the popup menu, see - |pum_getpos()|. It's also available in |v:event| during the + |pum_getpos()|. It's also available in |v:event| during the |CompleteChanged| event. Returns an empty |Dictionary| on error. @@ -2065,15 +2073,16 @@ complete_info([{what}]) *complete_info()* < Return type: dict -complete_match([{lnum}, {col}]) *complete_match()* + +complete_match([{lnum}, {col}]) *complete_match()* Searches backward from the given position and returns a List - of matches according to the 'isexpand' option. When no + of matches according to the 'isexpand' option. When no arguments are provided, uses the current cursor position. Each match is represented as a List containing [startcol, trigger_text] where: - startcol: column position where completion should start, - or -1 if no trigger position is found. For multi-character + or -1 if no trigger position is found. For multi-character triggers, returns the column of the first character. - trigger_text: the matching trigger string from 'isexpand', or empty string if no match was found or when using the @@ -2109,8 +2118,8 @@ complete_match([{lnum}, {col}]) *complete_match()* < Return type: list> - *confirm()* -confirm({msg} [, {choices} [, {default} [, {type}]]]) + +confirm({msg} [, {choices} [, {default} [, {type}]]]) *confirm()* confirm() offers the user a dialog, from which a choice can be made. It returns the number of the choice. For the first choice this is 1. @@ -2171,7 +2180,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) Return type: |Number| -copy({expr}) *copy()* +copy({expr}) *copy()* Make a copy of {expr}. For Numbers and Strings this isn't different from using {expr} directly. When {expr} is a |List| a shallow copy is created. This means @@ -2230,7 +2239,7 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()* *E706* When {ic} is given and it's |TRUE| then case is ignored. When {comp} is a string then the number of not overlapping - occurrences of {expr} is returned. Zero is returned when + occurrences of {expr} is returned. Zero is returned when {expr} is an empty string. Can also be used as a |method|: > @@ -2238,8 +2247,8 @@ count({comp}, {expr} [, {ic} [, {start}]]) *count()* *E706* < Return type: |Number| - *cscope_connection()* -cscope_connection([{num} , {dbpath} [, {prepend}]]) + +cscope_connection([{num} , {dbpath} [, {prepend}]]) *cscope_connection()* Checks for the existence of a |cscope| connection. If no parameters are specified, then the function returns: 0, if cscope was not available (not compiled in), or @@ -2324,7 +2333,7 @@ cursor({list}) debugbreak({pid}) *debugbreak()* Specifically used to interrupt a program being debugged. It will cause process {pid} to get a SIGTRAP. Behavior for other - processes is undefined. See |terminal-debugger|. + processes is undefined. See |terminal-debugger|. {only available on MS-Windows} Returns |TRUE| if successfully interrupted the program. @@ -2353,7 +2362,7 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698* this single copy. With {noref} set to 1 every occurrence of a |List| or |Dictionary| results in a new copy. This also means that a cyclic reference causes deepcopy() to fail. - *E724* + *E724* Nesting is possible up to 100 levels. When there is an item that refers back to a higher level making a deep copy with {noref} set to 1 will fail. @@ -2399,13 +2408,13 @@ deletebufline({buf}, {first} [, {last}]) *deletebufline()* If {last} is omitted then delete line {first} only. On success 0 is returned, on failure 1 is returned. - This function works only for loaded buffers. First call + This function works only for loaded buffers. First call |bufload()| if needed. For the use of {buf}, see |bufname()| above. - {first} and {last} are used like with |getline()|. Note that - when using |line()| this refers to the current buffer. Use "$" + {first} and {last} are used like with |getline()|. Note that + when using |line()| this refers to the current buffer. Use "$" to refer to the last line in buffer {buf}. Can also be used as a |method|: > @@ -2413,8 +2422,9 @@ deletebufline({buf}, {first} [, {last}]) *deletebufline()* < Return type: |Number| - *did_filetype()* -did_filetype() Returns |TRUE| when autocommands are being executed and the + +did_filetype() *did_filetype()* + Returns |TRUE| when autocommands are being executed and the FileType event has been triggered at least once. Can be used to avoid triggering the FileType event again in the scripts that detect the file type. |FileType| @@ -2642,7 +2652,7 @@ digraph_setlist({digraphlist}) *digraph_setlist()* echoraw({string}) *echoraw()* Output {string} as-is, including unprintable characters. - This can be used to output a terminal code. For example, to + This can be used to output a terminal code. For example, to disable modifyOtherKeys: > call echoraw(&t_TE) < and to enable it again: > @@ -2675,7 +2685,7 @@ empty({expr}) *empty()* environ() *environ()* - Return all of environment variables as dictionary. You can + Return all of environment variables as dictionary. You can check if an environment variable exists like this: > :echo has_key(environ(), 'HOME') < Note that the variable name may be CamelCase; to ignore case @@ -2708,8 +2718,9 @@ escape({string}, {chars}) *escape()* < Return type: |String| - *eval()* -eval({string}) Evaluate {string} and return the result. Especially useful to + +eval({string}) *eval()* + Evaluate {string} and return the result. Especially useful to turn the result of |string()| back into the original value. This works for Numbers, Floats, Strings, Blobs and composites of them. Also works for |Funcref|s that refer to existing @@ -2768,7 +2779,7 @@ executable({expr}) *executable()* Return type: |Number| -execute({command} [, {silent}]) *execute()* +execute({command} [, {silent}]) *execute()* Execute an Ex command or commands and return the output as a string. {command} can be a string or a List. In case of a List the @@ -2819,7 +2830,7 @@ exepath({expr}) *exepath()* Return type: |String| -exists({expr}) *exists()* +exists({expr}) *exists()* The result is a Number, which is |TRUE| if {expr} is defined, zero otherwise. @@ -2944,7 +2955,7 @@ exists_compiled({expr}) *exists_compiled()* Return type: |String| -exp({expr}) *exp()* +exp({expr}) *exp()* Return the exponential of {expr} as a |Float| in the range [0, inf]. {expr} must evaluate to a |Float| or a |Number|. @@ -2961,7 +2972,7 @@ exp({expr}) *exp()* Return type: |Float| -expand({string} [, {nosuf} [, {list}]]) *expand()* +expand({string} [, {nosuf} [, {list}]]) *expand()* Expand wildcards and the following special keywords in {string}. 'wildignorecase' applies. @@ -3092,6 +3103,7 @@ expandcmd({string} [, {options}]) *expandcmd()* < Return type: |String| or list depending on {list} + extend({expr1}, {expr2} [, {expr3}]) *extend()* {expr1} and {expr2} must be both |Lists| or both |Dictionaries|. @@ -3159,21 +3171,21 @@ feedkeys({string} [, {mode}]) *feedkeys()* {string}. To include special keys into {string}, use double-quotes - and "\..." notation |expr-quote|. For example, - feedkeys("\") simulates pressing of the key. But + and "\..." notation |expr-quote|. For example, + feedkeys("\") simulates pressing of the key. But feedkeys('\') pushes 5 characters. A special code that might be useful is , it exits the wait for a character without doing anything. ** {mode} is a String, which can contain these character flags: - 'm' Remap keys. This is default. If {mode} is absent, + 'm' Remap keys. This is default. If {mode} is absent, keys are remapped. 'n' Do not remap keys. 't' Handle keys as if typed; otherwise they are handled as if coming from a mapping. This matters for undo, opening folds, etc. 'L' Lowlevel input. Only works for Unix or when using the - GUI. Keys are used as if they were coming from the + GUI. Keys are used as if they were coming from the terminal. Other flags are not used. *E980* When a CTRL-C interrupts and 't' is included it sets the internal "got_int" flag. @@ -3193,7 +3205,7 @@ feedkeys({string} [, {mode}]) *feedkeys()* legacy script syntax applies, "s:var" does not work, etc. Note that if the string being fed sets a script context this still applies. - '!' When used with 'x' will not end Insert mode. Can be + '!' When used with 'x' will not end Insert mode. Can be used in a test when a timer is set to exit Insert mode a little later. Useful for testing CursorHoldI. @@ -3206,7 +3218,7 @@ feedkeys({string} [, {mode}]) *feedkeys()* filecopy({from}, {to}) *filecopy()* - Copy the file pointed to by the name {from} to {to}. The + Copy the file pointed to by the name {from} to {to}. The result is a Number, which is |TRUE| if the file was copied successfully, and |FALSE| when it failed. If a file with name {to} already exists, it will fail. @@ -3267,7 +3279,7 @@ filter({expr1}, {expr2}) *filter()* of the current item. For a |Dictionary| |v:key| has the key of the current item and for a |List| |v:key| has the index of the current item. For a |Blob| |v:key| has the index of the - current byte. For a |String| |v:key| has the index of the + current byte. For a |String| |v:key| has the index of the current character. Examples: > call filter(mylist, 'v:val !~ "OLD"') @@ -3309,8 +3321,8 @@ filter({expr1}, {expr2}) *filter()* or a new |Blob| or |String|. When an error is encountered while evaluating {expr2} no further items in {expr1} are processed. - When {expr2} is a Funcref errors inside a function are ignored, - unless it was defined with the "abort" flag. + When {expr2} is a Funcref errors inside a function are + ignored, unless it was defined with the "abort" flag. Can also be used as a |method|: > mylist->filter(expr2) @@ -3319,7 +3331,7 @@ filter({expr1}, {expr2}) *filter()* depending on {expr1} -finddir({name} [, {path} [, {count}]]) *finddir()* +finddir({name} [, {path} [, {count}]]) *finddir()* Find directory {name} in {path}. Supports both downwards and upwards recursive directory searches. See |file-searching| for the syntax of {path}. @@ -3344,7 +3356,7 @@ finddir({name} [, {path} [, {count}]]) *finddir()* otherwise -findfile({name} [, {path} [, {count}]]) *findfile()* +findfile({name} [, {path} [, {count}]]) *findfile()* Just like |finddir()|, but find a file instead of a directory. Uses 'suffixesadd'. Example: > @@ -3359,7 +3371,7 @@ findfile({name} [, {path} [, {count}]]) *findfile()* otherwise -flatten({list} [, {maxdepth}]) *flatten()* +flatten({list} [, {maxdepth}]) *flatten()* Flatten {list} up to {maxdepth} levels. Without {maxdepth} the result is a |List| without nesting, as if {maxdepth} is a very large number. @@ -3367,7 +3379,7 @@ flatten({list} [, {maxdepth}]) *flatten()* not want that. In Vim9 script flatten() cannot be used, you must always use |flattennew()|. - *E900* + *E900* {maxdepth} means how deep in nested lists changes are made. {list} is not modified when {maxdepth} is 0. {maxdepth} must be positive number. @@ -3420,7 +3432,7 @@ float2nr({expr}) *float2nr()* Return type: |Number| -floor({expr}) *floor()* +floor({expr}) *floor()* Return the largest integral value less than or equal to {expr} as a |Float| (round down). {expr} must evaluate to a |Float| or a |Number|. @@ -3549,8 +3561,9 @@ foldlevel({lnum}) *foldlevel()* < Return type: |Number| - *foldtext()* -foldtext() Returns a String, to be displayed for a closed fold. This is + +foldtext() *foldtext()* + Returns a String, to be displayed for a closed fold. This is the default function used for the 'foldtext' option and should only be called from evaluating 'foldtext'. It uses the |v:foldstart|, |v:foldend| and |v:folddashes| variables. @@ -3590,7 +3603,7 @@ foldtextresult({lnum}) *foldtextresult()* foreach({expr1}, {expr2}) *foreach()* *E1525* {expr1} must be a |List|, |Tuple|, |String|, |Blob| or |Dictionary|. - For each item in {expr1} execute {expr2}. {expr1} is not + For each item in {expr1} execute {expr2}. {expr1} is not modified; its values may be, as with |:lockvar| 1. |E741| See |map()| and |filter()| to modify {expr1}. @@ -3600,7 +3613,7 @@ foreach({expr1}, {expr2}) *foreach()* *E1525* of the current item. For a |Dictionary| |v:key| has the key of the current item and for a |List| or a |Tuple| |v:key| has the index of the current item. For a |Blob| |v:key| has the - index of the current byte. For a |String| |v:key| has the + index of the current byte. For a |String| |v:key| has the index of the current character. Examples: > call foreach(mylist, 'used[v:val] = true') @@ -3621,8 +3634,8 @@ foreach({expr1}, {expr2}) *foreach()* *E1525* Returns {expr1} in all cases. When an error is encountered while executing {expr2} no further items in {expr1} are processed. - When {expr2} is a Funcref errors inside a function are ignored, - unless it was defined with the "abort" flag. + When {expr2} is a Funcref errors inside a function are + ignored, unless it was defined with the "abort" flag. Can also be used as a |method|: > mylist->foreach(expr2) @@ -3630,8 +3643,9 @@ foreach({expr1}, {expr2}) *foreach()* *E1525* Return type: |String|, |Blob|, list<{type}>, tuple<{type}> or dict<{type}> depending on {expr1} - *foreground()* -foreground() Move the Vim window to the foreground. Useful when sent from + +foreground() *foreground()* + Move the Vim window to the foreground. Useful when sent from a client to a Vim server. |remote_send()| On Win32 systems this might not work, the OS does not always allow a window to bring itself to the foreground. Use @@ -3674,7 +3688,7 @@ funcref({name} [, {arglist}] [, {dict}]) *funcref()* It only works for an autoloaded function if it has already been loaded (to avoid mistakenly loading the autoload script when only intending to use the function name, use |function()| - instead). {name} cannot be a builtin function. + instead). {name} cannot be a builtin function. Returns 0 on error. Can also be used as a |method|: > @@ -3682,15 +3696,15 @@ funcref({name} [, {arglist}] [, {dict}]) *funcref()* < Return type: func(...): any or |Number| on error - *function()* *partial* *E700* *E923* -function({name} [, {arglist}] [, {dict}]) + +function({name} [, {arglist}] [, {dict}]) *function()* *partial* *E700* *E923* Return a |Funcref| variable that refers to function {name}. {name} can be the name of a user defined function or an internal function. {name} can also be a Funcref or a partial. When it is a partial the dict stored in it will be used and the {dict} - argument is not allowed. E.g.: > + argument is not allowed. E.g.: > let FuncWithArg = function(dict.Func, [arg]) let Broken = function(dict.Func, [arg], dict) < @@ -3699,8 +3713,8 @@ function({name} [, {arglist}] [, {dict}]) same function. When {arglist} or {dict} is present this creates a partial. - That means the argument list and/or the dictionary is stored in - the Funcref and will be used when the Funcref is called. + That means the argument list and/or the dictionary is stored + in the Funcref and will be used when the Funcref is called. The arguments are passed to the function in front of other arguments, but after any argument from |method|. Example: > @@ -3734,7 +3748,7 @@ function({name} [, {arglist}] [, {dict}]) call Callback('one', 'two', 'name') < The Dictionary is only useful when calling a "dict" function. - In that case the {dict} is passed in as "self". Example: > + In that case the {dict} is passed in as "self". Example: > function Callback() dict echo "called for " .. self.name endfunction @@ -3801,6 +3815,7 @@ get({list}, {idx} [, {default}]) *get()* *get()-list* < Return type: any, depending on {list} + get({tuple}, {idx} [, {default}]) *get()-tuple* Get item {idx} from |Tuple| {tuple}. When this item is not available return {default}. Return zero when {default} is @@ -3810,6 +3825,7 @@ get({tuple}, {idx} [, {default}]) *get()-tuple* < Return type: any, depending on {tuple} + get({blob}, {idx} [, {default}]) *get()-blob* Get byte {idx} from |Blob| {blob}. When this byte is not available return {default}. Return -1 when {default} is @@ -3819,6 +3835,7 @@ get({blob}, {idx} [, {default}]) *get()-blob* < Return type: |Number| + get({dict}, {key} [, {default}]) *get()-dict* Get item with key {key} from |Dictionary| {dict}. When this item is not available return {default}. Return zero when @@ -3831,6 +3848,7 @@ get({dict}, {key} [, {default}]) *get()-dict* < Return type: any, depending on {dict} + get({func}, {what}) *get()-func* Get item {what} from |Funcref| {func}. Possible values for {what} are: @@ -3858,8 +3876,8 @@ get({func}, {what}) *get()-func* < Return type: any, depending on {func} and {what} - *getbufinfo()* -getbufinfo([{buf}]) + +getbufinfo([{buf}]) *getbufinfo()* getbufinfo([{dict}]) Get information about buffers as a List of Dictionaries. @@ -3936,8 +3954,7 @@ getbufinfo([{dict}]) Return type: list> - *getbufline()* -getbufline({buf}, {lnum} [, {end}]) +getbufline({buf}, {lnum} [, {end}]) *getbufline()* Return a |List| with the lines starting from {lnum} to {end} (inclusive) in the buffer {buf}. If {end} is omitted, a |List| with only the line {lnum} is returned. See @@ -3967,15 +3984,15 @@ getbufline({buf}, {lnum} [, {end}]) < Return type: list - *getbufoneline()* -getbufoneline({buf}, {lnum}) + +getbufoneline({buf}, {lnum}) *getbufoneline()* Just like `getbufline()` but only get one line and return it as a string. Return type: |String| -getbufvar({buf}, {varname} [, {def}]) *getbufvar()* +getbufvar({buf}, {varname} [, {def}]) *getbufvar()* The result is the value of option or local buffer variable {varname} in buffer {buf}. Note that the name without "b:" must be used. @@ -4006,12 +4023,14 @@ getcellpixels() *getcellpixels()* Returns a |List| of terminal cell pixel size. List format is [xpixel, ypixel]. - Only works on Unix (terminal and gVim) and Windows (gVim only). + Only works on Unix (terminal and gVim) and Windows (gVim + only). Returns [] on other systems or on failure. - Note that there could be variations across different terminals. + Note that there could be variations across different + terminals. On macOS, system Terminal.app returns sizes in points (before - Retina scaling), whereas third-party terminals return raw pixel - sizes (post Retina scaling). + Retina scaling), whereas third-party terminals return raw + pixel sizes (post Retina scaling). In MacVim, there is a small delay after startup or changing 'guifont' before this will return the updated values. @@ -4028,8 +4047,8 @@ getcellwidths() *getcellwidths()* getchangelist([{buf}]) *getchangelist()* - Returns the |changelist| for the buffer {buf}. For the use - of {buf}, see |bufname()| above. If buffer {buf} doesn't + Returns the |changelist| for the buffer {buf}. For the use + of {buf}, see |bufname()| above. If buffer {buf} doesn't exist, an empty list is returned. The returned list contains two entries: a list with the change @@ -4040,7 +4059,7 @@ getchangelist([{buf}]) *getchangelist()* coladd column offset for 'virtualedit' lnum line number If buffer {buf} is the current buffer, then the current - position refers to the position in the list. For other + position refers to the position in the list. For other buffers, it is set to the length of the list. Can also be used as a |method|: > @@ -4077,9 +4096,9 @@ getchar([{expr} [, {opts}]]) *getchar()* When {expr} is 1 only the first byte is returned. For a one-byte character it is the character itself as a number. - Use nr2char() to convert it to a String. + Use |nr2char()| to convert it to a String. - Use getcharmod() to obtain any additional modifiers. + Use |getcharmod()| to obtain any additional modifiers. The optional argument {opts} is a Dict and supports the following items: @@ -4147,7 +4166,7 @@ getchar([{expr} [, {opts}]]) *getchar()* :endfunction < You may also receive synthetic characters, such as - ||. Often you will want to ignore this and get + ||. Often you will want to ignore this and get another character: > :function GetKey() : let c = getchar() @@ -4162,7 +4181,7 @@ getchar([{expr} [, {opts}]]) *getchar()* getcharmod() *getcharmod()* The result is a Number which is the state of the modifiers for - the last obtained character with getchar() or in another way. + the last obtained character with |getchar()| or in another way. These values are added together: 2 shift 4 control @@ -4180,7 +4199,7 @@ getcharmod() *getcharmod()* getcharpos({expr}) *getcharpos()* - Get the position for String {expr}. Same as |getpos()| but the + Get the position for String {expr}. Same as |getpos()| but the column number in the returned List is a character index instead of a byte index. If |getpos()| returns a very large column number, equal to @@ -4227,6 +4246,7 @@ getcharstr([{expr} [, {opts}]]) *getcharstr()* Return type: |String| + getcmdcomplpat() *getcmdcomplpat()* Return completion pattern of the current command-line. Only works when the command line is being edited, thus @@ -4304,7 +4324,7 @@ getcmdscreenpos() *getcmdscreenpos()* getcmdtype() *getcmdtype()* - Return the current command-line type. Possible return values + Return the current command-line type. Possible return values are: : normal Ex command > debug mode command |debug-mode| @@ -4322,15 +4342,15 @@ getcmdtype() *getcmdtype()* getcmdwintype() *getcmdwintype()* - Return the current |command-line-window| type. Possible return - values are the same as |getcmdtype()|. Returns an empty string + Return the current |command-line-window| type. Possible return + values are the same as |getcmdtype()|. Returns an empty string when not in the command-line window. Return type: |String| getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* - Return a list of command-line completion matches. The String + Return a list of command-line completion matches. The String {type} argument specifies what for. The following completion types are supported: @@ -4387,10 +4407,10 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* If the optional {filtered} flag is set to 1, then 'wildignore' is applied to filter the results. Otherwise all the matches - are returned. The 'wildignorecase' option always applies. + are returned. The 'wildignorecase' option always applies. If the 'wildoptions' option contains 'fuzzy', then fuzzy - matching is used to get the completion matches. Otherwise + matching is used to get the completion matches. Otherwise regular expression matching is used. Thus this function follows the user preference, what happens on the command line. If you do not want this you can make 'wildoptions' empty @@ -4409,6 +4429,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* < Return type: list + getcompletiontype({pat}) *getcompletiontype()* Return the type of the command-line completion using {pat}. When no corresponding completion type is found, an empty @@ -4418,8 +4439,8 @@ getcompletiontype({pat}) *getcompletiontype()* Return type: |String| - *getcurpos()* -getcurpos([{winid}]) + +getcurpos([{winid}]) *getcurpos()* Get the position of the cursor. This is like getpos('.'), but includes an extra "curswant" item in the list: [0, lnum, col, off, curswant] ~ @@ -4427,8 +4448,8 @@ getcurpos([{winid}]) cursor vertically. After |$| command it will be a very large number equal to |v:maxcol|. Also see |getcursorcharpos()| and |getpos()|. - The first "bufnum" item is always zero. The byte position of - the cursor is returned in 'col'. To get the character + The first "bufnum" item is always zero. The byte position of + the cursor is returned in 'col'. To get the character position, use |getcursorcharpos()|. The optional {winid} argument can specify the window. It can @@ -4450,7 +4471,7 @@ getcurpos([{winid}]) Return type: list -getcursorcharpos([{winid}]) *getcursorcharpos()* +getcursorcharpos([{winid}]) *getcursorcharpos()* Same as |getcurpos()| but the column number in the returned List is a character index instead of a byte index. @@ -4476,7 +4497,7 @@ getcwd([{winnr} [, {tabnr}]]) *getcwd()* directory. See also |haslocaldir()|. With {winnr} and {tabnr} return the local current directory of - the window in the specified tab page. If {winnr} is -1 return + the window in the specified tab page. If {winnr} is -1 return the working directory of the tabpage. If {winnr} is zero use the current window, if {tabnr} is zero use the current tabpage. @@ -4503,6 +4524,7 @@ getcwd([{winnr} [, {tabnr}]]) *getcwd()* < Return type: |String| + getenv({name}) *getenv()* Return the value of environment variable {name}. The {name} argument is a string, without a leading '$'. Example: > @@ -4576,7 +4598,7 @@ getfsize({fname}) *getfsize()* getftime({fname}) *getftime()* The result is a Number, which is the last modification time of the given file {fname}. The value is measured as seconds - since 1st Jan 1970, and may be passed to strftime(). See also + since 1st Jan 1970, and may be passed to |strftime()|. See also |localtime()| and |strftime()|. If the file {fname} can't be found -1 is returned. @@ -4612,6 +4634,7 @@ getftype({fname}) *getftype()* < Return type: |String| + getimstatus() *getimstatus()* The result is a Number, which is |TRUE| when the IME status is active and |FALSE| otherwise. @@ -4645,8 +4668,8 @@ getjumplist([{winnr} [, {tabnr}]]) *getjumplist()* < Return type: list - *getline()* -getline({lnum} [, {end}]) + +getline({lnum} [, {end}]) *getline()* Without {end} the result is a String, which is line {lnum} from the current buffer. Example: > getline(1) @@ -4683,19 +4706,19 @@ getloclist({nr} [, {what}]) *getloclist()* For a location list window, the displayed location list is returned. For an invalid window number {nr}, an empty list is - returned. Otherwise, same as |getqflist()|. + returned. Otherwise, same as |getqflist()|. If the optional {what} dictionary argument is supplied, then - returns the items listed in {what} as a dictionary. Refer to + returns the items listed in {what} as a dictionary. Refer to |getqflist()| for the supported items in {what}. In addition to the items supported by |getqflist()| in {what}, the following item is supported by |getloclist()|: filewinid id of the window used to display files - from the location list. This field is + from the location list. This field is applicable only when called from a - location list window. See + location list window. See |location-list-file-window| for more details. @@ -4806,7 +4829,7 @@ getmouseshape() *getmouseshape()* Return type: |String| -getpid() *getpid()* +getpid() *getpid()* Return a Number which is the process ID of the Vim process. On Unix and MS-Windows this is a unique number, until Vim exits. @@ -4814,9 +4837,9 @@ getpid() *getpid()* Return type: |Number| -getpos({expr}) *getpos()* +getpos({expr}) *getpos()* Get the position for String {expr}. - The accepted values for {expr} are: *E1209* + The accepted values for {expr} are: *E1209* . The cursor position. $ The last line in the current buffer. 'x Position of mark x (if the mark is not set, 0 is @@ -4856,7 +4879,7 @@ getpos({expr}) *getpos()* For getting the cursor position see |getcurpos()|. The column number in the returned List is the byte position - within the line. To get the character position in the line, + within the line. To get the character position in the line, use |getcharpos()|. Note that for '< and '> Visual mode matters: when it is "V" @@ -4883,7 +4906,7 @@ getqflist([{what}]) *getqflist()* Returns a |List| with all the current quickfix errors. Each list item is a dictionary with these entries: bufnr number of buffer that has the file name, use - bufname() to get the name + |bufname()| to get the name module module name lnum line number in the buffer (first line is 1) end_lnum @@ -4902,7 +4925,7 @@ getqflist([{what}]) *getqflist()* any type. When there is no error list or it's empty, an empty list is - returned. Quickfix list entries with a non-existing buffer + returned. Quickfix list entries with a non-existing buffer number are returned with "bufnr" set to zero (Note: some functions accept buffer number zero for the alternate buffer, you may need to explicitly check for zero). @@ -4915,12 +4938,12 @@ getqflist([{what}]) *getqflist()* :endfor < If the optional {what} dictionary argument is supplied, then - returns only the items listed in {what} as a dictionary. The + returns only the items listed in {what} as a dictionary. The following string items are supported in {what}: changedtick get the total number of changes made to the list |quickfix-changedtick| context get the |quickfix-context| - efm errorformat to use when parsing "lines". If + efm errorformat to use when parsing "lines". If not present, then the 'errorformat' option value is used. id get information for the quickfix list with @@ -4934,24 +4957,24 @@ getqflist([{what}]) *getqflist()* lines parse a list of lines using 'efm' and return the resulting entries. Only a |List| type is accepted. The current quickfix list is not - modified. See |quickfix-parse|. + modified. See |quickfix-parse|. nr get information for this quickfix list; zero means the current quickfix list and "$" means the last quickfix list qfbufnr number of the buffer displayed in the quickfix - window. Returns 0 if the quickfix buffer is - not present. See |quickfix-buffer|. + window. Returns 0 if the quickfix buffer is + not present. See |quickfix-buffer|. size number of entries in the quickfix list title get the list title |quickfix-title| winid get the quickfix |window-ID| all all of the above quickfix properties - Non-string items in {what} are ignored. To get the value of a + Non-string items in {what} are ignored. To get the value of a particular item, set it to zero. If "nr" is not present then the current quickfix list is used. If both "nr" and a non-zero "id" are specified, then the list specified by "id" is used. To get the number of lists in the quickfix stack, set "nr" to - "$" in {what}. The "nr" value in the returned dictionary + "$" in {what}. The "nr" value in the returned dictionary contains the quickfix stack size. When "lines" is specified, all the other items except "efm" are ignored. The returned dictionary contains the entry @@ -4960,22 +4983,23 @@ getqflist([{what}]) *getqflist()* The returned dictionary contains the following entries: changedtick total number of changes made to the list |quickfix-changedtick| - context quickfix list context. See |quickfix-context| + context quickfix list context. See |quickfix-context| If not present, set to "". - id quickfix list ID |quickfix-ID|. If not + id quickfix list ID |quickfix-ID|. If not present, set to 0. - idx index of the quickfix entry in the list. If not - present, set to 0. - items quickfix list entries. If not present, set to + idx index of the quickfix entry in the list. If + not present, set to 0. + items quickfix list entries. If not present, set to an empty list. - nr quickfix list number. If not present, set to 0 + nr quickfix list number. If not present, set to + 0 qfbufnr number of the buffer displayed in the quickfix - window. If not present, set to 0. - size number of entries in the quickfix list. If not - present, set to 0. - title quickfix list title text. If not present, set + window. If not present, set to 0. + size number of entries in the quickfix list. If + not present, set to 0. + title quickfix list title text. If not present, set to "". - winid quickfix |window-ID|. If not present, set to 0 + winid quickfix |window-ID|. If not present, set to 0 Examples (See also |getqflist-examples|): > :echo getqflist({'all': 1}) @@ -5000,7 +5024,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()* argument is ignored, thus you can always give it. If {list} is present and |TRUE|, the result type is changed - to |List|. Each list item is one text line. Use it if you care + to |List|. Each list item is one text line. Use it if you care about zero bytes possibly present inside register: without third argument both NLs and zero bytes are represented as NLs (see |NL-used-for-Nul|). @@ -5108,7 +5132,7 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()* Return type: list -getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()* +getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()* Same as |getregion()|, but returns a list of positions describing the buffer text segments bound by {pos1} and {pos2}. @@ -5174,7 +5198,7 @@ getscriptinfo([{opts}]) *getscriptinfo()* The optional Dict argument {opts} supports the following optional items: - name Script name match pattern. If specified, + name Script name match pattern. If specified, and "sid" is not specified, information about scripts with a name that match the pattern "name" are returned. @@ -5228,7 +5252,7 @@ getstacktrace() *getstacktrace()* gettabinfo([{tabnr}]) *gettabinfo()* If {tabnr} is not specified, then information about all the - tab pages is returned as a |List|. Each List item is a + tab pages is returned as a |List|. Each List item is a |Dictionary|. Otherwise, {tabnr} specifies the tab page number and information about that one is returned. If the tab page does not exist an empty List is returned. @@ -5245,7 +5269,7 @@ gettabinfo([{tabnr}]) *gettabinfo()* Return type: list> -gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* +gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* Get the value of a tab-local variable {varname} in tab page {tabnr}. |t:var| Tabs are numbered starting with one. @@ -5261,7 +5285,7 @@ gettabvar({tabnr}, {varname} [, {def}]) *gettabvar()* Return type: any, depending on {varname} -gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* +gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* Get the value of window-local variable {varname} in window {winnr} in tab page {tabnr}. The {varname} argument is a string. When {varname} is empty a @@ -5294,16 +5318,17 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()* gettagstack([{winnr}]) *gettagstack()* - The result is a Dict, which is the tag stack of window {winnr}. + The result is a Dict, which is the tag stack of window + {winnr}. {winnr} can be the window number or the |window-ID|. When {winnr} is not specified, the current window is used. When window {winnr} doesn't exist, an empty Dict is returned. The returned dictionary contains the following entries: - curidx Current index in the stack. When at + curidx Current index in the stack. When at top of the stack, set to (length + 1). Index of bottom of the stack is 1. - items List of items in the stack. Each item + items List of items in the stack. Each item is a dictionary containing the entries described below. length Number of entries in the stack. @@ -5314,9 +5339,9 @@ gettagstack([{winnr}]) *gettagstack()* from cursor position before the tag jump. See |getpos()| for the format of the returned list. - matchnr current matching tag number. Used when - multiple matching tags are found for a - name. + matchnr current matching tag number. Used + when multiple matching tags are found + for a name. tagname name of the tag See |tagstack| for more information about the tag stack. @@ -5421,7 +5446,7 @@ getwinpos([{timeout}]) *getwinpos()* getwinposx() *getwinposx()* The result is a Number, which is the X coordinate in pixels of - the left hand side of the GUI Vim window. Also works for an + the left hand side of the GUI Vim window. Also works for an xterm (uses a timeout of 100 msec). The result will be -1 if the information is not available (e.g. on the Wayland backend). @@ -5441,7 +5466,7 @@ getwinposy() *getwinposy()* Return type: |Number| -getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* +getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* Like |gettabwinvar()| for the current tabpage. Examples: > :let list_is_on = getwinvar(2, '&list') @@ -5453,7 +5478,7 @@ getwinvar({winnr}, {varname} [, {def}]) *getwinvar()* Return type: any, depending on {varname} -glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* +glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* Expand the file wildcards in {expr}. See |wildcards| for the use of special characters. @@ -5464,7 +5489,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* 'wildignorecase' always applies. When {list} is present and it is |TRUE| the result is a |List| - with all matching files. The advantage of using a List is, + with all matching files. The advantage of using a List is, you also get filenames containing newlines correctly. Otherwise the result is a String and when there are several matches, they are separated by characters. @@ -5497,7 +5522,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()* glob2regpat({string}) *glob2regpat()* - Convert a file pattern, as used by glob(), into a search + Convert a file pattern, as used by |glob()|, into a search pattern. The result can be used to match with a string that is a file name. E.g. > if filename =~ glob2regpat('Make*.mak') @@ -5513,9 +5538,9 @@ glob2regpat({string}) *glob2regpat()* < Return type: |String| - *globpath()* + *globpath()* globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) - Perform glob() for String {expr} on all directories in {path} + Perform |glob()| for String {expr} on all directories in {path} and concatenate the results. Example: > :echo globpath(&rtp, "syntax/c.vim") < @@ -5534,10 +5559,10 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) 'suffixes' affect the ordering of matches. When {list} is present and it is |TRUE| the result is a |List| - with all matching files. The advantage of using a List is, you - also get filenames containing newlines correctly. Otherwise - the result is a String and when there are several matches, - they are separated by characters. Example: > + with all matching files. The advantage of using a List is, + you also get filenames containing newlines correctly. + Otherwise the result is a String and when there are several + matches, they are separated by characters. Example: > :echo globpath(&rtp, "syntax/c.vim", 0, 1) < {alllinks} is used as with |glob()|. @@ -5557,7 +5582,7 @@ globpath({path}, {expr} [, {nosuf} [, {list} [, {alllinks}]]]) on {list} -has({feature} [, {check}]) *has()* +has({feature} [, {check}]) *has()* When {check} is omitted or is zero: The result is a Number, which is 1 if the feature {feature} is supported, zero otherwise. The {feature} argument is a string, case is @@ -5777,6 +5802,7 @@ histnr({history}) *histnr()* < Return type: |Number| + hlexists({name}) *hlexists()* The result is a Number, which is TRUE if a highlight group called {name} exists. This is when the group has been @@ -5808,24 +5834,24 @@ hlget([{name} [, {resolve}]]) *hlget()* cleared boolean flag, set to v:true if the highlight group attributes are cleared or not yet specified. See |highlight-clear|. - cterm cterm attributes. See |highlight-cterm|. + cterm cterm attributes. See |highlight-cterm|. ctermbg cterm background color. See |highlight-ctermbg|. ctermfg cterm foreground color. See |highlight-ctermfg|. ctermul cterm underline color. See |highlight-ctermul|. default boolean flag, set to v:true if the highlight - group link is a default link. See + group link is a default link. See |highlight-default|. font highlight group font. See |highlight-font|. - gui gui attributes. See |highlight-gui|. + gui gui attributes. See |highlight-gui|. guibg gui background color. See |highlight-guibg|. guifg gui foreground color. See |highlight-guifg|. guisp gui special color. See |highlight-guisp|. id highlight group ID. linksto linked highlight group name. See |:highlight-link|. - name highlight group name. See |group-name|. + name highlight group name. See |group-name|. start start terminal keycode. See |highlight-start|. stop stop terminal keycode. See |highlight-stop|. term term attributes. See |highlight-term|. @@ -5849,7 +5875,7 @@ hlget([{name} [, {resolve}]]) *hlget()* hlset({list}) *hlset()* Creates or modifies the attributes of a List of highlight groups. Each item in {list} is a dictionary containing the - attributes of a highlight group. See |hlget()| for the list of + attributes of a highlight group. See |hlget()| for the list of supported items in this dictionary. In addition to the items described in |hlget()|, the following @@ -5899,7 +5925,8 @@ hlset({list}) *hlset()* < Return type: |Number| -hlID({name}) *hlID()* + +hlID({name}) *hlID()* The result is a Number, which is the ID of the highlight group with name {name}. When the highlight group doesn't exist, zero is returned. @@ -5949,18 +5976,18 @@ iconv({string}, {from}, {to}) *iconv()* Return type: |String| -id({item}) *id()* +id({item}) *id()* The result is a unique String associated with the {item} and - not with the {item}'s contents. It is only valid while the - {item} exists and is referenced. It is valid only in the - instance of vim that produces the result. The whole idea is + not with the {item}'s contents. It is only valid while the + {item} exists and is referenced. It is valid only in the + instance of vim that produces the result. The whole idea is that `id({item})` does not change if the contents of {item} - changes. This is useful as a `key` for creating an identity + changes. This is useful as a `key` for creating an identity dictionary, rather than one based on equals. This operation does not reference {item} and there is no - function to convert the `id` to the {item}. It may be useful to - have a map of `id` to {item}. The following > + function to convert the `id` to the {item}. It may be useful to + have a map of `id` to {item}. The following > var referenceMap: dict var id = item->id() referenceMap[id] = item @@ -5968,7 +5995,7 @@ id({item}) *id()* way to get the {item} from the `id`. {item} may be a List, Tuple, Dictionary, Object, Job, Channel - or Blob. If the item is not a permitted type, or it is a null + or Blob. If the item is not a permitted type, or it is a null value, then an empty String is returned. Can also be used as a |method|: > @@ -5977,7 +6004,7 @@ id({item}) *id()* Return type: |String| -indent({lnum}) *indent()* +indent({lnum}) *indent()* The result is a Number, which is indent of line {lnum} in the current buffer. The indent is counted in spaces, the value of 'tabstop' is relevant. {lnum} is used just like in @@ -5991,7 +6018,7 @@ indent({lnum}) *indent()* Return type: |Number| -index({object}, {expr} [, {start} [, {ic}]]) *index()* +index({object}, {expr} [, {start} [, {ic}]]) *index()* Find {expr} in {object} and return its index. See |indexof()| for using a lambda to select the item. @@ -6117,7 +6144,7 @@ input({prompt} [, {text} [, {completion}]]) *input()* Return type: |String| -inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()* +inputdialog({prompt} [, {text} [, {cancelreturn}]]) *inputdialog()* Like |input()|, but when the GUI is running and text dialogs are supported, a dialog window pops up to input the text. Example: > @@ -6162,9 +6189,10 @@ inputlist({textlist}) *inputlist()* inputrestore() *inputrestore()* Restore typeahead that was saved with a previous |inputsave()|. - Should be called the same number of times inputsave() is + Should be called the same number of times |inputsave()| is called. Calling it more often is harmless though. - Returns TRUE when there is nothing to restore, FALSE otherwise. + Returns TRUE when there is nothing to restore, FALSE + otherwise. Return type: |Number| @@ -6172,9 +6200,9 @@ inputrestore() *inputrestore()* inputsave() *inputsave()* Preserve typeahead (also from mappings) and clear it, so that a following prompt gets input from the user. Should be - followed by a matching inputrestore() after the prompt. Can + followed by a matching |inputrestore()| after the prompt. Can be used several times, in which case there must be just as - many inputrestore() calls. + many |inputrestore()| calls. Returns TRUE when out of memory, FALSE otherwise. Return type: |Number| @@ -6220,8 +6248,7 @@ insert({object}, {item} [, {idx}]) *insert()* Return type: |Number| - *instanceof()* *E614* *E616* *E693* -instanceof({object}, {class}) +instanceof({object}, {class}) *instanceof()* *E614* *E616* *E693* The result is a Number, which is |TRUE| when the {object} argument is a direct or indirect instance of a |Class|, |Interface|, or class |:type| alias specified by {class}. @@ -6235,6 +6262,7 @@ instanceof({object}, {class}) < Return type: |Number| + interrupt() *interrupt()* Interrupt script execution. It works more or less like the user typing CTRL-C, most commands won't execute and control @@ -6250,6 +6278,7 @@ interrupt() *interrupt()* < Return type: void + invert({expr}) *invert()* Bitwise invert. The argument is converted to a number. A List, Dict or Float argument causes an error. Example: > @@ -6263,10 +6292,11 @@ invert({expr}) *invert()* isabsolutepath({path}) *isabsolutepath()* The result is a Number, which is |TRUE| when {path} is an absolute path. - On Unix, a path is considered absolute when it starts with '/'. - On MS-Windows, it is considered absolute when it starts with an - optional drive prefix and is followed by a '\' or '/'. UNC paths - are always absolute. + On Unix, a path is considered absolute when it starts with + '/'. + On MS-Windows, it is considered absolute when it starts with + an optional drive prefix and is followed by a '\' or '/'. UNC + paths are always absolute. Example: > echo isabsolutepath('/usr/share/') " 1 echo isabsolutepath('./foobar') " 0 @@ -6412,7 +6442,7 @@ js_encode({expr}) *js_encode()* [1,,{one:1},,] ~ While json_encode() would produce: [1,null,{"one":1},null] ~ - This encoding is valid for JavaScript. It is more efficient + This encoding is valid for JavaScript. It is more efficient than JSON, especially when using an array with optional items. Can also be used as a |method|: > @@ -6421,7 +6451,7 @@ js_encode({expr}) *js_encode()* Return type: |String| -json_decode({string}) *json_decode()* *E491* +json_decode({string}) *json_decode()* *E491* This parses a JSON formatted string and returns the equivalent in Vim values. See |json_encode()| for the relation between JSON and Vim values. @@ -6431,7 +6461,7 @@ json_decode({string}) *json_decode()* *E491* - Integer keys are accepted in objects, e.g. {1:2} is the same as {"1":2}. - More floating point numbers are recognized, e.g. "1." for - "1.0", or "001.2" for "1.2". Special floating point values + "1.0", or "001.2" for "1.2". Special floating point values "Infinity", "-Infinity" and "NaN" (capitalization ignored) are accepted. - Leading zeroes in integer numbers are ignored, e.g. "012" @@ -6449,7 +6479,7 @@ json_decode({string}) *json_decode()* *E491* a 12 character sequence such as "\uD834\uDD1E", but json_decode() silently accepts truncated surrogate pairs such as "\uD834" or "\uD834\u" - *E938* + *E938* A duplicate key in an object, valid in rfc7159, is not accepted by json_decode() as the result must be a valid Vim type, e.g. this fails: {"a":"b", "a":"c"} @@ -6539,8 +6569,7 @@ len({expr}) *len()* *E701* Return type: |Number| - *libcall()* *E364* *E368* -libcall({libname}, {funcname}, {argument}) +libcall({libname}, {funcname}, {argument}) *libcall()* *E364* *E368* Call function {funcname} in the run-time library {libname} with single argument {argument}. This is useful to call functions in a library that you @@ -6550,7 +6579,7 @@ libcall({libname}, {funcname}, {argument}) The result is the String returned by the function. If the function returns NULL, this will appear as an empty string "" to Vim. - If the function returns a number, use libcallnr()! + If the function returns a number, use |libcallnr()|! If {argument} is a number, it is passed to the function as an int; if {argument} is a string, it is passed as a null-terminated string. @@ -6589,8 +6618,8 @@ libcall({libname}, {funcname}, {argument}) third argument: > GetValue()->libcall("libc.so", "getenv") < - *libcallnr()* -libcallnr({libname}, {funcname}, {argument}) + +libcallnr({libname}, {funcname}, {argument}) *libcallnr()* Just like |libcall()|, but used for a function that returns an int instead of a string. {only in Win32 and some Unix versions, when the |+libcall| @@ -6694,7 +6723,8 @@ list2str({list} [, {utf8}]) *list2str()* join(map(list, {nr, val -> nr2char(val)}), '') < |str2list()| does the opposite. - When {utf8} is omitted or zero, the current 'encoding' is used. + When {utf8} is omitted or zero, the current 'encoding' is + used. When {utf8} is TRUE, always return UTF-8 characters. With UTF-8 composing characters work as expected: > list2str([97, 769]) returns "á" @@ -6729,7 +6759,7 @@ list2tuple({list}) *list2tuple()* listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()* Add a callback function that will be invoked when changes have been made to buffer {buf}. - {buf} refers to a buffer name or number. For the accepted + {buf} refers to a buffer name or number. For the accepted values, see |bufname()|. When {buf} is omitted the current buffer is used. Returns a unique ID that can be passed to |listener_remove()|. @@ -6795,16 +6825,16 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()* Because of the third trigger reason for triggering a callback listed above, the line numbers passed to the callback are not - guaranteed to be valid. If this is a problem then make + guaranteed to be valid. If this is a problem then make {unbuffered} |TRUE|. When {unbuffered} is |TRUE| the {callback} is invoked for every - single change. The changes list only holds a single dictionary - and the "start", "end" and "added" values in the dictionary are - the same as the corresponding callback arguments. The line - numbers are valid when the callback is invoked, but later - changes may make them invalid, thus keeping a copy for later - might not work. + single change. The changes list only holds a single + dictionary and the "start", "end" and "added" values in the + dictionary are the same as the corresponding callback + arguments. The line numbers are valid when the callback is + invoked, but later changes may make them invalid, thus keeping + a copy for later might not work. The {callback} is invoked with the text locked, see |textlock|. If you do need to make changes to the buffer, use @@ -6831,7 +6861,7 @@ listener_flush([{buf}]) *listener_flush()* Invoke listener callbacks for buffer {buf}. If there are no pending changes then no callbacks are invoked. - {buf} refers to a buffer name or number. For the accepted + {buf} refers to a buffer name or number. For the accepted values, see |bufname()|. When {buf} is omitted the current buffer is used. @@ -6842,7 +6872,7 @@ listener_flush([{buf}]) *listener_flush()* listener_remove({id}) *listener_remove()* - Remove a listener previously added with listener_add(). + Remove a listener previously added with |listener_add()|. Returns FALSE when {id} could not be found, TRUE when {id} was removed. @@ -6892,9 +6922,9 @@ log10({expr}) *log10()* Return type: |Float| -luaeval({expr} [, {expr}]) *luaeval()* +luaeval({expr} [, {expr}]) *luaeval()* Evaluate Lua expression {expr} and return its result converted - to Vim data structures. Second {expr} may hold additional + to Vim data structures. Second {expr} may hold additional argument accessible as _A inside first {expr}. Strings are returned as they are. Boolean objects are converted to numbers. @@ -6931,7 +6961,7 @@ map({expr1}, {expr2}) *map()* of the current item. For a |Dictionary| |v:key| has the key of the current item and for a |List| |v:key| has the index of the current item. For a |Blob| |v:key| has the index of the - current byte. For a |String| |v:key| has the index of the + current byte. For a |String| |v:key| has the index of the current character. Example: > :call map(mylist, '"> " .. v:val .. " <"') @@ -6949,7 +6979,7 @@ map({expr1}, {expr2}) *map()* accepts one argument, but with a Vim9 lambda you get "E1106: One argument too many", the number of arguments must match. - The function must return the new value of the item. Example + The function must return the new value of the item. Example that changes each value by "key-value": > func KeyValue(key, val) return a:key .. '-' .. a:val @@ -6970,8 +7000,8 @@ map({expr1}, {expr2}) *map()* or a new |Blob| or |String|. When an error is encountered while evaluating {expr2} no further items in {expr1} are processed. - When {expr2} is a Funcref errors inside a function are ignored, - unless it was defined with the "abort" flag. + When {expr2} is a Funcref errors inside a function are + ignored, unless it was defined with the "abort" flag. Can also be used as a |method|: > mylist->map(expr2) @@ -6980,12 +7010,12 @@ map({expr1}, {expr2}) *map()* depending on {expr1} -maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* +maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* When {dict} is omitted or zero: Return the rhs of mapping {name} in mode {mode}. The returned String has special characters translated like in the output of the ":map" command - listing. When {dict} is TRUE a dictionary is returned, see - below. To get a list of all mappings see |maplist()|. + listing. When {dict} is TRUE a dictionary is returned, see + below. To get a list of all mappings see |maplist()|. When there is no mapping for {name}, an empty String is returned if {dict} is FALSE, otherwise returns an empty Dict. @@ -7024,7 +7054,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()* "script" 1 if mapping was defined with