Compare commits
236 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c9f49b200 | ||
|
|
ab281f8b34 | ||
|
|
1064426d15 | ||
|
|
8322923b40 | ||
|
|
13dcea2df1 | ||
|
|
63a885b650 | ||
|
|
5f2a959553 | ||
|
|
84a7503e29 | ||
|
|
8021830827 | ||
|
|
00a749bd90 | ||
|
|
96395e1512 | ||
|
|
47071c6076 | ||
|
|
2329bd427a | ||
|
|
3ca914ec74 | ||
|
|
b55f0221cc | ||
|
|
f22580e57c | ||
|
|
5606ca5349 | ||
|
|
587601671c | ||
|
|
1dc731a49f | ||
|
|
4d2c4b90fb | ||
|
|
c1c1019fa3 | ||
|
|
6b01f02712 | ||
|
|
1830e787f6 | ||
|
|
0adbe639a5 | ||
|
|
54c88d0cf8 | ||
|
|
f209dcd3de | ||
|
|
53b14578e0 | ||
|
|
7546afbf52 | ||
|
|
c1c3b5d6a0 | ||
|
|
2d18789aa6 | ||
|
|
7db96134c2 | ||
|
|
23473303b7 | ||
|
|
4fa2dd2405 | ||
|
|
a8aeeeb9aa | ||
|
|
0a336ccb57 | ||
|
|
6763b0ee95 | ||
|
|
c2623824a7 | ||
|
|
969e11a18b | ||
|
|
835bc014c0 | ||
|
|
8d67cbfa1f | ||
|
|
0fab89117f | ||
|
|
e671b1b6d1 | ||
|
|
3dca512939 | ||
|
|
42e498d9c4 | ||
|
|
d6c7913e24 | ||
|
|
f4d87ff888 | ||
|
|
ccf2731fd1 | ||
|
|
d49ba7b92a | ||
|
|
0a825bdde8 | ||
|
|
14da0fb2d8 | ||
|
|
9102ac11ab | ||
|
|
d89770eb98 | ||
|
|
16d6fff98e | ||
|
|
ce4f9d2a10 | ||
|
|
3d1a437f1b | ||
|
|
f63c3467b1 | ||
|
|
dd42b05f8a | ||
|
|
af05694900 | ||
|
|
b7dc5d3b61 | ||
|
|
62f19541f4 | ||
|
|
62e822808e | ||
|
|
6852e5c597 | ||
|
|
53d59ecc1d | ||
|
|
4422de6316 | ||
|
|
b3a9127494 | ||
|
|
6bdfeb099a | ||
|
|
4a1e6dacbb | ||
|
|
f31cfa29bf | ||
|
|
25e833f4ec | ||
|
|
5daaf23268 | ||
|
|
ec6e82af04 | ||
|
|
2323f225ca | ||
|
|
34a7d82aae | ||
|
|
2e18facede | ||
|
|
273926e5c0 | ||
|
|
de4b244bfc | ||
|
|
c8cce711dd | ||
|
|
b34ce3e205 | ||
|
|
08a410f674 | ||
|
|
f7087cbec7 | ||
|
|
4783a2c073 | ||
|
|
9f827ec587 | ||
|
|
3ed6659549 | ||
|
|
a95085e0fc | ||
|
|
4ec46f3210 | ||
|
|
29d596c80a | ||
|
|
659cb28c25 | ||
|
|
0b5fe42071 | ||
|
|
d2219d547d | ||
|
|
360a39ae6c | ||
|
|
fb792374cf | ||
|
|
2bacc3e5fb | ||
|
|
a250738303 | ||
|
|
bc08ceb755 | ||
|
|
334a13bff7 | ||
|
|
8872012e5f | ||
|
|
8ac975d97e | ||
|
|
1a741d3cb8 | ||
|
|
7003a5d63f | ||
|
|
ff159253eb | ||
|
|
94a045ed56 | ||
|
|
56957ed410 | ||
|
|
a2c5559f29 | ||
|
|
3e2affc324 | ||
|
|
5e8b2268e1 | ||
|
|
da53af57a7 | ||
|
|
3255af850e | ||
|
|
85a50fe825 | ||
|
|
4be1ab80be | ||
|
|
fce1fa5b61 | ||
|
|
0b8205484b | ||
|
|
60bd140256 | ||
|
|
e9ae35f265 | ||
|
|
3d75ec7401 | ||
|
|
dbedc0924d | ||
|
|
18bacc811c | ||
|
|
397700e507 | ||
|
|
b2bd8de154 | ||
|
|
d3c4b7e946 | ||
|
|
580e457a2a | ||
|
|
9b41e8f766 | ||
|
|
aa8345a968 | ||
|
|
6c0128385e | ||
|
|
00a00f5d3f | ||
|
|
12b1eb58ab | ||
|
|
f877040a04 | ||
|
|
25b16d64a0 | ||
|
|
16f2d3a465 | ||
|
|
5090a1fecb | ||
|
|
5b97947bbd | ||
|
|
b3854bfc54 | ||
|
|
e0029daa35 | ||
|
|
28155d0855 | ||
|
|
094494bf2e | ||
|
|
025dc48e88 | ||
|
|
b8989fb860 | ||
|
|
ed7d8e55ac | ||
|
|
f1c3134ee1 | ||
|
|
a7b8120820 | ||
|
|
f4b36417e8 | ||
|
|
066a5340e3 | ||
|
|
61af587f26 | ||
|
|
d15114c148 | ||
|
|
14e8208d84 | ||
|
|
7bbb0f357e | ||
|
|
bf595ae4ac | ||
|
|
51eefba1d6 | ||
|
|
6a15942bc2 | ||
|
|
41a6026f00 | ||
|
|
b62bf81488 | ||
|
|
060e6556e2 | ||
|
|
b79fa3d9c8 | ||
|
|
a48693c6c2 | ||
|
|
13f100e932 | ||
|
|
3cb41489dc | ||
|
|
fbe2dd7b4c | ||
|
|
27f5136761 | ||
|
|
e3fed4828c | ||
|
|
106899eb21 | ||
|
|
52fd867f5e | ||
|
|
4418041698 | ||
|
|
3af0a8d8f5 | ||
|
|
08a83a033a | ||
|
|
e700ddeea4 | ||
|
|
911742a975 | ||
|
|
d6e3c9048d | ||
|
|
07f0dbe3aa | ||
|
|
ee1a24b21d | ||
|
|
44c1c04ddb | ||
|
|
5647c91355 | ||
|
|
778ada48fb | ||
|
|
b34a688ba0 | ||
|
|
68ba6c2c6c | ||
|
|
5887cce1d7 | ||
|
|
b5f463ce4f | ||
|
|
44831e4bea | ||
|
|
c0f0e2380e | ||
|
|
27822a0441 | ||
|
|
3f60114236 | ||
|
|
e67eff2e24 | ||
|
|
b6c900be9c | ||
|
|
faf4112cdc | ||
|
|
73d8222b31 | ||
|
|
bf7c88d852 | ||
|
|
e70587dbdb | ||
|
|
977561a719 | ||
|
|
d7deeffe11 | ||
|
|
407319fe89 | ||
|
|
2c47ab8fcd | ||
|
|
c0b7ca406b | ||
|
|
4f010c90bd | ||
|
|
8f3277fbbe | ||
|
|
a9c06429ac | ||
|
|
88ce0c546b | ||
|
|
7e89800988 | ||
|
|
f0ed0e6f63 | ||
|
|
5881828104 | ||
|
|
8cc725e927 | ||
|
|
bfc7719e48 | ||
|
|
40891bac5d | ||
|
|
35e02af7bf | ||
|
|
1aa287e048 | ||
|
|
54d7f18c38 | ||
|
|
e3647c8bf5 | ||
|
|
c5654b8448 | ||
|
|
97baa1cfe8 | ||
|
|
7de6b1bb56 | ||
|
|
68d0858892 | ||
|
|
f30eb4a170 | ||
|
|
3cfac59f92 | ||
|
|
2e4361bd40 | ||
|
|
ec7a4e4d69 | ||
|
|
aae1bfbdb9 | ||
|
|
6f14ef4b0b | ||
|
|
934d9ab3a2 | ||
|
|
645a4288e2 | ||
|
|
76bdb82527 | ||
|
|
746fe54d4f | ||
|
|
b7147f8236 | ||
|
|
a35040f795 | ||
|
|
a17f8bfb28 | ||
|
|
a6d5778d9b | ||
|
|
a41dfcd55b | ||
|
|
9c8f9b10fc | ||
|
|
a5e03f68a8 | ||
|
|
b69cd52447 | ||
|
|
cde8ff63e2 | ||
|
|
f50d5364d7 | ||
|
|
34e1e8de91 | ||
|
|
f7cb9f9280 | ||
|
|
4a530a632b | ||
|
|
449c2e5454 | ||
|
|
23da16d3d0 | ||
|
|
ccd7f454fc | ||
|
|
04d2a3fdc0 | ||
|
|
edf0f7db28 |
@@ -20,6 +20,14 @@ indent_size = 2
|
||||
# https://spec.commonmark.org/0.31.2/#hard-line-breaks
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.vim]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[runtime/pack/dist/opt/{comment,nohlsearch}/**.vim]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[runtime/doc/**.txt]
|
||||
# It can mess up some documentation by trying to strip trailing whitespaces
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
12
.github/MAINTAINERS
vendored
12
.github/MAINTAINERS
vendored
@@ -98,6 +98,7 @@ runtime/compiler/se.vim @dkearns
|
||||
runtime/compiler/shellcheck.vim @dkearns
|
||||
runtime/compiler/sml.vim @dkearns
|
||||
runtime/compiler/spectral.vim @romainl
|
||||
runtime/compiler/svelte-check.vim @Konfekt
|
||||
runtime/compiler/stylelint.vim @dkearns
|
||||
runtime/compiler/tcl.vim @dkearns
|
||||
runtime/compiler/tidy.vim @dkearns
|
||||
@@ -153,6 +154,7 @@ runtime/ftplugin/debchangelog.vim @jamessan
|
||||
runtime/ftplugin/debcontrol.vim @jamessan
|
||||
runtime/ftplugin/debsources.vim @jamessan
|
||||
runtime/ftplugin/desktop.vim @e-kwsm
|
||||
runtime/ftplugin/dnsmasq.vim @dringsim
|
||||
runtime/ftplugin/dosbatch.vim @mrdubya
|
||||
runtime/ftplugin/editorconfig.vim @ribru17
|
||||
runtime/ftplugin/eiffel.vim @dkearns
|
||||
@@ -160,6 +162,7 @@ runtime/ftplugin/elixir.vim @mhanberg
|
||||
runtime/ftplugin/erlang.vim @hcs42
|
||||
runtime/ftplugin/eruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/expect.vim @dkearns
|
||||
runtime/ftplugin/exports.vim @mperry2
|
||||
runtime/ftplugin/fennel.vim @gpanders
|
||||
runtime/ftplugin/fetchmail.vim @dkearns
|
||||
runtime/ftplugin/forth.vim @jkotlinski
|
||||
@@ -222,6 +225,7 @@ runtime/ftplugin/liquid.vim @tpope
|
||||
runtime/ftplugin/lua.vim @dkearns
|
||||
runtime/ftplugin/lc.vim @ribru17
|
||||
runtime/ftplugin/lynx.vim @dkearns
|
||||
runtime/ftplugin/m17ndb.vim @dseomn
|
||||
runtime/ftplugin/m3build.vim @dkearns
|
||||
runtime/ftplugin/m3quake.vim @dkearns
|
||||
runtime/ftplugin/markdown.vim @tpope
|
||||
@@ -246,6 +250,7 @@ runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
runtime/ftplugin/perl.vim @petdance @dkearns
|
||||
runtime/ftplugin/php.vim @dkearns
|
||||
runtime/ftplugin/plsql.vim @lee-lindley
|
||||
runtime/ftplugin/pod.vim @petdance @dkearns
|
||||
runtime/ftplugin/poefilter.vim @ObserverOfTime
|
||||
runtime/ftplugin/postscr.vim @mrdubya
|
||||
@@ -267,6 +272,7 @@ runtime/ftplugin/routeros.vim @zainin
|
||||
runtime/ftplugin/rst.vim @marshallward
|
||||
runtime/ftplugin/ruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/rust.vim @lilyball
|
||||
runtime/ftplugin/samba.vim @mperry2
|
||||
runtime/ftplugin/sass.vim @tpope
|
||||
runtime/ftplugin/scala.vim @derekwyatt
|
||||
runtime/ftplugin/scheme.vim @evhan
|
||||
@@ -290,6 +296,7 @@ runtime/ftplugin/systemverilog.vim @Kocha
|
||||
runtime/ftplugin/swig.vim @jmarrec
|
||||
runtime/ftplugin/tap.vim @petdance
|
||||
runtime/ftplugin/tcsh.vim @dkearns
|
||||
runtime/ftplugin/tera.vim @MuntasirSZN
|
||||
runtime/ftplugin/terraform.vim @JannoTjarks
|
||||
runtime/ftplugin/tf.vim @ribru17
|
||||
runtime/ftplugin/thrift.vim @jiangyinzuo
|
||||
@@ -363,6 +370,7 @@ runtime/indent/ld.vim @dkearns
|
||||
runtime/indent/less.vim @genoma
|
||||
runtime/indent/liquid.vim @tpope
|
||||
runtime/indent/lua.vim @marcuscf
|
||||
runtime/indent/m17ndb.vim @dseomn
|
||||
runtime/indent/make.vim @dkearns
|
||||
runtime/indent/meson.vim @Liambeguin
|
||||
runtime/indent/mma.vim @dkearns
|
||||
@@ -404,6 +412,7 @@ runtime/keymap/armenian-eastern_utf-8.vim @blinskey
|
||||
runtime/keymap/armenian-western_utf-8.vim @blinskey
|
||||
runtime/keymap/russian-typograph.vim @RestorerZ
|
||||
runtime/keymap/tamil_tscii.vim @yegappan
|
||||
runtime/keymap/ukrainian-enhanced.vim @Dolfost
|
||||
runtime/lang/menu_en_gb.latin1.vim @mrdubya
|
||||
runtime/lang/menu_ru_ru.cp1251.vim @RestorerZ
|
||||
runtime/lang/menu_ru_ru.koi8-r.vim @RestorerZ
|
||||
@@ -415,6 +424,7 @@ runtime/pack/dist/opt/nohlsearch/ @habamax
|
||||
runtime/plugin/manpager.vim @Konfekt
|
||||
runtime/syntax/shared/hgcommitDiff.vim @vegerot
|
||||
runtime/syntax/abaqus.vim @costerwi
|
||||
runtime/syntax/abnf.vim @A4-Tacks
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/ant.vim @dkearns
|
||||
runtime/syntax/antlr4.vim @jiangyinzuo
|
||||
@@ -528,6 +538,7 @@ runtime/syntax/liquid.vim @tpope
|
||||
runtime/syntax/lua.vim @marcuscf
|
||||
runtime/syntax/lyrics.vim @ObserverOfTime
|
||||
runtime/syntax/lynx.vim @dkearns
|
||||
runtime/syntax/m17ndb.vim @dseomn
|
||||
runtime/syntax/m3build.vim @dkearns
|
||||
runtime/syntax/m3quake.vim @dkearns
|
||||
runtime/syntax/mailcap.vim @dkearns
|
||||
@@ -611,6 +622,7 @@ runtime/syntax/swig.vim @jmarrec
|
||||
runtime/syntax/systemverilog.vim @Kocha
|
||||
runtime/syntax/tap.vim @petdance
|
||||
runtime/syntax/tcsh.vim @dkearns
|
||||
runtime/syntax/tera.vim @MuntasirSZN
|
||||
runtime/syntax/teraterm.vim @k-takata
|
||||
runtime/syntax/terraform.vim @gpanders
|
||||
runtime/syntax/thrift.vim @jiangyinzuo
|
||||
|
||||
35
.github/workflows/ci.yml
vendored
35
.github/workflows/ci.yml
vendored
@@ -17,12 +17,12 @@ permissions:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-22.04-arm' || 'ubuntu-22.04' }}
|
||||
runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
|
||||
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
GCC_VER: 13
|
||||
CLANG_VER: 19
|
||||
CLANG_VER: 20
|
||||
TEST: test
|
||||
SRCDIR: ./src
|
||||
LEAK_CFLAGS: -DEXITFREE
|
||||
@@ -96,6 +96,13 @@ jobs:
|
||||
# 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
|
||||
|
||||
- run: sudo dpkg --add-architecture i386
|
||||
if: matrix.architecture == 'i386'
|
||||
|
||||
@@ -115,6 +122,7 @@ jobs:
|
||||
libncurses-dev:${{ matrix.architecture }} \
|
||||
libxt-dev:${{ matrix.architecture }} \
|
||||
locales-all \
|
||||
software-properties-common \
|
||||
)
|
||||
if ${{ matrix.features == 'huge' }}; then
|
||||
LUA_VER=${{ matrix.lua_ver || '5.4' }}
|
||||
@@ -124,7 +132,6 @@ jobs:
|
||||
lcov \
|
||||
libcanberra-dev \
|
||||
libperl-dev \
|
||||
python2-dev \
|
||||
python3-dev \
|
||||
liblua${LUA_VER}-dev \
|
||||
lua${LUA_VER} \
|
||||
@@ -136,7 +143,7 @@ jobs:
|
||||
libattr1-dev
|
||||
)
|
||||
fi
|
||||
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -y "${PKGS[@]}"
|
||||
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get install -y "${PKGS[@]}"
|
||||
|
||||
- name: Install gcc-${{ env.GCC_VER }}
|
||||
if: matrix.compiler == 'gcc'
|
||||
@@ -168,7 +175,7 @@ jobs:
|
||||
(
|
||||
echo "LINUX_VERSION=$(uname -r)"
|
||||
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
|
||||
echo "TMPDIR=${{ runner.temp }}"
|
||||
echo "TMPDIR=$(mktemp -d -p /tmp)"
|
||||
|
||||
case "${{ matrix.features }}" in
|
||||
tiny)
|
||||
@@ -185,7 +192,8 @@ jobs:
|
||||
if ${{ matrix.python3 == 'stable-abi' }}; then
|
||||
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
|
||||
fi
|
||||
echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=${INTERFACE} --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
|
||||
# The ubuntu-24.04 CI runner does not provide a python2 package.
|
||||
echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=no --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -263,8 +271,8 @@ jobs:
|
||||
if: matrix.architecture != 'arm64'
|
||||
timeout-minutes: 25
|
||||
run: |
|
||||
do_test() { echo "$*"; sg audio "sg $(id -gn) '$*'"; }
|
||||
do_test make ${SHADOWOPT} ${TEST}
|
||||
make ${SHADOWOPT} ${TEST}
|
||||
|
||||
|
||||
# `sg audio` does not work on arm64 runner due to permission ('Incorrect password' error).
|
||||
- name: Test on arm64
|
||||
@@ -670,6 +678,17 @@ jobs:
|
||||
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
|
||||
# path: ./artifacts
|
||||
|
||||
- name: Install packages for testing
|
||||
shell: bash
|
||||
run: |
|
||||
if ${{ matrix.features != 'TINY' }}; then
|
||||
if ${{ matrix.arch == 'x64' }}; then
|
||||
choco install netbeans --no-progress
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Test and show the result of testing gVim
|
||||
if: matrix.GUI == 'yes' || matrix.VIMDLL == 'yes'
|
||||
shell: cmd
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -96,6 +96,13 @@ src/json_test
|
||||
src/message_test
|
||||
src/kword_test
|
||||
|
||||
runtime/syntax/testdir/Xfilter
|
||||
runtime/syntax/testdir/done/
|
||||
runtime/syntax/testdir/failed/
|
||||
runtime/syntax/testdir/messages
|
||||
runtime/syntax/testdir/testdeps.mk
|
||||
runtime/syntax/testdir/vimcmd
|
||||
|
||||
# Generated by "make install"
|
||||
runtime/doc/doctags
|
||||
runtime/doc/tags-*
|
||||
|
||||
20
.hgignore
20
.hgignore
@@ -98,21 +98,35 @@ src/json_test
|
||||
src/message_test
|
||||
src/kword_test
|
||||
|
||||
runtime/syntax/testdir/Xfilter
|
||||
runtime/syntax/testdir/done/
|
||||
runtime/syntax/testdir/failed/
|
||||
runtime/syntax/testdir/messages
|
||||
runtime/syntax/testdir/testdeps.mk
|
||||
runtime/syntax/testdir/vimcmd
|
||||
|
||||
# Generated by "make install"
|
||||
runtime/doc/doctags
|
||||
runtime/doc/tags-*
|
||||
|
||||
# Temporarily generated by "runtime/syntax/generator/make"
|
||||
runtime/syntax/generator/generator.err
|
||||
runtime/syntax/generator/sanity_check.err
|
||||
runtime/syntax/generator/vim.vim.rc
|
||||
|
||||
# Generated by "make shadow". The directory names could be anything but we
|
||||
# restrict them to shadow (the default) or shadow-*
|
||||
src/shadow
|
||||
src/shadow-*
|
||||
src/runtime
|
||||
src/pixmaps
|
||||
src/LICENSE
|
||||
src/README.txt
|
||||
|
||||
# other files possibly created by tools
|
||||
src/cscope.out
|
||||
|
||||
# Linter/language server files
|
||||
/.cache/clangd/
|
||||
/.ccls-cache/
|
||||
/compile_commands.json
|
||||
.cache/clangd/
|
||||
.ccls-cache/
|
||||
compile_commands.json
|
||||
|
||||
24
Filelist
24
Filelist
@@ -223,6 +223,7 @@ SRC_ALL = \
|
||||
src/testdir/samples/*.html \
|
||||
src/testdir/samples/*.txt \
|
||||
src/testdir/samples/*.vim \
|
||||
src/testdir/samples/poc.zip \
|
||||
src/testdir/samples/test000 \
|
||||
src/testdir/samples/test.zip \
|
||||
src/testdir/samples/test_undo.txt.undo \
|
||||
@@ -771,16 +772,16 @@ RT_ALL = \
|
||||
runtime/tools/[a-z]*[a-z0-9] \
|
||||
runtime/tutor/README.txt \
|
||||
runtime/tutor/tutor1 \
|
||||
runtime/tutor/tutor1.utf-8 \
|
||||
runtime/tutor/en/vim-01-beginner.tutor \
|
||||
runtime/tutor/en/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/it/vim-01-beginner.tutor \
|
||||
runtime/tutor/it/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/sr/vim-01-beginner.tutor \
|
||||
runtime/tutor/sr/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/en/vim-02-beginner.tutor \
|
||||
runtime/tutor/en/vim-02-beginner.tutor.json \
|
||||
runtime/tutor/tutor.tutor \
|
||||
runtime/tutor/tutor.tutor.json \
|
||||
runtime/tutor/tutor.vim \
|
||||
runtime/tutor/tutor2 \
|
||||
runtime/tutor/tutor2.utf-8 \
|
||||
runtime/vimrc_example.vim \
|
||||
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
|
||||
runtime/pack/dist/opt/comment/plugin/comment.vim \
|
||||
@@ -816,7 +817,9 @@ RT_ALL = \
|
||||
runtime/pack/dist/opt/netrw/LICENSE.txt \
|
||||
runtime/pack/dist/opt/netrw/README.md \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrw.vim \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrw/own.vim \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrw/msg.vim \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrwSettings.vim \
|
||||
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
|
||||
runtime/pack/dist/opt/netrw/doc/netrw.txt \
|
||||
@@ -876,6 +879,7 @@ RT_SCRIPTS = \
|
||||
runtime/syntax/testdir/input/setup/*.* \
|
||||
runtime/syntax/testdir/dumps/*.dump \
|
||||
runtime/syntax/testdir/dumps/*.vim \
|
||||
runtime/syntax/testdir/tools/* \
|
||||
runtime/syntax/generator/Makefile \
|
||||
runtime/syntax/generator/README.md \
|
||||
runtime/syntax/generator/gen_syntax_vim.vim \
|
||||
@@ -1074,7 +1078,12 @@ LANG_GEN = \
|
||||
runtime/tutor/README.*.txt \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/Make_all.mak \
|
||||
runtime/tutor/tutor1.utf-8 \
|
||||
runtime/tutor/it/vim-01-beginner.tutor \
|
||||
runtime/tutor/it/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/sr/vim-01-beginner.tutor \
|
||||
runtime/tutor/sr/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/sr/vim-02-beginner.tutor \
|
||||
runtime/tutor/sr/vim-02-beginner.tutor.json \
|
||||
runtime/tutor/tutor1.?? \
|
||||
runtime/tutor/tutor1.??.utf-8 \
|
||||
runtime/tutor/tutor1.??.euc \
|
||||
@@ -1087,7 +1096,6 @@ LANG_GEN = \
|
||||
runtime/tutor/tutor1.??_??.utf-8 \
|
||||
runtime/tutor/tutor1.bar \
|
||||
runtime/tutor/tutor1.bar.utf-8 \
|
||||
runtime/tutor/tutor2.utf-8 \
|
||||
runtime/tutor/tutor2.?? \
|
||||
runtime/tutor/tutor2.??.utf-8 \
|
||||
runtime/spell/README.txt \
|
||||
@@ -1148,6 +1156,8 @@ IGNORE = \
|
||||
.github/workflows/label.yml \
|
||||
SECURITY.md \
|
||||
ci/unlisted.make \
|
||||
ci/hlgroups.make \
|
||||
ci/hlgroups.ignore \
|
||||
src/libvterm/CODE-MAP \
|
||||
runtime/syntax/testdir/input/html_html \
|
||||
|
||||
|
||||
66
ci/hlgroups.ignore
Normal file
66
ci/hlgroups.ignore
Normal file
@@ -0,0 +1,66 @@
|
||||
ColorColumn
|
||||
ComplMatchIns
|
||||
Conceal
|
||||
Cursor
|
||||
CursorColumn
|
||||
CursorIM
|
||||
CursorLine
|
||||
CursorLineNr
|
||||
debugBreakpoint
|
||||
debugPC
|
||||
DiffAdd
|
||||
DiffChange
|
||||
DiffDelete
|
||||
DiffText
|
||||
Directory
|
||||
ErrorMsg
|
||||
FoldColumn
|
||||
Folded
|
||||
Ignore
|
||||
IncSearch
|
||||
lCursor
|
||||
LineNr
|
||||
LineNrAbove
|
||||
LineNrBelow
|
||||
MatchParen
|
||||
Menu
|
||||
ModeMsg
|
||||
MoreMsg
|
||||
MsgArea
|
||||
NonText
|
||||
Normal
|
||||
Pmenu
|
||||
PmenuSbar
|
||||
PmenuSel
|
||||
PmenuThumb
|
||||
Question
|
||||
Scrollbar
|
||||
Search
|
||||
SignColumn
|
||||
SpecialKey
|
||||
SpellBad
|
||||
SpellCap
|
||||
SpellLocal
|
||||
SpellRare
|
||||
StatusLine
|
||||
StatusLineNC
|
||||
StatusLineTerm
|
||||
StatusLineTermNC
|
||||
TabLine
|
||||
TabLineFill
|
||||
TabLineSel
|
||||
Terminal
|
||||
Title
|
||||
TOhtmlProgress
|
||||
TOhtml-progress-color
|
||||
ToolbarButton
|
||||
ToolbarLine
|
||||
Tooltip
|
||||
User1
|
||||
User1..9
|
||||
User9
|
||||
VertSplit
|
||||
Visual
|
||||
VisualNOS
|
||||
WarningMsg
|
||||
WildMenu
|
||||
18
ci/hlgroups.make
Normal file
18
ci/hlgroups.make
Normal file
@@ -0,0 +1,18 @@
|
||||
# vim: ft=make
|
||||
SHELL = /bin/bash
|
||||
|
||||
# Default target to actually run the comparison:
|
||||
.PHONY: check
|
||||
.INTERMEDIATE: hlgroups deflinks hlgroups.stripped
|
||||
|
||||
check: hlgroups.stripped deflinks
|
||||
diff hlgroups.stripped deflinks
|
||||
|
||||
hlgroups:
|
||||
grep '\*hl-' ../runtime/doc/*txt | sed -E -e 's/.*:<?\s*//' -e 's/hl-//g' -e 's/\*//g' -e 's/ /\n/g' | sort > hlgroups
|
||||
|
||||
deflinks: ../src/highlight.c
|
||||
grep '"default link' $< | sed 's/.*default link\s*\(.*\)\s.*/\1/' | sort > deflinks
|
||||
|
||||
hlgroups.stripped: hlgroups.ignore hlgroups
|
||||
grep -v -x -F -f hlgroups.ignore hlgroups > hlgroups.stripped
|
||||
@@ -21,7 +21,7 @@ $(eval all_patterns := $(shell \
|
||||
p; \
|
||||
}'))
|
||||
|
||||
# In Makefile's `prepeare` target, all the IN_README_DIR files are moved from
|
||||
# In Makefile's `prepare` target, all the IN_README_DIR files are moved from
|
||||
# READMEdir to the root, so add those files in their Git-tracked location:
|
||||
all_patterns := $(all_patterns) \
|
||||
$(foreach readme, $(IN_README_DIR), READMEdir/$(readme))
|
||||
|
||||
81
lang/LICENSE.pt_br.txt
Normal file
81
lang/LICENSE.pt_br.txt
Normal file
@@ -0,0 +1,81 @@
|
||||
LICENÇA DO VIM
|
||||
|
||||
I) Não há restrições para distribuir cópias não modificadas do Vim, exceto
|
||||
que elas devem incluir este texto de licença. Você também pode distribuir
|
||||
partes não modificadas do Vim, igualmente irrestritas, exceto que elas
|
||||
devem incluir este texto de licença. Você também tem permissão para incluir
|
||||
executáveis que você fez a partir das fontes não modificadas do Vim, além
|
||||
de seus próprios exemplos de uso e scripts do Vim.
|
||||
|
||||
II) É permitido distribuir uma versão modificada (ou estendida) do Vim,
|
||||
incluindo executáveis e/ou código-fonte, quando as quatro
|
||||
condições a seguir forem atendidas:
|
||||
1) Este texto de licença deve ser incluído sem modificações.
|
||||
2) O Vim modificado deve ser distribuído de uma das cinco formas a seguir:
|
||||
a) Se você fizer alterações no Vim, deverá descrever claramente na
|
||||
distribuição como entrar em contato com você. Quando o mantenedor
|
||||
solicitar a você (de qualquer forma) uma cópia do Vim modificado que
|
||||
você distribuiu, você deverá disponibilizar suas alterações,
|
||||
incluindo o código-fonte, ao mantenedor sem taxa. O mantenedor
|
||||
reserva o direito de incluir suas alterações na versão oficial
|
||||
do Vim. O que o mantenedor fará com suas alterações e sob qual
|
||||
licença elas serão distribuídas é negociável. Se não houve negociação
|
||||
então esta licença, ou uma versão posterior, também se aplica às suas
|
||||
alterações. Os mantenedores atuais estão listados aqui:
|
||||
https://github.com/orgs/vim/people. Se isso mudar, será anunciado em
|
||||
lugares apropriados (provavelmente vim.sf.net, www.vim.org e/ou
|
||||
comp.editors). Quando for completamente impossível contatar o
|
||||
mantenedor, a obrigação de enviar a ele suas alterações cessa.
|
||||
Uma vez que o mantenedor tenha confirmado que ele recebeu suas
|
||||
alterações, elas não precisarão ser enviadas novamente.
|
||||
b) Se você recebeu um Vim modificado que foi distribuído como
|
||||
mencionado em a), você tem permissão para distribuí-lo sem
|
||||
modificações, como mencionado em I). Se você fizer alterações
|
||||
adicionais, o texto em a) se aplica a essas alterações.
|
||||
c) Forneça todas as alterações, incluindo o código-fonte, com cada cópia
|
||||
do Vim modificado que você distribuir. Isso pode ser feito na forma
|
||||
de um diff de contexto. Você pode escolher qual licença usar para o
|
||||
novo código que você adicionar. As alterações e sua licença não devem
|
||||
restringir outros de fazer suas próprias alterações na versão oficial
|
||||
do Vim.
|
||||
d) Quando você tem um Vim modificado que inclui alterações conforme
|
||||
mencionado em c), você pode distribuí-lo sem o código-fonte para as
|
||||
alterações se as três condições a seguir forem atendidas:
|
||||
- A licença que se aplica às alterações permite que você distribua
|
||||
as alterações para o mantenedor do Vim sem taxa ou restrição, e
|
||||
permite que o mantenedor do Vim inclua as alterações na
|
||||
versão oficial do Vim sem taxa ou restrição.
|
||||
- Você mantém as alterações por pelo menos três anos após a última
|
||||
distribuição do Vim modificado correspondente. Quando o mantenedor
|
||||
ou alguém para quem você distribuiu o Vim modificado solicitar a
|
||||
você (de qualquer forma) as alterações dentro deste período, você
|
||||
deve disponibilizá-las a ele.
|
||||
- Você descreve claramente na distribuição como entrar em contato
|
||||
com você. Estas informações de contato devem permanecer válidas por
|
||||
pelo menos três anos após a última distribuição do Vim modificado
|
||||
correspondente, ou pelo maior tempo possível.
|
||||
e) Quando a Licença Pública Geral GNU (GPL) se aplica às alterações,
|
||||
você pode distribuir o Vim modificado sob a GNU GPL versão 2 ou
|
||||
qualquer versão posterior.
|
||||
3) Uma mensagem deve ser adicionada, no mínimo na saída do comando
|
||||
":version" e na tela de introdução, de modo que o usuário do Vim
|
||||
modificado seja capaz de ver que ele foi modificado. Ao distribuir
|
||||
conforme mencionado em 2)e), só é necessário adicionar a mensagem
|
||||
na medida em que isso não entre em conflito com a licença usada para
|
||||
as alterações.
|
||||
4) As informações de contato conforme exigido em 2)a) e 2)d) não devem ser
|
||||
removidas ou alteradas, exceto que a própria pessoa pode fazer
|
||||
correções.
|
||||
|
||||
III) Se você distribuir uma versão modificada do Vim, encorajamos que use
|
||||
a licença do Vim para suas alterações e disponibilizá-las ao
|
||||
mantenedor, incluindo o código-fonte. A maneira preferida de fazer isso é
|
||||
por e-mail ou enviando os arquivos para um servidor e enviando a URL por
|
||||
e-mail. Se o número de alterações for pequeno (por exemplo, um Makefile
|
||||
modificado), enviar um diff de contexto por e-mail será suficiente.
|
||||
O endereço de e-mail a ser usado é <maintainer@vim.org>
|
||||
|
||||
IV) Não é permitido remover esta licença da distribuição das fontes do Vim,
|
||||
partes dela ou de uma versão modificada. Você pode usar esta licença
|
||||
para versões anteriores do Vim em vez da licença com a qual elas vieram,
|
||||
a seu critério.
|
||||
131
lang/README.pt_br.txt
Normal file
131
lang/README.pt_br.txt
Normal file
@@ -0,0 +1,131 @@
|
||||
README.txt para a versão 9.1 do Vim: Vi IMproved.
|
||||
|
||||
O QUE É VIM?
|
||||
|
||||
Vim é uma versão muito melhorada do bom e velho editor UNIX Vi. Muitos novos
|
||||
recursos foram adicionados: desfazer multinível, destaque de sintaxe, histórico
|
||||
de linha de comando, ajuda on-line, verificação ortográfica, completar
|
||||
nome de arquivo, operações de bloco, linguagem de script, etc. Há também uma
|
||||
interface gráfica (GUI) disponível. Ainda assim, a compatibilidade com Vi é
|
||||
mantida, aqueles que têm Vi "nos dedos" se sentirão em casa.
|
||||
Veja "runtime/doc/vi_diff.txt" para diferenças com Vi.
|
||||
|
||||
Este editor é muito útil para editar programas e outros arquivos de texto
|
||||
simples. Todos os comandos são fornecidos com caracteres normais do teclado,
|
||||
então aqueles que podem digitar com dez dedos podem trabalhar muito rápido.
|
||||
Além disso, as teclas de função podem ser mapeadas para comandos pelo usuário,
|
||||
e o mouse pode ser usado.
|
||||
|
||||
O Vim funciona em MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS e quase todos
|
||||
os sabores do UNIX. A portabilidade para outros sistemas não deve ser difícil.
|
||||
Versões mais antigas do Vim rodam em MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,
|
||||
Amiga DOS, Atari MiNT, BeOS, RISC OS e OS/2. Eles não são mais mantidos.
|
||||
|
||||
DISTRIBUIÇÃO
|
||||
|
||||
Você pode frequentemente usar seu gerenciador de pacotes favorito para
|
||||
instalar o Vim. No Mac e Linux, uma pequena versão do Vim é pré-instalada,
|
||||
você ainda precisa instalar o Vim se quiser mais recursos.
|
||||
|
||||
Existem distribuições separadas para Unix, PC, Amiga e alguns outros sistemas.
|
||||
Este arquivo README.txt vem com o arquivo de tempo de execução. Ele inclui a
|
||||
documentação, arquivos de sintaxe e outros arquivos que são usados em
|
||||
tempo de execução. Para executar o Vim, você deve obter um dos arquivos
|
||||
binários ou um arquivo fonte. Qual deles você precisa depende do sistema em
|
||||
que deseja executá-lo e se você deseja ou deve compilá-lo você mesmo.
|
||||
Verifique "https://www.vim.org/download.php" para uma visão geral das
|
||||
distribuições disponíveis atualmente.
|
||||
|
||||
Alguns lugares populares para obter o Vim mais recente:
|
||||
* Confira o repositório git do github: https://github.com/vim/vim.
|
||||
* Obtenha o código-fonte como um arquivo: https://github.com/vim/vim/tags.
|
||||
* Obtenha um executável do Windows do repositório vim-win32-installer:
|
||||
https://github.com/vim/vim-win32-installer/releases.
|
||||
|
||||
COMPILAR
|
||||
|
||||
Se você obteve uma distribuição binária, não precisa compilar o Vim. Se você
|
||||
obteve uma distribuição de origem, todo o material para compilar o Vim está no
|
||||
diretório "src". Veja src/INSTALL para instruções.
|
||||
|
||||
INSTALAÇÃO
|
||||
|
||||
Veja um desses arquivos para instruções específicas do sistema. No diretório
|
||||
READMEdir (no repositório) ou no diretório superior (se você descompactar um
|
||||
arquivo):
|
||||
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
README_dos.txt MS-DOS e MS-Windows
|
||||
README_mac.txt Macintosh
|
||||
README_haiku.txt Haiku
|
||||
README_vms.txt VMS
|
||||
|
||||
Existem outros arquivos README_*.txt, dependendo da distribuição que você usou.
|
||||
|
||||
DOCUMENTAÇÃO
|
||||
|
||||
O tutor do Vim é um curso de treinamento de uma hora para iniciantes.
|
||||
Frequentemente, ele pode ser iniciado como "vimtutor". Veja ":help tutor"
|
||||
para mais informações.
|
||||
|
||||
O melhor é usar ":help" no Vim. Se você ainda não tem um executável, leia
|
||||
"runtime/doc/help.txt". Ele contém direcionamentos para os outros arquivos
|
||||
de documentação. O Manual do Usuário é lido como um livro e é recomendado
|
||||
para aprender a usar o Vim. Veja ":help user-manual".
|
||||
|
||||
CÓPIA
|
||||
|
||||
O Vim é um Charityware. Você pode usá-lo e copiá-lo o quanto quiser, mas
|
||||
encorajamos que faça uma doação para ajudar órfãos em Uganda. Leia o arquivo
|
||||
"runtime/doc/uganda.txt" para detalhes (execute ":help uganda" dentro do Vim).
|
||||
|
||||
Resumo da licença: Não há restrições quanto ao uso ou distribuição de uma
|
||||
cópia não modificada do Vim. Partes do Vim também podem ser distribuídas, mas
|
||||
o texto da licença deve sempre ser incluído. Para versões modificadas, algumas
|
||||
restrições se aplicam. A licença é compatível com GPL, você pode compilar o Vim
|
||||
com bibliotecas GPL e distribuí-lo.
|
||||
|
||||
PATROCÍNIO
|
||||
|
||||
Corrigir bugs e adicionar novos recursos exige muito tempo e esforço.
|
||||
Para mostrar seu apreço pelo trabalho e motivar os desenvolvedores a continuar
|
||||
trabalhando no Vim, envie uma doação.
|
||||
|
||||
O dinheiro que você doou será usado principalmente para ajudar crianças em
|
||||
Uganda. Veja "runtime/doc/uganda.txt". Mas, ao mesmo tempo, as doações aumentam
|
||||
a motivação da equipe de desenvolvimento para continuar trabalhando no Vim!
|
||||
|
||||
Para as informações mais recentes sobre patrocínio, consulte o site do Vim:
|
||||
https://www.vim.org/sponsor/
|
||||
|
||||
CONTRIBUIÇÕES
|
||||
|
||||
Se você gostaria de ajudar a tornar o Vim melhor, veja o arquivo CONTRIBUTING.md.
|
||||
|
||||
INFORMAÇÕES
|
||||
|
||||
Se você estiver no macOS, pode usar o MacVim: https://macvim.org
|
||||
|
||||
As últimas notícias sobre o Vim podem ser encontradas na página inicial do Vim:
|
||||
https://www.vim.org/
|
||||
|
||||
Se você tiver problemas, dê uma olhada na documentação ou dicas do Vim:
|
||||
https://www.vim.org/docs.php
|
||||
https://vim.fandom.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
Se você ainda tiver problemas ou quaisquer outras perguntas, use uma das listas
|
||||
de discussão para discuti-las com usuários e desenvolvedores do Vim:
|
||||
https://www.vim.org/maillist.php
|
||||
|
||||
Se nada mais funcionar, relate os bugs diretamente para a lista de discussão
|
||||
vim-dev:
|
||||
<vim-dev@vim.org>
|
||||
|
||||
AUTOR PRINCIPAL
|
||||
|
||||
A maior parte do Vim foi criada por Bram Moolenaar <Bram@vim.org>,
|
||||
":help Bram-Moolenaar"
|
||||
|
||||
Envie quaisquer outros comentários, patches, flores e sugestões para
|
||||
a lista de discussão vim-dev: <vim-dev@vim.org>
|
||||
@@ -1,6 +1,6 @@
|
||||
# NSIS file to create a self-installing exe for Vim.
|
||||
# It requires NSIS version 3.0 or later.
|
||||
# Last Change: 2025 Jan 05
|
||||
# Last Change: 2025 Feb 24
|
||||
|
||||
Unicode true
|
||||
|
||||
@@ -216,6 +216,7 @@ Page custom SetCustom ValidateCustom
|
||||
|
||||
# Include support for other languages:
|
||||
!if ${HAVE_MULTI_LANG}
|
||||
!include "lang\portuguesebr.nsi"
|
||||
!include "lang\danish.nsi"
|
||||
!include "lang\dutch.nsi"
|
||||
!include "lang\german.nsi"
|
||||
@@ -806,7 +807,8 @@ Function .onInit
|
||||
ClearErrors
|
||||
System::Call 'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
|
||||
StrCmp $R9 "zh-cn" coincide 0
|
||||
StrCmp $R9 "zh-tw" 0 part
|
||||
StrCmp $R9 "zh-tw" coincide 0
|
||||
StrCmp $R9 "pt-br" 0 part
|
||||
coincide:
|
||||
System::Call 'User32::CharLower(t r19 r19)*i${NSIS_MAX_STRLEN}'
|
||||
${StrRep} $lng_usr "$R9" "-" "_"
|
||||
|
||||
@@ -18,6 +18,13 @@ allowable length of strings. For example:
|
||||
drop-down lists on the .vimrc page - 55 characters.
|
||||
Characters in this case mean characters of the English alphabet.
|
||||
|
||||
Once the message translation file is ready, it must be included in the
|
||||
"gvim.nsi" file.
|
||||
Find the line "# Include support for other languages:" in the file "gvim.nsi"
|
||||
and specify the name of the file with your translation below the line
|
||||
!if ${HAVE_MULTI_LANG}, similar to the entries already there. File names are
|
||||
specified in alphabetical order.
|
||||
|
||||
If you do not yet have a translated "LICENSE" file and/or a main "README.txt"
|
||||
file, set the following values:
|
||||
|
||||
@@ -32,3 +39,25 @@ variables similarly to what is done in the other translation files.
|
||||
Translation files should be located in the "lang" subdirectory of the root
|
||||
directory. The name of the files is as follows: "README.xx.txt", where xx is the
|
||||
language code according to ISO639.
|
||||
|
||||
|
||||
There are two ways to test the installer in different languages:
|
||||
|
||||
1. Find and uncomment the "!define MUI_LANGDLL_ALWAYSSHOW" line in the
|
||||
"gvim.nsi" file and rebuild the installer.
|
||||
Now every time you run it, you will see a dialog box with the possibility to
|
||||
select the language of the installer.
|
||||
|
||||
2. If the Vim editor is already installed in your system, delete the
|
||||
"Installer Language" parameter in the Windows registry under
|
||||
"HKEY_CURRENT_USER\Software\Vim".
|
||||
Or you can create a file "NoLangInstallerVim.reg" with the following content:
|
||||
|
||||
Windows Registry Editor Version 5.00
|
||||
|
||||
[HKEY_CURRENT_USER\Software\Vim]
|
||||
"Installer Language"=-
|
||||
|
||||
and apply it by double-clicking on it.
|
||||
After these steps, when you start the installer, a window with the installer
|
||||
language selection will also be displayed.
|
||||
|
||||
291
nsis/lang/portuguesebr.nsi
Normal file
291
nsis/lang/portuguesebr.nsi
Normal file
@@ -0,0 +1,291 @@
|
||||
# vi:set ts=8 sts=4 sw=4 et fdm=marker:
|
||||
#
|
||||
# portuguesebr.nsi: Brazilian Portuguese strings for gvim NSIS installer.
|
||||
#
|
||||
# Locale ID : 1046
|
||||
# Locale Name : pt-BR
|
||||
# fileencoding : UTF-8
|
||||
# Author : Rafael Fontenelle
|
||||
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
|
||||
|
||||
# Overwrite the default translation.
|
||||
# These strings should be always English. Otherwise dosinst.c fails.
|
||||
LangString ^SetupCaption ${LANG_PORTUGUESEBR} \
|
||||
"Configuração do $(^Name)"
|
||||
LangString ^UninstallCaption ${LANG_PORTUGUESEBR} \
|
||||
"Desinstalação do $(^Name)"
|
||||
|
||||
##############################################################################
|
||||
# License file for the license page {{{1
|
||||
##############################################################################
|
||||
|
||||
LicenseLangString page_lic_file ${LANG_PORTUGUESEBR} "..\lang\LICENSE.pt_br.nsis.txt"
|
||||
|
||||
##############################################################################
|
||||
# README.txt file, which is opened after installation {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString vim_readme_file ${LANG_PORTUGUESEBR} "README.pt_br.txt"
|
||||
|
||||
##############################################################################
|
||||
# MUI Configuration Strings {{{1
|
||||
##############################################################################
|
||||
|
||||
#LangString str_dest_folder ${LANG_PORTUGUESEBR} \
|
||||
# "Pasta de destino (Deve terminar com $\"vim$\")"
|
||||
|
||||
LangString str_show_readme ${LANG_PORTUGUESEBR} \
|
||||
"Mostrar o README ao concluir a instalação"
|
||||
|
||||
# Install types:
|
||||
LangString str_type_typical ${LANG_PORTUGUESEBR} \
|
||||
"Típica"
|
||||
|
||||
LangString str_type_minimal ${LANG_PORTUGUESEBR} \
|
||||
"Mínima"
|
||||
|
||||
LangString str_type_full ${LANG_PORTUGUESEBR} \
|
||||
"Completa"
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Section Titles & Description {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString str_section_old_ver ${LANG_PORTUGUESEBR} \
|
||||
"Desinstalar versões existentes"
|
||||
LangString str_desc_old_ver ${LANG_PORTUGUESEBR} \
|
||||
"Desinstala versões do Vim existentes no seu sistema."
|
||||
|
||||
LangString str_section_exe ${LANG_PORTUGUESEBR} \
|
||||
"Vim GUI e arquivos de runtime"
|
||||
LangString str_desc_exe ${LANG_PORTUGUESEBR} \
|
||||
"Executáveis e arquivos de runtime do Vim GUI. Este componente \
|
||||
é obrigatório."
|
||||
|
||||
LangString str_section_console ${LANG_PORTUGUESEBR} \
|
||||
"Programa de console do Vim"
|
||||
LangString str_desc_console ${LANG_PORTUGUESEBR} \
|
||||
"Versão de console do Vim (vim.exe)."
|
||||
|
||||
LangString str_section_batch ${LANG_PORTUGUESEBR} \
|
||||
"Criar arquivos .bat"
|
||||
LangString str_desc_batch ${LANG_PORTUGUESEBR} \
|
||||
"Cria arquivos .bat para variantes do Vim no diretório Windows para \
|
||||
usar na linha de comando."
|
||||
|
||||
LangString str_group_icons ${LANG_PORTUGUESEBR} \
|
||||
"Criar ícones para o Vim"
|
||||
LangString str_desc_icons ${LANG_PORTUGUESEBR} \
|
||||
"Cria ícones para Vim em vários locais para facilitar o acesso rápido."
|
||||
|
||||
LangString str_section_desktop ${LANG_PORTUGUESEBR} \
|
||||
"Na área de trabalho"
|
||||
LangString str_desc_desktop ${LANG_PORTUGUESEBR} \
|
||||
"Cria ícones para executáveis do gVim na área de trabalho."
|
||||
|
||||
LangString str_section_start_menu ${LANG_PORTUGUESEBR} \
|
||||
"Na pasta Programas do Menu Iniciar"
|
||||
LangString str_desc_start_menu ${LANG_PORTUGUESEBR} \
|
||||
"Adiciona Vim na pasta de programas do menu iniciar."
|
||||
|
||||
#LangString str_section_quick_launch ${LANG_PORTUGUESEBR} \
|
||||
# "Na barra de Inicialização Rápida"
|
||||
#LangString str_desc_quick_launch ${LANG_PORTUGUESEBR} \
|
||||
# "Adiciona um atalho para o Vim na barra de inicialização rápida."
|
||||
|
||||
LangString str_section_edit_with ${LANG_PORTUGUESEBR} \
|
||||
"Adicionar menu de contexto do Vim"
|
||||
LangString str_desc_edit_with ${LANG_PORTUGUESEBR} \
|
||||
"Adiciona o Vim à lista $\"Abrir com...$\" do menu de contexto."
|
||||
|
||||
#LangString str_section_edit_with32 ${LANG_PORTUGUESEBR} \
|
||||
# "Versão 32 bits"
|
||||
#LangString str_desc_edit_with32 ${LANG_PORTUGUESEBR} \
|
||||
# "Adiciona o Vim à lista $\"Abrir com...$\" do menu de contexto \
|
||||
# para aplicativos 32 bits."
|
||||
|
||||
#LangString str_section_edit_with64 ${LANG_PORTUGUESEBR} \
|
||||
# "Versão 64 bits"
|
||||
#LangString str_desc_edit_with64 ${LANG_PORTUGUESEBR} \
|
||||
# "Adiciona o Vim à lista $\"Abrir com...$\" do menu de contexto \
|
||||
# para aplicativos 64 bits."
|
||||
|
||||
LangString str_section_vim_rc ${LANG_PORTUGUESEBR} \
|
||||
"Criar configuração padrão"
|
||||
LangString str_desc_vim_rc ${LANG_PORTUGUESEBR} \
|
||||
"Cria um arquivo de configuração padrão (_vimrc) se não já existir."
|
||||
|
||||
LangString str_group_plugin ${LANG_PORTUGUESEBR} \
|
||||
"Criar diretórios de plugins"
|
||||
LangString str_desc_plugin ${LANG_PORTUGUESEBR} \
|
||||
"Cria diretórios de plugins. Diretórios de plugins permitem estender \
|
||||
o Vim adicionando um arquivo a um direótrio."
|
||||
|
||||
LangString str_section_plugin_home ${LANG_PORTUGUESEBR} \
|
||||
"Privados"
|
||||
LangString str_desc_plugin_home ${LANG_PORTUGUESEBR} \
|
||||
"Cria diretórios de plugins no diretório HOME."
|
||||
|
||||
LangString str_section_plugin_vim ${LANG_PORTUGUESEBR} \
|
||||
"Compartilhados"
|
||||
LangString str_desc_plugin_vim ${LANG_PORTUGUESEBR} \
|
||||
"Cria diretórios de plugins no diretório de instalação do Vim, \
|
||||
o qual é usado por todos os usuários do sistema."
|
||||
|
||||
LangString str_section_nls ${LANG_PORTUGUESEBR} \
|
||||
"Suporte ao idioma nativo"
|
||||
LangString str_desc_nls ${LANG_PORTUGUESEBR} \
|
||||
"Instala arquivos para suporte ao idioma nativo."
|
||||
|
||||
LangString str_unsection_register ${LANG_PORTUGUESEBR} \
|
||||
"Desregistrar Vim"
|
||||
LangString str_desc_unregister ${LANG_PORTUGUESEBR} \
|
||||
"Remove os registras do Vim do sistema."
|
||||
|
||||
LangString str_unsection_exe ${LANG_PORTUGUESEBR} \
|
||||
"Remover arquivos executáveis/runtime do Vim"
|
||||
LangString str_desc_rm_exe ${LANG_PORTUGUESEBR} \
|
||||
"Remove todos os arquivos executáveis e de runtime do Vim."
|
||||
|
||||
LangString str_ungroup_plugin ${LANG_PORTUGUESEBR} \
|
||||
"Remover diretórios de plugins"
|
||||
LangString str_desc_rm_plugin ${LANG_PORTUGUESEBR} \
|
||||
"Remove os diretórios de plugins se eles estiverem vazios."
|
||||
|
||||
LangString str_unsection_plugin_home ${LANG_PORTUGUESEBR} \
|
||||
"Privados"
|
||||
LangString str_desc_rm_plugin_home ${LANG_PORTUGUESEBR} \
|
||||
"Remove os diretórios de plugins do diretório HOME."
|
||||
|
||||
LangString str_unsection_plugin_vim ${LANG_PORTUGUESEBR} \
|
||||
"Compartilhados"
|
||||
LangString str_desc_rm_plugin_vim ${LANG_PORTUGUESEBR} \
|
||||
"Remove os diretórios de plugins do diretório de instalação do Vim."
|
||||
|
||||
LangString str_unsection_rootdir ${LANG_PORTUGUESEBR} \
|
||||
"Remover diretório raiz do Vim"
|
||||
LangString str_desc_rm_rootdir ${LANG_PORTUGUESEBR} \
|
||||
"Remove o diretório raiz do Vim. Ele contém seus \
|
||||
arquivos de configuração do Vim!"
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Messages {{{1
|
||||
##############################################################################
|
||||
|
||||
#LangString str_msg_too_many_ver ${LANG_PORTUGUESEBR} \
|
||||
# "Encontradas $vim_old_ver_count versões do Vim em seu sistema.$\r$\n\
|
||||
# Este instalador só consegue lidar com ${VIM_MAX_OLD_VER} versões\
|
||||
# no máximo.$\r$\n\
|
||||
# Por favor, remova algumas versões e comece novamente."
|
||||
|
||||
#LangString str_msg_invalid_root ${LANG_PORTUGUESEBR} \
|
||||
# "Caminho de instalação inválido: $vim_install_root!$\r$\n\
|
||||
# Ele deve terminar com $\"vim$\"."
|
||||
|
||||
#LangString str_msg_bin_mismatch ${LANG_PORTUGUESEBR} \
|
||||
# "Incompatibilidade de caminho de binários!$\r$\n$\r$\n\
|
||||
# Esperava que o caminho de binários fosse $\"$vim_bin_path$\",$\r$\n\
|
||||
# mas o sistema indica que o caminho de binários é $\"$INSTDIR$\"."
|
||||
|
||||
#LangString str_msg_vim_running ${LANG_PORTUGUESEBR} \
|
||||
# "Vim ainda está em execução em seu sistema.$\r$\n\
|
||||
# Por favor, feche todas as instâncias do Vim para poder continuar."
|
||||
|
||||
#LangString str_msg_register_ole ${LANG_PORTUGUESEBR} \
|
||||
# "Tentativa de registrar o Vim com OLE. \
|
||||
# Não há mensagem que indique se isso funciona ou não."
|
||||
|
||||
#LangString str_msg_unreg_ole ${LANG_PORTUGUESEBR} \
|
||||
# "Tentando desregistrar o Vim com OLE. \
|
||||
# Não há mensagem que indique se isso funciona ou não."
|
||||
|
||||
#LangString str_msg_rm_start ${LANG_PORTUGUESEBR} \
|
||||
# "Desinstalando a seguinte versão:"
|
||||
|
||||
#LangString str_msg_rm_fail ${LANG_PORTUGUESEBR} \
|
||||
# "Falha ao desinstalar a seguinte versão:"
|
||||
|
||||
#LangString str_msg_no_rm_key ${LANG_PORTUGUESEBR} \
|
||||
# "Não foi possível encontrar a chave de registro do desinstalador."
|
||||
|
||||
#LangString str_msg_no_rm_reg ${LANG_PORTUGUESEBR} \
|
||||
# "Não foi possível encontrar o desinstalador a partir do registro."
|
||||
|
||||
#LangString str_msg_no_rm_exe ${LANG_PORTUGUESEBR} \
|
||||
# "Não foi possível acessar o desinstalador."
|
||||
|
||||
#LangString str_msg_rm_copy_fail ${LANG_PORTUGUESEBR} \
|
||||
# "Falha ao copiar o desinstalador para um diretório temporário."
|
||||
|
||||
#LangString str_msg_rm_run_fail ${LANG_PORTUGUESEBR} \
|
||||
# "Falha ao executar o desinstalador."
|
||||
|
||||
#LangString str_msg_abort_install ${LANG_PORTUGUESEBR} \
|
||||
# "Instalador será interrompido."
|
||||
|
||||
LangString str_msg_install_fail ${LANG_PORTUGUESEBR} \
|
||||
"A instalação falhou. Mais sorte na próxima vez."
|
||||
|
||||
LangString str_msg_rm_exe_fail ${LANG_PORTUGUESEBR} \
|
||||
"Alguns arquivos em $0 não foram excluídos!$\r$\n\
|
||||
Você deve fazê-lo manualmente."
|
||||
|
||||
#LangString str_msg_rm_root_fail ${LANG_PORTUGUESEBR} \
|
||||
# "AVISO: Não foi possível remover $\"$vim_install_root$\", \
|
||||
# pois não está vazio!"
|
||||
|
||||
LangString str_msg_uninstalling ${LANG_PORTUGUESEBR} \
|
||||
"Desinstalando a versão antiga..."
|
||||
|
||||
LangString str_msg_registering ${LANG_PORTUGUESEBR} \
|
||||
"Registrando..."
|
||||
|
||||
LangString str_msg_unregistering ${LANG_PORTUGUESEBR} \
|
||||
"Desregistrando..."
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Dialog Box {{{1
|
||||
##############################################################################
|
||||
|
||||
LangString str_vimrc_page_title ${LANG_PORTUGUESEBR} \
|
||||
"Escolher configurações do _vimrc"
|
||||
LangString str_vimrc_page_subtitle ${LANG_PORTUGUESEBR} \
|
||||
"Escolha as configurações para melhorias, teclado e mouse."
|
||||
|
||||
LangString str_msg_compat_title ${LANG_PORTUGUESEBR} \
|
||||
" Comportamento Vi / Vim "
|
||||
LangString str_msg_compat_desc ${LANG_PORTUGUESEBR} \
|
||||
"&Compatibilidade e melhorias"
|
||||
LangString str_msg_compat_vi ${LANG_PORTUGUESEBR} \
|
||||
"Compatível com Vi"
|
||||
LangString str_msg_compat_vim ${LANG_PORTUGUESEBR} \
|
||||
"Vim original"
|
||||
LangString str_msg_compat_defaults ${LANG_PORTUGUESEBR} \
|
||||
"Vim com algumas melhorias (carrega defaults.vim)"
|
||||
LangString str_msg_compat_all ${LANG_PORTUGUESEBR} \
|
||||
"Vim com todas as melhorias (carrega vimrc_example.vim) (Padrão)"
|
||||
|
||||
LangString str_msg_keymap_title ${LANG_PORTUGUESEBR} \
|
||||
" Mapeamentos "
|
||||
LangString str_msg_keymap_desc ${LANG_PORTUGUESEBR} \
|
||||
"&Remapear algumas teclas para o Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
|
||||
LangString str_msg_keymap_default ${LANG_PORTUGUESEBR} \
|
||||
"Não remapear teclas (Padrão)"
|
||||
LangString str_msg_keymap_windows ${LANG_PORTUGUESEBR} \
|
||||
"Remapear algumas teclas"
|
||||
|
||||
LangString str_msg_mouse_title ${LANG_PORTUGUESEBR} \
|
||||
" Mouse "
|
||||
LangString str_msg_mouse_desc ${LANG_PORTUGUESEBR} \
|
||||
"&Comportamento de botões direito e esquerdo"
|
||||
LangString str_msg_mouse_default ${LANG_PORTUGUESEBR} \
|
||||
"Direito: menu popup, Esquerdo: modo visual (Padrão)"
|
||||
LangString str_msg_mouse_windows ${LANG_PORTUGUESEBR} \
|
||||
"Direito: menu popup, Esquerdo: modo de seleção (Windows)"
|
||||
LangString str_msg_mouse_unix ${LANG_PORTUGUESEBR} \
|
||||
"Direito: estende seleção, Esquerdo: modo visual (Unix)"
|
||||
90
runtime/autoload/dist/man.vim
vendored
90
runtime/autoload/dist/man.vim
vendored
@@ -5,6 +5,8 @@
|
||||
" Autoload Split: Bram Moolenaar
|
||||
" Last Change: 2024 Jan 17 (make it work on AIX, see #13847)
|
||||
" 2024 Jul 06 (honor command modifiers, #15117)
|
||||
" 2025 Mar 05 (add :keepjumps, #16791)
|
||||
" 2025 Mar 09 (improve :Man completion for man-db, #16843)
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
@@ -34,6 +36,88 @@ endtry
|
||||
|
||||
unlet! uname_s
|
||||
|
||||
let s:man_db_pages_by_section = v:null
|
||||
func! s:ManDbPagesBySection() abort
|
||||
if s:man_db_pages_by_section isnot v:null
|
||||
return s:man_db_pages_by_section
|
||||
endif
|
||||
let s:man_db_pages_by_section = {}
|
||||
let list_command = 'apropos --long .'
|
||||
let unparsed_lines = []
|
||||
for line in systemlist(list_command)
|
||||
" Typical lines:
|
||||
" vim (1) - Vi IMproved, a programmer's text editor
|
||||
"
|
||||
" Unusual lines:
|
||||
" pgm_read_ T _ (3avr) - (unknown subject)
|
||||
"
|
||||
" Code that shows the line's format:
|
||||
" https://gitlab.com/man-db/man-db/-/blob/2607d203472efb036d888e9e7997724a41a53876/src/whatis.c#L409
|
||||
let match = matchlist(line, '^\(.\{-1,}\) (\(\S\+\)) ')
|
||||
if empty(match)
|
||||
call add(unparsed_lines, line)
|
||||
continue
|
||||
endif
|
||||
let [page, section] = match[1:2]
|
||||
if !has_key(s:man_db_pages_by_section, section)
|
||||
let s:man_db_pages_by_section[section] = []
|
||||
endif
|
||||
call add(s:man_db_pages_by_section[section], page)
|
||||
endfor
|
||||
if !empty(unparsed_lines)
|
||||
echomsg 'Unable to parse ' .. string(len(unparsed_lines)) .. ' lines ' ..
|
||||
\ 'from the output of `' .. list_command .. '`. Example lines:'
|
||||
for line in unparsed_lines[:9]
|
||||
echomsg line
|
||||
endfor
|
||||
endif
|
||||
return s:man_db_pages_by_section
|
||||
endfunc
|
||||
|
||||
func! dist#man#Reload() abort
|
||||
if g:ft_man_implementation ==# 'man-db'
|
||||
let s:man_db_pages_by_section = v:null
|
||||
call s:ManDbPagesBySection()
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func! s:StartsWithCaseInsensitive(haystack, needle) abort
|
||||
if empty(a:needle)
|
||||
return v:true
|
||||
endif
|
||||
return a:haystack[:len(a:needle)-1] ==? a:needle
|
||||
endfunc
|
||||
|
||||
func! dist#man#ManDbComplete(arg_lead, cmd_line, cursor_pos) abort
|
||||
let args = split(trim(a:cmd_line[: a:cursor_pos - 1], '', 1), '', v:true)
|
||||
let pages_by_section = s:ManDbPagesBySection()
|
||||
if len(args) > 2
|
||||
" Page in the section args[1]. At least on Debian testing as of
|
||||
" 2025-03-06, man seems to match sections case-insensitively and match any
|
||||
" prefix of the section. E.g., `man 3 sigprocmask` and `man 3PoSi
|
||||
" sigprocmask` with both load sigprocmask(3posix) even though the 3 in the
|
||||
" first command is also the name of a different section.
|
||||
let results = []
|
||||
for [section, pages] in items(pages_by_section)
|
||||
if s:StartsWithCaseInsensitive(section, args[1])
|
||||
call extend(results, pages)
|
||||
endif
|
||||
endfor
|
||||
else
|
||||
" Could be a section, or a page in any section. Add space after sections
|
||||
" since there has to be a second argument in that case.
|
||||
let results = flattennew(values(pages_by_section), 1)
|
||||
for section in keys(pages_by_section)
|
||||
call add(results, section .. ' ')
|
||||
endfor
|
||||
endif
|
||||
call sort(results)
|
||||
call uniq(results)
|
||||
call filter(results,
|
||||
\ {_, val -> s:StartsWithCaseInsensitive(val, a:arg_lead)})
|
||||
return results
|
||||
endfunc
|
||||
|
||||
func s:ParseIntoPageAndSection()
|
||||
" Accommodate a reference that terminates in a hyphen.
|
||||
"
|
||||
@@ -188,7 +272,7 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
setl buftype=nofile noswapfile
|
||||
|
||||
setl fdc=0 ma nofen nonu nornu
|
||||
%delete _
|
||||
keepjumps %delete _
|
||||
let unsetwidth = 0
|
||||
if empty($MANWIDTH)
|
||||
let $MANWIDTH = winwidth(0)
|
||||
@@ -218,10 +302,10 @@ func dist#man#GetPage(cmdmods, ...)
|
||||
endif
|
||||
" Remove blank lines from top and bottom.
|
||||
while line('$') > 1 && getline(1) =~ '^\s*$'
|
||||
1delete _
|
||||
keepjumps 1delete _
|
||||
endwhile
|
||||
while line('$') > 1 && getline('$') =~ '^\s*$'
|
||||
$delete _
|
||||
keepjumps $delete _
|
||||
endwhile
|
||||
1
|
||||
setl ft=man nomod
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
" autoloading search path fix
|
||||
" substitution of hardcoded commands with global variables
|
||||
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
|
||||
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
|
||||
" }}}
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
@@ -100,6 +101,10 @@ if !exists("g:GetLatestVimScripts_bunzip2")
|
||||
let g:GetLatestVimScripts_bunzip2= "bunzip2"
|
||||
endif
|
||||
|
||||
if !exists("g:GetLatestVimScripts_bunzip3")
|
||||
let g:GetLatestVimScripts_bunzip3= "bunzip3"
|
||||
endif
|
||||
|
||||
if !exists("g:GetLatestVimScripts_gunzip")
|
||||
let g:GetLatestVimScripts_gunzip= "gunzip"
|
||||
endif
|
||||
@@ -565,73 +570,55 @@ fun! s:GetOneScript(...)
|
||||
" --------------------------------------------------------------------------
|
||||
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
|
||||
if doautoinstall
|
||||
" call Decho(" ")
|
||||
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
|
||||
if filereadable(sname)
|
||||
" call Decho("<".sname."> is readable")
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
|
||||
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
|
||||
let installdir= curdir."/Installed"
|
||||
if !isdirectory(installdir)
|
||||
call mkdir(installdir)
|
||||
endif
|
||||
" call Decho("curdir<".curdir."> installdir<".installdir.">")
|
||||
" call Decho("exe cd ".fnameescape(s:autoinstall))
|
||||
exe "cd ".fnameescape(s:autoinstall)
|
||||
|
||||
" determine target directory for moves
|
||||
let firstdir= substitute(&rtp,',.*$','','')
|
||||
let pname = substitute(sname,'\..*','.vim','')
|
||||
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
|
||||
if filereadable(firstdir.'/AsNeeded/'.pname)
|
||||
let tgtdir= "AsNeeded"
|
||||
else
|
||||
let tgtdir= "plugin"
|
||||
endif
|
||||
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
|
||||
|
||||
|
||||
" decompress
|
||||
if sname =~ '\.bz2$'
|
||||
" call Decho("decompress: attempt to bunzip2 ".sname)
|
||||
exe "sil !".g:GetLatestVimScripts_bunzip2." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.bz2$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after bunzip2")
|
||||
elseif sname =~ '\.bz3$'
|
||||
exe "sil !".g:GetLatestVimScripts_bunzip3." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.bz3$','','')
|
||||
elseif sname =~ '\.gz$'
|
||||
" call Decho("decompress: attempt to gunzip ".sname)
|
||||
exe "sil !".g:GetLatestVimScripts_gunzip." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.gz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||
elseif sname =~ '\.xz$'
|
||||
" call Decho("decompress: attempt to unxz ".sname)
|
||||
exe "sil !".g:GetLatestVimScripts_unxz." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.xz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after unxz")
|
||||
else
|
||||
" call Decho("no decompression needed")
|
||||
endif
|
||||
|
||||
|
||||
" distribute archive(.zip, .tar, .vba, .vmb, ...) contents
|
||||
if sname =~ '\.zip$'
|
||||
" call Decho("dearchive: attempt to unzip ".sname)
|
||||
exe "silent !".g:GetLatestVimScripts_unzip." -o ".shellescape(sname)
|
||||
elseif sname =~ '\.tar$'
|
||||
" call Decho("dearchive: attempt to untar ".sname)
|
||||
exe "silent !tar -xvf ".shellescape(sname)
|
||||
elseif sname =~ '\.tgz$'
|
||||
" call Decho("dearchive: attempt to untar+gunzip ".sname)
|
||||
exe "silent !tar -zxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.taz$'
|
||||
" call Decho("dearchive: attempt to untar+uncompress ".sname)
|
||||
exe "silent !tar -Zxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.tbz$'
|
||||
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
|
||||
exe "silent !tar -jxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.txz$'
|
||||
" call Decho("dearchive: attempt to untar+xz ".sname)
|
||||
exe "silent !tar -Jxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.vba$\|\.vmb$'
|
||||
" call Decho("dearchive: attempt to handle a vimball: ".sname)
|
||||
silent 1split
|
||||
if exists("g:vimball_home")
|
||||
let oldvimballhome= g:vimball_home
|
||||
@@ -648,25 +635,21 @@ fun! s:GetOneScript(...)
|
||||
else
|
||||
" call Decho("no dearchiving needed")
|
||||
endif
|
||||
|
||||
|
||||
" ---------------------------------------------
|
||||
" move plugin to plugin/ or AsNeeded/ directory
|
||||
" ---------------------------------------------
|
||||
if sname =~ '.vim$'
|
||||
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
|
||||
else
|
||||
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
|
||||
endif
|
||||
if tgtdir != "plugin"
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir
|
||||
endif
|
||||
|
||||
|
||||
" helptags step
|
||||
let docdir= substitute(&rtp,',.*','','e')."/doc"
|
||||
" call Decho("helptags: docdir<".docdir.">")
|
||||
exe "helptags ".fnameescape(docdir)
|
||||
exe "cd ".fnameescape(curdir)
|
||||
endif
|
||||
@@ -681,13 +664,8 @@ fun! s:GetOneScript(...)
|
||||
|
||||
" update the data in the <GetLatestVimScripts.dat> file
|
||||
call setline(line("."),modline)
|
||||
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
|
||||
" else " Decho
|
||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
|
||||
endif
|
||||
|
||||
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
|
||||
" call Dret("GetOneScript")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Nov 11, 2024
|
||||
" tar.vim: Handles browsing tarfiles - AUTOLOAD PORTION
|
||||
" Date: Mar 01, 2025
|
||||
" Version: 32b (with modifications from the Vim Project)
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Former Maintainer: Charles E Campbell
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Last Change:
|
||||
" 2024 Jan 08 by Vim Project: fix a few problems (#138331, #12637, #8109)
|
||||
" 2024 Feb 19 by Vim Project: announce adoption
|
||||
" 2024 Nov 11 by Vim Project: support permissions (#7379)
|
||||
" 2025 Feb 06 by Vim Project: add support for lz4 (#16591)
|
||||
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
|
||||
" 2025 Mar 01 by Vim Project: fix syntax error in tar#Read()
|
||||
" 2025 Mar 02 by Vim Project: escape the filename before using :read
|
||||
" 2025 Mar 02 by Vim Project: determine the compression using readblob()
|
||||
" instead of shelling out to file(1)
|
||||
"
|
||||
" Contains many ideas from Michael Toren's <tar.vim>
|
||||
"
|
||||
@@ -17,7 +26,6 @@
|
||||
" By using this plugin, you agree that in no event will the
|
||||
" copyright holder be liable for any damages resulting from
|
||||
" the use of this software.
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("g:loaded_tar")
|
||||
@@ -32,8 +40,6 @@ if v:version < 702
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
"DechoTabOn
|
||||
"call Decho("loading autoload/tar.vim")
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Default Settings: {{{1
|
||||
@@ -96,7 +102,6 @@ if !exists("g:tar_shq")
|
||||
else
|
||||
let g:tar_shq= "'"
|
||||
endif
|
||||
" call Decho("g:tar_shq<".g:tar_shq.">")
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
@@ -106,29 +111,23 @@ endif
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Browse: {{{2
|
||||
fun! tar#Browse(tarfile)
|
||||
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:tar_cmd)
|
||||
redraw!
|
||||
" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
|
||||
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse")
|
||||
return
|
||||
endif
|
||||
if !filereadable(a:tarfile)
|
||||
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
|
||||
if a:tarfile !~# '^\a\+://'
|
||||
" if it's an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
" call Decho("***error*** (tar#Browse) File not readable<".a:tarfile.">")
|
||||
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
||||
endif
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
|
||||
return
|
||||
endif
|
||||
if &ma != 1
|
||||
@@ -144,7 +143,6 @@ fun! tar#Browse(tarfile)
|
||||
set ft=tar
|
||||
|
||||
" give header
|
||||
" call Decho("printing header")
|
||||
let lastline= line("$")
|
||||
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
|
||||
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
|
||||
@@ -161,52 +159,50 @@ fun! tar#Browse(tarfile)
|
||||
let curlast= line("$")
|
||||
|
||||
if tarfile =~# '\.\(gz\)$'
|
||||
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
|
||||
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzst\)$'
|
||||
if has("unix") && executable("file")
|
||||
let filekind= system("file ".shellescape(tarfile,1))
|
||||
else
|
||||
let filekind= ""
|
||||
endif
|
||||
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' ||
|
||||
\ tarfile =~# '\.\(tzst\)$' || tarfile =~# '\.\(tlz4\)$'
|
||||
let header= s:Header(tarfile)
|
||||
|
||||
if filekind =~ "bzip2"
|
||||
if header =~? 'bzip2'
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif filekind =~ "XZ"
|
||||
elseif header =~? 'bzip3'
|
||||
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif header =~? 'xz'
|
||||
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif filekind =~ "Zstandard"
|
||||
elseif header =~? 'zstd'
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
elseif header =~? 'lz4'
|
||||
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif header =~? 'gzip'
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
endif
|
||||
|
||||
elseif tarfile =~# '\.lrp'
|
||||
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
|
||||
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(bz3\|tb3\)$'
|
||||
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(lzma\|tlz\)$'
|
||||
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(zst\|tzst\)$'
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
|
||||
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
if tarfile =~ '^\s*-'
|
||||
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||
let tarfile = substitute(tarfile, '-', './-', '')
|
||||
endif
|
||||
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
|
||||
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
|
||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||
return
|
||||
endif
|
||||
"
|
||||
@@ -237,29 +233,24 @@ fun! tar#Browse(tarfile)
|
||||
endif
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse : b:tarfile<".b:tarfile.">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" TarBrowseSelect: {{{2
|
||||
fun! s:TarBrowseSelect()
|
||||
" call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
|
||||
redraw!
|
||||
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
|
||||
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
|
||||
return
|
||||
endif
|
||||
|
||||
" sanity check
|
||||
if fname =~ '^"'
|
||||
let &report= repkeep
|
||||
" call Dret("TarBrowseSelect")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -283,19 +274,19 @@ fun! s:TarBrowseSelect()
|
||||
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Read: {{{2
|
||||
fun! tar#Read(fname,mode)
|
||||
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
" be careful not to execute special crafted files
|
||||
let escape_file = fname->fnameescape()
|
||||
|
||||
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
|
||||
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
||||
@@ -333,12 +324,13 @@ fun! tar#Read(fname,mode)
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile.">")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
if fname =~ '\.bz2$' && executable("bzcat")
|
||||
let decmp= "|bzcat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.bz3$' && executable("bz3cat")
|
||||
let decmp= "|bz3cat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.t\=gz$' && executable("zcat")
|
||||
let decmp= "|zcat"
|
||||
let doro = 1
|
||||
@@ -351,10 +343,13 @@ fun! tar#Read(fname,mode)
|
||||
elseif fname =~ '\.zst$' && executable("zstdcat")
|
||||
let decmp= "|zstdcat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.lz4$' && executable("lz4cat")
|
||||
let decmp= "|lz4cat"
|
||||
let doro = 1
|
||||
else
|
||||
let decmp=""
|
||||
let doro = 0
|
||||
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
|
||||
if fname =~ '\.bz2$\|\.bz3$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
|
||||
setlocal bin
|
||||
endif
|
||||
endif
|
||||
@@ -367,47 +362,51 @@ fun! tar#Read(fname,mode)
|
||||
|
||||
if tarfile =~# '\.bz2$'
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
elseif tarfile =~# '\.bz3$'
|
||||
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".escape_file
|
||||
elseif tarfile =~# '\.\(gz\)$'
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
elseif tarfile =~# '\(\.tgz\|\.tbz\|\.txz\)'
|
||||
if has("unix") && executable("file")
|
||||
let filekind= system("file ".shellescape(tarfile,1))
|
||||
else
|
||||
let filekind= ""
|
||||
endif
|
||||
if filekind =~ "bzip2"
|
||||
let filekind= s:Header(tarfile)
|
||||
if filekind =~? "bzip2"
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif filekind =~ "XZ"
|
||||
exe "read ".escape_file
|
||||
elseif filekind =~ "bzip3"
|
||||
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".escape_file
|
||||
elseif filekind =~? "xz"
|
||||
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif filekind =~ "Zstandard"
|
||||
exe "read ".escape_file
|
||||
elseif filekind =~? "zstd"
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
else
|
||||
exe "read ".escape_file
|
||||
elseif filekind =~? "gzip"
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
endif
|
||||
|
||||
elseif tarfile =~# '\.lrp$'
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
elseif tarfile =~# '\.lzma$'
|
||||
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
|
||||
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".escape_file
|
||||
else
|
||||
if tarfile =~ '^\s*-'
|
||||
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||
let tarfile = substitute(tarfile, '-', './-', '')
|
||||
endif
|
||||
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
exe "read ".escape_file
|
||||
endif
|
||||
|
||||
redraw!
|
||||
@@ -432,16 +431,13 @@ if v:shell_error != 0
|
||||
set nomod
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Write: {{{2
|
||||
fun! tar#Write(fname)
|
||||
" call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
" temporary buffer variable workaround because too fucking tired. but it works now
|
||||
let curdir= b:curdir
|
||||
let tmpdir= b:tmpdir
|
||||
@@ -449,16 +445,13 @@ fun! tar#Write(fname)
|
||||
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
|
||||
redraw!
|
||||
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
|
||||
" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
|
||||
return
|
||||
endif
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:tar_cmd)
|
||||
redraw!
|
||||
" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -470,43 +463,43 @@ fun! tar#Write(fname)
|
||||
call system("bzip2 -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.bz2','','e')
|
||||
let compress= "bzip2 -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.bz3'
|
||||
call system("bzip3 -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.bz3','','e')
|
||||
let compress= "bzip3 -- ".shellescape(tarfile,0)
|
||||
elseif tarfile =~# '\.gz'
|
||||
call system("gzip -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.gz','','e')
|
||||
let compress= "gzip -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.tgz'
|
||||
call system("gzip -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
|
||||
let compress= "gzip -- ".shellescape(tarfile,0)
|
||||
let tgz = 1
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.xz'
|
||||
call system("xz -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.xz','','e')
|
||||
let compress= "xz -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.zst'
|
||||
call system("zstd --decompress --rm -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.zst','','e')
|
||||
let compress= "zstd --rm -- ".shellescape(tarfile,0)
|
||||
elseif tarfile =~# '\.lz4'
|
||||
call system("lz4 --decompress --rm -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.lz4','','e')
|
||||
let compress= "lz4 --rm -- ".shellescape(tarfile,0)
|
||||
elseif tarfile =~# '\.lzma'
|
||||
call system("lzma -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.lzma','','e')
|
||||
let compress= "lzma -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile.">")
|
||||
" Note: no support for name.tar.tbz/.txz/.tgz/.tlz4/.tzst
|
||||
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
" call Decho("***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname)
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
||||
else
|
||||
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
|
||||
if fname =~ '/'
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if has("win32unix") && executable("cygpath")
|
||||
@@ -521,7 +514,6 @@ fun! tar#Write(fname)
|
||||
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
|
||||
let tarfile = substitute(tarfile, '-', './-', '')
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
|
||||
if exists("g:tar_secure")
|
||||
let tar_secure= " -- "
|
||||
@@ -534,26 +526,20 @@ fun! tar#Write(fname)
|
||||
endif
|
||||
|
||||
" delete old file from tarfile
|
||||
" call Decho("system(".g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
|
||||
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||
else
|
||||
|
||||
" update tarfile with new file
|
||||
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||
elseif exists("compress")
|
||||
" call Decho("call system(".compress.")")
|
||||
call system(compress)
|
||||
if exists("tgz")
|
||||
" call Decho("rename(".tarfile.".gz,".substitute(tarfile,'\.tar$','.tgz','e').")")
|
||||
call rename(tarfile.".gz",substitute(tarfile,'\.tar$','.tgz','e'))
|
||||
endif
|
||||
endif
|
||||
@@ -561,7 +547,6 @@ fun! tar#Write(fname)
|
||||
|
||||
" support writing tarfiles across a network
|
||||
if s:tblfile_{winnr()} =~ '^\a\+://'
|
||||
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
|
||||
let tblfile= s:tblfile_{winnr()}
|
||||
1split|noswapfile enew
|
||||
let binkeep= &l:binary
|
||||
@@ -583,13 +568,11 @@ fun! tar#Write(fname)
|
||||
setlocal nomod
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Diff: {{{2
|
||||
fun! tar#Diff(userfname,fname)
|
||||
" call Dfunc("tar#Diff(userfname<".a:userfname."> fname<".a:fname.")")
|
||||
let fname= a:fname
|
||||
if a:userfname != ""
|
||||
let fname= a:userfname
|
||||
@@ -607,133 +590,135 @@ fun! tar#Diff(userfname,fname)
|
||||
redraw!
|
||||
echo "***warning*** unable to read file<".fname.">"
|
||||
endif
|
||||
" call Dret("tar#Diff")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Extract: extract a file from a (possibly compressed) tar archive {{{2
|
||||
fun! tar#Extract()
|
||||
" call Dfunc("tar#Extract()")
|
||||
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
|
||||
redraw!
|
||||
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
|
||||
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
|
||||
return
|
||||
endif
|
||||
|
||||
" sanity check
|
||||
if fname =~ '^"'
|
||||
let &report= repkeep
|
||||
" call Dret("TarBrowseSelect")
|
||||
return
|
||||
endif
|
||||
|
||||
let tarball = expand("%")
|
||||
" call Decho("tarball<".tarball.">")
|
||||
let tarbase = substitute(tarball,'\..*$','','')
|
||||
" call Decho("tarbase<".tarbase.">")
|
||||
|
||||
let extractcmd= netrw#WinPath(g:tar_extractcmd)
|
||||
if filereadable(tarbase.".tar")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tgz")
|
||||
let extractcmd= substitute(extractcmd,"-","-z","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tgz ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd."t ".tarbase.".tgz ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.gz")
|
||||
let extractcmd= substitute(extractcmd,"-","-z","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tbz")
|
||||
let extractcmd= substitute(extractcmd,"-","-j","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.bz2")
|
||||
let extractcmd= substitute(extractcmd,"-","-j","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.bz3")
|
||||
let extractcmd= substitute(extractcmd,"-","-j","")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz3 ".fname.": failed!" | echohl NONE
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".txz")
|
||||
let extractcmd= substitute(extractcmd,"-","-J","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.xz")
|
||||
let extractcmd= substitute(extractcmd,"-","-J","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tzst")
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.zst")
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.zst ".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))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tlz4 ".fname.": failed!" | echohl NONE
|
||||
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))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.lz4 ".fname.": failed!" | echohl NONE
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
@@ -741,14 +726,11 @@ fun! tar#Extract()
|
||||
|
||||
" restore option
|
||||
let &report= repkeep
|
||||
|
||||
" call Dret("tar#Extract")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Rmdir: {{{2
|
||||
fun! s:Rmdir(fname)
|
||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||
if has("unix")
|
||||
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
|
||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||
@@ -758,44 +740,55 @@ fun! s:Rmdir(fname)
|
||||
call system("del /S ".shellescape(a:fname,0))
|
||||
endif
|
||||
endif
|
||||
" call Dret("Rmdir")
|
||||
endfun
|
||||
|
||||
" s:FileHeader: {{{2
|
||||
fun! s:Header(fname)
|
||||
let header= readblob(a:fname, 0, 6)
|
||||
if header[0:2] == str2blob(['BZh']) " bzip2 header
|
||||
return "bzip2"
|
||||
elseif header[0:2] == str2blob(['BZ3']) " bzip3 header
|
||||
return "bzip3"
|
||||
elseif header == str2blob(["\3757zXZ\n"]) " xz header
|
||||
return "xz"
|
||||
elseif header[0:3] == str2blob(["\x28\xB5\x2F\xFD"]) " zstd header
|
||||
return "zstd"
|
||||
elseif header[0:3] == str2blob(["\004\"M\030"]) " lz4 header
|
||||
return "lz4"
|
||||
elseif (header[0:1] == str2blob(["\037\235"]) ||
|
||||
\ header[0:1] == str2blob(["\037\213"]) ||
|
||||
\ header[0:1] == str2blob(["\037\236"]) ||
|
||||
\ header[0:1] == str2blob(["\037\240"]) ||
|
||||
\ header[0:1] == str2blob(["\037\036"]))
|
||||
return "gzip"
|
||||
endif
|
||||
return "unknown"
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2
|
||||
fun! tar#Vimuntar(...)
|
||||
" call Dfunc("tar#Vimuntar() a:0=".a:0." a:1<".(exists("a:1")? a:1 : "-n/a-").">")
|
||||
let tarball = expand("%")
|
||||
" call Decho("tarball<".tarball.">")
|
||||
let tarbase = substitute(tarball,'\..*$','','')
|
||||
" call Decho("tarbase<".tarbase.">")
|
||||
let tarhome = expand("%:p")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
let tarhome= substitute(tarhome,'\\','/','g')
|
||||
endif
|
||||
let tarhome= substitute(tarhome,'/[^/]*$','','')
|
||||
" call Decho("tarhome<".tarhome.">")
|
||||
let tartail = expand("%:t")
|
||||
" call Decho("tartail<".tartail.">")
|
||||
let curdir = getcwd()
|
||||
" call Decho("curdir <".curdir.">")
|
||||
" set up vimhome
|
||||
if a:0 > 0 && a:1 != ""
|
||||
let vimhome= a:1
|
||||
else
|
||||
let vimhome= vimball#VimballHome()
|
||||
endif
|
||||
" call Decho("vimhome<".vimhome.">")
|
||||
|
||||
" call Decho("curdir<".curdir."> vimhome<".vimhome.">")
|
||||
if simplify(curdir) != simplify(vimhome)
|
||||
" copy (possibly compressed) tarball to .vim/vimfiles
|
||||
" call Decho(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
|
||||
call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
|
||||
" call Decho("exe cd ".fnameescape(vimhome))
|
||||
exe "cd ".fnameescape(vimhome)
|
||||
endif
|
||||
" call Decho("getcwd<".getcwd().">")
|
||||
|
||||
" if necessary, decompress the tarball; then, extract it
|
||||
if tartail =~ '\.tgz'
|
||||
@@ -807,24 +800,19 @@ fun! tar#Vimuntar(...)
|
||||
echoerr "unable to decompress<".tartail."> on this system"
|
||||
if simplify(curdir) != simplify(tarhome)
|
||||
" remove decompressed tarball, restore directory
|
||||
" call Decho("delete(".tartail.".tar)")
|
||||
call delete(tartail.".tar")
|
||||
" call Decho("exe cd ".fnameescape(curdir))
|
||||
exe "cd ".fnameescape(curdir)
|
||||
endif
|
||||
" call Dret("tar#Vimuntar")
|
||||
return
|
||||
endif
|
||||
else
|
||||
call vimball#Decompress(tartail,0)
|
||||
endif
|
||||
let extractcmd= netrw#WinPath(g:tar_extractcmd)
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase.".tar").")")
|
||||
call system(extractcmd." ".shellescape(tarbase.".tar"))
|
||||
|
||||
" set up help
|
||||
if filereadable("doc/".tarbase.".txt")
|
||||
" call Decho("exe helptags ".getcwd()."/doc")
|
||||
exe "helptags ".getcwd()."/doc"
|
||||
endif
|
||||
|
||||
@@ -833,8 +821,6 @@ fun! tar#Vimuntar(...)
|
||||
call delete(vimhome."/".tarbase.".tar")
|
||||
exe "cd ".fnameescape(curdir)
|
||||
endif
|
||||
|
||||
" call Dret("tar#Vimuntar")
|
||||
endfun
|
||||
|
||||
" =====================================================================
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Original Author: Charles E. Campbell
|
||||
" Date: Apr 11, 2016
|
||||
" Version: 37
|
||||
" 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".
|
||||
@@ -530,6 +532,26 @@ fun! vimball#Decompress(fname,...)
|
||||
exe "e ".escape(fname,' \')
|
||||
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||
|
||||
elseif expand("%") =~ '.*\.bz3' && executable("bunzip3")
|
||||
" 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.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz3$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||
|
||||
elseif expand("%") =~ '.*\.bz3' && executable("bzip3")
|
||||
" 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.">")
|
||||
endif
|
||||
let fname= substitute(a:fname,'\.bz3$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||
|
||||
elseif expand("%") =~ '.*\.zip' && executable("unzip")
|
||||
" handle *.zip with unzip
|
||||
silent exe "!unzip ".shellescape(a:fname)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
" 2024 Aug 05 by Vim Project: clean-up and make it work with shellslash on Windows
|
||||
" 2024 Aug 18 by Vim Project: correctly handle special globbing chars
|
||||
" 2024 Aug 21 by Vim Project: simplify condition to detect MS-Windows
|
||||
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
|
||||
" 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,
|
||||
@@ -343,6 +344,11 @@ fun! zip#Extract()
|
||||
return
|
||||
endif
|
||||
let target = fname->substitute('\[', '[[]', 'g')
|
||||
" unzip 6.0 does not support -- to denote end-of-arguments
|
||||
" unzip 6.1 (2010) apparently supports, it, but hasn't been released
|
||||
" so the workaround is to use glob '[-]' so that it won't be considered an argument
|
||||
" else, it would be possible to use 'unzip -o <file.zip> '-d/tmp' to extract the whole archive
|
||||
let target = target->substitute('^-', '[&]', '')
|
||||
if &shell =~ 'cmd' && has("win32")
|
||||
let target = target
|
||||
\ ->substitute('[?*]', '[&]', 'g')
|
||||
|
||||
@@ -6,6 +6,7 @@ vim9script
|
||||
# Contributors: Enno Nagel
|
||||
# Last Change: 2024 Mar 29
|
||||
# 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
|
||||
# 2025 Mar 11 by The Vim Project (add comment for Dispatch)
|
||||
|
||||
if exists("g:current_compiler")
|
||||
finish
|
||||
@@ -15,6 +16,7 @@ import autoload '../autoload/context.vim'
|
||||
|
||||
g:current_compiler = 'context'
|
||||
|
||||
# CompilerSet makeprg=context
|
||||
if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) ||
|
||||
(!filereadable('Makefile') && !filereadable('makefile'))
|
||||
var makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ')
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Compiler: Java Development Kit Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2024 Nov 19 (enable local javac_makeprg_params)
|
||||
" 2025 Mar 11 (add comment for Dispatch)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -11,6 +12,7 @@ let current_compiler = "javac"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=javac
|
||||
execute $'CompilerSet makeprg=javac\ {escape(get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')), ' \|"')}'
|
||||
|
||||
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
" 2024 Apr 03 by the Vim Project (removed :CompilerSet definition)
|
||||
" 2024 Apr 05 by the Vim Project (avoid leaving behind g:makeprg)
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
" 2025 Mar 11 by the Vim Project (add comment for Dispatch)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -50,6 +51,8 @@ let s:makeprg = g:ps1_makeprg_cmd .. ' %:p:S'
|
||||
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
|
||||
" + FullyQualifiedErrorId : CommandNotFoundException
|
||||
|
||||
" CompilerSet makeprg=pwsh
|
||||
" CompilerSet makeprg=powershell
|
||||
execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' \|"')
|
||||
|
||||
" Showing error in context with underlining.
|
||||
|
||||
21
runtime/compiler/svelte-check.vim
Normal file
21
runtime/compiler/svelte-check.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
" Vim compiler file
|
||||
" Compiler: svelte-check
|
||||
" Maintainer: @Konfekt
|
||||
" Last Change: 2025 Feb 27
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "svelte-check"
|
||||
|
||||
CompilerSet makeprg=npx\ svelte-check\ --output\ machine
|
||||
CompilerSet errorformat=%*\\d\ %t%*\\a\ \"%f\"\ %l:%c\ \"%m\",
|
||||
CompilerSet errorformat+=%-G%*\\d\ START\ %.%#,
|
||||
CompilerSet errorformat+=%-G%*\\d\ COMPLETED\ %.%#,
|
||||
CompilerSet errorformat+=%-G%.%#
|
||||
|
||||
" " Fall-back for versions of svelte-check that don't support --output machine
|
||||
" " before May 2020 https://github.com/sveltejs/language-tools/commit/9f7a90379d287a41621a5e78af5b010a8ab810c3
|
||||
" " which is before the first production release 1.1.31 of Svelte-Check
|
||||
" CompilerSet makeprg=npx\ svelte-check
|
||||
" CompilerSet errorformat=%A%f:%l:%c,
|
||||
" CompilerSet errorformat+=%C%t%*\\a\\:\ %m,
|
||||
" CompilerSet errorformat+=%-G%.%#,
|
||||
@@ -6,6 +6,7 @@
|
||||
" 2024 Apr 03 by the Vim Project (removed :CompilerSet definition)
|
||||
" 2024 Apr 05 by the Vim Project (avoid leaving behind g:makeprg)
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
" 2025 Mar 11 by the Vim Project (add comment for Dispatch)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -28,6 +29,7 @@ if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') ||
|
||||
let current_compiler = "latex"
|
||||
endif
|
||||
let s:makeprg=current_compiler .. ' -interaction=nonstopmode'
|
||||
" CompilerSet makeprg=latex
|
||||
execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' \|"')
|
||||
else
|
||||
let current_compiler = 'make'
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
" Compiler: TypeScript Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2024 Apr 03
|
||||
" 2025 Mar 11 by The Vim Project (add comment for Dispatch, add tsc_makeprg variable)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -11,9 +12,9 @@ let current_compiler = "tsc"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=tsc
|
||||
" CompilerSet makeprg=npx\ tsc
|
||||
|
||||
CompilerSet makeprg=tsc
|
||||
execute $'CompilerSet makeprg={escape(get(b:, 'tsc_makeprg', get(g:, 'tsc_makeprg', 'tsc')), ' \|"')}'
|
||||
CompilerSet errorformat=%f\ %#(%l\\,%c):\ %trror\ TS%n:\ %m,
|
||||
\%trror\ TS%n:\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
" Language: Typst
|
||||
" Previous Maintainer: Gregory Anders
|
||||
" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
|
||||
" Based On: https://github.com/kaarmu/typst.vim
|
||||
" Last Change: 2024 Dec 09
|
||||
" Based on: https://github.com/kaarmu/typst.vim
|
||||
" 2025 Mar 11 by the Vim Project (add comment for Dispatch)
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
@@ -13,4 +14,5 @@ let current_compiler = get(g:, 'typst_cmd', 'typst')
|
||||
" With `--diagnostic-format` we can use the default errorformat
|
||||
let s:makeprg = [current_compiler, 'compile', '--diagnostic-format', 'short', '%:S']
|
||||
|
||||
" CompilerSet makeprg=typst
|
||||
execute 'CompilerSet makeprg=' . join(s:makeprg, '\ ')
|
||||
|
||||
@@ -141,6 +141,9 @@ os_risc.txt:
|
||||
os_win32.txt:
|
||||
touch $@
|
||||
|
||||
pi_netrw.txt: ../pack/dist/opt/netrw/doc/netrw.txt
|
||||
cp ../pack/dist/opt/netrw/doc/netrw.txt $@
|
||||
|
||||
vietnamese.txt:
|
||||
touch $@
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.1. Last change: 2024 Dec 04
|
||||
*autocmd.txt* For Vim version 9.1. Last change: 2025 Mar 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -387,6 +387,7 @@ Name triggered by ~
|
||||
|TabNew| after creating a new tab page
|
||||
|WinClosed| after closing a window
|
||||
|TabClosed| after closing a tab page
|
||||
|TabClosedPre| before closing a tab page
|
||||
|WinEnter| after entering another window
|
||||
|WinLeave| before leaving a window
|
||||
|TabEnter| after entering another tab page
|
||||
@@ -603,6 +604,8 @@ CmdUndefined When a user command is used but it isn't
|
||||
when it's used. The pattern is matched
|
||||
against the command name. Both <amatch> and
|
||||
<afile> are set to the name of the command.
|
||||
This is triggered even when inside an
|
||||
autocommand defined without |autocmd-nested|.
|
||||
NOTE: Autocompletion won't work until the
|
||||
command is defined. An alternative is to
|
||||
always define the user command and have it
|
||||
@@ -934,7 +937,9 @@ FuncUndefined When a user function is used but it isn't
|
||||
when it's used. The pattern is matched
|
||||
against the function name. Both <amatch> and
|
||||
<afile> are set to the name of the function.
|
||||
Not triggered when compiling a |Vim9|
|
||||
This is triggered even when inside an
|
||||
autocommand defined without |autocmd-nested|,
|
||||
but not triggered when compiling a |Vim9|
|
||||
function.
|
||||
NOTE: When writing Vim scripts a better
|
||||
alternative is to use an autoloaded function.
|
||||
@@ -1228,6 +1233,10 @@ Syntax When the 'syntax' option has been set. The
|
||||
See |:syn-on|.
|
||||
*TabClosed*
|
||||
TabClosed After closing a tab page.
|
||||
*TabClosedPre*
|
||||
TabClosedPre Before closing a tab page. The window layout
|
||||
is locked, thus opening and closing of windows
|
||||
is prohibited.
|
||||
*TabEnter*
|
||||
TabEnter Just after entering a tab page. |tab-page|
|
||||
After triggering the WinEnter and before
|
||||
@@ -1342,6 +1351,10 @@ TextYankPost After text has been yanked or deleted in the
|
||||
called recursively.
|
||||
It is not allowed to change the buffer text,
|
||||
see |textlock|. *E1064*
|
||||
Also triggered indirectly when Vim tries to
|
||||
become owner of the Visual selection because
|
||||
of setting "autoselect" for 'guioptions' or
|
||||
'clipboard'.
|
||||
{only when compiled with the +eval feature}
|
||||
|
||||
*User*
|
||||
@@ -1992,6 +2005,9 @@ To disable autocommands for some time use the 'eventignore' option. Note that
|
||||
this may cause unexpected behavior, make sure you restore 'eventignore'
|
||||
afterwards, using a |:try| block with |:finally|.
|
||||
|
||||
To disable autocmds indefinitely in a specific window use the 'eventignorewin'
|
||||
option. This can only be used to ignore window and buffer related events.
|
||||
|
||||
*:noautocmd* *:noa*
|
||||
To disable autocommands for just one command use the ":noautocmd" command
|
||||
modifier. This will set 'eventignore' to "all" for the duration of the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Feb 02
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Mar 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1309,10 +1309,14 @@ blob2str({blob} [, {options}]) *blob2str()*
|
||||
items:
|
||||
encoding Decode the bytes in {blob} using this
|
||||
encoding. The value is a |String|. See
|
||||
|encoding-names| for the supported values.
|
||||
|encoding-names| for the supported values
|
||||
(plus the special value "none").
|
||||
*E1515*
|
||||
An error is given and an empty List is returned if
|
||||
an invalid byte sequence is encountered in {blob},
|
||||
When current 'encoding' is "utf-8", an error is given and an
|
||||
empty List is returned if an invalid byte sequence is
|
||||
encountered in {blob}. To suppress this validation and get
|
||||
potentially invalid string, set "encoding" in {options} to
|
||||
"none".
|
||||
|
||||
Returns an empty List if blob is empty.
|
||||
|
||||
@@ -3006,7 +3010,8 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
When {expr3} is omitted then "force" is assumed.
|
||||
|
||||
{expr1} is changed when {expr2} is not empty. If necessary
|
||||
make a copy of {expr1} first.
|
||||
make a copy of {expr1} first or use |extendnew()| to return a
|
||||
new List/Dictionary.
|
||||
{expr2} remains unchanged.
|
||||
When {expr1} is locked and {expr2} is not empty the operation
|
||||
fails.
|
||||
@@ -3953,6 +3958,13 @@ getchar([{expr} [, {opts}]]) *getchar()*
|
||||
The optional argument {opts} is a Dict and supports the
|
||||
following items:
|
||||
|
||||
cursor A String specifying cursor behavior
|
||||
when waiting for a character.
|
||||
"hide": hide the cursor.
|
||||
"keep": keep current cursor unchanged.
|
||||
"msg": move cursor to message area.
|
||||
(default: "msg")
|
||||
|
||||
number If |TRUE|, return a Number when getting
|
||||
a single character.
|
||||
If |FALSE|, the return value is always
|
||||
@@ -7575,9 +7587,8 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739*
|
||||
If {prot} is given it is used to set the protection bits of
|
||||
the new directory. The default is 0o755 (rwxr-xr-x: r/w for
|
||||
the user, readable for others). Use 0o700 to make it
|
||||
unreadable for others. This is only used for the last part of
|
||||
{name}. Thus if you create /tmp/foo/bar then /tmp/foo will be
|
||||
created with 0o755.
|
||||
unreadable for others. This is used for the newly created
|
||||
directories. Note: umask is applied to {prot} (on Unix).
|
||||
Example: >
|
||||
:call mkdir($HOME .. "/tmp/foo/bar", "p", 0o700)
|
||||
|
||||
@@ -10637,7 +10648,8 @@ str2blob({list} [, {options}]) *str2blob()*
|
||||
|
||||
The argument {options} is a |Dict| and supports the following
|
||||
items:
|
||||
encoding Encode the characters using this encoding.
|
||||
encoding Convert the characters using this encoding
|
||||
before making the Blob.
|
||||
The value is a |String|. See |encoding-names|
|
||||
for the supported values.
|
||||
|
||||
@@ -12743,6 +12755,7 @@ gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
haiku Haiku version of Vim.
|
||||
hangul_input Compiled with Hangul input support. |hangul|
|
||||
hpux HP-UX version of Vim.
|
||||
hurd GNU/Hurd version of Vim
|
||||
iconv Can use iconv() for conversion.
|
||||
insert_expand Compiled with support for CTRL-X expansion commands in
|
||||
Insert mode. (always true)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
*cmdline.txt* For Vim version 9.1. Last change: 2025 Mar 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -88,6 +88,10 @@ CTRL-SHIFT-V *c_CTRL-SHIFT-V* *c_CTRL-SHIFT-Q*
|
||||
CTRL-SHIFT-Q Works just like CTRL-V, unless |modifyOtherKeys| is active,
|
||||
then it inserts the Escape sequence for a key with modifiers.
|
||||
In the GUI the |key-notation| is inserted without simplifying.
|
||||
Note: When CTRL-SHIFT-V is intercepted by your system (e.g.,
|
||||
to paste text) you can often use CTRL-SHIFT-Q instead.
|
||||
However, in some terminals (e.g. GNOME Terminal), CTRL-SHIFT-Q
|
||||
quits the terminal without confirmation.
|
||||
|
||||
*c_<Left>* *c_Left*
|
||||
<Left> cursor left. See 'wildmenu' for behavior during wildmenu
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 29
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Feb 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2081,7 +2081,7 @@ v:colornames A dictionary that maps color names to hex color strings. These
|
||||
|
||||
You can make changes to that file, but make sure to add new
|
||||
keys instead of updating existing ones, otherwise Vim will skip
|
||||
loading the file (thinking is hasn't been changed).
|
||||
loading the file (thinking it hasn't been changed).
|
||||
|
||||
*v:completed_item* *completed_item-variable*
|
||||
v:completed_item
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2024 Dec 04
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2025 Mar 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -640,6 +640,25 @@ 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.
|
||||
|
||||
GIT REBASE *ft-gitrebase-plugin*
|
||||
|
||||
The gitrebase filetype defines the following buffer-local commands, to help
|
||||
with interactive `git rebase`: >
|
||||
|
||||
:Drop " to discard this commit
|
||||
:Edit " to stop for editing this commit
|
||||
:Fixup " to squash (but discard the message) into the previous one
|
||||
:Pick " to pick this commit (the cursor is on)
|
||||
:Reword " to pick this commit, but change the commit message
|
||||
:Squash " to squash this commit into the previous one
|
||||
|
||||
In addition, the following command can be used to cycle between the different
|
||||
possibilities: >
|
||||
|
||||
:Cycle " to cycle between the previous commands
|
||||
<
|
||||
The `:Cycle` command is also mapped to the CTRL-A and CTRL-X keys.
|
||||
For details, see `git-rebase --help`.
|
||||
|
||||
GO *ft-go-plugin*
|
||||
|
||||
@@ -744,12 +763,21 @@ Add following lines to $HOME/.vim/ftplugin/json.vim: >
|
||||
import autoload 'dist/json.vim'
|
||||
setl formatexpr=json.FormatExpr()
|
||||
|
||||
LUA *ft-lua-plugin*
|
||||
LUA *ft-lua-plugin* *g:lua_folding*
|
||||
|
||||
You can enable folding of Lua functions using |fold-expr| by: >
|
||||
|
||||
let g:lua_folding = 1
|
||||
< *g:lua_version* *g:lua_subversion*
|
||||
Lua filetype's 'includeexpr' and |ft-lua-syntax| highlighting use the global
|
||||
variables "g:lua_version" and "g:lua_subversion" to determine the version of
|
||||
Lua to use (5.3 is the default)
|
||||
|
||||
For example, to use Lua 5.1, set the variables like this: >
|
||||
|
||||
let g:lua_version = 5
|
||||
let g:lua_subversion = 1
|
||||
<
|
||||
MAIL *ft-mail-plugin*
|
||||
|
||||
Options:
|
||||
@@ -762,12 +790,12 @@ Options:
|
||||
You can also format quoted text with |gq|.
|
||||
|
||||
Local mappings:
|
||||
<LocalLeader>q or \\MailQuote
|
||||
<LocalLeader>q or \MailQuote
|
||||
Quotes the text selected in Visual mode, or from the cursor position
|
||||
to the end of the file in Normal mode. This means "> " is inserted in
|
||||
each line.
|
||||
|
||||
MAN *ft-man-plugin* *:Man* *man.vim*
|
||||
MAN *ft-man-plugin* *:Man* *:ManReload* *man.vim*
|
||||
|
||||
This plugin displays a manual page in a nice way. See |find-manpage| in the
|
||||
user manual for more information.
|
||||
@@ -784,6 +812,8 @@ Commands:
|
||||
Man {name} Display the manual page for {name} in a window.
|
||||
Man {number} {name}
|
||||
Display the manual page for {name} in a section {number}.
|
||||
ManReload Reload the cache of available man pages used for |:Man| argument
|
||||
completion.
|
||||
|
||||
Global mapping:
|
||||
<Leader>K Displays the manual page for the word under the cursor.
|
||||
@@ -814,6 +844,14 @@ desired folding style instead. For example: >
|
||||
If you would like :Man {number} {name} to behave like man {number} {name} by
|
||||
not running man {name} if no page is found, then use this: >
|
||||
let g:ft_man_no_sect_fallback = 1
|
||||
<
|
||||
*g:ft_man_implementation*
|
||||
The completion for the :Man command tries to guess which implementation of man
|
||||
the system has. If it guesses wrong, you can set g:ft_man_implementation to
|
||||
one of these values:
|
||||
'man-db' https://man-db.nongnu.org/
|
||||
'' Unknown, fall back to completing shell commands
|
||||
instead of man pages.
|
||||
|
||||
You may also want to set 'keywordprg' to make the |K| command open a manual
|
||||
page in a Vim window: >
|
||||
@@ -865,6 +903,12 @@ the PDF. The following are treated as tags:
|
||||
|
||||
These maps can be disabled with >
|
||||
:let g:no_pdf_maps = 1
|
||||
|
||||
PLSQL *ft-plsql-plugin*
|
||||
|
||||
To enable syntax folding in PL/SQL filetypes, set the following variable: >
|
||||
|
||||
:let g:plsql_fold = 1
|
||||
<
|
||||
|
||||
PYTHON *ft-python-plugin* *PEP8*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
*insert.txt* For Vim version 9.1. Last change: 2025 Mar 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -222,6 +222,10 @@ CTRL-Q Same as CTRL-V.
|
||||
CTRL-SHIFT-V *i_CTRL-SHIFT-V* *i_CTRL-SHIFT-Q*
|
||||
CTRL-SHIFT-Q Works just like CTRL-V, unless |modifyOtherKeys| is active,
|
||||
then it inserts the Escape sequence for a key with modifiers.
|
||||
Note: When CTRL-SHIFT-V is intercepted by your system (e.g.,
|
||||
to paste text) you can often use CTRL-SHIFT-Q instead.
|
||||
However, in some terminals (e.g. GNOME Terminal), CTRL-SHIFT-Q
|
||||
quits the terminal without confirmation.
|
||||
|
||||
CTRL-X Enter CTRL-X mode. This is a sub-mode where commands can
|
||||
be given to complete words or scroll the window. See
|
||||
@@ -657,6 +661,11 @@ CTRL-N (next), and CTRL-P (previous).
|
||||
To get the current completion information, |complete_info()| can be used.
|
||||
Also see the 'infercase' option if you want to adjust the case of the match.
|
||||
|
||||
When inserting a selected candidate word from the |popup-menu|, the part of
|
||||
the candidate word that does not match the query is highlighted using
|
||||
|hl-ComplMatchIns|. If fuzzy is enabled in 'completeopt', highlighting will
|
||||
not be applied.
|
||||
|
||||
*complete_CTRL-E*
|
||||
When completion is active you can use CTRL-E to stop it and go back to the
|
||||
originally typed text. The CTRL-E will not be inserted.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Feb 01
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Mar 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -2104,13 +2104,35 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'completefuzzycollect'* *'cfc'*
|
||||
'completefuzzycollect' 'cfc' string (default: empty)
|
||||
global
|
||||
A comma-separated list of strings to enable fuzzy collection for
|
||||
specific |ins-completion| modes, affecting how matches are gathered
|
||||
during completion. For specified modes, fuzzy matching is used to
|
||||
find completion candidates instead of the standard prefix-based
|
||||
matching. This option can contain the following values:
|
||||
|
||||
keyword keywords in the current file |i_CTRL-X_CTRL-N|
|
||||
keywords with flags ".", "w", |i_CTRL-N| |i_CTRL-P|
|
||||
"b", "u", "U" and "k{dict}" in 'complete'
|
||||
keywords in 'dictionary' |i_CTRL-X_CTRL-K|
|
||||
|
||||
files file names |i_CTRL-X_CTRL-F|
|
||||
|
||||
whole_line whole lines |i_CTRL-X_CTRL-L|
|
||||
|
||||
When using the 'completeopt' "longest" option value, fuzzy collection
|
||||
can identify the longest common string among the best fuzzy matches
|
||||
and insert it automatically.
|
||||
|
||||
*'completeitemalign'* *'cia'*
|
||||
'completeitemalign' 'cia' string (default: "abbr,kind,menu")
|
||||
global
|
||||
A comma-separated list of |complete-items| that controls the alignment
|
||||
and display order of items in the popup menu during Insert mode
|
||||
completion. The supported values are abbr, kind, and menu. These
|
||||
options allow to customize how the completion items are shown in the
|
||||
A comma-separated list of strings that controls the alignment and
|
||||
display order of items in the popup menu during Insert mode
|
||||
completion. The supported values are "abbr", "kind", and "menu".
|
||||
These values allow customizing how |complete-items| are shown in the
|
||||
popup menu. Note: must always contain those three values in any
|
||||
order.
|
||||
|
||||
@@ -2120,6 +2142,22 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
A comma-separated list of options for Insert mode completion
|
||||
|ins-completion|. The supported values are:
|
||||
|
||||
fuzzy Enable |fuzzy-matching| for completion candidates. This
|
||||
allows for more flexible and intuitive matching, where
|
||||
characters can be skipped and matches can be found even
|
||||
if the exact sequence is not typed. Note: This option
|
||||
does not affect the collection of candidate list, it only
|
||||
controls how completion candidates are reduced from the
|
||||
list of alternatives. If you want to use |fuzzy-matching|
|
||||
to gather more alternatives for your candidate list,
|
||||
see |'completefuzzycollect'|.
|
||||
|
||||
longest Only insert the longest common text of the matches. If
|
||||
the menu is displayed you can use CTRL-L to add more
|
||||
characters. Whether case is ignored depends on the kind
|
||||
of completion. For buffer text the 'ignorecase' option is
|
||||
used.
|
||||
|
||||
menu Use a popup menu to show the possible completions. The
|
||||
menu is only shown when there is more than one match and
|
||||
sufficient colors are available. |ins-completion-menu|
|
||||
@@ -2128,15 +2166,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Useful when there is additional information about the
|
||||
match, e.g., what file it comes from.
|
||||
|
||||
longest Only insert the longest common text of the matches. If
|
||||
the menu is displayed you can use CTRL-L to add more
|
||||
characters. Whether case is ignored depends on the kind
|
||||
of completion. For buffer text the 'ignorecase' option is
|
||||
used.
|
||||
noinsert Do not insert any text for a match until the user selects
|
||||
a match from the menu. Only works in combination with
|
||||
"menu" or "menuone". No effect if "longest" is present.
|
||||
|
||||
preview Show extra information about the currently selected
|
||||
completion in the preview window. Only works in
|
||||
combination with "menu" or "menuone".
|
||||
noselect Same as "noinsert", except that no menu item is
|
||||
pre-selected. If both "noinsert" and "noselect" are
|
||||
present, "noselect" has precedence.
|
||||
|
||||
nosort Disable sorting of completion candidates based on fuzzy
|
||||
scores when "fuzzy" is enabled. Candidates will appear
|
||||
in their original order.
|
||||
|
||||
popup Show extra information about the currently selected
|
||||
completion in a popup window. Only works in combination
|
||||
@@ -2151,28 +2191,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See the example at |complete-popuphidden|.
|
||||
{only works when compiled with the |+textprop| feature}
|
||||
|
||||
noinsert Do not insert any text for a match until the user selects
|
||||
a match from the menu. Only works in combination with
|
||||
"menu" or "menuone". No effect if "longest" is present.
|
||||
|
||||
noselect Same as "noinsert", except that no menu item is
|
||||
pre-selected. If both "noinsert" and "noselect" are
|
||||
present, "noselect" has precedence.
|
||||
|
||||
fuzzy Enable |fuzzy-matching| for completion candidates. This
|
||||
allows for more flexible and intuitive matching, where
|
||||
characters can be skipped and matches can be found even
|
||||
if the exact sequence is not typed.
|
||||
|
||||
nosort Disable sorting of completion candidates based on fuzzy
|
||||
scores when "fuzzy" is enabled. Candidates will appear
|
||||
in their original order.
|
||||
|
||||
preinsert
|
||||
Preinsert the portion of the first candidate word that is
|
||||
not part of the current completion leader and using the
|
||||
|hl-ComplMatchIns| highlight group. Does not work when
|
||||
"fuzzy" is also included.
|
||||
|hl-ComplMatchIns| highlight group. In order for it to
|
||||
work, "fuzzy" must not be set and "menuone" must be set.
|
||||
|
||||
preview Show extra information about the currently selected
|
||||
completion in the preview window. Only works in
|
||||
combination with "menu" or "menuone".
|
||||
|
||||
*'completepopup'* *'cpp'*
|
||||
'completepopup' 'cpp' string (default empty)
|
||||
@@ -3283,6 +3310,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Otherwise this is a comma-separated list of event names. Example: >
|
||||
:set ei=WinEnter,WinLeave
|
||||
<
|
||||
*'eventignorewin'* *'eiw'*
|
||||
'eventignorewin' 'eiw' string (default "")
|
||||
window-local
|
||||
Similar to 'eventignore' but applies to a particular window and its
|
||||
buffers, for which window and buffer related autocommands can be
|
||||
ignored indefinitely without affecting the global 'eventignore'.
|
||||
|
||||
*'expandtab'* *'et'* *'noexpandtab'* *'noet'*
|
||||
'expandtab' 'et' boolean (default off)
|
||||
local to buffer
|
||||
@@ -8508,15 +8542,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When on, uses |highlight-guifg| and |highlight-guibg| attributes in
|
||||
the terminal (thus using 24-bit color).
|
||||
|
||||
Will automatically be enabled, if Vim detects that it runs in a
|
||||
capable terminal (when the terminal supports the RGB terminfo
|
||||
capability or when the number of colors |t_Co| supported by the
|
||||
terminal is 0x1000000, e.g. with $TERM=xterm-direct). Due to the async
|
||||
nature of querying the terminal, enabling this automatically is
|
||||
noticable. Use >
|
||||
set notermguicolors
|
||||
< to explicitly disable.
|
||||
|
||||
Requires a ISO-8613-3 compatible terminal. If setting this option
|
||||
does not work (produces a colorless UI) reading |xterm-true-color|
|
||||
might help.
|
||||
@@ -9568,7 +9593,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"lastused" When completing buffer names and more than one buffer
|
||||
matches, sort buffers by time last used (other than
|
||||
the current buffer).
|
||||
When there is only a single match, it is fully completed in all cases.
|
||||
"noselect" Do not pre-select first menu item and start 'wildmenu'
|
||||
if it is enabled.
|
||||
When there is only a single match, it is fully completed in all cases
|
||||
except when "noselect" is present.
|
||||
|
||||
Examples of useful colon-separated values:
|
||||
"longest:full" Like "longest", but also start 'wildmenu' if it is
|
||||
@@ -9591,7 +9619,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
:set wildmode=list,full
|
||||
< List all matches without completing, then each full match >
|
||||
:set wildmode=longest,list
|
||||
< Complete longest common string, then list alternatives.
|
||||
< Complete longest common string, then list alternatives >
|
||||
:set wildmode=noselect:full
|
||||
< Display 'wildmenu' without completing, then each full match >
|
||||
:set wildmode=noselect:lastused,full
|
||||
< Same as above, but sort buffers by time last used.
|
||||
More info here: |cmdline-completion|.
|
||||
|
||||
*'wildoptions'* *'wop'*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
*pi_getscript.txt* For Vim version 9.1. Last change: 2025 Mar 15
|
||||
>
|
||||
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
|
||||
<
|
||||
@@ -348,38 +348,43 @@ after/syntax/c.vim contained in it to overwrite a user's c.vim.
|
||||
Doesn't override vimball installation.
|
||||
>
|
||||
g:GetLatestVimScripts_scriptaddr
|
||||
< default='https://www.vim.org/scripts/script.php?script_id='
|
||||
< default='https://www.vim.org/scripts/script.php?script_id='
|
||||
Override this if your system needs
|
||||
... ='http://vim.sourceforge.net/script.php?script_id='
|
||||
>
|
||||
g:GetLatestVimScripts_downloadaddr
|
||||
< default='https://www.vim.org/scripts/download_script.php?src_id='
|
||||
< default='https://www.vim.org/scripts/download_script.php?src_id='
|
||||
Override this if your system needs
|
||||
... ='http://vim.sourceforge.net/scripts/download_script.php?src_id='
|
||||
>
|
||||
g:GetLatestVimScripts_bunzip2
|
||||
< default= bunzip2
|
||||
< default= bunzip2
|
||||
This variable holds the name of the command to decompress .bz2
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_bunzip3
|
||||
< default= bunzip3
|
||||
This variable holds the name of the command to decompress .bz3
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_gunzip
|
||||
< default= gunzip
|
||||
< default= gunzip
|
||||
This variable holds the name of the command to decompress .gz
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_unxz
|
||||
< default= unxz
|
||||
< default= unxz
|
||||
This variable holds the name of the command to decompress .xz
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_unzip
|
||||
< default= unzip
|
||||
< default= unzip
|
||||
This variable holds the name of the command to decompress .zip
|
||||
files
|
||||
|
||||
Note: The variables associated with decompression commands help workaround
|
||||
crossplatform issues. For example, on Windows is possible to delegate this
|
||||
calls into `wsl` by doing: >
|
||||
crossplatform issues. For example, on Windows is possible to delegate
|
||||
this calls into `wsl` by doing: >
|
||||
|
||||
let g:GetLatestVimScripts_bunzip2= "wsl -e bunzip2"
|
||||
let g:GetLatestVimScripts_gunzip= "wsl -e gunzip"
|
||||
@@ -409,6 +414,8 @@ The AutoInstall process will:
|
||||
Windows: $HOME\vimfiles
|
||||
if the downloaded file ends with ".bz2"
|
||||
bunzip2 it
|
||||
else if the downloaded file ends with ".bz3"
|
||||
bunzip3 it
|
||||
else if the downloaded file ends with ".gz"
|
||||
gunzip it
|
||||
if the resulting file ends with ".zip"
|
||||
@@ -422,6 +429,7 @@ The AutoInstall process will:
|
||||
==============================================================================
|
||||
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
|
||||
|
||||
v38 Feb 25, 2025 : * handles additional decompression option for .bzip3 files.
|
||||
v37 Sep 23, 2024 : * Support for the new vimball's .vmb extension (old .vba
|
||||
extension conflicted with visual basic).
|
||||
* Support for |glvs-autoinstall| in ftplugins and packages.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_gzip.txt* For Vim version 9.1. Last change: 2023 Nov 14
|
||||
*pi_gzip.txt* For Vim version 9.1. Last change: 2025 Mar 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,12 +28,14 @@ The plugin installs autocommands to intercept reading and writing of files
|
||||
with these extensions:
|
||||
|
||||
extension compression ~
|
||||
*.Z compress (Lempel-Ziv)
|
||||
*.gz gzip
|
||||
*.bz2 bzip2
|
||||
*.bz3 bzip3
|
||||
*.gz gzip
|
||||
*.lz lzip
|
||||
*.lz4 lz4
|
||||
*.lzma lzma
|
||||
*.xz xz
|
||||
*.lz lzip
|
||||
*.Z compress (Lempel-Ziv)
|
||||
*.zst zstd
|
||||
|
||||
That's actually the only thing you need to know. There are no options.
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
../pack/dist/opt/netrw/doc/netrw.txt
|
||||
3663
runtime/doc/pi_netrw.txt
Normal file
3663
runtime/doc/pi_netrw.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 9.1. Last change: 2025 Jan 08
|
||||
*popup.txt* For Vim version 9.1. Last change: 2025 Feb 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -504,7 +504,7 @@ popup_menu({what}, {options}) *popup_menu()*
|
||||
\ mapping: 0,
|
||||
\ })
|
||||
< The current line is highlighted with a match using
|
||||
"PopupSelected", or "PmenuSel" if that is not defined.
|
||||
|hl-PopupSelected| which is linked to "PmenuSel" by default.
|
||||
|
||||
Use {options} to change the properties. Should at least set
|
||||
"callback" to a function that handles the selected item.
|
||||
@@ -559,7 +559,7 @@ popup_notification({what}, {options}) *popup_notification()*
|
||||
\ close: 'click',
|
||||
\ padding: [0,1,0,1],
|
||||
\ })
|
||||
< The PopupNotification highlight group is used instead of
|
||||
< The |hl-PopupNotification| highlight group is used instead of
|
||||
WarningMsg if it is defined.
|
||||
|
||||
Without the |+timers| feature the popup will not disappear
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 9.1. Last change: 2025 Jan 11
|
||||
*quickfix.txt* For Vim version 9.1. Last change: 2025 Mar 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1722,6 +1722,13 @@ shells and OSes and also does not allow to use other available TeX options,
|
||||
if any. If your TeX doesn't support "-interaction=nonstopmode", please
|
||||
report it with different means to express \nonstopmode from the command line.
|
||||
|
||||
TSC COMPILER *compiler-tsc*
|
||||
|
||||
The executable and compiler options can be added to 'makeprg' by setting the
|
||||
b/g:tsc_makeprg variable. For example: >
|
||||
|
||||
let b:tsc_makeprg = "npx tsc --noEmit"
|
||||
|
||||
TYPST COMPILER *compiler-typst*
|
||||
|
||||
Vim includes a compiler plugin for Typst files. This compiler is enabled
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.1. Last change: 2024 Nov 02
|
||||
*quickref.txt* For Vim version 9.1. Last change: 2025 Feb 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -698,6 +698,7 @@ Short explanation of each option: *option-list*
|
||||
'errorformat' 'efm' description of the lines in the error file
|
||||
'esckeys' 'ek' recognize function keys in Insert mode
|
||||
'eventignore' 'ei' autocommand events that are ignored
|
||||
'eventignorewin' 'eiw' autocommand events that are ignored in a window
|
||||
'expandtab' 'et' use spaces when <Tab> is inserted
|
||||
'exrc' 'ex' read .vimrc and .exrc in the current directory
|
||||
'fileencoding' 'fenc' file encoding for multibyte text
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 9.1. Last change: 2024 Dec 19
|
||||
*starting.txt* For Vim version 9.1. Last change: 2025 Feb 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -828,8 +828,9 @@ accordingly. Vim proceeds in this order:
|
||||
easy to copy it to another system.
|
||||
|
||||
If Vim was started with "-u filename", the file "filename" is used.
|
||||
All following initializations until 4. are skipped. $MYVIMRC and
|
||||
$MYVIMDIR are not set.
|
||||
All following initializations until 4. are skipped. `$MYVIMRC` and
|
||||
`$MYVIMDIR` are not set (but `$MYVIMDIR` will be set, if 'rtp' is
|
||||
updated).
|
||||
"vim -u NORC" can be used to skip these initializations without
|
||||
reading a file. "vim -u NONE" also skips loading plugins. |-u|
|
||||
|
||||
@@ -850,9 +851,9 @@ accordingly. Vim proceeds in this order:
|
||||
*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc*
|
||||
*$MYVIMRC* *$MYVIMDIR*
|
||||
c. Five places are searched for initializations. The first that exists
|
||||
is used, the others are ignored. The $MYVIMRC environment variable is
|
||||
set to the file that was first found, unless $MYVIMRC was already set
|
||||
and when using VIMINIT. The $MYVIMDIR environment variable is
|
||||
is used, the others are ignored. The `$MYVIMRC` environment variable is
|
||||
set to the file that was first found, unless `$MYVIMRC` was already set
|
||||
when using VIMINIT. The `$MYVIMDIR` environment variable is
|
||||
set to the personal 'rtp' directory, however it is not verified
|
||||
that the directory actually exists.
|
||||
I The environment variable VIMINIT (see also |compatible-default|) (*)
|
||||
@@ -973,9 +974,10 @@ accordingly. Vim proceeds in this order:
|
||||
The |v:vim_did_enter| variable is set to 1.
|
||||
The |VimEnter| autocommands are executed.
|
||||
|
||||
The $MYVIMRC or $MYGVIMRC environment variable will be set to the first found
|
||||
vimrc and/or gvimrc file while $MYVIMDIR is set to the users personal runtime
|
||||
directory 'rtp' (typically the first entry in 'runtimepath').
|
||||
The `$MYVIMRC` or `$MYGVIMRC` environment variable will be set to the first found
|
||||
vimrc and/or gvimrc file while `$MYVIMDIR` is set to the users personal runtime
|
||||
directory 'rtp' (typically the first entry in 'runtimepath'). If 'rtp'
|
||||
changes, `$MYVIMDIR` will be updated.
|
||||
Note: These environment variables resolve symbolic links, but 'rtp' does not.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Jan 20
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Mar 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1286,6 +1286,21 @@ doesn't work for you, or you don't edit Progress at all, use this in your
|
||||
startup vimrc: >
|
||||
:let filetype_w = "cweb"
|
||||
|
||||
CSHARP *cs.vim* *ft-cs-syntax*
|
||||
|
||||
C# raw string literals may use any number of quote marks to encapsulate the
|
||||
block, and raw interpolated string literals may use any number of braces to
|
||||
encapsulate the interpolation, e.g. >
|
||||
|
||||
$$$""""Hello {{{name}}}""""
|
||||
<
|
||||
By default, Vim highlights 3-8 quote marks, and 1-8 interpolation braces.
|
||||
The maximum numbers of quotes and braces recognized can configured using the
|
||||
following variables:
|
||||
|
||||
Variable Default ~
|
||||
g:cs_raw_string_quote_count 8
|
||||
g:cs_raw_string_interpolation_brace_count 8
|
||||
|
||||
DART *dart.vim* *ft-dart-syntax*
|
||||
|
||||
@@ -2343,13 +2358,9 @@ instead, and the name of your source file should be *.pike
|
||||
|
||||
LUA *lua.vim* *ft-lua-syntax*
|
||||
|
||||
The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is
|
||||
the default). You can select one of these versions using the global variables
|
||||
lua_version and lua_subversion. For example, to activate Lua
|
||||
5.1 syntax highlighting, set the variables like this: >
|
||||
|
||||
:let lua_version = 5
|
||||
:let lua_subversion = 1
|
||||
The Lua syntax file can be used for versions 4.0, 5.0+. You can select one of
|
||||
these versions using the global variables |g:lua_version| and
|
||||
|g:lua_subversion|.
|
||||
|
||||
|
||||
MAIL *mail.vim* *ft-mail.vim*
|
||||
@@ -4021,7 +4032,29 @@ highlighting is to put the following line in your |vimrc|: >
|
||||
|
||||
let g:vimsyn_noerror = 1
|
||||
<
|
||||
To suppress only specific errors, define the following variables: >
|
||||
|
||||
g:vimsyn_nobehaveerror = 1 " :behave error
|
||||
g:vimsyn_vimFTError = 1 " :filetype error
|
||||
g:vimsyn_noaugrouperror = 1 " :augroup error
|
||||
g:vimsyn_noopererror = 1 " operator error
|
||||
g:vimsyn_notypealiaserror = 1 " Vim9 type alias error
|
||||
g:vimsyn_novimfunctionerror = 1 " Vim9 method error
|
||||
g:vimsyn_nousercmderror = 1 " :com error
|
||||
g:vimsyn_novimsynerror = 1 " :syn error
|
||||
g:vimsyn_novimsyncaseerror = 1 " :syn case error
|
||||
g:vimsyn_novimsynconcealerror = 1 " :syn conceal error
|
||||
g:vimsyn_novimsynfoldlevelerror = 1 " :syn foldlevel error
|
||||
g:vimsyn_novimsynspellerror = 1 " :syn spell error
|
||||
g:vimsyn_novimsyncerror = 1 " :syn sync error
|
||||
g:vimsyn_novimhictermerror = 1 " :hi error
|
||||
g:vimsyn_vimhikeyerror = 1 " :hi key=arg error
|
||||
<
|
||||
To force highlighting of Neovim specific Vim script elements (even if not
|
||||
using Neovim), set >
|
||||
|
||||
let g:vimsyn_vim_features = ['nvim']
|
||||
<
|
||||
|
||||
WDL *wdl.vim* *wdl-syntax*
|
||||
|
||||
@@ -5432,6 +5465,10 @@ in their own color.
|
||||
See |:highlight-default| for the optional [default]
|
||||
argument.
|
||||
|
||||
:hi[ghlight][!] [default] link {from-group} {to-group}
|
||||
:hi[ghlight][!] [default] link {from-group} NONE
|
||||
See |:hi-link|.
|
||||
|
||||
Normally a highlight group is added once when starting up. This sets the
|
||||
default values for the highlighting. After that, you can use additional
|
||||
highlight commands to change the arguments that you want to set to non-default
|
||||
@@ -5831,8 +5868,8 @@ CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
||||
MatchParen Character under the cursor or just before it, if it
|
||||
is a paired bracket, and its match. |pi_paren.txt|
|
||||
*hl-MessageWindow*
|
||||
MessageWindow Messages popup window used by `:echowindow`. If not defined
|
||||
|hl-WarningMsg| is used.
|
||||
MessageWindow Messages popup window used by `:echowindow`. Linked to
|
||||
|hl-WarningMsg| by default.
|
||||
*hl-ModeMsg*
|
||||
ModeMsg 'showmode' message (e.g., "-- INSERT --").
|
||||
*hl-MsgArea*
|
||||
@@ -5872,10 +5909,13 @@ PmenuMatchSel Popup menu: Matched text in selected item. Applied in
|
||||
combination with |hl-PmenuSel|.
|
||||
*hl-ComplMatchIns*
|
||||
ComplMatchIns Matched text of the currently inserted completion.
|
||||
*hl-PopupSelected*
|
||||
PopupSelected Popup window created with |popup_menu()|. Linked to
|
||||
|hl-PmenuSel| by default.
|
||||
*hl-PopupNotification*
|
||||
PopupNotification
|
||||
Popup window created with |popup_notification()|. If not
|
||||
defined |hl-WarningMsg| is used.
|
||||
Popup window created with |popup_notification()|. Linked to
|
||||
|hl-WarningMsg| by default.
|
||||
*hl-Question*
|
||||
Question |hit-enter| prompt and yes/no questions.
|
||||
*hl-QuickFixLine*
|
||||
|
||||
@@ -129,6 +129,7 @@ $quote eval.txt /*$quote*
|
||||
'cdpath' options.txt /*'cdpath'*
|
||||
'cedit' options.txt /*'cedit'*
|
||||
'cf' options.txt /*'cf'*
|
||||
'cfc' options.txt /*'cfc'*
|
||||
'cfu' options.txt /*'cfu'*
|
||||
'ch' options.txt /*'ch'*
|
||||
'character' intro.txt /*'character'*
|
||||
@@ -162,6 +163,7 @@ $quote eval.txt /*$quote*
|
||||
'compatible' options.txt /*'compatible'*
|
||||
'complete' options.txt /*'complete'*
|
||||
'completefunc' options.txt /*'completefunc'*
|
||||
'completefuzzycollect' options.txt /*'completefuzzycollect'*
|
||||
'completeitemalign' options.txt /*'completeitemalign'*
|
||||
'completeopt' options.txt /*'completeopt'*
|
||||
'completepopup' options.txt /*'completepopup'*
|
||||
@@ -230,6 +232,7 @@ $quote eval.txt /*$quote*
|
||||
'ef' options.txt /*'ef'*
|
||||
'efm' options.txt /*'efm'*
|
||||
'ei' options.txt /*'ei'*
|
||||
'eiw' options.txt /*'eiw'*
|
||||
'ek' options.txt /*'ek'*
|
||||
'emo' options.txt /*'emo'*
|
||||
'emoji' options.txt /*'emoji'*
|
||||
@@ -248,6 +251,7 @@ $quote eval.txt /*$quote*
|
||||
'esckeys' options.txt /*'esckeys'*
|
||||
'et' options.txt /*'et'*
|
||||
'eventignore' options.txt /*'eventignore'*
|
||||
'eventignorewin' options.txt /*'eventignorewin'*
|
||||
'ex' options.txt /*'ex'*
|
||||
'expandtab' options.txt /*'expandtab'*
|
||||
'exrc' options.txt /*'exrc'*
|
||||
@@ -2138,6 +2142,7 @@ $quote eval.txt /*$quote*
|
||||
:Lfilter quickfix.txt /*:Lfilter*
|
||||
:LogiPat pi_logipat.txt /*:LogiPat*
|
||||
:Man filetype.txt /*:Man*
|
||||
:ManReload filetype.txt /*:ManReload*
|
||||
:MkVimball pi_vimball.txt /*:MkVimball*
|
||||
:N editing.txt /*:N*
|
||||
:Nexplore pi_netrw.txt /*:Nexplore*
|
||||
@@ -5754,6 +5759,7 @@ TSQL ft_sql.txt /*TSQL*
|
||||
TTpro-telnet syntax.txt /*TTpro-telnet*
|
||||
Tab intro.txt /*Tab*
|
||||
TabClosed autocmd.txt /*TabClosed*
|
||||
TabClosedPre autocmd.txt /*TabClosedPre*
|
||||
TabEnter autocmd.txt /*TabEnter*
|
||||
TabLeave autocmd.txt /*TabLeave*
|
||||
TabNew autocmd.txt /*TabNew*
|
||||
@@ -6585,6 +6591,7 @@ compiler-ruff quickfix.txt /*compiler-ruff*
|
||||
compiler-select quickfix.txt /*compiler-select*
|
||||
compiler-spotbugs quickfix.txt /*compiler-spotbugs*
|
||||
compiler-tex quickfix.txt /*compiler-tex*
|
||||
compiler-tsc quickfix.txt /*compiler-tsc*
|
||||
compiler-typst quickfix.txt /*compiler-typst*
|
||||
compiler-vaxada ft_ada.txt /*compiler-vaxada*
|
||||
compl-current insert.txt /*compl-current*
|
||||
@@ -6715,6 +6722,7 @@ creating-menus gui.txt /*creating-menus*
|
||||
credits intro.txt /*credits*
|
||||
crontab options.txt /*crontab*
|
||||
cs-find if_cscop.txt /*cs-find*
|
||||
cs.vim syntax.txt /*cs.vim*
|
||||
cs7-problem term.txt /*cs7-problem*
|
||||
cscope if_cscop.txt /*cscope*
|
||||
cscope-commands if_cscop.txt /*cscope-commands*
|
||||
@@ -7312,6 +7320,7 @@ ft-context-intro ft_context.txt /*ft-context-intro*
|
||||
ft-context-mappings ft_context.txt /*ft-context-mappings*
|
||||
ft-context-settings ft_context.txt /*ft-context-settings*
|
||||
ft-cpp-syntax syntax.txt /*ft-cpp-syntax*
|
||||
ft-cs-syntax syntax.txt /*ft-cs-syntax*
|
||||
ft-csh-syntax syntax.txt /*ft-csh-syntax*
|
||||
ft-css-omni insert.txt /*ft-css-omni*
|
||||
ft-csv-syntax syntax.txt /*ft-csv-syntax*
|
||||
@@ -7341,6 +7350,7 @@ ft-freebasic-syntax syntax.txt /*ft-freebasic-syntax*
|
||||
ft-fvwm-syntax syntax.txt /*ft-fvwm-syntax*
|
||||
ft-gdscript-plugin filetype.txt /*ft-gdscript-plugin*
|
||||
ft-gitcommit-plugin filetype.txt /*ft-gitcommit-plugin*
|
||||
ft-gitrebase-plugin filetype.txt /*ft-gitrebase-plugin*
|
||||
ft-go-plugin filetype.txt /*ft-go-plugin*
|
||||
ft-gprof-plugin filetype.txt /*ft-gprof-plugin*
|
||||
ft-groff-syntax syntax.txt /*ft-groff-syntax*
|
||||
@@ -7415,6 +7425,7 @@ ft-php-syntax syntax.txt /*ft-php-syntax*
|
||||
ft-php3-syntax syntax.txt /*ft-php3-syntax*
|
||||
ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
|
||||
ft-plaintex-syntax syntax.txt /*ft-plaintex-syntax*
|
||||
ft-plsql-plugin filetype.txt /*ft-plsql-plugin*
|
||||
ft-posix-syntax syntax.txt /*ft-posix-syntax*
|
||||
ft-postscr-syntax syntax.txt /*ft-postscr-syntax*
|
||||
ft-ppwiz-syntax syntax.txt /*ft-ppwiz-syntax*
|
||||
@@ -7576,6 +7587,7 @@ g:filetype_csh syntax.txt /*g:filetype_csh*
|
||||
g:filetype_haredoc ft_hare.txt /*g:filetype_haredoc*
|
||||
g:filetype_md syntax.txt /*g:filetype_md*
|
||||
g:filetype_r syntax.txt /*g:filetype_r*
|
||||
g:ft_man_implementation filetype.txt /*g:ft_man_implementation*
|
||||
g:ftplugin_rust_source_path ft_rust.txt /*g:ftplugin_rust_source_path*
|
||||
g:gnat ft_ada.txt /*g:gnat*
|
||||
g:gnat.Error_Format ft_ada.txt /*g:gnat.Error_Format*
|
||||
@@ -7623,6 +7635,9 @@ g:html_use_input_for_pc syntax.txt /*g:html_use_input_for_pc*
|
||||
g:html_use_xhtml syntax.txt /*g:html_use_xhtml*
|
||||
g:html_whole_filler syntax.txt /*g:html_whole_filler*
|
||||
g:lf_shell_syntax syntax.txt /*g:lf_shell_syntax*
|
||||
g:lua_folding filetype.txt /*g:lua_folding*
|
||||
g:lua_subversion filetype.txt /*g:lua_subversion*
|
||||
g:lua_version filetype.txt /*g:lua_version*
|
||||
g:markdown_fenced_languages syntax.txt /*g:markdown_fenced_languages*
|
||||
g:markdown_minlines syntax.txt /*g:markdown_minlines*
|
||||
g:markdown_syntax_conceal syntax.txt /*g:markdown_syntax_conceal*
|
||||
@@ -8189,6 +8204,7 @@ hl-PmenuSbar syntax.txt /*hl-PmenuSbar*
|
||||
hl-PmenuSel syntax.txt /*hl-PmenuSel*
|
||||
hl-PmenuThumb syntax.txt /*hl-PmenuThumb*
|
||||
hl-PopupNotification syntax.txt /*hl-PopupNotification*
|
||||
hl-PopupSelected syntax.txt /*hl-PopupSelected*
|
||||
hl-Question syntax.txt /*hl-Question*
|
||||
hl-QuickFixLine syntax.txt /*hl-QuickFixLine*
|
||||
hl-Scrollbar syntax.txt /*hl-Scrollbar*
|
||||
@@ -8999,6 +9015,7 @@ netrw-ctrl-h pi_netrw.txt /*netrw-ctrl-h*
|
||||
netrw-ctrl-l pi_netrw.txt /*netrw-ctrl-l*
|
||||
netrw-ctrl-r pi_netrw.txt /*netrw-ctrl-r*
|
||||
netrw-ctrl_l pi_netrw.txt /*netrw-ctrl_l*
|
||||
netrw-curdir pi_netrw.txt /*netrw-curdir*
|
||||
netrw-d pi_netrw.txt /*netrw-d*
|
||||
netrw-del pi_netrw.txt /*netrw-del*
|
||||
netrw-delete pi_netrw.txt /*netrw-delete*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2025 Jan 11
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2025 Feb 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -999,7 +999,8 @@ term_wait({buf} [, {time}]) *term_wait()*
|
||||
Wait for pending updates of {buf} to be handled.
|
||||
{buf} is used as with |term_getsize()|.
|
||||
{time} is how long to wait for updates to arrive in msec. If
|
||||
not set then 10 msec will be used.
|
||||
not set then 10 msec will be used. Queued messages will also
|
||||
be processed similar to |:sleep|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_wait()
|
||||
@@ -1091,11 +1092,11 @@ Currently supported commands:
|
||||
Example in JSON: >
|
||||
["drop", "path/file.txt", {"ff": "dos"}]
|
||||
|
||||
A trick to have Vim send this escape sequence: >
|
||||
exe "set t_ts=\<Esc>]51; t_fs=\x07"
|
||||
let &titlestring = '["call","Tapi_TryThis",["hello",123]]'
|
||||
redraw
|
||||
set t_ts& t_fs&
|
||||
You can use |echoraw()| to make Vim send this escape sequence: >
|
||||
call echoraw("\<ESC>]51;[\"call\", \"Tapi_TryThis\", [\"hello\", 123]]\x07")
|
||||
call echoraw("\<Esc>]51;[\"drop\", \"README.md\"]\x07")
|
||||
Note: JSON requires double quotes around string values, hence those have to be
|
||||
escaped.
|
||||
|
||||
Rationale: Why not allow for any command or expression? Because that might
|
||||
create a security problem.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Jan 16
|
||||
*todo.txt* For Vim version 9.1. Last change: 2025 Mar 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -467,9 +467,6 @@ IDEA: when drawing the text, store the text byte index in ScreenLinesIdx[].
|
||||
When converting screen column to text position use this.
|
||||
The line number can be obtained from win->w_lines[].
|
||||
|
||||
Version of getchar() that does not move the cursor - #10603 Use a separate
|
||||
argument for the new flag.
|
||||
|
||||
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
Can we add highlighting to ":echowindow"?
|
||||
@@ -4739,8 +4736,6 @@ Omni completion:
|
||||
Insert mode completion/expansion:
|
||||
- Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
- When 'completeopt' has "noselect" does not insert a newline.
|
||||
(Lifepillar, 2017 Apr 23, #1653)
|
||||
- When complete() first argument is before where insert started and
|
||||
'backspace' is Vi compatible, the completion fails.
|
||||
(Hirohito Higashi, 2015 Feb 19)
|
||||
@@ -6281,5 +6276,4 @@ Far future and "big" extensions:
|
||||
are reflected in each Vim immediately. Could work with local files but
|
||||
also over the internet. See http://www.codingmonkeys.de/subethaedit/.
|
||||
|
||||
vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:
|
||||
vim: set fo+=n :
|
||||
vim:tw=78:sw=4:sts=4:ts=8:noet:ft=help:norl:fo+=n:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_52.txt* For Vim version 9.1. Last change: 2024 Oct 07
|
||||
*usr_52.txt* For Vim version 9.1. Last change: 2025 Mar 12
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -362,11 +362,10 @@ and it will be active next time you start Vim. |add-plugin|: >
|
||||
endif
|
||||
var [beg, end] = [getpos("'["), getpos("']")]
|
||||
var type = v:event.regtype ?? 'v'
|
||||
var pos = getregionpos(beg, end, {type: type})
|
||||
var end_offset = (type == 'V' || v:event.inclusive) ? 1 : 0
|
||||
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] + end_offset
|
||||
var col_end = v[1][2] + v[1][3] + 1
|
||||
return [v[0][1], col_beg, col_end - col_beg]
|
||||
}))
|
||||
var winid = win_getid()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_90.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
*usr_90.txt* For Vim version 9.1. Last change: 2025 Mar 03
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -28,20 +28,18 @@ is installed in differs.
|
||||
used. But this may be different for your system. Try finding out where other
|
||||
packages are installed.
|
||||
When installing for a single user, you can use your home directory as the
|
||||
base. The files will be placed in subdirectories like "bin" and "shared/vim".
|
||||
base. The files will be placed in subdirectories like "bin" and "share/vim".
|
||||
|
||||
|
||||
FROM A PACKAGE
|
||||
|
||||
You can get precompiled binaries for many different UNIX systems. There is a
|
||||
long list with links on this page:
|
||||
Depending on the Unix/Linux system used, there may exist pre-compiled binary
|
||||
packages. You need to search for this. We used to keep a list for different
|
||||
UNIX systems, but that list was outdated so the list was removed.
|
||||
|
||||
http://www.vim.org/binaries.html
|
||||
|
||||
Volunteers maintain the binaries, so they are often out of date. It is a
|
||||
good idea to compile your own UNIX version from the source. Also, creating
|
||||
the editor from the source allows you to control which features are compiled.
|
||||
This does require a compiler though.
|
||||
It is a good idea to compile your own UNIX version from the source. Also,
|
||||
creating the editor from the source allows you to control which features are
|
||||
compiled. This does require a compiler though.
|
||||
|
||||
If you have a Linux distribution, the "vi" program is probably a minimal
|
||||
version of Vim. It doesn't do syntax highlighting, for example. Try finding
|
||||
@@ -52,23 +50,18 @@ FROM SOURCES
|
||||
|
||||
To compile and install Vim, you will need the following:
|
||||
|
||||
- A C compiler (GCC preferred)
|
||||
- The GZIP program (you can get it from www.gnu.org)
|
||||
- The Vim source and runtime archives
|
||||
- A C compiler (GCC or clang preferred)
|
||||
- git (optionally, only when cloning from github)
|
||||
- zip/unzip (to uncompress the archive)
|
||||
- The Vim source archives
|
||||
|
||||
To get the Vim archives, look in this file for a mirror near you, this should
|
||||
provide the fastest download:
|
||||
To download the Vim source, you can either clone it from the Github project
|
||||
page: >
|
||||
git clone https://github.com/vim/vim.git
|
||||
<
|
||||
or download the archive directly using:
|
||||
|
||||
ftp://ftp.vim.org/pub/vim/MIRRORS
|
||||
|
||||
Or use the home site ftp.vim.org, if you think it's fast enough. Go to the
|
||||
"unix" directory and you'll find a list of files there. The version number is
|
||||
embedded in the file name. You will want to get the most recent version.
|
||||
You can get the files for Unix in one big archive that contains everything:
|
||||
|
||||
vim-8.2.tar.bz2 ~
|
||||
|
||||
You need the bzip2 program to uncompress it.
|
||||
https://github.com/vim/vim/archive/refs/heads/master.zip
|
||||
|
||||
|
||||
COMPILING
|
||||
@@ -80,17 +73,12 @@ First create a top directory to work in, for example: >
|
||||
|
||||
Then unpack the archives there. You can unpack it like this: >
|
||||
|
||||
tar xf path/vim-8.2.tar.bz2
|
||||
unzip vim-master.zip
|
||||
|
||||
If your tar command doesn't support bz2 directly: >
|
||||
|
||||
bzip2 -d -c path/vim-8.2.tar.bz2 | tar xf -
|
||||
|
||||
Change "path" to where you have downloaded the file.
|
||||
If you are satisfied with getting the default features, and your environment
|
||||
is setup properly, you should be able to compile Vim with just this: >
|
||||
|
||||
cd vim82/src
|
||||
cd vim-master/src
|
||||
make
|
||||
|
||||
The make program will run configure and compile everything. Further on we
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 9.1. Last change: 2024 Dec 16
|
||||
*various.txt* For Vim version 9.1. Last change: 2025 Feb 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -765,9 +765,8 @@ K Run a program to lookup the keyword under the
|
||||
MS-Windows). "gs" stands for "goto sleep".
|
||||
While sleeping the cursor is positioned in the text,
|
||||
if at a visible position.
|
||||
Also process the received netbeans messages. {only
|
||||
available when compiled with the |+netbeans_intg|
|
||||
feature}
|
||||
Queued messages and timers (|+timers|) are processed
|
||||
during the sleep as well.
|
||||
|
||||
*:sl!* *:sleep!*
|
||||
:[N]sl[eep]! [N][m] Same as above, but hide the cursor.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Feb 01
|
||||
*version9.txt* For Vim version 9.1. Last change: 2025 Mar 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -41551,6 +41551,8 @@ Add support for internal builtin functions with vim9 objects, see
|
||||
|
||||
Enum support for Vim9 script |:enum|
|
||||
|
||||
Support for protected _new() method
|
||||
|
||||
*new-other-9.2*
|
||||
Other new features ~
|
||||
------------------
|
||||
@@ -41571,8 +41573,11 @@ Include the "linematch" algorithm for the 'diffopt' setting. This aligns
|
||||
changes between buffers on similar lines improving the diff highlighting in
|
||||
Vim
|
||||
|
||||
Adjusted default values ~
|
||||
-----------------------
|
||||
*changed-9.2*
|
||||
Changed~
|
||||
-------
|
||||
|
||||
Default values: ~
|
||||
- the default 'history' option value has been increased to 200 and removed
|
||||
from |defaults.vim|
|
||||
- the default 'backspace' option for Vim has been set to "indent,eol,start"
|
||||
@@ -41581,58 +41586,69 @@ Adjusted default values ~
|
||||
increased to 12pt to accomodate modern high-dpi monitors
|
||||
- the default value of the 'keyprotocol' option has been updated and support
|
||||
for the ghostty terminal emulator (using kitty protocol) has been added
|
||||
- 'termguicolors' is automatically enabled if the terminal supports the RGB
|
||||
terminfo capability or supports 0x1000000 colors
|
||||
|
||||
*changed-9.2*
|
||||
Changed~
|
||||
-------
|
||||
- use 'smoothscroll' logic for CTRL-F and CTRL-B for pagewise scrolling
|
||||
- use 'smoothscroll' logic for CTRL-D and CTRL-U for half-pagewise scrolling
|
||||
- the default for 'commentstring' contains whitespace padding to have
|
||||
automatic comments look nicer |comment-install|
|
||||
- 'completeopt' is now a |global-local| option.
|
||||
- 'nrformats' accepts the new "blank" suboption, to determine a signed or
|
||||
unsigned number based on whitespace in front of a minus sign.
|
||||
- allow to specify a priority when defining a new sign |:sign-define|
|
||||
- provide information about function arguments using the get(func, "arity")
|
||||
function |get()-func|
|
||||
- |:bwipe| also wipes jumplist and tagstack data
|
||||
- moving in the buffer list using |:bnext| and similar commands, behaves as
|
||||
documented and skips help buffers (if not run from a help buffer, else
|
||||
moves to the next/previous help buffer).
|
||||
|
||||
Completion: ~
|
||||
- allow to complete directories from 'cdpath' for |:cd| and similar commands,
|
||||
add the "cd_in_path" completion type for e.g. |:command-complete| and
|
||||
|getcompletion()|
|
||||
- allow to complete shell commands and files using the new shellcmdline
|
||||
completion type using |:command-complete| and |getcmdcomplpat()|
|
||||
- add 'cpoptions' flag "z" |cpo-z|, to disable some (traditional) vi
|
||||
behaviour/inconsistency (see |d-special| and |cw|).
|
||||
- allow to specify additional attributes in the completion menu (allows to
|
||||
mark deprecated attributes from LSP server) |complete-items|
|
||||
- the regex engines match correctly case-insensitive multi-byte characters
|
||||
(and apply proper case folding)
|
||||
- the completed word and completion type are provided when handling the
|
||||
|CompleteDone| autocommand in the |v:event| dictionary
|
||||
- |complete_info()| returns the list of matches shown in the poppu menu via
|
||||
the "matches" key
|
||||
- New option value for 'completeopt':
|
||||
"nosort" - do not sort completion results
|
||||
"preinsert" - highlight to be inserted values
|
||||
- handle multi-line completion as expected
|
||||
- improved commandline completion for the |:hi| command
|
||||
- New option value for 'wildmode':
|
||||
"noselect" - do not auto select an entry in the wildmenu
|
||||
|
||||
Options: ~
|
||||
- the default for 'commentstring' contains whitespace padding to have
|
||||
automatic comments look nicer |comment-install|
|
||||
- 'completeopt' is now a |global-local| option.
|
||||
- 'nrformats' accepts the new "blank" suboption, to determine a signed or
|
||||
unsigned number based on whitespace in front of a minus sign.
|
||||
- add 'cpoptions' flag "z" |cpo-z|, to disable some (traditional) vi
|
||||
behaviour/inconsistency (see |d-special| and |cw|).
|
||||
- 'rulerformat' now supports the |stl-%!| item
|
||||
- use 'smoothscroll' logic for CTRL-F / CTRL-B for pagewise scrolling
|
||||
and CTRL-D / CTRL-U for half-pagewise scrolling
|
||||
|
||||
Ex commands: ~
|
||||
- allow to specify a priority when defining a new sign |:sign-define|
|
||||
- |:bwipe| also wipes jumplist and tagstack data
|
||||
- moving in the buffer list using |:bnext| and similar commands, behaves as
|
||||
documented and skips help buffers (if not run from a help buffer, else
|
||||
moves to the next/previous help buffer).
|
||||
- |:keeppatterns| preserves the last substitute pattern when used with |:s|
|
||||
|
||||
Functions: ~
|
||||
- provide information about function arguments using the get(func, "arity")
|
||||
function |get()-func|
|
||||
- |setqflist()| and |setloclist()| can optionally try to preserve the current
|
||||
selection in the quickfix list with the "u" action.
|
||||
- allow to pass local Vim script variables to python interpreter |py3eval()|
|
||||
- |getwininfo()| now also returns the "leftcol" property for a window
|
||||
- |v:stacktrace| The stack trace of the exception most recently caught and
|
||||
not finished
|
||||
- Add the optional {opts} |Dict| argument to |getchar()| to control: cursor
|
||||
behaviour, return type and whether or not to simplify the returned key
|
||||
|
||||
Others: ~
|
||||
- the regex engines match correctly case-insensitive multi-byte characters
|
||||
(and apply proper case folding)
|
||||
- the putty terminal is detected using an |TermResponse| autocommand in
|
||||
|defaults.vim| and Vim switches to a dark background
|
||||
- the |help-TOC| package is included to ease navigating the documentation.
|
||||
- an interactive tutor plugin has been included |vim-tutor-mode|, can be
|
||||
started via |:Tutor|
|
||||
- improve the |vimtutor| and add a second chapter for more advanced tips
|
||||
- allow to pass local Vim script variables to python interpreter |py3eval()|
|
||||
- |getwininfo()| now also returns the "leftcol" property for a window
|
||||
- 'rulerformat' now supports the |stl-%!| item
|
||||
- the completed word and completion type are provided when handling the
|
||||
|CompleteDone| autocommand in the |v:event| dictionary
|
||||
- |complete_info()| returns the list of matches shown in the poppu menu via
|
||||
the "matches" key
|
||||
- |v:stacktrace| The stack trace of the exception most recently caught and
|
||||
not finished
|
||||
- New option value for 'completeopt':
|
||||
"nosort" - do not sort completion results
|
||||
"preinsert" - highlight to be inserted values
|
||||
- add |dist#vim9#Launch()| and |dist#vim9#Open()| to the |vim-script-library|
|
||||
and decouple it from |netrw|
|
||||
- new digraph "APPROACHES THE LIMIT" using ".="
|
||||
@@ -41671,6 +41687,7 @@ Autocommands: ~
|
||||
|CursorMovedC| after the cursor was moved in the command-line
|
||||
|KeyInputPre| before processing any key event in any mode
|
||||
|SessionWritePost| after writing the session file |:mksession|
|
||||
|TabClosedPre| before closing a |tabpage|.
|
||||
|TermResponseAll| after the terminal response to |t_RV| and others is
|
||||
received
|
||||
|WinNewPre| before creating a new window
|
||||
@@ -41692,8 +41709,11 @@ Commands: ~
|
||||
|
||||
Options: ~
|
||||
|
||||
'completefuzzycollect' Enable fuzzy collection of candiates for (some)
|
||||
|ins-completion| modes
|
||||
'completeitemalign' Order of |complete-items| in Insert mode completion
|
||||
popup
|
||||
'eventignorewin' autocommand events that are ignored in a window
|
||||
'findfunc' Vim function to obtain the results for a |:find|
|
||||
command
|
||||
'messagesopt' configure |:messages| and |hit-enter| prompt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.1. Last change: 2025 Jan 21
|
||||
*vim9.txt* For Vim version 9.1. Last change: 2025 Mar 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1921,6 +1921,10 @@ There is one way to use both legacy and Vim9 syntax in one script file: >
|
||||
This allows for writing a script that takes advantage of the Vim9 script
|
||||
syntax if possible, but will also work on a Vim version without it.
|
||||
|
||||
Note that Vim9 syntax changed before Vim 9 so that scripts using the current
|
||||
syntax (such as "import from" instead of "import") might throw errors.
|
||||
To prevent these, a safer check could be for |v:version| >= 900 instead.
|
||||
|
||||
This can only work in two ways:
|
||||
1. The "if" statement evaluates to false, the commands up to `endif` are
|
||||
skipped and `vim9script` is then the first command actually executed.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9class.txt* For Vim version 9.1. Last change: 2024 Dec 29
|
||||
*vim9class.txt* For Vim version 9.1. Last change: 2025 Feb 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -52,7 +52,6 @@ An interface is used to specify properties of an object:
|
||||
The class hierarchy allows for single inheritance. Otherwise interfaces are
|
||||
to be used where needed.
|
||||
|
||||
|
||||
Class modeling ~
|
||||
|
||||
You can model classes any way you like. Keep in mind what you are building,
|
||||
@@ -122,7 +121,6 @@ using the object name followed by a dot following by the member: >
|
||||
A class name cannot be used as an expression. A class name cannot be used in
|
||||
the left-hand-side of an assignment.
|
||||
|
||||
|
||||
Object variable write access ~
|
||||
*read-only-variable*
|
||||
Now try to change an object variable directly: >
|
||||
@@ -272,6 +270,9 @@ no need to call "super()" or "new()" on the parent.
|
||||
When defining the new() method the return type should not be specified. It
|
||||
always returns an object of the class.
|
||||
|
||||
The new() method can be made a protected method by using "_new()". This can
|
||||
be used to support the singleton design pattern.
|
||||
|
||||
*E1386*
|
||||
When invoking an object method, the method name should be preceded by the
|
||||
object variable name. An object method cannot be invoked using the class
|
||||
@@ -623,13 +624,15 @@ once. They can appear in any order, although this order is recommended: >
|
||||
extends ClassName
|
||||
implements InterfaceName, OtherInterface
|
||||
specifies SomeInterface
|
||||
< *E1355* *E1369*
|
||||
<
|
||||
The "specifies" feature is currently not implemented.
|
||||
|
||||
*E1355* *E1369*
|
||||
Each variable and method name can be used only once. It is not possible to
|
||||
define a method with the same name and different type of arguments. It is not
|
||||
possible to use a public and protected member variable with the same name. An
|
||||
object variable name used in a super class cannot be reused in a child class.
|
||||
|
||||
|
||||
Object Variable Initialization ~
|
||||
|
||||
If the type of a variable is not explicitly specified in a class, then it is
|
||||
@@ -686,13 +689,12 @@ A class can implement one or more interfaces. The "implements" keyword can
|
||||
only appear once *E1350* . Multiple interfaces can be specified, separated by
|
||||
commas. Each interface name can appear only once. *E1351*
|
||||
|
||||
|
||||
A class defining an interface ~
|
||||
*specifies*
|
||||
A class can declare its interface, the object variables and methods, with a
|
||||
named interface. This avoids the need for separately specifying the
|
||||
interface, which is often done in many languages, especially Java.
|
||||
|
||||
TODO: This is currently not implemented.
|
||||
|
||||
Items in a class ~
|
||||
*E1318* *E1325* *E1388*
|
||||
@@ -733,25 +735,25 @@ Some of the builtin functions like |empty()|, |len()| and |string()| can be
|
||||
used with an object. An object can implement a method with the same name as
|
||||
these builtin functions to return an object-specific value.
|
||||
|
||||
*E1412*
|
||||
*E1412*
|
||||
The following builtin methods are supported:
|
||||
*object-empty()*
|
||||
*object-empty()*
|
||||
empty() Invoked by the |empty()| function to check whether an object is
|
||||
empty. If this method is missing, then true is returned. This
|
||||
method should not accept any arguments and must return a boolean.
|
||||
*object-len()*
|
||||
*object-len()*
|
||||
len() Invoked by the |len()| function to return the length of an
|
||||
object. If this method is missing in the class, then an error is
|
||||
given and zero is returned. This method should not accept any
|
||||
arguments and must return a number.
|
||||
*object-string()*
|
||||
*object-string()*
|
||||
string() Invoked by the |string()| function to get a textual
|
||||
representation of an object. Also used by the |:echo| command
|
||||
for an object. If this method is missing in the class, then a
|
||||
built-in default textual representation is used. This method
|
||||
should not accept any arguments and must return a string.
|
||||
|
||||
*E1413*
|
||||
*E1413*
|
||||
A class method cannot be used as a builtin method.
|
||||
|
||||
Defining an interface ~
|
||||
@@ -783,7 +785,6 @@ An interface can only be defined in a |Vim9| script file. *E1342*
|
||||
An interface cannot "implement" another interface but it can "extend" another
|
||||
interface. *E1381*
|
||||
|
||||
|
||||
null object ~
|
||||
|
||||
When a variable is declared to have the type of an object, but it is not
|
||||
@@ -792,7 +793,6 @@ does not know what class was supposed to be used. Vim then cannot check if
|
||||
a variable name is correct and you will get a "Using a null object" error,
|
||||
even when the variable name is invalid. *E1360* *E1362*
|
||||
|
||||
|
||||
Default constructor ~
|
||||
*default-constructor*
|
||||
In case you define a class without a new() method, one will be automatically
|
||||
@@ -1115,7 +1115,6 @@ For |Vim9| script using the same method name for all constructors seemed like
|
||||
the right choice, and by calling it new() the relation between the caller and
|
||||
the method being called is obvious.
|
||||
|
||||
|
||||
No overloading of the constructor ~
|
||||
|
||||
In Vim script, both legacy and |Vim9| script, there is no overloading of
|
||||
@@ -1136,7 +1135,6 @@ That way multiple constructors with different arguments are possible, while it
|
||||
is very easy to see which constructor is being used. And the type of
|
||||
arguments can be properly checked.
|
||||
|
||||
|
||||
No overloading of methods ~
|
||||
|
||||
Same reasoning as for the constructor: It is often not obvious what type
|
||||
@@ -1145,7 +1143,6 @@ actually being called. Better just give the methods a different name, then
|
||||
type checking will make sure it works as you intended. This rules out
|
||||
polymorphism, which we don't really need anyway.
|
||||
|
||||
|
||||
Single inheritance and interfaces ~
|
||||
|
||||
Some languages support multiple inheritance. Although that can be useful in
|
||||
@@ -1161,7 +1158,6 @@ it will be checked if that change was also changed. The mechanism to assume a
|
||||
class implements an interface just because the methods happen to match is
|
||||
brittle and leads to obscure problems, let's not do that.
|
||||
|
||||
|
||||
Using "this.variable" everywhere ~
|
||||
|
||||
The object variables in various programming languages can often be accessed in
|
||||
@@ -1180,7 +1176,6 @@ variables. Simple and consistent. When looking at the code inside a class
|
||||
it's also directly clear which variable references are object variables and
|
||||
which aren't.
|
||||
|
||||
|
||||
Using class variables ~
|
||||
|
||||
Using "static variable" to declare a class variable is very common, nothing
|
||||
@@ -1194,7 +1189,6 @@ the class. This has two problems: The class name can be rather long, taking
|
||||
up quite a bit of space, and when the class is renamed all these places need
|
||||
to be changed too.
|
||||
|
||||
|
||||
Declaring object and class variables ~
|
||||
|
||||
The main choice is whether to use "var" as with variable declarations.
|
||||
@@ -1248,7 +1242,6 @@ function declaration syntax for class/object variables and methods. Vim9 also
|
||||
reuses the general function declaration syntax for methods. So, for the sake
|
||||
of consistency, we require "var" in these declarations.
|
||||
|
||||
|
||||
Using "ClassName.new()" to construct an object ~
|
||||
|
||||
Many languages use the "new" operator to create an object, which is actually
|
||||
@@ -1312,7 +1305,6 @@ An alternative would have been using the "protected" keyword, just like
|
||||
"public" changes the access in the other direction. Well, that's just to
|
||||
reduce the number of keywords.
|
||||
|
||||
|
||||
No private object variables ~
|
||||
|
||||
Some languages provide several ways to control access to object variables.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Jan 21
|
||||
" Last Change: 2025 Mar 12
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
@@ -51,8 +51,11 @@ func s:StarSetf(ft)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Vim help file
|
||||
au BufNewFile,BufRead $VIMRUNTIME/doc/*.txt setf help
|
||||
" Vim help file, set ft explicitly, because 'modeline' might be off
|
||||
au BufNewFile,BufRead */doc/*.txt
|
||||
\ if getline('$') =~ '\(^\|\s\)vim:.*\<\(ft\|filetype\)=help\>'
|
||||
\| setf help
|
||||
\| endif
|
||||
|
||||
" Abaqus or Trasys
|
||||
au BufNewFile,BufRead *.inp call dist#ft#Check_inp()
|
||||
@@ -75,6 +78,9 @@ au BufNewFile,BufRead *.abc setf abc
|
||||
" ABEL
|
||||
au BufNewFile,BufRead *.abl setf abel
|
||||
|
||||
" ABNF
|
||||
au BufNewFile,BufRead *.abnf setf abnf
|
||||
|
||||
" AceDB
|
||||
au BufNewFile,BufRead *.wrm setf acedb
|
||||
|
||||
@@ -341,6 +347,11 @@ au BufNewFile,BufRead *.capnp setf capnp
|
||||
" Cgdb config file
|
||||
au BufNewFile,BufRead cgdbrc setf cgdbrc
|
||||
|
||||
" m17n database files. */m17n/* matches installed files, */.m17n.d/* matches
|
||||
" per-user config files, */m17n-db/* matches the git repo. (must be before
|
||||
" *.cs)
|
||||
au BufNewFile,BufRead */{m17n,.m17n.d,m17n-db}/*.{ali,cs,dir,flt,fst,lnm,mic,mim,tbl} setf m17ndb
|
||||
|
||||
" C#
|
||||
au BufNewFile,BufRead *.cs,*.csx,*.cake setf cs
|
||||
|
||||
@@ -384,6 +395,12 @@ au BufNewFile,BufRead *.cdl setf cdl
|
||||
" Conary Recipe
|
||||
au BufNewFile,BufRead *.recipe setf conaryrecipe
|
||||
|
||||
" Containers config files
|
||||
au BufNewFile,BufRead */containers/containers.conf{,.d/*.conf} setf toml
|
||||
au BufNewFile,BufRead */containers/containers.conf.modules/*.conf setf toml
|
||||
au BufNewFile,BufRead */containers/registries.conf{,.d/*.conf} setf toml
|
||||
au BufNewFile,BufRead */containers/storage.conf setf toml
|
||||
|
||||
" Corn config file
|
||||
au BufNewFile,BufRead *.corn setf corn
|
||||
|
||||
@@ -952,7 +969,7 @@ au BufNewFile,BufRead */etc/gitattributes setf gitattributes
|
||||
au BufNewFile,BufRead .gitignore,*.git/info/exclude setf gitignore
|
||||
au BufNewFile,BufRead */.config/git/ignore,*.prettierignore setf gitignore
|
||||
au BufNewFile,BufRead */.config/fd/ignore,.fdignore,.ignore setf gitignore
|
||||
au BufNewFile,BufRead .rgignore,.dockerignore setf gitignore
|
||||
au BufNewFile,BufRead .rgignore,.dockerignore,.containerignore setf gitignore
|
||||
au BufNewFile,BufRead .npmignore,.vscodeignore setf gitignore
|
||||
au BufNewFile,BufRead git-rebase-todo setf gitrebase
|
||||
au BufRead,BufNewFile .gitsendemail.msg.?????? setf gitsendemail
|
||||
@@ -2212,7 +2229,7 @@ au BufNewFile,BufRead *.sass setf sass
|
||||
au BufNewFile,BufRead *.sa call dist#ft#FTsa()
|
||||
|
||||
" Scala
|
||||
au BufNewFile,BufRead *.scala setf scala
|
||||
au BufNewFile,BufRead *.scala,*.mill setf scala
|
||||
|
||||
" SBT - Scala Build Tool
|
||||
au BufNewFile,BufRead *.sbt setf sbt
|
||||
@@ -2347,8 +2364,8 @@ au BufNewFile,BufRead *.zsh,*.zsh-theme,*.zunit setf zsh
|
||||
" Salt state files
|
||||
au BufNewFile,BufRead *.sls setf salt
|
||||
|
||||
" Scheme, Supertux configuration, Lips.js history ("racket" patterns are now separate, see above)
|
||||
au BufNewFile,BufRead *.scm,*.ss,*.sld,*.stsg,*/supertux2/config,.lips_repl_history setf scheme
|
||||
" Scheme, Supertux configuration, Lips.js history, Guile init file ("racket" patterns are now separate, see above)
|
||||
au BufNewFile,BufRead *.scm,*.ss,*.sld,*.stsg,*/supertux2/config,.lips_repl_history,.guile setf scheme
|
||||
|
||||
" Screen RC
|
||||
au BufNewFile,BufRead .screenrc,screenrc setf screen
|
||||
@@ -2596,6 +2613,9 @@ au BufRead,BufNewFile *.ttl
|
||||
" Terminfo
|
||||
au BufNewFile,BufRead *.ti setf terminfo
|
||||
|
||||
" Tera
|
||||
au BufRead,BufNewFile *.tera setf tera
|
||||
|
||||
" Terraform variables
|
||||
au BufRead,BufNewFile *.tfvars setf terraform-vars
|
||||
|
||||
@@ -2646,7 +2666,7 @@ au BufNewFile,BufRead *.toml setf toml
|
||||
au BufNewFile,BufRead *.tpp setf tpp
|
||||
|
||||
" TRACE32 Script Language
|
||||
au BufNewFile,BufRead *.cmm,*.t32 setf trace32
|
||||
au BufNewFile,BufRead *.cmm,*.cmmt,*.t32 setf trace32
|
||||
|
||||
" Treetop
|
||||
au BufRead,BufNewFile *.treetop setf treetop
|
||||
@@ -3273,7 +3293,7 @@ au BufNewFile,BufRead XF86Config*
|
||||
\|call s:StarSetf('xf86conf')
|
||||
|
||||
" XKB
|
||||
au BufNewFile,BufRead */usr/share/X11/xkb/{compat,geometry,keycodes,symbols,types}/* call s:StarSetf('xkb')
|
||||
au BufNewFile,BufRead */{,.}xkb/{compat,geometry,keycodes,symbols,types}/* call s:StarSetf('xkb')
|
||||
|
||||
" X11 xmodmap
|
||||
au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
|
||||
@@ -3284,6 +3304,15 @@ au BufNewFile,BufRead */etc/xinetd.d/* call s:StarSetf('xinetd')
|
||||
" yum conf (close enough to dosini)
|
||||
au BufNewFile,BufRead */etc/yum.repos.d/* call s:StarSetf('dosini')
|
||||
|
||||
" Yarn lock
|
||||
au BufNewFile,BufRead yarn.lock setf yaml
|
||||
|
||||
" Zathurarc
|
||||
au BufNewFile,BufRead zathurarc setf zathurarc
|
||||
|
||||
" Rofi stylesheet
|
||||
au BufNewFile,BufRead *.rasi setf rasi
|
||||
|
||||
" Z-Shell script ending in a star
|
||||
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
|
||||
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
|
||||
@@ -3329,15 +3358,6 @@ au filetypedetect BufNewFile,BufRead,StdinReadPost *
|
||||
\ setf FALLBACK conf |
|
||||
\ endif
|
||||
|
||||
" Yarn lock
|
||||
au BufNewFile,BufRead yarn.lock setf yaml
|
||||
|
||||
" Zathurarc
|
||||
au BufNewFile,BufRead zathurarc setf zathurarc
|
||||
|
||||
" Rofi stylesheet
|
||||
au BufNewFile,BufRead *.rasi setf rasi
|
||||
|
||||
" If the GUI is already running, may still need to install the Syntax menu.
|
||||
" Don't do it when the 'M' flag is included in 'guioptions'.
|
||||
if has("menu") && has("gui_running")
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
" Language: C#
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2022-11-16
|
||||
" 2024 Jan 14 by Vim Project (browsefilter)
|
||||
" Last Change: 2025-03-14
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
|
||||
@@ -21,8 +20,11 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
" Set 'comments' to format dashed lists in comments.
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl com< fo<'
|
||||
setlocal cinoptions=J1
|
||||
|
||||
let b:undo_ftplugin = 'setl com< fo< cino<'
|
||||
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
" #if/#endif support included by default
|
||||
|
||||
11
runtime/ftplugin/dnsmasq.vim
Normal file
11
runtime/ftplugin/dnsmasq.vim
Normal file
@@ -0,0 +1,11 @@
|
||||
" Vim filetype plugin
|
||||
" Language: dnsmasq
|
||||
" Maintainer: dringsim <dringsim@qq.com>
|
||||
" Last Change: 2025-02-18
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Behaves mostly just like cfg
|
||||
runtime! ftplugin/cfg.vim
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Dockerfile
|
||||
" Maintainer: Honza Pokorny <http://honza.ca>
|
||||
" Last Change: 2024 Dec 20
|
||||
" Last Change: 2025 Feb 21
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -11,6 +11,7 @@ endif
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring<"
|
||||
let b:undo_ftplugin = "setl comments< commentstring<"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Configuration File (ini file) for MS-DOS/MS Windows
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Latest Revision: 2025 Feb 20
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -13,7 +14,7 @@ set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql
|
||||
setlocal comments=:;,:# commentstring=;\ %s formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
14
runtime/ftplugin/exports.vim
Normal file
14
runtime/ftplugin/exports.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: exports(5) configuration file
|
||||
" Maintainer: Matt Perry <matt@mattperry.com>
|
||||
" Last Change: 2025 Feb 13
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms< fo<'
|
||||
@@ -3,6 +3,7 @@
|
||||
" Maintainer: David Barnett (https://github.com/google/vim-ft-go)
|
||||
" Last Change: 2014 Aug 16
|
||||
" 2024 Jul 16 by Vim Project (add recommended indent style)
|
||||
" 2025 Mar 07 by Vim Project (add formatprg and keywordprg option #16804)
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
@@ -10,15 +11,39 @@ endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal formatoptions-=t
|
||||
setlocal formatprg=gofmt
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//\ %s
|
||||
setlocal keywordprg=:GoKeywordPrg
|
||||
|
||||
let b:undo_ftplugin = 'setl fo< com< cms<'
|
||||
command! -buffer -nargs=* GoKeywordPrg call s:GoKeywordPrg()
|
||||
|
||||
let b:undo_ftplugin = 'setl fo< com< cms< fp< kp<'
|
||||
\ . '| delcommand -buffer GoKeywordPrg'
|
||||
|
||||
if get(g:, 'go_recommended_style', 1)
|
||||
setlocal noexpandtab softtabstop=0 shiftwidth=0
|
||||
let b:undo_ftplugin ..= ' | setl et< sts< sw<'
|
||||
endif
|
||||
|
||||
if !exists('*' .. expand('<SID>') .. 'GoKeywordPrg')
|
||||
func! s:GoKeywordPrg()
|
||||
let temp_isk = &l:iskeyword
|
||||
setl iskeyword+=.
|
||||
try
|
||||
let cmd = 'go doc -C ' . shellescape(expand('%:h')) . ' ' . shellescape(expand('<cword>'))
|
||||
if has('nvim')
|
||||
exe "term" cmd
|
||||
startinsert
|
||||
tmap <buffer> <Esc> <Cmd>call jobstop(&channel) <Bar> bdelete<CR>
|
||||
else
|
||||
exe '!' . cmd
|
||||
endif
|
||||
finally
|
||||
let &l:iskeyword = temp_isk
|
||||
endtry
|
||||
endfunc
|
||||
endif
|
||||
|
||||
" vim: sw=2 sts=2 et
|
||||
|
||||
@@ -5,13 +5,24 @@
|
||||
" Contributor: Dorai Sitaram <ds26@gte.com>
|
||||
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
||||
" Tyler Miller <tmillr@proton.me>
|
||||
" Last Change: 2024 Dec 03
|
||||
" Phạm Bình An <phambinhanctb2004@gmail.com>
|
||||
" Last Change: 2025 Feb 27
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" keep in sync with syntax/lua.vim
|
||||
if !exists("lua_version")
|
||||
" Default is lua 5.3
|
||||
let lua_version = 5
|
||||
let lua_subversion = 3
|
||||
elseif !exists("lua_subversion")
|
||||
" lua_version exists, but lua_subversion doesn't. In this case set it to 0
|
||||
let lua_subversion = 0
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
@@ -21,11 +32,11 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
||||
|
||||
" TODO: handle init.lua
|
||||
setlocal includeexpr=tr(v:fname,'.','/')
|
||||
let &l:include = '\<\%(\%(do\|load\)file\|require\)\s*('
|
||||
setlocal includeexpr=s:LuaInclude(v:fname)
|
||||
setlocal suffixesadd=.lua
|
||||
|
||||
let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
|
||||
let b:undo_ftplugin = "setl cms< com< def< fo< inc< inex< sua<"
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
@@ -50,20 +61,31 @@ endif
|
||||
|
||||
if has("folding") && get(g:, "lua_folding", 0)
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=LuaFold(v:lnum)
|
||||
setlocal foldexpr=s:LuaFold(v:lnum)
|
||||
let b:lua_lasttick = -1
|
||||
let b:undo_ftplugin ..= "|setl foldexpr< foldmethod< | unlet! b:lua_lasttick b:lua_foldlists"
|
||||
let b:undo_ftplugin ..= " | setl foldexpr< foldmethod< | unlet! b:lua_lasttick b:lua_foldlists"
|
||||
endif
|
||||
|
||||
|
||||
" The rest of the file needs to be :sourced only once per Vim session
|
||||
if exists('s:loaded_lua') || &cp
|
||||
if exists("s:loaded_lua") || &cp
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
finish
|
||||
endif
|
||||
let s:loaded_lua = 1
|
||||
|
||||
function s:LuaInclude(fname) abort
|
||||
let lua_ver = str2float(printf("%d.%02d", g:lua_version, g:lua_subversion))
|
||||
let fname = tr(a:fname, '.', '/')
|
||||
let paths = lua_ver >= 5.03 ? [fname .. ".lua", fname .. "/init.lua"] : [fname .. ".lua"]
|
||||
for path in paths
|
||||
if filereadable(path)
|
||||
return path
|
||||
endif
|
||||
endfor
|
||||
return fname
|
||||
endfunction
|
||||
|
||||
let s:patterns = [
|
||||
\ ['do', 'end'],
|
||||
\ ['if\s+.+\s+then', 'end'],
|
||||
@@ -75,35 +97,35 @@ let s:patterns = [
|
||||
\ ['local\s+function\s+.+', 'end'],
|
||||
\ ]
|
||||
|
||||
function! LuaFold(lnum) abort
|
||||
function s:LuaFold(lnum) abort
|
||||
if b:lua_lasttick == b:changedtick
|
||||
return b:lua_foldlists[a:lnum-1]
|
||||
return b:lua_foldlists[a:lnum - 1]
|
||||
endif
|
||||
let b:lua_lasttick = b:changedtick
|
||||
|
||||
let b:lua_foldlists = []
|
||||
let foldlist = []
|
||||
let buf = getline(1, '$')
|
||||
let buf = getline(1, "$")
|
||||
for line in buf
|
||||
for t in s:patterns
|
||||
let tagopen = '\v^\s*'..t[0]..'\s*$'
|
||||
let tagclose = '\v^\s*'..t[1]..'\s*$'
|
||||
let tagopen = '\v^\s*' .. t[0] ..'\s*$'
|
||||
let tagclose = '\v^\s*' .. t[1] ..'\s*$'
|
||||
if line =~# tagopen
|
||||
call add(foldlist, t)
|
||||
break
|
||||
call add(foldlist, t)
|
||||
break
|
||||
elseif line =~# tagclose
|
||||
if len(foldlist) > 0 && line =~# foldlist[-1][1]
|
||||
call remove(foldlist, -1)
|
||||
else
|
||||
let foldlist = []
|
||||
endif
|
||||
break
|
||||
if len(foldlist) > 0 && line =~# foldlist[-1][1]
|
||||
call remove(foldlist, -1)
|
||||
else
|
||||
let foldlist = []
|
||||
endif
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
call add(b:lua_foldlists, len(foldlist))
|
||||
endfor
|
||||
|
||||
return lua_foldlists[a:lnum-1]
|
||||
return lua_foldlists[a:lnum - 1]
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
||||
17
runtime/ftplugin/m17ndb.vim
Normal file
17
runtime/ftplugin/m17ndb.vim
Normal file
@@ -0,0 +1,17 @@
|
||||
" Vim filetype plugin
|
||||
" Language: m17n database
|
||||
" Maintainer: David Mandelberg <david@mandelberg.org>
|
||||
" Last Change: 2025 Feb 21
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:;;;,:;;,:;
|
||||
setlocal commentstring=;\ %s
|
||||
setlocal iskeyword=!-~,@,^34,^(,^),^92
|
||||
setlocal lisp
|
||||
setlocal lispwords=
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< commentstring< iskeyword< lisp< lispwords<"
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Mail
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Last Change: 2025 Feb 20
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
@@ -10,7 +10,7 @@ if exists("b:did_ftplugin")
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl modeline< tw< fo< comments<"
|
||||
let b:undo_ftplugin = "setl modeline< tw< fo< comments< commentstring<"
|
||||
|
||||
" Don't use modelines in e-mail messages, avoid trojan horses and nasty
|
||||
" "jokes" (e.g., setting 'textwidth' to 5).
|
||||
@@ -24,6 +24,9 @@ endif
|
||||
" Set 'formatoptions' to break text lines and keep the comment leader ">".
|
||||
setlocal fo+=tcql
|
||||
|
||||
" Set commentstring to quoting sign ">" so comment shortcuts can be used to
|
||||
" edit quoted parts of mail
|
||||
setlocal commentstring=>\ %s
|
||||
" Add n:> to 'comments, in case it was removed elsewhere
|
||||
setlocal comments+=n:>
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
" Last Change: 2024 Jun 06 (disabled the q mapping, #8210)
|
||||
" 2024 Jul 06 (use nnoremap, #15130)
|
||||
" 2024 Aug 23 (improve the <Plug>ManBS mapping, #15547, #15556)
|
||||
" 2025 Mar 09 (improve :Man completion for man-db, #16843)
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@@ -24,6 +25,14 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
if !exists('g:ft_man_implementation')
|
||||
if executable('mandb') > 0
|
||||
let g:ft_man_implementation = 'man-db'
|
||||
else
|
||||
let g:ft_man_implementation = ''
|
||||
endif
|
||||
endif
|
||||
|
||||
if &filetype == "man"
|
||||
" Allow hyphen, plus, colon, dot, and commercial at in manual page name.
|
||||
" Parentheses are not here but in dist#man#PreGetPage()
|
||||
@@ -60,11 +69,19 @@ if &filetype == "man"
|
||||
endif
|
||||
|
||||
if exists(":Man") != 2
|
||||
com -nargs=+ -complete=shellcmd Man call dist#man#GetPage(<q-mods>, <f-args>)
|
||||
if g:ft_man_implementation ==# 'man-db'
|
||||
com -nargs=+ -complete=customlist,dist#man#ManDbComplete Man call dist#man#GetPage(<q-mods>, <f-args>)
|
||||
else
|
||||
com -nargs=+ -complete=shellcmd Man call dist#man#GetPage(<q-mods>, <f-args>)
|
||||
endif
|
||||
nnoremap <Leader>K :call dist#man#PreGetPage(0)<CR>
|
||||
nnoremap <Plug>ManPreGetPage :call dist#man#PreGetPage(0)<CR>
|
||||
endif
|
||||
|
||||
if exists(":ManReload") != 2
|
||||
com ManReload call dist#man#Reload()
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
||||
@@ -2,8 +2,11 @@
|
||||
" Language: roff(7)
|
||||
" Maintainer: Aman Verma
|
||||
" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin
|
||||
" Document: https://www.gnu.org/software/groff/manual/groff.html
|
||||
" Previous Maintainer: Chris Spiegel <cspiegel@gmail.com>
|
||||
" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" Last Changes:
|
||||
" 2024 May 24 by Riley Bruins <ribru17@gmail.com> ('commentstring' #14843)
|
||||
" 2025 Feb 12 by Wu, Zhenyu <wuzhenyu@ustc.edu> (matchit configuration #16619)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -13,5 +16,17 @@ let b:did_ftplugin = 1
|
||||
setlocal commentstring=.\\\"\ %s
|
||||
setlocal comments=:.\\\"
|
||||
setlocal sections+=Sh
|
||||
setlocal define=.\s*de
|
||||
|
||||
let b:undo_ftplugin = 'setlocal commentstring< comments< sections<'
|
||||
let b:undo_ftplugin = 'setlocal commentstring< comments< sections< define<'
|
||||
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words = '^\.\s*ie\>:^\.\s*el\>'
|
||||
\ . ',^\.\s*LB\>:^\.\s*LI\>:^\.\s*LE\>'
|
||||
\ . ',^\.\s*TS\>:^\.\s*TE\>'
|
||||
\ . ',^\.\s*PS\>:^\.\s*P[EF]\>'
|
||||
\ . ',^\.\s*EQ\>:^\.\s*EN\>'
|
||||
\ . ',^\.\s*[\>:^\.\s*]\>'
|
||||
\ . ',^\.\s*FS\>:^\.\s*FE\>'
|
||||
let b:undo_ftplugin .= "| unlet b:match_words"
|
||||
endif
|
||||
|
||||
17
runtime/ftplugin/plsql.vim
Executable file
17
runtime/ftplugin/plsql.vim
Executable file
@@ -0,0 +1,17 @@
|
||||
" Vim ftplugin file
|
||||
" Language: Oracle Procedural SQL (PL/SQL)
|
||||
" Maintainer: Lee Lindley (lee dot lindley at gmail dot com)
|
||||
" Previous Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com)
|
||||
" Previous Maintainer: C. Laurence Gonsalves (clgonsal@kami.com)
|
||||
" URL: https://github.com/lee-lindley/vim_plsql_syntax
|
||||
" Last Change: Feb 19, 2025
|
||||
" History: Enno Konfekt move handling of optional syntax folding from syntax
|
||||
" file to ftplugin
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if get(g:,"plsql_fold",0) == 1
|
||||
setlocal foldmethod=syntax
|
||||
let b:undo_ftplugin = "setl fdm< "
|
||||
endif
|
||||
14
runtime/ftplugin/samba.vim
Normal file
14
runtime/ftplugin/samba.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: smb.conf(5) configuration file
|
||||
" Maintainer: Matt Perry <matt@mattperry.com>
|
||||
" Last Change: 2025 Feb 13
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:;,:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms< fo<'
|
||||
@@ -6,6 +6,7 @@
|
||||
" Eisuke Kawashima
|
||||
" Last Change: 2024 Sep 19 by Vim Project (compiler shellcheck)
|
||||
" 2024 Dec 29 by Vim Project (improve setting shellcheck compiler)
|
||||
" 2025 Mar 09 by Vim Project (set b:match_skip)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -30,7 +31,8 @@ if exists("loaded_matchit") && !exists("b:match_words")
|
||||
\ s:sol .. '\%(for\|while\)\>:' .. s:sol .. 'done\>,' ..
|
||||
\ s:sol .. 'case\>:' .. s:sol .. 'esac\>'
|
||||
unlet s:sol
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
|
||||
let b:match_skip = "synIDattr(synID(line('.'),col('.'),0),'name') =~ 'shSnglCase'"
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words b:match_skip"
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Sieve filtering language input file
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Latest Revision: 2025 Feb 20
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
let b:undo_ftplugin = "setl com< cms< fo< ff<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:# commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
" https://datatracker.ietf.org/doc/html/rfc5228#section-2.2 says
|
||||
" "newlines (CRLF, never just CR or LF)"
|
||||
setlocal fileformat=dos
|
||||
|
||||
30
runtime/ftplugin/tera.vim
Normal file
30
runtime/ftplugin/tera.vim
Normal file
@@ -0,0 +1,30 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Tera
|
||||
" Maintainer: Muntasir Mahmud <muntasir.joypurhat@gmail.com>
|
||||
" Last Change: 2025 Mar 08
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal autoindent
|
||||
|
||||
setlocal commentstring={#\ %s\ #}
|
||||
setlocal comments=s:{#,e:#}
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '{#:##\|#},{% *if:{% *else\>:{% *elif\>:{% *endif %},{% *for\>:{% *endfor %},{% *macro\>:{% *endmacro %},{% *block\>:{% *endblock %},{% *filter\>:{% *endfilter %},{% *set\>:{% *endset %},{% *raw\>:{% *endraw %},{% *with\>:{% *endwith %}'
|
||||
endif
|
||||
|
||||
setlocal includeexpr=substitute(v:fname,'\\([^.]*\\)$','\\1','g')
|
||||
setlocal suffixesadd=.tera
|
||||
|
||||
setlocal expandtab
|
||||
setlocal shiftwidth=2
|
||||
setlocal softtabstop=2
|
||||
|
||||
let b:undo_ftplugin = "setlocal autoindent< commentstring< comments< " ..
|
||||
\ "includeexpr< suffixesadd< expandtab< shiftwidth< softtabstop<"
|
||||
let b:undo_ftplugin .= "|unlet! b:match_ignorecase b:match_words"
|
||||
@@ -1,9 +1,11 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jan 06
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Contributors: Riley Bruins <ribru17@gmail.com> ('commentstring')
|
||||
" Language: Vim
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Mar 05
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Contributors: Riley Bruins <ribru17@gmail.com> ('commentstring'),
|
||||
" @Konfekt
|
||||
" @tpope (s:Help())
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -18,20 +20,21 @@ set cpo&vim
|
||||
|
||||
if !exists('*VimFtpluginUndo')
|
||||
func VimFtpluginUndo()
|
||||
setl fo< isk< com< tw< commentstring< include< define<
|
||||
setl fo< isk< com< tw< commentstring< include< define< keywordprg<
|
||||
sil! delc -buffer VimKeywordPrg
|
||||
if exists('b:did_add_maps')
|
||||
silent! nunmap <buffer> [[
|
||||
silent! vunmap <buffer> [[
|
||||
silent! xunmap <buffer> [[
|
||||
silent! nunmap <buffer> ]]
|
||||
silent! vunmap <buffer> ]]
|
||||
silent! xunmap <buffer> ]]
|
||||
silent! nunmap <buffer> []
|
||||
silent! vunmap <buffer> []
|
||||
silent! xunmap <buffer> []
|
||||
silent! nunmap <buffer> ][
|
||||
silent! vunmap <buffer> ][
|
||||
silent! xunmap <buffer> ][
|
||||
silent! nunmap <buffer> ]"
|
||||
silent! vunmap <buffer> ]"
|
||||
silent! xunmap <buffer> ]"
|
||||
silent! nunmap <buffer> ["
|
||||
silent! vunmap <buffer> ["
|
||||
silent! xunmap <buffer> ["
|
||||
endif
|
||||
unlet! b:match_ignorecase b:match_words b:match_skip b:did_add_maps
|
||||
endfunc
|
||||
@@ -48,7 +51,53 @@ setlocal fo-=t fo+=croql
|
||||
setlocal isk+=#
|
||||
|
||||
" Use :help to lookup the keyword under the cursor with K.
|
||||
setlocal keywordprg=:help
|
||||
" Distinguish between commands, options and functions.
|
||||
if !exists("*" .. expand("<SID>") .. "Help")
|
||||
function s:Help(topic) abort
|
||||
let topic = a:topic
|
||||
|
||||
if get(g:, 'syntax_on', 0)
|
||||
let syn = synIDattr(synID(line('.'), col('.'), 1), 'name')
|
||||
if syn ==# 'vimFuncName'
|
||||
return topic.'()'
|
||||
elseif syn ==# 'vimOption'
|
||||
return "'".topic."'"
|
||||
elseif syn ==# 'vimUserAttrbKey'
|
||||
return ':command-'.topic
|
||||
elseif syn =~# 'vimCommand'
|
||||
return ':'.topic
|
||||
endif
|
||||
endif
|
||||
|
||||
let col = col('.') - 1
|
||||
while col && getline('.')[col] =~# '\k'
|
||||
let col -= 1
|
||||
endwhile
|
||||
let pre = col == 0 ? '' : getline('.')[0 : col]
|
||||
|
||||
let col = col('.') - 1
|
||||
while col && getline('.')[col] =~# '\k'
|
||||
let col += 1
|
||||
endwhile
|
||||
let post = getline('.')[col : -1]
|
||||
|
||||
if pre =~# '^\s*:\=$'
|
||||
return ':'.topic
|
||||
elseif pre =~# '\<v:$'
|
||||
return 'v:'.topic
|
||||
elseif pre =~# '<$'
|
||||
return '<'.topic.'>'
|
||||
elseif pre =~# '\\$'
|
||||
return '/\'.topic
|
||||
elseif topic ==# 'v' && post =~# ':\w\+'
|
||||
return 'v'.matchstr(post, ':\w\+')
|
||||
else
|
||||
return topic
|
||||
endif
|
||||
endfunction
|
||||
endif
|
||||
command! -buffer -nargs=1 VimKeywordPrg :exe 'help' s:Help(<q-args>)
|
||||
setlocal keywordprg=:VimKeywordPrg
|
||||
|
||||
" Comments starts with # in Vim9 script. We have to guess which one to use.
|
||||
if "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>'
|
||||
@@ -77,19 +126,19 @@ if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
|
||||
" Move around functions.
|
||||
nnoremap <silent><buffer> [[ m':call search('^\s*\(fu\%[nction]\\|\(export\s\+\)\?def\)\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|\(export\s\+\)\?def\)\>', "bW")<CR>
|
||||
xnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|\(export\s\+\)\?def\)\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ]] m':call search('^\s*\(fu\%[nction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
|
||||
xnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*\(fu\%[nction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
|
||||
nnoremap <silent><buffer> [] m':call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "bW")<CR>
|
||||
vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "bW")<CR>
|
||||
xnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "bW")<CR>
|
||||
nnoremap <silent><buffer> ][ m':call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
|
||||
vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
|
||||
xnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*end\(f\%[unction]\\|\(export\s\+\)\?def\)\>', "W")<CR>
|
||||
|
||||
" Move around comments
|
||||
nnoremap <silent><buffer> ]" :call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR>
|
||||
vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR>
|
||||
xnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\@<!\%(^\s*"\)', "W")<CR>
|
||||
nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
xnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
|
||||
endif
|
||||
|
||||
" Let the matchit plugin know what items can be matched.
|
||||
@@ -101,15 +150,15 @@ if exists("loaded_matchit")
|
||||
" func name
|
||||
" require a parenthesis following, then there can be an "endfunc".
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' ..
|
||||
\ '\<\%(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\%(w\%[hile]\|fo\%[r]\)\>,' ..
|
||||
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' ..
|
||||
\ '{:},' ..
|
||||
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' ..
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' ..
|
||||
\ '\<class\>:\<endclass\>,' ..
|
||||
\ '\<interface\>:\<endinterface\>,' ..
|
||||
\ '\<enum\>:\<endenum\>'
|
||||
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' ..
|
||||
\ '\<\%(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\%(w\%[hile]\|fo\%[r]\)\>,' ..
|
||||
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' ..
|
||||
\ '{:},' ..
|
||||
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' ..
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' ..
|
||||
\ '\<class\>:\<endclass\>,' ..
|
||||
\ '\<interface\>:\<endinterface\>,' ..
|
||||
\ '\<enum\>:\<endenum\>'
|
||||
|
||||
" Ignore syntax region commands and settings, any 'en*' would clobber
|
||||
" if-endif.
|
||||
@@ -117,7 +166,7 @@ if exists("loaded_matchit")
|
||||
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ …
|
||||
" Also ignore here-doc and dictionary keys (vimVar).
|
||||
let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name")
|
||||
\ =~? "comment\\|string\\|vimSynReg\\|vimSet\\|vimLetHereDoc\\|vimVar"'
|
||||
\ =~? "comment\\|string\\|vimSynReg\\|vimSet\\|vimLetHereDoc\\|vimVar"'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
@@ -125,3 +174,5 @@ unlet s:cpo_save
|
||||
|
||||
" removed this, because 'cpoptions' is a global option.
|
||||
" setlocal cpo+=M " makes \%( match \)
|
||||
"
|
||||
" vim: sw=2 et
|
||||
|
||||
@@ -10,7 +10,16 @@ VIMRUNTIME = ..
|
||||
# If a test succeeds a testdir/*.out file will be written.
|
||||
# If a test fails a testdir/*.fail file will be written.
|
||||
test:
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u testdir/runtest.vim
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(VIMPROG) --clean --not-a-term -u testdir/runtest.vim || \
|
||||
{ \
|
||||
retval=$$?; \
|
||||
for fail in testdir/*.fail; do \
|
||||
[ -f "$$fail" ] || continue; \
|
||||
echo "$$fail:"; \
|
||||
cat "$$fail"; \
|
||||
done; \
|
||||
exit $$retval; \
|
||||
}
|
||||
@echo "INDENT TESTS: DONE"
|
||||
|
||||
|
||||
|
||||
14
runtime/indent/m17ndb.vim
Normal file
14
runtime/indent/m17ndb.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim indent file
|
||||
" Language: m17n database
|
||||
" Maintainer: David Mandelberg <david@mandelberg.org>
|
||||
" Last Change: 2025 Feb 21
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal nosmartindent
|
||||
|
||||
let b:undo_indent = "setlocal autoindent< smartindent<"
|
||||
87
runtime/keymap/ukrainian-enhanced.vim
Normal file
87
runtime/keymap/ukrainian-enhanced.vim
Normal file
@@ -0,0 +1,87 @@
|
||||
" Vim Keymap file for ukrainian characters MS Windows enhanced variant.
|
||||
" This file is based on russian-jcukenwin.vim by Artem Chuprina <ran@ran.pp.ru>.
|
||||
" Keymap has been originally created by Ivan Korneliuk <vansha@gmail.com>.
|
||||
|
||||
" Maintainer: Vladyslav Rehan <rehanvladyslav@gmail.com>
|
||||
" Last Changed: 2025 feb 13
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
let b:keymap_name = "uk"
|
||||
|
||||
loadkeymap
|
||||
~ ’ RIGHT SINGLE QUOTATION MARK
|
||||
` ' APOSTROPHE
|
||||
F А CYRILLIC CAPITAL LETTER A
|
||||
< Б CYRILLIC CAPITAL LETTER BE
|
||||
D В CYRILLIC CAPITAL LETTER VE
|
||||
U Г CYRILLIC CAPITAL LETTER GHE
|
||||
| Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN
|
||||
L Д CYRILLIC CAPITAL LETTER DE
|
||||
T Е CYRILLIC CAPITAL LETTER IE
|
||||
: Ж CYRILLIC CAPITAL LETTER ZHE
|
||||
P З CYRILLIC CAPITAL LETTER ZE
|
||||
B И CYRILLIC CAPITAL LETTER I
|
||||
S І CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
} Ї CYRILLIC CAPITAL LETTER YI
|
||||
Q Й CYRILLIC CAPITAL LETTER SHORT I
|
||||
R К CYRILLIC CAPITAL LETTER KA
|
||||
K Л CYRILLIC CAPITAL LETTER EL
|
||||
V М CYRILLIC CAPITAL LETTER EM
|
||||
Y Н CYRILLIC CAPITAL LETTER EN
|
||||
J О CYRILLIC CAPITAL LETTER O
|
||||
G П CYRILLIC CAPITAL LETTER PE
|
||||
H Р CYRILLIC CAPITAL LETTER ER
|
||||
C С CYRILLIC CAPITAL LETTER ES
|
||||
N Т CYRILLIC CAPITAL LETTER TE
|
||||
E У CYRILLIC CAPITAL LETTER U
|
||||
A Ф CYRILLIC CAPITAL LETTER EF
|
||||
{ Х CYRILLIC CAPITAL LETTER HA
|
||||
W Ц CYRILLIC CAPITAL LETTER TSE
|
||||
X Ч CYRILLIC CAPITAL LETTER CHE
|
||||
I Ш CYRILLIC CAPITAL LETTER SHA
|
||||
O Щ CYRILLIC CAPITAL LETTER SHCHA
|
||||
M Ь CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
\" Є CYRILLIC CAPITAL LETTER UKRAINIAN IE
|
||||
> Ю CYRILLIC CAPITAL LETTER YU
|
||||
Z Я CYRILLIC CAPITAL LETTER YA
|
||||
f а CYRILLIC SMALL LETTER A
|
||||
, б CYRILLIC SMALL LETTER BE
|
||||
d в CYRILLIC SMALL LETTER VE
|
||||
u г CYRILLIC SMALL LETTER GHE
|
||||
\\ ґ CYRILLIC SMALL LETTER GHE WITH UPTURN
|
||||
l д CYRILLIC SMALL LETTER DE
|
||||
t е CYRILLIC SMALL LETTER IE
|
||||
; ж CYRILLIC SMALL LETTER ZHE
|
||||
p з CYRILLIC SMALL LETTER ZE
|
||||
b и CYRILLIC SMALL LETTER I
|
||||
s і CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
] ї CYRILLIC SMALL LETTER YI
|
||||
q й CYRILLIC SMALL LETTER SHORT I
|
||||
r к CYRILLIC SMALL LETTER KA
|
||||
k л CYRILLIC SMALL LETTER EL
|
||||
v м CYRILLIC SMALL LETTER EM
|
||||
y н CYRILLIC SMALL LETTER EN
|
||||
j о CYRILLIC SMALL LETTER O
|
||||
g п CYRILLIC SMALL LETTER PE
|
||||
h р CYRILLIC SMALL LETTER ER
|
||||
c с CYRILLIC SMALL LETTER ES
|
||||
n т CYRILLIC SMALL LETTER TE
|
||||
e у CYRILLIC SMALL LETTER U
|
||||
a ф CYRILLIC SMALL LETTER EF
|
||||
[ х CYRILLIC SMALL LETTER HA
|
||||
w ц CYRILLIC SMALL LETTER TSE
|
||||
x ч CYRILLIC SMALL LETTER CHE
|
||||
i ш CYRILLIC SMALL LETTER SHA
|
||||
o щ CYRILLIC SMALL LETTER SHCHA
|
||||
m ь CYRILLIC SMALL LETTER SOFT SIGN
|
||||
' є CYRILLIC SMALL LETTER UKRAINIAN IE
|
||||
. ю CYRILLIC SMALL LETTER YU
|
||||
z я CYRILLIC SMALL LETTER YA
|
||||
@ " QUOTATION MARK
|
||||
# № NUMERO SIGN
|
||||
$ ; SEMICOLON
|
||||
^ : COLON
|
||||
& ? QUESTION MARK
|
||||
/ . FULL STOP
|
||||
? , COMMA
|
||||
@@ -1,8 +1,6 @@
|
||||
" Menu Translations: Italian / Italiano
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Vlad Sandrini <vlad.gently@gmail.com>
|
||||
" Luciano Montanaro <mikelima@cirulla.net>
|
||||
" Last Change: 2023 Aug 22
|
||||
" Last Change: 2025 Mar 13
|
||||
" Original translations
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
@@ -10,7 +8,7 @@ if exists("did_menu_trans")
|
||||
finish
|
||||
endif
|
||||
let did_menu_trans = 1
|
||||
let s:keepcpo= &cpo
|
||||
let s:cpo_save= &cpo
|
||||
set cpo&vim
|
||||
|
||||
scriptencoding iso-8859-1
|
||||
@@ -24,7 +22,7 @@ menut &How-To\ Links Co&Me\.\.\.
|
||||
menut &Find\.\.\. &Cerca\.\.\.
|
||||
menut &Credits Cr&Editi
|
||||
menut Co&pying C&Opie
|
||||
menut &Sponsor/Register &Sponsor/Registrazione
|
||||
menut &Sponsor/Register &Sponsor/Registrazione
|
||||
menut O&rphans O&Rfani
|
||||
menut &Version &Versione
|
||||
menut &About &Intro
|
||||
@@ -41,7 +39,7 @@ menut &New<Tab>:enew &Nuovo<Tab>:enew
|
||||
menut &Close<Tab>:close &Chiudi<Tab>:close
|
||||
menut &Save<Tab>:w &Salva<Tab>:w
|
||||
menut Save\ &As\.\.\.<Tab>:sav Salva\ &Con\ nome\.\.\.<Tab>:sav
|
||||
menut Split\ &Diff\ with\.\.\. &Differenza\ con\.\.\.
|
||||
menut Split\ &Diff\ With\.\.\. &Differenza\ con\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Patc&H\ da\.\.\.
|
||||
menut &Print S&tampa
|
||||
menut Sa&ve-Exit<Tab>:wqa Sa&Lva\ ed\ esci<Tab>:wqa
|
||||
@@ -59,12 +57,12 @@ menut &Paste<Tab>"+gP &Incolla<Tab>"+gP
|
||||
menut Put\ &Before<Tab>[p &Metti\ davanti<Tab>[p
|
||||
menut Put\ &After<Tab>]p M&Etti\ dietro<Tab>]p
|
||||
menut &Delete<Tab>x Cance&Lla<Tab>x
|
||||
menut &Select\ all<Tab>ggVG Seleziona\ &Tutto<Tab>ggVG
|
||||
menut &Select\ All<Tab>ggVG Seleziona\ &Tutto<Tab>ggVG
|
||||
menut &Find\.\.\. &Cerca\.\.\.
|
||||
menut &Find\.\.\.<Tab>/ &Cerca\.\.\.<Tab>/
|
||||
menut &Find<Tab>/ &Cerca<Tab>/
|
||||
menut Find\ and\ Rep&lace\.\.\. &Sostituisci\.\.\.
|
||||
menut Find\ and\ Rep&lace\.\.\.<Tab>:%s &Sostituisci\.\.\.<Tab>:%s
|
||||
menut Find\ and\ Rep&lace\.\.\.<Tab>:s &Sostituisci\.\.\.<Tab>:s
|
||||
menut Find\ and\ Rep&lace<Tab>:%s &Sostituisci<Tab>:%s
|
||||
menut Find\ and\ Rep&lace<Tab>:s &Sostituisci<Tab>:s
|
||||
menut Settings\ &Window &Finestra\ Impostazioni
|
||||
menut Startup\ &Settings Impostazioni\ di\ &Avvio
|
||||
menut &Global\ Settings Impostazioni\ &Globali
|
||||
@@ -75,12 +73,20 @@ menut Toggle\ Pattern\ &Highlight<Tab>:set\ hls! &Evidenzia\ ricerche\ S
|
||||
menut Toggle\ &Ignoring\ Case<Tab>:set\ ic! &Ignora\ maiusc\.-minusc\.\ Sì/No<Tab>:set\ ic!
|
||||
menut Toggle\ &Showing\ Matched\ Pairs<Tab>:set\ sm! Indica\ &Corrispondenze\ Sì/No<Tab>:set\ sm!
|
||||
|
||||
menut &Context\ lines &Linee\ di\ contesto
|
||||
menut &Context\ Lines &Linee\ di\ contesto
|
||||
"menut &Context\ Lines.\ 1\ &Linee\ di\ contesto.\ 1\
|
||||
"menut &Context\ Lines.\ 2\ &Linee\ di\ contesto.\ 2\
|
||||
"menut &Context\ Lines.\ 3\ &Linee\ di\ contesto.\ 3\
|
||||
"menut &Context\ Lines.\ 4\ &Linee\ di\ contesto.\ 4\
|
||||
"menut &Context\ Lines.\ 5\ &Linee\ di\ contesto.\ 5\
|
||||
"menut &Context\ Lines.\ 7\ &Linee\ di\ contesto.\ 7\
|
||||
"menut &Context\ Lines.\ 10\ &Linee\ di\ contesto.\ 10\
|
||||
"menut &Context\ Lines.\ 100\ &Linee\ di\ contesto.\ 100\
|
||||
|
||||
menut &Virtual\ Edit &Edit\ virtuale
|
||||
menut Never Mai
|
||||
menut Block\ Selection Seleziona\ Blocco
|
||||
menut Insert\ mode Modo\ Insert
|
||||
menut Insert\ Mode Modo\ Insert
|
||||
menut Block\ and\ Insert Selezione\ Blocco\ e\ Inserimento
|
||||
menut Always Sempre
|
||||
|
||||
@@ -109,22 +115,13 @@ if has("toolbar")
|
||||
tmenu ToolBar.Cut Taglia
|
||||
tmenu ToolBar.Copy Copia
|
||||
tmenu ToolBar.Paste Incolla
|
||||
tmenu ToolBar.Find Trova...
|
||||
tmenu ToolBar.FindNext Trova seguente
|
||||
tmenu ToolBar.FindPrev Trova precedente
|
||||
tmenu ToolBar.Replace Sostituisci
|
||||
if 0 " disabled; These are in the Windows menu
|
||||
tmenu ToolBar.New Nuovo
|
||||
tmenu ToolBar.WinSplit Dividi
|
||||
tmenu ToolBar.WinMax Massimizza
|
||||
tmenu ToolBar.WinMin Minimizza
|
||||
tmenu ToolBar.WinClose Chiudi
|
||||
endif
|
||||
tmenu ToolBar.LoadSesn Carica sessione
|
||||
tmenu ToolBar.SaveSesn Salva sessione
|
||||
tmenu ToolBar.RunScript Esegui script
|
||||
tmenu ToolBar.Make Esegui make
|
||||
tmenu ToolBar.Shell Esegui shell
|
||||
tmenu ToolBar.RunCtags Esegui ctags
|
||||
tmenu ToolBar.TagJump Salta alla tag
|
||||
tmenu ToolBar.Help Aiuto
|
||||
@@ -143,24 +140,23 @@ menut Toggle\ Line\ &Numbering<Tab>:set\ nu! &Numerazione\ S
|
||||
menut Toggle\ Relati&ve\ Line\ Numbering<Tab>:set\ rnu! Numerazione\ relati&Va\ Sì/No<Tab>:set\ rnu!
|
||||
menut Toggle\ &List\ Mode<Tab>:set\ list! Modo\ &List\ Sì/No<Tab>:set\ list!
|
||||
menut Toggle\ Line\ &Wrapping<Tab>:set\ wrap! Linee\ &Continuate\ Sì/No<Tab>:set\ wrap!
|
||||
menut Toggle\ W&rapping\ at\ word<Tab>:set\ lbr! A\ capo\ alla\ &Parola\ Sì/No<Tab>:set\ lbr!
|
||||
menut Toggle\ Tab\ &expanding<Tab>:set\ et! &Espandi\ Tabulazione\ Sì/No<Tab>:set\ et!
|
||||
menut Toggle\ W&rapping\ at\ Word<Tab>:set\ lbr! A\ capo\ alla\ &Parola\ Sì/No<Tab>:set\ lbr!
|
||||
menut Toggle\ Tab\ &Expanding<Tab>:set\ et! &Espandi\ Tabulazione\ Sì/No<Tab>:set\ et!
|
||||
menut Toggle\ &Auto\ Indenting<Tab>:set\ ai! Indentazione\ &Automatica\ Sì/No<Tab>:set\ ai!
|
||||
menut Toggle\ &C-Style\ Indenting<Tab>:set\ cin! Indentazione\ stile\ &C\ Sì/No<Tab>:set\ cin!
|
||||
menut &Shiftwidth &Spazi\ rientranza
|
||||
"menut &Shiftwidth.2<Tab>:set\ sw=2\ sw?<CR> &Spazi\ rientranza.2<Tab>:set\ sw=2\ sw?<CR>
|
||||
"menut &Shiftwidth.3<Tab>:set\ sw=3\ sw?<CR> &Spazi\ rientranza.3<Tab>:set\ sw=3\ sw?<CR>
|
||||
"menut &Shiftwidth.4<Tab>:set\ sw=4\ sw?<CR> &Spazi\ rientranza.4<Tab>:set\ sw=4\ sw?<CR>
|
||||
"menut &Shiftwidth.5<Tab>:set\ sw=5\ sw?<CR> &Spazi\ rientranza.5<Tab>:set\ sw=5\ sw?<CR>
|
||||
"menut &Shiftwidth.6<Tab>:set\ sw=6\ sw?<CR> &Spazi\ rientranza.6<Tab>:set\ sw=6\ sw?<CR>
|
||||
"menut &Shiftwidth.8<Tab>:set\ sw=8\ sw?<CR> &Spazi\ rientranza.8<Tab>:set\ sw=8\ sw?<CR>
|
||||
"menut &Shiftwidth.3 &Spazi\ rientranza.3
|
||||
"menut &Shiftwidth.4 &Spazi\ rientranza.4
|
||||
"menut &Shiftwidth.5 &Spazi\ rientranza.5
|
||||
"menut &Shiftwidth.6 &Spazi\ rientranza.6
|
||||
"menut &Shiftwidth.8 &Spazi\ rientranza.8
|
||||
menut Soft\ &Tabstop &Tabulazione\ software
|
||||
"menut Soft\ &Tabstop.2<Tab>:set\ sts=2\ sts? &Tabulazione\ software.2<Tab>:set\ sts=2\ sts?
|
||||
"menut Soft\ &Tabstop.3<Tab>:set\ sts=3\ sts? &Tabulazione\ software.3<Tab>:set\ sts=3\ sts?
|
||||
"menut Soft\ &Tabstop.4<Tab>:set\ sts=4\ sts? &Tabulazione\ software.4<Tab>:set\ sts=4\ sts?
|
||||
"menut Soft\ &Tabstop.5<Tab>:set\ sts=5\ sts? &Tabulazione\ software.5<Tab>:set\ sts=5\ sts?
|
||||
"menut Soft\ &Tabstop.6<Tab>:set\ sts=6\ sts? &Tabulazione\ software.6<Tab>:set\ sts=6\ sts?
|
||||
"menut Soft\ &Tabstop.8<Tab>:set\ sts=8\ sts? &Tabulazione\ software.8<Tab>:set\ sts=8\ sts?
|
||||
"menut Soft\ &Tabstop.2 &Tabulazione\ software.2
|
||||
"menut Soft\ &Tabstop.3 &Tabulazione\ software.3
|
||||
"menut Soft\ &Tabstop.4 &Tabulazione\ software.4
|
||||
"menut Soft\ &Tabstop.5 &Tabulazione\ software.5
|
||||
"menut Soft\ &Tabstop.6 &Tabulazione\ software.6
|
||||
"menut Soft\ &Tabstop.8 &Tabulazione\ software.8
|
||||
menut Te&xt\ Width\.\.\. Lunghe&Zza\ riga\.\.\.
|
||||
menut &File\ Format\.\.\. Formato\ &File\.\.\.
|
||||
|
||||
@@ -173,37 +169,61 @@ menut C&olor\ Scheme Schema\ c&Olori
|
||||
|
||||
menut blue blù
|
||||
menut darkblue blù\ scuro
|
||||
menut default predefinito
|
||||
menut delek delek
|
||||
menut desert deserto
|
||||
menut elflord signore\ degli\ elfi
|
||||
menut evening sera
|
||||
menut habamax habamax
|
||||
menut industry industria
|
||||
menut koehler koehler
|
||||
menut lunaperche luna\ perché
|
||||
menut morning mattino
|
||||
menut murphy murphy
|
||||
menut pablo pablo
|
||||
menut peachpuff pesca
|
||||
menut quiet quieto
|
||||
menut retrobox retrobox
|
||||
menut ron ron
|
||||
menut shine brillante
|
||||
menut sorbet sorbetto
|
||||
menut slate ardesia
|
||||
menut torte torta
|
||||
menut unokai unokai
|
||||
menut wildcharm fascino\ selvaggio
|
||||
menut zaibatsu zaibatsu
|
||||
menut zellner zellner
|
||||
menut BLUE BLÙ
|
||||
menut DARKBLUE BLÙ\ SCURO
|
||||
menut DEFAULT DEFAULT
|
||||
menut DELEK DELEK
|
||||
menut DESERT DESERTO
|
||||
menut ELFLORD SIGNORE\ DEGLI\ ELFI
|
||||
menut EVENING SERA
|
||||
menut HABAMAX HABAMAX
|
||||
menut INDUSTRY INDUSTRIA
|
||||
menut KOEHLER KOEHLER
|
||||
menut LUNAPERCHE LUNA\ PERCHÉ
|
||||
menut MORNING MATTINO
|
||||
menut MURPHY MURPHY
|
||||
menut PABLO PABLO
|
||||
menut PEACHPUFF PESCA
|
||||
menut QUIET QUIETO
|
||||
menut RETROBOX RETROBOX
|
||||
menut RON RON
|
||||
menut SHINE BRILLANTE
|
||||
menut SORBET SORBETTO
|
||||
menut SLATE ARDESIA
|
||||
menut TORTE TORTA
|
||||
menut UNOKAI UNOKAI
|
||||
menut WILDCHARM FASCINO\ SELVAGGIO
|
||||
menut ZAIBATSU ZAIBATSU
|
||||
menut ZELLNER ZELLNER
|
||||
|
||||
menut Show\ &Keymaps\ in\ Menu Mostra\ Ma&ppe\ tastiera\ in\ Menù
|
||||
menut &Keymap Ma&ppa\ tastiera
|
||||
|
||||
menut None nessuna
|
||||
menut None Nessuna
|
||||
menut accents accenti
|
||||
menut arabic arabo
|
||||
menut armenian-eastern armeno-orientale
|
||||
@@ -217,10 +237,11 @@ menut czech ceco
|
||||
menut dvorak tastiera-dvorak
|
||||
menut esperanto esperanto
|
||||
menut french-azerty francese-azerty
|
||||
menut georgian-qwerty georgiano-qwerty
|
||||
menut german-qwertz tedesco-qwertz
|
||||
menut greek greco
|
||||
menut hebrew ebraico
|
||||
menut hebrewp ebraicop
|
||||
menut hebrewp ebraico-fonetico
|
||||
menut kana kana
|
||||
menut kazakh-jcuken kazako-jcuken
|
||||
menut korean coreano
|
||||
@@ -251,8 +272,9 @@ menut thaana thaana
|
||||
menut thaana-phonetic thaana-fonetico
|
||||
menut turkish-f turco-f
|
||||
menut turkish-q turco-q
|
||||
menut ukrainian-dvorak ukraino-dvorak
|
||||
menut ukrainian-jcuken ukraino-jcuken
|
||||
menut ukrainian-dvorak ucraino-dvorak
|
||||
menut ukrainian-jcuken ucraino-jcuken
|
||||
menut ukrainian-enhanced ucraino-migliorato
|
||||
menut vietnamese-telex vietnamita-telex
|
||||
menut vietnamese-viqr vietnamita-viqr
|
||||
menut vietnamese-vni vietnamita-vni
|
||||
@@ -269,10 +291,11 @@ menut CZECH CECO
|
||||
menut DVORAK TASTIERA-DVORAK
|
||||
menut ESPERANTO ESPERANTO
|
||||
menut FRENCH-AZERTY FRANCESE-AZERTY
|
||||
menut GEORGIAN-QWERTY GEORGIANO-QWERTY
|
||||
menut GERMAN-QWERTZ TEDESCO-QWERTZ
|
||||
menut GREEK GRECO
|
||||
menut HEBREW EBRAICO
|
||||
menut HEBREWP EBRAICOP
|
||||
menut HEBREWP EBRAICO-FONETICO
|
||||
menut KANA KANA
|
||||
menut KAZAKH-JCUKEN KAZAKO-JCUKEN
|
||||
menut KOREAN COREANO
|
||||
@@ -303,8 +326,9 @@ menut THAANA THAANA
|
||||
menut THAANA-PHONETIC THAANA-FONETICO
|
||||
menut TURKISH-F TURCO-F
|
||||
menut TURKISH-Q TURCO-Q
|
||||
menut UKRAINIAN-DVORAK UKRAINO-DVORAK
|
||||
menut UKRAINIAN-JCUKEN UKRAINO-JCUKEN
|
||||
menut UKRAINIAN-DVORAK UCRAINO-DVORAK
|
||||
menut UKRAINIAN-JCUKEN UCRAINO-JCUKEN
|
||||
menut UKRAINIAN-ENHANCED UCRAINO-MIGLIORATO
|
||||
menut VIETNAMESE-TELEX VIETNAMITA-TELEX
|
||||
menut VIETNAMESE-VIQR VIETNAMITA-VIQR
|
||||
menut VIETNAMESE-VNI VIETNAMITA-VNI
|
||||
@@ -314,37 +338,36 @@ menut Select\ Fo&nt\.\.\. Scegli\ &Font\.\.\.
|
||||
" Menù strumenti programmazione
|
||||
menut &Tools &Strumenti
|
||||
|
||||
menut &Jump\ to\ this\ tag<Tab>g^] &Vai\ a\ questa\ tag<Tab>g^]
|
||||
menut Jump\ &back<Tab>^T Torna\ &Indietro<Tab>^T
|
||||
menut &Jump\ to\ This\ Tag<Tab>g^] &Vai\ a\ questa\ tag<Tab>g^]
|
||||
menut Jump\ &Back<Tab>^T Torna\ &Indietro<Tab>^T
|
||||
menut Build\ &Tags\ File Costruisci\ file\ &Tag\
|
||||
" Menù ortografia / Spelling
|
||||
menut &Spelling &Ortografia
|
||||
|
||||
menut &Spell\ Check\ On Attiva\ &Controllo\ ortografico
|
||||
menut Spell\ Check\ &Off &Disattiva\ controllo\ ortografico
|
||||
menut To\ &Next\ error<Tab>]s Errore\ &Seguente<tab>]s
|
||||
menut To\ &Previous\ error<Tab>[s Errore\ &Precedente<tab>[s
|
||||
menut To\ &Next\ Error<Tab>]s Errore\ &Seguente<Tab>]s
|
||||
menut To\ &Previous\ Error<Tab>[s Errore\ &Precedente<Tab>[s
|
||||
menut Suggest\ &Corrections<Tab>z= &Suggerimenti<Tab>z=
|
||||
menut &Repeat\ correction<Tab>:spellrepall &Ripeti\ correzione<Tab>:spellrepall
|
||||
menut Set\ language\ to Imposta\ lingua\ a
|
||||
menut Set\ language\ to\ "en" Imposta\ lingua\ a\ "en"
|
||||
menut Set\ language\ to\ "en_au" Imposta\ lingua\ a\ "en_au"
|
||||
menut Set\ language\ to\ "en_ca" Imposta\ lingua\ a\ "en_ca"
|
||||
menut Set\ language\ to\ "en_gb" Imposta\ lingua\ a\ "en_gb"
|
||||
menut Set\ language\ to\ "en_nz" Imposta\ lingua\ a\ "en_nz"
|
||||
menut Set\ language\ to\ "en_us" Imposta\ lingua\ a\ "en_us"
|
||||
menut &Repeat\ Correction<Tab>:spellrepall &Ripeti\ correzione<Tab>:spellrepall
|
||||
menut Set\ Language\ to\ "en" Imposta\ lingua\ a\ "en"
|
||||
menut Set\ Language\ to\ "en_au" Imposta\ lingua\ a\ "en_au"
|
||||
menut Set\ Language\ to\ "en_ca" Imposta\ lingua\ a\ "en_ca"
|
||||
menut Set\ Language\ to\ "en_gb" Imposta\ lingua\ a\ "en_gb"
|
||||
menut Set\ Language\ to\ "en_nz" Imposta\ lingua\ a\ "en_nz"
|
||||
menut Set\ Language\ to\ "en_us" Imposta\ lingua\ a\ "en_us"
|
||||
menut &Find\ More\ Languages &Trova\ altre\ lingue
|
||||
|
||||
" Menù piegature / Fold
|
||||
menut &Folding &Piegature
|
||||
" apri e chiudi piegature
|
||||
menut &Enable/Disable\ folds<Tab>zi Pi&egature\ Sì/No<Tab>zi
|
||||
menut &Enable/Disable\ Folds<Tab>zi Pi&egature\ Sì/No<Tab>zi
|
||||
menut &View\ Cursor\ Line<Tab>zv &Vedi\ linea\ col\ Cursore<Tab>zv
|
||||
menut Vie&w\ Cursor\ Line\ only<Tab>zMzx Vedi\ &Solo\ linea\ col\ Cursore<Tab>zMzx
|
||||
menut C&lose\ More\ folds<Tab>zm C&Hiudi\ più\ piegature<Tab>zm
|
||||
menut &Close\ All\ folds<Tab>zM &Chiudi\ tutte\ le\ piegature<Tab>zM
|
||||
menut O&pen\ More\ folds<Tab>zr A&Pri\ più\ piegature<Tab>zr
|
||||
menut &Open\ All\ folds<Tab>zR &Apri\ tutte\ le\ piegature<Tab>zR
|
||||
menut Vie&w\ Cursor\ Line\ Only<Tab>zMzx Vedi\ &Solo\ linea\ col\ Cursore<Tab>zMzx
|
||||
menut C&lose\ More\ Folds<Tab>zm C&Hiudi\ più\ piegature<Tab>zm
|
||||
menut &Close\ All\ Folds<Tab>zM &Chiudi\ tutte\ le\ piegature<Tab>zM
|
||||
menut O&pen\ More\ Folds<Tab>zr A&Pri\ più\ piegature<Tab>zr
|
||||
menut &Open\ All\ Folds<Tab>zR &Apri\ tutte\ le\ piegature<Tab>zR
|
||||
" metodo piegatura
|
||||
menut Fold\ Met&hod Meto&Do\ piegatura
|
||||
menut M&anual &Manuale
|
||||
@@ -359,7 +382,15 @@ menut Create\ &Fold<Tab>zf Crea\ &Piegatura<Tab>zf
|
||||
menut &Delete\ Fold<Tab>zd &Togli\ piegatura<Tab>zd
|
||||
menut Delete\ &All\ Folds<Tab>zD Togli\ &Tutte\ le\ piegature<Tab>zD
|
||||
" movimenti all'interno delle piegature
|
||||
menut Fold\ col&umn\ width Larghezza\ piegat&Ure\ in\ colonne
|
||||
menut Fold\ Col&umn\ Width Larghezza\ piegat&Ure\ in\ colonne
|
||||
"menut Fold\ Col&umn\ Width.\ &0\ Larghezza\ piegat&Ure\ in\ colonne.\ &0\
|
||||
"menut Fold\ Col&umn\ Width.\ &2\ Larghezza\ piegat&Ure\ in\ colonne.\ &2\
|
||||
"menut Fold\ Col&umn\ Width.\ &3\ Larghezza\ piegat&Ure\ in\ colonne.\ &3\
|
||||
"menut Fold\ Col&umn\ Width.\ &4\ Larghezza\ piegat&Ure\ in\ colonne.\ &4\
|
||||
"menut Fold\ Col&umn\ Width.\ &5\ Larghezza\ piegat&Ure\ in\ colonne.\ &5\
|
||||
"menut Fold\ Col&umn\ Width.\ &6\ Larghezza\ piegat&Ure\ in\ colonne.\ &6\
|
||||
"menut Fold\ Col&umn\ Width.\ &7\ Larghezza\ piegat&Ure\ in\ colonne.\ &7\
|
||||
"menut Fold\ Col&umn\ Width.\ &8\ Larghezza\ piegat&Ure\ in\ colonne.\ &8\
|
||||
|
||||
menut &Diff &Differenza
|
||||
"
|
||||
@@ -383,9 +414,9 @@ menut &Open<Tab>:copen &Apri<Tab>:copen
|
||||
menut &Close<Tab>:cclose &Chiudi<Tab>:cclose
|
||||
|
||||
menut &Convert\ to\ HEX<Tab>:%!xxd &Converti\ a\ esadecimale<Tab>:%!xxd
|
||||
menut Conve&rt\ back<Tab>:%!xxd\ -r Conve&rti\ da\ esadecimale<Tab>:%!xxd\ -r
|
||||
menut Conve&rt\ Back<Tab>:%!xxd\ -r Conve&rti\ da\ esadecimale<Tab>:%!xxd\ -r
|
||||
|
||||
menut Se&T\ Compiler Impo&Sta\ Compilatore
|
||||
menut Se&t\ Compiler Impo&Sta\ Compilatore
|
||||
menut Show\ Compiler\ Se&ttings\ in\ Menu Mostra\ Impos&Tazioni\ Compilatore\ nel\ Menù
|
||||
|
||||
" Buffers / Buffer
|
||||
@@ -396,20 +427,20 @@ menut &Delete &Elimina
|
||||
menut &Alternate &Alternato
|
||||
menut &Next &Successivo
|
||||
menut &Previous &Precedente
|
||||
menut [No\ File] [Nessun\ File]
|
||||
"menut [No\ File] [Nessun\ File]
|
||||
|
||||
" Syntax / Sintassi
|
||||
menut &Syntax &Sintassi
|
||||
|
||||
menut &Show\ File\ Types\ in\ menu Mo&Stra\ tipi\ di\ file\ nel\ menù
|
||||
menut Set\ '&syntax'\ only &S\ Attiva\ solo\ \ 'syntax'
|
||||
menut Set\ '&filetype'\ too &F\ Attiva\ anche\ 'filetype'
|
||||
menut &Show\ File\ Types\ in\ Menu Mo&Stra\ tipi\ di\ file\ nel\ menù
|
||||
menut Set\ '&syntax'\ Only &S\ Attiva\ solo\ \ 'syntax'
|
||||
menut Set\ '&filetype'\ Too &F\ Attiva\ anche\ 'filetype'
|
||||
menut &Off &Disattiva
|
||||
menut &Manual &Manuale
|
||||
menut A&utomatic A&Utomatico
|
||||
menut on/off\ for\ &This\ file Attiva\ Sì/No\ su\ ques&To\ file
|
||||
menut Co&lor\ test Test\ &Colori
|
||||
menut &Highlight\ test Test\ &Evidenziamento
|
||||
menut On/Off\ for\ &This\ File Attiva\ Sì/No\ su\ ques&To\ file
|
||||
menut Co&lor\ Test Test\ &Colori
|
||||
menut &Highlight\ Test Test\ &Evidenziamento
|
||||
menut &Convert\ to\ HTML Converti\ ad\ &HTML
|
||||
|
||||
let g:menutrans_set_lang_to = "Cambia linguaggio a"
|
||||
@@ -432,15 +463,15 @@ menut Move\ &To &Muovi\ verso
|
||||
|
||||
menut &Top<Tab>^WK &Cima<Tab>^WK
|
||||
menut &Bottom<Tab>^WJ &Fondo<Tab>^WJ
|
||||
menut &Left\ side<Tab>^WH Lato\ &Sinistro<Tab>^WH
|
||||
menut &Right\ side<Tab>^WL Lato\ &Destro<Tab>^WL
|
||||
menut &Left\ Side<Tab>^WH Lato\ &Sinistro<Tab>^WH
|
||||
menut &Right\ Side<Tab>^WL Lato\ &Destro<Tab>^WL
|
||||
menut Rotate\ &Up<Tab>^WR Ruota\ verso\ l'&Alto<Tab>^WR
|
||||
menut Rotate\ &Down<Tab>^Wr Ruota\ verso\ il\ &Basso<Tab>^Wr
|
||||
menut &Equal\ Size<Tab>^W= &Uguale\ ampiezza<Tab>^W=
|
||||
menut &Max\ Height<Tab>^W_ A&Ltezza\ massima<Tab>^W_
|
||||
menut M&in\ Height<Tab>^W1_ Al&Tezza\ minima<Tab>^W1_
|
||||
menut Max\ &Width<Tab>^W\| Lar&Ghezza\ massima<Tab>^W\|
|
||||
menut Min\ Widt&h<Tab>^W1\| Larg&hhezza\ minima<Tab>^W1\|
|
||||
menut Min\ Widt&h<Tab>^W1\| Larg&Hezza\ minima<Tab>^W1\|
|
||||
|
||||
" The popup menu
|
||||
menut &Undo &Annulla
|
||||
@@ -457,40 +488,40 @@ menut Select\ &Sentence Seleziona\ &Frase
|
||||
menut Select\ Pa&ragraph Seleziona\ Para&Grafo
|
||||
|
||||
" The GUI Toolbar / Barra Strumenti
|
||||
menut Open Apri
|
||||
menut Save Salva
|
||||
menut SaveAll Salva\ Tutto
|
||||
menut Print Stampa
|
||||
menut Undo Annulla
|
||||
menut Redo Ripristina
|
||||
menut Cut Taglia
|
||||
menut Copy Copia
|
||||
menut Paste Incolla
|
||||
"menut Open Apri
|
||||
"menut Save Salva
|
||||
"menut SaveAll Salva\ Tutto
|
||||
"menut Print Stampa
|
||||
"menut Undo Annulla
|
||||
"menut Redo Ripristina
|
||||
"menut Cut Taglia
|
||||
"menut Copy Copia
|
||||
"menut Paste Incolla
|
||||
" -sep3-
|
||||
menut Find Cerca
|
||||
menut FindNext Cerca\ Successivo
|
||||
menut FindPrev Cerca\ Precedente
|
||||
menut Replace Sostituisci
|
||||
"menut Find Cerca
|
||||
"menut FindNext Cerca\ Successivo
|
||||
"menut FindPrev Cerca\ Precedente
|
||||
"menut Replace Sostituisci
|
||||
" -sep4-
|
||||
menut New Nuova\ finestra
|
||||
menut WinSplit Dividi\ finestra
|
||||
menut WinMax Massima\ ampiezza
|
||||
menut WinMin Minima\ ampiezza
|
||||
menut WinVSplit Dividi\ verticalmente
|
||||
menut WinMaxWidth Massima\ larghezza
|
||||
menut WinMinWidth Minima\ larghezza
|
||||
menut WinClose Chiudi\ finestra
|
||||
menut LoadSesn Carica\ Sessione
|
||||
menut SaveSesn Salva\ Sessione
|
||||
menut RunScript Esegui\ Script
|
||||
menut Make Make
|
||||
menut Shell Shell
|
||||
menut RunCtags Esegui\ Ctags
|
||||
menut TagJump Vai\ a\ Tag
|
||||
menut Help Aiuto
|
||||
menut FindHelp Cerca\ in\ Aiuto
|
||||
"menut New Nuova\ finestra
|
||||
"menut WinSplit Dividi\ finestra
|
||||
"menut WinMax Massima\ ampiezza
|
||||
"menut WinMin Minima\ ampiezza
|
||||
"menut WinVSplit Dividi\ verticalmente
|
||||
"menut WinMaxWidth Massima\ larghezza
|
||||
"menut WinMinWidth Minima\ larghezza
|
||||
"menut WinClose Chiudi\ finestra
|
||||
"menut LoadSesn Carica\ Sessione
|
||||
"menut SaveSesn Salva\ Sessione
|
||||
"menut RunScript Esegui\ Script
|
||||
"menut Make Make
|
||||
"menut Shell Shell
|
||||
"menut RunCtags Esegui\ Ctags
|
||||
"menut TagJump Vai\ a\ Tag
|
||||
"menut Help Aiuto
|
||||
"menut FindHelp Cerca\ in\ Aiuto
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: set sw=2 :
|
||||
|
||||
@@ -2,7 +2,7 @@ vim9script
|
||||
|
||||
# Script to define the syntax menu in synmenu.vim
|
||||
# Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
# Last Change: 2023 Aug 10
|
||||
# Last Change: 2025 Mar 09
|
||||
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
# This is used by "make menu" in the src directory.
|
||||
@@ -605,6 +605,7 @@ SynMenu T.TealInfo:tli
|
||||
SynMenu T.Telix\ Salt:tsalt
|
||||
SynMenu T.Termcap/Printcap:ptcap
|
||||
SynMenu T.Terminfo:terminfo
|
||||
SynMenu T.Tera:tera
|
||||
SynMenu T.Tera\ Term:teraterm
|
||||
SynMenu T.TeX.TeX/LaTeX:tex
|
||||
SynMenu T.TeX.plain\ TeX:plaintex
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 Dec 07
|
||||
" Last Change: 2025 Mar 07
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
@@ -848,6 +848,8 @@ endif
|
||||
if has("insert_expand")
|
||||
call <SID>AddOption("complete", gettext("specifies how Insert mode completion works for CTRL-N and CTRL-P"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>OptionL("cfc")
|
||||
call <SID>AddOption("completefuzzycollect", gettext("use fuzzy collection for specific completion modes"))
|
||||
call <SID>OptionL("cpt")
|
||||
call <SID>AddOption("completeopt", gettext("whether to use a popup menu for Insert mode completion"))
|
||||
call <SID>OptionL("cot")
|
||||
@@ -1343,6 +1345,8 @@ call <SID>AddOption("virtualedit", gettext("when to use virtual editing: \"block
|
||||
call <SID>OptionG("ve", &ve)
|
||||
call <SID>AddOption("eventignore", gettext("list of autocommand events which are to be ignored"))
|
||||
call <SID>OptionG("ei", &ei)
|
||||
call <SID>AddOption("eventignorewin", gettext("list of autocommand events which are to be ignored in a window"))
|
||||
call <SID>OptionG("eiw", &eiw)
|
||||
call <SID>AddOption("loadplugins", gettext("load plugin scripts when starting up"))
|
||||
call <SID>BinOptionG("lpl", &lpl)
|
||||
call <SID>AddOption("exrc", gettext("enable reading .vimrc/.exrc/.gvimrc in the current directory"))
|
||||
|
||||
1027
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
1027
runtime/pack/dist/opt/netrw/autoload/netrw.vim
vendored
File diff suppressed because it is too large
Load Diff
167
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim
vendored
Normal file
167
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim
vendored
Normal file
@@ -0,0 +1,167 @@
|
||||
" FUNCTIONS IN THIS FILE ARE MEANT TO BE USED BY NETRW.VIM AND NETRW.VIM ONLY.
|
||||
" THESE FUNCTIONS DON'T COMMIT TO ANY BACKWARDS COMPATIBILITY. SO CHANGES AND
|
||||
" BREAKAGES IF USED OUTSIDE OF NETRW.VIM ARE EXPECTED.
|
||||
|
||||
let s:slash = !exists('+shellslash') || &shellslash ? '/' : '\'
|
||||
|
||||
" netrw#fs#PathJoin: Appends a new part to a path taking different systems into consideration {{{
|
||||
|
||||
function! netrw#fs#PathJoin(...)
|
||||
let path = ""
|
||||
|
||||
for arg in a:000
|
||||
if empty(path)
|
||||
let path = arg
|
||||
else
|
||||
let path .= s:slash . arg
|
||||
endif
|
||||
endfor
|
||||
|
||||
return path
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#fs#ComposePath: Appends a new part to a path taking different systems into consideration {{{
|
||||
|
||||
function! netrw#fs#ComposePath(base, subdir)
|
||||
if has('amiga')
|
||||
let ec = a:base[s:Strlen(a:base)-1]
|
||||
if ec != '/' && ec != ':'
|
||||
let ret = a:base . '/' . a:subdir
|
||||
else
|
||||
let ret = a:base.a:subdir
|
||||
endif
|
||||
|
||||
" COMBAK: test on windows with changing to root directory: :e C:/
|
||||
elseif a:subdir =~ '^\a:[/\\]\([^/\\]\|$\)' && has('win32')
|
||||
let ret = a:subdir
|
||||
|
||||
elseif a:base =~ '^\a:[/\\]\([^/\\]\|$\)' && has('win32')
|
||||
if a:base =~ '[/\\]$'
|
||||
let ret = a:base . a:subdir
|
||||
else
|
||||
let ret = a:base . '/' . a:subdir
|
||||
endif
|
||||
|
||||
elseif a:base =~ '^\a\{3,}://'
|
||||
let urlbase = substitute(a:base, '^\(\a\+://.\{-}/\)\(.*\)$', '\1', '')
|
||||
let curpath = substitute(a:base, '^\(\a\+://.\{-}/\)\(.*\)$', '\2', '')
|
||||
if a:subdir == '../'
|
||||
if curpath =~ '[^/]/[^/]\+/$'
|
||||
let curpath = substitute(curpath, '[^/]\+/$', '', '')
|
||||
else
|
||||
let curpath = ''
|
||||
endif
|
||||
let ret = urlbase.curpath
|
||||
else
|
||||
let ret = urlbase.curpath.a:subdir
|
||||
endif
|
||||
|
||||
else
|
||||
let ret = substitute(a:base . '/' .a:subdir, '//', '/', 'g')
|
||||
if a:base =~ '^//'
|
||||
" keeping initial '//' for the benefit of network share listing support
|
||||
let ret = '/' . ret
|
||||
endif
|
||||
let ret = simplify(ret)
|
||||
endif
|
||||
|
||||
return ret
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#fs#AbsPath: returns the full path to a directory and/or file {{{
|
||||
|
||||
function! netrw#fs#AbsPath(filename)
|
||||
let filename = a:filename
|
||||
|
||||
if filename !~ '^/'
|
||||
let filename = resolve(getcwd() . '/' . filename)
|
||||
endif
|
||||
|
||||
if filename != "/" && filename =~ '/$'
|
||||
let filename = substitute(filename, '/$', '', '')
|
||||
endif
|
||||
|
||||
return filename
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#fs#Cwd: get the current directory. {{{
|
||||
" Change backslashes to forward slashes, if any.
|
||||
" If doesc is true, escape certain troublesome characters
|
||||
|
||||
function! netrw#fs#Cwd(doesc)
|
||||
let curdir = substitute(getcwd(), '\\', '/', 'ge')
|
||||
|
||||
if curdir !~ '[\/]$'
|
||||
let curdir .= '/'
|
||||
endif
|
||||
|
||||
if a:doesc
|
||||
let curdir = fnameescape(curdir)
|
||||
endif
|
||||
|
||||
return curdir
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#fs#Glob: does glob() if local, remote listing otherwise {{{
|
||||
" direntry: this is the name of the directory. Will be fnameescape'd to prevent wildcard handling by glob()
|
||||
" expr : this is the expression to follow the directory. Will use netrw#fs#ComposePath()
|
||||
" pare =1: remove the current directory from the resulting glob() filelist
|
||||
" =0: leave the current directory in the resulting glob() filelist
|
||||
|
||||
function! netrw#fs#Glob(direntry, expr, pare)
|
||||
if netrw#CheckIfRemote()
|
||||
keepalt 1sp
|
||||
keepalt enew
|
||||
let keep_liststyle = w:netrw_liststyle
|
||||
let w:netrw_liststyle = s:THINLIST
|
||||
if s:NetrwRemoteListing() == 0
|
||||
keepj keepalt %s@/@@
|
||||
let filelist = getline(1,$)
|
||||
q!
|
||||
else
|
||||
" remote listing error -- leave treedict unchanged
|
||||
let filelist = w:netrw_treedict[a:direntry]
|
||||
endif
|
||||
let w:netrw_liststyle = keep_liststyle
|
||||
else
|
||||
let path= netrw#fs#ComposePath(fnameescape(a:direntry), a:expr)
|
||||
if has("win32")
|
||||
" escape [ so it is not detected as wildcard character, see :h wildcard
|
||||
let path = substitute(path, '[', '[[]', 'g')
|
||||
endif
|
||||
let filelist = glob(path, 0, 1, 1)
|
||||
if a:pare
|
||||
let filelist = map(filelist,'substitute(v:val, "^.*/", "", "")')
|
||||
endif
|
||||
endif
|
||||
|
||||
return filelist
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#fs#WinPath: tries to insure that the path is windows-acceptable, whether cygwin is used or not {{{
|
||||
|
||||
function! netrw#fs#WinPath(path)
|
||||
if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && has("win32")
|
||||
" remove cygdrive prefix, if present
|
||||
let path = substitute(a:path, g:netrw_cygdrive . '/\(.\)', '\1:', '')
|
||||
" remove trailing slash (Win95)
|
||||
let path = substitute(path, '\(\\\|/\)$', '', 'g')
|
||||
" remove escaped spaces
|
||||
let path = substitute(path, '\ ', ' ', 'g')
|
||||
" convert slashes to backslashes
|
||||
let path = substitute(path, '/', '\', 'g')
|
||||
else
|
||||
let path = a:path
|
||||
endif
|
||||
|
||||
return path
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
|
||||
" vim:ts=8 sts=4 sw=4 et fdm=marker
|
||||
@@ -1,5 +1,5 @@
|
||||
" FUNCTIONS IN THIS FILES ARE MENT TO BE USE BY NETRW.VIM AND NETRW.VIM ONLY.
|
||||
" THIS FUNCTIONS DON'T COMMIT TO ANY BACKWARDS COMPATABILITY. SO CHANGES AND
|
||||
" FUNCTIONS IN THIS FILE ARE MEANT TO BE USED BY NETRW.VIM AND NETRW.VIM ONLY.
|
||||
" THESE FUNCTIONS DON'T COMMIT TO ANY BACKWARDS COMPATIBILITY. SO CHANGES AND
|
||||
" BREAKAGES IF USED OUTSIDE OF NETRW.VIM ARE EXPECTED.
|
||||
|
||||
let s:deprecation_msgs = []
|
||||
@@ -7,7 +7,7 @@ function! netrw#own#Deprecate(name, version, alternatives)
|
||||
" If running on neovim use vim.deprecate
|
||||
if has('nvim')
|
||||
let s:alternative = a:alternatives->get('nvim', v:null)
|
||||
call luaeval('vim.deprecate(unpack(_A)) and nil', [a:name, s:alternative, a:version, "netrw", v:false])
|
||||
call v:lua.vim.deprecate(a:name, s:alternative, a:version, "netrw", v:false)
|
||||
return
|
||||
endif
|
||||
|
||||
@@ -27,27 +27,4 @@ function! netrw#own#Deprecate(name, version, alternatives)
|
||||
call add(s:deprecation_msgs, a:name)
|
||||
endfunction
|
||||
|
||||
let s:slash = &shellslash ? '/' : '\'
|
||||
function! netrw#own#JoinPath(...)
|
||||
let path = ""
|
||||
|
||||
for arg in a:000
|
||||
if empty(path)
|
||||
let path = arg
|
||||
else
|
||||
let path .= s:slash . arg
|
||||
endif
|
||||
endfor
|
||||
|
||||
return path
|
||||
endfunction
|
||||
|
||||
function! netrw#own#Open(file) abort
|
||||
if has('nvim')
|
||||
call luaeval('vim.ui.open(_A[1]) and nil', [a:file])
|
||||
else
|
||||
call dist#vim9#Open(a:file)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" vim:ts=8 sts=4 sw=4 et fdm=marker
|
||||
48
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim
vendored
Normal file
48
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
" FUNCTIONS IN THIS FILE ARE MEANT TO BE USED BY NETRW.VIM AND NETRW.VIM ONLY.
|
||||
" THESE FUNCTIONS DON'T COMMIT TO ANY BACKWARDS COMPATIBILITY. SO CHANGES AND
|
||||
" BREAKAGES IF USED OUTSIDE OF NETRW.VIM ARE EXPECTED.
|
||||
|
||||
" netrw#os#Execute: executes a string using "!" {{{
|
||||
|
||||
function! netrw#os#Execute(cmd)
|
||||
if has("win32") && exepath(&shell) !~? '\v[\/]?(cmd|pwsh|powershell)(\.exe)?$' && !g:netrw_cygwin
|
||||
let savedShell=[&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash]
|
||||
set shell& shellcmdflag& shellxquote& shellxescape&
|
||||
set shellquote& shellpipe& shellredir& shellslash&
|
||||
try
|
||||
execute a:cmd
|
||||
finally
|
||||
let [&shell,&shellcmdflag,&shellxquote,&shellxescape,&shellquote,&shellpipe,&shellredir,&shellslash] = savedShell
|
||||
endtry
|
||||
else
|
||||
execute a:cmd
|
||||
endif
|
||||
|
||||
if v:shell_error
|
||||
call netrw#ErrorMsg(netrw#LogLevel('ERROR'), "shell signalled an error", 106)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#os#Escape: shellescape(), or special windows handling {{{
|
||||
|
||||
function! netrw#os#Escape(string, ...)
|
||||
return has('win32') && empty($SHELL) && &shellslash
|
||||
\ ? printf('"%s"', substitute(a:string, '"', '""', 'g'))
|
||||
\ : shellescape(a:string, a:0 > 0 ? a:1 : 0)
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
" netrw#os#Open: open file with os viewer (eg. xdg-open) {{{
|
||||
|
||||
function! netrw#os#Open(file) abort
|
||||
if has('nvim')
|
||||
call luaeval('vim.ui.open(_A[1]) and nil', [a:file])
|
||||
else
|
||||
call dist#vim9#Open(a:file)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
|
||||
" vim:ts=8 sts=4 sw=4 et fdm=marker
|
||||
@@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwSettings")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_netrwSettings = "v176"
|
||||
let g:loaded_netrwSettings = "v179"
|
||||
|
||||
" NetrwSettings: {{{
|
||||
|
||||
|
||||
2
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
2
runtime/pack/dist/opt/netrw/doc/netrw.txt
vendored
@@ -1447,7 +1447,7 @@ With a "dirname", the specified directory name is used.
|
||||
The "gn" map will take the word below the cursor and use that for
|
||||
changing the top of the tree listing.
|
||||
|
||||
|
||||
*netrw-curdir*
|
||||
DELETING BOOKMARKS *netrw-mB* {{{2
|
||||
|
||||
To delete a bookmark, use >
|
||||
|
||||
@@ -15,7 +15,7 @@ if &cp || exists("g:loaded_netrwPlugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_netrwPlugin = "v176"
|
||||
let g:loaded_netrwPlugin = "v179"
|
||||
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
" nohlsearch.vim: Auto turn off hlsearch
|
||||
" Last Change: 2024-07-31
|
||||
" Last Change: 2025-03-08
|
||||
" Maintainer: Maxim Kim <habamax@gmail.com>
|
||||
"
|
||||
" turn off hlsearch after:
|
||||
@@ -11,10 +11,14 @@ if exists('g:loaded_nohlsearch')
|
||||
endif
|
||||
let g:loaded_nohlsearch = 1
|
||||
|
||||
func! s:Nohlsearch()
|
||||
if v:hlsearch
|
||||
call feedkeys("\<cmd>nohlsearch\<cr>", 'm')
|
||||
endif
|
||||
endfunc
|
||||
|
||||
augroup nohlsearch
|
||||
au!
|
||||
noremap <Plug>(nohlsearch) <cmd>nohlsearch<cr>
|
||||
noremap! <Plug>(nohlsearch) <cmd>nohlsearch<cr>
|
||||
au CursorHold * call feedkeys("\<Plug>(nohlsearch)", 'm')
|
||||
au InsertEnter * call feedkeys("\<Plug>(nohlsearch)", 'm')
|
||||
au CursorHold * call s:Nohlsearch()
|
||||
au InsertEnter * call s:Nohlsearch()
|
||||
augroup END
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for editing compressed files.
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Last Change: 2025 Feb 28
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Exit quickly when:
|
||||
@@ -20,42 +20,54 @@ augroup gzip
|
||||
" The functions are defined in autoload/gzip.vim.
|
||||
"
|
||||
" Set binary mode before reading the file.
|
||||
" Use "gzip -d", gunzip isn't always available.
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br,*.lzo setlocal bin
|
||||
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
|
||||
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
|
||||
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
|
||||
autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
|
||||
autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
|
||||
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
|
||||
autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
|
||||
autocmd BufReadPre,FileReadPre *.gz,*.bz2,*.bz3,*.Z,*.lzma,*.xz,*.lz,*.zst,*.br,*.lzo,*.lz4 setlocal bin
|
||||
|
||||
" Use "gzip -d" and similar commands, gunzip isn't always available.
|
||||
autocmd BufReadPost,FileReadPost *.br call gzip#read("brotli -d --rm")
|
||||
autocmd BufReadPost,FileReadPost *.bz2 call gzip#read("bzip2 -d")
|
||||
autocmd BufReadPost,FileReadPost *.bz3 call gzip#read("bzip3 -d")
|
||||
autocmd BufReadPost,FileReadPost *.gz call gzip#read("gzip -dn")
|
||||
autocmd BufReadPost,FileReadPost *.lz call gzip#read("lzip -d")
|
||||
autocmd BufReadPost,FileReadPost *.lz4 call gzip#read("lz4 -d -q --rm")
|
||||
autocmd BufReadPost,FileReadPost *.lzma call gzip#read("lzma -d")
|
||||
autocmd BufReadPost,FileReadPost *.lzo call gzip#read("lzop -d -U")
|
||||
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
|
||||
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
|
||||
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
|
||||
autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
|
||||
autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
|
||||
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
|
||||
autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
|
||||
autocmd BufReadPost,FileReadPost *.xz call gzip#read("xz -d")
|
||||
autocmd BufReadPost,FileReadPost *.Z call gzip#read("uncompress")
|
||||
autocmd BufReadPost,FileReadPost *.zst call gzip#read("zstd -d --rm")
|
||||
|
||||
autocmd BufWritePost,FileWritePost *.br call gzip#write("brotli --rm")
|
||||
autocmd BufWritePost,FileWritePost *.bz2 call gzip#write("bzip2")
|
||||
autocmd BufWritePost,FileWritePost *.bz3 call gzip#write("bzip3")
|
||||
autocmd BufWritePost,FileWritePost *.gz call gzip#write("gzip")
|
||||
autocmd BufWritePost,FileWritePost *.lz call gzip#write("lzip")
|
||||
autocmd BufWritePost,FileWritePost *.lz4 call gzip#write("lz4 -q --rm")
|
||||
autocmd BufWritePost,FileWritePost *.lzma call gzip#write("lzma -z")
|
||||
autocmd BufWritePost,FileWritePost *.lzo call gzip#write("lzop -U")
|
||||
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
|
||||
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
|
||||
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
|
||||
autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
|
||||
autocmd FileAppendPre *.xz call gzip#appre("xz -d")
|
||||
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
|
||||
autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
|
||||
autocmd BufWritePost,FileWritePost *.xz call gzip#write("xz -z")
|
||||
autocmd BufWritePost,FileWritePost *.Z call gzip#write("compress -f")
|
||||
autocmd BufWritePost,FileWritePost *.zst call gzip#write("zstd --rm")
|
||||
|
||||
autocmd FileAppendPre *.br call gzip#appre("brotli -d --rm")
|
||||
autocmd FileAppendPre *.bz2 call gzip#appre("bzip2 -d")
|
||||
autocmd FileAppendPre *.bz3 call gzip#appre("bzip3 -d")
|
||||
autocmd FileAppendPre *.gz call gzip#appre("gzip -dn")
|
||||
autocmd FileAppendPre *.lz call gzip#appre("lzip -d")
|
||||
autocmd FileAppendPre *.lz4 call gzip#appre("lz4 -d -q --rm")
|
||||
autocmd FileAppendPre *.lzma call gzip#appre("lzma -d")
|
||||
autocmd FileAppendPre *.lzo call gzip#appre("lzop -d -U")
|
||||
autocmd FileAppendPost *.gz call gzip#write("gzip")
|
||||
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
|
||||
autocmd FileAppendPost *.Z call gzip#write("compress -f")
|
||||
autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
|
||||
autocmd FileAppendPost *.xz call gzip#write("xz -z")
|
||||
autocmd FileAppendPost *.lz call gzip#write("lzip")
|
||||
autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
|
||||
autocmd FileAppendPre *.xz call gzip#appre("xz -d")
|
||||
autocmd FileAppendPre *.Z call gzip#appre("uncompress")
|
||||
autocmd FileAppendPre *.zst call gzip#appre("zstd -d --rm")
|
||||
|
||||
autocmd FileAppendPost *.br call gzip#write("brotli --rm")
|
||||
autocmd FileAppendPost *.bz2 call gzip#write("bzip2")
|
||||
autocmd FileAppendPost *.bz3 call gzip#write("bzip3")
|
||||
autocmd FileAppendPost *.gz call gzip#write("gzip")
|
||||
autocmd FileAppendPost *.lz call gzip#write("lzip")
|
||||
autocmd FileAppendPost *.lz4 call gzip#write("lz4 --rm")
|
||||
autocmd FileAppendPost *.lzma call gzip#write("lzma -z")
|
||||
autocmd FileAppendPost *.lzo call gzip#write("lzop -U")
|
||||
autocmd FileAppendPost *.xz call gzip#write("xz -z")
|
||||
autocmd FileAppendPost *.Z call gzip#write("compress -f")
|
||||
autocmd FileAppendPost *.zst call gzip#write("zstd --rm")
|
||||
augroup END
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 May 18
|
||||
" Last Change: 2025 Mar 14
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
" - when 'compatible' is set
|
||||
if exists("g:loaded_matchparen") || &cp
|
||||
" - Vim has no support for :defer
|
||||
if exists("g:loaded_matchparen") || &cp || exists(":defer") != 2
|
||||
finish
|
||||
endif
|
||||
let g:loaded_matchparen = 1
|
||||
@@ -21,17 +22,13 @@ if !exists("g:matchparen_disable_cursor_hl")
|
||||
let g:matchparen_disable_cursor_hl = 0
|
||||
endif
|
||||
|
||||
let s:has_matchaddpos = exists('*matchaddpos')
|
||||
|
||||
augroup matchparen
|
||||
" Replace all matchparen autocommands
|
||||
autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
|
||||
autocmd! BufWinEnter * autocmd SafeState * ++once call s:Highlight_Matching_Pair()
|
||||
autocmd! WinLeave,BufLeave * call s:Remove_Matches()
|
||||
if exists('##TextChanged')
|
||||
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
|
||||
autocmd! TextChangedP * call s:Remove_Matches()
|
||||
endif
|
||||
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
|
||||
autocmd! TextChangedP * call s:Remove_Matches()
|
||||
augroup END
|
||||
|
||||
" Skip the rest if it was already done.
|
||||
@@ -97,19 +94,25 @@ func s:Highlight_Matching_Pair()
|
||||
" Find the match. When it was just before the cursor move it there for a
|
||||
" moment.
|
||||
if before > 0
|
||||
let has_getcurpos = exists("*getcurpos")
|
||||
if has_getcurpos
|
||||
" getcurpos() is more efficient but doesn't exist before 7.4.313.
|
||||
let save_cursor = getcurpos()
|
||||
else
|
||||
let save_cursor = winsaveview()
|
||||
endif
|
||||
let save_cursor = getcurpos()
|
||||
call cursor(c_lnum, c_col - before)
|
||||
defer setpos('.', save_cursor)
|
||||
endif
|
||||
|
||||
if !has("syntax") || !exists("g:syntax_on")
|
||||
let s_skip = "0"
|
||||
else
|
||||
" do not attempt to match when the syntax item where the cursor is
|
||||
" indicates there does not exist a matching parenthesis, e.g. for shells
|
||||
" case statement: "case $var in foobar)"
|
||||
"
|
||||
" add the check behind a filetype check, so it only needs to be
|
||||
" evaluated for certain filetypes
|
||||
if ['sh']->index(&filetype) >= 0 &&
|
||||
\ synstack(".", col("."))->indexof({_, id -> synIDattr(id, "name")
|
||||
\ =~? "shSnglCase"}) >= 0
|
||||
return
|
||||
endif
|
||||
" Build an expression that detects whether the current cursor position is
|
||||
" in certain syntax types (string, comment, etc.), for use as
|
||||
" searchpairpos()'s skip argument.
|
||||
@@ -181,30 +184,12 @@ func s:Highlight_Matching_Pair()
|
||||
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
|
||||
endtry
|
||||
|
||||
if before > 0
|
||||
if has_getcurpos
|
||||
call setpos('.', save_cursor)
|
||||
else
|
||||
call winrestview(save_cursor)
|
||||
endif
|
||||
endif
|
||||
|
||||
" If a match is found setup match highlighting.
|
||||
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
|
||||
if s:has_matchaddpos
|
||||
if !g:matchparen_disable_cursor_hl
|
||||
call add(w:matchparen_ids, matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10))
|
||||
else
|
||||
call add(w:matchparen_ids, matchaddpos('MatchParen', [[m_lnum, m_col]], 10))
|
||||
endif
|
||||
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
|
||||
if !g:matchparen_disable_cursor_hl
|
||||
call add(w:matchparen_ids, matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10))
|
||||
else
|
||||
if !g:matchparen_disable_cursor_hl
|
||||
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) .
|
||||
\ 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
|
||||
else
|
||||
exe '3match MatchParen /\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
|
||||
endif
|
||||
call add(w:matchparen_ids, 3)
|
||||
call add(w:matchparen_ids, matchaddpos('MatchParen', [[m_lnum, m_col]], 10))
|
||||
endif
|
||||
let w:paren_hl_on = 1
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
" tarPlugin.vim -- a Vim plugin for browsing tarfiles
|
||||
"
|
||||
" Original was copyright (c) 2002, Michael C. Toren <mct@toren.net>
|
||||
" Modified by Charles E. Campbell
|
||||
" Distributed under the GNU General Public License.
|
||||
@@ -34,18 +35,21 @@ augroup tar
|
||||
au FileWriteCmd tarfile::*/* call tar#Write(expand("<amatch>"))
|
||||
endif
|
||||
|
||||
au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.lrp call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.bz2 call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.bz3 call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.gz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.lz4 call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.Z call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tbz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tgz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tlz4 call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tzst call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tzst call tar#Browse(expand("<amatch>"))
|
||||
augroup END
|
||||
com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
|
||||
|
||||
|
||||
@@ -29,17 +29,17 @@ com! -nargs=0 VimballList call vimball#Vimball(0)
|
||||
com! -nargs=* -complete=dir RmVimball call vimball#SaveSettings()|call vimball#RmVimball(<f-args>)|call vimball#RestoreSettings()
|
||||
augroup Vimball
|
||||
au!
|
||||
au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz
|
||||
au BufEnter *.vba,*.vba.gz,*.vba.bz2,*.vba.bz3,*.vba.zip,*.vba.xz
|
||||
\ if getline(1) =~ '^" Vimball Archiver' |
|
||||
\ setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0, "Source this file to extract it! (:so %)")|endif |
|
||||
\ endif
|
||||
au SourceCmd *.vba.gz,*.vba.bz2,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
|
||||
au SourceCmd *.vba.gz,*.vba.bz2,*.vba.bz3,*.vba.zip,*.vba.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
|
||||
au SourceCmd *.vba if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
|
||||
au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz
|
||||
au BufEnter *.vmb,*.vmb.gz,*.vmb.bz2,*.vmb.bz3,*.vmb.zip,*.vmb.xz
|
||||
\ if getline(1) =~ '^" Vimball Archiver' |
|
||||
\ setlocal bt=nofile fmr=[[[,]]] fdm=marker|if &ff != 'unix'|setlocal ma ff=unix noma|endif|if line('$') > 1|call vimball#ShowMesg(0,"Source this file to extract it! (:so %)")|endif |
|
||||
\ endif
|
||||
au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
|
||||
au SourceCmd *.vmb.gz,*.vmb.bz2,*.vmb.bz3,*.vmb.zip,*.vmb.xz let s:origfile=expand("%")|if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|endif|call vimball#Decompress(expand("<amatch>"))|so %|if s:origfile!=expand("<afile>")|close|endif
|
||||
au SourceCmd *.vmb if expand("%")!=expand("<afile>") | exe "1sp" fnameescape(expand("<afile>"))|call vimball#Vimball(1)|close|else|call vimball#Vimball(1)|endif
|
||||
augroup END
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" This file is normally sourced from menu.vim.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 Jan 04
|
||||
" Last Change: 2025 Mar 09
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Define the SetSyn function, used for the Syntax menu entries.
|
||||
@@ -578,26 +578,27 @@ an 50.150.190 &Syntax.T.TealInfo :cal SetSyn("tli")<CR>
|
||||
an 50.150.200 &Syntax.T.Telix\ Salt :cal SetSyn("tsalt")<CR>
|
||||
an 50.150.210 &Syntax.T.Termcap/Printcap :cal SetSyn("ptcap")<CR>
|
||||
an 50.150.220 &Syntax.T.Terminfo :cal SetSyn("terminfo")<CR>
|
||||
an 50.150.230 &Syntax.T.Tera\ Term :cal SetSyn("teraterm")<CR>
|
||||
an 50.150.240 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex")<CR>
|
||||
an 50.150.250 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex")<CR>
|
||||
an 50.150.260 &Syntax.T.TeX.Initex :cal SetSyn("initex")<CR>
|
||||
an 50.150.270 &Syntax.T.TeX.ConTeXt :cal SetSyn("context")<CR>
|
||||
an 50.150.280 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf")<CR>
|
||||
an 50.150.290 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo")<CR>
|
||||
an 50.150.300 &Syntax.T.TF\ mud\ client :cal SetSyn("tf")<CR>
|
||||
an 50.150.310 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy")<CR>
|
||||
an 50.150.320 &Syntax.T.Tilde :cal SetSyn("tilde")<CR>
|
||||
an 50.150.330 &Syntax.T.Tmux\ configuration :cal SetSyn("tmux")<CR>
|
||||
an 50.150.340 &Syntax.T.TPP :cal SetSyn("tpp")<CR>
|
||||
an 50.150.350 &Syntax.T.Trasys\ input :cal SetSyn("trasys")<CR>
|
||||
an 50.150.360 &Syntax.T.Treetop :cal SetSyn("treetop")<CR>
|
||||
an 50.150.370 &Syntax.T.Trustees :cal SetSyn("trustees")<CR>
|
||||
an 50.150.380 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl")<CR>
|
||||
an 50.150.390 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm")<CR>
|
||||
an 50.150.400 &Syntax.T.TSS.Optics :cal SetSyn("tssop")<CR>
|
||||
an 50.150.410 &Syntax.T.Typescript :cal SetSyn("typescript")<CR>
|
||||
an 50.150.420 &Syntax.T.TypescriptReact :cal SetSyn("typescriptreact")<CR>
|
||||
an 50.150.230 &Syntax.T.Tera :cal SetSyn("tera")<CR>
|
||||
an 50.150.240 &Syntax.T.Tera\ Term :cal SetSyn("teraterm")<CR>
|
||||
an 50.150.250 &Syntax.T.TeX.TeX/LaTeX :cal SetSyn("tex")<CR>
|
||||
an 50.150.260 &Syntax.T.TeX.plain\ TeX :cal SetSyn("plaintex")<CR>
|
||||
an 50.150.270 &Syntax.T.TeX.Initex :cal SetSyn("initex")<CR>
|
||||
an 50.150.280 &Syntax.T.TeX.ConTeXt :cal SetSyn("context")<CR>
|
||||
an 50.150.290 &Syntax.T.TeX.TeX\ configuration :cal SetSyn("texmf")<CR>
|
||||
an 50.150.300 &Syntax.T.TeX.Texinfo :cal SetSyn("texinfo")<CR>
|
||||
an 50.150.310 &Syntax.T.TF\ mud\ client :cal SetSyn("tf")<CR>
|
||||
an 50.150.320 &Syntax.T.Tidy\ configuration :cal SetSyn("tidy")<CR>
|
||||
an 50.150.330 &Syntax.T.Tilde :cal SetSyn("tilde")<CR>
|
||||
an 50.150.340 &Syntax.T.Tmux\ configuration :cal SetSyn("tmux")<CR>
|
||||
an 50.150.350 &Syntax.T.TPP :cal SetSyn("tpp")<CR>
|
||||
an 50.150.360 &Syntax.T.Trasys\ input :cal SetSyn("trasys")<CR>
|
||||
an 50.150.370 &Syntax.T.Treetop :cal SetSyn("treetop")<CR>
|
||||
an 50.150.380 &Syntax.T.Trustees :cal SetSyn("trustees")<CR>
|
||||
an 50.150.390 &Syntax.T.TSS.Command\ Line :cal SetSyn("tsscl")<CR>
|
||||
an 50.150.400 &Syntax.T.TSS.Geometry :cal SetSyn("tssgm")<CR>
|
||||
an 50.150.410 &Syntax.T.TSS.Optics :cal SetSyn("tssop")<CR>
|
||||
an 50.150.420 &Syntax.T.Typescript :cal SetSyn("typescript")<CR>
|
||||
an 50.150.430 &Syntax.T.TypescriptReact :cal SetSyn("typescriptreact")<CR>
|
||||
an 50.160.100 &Syntax.UV.Udev\ config :cal SetSyn("udevconf")<CR>
|
||||
an 50.160.110 &Syntax.UV.Udev\ permissions :cal SetSyn("udevperm")<CR>
|
||||
an 50.160.120 &Syntax.UV.Udev\ rules :cal SetSyn("udevrules")<CR>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# To run the test manually:
|
||||
# ../../src/vim -u 'testdir/runtest.vim' --cmd 'breakadd func RunTest'
|
||||
|
||||
# Override this if needed, the default assumes Vim was build in the src dir.
|
||||
# Override this if needed, the default assumes Vim was built in the src dir.
|
||||
#VIMPROG = vim
|
||||
VIMPROG = ../../src/vim
|
||||
|
||||
@@ -13,6 +13,10 @@ VIMRUNTIME = ../..
|
||||
# Uncomment this line to use valgrind for memory leaks and extra warnings.
|
||||
# VALGRIND = valgrind --tool=memcheck --leak-check=yes --num-callers=45 --log-file=valgrind.$*
|
||||
|
||||
# Trace ruler liveness on demand.
|
||||
# VIM_SYNTAX_TEST_LOG = `pwd`/testdir/failed/00-TRACE_LOG
|
||||
|
||||
# ENVVARS = LC_ALL=C VIM_SYNTAX_TEST_LOG="$(VIM_SYNTAX_TEST_LOG)"
|
||||
# ENVVARS = LC_ALL=C LANG=C LANGUAGE=C
|
||||
# Run the syntax tests with a C locale
|
||||
ENVVARS = LC_ALL=C
|
||||
@@ -22,41 +26,52 @@ RUN_VIMTEST = VIMRUNTIME=$(VIMRUNTIME) $(VALGRIND) $(ENVVARS) ../$(VIMPROG) -f $
|
||||
# Uncomment this line for debugging
|
||||
# DEBUGLOG = --log testlog
|
||||
|
||||
# All initial phony targets; these names may clash with file types.
|
||||
phonies = clean test testclean
|
||||
.PHONY: $(phonies)
|
||||
|
||||
# Run the tests that didn't run yet or failed previously.
|
||||
# If a test succeeds a testdir/done/{name} file will be written.
|
||||
# If a test fails a testdir/failed/{name}.dump file will be written.
|
||||
# Progress and error messages can be found in "testdir/messages".
|
||||
# Comment out the "> /dev/null" part to see the in-progress Vim behaviors.
|
||||
test:
|
||||
@# the "vimcmd" file is used by the screendump utils
|
||||
@echo "../$(VIMPROG)" > testdir/vimcmd
|
||||
@echo "$(RUN_VIMTEST)" >> testdir/vimcmd
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(ENVVARS) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim
|
||||
@# Trace ruler liveness on demand.
|
||||
@#mkdir -p testdir/failed
|
||||
@#touch "$(VIM_SYNTAX_TEST_LOG)"
|
||||
VIMRUNTIME=$(VIMRUNTIME) $(ENVVARS) $(VIMPROG) --clean --not-a-term $(DEBUGLOG) -u testdir/runtest.vim > /dev/null
|
||||
@rm -f testdir/Xfilter
|
||||
@# FIXME: Temporarily show the whole file to find out what goes wrong
|
||||
@#if [ -f testdir/messages ]; then tail -n 6 testdir/messages; fi
|
||||
@if [ -f testdir/messages ]; then cat testdir/messages; fi
|
||||
|
||||
# add dependence on syntax files
|
||||
testdir/testdeps.mk:
|
||||
./testdir/tools/maketestdeps $(phonies) > $@
|
||||
|
||||
-include testdir/testdeps.mk
|
||||
|
||||
clean testclean:
|
||||
rm -f testdir/failed/* testdir/done/* testdir/vimcmd testdir/messages testdir/Xtestscript testdir/Xfilter
|
||||
rm -f testdir/failed/* testdir/done/* testdir/vimcmd testdir/messages testdir/Xtestscript testdir/Xfilter testdir/testdeps.mk
|
||||
|
||||
# All initial phony targets; these names may clash with file extensions.
|
||||
phonies = clean test testclean
|
||||
|
||||
# Collect all input filenames and their file extensions.
|
||||
# Collect all input filenames and their file types.
|
||||
testnames != set +f; \
|
||||
awk 'BEGIN { \
|
||||
for (i = 1; i < ARGC; i++) { \
|
||||
split(ARGV[i], names, /\//); \
|
||||
split(names[3], parts, /\./); \
|
||||
exts[parts[2]]; \
|
||||
split(names[3], parts, /[._]/); \
|
||||
types[parts[1]]; \
|
||||
print names[3]; \
|
||||
} \
|
||||
delete types["vim9"]; \
|
||||
split("$(phonies)", scratch); \
|
||||
for (phony in scratch) \
|
||||
phonies[scratch[phony]]; \
|
||||
for (ext in exts) \
|
||||
print ext ((ext in phonies) ? "_" : ""); \
|
||||
for (type in types) \
|
||||
print type ((type in phonies) ? "_" : ""); \
|
||||
}' testdir/input/*.*
|
||||
|
||||
.PHONY: self-testing $(testnames)
|
||||
|
||||
33
runtime/syntax/abnf.vim
Normal file
33
runtime/syntax/abnf.vim
Normal file
@@ -0,0 +1,33 @@
|
||||
" Vim compiler file
|
||||
" Language: abnf
|
||||
" Maintainer: A4-Tacks <wdsjxhno1001@163.com>
|
||||
" Last Change: 2025 Mar 05
|
||||
" Upstream: https://github.com/A4-Tacks/abnf.vim
|
||||
|
||||
" Implementing RFC-5234, RFC-7405
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case ignore
|
||||
|
||||
syn match abnfError /[<>"]/
|
||||
syn match abnfComment /;.*/
|
||||
syn match abnfOption /[[/\]]/
|
||||
syn region abnfString start=/\(%[si]\)\="/ end=/"/ oneline
|
||||
syn region abnfProse start=/</ end=/>/ oneline
|
||||
syn match abnfNumVal /\v\%b[01]+%(%(\.[01]+)+|-[01]+)=>/
|
||||
syn match abnfNumVal /\v\%d\d+%(%(\.\d+)+|-\d+)=>/
|
||||
syn match abnfNumVal /\v\%x[0-9a-f]+%(%(\.[0-9a-f]+)+|-[0-9a-f]+)=>/
|
||||
syn match abnfRepeat /\v%(%(<\d+)=\*\d*|<\d+ =)\ze[^ \t\r\n0-9*/)\]]/
|
||||
|
||||
hi def link abnfError Error
|
||||
hi def link abnfComment Comment
|
||||
hi def link abnfOption PreProc
|
||||
hi def link abnfString String
|
||||
hi def link abnfProse String
|
||||
hi def link abnfNumVal Number
|
||||
hi def link abnfRepeat Repeat
|
||||
|
||||
" vim:noet:ts=8:sts=8:nowrap
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainers: Anduin Withers <awithers@anduin.com>
|
||||
" Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2022-11-16
|
||||
" Last Change: 2025-03-14
|
||||
" Filenames: *.cs
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
@@ -190,6 +190,18 @@ syn match csUnicodeNumber +\\U00\x\{6}+ contained contains=csUnicodeSpecifier di
|
||||
syn match csUnicodeSpecifier +\\[uUx]+ contained display
|
||||
|
||||
syn region csString matchgroup=csQuote start=+"+ end=+"\%(u8\)\=+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
|
||||
for s:i in range(3, get(g:, "cs_raw_string_quote_count", 8))
|
||||
exe 'syn region csRawString' .. s:i .. ' matchgroup=csQuote start=+\z("\{' .. s:i .. '}\)+ end=+\z1+ oneline nextgroup=csRawStringError' .. s:i
|
||||
exe 'syn region csRawString' .. s:i .. ' matchgroup=csQuote start=+\z("\{' .. s:i .. '}\)\s*$+ end=+^\s*\z1+ nextgroup=csRawStringError' .. s:i .. ' contains=csRawStringError' .. s:i
|
||||
exe 'syn match csRawStringError' .. s:i .. ' /\%("\{' .. s:i .. '}\)\@' .. s:i .. '<="\+/ contained'
|
||||
exe 'syn match csRawStringError' .. s:i .. ' /\S.\{-}\s*"\{' .. s:i .. '}"\@!/ contained'
|
||||
|
||||
exe 'hi def link csRawString' .. s:i .. ' csString'
|
||||
exe 'hi def link csRawStringError' .. s:i .. ' Error'
|
||||
endfor
|
||||
unlet s:i
|
||||
|
||||
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError,csUnicodeNumber display
|
||||
syn match csCharacter "'\\''" contains=csSpecialChar display
|
||||
syn match csCharacter "'[^\\]'" display
|
||||
@@ -217,11 +229,26 @@ syn match csInterpolationAlignDel +,+ contained display
|
||||
syn match csInterpolationFormatDel +:+ contained display
|
||||
|
||||
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csVerbatimQuote,@Spell
|
||||
|
||||
" Interpolated raw string literals
|
||||
for s:i in range(1, get(g:, "cs_raw_string_interpolation_brace_count", 8))
|
||||
exe 'syn region csInterpolatedRawString' .. s:i .. ' matchgroup=csQuote start=+$\{' .. s:i .. '}\z("""\+\)+ end=+\z1+ extend contains=csInterpolation' .. s:i .. ',csInterpolationDelimiterError' .. s:i .. ',@Spell'
|
||||
exe 'syn match csInterpolationDelimiterError' .. s:i .. ' "}\{' .. s:i .. '}" contained'
|
||||
exe 'syn match csInterpolationDelimiterError' .. s:i .. ' "{\{' .. 2 * s:i .. ',}" contained'
|
||||
exe 'syn match csInterpolationDelimiterError' .. s:i .. ' "}\{' .. 2 * s:i .. ',}" contained'
|
||||
exe 'syn region csInterpolation' .. s:i .. ' matchgroup=csInterpolationDelimiter start=+\%({\{' .. s:i .. '}\)\@' .. s:i .. '<!{\{' .. s:i .. '}{\@!+ end=+}\@<!}\{' .. s:i .. '}\%(}\{' .. s:i .. '}\)\@!+' ..
|
||||
\ ' keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat,csInterpolationDelimiterError' .. s:i
|
||||
|
||||
exe 'hi def link csInterpolationDelimiterError' .. s:i .. ' Error'
|
||||
exe 'hi def link csInterpolatedRawString' .. s:i .. ' csRawString'
|
||||
endfor
|
||||
unlet s:i
|
||||
|
||||
syn match csVerbatimQuote +""+ contained
|
||||
|
||||
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
|
||||
|
||||
syn cluster csString contains=csString,csInterpolatedString,csVerbatimString,csInterVerbString
|
||||
syn cluster csString contains=csString,csInterpolatedString,csVerbatimString,csInterVerbString,csRawString
|
||||
|
||||
syn cluster csLiteral contains=csBoolean,@csNumber,csCharacter,@csString,csNull
|
||||
|
||||
@@ -282,6 +309,8 @@ hi def link csLogicSymbols Operator
|
||||
hi def link csSpecialError Error
|
||||
hi def link csSpecialCharError Error
|
||||
hi def link csString String
|
||||
hi def link csRawString csString
|
||||
hi def link csRawStringError Error
|
||||
hi def link csQuote String
|
||||
hi def link csInterpolatedString String
|
||||
hi def link csVerbatimString String
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file generator
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi (h_east)
|
||||
" Last Change: 2024 Dec 29
|
||||
" Last Change: 2025 Mar 09
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
@@ -263,6 +263,7 @@ function s:get_vim_command_type(cmd_name)
|
||||
call
|
||||
catch
|
||||
class
|
||||
debuggreedy
|
||||
def
|
||||
delcommand
|
||||
doautoall
|
||||
@@ -377,14 +378,14 @@ function s:parse_vim_event(li)
|
||||
new
|
||||
exec 'read ' . file_name
|
||||
norm! gg
|
||||
exec '/^static keyvalue_T event_tab\[] = {$/+1;/^};$/-1yank'
|
||||
exec '/^static keyvalue_T event_tab\[NUM_EVENTS] = {$/+1;/^};$/-1yank'
|
||||
%delete _
|
||||
|
||||
put
|
||||
g!/^\s*KEYVALUE_ENTRY(/d
|
||||
|
||||
for line in getline(1, line('$'))
|
||||
let list = matchlist(line, '^\s*KEYVALUE_ENTRY(EVENT_\w\+,\s*"\(\w\+\)"')
|
||||
let list = matchlist(line, '^\s*KEYVALUE_ENTRY(-\?EVENT_\w\+,\s*"\(\w\+\)"')
|
||||
let item.name = list[1]
|
||||
call add(a:li, copy(item))
|
||||
endfor
|
||||
@@ -580,6 +581,38 @@ function s:parse_vim_addr_name(li)
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
function s:parse_vim_var(li)
|
||||
try
|
||||
let file_name = $VIM_SRCDIR . '/evalvars.c'
|
||||
let item = {}
|
||||
|
||||
new
|
||||
exec 'read ' . file_name
|
||||
norm! gg
|
||||
exec '/^} vimvars\[VV_LEN] =\n{$/+1;/^};$/-1yank'
|
||||
%delete _
|
||||
|
||||
put
|
||||
g!/^\s*{VV_NAME(/d
|
||||
|
||||
for line in getline(1, line('$'))
|
||||
let list = matchlist(line, '^\s*{VV_NAME("\(\w\+\)"')
|
||||
let item.name = list[1]
|
||||
call add(a:li, copy(item))
|
||||
endfor
|
||||
|
||||
quit!
|
||||
|
||||
if empty(a:li)
|
||||
throw 'var is empty'
|
||||
endif
|
||||
catch /.*/
|
||||
call s:err_gen('')
|
||||
throw 'exit'
|
||||
endtry
|
||||
endfunc
|
||||
|
||||
" ------------------------------------------------------------------------------
|
||||
function s:append_syn_any(lnum, str_info, li)
|
||||
let ret_lnum = a:lnum
|
||||
@@ -664,6 +697,15 @@ function s:update_syntax_vim_file(vim_info)
|
||||
let lnum = s:search_and_check(kword . ' term output code', base_fname, str_info)
|
||||
let lnum = s:append_syn_any(lnum, str_info, li)
|
||||
|
||||
" vimOption - normal variable
|
||||
let li = a:vim_info.opt
|
||||
let lnum = s:search_and_check(kword . ' normal variable', base_fname, str_info)
|
||||
let lnum = s:append_syn_vimopt(lnum, str_info, li, '', 0)
|
||||
" vimOption - term output code variable
|
||||
let li = a:vim_info.term_out_code
|
||||
let lnum = s:search_and_check(kword . ' term output code variable', base_fname, str_info)
|
||||
let lnum = s:append_syn_any(lnum, str_info, li)
|
||||
|
||||
" Missing vimOption
|
||||
let li = a:vim_info.missing_opt
|
||||
let lnum = s:search_and_check('Missing vimOption', base_fname, str_info)
|
||||
@@ -686,6 +728,11 @@ function s:update_syntax_vim_file(vim_info)
|
||||
let lnum = s:search_and_check('vimFuncName', base_fname, str_info)
|
||||
let lnum = s:append_syn_any(lnum, str_info, li)
|
||||
|
||||
" vimVarName
|
||||
let li = a:vim_info.var
|
||||
let lnum = s:search_and_check('vimVarName', base_fname, str_info)
|
||||
let lnum = s:append_syn_any(lnum, str_info, li)
|
||||
|
||||
" vimUserAttrbCmplt
|
||||
let li = a:vim_info.compl_name
|
||||
let lnum = s:search_and_check('vimUserCmdAttrCmplt', base_fname, str_info)
|
||||
@@ -873,6 +920,7 @@ try
|
||||
let s:vim_info.hlgroup = []
|
||||
let s:vim_info.compl_name = []
|
||||
let s:vim_info.addr_name = []
|
||||
let s:vim_info.var = []
|
||||
|
||||
set lazyredraw
|
||||
if !$CHECK_HELP_DOC
|
||||
@@ -884,6 +932,7 @@ try
|
||||
silent call s:parse_vim_hlgroup(s:vim_info.hlgroup)
|
||||
silent call s:parse_vim_complete_name(s:vim_info.compl_name)
|
||||
silent call s:parse_vim_addr_name(s:vim_info.addr_name)
|
||||
silent call s:parse_vim_var(s:vim_info.var)
|
||||
|
||||
call s:update_syntax_vim_file(s:vim_info)
|
||||
else
|
||||
|
||||
@@ -2,24 +2,30 @@
|
||||
" Language: Vim script
|
||||
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
|
||||
" Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2025 Jan 20
|
||||
" Last Change: 2025 Mar 13
|
||||
" Former Maintainer: Charles E. Campbell
|
||||
|
||||
" DO NOT CHANGE DIRECTLY.
|
||||
" THIS FILE PARTLY GENERATED BY gen_syntax_vim.vim.
|
||||
" (Search string "GEN_SYN_VIM:" in this file)
|
||||
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" Quit when a syntax file was already loaded {{{2
|
||||
" Quit when a syntax file was already loaded {{{1
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Feature testing {{{1
|
||||
|
||||
let s:vim9script = "\n" .. getline(1, 32)->join("\n") =~# '\n\s*vim9\%[script]\>'
|
||||
|
||||
function s:has(feature)
|
||||
return has(a:feature) || index(get(g:, "vimsyn_vim_features", []), a:feature) != -1
|
||||
endfunction
|
||||
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
" vimTodo: contains common special-notices for comments {{{2
|
||||
" Use the vimCommentGroup cluster to add your own.
|
||||
syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
@@ -41,7 +47,6 @@ syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue Di
|
||||
|
||||
" vimOptions: These are the invertible variants {{{2
|
||||
" GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR=''
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
|
||||
" term key codes
|
||||
@@ -55,6 +60,19 @@ syn match vimOption contained "t_&8"
|
||||
syn match vimOption contained "t_%i"
|
||||
syn match vimOption contained "t_k;"
|
||||
|
||||
" vimOptions: These are the variable names {{{2
|
||||
" GEN_SYN_VIM: vimOption normal variable, START_STR='syn keyword vimOptionVarName contained', END_STR=''
|
||||
" GEN_SYN_VIM: vimOption term output code variable, START_STR='syn keyword vimOptionVarName contained', END_STR=''
|
||||
syn keyword vimOptionVarName contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ku
|
||||
syn match vimOptionVarName contained "t_%1"
|
||||
syn match vimOptionVarName contained "t_#2"
|
||||
syn match vimOptionVarName contained "t_#4"
|
||||
syn match vimOptionVarName contained "t_@7"
|
||||
syn match vimOptionVarName contained "t_*7"
|
||||
syn match vimOptionVarName contained "t_&8"
|
||||
syn match vimOptionVarName contained "t_%i"
|
||||
syn match vimOptionVarName contained "t_k;"
|
||||
|
||||
" unsupported settings: some were supported by vi but don't do anything in vim {{{2
|
||||
" GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR=''
|
||||
|
||||
@@ -72,10 +90,20 @@ syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
" GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR=''
|
||||
" Predefined variable names {{{2
|
||||
" GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR=''
|
||||
|
||||
"--- syntax here and above generated by runtime/syntax/generator/gen_syntax_vim.vim ---
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
|
||||
" Neovim keyword list additions {{{2
|
||||
|
||||
if s:has("nvim")
|
||||
syn keyword vimOptionVarName contained channel inccommand mousescroll pumblend redrawdebug scrollback shada shadafile statuscolumn termpastefilter termsync winbar winblend winhighlight
|
||||
syn keyword vimVimVarName contained lua msgpack_types relnum stderr termrequest virtnum
|
||||
endif
|
||||
|
||||
" Set up commands for this syntax highlighting file {{{2
|
||||
|
||||
com! -nargs=* Vim9 execute <q-args> s:vim9script ? "" : "contained"
|
||||
@@ -192,31 +220,54 @@ Vim9 syn keyword vim9Boolean true false
|
||||
" Numbers {{{2
|
||||
" =======
|
||||
syn case ignore
|
||||
syn match vimNumber '\<\d\+\%(\.\d\+\%(e[+-]\=\d\+\)\=\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<\d\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
|
||||
syn match vimNumber '\<\d\+\.\d\+\%(e[+-]\=\d\+\)\=' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<0b[01]\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
|
||||
syn match vimNumber '\<0o\=\o\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
|
||||
syn match vimNumber '\<0x\x\+' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
|
||||
syn match vimNumber '\<0z\>' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment
|
||||
syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=vimGlobal,vimSubst1,@vimComment,vimSubscript
|
||||
syn case match
|
||||
|
||||
" All vimCommands are contained by vimIsCommand. {{{2
|
||||
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList
|
||||
syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDebuggreedy,vimDef,vimDefFold,vimDelcommand,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimFuncFold,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimLockvar,vimMap,vimMark,vimMatch,vimNotFunc,vimNormal,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList,@vimExUserCmdList
|
||||
syn cluster vim9CmdList contains=vim9Abstract,vim9Class,vim9Const,vim9Enum,vim9Export,vim9Final,vim9For,vim9Interface,vim9Type,vim9Var
|
||||
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||
syn match vimCmdSep "\\\@1<!|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
|
||||
syn match vimCmdSep ":\+" skipwhite nextgroup=@vimCmdList,vimSubst1
|
||||
syn match vimCount contained "\d\+"
|
||||
syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" nextgroup=vimBang contains=vimCommand
|
||||
syn match vimBang contained "!"
|
||||
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
|
||||
syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
|
||||
syn match vimVar "\s\zs&\%([lg]:\)\=\a\+\>"
|
||||
syn match vimVar "\s\zs&t_\S[a-zA-Z0-9]\>"
|
||||
syn match vimVar "\s\zs&t_k;"
|
||||
syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
|
||||
syn keyword vimCommand contained in
|
||||
|
||||
syn cluster vimExprList contains=vimEnvvar,vimFunc,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar,@vim9ExprList
|
||||
syn cluster vim9ExprList contains=vim9Boolean,vim9Null
|
||||
syn region vimSubscript contained matchgroup=vimSubscriptBracket start="\[" end="]" nextgroup=vimSubscript contains=@vimExprList
|
||||
|
||||
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vim9Super,vim9This
|
||||
syn match vimVar "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vimVarScope
|
||||
syn match vimVar "\<a:\%(000\|1\=[0-9]\|20\)\>" nextgroup=vimSubscript contains=vimVarScope
|
||||
syn match vimFBVar contained "\<[bwglsta]:\h[a-zA-Z0-9#_]*\>" nextgroup=vimSubscript contains=vimVarScope
|
||||
|
||||
" match the scope prefix independently of the retrofitted scope dictionary
|
||||
syn match vimVarScope contained "\<[bwglstav]:"
|
||||
syn match vimVimVar contained "\<[bwglstav]:\%(\h\|\d\)\@!" nextgroup=vimSubscript
|
||||
|
||||
syn match vimVarNameError contained "\<\h\w*\>"
|
||||
syn match vimVimVar "\<v:" nextgroup=vimSubscript,vimVimVarName,vimVarNameError
|
||||
syn match vimOptionVar "&\%([lg]:\)\=" nextgroup=vimSubscript,vimOptionVarName,vimVarNameError
|
||||
syn cluster vimSpecialVar contains=vimEnvvar,vimLetRegister,vimOptionVar,vimVimVar
|
||||
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\=="
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.="
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s\+=<<"
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vim9Super,vim9This
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscript
|
||||
Vim9 syn match vim9LhsVariable "\s\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimOper contains=vim9Super,vim9This
|
||||
|
||||
Vim9 syn match vim9LhsVariableList "\[\_[^]]\+]\ze\s\+[-+/*%]\==" contains=vimVar,@vimSpecialVar
|
||||
Vim9 syn match vim9LhsVariableList "\[\_[^]]\+]\ze\s\+\.\.=" contains=vimVar,@vimSpecialVar
|
||||
|
||||
Vim9 syn match vim9LhsRegister "@["0-9\-a-zA-Z#=*+_/]\ze\s\+\%(\.\.\)\=="
|
||||
|
||||
syn cluster vimExprList contains=@vimSpecialVar,vimFunc,vimNumber,vimOper,vimOperParen,vimLambda,vimString,vimVar,@vim9ExprList
|
||||
syn cluster vim9ExprList contains=vim9Boolean,vim9LambdaParams,vim9Null
|
||||
|
||||
" Insertions And Appends: insert append {{{2
|
||||
" (buftype != nofile test avoids having append, change, insert show up in the command window)
|
||||
@@ -240,6 +291,11 @@ syn keyword vimBehaveModel contained mswin xterm
|
||||
" ====
|
||||
syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc
|
||||
|
||||
" Debuggreedy {{{2
|
||||
" ===========
|
||||
" TODO: special-cased until generalised range/count support is implemented
|
||||
syn match vimDebuggreedy "\<0\=debugg\%[reedy]\>" contains=vimCount
|
||||
|
||||
" Exception Handling {{{2
|
||||
syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
|
||||
syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern
|
||||
@@ -262,7 +318,7 @@ syn keyword vimFTOption contained detect indent off on plugin
|
||||
|
||||
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2
|
||||
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking.
|
||||
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimFuncVar,vimContinue
|
||||
syn cluster vimAugroupList contains=@vimCmdList,vimFilter,vimFunc,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimSubst,vimRegister,vimCmplxRepeat,vimNotation,vimCtrlChar,vimContinue
|
||||
syn match vimAugroup "\<aug\%[roup]\>" contains=vimAugroupKey,vimAugroupBang skipwhite nextgroup=vimAugroupBang,vimAutoCmdGroup
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'a'
|
||||
syn region vimAugroup fold start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\)\@!\S\+" matchgroup=vimAugroupKey end="\<aug\%[roup]\>\ze\s\+[eE][nN][dD]\>" contains=vimAutoCmd,@vimAugroupList,vimAugroupkey skipwhite nextgroup=vimAugroupEnd
|
||||
@@ -280,31 +336,64 @@ syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBan
|
||||
|
||||
" Operators: {{{2
|
||||
" =========
|
||||
syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull
|
||||
syn match vimOper "\a\@<!!" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "||\|&&\|[-+*/%.]" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "?" skipwhite nextgroup=@vimExprList
|
||||
syn cluster vimOperGroup contains=@vimContinue,@vimExprList,vim9Comment
|
||||
syn match vimOper "\a\@<!!" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
|
||||
syn match vimOper "||\|&&\|[-+*/%.]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
|
||||
syn match vimOper "?" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList
|
||||
" distinguish ternary : from ex-colon
|
||||
syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite nextgroup=@vimExprList
|
||||
syn match vimOper "??" skipwhite nextgroup=@vimExprList
|
||||
syn match vimOper "=" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "\<is\%(not\)\=\>" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn match vimOper "\<is\%(not\)\=[?#]" skipwhite nextgroup=vimString,vimSpecFile
|
||||
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup
|
||||
syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar
|
||||
syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList
|
||||
syn match vimOper "??" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList
|
||||
syn match vimOper "=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
|
||||
syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
|
||||
syn match vimOper "\<is\%(not\)\=\>" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
|
||||
syn match vimOper "\<is\%(not\)\=[?#]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile
|
||||
syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup nextgroup=vimSubscript
|
||||
syn region vimOperParen matchgroup=vimSep start="#\={" end="}" contains=@vimOperGroup nextgroup=vimSubscript,vimVar
|
||||
syn region vimOperParen contained matchgroup=vimSep start="\[" end="]" contains=@vimOperGroup nextgroup=vimSubscript,vimVar
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror")
|
||||
syn match vimOperError ")"
|
||||
endif
|
||||
|
||||
syn match vimOperContinue contained "^\s*\zs\\" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList
|
||||
syn match vimOperContinueComment contained '^\s*\zs["#]\\ .*' skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList
|
||||
syn cluster vimOperContinue contains=vimOperContinue,vimOperContinueComment
|
||||
|
||||
" Lambda Expressions: {{{2
|
||||
" ==================
|
||||
syn match vimLambdaOperator contained "->" skipwhite nextgroup=@vimExprList
|
||||
syn region vimLambda contained matchgroup=Delimiter start="{\ze[[:space:][:alnum:]_.,]*->" end="}" end="$" skip=+\s*\n\s*\\\|\s*\n\s*"\\ + contains=@vimContinue,@vimExprList,vimLambdaParams
|
||||
syn match vimLambdaParams contained "{\@1<=.\{-}\%(->\)\@=" nextgroup=vimLambdaOperator contains=vimFuncParam
|
||||
|
||||
syn match vim9LambdaOperator contained "=>" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment
|
||||
syn match vim9LambdaParamsParen contained "[()]"
|
||||
syn region vim9LambdaParams contained
|
||||
\ matchgroup=vim9LambdaParamsParen
|
||||
\ start="(\ze\s*\(\.\.\.\)\=\h\w*[,:]\%(\s\|$\)"
|
||||
\ start="(\ze\s*\n
|
||||
"\ line continuations
|
||||
\\%(\s*\%(#\\ .*\|\\\s*\)\n\)*\s*\\\s*
|
||||
"\ parameter names
|
||||
\\(\.\.\.\)\=\h\w*[,:]\%(\s\|$\)"
|
||||
\ end=")\ze\%(:\s\|\s\+=>\)"
|
||||
\ matchgroup=vimContinue
|
||||
\ end="^\s*\\\ze\s\+=>"
|
||||
\ skipwhite nextgroup=vim9LambdaReturnType,vim9LambdaOperator
|
||||
\ contains=@vim9Continue,vimDefParam,vim9LambdaParamsParen
|
||||
syn match vim9LambdaParams contained "(\s*)\|(\s*\(\.\.\.\)\=\h\w*\s*)\ze\%(:\s\|\s\+=>\)" skipwhite nextgroup=vim9LambdaReturnType,vim9LambdaOperator contains=vimDefParam,vim9LambdaParamsParen
|
||||
|
||||
syn region vim9LambdaReturnType contained start=":\s" end="$" end="\ze#" end="\ze=>" skipwhite skipempty nextgroup=vim9LambdaOperator,vim9LamdaOperatorComment contains=vimTypeSep transparent
|
||||
syn region vim9LambdaBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
|
||||
|
||||
syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment
|
||||
|
||||
" Functions: Tag is provided for those who wish to highlight tagged functions {{{2
|
||||
" =========
|
||||
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncSID,Tag
|
||||
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
|
||||
syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFuncScope,vimFuncSID,Tag
|
||||
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncScope,vimFuncSID,Tag
|
||||
|
||||
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
|
||||
syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet,vimSearch
|
||||
syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9Search
|
||||
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSpecFile,vimString,vimSubst,vimFuncFold,vimDefFold
|
||||
syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimInsert,vimConst,vimLet,vimSearch
|
||||
syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Block,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,vim9LhsVariable,vim9LhsVariableList,vim9LhsRegister,vim9Search,@vimSpecialVar
|
||||
|
||||
syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
|
||||
syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
|
||||
@@ -318,7 +407,7 @@ syn match vimDefComment contained "#.*" skipwhite skipempty nextgroup=vimDefBody
|
||||
|
||||
syn match vimFuncBang contained "!"
|
||||
syn match vimFuncSID contained "\c<sid>"
|
||||
syn match vimFuncSID contained "\<[sg]:"
|
||||
syn match vimFuncScope contained "\<[sg]:"
|
||||
syn keyword vimFuncKey contained fu[nction]
|
||||
syn keyword vimDefKey contained def
|
||||
|
||||
@@ -341,7 +430,6 @@ if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
syn region vimDefFold start="\<def\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\)\+(" end="\<enddef\>" contains=vimDef fold keepend extend transparent
|
||||
endif
|
||||
|
||||
syn match vimFuncVar contained "a:\%(\K\k*\|\d\+\)\>"
|
||||
syn match vimFuncBlank contained "\s\+"
|
||||
|
||||
" Types: {{{2
|
||||
@@ -364,12 +452,24 @@ syn cluster vimType contains=vimType,vimCompoundType,vimUserType
|
||||
|
||||
if s:vim9script
|
||||
" Methods {{{3
|
||||
syn match vim9MethodDef contained "\<def\>" skipwhite nextgroup=vim9MethodDefName
|
||||
syn match vim9MethodDef contained "\<def\>" skipwhite nextgroup=vim9MethodDefName,vim9ConstructorDefName
|
||||
syn match vim9MethodDefName contained "\<\h\w*\>" nextgroup=vim9MethodDefParams contains=@vim9MethodName
|
||||
syn region vim9MethodDefParams contained
|
||||
\ matchgroup=Delimiter start="(" end=")"
|
||||
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vimDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError
|
||||
\ contains=vimDefParam,vim9Comment,vimFuncParamEquals
|
||||
|
||||
syn match vim9ConstructorDefName contained "\<new\w*\>"
|
||||
\ nextgroup=vim9ConstructorDefParams
|
||||
\ contains=@vim9MethodName
|
||||
syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>"
|
||||
\ skipwhite nextgroup=vimParamType,vimFuncParamEquals
|
||||
\ contains=vim9This,vimOper
|
||||
syn region vim9ConstructorDefParams contained
|
||||
\ matchgroup=Delimiter start="(" end=")"
|
||||
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vimDefComment,vimEnddef,vimCommentError
|
||||
\ contains=vim9ConstructorDefParam,vim9Comment,vimFuncParamEquals
|
||||
|
||||
syn region vim9MethodDefReturnType contained
|
||||
\ start=":\s" end="$" matchgroup=vim9Comment end="\ze[#"]"
|
||||
\ skipwhite skipnl nextgroup=vim9MethodDefBody,vimDefComment,vimCommentError
|
||||
@@ -385,7 +485,7 @@ if s:vim9script
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
||||
syn match vim9MethodNameError contained "\<[a-z0-9]\i\>"
|
||||
endif
|
||||
syn match vim9MethodName contained "\<new\i*\>"
|
||||
syn match vim9MethodName contained "\<new\w*\>"
|
||||
syn keyword vim9MethodName contained empty len string
|
||||
|
||||
syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError
|
||||
@@ -410,8 +510,11 @@ if s:vim9script
|
||||
syn keyword vim9Implements contained implements skipwhite skipnl nextgroup=vim9ImplementedInterface
|
||||
syn keyword vim9Public contained public
|
||||
syn keyword vim9Static contained static
|
||||
syn keyword vim9This contained this
|
||||
syn keyword vim9Super contained super
|
||||
" FIXME: don't match as dictionary keys, remove when operators are not
|
||||
" shared between Vim9 and legacy script
|
||||
syn match vim9This contained "\.\@1<!\<this\>:\@!"
|
||||
" super must be folowed by '.'
|
||||
syn match vim9Super contained "\.\@1<!\<super\.\@="
|
||||
|
||||
VimFoldc syn region vim9ClassBody start="\<class\>" matchgroup=vimCommand end="\<endclass\>" contains=@vim9ClassBodyList transparent
|
||||
|
||||
@@ -444,15 +547,19 @@ if s:vim9script
|
||||
|
||||
VimFoldi syn region vim9InterfaceBody start="\<interface\>" matchgroup=vimCommand end="\<endinterface\>" contains=@vim9InterfaceBodyList transparent
|
||||
|
||||
" type {{{3
|
||||
" Type Aliases {{{3
|
||||
syn match vim9Type "\<ty\%[pe]\>" skipwhite nextgroup=vim9TypeAlias,vim9TypeAliasError
|
||||
syn match vim9TypeAlias contained "\<\u\w*\>" skipwhite nextgroup=vim9TypeEquals
|
||||
syn match vim9TypeEquals contained "=" skipwhite nextgroup=@vimType
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_notypealiaserror")
|
||||
syn match vim9TypeAliasError contained "\<\U\w*"
|
||||
syn match vim9TypeAliasError contained "\<\l\w*\>" skipwhite nextgroup=vim9TypeEquals
|
||||
endif
|
||||
endif
|
||||
|
||||
" Blocks: {{{2
|
||||
" ======
|
||||
Vim9 syn region vim9Block matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
|
||||
|
||||
" Keymaps: {{{2
|
||||
" =======
|
||||
|
||||
@@ -517,7 +624,7 @@ syn match vimUserCmdAttrCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\
|
||||
syn match vimUserCmdAttrAddr contained "?"
|
||||
syn case match
|
||||
|
||||
syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList
|
||||
syn region vimUserCmdBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
|
||||
|
||||
syn match vimDelcommand "\<delc\%[ommand]\>" skipwhite nextgroup=vimDelcommandAttr
|
||||
syn match vimDelcommandAttr contained "-buffer\>"
|
||||
@@ -554,7 +661,10 @@ syn match vimCommentError contained +".*+
|
||||
syn match vimEnvvar "\$\I\i*"
|
||||
syn match vimEnvvar "\${\I\i*}"
|
||||
|
||||
" In-String Specials: {{{2
|
||||
" Strings {{{2
|
||||
" =======
|
||||
|
||||
" In-String Specials:
|
||||
" Try to catch strings, if nothing else matches (therefore it must precede the others!)
|
||||
" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside [])
|
||||
syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1
|
||||
@@ -564,11 +674,9 @@ syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\
|
||||
syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline
|
||||
syn match vimNotPatSep contained "\\\\"
|
||||
syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell
|
||||
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ contains=@vimStringGroup extend
|
||||
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ contains=vimQuoteEscape extend
|
||||
syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z>\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscript contains=@vimStringGroup extend
|
||||
syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z>\\@]'+lc=1 end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape extend
|
||||
"syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim
|
||||
syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont
|
||||
syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+
|
||||
|
||||
syn match vimEscape contained "\\."
|
||||
" syn match vimEscape contained +\\[befnrt\"]+
|
||||
@@ -577,8 +685,8 @@ syn match vimEscape contained "\\<" contains=vimNotation
|
||||
syn match vimEscape contained "\\<\*[^>]*>\=>"
|
||||
syn match vimQuoteEscape contained "''"
|
||||
|
||||
syn region vimString oneline matchgroup=vimString start=+$'+ skip=+''+ end=+'+ contains=vimQuoteEscape,@vimStringInterpolation extend
|
||||
syn region vimString oneline matchgroup=vimString start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation extend
|
||||
syn region vimString oneline matchgroup=vimString start=+$'+ skip=+''+ end=+'+ nextgroup=vimSubscript contains=vimQuoteEscape,@vimStringInterpolation extend
|
||||
syn region vimString oneline matchgroup=vimString start=+$"+ end=+"+ nextgroup=vimSubscript contains=@vimStringGroup,@vimStringInterpolation extend
|
||||
syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
|
||||
syn match vimStringInterpolationBrace contained "{{"
|
||||
syn match vimStringInterpolationBrace contained "}}"
|
||||
@@ -609,9 +717,6 @@ syn match vimSubstFlags contained "[&cegiIlnpr#]\+"
|
||||
syn match vimSubstDelim contained "\\"
|
||||
syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4
|
||||
|
||||
" 'String': {{{2
|
||||
syn match vimString "[^(,]'[^']\{-}\zs'"
|
||||
|
||||
" Marks, Registers, Addresses, Filters: {{{2
|
||||
syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
|
||||
syn match vimMark "'[[\]{}()<>]\ze[-+,!]" nextgroup=vimFilter,vimMarkNumber,vimSubst1
|
||||
@@ -627,7 +732,7 @@ syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]'
|
||||
syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]'
|
||||
syn match vimRegister '@"'
|
||||
syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]'
|
||||
syn match vimLetRegister contained '@["0-9\-a-zA-Z#=*+_/]'
|
||||
syn match vimLetRegister contained '@["0-9\-a-zA-Z:.%#=*+~_/]'
|
||||
|
||||
syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
|
||||
syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
|
||||
@@ -642,9 +747,9 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
|
||||
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
|
||||
|
||||
" Set command and associated set-options (vimOptions) with comment {{{2
|
||||
syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetRegion
|
||||
syn region vimSetRegion contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
|
||||
syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\\\\|\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep
|
||||
syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs
|
||||
syn region vimSetArgs contained start="\S" skip=+\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
|
||||
syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep
|
||||
syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap
|
||||
syn keyword vimSetAll contained all nextgroup=vimSetMod
|
||||
syn keyword vimSetTermcap contained termcap
|
||||
@@ -654,13 +759,18 @@ syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)"
|
||||
|
||||
" Variable Declarations: {{{2
|
||||
" =====================
|
||||
VimL syn keyword vimLet let skipwhite nextgroup=vimVar,vimFuncVar,vimLetRegister,vimVarList
|
||||
VimL syn keyword vimConst cons[t] skipwhite nextgroup=vimVar,vimVarList
|
||||
syn region vimVarList contained start="\[" end="]" contains=vimVar,@vimContinue
|
||||
VimL syn keyword vimLet let skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList
|
||||
VimL syn keyword vimConst cons[t] skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList
|
||||
syn region vimVarList contained
|
||||
\ start="\[" end="]"
|
||||
\ contains=@vimContinue,@vimSpecialVar,vimVar
|
||||
|
||||
VimL syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars
|
||||
syn match vimUnletBang contained "!" skipwhite nextgroup=vimUnletVars
|
||||
syn region vimUnletVars contained start="$\I\|\h" skip="\n\s*\\" end="$" end="|" contains=vimVar,vimEnvvar,vimContinue,vimString,vimNumber
|
||||
VimL syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars
|
||||
syn match vimUnletBang contained "\a\@1<=!" skipwhite nextgroup=vimUnletVars
|
||||
syn region vimUnletVars contained
|
||||
\ start="$\I\|\h" skip=+\n\s*\\\|\n\s*"\\ \|^\s*"\\ + end="$" end="\ze[|"]"
|
||||
\ nextgroup=vimCmdSep,vimComment
|
||||
\ contains=@vimContinue,vimEnvvar,vimVar,vimVimVar
|
||||
|
||||
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='\%(^\z(\s*\)\S.*\)\@<==<<\s*trim\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1\=\z2$' extend
|
||||
VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\%(\s*\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1$' extend
|
||||
@@ -672,15 +782,39 @@ Vim9 syn keyword vim9Final final skipwhite nextgroup=vim9Variable,vim9VariableLi
|
||||
Vim9 syn keyword vim9Var var skipwhite nextgroup=vim9Variable,vim9VariableList
|
||||
|
||||
syn match vim9Variable contained "\<\h\w*\>" skipwhite nextgroup=vimTypeSep,vimLetHereDoc,vimOper
|
||||
syn region vim9VariableList contained start="\[" end="]" contains=vim9Variable,@vimContinue
|
||||
syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@vimSpecialVar,vim9Variable
|
||||
|
||||
" Lockvar and Unlockvar: {{{2
|
||||
" =====================
|
||||
syn keyword vimLockvar lockv[ar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars
|
||||
syn keyword vimUnlockvar unlo[ckvar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars
|
||||
syn match vimLockvarBang contained "\a\@1<=!" skipwhite nextgroup=vimLockvarVars
|
||||
syn match vimLockvarDepth contained "\<[0-3]\>" skipwhite nextgroup=vimLockvarVars
|
||||
syn region vimLockvarVars contained
|
||||
\ start="\h" skip=+\n\s*\\\|\n\s*"\\ \|^\s*"\\ + end="$" end="\ze[|"]"
|
||||
\ nextgroup=vimCmdSep,vimComment
|
||||
\ contains=@vimContinue,vimVar
|
||||
|
||||
hi def link vimLockvar vimCommand
|
||||
hi def link vimUnlockvar vimCommand
|
||||
hi def link vimLockvarBang vimBang
|
||||
hi def link vimLockvarDepth vimNumber
|
||||
|
||||
" For: {{{2
|
||||
" ===
|
||||
if s:vim9script
|
||||
syn keyword vim9For for skipwhite nextgroup=vim9Variable,vim9VariableList
|
||||
else
|
||||
syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
|
||||
endif
|
||||
" handles Vim9 and legacy for now
|
||||
syn region vimFor
|
||||
\ matchgroup=vimCommand
|
||||
\ start="\<for\>" end="\<in\>"
|
||||
\ skipwhite skipnl nextgroup=@vimForInContinue,vim9ForInComment,@vimExprList
|
||||
\ contains=@vimContinue,vimVar,vimVarList,vim9VariableList
|
||||
\ transparent
|
||||
|
||||
syn match vim9ForInComment contained "#.*" skipwhite skipempty nextgroup=vimForInComment,@vimExprList
|
||||
|
||||
syn match vimForInContinue contained "^\s*\zs\\" skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList
|
||||
syn match vimForInContinueComment contained '^\s*\zs["#]\\ .*' skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList
|
||||
syn cluster vimForInContinue contains=vimForInContinue,vimForInContinueComment
|
||||
|
||||
" Abbreviations: {{{2
|
||||
" =============
|
||||
@@ -696,7 +830,7 @@ syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod,vi
|
||||
syn keyword vimAutoCmd au[tocmd] skipwhite nextgroup=vimAutoCmdBang,vimAutoEventList
|
||||
syn keyword vimAutoCmd do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
|
||||
syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)" skipwhite nextgroup=vimAutoCmdBlock
|
||||
syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="}" contains=@vimDefBodyList
|
||||
syn region vimAutoCmdBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList
|
||||
|
||||
" Echo And Execute: -- prefer strings! {{{2
|
||||
" ================
|
||||
@@ -732,15 +866,17 @@ syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
|
||||
" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
|
||||
syn keyword vimUnmap unm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
|
||||
syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation skipwhite nextgroup=vimMapRhs
|
||||
syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation skipwhite skipnl nextgroup=vimMapRhsContinue
|
||||
syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite nextgroup=vimMapRhs
|
||||
syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite skipnl nextgroup=vimMapRhsContinue
|
||||
syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn match vimMapMod contained "\%#=1\c<\(buffer\|expr\|\(local\)\=leader\|nowait\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation skipnl nextgroup=vimMapRhsContinue
|
||||
syn match vimMapMod contained "\%#=1<\%(buffer\|expr\|nowait\|script\|silent\|special\|unique\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs
|
||||
syn region vimMapRhs contained start="\S" skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader skipnl nextgroup=vimMapRhsContinue
|
||||
" assume a continuation comment introduces the RHS
|
||||
syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation
|
||||
syn region vimMapRhsContinue contained start=+^\s*\%(\\\|"\\ \)+ skip=+\\|\|\@1<=|\|\n\s*\\\|\n\s*"\\ + end="|" end="$" contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader
|
||||
syn match vimMapLeader contained "\%#=1\c<\%(local\)\=leader>" contains=vimMapLeaderKey
|
||||
syn keyword vimMapModKey contained buffer expr nowait script silent special unique
|
||||
syn case ignore
|
||||
syn keyword vimMapModKey contained buffer expr leader localleader nowait plug script sid silent unique
|
||||
syn keyword vimMapLeaderKey contained leader localleader
|
||||
syn case match
|
||||
|
||||
" Menus: {{{2
|
||||
@@ -770,22 +906,22 @@ syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate
|
||||
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
|
||||
" ======================
|
||||
syn case ignore
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket
|
||||
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
|
||||
syn match vimNotation '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
|
||||
syn match vimNotation '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket
|
||||
syn match vimNotation contained '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
|
||||
syn match vimNotation contained '\%#=1\%(\\\|<lt>\)\=<\%(q-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|f-args\|f-mods\|lt\)>' contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket
|
||||
syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket
|
||||
|
||||
syn match vimBracket contained "[\\<>]"
|
||||
syn case match
|
||||
@@ -793,8 +929,8 @@ syn case match
|
||||
" User Function Highlighting: {{{2
|
||||
" (following Gautam Iyer's suggestion)
|
||||
" ==========================
|
||||
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
|
||||
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation,vim9MethodName
|
||||
syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncEcho,vimFuncName,vimUserFunc,vimExecute
|
||||
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation,vim9MethodName,vim9Super,vim9This
|
||||
syn keyword vimFuncEcho contained ec ech echo
|
||||
|
||||
syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
|
||||
@@ -802,6 +938,19 @@ syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,v
|
||||
" User Command Highlighting: {{{2
|
||||
syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
|
||||
|
||||
" Vim user commands
|
||||
|
||||
" Compiler plugins
|
||||
syn match vimCompilerSet "\<CompilerSet\>" skipwhite nextgroup=vimSetArgs
|
||||
|
||||
" runtime/makemenu.vim
|
||||
syn match vimSynMenu "\<SynMenu\>" skipwhite nextgroup=vimSynMenuPath
|
||||
syn match vimSynMenuPath contained ".*\ze:" nextgroup=vimSynMenuColon contains=vimMenuNotation
|
||||
syn match vimSynMenuColon contained ":" nextgroup=vimSynMenuName
|
||||
syn match vimSynMenuName contained "\w\+"
|
||||
|
||||
syn cluster vimExUserCmdList contains=vimCompilerSet,vimSynMenu
|
||||
|
||||
" Errors And Warnings: {{{2
|
||||
" ====================
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
||||
@@ -811,7 +960,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
||||
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
|
||||
endif
|
||||
|
||||
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=@vimExprList,vimNotation
|
||||
syn match vimNotFunc "\%#=1\<\%(if\|el\%[seif]\|retu\%[rn]\|while\)\>" skipwhite nextgroup=@vimExprList,vimNotation
|
||||
|
||||
" Match: {{{2
|
||||
" =====
|
||||
@@ -871,17 +1020,25 @@ syn region vimClusterName contained keepend matchgroup=vimGroupName start="\h\w*
|
||||
syn match vimGroupAdd contained keepend "\<add=" skipwhite skipnl nextgroup=vimGroupList
|
||||
syn match vimGroupRem contained keepend "\<remove=" skipwhite skipnl nextgroup=vimGroupList
|
||||
|
||||
" Syntax: foldlevel {{{2
|
||||
syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldMethod,vimSynFoldMethodError
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldmethoderror")
|
||||
syn match vimSynFoldMethodError contained "\i\+"
|
||||
" Syntax: conceal {{{2
|
||||
syn match vimSynType contained "\<conceal\>" skipwhite nextgroup=vimSynConceal,vimSynConcealError
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynconcealerror")
|
||||
syn match vimSynConcealError contained "\i\+"
|
||||
endif
|
||||
syn keyword vimSynFoldMethod contained start minimum
|
||||
syn keyword vimSynConceal contained on off
|
||||
|
||||
" Syntax: foldlevel {{{2
|
||||
syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldlevel,vimSynFoldlevelError
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldlevelerror")
|
||||
syn match vimSynFoldlevelError contained "\i\+"
|
||||
endif
|
||||
syn keyword vimSynFoldlevel contained start minimum
|
||||
|
||||
" Syntax: iskeyword {{{2
|
||||
syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimIskList
|
||||
syn match vimIskList contained '\S\+' contains=vimIskSep
|
||||
syn match vimIskSep contained ','
|
||||
syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimSynIskeyword
|
||||
syn keyword vimSynIskeyword contained clear
|
||||
syn match vimSynIskeyword contained "\S\+" contains=vimSynIskeywordSep
|
||||
syn match vimSynIskeywordSep contained ","
|
||||
|
||||
" Syntax: include {{{2
|
||||
syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
|
||||
@@ -890,13 +1047,13 @@ syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList
|
||||
syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin
|
||||
syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion
|
||||
syn region vimSynKeyRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynKeyGroup
|
||||
syn match vimSynKeyOpt contained "\%#=1\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
|
||||
syn match vimSynKeyOpt contained "\%#=1\<\%(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>"
|
||||
|
||||
" Syntax: match {{{2
|
||||
syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment
|
||||
syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion
|
||||
syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*\>" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynMtchGroup
|
||||
syn match vimSynMtchOpt contained "\%#=1\<\(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||
syn match vimSynMtchOpt contained "\%#=1\<\%(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>"
|
||||
|
||||
" Syntax: off and on {{{2
|
||||
syn keyword vimSynType contained enable list manual off on reset
|
||||
@@ -905,34 +1062,49 @@ syn keyword vimSynType contained enable list manual off on reset
|
||||
syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation
|
||||
syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp
|
||||
syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion
|
||||
syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + end="|\|$" contains=@vimSynRegGroup
|
||||
syn match vimSynRegOpt contained "\%#=1\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
|
||||
syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip=+\\\\\|\\\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=@vimSynRegGroup
|
||||
syn match vimSynRegOpt contained "\%#=1\<\%(conceal\%(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>"
|
||||
syn match vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat
|
||||
syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup
|
||||
syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip=/\\\\\|\\\z1\|\n\s*\\\|\n\s*"\\ / end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg
|
||||
syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\="
|
||||
syn match vimSynPatMod contained "\%#=1\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod
|
||||
syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\="
|
||||
syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\=," nextgroup=vimSynPatMod
|
||||
syn match vimSynPatMod contained "lc=\d\+"
|
||||
syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod
|
||||
syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]"
|
||||
syn match vimSynNotPatRange contained "\\\\\|\\\["
|
||||
syn match vimMtchComment contained '"[^"]\+$'
|
||||
|
||||
" Syntax: spell {{{2
|
||||
syn keyword vimSynType contained spell skipwhite nextgroup=vimSynSpell,vimSynSpellError
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynspellerror")
|
||||
syn match vimSynSpellError contained "\i\+"
|
||||
endif
|
||||
syn keyword vimSynSpell contained default notoplevel toplevel
|
||||
|
||||
" Syntax: sync {{{2
|
||||
" ============
|
||||
syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion
|
||||
syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncClear,vimSyncMatch,vimSyncError,vimSyncRegion,vimSyncArgs
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror")
|
||||
syn match vimSyncError contained "\i\+"
|
||||
endif
|
||||
syn keyword vimSyncC contained ccomment clear fromstart
|
||||
|
||||
syn region vimSyncArgs contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|\|$" contains=vimSyncLines,vimSyncLinebreak,vimSyncLinecont,vimSyncFromstart,vimSyncCcomment
|
||||
|
||||
syn keyword vimSyncCcomment contained ccomment skipwhite nextgroup=vimGroupName
|
||||
syn keyword vimSyncClear contained clear skipwhite nextgroup=vimSyncGroupName
|
||||
syn keyword vimSyncFromstart contained fromstart
|
||||
syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName
|
||||
syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg
|
||||
syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber
|
||||
syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynRegion
|
||||
syn match vimSyncLinebreak contained "\<linebreaks=" nextgroup=vimNumber
|
||||
syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat
|
||||
syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber
|
||||
syn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey
|
||||
syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup
|
||||
syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone
|
||||
syn match vimSyncLines contained "\<lines=" nextgroup=vimNumber
|
||||
syn match vimSyncLines contained "\<minlines=" nextgroup=vimNumber
|
||||
syn match vimSyncLines contained "\<maxlines=" nextgroup=vimNumber
|
||||
syn match vimSyncGroupName contained "\<\h\w*\>" skipwhite nextgroup=vimSyncKey
|
||||
syn match vimSyncKey contained "\<grouphere\>" skipwhite nextgroup=vimSyncGroup
|
||||
syn match vimSyncKey contained "\<groupthere\>" skipwhite nextgroup=vimSyncGroup
|
||||
syn match vimSyncGroup contained "\<\h\w*\>" skipwhite nextgroup=vimSynRegPat,vimSyncNone
|
||||
syn keyword vimSyncNone contained NONE
|
||||
|
||||
" Additional IsCommand: here by reasons of precedence {{{2
|
||||
@@ -950,6 +1122,7 @@ syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluste
|
||||
|
||||
syn match vimHiGroup contained "\i\+"
|
||||
syn case ignore
|
||||
syn keyword vimHiNone contained NONE
|
||||
syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl underdashed underdotted underdouble
|
||||
syn keyword vimFgBgAttrib contained none bg background fg foreground
|
||||
syn case match
|
||||
@@ -958,14 +1131,14 @@ syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup
|
||||
syn case ignore
|
||||
syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey grey40 grey50 grey90 lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred lightyellow magenta red seagreen white yellow
|
||||
syn match vimHiCtermColor contained "\<color\d\{1,3}\>"
|
||||
|
||||
syn case match
|
||||
|
||||
syn match vimHiFontname contained "[a-zA-Z\-*]\+"
|
||||
syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'"
|
||||
syn match vimHiGuiRgb contained "#\x\{6}"
|
||||
|
||||
" Highlighting: hi group key=arg ... {{{2
|
||||
syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment
|
||||
syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiNone,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9comment
|
||||
syn region vimHiKeyList contained start="\i\+" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*"\\ + matchgroup=vimCmdSep end="|" excludenl end="$" contains=@vimContinue,@vimHiCluster
|
||||
if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror")
|
||||
syn match vimHiKeyError contained "\i\+="he=e-1
|
||||
@@ -1010,8 +1183,8 @@ endif
|
||||
syn match vimShebang "\%^#!.*" display
|
||||
|
||||
syn match vimContinue "^\s*\zs\\"
|
||||
syn match vimContinueComment '^\s*\zs["#]\\ .*'
|
||||
syn match vim9ContinueComment "^\s*\zs#\\ .*"
|
||||
syn match vimContinueComment '^\s*\zs["#]\\ .*' extend
|
||||
syn match vim9ContinueComment "^\s*\zs#\\ .*" extend
|
||||
syn cluster vimContinue contains=vimContinue,vimContinueComment
|
||||
syn cluster vim9Continue contains=vimContinue,vim9ContinueComment
|
||||
|
||||
@@ -1269,7 +1442,12 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimShebangError vimError
|
||||
hi def link vimSubstFlagErr vimError
|
||||
hi def link vimSynCaseError vimError
|
||||
hi def link vimSynFoldMethodError vimError
|
||||
hi def link vimSyncError vimError
|
||||
hi def link vimSynConcealError vimError
|
||||
hi def link vimSynError vimError
|
||||
hi def link vimSynFoldlevelError vimError
|
||||
hi def link vimSynIskeywordError vimError
|
||||
hi def link vimSynSpellError vimError
|
||||
hi def link vimBufnrWarn vimWarn
|
||||
|
||||
hi def link vim9TypeAliasError vimError
|
||||
@@ -1301,10 +1479,12 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimConst vimCommand
|
||||
hi def link vimContinue Special
|
||||
hi def link vimContinueComment vimComment
|
||||
hi def link vimCount Number
|
||||
hi def link vimCtrlChar SpecialChar
|
||||
hi def link vimDebuggreedy vimCommand
|
||||
hi def link vimDefComment vim9Comment
|
||||
hi def link vimDefKey vimCommand
|
||||
hi def link vimDefParam vimVar
|
||||
hi def link vimDefParam vimVar
|
||||
hi def link vimDelcommand vimCommand
|
||||
hi def link vimDelcommandAttr vimUserCmdAttr
|
||||
hi def link vimEcho vimCommand
|
||||
@@ -1320,6 +1500,8 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimFgBgAttrib vimHiAttrib
|
||||
hi def link vimFuncEcho vimCommand
|
||||
hi def link vimFor vimCommand
|
||||
hi def link vimForInContinue vimContinue
|
||||
hi def link vimForInContinueComment vimContinueComment
|
||||
hi def link vimFTCmd vimCommand
|
||||
hi def link vimFTOption vimSynType
|
||||
hi def link vimFuncBang vimBang
|
||||
@@ -1329,10 +1511,10 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimFuncMod Special
|
||||
hi def link vimFuncParam vimVar
|
||||
hi def link vimFuncParamEquals vimOper
|
||||
hi def link vimFuncSID Special
|
||||
hi def link vimFuncVar Identifier
|
||||
hi def link vimFuncScope vimVarScope
|
||||
hi def link vimFuncSID vimNotation
|
||||
hi def link vimGroupAdd vimSynOption
|
||||
hi def link vimGroupName vimGroup
|
||||
hi def link vimGroupName Normal
|
||||
hi def link vimGroupRem vimSynOption
|
||||
hi def link vimGroupSpecial Special
|
||||
hi def link vimGroup Type
|
||||
@@ -1351,14 +1533,15 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimHiGuiRgb vimNumber
|
||||
hi def link vimHiGui vimHiTerm
|
||||
hi def link vimHiNmbr Number
|
||||
hi def link vimHiNone vimGroup
|
||||
hi def link vimHiStartStop vimHiTerm
|
||||
hi def link vimHiTerm Type
|
||||
hi def link vimHLGroup vimGroup
|
||||
hi def link vimInsert vimString
|
||||
hi def link vimIskSep Delimiter
|
||||
hi def link vim9KeymapLineComment vimKeymapLineComment
|
||||
hi def link vimKeymapLineComment vimComment
|
||||
hi def link vimKeymapTailComment vimComment
|
||||
hi def link vimLambdaOperator vimOper
|
||||
hi def link vimLet vimCommand
|
||||
hi def link vimLetHereDoc vimString
|
||||
hi def link vimLetHereDocStart Special
|
||||
@@ -1366,6 +1549,8 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimLetRegister Special
|
||||
hi def link vimLineComment vimComment
|
||||
hi def link vimMapBang vimBang
|
||||
hi def link vimMapLeader vimBracket
|
||||
hi def link vimMapLeaderKey vimNotation
|
||||
hi def link vimMapModKey vimFuncSID
|
||||
hi def link vimMapMod vimBracket
|
||||
hi def link vimMap vimCommand
|
||||
@@ -1392,7 +1577,11 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimNumber Number
|
||||
hi def link vimOperError Error
|
||||
hi def link vimOper Operator
|
||||
hi def link vimOperContinue vimContinue
|
||||
hi def link vimOperContinueComment vimContinueComment
|
||||
hi def link vimOption PreProc
|
||||
hi def link vimOptionVar Identifier
|
||||
hi def link vimOptionVarName Identifier
|
||||
hi def link vimParenSep Delimiter
|
||||
hi def link vimPatSepErr vimError
|
||||
hi def link vimPatSepR vimPatSep
|
||||
@@ -1432,31 +1621,38 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimSubstSubstr SpecialChar
|
||||
hi def link vimSubstTwoBS vimString
|
||||
hi def link vimSubst vimCommand
|
||||
hi def link vimSynCaseError Error
|
||||
hi def link vimSynCase Type
|
||||
hi def link vimSyncC Type
|
||||
hi def link vimSyncError Error
|
||||
hi def link vimSyncGroupName vimGroupName
|
||||
hi def link vimSyncGroup vimGroupName
|
||||
hi def link vimSyncKey Type
|
||||
hi def link vimSyncNone Type
|
||||
hi def link vimSynContains vimSynOption
|
||||
hi def link vimSynError Error
|
||||
hi def link vimSynFoldMethodError Error
|
||||
hi def link vimSynFoldMethod Type
|
||||
hi def link vimSynKeyContainedin vimSynContains
|
||||
hi def link vimSynKeyOpt vimSynOption
|
||||
hi def link vimSyncCcomment Type
|
||||
hi def link vimSynCchar vimSynOption
|
||||
hi def link vimSynCcharValue Character
|
||||
hi def link vimSyncClear Type
|
||||
hi def link vimSyncFromstart Type
|
||||
hi def link vimSyncGroup vimGroupName
|
||||
hi def link vimSyncGroupName vimGroupName
|
||||
hi def link vimSyncKey Type
|
||||
hi def link vimSyncLinebreak Type
|
||||
hi def link vimSyncLinecont Type
|
||||
hi def link vimSyncLines Type
|
||||
hi def link vimSyncMatch Type
|
||||
hi def link vimSyncNone Type
|
||||
hi def link vimSynConceal Type
|
||||
hi def link vimSynContains vimSynOption
|
||||
hi def link vimSyncRegion Type
|
||||
hi def link vimSynFoldlevel Type
|
||||
hi def link vimSynIskeyword Type
|
||||
hi def link vimSynIskeywordSep Delimiter
|
||||
hi def link vimSynKeyContainedin vimSynContains
|
||||
hi def link vimSynKeyOpt vimSynOption
|
||||
hi def link vimSynMtchGrp vimSynOption
|
||||
hi def link vimSynMtchOpt vimSynOption
|
||||
hi def link vimSynNextgroup vimSynOption
|
||||
hi def link vimSynNotPatRange vimSynRegPat
|
||||
hi def link vimSynOption Special
|
||||
hi def link vimSynPatRange vimString
|
||||
hi def link vimSynReg Type
|
||||
hi def link vimSynRegOpt vimSynOption
|
||||
hi def link vimSynRegPat vimString
|
||||
hi def link vimSynReg Type
|
||||
hi def link vimSynSpell Type
|
||||
hi def link vimSyntax vimCommand
|
||||
hi def link vimSynType vimSpecial
|
||||
hi def link vimThrow vimCommand
|
||||
@@ -1475,7 +1671,10 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vimUserCmdError Error
|
||||
hi def link vimUserCmdKey vimCommand
|
||||
hi def link vimUserFunc Normal
|
||||
hi def link vimVar Identifier
|
||||
hi def link vimVar Normal
|
||||
hi def link vimVarScope Identifier
|
||||
hi def link vimVimVar Identifier
|
||||
hi def link vimVimVarName Identifier
|
||||
hi def link vimWarn WarningMsg
|
||||
|
||||
hi def link vim9Abstract vimCommand
|
||||
@@ -1484,6 +1683,7 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vim9Comment Comment
|
||||
hi def link vim9CommentError vimError
|
||||
hi def link vim9CommentTitle PreProc
|
||||
hi def link vim9ConstructorDefParam vimVar
|
||||
hi def link vim9Const vimCommand
|
||||
hi def link vim9ContinueComment vimContinueComment
|
||||
hi def link vim9Enum vimCommand
|
||||
@@ -1491,9 +1691,15 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vim9Extends Keyword
|
||||
hi def link vim9Final vimCommand
|
||||
hi def link vim9For vimCommand
|
||||
hi def link vim9ForInComment vim9Comment
|
||||
hi def link vim9Implements Keyword
|
||||
hi def link vim9AbstractDef vimCommand
|
||||
hi def link vim9Interface vimCommand
|
||||
hi def link vim9LambdaOperator vimOper
|
||||
hi def link vim9LambdaOperatorComment vim9Comment
|
||||
hi def link vim9LambdaParamsParen vimParenSep
|
||||
hi def link vim9LhsRegister vimLetRegister
|
||||
hi def link vim9LhsVariable vimVar
|
||||
hi def link vim9LineComment vimComment
|
||||
hi def link vim9MethodDef vimCommand
|
||||
hi def link vim9MethodNameError vimFunctionError
|
||||
@@ -1510,6 +1716,10 @@ if !exists("skip_vim_syntax_inits")
|
||||
hi def link vim9Var vimCommand
|
||||
hi def link vim9Vim9ScriptArg Special
|
||||
hi def link vim9Vim9Script vimCommand
|
||||
|
||||
hi def link vimCompilerSet vimCommand
|
||||
hi def link vimSynMenu vimCommand
|
||||
hi def link vimSynMenuPath vimMenuName
|
||||
endif
|
||||
|
||||
" Current Syntax Variable: {{{2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Lua 4.0, Lua 5.0, Lua 5.1, Lua 5.2 and Lua 5.3
|
||||
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com>
|
||||
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br>
|
||||
" Last Change: 2022 Sep 07
|
||||
" Last Change: 2025 Feb 25
|
||||
" Options: lua_version = 4 or 5
|
||||
" lua_subversion = 0 (for 4.0 or 5.0)
|
||||
" or 1, 2, 3 (for 5.1, 5.2 or 5.3)
|
||||
@@ -16,6 +16,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" keep in sync with ftplugin/lua.vim
|
||||
if !exists("lua_version")
|
||||
" Default is lua 5.3
|
||||
let lua_version = 5
|
||||
|
||||
28
runtime/syntax/m17ndb.vim
Normal file
28
runtime/syntax/m17ndb.vim
Normal file
@@ -0,0 +1,28 @@
|
||||
" Vim syntax file
|
||||
" Language: m17n database
|
||||
" Maintainer: David Mandelberg <david@mandelberg.org>
|
||||
" Last Change: 2025 Feb 21
|
||||
"
|
||||
" https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
|
||||
" syntax, but some of its regexes don't match the code. read_element() in
|
||||
" https://git.savannah.nongnu.org/cgit/m17n/m17n-lib.git/tree/src/plist.c
|
||||
" seems to be a better place to understand the syntax.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = "m17ndb"
|
||||
|
||||
syn match m17ndbSymbol /\([^\x00- ()"\\]\|\\\_.\)\+/
|
||||
syn match m17ndbComment ";.*$" contains=@Spell
|
||||
syn match m17ndbInteger "-\?[0-9]\+"
|
||||
syn match m17ndbInteger "[0#]x[0-9A-Fa-f]\+"
|
||||
syn match m17ndbCharacter "?\(\_[^\\]\|\\\_.\)"
|
||||
syn region m17ndbText start=/\Z"/ skip=/\\\\\|\\"/ end=/"/
|
||||
syn region m17ndbPlist matchgroup=m17ndbParen start="(" end=")" fold contains=ALL
|
||||
|
||||
hi def link m17ndbCharacter Character
|
||||
hi def link m17ndbComment Comment
|
||||
hi def link m17ndbInteger Number
|
||||
hi def link m17ndbParen Delimiter
|
||||
hi def link m17ndbText String
|
||||
@@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com)
|
||||
" Previous Maintainer: C. Laurence Gonsalves (clgonsal@kami.com)
|
||||
" URL: https://github.com/lee-lindley/vim_plsql_syntax
|
||||
" Last Change: Sep 19, 2022
|
||||
" Last Change: Mar 09, 2025
|
||||
" History Carsten Czarski (carsten dot czarski at oracle com)
|
||||
" add handling for typical SQL*Plus commands (rem, start, host, set, etc)
|
||||
" add error highlight for non-breaking space
|
||||
@@ -694,7 +694,6 @@ syn region plsqlSqlPlusCommand start="^\(SET\|DEFINE\|PROMPT\|ACCEPT\|EXEC\|HOS
|
||||
syn region plsqlSqlPlusRunFile start="^\(@\|@@\)" skip="\\$" end="$" keepend extend
|
||||
|
||||
if get(g:,"plsql_fold",0) == 1
|
||||
setlocal foldmethod=syntax
|
||||
syn sync fromstart
|
||||
|
||||
syn cluster plsqlProcedureGroup contains=plsqlProcedure
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Quickfix window
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Language: Quickfix window
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Feb 07
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
@@ -9,16 +9,23 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" A bunch of useful C keywords
|
||||
syn match qfFileName "^[^|]*" nextgroup=qfSeparator
|
||||
syn match qfSeparator "|" nextgroup=qfLineNr contained
|
||||
syn match qfLineNr "[^|]*" contained contains=qfError
|
||||
syn match qfError "error" contained
|
||||
syn match qfFileName "^[^|]*" nextgroup=qfSeparator1
|
||||
syn match qfSeparator1 "|" contained nextgroup=qfLineNr
|
||||
syn match qfLineNr "[^|]*" contained nextgroup=qfSeparator2 contains=@qfType
|
||||
syn match qfSeparator2 "|" contained nextgroup=qfText
|
||||
syn match qfText ".*" contained
|
||||
|
||||
syn match qfError "error" contained
|
||||
syn cluster qfType contains=qfError
|
||||
|
||||
" The default highlighting.
|
||||
hi def link qfFileName Directory
|
||||
hi def link qfLineNr LineNr
|
||||
hi def link qfError Error
|
||||
hi def link qfFileName Directory
|
||||
hi def link qfLineNr LineNr
|
||||
hi def link qfSeparator1 Delimiter
|
||||
hi def link qfSeparator2 Delimiter
|
||||
hi def link qfText Normal
|
||||
|
||||
hi def link qfError Error
|
||||
|
||||
let b:current_syntax = "qf"
|
||||
|
||||
|
||||
94
runtime/syntax/tera.vim
Normal file
94
runtime/syntax/tera.vim
Normal file
@@ -0,0 +1,94 @@
|
||||
" Vim syntax file
|
||||
" Language: Tera
|
||||
" Maintainer: Muntasir Mahmud <muntasir.joypurhat@gmail.com>
|
||||
" Last Change: 2025 Mar 11
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Detect the underlying language based on filename pattern
|
||||
" For files like file.html.tera, we want to load html syntax
|
||||
let s:filename = expand("%:t")
|
||||
let s:dotpos = strridx(s:filename, '.', strridx(s:filename, '.tera') - 1)
|
||||
let s:underlying_filetype = ""
|
||||
|
||||
if s:dotpos != -1
|
||||
let s:underlying_ext = s:filename[s:dotpos+1:strridx(s:filename, '.tera')-1]
|
||||
if s:underlying_ext != "" && s:underlying_ext != "tera"
|
||||
let s:underlying_filetype = s:underlying_ext
|
||||
endif
|
||||
endif
|
||||
|
||||
" Load the underlying language syntax if detected
|
||||
if s:underlying_filetype != ""
|
||||
execute "runtime! syntax/" . s:underlying_filetype . ".vim"
|
||||
unlet! b:current_syntax
|
||||
else
|
||||
" Default to HTML if no specific language detected
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
endif
|
||||
|
||||
" Tera comment blocks: {# comment #}
|
||||
syn region teraCommentBlock start="{#" end="#}" contains=@Spell
|
||||
|
||||
" Tera statements: {% if condition %}
|
||||
syn region teraStatement start="{%" end="%}" contains=teraKeyword,teraString,teraNumber,teraFunction,teraBoolean,teraFilter,teraOperator
|
||||
|
||||
" Tera expressions: {{ variable }}
|
||||
syn region teraExpression start="{{" end="}}" contains=teraString,teraNumber,teraFunction,teraBoolean,teraFilter,teraOperator,teraIdentifier
|
||||
|
||||
" Special handling for raw blocks - content inside shouldn't be processed
|
||||
syn region teraRawBlock start="{% raw %}" end="{% endraw %}" contains=TOP,teraCommentBlock,teraStatement,teraExpression
|
||||
|
||||
" Control structure keywords
|
||||
syn keyword teraKeyword contained if else elif endif for endfor in macro endmacro
|
||||
syn keyword teraKeyword contained block endblock extends include import set endset
|
||||
syn keyword teraKeyword contained break continue filter endfilter raw endraw
|
||||
|
||||
" Identifiers - define before operators for correct priority
|
||||
syn match teraIdentifier contained "\<\w\+\>"
|
||||
|
||||
" Operators used in expressions and statements
|
||||
syn match teraOperator contained "==\|!=\|>=\|<=\|>\|<\|+\|-\|*\|/"
|
||||
syn match teraOperator contained "{\@<!%}\@!" " Match % but not when part of {% or %}
|
||||
syn keyword teraOperator contained and or not is as
|
||||
|
||||
" Functions and filters
|
||||
syn match teraFunction contained "\<\w\+\ze("
|
||||
syn match teraFilter contained "|\_s*\w\+"
|
||||
|
||||
" String literals - both single and double quoted
|
||||
syn region teraString contained start=+"+ skip=+\\"+ end=+"+ contains=@Spell
|
||||
syn region teraString contained start=+'+ skip=+\\'+ end=+'+ contains=@Spell
|
||||
|
||||
" Numeric literals - both integer and float
|
||||
syn match teraNumber contained "\<\d\+\>"
|
||||
syn match teraNumber contained "\<\d\+\.\d\+\>"
|
||||
|
||||
" Boolean values
|
||||
syn keyword teraBoolean contained true false
|
||||
|
||||
" Highlighting links
|
||||
hi def link teraCommentBlock Comment
|
||||
hi def link teraKeyword Statement
|
||||
hi def link teraOperator Operator
|
||||
hi def link teraFunction Function
|
||||
hi def link teraIdentifier Identifier
|
||||
hi def link teraString String
|
||||
hi def link teraNumber Number
|
||||
hi def link teraBoolean Boolean
|
||||
hi def link teraFilter Function
|
||||
hi def link teraStatement Statement
|
||||
hi def link teraExpression Statement
|
||||
|
||||
" Clean up script-local variables
|
||||
unlet s:filename
|
||||
unlet s:dotpos
|
||||
if exists("s:underlying_ext")
|
||||
unlet s:underlying_ext
|
||||
endif
|
||||
unlet s:underlying_filetype
|
||||
|
||||
let b:current_syntax = "tera"
|
||||
@@ -67,8 +67,8 @@ If there is no further setup required, you can now run all tests:
|
||||
|
||||
make test
|
||||
|
||||
Or you can run the tests for a filetype only by passing its file extension as
|
||||
another target, e.g. "java", before "test":
|
||||
Or you can run the tests for a filetype only by passing its name as another
|
||||
target, e.g. "java", before "test":
|
||||
|
||||
make java test
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user