mirror of
https://github.com/vim/vim
synced 2025-08-01 19:31:52 +00:00
Compare commits
58 Commits
Author | SHA1 | Date | |
---|---|---|---|
b88f9e4a04 | |||
0fde6aebdd | |||
43b99c9376 | |||
624b75a272 | |||
64329714c7 | |||
25ea22439e | |||
cced80dcbb | |||
e9d1259111 | |||
af9a7a04f1 | |||
44309b9d08 | |||
b124b8d276 | |||
a566a78029 | |||
0bda7830ac | |||
827483054d | |||
1a2c4932a3 | |||
1a224edb2e | |||
9239eadc71 | |||
4de931daae | |||
72473ce9f8 | |||
3add0d5e75 | |||
6e1c84cc4d | |||
48a3b146b4 | |||
714671de35 | |||
15dd6b4272 | |||
5608f3dc93 | |||
2566a9f290 | |||
aa55185100 | |||
2f4be00ca5 | |||
9d5bb58637 | |||
d680d40539 | |||
774fe9d8fc | |||
5711d76818 | |||
61cec2e761 | |||
97194523d5 | |||
13e1af7de9 | |||
7cf31ce9c4 | |||
ad5c9b4b11 | |||
3416cee36f | |||
b486ed8266 | |||
689f3bf313 | |||
e1c507a965 | |||
b2013396d4 | |||
1f6faff912 | |||
c02bef26fd | |||
9f4a80e2a7 | |||
2844765e90 | |||
8b004081c4 | |||
239c4e4abe | |||
1afe8c3a4d | |||
31ec66403d | |||
88b735973c | |||
5eb9448743 | |||
d8be37af0f | |||
ba023e135b | |||
d3170f59e0 | |||
a2578e08d5 | |||
3c8d32e4fc | |||
16f7098e68 |
@ -23,7 +23,7 @@ freebsd_task:
|
||||
- sudo -u cirrus make test
|
||||
on_failure:
|
||||
test_artifacts:
|
||||
name: "Cirrus-CI-freebsd-failed-tests"
|
||||
name: "Cirrus-${CIRRUS_BUILD_ID}-freebsd-failed-tests"
|
||||
path: |
|
||||
runtime/indent/testdir/*.fail
|
||||
runtime/syntax/testdir/failed/*
|
||||
|
20
.gitattributes
vendored
20
.gitattributes
vendored
@ -1,11 +1,25 @@
|
||||
src/testdir/test42.in diff
|
||||
|
||||
# vim.pot may change just by incrementing a patch number
|
||||
# so ignore the following differences:
|
||||
# `vim.pot` is updated every time any of the *.c files are modified. And as it
|
||||
# contains line numbers for strings from *.c files, inserting a line into a
|
||||
# single .c file may cause many lines in the `vim.pot` file to be updated.
|
||||
#
|
||||
# This generates a lot of "noise" in the diffs. And especially considering that
|
||||
# `vim.pot` is a generated file, looking at changes in this file is not useful.
|
||||
#
|
||||
# By marking it as binary we tell the git machinery that it should not be
|
||||
# presented to the user in patches, use "git diff --text" to override
|
||||
src/po/vim.pot -diff
|
||||
|
||||
# Although vim.pot has been marked as binary, you may want to check the textual differences
|
||||
# using git --text but still want to ignore some noisy output like:
|
||||
# - POT-Creation Date
|
||||
# - comments pointing to the message source location in
|
||||
# *.c/*.h/*.vim/*.cpp/*.in/*.xs files followed by line numbers
|
||||
# set this up using:
|
||||
# Note: location comments should be no longer part of vim.pot, since commit 2844765e903214490e1
|
||||
# which add the --no-location argument for xgettext to no longer ouput such comments
|
||||
#
|
||||
# To ignore certain changes, setup a custom textconv filter using:
|
||||
# git config diff.ignore_vim_pot.textconv "grep -Ev '^.(POT-Creation-Date:|.*\\.([ch]|vim|in|xs|cpp):).*$'"
|
||||
src/po/vim.pot diff=ignore_vim_pot
|
||||
|
||||
|
1
.github/MAINTAINERS
vendored
1
.github/MAINTAINERS
vendored
@ -315,6 +315,7 @@ runtime/ftplugin/twig.vim @ribru17
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
runtime/ftplugin/typescriptreact.vim @dkearns
|
||||
runtime/ftplugin/typst.vim @saccarosium
|
||||
runtime/ftplugin/uc.vim @ribru17
|
||||
runtime/ftplugin/unison.vim @chuwy
|
||||
runtime/ftplugin/v.vim @ribru17
|
||||
runtime/ftplugin/vdf.vim @ObserverOfTime
|
||||
|
2
.github/actions/test_artifacts/action.yml
vendored
2
.github/actions/test_artifacts/action.yml
vendored
@ -7,7 +7,7 @@ runs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
# Name of the artifact to upload.
|
||||
name: ${{ github.workflow }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-tests
|
||||
name: GH-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-tests
|
||||
|
||||
# A file, directory or wildcard pattern that describes what
|
||||
# to upload.
|
||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -315,7 +315,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Test
|
||||
timeout-minutes: 25
|
||||
timeout-minutes: 30
|
||||
run: |
|
||||
make ${SHADOWOPT} ${TEST}
|
||||
|
||||
|
2
Filelist
2
Filelist
@ -177,6 +177,7 @@ SRC_ALL = \
|
||||
src/vim9compile.c \
|
||||
src/vim9execute.c \
|
||||
src/vim9expr.c \
|
||||
src/vim9generics.c \
|
||||
src/vim9instr.c \
|
||||
src/vim9script.c \
|
||||
src/vim9type.c \
|
||||
@ -362,6 +363,7 @@ SRC_ALL = \
|
||||
src/proto/vim9compile.pro \
|
||||
src/proto/vim9execute.pro \
|
||||
src/proto/vim9expr.pro \
|
||||
src/proto/vim9generics.pro \
|
||||
src/proto/vim9instr.pro \
|
||||
src/proto/vim9script.pro \
|
||||
src/proto/vim9type.pro \
|
||||
|
@ -3,7 +3,7 @@ vim9script noclear
|
||||
# Vim completion script
|
||||
# Language: C
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2024 Jun 06
|
||||
# Last Change: 2025 Jul 24
|
||||
# Rewritten in Vim9 script by github user lacygoill
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
@ -121,6 +121,10 @@ export def Complete(findstart: bool, abase: string): any # {{{1
|
||||
endif
|
||||
endwhile
|
||||
|
||||
if complete_check()
|
||||
return v:none
|
||||
endif
|
||||
|
||||
# Find the variable items[0].
|
||||
# 1. in current function (like with "gd")
|
||||
# 2. in tags file(s) (like with ":tag")
|
||||
@ -135,6 +139,9 @@ export def Complete(findstart: bool, abase: string): any # {{{1
|
||||
# Handle multiple declarations on the same line.
|
||||
var col2: number = col - 1
|
||||
while line[col2] != ';'
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
--col2
|
||||
endwhile
|
||||
line = line[col2 + 1 :]
|
||||
@ -145,6 +152,9 @@ export def Complete(findstart: bool, abase: string): any # {{{1
|
||||
# declaration.
|
||||
var col2: number = col - 1
|
||||
while line[col2] != ','
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
--col2
|
||||
endwhile
|
||||
if line[col2 + 1 : col - 1] =~ ' *[^ ][^ ]* *[^ ]'
|
||||
@ -215,6 +225,9 @@ export def Complete(findstart: bool, abase: string): any # {{{1
|
||||
|
||||
res = []
|
||||
for i: number in len(diclist)->range()
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
# New ctags has the "typeref" field. Patched version has "typename".
|
||||
if diclist[i]->has_key('typename')
|
||||
res = res->extend(diclist[i]['typename']->StructMembers(items[1 :], true))
|
||||
@ -246,6 +259,9 @@ export def Complete(findstart: bool, abase: string): any # {{{1
|
||||
var last: number = len(items) - 1
|
||||
var brackets: string = ''
|
||||
while last >= 0
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
if items[last][0] != '['
|
||||
break
|
||||
endif
|
||||
@ -311,6 +327,9 @@ def Dict2info(dict: dict<any>): string # {{{1
|
||||
# Use all the items in dictionary for the "info" entry.
|
||||
var info: string = ''
|
||||
for k: string in dict->keys()->sort()
|
||||
if complete_check()
|
||||
return info
|
||||
endif
|
||||
info ..= k .. repeat(' ', 10 - strlen(k))
|
||||
if k == 'cmd'
|
||||
info ..= dict['cmd']
|
||||
@ -346,6 +365,9 @@ def ParseTagline(line: string): dict<any> # {{{1
|
||||
endwhile
|
||||
endif
|
||||
for i: number in range(n + 1, len(l) - 1)
|
||||
if complete_check()
|
||||
return d
|
||||
endif
|
||||
if l[i] == 'file:'
|
||||
d['static'] = 1
|
||||
elseif l[i] !~ ':'
|
||||
@ -441,6 +463,9 @@ def Nextitem( # {{{1
|
||||
# Try to recognize the type of the variable. This is rough guessing...
|
||||
var res: list<dict<string>>
|
||||
for tidx: number in len(tokens)->range()
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
|
||||
# Skip tokens starting with a non-ID character.
|
||||
if tokens[tidx] !~ '^\h'
|
||||
@ -467,6 +492,11 @@ def Nextitem( # {{{1
|
||||
# Use the tags file to find out if this is a typedef.
|
||||
var diclist: list<dict<any>> = taglist('^' .. tokens[tidx] .. '$')
|
||||
for tagidx: number in len(diclist)->range()
|
||||
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
|
||||
var item: dict<any> = diclist[tagidx]
|
||||
|
||||
# New ctags has the "typeref" field. Patched version has "typename".
|
||||
@ -559,6 +589,9 @@ def StructMembers( # {{{1
|
||||
endif
|
||||
if !cached
|
||||
while 1
|
||||
if complete_check()
|
||||
return []
|
||||
endif
|
||||
execute 'silent! keepjumps noautocmd '
|
||||
.. n .. 'vimgrep ' .. '/\t' .. typename .. '\(\t\|$\)/j '
|
||||
.. fnames
|
||||
@ -581,6 +614,9 @@ def StructMembers( # {{{1
|
||||
var idx: number = 0
|
||||
var target: string
|
||||
while 1
|
||||
if complete_check()
|
||||
return []
|
||||
endif
|
||||
if idx >= len(items)
|
||||
target = '' # No further items, matching all members
|
||||
break
|
||||
@ -619,6 +655,9 @@ def StructMembers( # {{{1
|
||||
# Skip over next [...] items
|
||||
++idx
|
||||
while 1
|
||||
if complete_check()
|
||||
return matches
|
||||
endif
|
||||
if idx >= len(items)
|
||||
return matches # No further items, return the result.
|
||||
endif
|
||||
@ -646,6 +685,9 @@ def SearchMembers( # {{{1
|
||||
# When "all" is true find all, otherwise just return 1 if there is any member.
|
||||
var res: list<dict<string>>
|
||||
for i: number in len(matches)->range()
|
||||
if complete_check()
|
||||
return res
|
||||
endif
|
||||
var typename: string = ''
|
||||
var line: string
|
||||
if matches[i]->has_key('dict')
|
||||
|
67
runtime/autoload/dist/vimindent.vim
vendored
67
runtime/autoload/dist/vimindent.vim
vendored
@ -2,12 +2,9 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2025 Apr 13
|
||||
# Last Change: 2025 Jul 25
|
||||
#
|
||||
# Includes changes from The Vim Project:
|
||||
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
|
||||
# - 2024 Nov 08: Fix indent after :silent! function (D. Kearns via #16009)
|
||||
# - 2024 Dec 26: Fix indent for enums (Jim Zhou via #16293)
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
@ -23,9 +20,8 @@ def IndentMoreInBracketBlock(): number # {{{2
|
||||
if get(g:, 'vim_indent', {})
|
||||
->get('more_in_bracket_block', false)
|
||||
return shiftwidth()
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
return 0
|
||||
enddef
|
||||
|
||||
def IndentMoreLineContinuation(): number # {{{2
|
||||
@ -35,9 +31,8 @@ def IndentMoreLineContinuation(): number # {{{2
|
||||
|
||||
if n->typename() == 'string'
|
||||
return n->eval()
|
||||
else
|
||||
return n
|
||||
endif
|
||||
return n
|
||||
enddef
|
||||
# }}}2
|
||||
|
||||
@ -145,7 +140,7 @@ const HEREDOC_OPERATOR: string = '\s=<<\s\@=\%(\s\+\%(trim\|eval\)\)\{,2}'
|
||||
|
||||
# A better regex would be:
|
||||
#
|
||||
# [^-+*/%.:# \t[:alnum:]\"|]\@=.\|->\@!\%(=\s\)\@!\|[+*/%]\%(=\s\)\@!
|
||||
# [^-+*/%.:#[:blank:][:alnum:]\"|]\|->\@!\%(=\s\)\@!\|[+*/%]\%(=\s\)\@!
|
||||
#
|
||||
# But sometimes, it can be too costly and cause `E363` to be given.
|
||||
const PATTERN_DELIMITER: string = '[-+*/%]\%(=\s\)\@!'
|
||||
@ -193,10 +188,9 @@ const MODIFIERS: dict<string> = {
|
||||
patterns =<< trim eval END
|
||||
argdo\>!\=
|
||||
bufdo\>!\=
|
||||
cdo\>!\=
|
||||
[cl]f\=do\>!\=
|
||||
folddoc\%[losed]\>
|
||||
foldd\%[oopen]\>
|
||||
ldo\=\>!\=
|
||||
tabdo\=\>
|
||||
windo\>
|
||||
au\%[tocmd]\>!\=.*
|
||||
@ -290,9 +284,9 @@ patterns = []
|
||||
for kwds: list<string> in BLOCKS
|
||||
for kwd: string in kwds[0 : -2]
|
||||
if MODIFIERS->has_key(kwd->Unshorten())
|
||||
patterns += [$'\%({MODIFIERS[kwd]}\)\={kwd}']
|
||||
patterns->add($'\%({MODIFIERS[kwd]}\)\={kwd}')
|
||||
else
|
||||
patterns += [kwd]
|
||||
patterns->add(kwd)
|
||||
endif
|
||||
endfor
|
||||
endfor
|
||||
@ -348,7 +342,8 @@ patterns =<< trim eval END
|
||||
{'\'}<argd\%[elete]\s\+\*\s*$
|
||||
\<[lt]\=cd!\=\s\+-\s*$
|
||||
\<norm\%[al]!\=\s*\S\+$
|
||||
\%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)map!\=\s
|
||||
\%(\<sil\%[ent]!\=\s\+\)\=\<[nvxsoilct]\=\%(nore\|un\)\=map!\=\s
|
||||
\<set\%(\%[global]\|\%[local]\)\>.*,$
|
||||
{PLUS_MINUS_COMMAND}
|
||||
END
|
||||
|
||||
@ -430,6 +425,9 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
elseif line_A.lnum->IsRightBelow('HereDoc')
|
||||
var ind: number = b:vimindent.startindent
|
||||
unlet! b:vimindent
|
||||
if line_A.text =~ ENDS_BLOCK_OR_CLAUSE
|
||||
return ind - shiftwidth()
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
|
||||
@ -444,9 +442,8 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
if line_A.text =~ BACKSLASH_AT_SOL
|
||||
if line_B.text =~ BACKSLASH_AT_SOL
|
||||
return Indent(line_B.lnum)
|
||||
else
|
||||
return Indent(line_B.lnum) + IndentMoreLineContinuation()
|
||||
endif
|
||||
return Indent(line_B.lnum) + IndentMoreLineContinuation()
|
||||
endif
|
||||
|
||||
if line_A->AtStartOf('FuncHeader')
|
||||
@ -459,9 +456,8 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
unlet! b:vimindent
|
||||
if line_A.text =~ ENDS_FUNCTION
|
||||
return startindent
|
||||
else
|
||||
return startindent + shiftwidth()
|
||||
endif
|
||||
return startindent + shiftwidth()
|
||||
endif
|
||||
|
||||
var past_bracket_block: dict<any>
|
||||
@ -542,8 +538,9 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
|
||||
if line_B.text =~ STARTS_CURLY_BLOCK
|
||||
return Indent(line_B.lnum) + shiftwidth() + IndentMoreInBracketBlock()
|
||||
endif
|
||||
|
||||
elseif line_A.text =~ CLOSING_BRACKET_AT_SOL
|
||||
if line_A.text =~ CLOSING_BRACKET_AT_SOL
|
||||
var start: number = MatchingOpenBracket(line_A)
|
||||
if start <= 0
|
||||
return -1
|
||||
@ -565,9 +562,8 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
var block_start: number = SearchPairStart(start, middle, end)
|
||||
if block_start > 0
|
||||
return Indent(block_start)
|
||||
else
|
||||
return -1
|
||||
endif
|
||||
return -1
|
||||
endif
|
||||
|
||||
var base_ind: number
|
||||
@ -591,8 +587,7 @@ export def Expr(lnum = v:lnum): number # {{{2
|
||||
endif
|
||||
endif
|
||||
|
||||
var ind: number = base_ind + Offset(line_A, line_B)
|
||||
return [ind, 0]->max()
|
||||
return base_ind + Offset(line_A, line_B)
|
||||
enddef
|
||||
|
||||
def g:GetVimIndent(): number # {{{2
|
||||
@ -611,29 +606,31 @@ def Offset( # {{{2
|
||||
if line_B->AtStartOf('FuncHeader')
|
||||
&& IsInInterface()
|
||||
return 0
|
||||
endif
|
||||
|
||||
# increase indentation inside a block
|
||||
elseif line_B.text =~ STARTS_NAMED_BLOCK
|
||||
if line_B.text =~ STARTS_NAMED_BLOCK
|
||||
|| line_B->EndsWithCurlyBlock()
|
||||
# But don't indent if the line starting the block also closes it.
|
||||
if line_B->AlsoClosesBlock()
|
||||
return 0
|
||||
endif
|
||||
# Indent twice for a line continuation in the block header itself, so that
|
||||
# we can easily distinguish the end of the block header from the start of
|
||||
# the block body.
|
||||
elseif (line_B->EndsWithLineContinuation()
|
||||
if (line_B->EndsWithLineContinuation()
|
||||
&& !line_A.isfirst)
|
||||
|| (line_A.text =~ LINE_CONTINUATION_AT_SOL
|
||||
&& line_A.text !~ PLUS_MINUS_COMMAND)
|
||||
|| line_A.text->Is_IN_KeywordForLoop(line_B.text)
|
||||
return 2 * shiftwidth()
|
||||
else
|
||||
return shiftwidth()
|
||||
endif
|
||||
return shiftwidth()
|
||||
endif
|
||||
|
||||
# increase indentation of a line if it's the continuation of a command which
|
||||
# started on a previous line
|
||||
elseif !line_A.isfirst
|
||||
if !line_A.isfirst
|
||||
&& (line_B->EndsWithLineContinuation()
|
||||
|| line_A.text =~ LINE_CONTINUATION_AT_SOL)
|
||||
&& !(line_B->EndsWithComma() && line_A.lnum->IsInside('EnumBlock'))
|
||||
@ -653,12 +650,11 @@ def HereDocIndent(line_A: string): number # {{{2
|
||||
# will need to be indented relative to the start of the heredoc. It
|
||||
# must know where it starts; it needs the cache.
|
||||
return 0
|
||||
else
|
||||
var ind: number = b:vimindent.startindent
|
||||
# invalidate the cache so that it's not used for the next heredoc
|
||||
unlet! b:vimindent
|
||||
return ind
|
||||
endif
|
||||
var ind: number = b:vimindent.startindent
|
||||
# invalidate the cache so that it's not used for the next heredoc
|
||||
unlet! b:vimindent
|
||||
return ind
|
||||
endif
|
||||
|
||||
# In a non-trimmed heredoc, all of leading whitespace is semantic.
|
||||
@ -700,7 +696,7 @@ def HereDocIndent(line_A: string): number # {{{2
|
||||
b:vimindent.startindent = new_startindent
|
||||
endif
|
||||
|
||||
return [0, Indent(v:lnum) + b:vimindent.offset]->max()
|
||||
return Indent(v:lnum) + b:vimindent.offset
|
||||
enddef
|
||||
|
||||
def CommentIndent(): number # {{{2
|
||||
@ -727,9 +723,8 @@ def CommentIndent(): number # {{{2
|
||||
endif
|
||||
if getline(next) =~ ENDS_BLOCK
|
||||
return ind + shiftwidth()
|
||||
else
|
||||
return ind
|
||||
endif
|
||||
return ind
|
||||
enddef
|
||||
|
||||
def BracketBlockIndent(line_A: dict<any>, block: dict<any>): number # {{{2
|
||||
|
@ -1,6 +1,8 @@
|
||||
" Author: Stephen Sugden <stephen@stephensugden.com>
|
||||
" Last Modified: 2023-09-11
|
||||
" Last Change: 2025 Mar 31 by Vim project (rename s:RustfmtConfigOptions())
|
||||
" Last Change:
|
||||
" 2025 Mar 31 by Vim project (rename s:RustfmtConfigOptions())
|
||||
" 2025 Jul 14 by Vim project (don't parse rustfmt version automatically #17745)
|
||||
"
|
||||
" Adapted from https://github.com/fatih/vim-go
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
@ -22,6 +24,12 @@ if !exists("g:rustfmt_fail_silently")
|
||||
endif
|
||||
|
||||
function! rustfmt#DetectVersion()
|
||||
let s:rustfmt_version = "0"
|
||||
let s:rustfmt_help = ""
|
||||
let s:rustfmt_unstable_features = ""
|
||||
if !get(g:, 'rustfmt_detect_version', 0)
|
||||
return s:rustfmt_version
|
||||
endif
|
||||
" Save rustfmt '--help' for feature inspection
|
||||
silent let s:rustfmt_help = system(g:rustfmt_command . " --help")
|
||||
let s:rustfmt_unstable_features = s:rustfmt_help =~# "--unstable-features"
|
||||
@ -30,9 +38,7 @@ function! rustfmt#DetectVersion()
|
||||
silent let l:rustfmt_version_full = system(g:rustfmt_command . " --version")
|
||||
let l:rustfmt_version_list = matchlist(l:rustfmt_version_full,
|
||||
\ '\vrustfmt ([0-9]+[.][0-9]+[.][0-9]+)')
|
||||
if len(l:rustfmt_version_list) < 3
|
||||
let s:rustfmt_version = "0"
|
||||
else
|
||||
if len(l:rustfmt_version_list) >= 3
|
||||
let s:rustfmt_version = l:rustfmt_version_list[1]
|
||||
endif
|
||||
return s:rustfmt_version
|
||||
@ -63,6 +69,12 @@ function! s:RustfmtWriteMode()
|
||||
endfunction
|
||||
|
||||
function! rustfmt#RustfmtConfigOptions()
|
||||
let default = '--edition 2018'
|
||||
|
||||
if !get(g:, 'rustfmt_find_toml', 0)
|
||||
return default
|
||||
endif
|
||||
|
||||
let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';')
|
||||
if l:rustfmt_toml !=# ''
|
||||
return '--config-path '.shellescape(fnamemodify(l:rustfmt_toml, ":p"))
|
||||
@ -74,7 +86,7 @@ function! rustfmt#RustfmtConfigOptions()
|
||||
endif
|
||||
|
||||
" Default to edition 2018 in case no rustfmt.toml was found.
|
||||
return '--edition 2018'
|
||||
return default
|
||||
endfunction
|
||||
|
||||
function! s:RustfmtCommandRange(filename, line1, line2)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 17
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -757,6 +757,7 @@ virtcol2col({winid}, {lnum}, {col})
|
||||
Number byte index of a character on screen
|
||||
visualmode([{expr}]) String last visual mode used
|
||||
wildmenumode() Number whether 'wildmenu' mode is active
|
||||
wildtrigger() Number start wildcard expansion
|
||||
win_execute({id}, {command} [, {silent}])
|
||||
String execute {command} in window {id}
|
||||
win_findbuf({bufnr}) List find windows containing {bufnr}
|
||||
@ -12331,6 +12332,33 @@ wildmenumode() *wildmenumode()*
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
wildtrigger() *wildtrigger()*
|
||||
Start wildcard expansion in the command-line, using the
|
||||
behavior defined by the 'wildmode' and 'wildoptions' settings.
|
||||
See |cmdline-completion|.
|
||||
|
||||
This function also enables completion in search patterns such
|
||||
as |/|, |?|, |:s|, |:g|, |:v| and |:vimgrep|.
|
||||
|
||||
Unlike pressing 'wildchar' manually, this function does not
|
||||
produce a beep when no matches are found and generally
|
||||
operates more quietly. This makes it suitable for triggering
|
||||
completion automatically, such as from an |:autocmd|.
|
||||
*cmdline-autocompletion*
|
||||
Example: To make the completion menu pop up automatically as
|
||||
you type on the command line, use: >
|
||||
autocmd CmdlineChanged [:/?] call wildtrigger()
|
||||
set wildmode=noselect:lastused,full wildoptions=pum
|
||||
<
|
||||
To retain normal history navigation (up/down keys): >
|
||||
cnoremap <Up> <C-U><Up>
|
||||
cnoremap <Down> <C-U><Down>
|
||||
<
|
||||
Return value is always 0.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
Like `execute()` but in the context of window {id}.
|
||||
The window will temporarily be made the current window,
|
||||
|
@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.1. Last change: 2025 Jun 28
|
||||
*cmdline.txt* For Vim version 9.1. Last change: 2025 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -479,6 +479,8 @@ When repeating 'wildchar' or CTRL-N you cycle through the matches, eventually
|
||||
ending up back to what was typed. If the first match is not what you wanted,
|
||||
you can use <S-Tab> or CTRL-P to go straight back to what you typed.
|
||||
|
||||
See also |wildtrigger()|.
|
||||
|
||||
The 'wildmenu' option can be set to show the matches just above the command
|
||||
line.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 9.1. Last change: 2025 Jul 18
|
||||
*develop.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -10,9 +10,9 @@ This text is important for those who want to be involved in further developing
|
||||
Vim.
|
||||
|
||||
1. Design goals |design-goals|
|
||||
2. Coding style |coding-style|
|
||||
3. Design decisions |design-decisions|
|
||||
4. Assumptions |design-assumptions|
|
||||
2. Design decisions |design-decisions|
|
||||
3. Assumptions |design-assumptions|
|
||||
4. Coding style |coding-style|
|
||||
|
||||
See the file README.txt in the "src" directory for an overview of the source
|
||||
code.
|
||||
@ -159,7 +159,204 @@ VIM IS... NOT *design-not*
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Coding style *coding-style*
|
||||
2. Design decisions *design-decisions*
|
||||
|
||||
Folding
|
||||
|
||||
Several forms of folding should be possible for the same buffer. For example,
|
||||
have one window that shows the text with function bodies folded, another
|
||||
window that shows a function body.
|
||||
|
||||
Folding is a way to display the text. It should not change the text itself.
|
||||
Therefore the folding has been implemented as a filter between the text stored
|
||||
in a buffer (buffer lines) and the text displayed in a window (logical lines).
|
||||
|
||||
|
||||
Naming the window
|
||||
|
||||
The word "window" is commonly used for several things: A window on the screen,
|
||||
the xterm window, a window inside Vim to view a buffer.
|
||||
To avoid confusion, other items that are sometimes called window have been
|
||||
given another name. Here is an overview of the related items:
|
||||
|
||||
screen The whole display. For the GUI it's something like 1024x768
|
||||
pixels. The Vim shell can use the whole screen or part of it.
|
||||
shell The Vim application. This can cover the whole screen (e.g.,
|
||||
when running in a console) or part of it (xterm or GUI).
|
||||
window View on a buffer. There can be several windows in Vim,
|
||||
together with the command line, menubar, toolbar, etc. they
|
||||
fit in the shell.
|
||||
|
||||
|
||||
Spell checking *develop-spell*
|
||||
|
||||
When spell checking was going to be added to Vim a survey was done over the
|
||||
available spell checking libraries and programs. Unfortunately, the result
|
||||
was that none of them provided sufficient capabilities to be used as the spell
|
||||
checking engine in Vim, for various reasons:
|
||||
|
||||
- Missing support for multibyte encodings. At least UTF-8 must be supported,
|
||||
so that more than one language can be used in the same file.
|
||||
Doing on-the-fly conversion is not always possible (would require iconv
|
||||
support).
|
||||
- For the programs and libraries: Using them as-is would require installing
|
||||
them separately from Vim. That's mostly not impossible, but a drawback.
|
||||
- Performance: A few tests showed that it's possible to check spelling on the
|
||||
fly (while redrawing), just like syntax highlighting. But the mechanisms
|
||||
used by other code are much slower. Myspell uses a hashtable, for example.
|
||||
The affix compression that most spell checkers use makes it slower too.
|
||||
- For using an external program like aspell a communication mechanism would
|
||||
have to be setup. That's complicated to do in a portable way (Unix-only
|
||||
would be relatively simple, but that's not good enough). And performance
|
||||
will become a problem (lots of process switching involved).
|
||||
- Missing support for words with non-word characters, such as "Etten-Leur" and
|
||||
"et al.", would require marking the pieces of them OK, lowering the
|
||||
reliability.
|
||||
- Missing support for regions or dialects. Makes it difficult to accept
|
||||
all English words and highlight non-Canadian words differently.
|
||||
- Missing support for rare words. Many words are correct but hardly ever used
|
||||
and could be a misspelled often-used word.
|
||||
- For making suggestions the speed is less important and requiring to install
|
||||
another program or library would be acceptable. But the word lists probably
|
||||
differ, the suggestions may be wrong words.
|
||||
|
||||
|
||||
Spelling suggestions *develop-spell-suggestions*
|
||||
|
||||
For making suggestions there are two basic mechanisms:
|
||||
1. Try changing the bad word a little bit and check for a match with a good
|
||||
word. Or go through the list of good words, change them a little bit and
|
||||
check for a match with the bad word. The changes are deleting a character,
|
||||
inserting a character, swapping two characters, etc.
|
||||
2. Perform soundfolding on both the bad word and the good words and then find
|
||||
matches, possibly with a few changes like with the first mechanism.
|
||||
|
||||
The first is good for finding typing mistakes. After experimenting with
|
||||
hashtables and looking at solutions from other spell checkers the conclusion
|
||||
was that a trie (a kind of tree structure) is ideal for this. Both for
|
||||
reducing memory use and being able to try sensible changes. For example, when
|
||||
inserting a character only characters that lead to good words need to be
|
||||
tried. Other mechanisms (with hashtables) need to try all possible letters at
|
||||
every position in the word. Also, a hashtable has the requirement that word
|
||||
boundaries are identified separately, while a trie does not require this.
|
||||
That makes the mechanism a lot simpler.
|
||||
|
||||
Soundfolding is useful when someone knows how the words sounds but doesn't
|
||||
know how it is spelled. For example, the word "dictionary" might be written
|
||||
as "daktonerie". The number of changes that the first method would need to
|
||||
try is very big, it's hard to find the good word that way. After soundfolding
|
||||
the words become "tktnr" and "tkxnry", these differ by only two letters.
|
||||
|
||||
To find words by their soundfolded equivalent (soundalike word) we need a list
|
||||
of all soundfolded words. A few experiments have been done to find out what
|
||||
the best method is. Alternatives:
|
||||
1. Do the sound folding on the fly when looking for suggestions. This means
|
||||
walking through the trie of good words, soundfolding each word and
|
||||
checking how different it is from the bad word. This is very efficient for
|
||||
memory use, but takes a long time. On a fast PC it takes a couple of
|
||||
seconds for English, which can be acceptable for interactive use. But for
|
||||
some languages it takes more than ten seconds (e.g., German, Catalan),
|
||||
which is unacceptably slow. For batch processing (automatic corrections)
|
||||
it's too slow for all languages.
|
||||
2. Use a trie for the soundfolded words, so that searching can be done just
|
||||
like how it works without soundfolding. This requires remembering a list
|
||||
of good words for each soundfolded word. This makes finding matches very
|
||||
fast but requires quite a lot of memory, in the order of 1 to 10 Mbyte.
|
||||
For some languages more than the original word list.
|
||||
3. Like the second alternative, but reduce the amount of memory by using affix
|
||||
compression and store only the soundfolded basic word. This is what Aspell
|
||||
does. Disadvantage is that affixes need to be stripped from the bad word
|
||||
before soundfolding it, which means that mistakes at the start and/or end
|
||||
of the word will cause the mechanism to fail. Also, this becomes slow when
|
||||
the bad word is quite different from the good word.
|
||||
|
||||
The choice made is to use the second mechanism and use a separate file. This
|
||||
way a user with sufficient memory can get very good suggestions while a user
|
||||
who is short of memory or just wants the spell checking and no suggestions
|
||||
doesn't use so much memory.
|
||||
|
||||
|
||||
Word frequency
|
||||
|
||||
For sorting suggestions it helps to know which words are common. In theory we
|
||||
could store a word frequency with the word in the dictionary. However, this
|
||||
requires storing a count per word. That degrades word tree compression a lot.
|
||||
And maintaining the word frequency for all languages will be a heavy task.
|
||||
Also, it would be nice to prefer words that are already in the text. This way
|
||||
the words that appear in the specific text are preferred for suggestions.
|
||||
|
||||
What has been implemented is to count words that have been seen during
|
||||
displaying. A hashtable is used to quickly find the word count. The count is
|
||||
initialized from words listed in COMMON items in the affix file, so that it
|
||||
also works when starting a new file.
|
||||
|
||||
This isn't ideal, because the longer Vim is running the higher the counts
|
||||
become. But in practice it is a noticeable improvement over not using the word
|
||||
count.
|
||||
|
||||
==============================================================================
|
||||
3. Assumptions *design-assumptions*
|
||||
|
||||
The following sections define the portability and compatibility constraints
|
||||
that all Vim code and build tools must adhere to.
|
||||
|
||||
|
||||
MAKEFILES *assumptions-makefiles*
|
||||
*POSIX.1-2001*
|
||||
|
||||
Vim's main Makefiles target maximum portability, relying solely on features
|
||||
defined in POSIX.1-2001 `make` and ignoring later POSIX standards or GNU/BSD
|
||||
extensions. In practical terms, avoid:
|
||||
|
||||
– % pattern rules
|
||||
– modern assignment (`:=`, `::=`) outside POSIX.1-2001
|
||||
– special targets (`.ONESHELL`, `.NOTPARALLEL`, `.SILENT`, …)
|
||||
– order-only prerequisites (`|`) or automatic directory creation
|
||||
– GNU/BSD conditionals (`ifdef`, `ifndef`, `.for`/`.endfor`, …)
|
||||
|
||||
Since POSIX.1-2001 supports only traditional suffix rules, every object built
|
||||
in a separate directory must have an explicit rule. For example:
|
||||
|
||||
objects/evalbuffer.o: evalbuffer.c
|
||||
$(CCC) -o $@ evalbuffer.c
|
||||
|
||||
This verbosity ensures that the same Makefile builds Vim unchanged with the
|
||||
default `make` on Linux, *BSD, macOS, Solaris, AIX, HP-UX and virtually any
|
||||
Unix-like OS.
|
||||
|
||||
Some platform-specific Makefiles (e.g., for Windows, NSIS, or Cygwin) may use
|
||||
more advanced features when compatibility with basic make is not required.
|
||||
|
||||
|
||||
C COMPILER *assumptions-C-compiler*
|
||||
*ANSI-C* *C89* *C90* *C95* *C99*
|
||||
|
||||
Vim strives for maximum portability (see |design-multi-platform|) and must
|
||||
still build with Compaq C V6.4-005 on OpenVMS VAX V7.3.
|
||||
|
||||
Therefore, the latest ISO C standard we follow is:
|
||||
|
||||
`C95` (ISO/IEC 9899:1990/AMD1:1995)
|
||||
|
||||
In addition, the following two `C99` features are explicitly allowed:
|
||||
– `//` comments, as required by |style-comments|;
|
||||
– the `_Bool` type.
|
||||
|
||||
Platform-specific code may use any newer compiler features supported on that
|
||||
platform.
|
||||
|
||||
|
||||
SIZE OF VARIABLES *assumptions-variables*
|
||||
|
||||
char 8-bit signed
|
||||
char_u 8-bit unsigned
|
||||
int 32- or 64-bit signed (16-bit possible on legacy systems)
|
||||
unsigned 32- or 64-bit unsigned
|
||||
long at least 32-bit signed (large enough to hold a pointer)
|
||||
|
||||
|
||||
==============================================================================
|
||||
4. Coding style *coding-style*
|
||||
|
||||
These are the rules to use when making changes to the Vim source code. Please
|
||||
stick to these rules, to keep the sources readable and maintainable.
|
||||
@ -198,23 +395,6 @@ Other source files do not yet correspond to the .clang-format file. This may
|
||||
change in the future and they may be reformatted as well.
|
||||
|
||||
|
||||
C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
|
||||
|
||||
The minimal C compiler version supported is C89, also known as ANSI C.
|
||||
Later standards, such as C99, are not widely supported, or at least not 100%
|
||||
supported. Therefore we use only some of the C99 features and explicitly
|
||||
disallow some (this will gradually be adjusted over time).
|
||||
|
||||
Features not to be used ~
|
||||
|
||||
These C99 features are not to be used, because not enough compilers support
|
||||
them:
|
||||
- Variable length arrays (even in C11 this is an optional feature).
|
||||
- C99 _Bool and _Complex types.
|
||||
- "inline" (it's hardly ever needed, let the optimizer do its work)
|
||||
- flexible array members: Not supported by HP-UX C compiler (John Marriott)
|
||||
|
||||
|
||||
COMMENTS *style-comments*
|
||||
|
||||
Try to avoid putting multiline comments inside a function body: if the
|
||||
@ -513,153 +693,4 @@ OK: do
|
||||
while (cond);
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Design decisions *design-decisions*
|
||||
|
||||
Folding
|
||||
|
||||
Several forms of folding should be possible for the same buffer. For example,
|
||||
have one window that shows the text with function bodies folded, another
|
||||
window that shows a function body.
|
||||
|
||||
Folding is a way to display the text. It should not change the text itself.
|
||||
Therefore the folding has been implemented as a filter between the text stored
|
||||
in a buffer (buffer lines) and the text displayed in a window (logical lines).
|
||||
|
||||
|
||||
Naming the window
|
||||
|
||||
The word "window" is commonly used for several things: A window on the screen,
|
||||
the xterm window, a window inside Vim to view a buffer.
|
||||
To avoid confusion, other items that are sometimes called window have been
|
||||
given another name. Here is an overview of the related items:
|
||||
|
||||
screen The whole display. For the GUI it's something like 1024x768
|
||||
pixels. The Vim shell can use the whole screen or part of it.
|
||||
shell The Vim application. This can cover the whole screen (e.g.,
|
||||
when running in a console) or part of it (xterm or GUI).
|
||||
window View on a buffer. There can be several windows in Vim,
|
||||
together with the command line, menubar, toolbar, etc. they
|
||||
fit in the shell.
|
||||
|
||||
|
||||
Spell checking *develop-spell*
|
||||
|
||||
When spell checking was going to be added to Vim a survey was done over the
|
||||
available spell checking libraries and programs. Unfortunately, the result
|
||||
was that none of them provided sufficient capabilities to be used as the spell
|
||||
checking engine in Vim, for various reasons:
|
||||
|
||||
- Missing support for multibyte encodings. At least UTF-8 must be supported,
|
||||
so that more than one language can be used in the same file.
|
||||
Doing on-the-fly conversion is not always possible (would require iconv
|
||||
support).
|
||||
- For the programs and libraries: Using them as-is would require installing
|
||||
them separately from Vim. That's mostly not impossible, but a drawback.
|
||||
- Performance: A few tests showed that it's possible to check spelling on the
|
||||
fly (while redrawing), just like syntax highlighting. But the mechanisms
|
||||
used by other code are much slower. Myspell uses a hashtable, for example.
|
||||
The affix compression that most spell checkers use makes it slower too.
|
||||
- For using an external program like aspell a communication mechanism would
|
||||
have to be setup. That's complicated to do in a portable way (Unix-only
|
||||
would be relatively simple, but that's not good enough). And performance
|
||||
will become a problem (lots of process switching involved).
|
||||
- Missing support for words with non-word characters, such as "Etten-Leur" and
|
||||
"et al.", would require marking the pieces of them OK, lowering the
|
||||
reliability.
|
||||
- Missing support for regions or dialects. Makes it difficult to accept
|
||||
all English words and highlight non-Canadian words differently.
|
||||
- Missing support for rare words. Many words are correct but hardly ever used
|
||||
and could be a misspelled often-used word.
|
||||
- For making suggestions the speed is less important and requiring to install
|
||||
another program or library would be acceptable. But the word lists probably
|
||||
differ, the suggestions may be wrong words.
|
||||
|
||||
|
||||
Spelling suggestions *develop-spell-suggestions*
|
||||
|
||||
For making suggestions there are two basic mechanisms:
|
||||
1. Try changing the bad word a little bit and check for a match with a good
|
||||
word. Or go through the list of good words, change them a little bit and
|
||||
check for a match with the bad word. The changes are deleting a character,
|
||||
inserting a character, swapping two characters, etc.
|
||||
2. Perform soundfolding on both the bad word and the good words and then find
|
||||
matches, possibly with a few changes like with the first mechanism.
|
||||
|
||||
The first is good for finding typing mistakes. After experimenting with
|
||||
hashtables and looking at solutions from other spell checkers the conclusion
|
||||
was that a trie (a kind of tree structure) is ideal for this. Both for
|
||||
reducing memory use and being able to try sensible changes. For example, when
|
||||
inserting a character only characters that lead to good words need to be
|
||||
tried. Other mechanisms (with hashtables) need to try all possible letters at
|
||||
every position in the word. Also, a hashtable has the requirement that word
|
||||
boundaries are identified separately, while a trie does not require this.
|
||||
That makes the mechanism a lot simpler.
|
||||
|
||||
Soundfolding is useful when someone knows how the words sounds but doesn't
|
||||
know how it is spelled. For example, the word "dictionary" might be written
|
||||
as "daktonerie". The number of changes that the first method would need to
|
||||
try is very big, it's hard to find the good word that way. After soundfolding
|
||||
the words become "tktnr" and "tkxnry", these differ by only two letters.
|
||||
|
||||
To find words by their soundfolded equivalent (soundalike word) we need a list
|
||||
of all soundfolded words. A few experiments have been done to find out what
|
||||
the best method is. Alternatives:
|
||||
1. Do the sound folding on the fly when looking for suggestions. This means
|
||||
walking through the trie of good words, soundfolding each word and
|
||||
checking how different it is from the bad word. This is very efficient for
|
||||
memory use, but takes a long time. On a fast PC it takes a couple of
|
||||
seconds for English, which can be acceptable for interactive use. But for
|
||||
some languages it takes more than ten seconds (e.g., German, Catalan),
|
||||
which is unacceptably slow. For batch processing (automatic corrections)
|
||||
it's too slow for all languages.
|
||||
2. Use a trie for the soundfolded words, so that searching can be done just
|
||||
like how it works without soundfolding. This requires remembering a list
|
||||
of good words for each soundfolded word. This makes finding matches very
|
||||
fast but requires quite a lot of memory, in the order of 1 to 10 Mbyte.
|
||||
For some languages more than the original word list.
|
||||
3. Like the second alternative, but reduce the amount of memory by using affix
|
||||
compression and store only the soundfolded basic word. This is what Aspell
|
||||
does. Disadvantage is that affixes need to be stripped from the bad word
|
||||
before soundfolding it, which means that mistakes at the start and/or end
|
||||
of the word will cause the mechanism to fail. Also, this becomes slow when
|
||||
the bad word is quite different from the good word.
|
||||
|
||||
The choice made is to use the second mechanism and use a separate file. This
|
||||
way a user with sufficient memory can get very good suggestions while a user
|
||||
who is short of memory or just wants the spell checking and no suggestions
|
||||
doesn't use so much memory.
|
||||
|
||||
|
||||
Word frequency
|
||||
|
||||
For sorting suggestions it helps to know which words are common. In theory we
|
||||
could store a word frequency with the word in the dictionary. However, this
|
||||
requires storing a count per word. That degrades word tree compression a lot.
|
||||
And maintaining the word frequency for all languages will be a heavy task.
|
||||
Also, it would be nice to prefer words that are already in the text. This way
|
||||
the words that appear in the specific text are preferred for suggestions.
|
||||
|
||||
What has been implemented is to count words that have been seen during
|
||||
displaying. A hashtable is used to quickly find the word count. The count is
|
||||
initialized from words listed in COMMON items in the affix file, so that it
|
||||
also works when starting a new file.
|
||||
|
||||
This isn't ideal, because the longer Vim is running the higher the counts
|
||||
become. But in practice it is a noticeable improvement over not using the word
|
||||
count.
|
||||
|
||||
==============================================================================
|
||||
4. Assumptions *design-assumptions*
|
||||
|
||||
Size of variables:
|
||||
char 8 bit signed
|
||||
char_u 8 bit unsigned
|
||||
int 32 or 64 bit signed (16 might be possible with limited features)
|
||||
unsigned 32 or 64 bit unsigned (16 as with ints)
|
||||
long 32 or 64 bit signed, can hold a pointer
|
||||
|
||||
Note that some compilers cannot handle long lines or strings. The C89
|
||||
standard specifies a limit of 509 characters.
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 9.1. Last change: 2025 Jun 25
|
||||
*editing.txt* For Vim version 9.1. Last change: 2025 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -656,7 +656,7 @@ list of the current window.
|
||||
buffer.
|
||||
Also see |++opt| and |+cmd|.
|
||||
|
||||
:[count]arge[dit][!] [++opt] [+cmd] {name} .. *:arge* *:argedit*
|
||||
:[count]arge[dit][!] [++opt] [+cmd] {name} ... *:arge* *:argedit*
|
||||
Add {name}s to the argument list and edit it.
|
||||
There is no check for duplicates, it is possible to
|
||||
add a file to the argument list twice |:argded|.
|
||||
@ -671,7 +671,7 @@ list of the current window.
|
||||
edited. No check for duplicates is done.
|
||||
Also see |++opt| and |+cmd|.
|
||||
|
||||
:[count]arga[dd] {name} .. *:arga* *:argadd* *E479*
|
||||
:[count]arga[dd] {name} ... *:arga* *:argadd* *E479*
|
||||
:[count]arga[dd] *E1156*
|
||||
Add the {name}s to the argument list. When {name} is
|
||||
omitted add the current buffer name to the argument
|
||||
@ -702,7 +702,7 @@ list of the current window.
|
||||
If your current file is a duplicate, your current file
|
||||
will change to the original file index.
|
||||
|
||||
:argd[elete] {pattern} .. *:argd* *:argdelete* *E480* *E610*
|
||||
:argd[elete] {pattern} ... *:argd* *:argdelete* *E480* *E610*
|
||||
Delete files from the argument list that match the
|
||||
{pattern}s. {pattern} is used like a file pattern,
|
||||
see |file-pattern|. "%" can be used to delete the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jul 13
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -3312,7 +3312,7 @@ text...
|
||||
CODE
|
||||
<
|
||||
*E121*
|
||||
:let {var-name} .. List the value of variable {var-name}. Multiple
|
||||
:let {var-name} ... List the value of variable {var-name}. Multiple
|
||||
variable names may be given. Special names recognized
|
||||
here: *E738*
|
||||
g: global variables
|
||||
@ -3722,7 +3722,7 @@ text...
|
||||
improve script readability.
|
||||
|
||||
*:ec* *:echo*
|
||||
:ec[ho] {expr1} .. Echoes each {expr1}, with a space in between. The
|
||||
:ec[ho] {expr1} ... Echoes each {expr1}, with a space in between. The
|
||||
first {expr1} starts on a new line.
|
||||
Also see |:comment|.
|
||||
Use "\n" to start a new line. Use "\r" to move the
|
||||
@ -3742,7 +3742,7 @@ text...
|
||||
:new | redraw | echo "there is a new window"
|
||||
<
|
||||
*:echon*
|
||||
:echon {expr1} .. Echoes each {expr1}, without anything added. Also see
|
||||
:echon {expr1} ... Echoes each {expr1}, without anything added. Also see
|
||||
|:comment|.
|
||||
Uses the highlighting set by the `:echohl` command.
|
||||
Cannot be followed by a comment.
|
||||
@ -3773,7 +3773,7 @@ text...
|
||||
otherwise all following echo's will be highlighted.
|
||||
|
||||
*:echom* *:echomsg*
|
||||
:echom[sg] {expr1} .. Echo the expression(s) as a true message, saving the
|
||||
:echom[sg] {expr1} ... Echo the expression(s) as a true message, saving the
|
||||
message in the |message-history|.
|
||||
Spaces are placed between the arguments as with the
|
||||
`:echo` command. But unprintable characters are
|
||||
@ -3805,7 +3805,7 @@ text...
|
||||
with the +timer and the +popupwin features.
|
||||
|
||||
*:echoe* *:echoerr*
|
||||
:echoe[rr] {expr1} .. Echo the expression(s) as an error message, saving the
|
||||
:echoe[rr] {expr1} ... Echo the expression(s) as an error message, saving the
|
||||
message in the |message-history|. When used in a
|
||||
script or function the line number will be added.
|
||||
Spaces are placed between the arguments as with the
|
||||
@ -3818,7 +3818,7 @@ text...
|
||||
And to get a beep: >
|
||||
:exe "normal \<Esc>"
|
||||
|
||||
:echoc[onsole] {expr1} .. *:echoc* *:echoconsole*
|
||||
:echoc[onsole] {expr1} ... *:echoc* *:echoconsole*
|
||||
Intended for testing: works like `:echomsg` but when
|
||||
running in the GUI and started from a terminal write
|
||||
the text to stdout.
|
||||
@ -3845,7 +3845,7 @@ text...
|
||||
|
||||
|
||||
*:exe* *:execute*
|
||||
:exe[cute] {expr1} .. Executes the string that results from the evaluation
|
||||
:exe[cute] {expr1} ... Executes the string that results from the evaluation
|
||||
of {expr1} as an Ex command.
|
||||
Multiple arguments are concatenated, with a space in
|
||||
between. To avoid the extra space use the ".."
|
||||
|
@ -159,7 +159,20 @@ g:rustfmt_emit_files~
|
||||
determines whether to run rustfmt with '--emit=files' (when 1 is
|
||||
provided) instead of '--write-mode=overwrite'. >
|
||||
let g:rustfmt_emit_files = 0
|
||||
|
||||
<
|
||||
*g:rustfmt_detect_version*
|
||||
g:rustfmt_detect_version~
|
||||
When set to 1, will try to parse the version output from "rustfmt".
|
||||
Disabled by default for performance reasons
|
||||
>
|
||||
let g:rustfmt_detect_version = 1
|
||||
<
|
||||
*g:rustfmt_find_toml*
|
||||
g:rustfmt_emit_files~
|
||||
When set to 1, will try to find "rustfmt.toml" file by searching from
|
||||
current path upwards. Disabled by default for performance reasons
|
||||
>
|
||||
let g:rustfmt_find_toml = 1
|
||||
<
|
||||
*g:rust_playpen_url*
|
||||
g:rust_playpen_url~
|
||||
|
@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 17
|
||||
*gui_x11.txt* For Vim version 9.1. Last change: 2025 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -649,9 +649,8 @@ X11R5 with a library for X11R6 probably doesn't work (although the linking
|
||||
won't give an error message, Vim will crash later).
|
||||
|
||||
*gui-wayland*
|
||||
Initial support for the Wayland display server protocol has landed in patch
|
||||
9.1.0064. To enable it, you need to set the environment variable
|
||||
"$GVIM_ENABLE_WAYLAND" in your shell.
|
||||
Support for the Wayland display server protocol has landed in patch
|
||||
9.1.0064.
|
||||
|
||||
Note: The Wayland protocol is subject to some restrictions, so the following
|
||||
functions won't work: |getwinpos()|, |getwinposx()|, |getwinposy()| and the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 Jul 17
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -530,7 +530,7 @@ tag command action in op-pending and Visual mode ~
|
||||
tag command action in Normal mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|CTRL-W_CTRL-B| CTRL-W CTRL-B same as "CTRL-W b"
|
||||
|CTRL-W_CTRL-C| CTRL-W CTRL-C no-op |CTRL-W_CTRL-C|
|
||||
|CTRL-W_CTRL-C| CTRL-W CTRL-C no-op
|
||||
|CTRL-W_CTRL-D| CTRL-W CTRL-D same as "CTRL-W d"
|
||||
|CTRL-W_CTRL-F| CTRL-W CTRL-F same as "CTRL-W f"
|
||||
CTRL-W CTRL-G same as "CTRL-W g .."
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Jul 17
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1133,6 +1133,22 @@ Stop completion *compl-stop*
|
||||
CTRL-X CTRL-Z Stop completion without changing the text.
|
||||
|
||||
|
||||
AUTOCOMPLETION *ins-autocompletion*
|
||||
|
||||
Vim can display a completion menu as you type, similar to using |i_CTRL-N|,
|
||||
but triggered automatically. See |'autocomplete'|. The menu items are
|
||||
collected from the sources listed in the |'complete'| option.
|
||||
|
||||
Unlike manual |i_CTRL-N| completion, this mode uses a decaying timeout to keep
|
||||
Vim responsive. Sources earlier in the |'complete'| list are given more time
|
||||
(higher priority), but every source is guaranteed a time slice, however small.
|
||||
|
||||
This mode is fully compatible with other completion modes. You can invoke
|
||||
any of them at any time by typing |CTRL-X|, which temporarily suspends
|
||||
autocompletion. To use |i_CTRL-N| specifically, press |CTRL-E| first to
|
||||
dismiss the popup menu (see |complete_CTRL-E|).
|
||||
|
||||
|
||||
FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
|
||||
|
||||
This applies to 'completefunc', 'thesaurusfunc' and 'omnifunc'.
|
||||
@ -1475,7 +1491,7 @@ Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
|
||||
|
||||
For Exuberant ctags, version 5.6 or later is recommended. For version 5.5.4
|
||||
you should add a patch that adds the "typename:" field:
|
||||
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
|
||||
https://ftp.nluug.nl/pub/vim/unstable/patches/ctags-5.5.4.patch
|
||||
A compiled .exe for MS-Windows can be found at:
|
||||
http://ctags.sourceforge.net/
|
||||
https://github.com/universal-ctags/ctags-win32
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Jul 16
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -911,6 +911,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the current directory won't change when navigating to it.
|
||||
Note: When this option is on some plugins may not work.
|
||||
|
||||
*'autocomplete'* *'ac'* *'noautocomplete'* *'noac'*
|
||||
'autocomplete' 'ac' boolean (default off)
|
||||
global
|
||||
{only available on platforms with timing support}
|
||||
When on, Vim shows a completion menu as you type, similar to using
|
||||
|i_CTRL-N|, but triggered automatically. See |ins-autocompletion|.
|
||||
|
||||
*'autoindent'* *'ai'* *'noautoindent'* *'noai'*
|
||||
'autoindent' 'ai' boolean (default off)
|
||||
local to buffer
|
||||
@ -2129,9 +2136,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
If the Dict returned by the {func} includes {"refresh": "always"},
|
||||
the function will be invoked again whenever the leading text
|
||||
changes.
|
||||
If generating matches is potentially slow, |complete_check()|
|
||||
should be used to avoid blocking and preserve editor
|
||||
responsiveness.
|
||||
If generating matches is potentially slow, call
|
||||
|complete_check()| periodically to keep Vim responsive. This
|
||||
is especially important for |ins-autocompletion|.
|
||||
F equivalent to using "F{func}", where the function is taken from
|
||||
the 'completefunc' option.
|
||||
o equivalent to using "F{func}", where the function is taken from
|
||||
@ -2278,6 +2285,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
completion in the preview window. Only works in
|
||||
combination with "menu" or "menuone".
|
||||
|
||||
Only "fuzzy", "popup", "popuphidden" and "preview" have an effect when
|
||||
'autocomplete' is enabled.
|
||||
|
||||
This option does not apply to |cmdline-completion|. See 'wildoptions'
|
||||
for that.
|
||||
|
||||
@ -3007,7 +3017,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
a pattern search that does not match anything), none of the anchors
|
||||
will be used.
|
||||
|
||||
|
||||
*'dex'* *'diffexpr'*
|
||||
'diffexpr' 'dex' string (default "")
|
||||
global
|
||||
@ -7504,6 +7513,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Don't forget to precede the space with a backslash: ":set sp=\ ".
|
||||
In the future pipes may be used for filtering and this option will
|
||||
become obsolete (at least for Unix).
|
||||
Note: When using a pipe like "| tee", you'll lose the exit code of the
|
||||
shell command. This might be configurable by your shell, look for
|
||||
the pipefail option (for bash and zsh, use ":set -o pipefail").
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@ -9795,7 +9807,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< 'wildchar' also enables completion in search pattern contexts such as
|
||||
|/|, |?|, |:s|, |:g|, |:v|, and |:vim|. To insert a literal <Tab>
|
||||
instead of triggering completion, type <C-V><Tab> or "\t".
|
||||
See also |'wildoptions'|.
|
||||
See also 'wildoptions' and |wildtrigger()|.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*os_amiga.txt* For Vim version 9.1. Last change: 2010 Aug 14
|
||||
*os_amiga.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -111,12 +111,12 @@ would be better to enter:
|
||||
vim --noplugins <of course you can add a file>
|
||||
|
||||
|
||||
Installation ~
|
||||
Installation of a binary archive ~
|
||||
|
||||
1) Please copy the binary 'VIM' file to c:
|
||||
2) Get the Vim runtime package from:
|
||||
2) Get the Vim runtime package from (Note: that server is no longer updated):
|
||||
|
||||
ftp://ftp.vim.org/pub/vim/amiga/vim62rt.tgz
|
||||
https://ftp.nluug.nl/pub/vim/amiga/vim90src.tgz
|
||||
|
||||
and unpack it in your 'Apps' directory of the MorphOS installation. For me
|
||||
this would create following directory hierarchy:
|
||||
@ -143,5 +143,13 @@ Installation ~
|
||||
Cls
|
||||
;End VIM
|
||||
|
||||
Compiling~
|
||||
|
||||
You can download the Vim source code from the official Vim site:
|
||||
https://github.com/vim/vim/archive/refs/heads/master.zip
|
||||
Or using git: >
|
||||
git clone https://github.com/vim/vim.git
|
||||
|
||||
For compiling see "src/INSTALLami.txt"
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 9.1. Last change: 2024 May 11
|
||||
*os_vms.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@ -33,10 +33,18 @@ Vim on other operating systems.
|
||||
|
||||
2. Download files *vms-download*
|
||||
|
||||
You can download the Vim source code by ftp from the official Vim site:
|
||||
ftp://ftp.vim.org/pub/vim/
|
||||
You can download the Vim source code from the official Vim site:
|
||||
https://github.com/vim/vim/archive/refs/heads/master.zip
|
||||
Or using git: >
|
||||
git clone https://github.com/vim/vim.git
|
||||
|
||||
Older release archives are also available at:
|
||||
https://ftp.nluug.nl/pub/vim/
|
||||
ftp://ftp.nluug.nl/pub/vim/
|
||||
Or use one of the mirrors:
|
||||
ftp://ftp.vim.org/pub/vim/MIRRORS
|
||||
https://ftp.nluug.nl/pub/vim/MIRRORS
|
||||
|
||||
Note: the ftp server has been retired and is no longer updated.
|
||||
|
||||
You can download precompiled executables from:
|
||||
http://www.polarhome.com/vim/
|
||||
|
@ -90,7 +90,6 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
Marked Files: Grep..................................|netrw-mg|
|
||||
Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
|
||||
Marked Files: Moving................................|netrw-mm|
|
||||
Marked Files: Printing..............................|netrw-mp|
|
||||
Marked Files: Sourcing..............................|netrw-ms|
|
||||
Marked Files: Setting the Target Directory..........|netrw-mt|
|
||||
Marked Files: Tagging...............................|netrw-mT|
|
||||
@ -1066,7 +1065,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
mg Apply vimgrep to marked files |netrw-mg|
|
||||
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
|
||||
mm Move marked files to marked-file target directory |netrw-mm|
|
||||
mp Print marked files |netrw-mp|
|
||||
mr Mark files using a shell-style |regexp| |netrw-mr|
|
||||
mt Current browsing directory becomes markfile target |netrw-mt|
|
||||
mT Apply ctags to marked files |netrw-mT|
|
||||
@ -2001,7 +1999,6 @@ The following netrw maps make use of marked files:
|
||||
|netrw-mF| Unmark marked files
|
||||
|netrw-mg| Apply vimgrep to marked files
|
||||
|netrw-mm| Move marked files to target
|
||||
|netrw-mp| Print marked files
|
||||
|netrw-ms| Netrw will source marked files
|
||||
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
||||
|netrw-mT| Generate tags using marked files
|
||||
@ -2266,15 +2263,6 @@ from the current window (where one does the mf) to the target.
|
||||
|
||||
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
||||
|
||||
MARKED FILES: PRINTING *netrw-mp* {{{2
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
(uses the local marked file list)
|
||||
|
||||
When "mp" is used, netrw will apply the |:hardcopy| command to marked files.
|
||||
What netrw does is open each file in a one-line window, execute hardcopy, then
|
||||
close the one-line window.
|
||||
|
||||
|
||||
MARKED FILES: SOURCING *netrw-ms* {{{2
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
(uses the local marked file list)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.1. Last change: 2025 Jul 16
|
||||
*quickref.txt* For Vim version 9.1. Last change: 2025 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -607,6 +607,7 @@ Short explanation of each option: *option-list*
|
||||
'arabic' 'arab' for Arabic as a default second language
|
||||
'arabicshape' 'arshape' do shaping for Arabic characters
|
||||
'autochdir' 'acd' change directory to the file in the current window
|
||||
'autocomplete' 'ac' automatic completion in insert mode
|
||||
'autoindent' 'ai' take indent for new line from previous line
|
||||
'autoread' 'ar' autom. read file when changed outside of Vim
|
||||
'autoshelldir' 'asd' change directory to the shell's current directory
|
||||
|
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 14
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -262,6 +262,9 @@ you can see the actual color, except for "Ignore"):
|
||||
Debug debugging statements
|
||||
|
||||
*Underlined text that stands out, HTML links
|
||||
*Bold bold text
|
||||
*Italic italic text
|
||||
*BoldItalic bold and italic text
|
||||
|
||||
*Ignore left blank, hidden |hl-Ignore|
|
||||
|
||||
@ -4350,13 +4353,13 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
|
||||
|
||||
DEFINING KEYWORDS *:syn-keyword*
|
||||
|
||||
:sy[ntax] keyword {group-name} [{options}] {keyword} .. [{options}]
|
||||
:sy[ntax] keyword {group-name} [{options}] {keyword} ... [{options}]
|
||||
|
||||
This defines a number of keywords.
|
||||
|
||||
{group-name} Is a syntax group name such as "Comment".
|
||||
[{options}] See |:syn-arguments| below.
|
||||
{keyword} .. Is a list of keywords which are part of this group.
|
||||
{keyword} ... Is a list of keywords which are part of this group.
|
||||
|
||||
Example: >
|
||||
:syntax keyword Type int long char
|
||||
|
@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 9.1. Last change: 2025 Jul 17
|
||||
*tabpage.txt* For Vim version 9.1. Last change: 2025 Jul 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -38,9 +38,9 @@ commands, |:windo|, |:all| and |:ball| (when not using the |:tab| modifier).
|
||||
The commands that are aware of other tab pages than the current one are
|
||||
mentioned below.
|
||||
|
||||
Tabs are also a nice way to edit a buffer temporarily without changing the
|
||||
current window layout. Open a new tab page, do whatever you want to do and
|
||||
close the tab page.
|
||||
Tab pages are also a nice way to edit a buffer temporarily without changing
|
||||
the current window layout. Open a new tab page, do whatever you want to do
|
||||
and close the tab page.
|
||||
|
||||
==============================================================================
|
||||
2. Commands *tab-page-commands*
|
||||
@ -145,7 +145,7 @@ something else.
|
||||
:tabclose $ " close the last tab page
|
||||
:tabclose # " close the last accessed tab page
|
||||
|
||||
When a tab is closed the next tab page will become the current one. This
|
||||
When a tab page is closed the next tab page will become the current one. This
|
||||
behaviour can be customized using the 'tabclose' option.
|
||||
|
||||
*:tabo* *:tabonly*
|
||||
@ -252,7 +252,7 @@ REORDERING TAB PAGES:
|
||||
:[N]tabm[ove]
|
||||
Move the current tab page to after tab page N. Use zero to
|
||||
make the current tab page the first one. N is counted before
|
||||
the move, thus if the second tab is the current one,
|
||||
the move, thus if the second tab page is the current one,
|
||||
`:tabmove 1` and `:tabmove 2` have no effect.
|
||||
Without N the tab page is made the last one. >
|
||||
:.tabmove " do nothing
|
||||
@ -276,9 +276,9 @@ REORDERING TAB PAGES:
|
||||
:tabmove +1 " as above
|
||||
|
||||
|
||||
Note that although it is possible to move a tab behind the N-th one by using
|
||||
:Ntabmove. And move it by N places by using :+Ntabmove. For clarification what
|
||||
+N means in this context see |[range]|.
|
||||
Note that although it is possible to move a tab page behind the N-th one by
|
||||
using :Ntabmove. And move it by N places by using :+Ntabmove. For
|
||||
clarification what +N means in this context see |[range]|.
|
||||
|
||||
|
||||
LOOPING OVER TAB PAGES:
|
||||
@ -363,8 +363,8 @@ A "+" will be shown for a tab page that has a modified window. The number of
|
||||
windows in a tabpage is also shown. Thus "3+" means three windows and one of
|
||||
them has a modified buffer.
|
||||
|
||||
An "X" (close button) will appear in the last column when multiple tabs are
|
||||
open, but only if the 'mouse' is enabled.
|
||||
An "X" (close button) will appear in the last column when multiple tab pages
|
||||
are open, but only if the 'mouse' is enabled.
|
||||
|
||||
The 'tabline' option allows you to define your preferred way to tab pages
|
||||
labels. This isn't easy, thus an example will be given here.
|
||||
@ -398,7 +398,7 @@ pages and define labels for them. Then get the label for each tab page. >
|
||||
let s ..= ' %{MyTabLabel(' .. (i + 1) .. ')} '
|
||||
endfor
|
||||
|
||||
" after the last tab fill with TabLineFill and reset tab page nr
|
||||
" after the last tab page fill with TabLineFill and reset tab page nr
|
||||
let s ..= '%#TabLineFill#%T'
|
||||
|
||||
" right-align the label to close the current tab page
|
||||
|
@ -41,6 +41,7 @@ $quote eval.txt /*$quote*
|
||||
'] motion.txt /*']*
|
||||
'^ motion.txt /*'^*
|
||||
'a motion.txt /*'a*
|
||||
'ac' options.txt /*'ac'*
|
||||
'acd' options.txt /*'acd'*
|
||||
'ai' options.txt /*'ai'*
|
||||
'akm' options.txt /*'akm'*
|
||||
@ -62,6 +63,7 @@ $quote eval.txt /*$quote*
|
||||
'as' todo.txt /*'as'*
|
||||
'asd' options.txt /*'asd'*
|
||||
'autochdir' options.txt /*'autochdir'*
|
||||
'autocomplete' options.txt /*'autocomplete'*
|
||||
'autoindent' options.txt /*'autoindent'*
|
||||
'autoprint' vi_diff.txt /*'autoprint'*
|
||||
'autoread' options.txt /*'autoread'*
|
||||
@ -555,6 +557,7 @@ $quote eval.txt /*$quote*
|
||||
'mzschemedll' options.txt /*'mzschemedll'*
|
||||
'mzschemegcdll' options.txt /*'mzschemegcdll'*
|
||||
'nf' options.txt /*'nf'*
|
||||
'noac' options.txt /*'noac'*
|
||||
'noacd' options.txt /*'noacd'*
|
||||
'noai' options.txt /*'noai'*
|
||||
'noakm' options.txt /*'noakm'*
|
||||
@ -571,6 +574,7 @@ $quote eval.txt /*$quote*
|
||||
'noas' todo.txt /*'noas'*
|
||||
'noasd' options.txt /*'noasd'*
|
||||
'noautochdir' options.txt /*'noautochdir'*
|
||||
'noautocomplete' options.txt /*'noautocomplete'*
|
||||
'noautoindent' options.txt /*'noautoindent'*
|
||||
'noautoread' options.txt /*'noautoread'*
|
||||
'noautosave' todo.txt /*'noautosave'*
|
||||
@ -3991,6 +3995,8 @@ C change.txt /*C*
|
||||
C-editing tips.txt /*C-editing*
|
||||
C-indenting indent.txt /*C-indenting*
|
||||
C89 develop.txt /*C89*
|
||||
C90 develop.txt /*C90*
|
||||
C95 develop.txt /*C95*
|
||||
C99 develop.txt /*C99*
|
||||
COMSPEC starting.txt /*COMSPEC*
|
||||
CR-used-for-NL pattern.txt /*CR-used-for-NL*
|
||||
@ -4613,6 +4619,11 @@ E1425 vim9class.txt /*E1425*
|
||||
E1426 vim9class.txt /*E1426*
|
||||
E1429 vim9class.txt /*E1429*
|
||||
E143 autocmd.txt /*E143*
|
||||
E1432 vim9.txt /*E1432*
|
||||
E1433 vim9.txt /*E1433*
|
||||
E1434 vim9.txt /*E1434*
|
||||
E1435 vim9class.txt /*E1435*
|
||||
E1436 vim9class.txt /*E1436*
|
||||
E144 various.txt /*E144*
|
||||
E145 starting.txt /*E145*
|
||||
E146 change.txt /*E146*
|
||||
@ -4672,7 +4683,17 @@ E1548 wayland.txt /*E1548*
|
||||
E1549 options.txt /*E1549*
|
||||
E155 sign.txt /*E155*
|
||||
E1550 options.txt /*E1550*
|
||||
E1552 vim9.txt /*E1552*
|
||||
E1553 vim9.txt /*E1553*
|
||||
E1554 vim9.txt /*E1554*
|
||||
E1555 vim9.txt /*E1555*
|
||||
E1556 vim9.txt /*E1556*
|
||||
E1557 vim9.txt /*E1557*
|
||||
E1558 vim9.txt /*E1558*
|
||||
E1559 vim9.txt /*E1559*
|
||||
E156 sign.txt /*E156*
|
||||
E1560 vim9.txt /*E1560*
|
||||
E1561 vim9.txt /*E1561*
|
||||
E157 sign.txt /*E157*
|
||||
E158 sign.txt /*E158*
|
||||
E159 sign.txt /*E159*
|
||||
@ -5732,6 +5753,7 @@ PHP_outdentSLComments indent.txt /*PHP_outdentSLComments*
|
||||
PHP_outdentphpescape indent.txt /*PHP_outdentphpescape*
|
||||
PHP_removeCRwhenUnix indent.txt /*PHP_removeCRwhenUnix*
|
||||
PHP_vintage_case_default_indent indent.txt /*PHP_vintage_case_default_indent*
|
||||
POSIX.1-2001 develop.txt /*POSIX.1-2001*
|
||||
Partial eval.txt /*Partial*
|
||||
Pattern pattern.txt /*Pattern*
|
||||
Perl if_perl.txt /*Perl*
|
||||
@ -6170,6 +6192,9 @@ assert_notequal() testing.txt /*assert_notequal()*
|
||||
assert_notmatch() testing.txt /*assert_notmatch()*
|
||||
assert_report() testing.txt /*assert_report()*
|
||||
assert_true() testing.txt /*assert_true()*
|
||||
assumptions-C-compiler develop.txt /*assumptions-C-compiler*
|
||||
assumptions-makefiles develop.txt /*assumptions-makefiles*
|
||||
assumptions-variables develop.txt /*assumptions-variables*
|
||||
astro.vim syntax.txt /*astro.vim*
|
||||
asy.vim syntax.txt /*asy.vim*
|
||||
at motion.txt /*at*
|
||||
@ -6614,6 +6639,7 @@ cmdarg-variable eval.txt /*cmdarg-variable*
|
||||
cmdbang-variable eval.txt /*cmdbang-variable*
|
||||
cmdcomplete_info() builtin.txt /*cmdcomplete_info()*
|
||||
cmdline-arguments vi_diff.txt /*cmdline-arguments*
|
||||
cmdline-autocompletion builtin.txt /*cmdline-autocompletion*
|
||||
cmdline-changed version5.txt /*cmdline-changed*
|
||||
cmdline-completion cmdline.txt /*cmdline-completion*
|
||||
cmdline-editing cmdline.txt /*cmdline-editing*
|
||||
@ -7851,8 +7877,10 @@ g:rustc_path ft_rust.txt /*g:rustc_path*
|
||||
g:rustfmt_autosave ft_rust.txt /*g:rustfmt_autosave*
|
||||
g:rustfmt_autosave_if_config_present ft_rust.txt /*g:rustfmt_autosave_if_config_present*
|
||||
g:rustfmt_command ft_rust.txt /*g:rustfmt_command*
|
||||
g:rustfmt_detect_version ft_rust.txt /*g:rustfmt_detect_version*
|
||||
g:rustfmt_emit_files ft_rust.txt /*g:rustfmt_emit_files*
|
||||
g:rustfmt_fail_silently ft_rust.txt /*g:rustfmt_fail_silently*
|
||||
g:rustfmt_find_toml ft_rust.txt /*g:rustfmt_find_toml*
|
||||
g:rustfmt_options ft_rust.txt /*g:rustfmt_options*
|
||||
g:statusline_winid options.txt /*g:statusline_winid*
|
||||
g:syntax_on syntax.txt /*g:syntax_on*
|
||||
@ -7954,6 +7982,9 @@ gdb debug.txt /*gdb*
|
||||
gdb-version terminal.txt /*gdb-version*
|
||||
ge motion.txt /*ge*
|
||||
gender-neutral helphelp.txt /*gender-neutral*
|
||||
generic-function-call vim9.txt /*generic-function-call*
|
||||
generic-function-declaration vim9.txt /*generic-function-declaration*
|
||||
generic-functions vim9.txt /*generic-functions*
|
||||
get() builtin.txt /*get()*
|
||||
get()-blob builtin.txt /*get()-blob*
|
||||
get()-dict builtin.txt /*get()-dict*
|
||||
@ -8558,6 +8589,7 @@ inputlist() builtin.txt /*inputlist()*
|
||||
inputrestore() builtin.txt /*inputrestore()*
|
||||
inputsave() builtin.txt /*inputsave()*
|
||||
inputsecret() builtin.txt /*inputsecret()*
|
||||
ins-autocompletion insert.txt /*ins-autocompletion*
|
||||
ins-completion insert.txt /*ins-completion*
|
||||
ins-completion-menu insert.txt /*ins-completion-menu*
|
||||
ins-expandtab insert.txt /*ins-expandtab*
|
||||
@ -9177,7 +9209,6 @@ netrw-mm pi_netrw.txt /*netrw-mm*
|
||||
netrw-modify pi_netrw.txt /*netrw-modify*
|
||||
netrw-mouse pi_netrw.txt /*netrw-mouse*
|
||||
netrw-move pi_netrw.txt /*netrw-move*
|
||||
netrw-mp pi_netrw.txt /*netrw-mp*
|
||||
netrw-mr pi_netrw.txt /*netrw-mr*
|
||||
netrw-ms pi_netrw.txt /*netrw-ms*
|
||||
netrw-mt pi_netrw.txt /*netrw-mt*
|
||||
@ -10405,7 +10436,6 @@ style-changes develop.txt /*style-changes*
|
||||
style-clang-format develop.txt /*style-clang-format*
|
||||
style-comments develop.txt /*style-comments*
|
||||
style-common-functions develop.txt /*style-common-functions*
|
||||
style-compiler develop.txt /*style-compiler*
|
||||
style-declarations develop.txt /*style-declarations*
|
||||
style-examples develop.txt /*style-examples*
|
||||
style-functions develop.txt /*style-functions*
|
||||
@ -11015,6 +11045,7 @@ type-casting vim9.txt /*type-casting*
|
||||
type-checking vim9.txt /*type-checking*
|
||||
type-inference vim9.txt /*type-inference*
|
||||
type-mistakes tips.txt /*type-mistakes*
|
||||
type-variable-naming vim9.txt /*type-variable-naming*
|
||||
typealias vim9class.txt /*typealias*
|
||||
typename() builtin.txt /*typename()*
|
||||
typescript.vim syntax.txt /*typescript.vim*
|
||||
@ -11601,6 +11632,7 @@ whitespace pattern.txt /*whitespace*
|
||||
wildcard editing.txt /*wildcard*
|
||||
wildcards editing.txt /*wildcards*
|
||||
wildmenumode() builtin.txt /*wildmenumode()*
|
||||
wildtrigger() builtin.txt /*wildtrigger()*
|
||||
win-scrolled-resized windows.txt /*win-scrolled-resized*
|
||||
win16 os_win32.txt /*win16*
|
||||
win32 os_win32.txt /*win32*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Jun 12
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -115,7 +115,6 @@ Further Vim9 improvements:
|
||||
- For chaining, allow using the class name as type for function return
|
||||
value.
|
||||
- Implement "specifies" interface
|
||||
- Implement generics
|
||||
- Add "assignable" (class or child)?
|
||||
- More efficient way for interface member index than iterating over list?
|
||||
- a variant of type() that returns a different type for each class?
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_02.txt* For Vim version 9.1. Last change: 2025 Jun 03
|
||||
*usr_02.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -614,7 +614,7 @@ Summary: *help-summary* >
|
||||
< for how the '|' is handled in mappings.
|
||||
|
||||
15) Command definitions are talked about :h command-topic, so use >
|
||||
:help command-bar
|
||||
:help command-bang
|
||||
< to find out about the '!' argument for custom commands.
|
||||
|
||||
16) Window management commands always start with CTRL-W, so you find the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_23.txt* For Vim version 9.1. Last change: 2020 Dec 19
|
||||
*usr_23.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -118,7 +118,7 @@ Someone sends you an e-mail message, which refers to a file by its URL. For
|
||||
example:
|
||||
|
||||
You can find the information here: ~
|
||||
ftp://ftp.vim.org/pub/vim/README ~
|
||||
https://ftp.nluug.nl/pub/vim/README
|
||||
|
||||
You could start a program to download the file, save it on your local disk and
|
||||
then start Vim to edit it.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jul 05
|
||||
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jul 21
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -1233,6 +1233,7 @@ Mappings and Menus: *mapping-functions*
|
||||
mapset() restore a mapping
|
||||
menu_info() get information about a menu item
|
||||
wildmenumode() check if the wildmode is active
|
||||
wildtrigger() start wildcard expansion
|
||||
|
||||
Testing: *test-functions*
|
||||
assert_equal() assert that two expressions values are equal
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_90.txt* For Vim version 9.1. Last change: 2025 Mar 03
|
||||
*usr_90.txt* For Vim version 9.1. Last change: 2025 Jul 24
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -189,69 +189,49 @@ source code yourself!
|
||||
==============================================================================
|
||||
*90.2* MS-Windows
|
||||
|
||||
There are two ways to install the Vim program for Microsoft Windows. You can
|
||||
uncompress several archives, or use a self-installing big archive. Most users
|
||||
with fairly recent computers will prefer the second method. For the first
|
||||
one, you will need:
|
||||
There are several ways to install the Vim program for Microsoft Windows:
|
||||
|
||||
- An archive with binaries for Vim.
|
||||
- The Vim runtime archive.
|
||||
- A program to unpack the zip files.
|
||||
1. Official Website Download (Stable)~
|
||||
|
||||
To get the Vim archives, look in this file for a mirror near you, this should
|
||||
provide the fastest download:
|
||||
Visit the official Vim website at https://www.vim.org to download the latest
|
||||
stable version. The site links to the Windows installer that works out of the
|
||||
box for most users.
|
||||
|
||||
ftp://ftp.vim.org/pub/vim/MIRRORS
|
||||
2. Using winget (Windows Package Manager) ~
|
||||
|
||||
Or use the home site ftp.vim.org, if you think it's fast enough. Go to the
|
||||
"pc" directory and you'll find a list of files there. The version number is
|
||||
embedded in the file name. You will want to get the most recent version.
|
||||
We will use "82" here, which is version 8.2.
|
||||
If you prefer using the command line, you can quickly install Vim using
|
||||
Windows' built-in package manager for the stable version: >
|
||||
|
||||
gvim82.exe The self-installing archive.
|
||||
winget install vim.vim
|
||||
|
||||
This is all you need for the second method. Just launch the executable, and
|
||||
follow the prompts.
|
||||
Or to download the latest nightly version, use: >
|
||||
|
||||
For the first method you must choose one of the binary archives. These are
|
||||
available:
|
||||
winget install vim.vim.nightly
|
||||
|
||||
gvim82.zip The normal MS-Windows GUI version.
|
||||
gvim82ole.zip The MS-Windows GUI version with OLE support.
|
||||
Uses more memory, supports interfacing with
|
||||
other OLE applications.
|
||||
vim82w32.zip 32 bit MS-Windows console version.
|
||||
This method ensures you get an up-to-date version with minimal hassle.
|
||||
|
||||
You only need one of them. Although you could install both a GUI and a
|
||||
console version. You always need to get the archive with runtime files.
|
||||
3. GitHub Installer (All Architectures) ~
|
||||
|
||||
vim82rt.zip The runtime files.
|
||||
For more control over the installation (or if you're using a specific CPU
|
||||
architecture like ARM), visit the official GitHub repository:
|
||||
|
||||
Use your un-zip program to unpack the files. For example, using the "unzip"
|
||||
program: >
|
||||
https://github.com/vim/vim-win32-installer/
|
||||
|
||||
cd c:\
|
||||
unzip path\gvim82.zip
|
||||
unzip path\vim82rt.zip
|
||||
This repo provides daily installer and portable zip archives for:
|
||||
|
||||
This will unpack the files in the directory "c:\vim\vim82". If you already
|
||||
have a "vim" directory somewhere, you will want to move to the directory just
|
||||
above it.
|
||||
Now change to the "vim\vim82" directory and run the install program: >
|
||||
- x86 (32-bit)
|
||||
- x64 (64-bit)
|
||||
- ARM64
|
||||
|
||||
install
|
||||
|
||||
Carefully look through the messages and select the options you want to use.
|
||||
If you finally select "do it" the install program will carry out the actions
|
||||
you selected.
|
||||
The install program doesn't move the runtime files. They remain where you
|
||||
unpacked them.
|
||||
It's a great option if you want nightly builds or specific configuration
|
||||
|
||||
In case you are not satisfied with the features included in the supplied
|
||||
binaries, you could try compiling Vim yourself. Get the source archive from
|
||||
the same location as where the binaries are. You need a compiler for which a
|
||||
makefile exists. Microsoft Visual C, MinGW and Cygwin compilers can be used.
|
||||
Check the file src/INSTALLpc.txt for hints.
|
||||
Check the file src/INSTALLpc.txt for hints. You can get the source from:
|
||||
|
||||
https://github.com/vim/vim
|
||||
|
||||
==============================================================================
|
||||
*90.3* Upgrading
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version6.txt* For Vim version 9.1. Last change: 2022 Apr 06
|
||||
*version6.txt* For Vim version 9.1. Last change: 2025 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -12624,7 +12624,7 @@ Solution: Use ":compiler!" to set a compiler globally, otherwise it's local
|
||||
to the buffer and "b:current_compiler" is used. Give an error
|
||||
when no compiler script could be found.
|
||||
Note: updated compiler plugins can be found at
|
||||
ftp://ftp.vim.org/pub/vim/runtime/compiler/
|
||||
https://github.com/vim/vim/tree/master/runtime/compiler
|
||||
Files: runtime/compiler/msvc.vim, runtime/doc/quickfix.txt, src/eval.c,
|
||||
src/ex_cmds2.c
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 9.1. Last change: 2022 Feb 26
|
||||
*version8.txt* For Vim version 9.1. Last change: 2025 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -14558,7 +14558,7 @@ Changed *changed-8.1*
|
||||
-------
|
||||
|
||||
Internal: A few C99 features are now allowed such as // comments and a
|
||||
comma after the last enum entry. See |style-compiler|.
|
||||
comma after the last enum entry. See |assumptions-C-compiler|.
|
||||
|
||||
Since patch 8.0.0029 removed support for older MS-Windows systems, only
|
||||
MS-Windows XP and later are supported.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 16
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -41551,6 +41551,8 @@ Add support for internal builtin functions with vim9 objects, see
|
||||
|
||||
Enum support for Vim9 script |:enum|
|
||||
|
||||
Generic function support for Vim9 script |generic-functions|
|
||||
|
||||
Support for protected _new() method
|
||||
|
||||
Support for compiling all the methods in a Vim9 class using |:defcompile|.
|
||||
@ -41601,6 +41603,8 @@ Completion~
|
||||
"nosort" - do not sort completion results
|
||||
"preinsert" - highlight to be inserted values
|
||||
"nearest" - sort completion results by distance to cursor
|
||||
- new function |wildtrigger()| to trigger wildcard expansion
|
||||
- Support for Autocompletion has been added |ins-autocompletion|
|
||||
|
||||
Platform specific~
|
||||
-----------------
|
||||
@ -41640,6 +41644,9 @@ Other new features ~
|
||||
|
||||
- The new digraph "APPROACHES THE LIMIT" using ".=" has been added.
|
||||
|
||||
- Add the new default highlighting groups "Bold", "Italic" and "BoldItalic"
|
||||
for use in syntax scripts.
|
||||
|
||||
*changed-9.2*
|
||||
Changed~
|
||||
-------
|
||||
@ -41762,6 +41769,7 @@ Functions: ~
|
||||
|str2blob()| convert a List of strings into a blob
|
||||
|test_null_tuple()| return a null tuple
|
||||
|tuple2list()| turn a Tuple of items into a List
|
||||
|wildtrigger()| trigger wildcard expansion
|
||||
|
||||
|
||||
Autocommands: ~
|
||||
@ -41802,6 +41810,7 @@ Ex-Commands: ~
|
||||
|
||||
Options: ~
|
||||
|
||||
'autocompletion' Enable auto completion |ins-autocompletion|
|
||||
'chistory' Size of the quickfix stack |quickfix-stack|.
|
||||
'completefuzzycollect' Enable fuzzy collection of candidates for (some)
|
||||
|ins-completion| modes
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.1. Last change: 2025 Apr 27
|
||||
*vim9.txt* For Vim version 9.1. Last change: 2025 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -15,10 +15,11 @@ features in Vim9 script.
|
||||
2. Differences |vim9-differences|
|
||||
3. New style functions |fast-functions|
|
||||
4. Types |vim9-types|
|
||||
5. Namespace, Import and Export |vim9script|
|
||||
6. Classes and interfaces |vim9-classes|
|
||||
5. Generic functions |generic-functions|
|
||||
6. Namespace, Import and Export |vim9script|
|
||||
7. Classes and interfaces |vim9-classes|
|
||||
|
||||
9. Rationale |vim9-rationale|
|
||||
8. Rationale |vim9-rationale|
|
||||
|
||||
==============================================================================
|
||||
|
||||
@ -1895,7 +1896,146 @@ corresponding empty value.
|
||||
|
||||
==============================================================================
|
||||
|
||||
5. Namespace, Import and Export
|
||||
*generic-functions*
|
||||
5. Generic functions
|
||||
|
||||
A generic function allows using the same function with different type
|
||||
arguments, while retaining type checking for arguments and the return value.
|
||||
This provides type safety and code reusability.
|
||||
|
||||
Declaration~
|
||||
*generic-function-declaration*
|
||||
*E1553* *E1554* *E1559*
|
||||
The type parameters for a generic function are declared in angle brackets "<"
|
||||
and ">" directly after the function name. Multiple type names are separated
|
||||
by commas: >
|
||||
|
||||
def[!] {funcname}<{type} [, {types}]>([arguments])[: {return-type}]
|
||||
{function body}
|
||||
enddef
|
||||
<
|
||||
These type parameters can then be used like any other type within the function
|
||||
signature and body. Example: >
|
||||
|
||||
def MyFunc<T, A, B>(param1: T): T
|
||||
var f: A
|
||||
var x = param1
|
||||
return x
|
||||
enddef
|
||||
<
|
||||
*type-variable-naming* *E1552*
|
||||
The convention is to use a single uppercase letter for a type variable (e.g.,
|
||||
T, A, X), although longer names are allowed. The name must start with an
|
||||
uppercase letter.
|
||||
|
||||
*E1558* *E1560*
|
||||
A function must be declared and used either as generic or as a regular
|
||||
function - but not both.
|
||||
|
||||
*E1561*
|
||||
A type variable name must not conflict with other defined names, such as class
|
||||
names, type aliases, enum names, function names or other type variable names.
|
||||
|
||||
Calling a generic function~
|
||||
*generic-function-call*
|
||||
To call a generic function, specify the concrete types in "<" and ">"
|
||||
between the function name and the argument list: >
|
||||
|
||||
MyFunc<number, string, list<number>>()
|
||||
<
|
||||
*E1555* *E1556* *E1557*
|
||||
The number of concrete types provided when calling a generic function must
|
||||
match the number of type variables in the function. An empty type list is not
|
||||
allowed. Any Vim9 type (|vim9-types|) can be used as a concrete type in a
|
||||
generic function.
|
||||
|
||||
Spaces are not allowed between the function name and "<", or between ">" and
|
||||
the opening "(".
|
||||
|
||||
A generic function can be exported and imported like a regular function.
|
||||
See |:export| and |:import|.
|
||||
|
||||
A generic function can be defined inside another regular or generic function.
|
||||
|
||||
Referencing type variables in generic types~
|
||||
|
||||
Instead of concrete types, type variables can be used with generic types.
|
||||
This is useful for complex data structures like lists of dictionaries or
|
||||
dictionaries of lists. Example: >
|
||||
|
||||
vim9script
|
||||
|
||||
def Flatten<T>(x: list<list<T>>): list<T>
|
||||
var result: list<T> = []
|
||||
for inner in x
|
||||
result += inner
|
||||
endfor
|
||||
return result
|
||||
enddef
|
||||
|
||||
echo Flatten<number>([[1, 2], [3]])
|
||||
<
|
||||
|
||||
Generic class method~
|
||||
|
||||
A Vim9 class method can be a generic function: >
|
||||
|
||||
class A
|
||||
def Foo<X, Y>()
|
||||
enddef
|
||||
endclass
|
||||
var a = A.new()
|
||||
a.Foo<number, string>()
|
||||
<
|
||||
*E1432* *E1433* *E1434*
|
||||
A generic class method in a base class can be overridden by a generic method
|
||||
in a child class. The number of type variables must match between both
|
||||
methods. A concrete class method cannot be overridden by a generic method,
|
||||
and vice versa.
|
||||
|
||||
Generic function reference~
|
||||
|
||||
A function reference (|Funcref|) can be a generic function. This allows for
|
||||
creating factories of functions that operate on specific types: >
|
||||
|
||||
vim9script
|
||||
|
||||
def MakeEcho<T>(): func(T): T
|
||||
return (x: T): T => x
|
||||
enddef
|
||||
|
||||
var EchoNumber = MakeEcho<number>()
|
||||
echo EchoNumber(123)
|
||||
|
||||
var EchoString = MakeEcho<string>()
|
||||
echo EchoString('abc')
|
||||
<
|
||||
Compiling and Disassembling Generic functions~
|
||||
|
||||
The |:defcompile| command can be used to compile a generic function with a
|
||||
specific list of concrete types: >
|
||||
|
||||
defcompile MyFunc<number, list<number>, dict<string>>
|
||||
<
|
||||
The |:disassemble| command can be used to list the instructions generated for
|
||||
a generic function: >
|
||||
|
||||
disassemble MyFunc<string, dict<string>>
|
||||
disassemble MyFunc<number, list<blob>>
|
||||
<
|
||||
Limitations and Future Work~
|
||||
|
||||
Currently, Vim does not support:
|
||||
- Type inference for type variables: All types must be explicitly specified
|
||||
when calling a generic function.
|
||||
- Type constraints: It's not possible to restrict a type variable to a
|
||||
specific class or interface (e.g., `T extends SomeInterface`).
|
||||
- Default type arguments: Providing a default type for a type parameter
|
||||
when not explicitly specified.
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. Namespace, Import and Export
|
||||
*vim9script* *vim9-export* *vim9-import*
|
||||
|
||||
A Vim9 script can be written to be imported. This means that some items are
|
||||
@ -2174,7 +2314,7 @@ Or: >
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. Classes and interfaces *vim9-classes*
|
||||
7. Classes and interfaces *vim9-classes*
|
||||
|
||||
In legacy script a Dictionary could be used as a kind-of object, by adding
|
||||
members that are functions. However, this is quite inefficient and requires
|
||||
@ -2188,7 +2328,7 @@ functionality it is located in a separate help file: |vim9class.txt|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
9. Rationale *vim9-rationale*
|
||||
8. Rationale *vim9-rationale*
|
||||
|
||||
The :def command ~
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9class.txt* For Vim version 9.1. Last change: 2025 Apr 21
|
||||
*vim9class.txt* For Vim version 9.1. Last change: 2025 Jul 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -584,6 +584,8 @@ protected object methods, class variables and class methods.
|
||||
An interface can extend another interface using "extends". The sub-interface
|
||||
inherits all the instance variables and methods from the super interface.
|
||||
|
||||
An interface cannot be defined inside a function. *E1436*
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. More class details *Vim9-class* *Class* *class*
|
||||
@ -971,7 +973,7 @@ of that class. Unlike typical object instantiation with the |new()| method,
|
||||
enum instances cannot be created this way.
|
||||
|
||||
An enum can only be defined in a |Vim9| script file. *E1414*
|
||||
An enum cannot be defined inside a function.
|
||||
An enum cannot be defined inside a function. *E1435*
|
||||
|
||||
*E1415*
|
||||
An enum name must start with an uppercase letter. The name of an enum value
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: gpg(1) configuration file
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
|
||||
" Latest Revision: 2025-07-22 (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -17,7 +18,7 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 GpgKeywordPrg
|
||||
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
|
||||
\ silent exe ':hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+--' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'gpg'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:GpgKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer GpgKeywordPrg'
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: modules.conf(5) configuration file
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024-09-20 (remove erroneous endif)
|
||||
" Latest Revision: 2025-07-22 (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -19,7 +19,7 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 ModconfKeywordPrg
|
||||
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
|
||||
\ silent exe ':hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'modprobe.d'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:ModconfKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ModconfKeywordPrg'
|
||||
|
@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: mutt RC File
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
|
||||
" Latest Revision: 2025-07-22 (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -20,7 +21,7 @@ let &l:include = '^\s*source\>'
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 MuttrcKeywordPrg
|
||||
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
|
||||
\ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'muttrc'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:MuttrcKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer MuttrcKeywordPrg'
|
||||
|
@ -5,6 +5,7 @@
|
||||
" 2024 Jan 14 by Vim Project (browsefilter)
|
||||
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" 2024 Sep 19 by Konfekt (simplify keywordprg #15696)
|
||||
" 2025 Jul 22 by phanium (use :hor term #17822)
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
@ -51,7 +52,7 @@ endif
|
||||
|
||||
if exists('s:pwsh_cmd')
|
||||
if exists(':terminal') == 2
|
||||
command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
|
||||
command! -buffer -nargs=1 GetHelp silent exe 'hor term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
|
||||
else
|
||||
command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>')
|
||||
endif
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2024 Sep 19 (simplify keywordprg #15696)
|
||||
" 2024 Jul 22 by Vim project (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -36,7 +37,7 @@ endif
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 ReadlineKeywordPrg
|
||||
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline'
|
||||
\ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . '3 readline'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:ReadlineKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer ReadlineKeywordPrg'
|
||||
|
@ -7,6 +7,7 @@
|
||||
" Last Change: 2024 Sep 19 by Vim Project (compiler shellcheck)
|
||||
" 2024 Dec 29 by Vim Project (improve setting shellcheck compiler)
|
||||
" 2025 Mar 09 by Vim Project (set b:match_skip)
|
||||
" 2025 Jul 22 by phanium (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -53,7 +54,7 @@ let s:is_kornshell = get(b:, "is_kornshell", get(g:, "is_kornshell", 0))
|
||||
|
||||
if s:is_bash
|
||||
if exists(':terminal') == 2
|
||||
command! -buffer -nargs=1 ShKeywordPrg silent exe ':term bash -c "help "<args>" 2>/dev/null || man "<args>""'
|
||||
command! -buffer -nargs=1 ShKeywordPrg silent exe ':hor term bash -c "help "<args>" 2>/dev/null || man "<args>""'
|
||||
else
|
||||
command! -buffer -nargs=1 ShKeywordPrg echo system('bash -c "help <args>" 2>/dev/null || MANPAGER= man "<args>"')
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: OpenSSH client configuration file
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
|
||||
" Latest Revision: 2025-07-22 (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -17,7 +17,7 @@ let b:undo_ftplugin = 'setlocal com< cms< fo<'
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 SshconfigKeywordPrg
|
||||
\ silent exe 'term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
|
||||
\ silent exe 'hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s+' . <q-args> . '$', '\') . ''' --hilite-search" man ' . 'ssh_config'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:SshconfigKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SshconfigKeywordPrg'
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: sudoers(5) configuration files
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
|
||||
" Latest Revision: 2025-07-22 (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -18,7 +18,7 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 SudoersKeywordPrg
|
||||
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('\b' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'sudoers'
|
||||
\ silent exe ':hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('\b' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'sudoers'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:SudoersKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer SudoersKeywordPrg'
|
||||
|
14
runtime/ftplugin/uc.vim
Normal file
14
runtime/ftplugin/uc.vim
Normal file
@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: UnrealScript
|
||||
" Maintainer: Riley Bruins <ribru17@gmail.com>
|
||||
" Last Change: 2025 Jul 19
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
setl commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms<'
|
@ -2,7 +2,7 @@
|
||||
" Language: udev(8) rules file
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2024-09-19 (simplify keywordprg #15696)
|
||||
" Latest Revision: 2025-07-22 (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -18,7 +18,7 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
if has('unix') && executable('less') && exists(':terminal') == 2
|
||||
command -buffer -nargs=1 UdevrulesKeywordPrg
|
||||
\ silent exe ':term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'udev'
|
||||
\ silent exe ':hor term ' . 'env LESS= MANPAGER="less --pattern=''' . escape('^\s{,8}' . <q-args> . '\b', '\') . ''' --hilite-search" man ' . 'udev'
|
||||
setlocal iskeyword+=-
|
||||
setlocal keywordprg=:UdevrulesKeywordPrg
|
||||
let b:undo_ftplugin .= '| setlocal keywordprg< iskeyword< | sil! delc -buffer UdevrulesKeywordPrg'
|
||||
|
@ -5,6 +5,8 @@
|
||||
" Latest Revision: 2024 Sep 19
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
" Last Change:
|
||||
" 2025 Jul 23 by Vim Project (use :hor term #17822)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -20,7 +22,7 @@ let b:undo_ftplugin = "setl com< cms< fo< "
|
||||
|
||||
if executable('zsh') && &shell !~# '/\%(nologin\|false\)$'
|
||||
if exists(':terminal') == 2
|
||||
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':term zsh -c "autoload -Uz run-help; run-help <args>"'
|
||||
command! -buffer -nargs=1 ZshKeywordPrg silent exe ':hor term zsh -c "autoload -Uz run-help; run-help <args>"'
|
||||
else
|
||||
command! -buffer -nargs=1 ZshKeywordPrg echo system('MANPAGER= zsh -c "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
endif
|
||||
|
@ -196,3 +196,25 @@ silent! function Bar()
|
||||
return 42
|
||||
endfunction
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
nmap xxx,
|
||||
else
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
var heredoc =<< END
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
END
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
set path=.,,
|
||||
set clipboard=unnamed,unnamedplus
|
||||
" END_INDENT
|
||||
|
@ -196,3 +196,25 @@ silent! function Bar()
|
||||
return 42
|
||||
endfunction
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
nmap xxx,
|
||||
else
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
if true
|
||||
var heredoc =<< END
|
||||
foo
|
||||
bar
|
||||
baz
|
||||
END
|
||||
endif
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
set path=.,,
|
||||
set clipboard=unnamed,unnamedplus
|
||||
" END_INDENT
|
||||
|
@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Jul 16
|
||||
" Last Change: 2025 Jul 25
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
@ -873,13 +873,15 @@ endif
|
||||
if has("insert_expand")
|
||||
call <SID>AddOption("complete", gettext("specifies how Insert mode completion works for CTRL-N and CTRL-P"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cfc")
|
||||
call <SID>AddOption("completefuzzycollect", gettext("use fuzzy collection for specific completion modes"))
|
||||
call <SID>OptionL("cpt")
|
||||
call <SID>AddOption("autocomplete", gettext("automatic completion in insert mode"))
|
||||
call <SID>BinOptionG("ac", &ac)
|
||||
call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion"))
|
||||
call <SID>OptionL("cot")
|
||||
call <SID>AddOption("completeitemalign", gettext("popup menu item align order"))
|
||||
call <SID>OptionG("cia", &cia)
|
||||
call <SID>AddOption("completefuzzycollect", gettext("use fuzzy collection for specific completion modes"))
|
||||
call <SID>OptionL("cfc")
|
||||
if exists("+completepopup")
|
||||
call <SID>AddOption("completepopup", gettext("options for the Insert mode completion info popup"))
|
||||
call <SID>OptionG("cpp", &cpp)
|
||||
|
3
runtime/pack/dist/opt/editorconfig/mkzip.sh
vendored
3
runtime/pack/dist/opt/editorconfig/mkzip.sh
vendored
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
zip -r editorconfig-vim-$*.zip autoload/* doc/* ftdetect/* plugin/*
|
73
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
73
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
@ -19,7 +19,7 @@ if &cp || exists("g:loaded_netrw")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_netrw = "v183"
|
||||
let g:loaded_netrw = "v184"
|
||||
|
||||
if !has("patch-9.1.1054") && !has('nvim')
|
||||
echoerr 'netrw needs Vim v9.1.1054'
|
||||
@ -4861,7 +4861,6 @@ function s:NetrwMaps(islocal)
|
||||
nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(1)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(1)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(1)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mp :<c-u>call <SID>NetrwMarkFilePrint(1)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(1)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(1)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(1)<cr>
|
||||
@ -4973,7 +4972,6 @@ function s:NetrwMaps(islocal)
|
||||
nnoremap <buffer> <silent> <nowait> mg :<c-u>call <SID>NetrwMarkFileGrep(0)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mh :<c-u>call <SID>NetrwMarkHideSfx(0)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mm :<c-u>call <SID>NetrwMarkFileMove(0)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mp :<c-u>call <SID>NetrwMarkFilePrint(0)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mr :<c-u>call <SID>NetrwMarkFileRegexp(0)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> ms :<c-u>call <SID>NetrwMarkFileSource(0)<cr>
|
||||
nnoremap <buffer> <silent> <nowait> mT :<c-u>call <SID>NetrwMarkFileTag(0)<cr>
|
||||
@ -5932,39 +5930,6 @@ function s:NetrwMarkFileMove(islocal)
|
||||
|
||||
endfunction
|
||||
|
||||
" s:NetrwMarkFilePrint: (invoked by mp) This function prints marked files {{{2
|
||||
" using the hardcopy command. Local marked-file list only.
|
||||
function s:NetrwMarkFilePrint(islocal)
|
||||
let curbufnr= bufnr("%")
|
||||
|
||||
" sanity check
|
||||
if !exists("s:netrwmarkfilelist_{curbufnr}") || empty(s:netrwmarkfilelist_{curbufnr})
|
||||
call netrw#msg#Notify('ERROR', 'there are no marked files in this window (:help netrw-mf)')
|
||||
return
|
||||
endif
|
||||
let curdir= s:NetrwGetCurdir(a:islocal)
|
||||
|
||||
if exists("s:netrwmarkfilelist_{curbufnr}")
|
||||
let netrwmarkfilelist = s:netrwmarkfilelist_{curbufnr}
|
||||
call s:NetrwUnmarkList(curbufnr,curdir)
|
||||
for fname in netrwmarkfilelist
|
||||
if a:islocal
|
||||
if g:netrw_keepdir
|
||||
let fname= netrw#fs#ComposePath(curdir,fname)
|
||||
endif
|
||||
else
|
||||
let fname= curdir.fname
|
||||
endif
|
||||
1split
|
||||
" the autocmds will handle both local and remote files
|
||||
exe "sil NetrwKeepj e ".fnameescape(fname)
|
||||
hardcopy
|
||||
q
|
||||
endfor
|
||||
2match none
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" s:NetrwMarkFileRegexp: (invoked by mr) This function is used to mark {{{2
|
||||
" files when given a regexp (for which a prompt is
|
||||
" issued) (matches to name of files).
|
||||
@ -6195,37 +6160,20 @@ endfunction
|
||||
|
||||
" s:NetrwOpenFile: query user for a filename and open it {{{2
|
||||
function s:NetrwOpenFile(islocal)
|
||||
let ykeep= @@
|
||||
call inputsave()
|
||||
let fname= input("Enter filename: ")
|
||||
let fname = input("Enter filename: ")
|
||||
call inputrestore()
|
||||
|
||||
" determine if Lexplore is in use
|
||||
if exists("t:netrw_lexbufnr")
|
||||
" check if t:netrw_lexbufnr refers to a netrw window
|
||||
let lexwinnr = bufwinnr(t:netrw_lexbufnr)
|
||||
if lexwinnr != -1 && exists("g:netrw_chgwin") && g:netrw_chgwin != -1
|
||||
exe "NetrwKeepj keepalt ".g:netrw_chgwin."wincmd w"
|
||||
exe "NetrwKeepj e ".fnameescape(fname)
|
||||
let @@= ykeep
|
||||
endif
|
||||
if empty(fname)
|
||||
return
|
||||
endif
|
||||
|
||||
" Does the filename contain a path?
|
||||
if fname !~ '[/\\]'
|
||||
if exists("b:netrw_curdir")
|
||||
" save position for benefit of Rexplore
|
||||
let s:rexposn_{bufnr("%")}= winsaveview()
|
||||
if b:netrw_curdir =~ '/$'
|
||||
exe "NetrwKeepj e ".fnameescape(b:netrw_curdir.fname)
|
||||
else
|
||||
exe "e ".fnameescape(b:netrw_curdir."/".fname)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
exe "NetrwKeepj e ".fnameescape(fname)
|
||||
endif
|
||||
let @@= ykeep
|
||||
" save position for benefit of Rexplore
|
||||
let s:rexposn_{bufnr("%")}= winsaveview()
|
||||
|
||||
execute "NetrwKeepj e " . fnameescape(!isabsolutepath(fname)
|
||||
\ ? netrw#fs#ComposePath(b:netrw_curdir, fname)
|
||||
\ : fname)
|
||||
endfunction
|
||||
|
||||
" netrw#Shrink: shrinks/expands a netrw or Lexplorer window {{{2
|
||||
@ -6425,7 +6373,6 @@ function s:NetrwMenu(domenu)
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.8 '.g:NetrwTopLvlMenu.'Marked\ Files.Exe\ Cmd<tab>mx mx'
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.9 '.g:NetrwTopLvlMenu.'Marked\ Files.Move\ To\ Target<tab>mm mm'
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.10 '.g:NetrwTopLvlMenu.'Marked\ Files.Obtain<tab>O O'
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.11 '.g:NetrwTopLvlMenu.'Marked\ Files.Print<tab>mp mp'
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.12 '.g:NetrwTopLvlMenu.'Marked\ Files.Replace<tab>R R'
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.13 '.g:NetrwTopLvlMenu.'Marked\ Files.Set\ Target<tab>mt mt'
|
||||
exe 'sil! menu '.g:NetrwMenuPriority.'.14.14 '.g:NetrwTopLvlMenu.'Marked\ Files.Tag<tab>mT mT'
|
||||
|
12
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
12
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
@ -90,7 +90,6 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
Marked Files: Grep..................................|netrw-mg|
|
||||
Marked Files: Hiding and Unhiding by Suffix.........|netrw-mh|
|
||||
Marked Files: Moving................................|netrw-mm|
|
||||
Marked Files: Printing..............................|netrw-mp|
|
||||
Marked Files: Sourcing..............................|netrw-ms|
|
||||
Marked Files: Setting the Target Directory..........|netrw-mt|
|
||||
Marked Files: Tagging...............................|netrw-mT|
|
||||
@ -1066,7 +1065,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
|
||||
mg Apply vimgrep to marked files |netrw-mg|
|
||||
mh Toggle marked file suffices' presence on hiding list |netrw-mh|
|
||||
mm Move marked files to marked-file target directory |netrw-mm|
|
||||
mp Print marked files |netrw-mp|
|
||||
mr Mark files using a shell-style |regexp| |netrw-mr|
|
||||
mt Current browsing directory becomes markfile target |netrw-mt|
|
||||
mT Apply ctags to marked files |netrw-mT|
|
||||
@ -2001,7 +1999,6 @@ The following netrw maps make use of marked files:
|
||||
|netrw-mF| Unmark marked files
|
||||
|netrw-mg| Apply vimgrep to marked files
|
||||
|netrw-mm| Move marked files to target
|
||||
|netrw-mp| Print marked files
|
||||
|netrw-ms| Netrw will source marked files
|
||||
|netrw-mt| Set target for |netrw-mm| and |netrw-mc|
|
||||
|netrw-mT| Generate tags using marked files
|
||||
@ -2266,15 +2263,6 @@ from the current window (where one does the mf) to the target.
|
||||
|
||||
Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
|
||||
|
||||
MARKED FILES: PRINTING *netrw-mp* {{{2
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
(uses the local marked file list)
|
||||
|
||||
When "mp" is used, netrw will apply the |:hardcopy| command to marked files.
|
||||
What netrw does is open each file in a one-line window, execute hardcopy, then
|
||||
close the one-line window.
|
||||
|
||||
|
||||
MARKED FILES: SOURCING *netrw-ms* {{{2
|
||||
(See |netrw-mf| and |netrw-mr| for how to mark files)
|
||||
(uses the local marked file list)
|
||||
|
@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_netrwPlugin = "v183"
|
||||
let g:loaded_netrwPlugin = "v184"
|
||||
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Aap recipe for Portuguese Vim spell files.
|
||||
# See ftp://ftp.vim.org/pub/vim/runtime/spell/README.txt
|
||||
# See https://github.com/vim/vim/blob/master/runtime/spell/README.txt
|
||||
|
||||
# Use a freshly compiled Vim if it exists.
|
||||
@if os.path.exists('../../../src/vim'):
|
||||
|
@ -13,7 +13,7 @@ VIMRUNTIME = ../..
|
||||
# Uncomment this line to use valgrind for memory leaks and extra warnings.
|
||||
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$*
|
||||
|
||||
# Trace ruler liveness on demand.
|
||||
# Trace liveness on demand.
|
||||
# VIM_SYNTAX_TEST_LOG = `pwd`/testdir/failed/00-TRACE_LOG
|
||||
|
||||
# ENVVARS = LC_ALL=C VIM_SYNTAX_TEST_LOG="$(VIM_SYNTAX_TEST_LOG)"
|
||||
@ -39,7 +39,7 @@ test:
|
||||
@# the "vimcmd" file is used by the screendump utils
|
||||
@echo "../$(VIMPROG)" > testdir/vimcmd
|
||||
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
|
||||
@# Trace ruler liveness on demand.
|
||||
@# Trace liveness on demand.
|
||||
@#mkdir -p testdir/failed
|
||||
@#touch "$(VIM_SYNTAX_TEST_LOG)"
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(ENVVARS) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim > /dev/null
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jul 18
|
||||
" Last Change: 2025 Jul 29
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
@ -267,6 +267,8 @@ syn match vimVimVar "\<v:" nextgroup=vimSubscript,vimVimVarName,vimVarNameError
|
||||
syn match vimOptionVar "&\%([lg]:\)\=" nextgroup=vimSubscript,vimOptionVarName,vimVarNameError
|
||||
syn cluster vimSpecialVar contains=vimEnvvar,vimLetRegister,vimOptionVar,vimVimVar
|
||||
|
||||
Vim9 syn match vimVar contained "\<\h\w*\ze<" nextgroup=vim9TypeArgs
|
||||
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\=="
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.="
|
||||
Vim9 syn match vim9LhsVariable "\s\=\%([bwgt]:\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVarScope
|
||||
@ -468,7 +470,7 @@ syn match vimFunctionName contained
|
||||
\ contains=vimFunctionError,vimFunctionScope,vimFunctionSID,Tag
|
||||
syn match vimDefName contained
|
||||
\ "\%(<[sS][iI][dD]>\|[bwglstav]:\)\=\%([[:alnum:]_#.]\+\|{.\{-1,}}\)\+"
|
||||
\ nextgroup=vimDefParams,vimCmdSep,vimComment,vim9Comment
|
||||
\ nextgroup=vimDefTypeParams,vimDefParams,vimCmdSep,vimComment,vim9Comment
|
||||
\ contains=vimFunctionError,vimFunctionScope,vimFunctionSID,Tag
|
||||
|
||||
syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimFunctionBang,vimFunctionName,vimFunctionPattern,vimCmdSep,vimComment
|
||||
@ -498,8 +500,15 @@ syn region vimDefParams contained
|
||||
\ end=")"
|
||||
\ skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError
|
||||
\ contains=vimDefParam,vim9Comment,vimFunctionParamEquals,vimOperParen
|
||||
syn region vimDefTypeParams contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<"
|
||||
\ end=">"
|
||||
\ nextgroup=vimDefParams
|
||||
\ contains=vim9DefTypeParam
|
||||
syn match vimFunctionParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFunctionParamEquals
|
||||
syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFunctionParamEquals
|
||||
syn match vim9DefTypeParam contained "\<\u\w*\>"
|
||||
|
||||
syn match vimFunctionParamEquals contained "=" skipwhite nextgroup=@vimExprList
|
||||
syn match vimFunctionMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipempty nextgroup=vimFunctionBody,vimFunctionComment,vimEndfunction,vimFunctionMod,vim9CommentError
|
||||
@ -531,7 +540,7 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
syn region vimDefFold
|
||||
\ start="\<def!"
|
||||
"\ assume no dict literal in curly-brace name expressions
|
||||
\ start="\<def\>\s*\%([[:alnum:]_:<>.#]\+\|{.\{-1,}}\)\+("
|
||||
\ start="\<def\>\s*\%([[:alnum:]_:<>.#]\+\|{.\{-1,}}\)\+[<(]"
|
||||
\ end="^\s*:\=\s*enddef\>"
|
||||
\ contains=vimDef
|
||||
\ extend fold keepend transparent
|
||||
@ -573,14 +582,20 @@ if s:vim9script
|
||||
|
||||
" Methods {{{3
|
||||
syn match vim9MethodDef contained "\<def\>" skipwhite nextgroup=vim9MethodDefName,vim9ConstructorDefName
|
||||
syn match vim9MethodDefName contained "\<\h\w*\>" nextgroup=vim9MethodDefParams contains=@vim9MethodName
|
||||
syn match vim9MethodDefName contained "\<\h\w*\>" nextgroup=vim9MethodDefParams,vim9MethodDefTypeParams contains=@vim9MethodName
|
||||
syn region vim9MethodDefParams contained
|
||||
\ matchgroup=Delimiter start="(" end=")"
|
||||
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError
|
||||
\ contains=vimDefParam,vim9Comment,vimFunctionParamEquals
|
||||
syn region vim9MethodDefTypeParams contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<"
|
||||
\ end=">"
|
||||
\ nextgroup=vim9MethodDefParams
|
||||
\ contains=vim9DefTypeParam
|
||||
|
||||
syn match vim9ConstructorDefName contained "\<_\=new\w*\>"
|
||||
\ nextgroup=vim9ConstructorDefParams
|
||||
\ nextgroup=vim9ConstructorDefParams,vim9ConstuctorDefTypeParams
|
||||
\ contains=@vim9MethodName
|
||||
syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>"
|
||||
\ skipwhite nextgroup=vimParamType,vimFunctionParamEquals
|
||||
@ -589,6 +604,12 @@ if s:vim9script
|
||||
\ matchgroup=Delimiter start="(" end=")"
|
||||
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError
|
||||
\ contains=vim9ConstructorDefParam,vim9Comment,vimFunctionParamEquals
|
||||
syn region vim9ConstuctorDefTypeParams contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<"
|
||||
\ end=">"
|
||||
\ nextgroup=vim9ConstructorDefParams
|
||||
\ contains=vim9DefTypeParam
|
||||
|
||||
syn region vim9MethodDefReturnType contained
|
||||
\ start=":\%(\s\|\n\)\@="
|
||||
@ -622,8 +643,11 @@ if s:vim9script
|
||||
syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
syn region vim9MethodDefFold contained start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
|
||||
syn region vim9MethodDefFold contained start="^\s*:\=def\s\+_\=new\i*(" end="^\s*:\=enddef\>" contains=vim9MethodDef fold keepend extend transparent
|
||||
syn region vim9MethodDefFold contained
|
||||
\ start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\w*[<(]"
|
||||
\ end="^\s*:\=enddef\>"
|
||||
\ contains=vim9MethodDef
|
||||
\ fold keepend extend transparent
|
||||
endif
|
||||
|
||||
syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold
|
||||
@ -674,12 +698,19 @@ if s:vim9script
|
||||
syn cluster vim9EnumNameContinue contains=vim9EnumNameContinue,vim9EnumNameContinueComment
|
||||
|
||||
" enforce enum value list location
|
||||
syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment
|
||||
syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueTypeArgs,vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment
|
||||
syn match vim9EnumValueListComma contained "," skipwhite skipempty nextgroup=vim9EnumValue,vim9EnumValueListCommaComment
|
||||
syn region vim9EnumValueListCommaComment contained
|
||||
\ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$"
|
||||
\ skipwhite skipempty nextgroup=vim9EnumValueListCommaComment,vim9EnumValue
|
||||
\ contains=@vimCommentGroup,vimCommentString
|
||||
syn region vim9EnumValueTypeArgs contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<\ze\a"
|
||||
\ end=">"
|
||||
\ nextgroup=vim9EnumValueArgList
|
||||
\ contains=@vimType
|
||||
\ oneline
|
||||
syn region vim9EnumValueArgList contained
|
||||
\ matchgroup=vimParenSep start="(" end=")"
|
||||
\ nextgroup=vim9EnumValueListComma
|
||||
@ -703,7 +734,7 @@ if s:vim9script
|
||||
syn match vim9InterfaceName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends
|
||||
|
||||
syn keyword vim9AbstractDef contained def skipwhite nextgroup=vim9AbstractDefName
|
||||
syn match vim9AbstractDefName contained "\<\h\w*\>" skipwhite nextgroup=vim9AbstractDefParams contains=@vim9MethodName
|
||||
syn match vim9AbstractDefName contained "\<\h\w*\>" skipwhite nextgroup=vim9AbstractDefParams,vim9AbstractDefTypeParams contains=@vim9MethodName
|
||||
syn region vim9AbstractDefParams contained
|
||||
\ matchgroup=Delimiter start="(" end=")"
|
||||
\ skipwhite skipnl nextgroup=vimDefComment,vim9AbstractDefReturnType,vimCommentError
|
||||
@ -713,6 +744,12 @@ if s:vim9script
|
||||
\ skipwhite skipnl nextgroup=vimDefComment,vimCommentError
|
||||
\ contains=vimTypeSep
|
||||
\ transparent
|
||||
syn region vim9AbstractDefTypeParams contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<"
|
||||
\ end=">"
|
||||
\ nextgroup=vim9AbstractDefParams
|
||||
\ contains=vim9DefTypeParam
|
||||
|
||||
VimFoldi syn region vim9InterfaceBody start="\<interface\>" matchgroup=vimCommand end="\<endinterface\>" contains=@vim9InterfaceBodyList transparent
|
||||
|
||||
@ -1368,9 +1405,20 @@ syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation,
|
||||
syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite skipnl nextgroup=vimMapRhsContinue
|
||||
syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn match vimMapMod contained "\%#=1<\%(buffer\|expr\|nowait\|script\|silent\|special\|unique\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader skipnl nextgroup=vimMapRhsContinue
|
||||
" assume a continuation comment introduces the RHS
|
||||
syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader
|
||||
syn region vimMapRhs contained
|
||||
\ start="\S"
|
||||
\ skip=+\\|\|\@1<=|\|\n\s*\%(\\\|["#]\\ \)+
|
||||
\ end="\ze|"
|
||||
\ end="$"
|
||||
\ nextgroup=vimCmdSep
|
||||
\ contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader
|
||||
syn region vimMapRhsContinue contained
|
||||
\ start=+^\s*\%(\\\|["#]\\ \)+
|
||||
\ skip=+\\|\|\@1<=|\|\n\s*\%(\\\|["#]\\ \)+
|
||||
\ end="\ze|"
|
||||
\ end="$"
|
||||
\ nextgroup=vimCmdSep
|
||||
\ contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader
|
||||
syn match vimMapLeader contained "\%#=1\c<\%(local\)\=leader>" contains=vimMapLeaderKey
|
||||
syn keyword vimMapModKey contained buffer expr nowait script silent special unique
|
||||
syn case ignore
|
||||
@ -1431,7 +1479,7 @@ syn match vimBracket contained "[\\<>]"
|
||||
syn case match
|
||||
|
||||
" User Command Highlighting: {{{2
|
||||
syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([.(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
|
||||
syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([<.(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
|
||||
|
||||
" Vim user commands
|
||||
|
||||
@ -2088,18 +2136,26 @@ unlet s:interfaces
|
||||
" Function Call Highlighting: {{{2
|
||||
" (following Gautam Iyer's suggestion)
|
||||
" ==========================
|
||||
syn match vimFunc contained "\<\l\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncName
|
||||
syn match vimUserFunc contained "\.\@1<=\l\w*\ze\s*(" skipwhite nextgroup=vimOperParen
|
||||
syn match vimUserFunc contained "\<\%([[:upper:]_]\|\%(\h\w*\.\)\+\h\)\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vim9MethodName,vim9Super,vim9This
|
||||
syn match vimUserFunc contained "\<\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimVarScope
|
||||
syn match vimUserFunc contained "\%(\<[sgbwtlav]:\|<[sS][iI][dD]>\)\%(\h\w*\.\)*\h\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimVarScope,vimNotation
|
||||
syn match vimFunc contained "\<\l\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncName
|
||||
syn match vimUserFunc contained "\.\@1<=\l\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen,vim9TypeArgs
|
||||
syn match vimUserFunc contained "\<\%([[:upper:]_]\|\%(\h\w*\.\)\+\h\)\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vim9MethodName,vim9Super,vim9This
|
||||
syn match vimUserFunc contained "\<\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen contains=vimVarScope
|
||||
syn match vimUserFunc contained "\%(\<[sgbwtlav]:\|<[sS][iI][dD]>\)\%(\h\w*\.\)*\h\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vimVarScope,vimNotation
|
||||
|
||||
Vim9 syn match vim9UserFunc "^\s*\zs\%([sgbwtv]:\|<[sS][iI][dD]>\)\=\%(\h\w*[.#]\)*\h\w*\ze(" skipwhite nextgroup=vimOperParen contains=vimVarScope,vimNotation,vim9MethodName,vim9Super,vim9This
|
||||
Vim9 syn match vim9Func "^\s*\zs\l\w*\ze(" skipwhite nextgroup=vimOperParen contains=vimFuncName
|
||||
Vim9 syn match vim9UserFunc "^\s*\zs\%([sgbwtv]:\|<[sS][iI][dD]>\)\=\%(\h\w*[.#]\)*\h\w*\ze[<(]" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vimVarScope,vimNotation,vim9MethodName,vim9Super,vim9This
|
||||
Vim9 syn match vim9Func "^\s*\zs\l\w*\ze(" skipwhite nextgroup=vimOperParen contains=vimFuncName
|
||||
|
||||
syn cluster vimFunc contains=vimFunc,vimUserFunc
|
||||
syn cluster vim9Func contains=vim9Func,vim9UserFunc
|
||||
|
||||
syn region vim9TypeArgs contained
|
||||
\ matchgroup=Delimiter
|
||||
\ start="<\ze\a"
|
||||
\ end=">"
|
||||
\ nextgroup=vimOperParen
|
||||
\ contains=@vimType
|
||||
\ oneline
|
||||
|
||||
" Beginners - Patterns that involve ^ {{{2
|
||||
" =========
|
||||
Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle extend
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jul 12
|
||||
" Last Change: 2025 Jul 20
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
@ -113,6 +113,7 @@ syn match helpSpecial "^\t[>enf{}^L:=lbghNEpti+cC/(uUwWkmMjJ)*#P]N\s"ms=s+2,me=
|
||||
syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}"
|
||||
syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1
|
||||
syn match helpSpecial "<[-a-zA-Z0-9_]\+>"
|
||||
syn match helpSpecial "<buffer=\w\+>"
|
||||
syn match helpSpecial "<[SCM]-.>"
|
||||
syn match helpNormal "<---*>"
|
||||
syn match helpSpecial "\[range]"
|
||||
@ -126,6 +127,9 @@ syn match helpSpecial "\[+num]"
|
||||
syn match helpSpecial "\[-num]"
|
||||
syn match helpSpecial "\[+cmd]"
|
||||
syn match helpSpecial "\[++opt]"
|
||||
syn match helpSpecial "\[++once]"
|
||||
syn match helpSpecial "\[++nested]"
|
||||
syn match helpSpecial "\[++t]"
|
||||
syn match helpSpecial "\[arg]"
|
||||
syn match helpSpecial "\[arguments]"
|
||||
syn match helpSpecial "\[ident]"
|
||||
@ -179,6 +183,9 @@ syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*"
|
||||
syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*"
|
||||
syn match helpDebug "\t[* ]Debug\t\+[a-z].*"
|
||||
syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*"
|
||||
syn match helpBold "\t[* ]Bold\t\+[a-z].*"
|
||||
syn match helpItalic "\t[* ]Italic\t\+[a-z].*"
|
||||
syn match helpBoldItalic "\t[* ]BoldItalic\t\+[a-z].*"
|
||||
syn match helpError "\t[* ]Error\t\+[a-z].*"
|
||||
syn match helpTodo "\t[* ]Todo\t\+[a-z].*"
|
||||
|
||||
@ -250,6 +257,9 @@ hi def link helpDelimiter Delimiter
|
||||
hi def link helpSpecialComment SpecialComment
|
||||
hi def link helpDebug Debug
|
||||
hi def link helpUnderlined Underlined
|
||||
hi def link helpBold Bold
|
||||
hi def link helpItalic Italic
|
||||
hi def link helpBoldItalic BoldItalic
|
||||
hi def link helpError Error
|
||||
hi def link helpTodo Todo
|
||||
hi def link helpURL String
|
||||
|
@ -62,6 +62,9 @@ else
|
||||
endif
|
||||
SynColor Error term=reverse cterm=NONE ctermfg=White ctermbg=Red gui=NONE guifg=White guibg=Red
|
||||
SynColor Todo term=standout cterm=NONE ctermfg=Black ctermbg=Yellow gui=NONE guifg=Blue guibg=Yellow
|
||||
SynColor Bold term=bold cterm=bold ctermfg=NONE ctermbg=NONE gui=bold guifg=NONE guibg=NONE
|
||||
SynColor Italic term=italic cterm=italic ctermfg=NONE ctermbg=NONE gui=italic guifg=NONE guibg=NONE
|
||||
SynColor BoldItalic term=bold,italic cterm=bold,italic ctermfg=NONE ctermbg=NONE gui=bold,italic guifg=NONE guibg=NONE
|
||||
|
||||
" Common groups that link to default highlighting.
|
||||
" You can specify other highlighting easily.
|
||||
|
@ -61,8 +61,6 @@ an "input/setup/java.vim" script file with the following lines:
|
||||
Both inline setup commands and setup scripts may be used at the same time, the
|
||||
script file will be sourced before any VIM_TEST_SETUP commands are executed.
|
||||
|
||||
Every line of a source file must not be longer than 1425 (19 x 75) characters.
|
||||
|
||||
If there is no further setup required, you can now run all tests:
|
||||
|
||||
make test
|
||||
@ -112,6 +110,20 @@ If they look OK, move them to the "dumps" directory:
|
||||
If you now run the test again, it will succeed.
|
||||
|
||||
|
||||
Limitations for syntax plugin tests
|
||||
-----------------------------------
|
||||
|
||||
Do not compose ASCII lines that do not fit a 19 by 75 window (1425 columns).
|
||||
|
||||
Use multibyte characters, if at all, sparingly (see #16559). When possible,
|
||||
move multibyte characters closer to the end of a line and keep the line short:
|
||||
no more than a 75-byte total of displayed characters. A poorly rendered line
|
||||
may otherwise become wrapped when enough of spurious U+FFFD (0xEF 0xBF 0xBD)
|
||||
characters claim more columns than are available (75) and then invalidate line
|
||||
correspondence under test. Refrain from mixing non-spurious U+FFFD characters
|
||||
with other multibyte characters in the same line.
|
||||
|
||||
|
||||
Adjusting a syntax plugin test
|
||||
------------------------------
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[🍌猫<EFBFBD>]+?+ge
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
@ -1,2 +0,0 @@
|
||||
" Replace known non-Latin-1 characters.
|
||||
%s+[ƒɐɘʬʭΑ-Ωα-ω<EFBFBD>]+?+Ige
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user