Merge remote-tracking branch 'vim/master'

Additional test fixes:
- test_macvim:
  - remove check.vim import which is now done automatically
- test_gui:
  - Test_Buffers_Menu add conditional check to not run the
    LoadBufferMenu autocmd since in MacVim we don't use it.
  - Test_scrollbars remove go-k from the guioptions, due to MacVim's
    implementation being async compared to normal GVim. May need to
    revisit this in the future.

Also fix code indentation for MacVim-specific code to pass the new
Test_indent_of_source_files() test in test_codestyle.vim.
This commit is contained in:
Yee Cheng Chin
2025-07-22 16:34:55 -07:00
1814 changed files with 102913 additions and 78231 deletions

View File

@@ -5,9 +5,9 @@ env:
freebsd_task:
name: FreeBSD
matrix:
- name: FreeBSD 14.2
- name: FreeBSD 14.3
freebsd_instance:
image_family: freebsd-14-2
image_family: freebsd-14-3
timeout_in: 20m
install_script:
- pkg install -y gettext

View File

@@ -39,3 +39,12 @@ trim_trailing_whitespace = false
[src/testdir/test*.vim]
# Some tests need trailing whitespaces, for example `set showbreak=>>\ `
trim_trailing_whitespace = false
#
# Some custom files do not use tabs
#
[src/sign.c]
indent_style = space
[src/sound.c]
indent_style = space

View File

@@ -13,3 +13,15 @@
# change indentation style of netrw plugin
c363ca1ecd1f8db03663ef98dcf41eeacc3c22c7
c673b805ad80d0aef07e745d412a2bf298ba1c07
# fix indentation style in insexpand.c v9.1.1352
355db99d12a89f05765948b33eecd6d9733e16bb
# fix indentation styles in various files v9.1.1363
c2a9000bc1b4a2cbcfeef55450c184b16906d910
# indentation style in various files v9.1.1364
562610cfa327c8ebff12a1700525e17a070d5e2c
# Patch v9.1.1371
19e1dd6b6aeb96d64122332a8c3d17b9d5ca007b
# Patch v9.1.1372
a4a00a7ad0cfa26685c057c11a09bec2c962346a
# Patch v9.1.1390
e89aef3f65388a8b627c77f250525f2a264716c5

30
.gitattributes vendored
View File

@@ -1 +1,31 @@
src/testdir/test42.in diff
# `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
# 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
# GitHub reacts to the `linguist-generated` attribute, by ignoring marked files
# for the repository's language statistics and hiddning changes in these files
# by default in diffs.
#
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
src/po/vim.pot linguist-generated=true

1348
.github/MAINTAINERS vendored

File diff suppressed because it is too large Load Diff

View File

@@ -9,7 +9,7 @@ permissions:
jobs:
scan:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
CC: gcc
@@ -36,7 +36,6 @@ jobs:
gettext \
libcanberra-dev \
libperl-dev \
python2-dev \
python3-dev \
liblua5.4-dev \
lua5.4 \
@@ -53,7 +52,7 @@ jobs:
echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
(
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
) >> $GITHUB_ENV
- name: Configure

3
.gitignore vendored
View File

@@ -22,6 +22,8 @@ src/auto/osdef.h
src/auto/link.log
src/auto/link.sed
src/auto/pathdef.c
src/auto/wayland/*.c
src/auto/wayland/*.h
# Windows
*.exe
@@ -64,7 +66,6 @@ src/xxd/xxd.dSYM
*~
*.pyc
*.log
src/po/vim.pot
src/tags
/tags
/GPATH

View File

@@ -24,6 +24,8 @@ src/auto/osdef.h
src/auto/link.log
src/auto/link.sed
src/auto/pathdef.c
src/auto/wayland/*.c
src/auto/wayland/*.h
# Windows
*.exe
@@ -66,7 +68,6 @@ src/xxd/xxd.dSYM
*~
*.pyc
*.log
src/po/vim.pot
src/tags
/tags
/GPATH

View File

@@ -3,7 +3,7 @@
Patches are welcome in whatever form.
Discussions about patches happen on the [vim-dev][0] mailing list.
If you create a pull request on GitHub it will be
forwarded to the vim-dev mailing list. You can also send your patch there
forwarded to the vim-dev mailing list. You can also send your patch there
directly (but please note, the initial posting is subject to moderation).
In that case an attachment with a unified diff format is preferred.
Information about the mailing list can be found [on the Vim website][0]
@@ -12,14 +12,14 @@ A pull request has the advantage that it will trigger the Continuous
Integration tests, you will be warned of problems (you can ignore the coverage
warning, it's noisy).
Please consider adding a test. All new functionality should be tested and bug
Please consider adding a test. All new functionality should be tested and bug
fixes should be tested for regressions: the test should fail before the fix and
pass after the fix. Look through recent patches for examples and find help
with ":help testing". The tests are located under "src/testdir".
pass after the fix. Look through recent patches for examples and find help
with ":help testing". The tests are located under "src/testdir".
Contributions will be distributed with Vim under the Vim license. Providing a
Contributions will be distributed with Vim under the Vim license. Providing a
change to be included implies that you agree with this and your contribution
does not cause us trouble with trademarks or patents. There is no CLA to sign.
does not cause us trouble with trademarks or patents. There is no CLA to sign.
## Signing-off commits
@@ -27,19 +27,19 @@ While not required, it's recommended to use **Signed-off commits** to ensure
transparency, accountability, and compliance with open-source best practices.
Signed-off commits follow the [Developer Certificate of Origin (DCO)][15],
which confirms that contributors have the right to submit their changes under
the project's license. This process adds a `Signed-off-by` line to commit
the project's license. This process adds a `Signed-off-by` line to commit
messages, verifying that the contributor agrees to the project's licensing
terms. To sign off a commit, simply use the -s flag when committing:
terms. To sign off a commit, simply use the -s flag when committing:
```sh
git commit -s
```
```
This ensures that every contribution is properly documented and traceable,
aligning with industry standards used in projects like the Linux Kernel or
the git project. By making Signed-off commits a standard practice, we help
the git project. By making Signed-off commits a standard practice, we help
maintain a legally compliant and well-governed codebase while fostering trust
within our contributor community.
within our contributor community.
When merging PRs into Vim, the current maintainer @chrisbra usually adds missing
`Signed-off-by` trailers for the author user name and email address as well for
@@ -48,12 +48,12 @@ approvers are happy with that particular change.
# Reporting issues
We use GitHub issues, but that is not a requirement. Writing to the Vim
We use GitHub issues, but that is not a requirement. Writing to the Vim
mailing list is also fine.
Please use the GitHub issues only for actual issues. If you are not 100% sure
that your problem is a Vim issue, please first discuss this on the Vim user
mailing list. Try reproducing the problem without any of your plugins or settings:
mailing list. Try reproducing the problem without any of your plugins or settings:
vim --clean
@@ -71,13 +71,13 @@ Or open [the todo file][todo list] on GitHub to see the latest version.
# Syntax, indent and other runtime files
The latest version of these files can be obtained from the repository.
They are usually not updated with numbered patches. However, they may
They are usually not updated with numbered patches. However, they may
or may not work with older Vim releases (since they may contain new features).
If you find a problem with one of these files or have a suggestion for
improvement, please first try to contact the maintainer directly.
Look in the header of the file for the name, email address, github handle and/or
upstream repository. You may also check the [MAINTAINERS][11] file.
upstream repository. You may also check the [MAINTAINERS][11] file.
The maintainer will take care of issues and send updates to the Vim project for
distribution with Vim.
@@ -88,23 +88,25 @@ If the maintainer does not respond, contact the [vim-dev][0] mailing list.
If you want to contribute new runtime files for Vim or Neovim, please create a
PR with your changes against this repository here. For new filetypes, do not forget:
* to add a new [filetype test][12] (keep it similar to the other filetype tests).
* all configuration switches should be documented
- to add a new [filetype test][12] (keep it similar to the other filetype tests).
- all configuration switches should be documented
(check [filetype.txt][13] and/or [syntax.txt][14] for filetype and syntax plugins)
* add yourself as Maintainer to the top of file (again, keep the header similar to
- add yourself as Maintainer to the top of file (again, keep the header similar to
other runtime files)
* add yourself to the [MAINTAINERS][11] file.
- add yourself to the [MAINTAINERS][11] file.
# Translations
Translating messages and runtime files is very much appreciated! These things
Translating messages and runtime files is very much appreciated! These things
can be translated:
* Messages in Vim, see [src/po/README.txt][1]
Also used for the desktop icons.
* Menus, see [runtime/lang/README.txt][2]
* Vim tutor, see [runtime/tutor/README.txt][3]
* Manual pages, see [runtime/doc/\*.1][4] for examples
* Installer, see [nsis/lang/README.txt][5]
- Messages in Vim, see [src/po/README.txt][1]
Also used for the desktop icons.
- Menus, see [runtime/lang/README.txt][2]
- Vim tutor, see [runtime/tutor/README.txt][3]
- Manual pages, see [runtime/doc/\*.1][4] for examples
- Installer, see [nsis/lang/README.txt][5]
The help files can be translated and made available separately.
See https://www.vim.org/translations.php for examples.
@@ -113,9 +115,11 @@ See https://www.vim.org/translations.php for examples.
Please have a look at the following [discussion][6], which should give you some
ideas. Please also check the [develop.txt][7] helpfile for the recommended
style. Often it's also beneficial to check the surrounding code for the style
coding style. Often it's also beneficial to check the surrounding code for the style
being used.
For the recommended documentation style, please check [helphelp.txt][16].
# I have a question
If you have some question on the style guide, please contact the [vim-dev][0]
@@ -139,3 +143,4 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
[13]: https://github.com/vim/vim/blob/master/runtime/doc/filetype.txt
[14]: https://github.com/vim/vim/blob/master/runtime/doc/syntax.txt
[15]: https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
[16]: https://github.com/vim/vim/blob/master/runtime/doc/helphelp.txt

127
Filelist
View File

@@ -23,8 +23,12 @@ SRC_ALL = \
ci/appveyor.bat \
ci/config.mk*.sed \
ci/if_ver*.vim \
ci/if_feat_check.vim \
ci/setup-xvfb.sh \
ci/setup-sway.sh \
ci/remove_snap.sh \
ci/ddebs.list \
ci/pinned-pkgs \
src/Make_all.mak \
src/README.md \
src/alloc.c \
@@ -147,6 +151,7 @@ SRC_ALL = \
src/strings.c \
src/structs.h \
src/syntax.c \
src/tabpanel.c \
src/tag.c \
src/term.c \
src/terminal.c \
@@ -172,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 \
@@ -179,63 +185,67 @@ SRC_ALL = \
src/winclip.c \
src/window.c \
src/xxd/xxd.c \
src/testdir/gen_opt_test.vim \
src/testdir/README.txt \
src/testdir/Make_all.mak \
src/testdir/*.in \
src/testdir/*.py \
src/testdir/keycode_check.vim \
src/testdir/keycode_check.json \
src/testdir/lsan-suppress.txt \
src/testdir/sautest/autoload/*.vim \
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/check.vim \
src/testdir/Make_all.mak \
src/testdir/README.txt \
src/testdir/commondumps.vim \
src/testdir/gui_init.vim \
src/testdir/gui_preinit.vim \
src/testdir/mouse.vim \
src/testdir/runtest.vim \
src/testdir/screendump.vim \
src/testdir/setup.vim \
src/testdir/setup_gui.vim \
src/testdir/shared.vim \
src/testdir/vim9.vim \
src/testdir/script_util.vim \
src/testdir/summarize.vim \
src/testdir/term_util.vim \
src/testdir/view_util.vim \
src/testdir/viewdumps.vim \
src/testdir/test[0-9]*.ok \
src/testdir/test77a.ok \
src/testdir/test77a.com \
src/testdir/test_*.vim \
src/testdir/crash/* \
src/testdir/dumps/*.dump \
src/testdir/dumps/*.vim \
src/testdir/keycode_check.json \
src/testdir/keycode_check.vim \
src/testdir/lsan-suppress.txt \
src/testdir/python2/*.py \
src/testdir/python3/*.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/pythonx/*.py \
src/testdir/pythonx/topmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/pyxfile/*.py \
src/testdir/dumps/*.dump \
src/testdir/dumps/*.vim \
src/testdir/ru_RU/LC_MESSAGES/Makefile \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \
src/testdir/runtest.vim \
src/testdir/samples/*.html \
src/testdir/samples/*.txt \
src/testdir/samples/*.vim \
src/testdir/samples/evil.zip \
src/testdir/samples/evil.tar \
src/testdir/samples/poc.zip \
src/testdir/samples/test000 \
src/testdir/samples/sample.tar \
src/testdir/samples/test.zip \
src/testdir/samples/test000 \
src/testdir/samples/test_undo.txt.undo \
src/testdir/samples/testa.zip \
src/testdir/color_ramp.vim \
src/testdir/sautest/autoload/*.vim \
src/testdir/silent.wav \
src/testdir/popupbounce.vim \
src/testdir/crash/* \
src/testdir/ru_RU/LC_MESSAGES/Makefile \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
src/testdir/test77a.com \
src/testdir/test77a.ok \
src/testdir/test[0-9]*.ok \
src/testdir/test_*.vim \
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/util/check.vim \
src/testdir/util/color_ramp.vim \
src/testdir/util/gen_opt_test.vim \
src/testdir/util/gui_init.vim \
src/testdir/util/gui_preinit.vim \
src/testdir/util/mouse.vim \
src/testdir/util/popupbounce.vim \
src/testdir/util/screendump.vim \
src/testdir/util/script_util.vim \
src/testdir/util/setup.vim \
src/testdir/util/setup_gui.vim \
src/testdir/util/shared.vim \
src/testdir/util/summarize.vim \
src/testdir/util/term_util.vim \
src/testdir/util/view_util.vim \
src/testdir/util/vim9.vim \
src/testdir/util/window_manager.vim \
src/testdir/viewdumps.vim \
src/proto.h \
src/protodef.h \
src/proto/alloc.pro \
@@ -331,6 +341,7 @@ SRC_ALL = \
src/proto/spellsuggest.pro \
src/proto/strings.pro \
src/proto/syntax.pro \
src/proto/tabpanel.pro \
src/proto/tag.pro \
src/proto/term.pro \
src/proto/terminal.pro \
@@ -352,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 \
@@ -484,6 +496,12 @@ SRC_UNIX = \
src/gui_xmebwp.h \
src/gui_x11.c \
src/gui_x11_pm.h \
src/auto/wayland/README.txt \
src/auto/wayland/Makefile \
src/auto/wayland/protocols/ext-data-control-v1.xml \
src/auto/wayland/protocols/wlr-data-control-unstable-v1.xml \
src/auto/wayland/protocols/xdg-shell.xml \
src/auto/wayland/protocols/primary-selection-unstable-v1.xml \
src/if_xcmdsrv.c \
src/link.sh \
src/installman.sh \
@@ -502,18 +520,21 @@ SRC_UNIX = \
src/proto/gui_motif.pro \
src/proto/gui_xmdlg.pro \
src/proto/gui_x11.pro \
src/proto/wayland.pro \
src/proto/if_xcmdsrv.pro \
src/proto/os_unix.pro \
src/proto/pty.pro \
src/pty.c \
src/testdir/Makefile \
src/testdir/unix.vim \
src/testdir/util/unix.vim \
src/toolcheck \
src/vim_icon.xbm \
src/vim_mask.xbm \
src/vimtutor \
src/gvimtutor \
src/wayland.c \
src/which.sh \
src/gen-wayland-protocols.sh \
src/xxd/Makefile \
# Source files for both MS Windows and Unix-like.
@@ -599,7 +620,7 @@ SRC_DOS = \
src/testdir/Make_dos.mak \
src/testdir/Make_mvc.mak \
src/testdir/Make_ming.mak \
src/testdir/dos.vim \
src/testdir/util/dos.vim \
src/uninstall.c \
src/vim.rc \
src/vim.manifest \
@@ -652,7 +673,7 @@ SRC_AMI = \
src/os_amiga.h \
src/proto/os_amiga.pro \
src/testdir/Make_amiga.mak \
src/testdir/amiga.vim \
src/testdir/util/amiga.vim \
src/xxd/Make_amiga.mak \
# Source files for Haiku (also in the extra archive).
@@ -683,7 +704,7 @@ SRC_VMS = \
src/os_vms_mms.c \
src/proto/os_vms.pro \
src/testdir/Make_vms.mms \
src/testdir/vms.vim \
src/testdir/util/vms.vim \
src/xxd/Make_vms.mms \
vimtutor.com \
@@ -774,7 +795,6 @@ RT_ALL = \
runtime/tools/[a-z]*[a-z0-9] \
runtime/tutor/README.txt \
runtime/tutor/tutor1 \
runtime/tutor/tutor1.utf-8 \
runtime/tutor/en/vim-01-beginner.tutor \
runtime/tutor/en/vim-01-beginner.tutor.json \
runtime/tutor/en/vim-02-beginner.tutor \
@@ -783,7 +803,6 @@ RT_ALL = \
runtime/tutor/tutor.tutor.json \
runtime/tutor/tutor.vim \
runtime/tutor/tutor2 \
runtime/tutor/tutor2.utf-8 \
runtime/vimrc_example.vim \
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
runtime/pack/dist/opt/comment/plugin/comment.vim \
@@ -806,6 +825,8 @@ RT_ALL = \
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim \
runtime/pack/dist/opt/helptoc/doc/helptoc.txt \
runtime/pack/dist/opt/helptoc/doc/tags \
runtime/pack/dist/opt/helptoc/plugin/helptoc.vim \
runtime/pack/dist/opt/hlyank/plugin/hlyank.vim \
runtime/pack/dist/opt/justify/plugin/justify.vim \
@@ -823,7 +844,6 @@ RT_ALL = \
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/msg.vim \
runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim \
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
runtime/pack/dist/opt/netrw/doc/netrw.txt \
runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim \
@@ -862,6 +882,7 @@ RT_SCRIPTS = \
runtime/indent/testdir/*.vim \
runtime/indent/testdir/*.in \
runtime/indent/testdir/*.ok \
runtime/indent/testdir/tools/* \
runtime/ftplugin/*.vim \
runtime/ftplugin/logtalk.dict \
runtime/ftplugin/README.txt \
@@ -925,7 +946,6 @@ RT_DOS = \
README_dos.txt \
runtime/doc/Make_mvc.mak \
runtime/indent/Make_mvc.mak \
runtime/tutor/Make_mvc.mak \
runtime/lang/Make_mvc.mak \
vimtutor.bat \
@@ -1079,8 +1099,6 @@ LANG_GEN = \
runtime/keymap/README.txt \
runtime/keymap/*.vim \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/Make_all.mak \
runtime/tutor/it/vim-01-beginner.tutor \
runtime/tutor/it/vim-01-beginner.tutor.json \
runtime/tutor/ru/vim-01-beginner.tutor \
@@ -1092,19 +1110,9 @@ LANG_GEN = \
runtime/tutor/sr/vim-02-beginner.tutor \
runtime/tutor/sr/vim-02-beginner.tutor.json \
runtime/tutor/tutor1.?? \
runtime/tutor/tutor1.??.utf-8 \
runtime/tutor/tutor1.??.euc \
runtime/tutor/tutor1.??.sjis \
runtime/tutor/tutor1.??.iso9 \
runtime/tutor/tutor1.??.big5 \
runtime/tutor/tutor1.??.cp1250 \
runtime/tutor/tutor1.??.cp1251 \
runtime/tutor/tutor1.??.cp737 \
runtime/tutor/tutor1.??_??.utf-8 \
runtime/tutor/tutor1.??_?? \
runtime/tutor/tutor1.bar \
runtime/tutor/tutor1.bar.utf-8 \
runtime/tutor/tutor2.?? \
runtime/tutor/tutor2.??.utf-8 \
runtime/spell/README.txt \
runtime/spell/??/*.diff \
runtime/spell/??/main.aap \
@@ -1148,6 +1156,7 @@ LANG_SRC = \
src/po/sjiscorr.c \
src/po/big5corr.c \
src/po/*.po \
src/po/vim.pot \
# The language files for the Win32 lang archive.
LANG_DOS = \

View File

@@ -115,6 +115,7 @@ MINOR = 1
# - With these features: "make depend" (works best with gcc).
# - If you have a lint program: "make lint" and check the output (ignore GTK
# warnings).
# - compile release versions using -DNDEBUG to disable assert()s
# - If you have valgrind, enable it in src/testdir/Makefile and run "make
# test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms.
# Check the valgrind output.

View File

@@ -15,6 +15,10 @@ All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
mapped to commands by the user, and the mouse can be used.
Vim also aims to provide a (mostly) POSIX-compatible vi implementation, when
compiled with a minimal feature set (typically called vim.tiny), which is used
by many Linux distributions as the default vi editor.
Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all
flavours of UNIX. Porting to other systems should not be very difficult.
Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,

View File

@@ -32,6 +32,10 @@ All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
mapped to commands by the user, and the mouse can be used.
Vim also aims to provide a (mostly) POSIX-compatible vi implementation, when
compiled with a minimal feature set (typically called vim.tiny), which is used
by many Linux distributions as the default vi editor.
Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all
flavours of UNIX. Porting to other systems should not be very difficult.
Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,

View File

@@ -71,7 +71,7 @@ cd src
echo "Building MSVC 64bit console Version"
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
if not exist vim.exe (
echo Build failure.
exit 1
@@ -85,11 +85,11 @@ if "%FEATURE%" == "HUGE" (
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
) ELSE (
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
)
if not exist gvim.exe (
echo Build failure.

3
ci/ddebs.list Normal file
View File

@@ -0,0 +1,3 @@
deb http://ddebs.ubuntu.com noble main restricted universe multiverse
deb http://ddebs.ubuntu.com noble-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com noble-proposed main restricted universe multiverse

15
ci/if_feat_check.vim Normal file
View File

@@ -0,0 +1,15 @@
if 1 " This prevents it from being run in tiny versions
" Check for required features
if exists("g:required")
for feature in g:required
if !has(feature)
echo "Error: Feature '" .. feature .. "' not found"
echo ''
cquit
endif
endfor
echo "\nChecked features: " .. string(g:required)
echo ''
endif
endif
" vim: sts=2 sw=2 et

View File

@@ -1,6 +1,6 @@
" Print all interface versions for Ubuntu. Part 1.
" Print all interface versions. Part 1.
if 1
if 1 " This prevents it from being run in tiny versions
execute 'source' expand('<sfile>:h') .. '/if_ver-cmd.vim'
echo "*** Interface versions ***\n"

View File

@@ -1,6 +1,8 @@
" Print py3 interface versions for Ubuntu. Part 2.
" Print py3 interface versions. Part 2.
" This is done separately from part 1 because Vim cannot concurrently load
" Python 2 and 3 together.
if 1
if 1 " This prevents it from being run in tiny versions
execute 'source' expand('<sfile>:h') .. '/if_ver-cmd.vim'
echo 'Python 3:'

69
ci/pinned-pkgs Normal file
View File

@@ -0,0 +1,69 @@
# Unfortunately ubtunu does not keep the debug packages strictly up-to-date
# with the main packages. So this file needs to pin the main packages back to
# the version for which debug packages are available.
Package: libwayland-client0
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-client0
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-cursor0
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-cursor0
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-egl1
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-egl1
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-dev
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-dev
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-server0
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-server0
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-bin
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-bin
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
# As of 2025-04-27 the base library package libgtk-3-0t64 is still at 3.24.41-4ubuntu1.2
Package: libgtk-3-0t64-dbgsym
Pin: version 3.24.41-4ubuntu1.2
Pin-Priority: 1000
Package: libgtk-3-0t64-dbgsym
Pin: version 3.24.41-4ubuntu1.3
Pin-Priority: 100
# As of 2025-04-27 the base binary package libgtk-3-bin is still at 3.24.41-4ubuntu1.2
Package: libgtk-3-bin-dbgsym
Pin: version 3.24.41-4ubuntu1.2
Pin-Priority: 1000
Package: libgtk-3-bin-dbgsym
Pin: version 3.24.41-4ubuntu1.3
Pin-Priority: 100

View File

@@ -20,6 +20,11 @@ README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
функциональные клавиши клавиатуры необходимые команды, и использовать
манипулятор «мышь».
В редакторе Vim также обеспечивается (насколько это возможно) совместимость
с POSIX-реализацией редактора vi, если он скомпилирован с минимальным набором
функционала (обычно называемый vim.tiny). Данная сборка чаще всего используется
во многих дистрибутивах Linux в качестве предустановленного редактора vi.
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и
практически во всех UNIX-подобных системах. А перенос на другие платформы не
должен представлять особой сложности.
@@ -36,7 +41,7 @@ MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
возможностей.
Существуют отдельные версии для Unix, PC, Amiga и некоторых других систем.
Данный файл README.rux.txt поставляется вместе с архивом рабочих файлов
Данный файл README.ru.txt поставляется вместе с архивом рабочих файлов
программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса
и другие файлы, которые используются редактором во время работы. Чтобы
запустить программу Vim, вы должны получить либо архив с исполняемыми файлами,
@@ -96,7 +101,7 @@ README_vms.txt VMS
Редактор Vim является благотворительным программным обеспечением.
Использование и копирование программы Vim не ограничено, однако рекомендуется
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.rux" (введите
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.txt" (введите
команду ":help uganda" в редакторе Vim).
Краткое описание лицензии.
@@ -116,7 +121,7 @@ README_vms.txt VMS
над редактором Vim можно с помощью оказания финансовой поддержки.
Пожертвованные вами деньги будут в основном направлены на оказание помощи детям
Уганды, см. "runtime/doc/uganda.rux". Однако в любом случае финансирование
Уганды, см. "runtime/doc/uganda.txt". Однако в любом случае финансирование
будет способствовать повышению заинтересованности команды разработчиков
в продолжении работы над редактором Vim!

View File

@@ -46,6 +46,10 @@ MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
MKNSISFLAGS = $(MKNSISFLAGS) /DWIN64=$(WIN64)
!ENDIF
!IFDEF ARM64
MKNSISFLAGS = $(MKNSISFLAGS) /DARM64=$(ARM64)
!ENDIF
!IFDEF INCLUDE_LIBGCC
MKNSISFLAGS = $(MKNSISFLAGS) /DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
!ENDIF

View File

@@ -39,6 +39,10 @@ ifdef WIN64
MKNSISFLAGS := $(MKNSISFLAGS) -DWIN64=$(WIN64)
endif
ifdef ARM64
MKNSISFLAGS := $(MKNSISFLAGS) -DARM64=$(ARM64)
endif
ifdef INCLUDE_LIBGCC
MKNSISFLAGS := $(MKNSISFLAGS) -DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
endif

View File

@@ -101,6 +101,8 @@ Variables and their values available for building the installer (not mandatory):
"HAVE_NLS=0" — do not add native language support.
"HAVE_MULTI_LANG=0" — to create an English-only the installer.
"WIN64=1" — to create a 64-bit the installer.
"ARM64=1" — to create the installer for ARM64. The WIN64 variable
must be set to 1.
"X=<scriptcmd>" — executes scriptcmd in script. If multiple scriptcmd
are specified, they are separated by a semicolon.
Example "X=OutFile MyVim.exe;XPMode on"

View File

@@ -53,6 +53,18 @@ Unicode true
!define WIN64 0
!endif
# if you want to create the installer for ARM64, use the /DARM64=1 on
# the command line makensis.exe. This property will be set to 1.
!ifndef ARM64
!define ARM64 0
!else
!if ${ARM64} > 0
!if ${WIN64} < 1
!define /redef WIN64 1
!endif
!endif
!endif
# if you don't want to include libgcc_s_sjlj-1.dll in the package, use the
# switch /DINCLUDE_LIBGCC=0 on the command line makensis.exe.
!ifndef INCLUDE_LIBGCC
@@ -113,9 +125,13 @@ ${StrRep}
!define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}"
!if ${WIN64}
Name "${PRODUCT} (x64)"
!if ${ARM64}
Name "${PRODUCT} (ARM64)"
!else
Name "${PRODUCT} (x64)"
!endif
!else
Name "${PRODUCT}"
Name "${PRODUCT}"
!endif
OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
CRCCheck force
@@ -498,7 +514,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\tools\*.*
SetOutPath $0\tutor
File /x Makefile /x *.info ${VIMRT}\tutor\*.*
File /r /x *.info ${VIMRT}\tutor\*.*
SectionEnd
##########################################################

View File

@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jan 25
# Last Change: 2025 Jul 09
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -30,12 +30,8 @@ export def Check_inp()
enddef
# This function checks for the kind of assembly that is wanted by the user, or
# can be detected from the first five lines of the file.
# can be detected from the beginning of the file.
export def FTasm()
# tiasm uses `* commment`
if join(getline(1, 10), "\n") =~ '\%(\%(^\|\n\)\*\|Texas Instruments Incorporated\)'
setf tiasm
endif
# make sure b:asmsyntax exists
if !exists("b:asmsyntax")
b:asmsyntax = ""
@@ -65,9 +61,30 @@ export def FTasmsyntax()
var match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
if match != ''
b:asmsyntax = match
elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
b:asmsyntax = "vmasm"
return
endif
# Use heuristics
var is_slash_star_encountered = false
var i = 1
const n = min([50, line("$")])
while i <= n
const line = getline(i)
if line =~ '^/\*'
is_slash_star_encountered = true
endif
if line =~# '^; Listing generated by Microsoft' || line =~? '^\%(\%(CONST\|_BSS\|_DATA\|_TEXT\)\s\+SEGMENT\>\)\|\s*\.[2-6]86P\?\>\|\s*\.XMM\>'
b:asmsyntax = "masm"
return
elseif line =~ 'Texas Instruments Incorporated' || (line =~ '^\*' && !is_slash_star_encountered)
# tiasm uses `* commment`, but detection is unreliable if '/*' is seen
b:asmsyntax = "tiasm"
return
elseif ((line =~? '\.title\>\|\.ident\>\|\.macro\>\|\.subtitle\>\|\.library\>'))
b:asmsyntax = "vmasm"
return
endif
i += 1
endwhile
enddef
var ft_visual_basic_content = '\c^\s*\%(Attribute\s\+VB_Name\|Begin\s\+\%(VB\.\|{\%(\x\+-\)\+\x\+}\)\)'
@@ -184,9 +201,18 @@ enddef
export def FTll()
if getline(1) =~ ';\|\<source_filename\>\|\<target\>'
setf llvm
else
setf lifelines
return
endif
var n = 1
while n < 100 && n <= line("$")
var line = getline(n)
if line =~ '^\s*%'
setf lex
return
endif
n += 1
endwhile
setf lifelines
enddef
export def FTlpc()
@@ -203,19 +229,36 @@ export def FTlpc()
setf c
enddef
export def FTheader()
if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
if exists("g:c_syntax_for_h")
setf objc
else
setf objcpp
# Searches within the first `maxlines` lines of the file for distinctive
# Objective-C or C++ syntax and returns the appropriate filetype. Returns a
# null_string if the search was inconclusive.
def CheckObjCOrCpp(maxlines = 100): string
var n = 1
while n < maxlines && n <= line('$')
const line = getline(n)
if line =~ '\v^\s*\@%(class|interface|end)>'
return 'objcpp'
elseif line =~ '\v^\s*%(class|namespace|template|using)>'
return 'cpp'
endif
elseif exists("g:c_syntax_for_h")
++n
endwhile
return null_string
enddef
# Determines whether a *.h file is C, C++, Ch, or Objective-C/Objective-C++.
export def FTheader()
if exists('g:filetype_h')
execute $'setf {g:filetype_h}'
elseif exists('g:c_syntax_for_h')
setf c
elseif exists("g:ch_syntax_for_h")
elseif exists('g:ch_syntax_for_h')
setf ch
else
setf cpp
# Search the first 100 lines of the file for distinctive Objective-C or C++
# syntax and set the filetype accordingly. Otherwise, use C as the default
# filetype.
execute $'setf {CheckObjCOrCpp() ?? 'c'}'
endif
enddef
@@ -557,17 +600,47 @@ export def FTm()
enddef
export def FTmake()
# Check if it is a Microsoft Makefile
unlet! b:make_microsoft
# Check if it is a BSD, GNU, or Microsoft Makefile
unlet! b:make_flavor
# 1. filename
if expand('%:t') == 'BSDmakefile'
b:make_flavor = 'bsd'
setf make
return
elseif expand('%:t') == 'GNUmakefile'
b:make_flavor = 'gnu'
setf make
return
endif
# 2. user's setting
if exists('g:make_flavor')
b:make_flavor = g:make_flavor
setf make
return
elseif get(g:, 'make_microsoft')
echom "make_microsoft is deprecated; try g:make_flavor = 'microsoft' instead"
b:make_flavor = 'microsoft'
setf make
return
endif
# 3. try to detect a flavor from file content
var n = 1
while n < 1000 && n <= line('$')
var line = getline(n)
if line =~? '^\s*!\s*\(ifn\=\(def\)\=\|include\|message\|error\)\>'
b:make_microsoft = 1
b:make_flavor = 'microsoft'
break
elseif line =~ '^ *ifn\=\(eq\|def\)\>' || line =~ '^ *[-s]\=include\s'
elseif line =~ '^\.\%(export\|error\|for\|if\%(n\=\%(def\|make\)\)\=\|info\|warning\)\>'
b:make_flavor = 'bsd'
break
elseif line =~ '^ *\w\+\s*[!?:+]='
elseif line =~ '^ *\%(ifn\=\%(eq\|def\)\|define\|override\)\>'
b:make_flavor = 'gnu'
break
elseif line =~ '\$[({][a-z-]\+\s\+\S\+' # a function call, e.g. $(shell pwd)
b:make_flavor = 'gnu'
break
endif
n += 1
@@ -592,14 +665,19 @@ export def FTmms()
setf mmix
enddef
# This function checks if one of the first five lines start with a dot. In
# that case it is probably an nroff file: 'filetype' is set and 1 is returned.
# This function checks if one of the first five lines start with a typical
# nroff pattern in man files. In that case it is probably an nroff file:
# 'filetype' is set and 1 is returned.
export def FTnroff(): number
if getline(1)[0] .. getline(2)[0] .. getline(3)[0]
.. getline(4)[0] .. getline(5)[0] =~ '\.'
setf nroff
return 1
endif
var n = 1
while n <= 5
var line = getline(n)
if line =~ '^\%([.'']\s*\%(TH\|D[dt]\|S[Hh]\|d[es]1\?\|so\)\s\+\S\|[.'']\s*ig\>\|\%([.'']\s*\)\?\\"\)'
setf nroff
return 1
endif
n += 1
endwhile
return 0
enddef
@@ -875,16 +953,16 @@ export def SetFileTypeSH(name: string, setft = true): string
if setft && expand("<amatch>") =~ g:ft_ignore_pat
return ''
endif
if name =~ '\<csh\>'
if name =~ '^csh$' || name =~ '^#!.\{-2,}\<csh\>'
# Some .sh scripts contain #!/bin/csh.
return SetFileTypeShell("csh", setft)
elseif name =~ '\<tcsh\>'
elseif name =~ '^tcsh$' || name =~ '^#!.\{-2,}\<tcsh\>'
# Some .sh scripts contain #!/bin/tcsh.
return SetFileTypeShell("tcsh", setft)
elseif name =~ '\<zsh\>'
elseif name =~ '^zsh$' || name =~ '^#!.\{-2,}\<zsh\>'
# Some .sh scripts contain #!/bin/zsh.
return SetFileTypeShell("zsh", setft)
elseif name =~ '\<ksh\>'
elseif name =~ '^ksh$' || name =~ '^#!.\{-2,}\<ksh\>'
b:is_kornshell = 1
if exists("b:is_bash")
unlet b:is_bash
@@ -892,7 +970,8 @@ export def SetFileTypeSH(name: string, setft = true): string
if exists("b:is_sh")
unlet b:is_sh
endif
elseif exists("g:bash_is_sh") || name =~ '\<bash\>' || name =~ '\<bash2\>'
elseif exists("g:bash_is_sh") || name =~ '^bash2\=$' ||
\ name =~ '^#!.\{-2,}\<bash2\=\>'
b:is_bash = 1
if exists("b:is_kornshell")
unlet b:is_kornshell
@@ -900,7 +979,7 @@ export def SetFileTypeSH(name: string, setft = true): string
if exists("b:is_sh")
unlet b:is_sh
endif
elseif name =~ '\<sh\>' || name =~ '\<dash\>'
elseif name =~ '^\%(da\)\=sh$' || name =~ '^#!.\{-2,}\<\%(da\)\=sh\>'
# Ubuntu links "sh" to "dash", thus it is expected to work the same way
b:is_sh = 1
if exists("b:is_kornshell")

View File

@@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jan 20
# Last Change: 2025 Apr 24
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
@@ -26,8 +26,9 @@ def DetectFromHashBang(firstline: string)
# "#!/usr/bin/bash" to make matching easier.
# Recognize only a few {options} that are commonly used.
if line1 =~ '^#!\s*\S*\<env\s'
line1 = substitute(line1, '\S\+=\S\+', '', 'g')
line1 = substitute(line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
line1 = substitute(line1, '\s\zs--split-string[ \t=]', '', '')
line1 = substitute(line1, '\s\zs[A-Za-z0-9_]\+=\S*\ze\s', '', 'g')
line1 = substitute(line1, '\s\zs\%(-[iS]\+\|--ignore-environment\)\ze\s', '', 'g')
line1 = substitute(line1, '\<env\s\+', '', '')
endif

View File

@@ -1,9 +1,9 @@
" Vim runtime support library,
" runs the vim9 script version or legacy script version
" runs the Vim9 script version or legacy script version
" on demand (mostly for Neovim compatability)
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Nov 04
" Last Change: 2025 Apr 27
" enable the zip and gzip plugin by default, if not set

View File

@@ -2,7 +2,7 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2024 Dec 26
# Last Change: 2025 Apr 13
#
# Includes changes from The Vim Project:
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
@@ -981,8 +981,10 @@ def SearchPair( # {{{3
if end == '[' || end == ']'
e = e->escape('[]')
endif
# VIM_INDENT_TEST_TRACE_START
return searchpair('\C' .. s, (middle == '' ? '' : '\C' .. middle), '\C' .. e,
flags, (): bool => InCommentOrString(), stopline, TIMEOUT)
# VIM_INDENT_TEST_TRACE_END dist#vimindent#SearchPair
enddef
def SearchPairStart( # {{{3
@@ -1268,7 +1270,9 @@ def NonCommentedMatch(line: dict<any>, pat: string): bool # {{{3
var pos: list<number> = getcurpos()
cursor(line.lnum, 1)
# VIM_INDENT_TEST_TRACE_START
var match_lnum: number = search(pat, 'cnW', line.lnum, TIMEOUT, (): bool => InCommentOrString())
# VIM_INDENT_TEST_TRACE_END dist#vimindent#NonCommentedMatch
setpos('.', pos)
return match_lnum > 0
enddef

View File

@@ -13,6 +13,7 @@
" substitution of hardcoded commands with global variables
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" 2025 May 11 by Vim Project: check network connectivity (#17249)
" }}}
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
@@ -147,9 +148,6 @@ if g:GetLatestVimScripts_allowautoinstall
elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
let s:autoinstall= $HOME."/".s:dotvim
endif
" call Decho("s:autoinstall<".s:autoinstall.">")
"else "Decho
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
endif
" ---------------------------------------------------------------------
@@ -163,24 +161,19 @@ silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" scripts based on the list in
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
fun! getscript#GetLatestVimScripts()
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
" insure that wget is executable
if executable(g:GetLatestVimScripts_wget) != 1
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
" call Dret("GetLatestVimScripts : wget not executable/available")
return
endif
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
" call Decho("found directory<".datadir.">")
let datadir= datadir . "/GetLatest"
break
endif
if filereadable(datadir."GetLatestVimScripts.dat")
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
break
endif
endfor
@@ -188,32 +181,25 @@ fun! getscript#GetLatestVimScripts()
" Sanity checks: readability and writability
if datadir == ""
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
return
endif
if filewritable(datadir) != 2
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
return
endif
let datafile= datadir."/GetLatestVimScripts.dat"
if !filereadable(datafile)
echoerr "Your data file<".datafile."> isn't readable"
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
return
endif
if !filewritable(datafile)
echoerr "Your data file<".datafile."> isn't writable"
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
return
endif
" --------------------
" Passed sanity checks
" --------------------
" call Decho("datadir <".datadir.">")
" call Decho("datafile <".datafile.">")
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
let eikeep = &ei
let hlskeep = &hls
@@ -226,25 +212,20 @@ fun! getscript#GetLatestVimScripts()
" 3. split window
" 4. edit datafile
let origdir= getcwd()
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
let s:downerrors= 0
let s:message = []
" Check on dependencies mentioned in plugins
" call Decho(" ")
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
let firstdir = substitute(&rtp,',.*$','','')
let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"ftplugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
" extend the search to the packages too (this script predates the feature)
let plugins += split(globpath(firstdir,"pack/*/start/*/plugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"pack/*/opt/*/plugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"pack/*/start/*/ftplugin/**/*.vim"),'\n')
@@ -257,14 +238,10 @@ fun! getscript#GetLatestVimScripts()
" It reads the plugin script at the end of the GetLatestVimScripts.dat
" file, examines it, and then removes it.
for plugin in plugins
" call Decho(" ")
" call Decho("plugin<".plugin.">")
" read plugin in
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
" call Decho("..exe silent r ".fnameescape(plugin))
exe "silent r ".fnameescape(plugin)
exe "silent bwipe ".bufnr("#")
@@ -272,7 +249,6 @@ fun! getscript#GetLatestVimScripts()
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
let llp1 = lastline+1
" call Decho("..depscript<".depscript.">")
" found a "GetLatestVimScripts: # #" line in the script;
" check if it's already in the datafile by searching backwards from llp1,
@@ -286,21 +262,17 @@ fun! getscript#GetLatestVimScripts()
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
let srchline= search('\<'.noai_script.'\>','bW')
endif
" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
if srchline == 0
" found a new script to permanently include in the datafile
let keep_rega = @a
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
echomsg "Appending <".@a."> to ".datafile." for ".depscript
" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
exe lastline."put a"
let @a = keep_rega
let lastline = llp1
let curline = curline + 1
let foundscript = foundscript + 1
" else " Decho
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
let curline = curline + 1
@@ -309,12 +281,8 @@ fun! getscript#GetLatestVimScripts()
" llp1: last line plus one
let llp1= lastline + 1
" call Decho(".deleting lines: ".llp1.",$d")
exe "silent! ".llp1.",$d"
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
if foundscript == 0
setlocal nomod
@@ -323,32 +291,32 @@ fun! getscript#GetLatestVimScripts()
" --------------------------------------------------------------------
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" --------------------------------------------------------------------
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
setlocal lz
1
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
/^-----/,$g/^\s*\d/call s:GetOneScript()
" call Decho("--- end out-of-date checking --- ")
" Final report (an echomsg)
try
silent! ?^-------?
catch /^Vim\%((\a\+)\)\=:E114/
" call Dret("GetLatestVimScripts : nothing done!")
return
endtry
exe "norm! kz\<CR>"
redraw!
if !empty(s:message)
echohl WarningMsg
for mess in s:message
echom mess
endfor
let s:downerrors += len(s:message)
endif
let s:msg = ""
if s:downloads == 1
let s:msg = "Downloaded one updated script to <".datadir.">"
elseif s:downloads == 2
let s:msg= "Downloaded two updated scripts to <".datadir.">"
elseif s:downloads > 1
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
else
let s:msg= "Everything was already current"
let s:msg= empty(s:message) ? "Everything was already current" : "There were some errors"
endif
if s:downerrors > 0
let s:msg= s:msg." (".s:downerrors." downloading errors)"
@@ -366,8 +334,6 @@ fun! getscript#GetLatestVimScripts()
let &hls = hlskeep
let &acd = acdkeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
endfun
" ---------------------------------------------------------------------
@@ -376,8 +342,6 @@ endfun
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sourceforge.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
let rega= @a
let t_ti= &t_ti
@@ -403,13 +367,9 @@ fun! s:GetOneScript(...)
let srcid = a:2
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
if curline =~ '^\s*#'
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
@@ -433,36 +393,26 @@ fun! s:GetOneScript(...)
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
endif
" plugin author protection from downloading his/her own scripts atop their latest work
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
let doautoinstall= 0
if fname =~ ":AutoInstall:"
" call Decho("case AutoInstall: fname<".fname.">")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
exe "norm z\<CR>"
redraw!
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sourceforge.net webpage
@@ -470,15 +420,17 @@ fun! s:GetOneScript(...)
let tmpfile = tempname()
let v:errmsg = ""
" Check if URLs are reachable
if !CheckVimScriptURL(scriptid, srcid)
return
endif
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
endif
if itry == 1
@@ -496,7 +448,6 @@ fun! s:GetOneScript(...)
endif
let itry= itry + 1
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
@@ -507,12 +458,9 @@ fun! s:GetOneScript(...)
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
return
endif
" call Decho('found "Click on the package to download"')
let findsrcid= search('src_id=','W')
if findsrcid == 0
@@ -523,28 +471,22 @@ fun! s:GetOneScript(...)
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
" call Decho('found "src_id=" in description page')
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if sname == bufname("%")
@@ -555,20 +497,16 @@ fun! s:GetOneScript(...)
" -----------------------------------------------------------------------------
" the plugin has been updated since we last obtained it, so download a new copy
" -----------------------------------------------------------------------------
" call Decho(".downloading new <".sname.">")
echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
endif
" --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
" --------------------------------------------------------------------------
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
if doautoinstall
if filereadable(sname)
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
@@ -602,7 +540,6 @@ fun! s:GetOneScript(...)
exe "sil !".g:GetLatestVimScripts_unxz." ".shellescape(sname)
let sname= substitute(sname,'\.xz$','','')
else
" call Decho("no decompression needed")
endif
" distribute archive(.zip, .tar, .vba, .vmb, ...) contents
@@ -632,8 +569,6 @@ fun! s:GetOneScript(...)
else
unlet g:vimball_home
endif
else
" call Decho("no dearchiving needed")
endif
" ---------------------------------------------
@@ -665,7 +600,41 @@ fun! s:GetOneScript(...)
" update the data in the <GetLatestVimScripts.dat> file
call setline(line("."),modline)
endif
endfun
" CheckVimScriptURL: Check Network Connection {{{1
" Check status code of scriptaddr and downloadaddr
" return v:true if the script is downloadable or v:false in case of errors
fun CheckVimScriptURL(script_id, src_id)
" doesn't work with powershell
if !executable('curl') || &shell =~? 'pwsh\|powershell'
return v:true
endif
let output = has("win32") ? ' -o NUL ' : ' -o /dev/null '
let temp = tempname()
defer delete(temp)
let script_url = g:GetLatestVimScripts_scriptaddr . a:script_id
let download_url = g:GetLatestVimScripts_downloadaddr . a:src_id
let script_cmd = 'curl -s -I -w "%{http_code}"' . output . shellescape(script_url) . ' >' . shellescape(temp)
call system(script_cmd)
let script_status = readfile(temp, 'b')[0]
let download_cmd = 'curl -s -I -w "%{http_code}"' . output . shellescape(download_url) . ' >' . shellescape(temp)
call system(download_cmd)
let download_status = readfile(temp, 'b')[0]
if script_status !=# '200'
let s:message += [ printf('Error: Failed to reach script: %s', a:script_id) ]
return v:false
endif
if download_status !=# '200'
let s:message += [ printf('Error: Failed to download script %s', a:script_id) ]
return v:false
endif
return v:true
endfun
" ---------------------------------------------------------------------

View File

@@ -2,6 +2,21 @@
" Maintainer: Gregory Anders
" Last Change: 2024-09-03
" Based on: https://github.com/hashivim/vim-terraform
" License: ISC
"
" Copyright (c) 2014-2016 Mark Cornick <mark@markcornick.com>
"
" Permission to use, copy, modify, and/or distribute this software for any purpose
" with or without fee is hereby granted, provided that the above copyright notice
" and this permission notice appear in all copies.
"
" THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
" FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
" OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
" THIS SOFTWARE.
function! hcl#indentexpr(lnum)
" Beginning of the file should have no indent

View File

@@ -0,0 +1,192 @@
" HTML folding script, :h ft-html-plugin
" Latest Change: 2025 May 10
" Original Author: Aliaksei Budavei <0x000c70@gmail.com>
function! htmlfold#MapBalancedTags() abort
" Describe only _a capturable-name prefix_ for start and end patterns of
" a tag so that start tags with attributes spanning across lines can also be
" matched with a single call of "getline()".
let tag = '\m\c</\=\([0-9A-Za-z-]\+\)'
let names = []
let pairs = []
let ends = []
let pos = getpos('.')
try
call cursor(1, 1)
let [lnum, cnum] = searchpos(tag, 'cnW')
" Pair up nearest non-inlined tags in scope.
while lnum > 0
let name_attr = synIDattr(synID(lnum, cnum, 0), 'name')
if name_attr ==# 'htmlTag' || name_attr ==# 'htmlScriptTag'
let name = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
call insert(names, tolower(name), 0)
call insert(pairs, [lnum, -1], 0)
endif
elseif name_attr ==# 'htmlEndTag'
let name = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
let idx = index(names, tolower(name))
if idx >= 0
" Dismiss inlined balanced tags and opened-only tags.
if pairs[idx][0] != lnum
let pairs[idx][1] = lnum
call add(ends, lnum)
endif
" Claim a pair.
let names[: idx] = repeat([''], (idx + 1))
endif
endif
endif
" Advance the cursor, at "<", past "</a", "<a>", etc.
call cursor(lnum, (cnum + 3))
let [lnum, cnum] = searchpos(tag, 'cnW')
endwhile
finally
call setpos('.', pos)
endtry
if empty(ends)
return {}
endif
let folds = {}
let pending_end = ends[0]
let level = 0
while !empty(pairs)
let [start, end] = remove(pairs, -1)
if end < 0
continue
endif
if start >= pending_end
" Mark a sibling tag.
call remove(ends, 0)
while start >= ends[0]
" Mark a parent tag.
call remove(ends, 0)
let level -= 1
endwhile
let pending_end = ends[0]
else
" Mark a child tag.
let level += 1
endif
" Flatten the innermost inlined folds.
let folds[start] = get(folds, start, ('>' . level))
let folds[end] = get(folds, end, ('<' . level))
endwhile
return folds
endfunction
" See ":help vim9-mix".
if !has("vim9script")
finish
endif
def! g:htmlfold#MapBalancedTags(): dict<string>
# Describe only _a capturable-name prefix_ for start and end patterns of
# a tag so that start tags with attributes spanning across lines can also be
# matched with a single call of "getline()".
const tag: string = '\m\c</\=\([0-9A-Za-z-]\+\)'
var names: list<string> = []
var pairs: list<list<number>> = []
var ends: list<number> = []
const pos: list<number> = getpos('.')
try
cursor(1, 1)
var [lnum: number, cnum: number] = searchpos(tag, 'cnW')
# Pair up nearest non-inlined tags in scope.
while lnum > 0
const name_attr: string = synIDattr(synID(lnum, cnum, 0), 'name')
if name_attr ==# 'htmlTag' || name_attr ==# 'htmlScriptTag'
const name: string = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
insert(names, tolower(name), 0)
insert(pairs, [lnum, -1], 0)
endif
elseif name_attr ==# 'htmlEndTag'
const name: string = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
const idx: number = index(names, tolower(name))
if idx >= 0
# Dismiss inlined balanced tags and opened-only tags.
if pairs[idx][0] != lnum
pairs[idx][1] = lnum
add(ends, lnum)
endif
# Claim a pair.
names[: idx] = repeat([''], (idx + 1))
endif
endif
endif
# Advance the cursor, at "<", past "</a", "<a>", etc.
cursor(lnum, (cnum + 3))
[lnum, cnum] = searchpos(tag, 'cnW')
endwhile
finally
setpos('.', pos)
endtry
if empty(ends)
return {}
endif
var folds: dict<string> = {}
var pending_end: number = ends[0]
var level: number = 0
while !empty(pairs)
const [start: number, end: number] = remove(pairs, -1)
if end < 0
continue
endif
if start >= pending_end
# Mark a sibling tag.
remove(ends, 0)
while start >= ends[0]
# Mark a parent tag.
remove(ends, 0)
level -= 1
endwhile
pending_end = ends[0]
else
# Mark a child tag.
level += 1
endif
# Flatten the innermost inlined folds.
folds[start] = get(folds, start, ('>' .. level))
folds[end] = get(folds, end, ('<' .. level))
endwhile
return folds
enddef
" vim: fdm=syntax sw=2 ts=8 noet

View File

@@ -20,10 +20,12 @@ let g:python_indent = extend(get(g:, 'python_indent', {}), #{
let s:maxoff = 50 " maximum number of lines to look backwards for ()
function s:SearchBracket(fromlnum, flags)
" VIM_INDENT_TEST_TRACE_START
return searchpairpos('[[({]', '', '[])}]', a:flags,
\ {-> synstack('.', col('.'))
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
" VIM_INDENT_TEST_TRACE_END python#s:SearchBracket
endfunction
" See if the specified line is already user-dedented from the expected value.

View File

@@ -1,5 +1,8 @@
" Author: Stephen Sugden <stephen@stephensugden.com>
" Last Modified: 2023-09-11
" 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
@@ -21,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"
@@ -29,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
@@ -61,7 +68,13 @@ function! s:RustfmtWriteMode()
endif
endfunction
function! s:RustfmtConfigOptions()
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"))
@@ -73,7 +86,7 @@ function! s: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)
@@ -84,7 +97,7 @@ function! s:RustfmtCommandRange(filename, line1, line2)
let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
let l:write_mode = s:RustfmtWriteMode()
let l:rustfmt_config = s:RustfmtConfigOptions()
let l:rustfmt_config = rustfmt#RustfmtConfigOptions()
" FIXME: When --file-lines gets to be stable, add version range checking
" accordingly.
@@ -99,7 +112,7 @@ endfunction
function! s:RustfmtCommand()
let write_mode = g:rustfmt_emit_files ? '--emit=stdout' : '--write-mode=display'
let config = s:RustfmtConfigOptions()
let config = rustfmt#RustfmtConfigOptions()
return join([g:rustfmt_command, write_mode, config, g:rustfmt_options])
endfunction

View File

@@ -14,6 +14,10 @@
" 2025 Mar 02 by Vim Project: escape the filename before using :read
" 2025 Mar 02 by Vim Project: determine the compression using readblob()
" instead of shelling out to file(1)
" 2025 Apr 16 by Vim Project: decouple from netrw by adding s:WinPath()
" 2025 May 19 by Vim Project: restore working directory after read/write
" 2025 Jul 13 by Vim Project: warn with path traversal attacks
" 2025 Jul 16 by Vim Project: update minimum vim version
"
" Contains many ideas from Michael Toren's <tar.vim>
"
@@ -32,9 +36,9 @@ if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v32b"
if v:version < 702
if v:versionlong < 9011024
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
echo "***warning*** this version of tar needs vim 9.1.1024"
echohl Normal
finish
endif
@@ -44,10 +48,10 @@ set cpo&vim
" ---------------------------------------------------------------------
" Default Settings: {{{1
if !exists("g:tar_browseoptions")
let g:tar_browseoptions= "Ptf"
let g:tar_browseoptions= "tf"
endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "pPxf"
let g:tar_readoptions= "pxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
@@ -56,6 +60,7 @@ if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:tar_delfile")
" Note: not supported on BSD
let g:tar_delfile="--delete -f"
endif
if !exists("g:netrw_cygwin")
@@ -104,10 +109,26 @@ if !exists("g:tar_shq")
endif
endif
let g:tar_secure=' -- '
let g:tar_leading_pat='^\%([.]\{,2\}/\)\+'
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" s:Msg: {{{2
fun! s:Msg(func, severity, msg)
redraw!
if a:severity =~? 'error'
echohl Error
else
echohl WarningMsg
endif
echo $"***{a:severity}*** ({a:func}) {a:msg}"
echohl None
endfunc
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
@@ -116,16 +137,14 @@ fun! tar#Browse(tarfile)
" sanity checks
if !executable(g:tar_cmd)
redraw!
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call s:Msg('tar#Browse', 'error', $"{g:tar_cmd} not available on your system")
let &report= repkeep
return
endif
if !filereadable(a:tarfile)
if a:tarfile !~# '^\a\+://'
" if it's an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
call s:Msg('tar#Browse', 'error', $"File not readable<{a:tarfile}>")
endif
let &report= repkeep
return
@@ -146,7 +165,7 @@ fun! tar#Browse(tarfile)
let lastline= line("$")
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER')
call setline(lastline+3,'" Select a file with cursor and press ENTER, "x" to extract a file')
keepj $put =''
keepj sil! 0d
keepj $
@@ -201,28 +220,18 @@ fun! tar#Browse(tarfile)
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
endif
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
call s:Msg('tar#Browse', 'warning', $"please check your g:tar_browseoptions '<{g:tar_browseoptions}>'")
return
endif
"
" The following should not be neccessary, since in case of errors the
" previous if statement should have caught the problem (because tar exited
" with a non-zero exit code).
" if line("$") == curlast || ( line("$") == (curlast + 1) &&
" \ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
" \ getline("$") =~ '\s' )
" redraw!
" echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
" keepj sil! %d
" let eikeep= &ei
" set ei=BufReadCmd,FileReadCmd
" exe "r ".fnameescape(a:tarfile)
" let &ei= eikeep
" keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
" return
" endif
" remove tar: Removing leading '/' from member names
" Note: the message could be localized
if search('^tar: ') > 0 || search(g:tar_leading_pat) > 0
call append(3,'" Note: Path Traversal Attack detected!')
let b:leading_slash = 1
" remove the message output
sil g/^tar: /d
endif
" set up maps supported for tar
setlocal noma nomod ro
@@ -241,12 +250,7 @@ fun! s:TarBrowseSelect()
let repkeep= &report
set report=10
let fname= getline(".")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
return
endif
let ls= get(b:, 'leading_slash', 0)
" sanity check
if fname =~ '^"'
@@ -268,7 +272,8 @@ fun! s:TarBrowseSelect()
wincmd _
endif
let s:tblfile_{winnr()}= curfile
call tar#Read("tarfile:".tarfile.'::'.fname,1)
let b:leading_slash= ls
call tar#Read("tarfile:".tarfile.'::'.fname)
filetype detect
set nomod
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
@@ -278,26 +283,18 @@ endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
fun! tar#Read(fname,mode)
fun! tar#Read(fname)
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
" be careful not to execute special crafted files
let escape_file = fname->fnameescape()
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
let &report= repkeep
return
endif
let escape_file = fname->substitute(g:tar_leading_pat, '', '')->fnameescape()
let curdir= getcwd()
let b:curdir= curdir
let tmpdir= tempname()
let b:curdir= tmpdir
let b:tmpdir= curdir
let b:tmpdir= tmpdir
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
@@ -305,10 +302,9 @@ fun! tar#Read(fname,mode)
" attempt to change to the indicated directory
try
exe "cd ".fnameescape(tmpdir)
exe "lcd ".fnameescape(tmpdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
call s:Msg('tar#Read', 'error', "cannot lcd to temporary directory")
let &report= repkeep
return
endtry
@@ -318,7 +314,7 @@ fun! tar#Read(fname,mode)
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
lcd _ZIPVIM_
if has("win32unix") && executable("cygpath")
" assuming cygwin
@@ -331,7 +327,7 @@ fun! tar#Read(fname,mode)
elseif fname =~ '\.bz3$' && executable("bz3cat")
let decmp= "|bz3cat"
let doro = 1
elseif fname =~ '\.t\=gz$' && executable("zcat")
elseif fname =~ '\.t\=gz$' && executable("zcat")
let decmp= "|zcat"
let doro = 1
elseif fname =~ '\.lzma$' && executable("lzcat")
@@ -354,68 +350,66 @@ fun! tar#Read(fname,mode)
endif
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
if tarfile =~# '\.bz2$'
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.bz3$'
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(gz\)$'
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\(\.tgz\|\.tbz\|\.txz\)'
let filekind= s:Header(tarfile)
if filekind =~? "bzip2"
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~ "bzip3"
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "xz"
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "zstd"
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "gzip"
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
endif
elseif tarfile =~# '\.lrp$'
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.lzma$'
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(xz\|txz\)$'
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
endif
if get(b:, 'leading_slash', 0)
sil g/^tar: /d
endif
redraw!
if v:shell_error != 0
cd ..
if v:shell_error != 0
lcd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".fnameescape(curdir)
echohl Error | echo "***error*** (tar#Read) sorry, unable to open or extract ".tarfile." with ".fname | echohl None
exe "lcd ".fnameescape(curdir)
call s:Msg('tar#Read', 'error', $"sorry, unable to open or extract {tarfile} with {fname}")
endif
if doro
@@ -424,40 +418,54 @@ if v:shell_error != 0
endif
let b:tarfile= a:fname
exe "file tarfile::".fnameescape(fname)
" cleanup
keepj sil! 0d
set nomod
let &report= repkeep
exe "lcd ".fnameescape(curdir)
silent exe "file tarfile::". fname->fnameescape()
endfun
" ---------------------------------------------------------------------
" tar#Write: {{{2
fun! tar#Write(fname)
let pwdkeep= getcwd()
let repkeep= &report
set report=10
" temporary buffer variable workaround because too fucking tired. but it works now
let curdir= b:curdir
let tmpdir= b:tmpdir
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
return
endif
" sanity checks
if !executable(g:tar_cmd)
redraw!
let &report= repkeep
return
endif
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
if get(b:, 'leading_slash', 0)
call s:Msg('tar#Write', 'error', $"sorry, not attempting to update {tarfile} with {fname}")
let &report= repkeep
return
endif
if !isdirectory(fnameescape(tmpdir))
call mkdir(fnameescape(tmpdir), 'p')
endif
exe $"lcd {fnameescape(tmpdir)}"
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
lcd _ZIPVIM_
let dir = fnamemodify(fname, ':p:h')
if dir !~# '_ZIPVIM_$'
call mkdir(dir)
endif
" handle compressed archives
if tarfile =~# '\.bz2'
call system("bzip2 -d -- ".shellescape(tarfile,0))
@@ -496,8 +504,7 @@ fun! tar#Write(fname)
" Note: no support for name.tar.tbz/.txz/.tgz/.tlz4/.tzst
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {tarfile} with {fname}")
else
if fname =~ '/'
@@ -515,28 +522,22 @@ fun! tar#Write(fname)
let tarfile = substitute(tarfile, '-', './-', '')
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
exe "w! ".fnameescape(fname)
" don't overwrite a file forcefully
exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
" delete old file from tarfile
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
" Note: BSD tar does not support --delete flag
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {fnameescape(tarfile)} with {fnameescape(fname)} --delete not supported?")
else
" update tarfile with new file
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {fnameescape(tarfile)} with {fnameescape(fname)}")
elseif exists("compress")
call system(compress)
if exists("tgz")
@@ -562,9 +563,9 @@ fun! tar#Write(fname)
endif
" cleanup and restore current directory
cd ..
lcd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".fnameescape(curdir)
exe "lcd ".fnameescape(pwdkeep)
setlocal nomod
let &report= repkeep
@@ -577,6 +578,7 @@ fun! tar#Diff(userfname,fname)
if a:userfname != ""
let fname= a:userfname
endif
exe "lcd ".fnameescape(b:tmpdir). '/_ZIPVIM_'
if filereadable(fname)
" sets current file (from tarball) for diff'ing
" splits window vertically
@@ -600,12 +602,6 @@ fun! tar#Extract()
set report=10
let fname= getline(".")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
@@ -615,20 +611,20 @@ fun! tar#Extract()
let tarball = expand("%")
let tarbase = substitute(tarball,'\..*$','','')
let extractcmd= netrw#WinPath(g:tar_extractcmd)
let extractcmd= s:WinPath(g:tar_extractcmd)
if filereadable(tarbase.".tar")
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
echo "***note*** successfully extracted ". fname
endif
elseif filereadable(tarbase.".tgz")
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tgz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tgz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -637,7 +633,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-z","")
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.gz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -646,7 +642,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tbz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -655,7 +651,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz2 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -664,7 +660,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz3 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz3 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -673,7 +669,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.txz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -682,7 +678,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-J","")
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.xz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -691,7 +687,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","--zstd","")
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tzst {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -700,7 +696,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","--zstd","")
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.zst {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -709,7 +705,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tlz4 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tlz4 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tlz4 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -718,7 +714,7 @@ fun! tar#Extract()
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tar.lz4".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.lz4 ".fname.": failed!" | echohl NONE
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.lz4 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@@ -731,15 +727,7 @@ endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
if has("unix")
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
else
call system("del /S ".shellescape(a:fname,0))
endif
endif
call delete(a:fname, 'rf')
endfun
" s:FileHeader: {{{2
@@ -765,6 +753,25 @@ fun! s:Header(fname)
return "unknown"
endfun
" ---------------------------------------------------------------------
" s:WinPath: {{{2
fun! s:WinPath(path)
if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && has("win32")
" remove cygdrive prefix, if present
let path = substitute(a:path, '/cygdrive/\(.\)', '\1:', '')
" remove trailing slash (Win95)
let path = substitute(path, '\(\\\|/\)$', '', 'g')
" remove escaped spaces
let path = substitute(path, '\ ', ' ', 'g')
" convert slashes to backslashes
let path = substitute(path, '/', '\', 'g')
else
let path = a:path
endif
return path
endfun
" ---------------------------------------------------------------------
" tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2
fun! tar#Vimuntar(...)
@@ -786,8 +793,8 @@ fun! tar#Vimuntar(...)
if simplify(curdir) != simplify(vimhome)
" copy (possibly compressed) tarball to .vim/vimfiles
call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
exe "cd ".fnameescape(vimhome)
call system(s:WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
exe "lcd ".fnameescape(vimhome)
endif
" if necessary, decompress the tarball; then, extract it
@@ -801,14 +808,14 @@ fun! tar#Vimuntar(...)
if simplify(curdir) != simplify(tarhome)
" remove decompressed tarball, restore directory
call delete(tartail.".tar")
exe "cd ".fnameescape(curdir)
exe "lcd ".fnameescape(curdir)
endif
return
endif
else
call vimball#Decompress(tartail,0)
endif
let extractcmd= netrw#WinPath(g:tar_extractcmd)
let extractcmd= s:WinPath(g:tar_extractcmd)
call system(extractcmd." ".shellescape(tarbase.".tar"))
" set up help
@@ -819,7 +826,7 @@ fun! tar#Vimuntar(...)
if simplify(tarhome) != simplify(vimhome)
" remove decompressed tarball, restore directory
call delete(vimhome."/".tarbase.".tar")
exe "cd ".fnameescape(curdir)
exe "lcd ".fnameescape(curdir)
endif
endfun

View File

@@ -157,12 +157,14 @@ function! s:Sort(a, b)
return retval
endfunction
function! s:GlobTutorials(name)
" returns a list of all tutor files matching the given name
function! tutor#GlobTutorials(name, locale)
let locale = a:locale
" search for tutorials:
" 1. non-localized
let l:tutors = s:GlobPath(&rtp, 'tutor/'.a:name.'.tutor')
" 2. localized for current locale
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/'.s:Locale()[0].'/'.a:name.'.tutor')
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/'.locale.'/'.a:name.'.tutor')
" 3. fallback to 'en'
if len(l:locale_tutors) == 0
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/en/'.a:name.'.tutor')
@@ -187,7 +189,7 @@ function! tutor#TutorCmd(tutor_name)
let l:tutor_name = fnamemodify(l:tutor_name, ':r')
endif
let l:tutors = s:GlobTutorials(l:tutor_name)
let l:tutors = tutor#GlobTutorials(l:tutor_name, s:Locale()[0])
if len(l:tutors) == 0
echom "No tutorial with that name found"
@@ -210,10 +212,32 @@ function! tutor#TutorCmd(tutor_name)
call tutor#SetupVim()
exe "edit ".l:to_open
call tutor#EnableInteractive(v:true)
endfunction
function! tutor#TutorCmdComplete(lead,line,pos)
let l:tutors = s:GlobTutorials('*')
let l:tutors = tutor#GlobTutorials('*', s:Locale()[0])
let l:names = uniq(sort(map(l:tutors, 'fnamemodify(v:val, ":t:r")'), 's:Sort'))
return join(l:names, "\n")
endfunction
" Enables/disables interactive mode.
function! tutor#EnableInteractive(enable)
let enable = a:enable
if enable
setlocal buftype=nofile
setlocal concealcursor+=inv
setlocal conceallevel=2
call tutor#ApplyMarks()
augroup tutor_interactive
autocmd! TextChanged,TextChangedI <buffer> call tutor#ApplyMarksOnChanged()
augroup END
else
setlocal buftype<
setlocal concealcursor<
setlocal conceallevel<
if exists('#tutor_interactive')
autocmd! tutor_interactive * <buffer>
endif
endif
endfunction

View File

@@ -15,6 +15,7 @@
" 2024 Aug 18 by Vim Project: correctly handle special globbing chars
" 2024 Aug 21 by Vim Project: simplify condition to detect MS-Windows
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
" 2025 Jul 12 by Vim Project: drop ../ on write to prevent path traversal attacks
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@@ -236,59 +237,62 @@ endfun
" zip#Write: {{{2
fun! zip#Write(fname)
let dict = s:SetSaneOpts()
let need_rename = 0
defer s:RestoreOpts(dict)
" sanity checks
if !executable(substitute(g:zip_zipcmd,'\s\+.*$','',''))
call s:Mess('Error', "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program")
return
endif
if !exists("*mkdir")
call s:Mess('Error', "***error*** (zip#Write) sorry, mkdir() doesn't work on your system")
return
call s:Mess('Error', "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
return
return
endif
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call delete("_ZIPVIM_", "rf")
call delete("_ZIPVIM_", "rf")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
if has("unix")
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','')
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','')
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
endif
if fname =~ '^[.]\{1,2}/'
call system(g:zip_zipcmd." -d ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
let fname = fname->substitute('^\([.]\{1,2}/\)\+', '', 'g')
let need_rename = 1
endif
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
endif
call mkdir(dirpath,"p")
endif
call mkdir(dirpath,"p")
endif
if zipfile !~ '/'
let zipfile= curdir.'/'.zipfile
let zipfile= curdir.'/'.zipfile
endif
exe "w! ".fnameescape(fname)
" don't overwrite files forcefully
exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
endif
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
@@ -297,21 +301,24 @@ fun! zip#Write(fname)
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
if v:shell_error != 0
call s:Mess('Error', "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname)
call s:Mess('Error', "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname)
elseif s:zipfile_{winnr()} =~ '^\a\+://'
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "noswapfile e! ".fnameescape(zipfile)
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "noswapfile e! ".fnameescape(zipfile)
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
elseif need_rename
exe $"sil keepalt file {fnameescape($"zipfile://{zipfile}::{fname}")}"
call s:Mess('Warning', "***error*** (zip#Browse) Path Traversal Attack detected, dropping relative path")
endif
" cleanup and restore current directory
@@ -320,7 +327,6 @@ fun! zip#Write(fname)
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call delete(tmpdir, "rf")
setlocal nomod
endfun
" ---------------------------------------------------------------------
@@ -333,15 +339,18 @@ fun! zip#Extract()
" sanity check
if fname =~ '^"'
return
return
endif
if fname =~ '/$'
call s:Mess('Error', "***error*** (zip#Extract) Please specify a file, not a directory")
return
call s:Mess('Error', "***error*** (zip#Extract) Please specify a file, not a directory")
return
elseif fname =~ '^[.]\?[.]/'
call s:Mess('Error', "***error*** (zip#Browse) Path Traversal Attack detected, not extracting!")
return
endif
if filereadable(fname)
call s:Mess('Error', "***error*** (zip#Extract) <" .. fname .."> already exists in directory, not overwriting!")
return
call s:Mess('Error', "***error*** (zip#Extract) <" .. fname .."> already exists in directory, not overwriting!")
return
endif
let target = fname->substitute('\[', '[[]', 'g')
" unzip 6.0 does not support -- to denote end-of-arguments
@@ -363,13 +372,12 @@ fun! zip#Extract()
" extract the file mentioned under the cursor
call system($"{g:zip_extractcmd} -o {shellescape(b:zipfile)} {target}")
if v:shell_error != 0
call s:Mess('Error', "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!")
call s:Mess('Error', "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!")
elseif !filereadable(fname)
call s:Mess('Error', "***error*** attempted to extract ".fname." but it doesn't appear to be present!")
call s:Mess('Error', "***error*** attempted to extract ".fname." but it doesn't appear to be present!")
else
echomsg "***note*** successfully extracted ".fname
echomsg "***note*** successfully extracted ".fname
endif
endfun
" ---------------------------------------------------------------------

View File

@@ -0,0 +1,25 @@
" Vim compiler file
" Language: Gleam
" Maintainer: Kirill Morozov <kirill@robotix.pro>
" Based On: https://github.com/gleam-lang/gleam.vim
" Last Change: 2025 Apr 21
if exists('current_compiler')
finish
endif
let current_compiler = "gleam_build"
CompilerSet makeprg=gleam\ build
" Example error message:
"
" error: Unknown variable
" ┌─ /home/michael/root/projects/tutorials/gleam/try/code/src/main.gleam:19:18
" │
" 19 │ Ok(tuple(name, spot))
" │ ^^^^ did you mean `sport`?
"
" The name `spot` is not in scope here.
CompilerSet errorformat=%Eerror:\ %m,%Wwarning:\ %m,%C\ %#┌─%#\ %f:%l:%c\ %#-%#
" vim: sw=2 sts=2 et

View File

@@ -2,6 +2,7 @@
" Compiler: Pandoc
" Maintainer: Konfekt
" Last Change: 2024 Nov 19
" 2025 May 15 Update the title regex for CompilerSet #17321
"
" Expects output file extension, say `:make html` or `:make pdf`.
" Passes additional arguments to pandoc, say `:make html --self-contained`.
@@ -51,7 +52,7 @@ endfunction
execute 'CompilerSet makeprg=pandoc'..escape(
\ ' --standalone'..
\ (s:PandocFiletype(&filetype) ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s+\S+', 'cnw') > 0)) ?
\ (s:PandocFiletype(&filetype) ==# 'markdown' && (getline(1) =~# '^%\s\+\S\+' || (search('^title:\s\+\S\+', 'cnw') > 0)) ?
\ '' : ' --metadata title=%:t:r:S')..
\ ' '..s:PandocLang()..
\ ' --from='..s:PandocFiletype(&filetype)..

View File

@@ -0,0 +1,12 @@
" Vim compiler file
" Compiler: PHPStan
" Maintainer: Dietrich Moerman <dietrich.moerman@gmail.com>
" Last Change: 2025 Jul 17
if exists("current_compiler")
finish
endif
let current_compiler = "phpstan"
CompilerSet makeprg=composer\ exec\ --\ phpstan\ analyse\ -v\ --no-progress\ --error-format=raw
CompilerSet errorformat=%f:%l:%m,%-G%.%#

View File

@@ -1,7 +1,7 @@
" The default vimrc file.
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2024 Dec 01
" Last Change: 2025 Jul 13
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
"
" This is loaded if no vimrc file was found.
@@ -34,7 +34,6 @@ silent! while 0
silent! endwhile
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set ttimeout " time out for key codes
set ttimeoutlen=100 " wait up to 100ms after Esc for special key
@@ -107,6 +106,7 @@ if 1
\ let line = line("'\"")
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
\ && index(['xxd', 'gitrebase', 'tutor'], &filetype) == -1
\ && !&diff
\ | execute "normal! g`\""
\ | endif

View File

@@ -154,6 +154,7 @@ DOCS = \
vim9class.txt \
visual.txt \
vietnamese.txt \
wayland.txt \
windows.txt \
workshop.txt
@@ -311,6 +312,7 @@ HTMLS = \
vim9.html \
vim9class.html \
visual.html \
wayland.html \
windows.html \
workshop.html

View File

@@ -143,7 +143,7 @@ os_win32.txt:
pi_netrw.txt: ../pack/dist/opt/netrw/doc/netrw.txt
cp ../pack/dist/opt/netrw/doc/netrw.txt $@.tmp
sed -e '1s/\(.*\)/\1 *pi_netrw.txt*/' $@.tmp > $@ && \
sed -e '1s/$$/ *pi_netrw.txt*/' $@.tmp > $@ && \
rm -f $@.tmp
vietnamese.txt:

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 9.1. Last change: 2025 Mar 12
*autocmd.txt* For Vim version 9.1. Last change: 2025 Jun 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -130,6 +130,10 @@ exception is that "<sfile>" is expanded when the autocmd is defined. Example:
:au BufNewFile,BufRead *.html so <sfile>:h/html.vim
Here Vim expands <sfile> to the name of the file containing this line.
However, <sfile> works differently in a function, in which case it's better to
use `:execute` with <script> to achieve the same purpose:
>
:exe $'au BufNewFile,BufRead *.html so {expand("<script>:h")}/html.vim'
`:autocmd` adds to the list of autocommands regardless of whether they are
already present. When your .vimrc file is sourced twice, the autocommands
@@ -400,6 +404,7 @@ Name triggered by ~
|CmdlineChanged| after a change was made to the command-line text
|CmdlineEnter| after the cursor moves to the command line
|CmdlineLeave| before the cursor leaves the command line
|CmdlineLeavePre| before preparing to leave the command line
|InsertEnter| starting Insert mode
|InsertChange| when typing <Insert> while in Insert or Replace mode
@@ -595,7 +600,8 @@ BufWriteCmd Before writing the whole buffer to a file.
The buffer contents should not be changed.
When the command resets 'modified' the undo
information is adjusted to mark older undo
states as 'modified', like |:write| does.
states as 'modified', like |:write| does. Use
the |'[| and |']| marks for the range of lines.
|Cmd-event|
*BufWritePost*
BufWritePost After writing the whole buffer to a file
@@ -640,6 +646,18 @@ CmdlineLeave Before leaving the command line; including
<afile> is set to a single character,
indicating the type of command-line.
|cmdwin-char|
*CmdlineLeavePre*
CmdlineLeavePre Just before leaving the command line, and
before |CmdlineLeave|. Useful for capturing
completion info with |cmdcomplete_info()|, as
this information is cleared before
|CmdlineLeave| is triggered. Triggered for
non-interactive use of ":" in a mapping, but
not when using |<Cmd>|. Also triggered when
abandoning the command line by typing CTRL-C
or <Esc>. <afile> is set to a single
character indicating the command-line type.
See |cmdwin-char| for details.
*CmdwinEnter*
CmdwinEnter After entering the command-line window.
Useful for setting options specifically for
@@ -888,14 +906,14 @@ FileType When the 'filetype' option has been set. The
FileWriteCmd Before writing to a file, when not writing the
whole buffer. Should do the writing to the
file. Should not change the buffer. Use the
'[ and '] marks for the range of lines.
|'[| and |']| marks for the range of lines.
|Cmd-event|
*FileWritePost*
FileWritePost After writing to a file, when not writing the
whole buffer.
*FileWritePre*
FileWritePre Before writing to a file, when not writing the
whole buffer. Use the '[ and '] marks for the
whole buffer. Use the |'[| and |']| marks for the
range of lines.
*FilterReadPost*
FilterReadPost After reading a file from a filter command.
@@ -1488,6 +1506,13 @@ WinScrolled After any window in the current tab page
or changed width or height. See
|win-scrolled-resized|.
Note: This can not be skipped with
`:noautocmd`, because it triggers after
processing normal commands when Vim is back in
the main loop. If you want to disable this,
consider setting the 'eventignore' option
instead.
The pattern is matched against the |window-ID|
of the first window that scrolled or resized.
Both <amatch> and <afile> are set to the

View File

@@ -1,4 +1,4 @@
*builtin.txt* For Vim version 9.1. Last change: 2025 Mar 26
*builtin.txt* For Vim version 9.1. Last change: 2025 Jul 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -129,11 +129,14 @@ charidx({string}, {idx} [, {countcc} [, {utf16}]])
chdir({dir}) String change current working directory
cindent({lnum}) Number C indent for line {lnum}
clearmatches([{win}]) none clear all matches
cmdcomplete_info() Dict get current cmdline completion
information
col({expr} [, {winid}]) Number column byte index of cursor or mark
complete({startcol}, {matches}) none set Insert mode completion
complete_add({expr}) Number add completion match
complete_check() Number check for key typed during completion
complete_info([{what}]) Dict get current completion information
complete_match([{lnum}, {col}]) List get completion column and trigger text
confirm({msg} [, {choices} [, {default} [, {type}]]])
Number number of choice picked by user
copy({expr}) any make a shallow copy of {expr}
@@ -191,9 +194,8 @@ filter({expr1}, {expr2}) List/Dict/Blob/String
remove items from {expr1} where
{expr2} is 0
finddir({name} [, {path} [, {count}]])
String find directory {name} in {path}
findfile({name} [, {path} [, {count}]])
String find file {name} in {path}
String/List find dir/file {name} in {path}
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
flattennew({list} [, {maxdepth}])
List flatten a copy of {list}
@@ -247,6 +249,8 @@ getcmdtype() String return current command-line type
getcmdwintype() String return current command-line window type
getcompletion({pat}, {type} [, {filtered}])
List list of cmdline completion matches
getcompletiontype({pat}) String return the type of the command-line
completion using {pat}
getcurpos([{winnr}]) List position of the cursor
getcursorcharpos([{winnr}]) List character position of the cursor
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
@@ -755,6 +759,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}
@@ -1266,7 +1271,7 @@ base64_encode({blob}) *base64_encode()*
" Encode the contents of a binary file
echo base64_encode(readblob('somefile.bin'))
" Encode a string
echo base64_encode(str2blob([somestr]))
echo base64_encode(str2blob(somestr->split("\n")))
<
Can also be used as a |method|: >
GetBinaryData()->base64_encode()
@@ -1834,6 +1839,29 @@ clearmatches([{win}]) *clearmatches()*
Return type: |Number|
cmdcomplete_info() *cmdcomplete_info()*
Returns a |Dictionary| with information about cmdline
completion. See |cmdline-completion|.
The items are:
cmdline_orig The original command-line string before
completion began.
pum_visible |TRUE| if popup menu is visible.
See |pumvisible()|.
matches List of all completion candidates. Each item
is a string.
selected Selected item index. First index is zero.
Index is -1 if no item is selected (showing
typed text only, or the last completion after
no item is selected when using the <Up> or
<Down> keys)
Returns an empty |Dictionary| if no completion was attempted,
if there was only one candidate and it was fully completed, or
if an error occurred.
Return type: dict<any>
col({expr} [, {winid}]) *col()*
The result is a Number, which is the byte index of the column
position given with {expr}.
@@ -1984,6 +2012,7 @@ complete_info([{what}]) *complete_info()*
"omni" Omni completion |i_CTRL-X_CTRL-O|
"spell" Spelling suggestions |i_CTRL-X_s|
"eval" |complete()| completion
"register" Words from registers |i_CTRL-X_CTRL-R|
"unknown" Other internal modes
If the optional {what} list argument is supplied, then only
@@ -2009,6 +2038,50 @@ complete_info([{what}]) *complete_info()*
<
Return type: dict<any>
complete_match([{lnum}, {col}]) *complete_match()*
Searches backward from the given position and returns a List
of matches according to the 'isexpand' option. When no
arguments are provided, uses the current cursor position.
Each match is represented as a List containing
[startcol, trigger_text] where:
- startcol: column position where completion should start,
or -1 if no trigger position is found. For multi-character
triggers, returns the column of the first character.
- trigger_text: the matching trigger string from 'isexpand',
or empty string if no match was found or when using the
default 'iskeyword' pattern.
When 'isexpand' is empty, uses the 'iskeyword' pattern "\k\+$"
to find the start of the current keyword.
Examples: >
set isexpand=.,->,/,/*,abc
func CustomComplete()
let res = complete_match()
if res->len() == 0 | return | endif
let [col, trigger] = res[0]
let items = []
if trigger == '/*'
let items = ['/** */']
elseif trigger == '/'
let items = ['/*! */', '// TODO:', '// fixme:']
elseif trigger == '.'
let items = ['length()']
elseif trigger =~ '^\->'
let items = ['map()', 'reduce()']
elseif trigger =~ '^\abc'
let items = ['def', 'ghk']
endif
if items->len() > 0
let startcol = trigger =~ '^/' ? col : col + len(trigger)
call complete(startcol, items)
endif
endfunc
inoremap <Tab> <Cmd>call CustomComplete()<CR>
<
Return type: list<list<any>>
*confirm()*
confirm({msg} [, {choices} [, {default} [, {type}]]])
confirm() offers the user a dialog, from which a choice can be
@@ -3099,7 +3172,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
Can also be used as a |method|: >
GetInput()->feedkeys()
<
Return type: |String| or list<string> depending on {list}
Return type: |Number|
filecopy({from}, {to}) *filecopy()*
@@ -3237,7 +3310,8 @@ finddir({name} [, {path} [, {count}]]) *finddir()*
Can also be used as a |method|: >
GetName()->finddir()
<
Return type: |String|
Return type: list<string> if {count} is negative, |String|
otherwise
findfile({name} [, {path} [, {count}]]) *findfile()*
@@ -3251,7 +3325,8 @@ findfile({name} [, {path} [, {count}]]) *findfile()*
Can also be used as a |method|: >
GetName()->findfile()
<
Return type: |String|
Return type: list<string> if {count} is negative, |String|
otherwise
flatten({list} [, {maxdepth}]) *flatten()*
@@ -4142,6 +4217,9 @@ getcmdcompltype() *getcmdcompltype()*
|getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
Returns an empty string when completion is not defined.
To get the type of the command-line completion for a specified
string, use |getcompletiontype()|.
Return type: |String|
@@ -4247,6 +4325,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
file file and directory names
file_in_path file and directory names in |'path'|
filetype filetype names |'filetype'|
filetypecmd |:filetype| suboptions
function function name
help help subjects
highlight highlight groups
@@ -4259,6 +4338,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
messages |:messages| suboptions
option options
packadd optional package |pack-add| names
retab |:retab| suboptions
runtime |:runtime| completion
scriptnames sourced script names |:scriptnames|
shellcmd Shell command
@@ -4299,6 +4379,15 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
<
Return type: list<string>
getcompletiontype({pat}) *getcompletiontype()*
Return the type of the command-line completion using {pat}.
When no corresponding completion type is found, an empty
string is returned.
To get the current command-line completion type, use
|getcmdcompltype()|.
Return type: |String|
*getcurpos()*
getcurpos([{winid}])
Get the position of the cursor. This is like getpos('.'), but
@@ -4659,8 +4748,9 @@ getmousepos() *getmousepos()*
start of the clicked char
All numbers are 1-based.
If not over a window, e.g. when in the command line, then only
"screenrow" and "screencol" are valid, the others are zero.
If not over a window, e.g. when in the command line or within
|tabpanel|, then only "screenrow" and "screencol" are valid,
the others are zero.
When on the status line below a window or the vertical
separator right of a window, the "line" and "column" values
@@ -4893,7 +4983,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
Can also be used as a |method|: >
GetRegname()->getreg()
<
Return type: |String|
Return type: |String| or list<string> depending on {list}
getreginfo([{regname}]) *getreginfo()*
@@ -4972,6 +5062,10 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
- It is evaluated in current window context, which makes a
difference if the buffer is displayed in a window with
different 'virtualedit' or 'list' values.
- When specifying an exclusive selection and {pos1} and {pos2}
are equal, the returned list contains a single character as
if selection is inclusive, to match the behavior of an empty
exclusive selection in Visual mode.
Examples: >
:xnoremap <CR>
@@ -8162,7 +8256,8 @@ printf({fmt}, {expr1} ...) *printf()*
< 1.41
You will get an overflow error |E1510|, when the field-width
or precision will result in a string longer than 6400 chars.
or precision will result in a string longer than 1 MiB
(1024*1024 = 1048576) chars.
*E1500*
You cannot mix positional and non-positional arguments: >
@@ -9289,11 +9384,12 @@ searchcount([{options}]) *searchcount()*
To get the last search count when |n| or |N| was pressed, call
this function with `recompute: 0` . This sometimes returns
wrong information because |n| and |N|'s maximum count is 99.
If it exceeded 99 the result must be max count + 1 (100). If
you want to get correct information, specify `recompute: 1`: >
wrong information because of 'maxsearchcount'.
If the count exceeded 'maxsearchcount', the result must be
'maxsearchcount' + 1. If you want to get correct information,
specify `recompute: 1`: >
" result == maxcount + 1 (100) when many matches
" result == 'maxsearchcount' + 1 when many matches
let result = searchcount(#{recompute: 0})
" Below returns correct result (recompute defaults
@@ -9380,7 +9476,7 @@ searchcount([{options}]) *searchcount()*
result. if search exceeded
total count, "total" value
becomes `maxcount + 1`
(default: 99)
(default: 'maxsearchcount')
pos |List| `[lnum, col, off]` value
when recomputing the result.
this changes "current" result
@@ -9758,6 +9854,7 @@ setcursorcharpos({list})
Can also be used as a |method|: >
GetCursorPos()->setcursorcharpos()
<
Returns 0 when the position could be set, -1 otherwise.
Return type: |Number|
@@ -11949,7 +12046,7 @@ trunc({expr}) *trunc()*
Return type: |Float|
tuple2list({list}) *tuple2list()*
tuple2list({tuple}) *tuple2list()*
Create a List from a shallow copy of the tuple items.
Examples: >
tuple2list((1, 2, 3)) returns [1, 2, 3]
@@ -12089,6 +12186,7 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
:let newlist = uniq(copy(mylist))
< The default compare function uses the string representation of
each item. For the use of {func} and {dict} see |sort()|.
For deduplicating text in the current buffer see |:uniq|.
Returns zero if {list} is not a |List|.
@@ -12260,6 +12358,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,
@@ -12983,6 +13108,8 @@ vms VMS version of Vim.
vreplace Compiled with |gR| and |gr| commands. (always true)
vtp Compiled for vcon support |+vtp| (check vcon to find
out if it works in the current console).
wayland Compiled with Wayland protocol support.
wayland_clipboard Compiled with support for Wayland selections/clipboard
wildignore Compiled with 'wildignore' option.
wildmenu Compiled with 'wildmenu' option.
win16 old version for MS-Windows 3.1 (always false)

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 9.1. Last change: 2025 Mar 18
*change.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -20,6 +20,7 @@ commands with the "." command.
5. Copying and moving text |copy-move|
6. Formatting text |formatting|
7. Sorting text |sorting|
8. Deduplicating text |deduplicating|
For inserting text see |insert.txt|.
@@ -156,8 +157,8 @@ only after a '.').
The 'B' and 'M' flags in 'formatoptions' change the behavior for inserting
spaces before and after a multibyte character |fo-table|.
The '[ mark is set at the end of the first line that was joined, '] at the end
of the resulting line.
The |'[| mark is set at the end of the first line that was joined, |']| at the
end of the resulting line.
==============================================================================
@@ -664,8 +665,9 @@ For other systems the tmpnam() library function is used.
Repeat last :substitute with same search pattern and
substitute string, but without the same flags. You
may add [flags], see |:s_flags|.
Note that after `:substitute` the '&' flag can't be
used, it's recognized as a pattern separator.
Note that after `:substitute` the '&' and '#' flags
can't be used, they're recognized as a pattern
separator.
The space between `:substitute` and the 'c', 'g',
'i', 'I' and 'r' flags isn't required, but in scripts
it's a good idea to keep it to avoid confusion.
@@ -989,22 +991,26 @@ This replaces each 'E' character with a euro sign. Read more in |<Char->|.
4.4 Changing tabs *change-tabs*
*:ret* *:retab* *:retab!*
:[range]ret[ab][!] [new_tabstop]
:[range]ret[ab][!] [-indentonly] [{new-tabstop}]
Replace all sequences of white-space containing a
<Tab> with new strings of white-space using the new
tabstop value given. If you do not specify a new
tabstop size or it is zero, Vim uses the current value
of 'tabstop'.
<Tab> with new strings of white-space using
{new-tabstop}. If you do not specify {new-tabstop} or
it is zero, Vim uses the current value of 'tabstop'.
The current value of 'tabstop' is always used to
compute the width of existing tabs.
With !, Vim also replaces strings of only normal
spaces with tabs where appropriate.
With 'expandtab' on, Vim replaces all tabs with the
appropriate number of spaces.
This command sets 'tabstop' to the new value given,
and if performed on the whole file, which is default,
should not make any visible change.
Careful: This command modifies any <Tab> characters
This command sets 'tabstop' to {new-tabstop} and if
performed on the whole file, which is default, should
not make any visible change.
When [-indentonly] is specified, only the leading
white-space will be targeted. Any other consecutive
white-space will not be changed.
Warning: This command modifies any <Tab> characters
inside of strings in a C program. Use "\t" to avoid
this (that's a good habit anyway).
`:retab!` may also change a sequence of spaces by
@@ -1188,8 +1194,8 @@ the ":put" command, Vim always inserts the text in the next line. You can
exchange two characters with the command sequence "xp". You can exchange two
lines with the command sequence "ddp". You can exchange two words with the
command sequence "deep" (start with the cursor in the blank space before the
first word). You can use the "']" or "`]" command after the put command to
move the cursor to the end of the inserted text, or use "'[" or "`[" to move
first word). You can use the |']| or |`]| command after the put command to
move the cursor to the end of the inserted text, or use |'[| or |`[| to move
the cursor to the start.
*put-Visual-mode* *v_p* *v_P*
@@ -1894,6 +1900,7 @@ And a few warnings:
Vim has a sorting function and a sorting command. The sorting function can be
found here: |sort()|, |uniq()|.
Also see |:uniq|.
*:sor* *:sort*
:[range]sor[t][!] [b][f][i][l][n][o][r][u][x] [/{pattern}/]
@@ -1903,7 +1910,7 @@ found here: |sort()|, |uniq()|.
With [!] the order is reversed.
With [i] case is ignored.
*:sort-l*
With [l] sort uses the current collation locale.
Implementation details: strcoll() is used to compare
strings. See |:language| to check or set the collation
@@ -1936,13 +1943,14 @@ found here: |sort()|, |uniq()|.
With [b] sorting is done on the first binary number in
the line (after or inside a {pattern} match).
*:sort-u* *:sort-uniq*
With [u] (u stands for unique) only keep the first of
a sequence of identical lines (ignoring case when [i]
is used). Without this flag, a sequence of identical
lines will be kept in their original order.
Note that leading and trailing white space may cause
lines to be different.
When you just want to make things unique, use |:uniq|.
When /{pattern}/ is specified and there is no [r] flag
the text matched with {pattern} is skipped, so that
@@ -1989,4 +1997,55 @@ The sorting can be interrupted, but if you interrupt it too late in the
process you may end up with duplicated lines. This also depends on the system
library function used.
==============================================================================
8. Deduplicating text *deduplicating* *unique*
Vim has a deduplicating function and a deduplicating command. The
deduplicating function can be found here: |uniq()|.
Also see |:sort-uniq|.
*:uni* *:uniq*
:[range]uni[q][!] [i][l][r][u] [/{pattern}/]
Remove duplicate lines that are adjacent to each other
in [range]. When no range is given, all lines are
processed.
With [i] case is ignored when comparing lines.
With [l] comparison uses the current collation locale.
See |:sort-l| for more details.
With [r] comparison is done on the text that matches
/{pattern}/ instead of the full line.
With [u] only keep lines that do not repeat (i.e., are
not immediately followed by the same line).
With [!] only keep lines that are immediately followed
by a duplicate.
If both [!] and [u] are given, [u] is ignored and [!]
takes effect.
When /{pattern}/ is specified and [r] is not used, the
text matched with {pattern} is skipped and comparison
is done on what comes after the match.
'ignorecase' applies to the pattern, but 'smartcase'
is not used.
Instead of the slash any non-letter can be used.
For example, to remove adjacent duplicate lines based
on the second comma-separated field: >
:uniq /[^,]*,/
< Or to keep only unique lines ignoring the first 5
characters: >
:uniq u /.\{5}/
< If {pattern} is empty (e.g. // is used), the last
search pattern is used.
Note that leading and trailing white space may cause
lines to be considered different.
To remove all duplicates regardless of position, use
|:sort-u| or external tools.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 9.1. Last change: 2025 Mar 08
*cmdline.txt* For Vim version 9.1. Last change: 2025 Jul 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -415,7 +415,7 @@ CTRL-D List names that match the pattern in front of the cursor.
to the end.
The 'wildoptions' option can be set to "tagfile" to list the
file of matching tags.
*c_CTRL-I* *c_wildchar* *c_<Tab>*
*c_CTRL-I* *c_wildchar* *c_<Tab>* */_<Tab>*
'wildchar' option
A match is done on the pattern in front of the cursor. The
match (if there are several, the first match) is inserted
@@ -425,6 +425,10 @@ CTRL-D List names that match the pattern in front of the cursor.
again and there were multiple matches, the next
match is inserted. After the last match, the first is used
again (wrap around).
In search context use <CTRL-V><Tab> or "\t" to search for a
literal <Tab> instead of triggering completion.
The behavior can be changed with the 'wildmode' option.
*c_<S-Tab>*
<S-Tab> Like 'wildchar' or <Tab>, but begin with the last match and
@@ -458,7 +462,7 @@ CTRL-G When 'incsearch' is set, entering a search pattern for "/" or
"?" and the current match is displayed then CTRL-G will move
to the next match (does not take |search-offset| into account)
Use CTRL-T to move to the previous match. Hint: on a regular
keyboard T is above G.
keyboard G is below T.
*c_CTRL-T* */_CTRL-T*
CTRL-T When 'incsearch' is set, entering a search pattern for "/" or
"?" and the current match is displayed then CTRL-T will move
@@ -475,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.

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 9.1. Last change: 2024 Dec 25
*develop.txt* For Vim version 9.1. Last change: 2025 Jul 21
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,205 @@ 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*
Vims 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.
@@ -192,30 +390,13 @@ For any non-trivial change, please always create a pull request on github,
since this triggers the test suite.
*style-clang-format*
sound.c and sign.c can be (semi-) automatically formated using the
sound.c and sign.c can be (semi-) automatically formatted using the
`clang-format` formatter according to the distributed .clang-format file.
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*
COMMENTS *style-comments*
Try to avoid putting multiline comments inside a function body: if the
function is so complex that you need to separately comment parts of it, you
@@ -230,16 +411,19 @@ For everything else use: >
// comment
<
INDENTATION *style-indentation*
INDENTATION *style-indentation*
We use 4 space to indent the code. If you are using Vim to edit the source,
you don't need to do anything due to the |modeline|.
For other editors an `.editorconfig` is provided at the root of the repo.
For the source files `sign.c` and `sound.c` and any new file use only spaces,
no tabs. In addition, any new file must include a modeline with `set et` to
pass the indentation test.
DECLARATIONS *style-declarations*
DECLARATIONS *style-declarations*
Declare, when possible, `for` loop variables in the guard:
OK: >
@@ -259,113 +443,75 @@ Wrong: >
int *ptr;
<
BRACES *style-braces*
BRACES *style-braces*
All curly braces must be returned onto a new line:
OK: >
if (cond)
{
cmd;
cmd;
cmd;
cmd;
}
else
{
cmd;
cmd;
cmd;
cmd;
}
<
Wrong: >
if (cond) {
cmd;
cmd;
cmd;
cmd;
} else {
cmd;
cmd;
cmd;
cmd;
}
<
OK: >
while (cond)
{
cmd;
cmd;
}
<
Wrong: >
while (cond) {
cmd;
cmd;
}
<
When a block has one line, including comments, the braces can be left out.
OK: >
if (cond)
do
{
cmd;
else
cmd;
} while (cond);
<
or >
do
{
cmd;
cmd;
}
while (cond);
<
Wrong: >
if (cond)
/*
* comment
*/
do {
cmd;
else
cmd;
} while (cond);
<
When an `if`/`else` has braces on one block, the other should have it too.
OK: >
if (cond)
{
cmd;
}
else
{
cmd;
cmd;
}
<
Wrong: >
if (cond)
cmd;
else
{
cmd;
cmd;
}
if (cond)
{
cmd;
cmd;
}
else
cmd;
<
OK: >
while (cond)
cmd;
<
Wrong:
>
while (cond)
if (cond)
cmd;
<
TYPES *style-types*
Use descriptive types. You can find a list of them in the src/structs.h file
and probably in a typedef in the file you are working on.
Use descriptive types. These are defined in src/vim.h, src/structs.h etc.
Note that all custom types are postfixed with "_T"
OK: >
int is_valid_line_number(linenr_T lnum);
Example: >
linenr_T
buf_T
pos_T
<
Wrong: >
int is_valid_line_number(unsigned long lnum);
<
SPACES AND PUNCTUATION *style-spaces*
@@ -386,8 +532,8 @@ Wrong: func(arg1,arg2); for (i = 0;i < 2;++i)
Use a space before and after '=', '+', '/', etc.
Wrong: var=a*5;
OK: var = a * 5;
Wrong: var=a*5;
Use empty lines to group similar actions together.
@@ -412,7 +558,6 @@ Wrong: >
while (buf != NULL && !got_int)
<
FUNCTIONS *style-functions*
Use function declarations with the return type on a separate indented line.
@@ -549,153 +694,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:

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 9.1. Last change: 2024 Mar 26
*diff.txt* For Vim version 9.1. Last change: 2025 Jul 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -14,7 +14,8 @@ The basics are explained in section |08.7| of the user manual.
2. Viewing diffs |view-diffs|
3. Jumping to diffs |jumpto-diffs|
4. Copying diffs |copy-diffs|
5. Diff options |diff-options|
5. Diff anchors |diff-anchors|
6. Diff options |diff-options|
==============================================================================
1. Starting diff mode *start-vimdiff*
@@ -243,12 +244,11 @@ The diffs are highlighted with these groups:
highlight the exact difference between the
two. Will respect any 'diffopt' flag that
affects internal diff.
Not used when `inline:` set to "none".
|hl-DiffTextAdd| DiffTextAdd Added text inside a Changed line. Similar to
Not used when `inline:` is set to "none".
|hl-DiffTextAdd| DiffTextAdd Added text inside a Changed line. Similar to
DiffText, but used when there is no
corresponding text in other buffers. Will not
be used when `inline:` is set to "simple" or
"none".
corresponding text in other buffers. Not used
when `inline:` is set to "simple" or "none".
|hl-DiffDelete| DiffDelete Deleted lines. Also called filler lines,
because they don't really exist in this
buffer.
@@ -305,18 +305,20 @@ that the buffers will be equal within the specified range.
When no [range] is given, the diff at the cursor position or just above it is
affected. When [range] is used, Vim tries to only put or get the specified
lines. When there are deleted lines, this may not always be possible.
affected. There can be deleted lines below the last line of the buffer. When
the cursor is on the last line in the buffer and there is no diff above this
line, and no [range] is given, the diff below the cursor position will be used
instead.
There can be deleted lines below the last line of the buffer. When the cursor
is on the last line in the buffer and there is no diff above this line, the
":diffget" and "do" commands will obtain lines from the other buffer.
When [range] is used, Vim tries to only put or get the specified lines. When
there are deleted lines, they will be used if they are between the lines
specified by [range].
To be able to get those lines from another buffer in a [range] it's allowed to
use the last line number plus one. This command gets all diffs from the other
buffer: >
To be able to put or get those lines to/from another buffer in a [range] it's
allowed to use 0 and the last line number plus one. This command gets all
diffs from the other buffer: >
:1,$+1diffget
:0,$+1diffget
Note that deleted lines are displayed, but not counted as text lines. You
can't move the cursor into them. To fill the deleted lines with the lines
@@ -335,7 +337,129 @@ name or a part of a buffer name. Examples:
diff mode (e.g., "file.c.v2")
==============================================================================
5. Diff options *diff-options*
5. Diff anchors *diff-anchors*
Diff anchors allow you to control where the diff algorithm aligns and
synchronize text across files. Each anchor matches each other in each file,
allowing you to control the output of a diff.
This is useful when a change involves complicated edits. For example, if a
function was moved to another location and further edited. By default, the
algorithm aims to create the smallest diff, which results in that entire
function being considered to be deleted and added on the other side, making it
hard to see what the actual edit on it was. You can use diff anchors to pin
that function so the diff algorithm will align based on it.
To use it, set anchors using 'diffanchors' which is a comma-separated list of
{address} in each file, and then add "anchor" to 'diffopt'. Internaly, Vim
splits each file up into sections split by the anchors. It performs the diff
on each pair of sections separately before merging the results back.
Setting 'diffanchors' will update the diff immediately. If an anchor is tied
to a mark, and you change what the mark is pointed to, you need to manually
call |:diffupdate| afterwards to get the updated diff results.
Example:
Let's say we have the following files, side-by-side. We are interested in the
change that happened to the function `foo()`, which was both edited and moved.
File A: >
int foo() {
int n = 1;
return n;
}
int g = 1;
int bar(int a) {
a *= 2;
a += 3;
return a;
}
<File B: >
int bar(int a) {
a *= 2;
a += 3;
return a;
}
int foo() {
int n = 999;
return n;
}
int g = 1;
<
A normal diff will usually align the diff result as such: >
int foo() { |----------------
int n = 1; |----------------
return n; |----------------
} |----------------
|----------------
int g = 1; |----------------
|----------------
int bar(int a) {|int bar(int a) {
a *= 2; | a *= 2;
a += 3; | a += 3;
return a; | return a;
} |}
----------------|
----------------|int foo() {
----------------| int n = 999;
----------------| return n;
----------------|}
----------------|
----------------|int g = 1;
<
What we want is to instead ask the diff to align on `foo()`: >
----------------|int bar(int a) {
----------------| a *= 2;
----------------| a += 3;
----------------| return a;
----------------|}
----------------|
int foo() { |int foo() {
int n = 1; | int n = 999;
return n; | return n;
} |}
|
int g = 1; |int g = 1;
|----------------
int bar(int a) {|----------------
a *= 2; |----------------
a += 3; |----------------
return a; |----------------
} |----------------
<
Below are some ways of setting diff anchors to get the above result. In each
example, 'diffopt' needs to have `anchor` set for this to take effect.
Marks: Set the |'a| mark on the `int foo()` lines in each file first before
setting the anchors: >
set diffanchors='a
Pattern: Specify the anchor using a |pattern| (see |:/|). Here, we make sure
to always start search from line 1 for consistency: >
set diffanchors=1/int\ foo(/
<
Selection: Use visual mode to select the entire `foo()` function body in each
file. Here, we use two anchors. This does a better job of making sure only
the function bodies are anchored against each other but not the lines after
it. Note the `'>+1` below. The "+1" is necessary as we want the split to
happen below the last line of the function, not above: >
set diffanchors='<,'>+1
<
Manually set two anchors using line numbers via buffer-local options: >
setlocal diffanchors=1,5
wincmd w
setlocal diffanchors=7,11
<
==============================================================================
6. Diff options *diff-options*
Also see |'diffopt'| and the "diff" item of |'fillchars'|.

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 9.1. Last change: 2024 Oct 14
*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
@@ -974,8 +974,9 @@ Note: When the 'write' option is off, you are not able to write any file.
executed like with ":!{cmd}", any '!' is replaced with
the previous command |:!|.
The default [range] for the ":w" command is the whole buffer (1,$). If you
write the whole buffer, it is no longer considered changed. When you
The default [range] for the ":w" command is the whole buffer (1,$). The |'[|
and |']| marks will be set to the [range] being used for the write command.
If you write the whole buffer, it is no longer considered changed. When you
write it to a different file with ":w somefile" it depends on the "+" flag in
'cpoptions'. When included, the write command will reset the 'modified' flag,
even though the buffer itself may still be different from its file.
@@ -1341,9 +1342,15 @@ b:browsefilter variable. You would most likely set b:browsefilter in a
filetype plugin, so that the browse dialog would contain entries related to
the type of file you are currently editing. Disadvantage: This makes it
difficult to start editing a file of a different type. To overcome this, you
may want to add "All Files (*.*)\t*\n" as the final filter on Windows or "All
Files (*)\t*\n" on other platforms, so that the user can still access any
desired file.
can add the following as the final filter on Windows: >
All Files\t(*.*)\t*\n
<
Or the following on other platforms, so that the user can still access any
desired file: >
All Files\t(*)\t*\n
<
To avoid setting browsefilter when Vim does not actually support it, you can
use has("browsefilter"): >

View File

@@ -1,4 +1,4 @@
*eval.txt* For Vim version 9.1. Last change: 2025 Mar 23
*eval.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -541,7 +541,8 @@ example, to add up all the numbers in a list: >
A Tuple is an ordered sequence of items. An item can be of any type. Items
can be accessed by their index number. A Tuple is immutable.
A Tuple uses less memory compared to a List and provides O(1) lookup time.
A Tuple is similar to a List but uses less memory and provides O(1) lookup
time for an item.
Tuple creation ~
*E1526* *E1527*
@@ -579,6 +580,15 @@ is not available it returns zero or the default value you specify: >
:echo get(mytuple, idx, "NONE")
Tuple modification ~
*tuple-modification*
A tuple is immutable and items cannot be added or removed from a tuple. But
List and Dict items within a tuple can be modified: >
:let tuple = (1, [2, 3], {'a': 4})
:let tuple[1][0] = 10
:let tuple[2]['a'] = 20
Tuple concatenation ~
*tuple-concatenation*
Two tuples can be concatenated with the "+" operator: >
@@ -2230,6 +2240,15 @@ v:charconvert_to
The name of the character encoding of a file after conversion.
Only valid while evaluating the 'charconvert' option.
*v:clipmethod*
v:clipmethod The current method of accessing the clipboard that is being
used. Can either have the value of:
wayland The Wayland protocol is being used.
x11 X11 selections are being used.
none The above methods are unavailable or
cannot be used.
See 'clipmethod' for more details.
*v:cmdarg* *cmdarg-variable*
v:cmdarg This variable is used for two purposes:
1. The extra arguments given to a file read/write command.
@@ -2974,6 +2993,12 @@ v:vim_did_enter Zero until most of startup is done. It is set to one just
*v:warningmsg* *warningmsg-variable*
v:warningmsg Last given warning message. It's allowed to set this variable.
*v:wayland_display*
v:wayland_display
The name of the Wayland display that Vim is connected to.
Equivalent to the $WAYLAND_DISPLAY environment variable.
If this is empty, then Vim is not connected to any display.
*v:windowid* *windowid-variable*
v:windowid When any X11/Wayland based GUI is running or when running in a
terminal and Vim connects to the X server (|-X|) this will be
@@ -3712,7 +3737,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
@@ -3732,7 +3757,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.
@@ -3763,7 +3788,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
@@ -3795,7 +3820,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
@@ -3808,7 +3833,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.
@@ -3835,7 +3860,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 ".."
@@ -5154,7 +5179,11 @@ executable. It takes the following arguments:
filetype string
executable string
*dist#vim9#Open()* *:Open*
*package-open*
The |:Open| and |:Launch| command are provided by the included plugin
$VIMRUNTIME/plugin/openPlugin.vim
*dist#vim9#Open()* *:Open* *:URLOpen*
*g:Openprg* *gx*
dist#vim9#Open(file: string) ~
@@ -5162,6 +5191,11 @@ Opens `path` with the system default handler (macOS `open`, Windows
`explorer.exe`, Linux `xdg-open`, …). If the variable |g:Openprg| exists the
string specified in the variable is used instead.
The |:Open| user command uses file completion for its argument.
The |:URLOpen| user command works the same but does not perform file
completion and therefore does not expand special characters |cmdline-special|.
This function is by default called using the gx mapping. In visual mode
tries to open the visually selected text.
@@ -5179,17 +5213,19 @@ NOTE: Escaping of the path is automatically applied.
Usage: >vim
:call dist#vim9#Open(<path>)
:Open <path>
:URLOpen <path>
<
*dist#vim9#Launch()* *:Launch*
*dist#vim9#Launch()* *:Launch*
dist#vim9#Launch(file: string) ~
Launches <args> with the appropriate system programs. Intended for launching
GUI programs within Vim.
The |:Launch| user command uses shell completion for its first argument.
NOTE: escaping of <args> is left to the user
Examples: >vim
Examples: >
vim9script
import autoload 'dist/vim9.vim'

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 9.1. Last change: 2025 Mar 15
*filetype.txt* For Vim version 9.1. Last change: 2025 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,11 +153,17 @@ variables can be used to overrule the filetype used for certain extensions:
*.f g:filetype_f |ft-forth-syntax|
*.frm g:filetype_frm |ft-form-syntax|
*.fs g:filetype_fs |ft-forth-syntax|
*.h g:c_syntax_for_h |ft-c-syntax|
*.h g:c_syntax_for_h |ft-c-syntax| (deprecated)
*.h g:ch_syntax_for_h |ft-ch-syntax| (deprecated)
*.h g:filetype_h |ft-c-syntax|
|ft-ch-syntax|
|ft-cpp-syntax|
*.i g:filetype_i |ft-progress-syntax|
*.inc g:filetype_inc
*.lsl g:filetype_lsl
*.m g:filetype_m |ft-mathematica-syntax|
*[mM]makefile,*.mk,*.mak,[mM]akefile*
g:make_flavor |ft-make-syntax|
*.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md
g:filetype_md |ft-pandoc-syntax|
*.mod g:filetype_mod
@@ -263,7 +269,7 @@ D. If your filetype can only be detected by inspecting the contents of the
item of the 'runtimepath' option. Example for Unix: >
:!mkdir ~/.vim
<
2. Create a vim script file for doing this. Example: >
2. Create a Vim script file for doing this. Example: >
if did_filetype() " filetype already set..
finish " ..don't do these checks
endif
@@ -660,6 +666,16 @@ possibilities: >
The `:Cycle` command is also mapped to the CTRL-A and CTRL-X keys.
For details, see `git-rebase --help`.
GLEAM *ft-gleam-plugin*
By default the following options are set for the recommended gleam style: >
setlocal expandtab shiftwidth=2 softtabstop=2
To disable this behavior, set the following variable in your vimrc: >
let g:gleam_recommended_style = 0
GO *ft-go-plugin*
By default the following options are set, based on Golang official docs: >
@@ -686,6 +702,32 @@ HARE *ft-hare*
Since the text for this plugin is rather long it has been put in a separate
file: |ft_hare.txt|.
HTML *ft-html-plugin*
Tag folding poses a few difficulties. Many elements, e.g. `blockquote`, are
always delimited by start and end tags; end tags for some elements, e.g. `p`,
can be omitted in certain contexts; void elements, e.g. `hr`, have no end tag.
Although the rules for supporting omissible end tags are ad-hoc and involved
[0], they apply to elements in scope. Assuming syntactical wellformedness, an
end tag can be associated with its nearest matching start tag discoverable in
scope [1] and towards the beginning of a file, whereas all unbalanced tags and
inlined tags can be disregarded. Having syntax highlighting in effect, tag
folding using the |fold-expr| method can be enabled with: >
let g:html_expr_folding = 1
<
By default, tag folding will be redone from scratch after each occurrence of
a |TextChanged| or an |InsertLeave| event. Such frequency may not be desired,
especially for large files, and this recomputation can be disabled with: >
let g:html_expr_folding_without_recomputation = 1
doautocmd FileType
<
To force another recomputation, do: >
unlet! b:foldsmap
normal zx
<
[0] https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
[1] https://en.wikipedia.org/wiki/Dangling_else
IDRIS2 *ft-idris2-plugin*
By default the following options are set: >
@@ -1027,6 +1069,13 @@ functions with [[ and ]]. Move around comments with ]" and [".
The mappings can be disabled with: >
let g:no_vim_maps = 1
YAML *ft-yaml-plugin*
By default, the YAML filetype plugin enables the following options: >
setlocal shiftwidth=2 softtabstop=2
To disable this, set the following variable: >
let g:yaml_recommended_style = 0
ZIG *ft-zig-plugin*

View File

@@ -1,4 +1,4 @@
*fold.txt* For Vim version 9.1. Last change: 2024 Dec 17
*fold.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -164,7 +164,7 @@ level is found.
If this proves difficult, the next best thing could be to cache all fold
levels in a buffer-local variable (b:foldlevels) that is only updated on
|b:changedtick|:
>vim
>
vim9script
def MyFoldFunc(): number
if b:lasttick == b:changedtick
@@ -642,14 +642,17 @@ what you type!
When using an operator, a closed fold is included as a whole. Thus "dl"
deletes the whole closed fold under the cursor.
For Ex commands that work on buffer lines the range is adjusted to always
For Ex commands that operate on buffer lines, the range is adjusted to always
start at the first line of a closed fold and end at the last line of a closed
fold. Thus this command: >
fold. Thus, this command: >
:s/foo/bar/g
when used with the cursor on a closed fold, will replace "foo" with "bar" in
all lines of the fold.
This does not happen for |:folddoopen| and |:folddoclosed|.
Note that for some Ex commands like |:source| the range is only adjusted when
using a two line specifiers [range].
When editing a buffer that has been edited before, the last used folding
settings are used again. For manual folding the defined folds are restored.
For all folding methods the manually opened and closed folds are restored.

View File

@@ -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~

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 9.1. Last change: 2024 Dec 06
*help.txt* For Vim version 9.1. Last change: 2025 Jun 27
VIM - main help file
k
@@ -188,6 +188,9 @@ GUI ~
|gui_x11.txt| X11 GUI
|gui_mac.txt| MacVim GUI
System Integration ~
|wayland.txt| Wayland protocol support
Interfaces ~
|if_cscop.txt| using Cscope with Vim
|if_lua.txt| Lua interface

View File

@@ -1,4 +1,4 @@
*helphelp.txt* For Vim version 9.1. Last change: 2025 Jan 11
*helphelp.txt* For Vim version 9.1. Last change: 2025 Jul 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -287,9 +287,11 @@ The latter supports the following normal commands: >
<Home> | select first entry
<End> | select last entry
The plugin can also provide a table of contents in man pages, markdown files,
and terminal buffers. In the latter, the entries will be the past executed
shell commands. To find those, the following pattern is used: >
The plugin can also provide a table of contents in buffers of the following
filetypes: asciidoc, html, man, markdown, tex, vim, and xhtml. In addition
it also provide a table of contents for a terminal buffer, which produces
entries that are the past executed shell commands. To find those, by default,
the following pattern is used: >
^\w\+@\w\+:\f\+\$\s
@@ -303,6 +305,10 @@ Tip: After inserting a pattern to look for with the `/` command, if you press
<Esc> instead of <CR>, you can then get more context for each remaining entry
by pressing `J` or `K`.
Refer to |helptoc.txt| for more details about helptoc, particularly about
using it with filetypes other than help, and configuring its options.
Note: You need to `packadd helptoc` before you can jump to |helptoc.txt|.
==============================================================================
2. Translated help files *help-translated*
@@ -383,6 +389,10 @@ standard Vim help files, except for the first line. If you are writing a new
help file it's best to copy one of the existing files and use it as a
template.
Vim help files generally use 2 spaces after a sentence (since they are written
using a fixed-width font and that was the prefered style in the 70s/80s), like
what is described here: https://english.stackexchange.com/a/2602
The first line in a help file should have the following format:
*plugin_name.txt* {short description of the plugin}
@@ -400,9 +410,27 @@ and 'tabstop' options and the 'filetype' to "help". Never set a global option
in such a modeline, that can have undesired consequences.
STYLE
If your Vim has 'modeline' enabled, Vim should follow the preferred style
automatically when editing built-in help files.
Vim help files should be formatted for a 'textwidth' of 78 characters, so they
look good in a typical 80 x 24 terminal window.
Use two spaces between the final dot of a sentence of the first letter of the
next sentence. Like this.
Use tab characters for aligning content, with a 'tabstop' setting of 8.
This also helps reduce the file size.
Always use |:retab| after you have finished editing. Don't blindly use
|:retab!|, always review what will be changed to avoid unwanted changes.
TAGS
To define a help tag, place the name between asterisks (*tag-name*). The
To define a help tag, place the name between asterisks ("*tag-name*"). The
tag-name should be different from all the Vim help tag names and ideally
should begin with the name of the Vim plugin. The tag name is usually right
aligned on a line.
@@ -471,8 +499,13 @@ highlighting. So do these:
You can find the details in $VIMRUNTIME/syntax/help.vim
GENDER NEUTRAL LANGUAGE
FILETYPE COMPLETION *ft-help-omni*
To get completion for help tags when writing a tag reference, you can use the
|i_CTRL-X_CTRL-O| command.
GENDER NEUTRAL LANGUAGE
*gender-neutral* *inclusion*
Vim is for everybody, no matter race, gender or anything. For new or updated
help text, gender neutral language is recommended. Some of the help text is

View File

@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 9.1. Last change: 2023 May 14
*if_perl.txt* For Vim version 9.1. Last change: 2025 Apr 27
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -74,7 +74,7 @@ The ActiveState one should work, Strawberry Perl is a good alternative.
|script-here|.
Example vim script: >
Example Vim script: >
function! WhitePearl()
perl << EOF

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 9.1. Last change: 2025 Mar 18
*index.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -163,6 +163,7 @@ commands in CTRL-X submode *i_CTRL-X_index*
|i_CTRL-X_CTRL-N| CTRL-X CTRL-N next completion
|i_CTRL-X_CTRL-O| CTRL-X CTRL-O omni completion
|i_CTRL-X_CTRL-P| CTRL-X CTRL-P previous completion
|i_CTRL-X_CTRL-R| CTRL-X CTRL-R complete contents from registers
|i_CTRL-X_CTRL-S| CTRL-X CTRL-S spelling suggestions
|i_CTRL-X_CTRL-T| CTRL-X CTRL-T complete identifiers from thesaurus
|i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down
@@ -529,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 same as "CTRL-W 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 .."
@@ -1263,6 +1264,7 @@ tag command action ~
|:class| :class start of a class declaration
|:clast| :cla[st] go to the specified error, default last one
|:clearjumps| :cle[arjumps] clear the jump list
|:clipreset| :clip[reset] reset 'clipmethod'
|:clist| :cl[ist] list all errors
|:close| :clo[se] close current window
|:cmap| :cm[ap] like ":map" but for Command-line mode
@@ -1585,6 +1587,7 @@ tag command action ~
|:redraw| :redr[aw] force a redraw of the display
|:redrawstatus| :redraws[tatus] force a redraw of the status line(s)
|:redrawtabline| :redrawt[abline] force a redraw of the tabline
|:redrawtabpanel| :redrawtabp[anel] force a redraw of the tabpanel
|:registers| :reg[isters] display the contents of registers
|:resize| :res[ize] change current window height
|:retab| :ret[ab] change tab size
@@ -1740,6 +1743,7 @@ tag command action ~
|:unabbreviate| :una[bbreviate] remove abbreviation
|:unhide| :unh[ide] open a window for each loaded file in the
buffer list
|:uniq| :uni[q] uniq lines
|:unlet| :unl[et] delete variable
|:unlockvar| :unlo[ckvar] unlock variables
|:unmap| :unm[ap] remove mapping
@@ -1776,6 +1780,7 @@ tag command action ~
|:winsize| :wi[nsize] get or set window size (obsolete)
|:wincmd| :winc[md] execute a Window (CTRL-W) command
|:winpos| :winp[os] get or set window position
|:wlrestore| :wl[restore] restore the Wayland compositor connection
|:wnext| :wn[ext] write to a file and go to next file in
argument list
|:wprevious| :wp[revious] write to a file and go to previous file in

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 9.1. Last change: 2025 Mar 09
*insert.txt* For Vim version 9.1. Last change: 2025 Jul 17
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -529,7 +529,7 @@ paragraph, no matter where the cursor currently is. Or you can use Visual
mode: hit "v", move to the end of the block, and type "gq". See also |gq|.
==============================================================================
4. 'expandtab', 'smarttab' and 'softtabstop' options *ins-expandtab*
4. 'expandtab', 'softtabstop' and 'smarttab' options *ins-expandtab*
If the 'expandtab' option is on, spaces will be used to fill the amount of
whitespace of the tab. If you want to enter a real <Tab>, type CTRL-V first
@@ -540,13 +540,6 @@ number of characters in the line increases. Backspacing will delete one
space at a time. The original character will be put back for only one space
that you backspace over (the last one).
*ins-smarttab*
When the 'smarttab' option is on, a <Tab> inserts 'shiftwidth' positions at
the beginning of a line and 'tabstop' positions in other places. This means
that often spaces instead of a <Tab> character are inserted. When 'smarttab'
is off, a <Tab> always inserts 'tabstop' positions, and 'shiftwidth' is only
used for ">>" and the like.
*ins-softtabstop*
When the 'softtabstop' option is non-zero, a <Tab> inserts 'softtabstop'
positions, and a <BS> used to delete white space, will delete 'softtabstop'
@@ -561,6 +554,13 @@ the cursor. Otherwise you cannot always delete a single character before the
cursor. You will have to delete 'softtabstop' characters first, and then type
extra spaces to get where you want to be.
*ins-smarttab*
When the 'smarttab' option is on, the <Tab> key indents by 'shiftwidth' if the
cursor is in leading whitespace. The <BS> key has the opposite effect. This
behaves as if 'softtabstop' were set to the value of 'shiftwidth'. This option
allows the user to set 'softtabstop' to a value other than 'shiftwidth' and
still use the <Tab> key for indentation.
==============================================================================
5. Replace mode *Replace* *Replace-mode* *mode-replace*
@@ -648,7 +648,8 @@ Completion can be done for:
10. User defined completion |i_CTRL-X_CTRL-U|
11. omni completion |i_CTRL-X_CTRL-O|
12. Spelling suggestions |i_CTRL-X_s|
13. keywords in 'complete' |i_CTRL-N| |i_CTRL-P|
13. completions from 'complete' |i_CTRL-N| |i_CTRL-P|
14. contents from registers |i_CTRL-X_CTRL-R|
Additionally, |i_CTRL-X_CTRL-Z| stops completion without changing the text.
@@ -658,6 +659,9 @@ and one of the CTRL-X commands. You exit CTRL-X mode by typing a key that is
not a valid CTRL-X mode command. Valid keys are the CTRL-X command itself,
CTRL-N (next), and CTRL-P (previous).
By default, the possible completions are showed in a menu and the first
completion is inserted into the text. This can be adjusted with 'completeopt'.
To get the current completion information, |complete_info()| can be used.
Also see the 'infercase' option if you want to adjust the case of the match.
@@ -1019,6 +1023,26 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
completion, for example: >
:imap <Tab> <C-X><C-V>
Completing contents from registers *compl-register-words*
*i_CTRL-X_CTRL-R*
CTRL-X CTRL-R Guess what kind of item is in front of the cursor from
all registers and find the first match for it.
Further use of CTRL-R (without CTRL-X) will insert the
register content, see |i_CTRL-R|.
'ignorecase' applies to the matching.
CTRL-N Search forwards for next match. This match replaces
the previous one.
CTRL-P Search backwards for previous match. This match
replaces the previous one.
CTRL-X CTRL-R Further use of CTRL-X CTRL-R will copy the line
following the previous expansion in other contexts
unless a double CTRL-X is used (e.g. this switches
from completing register words to register contents).
User defined completion *compl-function*
Completion is done by a function that can be defined by the user with the
@@ -1079,25 +1103,23 @@ CTRL-X s Locate the word in front of the cursor and find the
previous one.
Completing keywords from different sources *compl-generic*
Completing from different sources *compl-generic*
*i_CTRL-N*
CTRL-N Find next match for words that start with the
keyword in front of the cursor, looking in places
specified with the 'complete' option. The found
keyword is inserted in front of the cursor.
CTRL-N Find the next match for a word ending at the cursor,
using the sources specified in the 'complete' option.
All sources complete from keywords, except functions,
which may complete from non-keyword. The matched
text is inserted before the cursor.
*i_CTRL-P*
CTRL-P Find previous match for words that start with the
keyword in front of the cursor, looking in places
specified with the 'complete' option. The found
keyword is inserted in front of the cursor.
CTRL-P Same as CTRL-N, but find the previous match.
CTRL-N Search forward for next matching keyword. This
keyword replaces the previous matching keyword.
CTRL-N Search forward through the matches and insert the
next one.
CTRL-P Search backwards for next matching keyword. This
keyword replaces the previous matching keyword.
CTRL-P Search backward through the matches and insert the
previous one.
CTRL-X CTRL-N or
CTRL-X CTRL-P Further use of CTRL-X CTRL-N or CTRL-X CTRL-P will
@@ -1167,6 +1189,9 @@ For example, the function can contain this: >
let matches = ... list of words ...
return {'words': matches, 'refresh': 'always'}
<
If looking for matches is time-consuming, |complete_check()| may be used to
maintain responsiveness.
*complete-items*
Each list item can either be a string or a Dictionary. When it is a string it
is used as the completion. When it is a Dictionary it can contain these
@@ -1233,13 +1258,16 @@ of values:
Example: >
:set completepopup=height:10,width:60,highlight:InfoPopup
When the "align" value is "item" then the popup is positioned close to the
selected item. Changing the selection will also move the popup. When "align"
is "menu" then the popup is aligned with the top of the menu if the menu is
below the text, and the bottom of the menu otherwise.
When `"align"` is set to `"item"`, the popup is positioned near the selected
item, and moves as the selection changes.
When set to `"menu"`, the popup aligns with the top of the menu (if the menu
appears below the text), or with the bottom (if the menu appears above).
After the info popup is created it can be found with |popup_findinfo()| and
properties can be changed with |popup_setoptions()|.
If the 'mouse' is enabled, a close button and resize handle will appear on the
popup border.
After creation, the info popup can be located with |popup_findinfo()| and
modified using |popup_setoptions()|.
*complete-popuphidden*
If the information for the popup is obtained asynchronously, use "popuphidden"
@@ -1344,6 +1372,7 @@ use all space available.
The 'pumwidth' option can be used to set a minimum width. The default is 15
characters.
*compl-states*
There are three states:
1. A complete match has been inserted, e.g., after using CTRL-N or CTRL-P.
2. A cursor key has been used to select another match. The match was not

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 9.1. Last change: 2024 Oct 08
*map.txt* For Vim version 9.1. Last change: 2025 Jul 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1654,6 +1654,7 @@ completion can be enabled:
-complete=messages |:messages| suboptions
-complete=option options
-complete=packadd optional package |pack-add| names
-complete=retab |:retab| suboptions
-complete=runtime file and directory names in |'runtimepath'|
-complete=scriptnames sourced script names
-complete=shellcmd Shell command

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 9.1. Last change: 2024 Dec 17
*motion.txt* For Vim version 9.1. Last change: 2025 Apr 03
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -895,12 +895,12 @@ Numbered mark should be stored. See |viminfo-file-marks|.
*'[* *`[*
'[ `[ To the first character of the previously changed
or yanked text.
'[ `[ To the first character of the previously changed,
or yanked text. Also set when writing the buffer.
*']* *`]*
'] `] To the last character of the previously changed or
yanked text.
yanked text. Also set when writing the buffer.
After executing an operator the Cursor is put at the beginning of the text
that was operated upon. After a put command ("p" or "P") the cursor is

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 9.1. Last change: 2025 Mar 21
*pattern.txt* For Vim version 9.1. Last change: 2025 Jul 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -183,6 +183,17 @@ matches in every line with `:vglobal`.
For the |:s| command the "e" flag can be used to avoid the error message
|:s_flags|.
*search-options*
The following options affect how a search is performed in Vim:
'hlsearch' highlight matches
'ignorecase' ignore case when searching
'imsearch' use |IME| when entering the search pattern
'incsearch' show matches incrementally as the pattern is typed
'maxsearchcount' maximum number for the search count |shm-S|
'shortmess' suppress messages |shm-s|; show search count |shm-S|
'smartcase' override 'ignorecase' if pattern contains uppercase
'wrapscan' continue searching from the start of the file
*search-offset* *{offset}*
These commands search for the specified pattern. With "/" and "?" an
additional offset may be given. There are two types of offsets: line offsets
@@ -1222,7 +1233,8 @@ x A single character, with no special meaning, matches itself
\o40 octal number of character up to 0o377
\x20 hexadecimal number of character up to 0xff
\u20AC hex. number of multibyte character up to 0xffff
\U1234 hex. number of multibyte character up to 0xffffffff
\U1234 hex. number of multibyte character up to 8 characters
0xffffffff |E1541|
NOTE: The other backslash codes mentioned above do not work inside
[]!
- Matching with a collection can be slow, because each character in
@@ -1263,7 +1275,8 @@ x A single character, with no special meaning, matches itself
\%u20AC Matches the character specified with up to four hexadecimal
characters.
\%U1234abcd Matches the character specified with up to eight hexadecimal
characters, up to 0x7fffffff
characters, up to 0x7fffffff (the maximum allowed value is INT_MAX
|E1541|, but the maximum valid Unicode codepoint is U+10FFFF).
==============================================================================
7. Ignoring case in a pattern */ignorecase*

View File

@@ -1,4 +1,4 @@
*pi_getscript.txt* For Vim version 9.1. Last change: 2025 Mar 15
*pi_getscript.txt* For Vim version 9.1. Last change: 2025 Apr 27
>
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
<
@@ -156,7 +156,7 @@ may have. As an example, consider: >
" GetLatestVimScripts: 884 1 :AutoInstall: AutoAlign.vim
This comment line tells getscript.vim to check vimscript #884 and that the
This comment line tells getscript.vim to check Vim script #884 and that the
script is automatically installable. Getscript will also use this line to
help build the GetLatestVimScripts.dat file, by including a line such as: >

View File

@@ -339,10 +339,8 @@ NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
)
Netrw provides a lot of variables which allow you to customize netrw to your
preferences. One way to look at them is via the command :NetrwSettings (see
|netrw-settings|) which will display your current netrw settings. Most such
settings are described below, in |netrw-browser-options|, and in
|netrw-externapp|:
preferences. Most such settings are described below, in
|netrw-browser-options|, and in |netrw-externapp|:
*b:netrw_lastfile* last file Network-read/written retained on a
per-buffer basis (supports plain :Nw )
@@ -431,17 +429,6 @@ settings are described below, in |netrw-browser-options|, and in
*g:netrw_silent* =0 : transfers done normally
=1 : transfers done silently
*g:netrw_use_errorwindow* =2: messages from netrw will use a popup window
Move the mouse and pause to remove the popup window.
(default value if popup windows are available)
=1 : messages from netrw will use a separate one
line window. This window provides reliable
delivery of messages.
(default value if popup windows are not available)
=0 : messages from netrw will use echoerr ;
messages don't always seem to show up this
way, but one doesn't have to quit the window.
*g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
permits network browsing to use ls with time and
size sorting (default if windows)
@@ -471,7 +458,7 @@ file using root-relative paths, use the full path:
==============================================================================
4. Network-Oriented File Transfer *netrw-xfer* {{{1
Network-oriented file transfer under Vim is implemented by a vim script
Network-oriented file transfer under Vim is implemented by a Vim script
(<netrw.vim>) using plugin techniques. It currently supports both reading and
writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
dav/cadaver, rsync, or sftp.
@@ -776,9 +763,6 @@ below, a {netfile} is a URL to a remote file.
strings (ie. "").
(related: |netrw-userpass|)
:NetrwSettings This command is described in |netrw-settings| -- used to
display netrw settings and change netrw behavior.
==============================================================================
8. Variables and Options *netrw-var* *netrw-settings* {{{1
@@ -1136,7 +1120,6 @@ QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
*netrw-quickcom* *netrw-quickcoms*
QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
:NetrwSettings............................................|netrw-settings|
:Ntree....................................................|netrw-ntree|
:Explore[!] [dir] Explore directory of current file......|netrw-explore|
:Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
@@ -2568,12 +2551,6 @@ your browsing preferences. (see also: |netrw-settings|)
|g:netrw_maxfilenamelen|, which affects
local file long listing.
*g:netrw_errorlvl* =0: error levels greater than or equal to
this are permitted to be displayed
0: notes
1: warnings
2: errors
*g:netrw_fastbrowse* =0: slow speed directory browsing;
never re-uses directory listings;
always obtains directory listings.
@@ -2752,11 +2729,6 @@ your browsing preferences. (see also: |netrw-settings|)
rightmouse : remove file/directory
=0: disables mouse maps
*g:netrw_nobeval* doesn't exist (default)
If this variable exists, then balloon
evaluation will be suppressed
(see |'ballooneval'|)
*g:netrw_sizestyle* not defined: actual bytes (default)
="b" : actual bytes (default)
="h" : human-readable (ex. 5k, 4m, 3g)
@@ -2972,17 +2944,6 @@ file you edit; this apparently also applies to directories. In other words,
autochdir sets the current directory to that containing the "file" (even if
that "file" is itself a directory).
NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
With the NetrwSettings.vim plugin, >
:NetrwSettings
will bring up a window with the many variables that netrw uses for its
settings. You may change any of their values; when you save the file, the
settings therein will be used. One may also press "?" on any of the lines for
help on what each of the variables do.
(also see: |netrw-browser-var| |netrw-protocol| |netrw-variables|)
==============================================================================
OBTAINING A FILE *netrw-obtain* *netrw-O* {{{2

View File

@@ -1,11 +1,10 @@
*pi_tar.txt* For Vim version 9.1. Last change: 2024 May 11
*pi_tar.txt* For Vim version 9.1. Last change: 2025 Jul 15
+====================+
| Tar File Interface |
+====================+
Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
(remove NOSPAM from Campbell's email first)
Original Author: Charles E. Campbell
Copyright 2005-2017: *tar-copyright*
The VIM LICENSE (see |copyright|) applies to the files in this
package, including tarPlugin.vim, tar.vim, and pi_tar.txt. Like
@@ -61,7 +60,7 @@ Copyright 2005-2017: *tar-copyright*
the file mentioned in the tarball. If the current directory is not
correct for that path, :TarDiff will fail to find the associated file.
If the [filename] is given, that that filename (and path) will be used
If the [filename] is given, that filename (and path) will be used
to specify the associated file.
@@ -74,6 +73,15 @@ Copyright 2005-2017: *tar-copyright*
let g:loaded_tarPlugin= 1
let g:loaded_tar = 1
<
*tar-mappings*
MAPPINGS~
The following (buffer-local) mappings are available in a tar buffer:
<CR> Open selected file for editing, any changes will be
written back to the archive.
<LeftMouse> same as <CR>
x Extract selected file.
==============================================================================
3. Options *tar-options*
@@ -86,24 +94,25 @@ Copyright 2005-2017: *tar-copyright*
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
*g:tar_cmd* "tar" the name of the tar program
*g:tar_nomax* 0 if true, file window will not be maximized
*g:tar_secure* undef if exists:
"--"s will be used to prevent unwanted
option expansion in tar commands.
Please be sure that your tar command
accepts "--"; Posix compliant tar
utilities do accept them.
if not exists:
The tar plugin will reject any tar
files or member files that begin with
"-"
Not all tar's support the "--" which is why
it isn't default.
*g:tar_writeoptions* "uf" used to update/replace a file
==============================================================================
4. History *tar-history*
unreleased:
Jul 13, 2025 * drop leading /
May 19, 2025 * restore working directory after read/write
Apr 16, 2025 * decouple from netrw by adding s:WinPath()
instead of shelling out to file(1)
Mar 02, 2025 * determine the compression using readblob()
Mar 02, 2025 * escape the filename before using :read
Mar 01, 2025 * fix syntax error in tar#Read()
Feb 28, 2025 * add support for bzip3 (#16755)
Feb 06, 2025 * add support for lz4 (#16591)
Nov 11, 2024 * support permissions (#7379)
Feb 19, 2024 * announce adoption
Jan 08, 2024 * fix a few problems (#138331, #12637, #8109)
v31 Apr 02, 2017 * (klartext) reported that browsing encrypted
files in a zip archive created unencrypted
swap files. I am applying a similar fix

View File

@@ -1,10 +1,12 @@
*pi_tutor.txt* For Vim version 9.1. Last change: 2024 Dec 17
*pi_tutor.txt* For Vim version 9.1. Last change: 2025 May 19
INTERACTIVE TUTORIALS FOR VIM *vim-tutor-mode*
vim-tutor-mode provides a system to follow and create interactive tutorials
for vim and third party plugins. It replaces the venerable `vimtutor` system.
Original Author: Felipe Morales <https://github.com/fmoralesc>
=============================================================================
1. Usage *vim-tutor-usage*
@@ -47,13 +49,5 @@ to be detected by the :Tutor command.
It is recommended to use a less formal style when writing tutorials than in
regular documentation (unless the content requires it).
=============================================================================
3. Contributing
Development of the plugin is done over at github [1]. Feel free to report
issues and make suggestions.
[1]: https://github.com/fmoralesc/vim-tutor-mode
=============================================================================
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*pi_zip.txt* For Vim version 9.1. Last change: 2023 Nov 05
*pi_zip.txt* For Vim version 9.1. Last change: 2025 Jul 15
+====================+
| Zip File Interface |
@@ -100,15 +100,29 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
should be treated as zip files.
Alternatively, one may change *g:zipPlugin_ext* in one's .vimrc.
Currently (11/30/15) it holds: >
Currently (as of April 2025) it holds: >
let g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,
\ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,
\ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,
\ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub'
let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,
\ *.dotm,*.dotx,*.ear,*.epub,*.gcsx,*.glox,*.gqsx,*.ja,*.jar,*.kmz,
\ *.odb,*.odc,*.odf,*.odg,*.odi,*.odm,*.odp,*.ods,*.odt,*.otc,*.otf,
\ *.otg,*.oth,*.oti,*.otp,*.ots,*.ott,*.oxt,*.potm,*.potx,*.ppam,
\ *.ppsm,*.ppsx,*.pptm,*.pptx,*.sldx,*.thmx,*.vdw,*.war,*.whl,*.wsz,
\ *.xap,*.xlam,*.xlsb,*.xlsm,*.xlsx,*.xltm,*.xltx,*.xpi,*.zip'
==============================================================================
4. History *zip-history* {{{1
unreleased:
Jul 12, 2025 * drop ../ on write to prevent path traversal attacks
Mar 11, 2025 * handle filenames with leading '-' correctly
Aug 21, 2024 * simplify condition to detect MS-Windows
Aug 18, 2024 * correctly handle special globbing chars
Aug 05, 2024 * clean-up and make it work with shellslash on Windows
Aug 05, 2024 * workaround for the FreeBSD's unzip
Aug 04, 2024 * escape '[' in name of file to be extracted
Jul 30, 2024 * fix opening remote zipfile
Jul 24, 2024 * use delete() function
Jul 23, 2024 * fix 'x' command
Jun 16, 2024 * handle whitespace on Windows properly (#14998)
v33 Dec 07, 2021 * *.xlam mentioned twice in zipPlugin
v32 Oct 22, 2021 * to avoid an issue with a vim 8.2 patch, zipfile: has
been changed to zipfile:// . This often shows up

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 9.1. Last change: 2025 Mar 11
*quickfix.txt* For Vim version 9.1. Last change: 2025 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -43,12 +43,12 @@ From inside Vim an easy way to run a command and handle the output is with the
The 'errorformat' option should be set to match the error messages from your
compiler (see |errorformat| below).
*quickfix-ID*
*quickfix-stack* *quickfix-ID*
Each quickfix list has a unique identifier called the quickfix ID and this
number will not change within a Vim session. The |getqflist()| function can be
used to get the identifier assigned to a list. There is also a quickfix list
number which may change whenever more than ten lists are added to a quickfix
stack.
number which may change whenever more than 'chistory' lists are added to a
quickfix stack.
*location-list* *E776*
A location list is a window-local quickfix list. You get one after commands
@@ -860,10 +860,12 @@ using these functions are below:
=============================================================================
3. Using more than one list of errors *quickfix-error-lists*
So far has been assumed that there is only one list of errors. Actually the
ten last used lists are remembered. When starting a new list, the previous
ones are automatically kept. Two commands can be used to access older error
lists. They set one of the existing error lists as the current one.
So far it has been assumed that there is only one list of errors. Actually
there can be multiple used lists that are remembered; see 'chistory' and
'lhistory'.
When starting a new list, the previous ones are automatically kept. Two
commands can be used to access older error lists. They set one of the
existing error lists as the current one.
*:colder* *:col* *E380*
:col[der] [count] Go to older error list. When [count] is given, do

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 9.1. Last change: 2025 Feb 08
*quickref.txt* For Vim version 9.1. Last change: 2025 Jul 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -640,12 +640,14 @@ Short explanation of each option: *option-list*
'cdpath' 'cd' list of directories searched with ":cd"
'cedit' key used to open the command-line window
'charconvert' 'ccv' expression for character encoding conversion
'chistory' 'chi' maximum number of quickfix lists in history
'cindent' 'cin' do C program indenting
'cinkeys' 'cink' keys that trigger indent when 'cindent' is set
'cinoptions' 'cino' how to do indenting when 'cindent' is set
'cinscopedecls' 'cinsd' words that are recognized by 'cino-g'
'cinwords' 'cinw' words where 'si' and 'cin' add an indent
'clipboard' 'cb' use the clipboard as the unnamed register
'clipmethod' 'cpm' specify order of what clipboard methods to use
'cmdheight' 'ch' number of lines to use for the command-line
'cmdwinheight' 'cwh' height of the command-line window
'colorcolumn' 'cc' columns to highlight
@@ -682,6 +684,7 @@ Short explanation of each option: *option-list*
'delcombine' 'deco' delete combining characters on their own
'dictionary' 'dict' list of file names used for keyword completion
'diff' use diff mode for the current window
'diffanchors' 'dia' list of {address} to force anchoring of a diff
'diffexpr' 'dex' expression used to obtain a diff file
'diffopt' 'dip' options for using diff mode
'digraph' 'dg' enable the entering of digraphs in Insert mode
@@ -790,6 +793,7 @@ Short explanation of each option: *option-list*
'langremap' 'lrm' do apply 'langmap' to mapped characters
'laststatus' 'ls' tells when last window has status lines
'lazyredraw' 'lz' don't redraw while executing macros
'lhistory' 'lhi' maximum number of location lists in history
'linebreak' 'lbr' wrap long lines at a blank
'lines' number of lines in the display
'linespace' 'lsp' number of pixel lines to use between characters
@@ -923,9 +927,9 @@ Short explanation of each option: *option-list*
'signcolumn' 'scl' when to display the sign column
'smartcase' 'scs' no ignore case when pattern has uppercase
'smartindent' 'si' smart autoindenting for C programs
'smarttab' 'sta' use 'shiftwidth' when inserting <Tab>
'smarttab' 'sta' <Tab> in leading whitespace indents by 'shiftwidth'
'smoothscroll' 'sms' scroll by screen lines when 'wrap' is set
'softtabstop' 'sts' number of spaces that <Tab> uses while editing
'softtabstop' 'sts' number of columns between two soft tab stops
'spell' enable spell checking
'spellcapcheck' 'spc' pattern to locate end of a sentence
'spellfile' 'spf' files where |zg| and |zw| store words
@@ -947,7 +951,7 @@ Short explanation of each option: *option-list*
'tabclose' 'tcl' which tab page to focus when closing a tab
'tabline' 'tal' custom format for the console tab pages line
'tabpagemax' 'tpm' maximum number of tab pages for |-p| and "tab all"
'tabstop' 'ts' number of spaces that <Tab> in file uses
'tabstop' 'ts' number of columns between two tab stops
'tagbsearch' 'tbs' use binary searching in tags files
'tagcase' 'tc' how to handle case when searching in tags files
'tagfunc' 'tfu' function to get list of tag matches
@@ -993,8 +997,8 @@ Short explanation of each option: *option-list*
'undoreload' 'ur' max nr of lines to save for undo on a buffer reload
'updatecount' 'uc' after this many characters flush swap file
'updatetime' 'ut' after this many milliseconds flush swap file
'varsofttabstop' 'vsts' a list of number of spaces when typing <Tab>
'vartabstop' 'vts' a list of number of spaces for <Tab>s
'varsofttabstop' 'vsts' a list of number of columns between soft tab stops
'vartabstop' 'vts' a list of number of columns between tab stops
'verbose' 'vbs' give informative messages
'verbosefile' 'vfile' file to write messages in
'viewdir' 'vdir' directory where to store files with :mkview
@@ -1024,6 +1028,9 @@ Short explanation of each option: *option-list*
'winminwidth' 'wmw' minimal number of columns for any window
'winptydll' name of the winpty dynamic library
'winwidth' 'wiw' minimal number of columns for current window
'wlseat' 'wse' the Wayland seat to use
'wlsteal' 'wst' allow focus stealing functionality for Wayland
'wltimeoutlen' 'wtm' timeout to use when polling in Wayland
'wrap' long lines wrap and continue on the next line
'wrapmargin' 'wm' chars from the right where wrapping starts
'wrapscan' 'ws' searches wrap around the end of the file

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 9.1. Last change: 2024 Oct 16
*repeat.txt* For Vim version 9.1. Last change: 2025 Jul 15
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -233,7 +233,12 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
Examples: >
:4,5source
:10,18source ++clear
<
< Implementation detail: When sourcing a [range] of
lines that falls inside a folded region, the range
will be adjusted to the start and end of the fold,
but only if a two line specifiers range was used.
*:source!*
:so[urce]! {file} Read Vim commands from {file}. These are commands
that are executed from Normal mode, like you type

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 9.1. Last change: 2025 Feb 27
*starting.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -559,6 +559,12 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
client-server messages), call the |serverlist()| function.
This does not enable the XSMP handler though.
*-Y*
-Y Do not try connecting to the Wayland compositor. Is only
relevant for Unix when compiled with the |+wayland| feature,
otherwise it's ignored. Note that this will make any feature
that uses Wayland unavailable, such as the clipboard.
*-s*
-s {scriptin} The script file "scriptin" is read. The characters in the
file are interpreted as if you had typed them. The same can

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 9.1. Last change: 2025 Mar 26
*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|
@@ -1056,8 +1059,12 @@ Variable Highlight ~
*c_ansi_typedefs* ... but do standard ANSI types
*c_ansi_constants* ... but do standard ANSI constants
*c_no_utf* don't highlight \u and \U in strings
*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc
syntax instead of objcpp
*c_syntax_for_h* use C syntax for *.h files instead of C++/ObjC/ObjC++
(NOTE: This variable is deprecated and no longer
necessary, as *.h files now default to C, unless the
file contains C++ or Objective-C syntax. If the
automated detection fails, the default filetype can
be adjusted using `g:filetype_h`.)
*c_no_if0* don't highlight "#if 0" blocks as comments
*c_no_cformat* don't highlight %-formats in strings
*c_no_c99* don't highlight C99 standard items
@@ -1116,8 +1123,11 @@ the C syntax file. See |c.vim| for all the settings that are available for C.
By setting a variable you can tell Vim to use Ch syntax for *.h files, instead
of C or C++: >
:let ch_syntax_for_h = 1
:let g:filetype_h = 'ch'
NOTE: In previous versions of Vim, the following (now-deprecated) variable was
used, but is no longer the preferred approach: >
:let ch_syntax_for_h = 1
CHILL *chill.vim* *ft-chill-syntax*
@@ -1566,15 +1576,47 @@ ERLANG *erlang.vim* *ft-erlang-syntax*
Erlang is a functional programming language developed by Ericsson. Files with
the following extensions are recognized as Erlang files: erl, hrl, yaws.
The BIFs (built-in functions) are highlighted by default. To disable this,
put the following line in your vimrc: >
Vim highlights triple-quoted docstrings as comments by default.
:let g:erlang_highlight_bifs = 0
If you want triple-quoted docstrings highlighted as Markdown, add the
following line to your |.vimrc|: >
To enable highlighting some special atoms, put this in your vimrc: >
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_highlight_special_atoms = 1
The plain text inside the docstrings (that is, the characters that are not
highlighted by the Markdown syntax) is still highlighted as a comment.
If you want to highlight the plain text inside the docstrings using a
different highlight group, add the following line to your |.vimrc| (the
example highlights plain text using the String highlight group): >
:let g:erlang_docstring_default_highlight = 'String'
If you don't enable Markdown, this line highlights the full docstrings
according to the specified highlight group.
Use the following line to disable highlighting for the plain text: >
:let g:erlang_docstring_default_highlight = ''
Configuration examples: >
" Highlight docstrings as Markdown.
:let g:erlang_use_markdown_for_docs = 1
" 1. Highlight Markdown elements in docstrings as Markdown.
" 2. Highlight the plain text in docstrings as String.
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_docstring_default_highlight = 'String'
" Highlight docstrings as strings (no Markdown).
:let g:erlang_docstring_default_highlight = 'String'
" 1. Highlight Markdown elements in docstrings as Markdown.
" 2. Don't highlight the plain text in docstrings.
:let g:erlang_use_markdown_for_docs = 1
:let g:erlang_docstring_default_highlight = ''
<
ELIXIR *elixir.vim* *ft-elixir-syntax*
@@ -2060,13 +2102,8 @@ old way, put the following line into your Vim startup file: >
All (exported) public types declared in `java.lang` are always automatically
imported and available as simple names. To highlight them, use: >
:let g:java_highlight_java_lang_ids = 1
You can also highlight types of most standard Java packages if you download
the javaid.vim script at http://www.fleiner.com/vim/download.html. If you
prefer to only highlight types of a certain package, say `java.io`, use the
following: >
:let g:java_highlight_java_io = 1
Check the javaid.vim file for a list of all the packages that are supported.
You can also generate syntax items for other public and protected types and
opt in to highlight some of their names; see |java-package-info-url|.
Headers of indented function declarations can be highlighted (along with parts
of lambda expressions and method reference expressions), but it depends on how
@@ -2168,6 +2205,13 @@ line for any comments written in this way, and showing the contents of a first
line otherwise, with >
:let g:java_foldtext_show_first_or_second_line = 1
HTML tags in Javadoc comments can additionally be folded by following the
instructions listed under |html-folding| and giving explicit consent with >
:let g:java_consent_to_html_syntax_folding = 1
Do not default to this kind of folding unless ALL start tags and optional end
tags are balanced in Javadoc comments; otherwise, put up with creating runaway
folds that break syntax highlighting.
Trailing whitespace characters or a run of space characters before a tab
character can be marked as an error with >
:let g:java_space_errors = 1
@@ -2202,17 +2246,18 @@ cycles for such a feature to become either integrated into the platform or
withdrawn from this effort. To cater for early adopters, there is optional
support in Vim for syntax related preview features that are implemented. You
can request it by specifying a list of preview feature numbers as follows: >
:let g:java_syntax_previews = [455, 476]
:let g:java_syntax_previews = [488, 494]
The supported JEP numbers are to be drawn from this table:
`430`: String Templates [JDK 21]
`455`: Primitive types in Patterns, instanceof, and switch
`476`: Module Import Declarations
`488`: Primitive types in Patterns, instanceof, and switch
`494`: Module Import Declarations
Note that as soon as the particular preview feature will have been integrated
into the Java platform, its entry will be removed from the table and related
optionality will be discontinued.
*java-package-info-url*
https://github.com/zzzyxwvut/java-vim/blob/master/tools/javaid/src/javaid/package-info.java
JSON *json.vim* *ft-json-syntax* *g:vim_json_conceal*
*g:vim_json_warnings*
@@ -2393,11 +2438,16 @@ Comments are also highlighted by default. You can turn this off by using: >
:let make_no_comments = 1
Microsoft Makefile handles variable expansion and comments differently
(backslashes are not used for escape). If you see any wrong highlights
because of this, you can try this: >
There are various Make implementations, which add extensions other than the
POSIX specification and thus are mutually incompatible. If the filename is
BSDmakefile or GNUmakefile, the corresponding implementation is automatically
determined; otherwise vim tries to detect it by the file contents. If you see
any wrong highlights because of this, you can enforce a flavor by setting one
of the following: >
:let make_microsoft = 1
:let g:make_flavor = 'bsd' " or
:let g:make_flavor = 'gnu' " or
:let g:make_flavor = 'microsoft'
MAPLE *maple.vim* *ft-maple-syntax*
@@ -2451,6 +2501,12 @@ have the following in your .vimrc: >
let filetype_m = "mma"
MBSYNC *mbsync.vim* *ft-mbsync-syntax*
The mbsync application uses a configuration file to setup mailboxes names,
user and password. All files ending with `.mbsyncrc` or with the name
`isyncrc` will be recognized as mbsync configuration files.
MEDIAWIKI *ft-mediawiki-syntax*
By default, syntax highlighting includes basic HTML tags like style and
@@ -3081,7 +3137,7 @@ PRINTCAP + TERMCAP *ft-ptcap-syntax* *ft-termcap-syntax*
This syntax file applies to the printcap and termcap databases.
In order for Vim to recognize printcap/termcap files that do not match
the patterns *printcap*, or *termcap*, you must put additional patterns
the patterns "*printcap*", or "*termcap*", you must put additional patterns
appropriate to your system in your |myfiletypefile| file. For these
patterns, you must set the variable "b:ptcap_type" to either "print" or
"term", and then the 'filetype' option to ptcap.
@@ -3528,6 +3584,10 @@ variables in your <.vimrc>:
< sh: Bourne shell >
let g:is_sh = 1
Specific shell features are automatically enabled based on the shell detected
from the shebang line ("#! ..."). For KornShell Vim detects different shell
features for mksh, ksh88, ksh93, ksh93u, ksh93v, and ksh2020.
If there's no "#! ..." line, and the user hasn't availed himself/herself of a
default sh.vim syntax setting as just shown, then syntax/sh.vim will assume
the POSIX shell syntax. No need to quote RFCs or market penetration
@@ -3971,6 +4031,7 @@ names whose syntax definitions will be included in Typst files. Example: >
VIM *vim.vim* *ft-vim-syntax*
*g:vimsyn_minlines* *g:vimsyn_maxlines*
There is a trade-off between more accurate syntax highlighting versus screen
updating speed. To improve accuracy, you may wish to increase the
g:vimsyn_minlines variable. The g:vimsyn_maxlines variable may be used to
@@ -3994,10 +4055,9 @@ embedded script highlighting they wish to have. >
g:vimsyn_embed =~ 'r' : support embedded Ruby
g:vimsyn_embed =~ 't' : support embedded Tcl
<
By default, g:vimsyn_embed is a string supporting interpreters that your vim
itself supports. Concatenate the indicated characters to support multiple
types of embedded interpreters (e.g., g:vimsyn_embed = "mp" supports embedded
mzscheme and embedded perl).
By default, g:vimsyn_embed is unset, and the Lua and Python script interfaces
are supported.
*g:vimsyn_folding*
Some folding is now supported with when 'foldmethod' is set to "syntax": >
@@ -4006,15 +4066,15 @@ Some folding is now supported with when 'foldmethod' is set to "syntax": >
g:vimsyn_folding =~ 'c' : fold Vim9 classes
g:vimsyn_folding =~ 'e' : fold Vim9 enums
g:vimsyn_folding =~ 'f' : fold functions
g:vimsyn_folding =~ 'h' : fold heredocs
g:vimsyn_folding =~ 'h' : fold let heredocs
g:vimsyn_folding =~ 'i' : fold Vim9 interfaces
g:vimsyn_folding =~ 'H' : fold Vim9 legacy headers
g:vimsyn_folding =~ 'l' : fold Lua script
g:vimsyn_folding =~ 'm' : fold MzScheme script
g:vimsyn_folding =~ 'p' : fold Perl script
g:vimsyn_folding =~ 'P' : fold Python script
g:vimsyn_folding =~ 'r' : fold Ruby script
g:vimsyn_folding =~ 't' : fold Tcl script
g:vimsyn_folding =~ 'l' : fold Lua heredocs
g:vimsyn_folding =~ 'm' : fold MzScheme heredocs
g:vimsyn_folding =~ 'p' : fold Perl heredocs
g:vimsyn_folding =~ 'P' : fold Python heredocs
g:vimsyn_folding =~ 'r' : fold Ruby heredocs
g:vimsyn_folding =~ 't' : fold Tcl heredocs
<
By default, g:vimsyn_folding is unset. Concatenate the indicated characters
@@ -4293,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
@@ -5966,6 +6026,12 @@ TabLine Tab pages line, not active tab page label.
TabLineFill Tab pages line, where there are no labels.
*hl-TabLineSel*
TabLineSel Tab pages line, active tab page label.
*hl-TabPanel*
TabPanel TabPanel, not active tab page label.
*hl-TabPanelFill*
TabPanelFill TabPanel, where there are no labels.
*hl-TabPanelSel*
TabPanelSel TabPanel, active tab page label.
*hl-Terminal*
Terminal |terminal| window (see |terminal-size-color|).
*hl-Title*

View File

@@ -1,4 +1,4 @@
*tabpage.txt* For Vim version 9.1. Last change: 2024 Jul 12
*tabpage.txt* For Vim version 9.1. Last change: 2025 Jul 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -14,10 +14,13 @@ when used in combination with more than one tab page.
2. Commands |tab-page-commands|
3. Other items |tab-page-other|
4. Setting 'tabline' |setting-tabline|
5. Setting 'guitablabel' |setting-guitablabel|
5. Setting 'tabpanel' |setting-tabpanel|
6. Setting 'guitablabel' |setting-guitablabel|
{not able to use multiple tab pages when the |+windows| feature was disabled
at compile time}
{not able to use |tabpanel| feature when the |+tabpanel| feature was disabled
at compile time}
==============================================================================
1. Introduction *tab-page-intro*
@@ -35,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*
@@ -142,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*
@@ -249,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
@@ -273,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:
@@ -360,12 +363,15 @@ 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 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.
For basics see the 'statusline' option. The same items can be used in the
'tabline' option. Additionally, the |tabpagebuflist()|, |tabpagenr()| and
|tabpagewinnr()| functions are useful.
'tabline' and 'tabpanel' option. Additionally, the |tabpagebuflist()|,
|tabpagenr()| and |tabpagewinnr()| functions are useful.
Since the number of tab labels will vary, you need to use an expression for
the whole option. Something like: >
@@ -392,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
@@ -418,7 +424,66 @@ clever way when there is not enough room. Check the 'columns' option for the
space available.
==============================================================================
5. Setting 'guitablabel' *setting-guitablabel*
5. Setting 'tabpanel' *tabpanel* *setting-tabpanel*
The tabpanel is a vertical sidebar that displays tab page labels along the
side of the window. It looks like this:
>
+-----------+----------------------------------
|(1) |text text text text text text text
| ~/aaa.txt|text text text text text text text
|(2) |text text text text text text text
| ~/.vimrc |text text text text text text text
|(3) |text text text text text text text
| ~/bbb.js |text text text text text text text
| ~/ccc.css|text text text text text text text
| |text text text text text text text
| |text text text text text text text
| |text text text text text text text
<
To configure the tabpanel, use the following options: 'tabpanel',
'showtabpanel' and 'tabpanelopt'.
The 'tabpanel' option functions similar to 'statusline' or 'tabline', and the
'showtabpanel' option functions similar to 'laststatus' or 'showtabline'.
The "columns:" item of 'tabpanelopt' option specifies the width of the
tabpanel:
>
+------ This width
|
<----+----->
+-----------+----------------------------------
|(1) |text text text text text text text
| ~/aaa.txt|text text text text text text text
|(2) |text text text text text text text
<
The "align:" item of the 'tabpanelopt' option determines whether the tabpanel
will be displayed on the left or right side of the window:
>
+----------------------------------+-----------
|text text text text text text text|(1)
|text text text text text text text| ~/aaa.txt
|text text text text text text text|(2)
<
The "vert" item of the 'tabpanelopt' option specifies whether a vertical
separator should be displayed between the tabpanel and the display part of the
window:
>
+------ This is
|
v
+-----------+----------------------------------
|(1) |text text text text text text text
| ~/aaa.txt|text text text text text text text
|(2) |text text text text text text text
<
The vertical separator character is taken from "tpl_vert" in 'fillchars'.
You can customize the appearance of the tab page labels using the highlight
groups: |hl-TabPanel| |hl-TabPanelSel| |hl-TabPanelFill|
==============================================================================
6. Setting 'guitablabel' *setting-guitablabel*
When the GUI tab pages line is displayed, 'guitablabel' can be used to
specify the label to display for each tab page. Unlike 'tabline', which

View File

@@ -136,6 +136,8 @@ $quote eval.txt /*$quote*
'ch' options.txt /*'ch'*
'character' intro.txt /*'character'*
'charconvert' options.txt /*'charconvert'*
'chi' options.txt /*'chi'*
'chistory' options.txt /*'chistory'*
'ci' options.txt /*'ci'*
'cia' options.txt /*'cia'*
'cin' options.txt /*'cin'*
@@ -149,6 +151,7 @@ $quote eval.txt /*$quote*
'cinw' options.txt /*'cinw'*
'cinwords' options.txt /*'cinwords'*
'clipboard' options.txt /*'clipboard'*
'clipmethod' options.txt /*'clipmethod'*
'cm' options.txt /*'cm'*
'cmdheight' options.txt /*'cmdheight'*
'cmdwinheight' options.txt /*'cmdwinheight'*
@@ -179,6 +182,7 @@ $quote eval.txt /*$quote*
'copyindent' options.txt /*'copyindent'*
'cot' options.txt /*'cot'*
'cp' options.txt /*'cp'*
'cpm' options.txt /*'cpm'*
'cpo' options.txt /*'cpo'*
'cpoptions' options.txt /*'cpoptions'*
'cpp' options.txt /*'cpp'*
@@ -216,9 +220,11 @@ $quote eval.txt /*$quote*
'delcombine' options.txt /*'delcombine'*
'dex' options.txt /*'dex'*
'dg' options.txt /*'dg'*
'dia' options.txt /*'dia'*
'dict' options.txt /*'dict'*
'dictionary' options.txt /*'dictionary'*
'diff' options.txt /*'diff'*
'diffanchors' options.txt /*'diffanchors'*
'diffexpr' options.txt /*'diffexpr'*
'diffopt' options.txt /*'diffopt'*
'digraph' options.txt /*'digraph'*
@@ -442,6 +448,8 @@ $quote eval.txt /*$quote*
'infercase' options.txt /*'infercase'*
'insertmode' options.txt /*'insertmode'*
'is' options.txt /*'is'*
'ise' options.txt /*'ise'*
'isexpand' options.txt /*'isexpand'*
'isf' options.txt /*'isf'*
'isfname' options.txt /*'isfname'*
'isi' options.txt /*'isi'*
@@ -471,6 +479,8 @@ $quote eval.txt /*$quote*
'lazyredraw' options.txt /*'lazyredraw'*
'lbr' options.txt /*'lbr'*
'lcs' options.txt /*'lcs'*
'lhi' options.txt /*'lhi'*
'lhistory' options.txt /*'lhistory'*
'linebreak' options.txt /*'linebreak'*
'lines' options.txt /*'lines'*
'linespace' options.txt /*'linespace'*
@@ -509,6 +519,7 @@ $quote eval.txt /*$quote*
'maxmem' options.txt /*'maxmem'*
'maxmempattern' options.txt /*'maxmempattern'*
'maxmemtot' options.txt /*'maxmemtot'*
'maxsearchcount' options.txt /*'maxsearchcount'*
'mco' options.txt /*'mco'*
'mef' options.txt /*'mef'*
'menc' options.txt /*'menc'*
@@ -549,6 +560,7 @@ $quote eval.txt /*$quote*
'mousetime' options.txt /*'mousetime'*
'mp' options.txt /*'mp'*
'mps' options.txt /*'mps'*
'msc' options.txt /*'msc'*
'msm' options.txt /*'msm'*
'mzq' options.txt /*'mzq'*
'mzquantum' options.txt /*'mzquantum'*
@@ -815,6 +827,7 @@ $quote eval.txt /*$quote*
'nowinfixheight' options.txt /*'nowinfixheight'*
'nowinfixwidth' options.txt /*'nowinfixwidth'*
'nowiv' options.txt /*'nowiv'*
'nowlsteal' options.txt /*'nowlsteal'*
'nowmnu' options.txt /*'nowmnu'*
'nowrap' options.txt /*'nowrap'*
'nowrapscan' options.txt /*'nowrapscan'*
@@ -822,6 +835,7 @@ $quote eval.txt /*$quote*
'nowriteany' options.txt /*'nowriteany'*
'nowritebackup' options.txt /*'nowritebackup'*
'nows' options.txt /*'nows'*
'nowst' options.txt /*'nowst'*
'noxtermcodes' options.txt /*'noxtermcodes'*
'nrformats' options.txt /*'nrformats'*
'nu' options.txt /*'nu'*
@@ -971,6 +985,7 @@ $quote eval.txt /*$quote*
'showmatch' options.txt /*'showmatch'*
'showmode' options.txt /*'showmode'*
'showtabline' options.txt /*'showtabline'*
'showtabpanel' options.txt /*'showtabpanel'*
'shq' options.txt /*'shq'*
'si' options.txt /*'si'*
'sidescroll' options.txt /*'sidescroll'*
@@ -1024,6 +1039,7 @@ $quote eval.txt /*$quote*
'statusline' options.txt /*'statusline'*
'stl' options.txt /*'stl'*
'stmp' options.txt /*'stmp'*
'stpl' options.txt /*'stpl'*
'sts' options.txt /*'sts'*
'su' options.txt /*'su'*
'sua' options.txt /*'sua'*
@@ -1195,6 +1211,8 @@ $quote eval.txt /*$quote*
'tabclose' options.txt /*'tabclose'*
'tabline' options.txt /*'tabline'*
'tabpagemax' options.txt /*'tabpagemax'*
'tabpanel' options.txt /*'tabpanel'*
'tabpanelopt' options.txt /*'tabpanelopt'*
'tabstop' options.txt /*'tabstop'*
'tag' options.txt /*'tag'*
'tagbsearch' options.txt /*'tagbsearch'*
@@ -1245,6 +1263,8 @@ $quote eval.txt /*$quote*
'toolbar' options.txt /*'toolbar'*
'toolbariconsize' options.txt /*'toolbariconsize'*
'top' options.txt /*'top'*
'tpl' options.txt /*'tpl'*
'tplo' options.txt /*'tplo'*
'tpm' options.txt /*'tpm'*
'tr' options.txt /*'tr'*
'transp' options.txt /*'transp'*
@@ -1313,6 +1333,7 @@ $quote eval.txt /*$quote*
'wcr' options.txt /*'wcr'*
'wd' options.txt /*'wd'*
'weirdinvert' options.txt /*'weirdinvert'*
'wfb' options.txt /*'wfb'*
'wfh' options.txt /*'wfh'*
'wfw' options.txt /*'wfw'*
'wh' options.txt /*'wh'*
@@ -1341,6 +1362,9 @@ $quote eval.txt /*$quote*
'winwidth' options.txt /*'winwidth'*
'wiv' options.txt /*'wiv'*
'wiw' options.txt /*'wiw'*
'wlseat' options.txt /*'wlseat'*
'wlsteal' options.txt /*'wlsteal'*
'wltimeoutlen' options.txt /*'wltimeoutlen'*
'wm' options.txt /*'wm'*
'wmh' options.txt /*'wmh'*
'wmnu' options.txt /*'wmnu'*
@@ -1354,6 +1378,9 @@ $quote eval.txt /*$quote*
'writebackup' options.txt /*'writebackup'*
'writedelay' options.txt /*'writedelay'*
'ws' options.txt /*'ws'*
'wse' options.txt /*'wse'*
'wst' options.txt /*'wst'*
'wtm' options.txt /*'wtm'*
'ww' options.txt /*'ww'*
'xtermcodes' options.txt /*'xtermcodes'*
'{ motion.txt /*'{*
@@ -1494,6 +1521,7 @@ $quote eval.txt /*$quote*
+sun_workshop various.txt /*+sun_workshop*
+syntax various.txt /*+syntax*
+system() various.txt /*+system()*
+tabpanel various.txt /*+tabpanel*
+tag_any_white various.txt /*+tag_any_white*
+tag_binary various.txt /*+tag_binary*
+tag_old_static various.txt /*+tag_old_static*
@@ -1521,6 +1549,8 @@ $quote eval.txt /*$quote*
+visualextra various.txt /*+visualextra*
+vreplace various.txt /*+vreplace*
+vtp various.txt /*+vtp*
+wayland various.txt /*+wayland*
+wayland_clipboard various.txt /*+wayland_clipboard*
+wildignore various.txt /*+wildignore*
+wildmenu various.txt /*+wildmenu*
+windows various.txt /*+windows*
@@ -1591,6 +1621,7 @@ $quote eval.txt /*$quote*
-V starting.txt /*-V*
-W starting.txt /*-W*
-X starting.txt /*-X*
-Y starting.txt /*-Y*
-Z starting.txt /*-Z*
-b starting.txt /*-b*
-background gui_x11.txt /*-background*
@@ -1811,6 +1842,7 @@ $quote eval.txt /*$quote*
/\{- pattern.txt /*\/\\{-*
/\~ pattern.txt /*\/\\~*
/^ pattern.txt /*\/^*
/_<Tab> cmdline.txt /*\/_<Tab>*
/_CTRL-G cmdline.txt /*\/_CTRL-G*
/_CTRL-L cmdline.txt /*\/_CTRL-L*
/_CTRL-T cmdline.txt /*\/_CTRL-T*
@@ -2211,6 +2243,7 @@ $quote eval.txt /*$quote*
:TermdebugCommand terminal.txt /*:TermdebugCommand*
:Texplore pi_netrw.txt /*:Texplore*
:Tutor pi_tutor.txt /*:Tutor*
:URLOpen eval.txt /*:URLOpen*
:Until terminal.txt /*:Until*
:Up terminal.txt /*:Up*
:UseVimball pi_vimball.txt /*:UseVimball*
@@ -2412,6 +2445,8 @@ $quote eval.txt /*$quote*
:clast quickfix.txt /*:clast*
:cle motion.txt /*:cle*
:clearjumps motion.txt /*:clearjumps*
:clip various.txt /*:clip*
:clipreset various.txt /*:clipreset*
:clist quickfix.txt /*:clist*
:clo windows.txt /*:clo*
:close windows.txt /*:close*
@@ -3161,6 +3196,8 @@ $quote eval.txt /*$quote*
:redrawstatus various.txt /*:redrawstatus*
:redrawt various.txt /*:redrawt*
:redrawtabline various.txt /*:redrawtabline*
:redrawtabp various.txt /*:redrawtabp*
:redrawtabpanel various.txt /*:redrawtabpanel*
:reg change.txt /*:reg*
:registers change.txt /*:registers*
:res windows.txt /*:res*
@@ -3341,6 +3378,9 @@ $quote eval.txt /*$quote*
:so repeat.txt /*:so*
:sor change.txt /*:sor*
:sort change.txt /*:sort*
:sort-l change.txt /*:sort-l*
:sort-u change.txt /*:sort-u*
:sort-uniq change.txt /*:sort-uniq*
:source repeat.txt /*:source*
:source! repeat.txt /*:source!*
:source-range repeat.txt /*:source-range*
@@ -3575,6 +3615,8 @@ $quote eval.txt /*$quote*
:undolist undo.txt /*:undolist*
:unh windows.txt /*:unh*
:unhide windows.txt /*:unhide*
:uni change.txt /*:uni*
:uniq change.txt /*:uniq*
:unl eval.txt /*:unl*
:unlet eval.txt /*:unlet*
:unlet-$ eval.txt /*:unlet-$*
@@ -3657,6 +3699,8 @@ $quote eval.txt /*$quote*
:winp gui.txt /*:winp*
:winpos gui.txt /*:winpos*
:winsize gui.txt /*:winsize*
:wl wayland.txt /*:wl*
:wlrestore wayland.txt /*:wlrestore*
:wn editing.txt /*:wn*
:wnext editing.txt /*:wnext*
:wp editing.txt /*:wp*
@@ -3994,6 +4038,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*
@@ -4127,6 +4173,7 @@ Cmdline-mode cmdline.txt /*Cmdline-mode*
CmdlineChanged autocmd.txt /*CmdlineChanged*
CmdlineEnter autocmd.txt /*CmdlineEnter*
CmdlineLeave autocmd.txt /*CmdlineLeave*
CmdlineLeavePre autocmd.txt /*CmdlineLeavePre*
CmdwinEnter autocmd.txt /*CmdwinEnter*
CmdwinLeave autocmd.txt /*CmdwinLeave*
ColorScheme autocmd.txt /*ColorScheme*
@@ -4621,6 +4668,9 @@ 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*
E144 various.txt /*E144*
E145 starting.txt /*E145*
E146 change.txt /*E146*
@@ -4674,8 +4724,23 @@ E1538 eval.txt /*E1538*
E1539 vim9.txt /*E1539*
E154 helphelp.txt /*E154*
E1540 eval.txt /*E1540*
E1541 vi_diff.txt /*E1541*
E1547 various.txt /*E1547*
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*
@@ -5780,6 +5845,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*
@@ -6221,6 +6287,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*
@@ -6666,7 +6735,9 @@ cmd-movement gui_mac.txt /*cmd-movement*
cmd-shortcuts gui_mac.txt /*cmd-shortcuts*
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*
@@ -6738,7 +6809,9 @@ compl-generic insert.txt /*compl-generic*
compl-keyword insert.txt /*compl-keyword*
compl-omni insert.txt /*compl-omni*
compl-omni-filetypes insert.txt /*compl-omni-filetypes*
compl-register-words insert.txt /*compl-register-words*
compl-spelling insert.txt /*compl-spelling*
compl-states insert.txt /*compl-states*
compl-stop insert.txt /*compl-stop*
compl-tag insert.txt /*compl-tag*
compl-thesaurus insert.txt /*compl-thesaurus*
@@ -6759,6 +6832,7 @@ complete_add() builtin.txt /*complete_add()*
complete_check() builtin.txt /*complete_check()*
complete_info() builtin.txt /*complete_info()*
complete_info_mode builtin.txt /*complete_info_mode*
complete_match() builtin.txt /*complete_match()*
completed_item-variable eval.txt /*completed_item-variable*
completion-functions usr_41.txt /*completion-functions*
complex-change change.txt /*complex-change*
@@ -6851,6 +6925,7 @@ cpo-x options.txt /*cpo-x*
cpo-y options.txt /*cpo-y*
cpo-z options.txt /*cpo-z*
cpo-{ options.txt /*cpo-{*
cpo-~ options.txt /*cpo-~*
cpp.vim syntax.txt /*cpp.vim*
crash-recovery recover.txt /*crash-recovery*
creating-menus gui.txt /*creating-menus*
@@ -6944,6 +7019,7 @@ debugger-support debugger.txt /*debugger-support*
debugger.txt debugger.txt /*debugger.txt*
dec-mouse options.txt /*dec-mouse*
decada_members ft_ada.txt /*decada_members*
deduplicating change.txt /*deduplicating*
deepcopy() builtin.txt /*deepcopy()*
default-constructor vim9class.txt /*default-constructor*
defaults.vim starting.txt /*defaults.vim*
@@ -6987,6 +7063,7 @@ dict-modification eval.txt /*dict-modification*
did_filetype() builtin.txt /*did_filetype()*
diff diff.txt /*diff*
diff() builtin.txt /*diff()*
diff-anchors diff.txt /*diff-anchors*
diff-diffexpr diff.txt /*diff-diffexpr*
diff-func-examples diff.txt /*diff-func-examples*
diff-mode diff.txt /*diff-mode*
@@ -7487,14 +7564,17 @@ ft-fvwm-syntax syntax.txt /*ft-fvwm-syntax*
ft-gdscript-plugin filetype.txt /*ft-gdscript-plugin*
ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin*
ft-gitrebase-plugin filetype.txt /*ft-gitrebase-plugin*
ft-gleam-plugin filetype.txt /*ft-gleam-plugin*
ft-go-plugin filetype.txt /*ft-go-plugin*
ft-gprof-plugin filetype.txt /*ft-gprof-plugin*
ft-groff-syntax syntax.txt /*ft-groff-syntax*
ft-gsp-syntax syntax.txt /*ft-gsp-syntax*
ft-hare filetype.txt /*ft-hare*
ft-haskell-syntax syntax.txt /*ft-haskell-syntax*
ft-help-omni helphelp.txt /*ft-help-omni*
ft-html-indent indent.txt /*ft-html-indent*
ft-html-omni insert.txt /*ft-html-omni*
ft-html-plugin filetype.txt /*ft-html-plugin*
ft-html-syntax syntax.txt /*ft-html-syntax*
ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax*
ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
@@ -7528,6 +7608,7 @@ ft-markdown-syntax syntax.txt /*ft-markdown-syntax*
ft-masm-syntax syntax.txt /*ft-masm-syntax*
ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
ft-matlab-indent indent.txt /*ft-matlab-indent*
ft-mbsync-syntax syntax.txt /*ft-mbsync-syntax*
ft-mediawiki-syntax syntax.txt /*ft-mediawiki-syntax*
ft-metafont ft_mp.txt /*ft-metafont*
ft-metafont-intro ft_mp.txt /*ft-metafont-intro*
@@ -7625,6 +7706,7 @@ ft-xml-omni insert.txt /*ft-xml-omni*
ft-xml-syntax syntax.txt /*ft-xml-syntax*
ft-xpm-syntax syntax.txt /*ft-xpm-syntax*
ft-yaml-indent indent.txt /*ft-yaml-indent*
ft-yaml-plugin filetype.txt /*ft-yaml-plugin*
ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
ft-zig-plugin filetype.txt /*ft-zig-plugin*
ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin*
@@ -7677,6 +7759,7 @@ g:Netrw_corehandler pi_netrw.txt /*g:Netrw_corehandler*
g:Netrw_funcref pi_netrw.txt /*g:Netrw_funcref*
g:Openprg eval.txt /*g:Openprg*
g:actual_curbuf options.txt /*g:actual_curbuf*
g:actual_curtabpage options.txt /*g:actual_curtabpage*
g:actual_curwin options.txt /*g:actual_curwin*
g:ada#Comment ft_ada.txt /*g:ada#Comment*
g:ada#Ctags_Kinds ft_ada.txt /*g:ada#Ctags_Kinds*
@@ -7797,7 +7880,6 @@ g:netrw_dav_cmd pi_netrw.txt /*g:netrw_dav_cmd*
g:netrw_decompress pi_netrw.txt /*g:netrw_decompress*
g:netrw_dirhistmax pi_netrw.txt /*g:netrw_dirhistmax*
g:netrw_dynamic_maxfilenamelen pi_netrw.txt /*g:netrw_dynamic_maxfilenamelen*
g:netrw_errorlvl pi_netrw.txt /*g:netrw_errorlvl*
g:netrw_fastbrowse pi_netrw.txt /*g:netrw_fastbrowse*
g:netrw_fetch_cmd pi_netrw.txt /*g:netrw_fetch_cmd*
g:netrw_ffkeep pi_netrw.txt /*g:netrw_ffkeep*
@@ -7837,7 +7919,6 @@ g:netrw_maxfilenamelen pi_netrw.txt /*g:netrw_maxfilenamelen*
g:netrw_menu pi_netrw.txt /*g:netrw_menu*
g:netrw_mkdir_cmd pi_netrw.txt /*g:netrw_mkdir_cmd*
g:netrw_mousemaps pi_netrw.txt /*g:netrw_mousemaps*
g:netrw_nobeval pi_netrw.txt /*g:netrw_nobeval*
g:netrw_preview pi_netrw.txt /*g:netrw_preview*
g:netrw_rcp_cmd pi_netrw.txt /*g:netrw_rcp_cmd*
g:netrw_remote_mkdir pi_netrw.txt /*g:netrw_remote_mkdir*
@@ -7866,7 +7947,6 @@ g:netrw_sshport pi_netrw.txt /*g:netrw_sshport*
g:netrw_timefmt pi_netrw.txt /*g:netrw_timefmt*
g:netrw_tmpfile_escape pi_netrw.txt /*g:netrw_tmpfile_escape*
g:netrw_uid pi_netrw.txt /*g:netrw_uid*
g:netrw_use_errorwindow pi_netrw.txt /*g:netrw_use_errorwindow*
g:netrw_use_noswf pi_netrw.txt /*g:netrw_use_noswf*
g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp*
g:netrw_usetab pi_netrw.txt /*g:netrw_usetab*
@@ -7898,8 +7978,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*
@@ -7909,7 +7991,6 @@ g:tar_copycmd pi_tar.txt /*g:tar_copycmd*
g:tar_extractcmd pi_tar.txt /*g:tar_extractcmd*
g:tar_nomax pi_tar.txt /*g:tar_nomax*
g:tar_readoptions pi_tar.txt /*g:tar_readoptions*
g:tar_secure pi_tar.txt /*g:tar_secure*
g:tar_writeoptions pi_tar.txt /*g:tar_writeoptions*
g:termdebug_config terminal.txt /*g:termdebug_config*
g:termdebugger terminal.txt /*g:termdebugger*
@@ -8002,6 +8083,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*
@@ -8030,6 +8114,7 @@ getcmdscreenpos() builtin.txt /*getcmdscreenpos()*
getcmdtype() builtin.txt /*getcmdtype()*
getcmdwintype() builtin.txt /*getcmdwintype()*
getcompletion() builtin.txt /*getcompletion()*
getcompletiontype() builtin.txt /*getcompletiontype()*
getcurpos() builtin.txt /*getcurpos()*
getcursorcharpos() builtin.txt /*getcursorcharpos()*
getcwd() builtin.txt /*getcwd()*
@@ -8366,6 +8451,9 @@ hl-TOhtmlProgress syntax.txt /*hl-TOhtmlProgress*
hl-TabLine syntax.txt /*hl-TabLine*
hl-TabLineFill syntax.txt /*hl-TabLineFill*
hl-TabLineSel syntax.txt /*hl-TabLineSel*
hl-TabPanel syntax.txt /*hl-TabPanel*
hl-TabPanelFill syntax.txt /*hl-TabPanelFill*
hl-TabPanelSel syntax.txt /*hl-TabPanelSel*
hl-Terminal syntax.txt /*hl-Terminal*
hl-Title syntax.txt /*hl-Title*
hl-ToolbarButton gui.txt /*hl-ToolbarButton*
@@ -8505,6 +8593,7 @@ i_CTRL-X_CTRL-L insert.txt /*i_CTRL-X_CTRL-L*
i_CTRL-X_CTRL-N insert.txt /*i_CTRL-X_CTRL-N*
i_CTRL-X_CTRL-O insert.txt /*i_CTRL-X_CTRL-O*
i_CTRL-X_CTRL-P insert.txt /*i_CTRL-X_CTRL-P*
i_CTRL-X_CTRL-R insert.txt /*i_CTRL-X_CTRL-R*
i_CTRL-X_CTRL-S insert.txt /*i_CTRL-X_CTRL-S*
i_CTRL-X_CTRL-T insert.txt /*i_CTRL-X_CTRL-T*
i_CTRL-X_CTRL-U insert.txt /*i_CTRL-X_CTRL-U*
@@ -8567,7 +8656,6 @@ improvements-6 version6.txt /*improvements-6*
improvements-7 version7.txt /*improvements-7*
improvements-8 version8.txt /*improvements-8*
improvements-9 version9.txt /*improvements-9*
improvements-9.2 version9.txt /*improvements-9.2*
in_bot channel.txt /*in_bot*
in_buf channel.txt /*in_buf*
in_io-buffer channel.txt /*in_io-buffer*
@@ -8658,6 +8746,7 @@ i} motion.txt /*i}*
j motion.txt /*j*
java-cinoptions indent.txt /*java-cinoptions*
java-indenting indent.txt /*java-indenting*
java-package-info-url syntax.txt /*java-package-info-url*
java.vim syntax.txt /*java.vim*
javascript-cinoptions indent.txt /*javascript-cinoptions*
javascript-indenting indent.txt /*javascript-indenting*
@@ -8698,7 +8787,6 @@ jsbterm-mouse options.txt /*jsbterm-mouse*
json.vim syntax.txt /*json.vim*
json_decode() builtin.txt /*json_decode()*
json_encode() builtin.txt /*json_encode()*
jtags tagsrch.txt /*jtags*
jump-motions motion.txt /*jump-motions*
jumplist motion.txt /*jumplist*
jumplist-stack motion.txt /*jumplist-stack*
@@ -9014,6 +9102,7 @@ matlab-indent indent.txt /*matlab-indent*
matlab-indenting indent.txt /*matlab-indenting*
max() builtin.txt /*max()*
maxcol-variable eval.txt /*maxcol-variable*
mbsync.vim syntax.txt /*mbsync.vim*
mbyte-IME mbyte.txt /*mbyte-IME*
mbyte-XIM mbyte.txt /*mbyte-XIM*
mbyte-combining mbyte.txt /*mbyte-combining*
@@ -9348,7 +9437,6 @@ netrw-rightmouse pi_netrw.txt /*netrw-rightmouse*
netrw-s pi_netrw.txt /*netrw-s*
netrw-s-cr pi_netrw.txt /*netrw-s-cr*
netrw-settings pi_netrw.txt /*netrw-settings*
netrw-settings-window pi_netrw.txt /*netrw-settings-window*
netrw-sexplore pi_netrw.txt /*netrw-sexplore*
netrw-sort pi_netrw.txt /*netrw-sort*
netrw-sort-sequence pi_netrw.txt /*netrw-sort-sequence*
@@ -9618,6 +9706,7 @@ package-hlyank usr_05.txt /*package-hlyank*
package-justify usr_25.txt /*package-justify*
package-matchit usr_05.txt /*package-matchit*
package-nohlsearch usr_05.txt /*package-nohlsearch*
package-open eval.txt /*package-open*
package-termdebug terminal.txt /*package-termdebug*
package-translate_example repeat.txt /*package-translate_example*
package-translation repeat.txt /*package-translation*
@@ -9936,6 +10025,7 @@ quickfix-pandoc quickfix.txt /*quickfix-pandoc*
quickfix-parse quickfix.txt /*quickfix-parse*
quickfix-perl quickfix.txt /*quickfix-perl*
quickfix-size quickfix.txt /*quickfix-size*
quickfix-stack quickfix.txt /*quickfix-stack*
quickfix-title quickfix.txt /*quickfix-title*
quickfix-valid quickfix.txt /*quickfix-valid*
quickfix-window quickfix.txt /*quickfix-window*
@@ -10168,6 +10258,7 @@ search() builtin.txt /*search()*
search()-sub-match builtin.txt /*search()-sub-match*
search-commands pattern.txt /*search-commands*
search-offset pattern.txt /*search-offset*
search-options pattern.txt /*search-options*
search-pattern pattern.txt /*search-pattern*
search-range pattern.txt /*search-range*
search-replace change.txt /*search-replace*
@@ -10216,6 +10307,7 @@ settagstack() builtin.txt /*settagstack()*
setting-guifont gui.txt /*setting-guifont*
setting-guitablabel tabpage.txt /*setting-guitablabel*
setting-tabline tabpage.txt /*setting-tabline*
setting-tabpanel tabpage.txt /*setting-tabpanel*
setuid change.txt /*setuid*
setwinvar() builtin.txt /*setwinvar()*
sftp pi_netrw.txt /*sftp*
@@ -10510,7 +10602,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*
@@ -10807,6 +10898,7 @@ tabpage.txt tabpage.txt /*tabpage.txt*
tabpagebuflist() builtin.txt /*tabpagebuflist()*
tabpagenr() builtin.txt /*tabpagenr()*
tabpagewinnr() builtin.txt /*tabpagewinnr()*
tabpanel tabpage.txt /*tabpanel*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
tag-binary-search tagsrch.txt /*tag-binary-search*
@@ -10843,6 +10935,7 @@ tar-contents pi_tar.txt /*tar-contents*
tar-copyright pi_tar.txt /*tar-copyright*
tar-history pi_tar.txt /*tar-history*
tar-manual pi_tar.txt /*tar-manual*
tar-mappings pi_tar.txt /*tar-mappings*
tar-options pi_tar.txt /*tar-options*
tar-usage pi_tar.txt /*tar-usage*
tcl if_tcl.txt /*tcl*
@@ -11108,6 +11201,7 @@ tuple-concatenation eval.txt /*tuple-concatenation*
tuple-functions usr_41.txt /*tuple-functions*
tuple-identity eval.txt /*tuple-identity*
tuple-index eval.txt /*tuple-index*
tuple-modification eval.txt /*tuple-modification*
tuple-type vim9.txt /*tuple-type*
tuple2list() builtin.txt /*tuple2list()*
tutor usr_01.txt /*tutor*
@@ -11117,6 +11211,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*
@@ -11148,6 +11243,7 @@ undofile() builtin.txt /*undofile()*
undotree() builtin.txt /*undotree()*
unicode mbyte.txt /*unicode*
uniq() builtin.txt /*uniq()*
unique change.txt /*unique*
unix os_unix.txt /*unix*
unlisted-buffer windows.txt /*unlisted-buffer*
up-down-motions motion.txt /*up-down-motions*
@@ -11221,6 +11317,7 @@ v:beval_winnr eval.txt /*v:beval_winnr*
v:char eval.txt /*v:char*
v:charconvert_from eval.txt /*v:charconvert_from*
v:charconvert_to eval.txt /*v:charconvert_to*
v:clipmethod eval.txt /*v:clipmethod*
v:cmdarg eval.txt /*v:cmdarg*
v:cmdbang eval.txt /*v:cmdbang*
v:collate eval.txt /*v:collate*
@@ -11325,6 +11422,7 @@ v:version eval.txt /*v:version*
v:versionlong eval.txt /*v:versionlong*
v:vim_did_enter eval.txt /*v:vim_did_enter*
v:warningmsg eval.txt /*v:warningmsg*
v:wayland_display eval.txt /*v:wayland_display*
v:windowid eval.txt /*v:windowid*
v_! change.txt /*v_!*
v_$ visual.txt /*v_$*
@@ -11537,6 +11635,7 @@ vim-modes-intro intro.txt /*vim-modes-intro*
vim-raku ft_raku.txt /*vim-raku*
vim-script-intro usr_41.txt /*vim-script-intro*
vim-script-library eval.txt /*vim-script-library*
vim-script-notation usr_41.txt /*vim-script-notation*
vim-security intro.txt /*vim-security*
vim-shebang various.txt /*vim-shebang*
vim-tutor-create pi_tutor.txt /*vim-tutor-create*
@@ -11683,6 +11782,17 @@ w:quickfix_title quickfix.txt /*w:quickfix_title*
w:var eval.txt /*w:var*
waittime channel.txt /*waittime*
warningmsg-variable eval.txt /*warningmsg-variable*
wayland wayland.txt /*wayland*
wayland-and-x11 wayland.txt /*wayland-and-x11*
wayland-focus-steal wayland.txt /*wayland-focus-steal*
wayland-gnome wayland.txt /*wayland-gnome*
wayland-gui wayland.txt /*wayland-gui*
wayland-persist wayland.txt /*wayland-persist*
wayland-primary-selection wayland.txt /*wayland-primary-selection*
wayland-seat wayland.txt /*wayland-seat*
wayland-selections wayland.txt /*wayland-selections*
wayland-useful wayland.txt /*wayland-useful*
wayland.txt wayland.txt /*wayland.txt*
wdl-syntax syntax.txt /*wdl-syntax*
wdl.vim syntax.txt /*wdl.vim*
white-space pattern.txt /*white-space*
@@ -11690,6 +11800,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*

View File

@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 9.1. Last change: 2024 Aug 01
*tagsrch.txt* For Vim version 9.1. Last change: 2025 May 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -526,7 +526,7 @@ directory where the tag file is.
==============================================================================
5. Tags file format *tags-file-format* *E431*
*ctags* *jtags*
*ctags*
A tags file can be created with an external command, for example "ctags". It
will contain a tag for each function. Some versions of "ctags" will also make
a tag for each "#defined" macro, typedefs, enums, etc.
@@ -542,13 +542,11 @@ exuberant ctags This is a very good one. It works for C, C++, Java,
many items. See http://ctags.sourceforge.net.
No new version since 2009.
etags Connected to Emacs. Supports many languages.
JTags For Java, in Java. It can be found at
http://www.fleiner.com/jtags/.
|:helptags| For Vim's |help| files
ptags.py For Python, in Python. Found in your Python source
directory at Tools/scripts/ptags.py.
ptags For Perl, in Perl. It can be found at (link seems
dead):
http://www.eleves.ens.fr:8080/home/nthiery/Tags/.
ptags For Perl, in Perl. It can be found at
https://metacpan.org/pod/Vim::Tag
gnatxref For Ada. See http://www.gnuada.org/. gnatxref is
part of the gnat package.
@@ -894,8 +892,8 @@ Common arguments for the commands above:
7. Using 'tagfunc' *tag-function*
It is possible to provide Vim with a function which will generate a list of
tags used for commands like |:tag|, |:tselect| and Normal mode tag commands
like |CTRL-]|.
tags used for commands like |:tag|, |:tselect|, Normal mode tag commands like
|CTRL-]| and for the |taglist()| function.
The function used for generating the taglist is specified by setting the
'tagfunc' option. The function will be called with three arguments:
@@ -914,7 +912,7 @@ Currently up to three flags may be passed to the tag function:
(mnemonic: the tag function may use the context around the
cursor to perform a better job of generating the tag list.)
'i' In Insert mode, the user was completing a tag (with
|i_CTRL-X_CTRL-]| or 'completeopt' contains `t`).
|i_CTRL-X_CTRL-]| or 'complete' contains "`t`" or "`]`").
'r' The first argument to tagfunc should be interpreted as a
|pattern| (see |tag-regexp|), such as when using: >
:tag /pat
@@ -950,15 +948,14 @@ It is not allowed to close a window or change window from inside 'tagfunc'.
The following is a hypothetical example of a function used for 'tagfunc'. It
uses the output of |taglist()| to generate the result: a list of tags in the
inverse order of file names.
>
function TagFunc(pattern, flags, info)
function CompareFilenames(item1, item2)
let f1 = a:item1['filename']
let f2 = a:item2['filename']
return f1 >=# f2 ?
\ -1 : f1 <=# f2 ? 1 : 0
endfunction
>vim
function CompareFilenames(item1, item2)
let f1 = a:item1['filename']
let f2 = a:item2['filename']
return f1 >=# f2 ? -1 : f1 <=# f2 ? 1 : 0
endfunction
function TagFunc(pattern, flags, info)
let result = taglist(a:pattern)
call sort(result, "CompareFilenames")
@@ -966,5 +963,7 @@ inverse order of file names.
endfunc
set tagfunc=TagFunc
<
Note: When executing |taglist()| the 'tagfunc' function won't be called
recursively.
vim:tw=78:ts=8:noet:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 22
*terminal.txt* For Vim version 9.1. Last change: 2025 Jul 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1711,6 +1711,9 @@ than 99 will be displayed as "9+".
If you want to customize the breakpoint signs to show `>>` in the signcolumn: >
let g:termdebug_config['sign'] = '>>'
You can also specify individual signs for the first several breakpoints: >
let g:termdebug_config['signs'] = ['>1', '>2', '>3', '>4', '>5', '>6', '>7', '>8', '>9']
let g:termdebug_config['sign'] = '>>'
If you would like to use decimal (base 10) breakpoint signs: >
let g:termdebug_config['sign_decimal'] = 1
If the variable g:termdebug_config does not yet exist, you can use: >

View File

@@ -1,4 +1,4 @@
*todo.txt* For Vim version 9.1. Last change: 2025 Mar 27
*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?
@@ -2202,8 +2201,6 @@ displayed in a window should return the value that's stored for that buffer.
":he ctrl_u" can be auto-corrected to ":he ctrl-u".
Diff mode out of sync. (Gary Johnson, 2010 Aug 4)
Win32: completion of file name ":e c:\!test" results in ":e c:\\!test", which
does not work. (Nieko Maatjes, 2009 Jan 8, Ingo Karkat, 2009 Jan 22)
@@ -4702,8 +4699,6 @@ Autocommands:
Omni completion:
- Add a flag to 'complete' to be able to do omni completion with CTRL-N (and
mix it with other kinds of completion).
- Ideas from the Vim 7 BOF at SANE:
- For interpreted languages, use the interpreter to obtain information.
Should work for Java (Eclipse does this), Python, Tcl, etc.
@@ -4749,20 +4744,10 @@ Insert mode completion/expansion:
7 When expanding file names with an environment variable, add the match with
the unexpanded var. So $HOME/tm expands to "/home/guy/tmp" and
"$HOME/tmp"
8 When there is no word before the cursor but something like "sys." complete
with "sys.". Works well for C and similar languages.
9 ^X^L completion doesn't repeat correctly. It uses the first match with
the last added line, instead of continuing where the last match ended.
(Webb)
8 Add option to set different behavior for Insert mode completion:
- ignore/match case
- different characters than 'iskeyword'
8 Add option 'isexpand', containing characters when doing expansion (so that
"." and "\" can be included, without changing 'iskeyword'). (Goldfarb)
Also: 'istagword': characters used for CTRL-].
When 'isexpand' or 'istagword' are empty, use 'iskeyword'.
Alternative: Use a pattern so that start and end of a keyword can be
defined, only allow dash in the middle, etc.
8 Add option 'istagword': characters used for CTRL-]. like 'isexpand'
8 Add a command to undo the completion, go back to the original text.
7 Completion of an abbreviation: Can leave letters out, like what Instant
text does: www.textware.com
@@ -4774,7 +4759,6 @@ Insert mode completion/expansion:
7 When expanding $HOME/dir with ^X^F keep the $HOME (with an option?).
7 Add CTRL-X command in Insert mode like CTRL-X CTRL-N, that completes WORDS
instead of words.
8 Add CTRL-X CTRL-R: complete words from register contents.
8 Add completion of previously inserted texts (like what CTRL-A does).
Requires remembering a number of insertions.
8 Add 'f' flag to 'complete': Expand file names.

View File

@@ -1,4 +1,4 @@
*uganda.txt* For Vim version 9.1. Last change: 2024 Aug 14
*uganda.txt* For Vim version 9.1. Last change: 2025 Jul 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -21,6 +21,13 @@ Uganda anyway.
The Open Publication License applies to the Vim documentation, see
|manual-copyright|.
The icons used for the toolbar in the Win32 GUI are from the "Farm-Fresh Web
Icons" set. These icons are licensed under the Creative Commons Attribution
3.0 License and were created by FatCow Web Hosting. They were previously
available at http://www.fatcow.com/free-icons and are still available at:
https://www.iconarchive.com/show/farm-fresh-icons-by-fatcow.1.html
=== begin of license ===
VIM LICENSE
@@ -127,6 +134,9 @@ Note:
contact information with the "--with-modified-by" configure argument or the
MODIFIED_BY define.
- This license applies to the source code of Vim. However, different license
conditions may apply to some runtime files included with Vim; these will be
specified in the header of each respective file.
==============================================================================
Kibaale Children's Centre *kcc* *Kibaale* *charity*

View File

@@ -1,4 +1,4 @@
*usr_02.txt* For Vim version 9.1. Last change: 2025 Feb 01
*usr_02.txt* For Vim version 9.1. Last change: 2025 Jun 03
VIM USER MANUAL - by Bram Moolenaar
@@ -438,9 +438,9 @@ of the tag given by the word under the cursor.)
After a few jumps, you might want to go back. CTRL-T (pop tag) takes you
back to the preceding position. CTRL-O (jump to older position) also works
nicely here.
At the top of the help screen, there is the notation *help.txt*. This name
between "*" characters is used by the help system to define a tag (hyperlink
destination).
At the top of the help screen, there is the notation "*help.txt*". This
name between "*" characters is used by the help system to define a tag
(hyperlink destination).
See |29.1| for details about using tags.
To get help on a given subject, use the following command: >

View File

@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 9.1. Last change: 2025 Mar 22
*usr_05.txt* For Vim version 9.1. Last change: 2025 Apr 10
VIM USER MANUAL - by Bram Moolenaar
@@ -307,23 +307,27 @@ This switches on three very clever mechanisms:
filetypes. See |:filetype-indent-on| and 'indentexpr'.
*restore-cursor* *last-position-jump* >
*restore-cursor* *last-position-jump* >vim
augroup RestoreCursor
autocmd!
autocmd BufReadPost *
\ let line = line("'\"")
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
\ && index(['xxd', 'gitrebase'], &filetype) == -1
\ && !&diff
\ | execute "normal! g`\""
\ | endif
augroup END
Another autocommand. This time it is used after reading any file. The
complicated stuff after it checks if the '" mark is defined, and jumps to it
if so. It doesn't do that for a commit or rebase message, which are likely
a different one than last time, and when using xxd(1) to filter and edit
binary files, which transforms input files back and forth, causing them to
have dual nature, so to speak. See also |using-xxd|.
if so. It doesn't do that when:
- editing a commit or rebase message, which are likely a different one than
last time,
- using xxd(1) to filter and edit binary files, which transforms input files
back and forth, causing them to have dual nature, so to speak (see also
|using-xxd|) and
- Vim is in diff mode
The backslash at the start of a line is used to continue the command from the
previous line. That avoids a line getting very long. See |line-continuation|.

View File

@@ -1,4 +1,4 @@
*usr_11.txt* For Vim version 9.1. Last change: 2020 Oct 25
*usr_11.txt* For Vim version 9.1. Last change: 2025 Jun 03
VIM USER MANUAL - by Bram Moolenaar
@@ -127,7 +127,7 @@ Example: >
vim -r .help.txt.swo
This is also handy when the swap file is in another directory than expected.
Vim recognizes files with the pattern *.s[uvw][a-z] as swap files.
Vim recognizes files with the pattern "*.s[uvw][a-z]" as swap files.
If this still does not work, see what file names Vim reports and rename the
files accordingly. Check the 'directory' option to see where Vim may have

View File

@@ -1,4 +1,4 @@
*usr_22.txt* For Vim version 9.1. Last change: 2024 Oct 05
*usr_22.txt* For Vim version 9.1. Last change: 2025 Jun 04
VIM USER MANUAL - by Bram Moolenaar
@@ -27,23 +27,25 @@ Vim has a plugin that makes it possible to edit a directory. Try this: >
:edit .
Through the magic of autocommands and Vim scripts, the window will be filled
with the contents of the directory. It looks like this:
with the contents of the directory. It looks like this (slightly cleaned up
so that it fits within 80 chars): >
" ============================================================================ ~
" Netrw Directory Listing (netrw v109) ~
" Sorted by name ~
" Sort sequence: [\/]$,\.h$,\.c$,\.cpp$,*,\.info$,\.swp$,\.o$\.obj$,\.bak$ ~
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec ~
" ============================================================================ ~
../ ~
./ ~
check/ ~
Makefile ~
autocmd.txt ~
change.txt ~
eval.txt ~
filetype.txt ~
help.txt.info ~
" ===========================================================================
" Netrw Directory Listing (netrw v180)
" /path/to/vim/runtime/doc
" Sorted by name
" Sort sequence: [\/]$,*,\(\.bak\|\~\|\.o\|\.h\|\.info\|\.swp\)[*@]\=$
" Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:special
" ===========================================================================
../
./
check/
Makefile
autocmd.txt
change.txt
eval.txt
filetype.txt
help.txt.info
You can see these items:

View File

@@ -1,4 +1,4 @@
*usr_24.txt* For Vim version 9.1. Last change: 2018 Mar 18
*usr_24.txt* For Vim version 9.1. Last change: 2025 Jun 22
VIM USER MANUAL - by Bram Moolenaar
@@ -187,6 +187,7 @@ with a certain type of item:
CTRL-X CTRL-D macro definitions (also in included files)
CTRL-X CTRL-I current and included files
CTRL-X CTRL-K words from a dictionary
CTRL-X CTRL-R contents from registers
CTRL-X CTRL-T words from a thesaurus
CTRL-X CTRL-] tags
CTRL-X CTRL-V Vim command line
@@ -567,14 +568,13 @@ that combination. Thus CTRL-K dP also works. Since there is no digraph for
using. Always use ":digraphs" to find out which digraphs are currently
available.
You can define your own digraphs. Example: >
You can define your own digraphs by specifying the target character with a
decimal number. Example: >
:digraph a" ä
:digraph a\" 228
This defines that CTRL-K a" inserts an ä character. You can also specify the
character with a decimal number. This defines the same digraph: >
:digraph a" 228
This defines that CTRL-K a" inserts an ä character. Note: we had to escape
the " character since otherwise it would act as a comment character.
More information about digraphs here: |digraphs|
Another way to insert special characters is with a keymap. More about that

View File

@@ -1,4 +1,4 @@
*usr_25.txt* For Vim version 9.1. Last change: 2025 Feb 01
*usr_25.txt* For Vim version 9.1. Last change: 2025 Jun 13
VIM USER MANUAL - by Bram Moolenaar
@@ -200,7 +200,7 @@ command: >vim
Or put this line in your |vimrc|: >vim
packadd! justify
:packadd! justify
This Vim script file defines a new visual command "_j". To justify a block of
text, highlight the text in Visual mode and then execute "_j".
@@ -215,27 +215,28 @@ An alternative is to filter the text through an external program. Example: >
*25.3* Indents and tabs
Indents can be used to make text stand out from the rest. The example texts
in this manual, for example, are indented by eight spaces or a tab. You would
normally enter this by typing a tab at the start of each line. Take this
in this manual, for example, are indented by eight columns. You would
normally enter this by typing <Tab> at the start of each line. Take this
text:
the first line ~
the second line ~
This is entered by typing a tab, some text, <Enter>, tab and more text.
This is entered by typing <Tab>, some text, <Enter>, <Tab> and more text.
The 'autoindent' option inserts indents automatically: >
:set autoindent
When a new line is started it gets the same indent as the previous line. In
the above example, the tab after the <Enter> is not needed anymore.
the above example, pressing the <Tab> key after <Enter> is not needed anymore.
INCREASING INDENT
To increase the amount of indent in a line, use the ">" operator. Often this
is used as ">>", which adds indent to the current line.
To increase the amount of indent in a line, use the ">" operator, in Normal
mode. Often this is used as ">>", which adds indent to the current line.
In Insert mode, use <C-t>.
The amount of indent added is specified with the 'shiftwidth' option. The
default value is 8. To make ">>" insert four spaces worth of indent, for
default value is 8. To make ">>" insert four columns worth of indent, for
example, type this: >
:set shiftwidth=4
@@ -248,46 +249,27 @@ When used on the second line of the example text, this is what you get:
"4>>" will increase the indent of four lines.
TABSTOP
SOFT TAB STOPS
If you want to make indents a multiple of 4, you set 'shiftwidth' to 4. But
when pressing a <Tab> you still get 8 spaces worth of indent. To change this,
set the 'softtabstop' option: >
when pressing a <Tab> you still get 8 columns worth of indent. To change
this, set the 'softtabstop' option: >
:set softtabstop=4
This will make the <Tab> key insert 4 spaces worth of indent. If there are
already four spaces, a <Tab> character is used (saving seven characters in the
file). (If you always want spaces and no tab characters, set the 'expandtab'
option.)
Vim now creates invisible tab stops for your cursor every 4 columns; hitting
<Tab> jumps to the next stop and inserts the exact mix of spaces or tabs
needed.
Note:
You could set the 'tabstop' option to 4. However, if you edit the
file another time, with 'tabstop' set to the default value of 8, it
will look wrong. In other programs and when printing the indent will
also be wrong. Therefore it is recommended to keep 'tabstop' at eight
all the time. That's the standard value everywhere.
all the time. That's the standard value everywhere on UNIX-like
systems.
CHANGING TABS
You edit a file which was written with a tabstop of 3. In Vim it looks ugly,
because it uses the normal tabstop value of 8. You can fix this by setting
'tabstop' to 3. But you have to do this every time you edit this file.
Vim can change the use of tabstops in your file. First, set 'tabstop' to
make the indents look good, then use the ":retab" command: >
:set tabstop=3
:retab 8
The ":retab" command will change 'tabstop' to 8, while changing the text such
that it looks the same. It changes spans of white space into tabs and spaces
for this. You can now write the file. Next time you edit it the indents will
be right without setting an option.
Warning: When using ":retab" on a program, it may change white space inside
a string constant. Therefore it's a good habit to use "\t" instead of a
real tab.
==============================================================================
*25.4* Dealing with long lines
@@ -576,6 +558,32 @@ The "gR" command uses Virtual Replace mode. This preserves the layout:
inp 0.786 0.534 0.693 ~
REFORMATTING TABS IN TABLES
You edit a file that contains tabular data and the original author of the file
decided to align the tabular data using tab characters (instead of spaces).
Alas, they were using tab stops separated by 4 columns and Vim's default
is 8 columns; the table looks wrong! What can be done?
To fix the appearance without modifying the file, adjust the setting
temporarily: >
:set tabstop=4
This updates the visual layout, but the file itself remains unchanged.
Another possibility is to permanently reformat the file. For this Vim
provides the |:retab| command. First, set 'tabstop' to match original layout
(as above), then run: >
:retab 8
The ":retab" command will change 'tabstop' to 8, while changing the text such
that it looks the same. It changes spans of white space into tabs and spaces
for this. You can now write the file.
Warning: When using ":retab" on a program, it may change white space inside
a string constant. Therefore it's a good habit to use "\t" instead of a
real tab.
==============================================================================
Next chapter: |usr_26.txt| Repeating

View File

@@ -1,4 +1,4 @@
*usr_27.txt* For Vim version 9.1. Last change: 2019 Jul 14
*usr_27.txt* For Vim version 9.1. Last change: 2025 Jul 06
VIM USER MANUAL - by Bram Moolenaar
@@ -8,6 +8,7 @@
In chapter 3 a few simple search patterns were mentioned |03.9|. Vim can do
much more complex searches. This chapter explains the most often used ones.
A detailed specification can be found here: |pattern|
Options affecting how search is done can be found here: |search-options|
|27.1| Ignoring case
|27.2| Wrapping around the file end

View File

@@ -1,4 +1,4 @@
*usr_30.txt* For Vim version 9.1. Last change: 2024 Apr 29
*usr_30.txt* For Vim version 9.1. Last change: 2025 Jun 10
VIM USER MANUAL - by Bram Moolenaar
@@ -409,108 +409,202 @@ the cursor is on "printf":
==============================================================================
*30.5* Tabs and spaces
'tabstop' is set to eight by default. Although you can change it, you quickly
run into trouble later. Other programs won't know what tabstop value you
used. They probably use the default value of eight, and your text suddenly
looks very different. Also, most printers use a fixed tabstop value of eight.
Thus it's best to keep 'tabstop' alone. (If you edit a file which was written
with a different tabstop setting, see |25.3| for how to fix that.)
For indenting lines in a program, using a multiple of eight spaces makes
A QUICK HISTORY OF THE RATIONALE BEHIND TABS
`vi` (the ancestor of Vim) was created by Bill Joy. At the time, he was using
a PDP-11 with limited memory and I/O operation capabilities. Back then, it
was common to optimize the size of source code with the following trick.
The ASCII table was first designed to remotely control teleprinters. When
control character 9 (the Horizontal Tab, caret notation: ^I) was sent to a
teleprinter, it would move the carriage to the next tab stop. Assuming tab
stops were separated by 8 columns (a typical standard), this means that a
single control character could produce the same visual effect as up to 8 space
characters. For example, the following two lines will display identically >
1234^I9
1234 9
Using the <Tab> key was also faster than typing <Space> several times; the
same was true for <BS>.
THE ISSUE WITH TABS AND INDENTATION
In Vim, the number of columns between two (virtual) horizontal tab stops
is controlled by 'tabstop' and is set to eight by default. Although you can
change it, you quickly run into trouble later. Other programs won't know what
tabstop value you used. They probably use the default value of eight, and
your text suddenly looks very different. Also, most printers use a fixed
tabstop value of eight. Thus it's best to keep 'tabstop' alone; if you edit a
file which was written with a different tabstop setting, see |25.3| for how
to fix that.
For indenting lines in a program, using a multiple of eight columns makes
you quickly run into the right border of the window. Using a single space
doesn't provide enough visual difference. Many people prefer to use four
spaces, a good compromise.
Since a <Tab> is eight spaces and you want to use an indent of four spaces,
you can't use a <Tab> character to make your indent. There are two ways to
handle this:
Since a tab character at the beginning of a line is visually represented
as eight spaces and you want to use an indent of four spaces, you can't use a
tab character to make your indent.
To remedy this, `vi` had the 'shiftwidth' option. When set to 4, on a new
line, pressing <C-t> in Insert mode would indent the line by 4 spaces,
a result impossible to get with the <Tab> key and 'tabstop' set to 8.
To optimize space, `vi` would also silently remove packs of spaces and replace
them with tab characters. The following shows what happens pressing <C-t>
a few times.
A "." stands for a space character and "------->" for a tab character.
1. Use a mix of <Tab> and space characters. Since a <Tab> takes the place of
eight spaces, you have fewer characters in your file. Inserting a <Tab>
is quicker than eight spaces. Backspacing works faster as well.
type result ~
<C-t> ....
<C-t><C-t> ------->
<C-t><C-t><C-t> ------->....
2. Use spaces only. This avoids the trouble with programs that use a
different tabstop value.
Similarly pressing <C-d> in Insert mode would decrease the indent. Hence
with `set tabstop=8 shiftwidth=2` one has
Fortunately, Vim supports both methods quite well.
type result ~
<C-t><Tab><C-t> ..----->..
<C-t><Tab><C-t><C-d> ------->
A third option that one could set in `vi` was 'autoindent'. It copies the
indent level of the previous lines,
SPACES AND TABS
type result ~
<Space><Tab>hello .------>hello
<Space><Tab>hello<Enter> .------>hello
------->
If you are using a combination of tabs and spaces, you just edit normally.
The Vim defaults do a fine job of handling things.
You can make life a little easier by setting the 'softtabstop' option.
This option tells Vim to make the <Tab> key look and feel as if tabs were set
at the value of 'softtabstop', but actually use a combination of tabs and
spaces.
After you execute the following command, every time you press the <Tab> key
the cursor moves to the next 4-column boundary: >
:set softtabstop=4
When you start in the first column and press <Tab>, you get 4 spaces inserted
in your text. The second time, Vim takes out the 4 spaces and puts in a <Tab>
(thus taking you to column 8). Thus Vim uses as many <Tab>s as possible, and
then fills up with spaces.
When backspacing it works the other way around. A <BS> will always delete
the amount specified with 'softtabstop'. Then <Tab>s are used as many as
possible and spaces to fill the gap.
The following shows what happens pressing <Tab> a few times, and then using
<BS>. A "." stands for a space and "------->" for a <Tab>.
type result ~
<Tab> ....
<Tab><Tab> ------->
<Tab><Tab><Tab> ------->....
<Tab><Tab><Tab><BS> ------->
<Tab><Tab><Tab><BS><BS> ....
An alternative is to use the 'smarttab' option. When it's set, Vim uses
'shiftwidth' for a <Tab> typed in the indent of a line, and a real <Tab> when
typed after the first non-blank character. However, <BS> doesn't work like
with 'softtabstop'.
but the new line is produced by optimizing the number of characters used.
JUST SPACES
If you want absolutely no tabs in your file, you can set the 'expandtab'
option: >
But separating tab stops with 8 columns was not universal: IBM had a standard
at 10 columns, and today some Go developers write code with `tabstop=4`. Every
time text is displayed with a different 'tabstop' value, it risks misaligning
the text, especially once the file is shared and opened on another machine.
In the meantime, computers got much better and the few octets saved by using
tabs were no longer making any real difference. It became possible to use
only spaces and thus guarantee the same resulting text everywhere. But using
only spaces was impossible in `vi` without sacrificing features. Remember that
'autoindent' would systematically try to input a tab character when it could.
Vim 4.0 made working with only spaces as convenient as working only with
tabs (or a mix of tabs and spaces), by introducing the 'expandtab' option.
When set, Vim will replace any horizontal tab character it would normally
insert with an equivalent number of spaces, to end up with the same visual
effect. <BS> would continue to remove only one character at a time.
:set expandtab
When this option is set, the <Tab> key inserts a series of spaces. Thus you
get the same amount of white space as if a <Tab> character was inserted, but
there isn't a real <Tab> character in your file.
The backspace key will delete each space by itself. Thus after typing one
<Tab> you have to press the <BS> key up to eight times to undo it. If you are
in the indent, pressing CTRL-D will be a lot quicker.
type result ~
<Tab> ........
<Tab><BS> .......
CHANGING TABS IN SPACES (AND BACK)
Setting 'expandtab' does not affect any existing tabs. In other words, any
tabs in the document remain tabs. If you want to convert tabs to spaces, use
the ":retab" command. Use these commands: >
Setting 'expandtab' does not immediately affect existing tab characters. In
order to purge a file from all its horizontal tab characters, Vim 5.3
introduced the |:retab| command. Use these commands: >
:set expandtab
:%retab
Now Vim will have changed all indents to use spaces instead of tabs. However,
all tabs that come after a non-blank character are kept. If you want these to
be converted as well, add a !: >
:%retab!
:retab
This is a little bit dangerous, because it can also change tabs inside a
string. To check if these exist, you could use this: >
/"[^"\t]*\t[^"]*"
It's recommended not to use hard tabs inside a string. Replace them with
"\t" to avoid trouble.
It's recommended not to use actual tab characters inside a string. Replace
them with "\t" to avoid trouble.
The other way around works just as well: >
The other way around works just as well: >
:set noexpandtab
:%retab!
:retab!
SOFT TAB STOPS
When using only spaces, or a mix of spaces and horizontal tabs, one gets the
unpleasant feeling that the two keys <Tab> and <BS> do not act in mirror, as
they do when using only tab characters.
Vim 5.4 introduced the 'softtabstop' option. On top of the (hard) tab stops
used to display the horizontal tab characters in the text, Vim adds extra
soft tab stops dedicated only to the cursor. When 'softtabstop' is set to a
positive value, and the <Tab> key will push the cursor to the next soft tab
stop. Vim will insert the correct combination of tab characters and spaces to
make the effect visually. Likewise pressing <BS> will have the cursor try to
reach the nearest soft tab stop. The following example uses
`:set softtabstop=4`
type result ~
<Tab> ....
<Tab><Tab>a ------->a
<Tab><Tab>a<Tab> ------->a...
<Tab><Tab>a<Tab><BS> ------->a
To maintain global coherence, one can `:set softtabstop=-1` so that
the value of 'shiftwidth' is use for the number of columns between two soft
tab stops.
If you prefer to have different values for 'shiftwidth' and 'softtabstop',
you can still do so and use <C-t> to indent with 'shiftwidth'. Or you can
use the 'smarttab' option, allowing for a unified <Tab> key that knows what to
do in the different situations.
VARIABLE TAB STOPS
As we said before, the ASCII table was designed to remotely control
teleprinters. A given teleprinter could be configured to have their physical
tab stops have variable spacing. After all, the ^I control character was
only stipulating: go to the next tab stop wherever it is.
Vim 7.3 introduced 'vartabstop' to emulate the same functionality. For
example if Vim was compiled with `+vartabs` and `:set vartabstop=2,4` one gets
actual character result ~
^I ->
^I^I ->--->
^I^I^I ->--->--->
Similarly, 'varsofttabstop' was also introduced, to have variably spaced
soft tab stops. With `:set varsofttabstop=2,4` one gets
type result ~
<Tab> ..
<Tab><Tab> ......
<Tab><Tab><Tab> ------->....
EXAMPLES OF CONFIGURATION
By default, Vim is configured to use only tabs: >
:set tabstop=8
:set shiftwidth=8
:set noexpandtab
:set softtabstop=0
:set nosmarttab
<
If you want to write C code as if it were Python (only spaces, with indents
of 4 spaces), here is what you can use: >
:set shiftwidth=4
:set softtabstop=-1
:set expandtab
<
If you want the same behavior but with better control over alignment
(e.g. lining up parameters or comments in multiples of 2 spaces), use: >
:set shiftwidth=4
:set softtabstop=2
:set expandtab
:set smarttab
<
If instead, you would like to write C code like Bram Moolenaar would have
(using a mix of tabs and spaces), you can use >
:set shiftwidth=4
:set softtabstop=-1
<
==============================================================================
*30.6* Formatting comments

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 9.1. Last change: 2025 Mar 23
*usr_41.txt* For Vim version 9.1. Last change: 2025 Jul 21
VIM USER MANUAL - by Bram Moolenaar
@@ -35,8 +35,10 @@ like for example .vim files or configuration files like .vimrc and .gvimrc.
These scripts may define functions, commands and settings that Vim uses to
customize and extend its behavior.
With a slight abuse of nomenclature, we will use "Vim script" to refer to the
Vim scripting language throughout this documentation. This shorthand helps to
*vim-script-notation*
The correct notation is "Vim script" (or "Vim9 script" when refering to the
new Vim9 language |Vim9-script|), so we will use "Vim script" to refer to the
Vim scripting language throughout this documentation. This shorthand helps to
streamline explanations and discussions about scripting with Vim.
A Vim plugin is a collection of one or more Vim scripts, along with additional
@@ -862,7 +864,7 @@ Tuple manipulation: *tuple-functions*
reverse() reverse the order of items in a Tuple
slice() take a slice of a Tuple
string() string representation of a Tuple
tuple2list() convert a Tuple of items into a list
tuple2list() convert a Tuple into a List
Dictionary manipulation: *dict-functions*
get() get an entry without an error for a wrong key
@@ -1110,7 +1112,10 @@ Command line: *command-line-functions*
getcmdtype() return the current command-line type
getcmdwintype() return the current command-line window type
getcompletion() list of command-line completion matches
getcompletiontype() get the type of the command-line completion
for specified string
fullcommand() get full command name
cmdcomplete_info() get command-line completion information
Quickfix and location lists: *quickfix-functions*
getqflist() list of quickfix errors
@@ -1123,6 +1128,8 @@ Insert mode completion: *completion-functions*
complete_add() add to found matches
complete_check() check if completion should be aborted
complete_info() get current completion information
complete_match() get insert completion start match col and
trigger text
pumvisible() check if the popup menu is displayed
pum_getpos() position and size of popup menu if visible
@@ -1226,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

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 9.1. Last change: 2025 Feb 13
*various.txt* For Vim version 9.1. Last change: 2025 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -34,6 +34,11 @@ CTRL-L Clear and redraw the screen. The redraw may happen
*:redrawt* *:redrawtabline*
:redrawt[abline] Redraw the tabline. Useful to update the tabline when
'tabline' includes an item that doesn't trigger
automatic updating.
*E1547* *:redrawtabp* *:redrawtabpanel*
:redrawtabp[anel] Redraw the tabpanel Useful to update the tabpanel
when 'tabpanel' includes an item that doesn't trigger
automatic updating.
*N<Del>*
@@ -98,7 +103,9 @@ g8 Print the hex values of the bytes used in the
*:p* *:pr* *:print* *E749*
:[range]p[rint] [flags]
Print [range] lines (default current line).
Print [range] lines (default current line). Can also
be spelled `:[range]|` due to Vi compatibility (see
|:bar|). Gives an error in an empty buffer.
Note: If you are looking for a way to print your text
on paper see |:hardcopy|. In the GUI you can use the
File.Print menu entry.
@@ -491,6 +498,7 @@ N *+statusline* Options 'statusline', 'rulerformat' and special
- *+sun_workshop* Removed: |workshop|
N *+syntax* Syntax highlighting |syntax|
*+system()* Unix only: opposite of |+fork|
H *+tabpanel* Support for |tabpanel|
T *+tag_binary* binary searching in tags file |tag-binary-search|
- *+tag_old_static* Removed; method for static tags |tag-old-static|
- *+tag_any_white* Removed; was to allow any white space in tags files
@@ -509,7 +517,7 @@ N *+toolbar* |gui-toolbar|
m *+transparency* MacVim only: window background transparency
T *+user_commands* User-defined commands. |user-commands|
Always enabled since 8.1.1210.
H *+vartabs* Variable-width tabstops. |'vartabstop'|
H *+vartabs* Variable-width tab stops. |'vartabstop'|
T *+vertsplit* Vertically split windows |:vsplit|; Always enabled
since 8.0.1118.
T *+vim9script* |Vim9| script
@@ -519,6 +527,8 @@ T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
T *+visualextra* extra Visual mode commands |blockwise-operators|
T *+vreplace* |gR| and |gr|
*+vtp* on MS-Windows console: support for 'termguicolors'
N *+wayland* Unix only: support for the Wayland protocol.
N *+wayland_clipboard* Unix only: support for Wayland selections/clipboard.
T *+wildignore* |'wildignore'| Always enabled since 9.0.0278
T *+wildmenu* |'wildmenu'| Always enabled since 9.0.0279
T *+windows* more than one window; Always enabled since 8.0.1118.
@@ -786,7 +796,15 @@ K Run a program to lookup the keyword under the
was used for the previous execution of this command.
If the value was never specified, then it uses the
value of $DISPLAY environment variable as it was when
Vim was started.
Vim was started. This will also update |v:clipmethod|.
{only available when compiled with the
|+xterm_clipboard| feature}
*:clipreset* *:clip*
:clip[reset] Attempts to choose a new method for accessing the
clipboard, using the 'clipmethod' option. This is
useful when the current method has become unavailable,
and you want to try using another method.
{only available when compiled with the |+clipboard|
feature}

View File

@@ -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.

View File

@@ -1,4 +1,4 @@
*version9.txt* For Vim version 9.1. Last change: 2025 Mar 27
*version9.txt* For Vim version 9.1. Last change: 2025 Jul 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41551,8 +41551,16 @@ 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|.
Add support for object<{type}> as variable data type |vim9-types|
Support for the |Tuple| data type in Vim script and Vim9 script.
Diff mode ~
---------
Include the "linematch" algorithm for the 'diffopt' setting. This aligns
@@ -41563,24 +41571,80 @@ Improve the diff highlighting for changes within a line. Configurable using
the "inline" sub option value for the 'diffopt' setting, with "inline:simple"
being added to the default "diffopt" value (but this does not change how diff
mode works).
The 'diffanchors' option specifies a comma-separated list of addresses in
a buffer that act as anchor points for splitting and independently diffing
buffer sections, improving diff alignment. It is only used when 'diffopt'
includes "anchor" and all specified addresses must resolve in every buffer, or
else the anchors are ignored.
Completion~
----------
- New Insert-mode completion: |i_CTRL-X_CTRL-R| to complete words from
registers.
- Completion in search contexts using |/|, |?|, |:g|, |:v| and |:vimgrep|
commands using 'wildchar'
- ":filetype" command completion and the "filetypecmd" completion type for
|getcompletion()| have been included.
- Support for command-line completion of 'keymap' option values.
- Support for |fuzzy-matching| during |ins-completion| with the "fuzzy"
values of the 'completeopt' setting.
- allow to complete shell commands and files using the new shellcmdline
completion type using |:command-complete| and |getcmdcomplpat()|
- New option value for 'wildmode':
"noselect" - do not auto select an entry in the wildmenu
"exacttext" - show exact matches in wildmenu with search
completion
- New flags for 'complete':
"F{func}" - complete using given function
"F" - complete using 'completefunc'
"o" - complete using 'omnifunc'
- New option value for 'completeopt':
"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
Platform specific~
-----------------
- Support for Wayland UI and support for the Wayland clipboard has been added.
- Support for the XDG Desktop Specification |xdg-base-dir| has been added and
the environment variable |$MYVIMDIR| is set to the users personal runtime
directory ($HOME/.vim or $HOME/.config/vim on Linux, $HOME/vimfiles on
Windows).
- Python3 support in OpenVMS is now available.
- The Win32 GUI comes with better toolbar icons.
*new-other-9.2*
Other new features ~
------------------
The new packages |package-comment|, |package-nohlsearch| and |package-hlyank|
are included.
- Support for Super key mappings in GTK using <D-Key>.
Support for Wayland UI.
- The new packages |package-comment|, |package-nohlsearch|, |package-hlyank| and
|help-TOC| are included.
Support for the XDG Desktop Specification |xdg-base-dir|
- An interactive tutor plugin has been included |vim-tutor-mode| and can be
started via |:Tutor|.
Support for translating messages in Vim script plugins using the |gettext()|
and |bindtextdomain()| functions.
- Support for translating messages in Vim script plugins using the |gettext()|
and |bindtextdomain()| functions was included.
Support highlighting the matched text and the completion kind for insert-mode
completion and command-line completion in |ins-completion-menu|, see
|complete-items|
- Support highlighting the matched text and the completion kind for
insert-mode completion and command-line completion in |ins-completion-menu|,
see |complete-items|.
Support for the |Tuple| data type in Vim script and Vim9 script.
- A new vertical |tabpanel| window has been included which is a vertical
'tabline'.
- The |dist#vim9#Launch()| and |dist#vim9#Open()| functions have been added to
the |vim-script-library| and decoupled from |netrw|.
- 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~
@@ -41592,42 +41656,49 @@ Default values: ~
- the default 'backspace' option for Vim has been set to "indent,eol,start"
and removed from |defaults.vim|
- the default fontsize for the GTK builds of Vim (Windows and Unix) has been
increased to 12pt to accomodate modern high-dpi monitors
increased to 12pt to accommodate modern high-dpi monitors
- the default value of the 'keyprotocol' option has been updated and support
for the ghostty terminal emulator (using kitty protocol) has been added
- Improved visual highlighting |hl-Visual|
- the default value for 'showcmd' is always enabled when using non-compatible
mode (previously, it was off on UNIX systems) and consequently removed from
|defaults.vim|
Completion: ~
- allow to complete directories from 'cdpath' for |:cd| and similar commands,
add the "cd_in_path" completion type for e.g. |:command-complete| and
|getcompletion()|
- allow to complete shell commands and files using the new shellcmdline
completion type using |:command-complete| and |getcmdcomplpat()|
- allow to specify additional attributes in the completion menu (allows to
mark deprecated attributes from LSP server) |complete-items|
- the completed word and completion type are provided when handling the
|CompleteDone| autocommand in the |v:event| dictionary
- |complete_info()| returns the list of matches shown in the poppu menu via
the "matches" key
- New option value for 'completeopt':
"nosort" - do not sort completion results
"preinsert" - highlight to be inserted values
- handle multi-line completion as expected
- handle multi-line completion items as expected
- improved commandline completion for the |:hi| command
- New option value for 'wildmode':
"noselect" - do not auto select an entry in the wildmenu
- allow to limit matches for the 'complete' sources by using the
"{flag}^<limit>" notation
- 'smartcase' applies to completion filtering
Options: ~
- the default for 'commentstring' contains whitespace padding to have
automatic comments look nicer |comment-install|
- 'completeopt' is now a |global-local| option.
- 'nrformats' accepts the new "blank" suboption, to determine a signed or
unsigned number based on whitespace in front of a minus sign.
- add 'cpoptions' flag "z" |cpo-z|, to disable some (traditional) vi
behaviour/inconsistency (see |d-special| and |cw|).
- add 'cpoptions' flag "~" |cpo-~| to disable resolving symlinks on |:cd|
commands
- new option values for 'fillchars':
"trunc" - configure truncation indicator, 'pummaxwidth'
"truncrl" - like "trunc" but in 'rl' mode, 'pummaxwidth'
"tpl_vert" - separators for the 'tabpanel'
- 'grepformat' is now a |global-local| option.
- adjust for GTK3 dropping some mouse cursors 'mouseshape'
- 'nrformats' accepts the new "blank" suboption, to determine a signed or
unsigned number based on whitespace in front of a minus sign.
- 'rulerformat' now supports the |stl-%!| item
- use 'smoothscroll' logic for CTRL-F / CTRL-B for pagewise scrolling
and CTRL-D / CTRL-U for half-pagewise scrolling
- 'pummaxwidth' maximum width for the completion popup menu
Ex commands: ~
- allow to specify a priority when defining a new sign |:sign-define|
@@ -41636,6 +41707,8 @@ Ex commands: ~
documented and skips help buffers (if not run from a help buffer, else
moves to the next/previous help buffer).
- |:keeppatterns| preserves the last substitute pattern when used with |:s|
- |:retab| accepts the new optional parameter -indentonly to only change
whitespace in indented lines.
Functions: ~
- provide information about function arguments using the get(func, "arity")
@@ -41654,14 +41727,13 @@ Others: ~
(and apply proper case folding)
- the putty terminal is detected using an |TermResponse| autocommand in
|defaults.vim| and Vim switches to a dark background
- the |help-TOC| package is included to ease navigating the documentation.
- an interactive tutor plugin has been included |vim-tutor-mode|, can be
started via |:Tutor|
- improve the |vimtutor| and add a second chapter for more advanced tips
- add |dist#vim9#Launch()| and |dist#vim9#Open()| to the |vim-script-library|
and decouple it from |netrw|
- new digraph "APPROACHES THE LIMIT" using ".="
- |CTRL-C| always closes the active |popup-window|.
- the configure script will favor using GTK3 over GTK2 when auto-detecting the
gui toolkit
- |gv| works in operator pending mode and does not abort
- The close button shown in the non-GUI 'tabline' will only be visible if the
'mouse' option contains either "a" or any of the flags "n", "v", or "i".
*added-9.2*
Added ~
@@ -41674,12 +41746,15 @@ Functions: ~
|base64_encode()| encode a blob into a base64 string
|blob2str()| convert a blob into a List of strings
|bindtextdomain()| set message lookup translation base path
|cmdcomplete_info()| get current cmdline completion info
|complete_match()| get completion and trigger info
|diff()| diff two Lists of strings
|filecopy()| copy a file {from} to {to}
|foreach()| apply function to List items
|getcellpixels()| get List of terminal cell pixel size
|getcmdcomplpat()| Shell command line completion
|getcmdprompt()| get prompt for input()/confirm()
|getcompletiontype()| get command-line completion type
|getregion()| get a region of text from a buffer
|getregionpos()| get a list of positions for a region
|getstacktrace()| get current stack trace of Vim scripts
@@ -41693,10 +41768,12 @@ 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: ~
|CmdlineLeavePre| before preparing to leave the command line
|CursorMovedC| after the cursor was moved in the command-line
|KeyInputPre| before processing any key event in any mode
|SessionWritePost| after writing the session file |:mksession|
@@ -41714,6 +41791,9 @@ Highlighting: ~
|hl-PmenuMatch| Popup menu: highlighting of matched text
|hl-PmenuMatchSel| Popup menu: highlighting of matched text in selected
line
|hl-TabPanel| |tabpanel|: not active tab page label
|hl-TabPanelFill| |tabpanel|: filler space
|hl-TabPanelSel| |tabpanel|: active tab page label
Commands: ~
@@ -41724,21 +41804,37 @@ Ex-Commands: ~
|:iput| like |:put| but adjust indent
|:pbuffer| Edit buffer [N] from the buffer list in the preview
window
|:redrawtabpanel| Force updating the 'tabpanel'.
|:uniq| Deduplicate text in the current buffer.
Options: ~
'completefuzzycollect' Enable fuzzy collection of candiates for (some)
'chistory' Size of the quickfix stack |quickfix-stack|.
'completefuzzycollect' Enable fuzzy collection of candidates for (some)
|ins-completion| modes
'completeitemalign' Order of |complete-items| in Insert mode completion
popup
'diffanchors' list of {address} to force syncing of diffs
'eventignorewin' autocommand events that are ignored in a window
'findfunc' Vim function to obtain the results for a |:find|
command
'isexpand' defines triggers for completion
'lhistory' Size of the location list stack |quickfix-stack|
'maxsearchcount' Set the maximum number for search-stat |shm-S|
'messagesopt' configure |:messages| and |hit-enter| prompt
'winfixbuf' Keep buffer focused in a window
'pummaxwidth' maximum width for the completion popup menu
'showtabpanel' When to show the |tabpanel|
'tabclose' Which tab page to focus after closing a tab page
'tabpanel' Optional vertical panel for displaying tabpages
|tabpanel|
'tabpanelopt' Optional settings for the |tabpanel|
't_xo' Terminal uses XON/XOFF handshaking (e.g. vt420)
't_CF' Support for alternate font highlighting terminal code
'winfixbuf' Keep buffer focused in a window
Vim Arguments: ~
|-Y| Do not connect to the Wayland compositor.
==============================================================================
INCOMPATIBLE CHANGES *incompatible-9.2*
@@ -41746,26 +41842,6 @@ INCOMPATIBLE CHANGES *incompatible-9.2*
Improved/Different MS-Windows mapping support
|w32-experimental-keycode-trans-strategy|
==============================================================================
IMPROVEMENTS *improvements-9.2*
Support for command-line completion of 'keymap' option values.
Support for compiling all the methods in a Vim9 class using |:defcompile|.
Support for Super key mappings in GTK using <D-Key>.
Improved visual highlighting.
Python3 support in OpenVMS.
Support for |fuzzy-matching| during |ins-completion| with the "fuzzy"
values of the 'completeopt' setting
The environment variable |$MYVIMDIR| is set to the users personal runtime
directory ($HOME/.vim or $HOME/.config/vim on Linux, $HOME/vimfiles
on Windows)
==============================================================================
COMPILE TIME CHANGES *compile-changes-9.2*

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 9.1. Last change: 2024 Nov 10
*vi_diff.txt* For Vim version 9.1. Last change: 2025 Jun 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -91,8 +91,11 @@ Maximum display width Unix and Win32: 1024 characters, otherwise 255
Maximum lhs of a mapping 50 characters.
Number of different highlighting types: over 30000
Range of a Number variable: -2147483648 to 2147483647 (might be more on 64
bit systems)
bit systems) See also: |v:numbermax|,
|v:numbermin| and |v:numbersize|
Maximum length of a line in a tags file: 512 bytes.
*E1541*
Maximum value for |/\U| and |/\%U|: 2147483647 (for 32bit integer).
Information for undo and text in registers is kept in memory, thus when making
(big) changes the amount of (virtual) memory available limits the number of
@@ -335,6 +338,7 @@ Insert-mode completion. |ins-completion|
|i_CTRL-X_CTRL-D| definitions or macros
|i_CTRL-X_CTRL-O| Omni completion: clever completion
specifically for a file type
|i_CTRL-X_CTRL-R| contents from registers
etc.
Long line support. |'wrap'| |'linebreak'|
@@ -1098,7 +1102,7 @@ The following options are supported by Vi: ~
'shiftwidth' 'sw' number of spaces to use for (auto)indent step
'showmatch' 'sm' briefly jump to matching bracket if insert one
'showmode' 'smd' message on status line to show current mode
'tabstop' 'ts' number of spaces that <Tab> in file uses
'tabstop' 'ts' number of columns between two tab stops
'taglength' 'tl' number of significant characters for a tag
'tags' 'tag' list of file names used by the tag command
{Vi: default is "tags /usr/lib/tags"}

View File

@@ -1,4 +1,4 @@
.TH VIM 1 "12 agosto 2024"
.TH VIM 1 "27 giugno 2025"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
@@ -404,6 +404,9 @@ nella scrittura dei file. Verr
Non connettersi al server X. Vim parte pi<70> rapidamente,
ma il titolo della finestra e la clipboard non sono usati.
.TP
\-Y
Non connettersi al compositore Wayland.
.TP
\-y
Eseguire
.B Vim
@@ -564,7 +567,7 @@ Inizializzazioni personali di
.B gVim
(viene utilizzata la prima trovata).
.TP
/usr/local/share/vim/optwin.vim
/usr/local/share/vim/vim??/optwin.vim
Script Vim usato dal comando ":options", maniera elegante per visualizzare e impostare opzioni.
.TP
/usr/local/share/vim/vim??/menu.vim

View File

@@ -1,4 +1,4 @@
.TH VIM 1 "12 agosto 2024"
.TH VIM 1 "27 giugno 2025"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
@@ -404,6 +404,9 @@ nella scrittura dei file. Verrà chiesta una chiave di cifratura.
Non connettersi al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono usati.
.TP
\-Y
Non connettersi al compositore Wayland.
.TP
\-y
Eseguire
.B Vim
@@ -564,7 +567,7 @@ Inizializzazioni personali di
.B gVim
(viene utilizzata la prima trovata).
.TP
/usr/local/share/vim/optwin.vim
/usr/local/share/vim/vim??/optwin.vim
Script Vim usato dal comando ":options", maniera elegante per visualizzare e impostare opzioni.
.TP
/usr/local/share/vim/vim??/menu.vim

View File

@@ -1,4 +1,4 @@
.TH VIM 1 "12 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2024"
.TH VIM 1 "27 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2025"
.SH <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim \[em] <20><><EFBFBD> Vi IMproved (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vi), <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
@@ -300,7 +300,7 @@ vim "+set si" main.c
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>).
<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":set uc=0". <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \[em]
<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":set uc=0". <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> \[em]
":set uc=200".
.TP
\-N
@@ -316,7 +316,7 @@ vim "+set si" main.c
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
.TP
\-o[N]
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> N <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> N <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> N <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
.TP
\-O[N]
@@ -329,7 +329,7 @@ vim "+set si" main.c
.TP
\-P {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>}
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20> MS Windows. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20> MS Windows. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>}.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
@@ -367,7 +367,7 @@ vim "+set si" main.c
\-s {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>}
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>}.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":source! {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>}".
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
@@ -433,7 +433,7 @@ vim "+set si" main.c
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> {<7B><><EFBFBD><EFBFBD>}.
<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> {<7B><><EFBFBD><EFBFBD>}.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "vim \-s" <20><><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":source!".
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> {<7B><><EFBFBD><EFBFBD>} <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.
.TP
@@ -453,12 +453,15 @@ vim "+set si" main.c
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
.TP
\-Y
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Wayland Compositor.
.TP
\-y
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.B Vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>ݣ<EFBFBD><DDA3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
"evim" <20><><EFBFBD> "eview".
"evim" <20><><EFBFBD> "eview".
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.B Vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
@@ -542,7 +545,7 @@ vim "+set si" main.c
.TP
\-\-remote\-expr {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Vim-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>} <20><><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (stdout).
.TP
\-\-remote\-send {<7B><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
@@ -562,8 +565,8 @@ vim "+set si" main.c
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
.TP
\-\-servername {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>} <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
"\-\-remote" <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim,
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>} <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
"\-\-remote" <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> {<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>} <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim,
<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
.TP
\-\-socketid {id}
@@ -591,8 +594,8 @@ vim "+set si" main.c
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":help ZZ" <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "ZZ".
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <TAB> <20> CTRL+D <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
(<28><>. ":help cmdline\-completion").
<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>-<2D><>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>. ":help"). <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD>-<2D><>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>. ":help"). <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, ":help syntax.txt".
.SH <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.TP 15
@@ -635,7 +638,7 @@ vim "+set si" main.c
(<28><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>).
.TP
/usr/local/share/vim/vim??/optwin.vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":options".
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":options".
<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
.TP
/usr/local/share/vim/vim??/menu.vim
@@ -664,20 +667,20 @@ vimtutor(1)
.SH <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.B Vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Bram Moolenaar), <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Bram Moolenaar), <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>. <20><>. ":help credits" <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.B Vim.
.br
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.B Vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Stevie, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Tim Thompson),
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Tony Andrews) <20> <20>. <20>. (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (G.R. (Fred) Walter).
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (Tony Andrews) <20> <20>. <20>. (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (G.R. (Fred) Walter).
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
.br
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
.B Vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD>",
.B Vim
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "<22><><EFBFBD><EFBFBD><EFBFBD>",
<EFBFBD><EFBFBD>. <URL:https://github.com/restorerz/ruvim/>.
.SH <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
@@ -685,7 +688,7 @@ vimtutor(1)
.PP
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vi.
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>
"Vi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> vi_diff.txt
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD>-<2D><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD>
"Vi <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> vi_diff.txt
(<28><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ":help vi_diff.txt" <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Vim) <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
'compatible' <20> 'cpoptions'.

View File

@@ -1,4 +1,4 @@
.TH VIM 1 "12 августа 2024"
.TH VIM 1 "27 июня 2025"
.SH НАЗНАЧЕНИЕ
Программа Vim \[em] это Vi IMproved (Улучшенный Vi), текстовый редактор для
программистов.
@@ -300,7 +300,7 @@ vim "+set si" main.c
Работа без создания файла подкачки.
В этом случае восстановление при сбое в работе редактора будет невозможно.
Удобно для правки файла на очень медленном носителе (например, гибком диске).
То же самое можно сделать командой ":set uc=0". Включение файла подкачки \[em]
То же самое можно сделать командой ":set uc=0". Включение файла подкачки \[em]
":set uc=200".
.TP
\-N
@@ -316,7 +316,7 @@ vim "+set si" main.c
смотрите в документации.
.TP
\-o[N]
Создать для N файлов отдельные окна, расположенные по горизонтали.
Создать для N файлов отдельные окна, расположенные по горизонтали.
Если N не указано, то создаётся по одному окну на каждый файл.
.TP
\-O[N]
@@ -329,7 +329,7 @@ vim "+set si" main.c
.TP
\-P {заголовок окна}
Открыть программу в многодокументном приложении.
Только для ГИП в MS Windows. Задаёт заголовок окна родительского приложения.
Только для ГИП в MS Windows. Задаёт заголовок окна родительского приложения.
Если возможно, то программа Vim будет запущена внутри окна многодокументного
приложения. Многодокументное приложение должно иметь указанный {заголовок окна}.
Убедитесь, что этот {заголовок окна} уникален для приложения. Обращаем внимание,
@@ -367,7 +367,7 @@ vim "+set si" main.c
\-s {командный файл}
Считывание команд режима команд из {командного файла}.
Содержимое файла воспринимается в виде команд, как если бы они были набраны
непосредственно в редакторе.
непосредственно в редакторе.
То же самое достигается командой ":source! {командный файл}".
Если после исполнения всех команд из {командного файла} работа редактора
продолжается, то дальнейший ввод команд и текста ожидается с клавиатуры.
@@ -433,7 +433,7 @@ vim "+set si" main.c
Добавление всех введённых команд в {файл}.
Все символы, введённые с клавиатуры вплоть до момента завершения работы
редактора, записываются в {файл}.
Удобно в том случае, когда вы хотите создать командный файл для последующего
Удобно в том случае, когда вы хотите создать командный файл для последующего
его использования в командной строке "vim \-s" или в команде ":source!".
Если {файл} уже существует, то набранный текст будет добавляются в конец файла.
.TP
@@ -453,12 +453,15 @@ vim "+set si" main.c
Ускоряет загрузку в консоли, но делает невозможным использование заголовка окна
и буфера обмена.
.TP
\-Y
Запуск программы без подключения к Wayland Compositor.
.TP
\-y
Работа в упрощённом варианте.
Редактор
.B Vim
будет работать в упрощённом варианте, как будто исполняемый файл имеет название
"evim" или "eview".
"evim" или "eview".
Поведение редактора
.B Vim
будет походить на редакторы, созданные по безрежимному принципу работы.
@@ -542,7 +545,7 @@ vim "+set si" main.c
.TP
\-\-remote\-expr {выражение}
Будет выполнено подключение к Vim-серверу и передача указанного {выражение} для
вычисления.
вычисления.
Результат вычисления будет выведен в поток стандартного вывода (stdout).
.TP
\-\-remote\-send {код клавиши}
@@ -562,8 +565,8 @@ vim "+set si" main.c
Будет выведен перечень всех доступных Vim-серверов.
.TP
\-\-servername {название}
Использовать указанное {название} в качестве наименования сервера. Если аргумент
"\-\-remote" не указан, то {название} присваивается данной копии редактора Vim,
Использовать указанное {название} в качестве наименования сервера. Если аргумент
"\-\-remote" не указан, то {название} присваивается данной копии редактора Vim,
в противном случае указывает на сервер, к которому следует подключиться.
.TP
\-\-socketid {id}
@@ -591,8 +594,8 @@ vim "+set si" main.c
Например, по команде ":help ZZ" будет выведена информация о команде "ZZ".
Используйте клавиши <TAB> и CTRL+D для подстановки нужного названия темы
(см. ":help cmdline\-completion").
Для быстрого перемещения по документации используются индексы (что-то
вроде гипертекстовых ссылок, см. ":help"). Таким образом можно
Для быстрого перемещения по документации используются индексы (что-то
вроде гипертекстовых ссылок, см. ":help"). Таким образом можно
переходить от одного файла документации к другому, например, ":help syntax.txt".
.SH ФАЙЛЫ
.TP 15
@@ -635,7 +638,7 @@ vim "+set si" main.c
(будет использован первый найденный файл из указанных).
.TP
/usr/local/share/vim/vim??/optwin.vim
Командный файл, используемый при выполнении команды ":options".
Командный файл, используемый при выполнении команды ":options".
По этой команде предоставляется удобный способ просмотра и изменения настроек.
.TP
/usr/local/share/vim/vim??/menu.vim
@@ -664,20 +667,20 @@ vimtutor(1)
.SH АВТОРЫ
Большая часть редактора
.B Vim
была создана Брамом Моленаром (Bram Moolenaar), которому помогало огромное
была создана Брамом Моленаром (Bram Moolenaar), которому помогало огромное
количество людей. См. ":help credits" в редакторе
.B Vim.
.br
Редактор
.B Vim
базируется на коде редактора Stevie, написанного Тимом Томпсоном (Tim Thompson),
Тони Эндрюсом (Tony Andrews) и Г. Р. (Фредом) Уолтером (G.R. (Fred) Walter).
Тони Эндрюсом (Tony Andrews) и Г. Р. (Фредом) Уолтером (G.R. (Fred) Walter).
Однако, в настоящее время в программе Vim почти ничего не осталось
от исторического кода его предшественника.
.br
Русская локализация редактора
.B Vim
выполняется в рамках проекта "РуВим",
.B Vim
выполняется в рамках проекта "РуВим",
см. <URL:https://github.com/restorerz/ruvim/>.
.SH ОШИБКИ
Скорее всего есть.
@@ -685,7 +688,7 @@ vimtutor(1)
.PP
Заметим, что многие вещи, которые считаются ошибками, на самом деле
являются результатом слишком полного воспроизведения поведения редактора Vi.
Если вы думаете, что что-то является ошибкой только потому, что
"Vi делает это по-другому", внимательно прочитайте файл vi_diff.txt
Если вы думаете, что что-то является ошибкой только потому, что
"Vi делает это по-другому", внимательно прочитайте файл vi_diff.txt
(или наберите ":help vi_diff.txt" в редакторе Vim) и посмотрите параметры
'compatible' и 'cpoptions'.

View File

@@ -1,4 +1,4 @@
.TH VIM 1 "2024 Aug 12"
.TH VIM 1 "2025 Jun 27"
.SH NAME
vim \- Vi IMproved, a programmer's text editor
.SH SYNOPSIS
@@ -405,6 +405,9 @@ Will prompt for a crypt key.
Don't connect to the X server. Shortens startup time in a terminal, but the
window title and clipboard will not be used.
.TP
\-Y
Don't connect to the wayland compositor
.TP
\-y
Start
.B Vim
@@ -560,7 +563,7 @@ initializations (first one found is used).
System wide gvim initializations.
.TP
~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc
Your personal
Your personal
.B gVim
initializations (first one found is used).
.TP
@@ -568,7 +571,7 @@ initializations (first one found is used).
Script used for the ":options" command, a nice way to view and set options.
.TP
/usr/local/share/vim/vim??/menu.vim
System wide menu initializations for
System wide menu initializations for
.B gVim.
.TP
/usr/local/share/vim/vim??/bugreport.vim

View File

@@ -36,11 +36,11 @@ DESCRIPTION
vim [options] [filelist]
If the filelist is missing, the editor will start with an empty buffer.
Otherwise exactly one out of the following four may be used to choose
Otherwise exactly one out of the following four may be used to choose
one or more files to be edited.
file .. A list of filenames. The first one will be the current
file and read into the buffer. The cursor will be posi
file .. A list of filenames. The first one will be the current
file and read into the buffer. The cursor will be posi
tioned on the first line of the buffer. You can get to the
other files with the ":next" command. To edit a file that
starts with a dash, precede the filelist with "--".
@@ -49,18 +49,18 @@ DESCRIPTION
from stderr, which should be a tty.
-t {tag} The file to edit and the initial cursor position depends on
a "tag", a sort of goto label. {tag} is looked up in the
a "tag", a sort of goto label. {tag} is looked up in the
tags file, the associated file becomes the current file and
the associated command is executed. Mostly this is used
for C programs, in which case {tag} could be a function
name. The effect is that the file containing that function
becomes the current file and the cursor is positioned on
becomes the current file and the cursor is positioned on
the start of the function. See ":help tag-commands".
-q [errorfile]
Start in quickFix mode. The file [errorfile] is read and
the first error is displayed. If [errorfile] is omitted,
the filename is obtained from the 'errorfile' option (de
Start in quickFix mode. The file [errorfile] is read and
the first error is displayed. If [errorfile] is omitted,
the filename is obtained from the 'errorfile' option (de
faults to "AztecC.Err" for the Amiga, "errors.err" on other
systems). Further errors can be jumped to with the ":cn"
command. See ":help quickfix".
@@ -70,10 +70,10 @@ DESCRIPTION
vim The "normal" way, everything is default.
ex Start in Ex mode. Go to Normal mode with the ":vi" command.
ex Start in Ex mode. Go to Normal mode with the ":vi" command.
Can also be done with the "-e" argument.
view Start in read-only mode. You will be protected from writing
view Start in read-only mode. You will be protected from writing
the files. Can also be done with the "-R" argument.
mvim gvim gview
@@ -124,72 +124,72 @@ OPTIONS
ists.
-d Start in diff mode. There should between two to eight file
name arguments. Vim will open all the files and show dif
name arguments. Vim will open all the files and show dif
ferences between them. Works like vimdiff(1).
-d {device}, -dev {device}
Open {device} for use as a terminal. Only on the Amiga.
Open {device} for use as a terminal. Only on the Amiga.
Example: "-d con:20/30/600/150".
-D Debugging. Go to debugging mode when executing the first
-D Debugging. Go to debugging mode when executing the first
command from a script.
-e Start Vim in Ex mode, just like the executable was called
-e Start Vim in Ex mode, just like the executable was called
"ex".
-E Start Vim in improved Ex mode, just like the executable was
called "exim".
-f Foreground. For the GUI version, Vim will not fork and de
tach from the shell it was started in. On the Amiga, Vim
is not restarted to open a new window. This option should
be used when Vim is executed by a program that will wait
for the edit session to finish (e.g. mail). On the Amiga
tach from the shell it was started in. On the Amiga, Vim
is not restarted to open a new window. This option should
be used when Vim is executed by a program that will wait
for the edit session to finish (e.g. mail). On the Amiga
the ":sh" and ":!" commands will not work.
-F If Vim has been compiled with FKMAP support for editing
right-to-left oriented files and Farsi keyboard mapping,
this option starts Vim in Farsi mode, i.e. 'fkmap' and
'rightleft' are set. Otherwise an error message is given
-F If Vim has been compiled with FKMAP support for editing
right-to-left oriented files and Farsi keyboard mapping,
this option starts Vim in Farsi mode, i.e. 'fkmap' and
'rightleft' are set. Otherwise an error message is given
and Vim aborts.
Note: Farsi support has been removed in patch 8.1.0932.
-g If Vim has been compiled with GUI support, this option en
-g If Vim has been compiled with GUI support, this option en
ables the GUI. If no GUI support was compiled in, an error
message is given and Vim aborts.
-H If Vim has been compiled with RIGHTLEFT support for editing
right-to-left oriented files and Hebrew keyboard mapping,
this option starts Vim in Hebrew mode, i.e. 'hkmap' and
'rightleft' are set. Otherwise an error message is given
right-to-left oriented files and Hebrew keyboard mapping,
this option starts Vim in Hebrew mode, i.e. 'hkmap' and
'rightleft' are set. Otherwise an error message is given
and Vim aborts.
-i {viminfo}
Specifies the filename to use when reading or writing the
viminfo file, instead of the default "~/.viminfo". This
can also be used to skip the use of the .viminfo file, by
Specifies the filename to use when reading or writing the
viminfo file, instead of the default "~/.viminfo". This
can also be used to skip the use of the .viminfo file, by
giving the name "NONE".
-l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
-L Same as -r.
-m Modifying files is disabled. Resets the 'write' option.
You can still modify the buffer, but writing a file is not
-m Modifying files is disabled. Resets the 'write' option.
You can still modify the buffer, but writing a file is not
possible.
-M Modifications not allowed. The 'modifiable' and 'write'
options will be unset, so that changes are not allowed and
files can not be written. Note that these options can be
-M Modifications not allowed. The 'modifiable' and 'write'
options will be unset, so that changes are not allowed and
files can not be written. Note that these options can be
set to enable making modifications.
-n No swap file will be used. Recovery after a crash will be
impossible. Handy if you want to edit a file on a very
slow medium (e.g. floppy). Can also be done with ":set
-n No swap file will be used. Recovery after a crash will be
impossible. Handy if you want to edit a file on a very
slow medium (e.g. floppy). Can also be done with ":set
uc=0". Can be undone with ":set uc=200".
-N No-compatible mode. Resets the 'compatible' option. This
will make Vim behave a bit better, but less Vi compatible,
-N No-compatible mode. Resets the 'compatible' option. This
will make Vim behave a bit better, but less Vi compatible,
even though a .vimrc file does not exist.
-nb Become an editor server for NetBeans. See the docs for de
@@ -198,7 +198,7 @@ OPTIONS
-o[N] Open N windows stacked. When N is omitted, open one window
for each file.
-O[N] Open N windows side by side. When N is omitted, open one
-O[N] Open N windows side by side. When N is omitted, open one
window for each file.
-p[N] Open N tab pages. When N is omitted, open one tab page for
@@ -209,15 +209,15 @@ OPTIONS
tion. When possible, Vim will run in an MDI window inside
the application. {parent-title} must appear in the window
title of the parent application. Make sure that it is spe
cific enough. Note that the implementation is still primi
tive. It won't work with all applications and the menu
cific enough. Note that the implementation is still primi
tive. It won't work with all applications and the menu
doesn't work.
-r List swap files, with information about using them for re
-r List swap files, with information about using them for re
covery.
-r {file} Recovery mode. The swap file is used to recover a crashed
editing session. The swap file is a file with the same
-r {file} Recovery mode. The swap file is used to recover a crashed
editing session. The swap file is a file with the same
filename as the text file with ".swp" appended. See ":help
recovery".
@@ -272,15 +272,15 @@ OPTIONS
-V[N]{filename}
Like -V and set 'verbosefile' to {filename}. The result is
that messages are not displayed but written to the file
that messages are not displayed but written to the file
{filename}. {filename} must not start with a digit.
-w{number} Set the 'window' option to {number}.
-w {scriptout}
All the characters that you type are recorded in the file
{scriptout}, until you exit Vim. This is useful if you
want to create a script file to be used with "vim -s" or
All the characters that you type are recorded in the file
{scriptout}, until you exit Vim. This is useful if you
want to create a script file to be used with "vim -s" or
":source!". If the {scriptout} file exists, characters are
appended.
@@ -294,33 +294,35 @@ OPTIONS
terminal, but the window title and clipboard will not be
used.
-Y Don't connect to the wayland compositor
-y Start Vim in easy mode, just like the executable was called
"evim" or "eview". Makes Vim behave like a click-and-type
"evim" or "eview". Makes Vim behave like a click-and-type
editor.
-Z Restricted mode. Works like the executable starts with
-Z Restricted mode. Works like the executable starts with
"r".
-- Denotes the end of the options. Arguments after this will
be handled as a file name. This can be used to edit a
-- Denotes the end of the options. Arguments after this will
be handled as a file name. This can be used to edit a
filename that starts with a '-'.
--clean Do not use any personal configuration (vimrc, plugins,
etc.). Useful to see if a problem reproduces with a clean
--clean Do not use any personal configuration (vimrc, plugins,
etc.). Useful to see if a problem reproduces with a clean
Vim setup.
--cmd {command}
Like using "-c", but the command is executed just before
processing any vimrc file. You can use up to 10 of these
Like using "-c", but the command is executed just before
processing any vimrc file. You can use up to 10 of these
commands, independently from "-c" commands.
--echo-wid GTK GUI only: Echo the Window ID on stdout.
--gui-dialog-file {name}
When using the GUI, instead of showing a dialog, write the
title and message of the dialog to file {name}. The file
is created or appended to. Only useful for testing, to
avoid that the test gets stuck on a dialog that can't be
When using the GUI, instead of showing a dialog, write the
title and message of the dialog to file {name}. The file
is created or appended to. Only useful for testing, to
avoid that the test gets stuck on a dialog that can't be
seen. Without the GUI the argument is ignored.
--help, -h, -?
@@ -374,7 +376,7 @@ OPTIONS
List the names of all Vim servers that can be found.
--servername {name}
Use {name} as the server name. Used for the current Vim,
Use {name} as the server name. Used for the current Vim,
unless used with a --remote argument, then it's the name of
the server to connect to.
@@ -404,12 +406,12 @@ ON-LINE HELP
FILES
/usr/local/share/vim/vim??/doc/*.txt
The Vim documentation files. Use ":help doc-file-list"
The Vim documentation files. Use ":help doc-file-list"
to get the complete list.
vim?? is short version number, like vim91 for Vim 9.1
/usr/local/share/vim/vim??/doc/tags
The tags file used for finding information in the docu
The tags file used for finding information in the docu
mentation files.
/usr/local/share/vim/vim??/syntax/syntax.vim
@@ -422,18 +424,18 @@ FILES
System wide Vim initializations.
~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc
Your personal Vim initializations (first one found is
Your personal Vim initializations (first one found is
used).
/usr/local/share/vim/gvimrc
System wide gvim initializations.
~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc
Your personal gVim initializations (first one found is
Your personal gVim initializations (first one found is
used).
/usr/local/share/vim/vim??/optwin.vim
Script used for the ":options" command, a nice way to
Script used for the ":options" command, a nice way to
view and set options.
/usr/local/share/vim/vim??/menu.vim
@@ -443,11 +445,11 @@ FILES
Script to generate a bug report. See ":help bugs".
/usr/local/share/vim/vim??/filetype.vim
Script to detect the type of a file by its name. See
Script to detect the type of a file by its name. See
":help 'filetype'".
/usr/local/share/vim/vim??/scripts.vim
Script to detect the type of a file by its contents.
Script to detect the type of a file by its contents.
See ":help 'filetype'".
/usr/local/share/vim/vim??/print/*.ps
@@ -475,4 +477,4 @@ BUGS
vi_diff.txt when in Vim). Also have a look at the 'compatible' and
'cpoptions' options.
2024 Aug 12 VIM(1)
2025 Jun 27 VIM(1)

View File

@@ -1,4 +1,4 @@
*vim9.txt* For Vim version 9.1. Last change: 2025 Mar 23
*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|
==============================================================================
@@ -1467,6 +1468,7 @@ The following builtin types are supported:
blob
list<{type}>
dict<{type}>
object<{type}>
job
channel
tuple<{type}>
@@ -1492,11 +1494,11 @@ tuple<number> a tuple with a single item of type |Number|
tuple<number, string> a tuple with two items of type |Number| and
|String|
tuple<number, float, bool> a tuple with three items of type |Number|,
|Float| and |Boolean|.
|Float| and |Boolean|
tuple<...list<number>> a variadic tuple with zero or more items of
type |Number|.
type |Number|
tuple<number, ...list<string>> a tuple with an item of type |Number| followed
by zero or more items of type |String|.
by zero or more items of type |String|
Examples: >
var myTuple: tuple<number> = (20,)
@@ -1894,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
@@ -2042,7 +2183,7 @@ The script name after `import` can be:
If the name does not end in ".vim" then the use of "as name" is required.
Once a vim9 script file has been imported, the result is cached and used the
Once a Vim9 script file has been imported, the result is cached and used the
next time the same script is imported. It will not be read again.
It is not allowed to import the same script twice, also when using two
@@ -2055,7 +2196,7 @@ line, there can be no line break: >
echo that
.name # Error!
< *import-map*
When you've imported a function from one script into a vim9 script you can
When you've imported a function from one script into a Vim9 script you can
refer to the imported function in a mapping by prefixing it with |<SID>|: >
noremap <silent> ,a :call <SID>name.Function()<CR>
@@ -2173,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
@@ -2187,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 ~

View File

@@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 16
*vim9class.txt* For Vim version 9.1. Last change: 2025 Apr 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -641,8 +641,8 @@ class, then the type of the variable is set.
The following reserved keyword names cannot be used as an object or class
variable name: "super", "this", "true", "false", "null", "null_blob",
"null_dict", "null_function", "null_list", "null_partial", "null_string",
"null_channel" and "null_job".
"null_channel", "null_class", "null_dict", "null_function", "null_job",
"null_list", "null_object", "null_partial" and "null_string".
Extending a class ~
*extends*
@@ -1067,6 +1067,21 @@ The above enum definition is equivalent to the following class definition: >
public const ordinal: number
endclass
<
A enum can contain object variables and methods just like a regular class: >
enum Color
Cyan([0, 255, 255]),
Magenta([255, 0, 255]),
Gray([128, 128, 128])
var rgb_values: list<number>
def Get_RGB(): list<number>
return this.rgb_values
enddef
endenum
echo Color.Magenta.Get_RGB()
<
==============================================================================
9. Rationale

View File

@@ -1,60 +1,119 @@
.TH VIMTUTOR 1 "2 avril 2001"
.TH VIMTUTOR 1 "3 d<>cembre 2024"
.SH NAME
vimtutor \- tutoriel Vim
.SH SYNOPSIS
.br
.B vimtutor [\-g] [langue]
.B vimtutor [\-l | \-\-language ISO639] [\-c | \-\-chapter NUM<EFBFBD>RO] [\-g | \-\-gui] [ISO639]
.br
.B vimtutor [\-h | \-\-help]
.br
.B vimtutor [\-\-list]
.SH DESCRIPTION
.B Vimtutor
.B vimtutor
lance le tutoriel
.B Vim
\.
Il copie d'abord le fichier du tutoriel, afin que vous puissiez le modifier
sans alt<6C>rer le fichier original.
.BR "Vim" "."
.PP
.B Vimtutor
est utile pour les personnes souhaitant apprendre leurs premi<6D>res commandes
.B Vim
\.
.B vimtutor
est utile pour les personnes souhaitant apprendre leurs premi<6D>res
commandes
.BR "Vim" "."
.PP
L'argument optionnel \-g lance vimtutor avec gvim plut<75>t qu'avec vim, si l'IHM
graphique de vim est disponible, ou le lance avec vim si gvim n'est pas
disponible.
L'argument optionel [ISO639] correspond aux deux ou trois lettres qui identifient
une langue, comme par exemple "it" ou "es".
.PP
L'argument optionnel [langue] est le nom d'une langue, sp<73>cifi<66>e par son
symbole <20> deux lettres, tels que "it" ou "es". Si l'argument [langue] est omis,
la langue de la r<>gion linguistique actuelle sera retenue. Si le tutoriel est
disponible dans cette langue, il est propos<6F>. Sinon, c'est la version anglaise
qui est propos<6F>e.
.B vimtutor
ne fait qu'ouvrir une copie temporaire des fichiers du tutoriel, il n'y
a donc aucun risque d'<27>craser les le<6C>ons.
.PP
.B Vim
est toujours lanc<6E> en mode Compatible Vi.
est toujours lanc<6E> en mode
.B Vi
compatible.
.PP
.SH OPTIONS
.TP
.BR \-l ", " \-\-language\ \fIISO639\fR
Les deux ou trois lettres qui d<>terminent la langue, comme
par exemple 'it', 'es' ou 'bar'.
Par d<>faut, la langue locale du syst<73>me est utilis<69>e,
ou l'anglais sinon.
.TP
.BR \-c ", " \-\-chapter\ \fINUM<EFBFBD>RO\fR
S<EFBFBD>lectionne le chapitre d<>sir<69>. Par d<>faut, c'est le premier chapitre.
.TP
.BR \-g ", " \-\-gui
Lance
.B vimtutor
avec une interface graphique de
.B Vim
si possible; sinon, revient <20> la version console.
.TP
.BR \-h ", " \-\-help
Affiche les informations d'usage.
.TP
.BR \-\-list
Affiche la liste des chapitres et des langues.
.SH EXEMPLES
Pour d<>marrer
.B vimtutor
en fran<61>ais au premier chapitre:
.PP
.nf
.RS
vimtutor fr
.RE
.fi
.PP
En anglais au chapitre deux:
.PP
.nf
.RS
vimtutor -c2
.RE
.fi
.PP
Pour lancer (avec les commandes en format long) l'interface graphique,
pour le bavarois, au premier chapitre:
.PP
.nf
.RS
vimtutor --language bar --chapter 1 --gui
.RE
.fi
.SH FICHIERS
.TP 15
/usr/local/lib/vim/tutor/tutor[.langue]
Les fichiers textes de
.B Vimtutor
/usr/local/share/vim/vim??/tutor/tutor1[.language]
Les fichiers du premier chapitre du
.B vimtutor
\.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Le script Vim utilis<69> pour copier les fichiers texte de
.B Vimtutor
/usr/local/share/vim/vim??/tutor/tutor2[.language]
Les fichiers du deuxi<78>me chapitre du
.B vimtutor
\.
.TP 15
/usr/local/share/vim/vim??/tutor/tutor.vim
Le script
.B Vim
utilis<EFBFBD> pour copier les fichier du
.B vimtutor
\.
.SH AUTEUR
.B Vimtutor
a <20>t<EFBFBD> <20>crit <20> l'origine pour Vi par Michael C. Pierce et Robert K. Ware, de la
Colorado School of Mines, en reprenant des id<69>es <20>mises par Charles Smith, de
la Colorado State University.
E-mail : bware@mines.colorado.edu.
Courriel: bware@mines.colorado.edu (ne fonctionne plus).
.br
Il a <20>t<EFBFBD> modifi<66> pour
.B Vim
par Bram Moolenaar.
Pour conna<EFBFBD>tre le nom des traducteurs, consultez les fichiers textes du
Pour connaitre le nom des traducteurs, consultez les fichiers textes du
tutoriel.
.SH VOIR AUSSI
vim(1)
.SH TRADUCTION
Cette page de manuel a <20>t<EFBFBD> traduite par David Blanchet
<david.blanchet@free.fr> 2004-12-27.
Mise <20> jour 2012-05-06, Dominique Pell<6C> <dominique.pelle@gmail.com>
Mise <20> jour 2012-05-06, Dominique Pell<6C> <dominique.pelle@gmail.com>.
Mise <20> jour 2025-06-16, Damien Lejay <damien@lejay.be>.

Some files were not shown because too many files have changed in this diff Show More