Compare commits
416 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c920d93443 | ||
|
|
4a99175e39 | ||
|
|
a65a52d684 | ||
|
|
f08ab2f4d7 | ||
|
|
2a01e59671 | ||
|
|
23c77d8ec8 | ||
|
|
f0e874a129 | ||
|
|
abecad5af0 | ||
|
|
3db4c3a20b | ||
|
|
ab24858cf5 | ||
|
|
f03155aa2a | ||
|
|
8b25d90b08 | ||
|
|
403ba303b9 | ||
|
|
8ae45e4202 | ||
|
|
d8c4774273 | ||
|
|
88b00d1c57 | ||
|
|
591db923ba | ||
|
|
f7e239bd0e | ||
|
|
bc7f736a39 | ||
|
|
7cb86f46cb | ||
|
|
b467b56ef0 | ||
|
|
ee49669e8f | ||
|
|
de7a5b5425 | ||
|
|
e85e3e5d85 | ||
|
|
bec23ef65c | ||
|
|
77b8a12f82 | ||
|
|
f281493c49 | ||
|
|
37d61dae72 | ||
|
|
29fa934344 | ||
|
|
8e41c34aba | ||
|
|
8af0f098c3 | ||
|
|
3fb5e58fbc | ||
|
|
950f501a18 | ||
|
|
702d32e161 | ||
|
|
8aecd377f0 | ||
|
|
3a9e1bb7e2 | ||
|
|
38237411e4 | ||
|
|
78302b7b4a | ||
|
|
f45ed6465d | ||
|
|
74019bea8c | ||
|
|
7784fac15f | ||
|
|
a70b7a85af | ||
|
|
51f1447d2a | ||
|
|
1b65cfbac5 | ||
|
|
852f4f43ca | ||
|
|
bfebd1209b | ||
|
|
e0781bd5bf | ||
|
|
e3d9929109 | ||
|
|
ef1ecc3b61 | ||
|
|
5ef1eec5c5 | ||
|
|
3a8b9e09b2 | ||
|
|
2020e0bade | ||
|
|
ec76ac620b | ||
|
|
6b8d2262d3 | ||
|
|
3a1ac7ced2 | ||
|
|
4f610f07b7 | ||
|
|
abd74fa122 | ||
|
|
124f8becec | ||
|
|
fbec828c7e | ||
|
|
84ae09dd79 | ||
|
|
2f00656b34 | ||
|
|
7644d9d611 | ||
|
|
9694ff58fe | ||
|
|
b207b5a2a3 | ||
|
|
c895390e58 | ||
|
|
b9871cef10 | ||
|
|
58124789aa | ||
|
|
9299332917 | ||
|
|
4cbdef8e30 | ||
|
|
0ab4316fce | ||
|
|
4bcc8ba93d | ||
|
|
c06002f3cb | ||
|
|
7ccc273a4c | ||
|
|
40fc78f0a1 | ||
|
|
88fb739918 | ||
|
|
cf947e7ef0 | ||
|
|
2bfddbea47 | ||
|
|
1903020b82 | ||
|
|
b10159bcc2 | ||
|
|
8c7d824b73 | ||
|
|
0c998003bc | ||
|
|
3bfffcc290 | ||
|
|
20a124a6e0 | ||
|
|
bb807ebc8a | ||
|
|
cb0b4cf45c | ||
|
|
9d3019104c | ||
|
|
77677c33de | ||
|
|
190cb3c2b9 | ||
|
|
fde5a56ecb | ||
|
|
5c700152ae | ||
|
|
3bd25c63b4 | ||
|
|
e1e92fea92 | ||
|
|
2219c89013 | ||
|
|
e25933014c | ||
|
|
e4413c5df7 | ||
|
|
59e59a62b4 | ||
|
|
7b218ae98c | ||
|
|
cf5d7102b9 | ||
|
|
d25f8d1b2c | ||
|
|
ec8b8bd82a | ||
|
|
587447ec64 | ||
|
|
ba85f88fe9 | ||
|
|
7f3243e3a8 | ||
|
|
7da90de1cb | ||
|
|
f793e98068 | ||
|
|
620557bd48 | ||
|
|
e7e35b9e38 | ||
|
|
77499e009a | ||
|
|
3ac7b97439 | ||
|
|
bd8716178e | ||
|
|
20e98ff1cc | ||
|
|
af494af5ff | ||
|
|
c2bda0add9 | ||
|
|
6453a7c440 | ||
|
|
458fed4f65 | ||
|
|
c5de8231f4 | ||
|
|
bd0f3e6da5 | ||
|
|
41c3379bdf | ||
|
|
e7745b7cbf | ||
|
|
6146f3382f | ||
|
|
30b4240730 | ||
|
|
6cb4173294 | ||
|
|
e47daed442 | ||
|
|
2d43240659 | ||
|
|
7e76514896 | ||
|
|
ae196b2d58 | ||
|
|
3958188f6a | ||
|
|
f1a9449206 | ||
|
|
7070a85d94 | ||
|
|
0bc64b19a2 | ||
|
|
dd9b31fb62 | ||
|
|
a622dda915 | ||
|
|
96be27309c | ||
|
|
036e40e6d8 | ||
|
|
22aedc4a90 | ||
|
|
076366bd4e | ||
|
|
c23bfd7922 | ||
|
|
3cc7d50716 | ||
|
|
1ce03d674a | ||
|
|
2baef82cd1 | ||
|
|
bf6892aaab | ||
|
|
0ca1121d1f | ||
|
|
8d9c383aaf | ||
|
|
8f9cde4592 | ||
|
|
807f2cd789 | ||
|
|
1de887681d | ||
|
|
e7eef554f3 | ||
|
|
0c2ac3480a | ||
|
|
32a30cb5a0 | ||
|
|
1940bcb243 | ||
|
|
5f7c52408f | ||
|
|
10b57290d3 | ||
|
|
0f9218851d | ||
|
|
521eac1877 | ||
|
|
44f707da6a | ||
|
|
f194676c93 | ||
|
|
cee8fd73eb | ||
|
|
2ea4a7c3b7 | ||
|
|
10040bc9cd | ||
|
|
33f3965087 | ||
|
|
3918f3232f | ||
|
|
16d28548d2 | ||
|
|
d4fb31762e | ||
|
|
405e2fb6d5 | ||
|
|
d0b6ee320b | ||
|
|
ec3f79e037 | ||
|
|
b328686d6a | ||
|
|
fe3c27ce0b | ||
|
|
146d5da0d1 | ||
|
|
3c3050e648 | ||
|
|
f74a41620b | ||
|
|
c9d4c1dc43 | ||
|
|
c62342e5cf | ||
|
|
49e8630a28 | ||
|
|
73ba353c9d | ||
|
|
1c88aee1fa | ||
|
|
b30803b231 | ||
|
|
2c436be6f7 | ||
|
|
6ecff78129 | ||
|
|
c13232699d | ||
|
|
723c0acf25 | ||
|
|
237d77e07c | ||
|
|
1966a1c896 | ||
|
|
618a327ce6 | ||
|
|
f2e920321c | ||
|
|
0e31fb024c | ||
|
|
336533b355 | ||
|
|
01d9a1951f | ||
|
|
30d42855eb | ||
|
|
e666597622 | ||
|
|
68d3129a05 | ||
|
|
8bcae3ca5d | ||
|
|
6b26afea3b | ||
|
|
450895d86b | ||
|
|
1c299f2631 | ||
|
|
25e9fc44a8 | ||
|
|
b076c49282 | ||
|
|
ab02d65b1f | ||
|
|
21c0cd29f8 | ||
|
|
e6a84bb6b0 | ||
|
|
c78194e41d | ||
|
|
a414630393 | ||
|
|
490b737f3e | ||
|
|
0e02be1919 | ||
|
|
2041478e2a | ||
|
|
7cc73a6c66 | ||
|
|
60e925ca0e | ||
|
|
2252d2c1e5 | ||
|
|
bfa46a52f6 | ||
|
|
351a16c88f | ||
|
|
4c28794716 | ||
|
|
c72196529b | ||
|
|
91b402f575 | ||
|
|
f9cb0d14dc | ||
|
|
39875daec2 | ||
|
|
c4fe1e958a | ||
|
|
efbd482116 | ||
|
|
962a540d76 | ||
|
|
4b6f3f1d16 | ||
|
|
9d95410aa4 | ||
|
|
c922202ea2 | ||
|
|
fcc4276db3 | ||
|
|
6836599733 | ||
|
|
86dcb1878c | ||
|
|
efedcd1e6f | ||
|
|
dc4734448b | ||
|
|
105d65e29b | ||
|
|
86ae6858ab | ||
|
|
0802e00f2a | ||
|
|
8fd37e42a6 | ||
|
|
01be43047f | ||
|
|
e29f33ef51 | ||
|
|
71c10dcd58 | ||
|
|
dd40b1af5b | ||
|
|
871e6c6cf9 | ||
|
|
01e9670212 | ||
|
|
7e0eb5271e | ||
|
|
07faa961a0 | ||
|
|
2fbc69c9ad | ||
|
|
158947e294 | ||
|
|
d42b047f78 | ||
|
|
6c16ccaf61 | ||
|
|
f554a7c709 | ||
|
|
959817472d | ||
|
|
4a1bcc67b4 | ||
|
|
00285c035a | ||
|
|
3e2012914e | ||
|
|
9d9381fb28 | ||
|
|
c23aebdf99 | ||
|
|
72cefe6b72 | ||
|
|
3e194b1068 | ||
|
|
c2734dc03c | ||
|
|
3d224e42e7 | ||
|
|
ea7bf9aa8a | ||
|
|
ff41e9d853 | ||
|
|
c79edc0df9 | ||
|
|
317351c745 | ||
|
|
f3cba4a205 | ||
|
|
15e988810e | ||
|
|
fd836aab13 | ||
|
|
7ab76a8604 | ||
|
|
794c304479 | ||
|
|
8d23fcb603 | ||
|
|
c3c3478810 | ||
|
|
aef812446b | ||
|
|
a5b6c2d6e9 | ||
|
|
c4921023b1 | ||
|
|
f9981bbc8e | ||
|
|
4368ad34df | ||
|
|
f1dbca200c | ||
|
|
ea5084d1f1 | ||
|
|
002fddecde | ||
|
|
78954f86c2 | ||
|
|
48581f2ba9 | ||
|
|
365d58a539 | ||
|
|
b03970f41f | ||
|
|
a1f4259e68 | ||
|
|
ab4ebb62ee | ||
|
|
f07a1ed903 | ||
|
|
9e041457a5 | ||
|
|
46f530e517 | ||
|
|
5943c57173 | ||
|
|
3c79e33aeb | ||
|
|
77e7a40af2 | ||
|
|
18cd55dbc4 | ||
|
|
08bd9114c1 | ||
|
|
22db4a3c57 | ||
|
|
bd8b6c6b05 | ||
|
|
bc182ae56e | ||
|
|
a9d01da661 | ||
|
|
cb51add7ae | ||
|
|
b7205b6426 | ||
|
|
23be1889d1 | ||
|
|
af58a9f5e9 | ||
|
|
71a0a552cf | ||
|
|
863e85e00a | ||
|
|
aca677de0e | ||
|
|
ff6f277a4d | ||
|
|
28e75c5f31 | ||
|
|
b7cffc8434 | ||
|
|
880cf88ea6 | ||
|
|
9d83ca5ca2 | ||
|
|
b2fbb7c32d | ||
|
|
12f6f20552 | ||
|
|
964b7b5d7b | ||
|
|
0646047b68 | ||
|
|
b2ff915fe4 | ||
|
|
c91081d0e5 | ||
|
|
7088926316 | ||
|
|
fe05143f5d | ||
|
|
b2e55ed1d6 | ||
|
|
3e60f03d94 | ||
|
|
2c976d0de4 | ||
|
|
82ebaa79b0 | ||
|
|
8c8772c6b3 | ||
|
|
52169dbc28 | ||
|
|
75661a66a1 | ||
|
|
4cc3ab7401 | ||
|
|
309332a32e | ||
|
|
ac18dff65a | ||
|
|
e4502b6037 | ||
|
|
f4f175332c | ||
|
|
12c6417587 | ||
|
|
374f06ffd8 | ||
|
|
b5efce0765 | ||
|
|
e551e71d7e | ||
|
|
70afdfc127 | ||
|
|
068c0604c9 | ||
|
|
91900b9a5c | ||
|
|
aa5c9310f5 | ||
|
|
84a8ee4353 | ||
|
|
664701eb75 | ||
|
|
3c0f8000e1 | ||
|
|
211ceea602 | ||
|
|
b8a653a377 | ||
|
|
30bac359dc | ||
|
|
466b5f531a | ||
|
|
8ea5f27745 | ||
|
|
f89662722d | ||
|
|
d13f135295 | ||
|
|
8e29c35a04 | ||
|
|
80a0c355cf | ||
|
|
54b6c0c0e7 | ||
|
|
575961c791 | ||
|
|
f6e1dd11f4 | ||
|
|
b90145672d | ||
|
|
02abcf381f | ||
|
|
06aa378056 | ||
|
|
96898d7324 | ||
|
|
7cb43f286e | ||
|
|
bf21df1c7b | ||
|
|
a8fdfd4fcb | ||
|
|
68b3585e1d | ||
|
|
c84526dd29 | ||
|
|
be7ef8a19e | ||
|
|
e09000a786 | ||
|
|
30f012d8bc | ||
|
|
bde5832216 | ||
|
|
af3ccc2845 | ||
|
|
c0f0a34ea3 | ||
|
|
418400075a | ||
|
|
1578ea9d97 | ||
|
|
e2cf84d0a0 | ||
|
|
0effd2faf9 | ||
|
|
a4c0119786 | ||
|
|
742e8722b3 | ||
|
|
b435da0b4f | ||
|
|
955c02dff7 | ||
|
|
9c0d057e3d | ||
|
|
4292eea714 | ||
|
|
9a2260d6cf | ||
|
|
25f6539645 | ||
|
|
a603175c6c | ||
|
|
abd2d7d453 | ||
|
|
c9eaff0a8a | ||
|
|
8c116bbe79 | ||
|
|
3abbe31fe0 | ||
|
|
347e8c1e7d | ||
|
|
3d472d8675 | ||
|
|
0172ff5542 | ||
|
|
196cf9f644 | ||
|
|
1fe0d1e8f5 | ||
|
|
6463c32e20 | ||
|
|
243dcd1bcb | ||
|
|
0b257ecb90 | ||
|
|
aeb716ea77 | ||
|
|
48137e4e48 | ||
|
|
e147b635fc | ||
|
|
9e55474849 | ||
|
|
de10c87bed | ||
|
|
e2f4e18437 | ||
|
|
5a3b75d67b | ||
|
|
03e89ccf33 | ||
|
|
2f8bd14198 | ||
|
|
9774651ecf | ||
|
|
8e0483c2f4 | ||
|
|
60edf94c4e | ||
|
|
68f9dedba4 | ||
|
|
b3d8a0f349 | ||
|
|
890d5fd138 | ||
|
|
2b7b745bb5 | ||
|
|
b1a247d659 | ||
|
|
3ee2b76ba1 | ||
|
|
c4d2fa018c | ||
|
|
b3dba929cb | ||
|
|
88cded7ac0 | ||
|
|
ce4fbda992 | ||
|
|
076404ae41 | ||
|
|
c9e5aeff35 | ||
|
|
332dd22ed4 | ||
|
|
67ae763557 | ||
|
|
6391a38e5e | ||
|
|
f445ed0d56 | ||
|
|
a907a7f73b | ||
|
|
4d262b4952 | ||
|
|
53884ba7a8 |
6
.github/MAINTAINERS
vendored
6
.github/MAINTAINERS
vendored
@@ -80,6 +80,7 @@ runtime/compiler/jjs.vim @dkearns
|
||||
runtime/compiler/jq.vim @vito-c
|
||||
runtime/compiler/jshint.vim @dkearns
|
||||
runtime/compiler/jsonlint.vim @dkearns
|
||||
runtime/compiler/just.vim @Alarcritty
|
||||
runtime/compiler/make.vim @Konfekt
|
||||
runtime/compiler/mypy.vim @Konfekt
|
||||
runtime/compiler/pandoc.vim @Konfekt
|
||||
@@ -132,6 +133,7 @@ runtime/doc/xxd-ru.1 @RestorerZ
|
||||
runtime/doc/xxd-ru.UTF-8.1 @RestorerZ
|
||||
runtime/ftplugin/abaqus.vim @costerwi
|
||||
runtime/ftplugin/abnf.vim @A4-Tacks
|
||||
runtime/ftplugin/algol68.vim @dkearns
|
||||
runtime/ftplugin/antlr4.vim @jiangyinzuo
|
||||
runtime/ftplugin/apache.vim @dubgeiser
|
||||
runtime/ftplugin/arduino.vim @k-takata
|
||||
@@ -349,6 +351,7 @@ runtime/ftplugin/vdf.vim @ObserverOfTime
|
||||
runtime/ftplugin/vim.vim @dkearns
|
||||
runtime/ftplugin/wget.vim @dkearns
|
||||
runtime/ftplugin/wget2.vim @dkearns
|
||||
runtime/ftplugin/wks.vim @anakin4747
|
||||
runtime/ftplugin/xcompose.vim @ObserverOfTime
|
||||
runtime/ftplugin/xml.vim @chrisbra
|
||||
runtime/ftplugin/xs.vim @petdance
|
||||
@@ -470,6 +473,8 @@ runtime/syntax/shared/hgcommitDiff.vim @vegerot
|
||||
runtime/syntax/abaqus.vim @costerwi
|
||||
runtime/syntax/abnf.vim @A4-Tacks
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/algol68.vim @dkearns
|
||||
runtime/syntax/amiga.vim @sodero
|
||||
runtime/syntax/ant.vim @dkearns
|
||||
runtime/syntax/antlr4.vim @jiangyinzuo
|
||||
runtime/syntax/arduino.vim @johshoff
|
||||
@@ -709,6 +714,7 @@ runtime/syntax/vroom.vim @dbarnett
|
||||
runtime/syntax/wdl.vim @zenmatic
|
||||
runtime/syntax/wget.vim @dkearns
|
||||
runtime/syntax/wget2.vim @dkearns
|
||||
runtime/syntax/wks.vim @anakin4747
|
||||
runtime/syntax/xbl.vim @dkearns
|
||||
runtime/syntax/xcompose.vim @ObserverOfTime
|
||||
runtime/syntax/xml.vim @chrisbra
|
||||
|
||||
324
.github/actions/build_vim_on_linux/action.yml
vendored
Normal file
324
.github/actions/build_vim_on_linux/action.yml
vendored
Normal file
@@ -0,0 +1,324 @@
|
||||
name: Build Vim on Linux
|
||||
description: Build Vim on Linux
|
||||
|
||||
inputs:
|
||||
features:
|
||||
description: Vim features
|
||||
required: true
|
||||
compiler:
|
||||
description: Compiler
|
||||
required: true
|
||||
architecture:
|
||||
description: Architecture
|
||||
required: false
|
||||
extra:
|
||||
description: Extra flags
|
||||
required: true
|
||||
shadow:
|
||||
description: Shadow directory
|
||||
required: false
|
||||
interface:
|
||||
description: Interface of language interpreter
|
||||
required: false
|
||||
lua_ver:
|
||||
description: Lua version
|
||||
required: false
|
||||
python3:
|
||||
description: Python3 ABI type
|
||||
required: false
|
||||
coverage:
|
||||
description: Enable coverage
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Check Filelist (for packaging)
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Check Filelist (for packaging)'
|
||||
# If any files in the repository are not listed in Filelist this will
|
||||
# exit with an error code and list the missing entries.
|
||||
make -f ci/unlisted.make
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Check hlgroups (are any new hlgroups added, but not handled in highlight.c)
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Check hlgroups (are any new hlgroups added, but not handled in highlight.c)'
|
||||
# If any highlight groups have been documented, but not handled in
|
||||
# highlight.c, nor listed as 'intentionally left out' in hlgroups.ignore,
|
||||
# exit with an error code and list the missing entries.
|
||||
make -C ci -f hlgroups.make
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Report executable syntax tests
|
||||
if: contains(fromJSON(inputs.extra), 'syn_test_execs')
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Report executable syntax tests'
|
||||
# Search and list all found executable syntax tests, and exit with
|
||||
# an error code.
|
||||
make -C runtime/syntax executables
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Add i386 packages to dpkg
|
||||
if: inputs.architecture == 'i386'
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Add i386 packages to dpkg'
|
||||
sudo dpkg --add-architecture i386
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Uninstall snap
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Uninstall snap'
|
||||
sudo bash ci/remove_snap.sh
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Enable debug packages
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Enable debug packages'
|
||||
# Some of the ASAN suppressions are in libraries linked with dlopen
|
||||
# and symbolization of them requires these debug packages.
|
||||
sudo apt install ubuntu-dbgsym-keyring
|
||||
sudo cp ci/ddebs.list /etc/apt/sources.list.d/ddebs.list
|
||||
sudo cp ci/pinned-pkgs /etc/apt/preferences.d/pinned-pkgs
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Install packages
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Install packages'
|
||||
# This is added by default, and it is often broken, but we don't need anything from it
|
||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
PKGS=( \
|
||||
gettext \
|
||||
x11-utils \
|
||||
labwc \
|
||||
wl-clipboard \
|
||||
wayland-utils \
|
||||
libgtk-3-dev:${{ inputs.architecture }} \
|
||||
libgtk-3-bin:${{ inputs.architecture }} \
|
||||
desktop-file-utils \
|
||||
libc6-dbgsym:${{ inputs.architecture }} \
|
||||
libtool-bin \
|
||||
libncurses-dev:${{ inputs.architecture }} \
|
||||
libxt-dev:${{ inputs.architecture }} \
|
||||
libegl-mesa0:${{ inputs.architecture }} \
|
||||
libegl1:${{ inputs.architecture }} \
|
||||
libegl1-mesa-dev:${{ inputs.architecture }} \
|
||||
libepoxy-dev:${{ inputs.architecture }} \
|
||||
libwayland-egl1:${{ inputs.architecture }} \
|
||||
libwayland-client0:${{ inputs.architecture }} \
|
||||
libwayland-cursor0:${{ inputs.architecture }} \
|
||||
locales-all \
|
||||
software-properties-common \
|
||||
)
|
||||
if ${{ contains(fromJSON(inputs.extra), 'asan') }} && ${{ contains(inputs.architecture, 'native') }}; then
|
||||
PKGS+=( \
|
||||
libepoxy0-dbgsym:${{ inputs.architecture }} \
|
||||
libxdamage1-dbgsym:${{ inputs.architecture }} \
|
||||
libxcb1-dbgsym:${{ inputs.architecture }} \
|
||||
libgtk-3-bin-dbgsym:${{ inputs.architecture }} \
|
||||
libgtk-3-0t64-dbgsym:${{ inputs.architecture }} \
|
||||
libglib2.0-0t64-dbgsym:${{ inputs.architecture }} \
|
||||
libglib2.0-bin-dbgsym:${{ inputs.architecture }} \
|
||||
libglib2.0-dev-bin-dbgsym:${{ inputs.architecture }} \
|
||||
)
|
||||
fi
|
||||
if ${{ inputs.features == 'huge' }}; then
|
||||
LUA_VER=${{ inputs.lua_ver || '5.4' }}
|
||||
PKGS+=( \
|
||||
autoconf \
|
||||
gdb \
|
||||
lcov \
|
||||
libcanberra-dev \
|
||||
libperl-dev \
|
||||
python3-dev \
|
||||
liblua${LUA_VER}-dev \
|
||||
lua${LUA_VER} \
|
||||
ruby-dev \
|
||||
tcl-dev \
|
||||
cscope \
|
||||
libsodium-dev \
|
||||
attr \
|
||||
libattr1-dev
|
||||
)
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'proto') }}; then
|
||||
PKGS+=( python3-clang )
|
||||
fi
|
||||
sudo apt-get update && sudo apt-get upgrade -y --allow-downgrades && sudo apt-get install -y --allow-downgrades "${PKGS[@]}"
|
||||
|
||||
- name: Install gcc-${{ env.GCC_VER }}
|
||||
if: inputs.compiler == 'gcc'
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Install gcc-${{ env.GCC_VER }}'
|
||||
# ubuntu-toolchain-r/test PPA for gcc-13 compiler
|
||||
# disabled because the installation failed, causing test failures
|
||||
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ inputs.architecture }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
|
||||
sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Install clang-${{ env.CLANG_VER }}
|
||||
if: inputs.compiler == 'clang'
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Install clang-${{ env.CLANG_VER }}'
|
||||
. /etc/lsb-release
|
||||
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
|
||||
echo "Types: deb
|
||||
URIs: https://apt.llvm.org/${DISTRIB_CODENAME}/
|
||||
Suites: llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }}
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/llvm-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/llvm-toolchain.sources > /dev/null
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${{ env.CLANG_VER }} 100
|
||||
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-${{ env.CLANG_VER }} 100
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Set up environment
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Set up environment'
|
||||
mkdir -p "${LOG_DIR}"
|
||||
mkdir -p "${HOME}/bin"
|
||||
echo "${HOME}/bin" >> $GITHUB_PATH
|
||||
(
|
||||
echo "LINUX_VERSION=$(uname -r)"
|
||||
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
|
||||
echo "TMPDIR=$(mktemp -d -p /tmp)"
|
||||
|
||||
case "${{ inputs.features }}" in
|
||||
tiny)
|
||||
echo "TEST=testtiny"
|
||||
if ${{ contains(fromJSON(inputs.extra), 'nogui') }}; then
|
||||
CONFOPT="--disable-gui"
|
||||
fi
|
||||
;;
|
||||
normal)
|
||||
;;
|
||||
huge)
|
||||
echo "TEST=scripttests test_libvterm indenttest syntaxtest"
|
||||
INTERFACE=${{ inputs.interface || 'yes' }}
|
||||
if ${{ inputs.python3 == 'stable-abi' }}; then
|
||||
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
|
||||
fi
|
||||
# The ubuntu-24.04 CI runner does not provide a python2 package.
|
||||
CONFOPT="--enable-perlinterp=${INTERFACE} --enable-pythoninterp=no --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if ${{ contains(fromJSON(inputs.extra), 'no_x11_wl') }}; then
|
||||
CONFOPT="${CONFOPT} --without-x --disable-gui --without-wayland --enable-socketserver"
|
||||
fi
|
||||
if ${{ inputs.coverage == true }}; then
|
||||
CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
|
||||
echo "LDFLAGS=--coverage"
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'uchar') }}; then
|
||||
CFLAGS="${CFLAGS} -funsigned-char"
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'testgui') }}; then
|
||||
echo "TEST=-C src testgui"
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'unittests') }}; then
|
||||
echo "TEST=unittests"
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'asan') }}; then
|
||||
echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
|
||||
echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
|
||||
echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
|
||||
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'vimtags') }}; then
|
||||
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
|
||||
fi
|
||||
if ${{ contains(fromJSON(inputs.extra), 'proto') }}; then
|
||||
echo "TEST=-C src protoclean proto"
|
||||
fi
|
||||
echo "CFLAGS=${CFLAGS}"
|
||||
echo "CONFOPT=${CONFOPT}"
|
||||
# Disables GTK attempt to integrate with the accessibility service that does run in CI.
|
||||
echo "NO_AT_BRIDGE=1"
|
||||
) >> $GITHUB_ENV
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Set up system
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Set up system'
|
||||
if [[ ${CC} = clang ]]; then
|
||||
# Use llvm-cov instead of gcov when compiler is clang.
|
||||
ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
|
||||
fi
|
||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||
sudo usermod -a -G audio "${USER}"
|
||||
sudo bash ci/setup-xvfb.sh
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Check autoconf
|
||||
if: contains(fromJSON(inputs.extra), 'unittests')
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Check autoconf'
|
||||
make -C src autoconf
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Set up shadow dir
|
||||
if: inputs.shadow
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Set up shadow dir'
|
||||
make -C src shadow
|
||||
echo "SRCDIR=${{ inputs.shadow }}" >> $GITHUB_ENV
|
||||
echo "SHADOWOPT=-C ${{ inputs.shadow }}" >> $GITHUB_ENV
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Configure'
|
||||
./configure --with-features=${{ inputs.features }} ${CONFOPT} --enable-fail-if-missing
|
||||
# Append various warning flags to CFLAGS.
|
||||
sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
|
||||
sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
|
||||
if [[ ${CC} = clang ]]; then
|
||||
# Suppress some warnings produced by clang 12 and later.
|
||||
sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Build
|
||||
if: (!contains(fromJSON(inputs.extra), 'unittests'))
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Build'
|
||||
make ${SHADOWOPT} -j${NPROC}
|
||||
echo '::endgroup::'
|
||||
|
||||
- name: Check version
|
||||
if: (!contains(fromJSON(inputs.extra), 'unittests'))
|
||||
shell: bash
|
||||
run: |
|
||||
echo '::group::Check version'
|
||||
"${SRCDIR}"/vim --version
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
if ${{ inputs.features == 'huge' }}; then
|
||||
# Also check that optional and dynamic features are configured and working
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 \
|
||||
-c "let g:required=['gettext', 'sodium', 'sound', 'perl', 'python3', 'lua', 'ruby', 'tcl']" \
|
||||
-S ci/if_feat_check.vim -c quit
|
||||
fi
|
||||
echo '::endgroup::'
|
||||
11
.github/actions/test_artifacts/action.yml
vendored
11
.github/actions/test_artifacts/action.yml
vendored
@@ -1,10 +1,10 @@
|
||||
name: 'test_artifacts'
|
||||
name: "test_artifacts"
|
||||
description: "Upload failed test artifacts"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Collect matrix properties for naming
|
||||
uses: actions/github-script@v8
|
||||
uses: actions/github-script@v9
|
||||
id: matrix-props
|
||||
env:
|
||||
MATRIX_PROPS: ${{ toJSON(matrix) }}
|
||||
@@ -40,9 +40,10 @@ runs:
|
||||
# A file, directory or wildcard pattern that describes what
|
||||
# to upload.
|
||||
path: |
|
||||
${{ github.workspace }}/runtime/indent/testdir/*.fail
|
||||
${{ github.workspace }}/runtime/syntax/testdir/failed/*
|
||||
${{ github.workspace }}/src/testdir/failed/*
|
||||
${{ github.workspace }}/logs/**/*.symbolized
|
||||
${{ github.workspace }}/runtime/indent/testdir/*.fail
|
||||
${{ github.workspace }}/runtime/syntax/testdir/failed/*
|
||||
${{ github.workspace }}/src/testdir/failed/*
|
||||
# The desired behavior if no files are found using the
|
||||
# provided path.
|
||||
if-no-files-found: ignore
|
||||
|
||||
363
.github/workflows/ci.yml
vendored
363
.github/workflows/ci.yml
vendored
@@ -2,7 +2,7 @@ name: GitHub CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
branches: ["**"]
|
||||
pull_request:
|
||||
|
||||
# Cancels all previous workflow runs for pull requests that have not completed.
|
||||
@@ -22,13 +22,13 @@ jobs:
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
GCC_VER: 14
|
||||
CLANG_VER: 21
|
||||
CLANG_VER: 22
|
||||
TEST: test
|
||||
SRCDIR: ./src
|
||||
LEAK_CFLAGS: -DEXITFREE
|
||||
LOG_DIR: ${{ github.workspace }}/logs
|
||||
TERM: xterm
|
||||
DISPLAY: ':99'
|
||||
DISPLAY: ":99"
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
strategy:
|
||||
@@ -67,12 +67,6 @@ jobs:
|
||||
coverage: true
|
||||
interface: dynamic
|
||||
extra: [uchar, testgui]
|
||||
- features: huge
|
||||
compiler: clang
|
||||
# Lua5.1 is the most widely used version (since it's what LuaJIT is
|
||||
# compatible with), so ensure it works
|
||||
lua_ver: '5.1'
|
||||
extra: [asan]
|
||||
- features: huge
|
||||
compiler: gcc
|
||||
coverage: true
|
||||
@@ -90,254 +84,26 @@ jobs:
|
||||
extra: [no_x11_wl]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
- name: Checkout repository from GitHub
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Check Filelist (for packaging)
|
||||
run: |
|
||||
# If any files in the repository are not listed in Filelist this will
|
||||
# exit with an error code and list the missing entries.
|
||||
make -f ci/unlisted.make
|
||||
|
||||
- name: Check hlgroups (are any new hlgroups added, but not handled in highlight.c)
|
||||
run: |
|
||||
# If any highlight groups have been documented, but not handled in
|
||||
# highlight.c, nor listed as 'intentionally left out' in hlgroups.ignore,
|
||||
# exit with an error code and list the missing entries.
|
||||
make -C ci -f hlgroups.make
|
||||
|
||||
- name: Report executable syntax tests
|
||||
if: contains(matrix.extra, 'syn_test_execs')
|
||||
run: |
|
||||
# Search and list all found executable syntax tests, and exit with
|
||||
# an error code.
|
||||
make -C runtime/syntax executables
|
||||
|
||||
- run: sudo dpkg --add-architecture i386
|
||||
if: matrix.architecture == 'i386'
|
||||
|
||||
- name: Uninstall snap
|
||||
run: |
|
||||
sudo bash ci/remove_snap.sh
|
||||
|
||||
- name: Enable debug packages
|
||||
run: |
|
||||
# Some of the ASAN suppressions are in libraries linked with dlopen
|
||||
# and symbolization of them requires these debug packages.
|
||||
sudo apt install ubuntu-dbgsym-keyring
|
||||
sudo cp ci/ddebs.list /etc/apt/sources.list.d/ddebs.list
|
||||
sudo cp ci/pinned-pkgs /etc/apt/preferences.d/pinned-pkgs
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
# This is added by default, and it is often broken, but we don't need anything from it
|
||||
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
|
||||
PKGS=( \
|
||||
gettext \
|
||||
x11-utils \
|
||||
labwc \
|
||||
wl-clipboard \
|
||||
wayland-utils \
|
||||
libgtk-3-dev:${{ matrix.architecture }} \
|
||||
libgtk-3-bin:${{ matrix.architecture }} \
|
||||
desktop-file-utils \
|
||||
libc6-dbgsym:${{ matrix.architecture }} \
|
||||
libtool-bin \
|
||||
libncurses-dev:${{ matrix.architecture }} \
|
||||
libxt-dev:${{ matrix.architecture }} \
|
||||
libegl-mesa0:${{ matrix.architecture }} \
|
||||
libegl1:${{ matrix.architecture }} \
|
||||
libegl1-mesa-dev:${{ matrix.architecture }} \
|
||||
libepoxy-dev:${{ matrix.architecture }} \
|
||||
libwayland-egl1:${{ matrix.architecture }} \
|
||||
libwayland-client0:${{ matrix.architecture }} \
|
||||
libwayland-cursor0:${{ matrix.architecture }} \
|
||||
locales-all \
|
||||
software-properties-common \
|
||||
)
|
||||
if ${{ contains(matrix.extra, 'asan') }} && ${{ contains(matrix.architecture, 'native') }}; then
|
||||
PKGS+=( \
|
||||
libepoxy0-dbgsym:${{ matrix.architecture }} \
|
||||
libxdamage1-dbgsym:${{ matrix.architecture }} \
|
||||
libxcb1-dbgsym:${{ matrix.architecture }} \
|
||||
libgtk-3-bin-dbgsym:${{ matrix.architecture }} \
|
||||
libgtk-3-0t64-dbgsym:${{ matrix.architecture }} \
|
||||
libglib2.0-0t64-dbgsym:${{ matrix.architecture }} \
|
||||
libglib2.0-bin-dbgsym:${{ matrix.architecture }} \
|
||||
libglib2.0-dev-bin-dbgsym:${{ matrix.architecture }} \
|
||||
)
|
||||
fi
|
||||
if ${{ matrix.features == 'huge' }}; then
|
||||
LUA_VER=${{ matrix.lua_ver || '5.4' }}
|
||||
PKGS+=( \
|
||||
autoconf \
|
||||
gdb \
|
||||
lcov \
|
||||
libcanberra-dev \
|
||||
libperl-dev \
|
||||
python3-dev \
|
||||
liblua${LUA_VER}-dev \
|
||||
lua${LUA_VER} \
|
||||
ruby-dev \
|
||||
tcl-dev \
|
||||
cscope \
|
||||
libsodium-dev \
|
||||
attr \
|
||||
libattr1-dev
|
||||
)
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'proto') }}; then
|
||||
PKGS+=( python3-clang )
|
||||
fi
|
||||
sudo apt-get update && sudo apt-get upgrade -y --allow-downgrades && sudo apt-get install -y --allow-downgrades "${PKGS[@]}"
|
||||
|
||||
- name: Install gcc-${{ env.GCC_VER }}
|
||||
if: matrix.compiler == 'gcc'
|
||||
run: |
|
||||
# ubuntu-toolchain-r/test PPA for gcc-13 compiler
|
||||
# disabled because the installation failed, causing test failures
|
||||
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ matrix.architecture }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
|
||||
sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}
|
||||
|
||||
- name: Install clang-${{ env.CLANG_VER }}
|
||||
if: matrix.compiler == 'clang'
|
||||
run: |
|
||||
. /etc/lsb-release
|
||||
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
|
||||
echo "Types: deb
|
||||
URIs: https://apt.llvm.org/${DISTRIB_CODENAME}/
|
||||
Suites: llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }}
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/llvm-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/llvm-toolchain.sources > /dev/null
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-${{ env.CLANG_VER }} 100
|
||||
sudo update-alternatives --install /usr/bin/asan_symbolize asan_symbolize /usr/bin/asan_symbolize-${{ env.CLANG_VER }} 100
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
mkdir -p "${LOG_DIR}"
|
||||
mkdir -p "${HOME}/bin"
|
||||
echo "${HOME}/bin" >> $GITHUB_PATH
|
||||
(
|
||||
echo "LINUX_VERSION=$(uname -r)"
|
||||
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
|
||||
echo "TMPDIR=$(mktemp -d -p /tmp)"
|
||||
|
||||
case "${{ matrix.features }}" in
|
||||
tiny)
|
||||
echo "TEST=testtiny"
|
||||
if ${{ contains(matrix.extra, 'nogui') }}; then
|
||||
CONFOPT="--disable-gui"
|
||||
fi
|
||||
;;
|
||||
normal)
|
||||
;;
|
||||
huge)
|
||||
echo "TEST=scripttests test_libvterm indenttest syntaxtest"
|
||||
INTERFACE=${{ matrix.interface || 'yes' }}
|
||||
if ${{ matrix.python3 == 'stable-abi' }}; then
|
||||
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
|
||||
fi
|
||||
# The ubuntu-24.04 CI runner does not provide a python2 package.
|
||||
CONFOPT="--enable-perlinterp=${INTERFACE} --enable-pythoninterp=no --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
|
||||
;;
|
||||
esac
|
||||
|
||||
if ${{ contains(matrix.extra, 'no_x11_wl') }}; then
|
||||
CONFOPT="${CONFOPT} --without-x --disable-gui --without-wayland --enable-socketserver"
|
||||
fi
|
||||
if ${{ matrix.coverage == true }}; then
|
||||
CFLAGS="${CFLAGS} --coverage -DUSE_GCOV_FLUSH"
|
||||
echo "LDFLAGS=--coverage"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'uchar') }}; then
|
||||
CFLAGS="${CFLAGS} -funsigned-char"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'testgui') }}; then
|
||||
echo "TEST=-C src testgui"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'unittests') }}; then
|
||||
echo "TEST=unittests"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'asan') }}; then
|
||||
echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
|
||||
echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
|
||||
echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
|
||||
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'vimtags') }}; then
|
||||
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'proto') }}; then
|
||||
echo "TEST=-C src protoclean proto"
|
||||
fi
|
||||
echo "CFLAGS=${CFLAGS}"
|
||||
echo "CONFOPT=${CONFOPT}"
|
||||
# Disables GTK attempt to integrate with the accessibility service that does run in CI.
|
||||
echo "NO_AT_BRIDGE=1"
|
||||
) >> $GITHUB_ENV
|
||||
|
||||
- name: Set up system
|
||||
run: |
|
||||
if [[ ${CC} = clang ]]; then
|
||||
# Use llvm-cov instead of gcov when compiler is clang.
|
||||
ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
|
||||
fi
|
||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||
sudo usermod -a -G audio "${USER}"
|
||||
sudo bash ci/setup-xvfb.sh
|
||||
|
||||
- name: Check autoconf
|
||||
if: contains(matrix.extra, 'unittests')
|
||||
run: |
|
||||
make -C src autoconf
|
||||
|
||||
- name: Set up shadow dir
|
||||
if: matrix.shadow
|
||||
run: |
|
||||
make -C src shadow
|
||||
echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
|
||||
echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
|
||||
# Append various warning flags to CFLAGS.
|
||||
sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
|
||||
sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
|
||||
if [[ ${CC} = clang ]]; then
|
||||
# Suppress some warnings produced by clang 12 and later.
|
||||
sed -i -f ci/config.mk.clang-12.sed ${SRCDIR}/auto/config.mk
|
||||
fi
|
||||
|
||||
- name: Build
|
||||
if: (!contains(matrix.extra, 'unittests'))
|
||||
run: |
|
||||
make ${SHADOWOPT} -j${NPROC}
|
||||
|
||||
- name: Check version
|
||||
if: (!contains(matrix.extra, 'unittests'))
|
||||
run: |
|
||||
"${SRCDIR}"/vim --version
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
if ${{ matrix.features == 'huge' }}; then
|
||||
# Also check that optional and dynamic features are configured and working
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 \
|
||||
-c "let g:required=['gettext', 'sodium', 'sound', 'perl', 'python3', 'lua', 'ruby', 'tcl']" \
|
||||
-S ci/if_feat_check.vim -c quit
|
||||
fi
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/actions/build_vim_on_linux
|
||||
with:
|
||||
features: ${{ matrix.features }}
|
||||
compiler: ${{ matrix.compiler }}
|
||||
architecture: ${{ matrix.architecture }}
|
||||
extra: ${{ toJSON(matrix.extra) }}
|
||||
shadow: ${{ matrix.shadow }}
|
||||
interface: ${{ matrix.interface }}
|
||||
lua_ver: ${{ matrix.lua_ver }}
|
||||
python3: ${{ matrix.python3 }}
|
||||
coverage: ${{ matrix.coverage }}
|
||||
|
||||
- name: Test
|
||||
timeout-minutes: 45
|
||||
run: |
|
||||
make ${SHADOWOPT} ${TEST}
|
||||
timeout-minutes: 20
|
||||
run: make ${SHADOWOPT} ${TEST}
|
||||
|
||||
# Enable to debug failing tests live and ssh into the CI runners
|
||||
# - name: Setup tmate session
|
||||
@@ -346,7 +112,8 @@ jobs:
|
||||
# with:
|
||||
# limit-access-to-actor: true
|
||||
|
||||
- if: ${{ !cancelled() }}
|
||||
- name: Upload failed test artifacts
|
||||
if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
- name: Vim tags
|
||||
@@ -405,20 +172,78 @@ jobs:
|
||||
- name: Codecov
|
||||
timeout-minutes: 20
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
uses: codecov/codecov-action@v6
|
||||
with:
|
||||
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ join(matrix.extra, '-') }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
linux-asan:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
env:
|
||||
CC: clang
|
||||
CLANG_VER: 21
|
||||
SRCDIR: ./src
|
||||
LEAK_CFLAGS: -DEXITFREE
|
||||
LOG_DIR: ${{ github.workspace }}/logs
|
||||
TERM: xterm
|
||||
DISPLAY: ":99"
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
testset:
|
||||
- tinytests
|
||||
- newtests.1
|
||||
- newtests.2
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from GitHub
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Build
|
||||
timeout-minutes: 15
|
||||
uses: ./.github/actions/build_vim_on_linux
|
||||
with:
|
||||
features: huge
|
||||
compiler: clang
|
||||
extra: '["asan"]'
|
||||
# Lua5.1 is the most widely used version (since it's what LuaJIT is
|
||||
# compatible with), so ensure it works
|
||||
lua_ver: "5.1"
|
||||
|
||||
- name: Test (tinytests)
|
||||
if: matrix.testset == 'tinytests'
|
||||
timeout-minutes: 20
|
||||
run: make ${TEST} NEW_TESTS_RES=
|
||||
|
||||
- name: Test (newtests)
|
||||
if: startsWith(matrix.testset, 'newtests')
|
||||
timeout-minutes: 20
|
||||
env:
|
||||
JOB_INDEX: ${{ strategy.job-index }}
|
||||
JOB_TOTAL: ${{ strategy.job-total }}
|
||||
run: |
|
||||
set -x
|
||||
make -C src/testdir SCRIPTS_TINY_OUT= \
|
||||
NEW_TESTS_RES="$(python3 ci/gen_testset.py $((JOB_TOTAL-1)) | jq -r --argjson i $((JOB_INDEX-1)) '.[$i]|join(" ")')"
|
||||
|
||||
- name: ASan logs
|
||||
if: contains(matrix.extra, 'asan') && !cancelled()
|
||||
if: ${{ !cancelled() }}
|
||||
run: |
|
||||
for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
|
||||
echo "$f"
|
||||
asan_symbolize -l "$f"
|
||||
(
|
||||
echo "$f"
|
||||
asan_symbolize -l "$f"
|
||||
) | tee "$f".symbolized
|
||||
false # in order to fail a job
|
||||
done
|
||||
|
||||
- name: Upload failed test artifacts
|
||||
if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
macos:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
@@ -436,7 +261,7 @@ jobs:
|
||||
runner: [macos-15-intel, macos-26]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
- name: Checkout repository from GitHub
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install packages
|
||||
@@ -503,7 +328,8 @@ jobs:
|
||||
run: |
|
||||
make ${TEST}
|
||||
|
||||
- if: ${{ !cancelled() }}
|
||||
- name: Upload failed test artifacts
|
||||
if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
windows:
|
||||
@@ -513,7 +339,7 @@ jobs:
|
||||
# Interfaces
|
||||
# Lua
|
||||
LUA_VER: 54
|
||||
LUA_VER_DOT: '5.4'
|
||||
LUA_VER_DOT: "5.4"
|
||||
LUA_RELEASE: 5.4.2
|
||||
LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
|
||||
LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
|
||||
@@ -522,16 +348,16 @@ jobs:
|
||||
LUA_DIR_SLASH: D:/Lua
|
||||
# Python 2
|
||||
PYTHON_VER: 27
|
||||
PYTHON_VER_DOT: '2.7'
|
||||
PYTHON_VER_DOT: "2.7"
|
||||
PYTHON_DIR: 'C:\Python27'
|
||||
# Python 3
|
||||
PYTHON3_VER: 313
|
||||
PYTHON3_VER_DOT: '3.13'
|
||||
PYTHON3_VER_DOT: "3.13"
|
||||
# Other dependencies
|
||||
# winpty
|
||||
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
|
||||
# libsodium
|
||||
SODIUM_VER: '1.0.20'
|
||||
SODIUM_VER: "1.0.20"
|
||||
# SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip
|
||||
SODIUM_MSVC_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-msvc.zip
|
||||
SODIUM_MSVC_VER: v143
|
||||
@@ -609,7 +435,7 @@ jobs:
|
||||
echo "SODIUM_DIR=${SODIUM_DIR}" >> $GITHUB_ENV
|
||||
echo "GETTEXT_PATH=D:\gettext${{ matrix.arch == 'x64' && '64' || '32' }}" >> $GITHUB_ENV
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
- uses: msys2/setup-msys2@v2.31.1
|
||||
if: matrix.toolchain == 'mingw'
|
||||
with:
|
||||
update: true
|
||||
@@ -619,7 +445,7 @@ jobs:
|
||||
msystem: ${{ env.MSYSTEM }}
|
||||
release: false
|
||||
|
||||
- name: Checkout repository from github
|
||||
- name: Checkout repository from GitHub
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Create a list of download URLs
|
||||
@@ -633,7 +459,7 @@ jobs:
|
||||
echo %GETTEXT64_URL%>> urls.txt
|
||||
|
||||
- name: Cache downloaded files
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v5.0.5
|
||||
with:
|
||||
path: downloads
|
||||
key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt') }}
|
||||
@@ -833,7 +659,8 @@ jobs:
|
||||
nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\vim || exit 1
|
||||
)
|
||||
|
||||
- if: ${{ !cancelled() }}
|
||||
- name: Upload failed test artifacts
|
||||
if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
- name: Generate gcov files
|
||||
@@ -846,7 +673,7 @@ jobs:
|
||||
- name: Codecov
|
||||
timeout-minutes: 20
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v5
|
||||
uses: codecov/codecov-action@v6
|
||||
with:
|
||||
directory: src
|
||||
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
|
||||
|
||||
6
.github/workflows/codeql-analysis.yml
vendored
6
.github/workflows/codeql-analysis.yml
vendored
@@ -48,7 +48,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
uses: github/codeql-action/init@v4.35.4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v4
|
||||
uses: github/codeql-action/autobuild@v4.35.4
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
@@ -73,4 +73,4 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
uses: github/codeql-action/analyze@v4.35.4
|
||||
|
||||
2
.github/workflows/label.yml
vendored
2
.github/workflows/label.yml
vendored
@@ -17,6 +17,6 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v6
|
||||
- uses: actions/labeler@v6.1.0
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
325
AGENTS.md
Normal file
325
AGENTS.md
Normal file
@@ -0,0 +1,325 @@
|
||||
# AGENTS.md
|
||||
|
||||
Guidance for AI coding agents working in the Vim repository.
|
||||
|
||||
## Project
|
||||
|
||||
Vim is a text editor written in C. The canonical repository is
|
||||
https://github.com/vim/vim. The code is old and has grown organically over
|
||||
the past 30+ years. Some files are vendored from upstream projects
|
||||
(`src/xdiff`, `src/libvterm`); parts of the runtime are occasionally shared
|
||||
with forks like Neovim.
|
||||
|
||||
Vim strives to be portable across several different operating systems and
|
||||
aims to be a stable, robust editor gradually developing new features while
|
||||
remaining backwards compatible as much as possible.
|
||||
|
||||
At the same time, Vim can be compiled with different feature sets, from the
|
||||
POSIX compatible minimal vi to a full-fledged GUI editor which includes
|
||||
additional scripting interfaces.
|
||||
|
||||
See `runtime/doc/develop.txt` for the high level design goals.
|
||||
|
||||
## Build and test
|
||||
|
||||
# Full build on Unix/Linux (from src/):
|
||||
make
|
||||
|
||||
# Run the full test suite:
|
||||
make test
|
||||
|
||||
# Generate proto files
|
||||
make proto
|
||||
|
||||
# Run a single test file:
|
||||
cd src/testdir && make test_name.res
|
||||
|
||||
Output is in testdir/messages and testdir/test.log
|
||||
|
||||
Builds on Windows depend on the Environment, see `src/INSTALLpc.txt`
|
||||
for Cygwin/MSYS and MSVC ways to build Vim
|
||||
|
||||
Before submitting any patch, at minimum:
|
||||
1. The build succeeds without new warnings.
|
||||
2. Relevant tests pass.
|
||||
3. The code matches the style of the file being edited.
|
||||
|
||||
## Layout
|
||||
|
||||
- `src/` - the C source. Subsystem names are usually obvious from filenames
|
||||
(`buffer.c`, `window.c`, `search.c`, `vim9compile.c`, etc.).
|
||||
- `src/proto/` - function prototypes, one `.pro` file per source file.
|
||||
Regenerated; do not hand-edit unless you know what you're doing.
|
||||
- `src/po` - Translations
|
||||
- `src/xxd` - for the xxd subproject
|
||||
- `src/xdiff` - for the xdiff library (imported from git)
|
||||
- `src/libvterm` - for the libvterm library
|
||||
- `src/testdir/` - tests. Vim-script files named `test_*.vim`.
|
||||
Screendump expected output lives in `src/testdir/dumps/`.
|
||||
- `runtime/doc/` - user-facing documentation in Vim help format, when updating,
|
||||
also update the Last Change header
|
||||
- `runtime/syntax/generator` - Syntax script for Vim Script, automatically generated
|
||||
from Vims source
|
||||
- `runtime/` - runtime files shipped with Vim, when updating, also update the
|
||||
Last Change header and a short description if this file has no maintainer
|
||||
If the file has a maintainer, changes should go via them (so make a merge
|
||||
request against the upstream repo instead)
|
||||
- `src/version.c` - contains the `included_patches[]` list. Every
|
||||
patch touching anything below `src/` (with the exception of `src/po`) needs a
|
||||
new entry at the top, will be updated only when merging into
|
||||
the master tree.
|
||||
|
||||
## Commit format
|
||||
|
||||
Vim uses a strict commit message format. The subject line is a
|
||||
one-sentence **problem statement**, not a description of the fix:
|
||||
|
||||
patch 9.2.NNNN: short description of the problem
|
||||
|
||||
Problem: Restatement of the problem as a full sentence, possibly
|
||||
with a reporter attribution in parentheses.
|
||||
Solution: Short description of the fix, ending with the author's
|
||||
name in parentheses.
|
||||
|
||||
optional longer description of the problem and solution goes here in prose.
|
||||
Do not use bullet points.
|
||||
|
||||
fixes: #NNNN
|
||||
related: #NNNN
|
||||
closes: #NNNN
|
||||
|
||||
Co-authored-by: Name
|
||||
Signed-off-by: Author Name <email>
|
||||
|
||||
Rules:
|
||||
|
||||
- **Subject line states the problem**, not the solution. "fix typo" is
|
||||
wrong; "typo in foo() causes OOB read" is right.
|
||||
- **Problem line is a full sentence with a trailing period.** It mirrors
|
||||
the subject.
|
||||
- **Solution line ends with `(Author Name)`** — parentheses, period
|
||||
after them.
|
||||
- **Longer prose**, if any, goes after the Problem/Solution header
|
||||
- **`fixes:` references the issue** the patch fixes.
|
||||
**`closes:` references the PR** that introduces the fix.
|
||||
**`related:` references related issues**, including issues that caused this
|
||||
one.
|
||||
All can appear. Colon, aligned, no trailing period.
|
||||
- **`Signed-off-by:` is required** — DCO.
|
||||
- **`Co-Authored-By:` is allowed** and is the accepted way to
|
||||
acknowledge AI assistance transparently. Human
|
||||
coauthors should usually also have their own Signed-off-by.
|
||||
|
||||
## C code conventions
|
||||
|
||||
- **Indentation is 4 spaces per level.** Existing files use tabs with
|
||||
`ts=8 sts=4 sw=4 noet` (set by the modeline in the file),
|
||||
so tabs of width 8 appear where two levels of indent collapse. `sign.c`,
|
||||
`sound.c`, and any new file must use spaces only and follow the style from
|
||||
the .editorconfig file.
|
||||
- **Opening braces go on their own line (Allman style)** — for function
|
||||
definitions and for control-flow constructs (`if`/`else`/`for`/`while`/
|
||||
`do`) alike.
|
||||
- **Function definitions**: return type on its own indented line, with
|
||||
the function name beginning on the next line.
|
||||
- Initialize locals where a reader cannot trivially see the first
|
||||
assignment (common for pointers and return-value accumulators).
|
||||
Don't add `= 0` initializers for values that are always assigned
|
||||
before use — they can hide real uninitialized-read bugs from
|
||||
the compiler.
|
||||
- `for (int i = 0; ...)` loop declarations are fine in files that
|
||||
use them; older files may declare the counter at the top of the
|
||||
block.
|
||||
- **Function-scope declarations at the top of a block** is the historical
|
||||
style, but mid-block declarations are acceptable in files that have
|
||||
adopted them. Match the surrounding code.
|
||||
- **Custom types end in `_T`** (e.g., `buf_T`, `linenr_T`, `pos_T`).
|
||||
Never use `_t` — it collides with POSIX typedefs.
|
||||
- **C language is C95 plus specific C99 features**: `//` comments,
|
||||
mixed declarations and statements, `__func__`, `bool`/`_Bool`,
|
||||
variadic macros, compound literals, `static inline`, trailing enum
|
||||
commas. Do not reach for later C standards — Vim still must build
|
||||
with Compaq C on OpenVMS. See `*assumptions-C-compiler*` in
|
||||
`develop.txt` for the full list.
|
||||
- **`bool` / `true` / `false` are acceptable.** Vim is transitioning
|
||||
from `int` with `TRUE`/`FALSE` to C99 `bool`. Do not "fix" `bool`
|
||||
back to `int`. Within a single patch, be consistent — don't mix
|
||||
`true` and `TRUE` in new code.
|
||||
- **Do not mass-convert** `TRUE`/`FALSE` to `true`/`false` across files
|
||||
unless that is the patch's explicit purpose. Opportunistic
|
||||
conversions create noise in diffs.
|
||||
- **`STRLEN_LITERAL("...")`** should be used when the length of a
|
||||
string literal is needed. Avoid `STRLEN()` on literals.
|
||||
- **`vim_snprintf_safelen()`** returns the written length; prefer it
|
||||
over `vim_snprintf()` when the length is then needed.
|
||||
- **Prefer `dict_add_string_len()`** when the string length is already
|
||||
known, over `dict_add_string()` which calls `STRLEN()`.
|
||||
- **String/buffer parameters go `(char_u *buf, size_t buflen)`** —
|
||||
length alongside pointer, in bytes. Use `size_t` for byte counts,
|
||||
`int` only where required by legacy APIs.
|
||||
- **Guards before divisions.** Check for divisor zero explicitly, even
|
||||
when a composite earlier guard would prevent it. Relying on
|
||||
transitive guards is fragile.
|
||||
- When introducing new allocations, verify the cleanup paths handle all exit
|
||||
conditions (early return, error branches, etc).
|
||||
|
||||
**Use Vim wrappers instead of libc where one exists:**
|
||||
|
||||
| libc | Vim | Why |
|
||||
|---------------|------------------------|-----------------------------|
|
||||
| `free()` | `vim_free()` | Tolerates NULL |
|
||||
| `malloc()` | `alloc()` / `lalloc()` | Checks for OOM |
|
||||
| `strcpy()` | `STRCPY()` | Cast for `char_u *` |
|
||||
| `strchr()` | `vim_strchr()` | Handles special characters |
|
||||
| `strrchr()` | `vim_strrchr()` | Handles special characters |
|
||||
| `memcpy()` | `mch_memmove()` | Handles overlapping copies |
|
||||
| `bcopy()` | `mch_memmove()` | Handles overlapping copies |
|
||||
| `memset()` | `vim_memset()` | Uniform across systems |
|
||||
| `isspace()` | `vim_isspace()` | Handles bytes > 127 |
|
||||
| `iswhite()` | `vim_iswhite()` | TRUE only for tab and space |
|
||||
|
||||
Further rules, not spelled out here, live in `runtime/doc/develop.txt`:
|
||||
|
||||
- `*style-names*` — reserved name patterns (`is*`, `to*`, `str*`, `mem*`,
|
||||
`wcs*`, `.*_t`, `__.*`), forbidden identifiers (`delete`, `this`, `new`,
|
||||
`time`, `index`), and the 31-character function-name limit.
|
||||
- `*style-spaces*`, `*style-examples*` — spacing and one-statement-per-line.
|
||||
- `*style-various*` — `FEAT_` feature prefix, uppercase `#define`,
|
||||
`#ifdef HAVE_X` rather than `#if HAVE_X`, no `'\"'`.
|
||||
- `*assumptions-makefiles*` — POSIX.1-2001 `make` only in the main
|
||||
Makefiles (no `%` rules, `:=`, `.ONESHELL`, GNU conditionals).
|
||||
- Vim uses `char_u` instead of `char` type
|
||||
- Vim uses the macros `STRLEN`, `STRCPY`, `STRCMP`, `STRCAT` that work
|
||||
with the `char_u` type.
|
||||
- `*style-clang-format*` — `sign.c` and `sound.c` are formatted with
|
||||
`clang-format`; re-run it after editing those files.
|
||||
|
||||
## Vim9 script conventions (in tests and runtime files)
|
||||
|
||||
- Write modern Vim style (new files can use Vim9 script, but compatibility
|
||||
with Neovim and other forks is a concern, so in doubt please ask!)
|
||||
- **Drop `l:` prefix from local variables** in Vim-script tests.
|
||||
- **Don't add `CheckFeature` inside individual tests** if it's already
|
||||
at the top of the file.
|
||||
- If a test file doesn't gate features at the top, add CheckFeature to
|
||||
individual tests that depend on specific build features.
|
||||
|
||||
## Test conventions
|
||||
|
||||
- Tests are in `src/testdir/test_*.vim`.
|
||||
- Reproducible tests beat "it doesn't crash" tests. If a patch fixes
|
||||
a rendering bug, add a screendump test. If it fixes incorrect output,
|
||||
assert the output.
|
||||
- Add comprehensive tests for newly added features and include them
|
||||
in existing tests if possible
|
||||
- **Screendump tests** use `CheckScreendump`, `RunVimInTerminal`,
|
||||
`VerifyScreenDump`, and live dumps in `src/testdir/dumps/`.
|
||||
- `v9.CheckScriptSuccess(lines)` / `v9.CheckScriptFailure(lines, error, lnum)`
|
||||
are the standard way to test Vim9 script behavior at script-load time.
|
||||
- When fixing a bug reported as an issue, include a test that
|
||||
reproduces the original report, not just a minimal synthetic case.
|
||||
- Tests for Syntax runtime are in `runtime/syntax/testdir`
|
||||
- Tests for Indent runtime are in `runtime/indent/testdir`
|
||||
|
||||
## Common gotchas
|
||||
|
||||
- **Distinguish what code enforces from what docs claim.** If a patch
|
||||
changes documented behavior, say so in the Problem/Solution.
|
||||
- **Generated files** (`src/auto/configure`, generated Wayland protocol
|
||||
C, etc.) should only be regenerated when their source changes.
|
||||
Mixing unrelated regeneration into a functional patch creates noise.
|
||||
|
||||
## Documentation
|
||||
|
||||
- User-facing option or feature changes require a `runtime/doc/*.txt`
|
||||
update in the same patch.
|
||||
- When editing an existing help file, bump the `Last change:` header
|
||||
at the top.
|
||||
|
||||
### Help file style
|
||||
|
||||
See `runtime/doc/helphelp.txt` (`*help-writing*`) for the authoritative
|
||||
reference. Key conventions:
|
||||
|
||||
- **File header**: first line is `*filename.txt*` then a tab then a
|
||||
short description. That description appears under `LOCAL ADDITIONS`
|
||||
in `help.txt`. The version and `Last change:` date go on the second
|
||||
line, right aligned.
|
||||
- **Modeline**: every help file ends with a Vim modeline — typically
|
||||
`vim:tw=78:ts=8:noet:ft=help:norl:`.
|
||||
- **Layout**: `'textwidth'` 78, `'tabstop'` 8, indent and align with
|
||||
tab characters. Two spaces between sentences. Run `:retab`
|
||||
(not `:retab!`, and review the diff) after editing.
|
||||
- **Tags** are defined as `*tag-name*`, usually right-aligned on the
|
||||
line where the thing they name is introduced. Tag names must be
|
||||
unique across all of `runtime/doc/`; for plugin help, prefix with
|
||||
the plugin name.
|
||||
- **Cross-references inside help text**:
|
||||
- `|tag-name|` — hot-link to an existing tag.
|
||||
- `` `:cmd` `` — Ex command, highlighted as a code block.
|
||||
- `'option'` — option name, in single quotes.
|
||||
- `<Key>` or `CTRL-X` — special keys.
|
||||
- `{placeholder}` — user-supplied argument.
|
||||
- **Sections** are separated by a line of `=` starting in column 1.
|
||||
Column or subsection headings end with `~` to trigger heading
|
||||
highlighting.
|
||||
- **Code blocks** start with `>` at the end of the introducing line
|
||||
and end with `<` as the first non-blank on a later line (any line
|
||||
starting in column 1 also implicitly closes the block). Use `>vim`
|
||||
(or another language name) to request syntax highlighting inside
|
||||
the block.
|
||||
- **Notation** — `Note`, `Todo`, `Error` and a few similar words are
|
||||
auto-highlighted; do not try to fake the highlighting by other means.
|
||||
- **Language**: gender-neutral language is preferred for new or updated
|
||||
text; existing wording does not need to be rewritten for this alone.
|
||||
|
||||
## Release policy
|
||||
|
||||
Vim alternates between development cycles and stability periods — see
|
||||
`runtime/doc/develop.txt` `*design-policy*`.
|
||||
|
||||
- **During a stability period** only clear bug fixes, security fixes,
|
||||
documentation updates, translations, and runtime file updates are
|
||||
accepted. No new features, no backwards-incompatible changes.
|
||||
- **Once released in a minor version**, C-core features must stay
|
||||
backwards-compatible. Runtime files have a bit more flexibility so
|
||||
their maintainers can correct old behavior.
|
||||
- **Deprecated features** stay reachable via config (do not hard-error),
|
||||
are documented as deprecated, can be disabled at compile time, and
|
||||
may be removed in a later cycle.
|
||||
|
||||
## Security
|
||||
|
||||
Before reporting a suspected security issue or submitting a patch
|
||||
that touches security-sensitive code, read `SECURITY.md`. Follow
|
||||
the disclosure process described there.
|
||||
|
||||
## Before submitting
|
||||
|
||||
1. Commit message follows the format above.
|
||||
2. All modified code compiles without new warnings.
|
||||
3. Tests pass, and new functionality has regression tests.
|
||||
4. Documentation is updated for user-visible changes.
|
||||
5. Signed-off-by is present.
|
||||
6. Diff contains only changes relevant to the stated problem —
|
||||
no stray whitespace fixes, no unrelated refactors, no unrelated
|
||||
regeneration of `auto/configure`.
|
||||
7. For multi-patch series: each commit compiles and passes its own
|
||||
tests. A known-broken intermediate state that a later patch fixes
|
||||
is not acceptable — squash instead.
|
||||
|
||||
## When in doubt
|
||||
|
||||
- Make the smallest possible change to achieve the goal. Do not rewrite
|
||||
entire files or functions when a targeted edit suffices.
|
||||
- Read surrounding code and match its style rather than imposing an
|
||||
"improvement."
|
||||
- Err toward smaller, more focused patches. A patch that does three
|
||||
things is three patches.
|
||||
- If a patch fixes a symptom of a deeper bug, say so in the Problem
|
||||
and acknowledge the scope limitation in the Solution.
|
||||
- Before claiming a bug exists, reproduce it. Before claiming code does X, read
|
||||
the code. Do not rely on training-data memory of file contents.
|
||||
- Before running shell commands that modify files outside the working tree,
|
||||
install packages, push branches, or invoke network operations, confirm with
|
||||
the user.
|
||||
6
Filelist
6
Filelist
@@ -13,6 +13,7 @@ SRC_ALL = \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/workflows/coverity.yml \
|
||||
.github/workflows/link-check.yml \
|
||||
.github/actions/build_vim_on_linux/action.yml \
|
||||
.github/actions/test_artifacts/action.yml \
|
||||
.github/dependabot.yml \
|
||||
.gitignore \
|
||||
@@ -23,6 +24,7 @@ SRC_ALL = \
|
||||
.editorconfig \
|
||||
ci/appveyor.bat \
|
||||
ci/config.mk*.sed \
|
||||
ci/gen_testset.py \
|
||||
ci/if_ver*.vim \
|
||||
ci/if_feat_check.vim \
|
||||
ci/lychee.toml \
|
||||
@@ -151,6 +153,7 @@ SRC_ALL = \
|
||||
src/spellfile.c \
|
||||
src/spellsuggest.c \
|
||||
src/strings.c \
|
||||
src/strptime.c \
|
||||
src/structs.h \
|
||||
src/syntax.c \
|
||||
src/tabpanel.c \
|
||||
@@ -440,6 +443,7 @@ SRC_ALL = \
|
||||
src/libvterm/t/66screen_extent.test \
|
||||
src/libvterm/t/67screen_dbl_wh.test \
|
||||
src/libvterm/t/68screen_termprops.test \
|
||||
src/libvterm/t/69screen_pushline.test \
|
||||
src/libvterm/t/69screen_reflow.test \
|
||||
src/libvterm/t/90vttest_01-movement-1.test \
|
||||
src/libvterm/t/90vttest_01-movement-2.test \
|
||||
@@ -678,6 +682,7 @@ SRC_AMI = \
|
||||
src/Make_ami.mak \
|
||||
src/os_amiga.c \
|
||||
src/os_amiga.h \
|
||||
src/os_amiga_stubs.c \
|
||||
src/proto/os_amiga.pro \
|
||||
src/testdir/Make_amiga.mak \
|
||||
src/testdir/util/amiga.vim \
|
||||
@@ -1194,6 +1199,7 @@ IGNORE = \
|
||||
.github/FUNDING.yml \
|
||||
.github/labeler.yml \
|
||||
.github/workflows/label.yml \
|
||||
AGENTS.md \
|
||||
SECURITY.md \
|
||||
ci/unlisted.make \
|
||||
ci/hlgroups.make \
|
||||
|
||||
15
SECURITY.md
15
SECURITY.md
@@ -2,9 +2,16 @@
|
||||
|
||||
## Reporting a vulnerability
|
||||
|
||||
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
|
||||
vim-security@googlegroups.com
|
||||
|
||||
This is a private list, read only by the maintainers, but anybody can post, after moderation.
|
||||
If you want to report a security issue, please privately disclose the issue either via:
|
||||
- The vim-security mailing list: vim-security@googlegroups.com
|
||||
This is a private list, read only by the maintainers, but anybody can post.
|
||||
- [GitHub Security Advisories](https://github.com/vim/vim/security/advisories/new)
|
||||
|
||||
**Please don't publicly disclose the issue until it has been addressed by us.**
|
||||
|
||||
## Guidelines for reporting
|
||||
- Clearly explain **why** the behaviour is a security issue, not just that a bug exists.
|
||||
- Keep reports concise and focused.
|
||||
- Do not flood us with a list of issues. Report them one by one to ensure to not overwhelm us with the work load.
|
||||
- Do **not** submit AI-generated reports without carefully reviewing them first. Low-quality or
|
||||
speculative reports waste maintainer time and will be closed without action, and repeat offenders **will be banned**.
|
||||
|
||||
43
ci/gen_testset.py
Normal file
43
ci/gen_testset.py
Normal file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import itertools
|
||||
import json
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
|
||||
def generate_testset(n):
|
||||
cp = subprocess.run(["make", "-C", "src/testdir", "-npq"], capture_output=True)
|
||||
|
||||
tests = set()
|
||||
for line in cp.stdout.decode().split("\n"):
|
||||
if re.match(r"^(NEW_TESTS_RES|TEST_VIM9_RES) = ", line):
|
||||
tests.update(re.findall(r"\btest\w+\.res\b", line))
|
||||
|
||||
tests = sorted(list(tests))
|
||||
# move test_alot*.res to the end
|
||||
tests = (
|
||||
[t for t in tests if not t.startswith("test_alot")]
|
||||
+ [t for t in tests if t.startswith("test_alot_")]
|
||||
+ ["test_alot.res"]
|
||||
)
|
||||
targets = tests
|
||||
|
||||
if n > 1:
|
||||
targets = [ts for ts in itertools.batched(tests, n)]
|
||||
targets = [[t for t in ts if t] for ts in itertools.zip_longest(*targets)]
|
||||
|
||||
return targets
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("n", type=int, nargs="?", default=1)
|
||||
args = parser.parse_args()
|
||||
|
||||
print(json.dumps(generate_testset(args.n)))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -13,7 +13,7 @@ extensions = ["c", "h", "md", "html", "txt"]
|
||||
accept = ["100..=103", "200..=299", "429"]
|
||||
|
||||
# Retry each request a few times on transient network errors
|
||||
retries = 2
|
||||
max_retries = 2
|
||||
retry_wait_time = 2
|
||||
|
||||
# Timeout per request in seconds
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
|
||||
Краткое описание для версии 9.2 программы Vim — Vi IMproved.
|
||||
|
||||
|
||||
ЧТО ТАКОЕ РЕДАКТОР VIM?
|
||||
@@ -10,8 +10,8 @@ README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
|
||||
наименований файлов и команд, операции с произвольными блоками текста,
|
||||
встроенный язык программирования и т. д. Также доступен графический интерфейс
|
||||
пользователя (GUI). И при этом сохраняется совместимость с редактором Vi,
|
||||
и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности о
|
||||
различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt".
|
||||
и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности
|
||||
о различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt".
|
||||
|
||||
Этот редактор очень удобен для работы с исходным кодом программ, а также
|
||||
разного рода других текстовых файлов. Все команды вводятся набором обычных
|
||||
@@ -25,9 +25,9 @@ README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
|
||||
функционала (обычно называемый vim.tiny). Данная сборка чаще всего используется
|
||||
во многих дистрибутивах Linux в качестве предустановленного редактора vi.
|
||||
|
||||
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и
|
||||
практически во всех UNIX-подобных системах. А перенос на другие платформы не
|
||||
должен представлять особой сложности.
|
||||
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS
|
||||
и практически во всех UNIX-подобных системах. А перенос на другие платформы
|
||||
не должен представлять особой сложности.
|
||||
Предыдущие версии редактора Vim работают в операционных системах OS/2, MS-DOS,
|
||||
MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
|
||||
Но поддержка этих версий больше не осуществляется.
|
||||
@@ -45,11 +45,11 @@ MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
|
||||
программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса
|
||||
и другие файлы, которые используются редактором во время работы. Чтобы
|
||||
запустить программу Vim, вы должны получить либо архив с исполняемыми файлами,
|
||||
либо архив с исходным кодом. Какой из них вам нужен, зависит от того, на какой
|
||||
системе вы хотите запустить редактор Vim, и есть ли для этой системы
|
||||
либо архив с исходным кодом. Какой из них вам нужен, зависит от того,
|
||||
на какой системе вы хотите запустить редактор Vim, и есть ли для этой системы
|
||||
исполняемые файлы или вы должны компилировать программу самостоятельно.
|
||||
Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите на
|
||||
веб‐странице https://www.vim.org/download.php.
|
||||
Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите
|
||||
на веб‐странице https://www.vim.org/download.php.
|
||||
|
||||
Несколько полезных мест, где можно получить последнюю версию редактора Vim:
|
||||
* Посмотрите в git-хранилище на GitHub: https://github.com/vim/vim.
|
||||
@@ -61,8 +61,8 @@ https://github.com/vim/vim-win32-installer/releases.
|
||||
КОМПИЛЯЦИЯ РЕДАКТОРА Vim
|
||||
|
||||
Если для вашей системы уже есть готовые исполняемые файлы, вам не нужно самому
|
||||
компилировать редактор Vim. Если вы скачали архив с исходным кодом, то всё
|
||||
необходимое для компиляции программы Vim находится в каталоге "src".
|
||||
компилировать редактор Vim. Если вы скачали архив с исходным кодом,
|
||||
то всё необходимое для компиляции программы Vim находится в каталоге "src".
|
||||
Инструкции смотрите в файле src/INSTALL.
|
||||
|
||||
|
||||
@@ -85,12 +85,12 @@ README_vms.txt VMS
|
||||
|
||||
ДОКУМЕНТАЦИЯ ПО РЕДАКТОРУ Vim
|
||||
|
||||
Учебник Vim — это часовой практический курс для начинающих. Как правило, для
|
||||
работы с ним нужно набрать команду "vimtutor". Чтобы получить дополнительную
|
||||
информацию, смотрите раздел документации ":help tutor".
|
||||
Учебник Vim — это часовой практический курс для начинающих. Как правило,
|
||||
для работы с ним нужно набрать команду "vimtutor". Чтобы получить
|
||||
дополнительную информацию, смотрите раздел документации ":help tutor".
|
||||
|
||||
Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас ещё
|
||||
нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt".
|
||||
Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас
|
||||
ещё нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt".
|
||||
В нём содержатся отсылки на другие полезные файлы документации. Руководство
|
||||
пользователя можно читать как книгу, и оно рекомендуется для обучения работе
|
||||
с редактором Vim. Смотрите ":help user-manual".
|
||||
@@ -100,7 +100,7 @@ README_vms.txt VMS
|
||||
|
||||
Редактор Vim является благотворительным программным обеспечением.
|
||||
Использование и копирование программы Vim не ограничено, однако рекомендуется
|
||||
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
|
||||
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
|
||||
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.txt" (введите
|
||||
команду ":help uganda" в редакторе Vim).
|
||||
|
||||
@@ -125,8 +125,8 @@ README_vms.txt VMS
|
||||
будет способствовать повышению заинтересованности команды разработчиков
|
||||
в продолжении работы над редактором Vim!
|
||||
|
||||
Самая свежая информация об оказании финансовой поддержки публикуется на
|
||||
веб-сайте программы Vim:
|
||||
Самая свежая информация об оказании финансовой поддержки публикуется
|
||||
на веб-сайте программы Vim:
|
||||
https://www.vim.org/sponsor/
|
||||
|
||||
|
||||
@@ -137,13 +137,13 @@ README_vms.txt VMS
|
||||
|
||||
ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ
|
||||
|
||||
Для системе macOS вы може использовать MacVim: https://macvim.org
|
||||
Для системе macOS вы можете использовать MacVim: https://macvim.org
|
||||
|
||||
Последние новости о редакторе Vim можно найти на его домашней странице:
|
||||
https://www.vim.org/
|
||||
|
||||
Если у вас возникли вопросы, посмотрите полезные советы или документацию по
|
||||
редактору Vim:
|
||||
Если у вас возникли вопросы, посмотрите полезные советы или документацию
|
||||
по редактору Vim:
|
||||
https://www.vim.org/docs.php
|
||||
https://vim.fandom.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ Unicode true ; !include defaults to UTF-8 after Unicode True since 3.0 Alpha 2
|
||||
# ----------- No configurable settings below this line -----------
|
||||
|
||||
##########################################################
|
||||
# Installer Attributes, Including headers, Plugins and etc.
|
||||
# Installer Attributes, Including headers, Plugins and etc.
|
||||
|
||||
CRCCheck force
|
||||
|
||||
@@ -638,21 +638,23 @@ SectionGroupEnd
|
||||
!undef LIBRARY_X64
|
||||
${EndIf}
|
||||
|
||||
# Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory.
|
||||
SetOutPath $0\GvimExt32
|
||||
ClearErrors
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libintl-8.dll" \
|
||||
"$0\GvimExt32\libintl-8.dll" "$0\GvimExt32"
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libiconv-2.dll" \
|
||||
"$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
!if ${INCLUDE_LIBGCC}
|
||||
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
|
||||
"$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
|
||||
!if !${ARM64}
|
||||
# Install DLLs for 32-bit gvimext.dll into the GvimExt32 directory.
|
||||
SetOutPath $0\GvimExt32
|
||||
ClearErrors
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libintl-8.dll" \
|
||||
"$0\GvimExt32\libintl-8.dll" "$0\GvimExt32"
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libiconv-2.dll" \
|
||||
"$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
!if ${INCLUDE_LIBGCC}
|
||||
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
|
||||
"$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
|
||||
!endif
|
||||
!endif
|
||||
!endif
|
||||
${EndIf}
|
||||
|
||||
@@ -4,6 +4,8 @@ vim9script
|
||||
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
|
||||
# Latest Revision: 2026 Feb 03
|
||||
# Last Change:
|
||||
# 2026 Mar 30 by Vim project: Use fnameescape for the Log command
|
||||
|
||||
# Typesetting {{{
|
||||
import autoload './typeset.vim'
|
||||
@@ -33,7 +35,7 @@ export def Log(bufname: string)
|
||||
var logpath = typeset.LogPath(bufname)
|
||||
|
||||
if filereadable(logpath)
|
||||
execute 'edit' typeset.LogPath(bufname)
|
||||
execute 'edit' .. fnameescape(typeset.LogPath(bufname))
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
62
runtime/autoload/dist/ft.vim
vendored
62
runtime/autoload/dist/ft.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2026 Mar 13
|
||||
# Last Change: 2026 May 16
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
@@ -11,6 +11,18 @@ vim9script
|
||||
|
||||
var prolog_pattern = '^\s*\(:-\|%\+\(\s\|$\)\|\/\*\)\|\.\s*$'
|
||||
|
||||
def IsObjectScriptRoutine(): bool
|
||||
var line1 = getline(1)
|
||||
line1 = substitute(line1, '^\ufeff', '', '')
|
||||
if line1 =~? '^\s*routine\>'
|
||||
return true
|
||||
endif
|
||||
if line1 =~? '\<iris\>'
|
||||
return true
|
||||
endif
|
||||
return join(getline(1, 3), '') =~# '%RO'
|
||||
enddef
|
||||
|
||||
export def Check_inp()
|
||||
if getline(1) =~ '%%'
|
||||
setf tex
|
||||
@@ -75,6 +87,18 @@ export def FTasm()
|
||||
exe "setf " .. fnameescape(b:asmsyntax)
|
||||
enddef
|
||||
|
||||
export def FTmac()
|
||||
if exists("g:filetype_mac")
|
||||
exe "setf " .. g:filetype_mac
|
||||
else
|
||||
if IsObjectScriptRoutine()
|
||||
setf objectscript_routine
|
||||
else
|
||||
FTasm()
|
||||
endif
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTasmsyntax()
|
||||
# see if the file contains any asmsyntax=foo overrides. If so, change
|
||||
# b:asmsyntax appropriately
|
||||
@@ -774,9 +798,14 @@ export def FTnroff(): number
|
||||
enddef
|
||||
|
||||
export def FTmm()
|
||||
if exists("g:filetype_mm")
|
||||
exe "setf " .. g:filetype_mm
|
||||
return
|
||||
endif
|
||||
|
||||
var n = 1
|
||||
while n < 20
|
||||
if getline(n) =~ '^\s*\(#\s*\(include\|import\)\>\|@import\>\|/\*\)'
|
||||
if getline(n) =~ '^\s*\(//\|#\s*\(include\|import\)\>\|@import\>\|/\*\)'
|
||||
setf objcpp
|
||||
return
|
||||
endif
|
||||
@@ -871,6 +900,10 @@ export def FTinc()
|
||||
if exists("g:filetype_inc")
|
||||
exe "setf " .. g:filetype_inc
|
||||
else
|
||||
if IsObjectScriptRoutine()
|
||||
setf objectscript_routine
|
||||
return
|
||||
endif
|
||||
for lnum in range(1, min([line("$"), 20]))
|
||||
var line = getline(lnum)
|
||||
if line =~? "perlscript"
|
||||
@@ -887,7 +920,7 @@ export def FTinc()
|
||||
elseif line =~ '^\s*\%({\|(\*\)' || line =~? ft_pascal_keywords
|
||||
setf pascal
|
||||
return
|
||||
elseif line =~# '\<\%(require\|inherit\)\>' || line =~# '[A-Z][A-Za-z0-9_:${}/]*\s\+\%(??\|[?:+.]\)\?=.\? '
|
||||
elseif line =~# '\<\%(require\|inherit\)\>' || line =~# '[A-Z][A-Za-z0-9_:${}/]*\(\[[A-Za-z0-9_:/]\+\]\)*\s\+\%(??\|[?:+.]\)\?=.\? '
|
||||
setf bitbake
|
||||
return
|
||||
endif
|
||||
@@ -940,6 +973,16 @@ export def FTi()
|
||||
setf progress
|
||||
enddef
|
||||
|
||||
export def FTint()
|
||||
if exists("g:filetype_int")
|
||||
exe "setf " .. g:filetype_int
|
||||
elseif IsObjectScriptRoutine()
|
||||
setf objectscript_routine
|
||||
else
|
||||
setf hex
|
||||
endif
|
||||
enddef
|
||||
|
||||
var ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
|
||||
var ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
|
||||
|
||||
@@ -1688,6 +1731,8 @@ const ft_from_ext = {
|
||||
"tdf": "ahdl",
|
||||
# AIDL
|
||||
"aidl": "aidl",
|
||||
# Algol 68
|
||||
"a68": "algol68",
|
||||
# AMPL
|
||||
"run": "ampl",
|
||||
# ANTLR / PCCTS
|
||||
@@ -1760,6 +1805,7 @@ const ft_from_ext = {
|
||||
# BDF font
|
||||
"bdf": "bdf",
|
||||
# Beancount
|
||||
"bean": "beancount",
|
||||
"beancount": "beancount",
|
||||
# BibTeX bibliography database file
|
||||
"bib": "bib",
|
||||
@@ -1789,6 +1835,8 @@ const ft_from_ext = {
|
||||
"cairo": "cairo",
|
||||
# Cap'n Proto
|
||||
"capnp": "capnp",
|
||||
# Common Package Specification
|
||||
"cps": "json",
|
||||
# C#
|
||||
"cs": "cs",
|
||||
"csx": "cs",
|
||||
@@ -1886,6 +1934,8 @@ const ft_from_ext = {
|
||||
"cr": "crystal",
|
||||
# CSV Files
|
||||
"csv": "csv",
|
||||
# Concertor
|
||||
"cto": "concerto",
|
||||
# CUDA Compute Unified Device Architecture
|
||||
"cu": "cuda",
|
||||
"cuh": "cuda",
|
||||
@@ -2633,6 +2683,8 @@ const ft_from_ext = {
|
||||
"rst": "rst",
|
||||
# RTF
|
||||
"rtf": "rtf",
|
||||
# ObjectScript Routine
|
||||
"rtn": "objectscript_routine",
|
||||
# Ruby
|
||||
"rb": "ruby",
|
||||
"rbw": "ruby",
|
||||
@@ -3069,7 +3121,9 @@ const ft_from_ext = {
|
||||
"bp": "bp",
|
||||
# Tiltfile
|
||||
"Tiltfile": "tiltfile",
|
||||
"tiltfile": "tiltfile"
|
||||
"tiltfile": "tiltfile",
|
||||
# Ghostty
|
||||
"ghostty": "ghostty",
|
||||
}
|
||||
# Key: file name (the final path component, excluding the drive and root)
|
||||
# Value: filetype
|
||||
|
||||
4
runtime/autoload/dist/script.vim
vendored
4
runtime/autoload/dist/script.vim
vendored
@@ -4,7 +4,7 @@ vim9script
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2025 Dec 22
|
||||
# Last Change: 2026 Apr 09
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
export def DetectFiletype()
|
||||
@@ -115,7 +115,7 @@ export def Exe2filetype(name: string, line1: string): string
|
||||
return 'php'
|
||||
|
||||
# Python
|
||||
elseif name =~ 'python'
|
||||
elseif name =~ 'python' || (name == 'uv' && line1 =~ '\<uv run\>')
|
||||
return 'python'
|
||||
|
||||
# Groovy
|
||||
|
||||
10
runtime/autoload/dist/vim9.vim
vendored
10
runtime/autoload/dist/vim9.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim runtime support library
|
||||
#
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2026 Mar 10
|
||||
# Last Change: 2026 May 06
|
||||
|
||||
export def IsSafeExecutable(filetype: string, executable: string): bool
|
||||
if empty(exepath(executable))
|
||||
@@ -51,7 +51,7 @@ if has('unix')
|
||||
execute $'silent !cmd /c start "" /b {args} {Redir()}' | redraw!
|
||||
enddef
|
||||
endif
|
||||
elseif exists('$WSL_DISTRO_NAME') # use cmd.exe to start GUI apps in WSL
|
||||
elseif exists('$WSL_DISTRO_NAME') && executable('cmd.exe') # use cmd.exe to start GUI apps in WSL
|
||||
export def Launch(args: string)
|
||||
const command = (args =~? '\v<\f+\.(exe|com|bat|cmd)>')
|
||||
? $'cmd.exe /c start /b {args} {Redir()}'
|
||||
@@ -62,7 +62,7 @@ if has('unix')
|
||||
export def Launch(args: string)
|
||||
# Use job_start, because using !xdg-open is known not to work with zsh
|
||||
# ignore signals on exit
|
||||
job_start(split(args), {'stoponexit': ''})
|
||||
job_start(['sh', '-c', args], {'stoponexit': '', 'in_io': 'null', 'out_io': 'null', 'err_io': 'null'})
|
||||
enddef
|
||||
endif
|
||||
elseif has('win32')
|
||||
@@ -140,10 +140,8 @@ export def Open(file: string)
|
||||
defer setbufvar('%', '&shell', shell)
|
||||
endif
|
||||
if has('unix') && !has('win32unix') && !exists('$WSL_DISTRO_NAME')
|
||||
# Linux: using job_start, so do not use shellescape.
|
||||
Launch($"{Viewer()} {file}")
|
||||
Launch($"{Viewer()} {shellescape(file)}")
|
||||
else
|
||||
# Windows/WSL/Cygwin: NEEDS shellescape because Launch uses '!'
|
||||
Launch($"{Viewer()} {shellescape(file, 1)}")
|
||||
endif
|
||||
enddef
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 Nov 25
|
||||
" Last Change: 2026 Apr 26
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
@@ -82,13 +82,8 @@ fun gzip#read(cmd)
|
||||
let empty = line("'[") == 1 && line("']") == line("$")
|
||||
let tmp = tempname()
|
||||
let tmpe = tmp . "." . expand("<afile>:e")
|
||||
if exists('*fnameescape')
|
||||
let tmp_esc = fnameescape(tmp)
|
||||
let tmpe_esc = fnameescape(tmpe)
|
||||
else
|
||||
let tmp_esc = escape(tmp, ' ')
|
||||
let tmpe_esc = escape(tmpe, ' ')
|
||||
endif
|
||||
let tmp_esc = fnameescape(tmp)
|
||||
let tmpe_esc = fnameescape(tmpe)
|
||||
" write the just read lines to a temp file "'[,']w tmp.gz"
|
||||
execute "silent '[,']w " . tmpe_esc
|
||||
" uncompress the temp file: call system("gzip -dn tmp.gz")
|
||||
@@ -101,22 +96,14 @@ fun gzip#read(cmd)
|
||||
let ok = 1
|
||||
" delete the compressed lines; remember the line number
|
||||
let l = line("'[") - 1
|
||||
if exists(":lockmarks")
|
||||
lockmarks '[,']d _
|
||||
else
|
||||
'[,']d _
|
||||
endif
|
||||
lockmarks '[,']d _
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp_esc
|
||||
endif
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
|
||||
else
|
||||
execute "silent " . l . "r " . tmp_esc
|
||||
execute "silent lockmarks " . l . "r " . tmp_esc
|
||||
endif
|
||||
|
||||
" if buffer became empty, delete trailing blank line
|
||||
@@ -143,11 +130,7 @@ fun gzip#read(cmd)
|
||||
|
||||
" When uncompressed the whole buffer, do autocommands
|
||||
if ok && empty
|
||||
if exists('*fnameescape')
|
||||
let fname = fnameescape(expand("%:r"))
|
||||
else
|
||||
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
|
||||
endif
|
||||
let fname = fnameescape(expand("%:r"))
|
||||
if filereadable(undofile(expand("%")))
|
||||
exe "sil rundo " . fnameescape(undofile(expand("%")))
|
||||
endif
|
||||
@@ -191,8 +174,9 @@ fun gzip#appre(cmd)
|
||||
call s:set_compression(readfile(nm, "b", 1)[0])
|
||||
endif
|
||||
|
||||
" Rename to a weird name to avoid the risk of overwriting another file
|
||||
let nmt = expand("<afile>:p:h") . "/X~=@l9q5"
|
||||
" Rename to a unique name to avoid the risk of overwriting another file
|
||||
" or being targeted by a symlink in a shared directory.
|
||||
let nmt = s:samedir_tempname(nm)
|
||||
let nmte = nmt . "." . expand("<afile>:e")
|
||||
if rename(nm, nmte) == 0
|
||||
if &patchmode != "" && getfsize(nm . &patchmode) == -1
|
||||
@@ -208,22 +192,27 @@ fun gzip#appre(cmd)
|
||||
endfun
|
||||
|
||||
" find a file name for the file to be compressed. Use "name" without an
|
||||
" extension if possible. Otherwise use a weird name to avoid overwriting an
|
||||
" existing file.
|
||||
" extension if possible. Otherwise use a unique name to avoid overwriting an
|
||||
" existing file or following a symlink set up by another user.
|
||||
fun s:tempname(name)
|
||||
let fn = fnamemodify(a:name, ":r")
|
||||
if !filereadable(fn) && !isdirectory(fn)
|
||||
return fn
|
||||
endif
|
||||
return fnamemodify(a:name, ":p:h") . "/X~=@l9q5"
|
||||
return s:samedir_tempname(a:name)
|
||||
endfun
|
||||
|
||||
" Generate an unpredictable file name in the same directory as "name", using
|
||||
" the random component of tempname() to avoid symlink attacks in shared
|
||||
" directories (e.g. /tmp).
|
||||
fun s:samedir_tempname(name)
|
||||
let tmp = tempname()
|
||||
return fnamemodify(a:name, ":p:h") . "/" . fnamemodify(tmp, ":h:t") . fnamemodify(tmp, ":t")
|
||||
endfun
|
||||
|
||||
fun s:escape(name)
|
||||
" shellescape() was added by patch 7.0.111
|
||||
if exists("*shellescape")
|
||||
return shellescape(a:name)
|
||||
endif
|
||||
return "'" . a:name . "'"
|
||||
return shellescape(a:name)
|
||||
endfun
|
||||
|
||||
" vim: set sw=2 :
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Last Change:
|
||||
" 2025 Oct 27 by Vim project: don't use rustfmt as 'formatprg' by default
|
||||
" 2026 Jan 25 by Vim project: don't hide rustfmt errors, restore default var
|
||||
"
|
||||
" 2026 Mar 30 by Vim project: use fnameescape for :chdir commands
|
||||
"
|
||||
" Adapted from https://github.com/fatih/vim-go
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
@@ -135,7 +135,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre)
|
||||
" chdir to the directory of the file
|
||||
let l:has_lcd = haslocaldir()
|
||||
let l:prev_cd = getcwd()
|
||||
execute 'lchdir! '.expand('%:h')
|
||||
execute 'lchdir! ' . fnameescape(expand('%:h'))
|
||||
|
||||
let l:buffer = getline(1, '$')
|
||||
if exists("*systemlist")
|
||||
@@ -215,6 +215,7 @@ function! s:RunRustfmt(command, tmpname, from_writepre)
|
||||
endif
|
||||
|
||||
" Restore the current directory if needed
|
||||
let l:prev_cd = fnameescape(l:prev_cd)
|
||||
if a:tmpname ==# ''
|
||||
if l:has_lcd
|
||||
execute 'lchdir! '.l:prev_cd
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
" 2025 Jul 16 by Vim Project: update minimum vim version
|
||||
" 2026 Feb 06 by Vim Project: consider 'nowrapscan' (#19333)
|
||||
" 2026 Feb 07 by Vim Project: make the path traversal detection more robust (#19341)
|
||||
" 2026 Apr 06 by Vim Project: fix bugs with lz4 support (#19925)
|
||||
" 2026 Apr 09 by Vim Project: fix bugs with zstd support (#19930)
|
||||
" 2026 Apr 09 by Vim Project: fix bug with dotted filename (#19930)
|
||||
" 2026 Apr 15 by Vim Project: fix more path traversal issues (#19981)
|
||||
" 2026 Apr 16 by Vim Project: use g:tar_secure in tar#Extract()
|
||||
" 2026 May 14 by Vim Project: use correct shellescape() call in Vimuntar()
|
||||
"
|
||||
" Contains many ideas from Michael Toren's <tar.vim>
|
||||
"
|
||||
@@ -609,114 +615,139 @@ fun! tar#Extract()
|
||||
let &report= repkeep
|
||||
return
|
||||
endif
|
||||
|
||||
let tarball = expand("%")
|
||||
let tarbase = substitute(tarball,'\..*$','','')
|
||||
if fname =~ '^[.]\?[.]/' || simplify(fname) =~ '\.\.[/\\]'
|
||||
call s:Msg('tar#Extract', 'error', "Path Traversal Attack detected, not extracting!")
|
||||
let &report= repkeep
|
||||
return
|
||||
endif
|
||||
if has("unix")
|
||||
if fname =~ '^/'
|
||||
call s:Msg('tar#Extract', 'error', "Path Traversal Attack detected, not extracting!")
|
||||
let &report= repkeep
|
||||
return
|
||||
endif
|
||||
else
|
||||
if fname =~ '^\%(\a:[\\/]\|[\\/]\)'
|
||||
call s:Msg('tar#Extract', 'error', "Path Traversal Attack detected, not extracting!")
|
||||
let &report= repkeep
|
||||
return
|
||||
endif
|
||||
endif
|
||||
|
||||
let extractcmd= s:WinPath(g:tar_extractcmd)
|
||||
if filereadable(tarbase.".tar")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
|
||||
let tarball = expand("%")
|
||||
if !filereadable(tarball)
|
||||
let &report= repkeep
|
||||
return
|
||||
endif
|
||||
|
||||
if tarball =~# "\.tar$"
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ". fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tgz")
|
||||
elseif tarball =~# "\.tgz$"
|
||||
let extractcmd= substitute(extractcmd,"-","-z","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tgz {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.gz")
|
||||
elseif tarball =~# "\.tar\.gz$"
|
||||
let extractcmd= substitute(extractcmd,"-","-z","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.gz {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tbz")
|
||||
elseif tarball =~# "\.tbz$"
|
||||
let extractcmd= substitute(extractcmd,"-","-j","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tbz {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.bz2")
|
||||
elseif tarball =~# "\.tar\.bz2$"
|
||||
let extractcmd= substitute(extractcmd,"-","-j","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz2 {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.bz3")
|
||||
elseif tarball =~# "\.tar\.bz3$"
|
||||
let extractcmd= substitute(extractcmd,"-","-j","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz3 {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".txz")
|
||||
elseif tarball =~# "\.txz$"
|
||||
let extractcmd= substitute(extractcmd,"-","-J","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.txz {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.xz")
|
||||
elseif tarball =~# "\.tar\.xz$"
|
||||
let extractcmd= substitute(extractcmd,"-","-J","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.xz {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tzst")
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
|
||||
elseif tarball =~# "\.tzst$"
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd -","")
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tzst {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.zst")
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
|
||||
elseif tarball =~# "\.tar\.zst$"
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd -","")
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.zst {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tlz4")
|
||||
let extractcmd= substitute(extractcmd,"-","-I lz4","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tlz4 ".shellescape(fname))
|
||||
elseif tarball =~# "\.tlz4$"
|
||||
if has("linux")
|
||||
let extractcmd= substitute(extractcmd,"-","-I lz4 -","")
|
||||
endif
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tlz4 {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.lz4")
|
||||
let extractcmd= substitute(extractcmd,"-","-I lz4","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.lz4".shellescape(fname))
|
||||
elseif tarball =~# "\.tar\.lz4$"
|
||||
if has("linux")
|
||||
let extractcmd= substitute(extractcmd,"-","-I lz4 -","")
|
||||
endif
|
||||
call system(extractcmd." ".shellescape(tarball)." ".g:tar_secure.shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.lz4 {fname}: failed!")
|
||||
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarball} {fname}: failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
@@ -802,9 +833,9 @@ fun! tar#Vimuntar(...)
|
||||
" if necessary, decompress the tarball; then, extract it
|
||||
if tartail =~ '\.tgz'
|
||||
if executable("gunzip")
|
||||
silent exe "!gunzip ".shellescape(tartail)
|
||||
silent exe "!gunzip ".shellescape(tartail, 1)
|
||||
elseif executable("gzip")
|
||||
silent exe "!gzip -d ".shellescape(tartail)
|
||||
silent exe "!gzip -d ".shellescape(tartail, 1)
|
||||
else
|
||||
echoerr "unable to decompress<".tartail."> on this system"
|
||||
if simplify(curdir) != simplify(tarhome)
|
||||
|
||||
@@ -3,6 +3,8 @@ vim9script
|
||||
# Language: Generic TeX typesetting engine
|
||||
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
|
||||
# Latest Revision: 2026 Feb 19
|
||||
# Last Change:
|
||||
# 2026 Mar 30 by Vim project: Use fnameescape for the ProcessOutput command
|
||||
|
||||
# Constants and helpers {{{
|
||||
const SLASH = !exists("+shellslash") || &shellslash ? '/' : '\'
|
||||
@@ -60,7 +62,7 @@ def ProcessOutput(qfid: number, wd: string, efm: string, ch: channel, msg: strin
|
||||
endif
|
||||
|
||||
# Make sure the working directory is correct
|
||||
silent execute "lcd" wd
|
||||
silent execute "lcd" .. fnameescape(wd)
|
||||
setqflist([], 'a', {'id': qfid, 'lines': [msg], 'efm': efm})
|
||||
silent lcd -
|
||||
enddef
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
" vimball.vim : construct a file containing both paths and files
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Original Author: Charles E. Campbell
|
||||
" Date: Apr 11, 2016
|
||||
" Date: Apr 16, 2026
|
||||
" Version: 37 (with modifications from the Vim Project)
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Last Change:
|
||||
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
|
||||
" Copyright: (c) 2004-2011 by Charles E. Campbell
|
||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
" (see |copyright|) except use "Vimball" instead of "Vim".
|
||||
@@ -18,15 +17,14 @@ if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_vimball = "v37"
|
||||
if v:version < 702
|
||||
if v:version < 704
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of vimball needs vim 7.2"
|
||||
echo "***warning*** this version of vimball needs vim 7.4"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
"DechoTabOn
|
||||
|
||||
" =====================================================================
|
||||
" Constants: {{{1
|
||||
@@ -47,20 +45,6 @@ if !exists("s:USAGE")
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" set up g:vimball_mkdir if the mkdir() call isn't defined
|
||||
if !exists("*mkdir")
|
||||
if exists("g:netrw_local_mkdir")
|
||||
let g:vimball_mkdir= g:netrw_local_mkdir
|
||||
elseif executable("mkdir")
|
||||
let g:vimball_mkdir= "mkdir"
|
||||
elseif executable("makedir")
|
||||
let g:vimball_mkdir= "makedir"
|
||||
endif
|
||||
if !exists(g:vimball_mkdir)
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
" =====================================================================
|
||||
@@ -81,7 +65,6 @@ endif
|
||||
" filesize
|
||||
" [file]
|
||||
fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
|
||||
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
|
||||
else
|
||||
@@ -90,15 +73,12 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
if vbname !~ '\.vmb$'
|
||||
let vbname= vbname.'.vmb'
|
||||
endif
|
||||
" call Decho("vbname<".vbname.">")
|
||||
if !a:writelevel && a:1 =~ '[\/]'
|
||||
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes; use ! to insist")
|
||||
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
|
||||
return
|
||||
endif
|
||||
if !a:writelevel && filereadable(vbname)
|
||||
call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
|
||||
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -120,20 +100,17 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" record current tab, initialize while loop index
|
||||
let curtabnr = tabpagenr()
|
||||
let linenr = a:line1
|
||||
" call Decho("curtabnr=".curtabnr)
|
||||
|
||||
while linenr <= a:line2
|
||||
let svfile = getline(linenr)
|
||||
" call Decho("svfile<".svfile.">")
|
||||
|
||||
|
||||
if !filereadable(svfile)
|
||||
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
|
||||
call s:ChgDir(curdir)
|
||||
call vimball#RestoreSettings()
|
||||
" call Dret("MkVimball")
|
||||
call s:ChgDir(curdir)
|
||||
call vimball#RestoreSettings()
|
||||
return
|
||||
endif
|
||||
|
||||
|
||||
" create/switch to mkvimball tab
|
||||
if !exists("vbtabnr")
|
||||
tabnew
|
||||
@@ -142,23 +119,21 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
else
|
||||
exe "tabn ".vbtabnr
|
||||
endif
|
||||
|
||||
|
||||
let lastline= line("$") + 1
|
||||
if lastline == 2 && getline("$") == ""
|
||||
call setline(1,'" Vimball Archiver by Charles E. Campbell')
|
||||
call setline(2,'UseVimball')
|
||||
call setline(3,'finish')
|
||||
let lastline= line("$") + 1
|
||||
call setline(1,'" Vimball Archiver by Charles E. Campbell')
|
||||
call setline(2,'UseVimball')
|
||||
call setline(3,'finish')
|
||||
let lastline= line("$") + 1
|
||||
endif
|
||||
call setline(lastline ,substitute(svfile,'$',' [[[1',''))
|
||||
call setline(lastline+1,0)
|
||||
|
||||
" write the file from the tab
|
||||
" call Decho("exe $r ".fnameescape(svfile))
|
||||
exe "$r ".fnameescape(svfile)
|
||||
|
||||
call setline(lastline+1,line("$") - lastline - 1)
|
||||
" call Decho("lastline=".lastline." line$=".line("$"))
|
||||
|
||||
" restore to normal tab
|
||||
exe "tabn ".curtabnr
|
||||
@@ -170,13 +145,10 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
call s:ChgDir(curdir)
|
||||
setlocal ff=unix
|
||||
if a:writelevel
|
||||
" call Decho("exe w! ".fnameescape(vbname))
|
||||
exe "w! ".fnameescape(vbname)
|
||||
else
|
||||
" call Decho("exe w ".fnameescape(vbname))
|
||||
exe "w ".fnameescape(vbname)
|
||||
endif
|
||||
" call Decho("Vimball<".vbname."> created")
|
||||
echo "Vimball<".vbname."> created"
|
||||
|
||||
" remove the evidence
|
||||
@@ -187,25 +159,16 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" restore options
|
||||
call vimball#RestoreSettings()
|
||||
|
||||
" call Dret("MkVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#Vimball: extract and distribute contents from a vimball {{{2
|
||||
" (invoked the the UseVimball command embedded in
|
||||
" (invoked the the UseVimball command embedded in
|
||||
" vimballs' prologue)
|
||||
fun! vimball#Vimball(really,...)
|
||||
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
||||
|
||||
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
|
||||
echoerr "your vim is missing the fnameescape() function (pls upgrade to vim 7.2 or later)"
|
||||
" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later")
|
||||
return
|
||||
endif
|
||||
|
||||
if getline(1) !~ '^" Vimball Archiver'
|
||||
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
||||
" call Dret("vimball#Vimball")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -215,7 +178,6 @@ fun! vimball#Vimball(really,...)
|
||||
let vimballfile = expand("%:tr")
|
||||
|
||||
" set up vimball tab
|
||||
" call Decho("setting up vimball tab")
|
||||
tabnew
|
||||
sil! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
@@ -227,21 +189,18 @@ fun! vimball#Vimball(really,...)
|
||||
" If, however, the user did not specify a full path, set the home to be below the current directory
|
||||
let home= expand(a:1)
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if home !~ '^\a:[/\\]'
|
||||
let home= getcwd().'/'.a:1
|
||||
endif
|
||||
if home !~ '^\a:[/\\]'
|
||||
let home= getcwd().'/'.a:1
|
||||
endif
|
||||
elseif home !~ '^/'
|
||||
let home= getcwd().'/'.a:1
|
||||
let home= getcwd().'/'.a:1
|
||||
endif
|
||||
else
|
||||
let home= vimball#VimballHome()
|
||||
endif
|
||||
" call Decho("home<".home.">")
|
||||
|
||||
" save current directory and remove older same-named vimball, if any
|
||||
let curdir = getcwd()
|
||||
" call Decho("home<".home.">")
|
||||
" call Decho("curdir<".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
let s:ok_unablefind= 1
|
||||
@@ -254,62 +213,67 @@ fun! vimball#Vimball(really,...)
|
||||
" give title to listing of (extracted) files from Vimball Archive
|
||||
if a:really
|
||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||
else
|
||||
else
|
||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||
echohl Statement | echomsg "files would be placed under: ".home | echohl None
|
||||
endif
|
||||
|
||||
" apportion vimball contents to various files
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
" call Decho("linenr=".linenr." line$=".line("$"))
|
||||
while 1 < linenr && linenr < line("$")
|
||||
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
||||
let fname = substitute(fname,'\\','/','g')
|
||||
let fname = resolve(simplify(fname))
|
||||
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
|
||||
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
|
||||
let filecnt = filecnt + 1
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
|
||||
" Do not allow a leading /, .. anywhere, or a Windows drive letter
|
||||
" (e.g. C:/foo) in the file name. Backslashes were already converted
|
||||
" to forward slashes above, so this also catches \\server\share UNC
|
||||
" paths via the leading-slash check.
|
||||
if fname =~ '\.\.' || fname =~ '^/' || fname =~ '^\a:'
|
||||
echomsg "(Vimball) Path Traversal Attack detected, aborting..."
|
||||
exe "tabn ".curtabnr
|
||||
bw! Vimball
|
||||
call s:ChgDir(curdir)
|
||||
return
|
||||
" Also, disallow strange paths, that could lead to code execution from
|
||||
" .VimballRecord
|
||||
" Disallow: pipe, quotes and closing paren
|
||||
elseif fname =~ '[|'')"]'
|
||||
echomsg printf("(Vimball) Forbidding strange filename: '%s', aborting...", fname)
|
||||
exe "tabn ".curtabnr
|
||||
bw! Vimball
|
||||
call s:ChgDir(curdir)
|
||||
return
|
||||
endif
|
||||
|
||||
if a:really
|
||||
echomsg "extracted <".fname.">: ".fsize." lines"
|
||||
else
|
||||
echomsg "would extract <".fname.">: ".fsize." lines"
|
||||
endif
|
||||
" call Decho("using L#".linenr.": will extract file<".fname.">")
|
||||
" call Decho("using L#".(linenr+1).": fsize=".fsize)
|
||||
|
||||
" Allow AsNeeded/ directory to take place of plugin/ directory
|
||||
" when AsNeeded/filename is filereadable or was present in VimballRecord
|
||||
if fname =~ '\<plugin/'
|
||||
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
||||
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname)
|
||||
" call Decho("using anfname<".anfname."> instead of <".fname.">")
|
||||
let fname= anfname
|
||||
endif
|
||||
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
||||
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~# anfname)
|
||||
let fname= anfname
|
||||
endif
|
||||
endif
|
||||
|
||||
" make directories if they don't exist yet
|
||||
if a:really
|
||||
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
|
||||
let fnamebuf= substitute(fname,'\\','/','g')
|
||||
let dirpath = substitute(home,'\\','/','g')
|
||||
" call Decho("init: fnamebuf<".fnamebuf.">")
|
||||
" call Decho("init: dirpath <".dirpath.">")
|
||||
let dirpath = substitute(home,'\\','/','g')
|
||||
while fnamebuf =~ '/'
|
||||
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
|
||||
let dirpath = dirname
|
||||
let dirpath = dirname
|
||||
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
|
||||
" call Decho("dirname<".dirname.">")
|
||||
" call Decho("dirpath<".dirpath.">")
|
||||
if !isdirectory(dirname)
|
||||
" call Decho("making <".dirname.">")
|
||||
if exists("g:vimball_mkdir")
|
||||
call system(g:vimball_mkdir." ".shellescape(dirname))
|
||||
else
|
||||
call mkdir(dirname)
|
||||
endif
|
||||
call s:RecordInVar(home,"rmdir('".dirname."')")
|
||||
call mkdir(dirname)
|
||||
call s:RecordInVar(home,"rmdir('".dirname."')")
|
||||
endif
|
||||
endwhile
|
||||
endif
|
||||
@@ -319,13 +283,11 @@ fun! vimball#Vimball(really,...)
|
||||
" (skip over path/filename and qty-lines)
|
||||
let linenr = linenr + 2
|
||||
let lastline = linenr + fsize - 1
|
||||
" call Decho("exe ".linenr.",".lastline."yank a")
|
||||
" no point in handling a zero-length file
|
||||
if lastline >= linenr
|
||||
exe "silent ".linenr.",".lastline."yank a"
|
||||
|
||||
" copy "a" buffer into tab
|
||||
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal ma
|
||||
sil! %d
|
||||
@@ -336,38 +298,31 @@ fun! vimball#Vimball(really,...)
|
||||
" write tab to file
|
||||
if a:really
|
||||
let fnamepath= home."/".fname
|
||||
" call Decho("exe w! ".fnameescape(fnamepath))
|
||||
if fenc != ""
|
||||
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
|
||||
else
|
||||
exe "silent w! ".fnameescape(fnamepath)
|
||||
endif
|
||||
echo "wrote ".fnameescape(fnamepath)
|
||||
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
||||
if fenc != ""
|
||||
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
|
||||
else
|
||||
exe "silent w! ".fnameescape(fnamepath)
|
||||
endif
|
||||
echo "wrote ".fnameescape(fnamepath)
|
||||
call s:RecordInVar(home,"call delete('".escape(fnamepath, '"''|')."')")
|
||||
endif
|
||||
|
||||
" return to tab with vimball
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
|
||||
" set up help if it's a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
" call Decho("didhelp<".didhelp.">")
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
endif
|
||||
endif
|
||||
|
||||
" update for next file
|
||||
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
|
||||
let linenr= linenr + fsize
|
||||
endwhile
|
||||
|
||||
" set up help
|
||||
" call Decho("about to set up help: didhelp<".didhelp.">")
|
||||
if didhelp != ""
|
||||
let htpath= home."/".didhelp
|
||||
" call Decho("exe helptags ".htpath)
|
||||
exe "helptags ".fnameescape(htpath)
|
||||
echo "did helptags"
|
||||
endif
|
||||
@@ -388,8 +343,6 @@ fun! vimball#Vimball(really,...)
|
||||
exe "sil! tabc! ".vbtabnr
|
||||
call vimball#RestoreSettings()
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" call Dret("vimball#Vimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -399,23 +352,18 @@ endfun
|
||||
" Usage: RmVimball (assume current file is a vimball; remove)
|
||||
" RmVimball vimballname
|
||||
fun! vimball#RmVimball(...)
|
||||
" call Dfunc("vimball#RmVimball() a:0=".a:0)
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
|
||||
return
|
||||
endif
|
||||
|
||||
if a:0 == 0
|
||||
let curfile= expand("%:tr")
|
||||
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
|
||||
else
|
||||
if a:1 =~ '[\/]'
|
||||
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
|
||||
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
|
||||
return
|
||||
endif
|
||||
let curfile= a:1
|
||||
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
|
||||
endif
|
||||
if curfile =~ '\.vmb$'
|
||||
let curfile= substitute(curfile,'\.vmb','','')
|
||||
@@ -428,75 +376,60 @@ fun! vimball#RmVimball(...)
|
||||
let home= vimball#VimballHome()
|
||||
endif
|
||||
let curdir = getcwd()
|
||||
" call Decho("home <".home.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
" call Decho("curdir <".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
if filereadable(".VimballRecord")
|
||||
" call Decho(".VimballRecord is readable")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
keepalt keepjumps 1split
|
||||
keepalt keepjumps 1split
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
let keepsrch= @/
|
||||
" call Decho('search for ^\M'.curfile.'.\m: ')
|
||||
" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ')
|
||||
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ')
|
||||
if search('^\M'.curfile."\m: ".'cw')
|
||||
let foundit= 1
|
||||
let foundit= 1
|
||||
elseif search('^\M'.curfile.".\mvmb: ",'cw')
|
||||
let foundit= 2
|
||||
let foundit= 2
|
||||
elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw')
|
||||
let foundit= 2
|
||||
let foundit= 2
|
||||
elseif search('^\M'.curfile.".\mvba: ",'cw')
|
||||
let foundit= 1
|
||||
let foundit= 1
|
||||
elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw')
|
||||
let foundit= 1
|
||||
let foundit= 1
|
||||
else
|
||||
let foundit = 0
|
||||
endif
|
||||
if foundit
|
||||
if foundit == 1
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||
else
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
|
||||
endif
|
||||
if foundit == 1
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||
else
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
|
||||
endif
|
||||
let s:VBRstring= substitute(exestring,'call delete(','','g')
|
||||
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
|
||||
" call Decho("exe ".exestring)
|
||||
sil! keepalt keepjumps exe exestring
|
||||
sil! keepalt keepjumps d
|
||||
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
|
||||
" call Decho("exestring<".exestring.">")
|
||||
echomsg "removed ".exestring." files"
|
||||
sil! keepalt keepjumps exe exestring
|
||||
sil! keepalt keepjumps d
|
||||
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
|
||||
echomsg "removed ".exestring." files"
|
||||
else
|
||||
let s:VBRstring= ''
|
||||
let curfile = substitute(curfile,'\.vmb','','')
|
||||
" call Decho("unable to find <".curfile."> in .VimballRecord")
|
||||
if !exists("s:ok_unablefind")
|
||||
let curfile = substitute(curfile,'\.vmb','','')
|
||||
if !exists("s:ok_unablefind")
|
||||
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
let @/= keepsrch
|
||||
endif
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" call Dret("vimball#RmVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#Decompress: attempts to automatically decompress vimballs {{{2
|
||||
fun! vimball#Decompress(fname,...)
|
||||
" call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0)
|
||||
|
||||
" decompression:
|
||||
if expand("%") =~ '.*\.gz' && executable("gunzip")
|
||||
" handle *.gz with gunzip
|
||||
silent exe "!gunzip ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.gz$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -506,7 +439,7 @@ fun! vimball#Decompress(fname,...)
|
||||
" handle *.gz with gzip -d
|
||||
silent exe "!gzip -d ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.gz$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -516,7 +449,7 @@ fun! vimball#Decompress(fname,...)
|
||||
" handle *.bz2 with bunzip2
|
||||
silent exe "!bunzip2 ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz2$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -526,7 +459,7 @@ fun! vimball#Decompress(fname,...)
|
||||
" handle *.bz2 with bzip2 -d
|
||||
silent exe "!bzip2 -d ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz2$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -536,7 +469,7 @@ fun! vimball#Decompress(fname,...)
|
||||
" handle *.bz3 with bunzip3
|
||||
silent exe "!bunzip3 ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz3$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -546,7 +479,7 @@ fun! vimball#Decompress(fname,...)
|
||||
" handle *.bz3 with bzip3 -d
|
||||
silent exe "!bzip3 -d ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz3$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -556,7 +489,7 @@ fun! vimball#Decompress(fname,...)
|
||||
" handle *.zip with unzip
|
||||
silent exe "!unzip ".shellescape(a:fname)
|
||||
if v:shell_error != 0
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
|
||||
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.zip$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
@@ -564,14 +497,11 @@ fun! vimball#Decompress(fname,...)
|
||||
endif
|
||||
|
||||
if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif
|
||||
|
||||
" call Dret("Decompress")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#ShowMesg: {{{2
|
||||
fun! vimball#ShowMesg(level,msg)
|
||||
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
|
||||
|
||||
let rulerkeep = &ruler
|
||||
let showcmdkeep = &showcmd
|
||||
@@ -596,13 +526,10 @@ fun! vimball#ShowMesg(level,msg)
|
||||
|
||||
let &ruler = rulerkeep
|
||||
let &showcmd = showcmdkeep
|
||||
|
||||
" call Dret("vimball#ShowMesg")
|
||||
endfun
|
||||
" =====================================================================
|
||||
" s:ChgDir: change directory (in spite of Windoze) {{{2
|
||||
fun! s:ChgDir(newdir)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
try
|
||||
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
|
||||
@@ -618,58 +545,44 @@ fun! s:ChgDir(newdir)
|
||||
exe 'silent cd '.fnameescape(a:newdir)
|
||||
endtry
|
||||
endif
|
||||
" call Dret("ChgDir : curdir<".getcwd().">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
|
||||
fun! s:RecordInVar(home,cmd)
|
||||
" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
|
||||
if a:cmd =~ '^rmdir'
|
||||
" if !exists("s:recorddir")
|
||||
" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" else
|
||||
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" endif
|
||||
elseif !exists("s:recordfile")
|
||||
if !exists("s:recordfile")
|
||||
let s:recordfile= a:cmd
|
||||
else
|
||||
let s:recordfile= s:recordfile."|".a:cmd
|
||||
endif
|
||||
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:RecordInFile: {{{2
|
||||
fun! s:RecordInFile(home)
|
||||
" call Dfunc("s:RecordInFile()")
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("s:RecordInFile : g:vimball_norecord")
|
||||
return
|
||||
endif
|
||||
|
||||
if exists("s:recordfile") || exists("s:recorddir")
|
||||
let curdir= getcwd()
|
||||
call s:ChgDir(a:home)
|
||||
keepalt keepjumps 1split
|
||||
keepalt keepjumps 1split
|
||||
|
||||
let cmd= expand("%:tr").": "
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
setlocal ma
|
||||
$
|
||||
if exists("s:recordfile") && exists("s:recorddir")
|
||||
let cmd= cmd.s:recordfile."|".s:recorddir
|
||||
let cmd= cmd.s:recordfile."|".s:recorddir
|
||||
elseif exists("s:recorddir")
|
||||
let cmd= cmd.s:recorddir
|
||||
let cmd= cmd.s:recorddir
|
||||
elseif exists("s:recordfile")
|
||||
let cmd= cmd.s:recordfile
|
||||
let cmd= cmd.s:recordfile
|
||||
else
|
||||
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
|
||||
return
|
||||
return
|
||||
endif
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
" put command into buffer, write .VimballRecord `file
|
||||
keepalt keepjumps put=cmd
|
||||
@@ -678,35 +591,28 @@ fun! s:RecordInFile(home)
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
if exists("s:recorddir")
|
||||
" call Decho("unlet s:recorddir<".s:recorddir.">")
|
||||
unlet s:recorddir
|
||||
unlet s:recorddir
|
||||
endif
|
||||
if exists("s:recordfile")
|
||||
" call Decho("unlet s:recordfile<".s:recordfile.">")
|
||||
unlet s:recordfile
|
||||
unlet s:recordfile
|
||||
endif
|
||||
else
|
||||
" call Decho("s:record[file|dir] doesn't exist")
|
||||
endif
|
||||
|
||||
" call Dret("s:RecordInFile")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2
|
||||
fun! vimball#VimballHome()
|
||||
" call Dfunc("vimball#VimballHome()")
|
||||
if exists("g:vimball_home")
|
||||
let home= g:vimball_home
|
||||
else
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) && filewritable(home) | break | endif
|
||||
let basehome= substitute(home,'[/\\]\.vim$','','')
|
||||
let basehome= substitute(home,'[/\\]\.vim$','','')
|
||||
if isdirectory(basehome) && filewritable(basehome)
|
||||
let home= basehome."/.vim"
|
||||
break
|
||||
endif
|
||||
let home= basehome."/.vim"
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if home == ""
|
||||
" just pick the first directory
|
||||
@@ -717,18 +623,9 @@ fun! vimball#VimballHome()
|
||||
endif
|
||||
endif
|
||||
" insure that the home directory exists
|
||||
" call Decho("picked home<".home.">")
|
||||
if !isdirectory(home)
|
||||
if exists("g:vimball_mkdir")
|
||||
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
|
||||
" call Decho("system(".g:vimball_mkdir." ".shellescape(home).")")
|
||||
call system(g:vimball_mkdir." ".shellescape(home))
|
||||
else
|
||||
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
|
||||
call mkdir(home)
|
||||
endif
|
||||
call mkdir(home)
|
||||
endif
|
||||
" call Dret("vimball#VimballHome <".home.">")
|
||||
return home
|
||||
endfun
|
||||
|
||||
@@ -758,13 +655,11 @@ fun! vimball#SaveSettings()
|
||||
endif
|
||||
" vimballs should be in unix format
|
||||
setlocal ff=unix
|
||||
" call Dret("SaveSettings")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#RestoreSettings: {{{2
|
||||
fun! vimball#RestoreSettings()
|
||||
" call Dfunc("RestoreSettings()")
|
||||
let @a = s:regakeep
|
||||
if exists("+acd")
|
||||
let &acd = s:acdkeep
|
||||
@@ -780,14 +675,12 @@ fun! vimball#RestoreSettings()
|
||||
let &l:ff = s:ffkeep
|
||||
if s:makeep[0] != 0
|
||||
" restore mark a
|
||||
" call Decho("restore mark-a: makeep=".string(makeep))
|
||||
call setpos("'a",s:makeep)
|
||||
endif
|
||||
if exists("+acd")
|
||||
unlet s:acdkeep
|
||||
endif
|
||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
|
||||
" call Dret("RestoreSettings")
|
||||
endfun
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
@@ -795,4 +688,4 @@ unlet s:keepcpo
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
" vim: fdm=marker et
|
||||
|
||||
@@ -5,7 +5,7 @@ vim9script
|
||||
# Shane-XB-Qian
|
||||
# Andrew Radev
|
||||
# thinca
|
||||
# Last Change: 2026 Feb 10
|
||||
# Last Change: 2026 Mar 30
|
||||
#
|
||||
# Vim script to handle jumping to the targets of several types of Vim commands
|
||||
# (:import, :packadd, :runtime, :colorscheme), and to autoloaded functions of
|
||||
@@ -168,7 +168,7 @@ def HandleImportLine(editcmd: string, curline: string) #{{{2
|
||||
"\<C-W>F": 'split',
|
||||
"\<C-W>gF": 'tab split',
|
||||
}[editcmd]
|
||||
execute how_to_split .. ' ' .. filepath
|
||||
execute how_to_split .. ' ' .. fnameescape(filepath)
|
||||
enddef
|
||||
|
||||
def Open(target: any, editcmd: string, search_pattern: string = '') #{{{2
|
||||
@@ -193,7 +193,7 @@ def Open(target: any, editcmd: string, search_pattern: string = '') #{{{2
|
||||
cmd = $'+silent\ call\ search(''{escaped_pattern}'')'
|
||||
endif
|
||||
|
||||
execute $'{split} {cmd} {fname}'
|
||||
execute $'{split} {cmd} {fnameescape(fname)}'
|
||||
|
||||
# If there are several files to open, put them into an arglist.
|
||||
if target->typename() == 'list<string>'
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
" 2025 Dec 20 by Vim Project: use :lcd instead of :cd
|
||||
" 2026 Feb 08 by Vim Project: use system() instead of :!
|
||||
" 2026 Mar 08 by Vim Project: Make ZipUpdatePS() check for powershell
|
||||
" 2026 Apr 01 by Vim Project: Detect more path traversal attacks
|
||||
" 2026 Apr 05 by Vim Project: Detect more path traversal attacks
|
||||
" 2026 Apr 14 by Vim Project: Detect more path traversal attacks on Windows
|
||||
" 2026 Apr 15 by Vim Project: Detect more path traversal attacks on Windows
|
||||
" 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,
|
||||
@@ -367,6 +371,11 @@ fun! zip#Write(fname)
|
||||
return
|
||||
endif
|
||||
|
||||
if simplify(a:fname) =~ '\.\.[/\\]'
|
||||
call s:Mess('Error', "***error*** (zip#Write) Path Traversal Attack detected, not writing!")
|
||||
return
|
||||
endif
|
||||
|
||||
let curdir= getcwd()
|
||||
let tmpdir= tempname()
|
||||
if tmpdir =~ '\.'
|
||||
@@ -389,9 +398,21 @@ fun! zip#Write(fname)
|
||||
if has("unix")
|
||||
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','')
|
||||
" fname should not start with a leading slash to avoid writing anywhere into the system
|
||||
if fname =~ '^/'
|
||||
call s:Mess('Error', "***error*** (zip#Write) Path Traversal Attack detected, not writing!")
|
||||
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
|
||||
return
|
||||
endif
|
||||
else
|
||||
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
|
||||
" fname should not start with drive letter, UNC path, or leading slash
|
||||
if fname =~ '^\%(\a:[\\/]\|[\\/]\)'
|
||||
call s:Mess('Error', "***error*** (zip#Write) Path Traversal Attack detected, not writing!")
|
||||
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
|
||||
return
|
||||
endif
|
||||
endif
|
||||
if fname =~ '^[.]\{1,2}/'
|
||||
let gnu_cmd = g:zip_zipcmd . ' -d ' . s:Escape(fnamemodify(zipfile,":p"),0) . ' ' . s:Escape(fname,0)
|
||||
@@ -481,10 +502,22 @@ fun! zip#Extract()
|
||||
if fname =~ '/$'
|
||||
call s:Mess('Error', "***error*** (zip#Extract) Please specify a file, not a directory")
|
||||
return
|
||||
elseif fname =~ '^[.]\?[.]/'
|
||||
elseif fname =~ '^[.]\?[.]/' || simplify(fname) =~ '\.\.[/\\]'
|
||||
call s:Mess('Error', "***error*** (zip#Browse) Path Traversal Attack detected, not extracting!")
|
||||
return
|
||||
endif
|
||||
" block absolute paths
|
||||
if has("unix")
|
||||
if fname =~ '^/'
|
||||
call s:Mess('Error', "***error*** (zip#Extract) Path Traversal Attack detected, not extracting!")
|
||||
return
|
||||
endif
|
||||
else
|
||||
if fname =~ '^\%(\a:[\\/]\|[\\/]\)'
|
||||
call s:Mess('Error', "***error*** (zip#Extract) Path Traversal Attack detected, not extracting!")
|
||||
return
|
||||
endif
|
||||
endif
|
||||
if filereadable(fname)
|
||||
call s:Mess('Error', "***error*** (zip#Extract) <" .. fname .."> already exists in directory, not overwriting!")
|
||||
return
|
||||
|
||||
23
runtime/compiler/just.vim
Normal file
23
runtime/compiler/just.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Just
|
||||
" Maintainer: Alarcritty
|
||||
" Last Change: 2026 Mar 20
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "just"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
CompilerSet makeprg=just
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%Eerror:\ %m,
|
||||
\%C%\\s%#——▶\ %f:%l:%c,
|
||||
\%-C%.%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,6 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
" Last Change:
|
||||
" 2026 May 12 by the Vim project (set errormformat)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -11,13 +13,29 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" a subcommand must be provided for the this compiler (test, build-exe, etc)
|
||||
if has('patch-7.4.191')
|
||||
CompilerSet makeprg=zig\ \$*\ \%:S
|
||||
else
|
||||
CompilerSet makeprg=zig\ \$*\ \"%\"
|
||||
endif
|
||||
CompilerSet makeprg=zig\ \$*\ \%:S
|
||||
|
||||
" TODO: improve errorformat as needed.
|
||||
CompilerSet errorformat=
|
||||
\%-G,
|
||||
\%-G\ %#+-\ %.%#,
|
||||
\%-Ginstall,
|
||||
\%-Ginstall\ transitive\ failure,
|
||||
\%-Grun,
|
||||
\%-Grun\ transitive\ failure,
|
||||
\%-Gtest,
|
||||
\%-Gtest\ transitive\ failure,
|
||||
\%-Gfailed\ command:\ %.%#,
|
||||
\%-Gerror:\ %*\\d\ compilation\ errors,
|
||||
\%-GBuild\ Summary:\ %.%#,
|
||||
\%-Gerror:\ the\ following\ build\ command\ failed\ with\ exit\ code\ %*\\d:,
|
||||
\%-G.zig-cache%.%#,
|
||||
\%E%f:%l:%c:\ error:\ %m,
|
||||
\%I%f:%l:%c:\ note:\ %m
|
||||
|
||||
" zig has no warnings, but zig cc and zig c++ do
|
||||
CompilerSet errorformat+=
|
||||
\%W%f:%l:%c:\ warning:\ %m,
|
||||
\%-G%*\\d\ warnings\ generated.
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig build)
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
" Last Change: 2024 Apr 05 by The Vim Project (removed :CompilerSet definition)
|
||||
" Last Change: 2024 Apr 05 by the Vim Project (removed :CompilerSet definition)
|
||||
" 2026 May 12 by the Vim Project (removed comment)
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
@@ -13,13 +14,11 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists('g:zig_build_makeprg_params')
|
||||
execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
|
||||
execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
|
||||
else
|
||||
CompilerSet makeprg=zig\ build\ $*
|
||||
CompilerSet makeprg=zig\ build\ $*
|
||||
endif
|
||||
|
||||
" TODO: anything to add to errorformat for zig build specifically?
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig build-exe)
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
|
||||
" Last Change: 2025 Nov 16 by the Vim Project (set errorformat)
|
||||
" 2026 May 12 by the Vim project (remove errorformat)
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
@@ -13,9 +14,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
|
||||
" CompilerSet errorformat=%f:%l:%c: %t%*[^:]: %m, %f:%l:%c: %m, %f:%l: %m
|
||||
CompilerSet errorformat&
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab
|
||||
|
||||
18
runtime/compiler/zig_cc.vim
Normal file
18
runtime/compiler/zig_cc.vim
Normal file
@@ -0,0 +1,18 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig cc)
|
||||
" Last Change: 2026 May 12
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
runtime compiler/zig.vim
|
||||
let current_compiler = 'zig_cc'
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet makeprg=zig\ cc\ \%:S\ \$*
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig test)
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
|
||||
" Last Change: 2025 Nov 16 by the Vim Project (set errorformat)
|
||||
" 2026 May 12 by the Vim Project (remove error format)
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
@@ -13,9 +14,7 @@ let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet makeprg=zig\ test\ \%:S\ \$*
|
||||
" CompilerSet errorformat=%f:%l:%c: %t%*[^:]: %m, %f:%l:%c: %m, %f:%l: %m
|
||||
CompilerSet errorformat&
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
" vim: tabstop=8 shiftwidth=2 softtabstop=2 expandtab
|
||||
|
||||
@@ -35,19 +35,19 @@ doctags: doctags.c
|
||||
$(CC) doctags.c -o doctags
|
||||
|
||||
vim.man: vim.1
|
||||
nroff -man $? | sed -e s/.//g > $@
|
||||
nroff -c -man $? | sed -e s/.//g > $@
|
||||
|
||||
evim.man: evim.1
|
||||
nroff -man $? | sed -e s/.//g > $@
|
||||
nroff -c -man $? | sed -e s/.//g > $@
|
||||
|
||||
vimdiff.man: vimdiff.1
|
||||
nroff -man $? | sed -e s/.//g > $@
|
||||
nroff -c -man $? | sed -e s/.//g > $@
|
||||
|
||||
vimtutor.man: vimtutor.1
|
||||
nroff -man $? | sed -e s/.//g > $@
|
||||
nroff -c -man $? | sed -e s/.//g > $@
|
||||
|
||||
xxd.man: xxd.1
|
||||
nroff -man $? | sed -e s/.//g > $@
|
||||
nroff -c -man $? | sed -e s/.//g > $@
|
||||
|
||||
# Awk version of .txt to .html conversion.
|
||||
html: noerrors tags $(HTMLS)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.2. Last change: 2026 Feb 25
|
||||
*autocmd.txt* For Vim version 9.2. Last change: 2026 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -421,6 +421,8 @@ Name triggered by ~
|
||||
|TextChangedP| after a change was made to the text in Insert mode
|
||||
when popup menu visible
|
||||
|TextChangedT| after a change was made to the text in Terminal mode
|
||||
|TextPutPost| after text has been put
|
||||
|TextPutPre| before text is put
|
||||
|TextYankPost| after text has been yanked or deleted
|
||||
|
||||
|SafeState| nothing pending, going to wait for the user to type a
|
||||
@@ -1359,6 +1361,45 @@ TextChangedP After a change was made to the text in the
|
||||
TextChangedT After a change was made to the text in the
|
||||
current buffer in Terminal mode.
|
||||
Otherwise the same as TextChanged.
|
||||
*TextPutPost*
|
||||
TextPutPost After text has been put in the current buffer.
|
||||
The following values in |v:event| are mostly
|
||||
the same as |TextYankPost|:
|
||||
operator The operation performed,
|
||||
either 'p' or 'P'.
|
||||
regcontents Text that was put. For
|
||||
|quote_=|, this is the result
|
||||
of the expression.
|
||||
regname Name of the register or empty
|
||||
string for the unnamed
|
||||
register.
|
||||
regtype Type of the register, see
|
||||
|getregtype()|.
|
||||
visual True if the operation is
|
||||
performed in |Visual| mode.
|
||||
Not triggered when |quote_| is used nor when
|
||||
called recursively.
|
||||
It is not allowed to change the buffer text,
|
||||
see |textlock|.
|
||||
Note that for the |quote_.| register, since
|
||||
the last inserted text is buffered into the
|
||||
input buffer (buffer isn't modified directly),
|
||||
this autocommand is called directly after
|
||||
|TextPutPre|.
|
||||
{only when compiled with the +eval feature}
|
||||
*TextPutPre*
|
||||
TextPutPre Before text has been put in the current buffer.
|
||||
Same values as |TextPutPost| in |v:event|. It
|
||||
is valid to call |setreg()| in this
|
||||
autocommand, allowing you to process and
|
||||
modify the text in "regcontents" before it is
|
||||
put. However this does not apply to |quote_#|,
|
||||
|quote_=|, |quote_%|, |quote_:|, |quote_/| or |quote_.|.
|
||||
Not triggered when |quote_| is used nor when
|
||||
called recursively.
|
||||
It is not allowed to change the buffer text,
|
||||
see |textlock|.
|
||||
{only when compiled with the +eval feature}
|
||||
*TextYankPost*
|
||||
TextYankPost After text has been yanked or deleted in the
|
||||
current buffer. The following values of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.2. Last change: 2026 Mar 17
|
||||
*builtin.txt* For Vim version 9.2. Last change: 2026 May 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -82,7 +82,7 @@ browsedir({title}, {initdir}) String put up a directory requester
|
||||
bufadd({name}) Number add a buffer to the buffer list
|
||||
bufexists({buf}) Number |TRUE| if buffer {buf} exists
|
||||
buflisted({buf}) Number |TRUE| if buffer {buf} is listed
|
||||
bufload({buf}) Number load buffer {buf} if not loaded yet
|
||||
bufload({buf}) none load buffer {buf} if not loaded yet
|
||||
bufloaded({buf}) Number |TRUE| if buffer {buf} is loaded
|
||||
bufname([{buf}]) String name of the buffer {buf}
|
||||
bufnr([{buf} [, {create}]]) Number number of the buffer {buf}
|
||||
@@ -105,9 +105,10 @@ ch_evalraw({handle}, {string} [, {options}])
|
||||
any evaluate {string} on raw {handle}
|
||||
ch_getbufnr({handle}, {what}) Number get buffer number for {handle}/{what}
|
||||
ch_getjob({channel}) Job get the Job of {channel}
|
||||
ch_info({handle}) String info about channel {handle}
|
||||
ch_info({handle}) Dict info about channel {handle}
|
||||
ch_listen({address} [, {options}])
|
||||
Channel listen on {address}
|
||||
Channel listen on {address} - port on loopback
|
||||
or UNIX domain socket
|
||||
ch_log({msg} [, {handle}]) none write {msg} in the channel log file
|
||||
ch_logfile({fname} [, {mode}]) none start logging channel activity
|
||||
ch_open({address} [, {options}])
|
||||
@@ -120,7 +121,7 @@ ch_readraw({handle} [, {options}])
|
||||
ch_sendexpr({handle}, {expr} [, {options}])
|
||||
any send {expr} over JSON {handle}
|
||||
ch_sendraw({handle}, {expr} [, {options}])
|
||||
any send {expr} over raw {handle}
|
||||
none send {expr} over raw {handle}
|
||||
ch_setoptions({handle}, {options})
|
||||
none set options for {handle}
|
||||
ch_status({handle} [, {options}])
|
||||
@@ -192,7 +193,7 @@ extendnew({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict
|
||||
like |extend()| but creates a new List
|
||||
or Dictionary
|
||||
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
feedkeys({string} [, {mode}]) none add key sequence to typeahead buffer
|
||||
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
|
||||
worked
|
||||
filereadable({file}) Number |TRUE| if {file} is a readable file
|
||||
@@ -219,7 +220,7 @@ foldtext() String line displayed for closed fold
|
||||
foldtextresult({lnum}) String text for closed fold at {lnum}
|
||||
foreach({expr1}, {expr2}) List/Tuple/Dict/Blob/String
|
||||
for each item in {expr1} call {expr2}
|
||||
foreground() Number bring the Vim window to the foreground
|
||||
foreground() none bring the Vim window to the foreground
|
||||
fullcommand({name} [, {vim9}]) String get full command from {name}
|
||||
funcref({name} [, {arglist}] [, {dict}])
|
||||
Funcref reference to function {name}
|
||||
@@ -351,7 +352,7 @@ inputsecret({prompt} [, {text}])
|
||||
insert({object}, {item} [, {idx}])
|
||||
List insert {item} in {object}
|
||||
[before {idx}]
|
||||
instanceof({object}, {class}) Number |TRUE| if {object} is an instance of
|
||||
instanceof({object}, {class}) Bool |TRUE| if {object} is an instance of
|
||||
{class}
|
||||
interrupt() none interrupt script execution
|
||||
invert({expr}) Number bitwise invert
|
||||
@@ -391,7 +392,7 @@ list2tuple({list}) Tuple turn {list} of items into a tuple
|
||||
listener_add({callback} [, {buf} [, {unbuffered}]])
|
||||
Number add a callback to listen to changes
|
||||
listener_flush([{buf}]) none invoke listener callbacks
|
||||
listener_remove({id}) none remove a listener callback
|
||||
listener_remove({id}) Number remove a listener callback
|
||||
localtime() Number current time
|
||||
log({expr}) Float natural logarithm (base e) of {expr}
|
||||
log10({expr}) Float logarithm of Float {expr} to base 10
|
||||
@@ -455,8 +456,8 @@ popup_clear() none close all popup windows
|
||||
popup_close({id} [, {result}]) none close popup window {id}
|
||||
popup_create({what}, {options}) Number create a popup window
|
||||
popup_dialog({what}, {options}) Number create a popup window used as a dialog
|
||||
popup_filter_menu({id}, {key}) Number filter for a menu popup window
|
||||
popup_filter_yesno({id}, {key}) Number filter for a dialog popup window
|
||||
popup_filter_menu({id}, {key}) Bool filter for a menu popup window
|
||||
popup_filter_yesno({id}, {key}) Bool filter for a dialog popup window
|
||||
popup_findecho() Number get window ID of popup for `:echowin`
|
||||
popup_findinfo() Number get window ID of info popup window
|
||||
popup_findpreview() Number get window ID of preview popup window
|
||||
@@ -486,7 +487,7 @@ prompt_setinterrupt({buf}, {text})
|
||||
none set prompt interrupt function
|
||||
prompt_setprompt({buf}, {text}) none set prompt text
|
||||
prop_add({lnum}, {col}, {props})
|
||||
none add one text property
|
||||
Number add one text property
|
||||
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
|
||||
none add multiple text properties
|
||||
prop_clear({lnum} [, {lnum-end} [, {props}]])
|
||||
@@ -531,7 +532,7 @@ reltimefloat({time}) Float turn the time value into a Float
|
||||
reltimestr({time}) String turn time value into a String
|
||||
remote_expr({server}, {string} [, {idvar} [, {timeout}]])
|
||||
String send expression
|
||||
remote_foreground({server}) Number bring Vim server to the foreground
|
||||
remote_foreground({server}) none bring Vim server to the foreground
|
||||
remote_peek({serverid} [, {retvar}])
|
||||
Number check for reply string
|
||||
remote_read({serverid} [, {timeout}])
|
||||
@@ -581,7 +582,7 @@ setbufvar({buf}, {varname}, {val})
|
||||
none set {varname} in buffer {buf} to {val}
|
||||
setcellwidths({list}) none set character cell width overrides
|
||||
setcharpos({expr}, {list}) Number set the {expr} position to {list}
|
||||
setcharsearch({dict}) Dict set character search from {dict}
|
||||
setcharsearch({dict}) none set character search from {dict}
|
||||
setcmdline({str} [, {pos}]) Number set command-line
|
||||
setcmdpos({pos}) Number set cursor position in command-line
|
||||
setcursorcharpos({list}) Number move cursor to position in {list}
|
||||
@@ -642,7 +643,7 @@ sound_playfile({path} [, {callback}])
|
||||
Number play sound file {path}
|
||||
sound_stop({id}) none stop playing sound {id}
|
||||
soundfold({word}) String sound-fold {word}
|
||||
spellbadword() String badly spelled word at cursor
|
||||
spellbadword() List badly spelled word at cursor
|
||||
spellsuggest({word} [, {max} [, {capital}]])
|
||||
List spelling suggestions
|
||||
split({expr} [, {pat} [, {keepempty}]])
|
||||
@@ -704,6 +705,8 @@ tabpagebuflist([{arg}]) List list of buffer numbers in tab page
|
||||
tabpagenr([{arg}]) Number number of current or last tab page
|
||||
tabpagewinnr({tabarg} [, {arg}])
|
||||
Number number of current window in tab page
|
||||
tabpanel_getinfo() Dict get current state of the tabpanel
|
||||
tabpanel_scroll({n} [, {opts}]) Bool scroll the tabpanel
|
||||
tagfiles() List tags files used
|
||||
taglist({expr} [, {filename}]) List list of tags matching {expr}
|
||||
tan({expr}) Float tangent of {expr}
|
||||
@@ -738,7 +741,7 @@ term_setrestore({buf}, {command})
|
||||
term_setsize({buf}, {rows}, {cols})
|
||||
none set the size of a terminal
|
||||
term_start({cmd} [, {options}]) Number open a terminal window and run a job
|
||||
term_wait({buf} [, {time}]) Number wait for screen to be updated
|
||||
term_wait({buf} [, {time}]) none wait for screen to be updated
|
||||
terminalprops() Dict properties of the terminal
|
||||
test_alloc_fail({id}, {countdown}, {repeat})
|
||||
none make memory allocation fail
|
||||
@@ -746,11 +749,11 @@ test_autochdir() none enable 'autochdir' during startup
|
||||
test_feedinput({string}) none add key sequence to input buffer
|
||||
test_garbagecollect_now() none free memory right now for testing
|
||||
test_garbagecollect_soon() none free memory soon for testing
|
||||
test_getvalue({string}) any get value of an internal variable
|
||||
test_getvalue({string}) Number get value of an internal variable
|
||||
test_gui_event({event}, {args}) bool generate a GUI event for testing
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_mswin_event({event}, {args})
|
||||
bool generate MS-Windows event for testing
|
||||
Bool generate MS-Windows event for testing
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
test_null_dict() Dict null value for testing
|
||||
@@ -767,7 +770,7 @@ test_setmouse({row}, {col}) none set the mouse position for testing
|
||||
test_settime({expr}) none set current time for testing
|
||||
test_srand_seed([{seed}]) none set seed for testing srand()
|
||||
test_unknown() any unknown value for testing
|
||||
test_void() any void value for testing
|
||||
test_void() none void value for testing
|
||||
timer_info([{id}]) List information about timers
|
||||
timer_pause({id}, {pause}) none pause or unpause a timer
|
||||
timer_start({time}, {callback} [, {options}])
|
||||
@@ -787,7 +790,7 @@ tuple2list({tuple}) List turn {tuple} of items into a list
|
||||
type({expr}) Number type of value {expr}
|
||||
typename({expr}) String representation of the type of {expr}
|
||||
undofile({name}) String undo file name for {name}
|
||||
undotree([{buf}]) List undo file tree for buffer {buf}
|
||||
undotree([{buf}]) Dict undo file tree for buffer {buf}
|
||||
uniq({list} [, {func} [, {dict}]])
|
||||
List remove adjacent duplicates from a list
|
||||
uri_decode({string}) String URI-decode a string
|
||||
@@ -802,7 +805,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
|
||||
wildtrigger() none start wildcard expansion
|
||||
win_execute({id}, {command} [, {silent}])
|
||||
String execute {command} in window {id}
|
||||
win_findbuf({bufnr}) List find windows containing {bufnr}
|
||||
@@ -1272,7 +1275,7 @@ balloon_show({expr}) *balloon_show()*
|
||||
{only available when compiled with the |+balloon_eval| or
|
||||
|+balloon_eval_term| feature}
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
balloon_split({msg}) *balloon_split()*
|
||||
@@ -1499,7 +1502,7 @@ bufload({buf}) *bufload()*
|
||||
Can also be used as a |method|: >
|
||||
eval 'somename'->bufload()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
bufloaded({buf}) *bufloaded()*
|
||||
@@ -1894,7 +1897,7 @@ clearmatches([{win}]) *clearmatches()*
|
||||
Can also be used as a |method|: >
|
||||
GetWin()->clearmatches()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
cmdcomplete_info() *cmdcomplete_info()*
|
||||
@@ -2014,7 +2017,7 @@ complete({startcol}, {matches}) *complete()* *E785*
|
||||
second argument: >
|
||||
GetMatches()->complete(col('.'))
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
complete_add({expr}) *complete_add()*
|
||||
@@ -2658,7 +2661,7 @@ echoraw({string}) *echoraw()*
|
||||
call echoraw(&t_TI)
|
||||
< Use with care, you can mess up the terminal this way.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
empty({expr}) *empty()*
|
||||
@@ -2701,7 +2704,7 @@ err_teapot([{expr}]) *err_teapot()*
|
||||
indicating that coffee is temporarily not available.
|
||||
If {expr} is present it must be a String.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
escape({string}, {chars}) *escape()*
|
||||
@@ -3218,7 +3221,7 @@ feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
Can also be used as a |method|: >
|
||||
GetInput()->feedkeys()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
filecopy({from}, {to}) *filecopy()*
|
||||
@@ -3655,7 +3658,7 @@ foreground() *foreground()*
|
||||
allow a window to bring itself to the foreground. Use
|
||||
|remote_foreground()| instead.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
{only in the Win32, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
|
||||
@@ -3807,7 +3810,7 @@ garbagecollect([{atexit}]) *garbagecollect()*
|
||||
type a character. To force garbage collection immediately use
|
||||
|test_garbagecollect_now()|.
|
||||
|
||||
Return type: |String|
|
||||
Return type: void
|
||||
|
||||
|
||||
get({list}, {idx} [, {default}]) *get()* *get()-list*
|
||||
@@ -6268,7 +6271,7 @@ instanceof({object}, {class}) *instanceof()* *E614* *E616* *E693*
|
||||
< Can also be used as a |method|: >
|
||||
myobj->instanceof(mytype)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: |vim9-boolean|
|
||||
|
||||
|
||||
interrupt() *interrupt()*
|
||||
@@ -6432,6 +6435,8 @@ js_decode({string}) *js_decode()*
|
||||
- Strings can be in single quotes.
|
||||
- Empty items in an array (between two commas) are allowed and
|
||||
result in v:none items.
|
||||
- Capitalization is ignored in keywords: true, false, null,
|
||||
NaN, Infinity and -Infinity.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
ReadObject()->js_decode()
|
||||
@@ -6470,12 +6475,9 @@ json_decode({string}) *json_decode()* *E491*
|
||||
same as {"1":2}.
|
||||
- More floating point numbers are recognized, e.g. "1." for
|
||||
"1.0", or "001.2" for "1.2". Special floating point values
|
||||
"Infinity", "-Infinity" and "NaN" (capitalization ignored)
|
||||
are accepted.
|
||||
"Infinity", "-Infinity" and "NaN" are accepted.
|
||||
- Leading zeroes in integer numbers are ignored, e.g. "012"
|
||||
for "12" or "-012" for "-12".
|
||||
- Capitalization is ignored in literal names null, true or
|
||||
false, e.g. "NULL" for "null", "True" for "true".
|
||||
- Control characters U+0000 through U+001F which are not
|
||||
escaped in strings are accepted, e.g. " " (tab
|
||||
character in string) for "\t".
|
||||
@@ -6483,10 +6485,10 @@ json_decode({string}) *json_decode()* *E491*
|
||||
and results in v:none.
|
||||
- Backslash in an invalid 2-character sequence escape is
|
||||
ignored, e.g. "\a" is decoded as "a".
|
||||
- A correct surrogate pair in JSON strings should normally be
|
||||
a 12 character sequence such as "\uD834\uDD1E", but
|
||||
json_decode() silently accepts truncated surrogate pairs
|
||||
such as "\uD834" or "\uD834\u"
|
||||
- A surrogate pair in JSON strings is a 12 character sequence
|
||||
such as "\uD834\uDD1E". A lone surrogate or an invalid
|
||||
surrogate pair (e.g. "\uD800" or "\uD800\uD800") results
|
||||
in an error.
|
||||
*E938*
|
||||
A duplicate key in an object, valid in rfc7159, is not
|
||||
accepted by json_decode() as the result must be a valid Vim
|
||||
@@ -6863,6 +6865,8 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
|
||||
second argument: >
|
||||
GetBuffer()->listener_add(callback)
|
||||
<
|
||||
This function is not available in the |sandbox|.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
@@ -6877,7 +6881,9 @@ listener_flush([{buf}]) *listener_flush()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->listener_flush()
|
||||
<
|
||||
Return type: |Number|
|
||||
This function is not available in the |sandbox|.
|
||||
|
||||
Return type: void
|
||||
|
||||
|
||||
listener_remove({id}) *listener_remove()*
|
||||
@@ -6888,6 +6894,8 @@ listener_remove({id}) *listener_remove()*
|
||||
Can also be used as a |method|: >
|
||||
GetListenerId()->listener_remove()
|
||||
<
|
||||
This function is not available in the |sandbox|.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
@@ -7221,7 +7229,7 @@ mapset({dict})
|
||||
mapset(d)
|
||||
endfor
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
match({expr}, {pat} [, {start} [, {count}]]) *match()*
|
||||
@@ -8484,8 +8492,10 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setcallback(callback)
|
||||
<
|
||||
Return type: void
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
|
||||
Set a callback for buffer {buf} to {expr}. When {expr} is an
|
||||
@@ -8499,7 +8509,7 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setinterrupt(callback)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
@@ -8513,7 +8523,7 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setprompt('command: ')
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+channel| feature}
|
||||
|
||||
@@ -8865,6 +8875,8 @@ redraw_listener_add({opts}) *redraw_listener_add()*
|
||||
Can also be used as a |method|: >
|
||||
GetOpts()->redraw_listener_add()
|
||||
<
|
||||
This function is not available in the |sandbox|.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
@@ -8876,7 +8888,7 @@ redraw_listener_remove({id}) *redraw_listener_remove()*
|
||||
Can also be used as a |method|: >
|
||||
GetRedrawListenerId()->redraw_listener_remove()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
reduce({object}, {func} [, {initial}]) *reduce()* *E998*
|
||||
@@ -9048,7 +9060,7 @@ remote_foreground({server}) *remote_foreground()*
|
||||
Can also be used as a |method|: >
|
||||
ServerName()->remote_foreground()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only in the Win32, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
@@ -9132,7 +9144,7 @@ remote_startserver({name}) *remote_startserver()* *E941* *E942*
|
||||
Can also be used as a |method|: >
|
||||
ServerName()->remote_startserver()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
|
||||
@@ -9880,7 +9892,7 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
|
||||
third argument: >
|
||||
GetValue()->setbufvar(buf, varname)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
setcellwidths({list}) *setcellwidths()*
|
||||
@@ -9917,7 +9929,7 @@ setcellwidths({list}) *setcellwidths()*
|
||||
match with what Vim knows about each emoji. If it doesn't
|
||||
look right you need to adjust the {list} argument.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
setcharpos({expr}, {list}) *setcharpos()*
|
||||
@@ -9960,7 +9972,7 @@ setcharsearch({dict}) *setcharsearch()*
|
||||
Can also be used as a |method|: >
|
||||
SavedSearch()->setcharsearch()
|
||||
<
|
||||
Return type: dict<any>
|
||||
Return type: void
|
||||
|
||||
|
||||
setcmdline({str} [, {pos}]) *setcmdline()*
|
||||
@@ -10027,7 +10039,7 @@ setenv({name}, {val}) *setenv()*
|
||||
second argument: >
|
||||
GetPath()->setenv('PATH')
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
setfperm({fname}, {mode}) *setfperm()* *chmod*
|
||||
@@ -10386,7 +10398,7 @@ settabvar({tabnr}, {varname}, {val}) *settabvar()*
|
||||
third argument: >
|
||||
GetValue()->settabvar(tab, name)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
|
||||
@@ -10411,7 +10423,7 @@ settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
|
||||
fourth argument: >
|
||||
GetValue()->settabwinvar(tab, winnr, name)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
settagstack({nr}, {dict} [, {action}]) *settagstack()*
|
||||
@@ -10464,7 +10476,7 @@ setwinvar({winnr}, {varname}, {val}) *setwinvar()*
|
||||
third argument: >
|
||||
GetValue()->setwinvar(winnr, name)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
sha256({expr}) *sha256()*
|
||||
@@ -10704,7 +10716,7 @@ sound_clear() *sound_clear()*
|
||||
On some Linux systems you may need the libcanberra-pulse
|
||||
package, otherwise sound may not stop.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+sound| feature}
|
||||
|
||||
@@ -10774,7 +10786,7 @@ sound_stop({id}) *sound_stop()*
|
||||
Can also be used as a |method|: >
|
||||
soundid->sound_stop()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+sound| feature}
|
||||
|
||||
@@ -11315,7 +11327,12 @@ strptime({format}, {timestring}) *strptime()*
|
||||
can try different {format} values until you get a non-zero
|
||||
result.
|
||||
|
||||
Note: On MS-Windows, where the C runtime does not provide
|
||||
strptime(), Vim uses a built-in fallback that always uses
|
||||
English locale names regardless of the active locale.
|
||||
|
||||
See also |strftime()|.
|
||||
|
||||
Examples: >
|
||||
:echo strptime("%Y %b %d %X", "1997 Apr 27 11:49:23")
|
||||
< 862156163 >
|
||||
@@ -11695,6 +11712,30 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
Get the output of the shell command {expr} as a |String|. See
|
||||
|systemlist()| to get the output as a |List|.
|
||||
|
||||
{expr} can be a |String| or a |List|.
|
||||
When {expr} is a |String|, the command is executed through the
|
||||
shell (see below for how the command is constructed).
|
||||
|
||||
*E1575*
|
||||
When {expr} is a |List|, the first item is the executable and
|
||||
the remaining items are passed as arguments directly. The
|
||||
command is executed without using a shell, similar to
|
||||
|job_start()|. Since no shell is involved, shell features
|
||||
such as redirection, piping, globbing, environment variable
|
||||
expansion and backtick expansion will not work. Characters
|
||||
like ">" are passed as literal arguments to the command, not
|
||||
interpreted as redirection. Use this form when arguments may
|
||||
contain special characters that should not be interpreted by
|
||||
the shell. Example: >
|
||||
:let out = system(['grep', '-r', 'pattern', '.'])
|
||||
< With the String form ">" would be shell redirection, but
|
||||
with a List it is passed as a literal argument: >
|
||||
:let out = system(['echo', 'hello', '>', 'world'])
|
||||
< This outputs "hello > world", not redirect to a file.
|
||||
|
||||
To use the shell explicitly with a List: >
|
||||
:let out = system(['/bin/sh', '-c', 'echo $HOME'])
|
||||
<
|
||||
When {input} is given and is a |String| this string is written
|
||||
to a file and passed as stdin to the command. The string is
|
||||
written as-is, you need to take care of using the correct line
|
||||
@@ -11720,11 +11761,11 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
being echoed on the screen. >
|
||||
:silent let f = system('ls *.vim')
|
||||
<
|
||||
Note: Use |shellescape()| or |::S| with |expand()| or
|
||||
|fnamemodify()| to escape special characters in a command
|
||||
argument. Newlines in {expr} may cause the command to fail.
|
||||
The characters in 'shellquote' and 'shellxquote' may also
|
||||
cause trouble.
|
||||
Note: When {expr} is a String, use |shellescape()| or |::S|
|
||||
with |expand()| or |fnamemodify()| to escape special
|
||||
characters in a command argument. Newlines in {expr} may
|
||||
cause the command to fail. The characters in 'shellquote'
|
||||
and 'shellxquote' may also cause trouble.
|
||||
This is not to be used for interactive commands.
|
||||
|
||||
The result is a String. Example: >
|
||||
@@ -11737,7 +11778,8 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
To avoid the string being truncated at a NUL, all NUL
|
||||
characters are replaced with SOH (0x01).
|
||||
|
||||
The command executed is constructed using several options:
|
||||
When {expr} is a String, the command executed is constructed
|
||||
using several options:
|
||||
'shell' 'shellcmdflag' 'shellxquote' {expr} 'shellredir' {tmp} 'shellxquote'
|
||||
({tmp} is an automatically generated file name).
|
||||
For Unix, braces are put around {expr} to allow for
|
||||
@@ -11764,6 +11806,9 @@ system({expr} [, {input}]) *system()* *E677*
|
||||
systemlist({expr} [, {input}]) *systemlist()*
|
||||
Same as |system()|, but returns a |List| with lines (parts of
|
||||
output separated by NL) with NULs transformed into NLs.
|
||||
Like |system()|, {expr} can be a |String| (executed through
|
||||
the shell) or a |List| (executed directly without a shell).
|
||||
See |system()| for details.
|
||||
Output is the same as |readfile()| will output with {binary}
|
||||
argument set to "b", except that there is no extra empty item
|
||||
when the result ends in a NL.
|
||||
@@ -11841,6 +11886,38 @@ tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()*
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
tabpanel_getinfo() *tabpanel_getinfo()*
|
||||
Return a |Dictionary| describing the current state of the
|
||||
tabpanel (see |tabpanel|). The dictionary has these keys:
|
||||
align "left" or "right"
|
||||
columns width in screen columns
|
||||
scrollbar |TRUE| if a scrollbar is shown
|
||||
offset current scroll offset in rows
|
||||
total total number of rows rendered
|
||||
max_offset largest valid value for "offset"
|
||||
|
||||
The "total" and "max_offset" values are only accurate after
|
||||
the tabpanel has been drawn at least once.
|
||||
|
||||
Return type: dict<any>
|
||||
|
||||
|
||||
tabpanel_scroll({n} [, {opts}]) *tabpanel_scroll()*
|
||||
Scroll the tabpanel by {n} rows. Positive values scroll down
|
||||
(later tab pages become visible), negative values scroll up.
|
||||
The new offset is clamped to the valid range.
|
||||
|
||||
When {opts} is a |Dictionary| and its "absolute" entry is
|
||||
|TRUE|, {n} is used as the new absolute scroll offset instead
|
||||
of a delta.
|
||||
|
||||
Returns |TRUE| if the scroll offset changed, |FALSE| otherwise
|
||||
(for example when the tabpanel is not shown, or the offset is
|
||||
already at the requested value).
|
||||
|
||||
Return type: |vim9-boolean|
|
||||
|
||||
|
||||
tagfiles() *tagfiles()*
|
||||
Returns a |List| with the file names used to search for tags
|
||||
for the current buffer. This is the 'tags' option expanded.
|
||||
@@ -11960,6 +12037,7 @@ terminalprops() *terminalprops()*
|
||||
underline_rgb whether |t_8u| works **
|
||||
mouse mouse type supported
|
||||
kitty whether Kitty terminal was detected
|
||||
decrqm whether sending DECRQM sequences work
|
||||
|
||||
** value 'u' for unknown, 'y' for yes, 'n' for no
|
||||
|
||||
@@ -11979,6 +12057,9 @@ terminalprops() *terminalprops()*
|
||||
|
||||
For "mouse" the value 'u' is unknown
|
||||
|
||||
If "decrqm" is 'y', then Vim will query support for the
|
||||
'termsync' and 'termresize' ("inband") options.
|
||||
|
||||
Also see:
|
||||
- 'ambiwidth' - detected by using |t_u7|.
|
||||
- |v:termstyleresp| and |v:termblinkresp| for the response to
|
||||
@@ -12031,7 +12112,7 @@ timer_pause({timer}, {paused}) *timer_pause()*
|
||||
Can also be used as a |method|: >
|
||||
GetTimer()->timer_pause(1)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
@@ -12091,7 +12172,7 @@ timer_stop({timer}) *timer_stop()*
|
||||
Can also be used as a |method|: >
|
||||
GetTimer()->timer_stop()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
@@ -12101,7 +12182,7 @@ timer_stopall() *timer_stopall()*
|
||||
invoked. Useful if a timer is misbehaving. If there are no
|
||||
timers there is no error.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available when compiled with the |+timers| feature}
|
||||
|
||||
@@ -12591,7 +12672,7 @@ wildtrigger() *wildtrigger()*
|
||||
|
||||
Return value is always 0.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
@@ -12943,7 +13024,7 @@ winrestview({dict}) *winrestview()*
|
||||
Can also be used as a |method|: >
|
||||
GetView()->winrestview()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
winsaveview() *winsaveview()*
|
||||
@@ -13271,6 +13352,7 @@ spell Compiled with spell checking support |spell|.
|
||||
startuptime Compiled with |--startuptime| support.
|
||||
statusline Compiled with support for 'statusline', 'rulerformat'
|
||||
and special formats of 'titlestring' and 'iconstring'.
|
||||
statusline_click Click handlers in 'statusline' |stl-%[FuncName]|
|
||||
sun SunOS version of Vim.
|
||||
sun_workshop Support for Sun |workshop| has been removed.
|
||||
syntax Compiled with syntax highlighting support |syntax|.
|
||||
@@ -13323,8 +13405,6 @@ 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 clipboard.
|
||||
wayland_focus_steal Compiled with support for Wayland clipboard focus
|
||||
stealing.
|
||||
wildignore Compiled with 'wildignore' option.
|
||||
wildmenu Compiled with 'wildmenu' option.
|
||||
win16 old version for MS-Windows 3.1 (always false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*change.txt* For Vim version 9.2. Last change: 2026 Mar 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1157,9 +1157,9 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
current line).
|
||||
|
||||
*:ip* *:iput*
|
||||
:[line]ip[ut] [x] like |:put|, but adjust indent to the current line
|
||||
:[line]ip[ut] [x] Like |:put|, but adjust indent to the current line.
|
||||
|
||||
:[line]ip[ut]! [x] like |:put|!, but adjust indent to the current line
|
||||
:[line]ip[ut]! [x] Like |:put|!, but adjust indent to the current line.
|
||||
|
||||
["x]]p or *]p* *]<MiddleMouse>*
|
||||
["x]]<MiddleMouse> Like "p", but adjust the indent to the current line.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 9.2. Last change: 2026 Mar 13
|
||||
*channel.txt* For Vim version 9.2. Last change: 2026 Apr 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -132,7 +132,7 @@ Start Vim and create a listening channel: >
|
||||
endfunc
|
||||
|
||||
" Start listening on port 8765
|
||||
let server = ch_listen('localhost:8765', {"callback": "OnAccept"})
|
||||
let server = ch_listen('8765', {"callback": "OnAccept"})
|
||||
|
||||
From another Vim instance (or any program) you can connect to it: >
|
||||
let channel = ch_open('localhost:8765')
|
||||
@@ -170,6 +170,7 @@ unreachable on the network.
|
||||
"js" - Use JS (JavaScript) encoding, more efficient than JSON.
|
||||
"nl" - Use messages that end in a NL character
|
||||
"raw" - Use raw messages
|
||||
"blob" - Use raw messages and pass callback data as a |Blob|
|
||||
"lsp" - Use language server protocol encoding
|
||||
"dap" - Use debug adapter protocol encoding
|
||||
*channel-callback* *E921*
|
||||
@@ -189,6 +190,8 @@ unreachable on the network.
|
||||
excluding the NL.
|
||||
When "mode" is "raw" the "msg" argument is the whole message
|
||||
as a string.
|
||||
When "mode" is "blob" the "msg" argument is the whole message
|
||||
as a |Blob|.
|
||||
|
||||
For all callbacks: Use |function()| to bind it to arguments
|
||||
and/or a Dictionary. Or use the form "dict.function" to bind
|
||||
@@ -549,7 +552,7 @@ ch_close({handle}) *ch_close()*
|
||||
Can also be used as a |method|: >
|
||||
GetChannel()->ch_close()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
ch_close_in({handle}) *ch_close_in()*
|
||||
Close the "in" part of {handle}. See |channel-close-in|.
|
||||
@@ -559,7 +562,7 @@ ch_close_in({handle}) *ch_close_in()*
|
||||
Can also be used as a |method|: >
|
||||
GetChannel()->ch_close_in()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
ch_evalexpr({handle}, {expr} [, {options}]) *ch_evalexpr()*
|
||||
@@ -637,8 +640,7 @@ ch_info({handle}) *ch_info()*
|
||||
"status" "open", "buffered" or "closed", like
|
||||
ch_status()
|
||||
When opened with ch_open():
|
||||
"hostname" the hostname of the address
|
||||
"port" the port of the address
|
||||
"port" the port on loopback
|
||||
"path" the path of the Unix-domain socket
|
||||
"sock_status" "open" or "closed"
|
||||
"sock_mode" "NL", "RAW", "JSON" or "JS"
|
||||
@@ -668,20 +670,23 @@ ch_info({handle}) *ch_info()*
|
||||
Return type: dict<any>
|
||||
|
||||
ch_listen({address} [, {options}]) *E1573* *E1574* *ch_listen()*
|
||||
Listen on {address} for incoming channel connections.
|
||||
This creates a server-side channel, unlike |ch_open()|
|
||||
which connects to an existing server.
|
||||
Listen on {address} - port on loopback or UNIX domain socket
|
||||
for incoming channel connections. This creates a server-side
|
||||
channel, unlike |ch_open()| which connects to an existing
|
||||
server.
|
||||
Returns a Channel. Use |ch_status()| to check for failure.
|
||||
|
||||
{address} is a String, see |channel-address| for the possible
|
||||
accepted forms. Note: IPv6 is not yet supported.
|
||||
accepted forms, however in case of TCP sockets it allows to
|
||||
set only a port and binds to loopback address for security
|
||||
reasons.
|
||||
Note: IPv6 is not yet supported.
|
||||
|
||||
If {options} is given it must be a |Dictionary|.
|
||||
See |channel-open-options|.
|
||||
The "callback" in {options} is invoked when a new
|
||||
connection is accepted. It receives two arguments: the
|
||||
new Channel and the client address as a String (e.g.
|
||||
"127.0.0.1:12345").
|
||||
The "callback" in {options} is invoked when a new connection
|
||||
is accepted. It receives two arguments: the new Channel and
|
||||
the client address as a String (e.g. "127.0.0.1:12345").
|
||||
|
||||
Use |ch_open()| to connect to an existing server instead.
|
||||
|
||||
@@ -708,7 +713,7 @@ ch_log({msg} [, {handle}]) *ch_log()*
|
||||
Can also be used as a |method|: >
|
||||
'did something'->ch_log()
|
||||
<
|
||||
Return type: dict<any>
|
||||
Return type: void
|
||||
|
||||
ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
Start logging channel activity to {fname}.
|
||||
@@ -736,7 +741,7 @@ ch_logfile({fname} [, {mode}]) *ch_logfile()*
|
||||
Can also be used as a |method|: >
|
||||
'logfile'->ch_logfile('w')
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
ch_open({address} [, {options}]) *ch_open()*
|
||||
Open a channel to {address}. See |channel|.
|
||||
@@ -825,7 +830,7 @@ ch_sendraw({handle}, {expr} [, {options}]) *ch_sendraw()*
|
||||
Can also be used as a |method|: >
|
||||
GetChannel()->ch_sendraw(rawexpr)
|
||||
<
|
||||
Return type: dict<any> or |String|
|
||||
Return type: void
|
||||
|
||||
ch_setoptions({handle}, {options}) *ch_setoptions()*
|
||||
Set options on {handle}:
|
||||
@@ -844,7 +849,7 @@ ch_setoptions({handle}, {options}) *ch_setoptions()*
|
||||
Can also be used as a |method|: >
|
||||
GetChannel()->ch_setoptions(options)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
ch_status({handle} [, {options}]) *ch_status()*
|
||||
Return the status of {handle}:
|
||||
@@ -1038,7 +1043,7 @@ job_setoptions({job}, {options}) *job_setoptions()*
|
||||
Can also be used as a |method|: >
|
||||
GetJob()->job_setoptions(options)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
job_start({command} [, {options}]) *job_start()*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.2. Last change: 2026 Mar 17
|
||||
*cmdline.txt* For Vim version 9.2. Last change: 2026 Apr 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -466,14 +466,15 @@ CTRL-L A match is done on the pattern in front of the cursor. If
|
||||
*c_CTRL-G* */_CTRL-G*
|
||||
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)
|
||||
to the next match. The |search-offset| is applied when <CR>
|
||||
is pressed, but does not affect the match highlighting.
|
||||
Use CTRL-T to move to the previous match. Hint: on a regular
|
||||
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
|
||||
to the previous match (does not take |search-offset| into
|
||||
account).
|
||||
to the previous match. The |search-offset| is applied when
|
||||
<CR> is pressed, but does not affect the match highlighting.
|
||||
Use CTRL-G to move to the next match. Hint: on a regular
|
||||
keyboard T is above G.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*eval.txt* For Vim version 9.2. Last change: 2026 May 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -5346,6 +5346,9 @@ a |lambda| expression.
|
||||
With the exception of the "available" callback if a callback is not provided,
|
||||
Vim will not invoke anything, and this is not an error.
|
||||
|
||||
If the "paste" or "copy" callbacks are triggered recursively, then they will
|
||||
not be called.
|
||||
|
||||
*clipboard-providers-textlock*
|
||||
In both the "paste" and "copy" callbacks, it is not allowed to change the
|
||||
buffer text, see |textlock|.
|
||||
@@ -5367,6 +5370,9 @@ order:
|
||||
is an empty string, then the type is automatically chosen.
|
||||
2. A |list| of strings to return to Vim, each representing a line.
|
||||
|
||||
If an invalid value is returned, then this is not an error. Instead the
|
||||
register will be left unchanged (not cleared).
|
||||
|
||||
*clipboard-providers-copy*
|
||||
The "copy" callback returns nothing and takes the following arguments in the
|
||||
following order:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*filetype.txt* For Vim version 9.2. Last change: 2026 May 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -161,8 +161,11 @@ variables can be used to overrule the filetype used for certain extensions:
|
||||
|ft-cpp-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.inc g:filetype_inc
|
||||
*.int g:filetype_int
|
||||
*.lsl g:filetype_lsl
|
||||
*.m g:filetype_m |ft-mathematica-syntax|
|
||||
*.mm g:filetype_mm
|
||||
*.mac g:filetype_mac
|
||||
*[mM]makefile,*.mk,*.mak,[mM]akefile*
|
||||
g:make_flavor |ft-make-syntax|
|
||||
*.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md
|
||||
@@ -650,6 +653,12 @@ One command, :DiffGitCached, is provided to show a diff of the current commit
|
||||
in the preview window. It is equivalent to calling "git diff --cached" plus
|
||||
any arguments given to the command.
|
||||
|
||||
The length of the first line of the commit message used for
|
||||
syntax highlighting can be configured via `g:gitcommit_summary_length`.
|
||||
The default is 50. Example: >
|
||||
|
||||
let g:gitcommit_summary_length = 70
|
||||
|
||||
GIT REBASE *ft-gitrebase-plugin*
|
||||
|
||||
The gitrebase filetype defines the following buffer-local commands, to help
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*ft_mp.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*ft_mp.txt* For Vim version 9.2. Last change: 2026 May 04
|
||||
|
||||
This is the documentation for the METAFONT and MetaPost filetype plugins.
|
||||
Unless otherwise specified, the commands, settings and mappings defined below
|
||||
@@ -25,7 +25,7 @@ MetaPost documents, including syntax coloring, indentation, and completion.
|
||||
Defining indentation rules for METAFONT and MetaPost code is tricky and
|
||||
somewhat subjective, because the syntax is quite liberal. The plugin uses some
|
||||
heuristics that work well most of the time, but in particular cases you may
|
||||
want to to override the automatic rules, so that the manually defined
|
||||
want to override the automatic rules, so that the manually defined
|
||||
indentation is preserved by commands like `gg=G`.
|
||||
|
||||
This can be achieved by appending `%>`, `%<`, `%=` or `%!` to a line to
|
||||
|
||||
@@ -1,399 +1,373 @@
|
||||
*ft_rust.txt* Filetype plugin for Rust
|
||||
*ft_rust.txt* Filetype plugin for Rust
|
||||
|
||||
==============================================================================
|
||||
CONTENTS *rust*
|
||||
CONTENTS *rust*
|
||||
|
||||
1. Introduction |rust-intro|
|
||||
2. Settings |rust-settings|
|
||||
3. Commands |rust-commands|
|
||||
4. Mappings |rust-mappings|
|
||||
1. Introduction |rust-intro|
|
||||
2. Settings |rust-settings|
|
||||
3. Commands |rust-commands|
|
||||
4. Mappings |rust-mappings|
|
||||
|
||||
==============================================================================
|
||||
INTRODUCTION *rust-intro*
|
||||
INTRODUCTION *rust-intro*
|
||||
|
||||
This plugin provides syntax and supporting functionality for the Rust
|
||||
filetype. It requires Vim 8 or higher for full functionality. Some commands
|
||||
will not work on earlier versions.
|
||||
filetype.
|
||||
|
||||
==============================================================================
|
||||
SETTINGS *rust-settings*
|
||||
SETTINGS *rust-settings*
|
||||
|
||||
This plugin has a few variables you can define in your vimrc that change the
|
||||
behavior of the plugin.
|
||||
|
||||
Some variables can be set buffer local (`:b` prefix), and the buffer local
|
||||
Some variables can be set buffer local (`b:` prefix), and the buffer local
|
||||
will take precedence over the global `g:` counterpart.
|
||||
|
||||
*g:rustc_path*
|
||||
*g:rustc_path*
|
||||
g:rustc_path~
|
||||
Set this option to the path to rustc for use in the |:RustRun| and
|
||||
|:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
|
||||
let g:rustc_path = $HOME."/bin/rustc"
|
||||
|:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
|
||||
let g:rustc_path = $HOME."/bin/rustc"
|
||||
<
|
||||
|
||||
*g:rustc_makeprg_no_percent*
|
||||
*g:rustc_makeprg_no_percent*
|
||||
g:rustc_makeprg_no_percent~
|
||||
Set this option to 1 to have 'makeprg' default to "rustc" instead of
|
||||
"rustc %": >
|
||||
let g:rustc_makeprg_no_percent = 1
|
||||
let g:rustc_makeprg_no_percent = 1
|
||||
<
|
||||
|
||||
*g:rust_conceal*
|
||||
*g:rust_conceal*
|
||||
g:rust_conceal~
|
||||
Set this option to turn on the basic |conceal| support: >
|
||||
let g:rust_conceal = 1
|
||||
let g:rust_conceal = 1
|
||||
<
|
||||
|
||||
*g:rust_conceal_mod_path*
|
||||
*g:rust_conceal_mod_path*
|
||||
g:rust_conceal_mod_path~
|
||||
Set this option to turn on |conceal| for the path connecting token
|
||||
"::": >
|
||||
let g:rust_conceal_mod_path = 1
|
||||
Set this option to turn on |conceal| for the path connecting token "::": >
|
||||
let g:rust_conceal_mod_path = 1
|
||||
<
|
||||
|
||||
*g:rust_conceal_pub*
|
||||
*g:rust_conceal_pub*
|
||||
g:rust_conceal_pub~
|
||||
Set this option to turn on |conceal| for the "pub" token: >
|
||||
let g:rust_conceal_pub = 1
|
||||
let g:rust_conceal_pub = 1
|
||||
<
|
||||
|
||||
*g:rust_recommended_style*
|
||||
*g:rust_recommended_style*
|
||||
g:rust_recommended_style~
|
||||
Set this option to enable vim indentation and textwidth settings to
|
||||
conform to style conventions of the Rust style guide (i.e. use 4
|
||||
spaces for indents and set 'textwidth' to 100). This option is enabled
|
||||
by default. To disable it: >
|
||||
let g:rust_recommended_style = 0
|
||||
Set this option to enable vim indentation and textwidth settings to
|
||||
conform to style conventions of the Rust style guide (i.e. use 4
|
||||
spaces for indents and set 'textwidth' to 100). This option is
|
||||
enabled by default. To disable it: >
|
||||
let g:rust_recommended_style = 0
|
||||
<
|
||||
|
||||
*g:rust_fold*
|
||||
*g:rust_fold*
|
||||
g:rust_fold~
|
||||
Set this option to turn on |folding|: >
|
||||
let g:rust_fold = 1
|
||||
let g:rust_fold = 1
|
||||
<
|
||||
Value Effect ~
|
||||
0 No folding
|
||||
1 Braced blocks are folded. All folds are open by
|
||||
default.
|
||||
2 Braced blocks are folded. 'foldlevel' is left at the
|
||||
global value (all folds are closed by default).
|
||||
Value Effect ~
|
||||
0 No folding
|
||||
1 Braced blocks are folded. All folds are open by default.
|
||||
2 Braced blocks are folded. 'foldlevel' is left at the global
|
||||
value (all folds are closed by default).
|
||||
|
||||
*g:rust_bang_comment_leader*
|
||||
*g:rust_bang_comment_leader*
|
||||
g:rust_bang_comment_leader~
|
||||
Set this option to 1 to preserve the leader on multi-line doc comments
|
||||
using the /*! syntax: >
|
||||
let g:rust_bang_comment_leader = 1
|
||||
let g:rust_bang_comment_leader = 1
|
||||
<
|
||||
|
||||
*g:rust_use_custom_ctags_defs*
|
||||
*g:rust_use_custom_ctags_defs*
|
||||
g:rust_use_custom_ctags_defs~
|
||||
Set this option to 1 if you have customized ctags definitions for Rust
|
||||
and do not wish for those included with rust.vim to be used: >
|
||||
let g:rust_use_custom_ctags_defs = 1
|
||||
let g:rust_use_custom_ctags_defs = 1
|
||||
<
|
||||
|
||||
NOTE: rust.vim's built-in definitions are only used for the Tagbar Vim
|
||||
plugin, if you have it installed, AND if Universal Ctags is not
|
||||
detected. This is because Universal Ctags already has built-in
|
||||
detected. This is because Universal Ctags already has built-in
|
||||
support for Rust when used with Tagbar.
|
||||
|
||||
Also, note that when using ctags other than Universal Ctags, it is not
|
||||
automatically used when generating |tags| files that Vim can use to
|
||||
navigate to definitions across different source files. Feel free to
|
||||
navigate to definitions across different source files. Feel free to
|
||||
copy `rust.vim/ctags/rust.ctags` into your own `~/.ctags` if you wish
|
||||
to generate |tags| files.
|
||||
|
||||
|
||||
*g:ftplugin_rust_source_path*
|
||||
*g:ftplugin_rust_source_path*
|
||||
g:ftplugin_rust_source_path~
|
||||
Set this option to a path that should be prepended to 'path' for Rust
|
||||
source files: >
|
||||
let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
|
||||
let g:ftplugin_rust_source_path = $HOME.'/dev/rust'
|
||||
<
|
||||
|
||||
*g:rustfmt_command*
|
||||
*g:rustfmt_command*
|
||||
g:rustfmt_command~
|
||||
Set this option to the name of the 'rustfmt' executable in your $PATH. If
|
||||
not specified it defaults to 'rustfmt' : >
|
||||
let g:rustfmt_command = 'rustfmt'
|
||||
Set this option to the name of the "rustfmt" executable in your $PATH.
|
||||
If not specified it defaults to "rustfmt": >
|
||||
let g:rustfmt_command = 'rustfmt'
|
||||
<
|
||||
*g:rustfmt_autosave*
|
||||
*g:rustfmt_autosave*
|
||||
*b:rustfmt_autosave*
|
||||
g:rustfmt_autosave~
|
||||
Set this option to 1 to run |:RustFmt| automatically when saving a
|
||||
buffer. If not specified it defaults to 0 : >
|
||||
let g:rustfmt_autosave = 0
|
||||
buffer. If not specified it defaults to 0: >
|
||||
let g:rustfmt_autosave = 0
|
||||
<
|
||||
There is also a buffer-local b:rustfmt_autosave that can be set for
|
||||
the same purpose, and can override the global setting.
|
||||
|
||||
*g:rustfmt_autosave_if_config_present*
|
||||
*g:rustfmt_autosave_if_config_present*
|
||||
*b:rustfmt_autosave_if_config_present*
|
||||
g:rustfmt_autosave_if_config_present~
|
||||
Set this option to 1 to have *b:rustfmt_autosave* be set automatically
|
||||
if a `rustfmt.toml` file is present in any parent directly leading to
|
||||
the file being edited. If not set, default to 0: >
|
||||
let g:rustfmt_autosave_if_config_present = 0
|
||||
Set this option to 1 to have |b:rustfmt_autosave| be set automatically
|
||||
if a `rustfmt.toml` file is present in any parent directory leading to
|
||||
the file being edited. If not set, default to 0: >
|
||||
let g:rustfmt_autosave_if_config_present = 0
|
||||
<
|
||||
This is useful to have `rustfmt` only execute on save, on projects
|
||||
that have `rustfmt.toml` configuration.
|
||||
|
||||
There is also a buffer-local b:rustfmt_autosave_if_config_present
|
||||
that can be set for the same purpose, which can overrides the global
|
||||
that can be set for the same purpose, which can override the global
|
||||
setting.
|
||||
*g:rustfmt_fail_silently*
|
||||
*g:rustfmt_fail_silently*
|
||||
g:rustfmt_fail_silently~
|
||||
Set this option to 1 to prevent 'rustfmt' from populating the
|
||||
|location-list| with errors. If not specified it defaults to 0: >
|
||||
let g:rustfmt_fail_silently = 0
|
||||
Set this option to 1 to prevent "rustfmt" from populating the
|
||||
|location-list| with errors. If not specified it defaults to 0: >
|
||||
let g:rustfmt_fail_silently = 0
|
||||
<
|
||||
*g:rustfmt_options*
|
||||
*g:rustfmt_options*
|
||||
g:rustfmt_options~
|
||||
Set this option to a string of options to pass to 'rustfmt'. The
|
||||
write-mode is already set to 'overwrite'. If not specified it
|
||||
defaults to '' : >
|
||||
let g:rustfmt_options = ''
|
||||
Set this option to a string of options to pass to "rustfmt".
|
||||
The write-mode is already set to "overwrite". If not specified it
|
||||
defaults to '': >
|
||||
let g:rustfmt_options = ''
|
||||
<
|
||||
*g:rustfmt_emit_files*
|
||||
*g:rustfmt_emit_files*
|
||||
g:rustfmt_emit_files~
|
||||
If not specified rust.vim tries to detect the right parameter to
|
||||
pass to rustfmt based on its reported version. Otherwise, it
|
||||
determines whether to run rustfmt with '--emit=files' (when 1 is
|
||||
provided) instead of '--write-mode=overwrite'. >
|
||||
let g:rustfmt_emit_files = 0
|
||||
pass to rustfmt based on its reported version. Otherwise, it
|
||||
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*
|
||||
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
|
||||
Disabled by default for performance reasons. >
|
||||
let g:rustfmt_detect_version = 1
|
||||
<
|
||||
*g:rustfmt_find_toml*
|
||||
*g:rustfmt_find_toml*
|
||||
g:rustfmt_find_toml~
|
||||
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
|
||||
current path upwards. Disabled by default for performance reasons. >
|
||||
let g:rustfmt_find_toml = 1
|
||||
<
|
||||
*g:rust_playpen_url*
|
||||
*g:rust_playpen_url*
|
||||
g:rust_playpen_url~
|
||||
Set this option to override the url for the playpen to use: >
|
||||
let g:rust_playpen_url = 'https://play.rust-lang.org/'
|
||||
let g:rust_playpen_url = 'https://play.rust-lang.org/'
|
||||
<
|
||||
|
||||
*g:rust_shortener_url*
|
||||
*g:rust_shortener_url*
|
||||
g:rust_shortener_url~
|
||||
Set this option to override the url for the url shortener: >
|
||||
let g:rust_shortener_url = 'https://is.gd/'
|
||||
let g:rust_shortener_url = 'https://is.gd/'
|
||||
<
|
||||
|
||||
*g:rust_clip_command*
|
||||
*g:rust_clip_command*
|
||||
g:rust_clip_command~
|
||||
Set this option to the command used in your OS to copy the Rust Play
|
||||
url to the clipboard: >
|
||||
let g:rust_clip_command = 'xclip -selection clipboard'
|
||||
let g:rust_clip_command = 'xclip -selection clipboard'
|
||||
<
|
||||
|
||||
*g:cargo_makeprg_params*
|
||||
*g:cargo_makeprg_params*
|
||||
g:cargo_makeprg_params~
|
||||
Set this option to the string of parameters to pass to cargo. If not
|
||||
specified it defaults to '$*' : >
|
||||
let g:cargo_makeprg_params = 'build'
|
||||
Set this option to the string of parameters to pass to cargo. If not
|
||||
specified it defaults to "$*": >
|
||||
let g:cargo_makeprg_params = 'build'
|
||||
<
|
||||
|
||||
*g:cargo_shell_command_runner*
|
||||
*g:cargo_shell_command_runner*
|
||||
g:cargo_shell_command_runner~
|
||||
Set this option to change how to run shell commands for cargo commands
|
||||
|:Cargo|, |:Cbuild|, |:Crun|, ...
|
||||
By default, |:terminal| is used to run shell command in terminal window
|
||||
asynchronously. But if you prefer |:!| for running the commands, it can
|
||||
be specified: >
|
||||
let g:cargo_shell_command_runner = '!'
|
||||
|:Cargo|, |:Cbuild|, |:Crun|, etc. - see |rust-commands|.
|
||||
By default, |:terminal| is used to run a shell command in a terminal
|
||||
window asynchronously. But if you prefer |:!| for running the
|
||||
commands, it can be specified: >
|
||||
let g:cargo_shell_command_runner = '!'
|
||||
<
|
||||
|
||||
|
||||
Integration with Syntastic *rust-syntastic*
|
||||
Integration with Syntastic *rust-syntastic*
|
||||
--------------------------
|
||||
|
||||
This plugin automatically integrates with the Syntastic checker. There are two
|
||||
checkers provided: 'rustc', and 'cargo'. The latter invokes 'Cargo' in order to
|
||||
build code, and the former delivers a single edited '.rs' file as a compilation
|
||||
target directly to the Rust compiler, `rustc`.
|
||||
This plugin automatically integrates with the Syntastic checker. There are
|
||||
two checkers provided: "rustc", and "cargo". The latter invokes "cargo" to
|
||||
build code, and the former delivers a single edited ".rs" file as a
|
||||
compilation target directly to the Rust compiler, `rustc`.
|
||||
|
||||
Because Cargo is almost exclusively being used for building Rust code these
|
||||
days, 'cargo' is the default checker. >
|
||||
|
||||
let g:syntastic_rust_checkers = ['cargo']
|
||||
days, "cargo" is the default checker.
|
||||
>
|
||||
let g:syntastic_rust_checkers = ['cargo']
|
||||
<
|
||||
If you would like to change it, you can set `g:syntastic_rust_checkers` to a
|
||||
different value.
|
||||
*g:rust_cargo_avoid_whole_workspace*
|
||||
*b:rust_cargo_avoid_whole_workspace*
|
||||
*g:rust_cargo_avoid_whole_workspace*
|
||||
*b:rust_cargo_avoid_whole_workspace*
|
||||
g:rust_cargo_avoid_whole_workspace~
|
||||
When editing a crate that is part of a Cargo workspace, and this
|
||||
option is set to 1 (the default), then 'cargo' will be executed
|
||||
option is set to 1 (the default), then "cargo" will be executed
|
||||
directly in that crate directory instead of in the workspace
|
||||
directory. Setting 0 prevents this behavior - however be aware that if
|
||||
you are working in large workspace, Cargo commands may take more time,
|
||||
plus the Syntastic error list may include all the crates in the
|
||||
directory. Setting 0 prevents this behavior - however be aware that
|
||||
if you are working in a large workspace, Cargo commands may take more
|
||||
time, plus the Syntastic error list may include all the crates in the
|
||||
workspace. >
|
||||
let g:rust_cargo_avoid_whole_workspace = 0
|
||||
let g:rust_cargo_avoid_whole_workspace = 0
|
||||
<
|
||||
*g:rust_cargo_check_all_targets*
|
||||
*b:rust_cargo_check_all_targets*
|
||||
*g:rust_cargo_check_all_targets*
|
||||
*b:rust_cargo_check_all_targets*
|
||||
g:rust_cargo_check_all_targets~
|
||||
When set to 1, the `--all-targets` option will be passed to cargo when
|
||||
Syntastic executes it, allowing the linting of all targets under the
|
||||
package.
|
||||
The default is 0.
|
||||
|
||||
*g:rust_cargo_check_all_features*
|
||||
*b:rust_cargo_check_all_features*
|
||||
*g:rust_cargo_check_all_features*
|
||||
*b:rust_cargo_check_all_features*
|
||||
g:rust_cargo_check_all_features~
|
||||
When set to 1, the `--all-features` option will be passed to cargo when
|
||||
Syntastic executes it, allowing the linting of all features of the
|
||||
package.
|
||||
The default is 0.
|
||||
|
||||
*g:rust_cargo_check_examples*
|
||||
*b:rust_cargo_check_examples*
|
||||
*g:rust_cargo_check_examples*
|
||||
*b:rust_cargo_check_examples*
|
||||
g:rust_cargo_check_examples~
|
||||
When set to 1, the `--examples` option will be passed to cargo when
|
||||
Syntastic executes it, to prevent the exclusion of examples from
|
||||
linting. The examples are normally under the `examples/` directory of
|
||||
linting. The examples are normally under the `examples/` directory of
|
||||
the crate.
|
||||
The default is 0.
|
||||
|
||||
*g:rust_cargo_check_tests*
|
||||
*b:rust_cargo_check_tests*
|
||||
*g:rust_cargo_check_tests*
|
||||
*b:rust_cargo_check_tests*
|
||||
g:rust_cargo_check_tests~
|
||||
When set to 1, the `--tests` option will be passed to cargo when
|
||||
Syntastic executes it, to prevent the exclusion of tests from linting.
|
||||
The tests are normally under the `tests/` directory of the crate.
|
||||
The default is 0.
|
||||
|
||||
*g:rust_cargo_check_benches*
|
||||
*b:rust_cargo_check_benches*
|
||||
*g:rust_cargo_check_benches*
|
||||
*b:rust_cargo_check_benches*
|
||||
g:rust_cargo_check_benches~
|
||||
When set to 1, the `--benches` option will be passed to cargo when
|
||||
Syntastic executes it. The benches are normally under the `benches/`
|
||||
directory of the crate.
|
||||
The default is 0.
|
||||
|
||||
Integration with auto-pairs *rust-auto-pairs*
|
||||
Integration with auto-pairs *rust-auto-pairs*
|
||||
---------------------------
|
||||
|
||||
This plugin automatically configures the auto-pairs plugin not to duplicate
|
||||
single quotes, which are used more often for lifetime annotations than for
|
||||
single character literals.
|
||||
|
||||
*g:rust_keep_autopairs_default*
|
||||
*g:rust_keep_autopairs_default*
|
||||
g:rust_keep_autopairs_default~
|
||||
|
||||
Don't override auto-pairs default for the Rust filetype. The default
|
||||
Don't override auto-pairs default for the Rust filetype. The default
|
||||
is 0.
|
||||
|
||||
==============================================================================
|
||||
COMMANDS *rust-commands*
|
||||
COMMANDS *rust-commands*
|
||||
|
||||
Invoking Cargo
|
||||
--------------
|
||||
|
||||
This plug defines very simple shortcuts for invoking Cargo from with Vim.
|
||||
This plugin defines very simple shortcuts for invoking Cargo from within Vim.
|
||||
|
||||
:Cargo <args> *:Cargo*
|
||||
Runs 'cargo' with the provided arguments.
|
||||
:Cargo <args> *:Cargo*
|
||||
Runs "cargo" with the provided arguments.
|
||||
|
||||
:Cbuild <args> *:Cbuild*
|
||||
Shortcut for 'cargo build`.
|
||||
:Cbuild <args> *:Cbuild*
|
||||
Shortcut for "cargo build".
|
||||
|
||||
:Cclean <args> *:Cclean*
|
||||
Shortcut for 'cargo clean`.
|
||||
:Cclean <args> *:Cclean*
|
||||
Shortcut for "cargo clean".
|
||||
|
||||
:Cdoc <args> *:Cdoc*
|
||||
Shortcut for 'cargo doc`.
|
||||
:Cdoc <args> *:Cdoc*
|
||||
Shortcut for "cargo doc".
|
||||
|
||||
:Cinit <args> *:Cinit*
|
||||
Shortcut for 'cargo init`.
|
||||
:Cinit <args> *:Cinit*
|
||||
Shortcut for "cargo init".
|
||||
|
||||
:Crun <args> *:Crun*
|
||||
Shortcut for 'cargo run`.
|
||||
:Crun <args> *:Crun*
|
||||
Shortcut for "cargo run".
|
||||
|
||||
:Ctest <args> *:Ctest*
|
||||
Shortcut for 'cargo test`.
|
||||
:Ctest <args> *:Ctest*
|
||||
Shortcut for "cargo test".
|
||||
|
||||
:Cupdate <args> *:Cupdate*
|
||||
Shortcut for 'cargo update`.
|
||||
:Cupdate <args> *:Cupdate*
|
||||
Shortcut for "cargo update".
|
||||
|
||||
:Cbench <args> *:Cbench*
|
||||
Shortcut for 'cargo bench`.
|
||||
:Cbench <args> *:Cbench*
|
||||
Shortcut for "cargo bench".
|
||||
|
||||
:Csearch <args> *:Csearch*
|
||||
Shortcut for 'cargo search`.
|
||||
:Csearch <args> *:Csearch*
|
||||
Shortcut for "cargo search".
|
||||
|
||||
:Cpublish <args> *:Cpublish*
|
||||
Shortcut for 'cargo publish`.
|
||||
:Cpublish <args> *:Cpublish*
|
||||
Shortcut for "cargo publish".
|
||||
|
||||
:Cinstall <args> *:Cinstall*
|
||||
Shortcut for 'cargo install`.
|
||||
:Cinstall <args> *:Cinstall*
|
||||
Shortcut for "cargo install".
|
||||
|
||||
:Cruntarget <args> *:Cruntarget*
|
||||
Shortcut for 'cargo run --bin' or 'cargo run --example',
|
||||
depending on the currently open buffer.
|
||||
:Cruntarget <args> *:Cruntarget*
|
||||
Shortcut for "cargo run --bin" or "cargo run --example",
|
||||
depending on the currently open buffer.
|
||||
|
||||
Formatting
|
||||
----------
|
||||
|
||||
:RustFmt *:RustFmt*
|
||||
Runs |g:rustfmt_command| on the current buffer. If
|
||||
:RustFmt *:RustFmt*
|
||||
Runs |g:rustfmt_command| on the current buffer. If
|
||||
|g:rustfmt_options| is set then those will be passed to the
|
||||
executable.
|
||||
|
||||
If |g:rustfmt_fail_silently| is 0 (the default) then it
|
||||
will populate the |location-list| with the errors from
|
||||
|g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1
|
||||
|g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1
|
||||
then it will not populate the |location-list|.
|
||||
|
||||
:RustFmtRange *:RustFmtRange*
|
||||
Runs |g:rustfmt_command| with selected range. See
|
||||
|:RustFmt| for any other information.
|
||||
|
||||
:RustFmtRange *:RustFmtRange*
|
||||
Runs |g:rustfmt_command| with selected range. See |:RustFmt|
|
||||
for any other information.
|
||||
|
||||
Playpen integration
|
||||
-------------------
|
||||
|
||||
:RustPlay *:RustPlay*
|
||||
:RustPlay *:RustPlay*
|
||||
This command will only work if you have web-api.vim installed
|
||||
(available at https://github.com/mattn/webapi-vim). It sends the
|
||||
current selection, or if nothing is selected, the entirety of the
|
||||
current buffer to the Rust playpen, and emits a message with the
|
||||
shortened URL to the playpen.
|
||||
(available at https://github.com/mattn/webapi-vim). It sends
|
||||
the current selection, or if nothing is selected, the entirety
|
||||
of the current buffer to the Rust playpen, and emits a message
|
||||
with the shortened URL to the playpen.
|
||||
|
||||
|g:rust_playpen_url| is the base URL to the playpen, by default
|
||||
"https://play.rust-lang.org/".
|
||||
|
||||
|g:rust_shortener_url| is the base url for the shorterner, by
|
||||
|g:rust_shortener_url| is the base url for the shortener, by
|
||||
default "https://is.gd/"
|
||||
|
||||
|g:rust_clip_command| is the command to run to copy the
|
||||
playpen url to the clipboard of your system.
|
||||
|
||||
|
||||
Evaluation of a single Rust file
|
||||
--------------------------------
|
||||
|
||||
NOTE: These commands are useful only when working with standalone Rust files,
|
||||
which is usually not the case for common Rust development. If you wish to
|
||||
building Rust crates from with Vim can should use Vim's make, Syntastic, or
|
||||
functionality from other plugins.
|
||||
which is usually not the case for common Rust development. If you wish to
|
||||
build Rust crates from within Vim, use Vim's make, Syntastic, or functionality
|
||||
from other plugins.
|
||||
|
||||
|
||||
:RustRun [args] *:RustRun*
|
||||
:RustRun [args] *:RustRun*
|
||||
:RustRun! [rustc-args] [--] [args]
|
||||
Compiles and runs the current file. If it has unsaved changes,
|
||||
it will be saved first using |:update|. If the current file is
|
||||
an unnamed buffer, it will be written to a temporary file
|
||||
first. The compiled binary is always placed in a temporary
|
||||
directory, but is run from the current directory.
|
||||
Compiles and runs the current file. If it has unsaved
|
||||
changes, it will be saved first using |:update|. If the
|
||||
current file is an unnamed buffer, it will be written to a
|
||||
temporary file first. The compiled binary is always placed in
|
||||
a temporary directory, but is run from the current directory.
|
||||
|
||||
The arguments given to |:RustRun| will be passed to the
|
||||
compiled binary.
|
||||
@@ -405,11 +379,11 @@ functionality from other plugins.
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustExpand [args] *:RustExpand*
|
||||
:RustExpand [args] *:RustExpand*
|
||||
:RustExpand! [TYPE] [args]
|
||||
Expands the current file using --pretty and displays the
|
||||
results in a new split. If the current file has unsaved
|
||||
changes, it will be saved first using |:update|. If the
|
||||
results in a new split. If the current file has unsaved
|
||||
changes, it will be saved first using |:update|. If the
|
||||
current file is an unnamed buffer, it will be written to a
|
||||
temporary file first.
|
||||
|
||||
@@ -418,16 +392,16 @@ functionality from other plugins.
|
||||
configurations.
|
||||
|
||||
If ! is specified, the first argument is the expansion type to
|
||||
pass to rustc --pretty. Otherwise it will default to
|
||||
pass to rustc --pretty. Otherwise it will default to
|
||||
"expanded".
|
||||
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustEmitIr [args] *:RustEmitIr*
|
||||
:RustEmitIr [args] *:RustEmitIr*
|
||||
Compiles the current file to LLVM IR and displays the results
|
||||
in a new split. If the current file has unsaved changes, it
|
||||
will be saved first using |:update|. If the current file is an
|
||||
in a new split. If the current file has unsaved changes, it
|
||||
will be saved first using |:update|. If the current file is an
|
||||
unnamed buffer, it will be written to a temporary file first.
|
||||
|
||||
The arguments given to |:RustEmitIr| will be passed to rustc.
|
||||
@@ -435,10 +409,10 @@ functionality from other plugins.
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustEmitAsm [args] *:RustEmitAsm*
|
||||
:RustEmitAsm [args] *:RustEmitAsm*
|
||||
Compiles the current file to assembly and displays the results
|
||||
in a new split. If the current file has unsaved changes, it
|
||||
will be saved first using |:update|. If the current file is an
|
||||
in a new split. If the current file has unsaved changes, it
|
||||
will be saved first using |:update|. If the current file is an
|
||||
unnamed buffer, it will be written to a temporary file first.
|
||||
|
||||
The arguments given to |:RustEmitAsm| will be passed to rustc.
|
||||
@@ -446,13 +420,12 @@ functionality from other plugins.
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
|
||||
Running test(s)
|
||||
---------------
|
||||
|
||||
:[N]RustTest[!] [options] *:RustTest*
|
||||
:[N]RustTest[!] [options] *:RustTest*
|
||||
Runs a test under the cursor when the current buffer is in a
|
||||
cargo project with "cargo test" command. If the command did
|
||||
cargo project with "cargo test" command. If the command did
|
||||
not find any test function under the cursor, it stops with an
|
||||
error message.
|
||||
|
||||
@@ -465,35 +438,36 @@ Running test(s)
|
||||
When [options] is given, it is passed to "cargo" command
|
||||
arguments.
|
||||
|
||||
When the current buffer is outside cargo project, the command
|
||||
runs "rustc --test" command instead of "cargo test" as
|
||||
fallback. All tests are run regardless of adding ! since there
|
||||
is no way to run specific test function with rustc. [options]
|
||||
is passed to "rustc" command arguments in the case.
|
||||
When the current buffer is outside a cargo project, the
|
||||
command runs "rustc --test" command instead of "cargo test" as
|
||||
fallback. All tests are run regardless of adding ! since
|
||||
there is no way to run specific test function with rustc.
|
||||
[options] is passed to "rustc" command arguments in that case.
|
||||
|
||||
Takes optional modifiers (see |<mods>|): >
|
||||
:tab RustTest
|
||||
:belowright 16RustTest
|
||||
:leftabove vert 80RustTest
|
||||
Takes optional modifiers (see |<mods>|): >
|
||||
:tab RustTest
|
||||
:belowright 16RustTest
|
||||
:leftabove vert 80RustTest
|
||||
<
|
||||
rust.vim Debugging
|
||||
------------------
|
||||
|
||||
:RustInfo *:RustInfo*
|
||||
:RustInfo *:RustInfo*
|
||||
Emits debugging info of the Vim Rust plugin.
|
||||
|
||||
:RustInfoToClipboard *:RustInfoClipboard*
|
||||
:RustInfoToClipboard *:RustInfoClipboard*
|
||||
Saves debugging info of the Vim Rust plugin to the default
|
||||
register.
|
||||
|
||||
:RustInfoToFile [filename] *:RustInfoToFile*
|
||||
:RustInfoToFile [filename] *:RustInfoToFile*
|
||||
Saves debugging info of the Vim Rust plugin to the given file,
|
||||
overwriting it.
|
||||
|
||||
==============================================================================
|
||||
MAPPINGS *rust-mappings*
|
||||
MAPPINGS *rust-mappings*
|
||||
|
||||
This plugin defines mappings for |[[| and |]]| to support hanging indents.
|
||||
This plugin defines Normal mode, Visual mode, and Operator-pending mode
|
||||
mappings for |[[| and |]]| to support hanging indents.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:sw=4:noet:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*gui.txt* For Vim version 9.2. Last change: 2026 Apr 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1150,11 +1150,22 @@ For the Win32 GUI *E244* *E245*
|
||||
NONANTIALIASED, CLEARTYPE and DEFAULT. Normally you would use
|
||||
"qDEFAULT".
|
||||
Some quality values are not supported in legacy OSs.
|
||||
fXX - OpenType font feature. Specify a single feature as
|
||||
tag=value, where tag is a 4-character OpenType feature
|
||||
tag and value is the parameter (0 to disable, 1 or
|
||||
higher to enable/select variant). Multiple features
|
||||
can be specified by repeating the ":f" option.
|
||||
This only takes effect when 'renderoptions' is set to use
|
||||
DirectWrite (type:directx). Default features (calt, liga,
|
||||
etc.) are preserved unless explicitly overridden.
|
||||
Example: ":fss19=1:fcalt=0" enables Stylistic Set 19
|
||||
and disables Contextual Alternates.
|
||||
- A '_' can be used in the place of a space, so you don't need to use
|
||||
backslashes to escape the spaces.
|
||||
Examples: >
|
||||
:set guifont=courier_new:h12:w5:b:cRUSSIAN
|
||||
:set guifont=Andale_Mono:h7.5:w4.5
|
||||
:set guifont=Cascadia_Code:h14:fss19=1:fcalt=1:fliga=1
|
||||
|
||||
See also |font-sizes|.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*map.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1593,7 +1593,10 @@ reported if any are supplied). However, it is possible to specify that the
|
||||
command can take arguments, using the -nargs attribute. Valid cases are:
|
||||
|
||||
-nargs=0 No arguments are allowed (the default)
|
||||
-nargs=1 Exactly one argument is required, it includes spaces
|
||||
-nargs=1 Exactly one argument is required, it includes spaces;
|
||||
completion treats white spaces as argument separation
|
||||
-nargs=_ Exactly one argument is required, it includes spaces;
|
||||
completion treats white spaces as part of the argument
|
||||
-nargs=* Any number of arguments are allowed (0, 1, or many),
|
||||
separated by white space
|
||||
-nargs=? 0 or 1 arguments are allowed
|
||||
@@ -1601,7 +1604,23 @@ command can take arguments, using the -nargs attribute. Valid cases are:
|
||||
|
||||
Arguments are considered to be separated by (unescaped) spaces or tabs in this
|
||||
context, except when there is one argument, then the white space is part of
|
||||
the argument.
|
||||
the argument. The difference between the "-nargs=1" and "-nargs=_": >
|
||||
|
||||
func MyComplete(ArgLead, CmdLine, CursorPos)
|
||||
return ["one value", "two values", "three values"]
|
||||
\->matchfuzzy(a:ArgLead)
|
||||
endfunc
|
||||
:command -nargs=1 -complete=customlist,MyComplete MyCmd1 echo <q-args>
|
||||
:command -nargs=_ -complete=customlist,MyComplete MyCmd2 echo <q-args>
|
||||
|
||||
Completing ":MyCmd1 two va<tab>" will complete with: >
|
||||
|
||||
:MyCmd1 two one value
|
||||
|
||||
Completing ":MyCmd2 two va<tab>" will complete with: >
|
||||
|
||||
:MyCmd2 two values
|
||||
|
||||
|
||||
Note that arguments are used as text, not as expressions. Specifically,
|
||||
"s:var" will use the script-local variable in the script where the command was
|
||||
@@ -1693,7 +1712,21 @@ For the "custom" argument, the function should return the completion
|
||||
candidates one per line in a newline separated string.
|
||||
*E1303*
|
||||
For the "customlist" argument, the function should return the completion
|
||||
candidates as a Vim List. Non-string items in the list are ignored.
|
||||
candidates as a Vim List. Each item may be either a string or a |Dictionary|.
|
||||
A Dictionary item may have the following keys:
|
||||
word (required) the text inserted into the command line when the
|
||||
item is selected
|
||||
abbr alternative text shown in the popup menu in place of "word",
|
||||
when 'wildoptions' contains "pum"; useful when the inserted
|
||||
text and the displayed text should differ
|
||||
kind short kind text (one or two characters), shown in the popup
|
||||
menu when 'wildoptions' contains "pum"
|
||||
menu extra text shown after the match in the popup menu
|
||||
info long description shown in the info popup; the |+popupwin|
|
||||
feature is required to display it
|
||||
Items that are neither a string nor a Dictionary, and Dictionary items without
|
||||
a "word" key, are ignored. When 'wildoptions' does not contain "pum", only
|
||||
"word" is shown.
|
||||
|
||||
The function arguments are:
|
||||
ArgLead the leading portion of the argument currently being
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*netbeans.txt* For Vim version 9.2. Last change: 2026 Apr 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -849,7 +849,7 @@ REJECT Not used.
|
||||
These errors occur when a message violates the protocol:
|
||||
*E627* *E628* *E629* *E632* *E633* *E634* *E635* *E636*
|
||||
*E637* *E638* *E639* *E640* *E641* *E642* *E643* *E644* *E645* *E646*
|
||||
*E647* *E648* *E650* *E651* *E652*
|
||||
*E647* *E648* *E649* *E650* *E651* *E652*
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.2. Last change: 2026 Mar 16
|
||||
*options.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -97,6 +97,17 @@ achieve special effects. These options come in three forms:
|
||||
If the option is a list of flags, superfluous flags
|
||||
are removed. When adding a flag that was already
|
||||
present the option value doesn't change.
|
||||
When the option supports "key:value" items and {value}
|
||||
contains a "key:value" item or multiple
|
||||
comma-separated items, each item is processed
|
||||
individually:
|
||||
- A "key:value" item where the key already exists with
|
||||
a different value: the old item is removed and the
|
||||
new item is appended to the end.
|
||||
- A "key:value" item that is an exact duplicate is
|
||||
left unchanged.
|
||||
- Other items that already exist are left unchanged.
|
||||
- New items are appended to the end.
|
||||
Also see |:set-args| above.
|
||||
|
||||
:se[t] {option}^={value} *:set^=*
|
||||
@@ -104,6 +115,11 @@ achieve special effects. These options come in three forms:
|
||||
the {value} to a string option. When the option is a
|
||||
comma-separated list, a comma is added, unless the
|
||||
value was empty.
|
||||
When the option supports "key:value" items and {value}
|
||||
contains a "key:value" item or multiple
|
||||
comma-separated items, each item is processed
|
||||
individually. Works like |:set+=| but new items are
|
||||
prepended to the beginning instead of appended.
|
||||
Also see |:set-args| above.
|
||||
|
||||
:se[t] {option}-={value} *:set-=*
|
||||
@@ -116,6 +132,12 @@ achieve special effects. These options come in three forms:
|
||||
When the option is a list of flags, {value} must be
|
||||
exactly as they appear in the option. Remove flags
|
||||
one by one to avoid problems.
|
||||
When the option supports "key:value" items and {value}
|
||||
contains a "key:value" item or multiple
|
||||
comma-separated items, each item is processed
|
||||
individually. A "key:value" item removes the existing
|
||||
item with that key regardless of its value. A "key:"
|
||||
item also removes by key match.
|
||||
The individual values from a comma separated list or
|
||||
list of flags can be inserted by typing 'wildchar'.
|
||||
See |complete-set-option|.
|
||||
@@ -302,12 +324,12 @@ that was last closed are used again. If this buffer has been edited in this
|
||||
window, the values from back then are used. Otherwise the values from the
|
||||
last closed window where the buffer was edited last are used.
|
||||
|
||||
It's possible to set a local window option specifically for a type of buffer.
|
||||
When you edit another buffer in the same window, you don't want to keep
|
||||
using these local window options. Therefore Vim keeps a global value of the
|
||||
local window options, which is used when editing another buffer. Each window
|
||||
has its own copy of these values. Thus these are local to the window, but
|
||||
global to all buffers in the window. With this you can do: >
|
||||
":setlocal" can be used to set a local window option specifically for a type
|
||||
of buffer. When you edit another buffer in the same window, you don't want to
|
||||
keep using these local window options. Meanwhile ":set" also sets a global
|
||||
value of a local window option, which is used when editing another buffer.
|
||||
Each window has its own copy of these global values, making them local to the
|
||||
window, but global to all buffers in the window. With this you can do: >
|
||||
:e one
|
||||
:set list
|
||||
:e two
|
||||
@@ -1008,10 +1030,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'autowrite' 'aw' boolean (default off)
|
||||
global
|
||||
Write the contents of the file, if it has been modified, on each
|
||||
`:next`, `:rewind`, `:last`, `:first`, `:previous`, `:stop`,
|
||||
`:suspend`, `:tag`, `:!`, `:make`, CTRL-] and CTRL-^ command; and when
|
||||
a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command takes one
|
||||
to another file.
|
||||
`:next`, `:rewind`, `:last`, `:first`, `:previous`, `:tag`, `:stop`,
|
||||
`:suspend`, `:!`, `:make`, `:terminal`, CTRL-] or CTRL-^ command; and
|
||||
when a `:buffer`, CTRL-O, CTRL-I, '{A-Z0-9}, or `{A-Z0-9} command
|
||||
switches to another file.
|
||||
A buffer is not written if it becomes hidden, e.g. when 'bufhidden' is
|
||||
set to "hide" and `:next` is used.
|
||||
Note that for some commands the 'autowrite' option is not used, see
|
||||
@@ -1025,8 +1047,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'*
|
||||
'autowriteall' 'awa' boolean (default off)
|
||||
global
|
||||
Like 'autowrite', but also used for commands ":edit", ":enew",
|
||||
":quit", ":qall", ":exit", ":xit", ":recover" and closing the Vim
|
||||
Like 'autowrite', but also used for commands `:edit`, `:enew`,
|
||||
`:quit`, `:qall`, `:exit`, `:xit`, `:recover` and closing the Vim
|
||||
window.
|
||||
Setting this option also implies that Vim behaves like 'autowrite' has
|
||||
been set.
|
||||
@@ -2204,6 +2226,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note: The match limit takes effect only during forward completion
|
||||
(CTRL-N) and is ignored during backward completion (CTRL-P).
|
||||
|
||||
This option cannot be set in a modeline when 'modelineexpr' is off.
|
||||
|
||||
*'completefunc'* *'cfu'*
|
||||
'completefunc' 'cfu' string (default: empty)
|
||||
local to buffer
|
||||
@@ -2369,6 +2393,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
close show close button: "on" (default) or "off"
|
||||
height maximum height of the popup
|
||||
highlight popup highlight group (default: PmenuSel)
|
||||
opacity opacity percentage 0-100 (default 100, fully
|
||||
opaque). When less than 100, content beneath
|
||||
the popup shows through.
|
||||
resize show resize handle: "on" (default) or "off"
|
||||
shadow "off" (default) or "on" using |hl-PmenuShadow|
|
||||
width maximum width of the popup
|
||||
@@ -2376,6 +2403,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Example: >
|
||||
:set completepopup=height:10,border:single,highlight:InfoPopup
|
||||
:set completepopup=width:60,border:custom:─;│;─;│;┌;┐;┘;└
|
||||
:set completepopup=border:round,opacity:80
|
||||
<
|
||||
When "align" is set to "item", the popup is positioned near the
|
||||
selected item and moves as the selection changes.
|
||||
@@ -3955,7 +3983,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|String| and is the |:find| command argument. The second argument is
|
||||
a |Boolean| and is set to |v:true| when the function is called to get
|
||||
a List of command-line completion matches for the |:find| command.
|
||||
The function should return a List of strings.
|
||||
The function should return a List, which is handled similarly to the
|
||||
return value of a |:command-completion-customlist| function.
|
||||
|
||||
The function is called only once per |:find| command invocation.
|
||||
The function can process all the directories specified in 'path'.
|
||||
@@ -4664,6 +4693,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
You can include a line break. Simplest method is to use |:let|: >
|
||||
:let &guitabtooltip = "line one\nline two"
|
||||
<
|
||||
This option cannot be set in a modeline when 'modelineexpr' is off.
|
||||
|
||||
*'helpfile'* *'hf'*
|
||||
'helpfile' 'hf' string (default (MS-Windows) "$VIMRUNTIME\doc\help.txt"
|
||||
@@ -4732,7 +4762,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
l:Search,m:MoreMsg,M:ModeMsg,n:LineNr,
|
||||
a:LineNrAbove,b:LineNrBelow,
|
||||
N:CursorLineNr,r:Question,s:StatusLine,
|
||||
S:StatusLineNC,c:VertSplit,t:Title,
|
||||
S:StatusLineNC,c:VertSplit,
|
||||
|:VertSplitNC,t:Title,
|
||||
v:Visual,V:VisualNOS,w:WarningMsg,
|
||||
W:WildMenu,f:Folded,F:FoldColumn,
|
||||
A:DiffAdd,C:DiffChange,D:DiffDelete,
|
||||
@@ -4743,7 +4774,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
[:PmenuKind,]:PmenuKindSel,
|
||||
{:PmenuExtra,}:PmenuExtraSel,
|
||||
x:PmenuSbar,X:PmenuThumb,j:PmenuBorder,
|
||||
H:PmenuShadow,*:TabLine,
|
||||
H:PmenuShadow,p:Popup,J:PopupBorder,
|
||||
Q:PopupTitle,*:TabLine,
|
||||
#:TabLineSel,_:TabLineFill,!:CursorColumn,
|
||||
.:CursorLine,o:ColorColumn,q:QuickFixLine,
|
||||
z:StatusLineTerm,Z:StatusLineTermNC,
|
||||
@@ -4780,6 +4812,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|hl-StatusLineNC| S status lines of not-current windows
|
||||
|hl-Title| t Titles for output from ":set all", ":autocmd" etc.
|
||||
|hl-VertSplit| c column used to separate vertically split windows
|
||||
|hl-VertSplitNC| | column separating non-current vertically split
|
||||
windows
|
||||
|hl-Visual| v Visual mode
|
||||
|hl-VisualNOS| V Visual mode when Vim is "Not Owning the
|
||||
Selection" Only X11 Gui's |gui-x11|,
|
||||
@@ -4812,6 +4846,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|hl-PmenuMatchSel| < popup menu matched text in selected line
|
||||
|hl-PmenuBorder| j popup menu border characters
|
||||
|hl-PmenuShadow| H popup menu shadow
|
||||
|hl-Popup| p popup window body
|
||||
|hl-PopupBorder| J popup window border characters
|
||||
|hl-PopupTitle| Q popup window title
|
||||
|hl-PreInsert| I text inserted when "preinsert" is in 'completeopt'
|
||||
|hl-Normal| ( Window color (supersedes 'wincolor' option)
|
||||
|
||||
@@ -5187,7 +5224,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
command line has no uppercase characters, the added character is
|
||||
converted to lowercase.
|
||||
CTRL-R CTRL-W can be used to add the word at the end of the current
|
||||
match, excluding the characters that were already typed.
|
||||
match, excluding the characters that were already typed (starting from
|
||||
the beginning of the word).
|
||||
NOTE: This option is reset when 'compatible' is set.
|
||||
|
||||
*'indentexpr'* *'inde'*
|
||||
@@ -6004,7 +6042,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Increasing this limit above 200 also changes the maximum for Ex
|
||||
command recursion, see |E169|.
|
||||
See also |:function|.
|
||||
Also used for maximum depth of callback functions.
|
||||
Also used for maximum depth of callback functions and encoding and
|
||||
decoding of deeply nested json data.
|
||||
|
||||
*'maxmapdepth'* *'mmd'* *E223*
|
||||
'maxmapdepth' 'mmd' number (default 1000)
|
||||
@@ -6169,6 +6208,49 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: 'modeline' is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'modelinestrict'* *'mlst'* *'nomodelinestrict'* *'nomlst'*
|
||||
'modelinestrict' 'mlst' boolean (default: on)
|
||||
global
|
||||
When on, only a safe subset of options can be set from a |modeline|.
|
||||
The following options are allowed:
|
||||
'autoindent'
|
||||
'cindent'
|
||||
'commentstring'
|
||||
'expandtab'
|
||||
'filetype'
|
||||
'foldcolumn'
|
||||
'foldenable'
|
||||
'foldmarker'
|
||||
'foldmethod'
|
||||
'modifiable'
|
||||
'readonly'
|
||||
'rightleft'
|
||||
'shiftwidth'
|
||||
'smartindent'
|
||||
'softtabstop'
|
||||
'spell'
|
||||
'spelllang'
|
||||
'tabstop'
|
||||
'textwidth'
|
||||
'varsofttabstop'
|
||||
'vartabstop'
|
||||
|
||||
Any other option set from a modeline will be silently ignored.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
The behaviour of 'modeline', 'modelinestrict' and 'modelineexpr' is
|
||||
as follows:
|
||||
|
||||
'modeline'| 'modelinestrict'| 'modelineexpr' | Meaning
|
||||
----------+-----------------+-------------------+--------~
|
||||
on | off | on | All options can be set
|
||||
on | on | any | Only whitelisted
|
||||
| | | options can be set
|
||||
on | off | off | All options except for
|
||||
| | | expr options can be set
|
||||
off | any | any | No options can be set
|
||||
|
||||
*'modifiable'* *'ma'* *'nomodifiable'* *'noma'*
|
||||
*E21*
|
||||
'modifiable' 'ma' boolean (default on)
|
||||
@@ -6824,6 +6906,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The format of the header produced in |:hardcopy| output.
|
||||
See |pheader-option|.
|
||||
|
||||
This option cannot be set in a modeline when 'modelineexpr' is off.
|
||||
|
||||
*'printmbcharset'* *'pmbcs'*
|
||||
'printmbcharset' 'pmbcs' string (default "")
|
||||
global
|
||||
@@ -6857,6 +6941,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
Defines a border and optional decorations for the popup menu in
|
||||
completion. The value is a comma-separated list of keywords.
|
||||
See 'pumopt' for a consolidated alternative.
|
||||
|
||||
Border styles (at most one):
|
||||
"single" use thin box-drawing characters
|
||||
@@ -6892,6 +6977,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Determines the maximum number of items to show in the popup menu for
|
||||
Insert mode completion. When zero as much space as available is used.
|
||||
|ins-completion-menu|.
|
||||
See 'pumopt' for a consolidated alternative.
|
||||
|
||||
*'pummaxwidth'* *'pmw'*
|
||||
'pummaxwidth' 'pmw' number (default 0)
|
||||
@@ -6903,12 +6989,68 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
This option takes precedence over 'pumwidth'.
|
||||
|ins-completion-menu|.
|
||||
See 'pumopt' for a consolidated alternative.
|
||||
|
||||
*'pumopt'*
|
||||
'pumopt' string (default "")
|
||||
global
|
||||
Configures the popup menu used for Insert mode completion.
|
||||
The value is a comma-separated list of "key:value" pairs and flags.
|
||||
|
||||
Keys with values:
|
||||
border:{style} set a border style (at most one):
|
||||
"single" thin box-drawing characters
|
||||
"double" double-line box-drawing characters
|
||||
"round" rounded corners
|
||||
"ascii" ASCII characters (-, |, +)
|
||||
"custom:X;X;X;X;X;X;X;X"
|
||||
eight characters separated by
|
||||
semicolons, in the order: top, right,
|
||||
bottom, left, topleft, topright,
|
||||
botright, botleft
|
||||
height:{n} maximum number of items to show (default 0,
|
||||
meaning as much space as available)
|
||||
width:{n} minimum width (default 15)
|
||||
maxwidth:{n} maximum width (default 0, meaning no limit).
|
||||
This takes precedence over width.
|
||||
Truncated text is indicated by "trunc" value
|
||||
of 'fillchars' option.
|
||||
opacity:{n} opacity percentage 0-100 (default 100).
|
||||
When less than 100, background content shows
|
||||
through the popup menu. Requires the GUI,
|
||||
'termguicolors', or a 256-color terminal.
|
||||
|
||||
Flags (no value):
|
||||
margin adds one-cell spacing inside the left and
|
||||
right border. Requires a border style.
|
||||
shadow draws a shadow at the right and bottom edges.
|
||||
|
||||
Border styles using box-drawing characters ("single", "double",
|
||||
"round") are only available when 'encoding' is "utf-8" and 'ambiwidth'
|
||||
is "single".
|
||||
|
||||
Highlight groups:
|
||||
|hl-PmenuBorder| used for the border characters
|
||||
|hl-PmenuShadow| used for the shadow
|
||||
|
||||
Note: When 'pumopt' is set, all values are reset to their defaults
|
||||
first, then the specified keys are applied. Unspecified keys get
|
||||
their default values.
|
||||
|
||||
Examples: >
|
||||
:set pumopt=border:single
|
||||
:set pumopt=border:double,margin,shadow
|
||||
:set pumopt=height:10,width:20,opacity:80
|
||||
:set pumopt=border:custom:─;│;─;│;┌;┐;┘;└,shadow
|
||||
<
|
||||
See also: |ins-completion-menu|.
|
||||
|
||||
*'pumwidth'* *'pw'*
|
||||
'pumwidth' 'pw' number (default 15)
|
||||
global
|
||||
Determines the minimum width to use for the popup menu for Insert mode
|
||||
completion. |ins-completion-menu|.
|
||||
See 'pumopt' for a consolidated alternative.
|
||||
|
||||
*'pythondll'*
|
||||
'pythondll' string (default depends on the build)
|
||||
@@ -7446,8 +7588,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Minimal number of screen lines to keep above and below the cursor.
|
||||
This will make some context visible around where you are working. If
|
||||
you set it to a very large value (999) the cursor line will always be
|
||||
in the middle of the window (except at the start or end of the file or
|
||||
when long lines wrap).
|
||||
in the middle of the window (except at the start or end of the file,
|
||||
see 'scrolloffpad', or when long lines wrap).
|
||||
After using the local value, go back the global value with one of
|
||||
these two: >
|
||||
setlocal scrolloff<
|
||||
@@ -7455,7 +7597,24 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< For scrolling horizontally see 'sidescrolloff'.
|
||||
NOTE: This option is set to 0 when 'compatible' is set.
|
||||
|
||||
*'scrollopt'* *'sbo'*
|
||||
*'scrolloffpad'* *'sop'*
|
||||
'scrolloffpad' 'sop' number (default 0)
|
||||
global or local to window |global-local|
|
||||
When 'scrolloff' and 'scrolloffpad' are greater than zero, allow
|
||||
the cursor to remain centered when at the end of the file.
|
||||
Normally, 'scrolloff' will not keep the cursor centered at the
|
||||
end of the file.
|
||||
|
||||
A value of 0 disables this feature. Any value above 0 enables it.
|
||||
For a window-local value, -1 means to use the global value.
|
||||
Values below -1 are invalid.
|
||||
|
||||
After using the local value, go back the global value with one of
|
||||
these two: >
|
||||
setlocal scrolloffpad<
|
||||
setlocal scrolloffpad=-1
|
||||
|
||||
< *'scrollopt'* *'sbo'*
|
||||
'scrollopt' 'sbo' string (default "ver,jump")
|
||||
global
|
||||
This is a comma-separated list of words that specifies how
|
||||
@@ -7692,6 +7851,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note: When using a pipe like "| tee", you'll lose the exit code of the
|
||||
shell command. This might be configurable by your shell, look for
|
||||
the pipefail option (for bash and zsh, use ":set -o pipefail").
|
||||
Only a single "%s" value is allowed.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@@ -7735,6 +7895,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
become obsolete (at least for Unix).
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
*E1577*
|
||||
Only a single "%s" item is allowed in the option value.
|
||||
|
||||
|
||||
*'shellslash'* *'ssl'* *'noshellslash'* *'nossl'*
|
||||
'shellslash' 'ssl' boolean (default off)
|
||||
@@ -7896,6 +8059,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
search count statistics. The maximum limit can be set with
|
||||
the 'maxsearchcount' option, see also |searchcount()|
|
||||
function.
|
||||
u don't give undo and redo messages like *shm-u*
|
||||
"1 line less; before #1 1 second ago", "Already at oldest
|
||||
change" or "Already at newest change"
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
requires you to hit <Enter>, but still gives as useful a message as
|
||||
@@ -8534,10 +8700,62 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
applied to StatusLineNC for the statusline of non-current
|
||||
windows.
|
||||
The number N must be between 1 and 9. See |hl-User1..9|
|
||||
*stl-%@*
|
||||
*stl-%@*
|
||||
@ - Inserts a newline. This only takes effect when the "maxheight"
|
||||
value of 'statuslineopt' is greater than 1, or for |tabpanel|.
|
||||
|
||||
*stl-%[FuncName]*
|
||||
%[ defines clickable regions in the statusline. When the user clicks
|
||||
on a region with the mouse, the specified function is called. The
|
||||
same syntax can also be used in 'tabline' and 'tabpanel'.
|
||||
|
||||
%[FuncName] Start of a clickable region. "FuncName" is the name
|
||||
of a Vim function to call when the region is clicked.
|
||||
%[] End of the clickable region. If omitted, the region
|
||||
extends to the end of the statusline or to the start
|
||||
of the next clickable region.
|
||||
|
||||
A {minwid} value can be used to pass an identifier to the callback:
|
||||
%3[FuncName] Starts a clickable region with minwid 3.
|
||||
|
||||
The function receives a single |Dictionary| argument with these
|
||||
entries:
|
||||
"minwid" The minwid value from %N[Func] (0 if not specified).
|
||||
"nclicks" Number of clicks: 1, 2, or 3.
|
||||
"button" Mouse button: "l" (left), "m" (middle), "r" (right).
|
||||
"mods" Modifier keys: combination of "s" (shift), "c" (ctrl),
|
||||
"a" (alt). Empty string if no modifiers.
|
||||
"winid" |window-ID| of the window whose statusline was clicked,
|
||||
or 0 when the click was in 'tabline' or 'tabpanel'.
|
||||
"area" "statusline", "tabline", or "tabpanel". Indicates
|
||||
which option the clicked region belongs to.
|
||||
"tabnr" (tabpanel only) Tab page number of the clicked label.
|
||||
|
||||
If the function returns non-zero, the statusline is redrawn.
|
||||
Dragging the statusline to resize the window still works even when
|
||||
click handlers are defined. When used in 'tabline' or 'tabpanel',
|
||||
clicks in %[FuncName] regions are dispatched to the callback
|
||||
instead of the default tab-selection behavior.
|
||||
|
||||
Example: >
|
||||
func! ClickFile(info)
|
||||
if a:info.button ==# 'l' && a:info.nclicks == 2
|
||||
browse edit
|
||||
endif
|
||||
return 0
|
||||
endfunc
|
||||
set statusline=%[ClickFile]%f%[]\ %l:%c
|
||||
< This makes the filename in the statusline clickable. Double-clicking
|
||||
it opens the file browser.
|
||||
|
||||
Use `has('statusline_click')` to check if this feature is available.
|
||||
This is useful for backward compatibility: >
|
||||
if has('statusline_click')
|
||||
set statusline=%[ClickFile]%f%[]\ %l:%c
|
||||
else
|
||||
set statusline=%f\ %l:%c
|
||||
endif
|
||||
<
|
||||
When displaying a flag, Vim removes the leading comma, if any, when
|
||||
that flag comes right after plaintext. This will make a nice display
|
||||
when flags are used like in the examples below.
|
||||
@@ -8852,24 +9070,22 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Optional settings for the |tabpanel|, It can consist of the following
|
||||
items. Items must be separated by a comma.
|
||||
|
||||
align:{text} Specifies the position of the tabpanel.
|
||||
Currently supported positions are:
|
||||
|
||||
left left-side
|
||||
align:{text} Specifies the position of the tabpanel.
|
||||
Currently supported positions are:
|
||||
left left-side (default)
|
||||
right right-side
|
||||
|
||||
(default "left")
|
||||
|
||||
columns:{n} Number of columns of the tabpanel.
|
||||
If this value is 0 or less than 'columns', the
|
||||
tab panel will not be displayed.
|
||||
(default 20)
|
||||
|
||||
vert Use a vertical separator for tabpanel.
|
||||
The vertical separator character is taken from
|
||||
"tpl_vert" in 'fillchars'.
|
||||
(default off)
|
||||
|
||||
columns:{n} Number of columns of the tabpanel. (default 20)
|
||||
If this value is 0 or less than 'columns', the
|
||||
tabpanel will not be displayed.
|
||||
scrollbar A one-column scrollbar is always displayed at the
|
||||
right edge of the tabpanel, regardless of the
|
||||
"align:" setting. (default off)
|
||||
See |tabpanel-scroll|.
|
||||
vert The vertical separator is drawn at the boundary
|
||||
between the tabpanel and the buffer area.
|
||||
(default off)
|
||||
The character to be drawn uses "tpl_vert" from
|
||||
'fillchars'.
|
||||
Examples: >
|
||||
:set tabpanelopt=columns:16,align:right
|
||||
:set tabpanelopt=
|
||||
@@ -9007,6 +9223,22 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
file names from the list. This avoids problems when a future version
|
||||
uses another default.
|
||||
|
||||
*'tagsecure'* *'tsc'* *'notagsecure'* *'notsc'*
|
||||
'tagsecure' 'tsc' boolean (default on)
|
||||
global
|
||||
When on, Vim refuses to follow tag entries whose file field looks like
|
||||
a URL ("scheme://..."), aborting the jump with error |E1576|. This
|
||||
prevents tag files from causing Vim to open URLs through |netrw|, which
|
||||
would trigger a network request and expose netrw's URL-handling code to
|
||||
attacker-controlled input or lead to environment exfiltration.
|
||||
|
||||
Tag files might be distributed alongside source code (e.g. via Git
|
||||
repositories) and may therefore be untrustworthy. Only disable
|
||||
this option if you fully control the tag files Vim will read.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'tagstack'* *'tgst'* *'notagstack'* *'notgst'*
|
||||
'tagstack' 'tgst' boolean (default on)
|
||||
global
|
||||
@@ -9843,6 +10075,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
|
||||
and "_K_L_M" are not. Nested List and Dict items may not be
|
||||
read back correctly, you end up with an empty item.
|
||||
|
||||
Restoring |List|, |Dictionary| and |Tuple| variables is done by
|
||||
parsing their textual form with the Vim expression evaluator.
|
||||
Reading a viminfo file with "!" enabled is therefore only safe
|
||||
when the file is trusted. In particular, do not enable "!"
|
||||
before reading a viminfo file you obtained from another user,
|
||||
downloaded, or that is writable by another account. See
|
||||
also |viminfo-security|.
|
||||
*viminfo-quote*
|
||||
" Maximum number of lines saved for each register. Old name of
|
||||
the '<' item, with the disadvantage that you need to put a
|
||||
@@ -10200,8 +10440,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
applies to buffer name completion.
|
||||
"noselect" If 'wildmenu' is enabled, show the menu but do not
|
||||
preselect the first item.
|
||||
If only one match exists, it is completed fully, unless "noselect" is
|
||||
specified.
|
||||
"noinsert" If 'wildmenu' is enabled, show the menu and preselect
|
||||
the first match, but do not insert it in the command
|
||||
line. If both "noinsert" and "noselect" are present,
|
||||
"noselect" takes precedence.
|
||||
If only one match exists, it is completed fully, unless "noselect" or
|
||||
"noinsert" is specified.
|
||||
|
||||
Some useful combinations of colon-separated values:
|
||||
"longest:full" Start with the longest common string and show
|
||||
@@ -10469,11 +10713,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'wlsteal'* *'wst'* *'nowlsteal'* *'nowst'*
|
||||
'wlsteal' 'wst' boolean (default off)
|
||||
global
|
||||
{only when the |+wayland_focus_steal| feature is
|
||||
included}
|
||||
DEPRECATED: This option is no longer used; changing it has no effect.
|
||||
|
||||
When enabled, then allow Vim to steal focus by creating a temporary
|
||||
surface, in order to access the clipboard. For more information see
|
||||
|wayland-focus-steal|.
|
||||
surface, in order to access the clipboard.
|
||||
|
||||
*'wltimeoutlen'* *'wtm'*
|
||||
'wltimeoutlen' 'wtm' number (default 500)
|
||||
@@ -10486,9 +10729,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
some cases. On the other hand, it may also mean you receive errors
|
||||
when the compositor takes more time to respond than usual.
|
||||
|
||||
Additionally, this option is also used as the maximum timeout when
|
||||
waiting for a surface to gain focus, see |wayland-focus-steal|.
|
||||
|
||||
*'wrap'* *'nowrap'*
|
||||
'wrap' boolean (default on)
|
||||
local to window
|
||||
|
||||
@@ -1142,6 +1142,8 @@ One may easily "bookmark" the currently browsed directory by using >
|
||||
|
||||
mb
|
||||
<
|
||||
Note: Bookmarked paths are normalized and stored as absolute paths.
|
||||
|
||||
*.netrwbook*
|
||||
Bookmarks are retained in between sessions of vim in a file called .netrwbook
|
||||
as a |List|, which is typically stored in the first directory on the user's
|
||||
@@ -2854,10 +2856,6 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
such as listing, file removal, etc.
|
||||
default: ssh
|
||||
|
||||
*g:netrw_tmpfile_escape* =' &;'
|
||||
escape() is applied to all temporary files
|
||||
to escape these characters.
|
||||
|
||||
*g:netrw_timefmt* specify format string to vim's strftime().
|
||||
The default, "%c", is "the preferred date
|
||||
and time representation for the current
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_tar.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*pi_tar.txt* For Vim version 9.2. Last change: 2026 Apr 16
|
||||
|
||||
+====================+
|
||||
| Tar File Interface |
|
||||
@@ -101,10 +101,17 @@ Copyright 2005-2017: *tar-copyright*
|
||||
4. History *tar-history*
|
||||
|
||||
unreleased:
|
||||
Apr 16, 2026 * add missing g:tar_secure into tar#Extract
|
||||
Apr 15, 2026 * add path traversal checks in tar#Extract()
|
||||
Apr 09, 2026 * fix zstd support and dotted filename support
|
||||
Apr 06, 2026 * fix lz4 support
|
||||
Feb 07, 2026 * make path traversal detection more robust
|
||||
Feb 06, 2026 * fix bug with nowrapscan
|
||||
Jul 16, 2025 * update minimum required Vim version
|
||||
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)
|
||||
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()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_vimball.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*pi_vimball.txt* For Vim version 9.2. Last change: 2026 Apr 16
|
||||
|
||||
----------------
|
||||
Vimball Archiver
|
||||
@@ -93,21 +93,6 @@ MAKING A VIMBALL *:MkVimball*
|
||||
make.
|
||||
|
||||
|
||||
MAKING DIRECTORIES VIA VIMBALLS *g:vimball_mkdir*
|
||||
|
||||
First, the |mkdir()| command is tried (not all systems support it).
|
||||
|
||||
If it doesn't exist, then if g:vimball_mkdir doesn't exist, it is set
|
||||
as follows: >
|
||||
|g:netrw_localmkdir|, if it exists
|
||||
"mkdir" , if it is executable
|
||||
"makedir" , if it is executable
|
||||
Otherwise , it is undefined.
|
||||
< One may explicitly specify the directory making command using
|
||||
g:vimball_mkdir. This command is used to make directories that
|
||||
are needed as indicated by the vimball.
|
||||
|
||||
|
||||
CONTROLLING THE VIMBALL EXTRACTION DIRECTORY *g:vimball_home*
|
||||
|
||||
You may override the use of the 'runtimepath' by specifying a
|
||||
@@ -181,6 +166,11 @@ WINDOWS *vimball-windows*
|
||||
==============================================================================
|
||||
4. Vimball History *vimball-history* {{{1
|
||||
|
||||
unreleased:
|
||||
Feb 28, 2025 * add support for bzip3 (#16755)
|
||||
Apr 05, 2026 * Detect path traversal attacks
|
||||
Apr 09, 2026 * Detect more path traversal attacks
|
||||
Apr 16, 2026 * Block Windows drive letter paths
|
||||
37 : Jul 18, 2014 * (by request of T. Miedema) added augroup around
|
||||
the autocmds in vimballPlugin.vim
|
||||
Jul 06, 2015 * there are two uses of tabc; changed to tabc!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*pi_zip.txt* For Vim version 9.2. Last change: 2026 May 16
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -33,6 +33,10 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
also write to the file. Currently, one may not make a new file in
|
||||
zip archives via the plugin.
|
||||
|
||||
The zip plugin tries to detect some common path traversal attack
|
||||
patterns, but it may not catch all possible cases. Please be very
|
||||
careful when using this plugin with untrusted input.
|
||||
|
||||
COMMANDS~
|
||||
*zip-x*
|
||||
x : extract a listed file when the cursor is atop it
|
||||
@@ -110,9 +114,9 @@ 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 (as of October 2025) it holds: >
|
||||
Currently (as of May 2026) it holds: >
|
||||
|
||||
let g:zipPlugin_ext='*.aar,*.apk,*.celzip,*.crtx,*.docm,*.docx,
|
||||
let g:zipPlugin_ext='*.aar,*.apk,*.cbz,*.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,*.pkpass,*.potm,*.potx,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 9.2. Last change: 2026 Mar 02
|
||||
*popup.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -44,8 +44,11 @@ A popup window can be used for such things as:
|
||||
The text in the popup window can be colored with |text-properties|. It is
|
||||
also possible to use syntax highlighting.
|
||||
|
||||
The default color used is "Pmenu". If you prefer something else use the
|
||||
"highlight" argument or the 'wincolor' option, e.g.: >
|
||||
The default colors are taken from |hl-Popup| (body), |hl-PopupBorder|
|
||||
(border) and |hl-PopupTitle| (title), which all link to |hl-Pmenu| by
|
||||
default for backward compatibility. Override them to give general popup
|
||||
windows a different look than the popup completion menu, or use the
|
||||
"highlight" argument or the 'wincolor' option for a per-popup override: >
|
||||
hi MyPopupColor ctermbg=lightblue guibg=lightblue
|
||||
call setwinvar(winid, '&wincolor', 'MyPopupColor')
|
||||
|
||||
@@ -254,7 +257,7 @@ popup_clear([{force}])
|
||||
when it is the current window. If a terminal is running in a
|
||||
popup it is killed.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
popup_close({id} [, {result}]) *popup_close()*
|
||||
@@ -269,7 +272,7 @@ popup_close({id} [, {result}]) *popup_close()*
|
||||
Can also be used as a |method|: >
|
||||
GetPopup()->popup_close()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
popup_create({what}, {options}) *popup_create()*
|
||||
@@ -351,7 +354,7 @@ popup_filter_menu({id}, {key}) *popup_filter_menu()*
|
||||
To add shortcut keys, see the example here:
|
||||
|popup_menu-shortcut-example|
|
||||
|
||||
Return type: |Number|
|
||||
Return type: |vim9-boolean|
|
||||
|
||||
|
||||
popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
|
||||
@@ -363,7 +366,7 @@ popup_filter_yesno({id}, {key}) *popup_filter_yesno()*
|
||||
keys are ignored.
|
||||
See the example here: |popup_dialog-example|
|
||||
|
||||
Return type: |Number|
|
||||
Return type: |vim9-boolean|
|
||||
|
||||
|
||||
popup_findecho() *popup_findecho()*
|
||||
@@ -471,7 +474,7 @@ popup_hide({id}) *popup_hide()*
|
||||
Can also be used as a |method|: >
|
||||
GetPopup()->popup_hide()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
popup_list() *popup_list()*
|
||||
@@ -542,7 +545,7 @@ popup_move({id}, {options}) *popup_move()*
|
||||
Can also be used as a |method|: >
|
||||
GetPopup()->popup_move(options)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
popup_notification({what}, {options}) *popup_notification()*
|
||||
@@ -624,7 +627,7 @@ popup_setoptions({id}, {options}) *popup_setoptions()*
|
||||
Can also be used as a |method|: >
|
||||
GetPopup()->popup_setoptions(options)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
popup_settext({id}, {text}) *popup_settext()*
|
||||
@@ -636,7 +639,7 @@ popup_settext({id}, {text}) *popup_settext()*
|
||||
Can also be used as a |method|: >
|
||||
GetPopup()->popup_settext('hello')
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
popup_show({id}) *popup_show()*
|
||||
@@ -712,6 +715,15 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
when "textprop" is present.
|
||||
textpropid Used to identify the text property when "textprop" is
|
||||
present. Use zero to reset.
|
||||
clipwindow Only used when "textprop" is set. When TRUE the popup
|
||||
is kept within the window containing the text
|
||||
property: if the text property scrolls past that
|
||||
window's top, bottom, left or right edge, the popup
|
||||
is clipped at that edge instead of being drawn
|
||||
outside it. Once the text property has scrolled out
|
||||
of the window the popup is hidden.
|
||||
Default FALSE.
|
||||
See |popup-clipwindow|.
|
||||
fixed When FALSE (the default), and:
|
||||
- "pos" is "botleft" or "topleft", and
|
||||
- the popup would be truncated at the right edge of
|
||||
@@ -751,6 +763,10 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
border one line of padding is added to put the title
|
||||
on. You might want to add one or more spaces at the
|
||||
start and end as padding.
|
||||
The title uses |hl-PopupTitle| by default; if
|
||||
"borderhighlight" is set the top border highlight is
|
||||
used instead, and if "highlight"/'wincolor' is set
|
||||
that is used.
|
||||
wrap TRUE to make the lines wrap (default TRUE).
|
||||
drag TRUE to allow the popup to be dragged with the mouse
|
||||
by grabbing at the border. Has no effect if the
|
||||
@@ -799,6 +815,8 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
the highlight for the top/right/bottom/left border.
|
||||
Example: ['TopColor', 'RightColor', 'BottomColor,
|
||||
'LeftColor']
|
||||
When not given and "highlight"/'wincolor' is also not
|
||||
set, |hl-PopupBorder| is used.
|
||||
borderchars List with characters, defining the character to use
|
||||
for the top/right/bottom/left border. Optionally
|
||||
followed by the character to use for the
|
||||
@@ -949,6 +967,31 @@ If the window for which the popup was defined is closed, the popup is closed.
|
||||
If the popup cannot fit in the desired position, it may show at a nearby
|
||||
position.
|
||||
|
||||
|
||||
CLIP TEXTPROP POPUP TO HOST WINDOW *popup-clipwindow*
|
||||
|
||||
When the popup is anchored to a text property in a split window, the popup is
|
||||
by default drawn relative to the whole screen and may extend past the edges of
|
||||
the window that contains the text property (the "host window"). Setting
|
||||
"clipwindow" to TRUE keeps the popup within window's content area:
|
||||
parts of the popup that fall outside the window are clipped, and the popup is
|
||||
hidden once the text property has scrolled entirely past one of the edges.
|
||||
|
||||
Example: a tall popup anchored above the cursor that should never spill into
|
||||
the window below the split: >
|
||||
call popup_create(body, #{
|
||||
\ textprop: 'marker',
|
||||
\ textpropid: id,
|
||||
\ pos: 'topleft',
|
||||
\ line: -1, col: 0,
|
||||
\ posinvert: v:false,
|
||||
\ clipwindow: v:true,
|
||||
\ })
|
||||
<
|
||||
With "posinvert" left at its default (TRUE) the popup may be flipped to the
|
||||
opposite side of the text property when there is no room; set it to FALSE to
|
||||
keep the requested side and rely on "clipwindow" to clip the overflow.
|
||||
|
||||
Some hints:
|
||||
- To avoid collision with other plugins the text property type name has to be
|
||||
unique. You can also use the "bufnr" item to make it local to a buffer.
|
||||
@@ -1067,8 +1110,9 @@ The opacity value ranges from 0 to 100:
|
||||
1-99 Partially transparent - the popup background is blended with
|
||||
the underlying text, making both partially visible.
|
||||
|
||||
The transparency effect requires using the GUI or having 'termguicolors'
|
||||
enabled in the terminal. Without it, the opacity setting has no effect.
|
||||
The transparency effect requires using the GUI, having 'termguicolors'
|
||||
enabled, or running in a 256-color terminal. On terminals with fewer
|
||||
than 256 colors the opacity setting has no effect.
|
||||
|
||||
When a popup is transparent:
|
||||
- The popup's background color is blended with the background text
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.2. Last change: 2026 Mar 04
|
||||
*quickref.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -823,6 +823,7 @@ Short explanation of each option: *option-list*
|
||||
'modeline' 'ml' recognize modelines at start or end of file
|
||||
'modelineexpr' 'mle' allow setting expression options from a modeline
|
||||
'modelines' 'mls' number of lines checked for modelines
|
||||
'modelinestrict' 'mlst' only allow safe options in modelines
|
||||
'modifiable' 'ma' changes to the text are not possible
|
||||
'modified' 'mod' buffer has been modified
|
||||
'more' pause listings when the whole screen is filled
|
||||
@@ -865,6 +866,7 @@ Short explanation of each option: *option-list*
|
||||
'printoptions' 'popt' controls the format of :hardcopy output
|
||||
'prompt' 'prompt' enable prompt in Ex mode
|
||||
'pumheight' 'ph' maximum height of the popup menu
|
||||
'pumopt' 'pumopt' additional options for the popup menu
|
||||
'pumwidth' 'pw' minimum width of the popup menu
|
||||
'pythondll' name of the Python 2 dynamic library
|
||||
'pythonhome' name of the Python 2 home directory
|
||||
@@ -893,6 +895,7 @@ Short explanation of each option: *option-list*
|
||||
'scrollfocus' 'scf' scroll wheel applies to window under pointer
|
||||
'scrolljump' 'sj' minimum number of lines to scroll
|
||||
'scrolloff' 'so' minimum nr. of lines above and below cursor
|
||||
'scrolloffpad' 'sop' vertically center cursor at end of file
|
||||
'scrollopt' 'sbo' how 'scrollbind' should behave
|
||||
'sections' 'sect' nroff macros that separate sections
|
||||
'secure' secure mode for reading .vimrc in current dir
|
||||
@@ -957,6 +960,7 @@ Short explanation of each option: *option-list*
|
||||
'taglength' 'tl' number of significant characters for a tag
|
||||
'tagrelative' 'tr' file names in tag file are relative
|
||||
'tags' 'tag' list of file names used by the tag command
|
||||
'tagsecure' 'tsc' do not open remote files using tag commands
|
||||
'tagstack' 'tgst' push tags onto the tag stack
|
||||
'tcldll' name of the Tcl dynamic library
|
||||
'term' name of the terminal
|
||||
|
||||
@@ -195,6 +195,10 @@ recovered file. Or use |:DiffOrig|.
|
||||
Once you are sure the recovery is ok delete the swap file. Otherwise, you
|
||||
will continue to get warning messages that the ".swp" file already exists.
|
||||
|
||||
Note: Recovering swap files is best-effort. Vim attempts to validate fields
|
||||
and skip corrupted sections, but the swap file format is intended for files
|
||||
you trust. A crafted swap file may trigger parser bugs; such reports are
|
||||
treated as robustness issues rather than security vulnerabilities.
|
||||
|
||||
|
||||
ENCRYPTION AND THE SWAP FILE *:recover-crypt*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 9.2. Last change: 2026 Mar 17
|
||||
*starting.txt* For Vim version 9.2. Last change: 2026 Apr 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1573,6 +1573,24 @@ Session. You could have several Session files, one for each project you are
|
||||
working on. Viminfo and Session files together can be used to effectively
|
||||
enter Vim and directly start working in your desired setup. |session-file|
|
||||
|
||||
*viminfo-security*
|
||||
A viminfo file written by Vim is plain text and contains Vim expressions for
|
||||
|List|, |Dictionary| and |Tuple| values. When "!" is in 'viminfo' at the time
|
||||
Vim processes the file as a viminfo file, those expressions are evaluated.
|
||||
|
||||
The default value of 'viminfo' does not include "!", so by default no
|
||||
expression evaluation happens.
|
||||
|
||||
Opening a viminfo file in a buffer (e.g. with |:edit|) is harmless; Vim only
|
||||
displays the file contents. The risk is letting Vim process an untrusted file
|
||||
through the viminfo machinery, which happens when:
|
||||
- |:rviminfo| is used on the file, or
|
||||
- 'viminfofile' is set to point at it, or
|
||||
- the file is placed at the path Vim already reads as viminfo
|
||||
|viminfo-file-name|
|
||||
|
||||
In any of those cases, do not have "!" in 'viminfo' if you do not trust it.
|
||||
|
||||
*viminfo-read*
|
||||
When Vim is started and the 'viminfo' option is non-empty, the contents of
|
||||
the viminfo file are read and the info can be used in the appropriate places.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*syntax.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -849,6 +849,20 @@ ADA
|
||||
See |ft-ada-syntax|
|
||||
|
||||
|
||||
ALGOL 68 *algol68* *ft-algol68-syntax*
|
||||
|
||||
This syntax file currently targets the Algol 68 Genie project using the
|
||||
default UPPER stropping regime. It should also be usuable in other
|
||||
environments using the UPPER stropping regime, though somewhat less complete.
|
||||
|
||||
Highlighting can be further configured with the following variables.
|
||||
|
||||
Variable Highlight ~
|
||||
*algol68_no_preludes* no prelude identifiers, procedures or
|
||||
bold word operators
|
||||
*algol68_symbolic_operators* all prelude symbolic operators
|
||||
|
||||
|
||||
ANT *ant.vim* *ft-ant-syntax*
|
||||
|
||||
The ant syntax file provides syntax highlighting for javascript and python
|
||||
@@ -2285,11 +2299,11 @@ 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 = [507]
|
||||
:let g:java_syntax_previews = [530]
|
||||
|
||||
The supported JEP numbers are to be drawn from this table:
|
||||
`430`: String Templates [JDK 21]
|
||||
`507`: Primitive types in Patterns, instanceof, and switch
|
||||
`530`: Primitive types in Patterns, instanceof, and switch
|
||||
|
||||
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
|
||||
@@ -5978,7 +5992,14 @@ EndOfBuffer Filler lines (~) after the last line in the buffer.
|
||||
*hl-ErrorMsg*
|
||||
ErrorMsg Error messages on the command line.
|
||||
*hl-VertSplit*
|
||||
VertSplit Column separating vertically split windows.
|
||||
VertSplit Column separating vertically split windows that is adjacent
|
||||
to the current window. Drawn with the "vert" item of
|
||||
'fillchars'.
|
||||
*hl-VertSplitNC*
|
||||
VertSplitNC Column separating vertically split windows where neither
|
||||
adjacent window is the current window. Drawn with the
|
||||
"vert" item of 'fillchars'.
|
||||
By default, highlighted like |hl-VertSplit|.
|
||||
*hl-Folded*
|
||||
Folded Line used for closed folds.
|
||||
*hl-FoldColumn*
|
||||
@@ -6056,6 +6077,18 @@ PmenuShadow Popup menu: Used for shadow.
|
||||
ComplMatchIns Matched text of the currently inserted completion.
|
||||
*hl-PreInsert*
|
||||
PreInsert Text inserted when "preinsert" is in 'completeopt'.
|
||||
*hl-Popup*
|
||||
Popup Popup window body, used when neither the popup's 'wincolor'
|
||||
nor explicit "highlight" argument is set. Linked to |hl-Pmenu|
|
||||
by default.
|
||||
*hl-PopupBorder*
|
||||
PopupBorder Popup window border characters, used when "borderhighlight" is
|
||||
not set and the popup's 'wincolor' is also not set.
|
||||
Linked to |hl-Pmenu| by default.
|
||||
*hl-PopupTitle*
|
||||
PopupTitle Popup window title, used when "borderhighlight" is not set and
|
||||
the popup's 'wincolor' is also not set. Linked to
|
||||
|hl-Pmenu| by default.
|
||||
*hl-PopupSelected*
|
||||
PopupSelected Popup window created with |popup_menu()|. Linked to
|
||||
|hl-PmenuSel| by default.
|
||||
@@ -6094,16 +6127,22 @@ SpellRare Word that is recognized by the spellchecker as one that is
|
||||
hardly ever used. |spell|
|
||||
This will be combined with the highlighting used otherwise.
|
||||
*hl-StatusLine*
|
||||
StatusLine Status line of current window.
|
||||
StatusLine Status line of current window. The highlight at the status
|
||||
line's edge (StatusLine, or any %#... / %N* in 'statusline')
|
||||
also extends into the adjacent vertical separator cell when
|
||||
the status lines are connected (no 'vert' character drawn).
|
||||
*hl-StatusLineNC*
|
||||
StatusLineNC status lines of not-current windows
|
||||
StatusLineNC status lines of not-current windows. Like |hl-StatusLine|,
|
||||
the edge highlight also extends into the adjacent vertical
|
||||
separator cell.
|
||||
Note: If this is equal to "StatusLine", Vim will use "^^^" in
|
||||
the status line of the current window.
|
||||
*hl-StatusLineTerm*
|
||||
StatusLineTerm Status line of current window, if it is a |terminal| window.
|
||||
*hl-StatusLineTermNC*
|
||||
StatusLineTermNC Status lines of not-current windows that is a
|
||||
|terminal| window.
|
||||
StatusLineTermNC
|
||||
Status lines of not-current windows that is a |terminal|
|
||||
window.
|
||||
*hl-TabLine*
|
||||
TabLine Tab pages line, not active tab page label.
|
||||
*hl-TabLineFill*
|
||||
@@ -6123,18 +6162,19 @@ Title Titles for output from ":set all", ":autocmd" etc.
|
||||
*hl-TitleBar*
|
||||
TitleBar Title bar for the active Gui's window.
|
||||
This feature is supported only in the MS-Windows GUI.
|
||||
See |gui-w32-title-bar| for details
|
||||
See |gui-w32-title-bar| for details.
|
||||
Only the `guibg` and `guifg` highlight arguments are effective.
|
||||
*hl-TitleBarNC*
|
||||
TitleBarNC Title bar for inactive Gui's window.
|
||||
This feature is supported only in the MS-Windows GUI.
|
||||
See |gui-w32-title-bar| for details
|
||||
See |gui-w32-title-bar| for details.
|
||||
Only the `guibg` and `guifg` highlight arguments are effective.
|
||||
*hl-Visual*
|
||||
Visual Visual mode selection.
|
||||
*hl-VisualNOS*
|
||||
VisualNOS Visual mode selection when vim is "Not Owning the Selection".
|
||||
Only X11 Gui's |gui-x11| and |xterm-clipboard| supports this.
|
||||
Only X11 Gui's |gui-x11|, |xterm-clipboard| and
|
||||
|wayland-selections| supports this.
|
||||
*hl-WarningMsg*
|
||||
WarningMsg Warning messages.
|
||||
*hl-WildMenu*
|
||||
@@ -6154,10 +6194,9 @@ Menu Current font, background and foreground colors of the menus.
|
||||
Also used for the toolbar.
|
||||
Applicable highlight arguments: font, guibg, guifg.
|
||||
|
||||
NOTE: For Motif the font argument actually
|
||||
specifies a fontset at all times, no matter if 'guifontset' is
|
||||
empty, and as such it is tied to the current |:language| when
|
||||
set.
|
||||
NOTE: For Motif the font argument actually specifies a fontset
|
||||
at all times, no matter if 'guifontset' is empty, and as such
|
||||
it is tied to the current |:language| when set.
|
||||
|
||||
*hl-Scrollbar*
|
||||
Scrollbar Current background and foreground of the main window's
|
||||
@@ -6168,10 +6207,9 @@ Scrollbar Current background and foreground of the main window's
|
||||
Tooltip Current font, background and foreground of the tooltips.
|
||||
Applicable highlight arguments: font, guibg, guifg.
|
||||
|
||||
NOTE: For Motif the font argument actually
|
||||
specifies a fontset at all times, no matter if 'guifontset' is
|
||||
empty, and as such it is tied to the current |:language| when
|
||||
set.
|
||||
NOTE: For Motif the font argument actually specifies a fontset
|
||||
at all times, no matter if 'guifontset' is empty, and as such
|
||||
it is tied to the current |:language| when set.
|
||||
|
||||
==============================================================================
|
||||
15. Linking groups *:hi-link* *:highlight-link* *E412* *E413*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*tabpage.txt* For Vim version 9.2. Last change: 2026 May 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -482,6 +482,42 @@ 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|
|
||||
|
||||
SCROLLING IN THE TABPANEL *tabpanel-scroll*
|
||||
|
||||
When the total height of the tab page list exceeds the visible screen height,
|
||||
mouse wheel events over the tabpanel area scroll the tab page list up or down.
|
||||
The scroll step follows the 'mousescroll' setting. Wheel events inside the
|
||||
tabpanel area are consumed by the tabpanel and do not trigger
|
||||
|<ScrollWheelUp>| or |<ScrollWheelDown>| mappings.
|
||||
|
||||
The current tab page is always brought into view: when the selected tab page
|
||||
changes (by |gt|, |gT|, |:tabnext| etc.), the panel scrolls so the current
|
||||
entry is visible.
|
||||
|
||||
To show a vertical scrollbar indicating the current scroll position, add
|
||||
"scrollbar" to 'tabpanelopt': >
|
||||
:set tabpanelopt+=scrollbar
|
||||
|
||||
A one-column scrollbar is always displayed at the right edge of the tabpanel,
|
||||
regardless of the "align:" setting in 'tabpanelopt'. Clicking on the
|
||||
scrollbar column moves the thumb to the click position, and the thumb can be
|
||||
dragged to scroll continuously.
|
||||
|
||||
The scrollbar uses the |hl-PmenuSbar| highlight group for the track and
|
||||
|hl-PmenuThumb| for the thumb.
|
||||
|
||||
The scroll offset is remembered across redraws.
|
||||
|
||||
MOUSE CLICKS IN THE TABPANEL *tabpanel-mouse*
|
||||
|
||||
A left click on a row in the tabpanel selects the tab page that the row
|
||||
belongs to. Unlike the tabline, a double click in the tabpanel does not open
|
||||
a new, empty tab page; it is treated the same as a single click.
|
||||
|
||||
For finer-grained control, the 'tabpanel' value may contain |stl-%[FuncName]|
|
||||
click regions. Clicks on those regions are dispatched to the callback
|
||||
function instead of falling through to tab page selection.
|
||||
|
||||
==============================================================================
|
||||
6. Setting 'guitablabel' *setting-guitablabel*
|
||||
|
||||
|
||||
@@ -531,6 +531,7 @@ $quote eval.txt /*$quote*
|
||||
'ml' options.txt /*'ml'*
|
||||
'mle' options.txt /*'mle'*
|
||||
'mls' options.txt /*'mls'*
|
||||
'mlst' options.txt /*'mlst'*
|
||||
'mm' options.txt /*'mm'*
|
||||
'mmd' options.txt /*'mmd'*
|
||||
'mmp' options.txt /*'mmp'*
|
||||
@@ -539,6 +540,7 @@ $quote eval.txt /*$quote*
|
||||
'modeline' options.txt /*'modeline'*
|
||||
'modelineexpr' options.txt /*'modelineexpr'*
|
||||
'modelines' options.txt /*'modelines'*
|
||||
'modelinestrict' options.txt /*'modelinestrict'*
|
||||
'modifiable' options.txt /*'modifiable'*
|
||||
'modified' options.txt /*'modified'*
|
||||
'mopt' options.txt /*'mopt'*
|
||||
@@ -706,9 +708,11 @@ $quote eval.txt /*$quote*
|
||||
'nomh' options.txt /*'nomh'*
|
||||
'noml' options.txt /*'noml'*
|
||||
'nomle' options.txt /*'nomle'*
|
||||
'nomlst' options.txt /*'nomlst'*
|
||||
'nomod' options.txt /*'nomod'*
|
||||
'nomodeline' options.txt /*'nomodeline'*
|
||||
'nomodelineexpr' options.txt /*'nomodelineexpr'*
|
||||
'nomodelinestrict' options.txt /*'nomodelinestrict'*
|
||||
'nomodifiable' options.txt /*'nomodifiable'*
|
||||
'nomodified' options.txt /*'nomodified'*
|
||||
'nomore' options.txt /*'nomore'*
|
||||
@@ -781,6 +785,7 @@ $quote eval.txt /*$quote*
|
||||
'nota' options.txt /*'nota'*
|
||||
'notagbsearch' options.txt /*'notagbsearch'*
|
||||
'notagrelative' options.txt /*'notagrelative'*
|
||||
'notagsecure' options.txt /*'notagsecure'*
|
||||
'notagstack' options.txt /*'notagstack'*
|
||||
'notbi' options.txt /*'notbi'*
|
||||
'notbidi' options.txt /*'notbidi'*
|
||||
@@ -799,6 +804,7 @@ $quote eval.txt /*$quote*
|
||||
'noto' options.txt /*'noto'*
|
||||
'notop' options.txt /*'notop'*
|
||||
'notr' options.txt /*'notr'*
|
||||
'notsc' options.txt /*'notsc'*
|
||||
'nottimeout' options.txt /*'nottimeout'*
|
||||
'nottybuiltin' options.txt /*'nottybuiltin'*
|
||||
'nottyfast' options.txt /*'nottyfast'*
|
||||
@@ -891,6 +897,7 @@ $quote eval.txt /*$quote*
|
||||
'pumborder' options.txt /*'pumborder'*
|
||||
'pumheight' options.txt /*'pumheight'*
|
||||
'pummaxwidth' options.txt /*'pummaxwidth'*
|
||||
'pumopt' options.txt /*'pumopt'*
|
||||
'pumwidth' options.txt /*'pumwidth'*
|
||||
'pvh' options.txt /*'pvh'*
|
||||
'pvp' options.txt /*'pvp'*
|
||||
@@ -948,6 +955,7 @@ $quote eval.txt /*$quote*
|
||||
'scrollfocus' options.txt /*'scrollfocus'*
|
||||
'scrolljump' options.txt /*'scrolljump'*
|
||||
'scrolloff' options.txt /*'scrolloff'*
|
||||
'scrolloffpad' options.txt /*'scrolloffpad'*
|
||||
'scrollopt' options.txt /*'scrollopt'*
|
||||
'scs' options.txt /*'scs'*
|
||||
'sect' options.txt /*'sect'*
|
||||
@@ -1006,6 +1014,7 @@ $quote eval.txt /*$quote*
|
||||
'so' options.txt /*'so'*
|
||||
'softtabstop' options.txt /*'softtabstop'*
|
||||
'sol' options.txt /*'sol'*
|
||||
'sop' options.txt /*'sop'*
|
||||
'sourceany' vi_diff.txt /*'sourceany'*
|
||||
'sp' options.txt /*'sp'*
|
||||
'spc' options.txt /*'spc'*
|
||||
@@ -1222,6 +1231,7 @@ $quote eval.txt /*$quote*
|
||||
'taglength' options.txt /*'taglength'*
|
||||
'tagrelative' options.txt /*'tagrelative'*
|
||||
'tags' options.txt /*'tags'*
|
||||
'tagsecure' options.txt /*'tagsecure'*
|
||||
'tagstack' options.txt /*'tagstack'*
|
||||
'tal' options.txt /*'tal'*
|
||||
'tb' options.txt /*'tb'*
|
||||
@@ -1272,6 +1282,7 @@ $quote eval.txt /*$quote*
|
||||
'tr' options.txt /*'tr'*
|
||||
'trz' options.txt /*'trz'*
|
||||
'ts' options.txt /*'ts'*
|
||||
'tsc' options.txt /*'tsc'*
|
||||
'tsl' options.txt /*'tsl'*
|
||||
'tsr' options.txt /*'tsr'*
|
||||
'tsrfu' options.txt /*'tsrfu'*
|
||||
@@ -1555,7 +1566,6 @@ $quote eval.txt /*$quote*
|
||||
+vtp various.txt /*+vtp*
|
||||
+wayland various.txt /*+wayland*
|
||||
+wayland_clipboard various.txt /*+wayland_clipboard*
|
||||
+wayland_focus_steal various.txt /*+wayland_focus_steal*
|
||||
+wildignore various.txt /*+wildignore*
|
||||
+wildmenu various.txt /*+wildmenu*
|
||||
+windows various.txt /*+windows*
|
||||
@@ -4771,6 +4781,9 @@ E1571 builtin.txt /*E1571*
|
||||
E1572 options.txt /*E1572*
|
||||
E1573 channel.txt /*E1573*
|
||||
E1574 channel.txt /*E1574*
|
||||
E1575 builtin.txt /*E1575*
|
||||
E1576 tagsrch.txt /*E1576*
|
||||
E1577 options.txt /*E1577*
|
||||
E158 sign.txt /*E158*
|
||||
E159 sign.txt /*E159*
|
||||
E16 cmdline.txt /*E16*
|
||||
@@ -5297,6 +5310,7 @@ E645 netbeans.txt /*E645*
|
||||
E646 netbeans.txt /*E646*
|
||||
E647 netbeans.txt /*E647*
|
||||
E648 netbeans.txt /*E648*
|
||||
E649 netbeans.txt /*E649*
|
||||
E65 pattern.txt /*E65*
|
||||
E650 netbeans.txt /*E650*
|
||||
E651 netbeans.txt /*E651*
|
||||
@@ -5959,6 +5973,8 @@ TextChanged autocmd.txt /*TextChanged*
|
||||
TextChangedI autocmd.txt /*TextChangedI*
|
||||
TextChangedP autocmd.txt /*TextChangedP*
|
||||
TextChangedT autocmd.txt /*TextChangedT*
|
||||
TextPutPost autocmd.txt /*TextPutPost*
|
||||
TextPutPre autocmd.txt /*TextPutPre*
|
||||
TextYankPost autocmd.txt /*TextYankPost*
|
||||
Transact-SQL ft_sql.txt /*Transact-SQL*
|
||||
Tuple eval.txt /*Tuple*
|
||||
@@ -6225,6 +6241,9 @@ added-win32-GUI version5.txt /*added-win32-GUI*
|
||||
aff-dic-format spell.txt /*aff-dic-format*
|
||||
after-directory options.txt /*after-directory*
|
||||
aleph options.txt /*aleph*
|
||||
algol68 syntax.txt /*algol68*
|
||||
algol68_no_preludes syntax.txt /*algol68_no_preludes*
|
||||
algol68_symbolic_operators syntax.txt /*algol68_symbolic_operators*
|
||||
alt intro.txt /*alt*
|
||||
alt-input debugger.txt /*alt-input*
|
||||
alternate-file editing.txt /*alternate-file*
|
||||
@@ -6341,6 +6360,7 @@ b:rust_cargo_check_benches ft_rust.txt /*b:rust_cargo_check_benches*
|
||||
b:rust_cargo_check_examples ft_rust.txt /*b:rust_cargo_check_examples*
|
||||
b:rust_cargo_check_tests ft_rust.txt /*b:rust_cargo_check_tests*
|
||||
b:rustfmt_autosave ft_rust.txt /*b:rustfmt_autosave*
|
||||
b:rustfmt_autosave_if_config_present ft_rust.txt /*b:rustfmt_autosave_if_config_present*
|
||||
b:tex_stylish syntax.txt /*b:tex_stylish*
|
||||
b:var eval.txt /*b:var*
|
||||
b:yaml_schema syntax.txt /*b:yaml_schema*
|
||||
@@ -7510,6 +7530,7 @@ ft-ada-options ft_ada.txt /*ft-ada-options*
|
||||
ft-ada-plugin ft_ada.txt /*ft-ada-plugin*
|
||||
ft-ada-syntax ft_ada.txt /*ft-ada-syntax*
|
||||
ft-ada-variables ft_ada.txt /*ft-ada-variables*
|
||||
ft-algol68-syntax syntax.txt /*ft-algol68-syntax*
|
||||
ft-ant-syntax syntax.txt /*ft-ant-syntax*
|
||||
ft-apache-syntax syntax.txt /*ft-apache-syntax*
|
||||
ft-arduino-plugin filetype.txt /*ft-arduino-plugin*
|
||||
@@ -7961,7 +7982,6 @@ g:netrw_ssh_browse_reject pi_netrw.txt /*g:netrw_ssh_browse_reject*
|
||||
g:netrw_ssh_cmd pi_netrw.txt /*g:netrw_ssh_cmd*
|
||||
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_noswf pi_netrw.txt /*g:netrw_use_noswf*
|
||||
g:netrw_use_nt_rcp pi_netrw.txt /*g:netrw_use_nt_rcp*
|
||||
@@ -8036,7 +8056,6 @@ g:vim_indent_cont indent.txt /*g:vim_indent_cont*
|
||||
g:vim_json_conceal syntax.txt /*g:vim_json_conceal*
|
||||
g:vim_json_warnings syntax.txt /*g:vim_json_warnings*
|
||||
g:vimball_home pi_vimball.txt /*g:vimball_home*
|
||||
g:vimball_mkdir pi_vimball.txt /*g:vimball_mkdir*
|
||||
g:vimsyn_comment_strings syntax.txt /*g:vimsyn_comment_strings*
|
||||
g:vimsyn_embed syntax.txt /*g:vimsyn_embed*
|
||||
g:vimsyn_folding syntax.txt /*g:vimsyn_folding*
|
||||
@@ -8449,8 +8468,11 @@ hl-PmenuSbar syntax.txt /*hl-PmenuSbar*
|
||||
hl-PmenuSel syntax.txt /*hl-PmenuSel*
|
||||
hl-PmenuShadow syntax.txt /*hl-PmenuShadow*
|
||||
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
|
||||
hl-Popup syntax.txt /*hl-Popup*
|
||||
hl-PopupBorder syntax.txt /*hl-PopupBorder*
|
||||
hl-PopupNotification syntax.txt /*hl-PopupNotification*
|
||||
hl-PopupSelected syntax.txt /*hl-PopupSelected*
|
||||
hl-PopupTitle syntax.txt /*hl-PopupTitle*
|
||||
hl-PreInsert syntax.txt /*hl-PreInsert*
|
||||
hl-Question syntax.txt /*hl-Question*
|
||||
hl-QuickFixLine syntax.txt /*hl-QuickFixLine*
|
||||
@@ -8484,6 +8506,7 @@ hl-User1 syntax.txt /*hl-User1*
|
||||
hl-User1..9 syntax.txt /*hl-User1..9*
|
||||
hl-User9 syntax.txt /*hl-User9*
|
||||
hl-VertSplit syntax.txt /*hl-VertSplit*
|
||||
hl-VertSplitNC syntax.txt /*hl-VertSplitNC*
|
||||
hl-Visual syntax.txt /*hl-Visual*
|
||||
hl-VisualNOS syntax.txt /*hl-VisualNOS*
|
||||
hl-WarningMsg syntax.txt /*hl-WarningMsg*
|
||||
@@ -9777,6 +9800,7 @@ popt-option print.txt /*popt-option*
|
||||
popup popup.txt /*popup*
|
||||
popup-buffer popup.txt /*popup-buffer*
|
||||
popup-callback popup.txt /*popup-callback*
|
||||
popup-clipwindow popup.txt /*popup-clipwindow*
|
||||
popup-close popup.txt /*popup-close*
|
||||
popup-examples popup.txt /*popup-examples*
|
||||
popup-filter popup.txt /*popup-filter*
|
||||
@@ -10318,6 +10342,7 @@ shm-q options.txt /*shm-q*
|
||||
shm-r options.txt /*shm-r*
|
||||
shm-s options.txt /*shm-s*
|
||||
shm-t options.txt /*shm-t*
|
||||
shm-u options.txt /*shm-u*
|
||||
shm-w options.txt /*shm-w*
|
||||
shm-x options.txt /*shm-x*
|
||||
short-name-changed version4.txt /*short-name-changed*
|
||||
@@ -10544,6 +10569,7 @@ status-line windows.txt /*status-line*
|
||||
statusmsg-variable eval.txt /*statusmsg-variable*
|
||||
stl-%! options.txt /*stl-%!*
|
||||
stl-%@ options.txt /*stl-%@*
|
||||
stl-%[FuncName] options.txt /*stl-%[FuncName]*
|
||||
stl-%{ options.txt /*stl-%{*
|
||||
str2blob() builtin.txt /*str2blob()*
|
||||
str2float() builtin.txt /*str2float()*
|
||||
@@ -10880,6 +10906,10 @@ tabpagebuflist() builtin.txt /*tabpagebuflist()*
|
||||
tabpagenr() builtin.txt /*tabpagenr()*
|
||||
tabpagewinnr() builtin.txt /*tabpagewinnr()*
|
||||
tabpanel tabpage.txt /*tabpanel*
|
||||
tabpanel-mouse tabpage.txt /*tabpanel-mouse*
|
||||
tabpanel-scroll tabpage.txt /*tabpanel-scroll*
|
||||
tabpanel_getinfo() builtin.txt /*tabpanel_getinfo()*
|
||||
tabpanel_scroll() builtin.txt /*tabpanel_scroll()*
|
||||
tag tagsrch.txt /*tag*
|
||||
tag-! tagsrch.txt /*tag-!*
|
||||
tag-binary-search tagsrch.txt /*tag-binary-search*
|
||||
@@ -11743,6 +11773,7 @@ viminfo-r options.txt /*viminfo-r*
|
||||
viminfo-read starting.txt /*viminfo-read*
|
||||
viminfo-read-write starting.txt /*viminfo-read-write*
|
||||
viminfo-s options.txt /*viminfo-s*
|
||||
viminfo-security starting.txt /*viminfo-security*
|
||||
viminfo-timestamp starting.txt /*viminfo-timestamp*
|
||||
viminfo-write starting.txt /*viminfo-write*
|
||||
vimrc starting.txt /*vimrc*
|
||||
@@ -11794,8 +11825,6 @@ 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*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*tagsrch.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -579,6 +579,10 @@ ctags).
|
||||
have an absolute or relative path. It may contain environment
|
||||
variables and wildcards (although the use of wildcards is
|
||||
doubtful). It cannot contain a <Tab>.
|
||||
*E1576*
|
||||
Using a remote file via network protocol (e.g. using
|
||||
http://remote/file.txt) is not allowed unless 'tagsecure'
|
||||
is unset.
|
||||
{tagaddress} The Ex command that positions the cursor on the tag. It can
|
||||
be any Ex command, although restrictions apply (see
|
||||
|tag-security|). Posix only allows line numbers and search
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.2. Last change: 2026 Mar 12
|
||||
*terminal.txt* For Vim version 9.2. Last change: 2026 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -596,7 +596,7 @@ term_dumpwrite({buf}, {filename} [, {options}]) *term_dumpwrite()*
|
||||
name: >
|
||||
GetFilename()->term_dumpwrite(bufnr)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
term_getaltscreen({buf}) *term_getaltscreen()*
|
||||
@@ -817,7 +817,7 @@ term_sendkeys({buf}, {keys}) *term_sendkeys()*
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_sendkeys(keys)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
term_setansicolors({buf}, {colors}) *term_setansicolors()*
|
||||
@@ -852,7 +852,7 @@ term_setansicolors({buf}, {colors}) *term_setansicolors()*
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_setansicolors(colors)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
{only available with GUI enabled and/or the |+termguicolors|
|
||||
feature}
|
||||
@@ -870,7 +870,7 @@ term_setapi({buf}, {expr}) *term_setapi()*
|
||||
When used as a method the base is used for {buf}: >
|
||||
GetBufnr()->term_setapi({expr})
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
term_setkill({buf}, {how}) *term_setkill()*
|
||||
@@ -888,7 +888,7 @@ term_setkill({buf}, {how}) *term_setkill()*
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_setkill(how)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
term_setrestore({buf}, {command}) *term_setrestore()*
|
||||
@@ -903,7 +903,7 @@ term_setrestore({buf}, {command}) *term_setrestore()*
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_setrestore(command)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
|
||||
@@ -919,7 +919,7 @@ term_setsize({buf}, {rows}, {cols}) *term_setsize()* *E955*
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_setsize(rows, cols)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
term_start({cmd} [, {options}]) *term_start()*
|
||||
@@ -944,10 +944,41 @@ term_start({cmd} [, {options}]) *term_start()*
|
||||
"in_io", "in_top", "in_bot", "in_name", "in_buf"
|
||||
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
|
||||
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
|
||||
However, at least one of stdin, stdout or stderr must be
|
||||
connected to the terminal. When I/O is connected to the
|
||||
terminal then the callback function for that part is not used.
|
||||
On Unix:
|
||||
stdin, stdout, and stderr are connected to a pty by default,
|
||||
since bidirectional communication with the terminal is
|
||||
required. Setting "out_cb" does not switch stdout from the
|
||||
pty to a pipe. Only setting "err_cb" switches stderr to a
|
||||
pipe.
|
||||
Note: Since a pty is line-buffered and a pipe is
|
||||
block-buffered, the order of output between stdout and stderr
|
||||
may not be preserved. Without "err_cb", stderr uses the same
|
||||
pty as stdout, so the output order is preserved but stdout and
|
||||
stderr cannot be distinguished.
|
||||
|
||||
On MS-Windows with |ConPTY|:
|
||||
stdin, stdout, and stderr are always connected through pipes
|
||||
to the pseudo console, regardless of callback settings.
|
||||
Since stdout and stderr share the same pipe, they cannot be
|
||||
separated by "err_cb".
|
||||
This is because the CreatePseudoConsole() API only accepts one
|
||||
input and one output handle, with no separate handle for
|
||||
stderr.
|
||||
|
||||
Note: term_start() always uses RAW mode for its callbacks.
|
||||
"out_cb" and "err_cb" receive the raw chunk of data as read
|
||||
from the OS. A single callback invocation may contain
|
||||
multiple lines separated by NL, and (for stdout via a pty)
|
||||
each line may have a trailing CR from the line discipline
|
||||
(ONLCR). If per-line handling is desired, the callback must
|
||||
split "msg" on NL and strip the trailing CR itself.
|
||||
Example: >
|
||||
func Handle(ch, msg)
|
||||
for line in split(a:msg, "\n")
|
||||
echom substitute(line, '\r$', '', '')
|
||||
endfor
|
||||
endfunc
|
||||
<
|
||||
There are extra options:
|
||||
"term_name" name to use for the buffer name, instead
|
||||
of the command name.
|
||||
@@ -1010,7 +1041,7 @@ term_wait({buf} [, {time}]) *term_wait()*
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_wait()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
==============================================================================
|
||||
3. Terminal communication *terminal-communication*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*testing.txt* For Vim version 9.2. Last change: 2026 Apr 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -46,14 +46,14 @@ test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
|
||||
Can also be used as a |method|: >
|
||||
GetAllocId()->test_alloc_fail()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
test_autochdir() *test_autochdir()*
|
||||
Set a flag to enable the effect of 'autochdir' before Vim
|
||||
startup has finished.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
test_feedinput({string}) *test_feedinput()*
|
||||
@@ -64,7 +64,7 @@ test_feedinput({string}) *test_feedinput()*
|
||||
Can also be used as a |method|: >
|
||||
GetText()->test_feedinput()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
test_garbagecollect_now() *test_garbagecollect_now()*
|
||||
@@ -75,13 +75,13 @@ test_garbagecollect_now() *test_garbagecollect_now()*
|
||||
This will not work when called from a :def function, because
|
||||
variables on the stack will be freed.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_garbagecollect_soon() *test_garbagecollect_soon()*
|
||||
Set the flag to call the garbagecollector as if in the main
|
||||
loop. Only to be used in tests.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_getvalue({name}) *test_getvalue()*
|
||||
Get the value of an internal variable. These values for
|
||||
@@ -237,7 +237,7 @@ test_ignore_error({expr}) *test_ignore_error()*
|
||||
Can also be used as a |method|: >
|
||||
GetErrorText()->test_ignore_error()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_mswin_event({event}, {args}) *test_mswin_event()*
|
||||
Generate a low-level MS-Windows {event} with arguments {args}
|
||||
@@ -381,7 +381,7 @@ test_option_not_set({name}) *test_option_not_set()*
|
||||
Can also be used as a |method|: >
|
||||
GetOptionName()->test_option_not_set()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_override({name}, {val}) *test_override()*
|
||||
Overrides certain parts of Vim's internal processing to be
|
||||
@@ -438,7 +438,7 @@ test_override({name}, {val}) *test_override()*
|
||||
< Can also be used as a |method|: >
|
||||
GetOverrideVal()-> test_override('starting')
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_refcount({expr}) *test_refcount()*
|
||||
Return the reference count of {expr}. When {expr} is of a
|
||||
@@ -457,7 +457,7 @@ test_setmouse({row}, {col}) *test_setmouse()*
|
||||
call test_setmouse(4, 20)
|
||||
call feedkeys("\<LeftMouse>", "xt")
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
test_settime({expr}) *test_settime()*
|
||||
@@ -472,13 +472,13 @@ test_settime({expr}) *test_settime()*
|
||||
Can also be used as a |method|: >
|
||||
GetTime()->test_settime()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_srand_seed([{seed}]) *test_srand_seed()*
|
||||
When {seed} is given this sets the seed value used by
|
||||
`srand()`. When omitted the test seed is removed.
|
||||
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
test_unknown() *test_unknown()*
|
||||
Return a value with unknown type. Only useful for testing.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*textprop.txt* For Vim version 9.2. Last change: 2026 Apr 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -270,6 +270,8 @@ prop_add_list({props}, [{item}, ...]) *prop_add_list()*
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
|
||||
<
|
||||
Return type: void
|
||||
|
||||
|
||||
prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
|
||||
@@ -283,7 +285,7 @@ prop_clear({lnum} [, {lnum-end} [, {props}]]) *prop_clear()*
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->prop_clear()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
prop_find({props} [, {direction}]) *prop_find()*
|
||||
@@ -444,7 +446,7 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
|
||||
Can also be used as a |method|: >
|
||||
GetPropName()->prop_type_add(props)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
prop_type_change({name}, {props}) *prop_type_change()*
|
||||
@@ -455,7 +457,7 @@ prop_type_change({name}, {props}) *prop_type_change()*
|
||||
Can also be used as a |method|: >
|
||||
GetPropName()->prop_type_change(props)
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
prop_type_delete({name} [, {props}]) *prop_type_delete()*
|
||||
@@ -472,7 +474,7 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
|
||||
Can also be used as a |method|: >
|
||||
GetPropName()->prop_type_delete()
|
||||
<
|
||||
Return type: |Number|
|
||||
Return type: void
|
||||
|
||||
|
||||
prop_type_get({name} [, {props}]) *prop_type_get()*
|
||||
@@ -509,7 +511,9 @@ will move accordingly.
|
||||
|
||||
When text is deleted and a text property no longer includes any text, it is
|
||||
deleted. However, a text property that was defined as zero-width will remain,
|
||||
unless the whole line is deleted.
|
||||
unless the whole line is deleted. When lines are joined by a multi-line
|
||||
substitute command, virtual text properties on the deleted lines are moved to
|
||||
the resulting joined line.
|
||||
*E275*
|
||||
When a buffer is unloaded, all the text properties are gone. There is no way
|
||||
to store the properties in a file. You can only re-create them. When a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*todo.txt* For Vim version 9.2. Last change: 2026 Apr 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -421,8 +421,6 @@ more information.
|
||||
|
||||
Add an option to restrict 'incsearch' to not scroll the view. (Tavis Ormandy)
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
When 'term' starts with "foot" then default t_TI and t_TE to the values used
|
||||
for the builtin xterm termcap.
|
||||
|
||||
@@ -2115,7 +2113,6 @@ es_ES.utf-8" gives an error and doesn't switch messages. (Dominique Pelle,
|
||||
|
||||
When $HOME contains special characters, such as a comma, escape them when used
|
||||
in an option. (Michael Hordijk, 2009 May 5)
|
||||
Turn "esc" argument of expand_env_esc() into string of chars to be escaped.
|
||||
|
||||
Should make 'ignorecase' global-local, so that it makes sense setting it from
|
||||
a modeline.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_05.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*usr_05.txt* For Vim version 9.2. Last change: 2026 May 11
|
||||
|
||||
|
||||
VIM USER MANUAL by Bram Moolenaar
|
||||
@@ -509,6 +509,16 @@ To highlight in visual mode, use: >
|
||||
To disable the effect of the plugin after it has been loaded: >
|
||||
au! hlyank
|
||||
|
||||
Additionally, the plugin can also highlight regions that are put using the
|
||||
|TextPutPost| autocommand. This is by default disabled and can be enabled
|
||||
using: >
|
||||
:let g:hlput_enable = v:true
|
||||
<
|
||||
The following configuration variables can be used are "g:hlput_hlgroup" and
|
||||
"g:hlput_duration", which have the same effect as their yank counterparts: >
|
||||
:let g:hlput_hlgroup = 'IncSearch'
|
||||
:let g:hlput_duration = 300
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Adding the osc52 package *osc52-install* *package-osc52*
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_30.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*usr_30.txt* For Vim version 9.2. Last change: 2026 May 15
|
||||
|
||||
|
||||
VIM USER MANUAL by Bram Moolenaar
|
||||
@@ -531,9 +531,9 @@ 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
|
||||
positive value, 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
|
||||
achieve this effect. Likewise pressing <BS> will have the cursor try to
|
||||
reach the nearest soft tab stop. The following example uses
|
||||
`:set softtabstop=4`
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.2. Last change: 2026 Feb 16
|
||||
*usr_41.txt* For Vim version 9.2. Last change: 2026 Apr 28
|
||||
|
||||
|
||||
VIM USER MANUAL by Bram Moolenaar
|
||||
@@ -1081,6 +1081,8 @@ Buffers, windows and the argument list:
|
||||
tabpagebuflist() return List of buffers in a tab page
|
||||
tabpagenr() get the number of a tab page
|
||||
tabpagewinnr() like winnr() for a specified tab page
|
||||
tabpanel_getinfo() get current state of the tabpanel
|
||||
tabpanel_scroll() scroll the tabpanel
|
||||
winnr() get the window number for the current window
|
||||
bufwinid() get the window ID of a specific buffer
|
||||
bufwinnr() get the window number of a specific buffer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*various.txt* For Vim version 9.2. Last change: 2026 Apr 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -60,10 +60,9 @@ ga Print the ascii value of the character under the
|
||||
but printable according to the 'isprint' option, the
|
||||
non-printable version is also given.
|
||||
|
||||
When the character is larger than 127, the <M-x> form
|
||||
is also printed. For example:
|
||||
<~A> <M-^A> 129, Hex 81, Octal 201 ~
|
||||
<p> <|~> <M-~> 254, Hex fe, Octal 376 ~
|
||||
When the character is larger than 127:
|
||||
<<81>> 129, Hex 0081, Octal 201 ~
|
||||
<p> 254, Hex 00fe, Octal 376 ~
|
||||
(where <p> is a special character)
|
||||
|
||||
The <Nul> character in a file is stored internally as
|
||||
@@ -185,6 +184,9 @@ g8 Print the hex values of the bytes used in the
|
||||
If the mark is "=", a line of dashes is printed
|
||||
around the current line.
|
||||
|
||||
If the 'number' option is set, absolute line numbers
|
||||
will be included in the output.
|
||||
|
||||
*:z!*
|
||||
:[range]z![+-^.=][count]
|
||||
Like ":z", but when [count] is not specified, it
|
||||
@@ -529,9 +531,6 @@ 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.
|
||||
N *+wayland_focus_steal*
|
||||
Unix only: support for Wayland clipboard on
|
||||
compositors without a data control protocol
|
||||
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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.2. Last change: 2026 Mar 18
|
||||
*version9.txt* For Vim version 9.2. Last change: 2026 May 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41880,6 +41880,9 @@ Highlighting: ~
|
||||
|hl-PmenuMatchSel| Popup menu: highlighting of matched text in selected
|
||||
line
|
||||
|hl-PmenuShadow| Popup menu: highlighting of the popup shadow
|
||||
|hl-Popup| Popup window: body, default link |hl-Pmenu|
|
||||
|hl-PopupBorder| Popup window: border characters, default link |hl-Pmenu|
|
||||
|hl-PopupTitle| Popup window: title, default link |hl-Pmenu|
|
||||
|hl-PreInsert| highlighting for completion preinserted text
|
||||
|hl-TabPanel| |tabpanel|: not active tab page label
|
||||
|hl-TabPanelFill| |tabpanel|: filler space
|
||||
@@ -41954,7 +41957,7 @@ Vim Arguments: ~
|
||||
|
||||
Configure Switches: ~
|
||||
--with-wayland Enable the |wayland| feature.
|
||||
--enable-wayland-focus-steal Enable the |wayland-focus-steal| feature.
|
||||
--enable-wayland-focus-steal Enable the wayland-focus-steal feature.
|
||||
--enable-socketserver Enable the |socketserver-clientserver|
|
||||
feature.
|
||||
|
||||
@@ -52587,6 +52590,8 @@ Popups ~
|
||||
- Support for transparency, see |popup-opacity|.
|
||||
- 'previewpopup' supports the same values as 'completepopup' (except for
|
||||
"align").
|
||||
- Support "opacity" setting for 'completepopup' option.
|
||||
- Support for clipping textproperty popups |popup-clipwindow|.
|
||||
|
||||
Diff mode ~
|
||||
---------
|
||||
@@ -52595,7 +52600,7 @@ between them is small (5 bytes or less) and contains only non-word characters.
|
||||
This prevents fragmented highlighting when only whitespace or punctuation
|
||||
separates changes.
|
||||
|
||||
Restricted mode~
|
||||
Restricted mode ~
|
||||
---------------
|
||||
Using external diff mode or setting environment variables is no longer allowed
|
||||
when Vim is running in |restricted-mode|.
|
||||
@@ -52609,11 +52614,53 @@ Other ~
|
||||
- Support for "dap" channel mode for the |debug-adapter-protocol|.
|
||||
- |status-line| can use several lines, see 'statuslineopt'.
|
||||
- New "leadtab" value for the 'listchars' setting.
|
||||
- Improved |:set+=|, |:set^=| and |:set-=| handling of comma-separated "key:value"
|
||||
pairs individually (e.g. 'listchars', 'fillchars', 'diffopt').
|
||||
- |system()| and |systemlist()| functions accept a list as first argument,
|
||||
bypassing the shell completely.
|
||||
- Allow mouse clickable regions in the 'statusline', 'tabline' and the
|
||||
'tabpanel' using the |stl-%[FuncName]| atom.
|
||||
- Enable reflow support in the |:terminal|.
|
||||
- Enabled scrolling for the tabpanel when the tab page list exceeds the screen
|
||||
height. Also added the "scrollbar" sub-option to 'tabpanelopt'.
|
||||
- Added the "noinsert" value to the 'wildmode' option for symmetry with the
|
||||
'completeopt' option
|
||||
- Channel can handle |Blob| messages |channel-open-options|.
|
||||
- Added the "u" flag to 'shortmess' to silence undo/redo messages: |shm-u|
|
||||
- |:command-completion-customlist| can return a list of dictionaries with
|
||||
kind/menu/info/abbr for the popup menu.
|
||||
- |C-indenting| detects comments better.
|
||||
- The |package-hlyank| can now optionally highlight the last put region as
|
||||
well.
|
||||
- New argument handling for user commands |:command-nargs| using the "-nars=_"
|
||||
attribute to handle completion of single arguments with spaces as expected.
|
||||
|
||||
Platform specific ~
|
||||
-----------------
|
||||
- support OpenType font features in 'guifont' for DirectWrite (Win32)
|
||||
- Include strptime() fallback for MS-Windows
|
||||
|
||||
xxd ~
|
||||
---
|
||||
Add "-t" option to append a terminating NUL byte to C include output (-i).
|
||||
|
||||
*changed-9.3*
|
||||
Changed~
|
||||
Changed ~
|
||||
-------
|
||||
- Support for NeXTStep was dropped with patch v9.2.0122
|
||||
- |json_decode()| is stricter: keywords must be lowercase, lone surrogates are
|
||||
now invalid
|
||||
- |js_decode()| rejects lone surrogates
|
||||
- virtual text properties on lines deleted by a multi-line substitute
|
||||
are moved to the resulting joined line instead of being dropped.
|
||||
- Only a few whitelisted options are allowed to be set by a modeline to
|
||||
improve overall security, see for details: 'modelinestrict'
|
||||
- Removed the Wayland focus steal feature 'wlsteal', since it causes too many
|
||||
issues and can now be re-implemted using the |clipboard-providers| feature
|
||||
if needed, see |wayland-primary-selection| for an example.
|
||||
- On Unix, filename completion for single-file Ex commands now treats embedded
|
||||
whitespace as part of the filename, like on other platforms.
|
||||
|
||||
|
||||
*added-9.3*
|
||||
Added ~
|
||||
@@ -52623,21 +52670,36 @@ Various syntax, indent and other plugins were added.
|
||||
Functions: ~
|
||||
|
||||
|ch_listen()| listen on {address}
|
||||
|tabpanel_getinfo()| get current state of the |tabpanel|
|
||||
|tabpanel_scroll()| scroll the |tabpanel|
|
||||
|
||||
Autocommands: ~
|
||||
|
||||
|SessionLoadPre| before loading a |Session| file
|
||||
|TextPutPost| after putting text
|
||||
|TextPutPre| before putting text
|
||||
|
||||
Options: ~
|
||||
|
||||
'modelinestrict' Only allow safe options to be set from a modeline.
|
||||
'pumopt' Additional options for the popup menu.
|
||||
'scrolloffpad' Vertically center cursor at end of file.
|
||||
'statuslineopt' Extra window-local options for the 'statusline', to
|
||||
configure the height.
|
||||
't_BS' Begin synchronized update.
|
||||
't_ES' End synchronized update.
|
||||
'tagsecure' Do not open remote files using tag commands
|
||||
'termresize' Method for handling terminal resize events.
|
||||
'termsync' Enable support for terminal DEC 2026 sync mode.
|
||||
'winhighlight' Window-local highlight group mappings.
|
||||
|
||||
Highlighting: ~
|
||||
|
||||
|hl-VertSplitNC| Column separator of non-current window.
|
||||
|hl-Popup| Popup window body.
|
||||
|hl-PopupBorder| Popup window border.
|
||||
|hl-PopupTitle| Popup window title.
|
||||
|
||||
==============================================================================
|
||||
PATCHES *patches-9.3* *bug-fixes-9.3*
|
||||
*patches-after-9.2*
|
||||
|
||||
@@ -36,8 +36,9 @@ Pu
|
||||
Particolarmente utile per editare programmi.
|
||||
.PP
|
||||
Ci sono parecchi miglioramenti rispetto a Vi: undo multipli, finestre e buffer
|
||||
multipli, evidenziazione sintattica, possibilità di modificare la riga di comando,
|
||||
completamento nomi file, help in linea, selezione testi in Modo Visual, etc..
|
||||
multipli, evidenziazione sintattica, possibilità di modificare la riga di
|
||||
comando, completamento nomi file, help online, selezione testi in Modo
|
||||
Visual, etc.
|
||||
Vedere ":help vi_diff.txt" per un sommario delle differenze fra
|
||||
.B Vim
|
||||
e Vi.
|
||||
@@ -67,9 +68,10 @@ essere usata per scegliere uno o pi
|
||||
nome_file ..
|
||||
Una lista di nomi di file.
|
||||
Il primo di questi sarà il file corrente, e verrà letto nel buffer.
|
||||
Il cursore sarà posizionato sulla prima linea del buffer.
|
||||
Il cursore sarà posizionato sulla prima riga del buffer.
|
||||
Si può arrivare agli altri file col comando ":next".
|
||||
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla lista_file.
|
||||
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla
|
||||
lista_file.
|
||||
.TP
|
||||
\-
|
||||
Il file da editare è letto dallo stdin.
|
||||
@@ -77,7 +79,7 @@ I comandi sono letti da stderr, che dovrebbe essere un terminale [tty].
|
||||
.TP
|
||||
\-t {tag}
|
||||
Il file da editare e la posizione iniziale del cursore dipendono da "tag",
|
||||
una specie di "etichetta" a cui saltare.
|
||||
una "etichetta" a cui saltare.
|
||||
{tag} viene cercata nel file "tags", e il file a essa associato diventa
|
||||
quello corrente, e il comando a essa associato viene eseguito.
|
||||
Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
|
||||
@@ -87,7 +89,7 @@ e il cursore
|
||||
Vedere ":help tag\-commands".
|
||||
.TP
|
||||
\-q [file_errori]
|
||||
Inizia in Modo QuickFix [correzione veloce].
|
||||
Iniziare in Modo QuickFix [correzione veloce].
|
||||
Il file [file_errori] è letto e il primo errore è visualizzato.
|
||||
Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
|
||||
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
|
||||
@@ -97,28 +99,28 @@ Vedere ":help quickfix".
|
||||
.PP
|
||||
.B Vim
|
||||
si comporta in modo diverso se invocato con nomi differenti (il programma
|
||||
eseguibile "soggiacente" può essere sempre lo stesso).
|
||||
eseguibile "sottostante" può essere sempre lo stesso).
|
||||
.TP 10
|
||||
vim
|
||||
Modo Normal, comportamento predefinito.
|
||||
Iniziare in Modo Normal, comportamento predefinito.
|
||||
.TP
|
||||
ex
|
||||
Inizia in Modo "Ex".
|
||||
Iniziare in Modo "Ex".
|
||||
Si può passare in Modo Normal col comando ":vi".
|
||||
Si può invocare il Modo "Ex" anche con l'argomento "\-e".
|
||||
.TP
|
||||
view
|
||||
Inizia in Modo Read-only (Sola Lettura). Non si possono modificare i file.
|
||||
Iniziare in Modo Read-only (sola-lettura). Non si possono modificare i file.
|
||||
Si può invocare il Modo Read-only anche con l'argomento "\-R".
|
||||
.TP
|
||||
gvim gview
|
||||
La versione GUI [Graphical User Interface].
|
||||
Apre una nuova finestra.
|
||||
Usare la versione GUI [Graphical User Interface].
|
||||
Viene aperta una nuova finestra.
|
||||
Si può invocare il Modo GUI anche con l'argomento "\-g".
|
||||
.TP
|
||||
evim eview
|
||||
La versione GUI in Modo Easy (semplificata).
|
||||
Apre una nuova finestra.
|
||||
Usare la versione GUI in Modo Easy (semplificato).
|
||||
Viene aperta una nuova finestra.
|
||||
Si può invocare il Modo Easy anche con l'argomento "\-y".
|
||||
.TP
|
||||
rvim rview rgvim rgview
|
||||
@@ -128,21 +130,21 @@ della shell o sospendere
|
||||
Si può chiedere la stessa cosa anche con l'argomento "\-Z".
|
||||
.SH OPZIONI
|
||||
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di file.
|
||||
Opzioni che non hanno un argomento si possono specificare dietro a un solo "\-".
|
||||
Opzioni che non hanno un argomento si possono specificare insieme dietro a un
|
||||
solo "\-".
|
||||
.TP 12
|
||||
+[numero]
|
||||
Nel primo file il cursore sarà posizionato sulla linea "numero".
|
||||
Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
|
||||
Nel primo file, posizionare il cursore sulla riga numero "numero".
|
||||
Se "numero" manca, il cursore sarà posizionato sull'ultima riga del file.
|
||||
.TP
|
||||
+/{espressione}
|
||||
Nel primo file il cursore sarà posizionato alla
|
||||
prima occorrenza di {espressione}.
|
||||
Nel primo file posizionare il cursore alla prima occorrenza di {espressione}.
|
||||
Vedere ":help search\-pattern" per come specificare l'espressione.
|
||||
.TP
|
||||
+{comando}
|
||||
.TP
|
||||
\-c {comando}
|
||||
{comando} sarà eseguito dopo che il primo file è stato letto.
|
||||
Eseguire {comando} dopo che il primo file è stato letto.
|
||||
{comando} è interpretato come un comando Ex.
|
||||
Se il {comando} contiene spazi deve essere incluso fra doppi apici
|
||||
(o altro delimitatore, a seconda della shell che si sta usando).
|
||||
@@ -154,7 +156,7 @@ Note: Si possono avere fino a 10 comandi "+" o "\-c".
|
||||
Se
|
||||
.B Vim
|
||||
è stato compilato con supporto ARABIC per editare file con orientamento
|
||||
destra-sinistra e tastiera con mappatura araba, quest'opzione inizia
|
||||
destra-sinistra e tastiera con mappatura araba, quest'opzione fa iniziare
|
||||
.B Vim
|
||||
in Modo Arabic, cioè impostando 'arabic'.
|
||||
Altrimenti viene dato un messaggio di errore e
|
||||
@@ -162,32 +164,32 @@ Altrimenti viene dato un messaggio di errore e
|
||||
termina in modo anormale.
|
||||
.TP
|
||||
\-b
|
||||
Modo Binary (binario).
|
||||
Vengono impostate alcune opzioni che permettono di modificare un file
|
||||
binario o un file che contiene un programma eseguibile.
|
||||
Eseguire Vim in Modo Binary (binario).
|
||||
Vengono impostate alcune opzioni che permettono di modificare un file binario
|
||||
o un file che contiene un programma eseguibile.
|
||||
.TP
|
||||
\-C
|
||||
Compatibile. Imposta l'opzione 'compatible'.
|
||||
Compatibile. Impostare l'opzione 'compatible'.
|
||||
In questo modo
|
||||
.B Vim
|
||||
ha quasi lo stesso comportamento di Vi, anche in presenza di un file .vimrc.
|
||||
.TP
|
||||
\-d
|
||||
Inizia in Modo Diff [differenze].
|
||||
Dovrebbero esserci come argomenti da due o otto nomi di file.
|
||||
Iniziare in Modo Diff [differenze].
|
||||
Dovrebbero esserci come argomenti da due fino a otto nomi di file.
|
||||
.B Vim
|
||||
aprirà tutti i file evidenziando le differenze fra gli stessi.
|
||||
Funziona come vimdiff(1).
|
||||
.TP
|
||||
\-d {dispositivo}, \-dev {dispositivo}
|
||||
Apre {dispositivo} per usarlo come terminale.
|
||||
Aprire {dispositivo} per usarlo come terminale.
|
||||
Solo per l'Amiga.
|
||||
Esempio:
|
||||
"\-d con:20/30/600/150".
|
||||
.TP
|
||||
\-D
|
||||
Debugging. Vim si mette in Modo "debugging" a partire
|
||||
dall'esecuzione del primo comando da uno script.
|
||||
Debugging. Entrare in Modo "debugging" a partire dall'esecuzione del primo
|
||||
comando di uno script.
|
||||
.TP
|
||||
\-e
|
||||
Eseguire
|
||||
@@ -202,15 +204,15 @@ in Modo Ex migliorato, come se il programma eseguito sia "exim".
|
||||
\-f
|
||||
Direttamente [Foreground]. Per la versione GUI,
|
||||
.B Vim
|
||||
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
|
||||
Per l'Amiga,
|
||||
non creare [fork] una nuova finestra, indipendente dalla shell di invocazione.
|
||||
Per l'Amiga, non fa ripartire
|
||||
.B Vim
|
||||
non è fatto ripartire per aprire una nuova finestra.
|
||||
per aprire una nuova finestra.
|
||||
Opzione da usare quando
|
||||
.B Vim
|
||||
è eseguito da un programma che attende la fine della
|
||||
sessione di edit (p.es., mail).
|
||||
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
|
||||
è eseguito da un programma che attende la fine della sessione di edit (p.es.,
|
||||
mail).
|
||||
In ambiente Amiga, i comandi ":sh" e ":!" non sono disponibili.
|
||||
.TP
|
||||
\-F
|
||||
Se
|
||||
@@ -229,7 +231,8 @@ Nota: Il supporto Farsi
|
||||
Se
|
||||
.B Vim
|
||||
è stato compilato con supporto GUI, quest'opzione chiede di usarla.
|
||||
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
|
||||
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di
|
||||
errore e
|
||||
.B Vim
|
||||
termina in modo anormale.
|
||||
.TP
|
||||
@@ -246,145 +249,148 @@ termina in modo anormale.
|
||||
.TP
|
||||
\-i {viminfo}
|
||||
Se è abilitato l'uso di un file viminfo, quest'opzione indica il nome
|
||||
del file da usare invece di quello predefinito "~/.viminfo".
|
||||
del file da usare invece del file predefinito "~/.viminfo".
|
||||
Si può anche evitare l'uso di un file .viminfo, dando come nome
|
||||
"NONE".
|
||||
.TP
|
||||
\-l
|
||||
Modo Lisp.
|
||||
Imposta le opzioni 'lisp' e 'showmatch'.
|
||||
Eseguire Vim in Modo Lisp.
|
||||
Vengono impostate le opzioni 'lisp' e 'showmatch'.
|
||||
.TP
|
||||
\-L
|
||||
Equivalente a \-r.
|
||||
.TP
|
||||
\-m
|
||||
Inibisce modifica file.
|
||||
Inibisce l'opzione 'write'.
|
||||
Inibire modifica file.
|
||||
Viene inibita l'opzione 'write'.
|
||||
È ancora possibile modificare un buffer, ma non riscriverlo.
|
||||
.TP
|
||||
\-M
|
||||
Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
|
||||
in modo da impedire sia modifiche che riscritture. Da notare che queste
|
||||
opzioni possono essere abilitate in seguito, permettendo così modifiche.
|
||||
in modo da impedire sia modifiche che riscritture. Si noti che queste opzioni
|
||||
possono essere cambiate in seguito, per consentire modifiche.
|
||||
.TP
|
||||
\-n
|
||||
Inibisce l'uso di un file di swap.
|
||||
Il recupero dopo una caduta di macchina sarà impossibile.
|
||||
Inibire l'uso di un file di swap.
|
||||
Ripristinare il file in caso di fine anormale sarà impossibile.
|
||||
Utile per editare un file su un supporto molto lento (p.es., floppy).
|
||||
Il comando ":set uc=0" ha lo stesso effetto.
|
||||
Per abilitare il recupero usare ":set uc=200".
|
||||
Per abilitare il ripristino usare ":set uc=200".
|
||||
.TP
|
||||
\-N
|
||||
Modo "Non-compatibile". Annulla l'opzione 'compatible'.
|
||||
Eseguire Vim in Modo "Non-compatibile". Annulla l'opzione 'compatible'.
|
||||
Così
|
||||
.B Vim
|
||||
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
|
||||
file .vimrc.
|
||||
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di
|
||||
un file .vimrc.
|
||||
.TP
|
||||
\-nb
|
||||
Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
|
||||
Fare di Vim un Editor server per NetBeans. Vedere la documentazione per
|
||||
dettagli.
|
||||
.TP
|
||||
\-o[N]
|
||||
Apre N finestre in orizzontale.
|
||||
Se N manca, apre una finestra per ciascun file.
|
||||
Aprire N finestre in orizzontale.
|
||||
Se N manca, aprire una finestra per ciascun file.
|
||||
.TP
|
||||
\-O[N]
|
||||
Apre N finestre, in verticale.
|
||||
Se N manca, apre una finestra per ciascun file.
|
||||
Aprire N finestre, in verticale.
|
||||
Se N manca, aprire una finestra per ciascun file.
|
||||
.TP
|
||||
\-p[N]
|
||||
Apre N pagine di linguette.
|
||||
Quando N è omesso, apre una pagine di linguette per ciascun file.
|
||||
Aprire N pagine di schede.
|
||||
Quando N è omesso, aprire una pagine di schede per ciascun file.
|
||||
.TP
|
||||
\-P {titolo-padre}
|
||||
Solo per GUI Win32: Specifica il titolo dell'applicazione-padre. Se possibile,
|
||||
Vim viene eseguito in una finestra MDI (Multiple-Document Interface).
|
||||
{titolo-padre} deve apparire nel titolo della applicazione-padre. Accertatevi
|
||||
Solo per GUI Win32: Specificare il titolo dell'applicazione-padre. Se
|
||||
possibile, Vim viene eseguito in una finestra MDI
|
||||
(Multiple-Document Interface).
|
||||
{titolo-padre} deve apparire nel titolo dell'applicazione-padre. Accertarsi
|
||||
che sia sufficientemente esplicativo. Notare che l'implementazione è ancora
|
||||
rudimentale. Non funziona per tutte le applicazioni, e il menù non funziona.
|
||||
.TP
|
||||
\-r
|
||||
Lista file di swap, e informazioni su come usarli per ripristinare file.
|
||||
Listare file di swap, con informazioni su come usarli per ripristinare file.
|
||||
.TP
|
||||
\-r {file}
|
||||
Modo Recovery (ripristino).
|
||||
Eseguire Vim in Modo Recovery (ripristino).
|
||||
Il file di swap è usato per recuperare una sessione di edit finita male.
|
||||
Il file di swap è un file con lo stesso nome file del file di testo
|
||||
editato, col suffisso ".swp".
|
||||
Il file di swap è un file con lo stesso nome file del file di testo editato,
|
||||
col prefisso "." e col suffisso ".swp".
|
||||
Vedere ":help recovery".
|
||||
.TP
|
||||
\-R
|
||||
Modo Read-only (Sola Lettura).
|
||||
Imposta l'opzione 'readonly'.
|
||||
Si può ancora modificare il buffer, ma il file è protetto da una riscrittura
|
||||
involontaria.
|
||||
Se si vuole davvero riscrivere il file, occorre aggiungere un punto esclamativo
|
||||
al comando Ex, come in ":w!".
|
||||
Eseguire Vim in Modo Read-only (Sola Lettura).
|
||||
Viene impostata l'opzione 'readonly'.
|
||||
È ancora possibile modificare il buffer, ma il file è protetto da una
|
||||
riscrittura involontaria.
|
||||
Se si vuole davvero riscrivere il file, occorre aggiungere un punto
|
||||
esclamativo al comando Ex, come in ":w!".
|
||||
L'opzione \-R implica anche l'opzione \-n (vedere sopra).
|
||||
L'opzione 'readonly' può essere annullata con ":set noro".
|
||||
Vedere ":help 'readonly'".
|
||||
.TP
|
||||
\-s
|
||||
Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione
|
||||
"\-e" è stata data prima dell'opzione "\-s".
|
||||
Eseguire Vim in Modo silenzioso. Solo quando invocato come "Ex" o quando
|
||||
l'opzione "\-e" è stata specificata prima dell'opzione "\-s".
|
||||
.TP
|
||||
\-s {script_in_input}
|
||||
Lo script file {script_in_input} è letto.
|
||||
Eseguire lo script file {script_in_input}.
|
||||
I caratteri nel file sono interpretati come se immessi da terminale.
|
||||
Lo stesso risultato si può ottenere col comando ":source! {script_in_input}".
|
||||
Se la fine del file di input viene raggiunta prima che Vim termini,
|
||||
l'ulteriore input verrà preso dalla tastiera.
|
||||
.TP
|
||||
\-S {file}
|
||||
I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
|
||||
Eseguire i comandi contenuti in {file} dopo la lettura del primo file.
|
||||
Equivalente a \-c "source {file}".
|
||||
{file} non può avere un nome che inizia per '\-'.
|
||||
Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo
|
||||
argomento specificato).
|
||||
.TP
|
||||
\-T {terminale}
|
||||
Dice a
|
||||
Specificare a
|
||||
.B Vim
|
||||
quale tipo di terminale state usando.
|
||||
il tipo di terminale che si sta usando.
|
||||
Utile solo se il terminale non viene riconosciuto correttamente da Vim.
|
||||
Dovrebbe essere un terminale noto a
|
||||
.B Vim
|
||||
(predefinito) o definito nei file termcap o terminfo.
|
||||
.TP
|
||||
\-u {vimrc}
|
||||
Usa i comandi nel file {vimrc} per inizializzazioni.
|
||||
Usare i comandi nel file {vimrc} per inizializzazioni.
|
||||
Tutte le altre inizializzazioni non sono eseguite.
|
||||
Usare quest'opzione per editare qualche file di tipo speciale.
|
||||
Si possono anche omettere tutte le inizializzazioni dando come nome "NONE".
|
||||
Vedere ":help initialization" da vim per ulteriori dettagli.
|
||||
.TP
|
||||
\-U {gvimrc}
|
||||
Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
|
||||
Usare i comandi nel file {gvimrc} per inizializzare la GUI.
|
||||
Tutte le altre inizializzazioni GUI non sono eseguite.
|
||||
Si possono anche omettere tutte le inizializzazioni GUI dando come nome "NONE".
|
||||
Si possono anche omettere tutte le inizializzazioni GUI dando come nome
|
||||
"NONE".
|
||||
Vedere ":help gui\-init" da vim per ulteriori dettagli.
|
||||
.TP
|
||||
\-v
|
||||
Inizia
|
||||
Iniziare
|
||||
.B Vim
|
||||
in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha
|
||||
effetto solo quando Vim viene invocato con il nome "ex".
|
||||
.TP
|
||||
\-V[N]
|
||||
Verboso. Vim manda messaggi relativi ai file di script che esegue
|
||||
e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
|
||||
dell'opzione 'verbose'. Il valore predefinito è 10.
|
||||
Verboso. Fare inviare a Vim messaggi relativi ai file di script eseguiti
|
||||
e alla lettura/scrittura di un file viminfo. Il numero opzionale N è il
|
||||
valore dell'opzione 'verbose'. Il valore predefinito è 10.
|
||||
.TP
|
||||
\-V[N]{nome_file}
|
||||
Come \-V imposta 'verbosefile' a {nome_file}. Il risultato è che i messaggi
|
||||
non sono visualizzati, ma scritti sul file {nome_file}. Il {nome_file} non
|
||||
deve iniziare con un numero.
|
||||
Come \-V, e si imposta 'verbosefile' a {nome_file}. Il risultato è che i
|
||||
messaggi non sono visualizzati, ma scritti sul file {nome_file}. Il
|
||||
{nome_file} non deve iniziare con un numero.
|
||||
.TP
|
||||
\-w{numero}
|
||||
Imposta l'opzione 'window' a {numero}.
|
||||
Impostare l'opzione 'window' a {numero}.
|
||||
.TP
|
||||
\-w {script_file}
|
||||
Ogni carattere immesso viene registrato nel file {script_file},
|
||||
Registrare ogni carattere immesso nel file {script_file},
|
||||
finché non si esce da
|
||||
.B Vim.
|
||||
Utile se si vuole creare uno script file da usare con "vim \-s" o
|
||||
@@ -402,7 +408,7 @@ nella scrittura dei file. Verr
|
||||
.TP
|
||||
\-X
|
||||
Non connettersi al server X. Vim parte più rapidamente,
|
||||
ma il titolo della finestra e la clipboard non sono usati.
|
||||
ma il titolo della finestra e gli appunti non sono disponibili.
|
||||
.TP
|
||||
\-Y
|
||||
Non connettersi al compositore Wayland.
|
||||
@@ -410,17 +416,19 @@ Non connettersi al compositore Wayland.
|
||||
\-y
|
||||
Eseguire
|
||||
.B Vim
|
||||
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o "eview".
|
||||
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o
|
||||
"eview".
|
||||
Fa sì che
|
||||
.B Vim
|
||||
si comporti come un editor che usa solo il mouse e i caratteri.
|
||||
.TP
|
||||
\-Z
|
||||
Modo ristretto. Vim si comporta come se invocato con un nome che inizia per "r".
|
||||
Eseguire Vim in Modo ristretto. Vim si comporta come se invocato con un nome
|
||||
che inizia per "r".
|
||||
.TP
|
||||
\-\-
|
||||
Specifica la fine delle opzioni.
|
||||
Argomenti specificati dopo questo sono considerati nomi file.
|
||||
In questo modo si specifica la fine delle opzioni.
|
||||
Argomenti aggiunti dopo questo sono considerati nomi file.
|
||||
Si può usare per editare un file il cui nome inizi per '-'.
|
||||
.TP
|
||||
\-\-clean
|
||||
@@ -428,40 +436,43 @@ Richiede di non usare alcun file di personalizzazione (vimrc, plugin, etc.).
|
||||
Utile per verificare se un problema persiste invocando Vim "originale".
|
||||
.TP
|
||||
\-\-cmd {comando}
|
||||
Come "\-c", ma il comando è eseguito subito PRIMA
|
||||
di eseguire qualsiasi file vimrc.
|
||||
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi "\-c".
|
||||
Come "\-c", ma eseguire il comando subito PRIMA di eseguire qualsiasi file
|
||||
vimrc.
|
||||
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
|
||||
"\-c".
|
||||
.TP
|
||||
\-\-echo\-wid
|
||||
Solo per GUI GTK: Visualizza ID di Window su stdout.
|
||||
Solo per GUI GTK: Visualizzare ID di Window su stdout.
|
||||
.TP
|
||||
\-\-gui-dialog-file {nome}
|
||||
Quando si usa la GUI, invece di visualizzare un dialogo, il titolo e il
|
||||
messaggio del dialogo sono scritti sul file {nome}. Il file viene creato o,
|
||||
se già esistente, viene esteso. Quest'opzione serve solo in fase di test,
|
||||
per evitare di restare bloccati da un dialogo che non si riesce a visualizzare.
|
||||
per evitare di restare bloccati da un dialogo che non si riesce a
|
||||
visualizzare.
|
||||
Se si sta lavorando senza la GUI l'argomento viene ignorato.
|
||||
.TP
|
||||
\-\-help, \-h, \-?
|
||||
Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
|
||||
Visualizzare opzioni e argomenti che si possono specificare invocando Vim.
|
||||
Subito dopo
|
||||
.B Vim
|
||||
esce.
|
||||
.TP
|
||||
\-\-literal
|
||||
Considera i nomi passati come argomenti letterali, senza espandere metacaratteri.
|
||||
Considerare i nomi passati come argomenti letterali, senza espandere
|
||||
metacaratteri.
|
||||
Non ha effetto in Unix, dove la shell espande comunque i metacaratteri.
|
||||
.TP
|
||||
\-\-log {nome_file}
|
||||
Se
|
||||
.B Vim
|
||||
è stato compilato con le funzionalità eval e channel, inizia a registrare
|
||||
e scrive le registrazioni a {nome_file}. Ciò equivale a chiamare
|
||||
è stato compilato con le funzionalità eval e channel, iniziare a registrare
|
||||
e scrivere le registrazioni a {nome_file}. Ciò equivale a chiamare
|
||||
.I ch_logfile({nome_file}, 'ao')
|
||||
in una fase molto iniziale dell'avvio del programma.
|
||||
.TP
|
||||
\-\-nofork
|
||||
Direttamente [Foreground]. Per la versione GUI,
|
||||
Eseguire Vim irettamente [Foreground]. Per la versione GUI,
|
||||
.B Vim
|
||||
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
|
||||
.TP
|
||||
@@ -471,17 +482,19 @@ Non caricare plugin. Implicito se si specifica \-u NONE.
|
||||
\-\-not\-a\-term
|
||||
Da usare per specificare a
|
||||
.B Vim
|
||||
che l'utente è consapevole che l'input e l'output non avvengono con un terminale
|
||||
vero e proprio. Ciò serve per evitare il messaggio di avvertimento e il ritardo
|
||||
di due secondi che avverrebbero in assenza di questo argomento.
|
||||
che l'utente è consapevole che l'input e l'output non avvengono con un
|
||||
terminale vero e proprio. Ciò serve per evitare il messaggio di avvertimento
|
||||
e il ritardo di due secondi, ossia il comportamento previsto in assenza di
|
||||
questo argomento.
|
||||
.TP
|
||||
\-\-remote
|
||||
Connettersi a un server Vim e chiedere di editare i file elencati come altri
|
||||
argomenti. Se non si trova un server viene dato un messaggio e i file sono
|
||||
editati nel Vim corrente.
|
||||
Connettersi a un server Vim a cui chiedere di editare i file elencati come
|
||||
altri argomenti. Se non si trova un server viene dato un messaggio e i file
|
||||
sono editati nel Vim corrente.
|
||||
.TP
|
||||
\-\-remote\-expr {expr}
|
||||
Connettersi a un server Vim, valutare {expr} e stampare il risultato su stdout.
|
||||
\-\-remote\-expr {espressione}
|
||||
Connettersi a un server Vim, valutare {espressione} e stampare il risultato su
|
||||
stdout.
|
||||
.TP
|
||||
\-\-remote\-send {chiavi}
|
||||
Connettersi a un server Vim e spedirgli {chiavi}.
|
||||
@@ -490,16 +503,16 @@ Connettersi a un server Vim e spedirgli {chiavi}.
|
||||
Come \-\-remote, ma senza avvisare se non si trova un server.
|
||||
.TP
|
||||
\-\-remote-wait
|
||||
Come \-\-remote, ma Vim non termina finché i file non sono stati editati.
|
||||
Come \-\-remote, ma non terminare Vim finché i file non sono stati editati.
|
||||
.TP
|
||||
\-\-remote\-wait\-silent
|
||||
Come \-\-remote\-wait, ma senza avvisare se non si trova un server.
|
||||
.TP
|
||||
\-\-serverlist
|
||||
Elenca i nomi di tutti i server Vim disponibili.
|
||||
Elencare i nomi di tutti i server Vim disponibili.
|
||||
.TP
|
||||
\-\-servername {nome}
|
||||
Usa {nome} come nome del server usato per il Vim corrente, a meno che sia
|
||||
Usare {nome} come nome del server usato per il Vim corrente, a meno che sia
|
||||
usato con l'argomento \-\-remote, nel qual caso indica il server a cui
|
||||
connettersi.
|
||||
Quando si sta usando il server a socket [socketserver backend], se il nome
|
||||
@@ -512,19 +525,20 @@ rispettivamente, o "socket" o "x11". Disponibile solo se Vim
|
||||
compilato con le due funzionalità socketserver e X11.
|
||||
.TP
|
||||
\-\-socketid {id}
|
||||
Solo per GUI GTK: Usa meccanismo GtkPlug per eseguire gVim in un'altra finestra.
|
||||
Solo per GUI GTK: Usare meccanismo GtkPlug per eseguire gVim in un'altra
|
||||
finestra.
|
||||
.TP
|
||||
\-\-startuptime {nome_file}
|
||||
Durante la fase iniziale, scrive messaggi di log al file {nome_file}.
|
||||
Durante la fase iniziale, scrivere messaggi di log al file {nome_file}.
|
||||
.TP
|
||||
\-\-ttyfail
|
||||
Quando stdin o stdout non sono un terminale (tty) esce subito da Vim.
|
||||
Quando stdin o stdout non sono un terminale (tty) uscire subito da Vim.
|
||||
.TP
|
||||
\-\-version
|
||||
Stampa la versione di Vim ed esce.
|
||||
Stampare la versione di Vim e uscire.
|
||||
.TP
|
||||
\-\-windowid {id}
|
||||
Solo per GUI Win32: Chiede a gVim di provare a user l'ID di window {id}
|
||||
Solo per GUI Win32: Chiedere a gVim di provare a user l'ID di window {id}
|
||||
come padre, in modo da venir eseguito all'interno della finestra specificata.
|
||||
.SH AIUTO ONLINE
|
||||
Battere ":help" in
|
||||
@@ -532,10 +546,11 @@ Battere ":help" in
|
||||
per iniziare.
|
||||
Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
|
||||
Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
|
||||
Usare <Tab> e CTRL\-D per completare gli argomenti (":help cmdline\-completion").
|
||||
Usare <Tab> e CTRL\-D per completare gli argomenti
|
||||
(":help cmdline\-completion").
|
||||
Ci sono "tag" nei file di help per passare da un argomento a un altro
|
||||
(simili a legami ipertestuali, vedere ":help").
|
||||
Tutti i file di documentazione possono essere navigati così. Ad es.:
|
||||
Tutti i file di documentazione possono essere navigati così. P.es.:
|
||||
":help syntax.txt".
|
||||
.SH FILE
|
||||
.TP 15
|
||||
@@ -546,11 +561,11 @@ I file di documentazione di
|
||||
Usare ":help doc\-file\-list" per avere la lista completa.
|
||||
.br
|
||||
.I vim??
|
||||
è il numero di versione corto, p.es., vim91 per indicare
|
||||
.B Vim 9.1
|
||||
è il numero di versione corto, p.es., vim92 per indicare
|
||||
.B Vim 9.2
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/doc/tags
|
||||
Il file di tags usato per trovare informazioni nei file di documentazione.
|
||||
Il file di tag usato per trovare informazioni nei file di documentazione.
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/syntax/syntax.vim
|
||||
Inizializzazioni sintattiche a livello di sistema.
|
||||
@@ -586,18 +601,21 @@ Inizializzazioni del men
|
||||
a livello di sistema.
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/bugreport.vim
|
||||
Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
|
||||
Script Vim per generare una segnalazione di errore.
|
||||
Vedere ":help bugs".
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/filetype.vim
|
||||
Script Vim per determinare il tipo di un file dal suo nome. Vedere ":help 'filetype'".
|
||||
Script Vim per determinare il tipo di un file dal suo nome.
|
||||
Vedere ":help 'filetype'".
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/scripts.vim
|
||||
Script Vim per determinare il tipo di un file dal suo contenuto. Vedere ":help 'filetype'".
|
||||
Script Vim per determinare il tipo di un file dal suo contenuto.
|
||||
Vedere ":help 'filetype'".
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/print/*.ps
|
||||
File usati per stampa PostScript.
|
||||
.PP
|
||||
Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim:
|
||||
Per informazioni aggiornate [in inglese] vedere la home page di Vim:
|
||||
.br
|
||||
<URL:http://www.vim.org/>
|
||||
.SH VEDERE ANCHE
|
||||
@@ -614,12 +632,12 @@ Vedere ":help credits" in
|
||||
Tony Andrews e G.R. (Fred) Walter.
|
||||
In verità, poco o nulla è rimasto del loro codice originale.
|
||||
.SH BUG
|
||||
Probabilmente.
|
||||
È probabile che ce ne siano.
|
||||
Vedere ":help todo" per una lista di problemi noti.
|
||||
.PP
|
||||
Si noti che un certo numero di comportamenti che possono essere considerati errori
|
||||
da qualcuno, sono in effetti causati da una riproduzione fin troppo fedele del
|
||||
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si comporta
|
||||
diversamente", si dia prima un'occhiata al file vi_diff.txt (o si immetta
|
||||
:help vi_diff.txt da Vim).
|
||||
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions.
|
||||
Si noti che un certo numero di comportamenti che possono essere visti come
|
||||
errori, sono in effetti causati da una riproduzione fin troppo fedele del
|
||||
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si
|
||||
comporta diversamente", si dia prima un'occhiata al file vi_diff.txt
|
||||
(o si immetta :help vi_diff.txt da Vim).
|
||||
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions'.
|
||||
|
||||
@@ -36,8 +36,9 @@ Può essere usato per editare qualsiasi file di testo.
|
||||
Particolarmente utile per editare programmi.
|
||||
.PP
|
||||
Ci sono parecchi miglioramenti rispetto a Vi: undo multipli, finestre e buffer
|
||||
multipli, evidenziazione sintattica, possibilità di modificare la riga di comando,
|
||||
completamento nomi file, help in linea, selezione testi in Modo Visual, etc..
|
||||
multipli, evidenziazione sintattica, possibilità di modificare la riga di
|
||||
comando, completamento nomi file, help online, selezione testi in Modo
|
||||
Visual, etc.
|
||||
Vedere ":help vi_diff.txt" per un sommario delle differenze fra
|
||||
.B Vim
|
||||
e Vi.
|
||||
@@ -67,9 +68,10 @@ essere usata per scegliere uno o più file da modificare.
|
||||
nome_file ..
|
||||
Una lista di nomi di file.
|
||||
Il primo di questi sarà il file corrente, e verrà letto nel buffer.
|
||||
Il cursore sarà posizionato sulla prima linea del buffer.
|
||||
Il cursore sarà posizionato sulla prima riga del buffer.
|
||||
Si può arrivare agli altri file col comando ":next".
|
||||
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla lista_file.
|
||||
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla
|
||||
lista_file.
|
||||
.TP
|
||||
\-
|
||||
Il file da editare è letto dallo stdin.
|
||||
@@ -77,7 +79,7 @@ I comandi sono letti da stderr, che dovrebbe essere un terminale [tty].
|
||||
.TP
|
||||
\-t {tag}
|
||||
Il file da editare e la posizione iniziale del cursore dipendono da "tag",
|
||||
una specie di "etichetta" a cui saltare.
|
||||
una "etichetta" a cui saltare.
|
||||
{tag} viene cercata nel file "tags", e il file a essa associato diventa
|
||||
quello corrente, e il comando a essa associato viene eseguito.
|
||||
Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
|
||||
@@ -87,7 +89,7 @@ e il cursore è posizionato all'inizio della funzione.
|
||||
Vedere ":help tag\-commands".
|
||||
.TP
|
||||
\-q [file_errori]
|
||||
Inizia in Modo QuickFix [correzione veloce].
|
||||
Iniziare in Modo QuickFix [correzione veloce].
|
||||
Il file [file_errori] è letto e il primo errore è visualizzato.
|
||||
Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
|
||||
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
|
||||
@@ -97,28 +99,28 @@ Vedere ":help quickfix".
|
||||
.PP
|
||||
.B Vim
|
||||
si comporta in modo diverso se invocato con nomi differenti (il programma
|
||||
eseguibile "soggiacente" può essere sempre lo stesso).
|
||||
eseguibile "sottostante" può essere sempre lo stesso).
|
||||
.TP 10
|
||||
vim
|
||||
Modo Normal, comportamento predefinito.
|
||||
Iniziare in Modo Normal, comportamento predefinito.
|
||||
.TP
|
||||
ex
|
||||
Inizia in Modo "Ex".
|
||||
Iniziare in Modo "Ex".
|
||||
Si può passare in Modo Normal col comando ":vi".
|
||||
Si può invocare il Modo "Ex" anche con l'argomento "\-e".
|
||||
.TP
|
||||
view
|
||||
Inizia in Modo Read-only (Sola Lettura). Non si possono modificare i file.
|
||||
Iniziare in Modo Read-only (sola-lettura). Non si possono modificare i file.
|
||||
Si può invocare il Modo Read-only anche con l'argomento "\-R".
|
||||
.TP
|
||||
gvim gview
|
||||
La versione GUI [Graphical User Interface].
|
||||
Apre una nuova finestra.
|
||||
Usare la versione GUI [Graphical User Interface].
|
||||
Viene aperta una nuova finestra.
|
||||
Si può invocare il Modo GUI anche con l'argomento "\-g".
|
||||
.TP
|
||||
evim eview
|
||||
La versione GUI in Modo Easy (semplificata).
|
||||
Apre una nuova finestra.
|
||||
Usare la versione GUI in Modo Easy (semplificato).
|
||||
Viene aperta una nuova finestra.
|
||||
Si può invocare il Modo Easy anche con l'argomento "\-y".
|
||||
.TP
|
||||
rvim rview rgvim rgview
|
||||
@@ -128,21 +130,21 @@ della shell o sospendere
|
||||
Si può chiedere la stessa cosa anche con l'argomento "\-Z".
|
||||
.SH OPZIONI
|
||||
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di file.
|
||||
Opzioni che non hanno un argomento si possono specificare dietro a un solo "\-".
|
||||
Opzioni che non hanno un argomento si possono specificare insieme dietro a un
|
||||
solo "\-".
|
||||
.TP 12
|
||||
+[numero]
|
||||
Nel primo file il cursore sarà posizionato sulla linea "numero".
|
||||
Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
|
||||
Nel primo file, posizionare il cursore sulla riga numero "numero".
|
||||
Se "numero" manca, il cursore sarà posizionato sull'ultima riga del file.
|
||||
.TP
|
||||
+/{espressione}
|
||||
Nel primo file il cursore sarà posizionato alla
|
||||
prima occorrenza di {espressione}.
|
||||
Nel primo file posizionare il cursore alla prima occorrenza di {espressione}.
|
||||
Vedere ":help search\-pattern" per come specificare l'espressione.
|
||||
.TP
|
||||
+{comando}
|
||||
.TP
|
||||
\-c {comando}
|
||||
{comando} sarà eseguito dopo che il primo file è stato letto.
|
||||
Eseguire {comando} dopo che il primo file è stato letto.
|
||||
{comando} è interpretato come un comando Ex.
|
||||
Se il {comando} contiene spazi deve essere incluso fra doppi apici
|
||||
(o altro delimitatore, a seconda della shell che si sta usando).
|
||||
@@ -154,7 +156,7 @@ Note: Si possono avere fino a 10 comandi "+" o "\-c".
|
||||
Se
|
||||
.B Vim
|
||||
è stato compilato con supporto ARABIC per editare file con orientamento
|
||||
destra-sinistra e tastiera con mappatura araba, quest'opzione inizia
|
||||
destra-sinistra e tastiera con mappatura araba, quest'opzione fa iniziare
|
||||
.B Vim
|
||||
in Modo Arabic, cioè impostando 'arabic'.
|
||||
Altrimenti viene dato un messaggio di errore e
|
||||
@@ -162,32 +164,32 @@ Altrimenti viene dato un messaggio di errore e
|
||||
termina in modo anormale.
|
||||
.TP
|
||||
\-b
|
||||
Modo Binary (binario).
|
||||
Vengono impostate alcune opzioni che permettono di modificare un file
|
||||
binario o un file che contiene un programma eseguibile.
|
||||
Eseguire Vim in Modo Binary (binario).
|
||||
Vengono impostate alcune opzioni che permettono di modificare un file binario
|
||||
o un file che contiene un programma eseguibile.
|
||||
.TP
|
||||
\-C
|
||||
Compatibile. Imposta l'opzione 'compatible'.
|
||||
Compatibile. Impostare l'opzione 'compatible'.
|
||||
In questo modo
|
||||
.B Vim
|
||||
ha quasi lo stesso comportamento di Vi, anche in presenza di un file .vimrc.
|
||||
.TP
|
||||
\-d
|
||||
Inizia in Modo Diff [differenze].
|
||||
Dovrebbero esserci come argomenti da due o otto nomi di file.
|
||||
Iniziare in Modo Diff [differenze].
|
||||
Dovrebbero esserci come argomenti da due fino a otto nomi di file.
|
||||
.B Vim
|
||||
aprirà tutti i file evidenziando le differenze fra gli stessi.
|
||||
Funziona come vimdiff(1).
|
||||
.TP
|
||||
\-d {dispositivo}, \-dev {dispositivo}
|
||||
Apre {dispositivo} per usarlo come terminale.
|
||||
Aprire {dispositivo} per usarlo come terminale.
|
||||
Solo per l'Amiga.
|
||||
Esempio:
|
||||
"\-d con:20/30/600/150".
|
||||
.TP
|
||||
\-D
|
||||
Debugging. Vim si mette in Modo "debugging" a partire
|
||||
dall'esecuzione del primo comando da uno script.
|
||||
Debugging. Entrare in Modo "debugging" a partire dall'esecuzione del primo
|
||||
comando di uno script.
|
||||
.TP
|
||||
\-e
|
||||
Eseguire
|
||||
@@ -202,15 +204,15 @@ in Modo Ex migliorato, come se il programma eseguito sia "exim".
|
||||
\-f
|
||||
Direttamente [Foreground]. Per la versione GUI,
|
||||
.B Vim
|
||||
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
|
||||
Per l'Amiga,
|
||||
non creare [fork] una nuova finestra, indipendente dalla shell di invocazione.
|
||||
Per l'Amiga, non fa ripartire
|
||||
.B Vim
|
||||
non è fatto ripartire per aprire una nuova finestra.
|
||||
per aprire una nuova finestra.
|
||||
Opzione da usare quando
|
||||
.B Vim
|
||||
è eseguito da un programma che attende la fine della
|
||||
sessione di edit (p.es., mail).
|
||||
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
|
||||
è eseguito da un programma che attende la fine della sessione di edit (p.es.,
|
||||
mail).
|
||||
In ambiente Amiga, i comandi ":sh" e ":!" non sono disponibili.
|
||||
.TP
|
||||
\-F
|
||||
Se
|
||||
@@ -229,7 +231,8 @@ Nota: Il supporto Farsi è stato rimosso a partire dalla patch 8.1.0932.
|
||||
Se
|
||||
.B Vim
|
||||
è stato compilato con supporto GUI, quest'opzione chiede di usarla.
|
||||
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
|
||||
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di
|
||||
errore e
|
||||
.B Vim
|
||||
termina in modo anormale.
|
||||
.TP
|
||||
@@ -246,145 +249,148 @@ termina in modo anormale.
|
||||
.TP
|
||||
\-i {viminfo}
|
||||
Se è abilitato l'uso di un file viminfo, quest'opzione indica il nome
|
||||
del file da usare invece di quello predefinito "~/.viminfo".
|
||||
del file da usare invece del file predefinito "~/.viminfo".
|
||||
Si può anche evitare l'uso di un file .viminfo, dando come nome
|
||||
"NONE".
|
||||
.TP
|
||||
\-l
|
||||
Modo Lisp.
|
||||
Imposta le opzioni 'lisp' e 'showmatch'.
|
||||
Eseguire Vim in Modo Lisp.
|
||||
Vengono impostate le opzioni 'lisp' e 'showmatch'.
|
||||
.TP
|
||||
\-L
|
||||
Equivalente a \-r.
|
||||
.TP
|
||||
\-m
|
||||
Inibisce modifica file.
|
||||
Inibisce l'opzione 'write'.
|
||||
Inibire modifica file.
|
||||
Viene inibita l'opzione 'write'.
|
||||
È ancora possibile modificare un buffer, ma non riscriverlo.
|
||||
.TP
|
||||
\-M
|
||||
Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
|
||||
in modo da impedire sia modifiche che riscritture. Da notare che queste
|
||||
opzioni possono essere abilitate in seguito, permettendo così modifiche.
|
||||
in modo da impedire sia modifiche che riscritture. Si noti che queste opzioni
|
||||
possono essere cambiate in seguito, per consentire modifiche.
|
||||
.TP
|
||||
\-n
|
||||
Inibisce l'uso di un file di swap.
|
||||
Il recupero dopo una caduta di macchina sarà impossibile.
|
||||
Inibire l'uso di un file di swap.
|
||||
Ripristinare il file in caso di fine anormale sarà impossibile.
|
||||
Utile per editare un file su un supporto molto lento (p.es., floppy).
|
||||
Il comando ":set uc=0" ha lo stesso effetto.
|
||||
Per abilitare il recupero usare ":set uc=200".
|
||||
Per abilitare il ripristino usare ":set uc=200".
|
||||
.TP
|
||||
\-N
|
||||
Modo "Non-compatibile". Annulla l'opzione 'compatible'.
|
||||
Eseguire Vim in Modo "Non-compatibile". Annulla l'opzione 'compatible'.
|
||||
Così
|
||||
.B Vim
|
||||
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
|
||||
file .vimrc.
|
||||
si comporta un po' meglio, ma è meno compatibile con Vi, anche in assenza di
|
||||
un file .vimrc.
|
||||
.TP
|
||||
\-nb
|
||||
Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
|
||||
Fare di Vim un Editor server per NetBeans. Vedere la documentazione per
|
||||
dettagli.
|
||||
.TP
|
||||
\-o[N]
|
||||
Apre N finestre in orizzontale.
|
||||
Se N manca, apre una finestra per ciascun file.
|
||||
Aprire N finestre in orizzontale.
|
||||
Se N manca, aprire una finestra per ciascun file.
|
||||
.TP
|
||||
\-O[N]
|
||||
Apre N finestre, in verticale.
|
||||
Se N manca, apre una finestra per ciascun file.
|
||||
Aprire N finestre, in verticale.
|
||||
Se N manca, aprire una finestra per ciascun file.
|
||||
.TP
|
||||
\-p[N]
|
||||
Apre N pagine di linguette.
|
||||
Quando N è omesso, apre una pagine di linguette per ciascun file.
|
||||
Aprire N pagine di schede.
|
||||
Quando N è omesso, aprire una pagine di schede per ciascun file.
|
||||
.TP
|
||||
\-P {titolo-padre}
|
||||
Solo per GUI Win32: Specifica il titolo dell'applicazione-padre. Se possibile,
|
||||
Vim viene eseguito in una finestra MDI (Multiple-Document Interface).
|
||||
{titolo-padre} deve apparire nel titolo della applicazione-padre. Accertatevi
|
||||
Solo per GUI Win32: Specificare il titolo dell'applicazione-padre. Se
|
||||
possibile, Vim viene eseguito in una finestra MDI
|
||||
(Multiple-Document Interface).
|
||||
{titolo-padre} deve apparire nel titolo dell'applicazione-padre. Accertarsi
|
||||
che sia sufficientemente esplicativo. Notare che l'implementazione è ancora
|
||||
rudimentale. Non funziona per tutte le applicazioni, e il menù non funziona.
|
||||
.TP
|
||||
\-r
|
||||
Lista file di swap, e informazioni su come usarli per ripristinare file.
|
||||
Listare file di swap, con informazioni su come usarli per ripristinare file.
|
||||
.TP
|
||||
\-r {file}
|
||||
Modo Recovery (ripristino).
|
||||
Eseguire Vim in Modo Recovery (ripristino).
|
||||
Il file di swap è usato per recuperare una sessione di edit finita male.
|
||||
Il file di swap è un file con lo stesso nome file del file di testo
|
||||
editato, col suffisso ".swp".
|
||||
Il file di swap è un file con lo stesso nome file del file di testo editato,
|
||||
col prefisso "." e col suffisso ".swp".
|
||||
Vedere ":help recovery".
|
||||
.TP
|
||||
\-R
|
||||
Modo Read-only (Sola Lettura).
|
||||
Imposta l'opzione 'readonly'.
|
||||
Si può ancora modificare il buffer, ma il file è protetto da una riscrittura
|
||||
involontaria.
|
||||
Se si vuole davvero riscrivere il file, occorre aggiungere un punto esclamativo
|
||||
al comando Ex, come in ":w!".
|
||||
Eseguire Vim in Modo Read-only (Sola Lettura).
|
||||
Viene impostata l'opzione 'readonly'.
|
||||
È ancora possibile modificare il buffer, ma il file è protetto da una
|
||||
riscrittura involontaria.
|
||||
Se si vuole davvero riscrivere il file, occorre aggiungere un punto
|
||||
esclamativo al comando Ex, come in ":w!".
|
||||
L'opzione \-R implica anche l'opzione \-n (vedere sopra).
|
||||
L'opzione 'readonly' può essere annullata con ":set noro".
|
||||
Vedere ":help 'readonly'".
|
||||
.TP
|
||||
\-s
|
||||
Modo silenzioso. Solo quando invocato come "Ex" o quando l'opzione
|
||||
"\-e" è stata data prima dell'opzione "\-s".
|
||||
Eseguire Vim in Modo silenzioso. Solo quando invocato come "Ex" o quando
|
||||
l'opzione "\-e" è stata specificata prima dell'opzione "\-s".
|
||||
.TP
|
||||
\-s {script_in_input}
|
||||
Lo script file {script_in_input} è letto.
|
||||
Eseguire lo script file {script_in_input}.
|
||||
I caratteri nel file sono interpretati come se immessi da terminale.
|
||||
Lo stesso risultato si può ottenere col comando ":source! {script_in_input}".
|
||||
Se la fine del file di input viene raggiunta prima che Vim termini,
|
||||
l'ulteriore input verrà preso dalla tastiera.
|
||||
.TP
|
||||
\-S {file}
|
||||
I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
|
||||
Eseguire i comandi contenuti in {file} dopo la lettura del primo file.
|
||||
Equivalente a \-c "source {file}".
|
||||
{file} non può avere un nome che inizia per '\-'.
|
||||
Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo
|
||||
argomento specificato).
|
||||
.TP
|
||||
\-T {terminale}
|
||||
Dice a
|
||||
Specificare a
|
||||
.B Vim
|
||||
quale tipo di terminale state usando.
|
||||
il tipo di terminale che si sta usando.
|
||||
Utile solo se il terminale non viene riconosciuto correttamente da Vim.
|
||||
Dovrebbe essere un terminale noto a
|
||||
.B Vim
|
||||
(predefinito) o definito nei file termcap o terminfo.
|
||||
.TP
|
||||
\-u {vimrc}
|
||||
Usa i comandi nel file {vimrc} per inizializzazioni.
|
||||
Usare i comandi nel file {vimrc} per inizializzazioni.
|
||||
Tutte le altre inizializzazioni non sono eseguite.
|
||||
Usare quest'opzione per editare qualche file di tipo speciale.
|
||||
Si possono anche omettere tutte le inizializzazioni dando come nome "NONE".
|
||||
Vedere ":help initialization" da vim per ulteriori dettagli.
|
||||
.TP
|
||||
\-U {gvimrc}
|
||||
Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
|
||||
Usare i comandi nel file {gvimrc} per inizializzare la GUI.
|
||||
Tutte le altre inizializzazioni GUI non sono eseguite.
|
||||
Si possono anche omettere tutte le inizializzazioni GUI dando come nome "NONE".
|
||||
Si possono anche omettere tutte le inizializzazioni GUI dando come nome
|
||||
"NONE".
|
||||
Vedere ":help gui\-init" da vim per ulteriori dettagli.
|
||||
.TP
|
||||
\-v
|
||||
Inizia
|
||||
Iniziare
|
||||
.B Vim
|
||||
in Modo Vi, come se il programma eseguibile fosse "vi". Questo ha
|
||||
effetto solo quando Vim viene invocato con il nome "ex".
|
||||
.TP
|
||||
\-V[N]
|
||||
Verboso. Vim manda messaggi relativi ai file di script che esegue
|
||||
e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
|
||||
dell'opzione 'verbose'. Il valore predefinito è 10.
|
||||
Verboso. Fare inviare a Vim messaggi relativi ai file di script eseguiti
|
||||
e alla lettura/scrittura di un file viminfo. Il numero opzionale N è il
|
||||
valore dell'opzione 'verbose'. Il valore predefinito è 10.
|
||||
.TP
|
||||
\-V[N]{nome_file}
|
||||
Come \-V imposta 'verbosefile' a {nome_file}. Il risultato è che i messaggi
|
||||
non sono visualizzati, ma scritti sul file {nome_file}. Il {nome_file} non
|
||||
deve iniziare con un numero.
|
||||
Come \-V, e si imposta 'verbosefile' a {nome_file}. Il risultato è che i
|
||||
messaggi non sono visualizzati, ma scritti sul file {nome_file}. Il
|
||||
{nome_file} non deve iniziare con un numero.
|
||||
.TP
|
||||
\-w{numero}
|
||||
Imposta l'opzione 'window' a {numero}.
|
||||
Impostare l'opzione 'window' a {numero}.
|
||||
.TP
|
||||
\-w {script_file}
|
||||
Ogni carattere immesso viene registrato nel file {script_file},
|
||||
Registrare ogni carattere immesso nel file {script_file},
|
||||
finché non si esce da
|
||||
.B Vim.
|
||||
Utile se si vuole creare uno script file da usare con "vim \-s" o
|
||||
@@ -402,7 +408,7 @@ nella scrittura dei file. Verrà chiesta una chiave di cifratura.
|
||||
.TP
|
||||
\-X
|
||||
Non connettersi al server X. Vim parte più rapidamente,
|
||||
ma il titolo della finestra e la clipboard non sono usati.
|
||||
ma il titolo della finestra e gli appunti non sono disponibili.
|
||||
.TP
|
||||
\-Y
|
||||
Non connettersi al compositore Wayland.
|
||||
@@ -410,17 +416,19 @@ Non connettersi al compositore Wayland.
|
||||
\-y
|
||||
Eseguire
|
||||
.B Vim
|
||||
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o "eview".
|
||||
in Modo Easy (semplificato), come se l'eseguibile invocato sia "evim" o
|
||||
"eview".
|
||||
Fa sì che
|
||||
.B Vim
|
||||
si comporti come un editor che usa solo il mouse e i caratteri.
|
||||
.TP
|
||||
\-Z
|
||||
Modo ristretto. Vim si comporta come se invocato con un nome che inizia per "r".
|
||||
Eseguire Vim in Modo ristretto. Vim si comporta come se invocato con un nome
|
||||
che inizia per "r".
|
||||
.TP
|
||||
\-\-
|
||||
Specifica la fine delle opzioni.
|
||||
Argomenti specificati dopo questo sono considerati nomi file.
|
||||
In questo modo si specifica la fine delle opzioni.
|
||||
Argomenti aggiunti dopo questo sono considerati nomi file.
|
||||
Si può usare per editare un file il cui nome inizi per '-'.
|
||||
.TP
|
||||
\-\-clean
|
||||
@@ -428,40 +436,43 @@ Richiede di non usare alcun file di personalizzazione (vimrc, plugin, etc.).
|
||||
Utile per verificare se un problema persiste invocando Vim "originale".
|
||||
.TP
|
||||
\-\-cmd {comando}
|
||||
Come "\-c", ma il comando è eseguito subito PRIMA
|
||||
di eseguire qualsiasi file vimrc.
|
||||
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi "\-c".
|
||||
Come "\-c", ma eseguire il comando subito PRIMA di eseguire qualsiasi file
|
||||
vimrc.
|
||||
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
|
||||
"\-c".
|
||||
.TP
|
||||
\-\-echo\-wid
|
||||
Solo per GUI GTK: Visualizza ID di Window su stdout.
|
||||
Solo per GUI GTK: Visualizzare ID di Window su stdout.
|
||||
.TP
|
||||
\-\-gui-dialog-file {nome}
|
||||
Quando si usa la GUI, invece di visualizzare un dialogo, il titolo e il
|
||||
messaggio del dialogo sono scritti sul file {nome}. Il file viene creato o,
|
||||
se già esistente, viene esteso. Quest'opzione serve solo in fase di test,
|
||||
per evitare di restare bloccati da un dialogo che non si riesce a visualizzare.
|
||||
per evitare di restare bloccati da un dialogo che non si riesce a
|
||||
visualizzare.
|
||||
Se si sta lavorando senza la GUI l'argomento viene ignorato.
|
||||
.TP
|
||||
\-\-help, \-h, \-?
|
||||
Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
|
||||
Visualizzare opzioni e argomenti che si possono specificare invocando Vim.
|
||||
Subito dopo
|
||||
.B Vim
|
||||
esce.
|
||||
.TP
|
||||
\-\-literal
|
||||
Considera i nomi passati come argomenti letterali, senza espandere metacaratteri.
|
||||
Considerare i nomi passati come argomenti letterali, senza espandere
|
||||
metacaratteri.
|
||||
Non ha effetto in Unix, dove la shell espande comunque i metacaratteri.
|
||||
.TP
|
||||
\-\-log {nome_file}
|
||||
Se
|
||||
.B Vim
|
||||
è stato compilato con le funzionalità eval e channel, inizia a registrare
|
||||
e scrive le registrazioni a {nome_file}. Ciò equivale a chiamare
|
||||
è stato compilato con le funzionalità eval e channel, iniziare a registrare
|
||||
e scrivere le registrazioni a {nome_file}. Ciò equivale a chiamare
|
||||
.I ch_logfile({nome_file}, 'ao')
|
||||
in una fase molto iniziale dell'avvio del programma.
|
||||
.TP
|
||||
\-\-nofork
|
||||
Direttamente [Foreground]. Per la versione GUI,
|
||||
Eseguire Vim irettamente [Foreground]. Per la versione GUI,
|
||||
.B Vim
|
||||
non crea [fork] una nuova finestra, indipendente dalla shell di invocazione.
|
||||
.TP
|
||||
@@ -471,17 +482,19 @@ Non caricare plugin. Implicito se si specifica \-u NONE.
|
||||
\-\-not\-a\-term
|
||||
Da usare per specificare a
|
||||
.B Vim
|
||||
che l'utente è consapevole che l'input e l'output non avvengono con un terminale
|
||||
vero e proprio. Ciò serve per evitare il messaggio di avvertimento e il ritardo
|
||||
di due secondi che avverrebbero in assenza di questo argomento.
|
||||
che l'utente è consapevole che l'input e l'output non avvengono con un
|
||||
terminale vero e proprio. Ciò serve per evitare il messaggio di avvertimento
|
||||
e il ritardo di due secondi, ossia il comportamento previsto in assenza di
|
||||
questo argomento.
|
||||
.TP
|
||||
\-\-remote
|
||||
Connettersi a un server Vim e chiedere di editare i file elencati come altri
|
||||
argomenti. Se non si trova un server viene dato un messaggio e i file sono
|
||||
editati nel Vim corrente.
|
||||
Connettersi a un server Vim a cui chiedere di editare i file elencati come
|
||||
altri argomenti. Se non si trova un server viene dato un messaggio e i file
|
||||
sono editati nel Vim corrente.
|
||||
.TP
|
||||
\-\-remote\-expr {expr}
|
||||
Connettersi a un server Vim, valutare {expr} e stampare il risultato su stdout.
|
||||
\-\-remote\-expr {espressione}
|
||||
Connettersi a un server Vim, valutare {espressione} e stampare il risultato su
|
||||
stdout.
|
||||
.TP
|
||||
\-\-remote\-send {chiavi}
|
||||
Connettersi a un server Vim e spedirgli {chiavi}.
|
||||
@@ -490,16 +503,16 @@ Connettersi a un server Vim e spedirgli {chiavi}.
|
||||
Come \-\-remote, ma senza avvisare se non si trova un server.
|
||||
.TP
|
||||
\-\-remote-wait
|
||||
Come \-\-remote, ma Vim non termina finché i file non sono stati editati.
|
||||
Come \-\-remote, ma non terminare Vim finché i file non sono stati editati.
|
||||
.TP
|
||||
\-\-remote\-wait\-silent
|
||||
Come \-\-remote\-wait, ma senza avvisare se non si trova un server.
|
||||
.TP
|
||||
\-\-serverlist
|
||||
Elenca i nomi di tutti i server Vim disponibili.
|
||||
Elencare i nomi di tutti i server Vim disponibili.
|
||||
.TP
|
||||
\-\-servername {nome}
|
||||
Usa {nome} come nome del server usato per il Vim corrente, a meno che sia
|
||||
Usare {nome} come nome del server usato per il Vim corrente, a meno che sia
|
||||
usato con l'argomento \-\-remote, nel qual caso indica il server a cui
|
||||
connettersi.
|
||||
Quando si sta usando il server a socket [socketserver backend], se il nome
|
||||
@@ -512,19 +525,20 @@ rispettivamente, o "socket" o "x11". Disponibile solo se Vim è stato
|
||||
compilato con le due funzionalità socketserver e X11.
|
||||
.TP
|
||||
\-\-socketid {id}
|
||||
Solo per GUI GTK: Usa meccanismo GtkPlug per eseguire gVim in un'altra finestra.
|
||||
Solo per GUI GTK: Usare meccanismo GtkPlug per eseguire gVim in un'altra
|
||||
finestra.
|
||||
.TP
|
||||
\-\-startuptime {nome_file}
|
||||
Durante la fase iniziale, scrive messaggi di log al file {nome_file}.
|
||||
Durante la fase iniziale, scrivere messaggi di log al file {nome_file}.
|
||||
.TP
|
||||
\-\-ttyfail
|
||||
Quando stdin o stdout non sono un terminale (tty) esce subito da Vim.
|
||||
Quando stdin o stdout non sono un terminale (tty) uscire subito da Vim.
|
||||
.TP
|
||||
\-\-version
|
||||
Stampa la versione di Vim ed esce.
|
||||
Stampare la versione di Vim e uscire.
|
||||
.TP
|
||||
\-\-windowid {id}
|
||||
Solo per GUI Win32: Chiede a gVim di provare a user l'ID di window {id}
|
||||
Solo per GUI Win32: Chiedere a gVim di provare a user l'ID di window {id}
|
||||
come padre, in modo da venir eseguito all'interno della finestra specificata.
|
||||
.SH AIUTO ONLINE
|
||||
Battere ":help" in
|
||||
@@ -532,10 +546,11 @@ Battere ":help" in
|
||||
per iniziare.
|
||||
Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
|
||||
Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
|
||||
Usare <Tab> e CTRL\-D per completare gli argomenti (":help cmdline\-completion").
|
||||
Usare <Tab> e CTRL\-D per completare gli argomenti
|
||||
(":help cmdline\-completion").
|
||||
Ci sono "tag" nei file di help per passare da un argomento a un altro
|
||||
(simili a legami ipertestuali, vedere ":help").
|
||||
Tutti i file di documentazione possono essere navigati così. Ad es.:
|
||||
Tutti i file di documentazione possono essere navigati così. P.es.:
|
||||
":help syntax.txt".
|
||||
.SH FILE
|
||||
.TP 15
|
||||
@@ -546,11 +561,11 @@ I file di documentazione di
|
||||
Usare ":help doc\-file\-list" per avere la lista completa.
|
||||
.br
|
||||
.I vim??
|
||||
è il numero di versione corto, p.es., vim91 per indicare
|
||||
.B Vim 9.1
|
||||
è il numero di versione corto, p.es., vim92 per indicare
|
||||
.B Vim 9.2
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/doc/tags
|
||||
Il file di tags usato per trovare informazioni nei file di documentazione.
|
||||
Il file di tag usato per trovare informazioni nei file di documentazione.
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/syntax/syntax.vim
|
||||
Inizializzazioni sintattiche a livello di sistema.
|
||||
@@ -586,18 +601,21 @@ Inizializzazioni del menù
|
||||
a livello di sistema.
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/bugreport.vim
|
||||
Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
|
||||
Script Vim per generare una segnalazione di errore.
|
||||
Vedere ":help bugs".
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/filetype.vim
|
||||
Script Vim per determinare il tipo di un file dal suo nome. Vedere ":help 'filetype'".
|
||||
Script Vim per determinare il tipo di un file dal suo nome.
|
||||
Vedere ":help 'filetype'".
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/scripts.vim
|
||||
Script Vim per determinare il tipo di un file dal suo contenuto. Vedere ":help 'filetype'".
|
||||
Script Vim per determinare il tipo di un file dal suo contenuto.
|
||||
Vedere ":help 'filetype'".
|
||||
.TP
|
||||
/usr/local/share/vim/vim??/print/*.ps
|
||||
File usati per stampa PostScript.
|
||||
.PP
|
||||
Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim:
|
||||
Per informazioni aggiornate [in inglese] vedere la home page di Vim:
|
||||
.br
|
||||
<URL:http://www.vim.org/>
|
||||
.SH VEDERE ANCHE
|
||||
@@ -614,12 +632,12 @@ Vedere ":help credits" in
|
||||
Tony Andrews e G.R. (Fred) Walter.
|
||||
In verità, poco o nulla è rimasto del loro codice originale.
|
||||
.SH BUG
|
||||
Probabilmente.
|
||||
È probabile che ce ne siano.
|
||||
Vedere ":help todo" per una lista di problemi noti.
|
||||
.PP
|
||||
Si noti che un certo numero di comportamenti che possono essere considerati errori
|
||||
da qualcuno, sono in effetti causati da una riproduzione fin troppo fedele del
|
||||
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si comporta
|
||||
diversamente", si dia prima un'occhiata al file vi_diff.txt (o si immetta
|
||||
:help vi_diff.txt da Vim).
|
||||
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions.
|
||||
Si noti che un certo numero di comportamenti che possono essere visti come
|
||||
errori, sono in effetti causati da una riproduzione fin troppo fedele del
|
||||
comportamento di Vi. Se si ritiene che altre cose siano errori "perché Vi si
|
||||
comporta diversamente", si dia prima un'occhiata al file vi_diff.txt
|
||||
(o si immetta :help vi_diff.txt da Vim).
|
||||
Un'occhiata va data anche alle opzioni 'compatible' e 'cpoptions'.
|
||||
|
||||
@@ -515,7 +515,7 @@ GTK GUI only: Use the GtkPlug mechanism to run gVim in another window.
|
||||
During startup write timing messages to the file {fname}.
|
||||
.TP
|
||||
\-\-ttyfail
|
||||
When stdin or stdout is not a a terminal (tty) then exit right away.
|
||||
When stdin or stdout is not a terminal (tty) then exit right away.
|
||||
.TP
|
||||
\-\-version
|
||||
Print version information and exit.
|
||||
|
||||
@@ -396,7 +396,7 @@ OPTIONS
|
||||
--startuptime {file}
|
||||
During startup write timing messages to the file {fname}.
|
||||
|
||||
--ttyfail When stdin or stdout is not a a terminal (tty) then exit
|
||||
--ttyfail When stdin or stdout is not a terminal (tty) then exit
|
||||
right away.
|
||||
|
||||
--version Print version information and exit.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*vim9.txt* For Vim version 9.2. Last change: 2026 May 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2355,11 +2355,6 @@ in Vim9 script.
|
||||
|
||||
let &laststatus=v:true
|
||||
vim9cmd &laststatus = true
|
||||
<
|
||||
- Not using a string where an argument requires a string (|E1174|) >vim
|
||||
|
||||
echo substitute('Hallo', 'a', 'e', v:true)
|
||||
vim9cmd echo substitute('Hallo', 'a', 'e', true) # E1174: String...
|
||||
<
|
||||
One consequence is that the item type of a list or dict given to |map()| must
|
||||
not change when its type is either declared or inferred. For example, this
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*wayland.txt* For Vim version 9.2. Last change: 2026 Feb 14
|
||||
*wayland.txt* For Vim version 9.2. Last change: 2026 Apr 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -54,15 +54,12 @@ try connecting again.
|
||||
2. Wayland Selections *wayland-selections*
|
||||
|
||||
Vim supports the wlr-data-control-unstable-v1 and ext-data-control-v1
|
||||
protocols, for accessing the current Wayland selection. These are the best
|
||||
case scenario protocols, see |wayland-focus-steal|. Selection in this case
|
||||
protocols, for accessing the current Wayland selection. Selection in this case
|
||||
essentially means the "clipboard." You can check if your Wayland compositor
|
||||
supports either of these protocols by running the wayland-info command, which
|
||||
should be bundled with libwayland on your system: >
|
||||
wayland-info | grep -E '(ext_data_control|zwlr_data_control)'
|
||||
<If grep finds a match, then you have either or both protocols on your system.
|
||||
If you don't get any match, then please see |wayland-focus-steal| for more
|
||||
information.
|
||||
|
||||
Some compositors that are known to support either or both protocols:
|
||||
1. KWin (KDE)
|
||||
@@ -90,39 +87,65 @@ Vim determines which one to use when accessing the clipboard using the
|
||||
|
||||
*wayland-primary-selection*
|
||||
If you find X11 style primary selections useful, Wayland also implements this
|
||||
behaviour in its own protocols:
|
||||
feature using the protocols that Vim supports. This is unless you are using
|
||||
version 1 (not the same as the 'v1' in the protocol name), of the
|
||||
wlr-data-control protocol, then primary selection will not be supported. You
|
||||
can check this using >
|
||||
wayland-info | grep -E '(ext_data_control|zwlr_data_control)'
|
||||
If the "version:" entry for "zwlr_data_control_manager_v1" is "2" or greater,
|
||||
then primary selection is supported. If you also get
|
||||
"ext_data_control_manager_v1", then Vim will use that protocol instead, which
|
||||
has primary selection support builtin into it.
|
||||
|
||||
- The primary selection protocol is the most widely supported, but requires
|
||||
focus in order to be used, see |wayland-focus-steal|.
|
||||
If your Wayland compositor does not support the wlr-data-control-v1 or the
|
||||
ext-data-control-v1 protocol, Vim cannot access the clipboard directly through
|
||||
the Wayland protocol. External tools such as wl-clipboard can be used instead
|
||||
via a user-defined |clipboard-providers|.
|
||||
|
||||
- Data control protocol available on your system, such as the ext or wlr
|
||||
protocols, then primary selection is also supported. This is unless you are
|
||||
using version 1 (not the same as the 'v1' in the protocol name), of the
|
||||
wlr-data-control protocol. Then the primary selection protocol will be used
|
||||
as a fallback.
|
||||
Example: define a provider that shells out to `wl-copy` and `wl-paste`: >vim9
|
||||
|
||||
*wayland-focus-steal* *wayland-gnome*
|
||||
If you are using the GNOME desktop environment on Wayland, as of this writing,
|
||||
there is no method of accessing/modifying the clipboard for external clients
|
||||
such as Vim without being focused. Focused in this case means the client has
|
||||
received some sort of input event, such as a window being focused. This is
|
||||
what the wlr-data-control-unstable-v1 and ext-data-control-v1 protocols solve.
|
||||
If your Wayland compositor does not support the above protocols, then the
|
||||
above explanation applies.
|
||||
vim9script
|
||||
|
||||
To solve this problem, Vim implements a way of gaining focus in order to
|
||||
access the clipboard, by creating a temporary transparent top-level surface.
|
||||
This is by default disabled and can be enabled via the 'wlsteal' option.
|
||||
Moreover, a seat that has a keyboard is also required, see 'wlseat', and the
|
||||
xdg-shell protocol must be available. Additionally, Vim must be compiled with
|
||||
the |+wayland_focus_steal| feature.
|
||||
def Available(): bool
|
||||
return executable('wl-copy') && executable('wl-paste')
|
||||
enddef
|
||||
|
||||
Note that this method can have several side effects from the result of focus
|
||||
stealing. For example, if you have a taskbar that shows currently opened apps
|
||||
in your desktop environment, then when Vim attempts to steal focus, it may
|
||||
"flicker," as if a window was opened then immediately closed after.
|
||||
Additionally, if you are in fullscreen mode, this focus stealing won't work,
|
||||
because the created surface won't ever gain focus. If this happens, Vim will
|
||||
seem to freeze temporarily, see 'wltimeoutlen' for more information.
|
||||
def Copy(reg: string, type: string, str: list<string>)
|
||||
var args = "wl-copy"
|
||||
|
||||
if reg == "*"
|
||||
args ..= " -p"
|
||||
endif
|
||||
|
||||
system(args, str)
|
||||
enddef
|
||||
|
||||
def Paste(reg: string): tuple<string, list<string>>
|
||||
var args = "wl-paste --type text/plain;charset=utf-8"
|
||||
|
||||
if reg == "*"
|
||||
args ..= " -p"
|
||||
endif
|
||||
|
||||
return ("", systemlist(args))
|
||||
enddef
|
||||
|
||||
v:clipproviders["wl_clipboard"] = {
|
||||
available: Available,
|
||||
copy: {
|
||||
"+": Copy,
|
||||
"*": Copy
|
||||
},
|
||||
paste: {
|
||||
"+": Paste,
|
||||
"*": Paste
|
||||
}
|
||||
}
|
||||
|
||||
set clipmethod=wl_clipboard
|
||||
|
||||
|
||||
This relies on the wl-clipboard package being installed
|
||||
(https://github.com/bugaevc/wl-clipboard).
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 9.2. Last change: 2026 Mar 01
|
||||
*windows.txt* For Vim version 9.2. Last change: 2026 May 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -960,6 +960,9 @@ settings. The option is a comma-separated list of values:
|
||||
the value is "on", it must be set after border.
|
||||
height maximum height of the popup
|
||||
highlight highlight group of the popup (default is Pmenu)
|
||||
opacity opacity percentage 0-100 (default 100, fully opaque).
|
||||
When less than 100, content beneath the popup shows
|
||||
through.
|
||||
resize show resize handle: "on" (default) or "off"
|
||||
shadow "off" (default) or "on" using |hl-PmenuShadow|
|
||||
width maximum width of the popup
|
||||
@@ -968,6 +971,7 @@ Example: >
|
||||
:set previewpopup=height:10,width:60
|
||||
:set previewpopup=border:single,borderhilight:PmenuBorder
|
||||
:set previewpopup=border:custom:─;│;─;│;┌;┐;┘;└
|
||||
:set previewpopup=border:round,opacity:80
|
||||
|
||||
A few peculiarities:
|
||||
- If the file is in a buffer already, it will be re-used. This will allow for
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.TH XXD 1 "Maggio 2024" "Pagina di manuale per xxd"
|
||||
.TH XXD 1 "Mar 2026" "Pagina di manuale per xxd"
|
||||
.\"
|
||||
.\" 21 Maggio 1996
|
||||
.\" Autore della pagina di manuale:
|
||||
.\" 21st May 1996
|
||||
.\" Man page author:
|
||||
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
|
||||
.\" Modificato da Bram Moolenaar <Bram@vim.org>
|
||||
.\" Changes by Bram Moolenaar <Bram@vim.org>
|
||||
.SH NOME
|
||||
.I xxd
|
||||
\- Produce lista esadecimale da un file binario o viceversa.
|
||||
@@ -170,11 +170,14 @@ byte assoluti (o relativi) di distanza all'interno di input_file.
|
||||
(o se in combinazione con \fI+ \fR: prima della posizione corrente nel file `standard input').
|
||||
Se non si specifica l'opzione \-s, xxd inizia dalla posizione corrente all'interno del file.
|
||||
.TP
|
||||
.I \-t
|
||||
Quando l'output è nello stile delle `include' di C (opzione \-i ) aggiungere uno zero binario a fine stringa.
|
||||
.TP
|
||||
.I \-u
|
||||
Usa lettere esadecimali maiuscole. Per default si usano lettere minuscole.
|
||||
Usare lettere esadecimali maiuscole. Per default si usano lettere minuscole.
|
||||
.TP
|
||||
.IR \-v " | " \-version
|
||||
Visualizza la stringa contenente la versione del programma.
|
||||
Visualizzare la stringa contenente la versione del programma.
|
||||
.SH ATTENZIONE
|
||||
.PP
|
||||
.I xxd \-r
|
||||
@@ -182,7 +185,8 @@ Visualizza la stringa contenente la versione del programma.
|
||||
Se è possibili posizionarsi tramite `seek' sul file di output, il numero di riga
|
||||
di ogni riga esadecimale può essere non ordinato, delle righe possono mancare, o
|
||||
sovrapporsi. In tal caso xxd userà lseek(2) per posizionarsi all'interno del file.
|
||||
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi", che saranno riempiti con zeri binari.
|
||||
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi",
|
||||
che saranno riempiti con zeri binari.
|
||||
.PP
|
||||
.I xxd \-r
|
||||
non genera mai errori per parametri errati. I parametri extra sono silenziosamente ignorati.
|
||||
@@ -246,25 +250,25 @@ Stampa 3 righe (0x30 byte in esadecimale) alla fine di
|
||||
\fI% xxd \-s \-0x30 file\fR
|
||||
.PP
|
||||
Nota: I risultati degli esempi seguenti sono riferiti alla versione di
|
||||
Maggio 2024 della pagina di manuale [quella che state leggendo].
|
||||
Marzo 2026 della pagina di manuale [quella che state leggendo].
|
||||
.PP
|
||||
.br
|
||||
Stampa 120 byte come immagine esadecimale continua con 20 byte per riga.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
2e544820585844203120224d616767696f203230
|
||||
2e544820585844203120224d6172203230323622
|
||||
.br
|
||||
3234222022506167696e61206469206d616e7561
|
||||
2022506167696e61206469206d616e75616c6520
|
||||
.br
|
||||
6c652070657220787864220a2e5c220a2e5c2220
|
||||
70657220787864220a2e5c220a2e5c2220323173
|
||||
.br
|
||||
3231204d616767696f20313939360a2e5c222041
|
||||
74204d617920313939360a2e5c22204d616e2070
|
||||
.br
|
||||
75746f72652064656c6c6120706167696e612064
|
||||
61676520617574686f723a0a2e5c222020202054
|
||||
.br
|
||||
6f6e79204e7567656e74203c746f6e7940736374
|
||||
.br
|
||||
69206d616e75616c653a0a2e5c2220202020546f
|
||||
.PP
|
||||
|
||||
.br
|
||||
Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
|
||||
@@ -273,30 +277,30 @@ Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
|
||||
.br
|
||||
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
.br
|
||||
0000000c: 6167 6769 6f20 3230 3234 2220 aggio 2024"
|
||||
0000000c: 6172 2032 3032 3622 2022 5061 ar 2026" "Pa
|
||||
.br
|
||||
00000018: 2250 6167 696e 6120 6469 206d "Pagina di m
|
||||
00000018: 6769 6e61 2064 6920 6d61 6e75 gina di manu
|
||||
.br
|
||||
00000024: 616e 7561 6c65 2070 6572 2078 anuale per x
|
||||
00000024: 616c 6520 7065 7220 7878 6422 ale per xxd"
|
||||
.br
|
||||
00000030: 7864 220a 2e5c 220a 2e5c 2220 xd"..\"..\"
|
||||
00000030: 0a2e 5c22 0a2e 5c22 2032 3173 ..\\"..\\" 21s
|
||||
.br
|
||||
0000003c: 3231 204d 6167 6769 6f20 3139 21 Maggio 19
|
||||
0000003c: 7420 4d61 7920 3139 3936 0a2e t May 1996..
|
||||
.br
|
||||
00000048: 3936 0a2e 5c22 2041 7574 6f72 96..\" Autor
|
||||
00000048: 5c22 204d 616e 2070 6167 6520 \\" Man page
|
||||
.br
|
||||
00000054: 6520 6465 6c6c 6120 7061 6769 e della pagi
|
||||
00000054: 6175 7468 6f72 3a0a 2e5c 2220 author:..\\"
|
||||
.br
|
||||
00000060: 6e61 2064 6920 6d61 6e75 616c na di manual
|
||||
00000060: 2020 2054 6f6e 7920 4e75 6765 Tony Nuge
|
||||
.br
|
||||
0000006c: 653a 0a2e 5c22 2020 2020 546f e:..\" To
|
||||
0000006c: 6e74 203c 746f 6e79 4073 6374 nt <tony@sct
|
||||
.PP
|
||||
.br
|
||||
Visualizza la data dal file xxd-it.UTF-8.1
|
||||
Visualizza la data della prima versione di questa pagina dal file xxd-it.UTF-8.1
|
||||
.br
|
||||
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
|
||||
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
0000003c: 3231 204d 6167 6769 6f20 3139 3936 21 Maggio 1996
|
||||
00000039: 3231 7374 204d 6179 2031 3939 36 21st May 1996
|
||||
.PP
|
||||
.br
|
||||
Copia
|
||||
@@ -311,11 +315,11 @@ premettendogli 100 byte a 0x00.
|
||||
.br
|
||||
Modifica (patch) la data nel file xxd-it.UTF-8.1
|
||||
.br
|
||||
\fI% echo "000003c: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
|
||||
\fI% echo "0000039: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
|
||||
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
0000003c: 3331 204d 6167 6769 6f20 3139 3936 31 Maggio 1996
|
||||
00000039: 3331 7374 204d 6179 2031 3939 36 31st May 1996
|
||||
.PP
|
||||
.br
|
||||
Crea un file di 65537 byte tutto a 0x00,
|
||||
@@ -366,6 +370,20 @@ Leggere singoli caratteri da una linea seriale
|
||||
.br
|
||||
\fI% echo \-n foo > /dev/term/b\fR
|
||||
.PP
|
||||
Output nello stile delle `include' di C (opzione \-i ) con uno zero binario a fine stringa
|
||||
.br
|
||||
\fI% echo -n \&"0123456789\&" > cifre\fR
|
||||
.br
|
||||
\fI% xxd -i -t cifre\fR
|
||||
.br
|
||||
unsigned char cifre[] = {
|
||||
.br
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
|
||||
.br
|
||||
};
|
||||
.br
|
||||
unsigned int cifre_len = 10;
|
||||
.PP
|
||||
.SH CODICI DI RITORNO
|
||||
Il programma può restituire questi codici di errore:
|
||||
.TP
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
.TH XXD 1 "Maggio 2024" "Pagina di manuale per xxd"
|
||||
.TH XXD 1 "Mar 2026" "Pagina di manuale per xxd"
|
||||
.\"
|
||||
.\" 21 Maggio 1996
|
||||
.\" Autore della pagina di manuale:
|
||||
.\" 21st May 1996
|
||||
.\" Man page author:
|
||||
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
|
||||
.\" Modificato da Bram Moolenaar <Bram@vim.org>
|
||||
.\" Changes by Bram Moolenaar <Bram@vim.org>
|
||||
.SH NOME
|
||||
.I xxd
|
||||
\- Produce lista esadecimale da un file binario o viceversa.
|
||||
@@ -170,11 +170,14 @@ byte assoluti (o relativi) di distanza all'interno di input_file.
|
||||
(o se in combinazione con \fI+ \fR: prima della posizione corrente nel file `standard input').
|
||||
Se non si specifica l'opzione \-s, xxd inizia dalla posizione corrente all'interno del file.
|
||||
.TP
|
||||
.I \-t
|
||||
Quando l'output è nello stile delle `include' di C (opzione \-i ) aggiungere uno zero binario a fine stringa.
|
||||
.TP
|
||||
.I \-u
|
||||
Usa lettere esadecimali maiuscole. Per default si usano lettere minuscole.
|
||||
Usare lettere esadecimali maiuscole. Per default si usano lettere minuscole.
|
||||
.TP
|
||||
.IR \-v " | " \-version
|
||||
Visualizza la stringa contenente la versione del programma.
|
||||
Visualizzare la stringa contenente la versione del programma.
|
||||
.SH ATTENZIONE
|
||||
.PP
|
||||
.I xxd \-r
|
||||
@@ -182,7 +185,8 @@ Visualizza la stringa contenente la versione del programma.
|
||||
Se è possibili posizionarsi tramite `seek' sul file di output, il numero di riga
|
||||
di ogni riga esadecimale può essere non ordinato, delle righe possono mancare, o
|
||||
sovrapporsi. In tal caso xxd userà lseek(2) per posizionarsi all'interno del file.
|
||||
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi", che saranno riempiti con zeri binari.
|
||||
Se per il file di output non si può usare `seek', sono permessi solo dei "buchi",
|
||||
che saranno riempiti con zeri binari.
|
||||
.PP
|
||||
.I xxd \-r
|
||||
non genera mai errori per parametri errati. I parametri extra sono silenziosamente ignorati.
|
||||
@@ -246,25 +250,25 @@ Stampa 3 righe (0x30 byte in esadecimale) alla fine di
|
||||
\fI% xxd \-s \-0x30 file\fR
|
||||
.PP
|
||||
Nota: I risultati degli esempi seguenti sono riferiti alla versione di
|
||||
Maggio 2024 della pagina di manuale [quella che state leggendo].
|
||||
Marzo 2026 della pagina di manuale [quella che state leggendo].
|
||||
.PP
|
||||
.br
|
||||
Stampa 120 byte come immagine esadecimale continua con 20 byte per riga.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
2e544820585844203120224d616767696f203230
|
||||
2e544820585844203120224d6172203230323622
|
||||
.br
|
||||
3234222022506167696e61206469206d616e7561
|
||||
2022506167696e61206469206d616e75616c6520
|
||||
.br
|
||||
6c652070657220787864220a2e5c220a2e5c2220
|
||||
70657220787864220a2e5c220a2e5c2220323173
|
||||
.br
|
||||
3231204d616767696f20313939360a2e5c222041
|
||||
74204d617920313939360a2e5c22204d616e2070
|
||||
.br
|
||||
75746f72652064656c6c6120706167696e612064
|
||||
61676520617574686f723a0a2e5c222020202054
|
||||
.br
|
||||
6f6e79204e7567656e74203c746f6e7940736374
|
||||
.br
|
||||
69206d616e75616c653a0a2e5c2220202020546f
|
||||
.PP
|
||||
|
||||
.br
|
||||
Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
|
||||
@@ -273,30 +277,30 @@ Stampa i primi 120 byte di questa pagina di manuale a 12 byte per riga.
|
||||
.br
|
||||
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
.br
|
||||
0000000c: 6167 6769 6f20 3230 3234 2220 aggio 2024"
|
||||
0000000c: 6172 2032 3032 3622 2022 5061 ar 2026" "Pa
|
||||
.br
|
||||
00000018: 2250 6167 696e 6120 6469 206d "Pagina di m
|
||||
00000018: 6769 6e61 2064 6920 6d61 6e75 gina di manu
|
||||
.br
|
||||
00000024: 616e 7561 6c65 2070 6572 2078 anuale per x
|
||||
00000024: 616c 6520 7065 7220 7878 6422 ale per xxd"
|
||||
.br
|
||||
00000030: 7864 220a 2e5c 220a 2e5c 2220 xd"..\"..\"
|
||||
00000030: 0a2e 5c22 0a2e 5c22 2032 3173 ..\\"..\\" 21s
|
||||
.br
|
||||
0000003c: 3231 204d 6167 6769 6f20 3139 21 Maggio 19
|
||||
0000003c: 7420 4d61 7920 3139 3936 0a2e t May 1996..
|
||||
.br
|
||||
00000048: 3936 0a2e 5c22 2041 7574 6f72 96..\" Autor
|
||||
00000048: 5c22 204d 616e 2070 6167 6520 \\" Man page
|
||||
.br
|
||||
00000054: 6520 6465 6c6c 6120 7061 6769 e della pagi
|
||||
00000054: 6175 7468 6f72 3a0a 2e5c 2220 author:..\\"
|
||||
.br
|
||||
00000060: 6e61 2064 6920 6d61 6e75 616c na di manual
|
||||
00000060: 2020 2054 6f6e 7920 4e75 6765 Tony Nuge
|
||||
.br
|
||||
0000006c: 653a 0a2e 5c22 2020 2020 546f e:..\" To
|
||||
0000006c: 6e74 203c 746f 6e79 4073 6374 nt <tony@sct
|
||||
.PP
|
||||
.br
|
||||
Visualizza la data dal file xxd-it.UTF-8.1
|
||||
Visualizza la data della prima versione di questa pagina dal file xxd-it.UTF-8.1
|
||||
.br
|
||||
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
|
||||
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
0000003c: 3231 204d 6167 6769 6f20 3139 3936 21 Maggio 1996
|
||||
00000039: 3231 7374 204d 6179 2031 3939 36 21st May 1996
|
||||
.PP
|
||||
.br
|
||||
Copia
|
||||
@@ -311,11 +315,11 @@ premettendogli 100 byte a 0x00.
|
||||
.br
|
||||
Modifica (patch) la data nel file xxd-it.UTF-8.1
|
||||
.br
|
||||
\fI% echo "000003c: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
|
||||
\fI% echo "0000039: 3331" | xxd \-r \- xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
\fI% xxd \-s 0x3c \-l 14 \-c 14 xxd-it.UTF-8.1\fR
|
||||
\fI% xxd \-s 0x39 \-l 13 \-c 13 xxd-it.UTF-8.1\fR
|
||||
.br
|
||||
0000003c: 3331 204d 6167 6769 6f20 3139 3936 31 Maggio 1996
|
||||
00000039: 3331 7374 204d 6179 2031 3939 36 31st May 1996
|
||||
.PP
|
||||
.br
|
||||
Crea un file di 65537 byte tutto a 0x00,
|
||||
@@ -366,6 +370,20 @@ Leggere singoli caratteri da una linea seriale
|
||||
.br
|
||||
\fI% echo \-n foo > /dev/term/b\fR
|
||||
.PP
|
||||
Output nello stile delle `include' di C (opzione \-i ) con uno zero binario a fine stringa
|
||||
.br
|
||||
\fI% echo -n \&"0123456789\&" > cifre\fR
|
||||
.br
|
||||
\fI% xxd -i -t cifre\fR
|
||||
.br
|
||||
unsigned char cifre[] = {
|
||||
.br
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
|
||||
.br
|
||||
};
|
||||
.br
|
||||
unsigned int cifre_len = 10;
|
||||
.PP
|
||||
.SH CODICI DI RITORNO
|
||||
Il programma può restituire questi codici di errore:
|
||||
.TP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH XXD 1 "May 2024" "Справочник по программе xxd"
|
||||
.TH XXD 1 "Март 2026" "Справочник по программе xxd"
|
||||
.\"
|
||||
.\" 21st May 1996
|
||||
.\" Man page author:
|
||||
@@ -203,6 +203,10 @@ ASCII,
|
||||
Если аргумент \-s не используется, то программа xxd начинает обработку
|
||||
от текущей позиции в файле.
|
||||
.TP
|
||||
.I \-t
|
||||
При использовании аргумента \-i для вывода в стиле подключаемых заголовочных
|
||||
файлов языка Си также включать завершающий нулевой символ
|
||||
.TP
|
||||
.I \-u
|
||||
Указывает, что в выводе отображать шестнадцатеричные цифры в верхнем регистре.
|
||||
По умолчанию используются символы в нижнем регистре символов.
|
||||
@@ -304,7 +308,7 @@ PostScript
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
||||
.br
|
||||
2e544820585844203120224d6179203230323422
|
||||
2e544820585844203120224d6172203230323622
|
||||
.br
|
||||
20224d616e75616c207061676520666f72207878
|
||||
.br
|
||||
@@ -327,7 +331,7 @@ PostScript
|
||||
.br
|
||||
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
.br
|
||||
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
|
||||
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
|
||||
.br
|
||||
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
|
||||
.br
|
||||
@@ -433,6 +437,20 @@ PostScript
|
||||
.br
|
||||
\fI% echo \-n foo \> /dev/term/b\fR
|
||||
.PP
|
||||
Вывод в стиле подключаемых заголовочных файлв языка Си с завершающим нулём
|
||||
.br
|
||||
\fI% echo -n \&"0123456789\&" > digits\fR
|
||||
.br
|
||||
\fI% xxd -i -t digits\fR
|
||||
.br
|
||||
unsigned char digits[] = {
|
||||
.br
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
|
||||
.br
|
||||
};
|
||||
.br
|
||||
unsigned int digits_len = 10;
|
||||
.PP
|
||||
.SH КОДЫ ЗАВЕРШЕНИЯ
|
||||
При завершении работы, программа xxd возвращает следующие значения:
|
||||
.TP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH XXD 1 "May 2024" "Справочник по программе xxd"
|
||||
.TH XXD 1 "Март 2026" "Справочник по программе xxd"
|
||||
.\"
|
||||
.\" 21st May 1996
|
||||
.\" Man page author:
|
||||
@@ -203,6 +203,10 @@ ASCII, которые можно передавать по электронно
|
||||
Если аргумент \-s не используется, то программа xxd начинает обработку
|
||||
от текущей позиции в файле.
|
||||
.TP
|
||||
.I \-t
|
||||
При использовании аргумента \-i для вывода в стиле подключаемых заголовочных
|
||||
файлов языка Си также включать завершающий нулевой символ
|
||||
.TP
|
||||
.I \-u
|
||||
Указывает, что в выводе отображать шестнадцатеричные цифры в верхнем регистре.
|
||||
По умолчанию используются символы в нижнем регистре символов.
|
||||
@@ -304,7 +308,7 @@ PostScript с помощью команды xxd \-r \-p количество к
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
||||
.br
|
||||
2e544820585844203120224d6179203230323422
|
||||
2e544820585844203120224d6172203230323622
|
||||
.br
|
||||
20224d616e75616c207061676520666f72207878
|
||||
.br
|
||||
@@ -327,7 +331,7 @@ PostScript с помощью команды xxd \-r \-p количество к
|
||||
.br
|
||||
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
.br
|
||||
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
|
||||
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
|
||||
.br
|
||||
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
|
||||
.br
|
||||
@@ -433,6 +437,20 @@ PostScript с помощью команды xxd \-r \-p количество к
|
||||
.br
|
||||
\fI% echo \-n foo \> /dev/term/b\fR
|
||||
.PP
|
||||
Вывод в стиле подключаемых заголовочных файлв языка Си с завершающим нулём
|
||||
.br
|
||||
\fI% echo -n \&"0123456789\&" > digits\fR
|
||||
.br
|
||||
\fI% xxd -i -t digits\fR
|
||||
.br
|
||||
unsigned char digits[] = {
|
||||
.br
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
|
||||
.br
|
||||
};
|
||||
.br
|
||||
unsigned int digits_len = 10;
|
||||
.PP
|
||||
.SH КОДЫ ЗАВЕРШЕНИЯ
|
||||
При завершении работы, программа xxd возвращает следующие значения:
|
||||
.TP
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH XXD 1 "May 2024" "Manual page for xxd"
|
||||
.TH XXD 1 "Mar 2026" "Manual page for xxd"
|
||||
.\"
|
||||
.\" 21st May 1996
|
||||
.\" Man page author:
|
||||
@@ -169,6 +169,9 @@ should be that many characters from the end of the input (or if combined with
|
||||
\fI+\fR: before the current stdin file position).
|
||||
Without \-s option, xxd starts at the current file position.
|
||||
.TP
|
||||
.I \-t
|
||||
When outputting in C include file style using \-i include the terminating zero.
|
||||
.TP
|
||||
.I \-u
|
||||
Use upper-case hex letters. Default is lower-case.
|
||||
.TP
|
||||
@@ -243,14 +246,14 @@ Print 3 lines (hex 0x30 bytes) from the end of
|
||||
\fI% xxd \-s \-0x30 file\fR
|
||||
.PP
|
||||
Note: The results of the examples below are relevant to the xxd.1 man page as of
|
||||
May 2024
|
||||
March 2026
|
||||
.PP
|
||||
.br
|
||||
Print 120 bytes as a continuous hex dump with 20 octets per line.
|
||||
.br
|
||||
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
|
||||
.br
|
||||
2e544820585844203120224d6179203230323422
|
||||
2e544820585844203120224d6172203230323622
|
||||
.br
|
||||
20224d616e75616c207061676520666f72207878
|
||||
.br
|
||||
@@ -270,7 +273,7 @@ Hex dump the first 120 bytes of this man page with 12 octets per line.
|
||||
.br
|
||||
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
.br
|
||||
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
|
||||
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
|
||||
.br
|
||||
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
|
||||
.br
|
||||
@@ -363,6 +366,20 @@ Read single characters from a serial line
|
||||
.br
|
||||
\fI% echo \-n foo > /dev/term/b\fR
|
||||
.PP
|
||||
Output in C style include output with terminating zero
|
||||
.br
|
||||
\fI% echo -n \&"0123456789\&" > digits\fR
|
||||
.br
|
||||
\fI% xxd -i -t digits\fR
|
||||
.br
|
||||
unsigned char digits[] = {
|
||||
.br
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
|
||||
.br
|
||||
};
|
||||
.br
|
||||
unsigned int digits_len = 10;
|
||||
.PP
|
||||
.SH "RETURN VALUES"
|
||||
The following error values are returned:
|
||||
.TP
|
||||
|
||||
@@ -119,26 +119,29 @@ OPTIONS
|
||||
(or if combined with +: before the current stdin file position).
|
||||
Without -s option, xxd starts at the current file position.
|
||||
|
||||
-t When outputting in C include file style using -i include the
|
||||
terminating zero.
|
||||
|
||||
-u Use upper-case hex letters. Default is lower-case.
|
||||
|
||||
-v | -version
|
||||
Show version string.
|
||||
|
||||
CAVEATS
|
||||
xxd -r has some built-in magic while evaluating line number informa‐
|
||||
tion. If the output file is seekable, then the line numbers at the
|
||||
start of each hex dump line may be out of order, lines may be missing,
|
||||
or overlapping. In these cases xxd will lseek(2) to the next position.
|
||||
If the output file is not seekable, only gaps are allowed, which will
|
||||
xxd -r has some built-in magic while evaluating line number informa‐
|
||||
tion. If the output file is seekable, then the line numbers at the
|
||||
start of each hex dump line may be out of order, lines may be missing,
|
||||
or overlapping. In these cases xxd will lseek(2) to the next position.
|
||||
If the output file is not seekable, only gaps are allowed, which will
|
||||
be filled by null-bytes.
|
||||
|
||||
xxd -r never generates parse errors. Garbage is silently skipped.
|
||||
|
||||
When editing hex dumps, please note that xxd -r skips everything on the
|
||||
input line after reading enough columns of hexadecimal data (see option
|
||||
-c). This also means that changes to the printable ASCII (or EBCDIC)
|
||||
-c). This also means that changes to the printable ASCII (or EBCDIC)
|
||||
columns are always ignored. Reverting a plain (or PostScript) style hex
|
||||
dump with xxd -r -p does not depend on the correct number of columns.
|
||||
dump with xxd -r -p does not depend on the correct number of columns.
|
||||
Here, anything that looks like a pair of hex digits is interpreted.
|
||||
|
||||
Note the difference between
|
||||
@@ -146,28 +149,28 @@ CAVEATS
|
||||
and
|
||||
% xxd -i < file
|
||||
|
||||
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
|
||||
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
|
||||
"rewind" input. A '+' makes a difference if the input source is stdin,
|
||||
and if stdin's file position is not at the start of the file by the
|
||||
time xxd is started and given its input. The following examples may
|
||||
and if stdin's file position is not at the start of the file by the
|
||||
time xxd is started and given its input. The following examples may
|
||||
help to clarify (or further confuse!):
|
||||
|
||||
Rewind stdin before reading; needed because the `cat' has already read
|
||||
Rewind stdin before reading; needed because the `cat' has already read
|
||||
to the end of stdin.
|
||||
% sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file
|
||||
|
||||
Hex dump from file position 0x480 (=1024+128) onwards. The `+' sign
|
||||
Hex dump from file position 0x480 (=1024+128) onwards. The `+' sign
|
||||
means "relative to the current position", thus the `128' adds to the 1k
|
||||
where dd left off.
|
||||
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet"
|
||||
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet"
|
||||
< file
|
||||
|
||||
Hex dump from file position 0x100 (=1024-768) onwards.
|
||||
% sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet"
|
||||
< file
|
||||
|
||||
However, this is a rare situation and the use of `+' is rarely needed.
|
||||
The author prefers to monitor the effect of xxd with strace(1) or
|
||||
However, this is a rare situation and the use of `+' is rarely needed.
|
||||
The author prefers to monitor the effect of xxd with strace(1) or
|
||||
truss(1), whenever -s is used.
|
||||
|
||||
EXAMPLES
|
||||
@@ -177,12 +180,12 @@ EXAMPLES
|
||||
Print 3 lines (hex 0x30 bytes) from the end of file.
|
||||
% xxd -s -0x30 file
|
||||
|
||||
Note: The results of the examples below are relevant to the xxd.1 man
|
||||
page as of May 2024
|
||||
Note: The results of the examples below are relevant to the xxd.1 man
|
||||
page as of March 2026
|
||||
|
||||
Print 120 bytes as a continuous hex dump with 20 octets per line.
|
||||
% xxd -l 120 -ps -c 20 xxd.1
|
||||
2e544820585844203120224d6179203230323422
|
||||
2e544820585844203120224d6172203230323622
|
||||
20224d616e75616c207061676520666f72207878
|
||||
64220a2e5c220a2e5c222032317374204d617920
|
||||
313939360a2e5c22204d616e2070616765206175
|
||||
@@ -192,7 +195,7 @@ EXAMPLES
|
||||
Hex dump the first 120 bytes of this man page with 12 octets per line.
|
||||
% xxd -l 120 -c 12 xxd.1
|
||||
00000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
|
||||
0000000c: 6179 2032 3032 3422 2022 4d61 ay 2024" "Ma
|
||||
0000000c: 6172 2032 3032 3622 2022 4d61 ar 2026" "Ma
|
||||
00000018: 6e75 616c 2070 6167 6520 666f nual page fo
|
||||
00000024: 7220 7878 6422 0a2e 5c22 0a2e r xxd"..\"..
|
||||
00000030: 5c22 2032 3173 7420 4d61 7920 \" 21st May
|
||||
@@ -214,7 +217,7 @@ EXAMPLES
|
||||
% xxd -s 0x33 -l 13 -c 13 xxd.1
|
||||
00000033: 3235 7468 204d 6179 2031 3939 36 25th May 1996
|
||||
|
||||
Create a 65537 byte file with all bytes 0x00, except for the last one
|
||||
Create a 65537 byte file with all bytes 0x00, except for the last one
|
||||
which is 'A' (hex 0x41).
|
||||
% echo "010000: 41" | xxd -r > file
|
||||
|
||||
@@ -225,11 +228,11 @@ EXAMPLES
|
||||
0000fffc: 0000 0000 41 ....A
|
||||
|
||||
Create a 1 byte file containing a single 'A' character. The number af‐
|
||||
ter '-r -s' adds to the line numbers found in the file; in effect, the
|
||||
ter '-r -s' adds to the line numbers found in the file; in effect, the
|
||||
leading bytes are suppressed.
|
||||
% echo "010000: 41" | xxd -r -s -0x10000 > file
|
||||
|
||||
Use xxd as a filter within an editor such as vim(1) to hex dump a re‐
|
||||
Use xxd as a filter within an editor such as vim(1) to hex dump a re‐
|
||||
gion marked between `a' and `z'.
|
||||
:'a,'z!xxd
|
||||
|
||||
@@ -246,6 +249,14 @@ EXAMPLES
|
||||
% stty < /dev/term/b -echo -opost -isig -icanon min 1
|
||||
% echo -n foo > /dev/term/b
|
||||
|
||||
Output in C style include output with terminating zero
|
||||
% echo -n "0123456789" > digits
|
||||
% xxd -i -t digits
|
||||
unsigned char digits[] = {
|
||||
0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x00
|
||||
};
|
||||
unsigned int digits_len = 10;
|
||||
|
||||
RETURN VALUES
|
||||
The following error values are returned:
|
||||
|
||||
@@ -283,4 +294,4 @@ AUTHOR
|
||||
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
|
||||
Small changes by Bram Moolenaar. Edited by Juergen Weigert.
|
||||
|
||||
Manual page for xxd May 2024 XXD(1)
|
||||
Manual page for xxd Mar 2026 XXD(1)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2026 Mar 19
|
||||
" Last Change: 2026 Apr 20
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If the filetype can be detected from extension or file name(the final path component),
|
||||
@@ -119,10 +119,13 @@ au BufNewFile,BufRead */boot/grub/menu.lst,*/boot/grub/grub.conf,*/etc/grub.conf
|
||||
" *.mc omitted - used by dist#ft#McSetf()
|
||||
au BufNewFile,BufRead *.demo,*.dm{1,2,3,t},*.wxm,maxima-init.mac setf maxima
|
||||
|
||||
" ObjectScript routine or assembly
|
||||
au BufNewFile,BufRead *.mac call dist#ft#FTmac()
|
||||
|
||||
" Assembly (all kinds)
|
||||
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
|
||||
" *.[sS], *.[aA] usually Assembly - GNU
|
||||
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call dist#ft#FTasm()
|
||||
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.lst call dist#ft#FTasm()
|
||||
|
||||
" BASIC or Visual Basic
|
||||
au BufNewFile,BufRead *.bas call dist#ft#FTbas()
|
||||
@@ -572,6 +575,9 @@ au BufNewFile,BufRead *.pro call dist#ft#ProtoCheck('idlang')
|
||||
" Initng
|
||||
au BufNewFile,BufRead */etc/initng/*/*.i,*.ii setf initng
|
||||
|
||||
" Intel HEX or ObjectScript routine
|
||||
au BufNewFile,BufRead *.int call dist#ft#FTint()
|
||||
|
||||
" Innovation Data Processing
|
||||
au BufNewFile,BufRead upstream.dat\c,upstream.*.dat\c,*.upstream.dat\c setf upstreamdat
|
||||
au BufNewFile,BufRead fdrupstream.log,upstream.log\c,upstream.*.log\c,*.upstream.log\c,UPSTREAM-*.log\c setf upstreamlog
|
||||
@@ -884,7 +890,10 @@ au BufNewFile,BufRead requirements/*.txt setf requirements
|
||||
au BufNewFile,BufRead requires/*.txt setf requirements
|
||||
|
||||
" Pkl
|
||||
au BufNewFile,BufRead *.pkl,*.pcf,pkl-lsp://* setf pkl
|
||||
au BufNewFile,BufRead PklProject,*.pkl,*.pcf,pkl-lsp://* setf pkl
|
||||
|
||||
" WIC kickstarter files
|
||||
au BufNewFile,BufRead *.wks,*.wks.in,*.wks.inc setf wks
|
||||
|
||||
" Povray, Pascal, PHP or assembly
|
||||
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
|
||||
@@ -1303,7 +1312,7 @@ au BufNewFile,BufRead *Xmodmap setf xmodmap
|
||||
au BufNewFile,BufRead *.y call dist#ft#FTy()
|
||||
|
||||
" Yaml
|
||||
au BufNewFile,BufRead */.kube/config,*/.kube/kuberc setf yaml
|
||||
au BufNewFile,BufRead buf.lock,*/.kube/config,*/.kube/kuberc setf yaml
|
||||
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.conf setf dosini
|
||||
@@ -1608,6 +1617,10 @@ au BufNewFile,BufRead *.txt
|
||||
\| setf text
|
||||
\| endif
|
||||
|
||||
" Ghostty configuration
|
||||
au BufNewFile,BufRead */ghostty/config setf ghostty
|
||||
au BufNewFile,BufRead */ghostty/themes/* call s:StarSetf('ghostty')
|
||||
au BufNewFile,BufRead */com.mitchellh.ghostty/config setf ghostty
|
||||
|
||||
|
||||
" Generic log file
|
||||
|
||||
47
runtime/ftplugin/algol68.vim
Normal file
47
runtime/ftplugin/algol68.vim
Normal file
@@ -0,0 +1,47 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Algol 68
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2026 Apr 23
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" TODO: 'comments'
|
||||
|
||||
setlocal commentstring=#\ %s\ #
|
||||
|
||||
let &l:include='\c\%(^\|;\)\s*\%(PR\|PRAGMAT\)\s\+\%(read\|include\)'
|
||||
|
||||
let b:undo_ftplugin = "setl cms< inc<"
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '\<BEGIN\>:\<END\>,' ..
|
||||
\ '\<IF\>:\<THEN\>:\<ELIF\>:\<ELSE\>:\<FI\>,' ..
|
||||
\ '\<CASE\>:\<IN\>:\<OUSE\>:\<OUT\>:\<ESAC\>,' ..
|
||||
"\ TODO: loops have overlapping start and intermediate keywords like
|
||||
"\ `TO` which are difficult to match with patterns alone.
|
||||
\ '\<DO\>:\<OD\>'
|
||||
let b:match_skip = 's:Comment\|String\|PreProc'
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_skip b:match_words"
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Algol 68 Source Files (*.a68)\t*.a68\n"
|
||||
if has("win32")
|
||||
let b:browsefilter ..= "All Files (*.*)\t*\n"
|
||||
else
|
||||
let b:browsefilter ..= "All Files (*)\t*\n"
|
||||
endif
|
||||
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
@@ -2,6 +2,8 @@
|
||||
" Language: Cucumber
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" 2026 May 26 by Vim Project: prevent Code Injection
|
||||
" https://github.com/vim/vim/security/advisories/GHSA-4473-94jm-w5x9
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
@@ -96,7 +98,8 @@ function! s:stepmatch(receiver,target)
|
||||
catch
|
||||
endtry
|
||||
if has("ruby") && pattern !~ '\\\@<!#{'
|
||||
ruby VIM.command("return #{if (begin; Kernel.eval('/'+VIM.evaluate('pattern')+'/'); rescue SyntaxError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
|
||||
" Use Regexp.new, so the pattern stays untrusted data and cannot inject Ruby
|
||||
ruby VIM.command("return #{if (begin; Regexp.new(VIM.evaluate('pattern')); rescue RegexpError; end) === VIM.evaluate('a:target') then 1 else 0 end}")
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
|
||||
@@ -5,10 +5,15 @@
|
||||
" Last Change: February 1, 2023
|
||||
" 2023 Aug 28 by Vim Project (undo_ftplugin)
|
||||
" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" 2026 Mar 16 by Phạm Bình An (add matchit support)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:saved_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal iskeyword=@,48-57,_,192-255,-,.
|
||||
@@ -17,3 +22,20 @@ setlocal commentstring=#\ %s
|
||||
setlocal formatoptions+=crjq
|
||||
|
||||
let b:undo_ftplugin = "setl cms< com< fo< isk<"
|
||||
|
||||
" Define patterns for the matchit plugin
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_words =
|
||||
\ '\<\%(else\s\+\)\@<!if\>\|\<\%(switch\|begin\|function\|while\|for\)\>:' ..
|
||||
\ '\<else\%(\s\+if\)\?\>\|\<case\>:' ..
|
||||
\ '\<end\>'
|
||||
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_skip = "S:keyword"
|
||||
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_words b:match_ignorecase b:match_skip"
|
||||
endif
|
||||
|
||||
" Restore 'cpo' to its original value
|
||||
let &cpo = s:saved_cpo
|
||||
unlet s:saved_cpo
|
||||
|
||||
10
runtime/ftplugin/ghostty.vim
Normal file
10
runtime/ftplugin/ghostty.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: ghostty
|
||||
|
||||
" Quit if a ftplugin file was already loaded
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Use the cfg plugin, it's similar enough.
|
||||
runtime! ftplugin/cfg.vim
|
||||
@@ -4,6 +4,7 @@
|
||||
" Last Change: 2025 Apr 08
|
||||
" 2025 Apr 08 by Vim project (set 'omnifunc' and 'iskeyword', #17073)
|
||||
" 2025 Aug 08 by Vim project (unset comment options, #17889)
|
||||
" 2026 Apr 26 by Vim project (make HelpComplete global, #20024)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -17,14 +18,14 @@ let b:undo_ftplugin = "setl isk< fo< tw< cole< cocu< keywordprg< omnifunc< comme
|
||||
|
||||
setl comments= cms=
|
||||
|
||||
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=s:HelpComplete
|
||||
setlocal formatoptions+=tcroql textwidth=78 keywordprg=:help omnifunc=HelpComplete
|
||||
let &l:iskeyword='!-~,^*,^|,^",192-255'
|
||||
if has("conceal")
|
||||
setlocal cole=2 cocu=nc
|
||||
endif
|
||||
|
||||
if !exists('*s:HelpComplete')
|
||||
func s:HelpComplete(findstart, base)
|
||||
if !exists('*HelpComplete')
|
||||
func HelpComplete(findstart, base)
|
||||
if a:findstart
|
||||
let colnr = col('.') - 1 " Get the column number before the cursor
|
||||
let line = getline('.')
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Language: Justfile
|
||||
" Maintainer: Peter Benjamin <@pbnj>
|
||||
" Last Change: 2025 Jan 19
|
||||
" 2026 May 17 by Vim Project: add 'suffixesadd' #20197
|
||||
" Credits: The original author, Noah Bogart <https://github.com/NoahTheDuke/vim-just/>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
@@ -13,5 +14,6 @@ let b:did_ftplugin = 1
|
||||
setlocal iskeyword+=-
|
||||
setlocal comments=n:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal suffixesadd=.just
|
||||
|
||||
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring<"
|
||||
let b:undo_ftplugin = "setlocal iskeyword< comments< commentstring< suffixesadd<"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Nvidia PTX (Parellel Thread Execution)
|
||||
" Language: Nvidia PTX (Parallel Thread Execution)
|
||||
" Maintainer: Yinzuo Jiang <jiangyinzuo@foxmail.com>
|
||||
" Last Change: 2024-12-05
|
||||
" 2026 May 04 by Vim Project: fix typo
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
" Previous Maintainer: Will Langstroth <will@langstroth.com>
|
||||
" URL: https://github.com/benknoble/vim-racket
|
||||
" Last Change: 2025 Aug 09
|
||||
" 2026 Mar 31 by Vim project: use shellescape for the K mapping
|
||||
" 2026 Apr 01 by Vim project: make K mapping more robust for shell injection
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -51,7 +53,7 @@ if !exists("no_plugin_maps") && !exists("no_racket_maps")
|
||||
try
|
||||
let l:old_a = @a
|
||||
normal! gv"ay
|
||||
call system("raco docs '". @a . "'")
|
||||
call system("raco docs -- ". string(shellescape(@a)))
|
||||
redraw!
|
||||
return @a
|
||||
finally
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2024 Sep 19 (simplify keywordprg #15696)
|
||||
" 2024 Jul 22 by Vim project (use :hor term #17822)
|
||||
" 2026 May 04 by Vim Project: fix typo
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -26,7 +27,7 @@ if exists("loaded_matchit") && !exists("b:match_words")
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Readline Intialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n"
|
||||
let b:browsefilter = "Readline Initialization Files (inputrc, .inputrc)\tinputrc;*.inputrc\n"
|
||||
if has("win32")
|
||||
let b:browsefilter ..= "All Files (*.*)\t*\n"
|
||||
else
|
||||
|
||||
14
runtime/ftplugin/wks.vim
Normal file
14
runtime/ftplugin/wks.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: OpenEmbedded Image Creator (WIC) Kickstarter files wks
|
||||
" Maintainer: Anakin Childerhose <anakin@childerhose.ca>
|
||||
" Last Change: 2026 Mar 23
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setlocal com< cms<'
|
||||
@@ -9,9 +9,13 @@ Name[es]=GVim
|
||||
Name[fi]=GVim
|
||||
Name[fr]=GVim
|
||||
Name[ga]=GVim
|
||||
Name[hy]=ԳՎիմ
|
||||
Name[it]=GVim
|
||||
Name[ru]=GVim
|
||||
Name[ja]=GVim
|
||||
Name[ru]=gVim
|
||||
Name[sr]=GVim
|
||||
Name[sv]=GVim
|
||||
Name[ta]=சிவிம்
|
||||
Name[tr]=GVim
|
||||
Name[uk]=GVim
|
||||
Name[zh_CN]=GVim
|
||||
@@ -24,12 +28,14 @@ GenericName[es]=Editor de texto
|
||||
GenericName[fi]=Tekstinmuokkain
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[ga]=Eagarthóir Téacs
|
||||
GenericName[hy]=Տեքստի խմբագիր
|
||||
GenericName[it]=Editor di testi
|
||||
GenericName[ja]=テキストエディタ
|
||||
GenericName[ru]=Текстовый редактор
|
||||
GenericName[sr]=Едитор текст
|
||||
GenericName[sr]=Едитор текста
|
||||
GenericName[sv]=Textredigerare
|
||||
GenericName[tr]=Metin Düzenleyici
|
||||
GenericName[ta]=உரை திருத்தி
|
||||
GenericName[tr]=Metin Düzenleyicisi
|
||||
GenericName[uk]=Редактор Тексту
|
||||
GenericName[zh_CN]=文本编辑器
|
||||
GenericName=Text Editor
|
||||
@@ -41,11 +47,14 @@ Comment[es]=Editar archivos de texto
|
||||
Comment[fi]=Muokkaa tekstitiedostoja
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[ga]=Cuir comhaid téacs in eagar
|
||||
Comment[hy]=Խմբագրել տեքստային ֆայլերը
|
||||
Comment[it]=Edita file di testo
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
Comment[ru]=Редактирование текстовых файлов
|
||||
Comment[ru]=Редактировать текстовые файлы
|
||||
Comment[sr]=Уређујте текст фајлове
|
||||
Comment[tr]=Metin dosyaları düzenleyin
|
||||
Comment[sv]=Redigera textfiler
|
||||
Comment[ta]=உரை கோப்புகளைத் திருத்தவும்
|
||||
Comment[tr]=Metin dosyalarını düzenleyin
|
||||
Comment[uk]=Редагувати текстові файли
|
||||
Comment[zh_CN]=编辑文本文件
|
||||
Comment=Edit text files
|
||||
@@ -55,7 +64,6 @@ GenericName[da]=Teksteditor
|
||||
GenericName[pl]=Edytor tekstu
|
||||
GenericName[is]=Ritvinnsluforrit
|
||||
Comment[af]=Redigeer tekslêers
|
||||
Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
|
||||
Comment[ar]=حرّر ملفات نصية
|
||||
Comment[az]=Mətn fayllarını redaktə edin
|
||||
Comment[be]=Рэдагаваньне тэкставых файлаў
|
||||
@@ -102,8 +110,6 @@ Comment[sk]=Úprava textových súborov
|
||||
Comment[sl]=Urejanje datotek z besedili
|
||||
Comment[sq]=Përpuno files teksti
|
||||
Comment[sr@Latn]=Izmeni tekstualne datoteke
|
||||
Comment[sv]=Redigera textfiler
|
||||
Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
|
||||
Comment[th]=แก้ไขแฟ้มข้อความ
|
||||
Comment[tk]=Metin faýllary editle
|
||||
Comment[vi]=Soạn thảo tập tin văn bản
|
||||
@@ -121,11 +127,13 @@ Keywords[es]=Texto;editor;
|
||||
Keywords[fi]=Teksti;muokkain;editori;
|
||||
Keywords[fr]=Texte;éditeur;
|
||||
Keywords[ga]=Téacs;eagarthóir;
|
||||
Keywords[hy]=Տեքստ;խմբագիր;
|
||||
Keywords[it]=Testo;editor;
|
||||
Keywords[ja]=テキスト;エディタ;
|
||||
Keywords[ru]=текст;текстовый редактор;
|
||||
Keywords[sr]=Текст;едитор;
|
||||
Keywords[sv]=Text;Redigerare;
|
||||
Keywords[sv]=Text;redigerare;
|
||||
Keywords[ta]=உரை;திருத்தி;
|
||||
Keywords[tr]=Metin;düzenleyici;
|
||||
Keywords[uk]=текст;редактор;
|
||||
Keywords[zh_CN]=Text;editor;文本;编辑器;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Maintainer: Raul Segura Acevedo <raulseguraaceved@netscape.net> (Invalid email address)
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2022 Apr 06
|
||||
" 2026 May 04 by Vim Project: fix typo
|
||||
|
||||
if exists("b:did_indent")
|
||||
"finish
|
||||
@@ -71,7 +72,7 @@ fun! CdlGetIndent(lnum)
|
||||
" One 'closing' element at the beginning of the line has already reduced the
|
||||
" indent, but 'else', 'elseif' & 'then' increment it for the next line.
|
||||
" '=' at the beginning already has the right indent (increased for
|
||||
" asignments).
|
||||
" assignments).
|
||||
let f = -1
|
||||
let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)')
|
||||
if inicio > 0
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
" Placeholder for backwards compatilibity: .jsx used to stand for JavaScript.
|
||||
" Placeholder for backwards compatibility: .jsx used to stand for JavaScript.
|
||||
runtime! indent/javascript.vim
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
" Last Change: 2023-09-11
|
||||
" 2024 Jul 04 by Vim Project: use shiftwidth() instead of hard-coding shifted values #15138
|
||||
" 2025 Dec 29 by Vim Project: clean up
|
||||
" 2025 Dec 31 by Vim Project: correcly indent after nested array literal #19042
|
||||
" 2025 Dec 31 by Vim Project: correctly indent after nested array literal #19042
|
||||
" 2026 Jan 28 by Vim Project: fix indentation when a string literal contains 'if' #19265
|
||||
" 2026 May 04 by Vim Project: fix typo
|
||||
|
||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||
" Note: upstream seems umaintained: https://github.com/rust-lang/rust.vim/issues/502
|
||||
|
||||
@@ -3,10 +3,11 @@
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Original Author: Nikolai Weibull <now@bitwi.se>
|
||||
" Previous Maintainer: Peter Aronoff <telemachus@arpinum.org>
|
||||
" Latest Revision: 2019-10-24
|
||||
" Latest Revision: 20260504
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-sh-indent
|
||||
" Changelog:
|
||||
" 20260504 - fix typo
|
||||
" 20250906 - indent function closing properly on multiline commands
|
||||
" 20250318 - Detect local arrays in functions
|
||||
" 20241411 - Detect dash character in function keyword for
|
||||
@@ -233,7 +234,7 @@ function! s:is_array(line)
|
||||
endfunction
|
||||
|
||||
function! s:is_in_block(line)
|
||||
" checks whether a:line is whithin a
|
||||
" checks whether a:line is within a
|
||||
" block e.g. a shell function
|
||||
" foo() {
|
||||
" ..
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Language: Stylus
|
||||
" Maintainer: Marc Harter
|
||||
" Last Change: 2010 May 21
|
||||
" 2026 May 04 by Vim Project: fix typo
|
||||
" Based On: sass.vim from Tim Pope
|
||||
"
|
||||
if exists("b:did_indent")
|
||||
@@ -97,7 +98,7 @@ function! GetStylusIndent()
|
||||
let line = substitute(getline(lnum),'[\s()]\+$','','') " get last line strip ending whitespace
|
||||
let cline = substitute(substitute(getline(v:lnum),'\s\+$','',''),'^\s\+','','') " get current line, trimmed
|
||||
let lastcol = strlen(line) " get last col in prev line
|
||||
let line = substitute(line,'^\s\+','','') " then remove preceeding whitespace
|
||||
let line = substitute(line,'^\s\+','','') " then remove preceding whitespace
|
||||
let indent = indent(lnum) " get indent on prev line
|
||||
let cindent = indent(v:lnum) " get indent on current line
|
||||
let increase = indent + &sw " increase indent by the shift width
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
" Placeholder for backwards compatilibity: .tsx used to stand for TypeScript.
|
||||
" Placeholder for backwards compatibility: .tsx used to stand for TypeScript.
|
||||
runtime! indent/typescript.vim
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2026 Mar 11
|
||||
" Last Change: 2026 May 17
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
@@ -315,6 +315,8 @@ call append("$", "\t" .. s:global_or_local)
|
||||
call <SID>OptionG("tc", &tc)
|
||||
call <SID>AddOption("tagrelative", gettext("file names in a tags file are relative to the tags file"))
|
||||
call <SID>BinOptionG("tr", &tr)
|
||||
call <SID>AddOption("tagsecure", gettext("a :tag command cannot access remote files"))
|
||||
call <SID>BinOptionG("tsc", &tsc)
|
||||
call <SID>AddOption("tagstack", gettext("a :tag command will use the tagstack"))
|
||||
call <SID>BinOptionG("tgst", &tgst)
|
||||
call <SID>AddOption("showfulltag", gettext("when completing tags in Insert mode show more info"))
|
||||
@@ -351,6 +353,8 @@ call append("$", "\t" .. s:local_to_window)
|
||||
call <SID>BinOptionL("sms")
|
||||
call <SID>AddOption("scrolloff", gettext("number of screen lines to show around the cursor"))
|
||||
call append("$", " \tset so=" . &so)
|
||||
call <SID>AddOption("scrolloffpad", gettext("vertically center cursor even at end of file"))
|
||||
call append("$", " \tset sop=" . &sop)
|
||||
call <SID>AddOption("wrap", gettext("long lines wrap"))
|
||||
call append("$", "\t" .. s:local_to_window)
|
||||
call <SID>BinOptionL("wrap")
|
||||
@@ -833,10 +837,6 @@ if has('wayland')
|
||||
call <SID>AddOption("wlseat", gettext("Wayland seat to use"))
|
||||
call <SID>OptionG("wse", &wse)
|
||||
endif
|
||||
if has("wayland_focus_steal")
|
||||
call <SID>AddOption("wlsteal", gettext("Enable wayland focus stealing functionality in order to access the clipboard"))
|
||||
call <SID>BinOptionG("wst", &wst)
|
||||
endif
|
||||
call <SID>AddOption("keymodel", gettext("\"startsel\" and/or \"stopsel\"; what special keys can do"))
|
||||
call <SID>OptionG("km", &km)
|
||||
|
||||
@@ -913,6 +913,8 @@ if has("insert_expand")
|
||||
call <SID>OptionG("pmw", &pmw)
|
||||
call <SID>AddOption("pumborder", gettext("popup border style"))
|
||||
call <SID>OptionG("pb", &pb)
|
||||
call <SID>AddOption("pumopt", gettext("additional options for the popup menu"))
|
||||
call <SID>OptionG("pumopt", &pumopt)
|
||||
call <SID>AddOption("completefunc", gettext("user defined function for Insert mode completion"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cfu")
|
||||
@@ -1106,6 +1108,8 @@ call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("ml")
|
||||
call <SID>AddOption("modelineexpr", gettext("allow setting expression options from a modeline"))
|
||||
call <SID>BinOptionG("mle", &mle)
|
||||
call <SID>AddOption("modelinestrict", gettext("only allow safe options to be set from a modeline"))
|
||||
call <SID>BinOptionG("modelinestrict", &modelinestrict)
|
||||
call <SID>AddOption("modelines", gettext("number of lines to check for modelines"))
|
||||
call append("$", " \tset mls=" . &mls)
|
||||
call <SID>AddOption("binary", gettext("binary file editing"))
|
||||
|
||||
34
runtime/pack/dist/opt/hlyank/plugin/hlyank.vim
vendored
34
runtime/pack/dist/opt/hlyank/plugin/hlyank.vim
vendored
@@ -1,7 +1,7 @@
|
||||
vim9script
|
||||
|
||||
# Highlight Yank plugin
|
||||
# Last Change: 2025 Mar 22
|
||||
# Last Change: 2026 May 11
|
||||
|
||||
def HighlightedYank()
|
||||
|
||||
@@ -28,12 +28,42 @@ def HighlightedYank()
|
||||
return [v[0][1], col_beg, col_end - col_beg]
|
||||
}))
|
||||
var winid = win_getid()
|
||||
timer_start(duration, (_) => m->matchdelete(winid))
|
||||
timer_start(duration, (_) => {
|
||||
if winbufnr(winid) != -1
|
||||
m->matchdelete(winid)
|
||||
endif
|
||||
})
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def HighlightedPut()
|
||||
if !get(g:, "hlput_enable", false)
|
||||
return
|
||||
endif
|
||||
|
||||
var hlgroup = get(g:, "hlput_hlgroup", "IncSearch")
|
||||
var duration = min([get(g:, "hlput_duration", 300), 3000])
|
||||
|
||||
var [beg, end] = [getpos("'["), getpos("']")]
|
||||
var type = v:event.regtype ?? 'v'
|
||||
var pos = getregionpos(beg, end, {type: type, exclusive: false})
|
||||
|
||||
var m = matchaddpos(hlgroup, pos->mapnew((_, v) => {
|
||||
var col_beg = v[0][2] + v[0][3]
|
||||
var col_end = v[1][2] + v[1][3] + 1
|
||||
return [v[0][1], col_beg, col_end - col_beg]
|
||||
}))
|
||||
var winid = win_getid()
|
||||
timer_start(duration, (_) => {
|
||||
if winbufnr(winid) != -1
|
||||
m->matchdelete(winid)
|
||||
endif
|
||||
})
|
||||
enddef
|
||||
|
||||
augroup hlyank
|
||||
autocmd!
|
||||
autocmd TextYankPost * HighlightedYank()
|
||||
autocmd TextPutPost * HighlightedPut()
|
||||
augroup END
|
||||
# vim:sts=2:sw=2:et:
|
||||
|
||||
99
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
99
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
@@ -1,27 +1,7 @@
|
||||
" Creator: Charles E Campbell
|
||||
" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Last Change:
|
||||
" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option #17901)
|
||||
" 2025 Aug 07 by Vim Project (netrw#BrowseX() distinguishes remote files #17794)
|
||||
" 2025 Aug 22 by Vim Project netrw#Explore handle terminal correctly #18069
|
||||
" 2025 Sep 05 by Vim Project ensure netrw#fs#Dirname() returns trailing slash #18199
|
||||
" 2025 Sep 11 by Vim Project only keep cursor position in tree mode #18275
|
||||
" 2025 Sep 17 by Vim Project tighten the regex to handle remote compressed archives #18318
|
||||
" 2025 Sep 18 by Vim Project 'equalalways' not always respected #18358
|
||||
" 2025 Oct 01 by Vim Project fix navigate to parent folder #18464
|
||||
" 2025 Oct 26 by Vim Project fix parsing of remote user names #18611
|
||||
" 2025 Oct 27 by Vim Project align comment after #18611
|
||||
" 2025 Nov 01 by Vim Project fix NetrwChgPerm #18674
|
||||
" 2025 Nov 13 by Vim Project don't wipe unnamed buffers #18740
|
||||
" 2025 Nov 18 by Vim Project use UNC paths when using scp and Windows paths #18764
|
||||
" 2025 Nov 28 by Vim Project fix undefined variable in *NetrwMenu #18829
|
||||
" 2025 Dec 26 by Vim Project fix use of g:netrw_cygwin #19015
|
||||
" 2026 Jan 19 by Vim Project do not create swapfiles #18854
|
||||
" 2026 Feb 15 by Vim Project fix global variable initialization for MS-Windows #19287
|
||||
" 2026 Feb 21 by Vim Project better absolute path detection on MS-Windows #19477
|
||||
" 2026 Feb 27 by Vim Project Make the hostname validation more strict
|
||||
" 2026 Mar 01 by Vim Project include portnumber in hostname checking #19533
|
||||
" Last Change: 2026 May 17
|
||||
" Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
@@ -396,7 +376,6 @@ else
|
||||
call s:NetrwInit("g:netrw_glob_escape",'*[]?`{~$\')
|
||||
endif
|
||||
call s:NetrwInit("g:netrw_menu_escape",'.&? \')
|
||||
call s:NetrwInit("g:netrw_tmpfile_escape",' &;')
|
||||
call s:NetrwInit("s:netrw_map_escape","<|\n\r\\\<C-V>\"")
|
||||
if has("gui_running") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
|
||||
let s:treedepthstring= "│ "
|
||||
@@ -527,8 +506,8 @@ function netrw#Explore(indx,dosplit,style,...)
|
||||
NetrwKeepj norm! 0
|
||||
|
||||
if a:0 > 0
|
||||
if a:1 =~ '^\~' && (has("unix") || g:netrw_cygwin)
|
||||
let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),''))
|
||||
if a:1 =~ '^\~' && (has("unix") || has("win32") || g:netrw_cygwin)
|
||||
let dirname= simplify(substitute(a:1,'^\~',escape(expand("$HOME"),'\&~'),''))
|
||||
elseif a:1 == '.'
|
||||
let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd())
|
||||
if dirname !~ '/$'
|
||||
@@ -1817,14 +1796,14 @@ function netrw#NetRead(mode,...)
|
||||
".........................................
|
||||
" NetRead: (sftp) NetRead Method #9 {{{3
|
||||
elseif b:netrw_method == 9
|
||||
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".netrw#os#Escape(g:netrw_machine.":".b:netrw_fname,1)." ".tmpfile)
|
||||
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_sftp_cmd." ".netrw#os#Escape(g:netrw_machine.":".b:netrw_fname,1)." ".netrw#os#Escape(tmpfile,1))
|
||||
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
".........................................
|
||||
" NetRead: (file) NetRead Method #10 {{{3
|
||||
elseif b:netrw_method == 10 && exists("g:netrw_file_cmd")
|
||||
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_file_cmd." ".netrw#os#Escape(b:netrw_fname,1)." ".tmpfile)
|
||||
call netrw#os#Execute(s:netrw_silentxfer."!".g:netrw_file_cmd." ".netrw#os#Escape(b:netrw_fname,1)." ".netrw#os#Escape(tmpfile,1))
|
||||
let result = s:NetrwGetFile(readcmd, tmpfile, b:netrw_method)
|
||||
let b:netrw_lastfile = choice
|
||||
|
||||
@@ -2956,7 +2935,7 @@ function s:NetrwBookHistSave()
|
||||
while ( first || cnt != g:netrw_dirhistcnt )
|
||||
let lastline= lastline + 1
|
||||
if exists("g:netrw_dirhist_{cnt}")
|
||||
call setline(lastline,'let g:netrw_dirhist_'.cnt."='".g:netrw_dirhist_{cnt}."'")
|
||||
call setline(lastline,'let g:netrw_dirhist_'.cnt.'='.string(g:netrw_dirhist_{cnt}))
|
||||
endif
|
||||
let first = 0
|
||||
let cnt = ( cnt - 1 ) % g:netrw_dirhistmax
|
||||
@@ -4831,6 +4810,12 @@ endfunction
|
||||
|
||||
" s:NetrwMaps: {{{2
|
||||
function s:NetrwMaps(islocal)
|
||||
" remove B flag from 'cpo' so that \<CR>, \<Bar>, etc. inside
|
||||
" interpolated path names play back as literal text rather than
|
||||
" the actual key — without this, a crafted directory name can
|
||||
" inject keystrokes into the cmdline the mapping is typing
|
||||
let _cpo = &cpo
|
||||
set cpo-=B
|
||||
|
||||
" mouse <Plug> maps: {{{3
|
||||
if g:netrw_mousemaps && g:netrw_retmap
|
||||
@@ -5075,6 +5060,7 @@ function s:NetrwMaps(islocal)
|
||||
" support user-specified maps
|
||||
call netrw#UserMaps(0)
|
||||
endif " }}}3
|
||||
let &cpo = _cpo
|
||||
endfunction
|
||||
|
||||
" s:NetrwCommands: set up commands {{{2
|
||||
@@ -5174,7 +5160,7 @@ function s:NetrwMarkFile(islocal,fname)
|
||||
|
||||
else
|
||||
" remove filename from buffer's markfilelist
|
||||
call filter(s:netrwmarkfilelist_{curbufnr},'v:val != a:fname')
|
||||
call filter(s:netrwmarkfilelist_{curbufnr}, {_, v -> v !=# a:fname})
|
||||
if s:netrwmarkfilelist_{curbufnr} == []
|
||||
" local markfilelist is empty; remove it entirely
|
||||
call s:NetrwUnmarkList(curbufnr,curdir)
|
||||
@@ -5195,7 +5181,6 @@ function s:NetrwMarkFile(islocal,fname)
|
||||
|
||||
else
|
||||
" initialize new markfilelist
|
||||
|
||||
let s:netrwmarkfilelist_{curbufnr}= []
|
||||
call add(s:netrwmarkfilelist_{curbufnr},substitute(a:fname,'[|@]$','',''))
|
||||
|
||||
@@ -5215,7 +5200,7 @@ function s:NetrwMarkFile(islocal,fname)
|
||||
call add(s:netrwmarkfilelist,netrw#fs#ComposePath(b:netrw_curdir,a:fname))
|
||||
else
|
||||
" remove new filename from global markfilelist
|
||||
call filter(s:netrwmarkfilelist,'v:val != "'.dname.'"')
|
||||
call filter(s:netrwmarkfilelist, {_, v -> v !=# dname})
|
||||
if s:netrwmarkfilelist == []
|
||||
unlet s:netrwmarkfilelist
|
||||
endif
|
||||
@@ -5302,6 +5287,8 @@ function s:NetrwMarkFileCompress(islocal)
|
||||
if a:islocal
|
||||
if g:netrw_keepdir
|
||||
let fname= netrw#os#Escape(netrw#fs#ComposePath(curdir,fname))
|
||||
else
|
||||
let fname= netrw#os#Escape(fname)
|
||||
endif
|
||||
call system(exe." ".fname)
|
||||
if v:shell_error
|
||||
@@ -5636,6 +5623,8 @@ function s:NetrwMarkFileExe(islocal,enbloc)
|
||||
if a:islocal
|
||||
if g:netrw_keepdir
|
||||
let fname= netrw#os#Escape(netrw#fs#WinPath(netrw#fs#ComposePath(curdir,fname)))
|
||||
else
|
||||
let fname= netrw#os#Escape(netrw#fs#WinPath(fname))
|
||||
endif
|
||||
else
|
||||
let fname= netrw#os#Escape(netrw#fs#WinPath(b:netrw_curdir.fname))
|
||||
@@ -6339,7 +6328,7 @@ function s:NetrwUnMarkFile(islocal)
|
||||
endif
|
||||
|
||||
let ibuf= 1
|
||||
while ibuf < bufnr("$")
|
||||
while ibuf <= bufnr("$")
|
||||
if exists("s:netrwmarkfilelist_".ibuf)
|
||||
unlet s:netrwmarkfilelist_{ibuf}
|
||||
unlet s:netrwmarkfilemtch_{ibuf}
|
||||
@@ -7234,7 +7223,7 @@ function s:NetrwTreeDisplay(dir,depth)
|
||||
" hide given patterns
|
||||
let listhide= split(g:netrw_list_hide,',')
|
||||
for pat in listhide
|
||||
call filter(w:netrw_treedict[dir],'v:val !~ "'.escape(pat,'\\').'"')
|
||||
call filter(w:netrw_treedict[dir], {_, v -> v !~# pat})
|
||||
endfor
|
||||
|
||||
elseif g:netrw_hide == 2
|
||||
@@ -8282,7 +8271,7 @@ function netrw#FileUrlEdit(fname)
|
||||
endif
|
||||
|
||||
exe "sil doau BufReadPre ".fname2396e
|
||||
exe 'NetrwKeepj keepalt edit '.plainfname
|
||||
exe 'NetrwKeepj keepalt edit '. fnameescape(plainfname)
|
||||
exe 'sil! NetrwKeepj keepalt bdelete '.fnameescape(a:fname)
|
||||
|
||||
exe "sil doau BufReadPost ".fname2396e
|
||||
@@ -8825,8 +8814,7 @@ endfunction
|
||||
|
||||
" netrw#RFC2396: converts %xx into characters {{{2
|
||||
function netrw#RFC2396(fname)
|
||||
let fname = escape(substitute(a:fname,'%\(\x\x\)','\=printf("%c","0x".submatch(1))','ge')," \t")
|
||||
return fname
|
||||
return substitute(a:fname, '%\(\x\x\)', '\=printf("%c","0x".submatch(1))', 'ge')
|
||||
endfunction
|
||||
|
||||
" netrw#UserMaps: supports user-specified maps {{{2
|
||||
@@ -8958,14 +8946,17 @@ function s:GetTempfile(fname)
|
||||
endif
|
||||
|
||||
" use fname's suffix for the temporary file
|
||||
" Restrict the suffix to word characters so shell metacharacters in a
|
||||
" remote filename (e.g. sftp://host/foo.txt;id) cannot ride along into
|
||||
" the tempfile name and out into a downstream shell command.
|
||||
if a:fname != ""
|
||||
if a:fname =~ '\.[^./]\+$'
|
||||
if a:fname =~ '\.\w\+$'
|
||||
if a:fname =~ '\.tar\.gz$' || a:fname =~ '\.tar\.bz2$' || a:fname =~ '\.tar\.xz$'
|
||||
let suffix = ".tar".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
|
||||
let suffix = ".tar".substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
|
||||
elseif a:fname =~ '.txz$'
|
||||
let suffix = ".txz".substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
|
||||
let suffix = ".txz".substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
|
||||
else
|
||||
let suffix = substitute(a:fname,'^.*\(\.[^./]\+\)$','\1','e')
|
||||
let suffix = substitute(a:fname,'^.*\(\.\w\+\)$','\1','e')
|
||||
endif
|
||||
let tmpfile= substitute(tmpfile,'\.tmp$','','e')
|
||||
let tmpfile .= suffix
|
||||
@@ -8994,22 +8985,30 @@ function s:MakeSshCmd(sshcmd)
|
||||
return sshcmd
|
||||
endfunction
|
||||
|
||||
" s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2
|
||||
" s:MakeBookmark: enters a bookmark into Netrw's bookmark system {{{2
|
||||
" Note that bookmark paths should always be absolute.
|
||||
function s:MakeBookmark(fname)
|
||||
|
||||
if !exists("g:netrw_bookmarklist")
|
||||
let g:netrw_bookmarklist= []
|
||||
let g:netrw_bookmarklist = []
|
||||
endif
|
||||
|
||||
if index(g:netrw_bookmarklist,a:fname) == -1
|
||||
" curdir not currently in g:netrw_bookmarklist, so include it
|
||||
if isdirectory(s:NetrwFile(a:fname)) && a:fname !~ '/$'
|
||||
call add(g:netrw_bookmarklist,a:fname.'/')
|
||||
elseif a:fname !~ '/'
|
||||
call add(g:netrw_bookmarklist,getcwd()."/".a:fname)
|
||||
else
|
||||
call add(g:netrw_bookmarklist,a:fname)
|
||||
endif
|
||||
" Normalize path to prevent duplicate entries
|
||||
let bookmark_path = netrw#fs#AbsPath(s:NetrwFile(a:fname))
|
||||
let ignore_case = 0
|
||||
if has('win32')
|
||||
let bookmark_path = substitute(bookmark_path, '\\', '/', 'ge')
|
||||
let ignore_case = 1
|
||||
endif
|
||||
let bookmark_path = simplify(bookmark_path)
|
||||
|
||||
if isdirectory(bookmark_path) && bookmark_path !~ '/$'
|
||||
let bookmark_path .= '/'
|
||||
endif
|
||||
|
||||
if index(g:netrw_bookmarklist, bookmark_path, 0, ignore_case) == -1
|
||||
" Not currently in the bookmarks list, so include it
|
||||
call add(g:netrw_bookmarklist, bookmark_path)
|
||||
call sort(g:netrw_bookmarklist)
|
||||
endif
|
||||
|
||||
|
||||
6
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
6
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
@@ -1142,6 +1142,8 @@ One may easily "bookmark" the currently browsed directory by using >
|
||||
|
||||
mb
|
||||
<
|
||||
Note: Bookmarked paths are normalized and stored as absolute paths.
|
||||
|
||||
*.netrwbook*
|
||||
Bookmarks are retained in between sessions of vim in a file called .netrwbook
|
||||
as a |List|, which is typically stored in the first directory on the user's
|
||||
@@ -2854,10 +2856,6 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
such as listing, file removal, etc.
|
||||
default: ssh
|
||||
|
||||
*g:netrw_tmpfile_escape* =' &;'
|
||||
escape() is applied to all temporary files
|
||||
to escape these characters.
|
||||
|
||||
*g:netrw_timefmt* specify format string to vim's strftime().
|
||||
The default, "%c", is "the preferred date
|
||||
and time representation for the current
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user