Compare commits
245 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ae0057308 | ||
|
|
ffdaca9e6f | ||
|
|
148bcd3610 | ||
|
|
bb393d8259 | ||
|
|
ffa4e9b43a | ||
|
|
98aeb2100c | ||
|
|
3f8f827723 | ||
|
|
d28d7b94f5 | ||
|
|
e5eae82bb7 | ||
|
|
83c43ab319 | ||
|
|
b9603f6498 | ||
|
|
00b28d6c23 | ||
|
|
038e6d20e6 | ||
|
|
84dbf855fb | ||
|
|
1881abfc34 | ||
|
|
647b8dfa7f | ||
|
|
2e613453ee | ||
|
|
3fc84dc2c7 | ||
|
|
86b4816766 | ||
|
|
5e0c004f0c | ||
|
|
a8cdb4eef8 | ||
|
|
af34543b92 | ||
|
|
d6e74f5479 | ||
|
|
6572a90287 | ||
|
|
56a40fea9c | ||
|
|
7155fb6614 | ||
|
|
9dacdb1d56 | ||
|
|
1cb16c3a20 | ||
|
|
f0a9c00482 | ||
|
|
25201016d5 | ||
|
|
0a2f891adf | ||
|
|
fa2533c8bb | ||
|
|
99d19438ca | ||
|
|
23526d2539 | ||
|
|
72b5b0d51a | ||
|
|
6cf3151f0e | ||
|
|
c216a7a21a | ||
|
|
65214053f6 | ||
|
|
d0f8d39d20 | ||
|
|
a0a6f3a22a | ||
|
|
3d3e2aa826 | ||
|
|
9163efb5b8 | ||
|
|
c1c365c1ca | ||
|
|
b21b8e9ed0 | ||
|
|
c0370529c0 | ||
|
|
1b73edd9ee | ||
|
|
8ffb7e051d | ||
|
|
af19ec0bfa | ||
|
|
37f088eead | ||
|
|
267db7c3e3 | ||
|
|
89469d157a | ||
|
|
500c444283 | ||
|
|
c67c89c758 | ||
|
|
c96b7f5d2a | ||
|
|
9c8d12c811 | ||
|
|
b55ae8ce42 | ||
|
|
cf650b7c9b | ||
|
|
5390c05a3c | ||
|
|
1a173409ae | ||
|
|
023930d62e | ||
|
|
184a622ada | ||
|
|
45e4eead2a | ||
|
|
c3f1881aed | ||
|
|
733a69b29f | ||
|
|
4f501171f7 | ||
|
|
3b8c7083b2 | ||
|
|
4c5678ff0c | ||
|
|
a87749e3ea | ||
|
|
7c02ad9f89 | ||
|
|
dffa6ea85c | ||
|
|
064fd67e6a | ||
|
|
4e6072b8d3 | ||
|
|
6f2a227565 | ||
|
|
3719989431 | ||
|
|
28a896f54d | ||
|
|
c13e998d4a | ||
|
|
84497cd06f | ||
|
|
f86490ed4f | ||
|
|
e76062c078 | ||
|
|
74a694dbe2 | ||
|
|
269aa2b29a | ||
|
|
38854b565a | ||
|
|
3da8597fc0 | ||
|
|
502e91756e | ||
|
|
8b336a6614 | ||
|
|
19cf525c20 | ||
|
|
64fabf3802 | ||
|
|
9f14557d6a | ||
|
|
cc0907165d | ||
|
|
c255b78965 | ||
|
|
837ca8f43b | ||
|
|
f3f198b634 | ||
|
|
01105b37a1 | ||
|
|
c96311b5be | ||
|
|
ef2c325f5e | ||
|
|
c1cf4c9107 | ||
|
|
cc762a48d4 | ||
|
|
ad85af5b38 | ||
|
|
637862fc3c | ||
|
|
6ac16f0c0f | ||
|
|
d330e8422d | ||
|
|
f60bdc3417 | ||
|
|
1273dfb015 | ||
|
|
ebed1b0bea | ||
|
|
47f1fdc28c | ||
|
|
0b228cddc7 | ||
|
|
e2da59851a | ||
|
|
82946e1439 | ||
|
|
24482fbfd5 | ||
|
|
24fe33a83a | ||
|
|
b59ae59a58 | ||
|
|
43300f6034 | ||
|
|
ecfd511e8d | ||
|
|
36446bbb62 | ||
|
|
63a2e360cc | ||
|
|
0b6d6a186e | ||
|
|
1d822afaf6 | ||
|
|
96cbbe29de | ||
|
|
bc222152d8 | ||
|
|
df3c0eb41e | ||
|
|
c3e06e4bfa | ||
|
|
a787c24e00 | ||
|
|
364438d1e8 | ||
|
|
9af2ea80a8 | ||
|
|
b775e72439 | ||
|
|
9c5b7cb4cf | ||
|
|
0319306f20 | ||
|
|
35fc61cb5b | ||
|
|
ce30ccc06a | ||
|
|
2996773276 | ||
|
|
228e422855 | ||
|
|
0a60f79fd0 | ||
|
|
c896adbcde | ||
|
|
e6392b1021 | ||
|
|
c934bfa1b7 | ||
|
|
9fda81515b | ||
|
|
361895d2a1 | ||
|
|
d63a85592c | ||
|
|
ff95ce0930 | ||
|
|
02edfaa610 | ||
|
|
88456cd3c4 | ||
|
|
d13166e788 | ||
|
|
236dffab43 | ||
|
|
696d0a8625 | ||
|
|
0c34d56264 | ||
|
|
81ba26e9de | ||
|
|
4654d63dec | ||
|
|
75ac25b496 | ||
|
|
12babe45a3 | ||
|
|
1d8765daba | ||
|
|
780154bf7a | ||
|
|
ee28c707e4 | ||
|
|
01ee52bab6 | ||
|
|
f32fb93e43 | ||
|
|
fc1b2d0961 | ||
|
|
1573e73f1c | ||
|
|
8303035d67 | ||
|
|
f10952e8c0 | ||
|
|
a44c7811ff | ||
|
|
44c2209352 | ||
|
|
b53a190e9f | ||
|
|
cdeb65729d | ||
|
|
698a00f55d | ||
|
|
c3d27ada14 | ||
|
|
24dc19cdb2 | ||
|
|
161b6ac04f | ||
|
|
dcbdd82d05 | ||
|
|
b298fe6cba | ||
|
|
cf2594fbf3 | ||
|
|
68353e5270 | ||
|
|
398a26f7fc | ||
|
|
920d311480 | ||
|
|
bf533e4e88 | ||
|
|
623e94e138 | ||
|
|
3b014befa0 | ||
|
|
2f7bfe66a1 | ||
|
|
28c56d5013 | ||
|
|
1140b51e83 | ||
|
|
d6e91385f0 | ||
|
|
f7570f2107 | ||
|
|
b3052aa1b5 | ||
|
|
6600447c7b | ||
|
|
4c8d2f02b3 | ||
|
|
0aad88f073 | ||
|
|
9954dc39ea | ||
|
|
a20be06f97 | ||
|
|
fd3084b6e2 | ||
|
|
f00112d558 | ||
|
|
37f1030fd6 | ||
|
|
d55bfcaa9b | ||
|
|
09a93e3e66 | ||
|
|
7265851b2b | ||
|
|
98aebcc2c6 | ||
|
|
90e66ec1e1 | ||
|
|
1d139a012e | ||
|
|
38804d6457 | ||
|
|
157241e879 | ||
|
|
76db9e0763 | ||
|
|
0fd7be7f95 | ||
|
|
80613d64e6 | ||
|
|
f220643c26 | ||
|
|
4e7590ec00 | ||
|
|
7b224fdf4a | ||
|
|
1756f4b218 | ||
|
|
0e364c9fca | ||
|
|
7af3ee2b83 | ||
|
|
adbc08fd69 | ||
|
|
69a8bb8dc1 | ||
|
|
a25f718431 | ||
|
|
cd9c8d400c | ||
|
|
91c75d18d9 | ||
|
|
845bbb72ed | ||
|
|
f8ea10677d | ||
|
|
25b8420c2b | ||
|
|
5a5f17f9b3 | ||
|
|
6c3d3e6904 | ||
|
|
5375205761 | ||
|
|
3d19c81a11 | ||
|
|
c57b5bcd22 | ||
|
|
1410d1841b | ||
|
|
3af982196b | ||
|
|
8e0ccb6bc2 | ||
|
|
873f41a018 | ||
|
|
7a7db047dc | ||
|
|
8ab9ca93ee | ||
|
|
86e6717ace | ||
|
|
03d6e6f42b | ||
|
|
1577537f10 | ||
|
|
6ebe4f970b | ||
|
|
3f68a4136e | ||
|
|
72c8e3c070 | ||
|
|
f0b567e32a | ||
|
|
ad353244f2 | ||
|
|
fb0cf2357e | ||
|
|
9c50eeb401 | ||
|
|
436e5d395f | ||
|
|
4bc85f23ed | ||
|
|
7fa02bcb3b | ||
|
|
2435adf8eb | ||
|
|
5b2a3d77d3 | ||
|
|
63c84731c1 | ||
|
|
6c8bc37a10 | ||
|
|
d5337efece | ||
|
|
49660f5139 | ||
|
|
d0fab10ed2 |
@@ -8,9 +8,9 @@ freebsd_task:
|
||||
- name: FreeBSD 13.1
|
||||
freebsd_instance:
|
||||
image_family: freebsd-13-1
|
||||
- name: FreeBSD 12.3
|
||||
- name: FreeBSD 12.4
|
||||
freebsd_instance:
|
||||
image_family: freebsd-12-3
|
||||
image_family: freebsd-12-4
|
||||
timeout_in: 20m
|
||||
install_script:
|
||||
- pkg update -f
|
||||
|
||||
5
.github/CODEOWNERS
vendored
5
.github/CODEOWNERS
vendored
@@ -104,6 +104,7 @@ runtime/doc/pi_vimball.txt @cecamp
|
||||
runtime/doc/pi_zip.txt @cecamp
|
||||
runtime/doc/ps1.txt @heaths
|
||||
runtime/ftplugin/abaqus.vim @costerwi
|
||||
runtime/ftplugin/apache.vim @dubgeiser
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
@@ -166,6 +167,7 @@ runtime/ftplugin/nginx.vim @chr4
|
||||
runtime/ftplugin/nroff.vim @a-vrma
|
||||
runtime/ftplugin/nsis.vim @k-takata
|
||||
runtime/ftplugin/octave.vim @dkearns
|
||||
runtime/ftplugin/openvpn.vim @ObserverOfTime
|
||||
runtime/ftplugin/pascal.vim @dkearns
|
||||
runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
@@ -294,6 +296,7 @@ runtime/plugin/netrwPlugin.vim @cecamp
|
||||
runtime/plugin/tarPlugin.vim @cecamp
|
||||
runtime/plugin/vimballPlugin.vim @cecamp
|
||||
runtime/plugin/zipPlugin.vim @cecamp
|
||||
runtime/plugin/manpager.vim @Konfekt
|
||||
runtime/syntax/abaqus.vim @costerwi
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
@@ -360,6 +363,7 @@ runtime/syntax/haml.vim @tpope
|
||||
runtime/syntax/hare.vim @rsaihe
|
||||
runtime/syntax/haskell.vim @coot
|
||||
runtime/syntax/hgcommit.vim @k-takata
|
||||
runtime/syntax/hollywood.vim @sodero
|
||||
runtime/syntax/html.vim @dkearns
|
||||
runtime/syntax/i3config.vim @hiqua
|
||||
runtime/syntax/icon.vim @dkearns
|
||||
@@ -392,6 +396,7 @@ runtime/syntax/nginx.vim @chr4
|
||||
runtime/syntax/ninja.vim @nico
|
||||
runtime/syntax/nroff.vim @jmarshall
|
||||
runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/openvpn.vim @ObserverOfTime
|
||||
runtime/syntax/pascal.vim @dkearns
|
||||
runtime/syntax/pbtxt.vim @lakshayg
|
||||
runtime/syntax/pdf.vim @tpope
|
||||
|
||||
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
@@ -174,22 +174,23 @@ jobs:
|
||||
sudo usermod -a -G audio "${USER}"
|
||||
sudo bash ci/setup-xvfb.sh
|
||||
|
||||
- name: Cache snd-dummy
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.SND_DUMMY_DIR }}
|
||||
key: linux-${{ env.LINUX_VERSION }}-snd-dummy
|
||||
# FIXME: Temporarily disabled because of build errors
|
||||
#- name: Cache snd-dummy
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: ${{ env.SND_DUMMY_DIR }}
|
||||
# key: linux-${{ env.LINUX_VERSION }}-snd-dummy
|
||||
|
||||
- name: Set up snd-dummy
|
||||
run: |
|
||||
if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
|
||||
bash ci/build-snd-dummy.sh
|
||||
fi
|
||||
cd "${SND_DUMMY_DIR}"
|
||||
sudo insmod soundcore.ko
|
||||
sudo insmod snd.ko
|
||||
sudo insmod snd-pcm.ko
|
||||
sudo insmod snd-dummy.ko
|
||||
#- name: Set up snd-dummy
|
||||
# run: |
|
||||
# if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
|
||||
# bash ci/build-snd-dummy.sh
|
||||
# fi
|
||||
# cd "${SND_DUMMY_DIR}"
|
||||
# sudo insmod soundcore.ko
|
||||
# sudo insmod snd.ko
|
||||
# sudo insmod snd-pcm.ko
|
||||
# sudo insmod snd-dummy.ko
|
||||
|
||||
- name: Check autoconf
|
||||
if: contains(matrix.extra, 'unittests')
|
||||
@@ -401,6 +402,9 @@ jobs:
|
||||
id: init
|
||||
shell: bash
|
||||
run: |
|
||||
# Show Windows version
|
||||
cmd /c ver
|
||||
|
||||
git config --global core.autocrlf input
|
||||
|
||||
if [ "${{ matrix.arch }}" = "x64" ]; then
|
||||
@@ -422,9 +426,9 @@ jobs:
|
||||
echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
|
||||
if [ "${{ matrix.features }}" != "TINY" ]; then
|
||||
if [ "${{ matrix.arch }}" = "x86" ]; then
|
||||
choco install python2 --forcex86
|
||||
choco install python2 --no-progress --forcex86
|
||||
else
|
||||
choco install python2
|
||||
choco install python2 --no-progress
|
||||
fi
|
||||
fi
|
||||
python3_dir=$(cat "/proc/$cygreg/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}$pyreg/InstallPath/@")
|
||||
|
||||
11
.github/workflows/coverity.yml
vendored
11
.github/workflows/coverity.yml
vendored
@@ -15,20 +15,22 @@ jobs:
|
||||
CC: gcc
|
||||
CFLAGS: -Wno-deprecated-declarations
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
if: env.TOKEN
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Coverity
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz
|
||||
mkdir cov-scan
|
||||
tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
|
||||
- name: Install packages
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
sudo apt update && sudo apt install -y \
|
||||
autoconf \
|
||||
@@ -47,6 +49,7 @@ jobs:
|
||||
libsodium-dev
|
||||
|
||||
- name: Set up environment
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
|
||||
(
|
||||
@@ -55,6 +58,7 @@ jobs:
|
||||
) >> $GITHUB_ENV
|
||||
|
||||
- name: Configure
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
./configure --with-features=huge ${CONFOPT} --enable-fail-if-missing
|
||||
# Append various warning flags to CFLAGS.
|
||||
@@ -62,10 +66,12 @@ jobs:
|
||||
sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
|
||||
|
||||
- name: Build/scan vim
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
cov-build --dir cov-int make -j${NPROC}
|
||||
|
||||
- name: Submit results
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
tar zcf cov-scan.tgz cov-int
|
||||
curl --form token=$TOKEN \
|
||||
@@ -75,5 +81,4 @@ jobs:
|
||||
--form description="Automatic GHA scan" \
|
||||
'https://scan.coverity.com/builds?project=vim'
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Format of this file: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file
|
||||
path_classifiers:
|
||||
documentation:
|
||||
- runtime/tutor/tutor*
|
||||
13
Filelist
13
Filelist
@@ -12,9 +12,9 @@ SRC_ALL = \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/workflows/coverity.yml \
|
||||
.github/dependabot.yml \
|
||||
.gitignore \
|
||||
.hgignore \
|
||||
.lgtm.yml \
|
||||
.appveyor.yml \
|
||||
.codecov.yml \
|
||||
ci/appveyor.bat \
|
||||
@@ -87,10 +87,11 @@ SRC_ALL = \
|
||||
src/job.c \
|
||||
src/json.c \
|
||||
src/json_test.c \
|
||||
src/keymap.h \
|
||||
src/kword_test.c \
|
||||
src/list.c \
|
||||
src/locale.c \
|
||||
src/keymap.h \
|
||||
src/logfile.c \
|
||||
src/macros.h \
|
||||
src/main.c \
|
||||
src/map.c \
|
||||
@@ -161,6 +162,7 @@ SRC_ALL = \
|
||||
src/version.h \
|
||||
src/vim.h \
|
||||
src/vim9.h \
|
||||
src/vim9class.c \
|
||||
src/vim9cmds.c \
|
||||
src/vim9compile.c \
|
||||
src/vim9execute.c \
|
||||
@@ -177,6 +179,8 @@ SRC_ALL = \
|
||||
src/testdir/Make_all.mak \
|
||||
src/testdir/*.in \
|
||||
src/testdir/*.py \
|
||||
src/testdir/keycode_check.vim \
|
||||
src/testdir/keycode_check.json \
|
||||
src/testdir/lsan-suppress.txt \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
|
||||
@@ -271,6 +275,7 @@ SRC_ALL = \
|
||||
src/proto/json.pro \
|
||||
src/proto/list.pro \
|
||||
src/proto/locale.pro \
|
||||
src/proto/logfile.pro \
|
||||
src/proto/main.pro \
|
||||
src/proto/map.pro \
|
||||
src/proto/mark.pro \
|
||||
@@ -322,6 +327,7 @@ SRC_ALL = \
|
||||
src/proto/usercmd.pro \
|
||||
src/proto/userfunc.pro \
|
||||
src/proto/version.pro \
|
||||
src/proto/vim9class.pro \
|
||||
src/proto/vim9cmds.pro \
|
||||
src/proto/vim9compile.pro \
|
||||
src/proto/vim9execute.pro \
|
||||
@@ -394,6 +400,7 @@ SRC_ALL = \
|
||||
src/libvterm/t/66screen_extent.test \
|
||||
src/libvterm/t/67screen_dbl_wh.test \
|
||||
src/libvterm/t/68screen_termprops.test \
|
||||
src/libvterm/t/69screen_reflow.test \
|
||||
src/libvterm/t/90vttest_01-movement-1.test \
|
||||
src/libvterm/t/90vttest_01-movement-2.test \
|
||||
src/libvterm/t/90vttest_01-movement-3.test \
|
||||
@@ -641,6 +648,7 @@ SRC_MAC = \
|
||||
src/os_mac_conv.c \
|
||||
src/os_macosx.m \
|
||||
src/proto/os_mac_conv.pro \
|
||||
src/proto/os_macosx.pro \
|
||||
|
||||
# source files for VMS (in the extra archive)
|
||||
SRC_VMS = \
|
||||
@@ -775,6 +783,7 @@ RT_SCRIPTS = \
|
||||
runtime/autoload/README.txt \
|
||||
runtime/autoload/dist/*.vim \
|
||||
runtime/autoload/xml/*.vim \
|
||||
runtime/autoload/zig/*.vim \
|
||||
runtime/colors/*.vim \
|
||||
runtime/colors/README.txt \
|
||||
runtime/colors/lists/*.vim \
|
||||
|
||||
5
runtime/autoload/dist/ft.vim
vendored
5
runtime/autoload/dist/ft.vim
vendored
@@ -3,7 +3,7 @@ vim9script
|
||||
# Vim functions for file type detection
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Apr 13
|
||||
# Last Change: 2022 Nov 24
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
# faster.
|
||||
@@ -712,7 +712,8 @@ export def SetFileTypeSH(name: string)
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
elseif name =~ '\<sh\>'
|
||||
elseif name =~ '\<sh\>' || name =~ '\<dash\>'
|
||||
# Ubuntu links "sh" to "dash", thus it is expected to work the same way
|
||||
b:is_sh = 1
|
||||
if exists("b:is_kornshell")
|
||||
unlet b:is_kornshell
|
||||
|
||||
6
runtime/autoload/dist/script.vim
vendored
6
runtime/autoload/dist/script.vim
vendored
@@ -4,7 +4,7 @@ vim9script
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Feb 13
|
||||
# Last Change: 2022 Nov 24
|
||||
|
||||
export def DetectFiletype()
|
||||
var line1 = getline(1)
|
||||
@@ -53,8 +53,8 @@ def DetectFromHashBang(firstline: string)
|
||||
name = 'wish'
|
||||
endif
|
||||
|
||||
# Bourne-like shell scripts: bash bash2 ksh ksh93 sh
|
||||
if name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
|
||||
# Bourne-like shell scripts: bash bash2 dash ksh ksh93 sh
|
||||
if name =~ '^\(bash\d*\|dash\|ksh\d*\|sh\)\>'
|
||||
call dist#ft#SetFileTypeSH(line1)
|
||||
|
||||
# csh scripts
|
||||
|
||||
@@ -712,6 +712,9 @@ func! tohtml#GetUserSettings() "{{{
|
||||
call tohtml#GetOption(user_settings, 'no_foldcolumn', user_settings.ignore_folding)
|
||||
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_doc', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_links', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_modeline', 0 )
|
||||
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
|
||||
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||
@@ -752,7 +755,7 @@ func! tohtml#GetUserSettings() "{{{
|
||||
|
||||
" pre_wrap doesn't do anything if not using pre or not using CSS
|
||||
if user_settings.no_pre || !user_settings.use_css
|
||||
let user_settings.pre_wrap=0
|
||||
let user_settings.pre_wrap = 0
|
||||
endif
|
||||
"}}}
|
||||
|
||||
|
||||
39
runtime/compiler/dotnet.vim
Normal file
39
runtime/compiler/dotnet.vim
Normal file
@@ -0,0 +1,39 @@
|
||||
" Vim compiler file
|
||||
" Compiler: dotnet build (.NET CLI)
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Last Change: 2022-12-06
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "dotnet"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if get(g:, "dotnet_errors_only", v:false)
|
||||
CompilerSet makeprg=dotnet\ build\ -nologo
|
||||
\\ -consoleloggerparameters:NoSummary
|
||||
\\ -consoleloggerparameters:ErrorsOnly
|
||||
else
|
||||
CompilerSet makeprg=dotnet\ build\ -nologo\ -consoleloggerparameters:NoSummary
|
||||
endif
|
||||
|
||||
if get(g:, "dotnet_show_project_file", v:true)
|
||||
CompilerSet errorformat=%E%f(%l\\,%c):\ %trror\ %m,
|
||||
\%W%f(%l\\,%c):\ %tarning\ %m,
|
||||
\%-G%.%#
|
||||
else
|
||||
CompilerSet errorformat=%E%f(%l\\,%c):\ %trror\ %m\ [%.%#],
|
||||
\%W%f(%l\\,%c):\ %tarning\ %m\ [%.%#],
|
||||
\%-G%.%#
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
28
runtime/compiler/zig.vim
Normal file
28
runtime/compiler/zig.vim
Normal file
@@ -0,0 +1,28 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "zig"
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
" a subcommand must be provided for the this compiler (test, build-exe, etc)
|
||||
if has('patch-7.4.191')
|
||||
CompilerSet makeprg=zig\ \$*\ \%:S
|
||||
else
|
||||
CompilerSet makeprg=zig\ \$*\ \"%\"
|
||||
endif
|
||||
|
||||
" TODO: improve errorformat as needed.
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
29
runtime/compiler/zig_build.vim
Normal file
29
runtime/compiler/zig_build.vim
Normal file
@@ -0,0 +1,29 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig build)
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
runtime compiler/zig.vim
|
||||
let current_compiler = 'zig_build'
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
if exists(':CompilerSet') != 2
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
if exists('g:zig_build_makeprg_params')
|
||||
execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
|
||||
else
|
||||
CompilerSet makeprg=zig\ build\ $*
|
||||
endif
|
||||
|
||||
" TODO: anything to add to errorformat for zig build specifically?
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
27
runtime/compiler/zig_build_exe.vim
Normal file
27
runtime/compiler/zig_build_exe.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig build-exe)
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
runtime compiler/zig.vim
|
||||
let current_compiler = 'zig_build_exe'
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
if exists(':CompilerSet') != 2
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
if has('patch-7.4.191')
|
||||
CompilerSet makeprg=zig\ build-exe\ \%:S\ \$*
|
||||
else
|
||||
CompilerSet makeprg=zig\ build-exe\ \"%\"\ \$*
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
27
runtime/compiler/zig_test.vim
Normal file
27
runtime/compiler/zig_test.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zig Compiler (zig test)
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
runtime compiler/zig.vim
|
||||
let current_compiler = 'zig_test'
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
|
||||
if exists(':CompilerSet') != 2
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
if has('patch-7.4.191')
|
||||
CompilerSet makeprg=zig\ test\ \%:S\ \$*
|
||||
else
|
||||
CompilerSet makeprg=zig\ test\ \"%\"\ \$*
|
||||
endif
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
@@ -161,6 +161,7 @@ DOCS = \
|
||||
version9.txt \
|
||||
vi_diff.txt \
|
||||
vim9.txt \
|
||||
vim9class.txt \
|
||||
visual.txt \
|
||||
windows.txt \
|
||||
workshop.txt
|
||||
@@ -313,6 +314,7 @@ HTMLS = \
|
||||
vi_diff.html \
|
||||
vimindex.html \
|
||||
vim9.html \
|
||||
vim9class.html \
|
||||
visual.html \
|
||||
windows.html \
|
||||
workshop.html
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2022 May 24
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1058,8 +1058,8 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
command is run, before jumping to the first
|
||||
location. For |:cfile| and |:lfile| commands
|
||||
it is run after error file is read and before
|
||||
moving to the first error.
|
||||
it is run after the error file is read and
|
||||
before moving to the first error.
|
||||
See |QuickFixCmdPost-example|.
|
||||
*QuitPre*
|
||||
QuitPre When using `:quit`, `:wq` or `:qall`, before
|
||||
@@ -1342,8 +1342,9 @@ VimSuspend When the Vim instance is suspended. Only when
|
||||
CTRL-Z was typed inside Vim, or when the SIGTSTP
|
||||
signal was sent to Vim, but not for SIGSTOP.
|
||||
*WinClosed*
|
||||
WinClosed After closing a window. The pattern is
|
||||
matched against the |window-ID|. Both
|
||||
WinClosed When closing a window, just before it is
|
||||
removed from the window layout. The pattern
|
||||
is matched against the |window-ID|. Both
|
||||
<amatch> and <afile> are set to the
|
||||
|window-ID|. Non-recursive (event cannot
|
||||
trigger itself).
|
||||
@@ -1371,17 +1372,42 @@ WinNew When a new window was created. Not done for
|
||||
Before a WinEnter event.
|
||||
|
||||
*WinScrolled*
|
||||
WinScrolled After scrolling the content of a window or
|
||||
resizing a window.
|
||||
The pattern is matched against the
|
||||
|window-ID|. Both <amatch> and <afile> are
|
||||
set to the |window-ID|.
|
||||
Non-recursive (the event cannot trigger
|
||||
itself). However, if the command causes the
|
||||
window to scroll or change size another
|
||||
WinScrolled After any window in the current tab page
|
||||
scrolled the text (horizontally or vertically)
|
||||
or changed width or height. See
|
||||
|win-scrolled-resized|.
|
||||
|
||||
The pattern is matched against the |window-ID|
|
||||
of the first window that scrolled or resized.
|
||||
Both <amatch> and <afile> are set to the
|
||||
|window-ID|.
|
||||
|
||||
|v:event| is set with information about size
|
||||
and scroll changes. |WinScrolled-event|
|
||||
|
||||
Only starts triggering after startup finished
|
||||
and the first screen redraw was done.
|
||||
Does not trigger when defining the first
|
||||
WinScrolled or WinResized event, but may
|
||||
trigger when adding more.
|
||||
|
||||
Non-recursive: the event will not trigger
|
||||
while executing commands for the WinScrolled
|
||||
event. However, if the command causes a
|
||||
window to scroll or change size, then another
|
||||
WinScrolled event will be triggered later.
|
||||
Does not trigger when the command is added,
|
||||
only after the first scroll or resize.
|
||||
|
||||
|
||||
*WinResized*
|
||||
WinResized After a window in the current tab page changed
|
||||
width or height.
|
||||
See |win-scrolled-resized|.
|
||||
|
||||
|v:event| is set with information about size
|
||||
changes. |WinResized-event|
|
||||
|
||||
Same behavior as |WinScrolled| for the
|
||||
pattern, triggering and recursiveness.
|
||||
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{aupat}*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 14
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -116,13 +116,13 @@ ch_status({handle} [, {options}])
|
||||
changenr() Number current change number
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr}) Number column number of cursor or mark
|
||||
charcol({expr} [, {winid}]) Number column number of cursor or mark
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Number char index of byte {idx} in {string}
|
||||
chdir({dir}) String change current working directory
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches([{win}]) none clear all matches
|
||||
col({expr}) Number column byte index of cursor or mark
|
||||
col({expr} [, {winid}]) Number column byte index of cursor or mark
|
||||
complete({startcol}, {matches}) none set Insert mode completion
|
||||
complete_add({expr}) Number add completion match
|
||||
complete_check() Number check for key typed during completion
|
||||
@@ -208,6 +208,7 @@ get({func}, {what}) any get property of funcref/partial {func}
|
||||
getbufinfo([{buf}]) List information about buffers
|
||||
getbufline({buf}, {lnum} [, {end}])
|
||||
List lines {lnum} to {end} of buffer {buf}
|
||||
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
|
||||
getbufvar({buf}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {buf}
|
||||
getchangelist([{buf}]) List list of change list items
|
||||
@@ -246,6 +247,7 @@ getloclist({nr}, {what}) Dict get specific location list properties
|
||||
getmarklist([{buf}]) List list of global/local marks
|
||||
getmatches([{win}]) List list of current matches
|
||||
getmousepos() Dict last known mouse position
|
||||
getmouseshape() String current mouse shape name
|
||||
getpid() Number process ID of Vim
|
||||
getpos({expr}) List position of cursor, mark, etc.
|
||||
getqflist() List list of quickfix items
|
||||
@@ -606,6 +608,7 @@ submatch({nr} [, {list}]) String or List
|
||||
specific match in ":s" or substitute()
|
||||
substitute({expr}, {pat}, {sub}, {flags})
|
||||
String all {pat} in {expr} replaced with {sub}
|
||||
swapfilelist() List swap files found in 'directory'
|
||||
swapinfo({fname}) Dict information about swap file {fname}
|
||||
swapname({buf}) String swap file of buffer {buf}
|
||||
synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col}
|
||||
@@ -806,8 +809,10 @@ append({lnum}, {text}) *append()*
|
||||
{lnum} can be zero to insert a line before the first one.
|
||||
{lnum} is used like with |getline()|.
|
||||
Returns 1 for failure ({lnum} out of range or out of memory),
|
||||
0 for success. In |Vim9| script an invalid argument or
|
||||
negative number results in an error. Example: >
|
||||
0 for success. When {text} is an empty list zero is returned,
|
||||
no matter the value of {lnum}.
|
||||
In |Vim9| script an invalid argument or negative number
|
||||
results in an error. Example: >
|
||||
:let failed = append(line('$'), "# THE END")
|
||||
:let failed = append(0, ["Chapter 1", "the beginning"])
|
||||
|
||||
@@ -835,7 +840,9 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
|
||||
If {buf} is not a valid buffer or {lnum} is not valid, an
|
||||
error message is given. Example: >
|
||||
:let failed = appendbufline(13, 0, "# THE START")
|
||||
<
|
||||
< However, when {text} is an empty list then no error is given
|
||||
for an invalid {lnum}, since {lnum} isn't actually used.
|
||||
|
||||
Can also be used as a |method| after a List, the base is
|
||||
passed as the second argument: >
|
||||
mylist->appendbufline(buf, lnum)
|
||||
@@ -981,7 +988,7 @@ autocmd_add({acmds}) *autocmd_add()*
|
||||
let acmd.bufnr = 5
|
||||
let acmd.cmd = 'call BufEnterFunc()'
|
||||
call autocmd_add([acmd])
|
||||
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetAutocmdList()->autocmd_add()
|
||||
<
|
||||
@@ -1317,7 +1324,8 @@ bufwinid({buf}) *bufwinid()*
|
||||
|
||||
echo "A window containing buffer 1 is " .. (bufwinid(1))
|
||||
<
|
||||
Only deals with the current tab page.
|
||||
Only deals with the current tab page. See |win_findbuf()| for
|
||||
finding more.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
FindBuffer()->bufwinid()
|
||||
@@ -1469,7 +1477,7 @@ charclass({string}) *charclass()*
|
||||
Returns 0 if {string} is not a |String|.
|
||||
|
||||
|
||||
charcol({expr}) *charcol()*
|
||||
charcol({expr} [, {winid}]) *charcol()*
|
||||
Same as |col()| but returns the character index of the column
|
||||
position given with {expr} instead of the byte position.
|
||||
|
||||
@@ -1552,8 +1560,8 @@ clearmatches([{win}]) *clearmatches()*
|
||||
Can also be used as a |method|: >
|
||||
GetWin()->clearmatches()
|
||||
<
|
||||
*col()*
|
||||
col({expr}) The result is a Number, which is the byte index of the column
|
||||
col({expr} [, {winid}) *col()*
|
||||
The result is a Number, which is the byte index of the column
|
||||
position given with {expr}. The accepted positions are:
|
||||
. the cursor position
|
||||
$ the end of the cursor line (the result is the
|
||||
@@ -1568,6 +1576,8 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
and column number. Most useful when the column is "$", to get
|
||||
the last column of a specific line. When "lnum" or "col" is
|
||||
out of range then col() returns zero.
|
||||
With the optional {winid} argument the values are obtained for
|
||||
that window instead of the current window.
|
||||
To get the line number use |line()|. To get both use
|
||||
|getpos()|.
|
||||
For the screen column position use |virtcol()|. For the
|
||||
@@ -1578,16 +1588,15 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
col("$") length of cursor line plus one
|
||||
col("'t") column of mark t
|
||||
col("'" .. markname) column of mark markname
|
||||
< The first column is 1. Returns 0 if {expr} is invalid.
|
||||
< The first column is 1. Returns 0 if {expr} is invalid or when
|
||||
the window with ID {winid} is not found.
|
||||
For an uppercase mark the column may actually be in another
|
||||
buffer.
|
||||
For the cursor position, when 'virtualedit' is active, the
|
||||
column is one higher if the cursor is after the end of the
|
||||
line. This can be used to obtain the column in Insert mode: >
|
||||
:imap <F2> <C-O>:let save_ve = &ve<CR>
|
||||
\<C-O>:set ve=all<CR>
|
||||
\<C-O>:echo col(".") .. "\n" <Bar>
|
||||
\let &ve = save_ve<CR>
|
||||
line. Also, when using a <Cmd> mapping the cursor isn't
|
||||
moved, this can be used to obtain the column in Insert mode: >
|
||||
:imap <F2> <Cmd>echowin col(".")<CR>
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetPos()->col()
|
||||
@@ -2771,7 +2780,7 @@ flattennew({list} [, {maxdepth}]) *flattennew()*
|
||||
float2nr({expr}) *float2nr()*
|
||||
Convert {expr} to a Number by omitting the part after the
|
||||
decimal point.
|
||||
{expr} must evaluate to a |Float| or a Number.
|
||||
{expr} must evaluate to a |Float| or a |Number|.
|
||||
Returns 0 if {expr} is not a |Float| or a |Number|.
|
||||
When the value of {expr} is out of range for a |Number| the
|
||||
result is truncated to 0x7fffffff or -0x7fffffff (or when
|
||||
@@ -3197,7 +3206,8 @@ getbufinfo([{dict}])
|
||||
getbufline({buf}, {lnum} [, {end}])
|
||||
Return a |List| with the lines starting from {lnum} to {end}
|
||||
(inclusive) in the buffer {buf}. If {end} is omitted, a
|
||||
|List| with only the line {lnum} is returned.
|
||||
|List| with only the line {lnum} is returned. See
|
||||
`getbufoneline()` for only getting the line.
|
||||
|
||||
For the use of {buf}, see |bufname()| above.
|
||||
|
||||
@@ -3220,6 +3230,11 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetBufnr()->getbufline(lnum)
|
||||
<
|
||||
*getbufoneline()*
|
||||
getbufoneline({buf}, {lnum})
|
||||
Just like `getbufline()` but only get one line and return it
|
||||
as a string.
|
||||
|
||||
getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
The result is the value of option or local buffer variable
|
||||
@@ -3764,7 +3779,8 @@ getline({lnum} [, {end}])
|
||||
< Can also be used as a |method|: >
|
||||
ComputeLnum()->getline()
|
||||
|
||||
< To get lines from another buffer see |getbufline()|
|
||||
< To get lines from another buffer see |getbufline()| and
|
||||
|getbufoneline()|
|
||||
|
||||
getloclist({nr} [, {what}]) *getloclist()*
|
||||
Returns a |List| with all the entries in the location list for
|
||||
@@ -3873,6 +3889,12 @@ getmousepos() *getmousepos()*
|
||||
When using |getchar()| the Vim variables |v:mouse_lnum|,
|
||||
|v:mouse_col| and |v:mouse_winid| also provide these values.
|
||||
|
||||
getmouseshape() *getmouseshape()*
|
||||
Returns the name of the currently showing mouse pointer.
|
||||
When the |+mouseshape| feature is not supported or the shape
|
||||
is unknown an empty string is returned.
|
||||
This function is mainly intended for testing.
|
||||
|
||||
*getpid()*
|
||||
getpid() Return a Number which is the process ID of the Vim process.
|
||||
On Unix and MS-Windows this is a unique number, until Vim
|
||||
@@ -5551,6 +5573,10 @@ map({expr1}, {expr2}) *map()*
|
||||
If {expr2} is a |Funcref| it is called with two arguments:
|
||||
1. The key or the index of the current item.
|
||||
2. the value of the current item.
|
||||
With a legacy script lambda you don't get an error if it only
|
||||
accepts one argument, but with a Vim9 lambda you get "E1106:
|
||||
One argument too many", the number of arguments must match.
|
||||
|
||||
The function must return the new value of the item. Example
|
||||
that changes each value by "key-value": >
|
||||
func KeyValue(key, val)
|
||||
@@ -6866,8 +6892,10 @@ readblob({fname} [, {offset} [, {size}]]) *readblob()*
|
||||
readblob('/dev/ttyS0', 0, 10)
|
||||
< When the file can't be opened an error message is given and
|
||||
the result is an empty |Blob|.
|
||||
When trying to read bytes beyond the end of the file the
|
||||
result is an empty blob.
|
||||
When the offset is beyond the end of the file the result is an
|
||||
empty blob.
|
||||
When trying to read more bytes than are available the result
|
||||
is truncated.
|
||||
Also see |readfile()| and |writefile()|.
|
||||
|
||||
|
||||
@@ -7873,9 +7901,10 @@ setbufline({buf}, {lnum}, {text}) *setbufline()*
|
||||
To insert lines use |appendbufline()|.
|
||||
Any text properties in {lnum} are cleared.
|
||||
|
||||
{text} can be a string to set one line, or a list of strings
|
||||
to set multiple lines. If the list extends below the last
|
||||
line then those lines are added.
|
||||
{text} can be a string to set one line, or a List of strings
|
||||
to set multiple lines. If the List extends below the last
|
||||
line then those lines are added. If the List is empty then
|
||||
nothing is changed and zero is returned.
|
||||
|
||||
For the use of {buf}, see |bufname()| above.
|
||||
|
||||
@@ -7914,29 +7943,38 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
|
||||
|
||||
setcellwidths({list}) *setcellwidths()*
|
||||
Specify overrides for cell widths of character ranges. This
|
||||
tells Vim how wide characters are, counted in screen cells.
|
||||
This overrides 'ambiwidth'. Example: >
|
||||
setcellwidths([[0xad, 0xad, 1],
|
||||
\ [0x2194, 0x2199, 2]])
|
||||
tells Vim how wide characters are when displayed in the
|
||||
terminal, counted in screen cells. The values override
|
||||
'ambiwidth'. Example: >
|
||||
call setcellwidths([
|
||||
\ [0x111, 0x111, 1],
|
||||
\ [0x2194, 0x2199, 2],
|
||||
\ ])
|
||||
|
||||
< *E1109* *E1110* *E1111* *E1112* *E1113* *E1114*
|
||||
The {list} argument is a list of lists with each three
|
||||
numbers. These three numbers are [low, high, width]. "low"
|
||||
and "high" can be the same, in which case this refers to one
|
||||
character. Otherwise it is the range of characters from "low"
|
||||
to "high" (inclusive). "width" is either 1 or 2, indicating
|
||||
the character width in screen cells.
|
||||
An error is given if the argument is invalid, also when a
|
||||
range overlaps with another.
|
||||
< The {list} argument is a List of Lists with each three
|
||||
numbers: [{low}, {high}, {width}]. *E1109* *E1110*
|
||||
{low} and {high} can be the same, in which case this refers to
|
||||
one character. Otherwise it is the range of characters from
|
||||
{low} to {high} (inclusive). *E1111* *E1114*
|
||||
Only characters with value 0x100 and higher can be used.
|
||||
|
||||
{width} must be either 1 or 2, indicating the character width
|
||||
in screen cells. *E1112*
|
||||
An error is given if the argument is invalid, also when a
|
||||
range overlaps with another. *E1113*
|
||||
|
||||
If the new value causes 'fillchars' or 'listchars' to become
|
||||
invalid it is rejected and an error is given.
|
||||
|
||||
To clear the overrides pass an empty list: >
|
||||
To clear the overrides pass an empty {list}: >
|
||||
setcellwidths([]);
|
||||
|
||||
< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
|
||||
the effect for known emoji characters.
|
||||
the effect for known emoji characters. Move the cursor
|
||||
through the text to check if the cell widths of your terminal
|
||||
match with what Vim knows about each emoji. If it doesn't
|
||||
look right you need to adjust the {list} argument.
|
||||
|
||||
|
||||
setcharpos({expr}, {list}) *setcharpos()*
|
||||
Same as |setpos()| but uses the specified column number as the
|
||||
@@ -8060,7 +8098,8 @@ setline({lnum}, {text}) *setline()*
|
||||
When {lnum} is just below the last line the {text} will be
|
||||
added below the last line.
|
||||
{text} can be any type or a List of any type, each item is
|
||||
converted to a String.
|
||||
converted to a String. When {text} is an empty List then
|
||||
nothing is changed and FALSE is returned.
|
||||
|
||||
If this succeeds, FALSE is returned. If this fails (most likely
|
||||
because {lnum} is invalid) TRUE is returned.
|
||||
@@ -9276,6 +9315,17 @@ substitute({string}, {pat}, {sub}, {flags}) *substitute()*
|
||||
Can also be used as a |method|: >
|
||||
GetString()->substitute(pat, sub, flags)
|
||||
|
||||
swapfilelist() *swapfilelist()*
|
||||
Returns a list of swap file names, like what "vim -r" shows.
|
||||
See the |-r| command argument. The 'directory' option is used
|
||||
for the directories to inspect. If you only want to get a
|
||||
list of swap files in the current directory then temporarily
|
||||
set 'directory' to a dot: >
|
||||
let save_dir = &directory
|
||||
let &directory = '.'
|
||||
let swapfiles = swapfilelist()
|
||||
let &directory = save_dir
|
||||
|
||||
swapinfo({fname}) *swapinfo()*
|
||||
The result is a dictionary, which holds information about the
|
||||
swapfile {fname}. The available fields are:
|
||||
@@ -9668,6 +9718,7 @@ terminalprops() *terminalprops()*
|
||||
cursor_blink_mode whether sending |t_RC| works **
|
||||
underline_rgb whether |t_8u| works **
|
||||
mouse mouse type supported
|
||||
kitty whether Kitty terminal was detected
|
||||
|
||||
** value 'u' for unknown, 'y' for yes, 'n' for no
|
||||
|
||||
@@ -10197,6 +10248,7 @@ win_move_separator({nr}, {offset}) *win_move_separator()*
|
||||
FALSE otherwise.
|
||||
This will fail for the rightmost window and a full-width
|
||||
window, since it has no separator on the right.
|
||||
Only works for the current tab page. *E1308*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinnr()->win_move_separator(offset)
|
||||
@@ -10211,6 +10263,7 @@ win_move_statusline({nr}, {offset}) *win_move_statusline()*
|
||||
movement may be smaller than specified (e.g., as a consequence
|
||||
of maintaining 'winminheight'). Returns TRUE if the window can
|
||||
be found and FALSE otherwise.
|
||||
Only works for the current tab page.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinnr()->win_move_statusline(offset)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.0. Last change: 2022 Sep 13
|
||||
*change.txt* For Vim version 9.0. Last change: 2022 Nov 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 9.0. Last change: 2022 Jun 23
|
||||
*channel.txt* For Vim version 9.0. Last change: 2022 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -465,7 +465,7 @@ a close callback to the channel.
|
||||
|
||||
To read all normal output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel)
|
||||
To read all error output from a RAW channel that is available:: >
|
||||
To read all error output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel, {"part": "err"})
|
||||
Note that if the channel is in NL mode, ch_readraw() will only return one line
|
||||
for each call.
|
||||
@@ -618,6 +618,9 @@ ch_info({handle}) *ch_info()*
|
||||
ch_log({msg} [, {handle}]) *ch_log()*
|
||||
Write String {msg} in the channel log file, if it was opened
|
||||
with |ch_logfile()|.
|
||||
The text "ch_log():" is prepended to the message to make clear
|
||||
it came from this function call and make it easier to find in
|
||||
the log file.
|
||||
When {handle} is passed the channel number is used for the
|
||||
message.
|
||||
{handle} can be a Channel or a Job that has a Channel. The
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.0. Last change: 2022 Sep 26
|
||||
*cmdline.txt* For Vim version 9.0. Last change: 2022 Nov 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -736,7 +736,9 @@ Line numbers may be specified with: *:range* *{address}*
|
||||
'T position of mark T (uppercase); when the mark is in
|
||||
another file it cannot be used in a range
|
||||
/{pattern}[/] the next line where {pattern} matches *:/*
|
||||
also see |:range-pattern| below
|
||||
?{pattern}[?] the previous line where {pattern} matches *:?*
|
||||
also see |:range-pattern| below
|
||||
\/ the next line where the previously used search
|
||||
pattern matches
|
||||
\? the previous line where the previously used search
|
||||
@@ -744,11 +746,49 @@ Line numbers may be specified with: *:range* *{address}*
|
||||
\& the next line where the previously used substitute
|
||||
pattern matches
|
||||
|
||||
*:range-offset*
|
||||
Each may be followed (several times) by '+' or '-' and an optional number.
|
||||
This number is added or subtracted from the preceding line number. If the
|
||||
number is omitted, 1 is used. If there is nothing before the '+' or '-' then
|
||||
the current line is used.
|
||||
*:range-closed-fold*
|
||||
When a line number after the comma is in a closed fold it is adjusted to the
|
||||
last line of the fold, thus the whole fold is included.
|
||||
|
||||
When a number is added this is done after the adjustment to the last line of
|
||||
the fold. This means these lines are additionally included in the range. For
|
||||
example: >
|
||||
:3,4+2print
|
||||
On this text:
|
||||
1 one ~
|
||||
2 two ~
|
||||
3 three ~
|
||||
4 four FOLDED ~
|
||||
5 five FOLDED ~
|
||||
6 six ~
|
||||
7 seven ~
|
||||
8 eight ~
|
||||
Where lines four and five are a closed fold, ends up printing lines 3 to 7.
|
||||
The 7 comes from the "4" in the range, which is adjusted to the end of the
|
||||
closed fold, which is 5, and then the offset 2 is added.
|
||||
|
||||
An example for subtracting (which isn't very useful): >
|
||||
:2,4-1print
|
||||
On this text:
|
||||
1 one ~
|
||||
2 two ~
|
||||
3 three FOLDED~
|
||||
4 four FOLDED ~
|
||||
5 five FOLDED ~
|
||||
6 six FOLDED ~
|
||||
7 seven ~
|
||||
8 eight ~
|
||||
Where lines three to six are a closed fold, ends up printing lines 2 to 6.
|
||||
The 6 comes from the "4" in the range, which is adjusted to the end of the
|
||||
closed fold, which is 6, and then 1 is subtracted, then this is still in the
|
||||
closed fold and the last line of that fold is used, which is 6.
|
||||
|
||||
*:range-pattern*
|
||||
The "/" and "?" after {pattern} are required to separate the pattern from
|
||||
anything that follows.
|
||||
|
||||
@@ -804,7 +844,7 @@ always be swapped then.
|
||||
|
||||
Count and Range *N:*
|
||||
|
||||
When giving a count before entering ":", this is translated into:
|
||||
When giving a count before entering ":", this is translated into: >
|
||||
:.,.+(count - 1)
|
||||
In words: The "count" lines at and after the cursor. Example: To delete
|
||||
three lines: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*digraph.txt* For Vim version 9.0. Last change: 2021 Jul 19
|
||||
*digraph.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -162,7 +162,7 @@ These are the RFC1345 digraphs for the one-byte characters. See the output of
|
||||
":digraphs" for the others.
|
||||
|
||||
EURO
|
||||
|
||||
*euro* *euro-digraph*
|
||||
Exception: RFC1345 doesn't specify the euro sign. In Vim the digraph =e was
|
||||
added for this. Note the difference between latin1, where the digraph Cu is
|
||||
used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 9.0. Last change: 2022 Apr 16
|
||||
*editing.txt* For Vim version 9.0. Last change: 2022 Nov 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -578,6 +578,43 @@ single <NL> characters are unexpectedly replaced with <CR><NL>.
|
||||
You can encrypt files that are written by setting the 'key' option. This
|
||||
provides some security against others reading your files. |encryption|
|
||||
|
||||
END OF LINE AND END OF FILE *eol-and-eof*
|
||||
|
||||
Vim has several options to control the file format:
|
||||
'fileformat' the <EOL> style: Unix, DOS, Mac
|
||||
'endofline' whether the last line ends with a <EOL>
|
||||
'endoffile' whether the file ends with a CTRL-Z
|
||||
'fixendofline' whether to fix eol and eof
|
||||
|
||||
The first three values are normally detected automatically when reading the
|
||||
file and are used when writing the text to a file. While editing the buffer
|
||||
it looks like every line has a line ending and the CTRL-Z isn't there (an
|
||||
exception is when 'binary' is set, it works differently then).
|
||||
|
||||
The 'fixendofline' option can be used to choose what to write. You can also
|
||||
change the option values to write the file differently than how it was read.
|
||||
|
||||
Here are some examples how to use them.
|
||||
|
||||
If you want files in Unix format (every line NL terminated): >
|
||||
setl ff=unix fixeol
|
||||
You should probably do this on any Unix-like system. Also modern MS-Windows
|
||||
systems tend to work well with this. It is recommended to always use this
|
||||
format for Vim scripts.
|
||||
|
||||
If you want to use an old MS-DOS file in a modern environment, fixing line
|
||||
endings and dropping CTRL-Z, but keeping the <CR><NL> style <EOL>: >
|
||||
setl ff=dos fixeol
|
||||
This is useful for many MS-Windows programs, they regularly expect the
|
||||
<CR><NL> line endings.
|
||||
|
||||
If you want to drop the final <EOL> and add a final CTRL-Z (e.g. for an old
|
||||
system like CP/M): >
|
||||
setl ff=dos nofixeol noeol eof
|
||||
|
||||
If you want to preserve the fileformat exactly as-is, including any final
|
||||
<EOL> and final CTRL-Z: >
|
||||
setl nofixeol
|
||||
|
||||
==============================================================================
|
||||
3. The argument list *argument-list* *arglist*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Dec 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -633,6 +633,10 @@ This removes all entries from "dict" with a value not matching 'x'.
|
||||
This can also be used to remove all entries: >
|
||||
call filter(dict, 0)
|
||||
|
||||
In some situations it is not allowed to remove or add entries to a Dictionary.
|
||||
Especially when iterating over all the entries. You will get *E1313* or
|
||||
another error in that case.
|
||||
|
||||
|
||||
Dictionary function ~
|
||||
*Dictionary-function* *self* *E725* *E862*
|
||||
@@ -646,7 +650,8 @@ special way with a dictionary. Example: >
|
||||
|
||||
This is like a method in object oriented programming. The entry in the
|
||||
Dictionary is a |Funcref|. The local variable "self" refers to the dictionary
|
||||
the function was invoked from.
|
||||
the function was invoked from. When using |Vim9| script you can use classes
|
||||
and objects, see `:class`.
|
||||
|
||||
It is also possible to add a function without the "dict" attribute as a
|
||||
Funcref to a Dictionary, but the "self" variable is not available then.
|
||||
@@ -1548,7 +1553,7 @@ to be doubled. These two commands are equivalent: >
|
||||
if a =~ '\s*'
|
||||
|
||||
|
||||
interpolated-string *$quote* *interp-string*
|
||||
interpolated-string *$quote* *interpolated-string*
|
||||
--------------------
|
||||
$"string" interpolated string constant *expr-$quote*
|
||||
$'string' interpolated literal string constant *expr-$'*
|
||||
@@ -1965,7 +1970,7 @@ v:collate The current locale setting for collation order of the runtime
|
||||
command.
|
||||
See |multi-lang|.
|
||||
|
||||
*v:colornames*
|
||||
*v:colornames*
|
||||
v:colornames A dictionary that maps color names to hex color strings. These
|
||||
color names can be used with the |highlight-guifg|,
|
||||
|highlight-guibg|, and |highlight-guisp| parameters. Updating
|
||||
@@ -2859,7 +2864,7 @@ text...
|
||||
does not need to be doubled.
|
||||
If "eval" is specified, then any Vim expression in the
|
||||
form {expr} is evaluated and the result replaces the
|
||||
expression, like with |interp-string|.
|
||||
expression, like with |interpolated-string|.
|
||||
Example where $HOME is expanded: >
|
||||
let lines =<< trim eval END
|
||||
some text
|
||||
@@ -3073,6 +3078,10 @@ text...
|
||||
Unlock the internal variable {name}. Does the
|
||||
opposite of |:lockvar|.
|
||||
|
||||
If {name} does not exist:
|
||||
- In |Vim9| script an error is given.
|
||||
- In legacy script this is silently ignored.
|
||||
|
||||
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
|
||||
:en[dif] Execute the commands until the next matching `:else`
|
||||
or `:endif` if {expr1} evaluates to non-zero.
|
||||
@@ -3598,7 +3607,7 @@ this pending exception or command is discarded.
|
||||
For examples see |throw-catch| and |try-finally|.
|
||||
|
||||
|
||||
NESTING OF TRY CONDITIONALS *try-nesting*
|
||||
NESTING OF TRY CONDITIONALS *try-nesting*
|
||||
|
||||
Try conditionals can be nested arbitrarily. That is, a complete try
|
||||
conditional can be put into the try block, a catch clause, or the finally
|
||||
|
||||
@@ -571,7 +571,7 @@ used.
|
||||
For example, to set the dialect to a default of "fblite" but still allow for
|
||||
any #lang directive overrides, use the following command: >
|
||||
|
||||
let g:freebasic_lang = "fblite"
|
||||
let g:freebasic_lang = "fblite"
|
||||
|
||||
|
||||
GIT COMMIT *ft-gitcommit-plugin*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 9.0. Last change: 2022 Oct 01
|
||||
*fold.txt* For Vim version 9.0. Last change: 2022 Nov 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -598,6 +598,11 @@ line is folded, it cannot be displayed there.
|
||||
Many movement commands handle a sequence of folded lines like an empty line.
|
||||
For example, the "w" command stops once in the first column.
|
||||
|
||||
When starting a search in a closed fold it will not find a match in the
|
||||
current fold. It's like a forward search always starts from the end of the
|
||||
closed fold, while a backwards search starts from the start of the closed
|
||||
fold.
|
||||
|
||||
When in Insert mode, the cursor line is never folded. That allows you to see
|
||||
what you type!
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ The last command will create the following syntax files:
|
||||
- `context-data-context.vim`;
|
||||
- `context-data-interfaces.vim`;
|
||||
- `context-data-metafun.vim`;
|
||||
- `context-data-tex.vim`.
|
||||
- `context-data-tex.vim`.
|
||||
|
||||
The same command can be used to update those syntax files.
|
||||
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
*ft_rust.txt* For Vim version 9.0. Last change: 2017 Nov 02
|
||||
*ft_rust.txt* For Vim version 9.0. Last change: 2022 Oct 17
|
||||
|
||||
This is documentation for the Rust filetype plugin.
|
||||
|
||||
==============================================================================
|
||||
CONTENTS *rust*
|
||||
CONTENTS *rust*
|
||||
|
||||
1. Introduction |rust-intro|
|
||||
2. Settings |rust-settings|
|
||||
3. Commands |rust-commands|
|
||||
4. Mappings |rust-mappings|
|
||||
1. Introduction |rust-intro|
|
||||
2. Settings |rust-settings|
|
||||
3. Commands |rust-commands|
|
||||
4. Mappings |rust-mappings|
|
||||
|
||||
==============================================================================
|
||||
INTRODUCTION *rust-intro*
|
||||
INTRODUCTION *rust-intro*
|
||||
|
||||
This plugin provides syntax and supporting functionality for the Rust
|
||||
filetype.
|
||||
|
||||
==============================================================================
|
||||
SETTINGS *rust-settings*
|
||||
SETTINGS *rust-settings*
|
||||
|
||||
This plugin has a few variables you can define in your vimrc that change the
|
||||
behavior of the plugin.
|
||||
|
||||
*g:rustc_path*
|
||||
*g:rustc_path*
|
||||
g:rustc_path~
|
||||
Set this option to the path to rustc for use in the |:RustRun| and
|
||||
|:RustExpand| commands. If unset, "rustc" will be located in $PATH: >
|
||||
let g:rustc_path = $HOME .. "/bin/rustc"
|
||||
<
|
||||
|
||||
*g:rustc_makeprg_no_percent*
|
||||
*g:rustc_makeprg_no_percent*
|
||||
g:rustc_makeprg_no_percent~
|
||||
Set this option to 1 to have 'makeprg' default to "rustc" instead of
|
||||
"rustc %": >
|
||||
let g:rustc_makeprg_no_percent = 1
|
||||
<
|
||||
|
||||
*g:rust_conceal*
|
||||
*g:rust_conceal*
|
||||
g:rust_conceal~
|
||||
Set this option to turn on the basic |conceal| support: >
|
||||
let g:rust_conceal = 1
|
||||
<
|
||||
|
||||
*g:rust_conceal_mod_path*
|
||||
*g:rust_conceal_mod_path*
|
||||
g:rust_conceal_mod_path~
|
||||
Set this option to turn on |conceal| for the path connecting token
|
||||
"::": >
|
||||
let g:rust_conceal_mod_path = 1
|
||||
<
|
||||
|
||||
*g:rust_conceal_pub*
|
||||
*g:rust_conceal_pub*
|
||||
g:rust_conceal_pub~
|
||||
Set this option to turn on |conceal| for the "pub" token: >
|
||||
let g:rust_conceal_pub = 1
|
||||
<
|
||||
|
||||
*g:rust_recommended_style*
|
||||
*g:rust_recommended_style*
|
||||
g:rust_recommended_style~
|
||||
Set this option to enable vim indentation and textwidth settings to
|
||||
conform to style conventions of the rust standard library (i.e. use 4
|
||||
spaces for indents and sets 'textwidth' to 99). This option is enabled
|
||||
Set this option to enable vim indentation and textwidth settings to
|
||||
conform to style conventions of the rust standard library (i.e. use 4
|
||||
spaces for indents and sets 'textwidth' to 99). This option is enabled
|
||||
by default. To disable it: >
|
||||
let g:rust_recommended_style = 0
|
||||
<
|
||||
|
||||
*g:rust_fold*
|
||||
*g:rust_fold*
|
||||
g:rust_fold~
|
||||
Set this option to turn on |folding|: >
|
||||
let g:rust_fold = 1
|
||||
@@ -76,39 +76,39 @@ g:rust_fold~
|
||||
2 Braced blocks are folded. 'foldlevel' is left at the
|
||||
global value (all folds are closed by default).
|
||||
|
||||
*g:rust_bang_comment_leader*
|
||||
*g:rust_bang_comment_leader*
|
||||
g:rust_bang_comment_leader~
|
||||
Set this option to 1 to preserve the leader on multi-line doc comments
|
||||
using the /*! syntax: >
|
||||
let g:rust_bang_comment_leader = 1
|
||||
<
|
||||
|
||||
*g:ftplugin_rust_source_path*
|
||||
*g:ftplugin_rust_source_path*
|
||||
g:ftplugin_rust_source_path~
|
||||
Set this option to a path that should be prepended to 'path' for Rust
|
||||
source files: >
|
||||
let g:ftplugin_rust_source_path = $HOME .. '/dev/rust'
|
||||
<
|
||||
|
||||
*g:rustfmt_command*
|
||||
*g:rustfmt_command*
|
||||
g:rustfmt_command~
|
||||
Set this option to the name of the 'rustfmt' executable in your $PATH. If
|
||||
not specified it defaults to 'rustfmt' : >
|
||||
let g:rustfmt_command = 'rustfmt'
|
||||
<
|
||||
*g:rustfmt_autosave*
|
||||
*g:rustfmt_autosave*
|
||||
g:rustfmt_autosave~
|
||||
Set this option to 1 to run |:RustFmt| automatically when saving a
|
||||
buffer. If not specified it defaults to 0 : >
|
||||
let g:rustfmt_autosave = 0
|
||||
<
|
||||
*g:rustfmt_fail_silently*
|
||||
*g:rustfmt_fail_silently*
|
||||
g:rustfmt_fail_silently~
|
||||
Set this option to 1 to prevent 'rustfmt' from populating the
|
||||
|location-list| with errors. If not specified it defaults to 0: >
|
||||
let g:rustfmt_fail_silently = 0
|
||||
<
|
||||
*g:rustfmt_options*
|
||||
*g:rustfmt_options*
|
||||
g:rustfmt_options~
|
||||
Set this option to a string of options to pass to 'rustfmt'. The
|
||||
write-mode is already set to 'overwrite'. If not specified it
|
||||
@@ -116,13 +116,13 @@ g:rustfmt_options~
|
||||
let g:rustfmt_options = ''
|
||||
<
|
||||
|
||||
*g:rust_playpen_url*
|
||||
*g:rust_playpen_url*
|
||||
g:rust_playpen_url~
|
||||
Set this option to override the URL for the playpen to use: >
|
||||
let g:rust_playpen_url = 'https://play.rust-lang.org/'
|
||||
<
|
||||
|
||||
*g:rust_shortener_url*
|
||||
*g:rust_shortener_url*
|
||||
g:rust_shortener_url~
|
||||
Set this option to override the URL for the URL shortener: >
|
||||
let g:rust_shortener_url = 'https://is.gd/'
|
||||
@@ -130,9 +130,9 @@ g:rust_shortener_url~
|
||||
|
||||
|
||||
==============================================================================
|
||||
COMMANDS *rust-commands*
|
||||
COMMANDS *rust-commands*
|
||||
|
||||
:RustRun [args] *:RustRun*
|
||||
:RustRun [args] *:RustRun*
|
||||
:RustRun! [rustc-args] [--] [args]
|
||||
Compiles and runs the current file. If it has unsaved changes,
|
||||
it will be saved first using |:update|. If the current file is
|
||||
@@ -150,7 +150,7 @@ COMMANDS *rust-commands*
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustExpand [args] *:RustExpand*
|
||||
:RustExpand [args] *:RustExpand*
|
||||
:RustExpand! [TYPE] [args]
|
||||
Expands the current file using --pretty and displays the
|
||||
results in a new split. If the current file has unsaved
|
||||
@@ -169,7 +169,7 @@ COMMANDS *rust-commands*
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustEmitIr [args] *:RustEmitIr*
|
||||
:RustEmitIr [args] *:RustEmitIr*
|
||||
Compiles the current file to LLVM IR and displays the results
|
||||
in a new split. If the current file has unsaved changes, it
|
||||
will be saved first using |:update|. If the current file is an
|
||||
@@ -180,7 +180,7 @@ COMMANDS *rust-commands*
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustEmitAsm [args] *:RustEmitAsm*
|
||||
:RustEmitAsm [args] *:RustEmitAsm*
|
||||
Compiles the current file to assembly and displays the results
|
||||
in a new split. If the current file has unsaved changes, it
|
||||
will be saved first using |:update|. If the current file is an
|
||||
@@ -191,7 +191,7 @@ COMMANDS *rust-commands*
|
||||
If |g:rustc_path| is defined, it is used as the path to rustc.
|
||||
Otherwise it is assumed rustc can be found in $PATH.
|
||||
|
||||
:RustPlay *:RustPlay*
|
||||
:RustPlay *:RustPlay*
|
||||
This command will only work if you have web-api.vim installed
|
||||
(available at https://github.com/mattn/webapi-vim). It sends the
|
||||
current selection, or if nothing is selected, the entirety of the
|
||||
@@ -204,7 +204,7 @@ COMMANDS *rust-commands*
|
||||
|g:rust_shortener_url| is the base URL for the shortener, by
|
||||
default "https://is.gd/"
|
||||
|
||||
:RustFmt *:RustFmt*
|
||||
:RustFmt *:RustFmt*
|
||||
Runs |g:rustfmt_command| on the current buffer. If
|
||||
|g:rustfmt_options| is set then those will be passed to the
|
||||
executable.
|
||||
@@ -214,12 +214,12 @@ COMMANDS *rust-commands*
|
||||
|g:rustfmt_command|. If |g:rustfmt_fail_silently| is set to 1
|
||||
then it will not populate the |location-list|.
|
||||
|
||||
:RustFmtRange *:RustFmtRange*
|
||||
:RustFmtRange *:RustFmtRange*
|
||||
Runs |g:rustfmt_command| with selected range. See
|
||||
|:RustFmt| for any other information.
|
||||
|
||||
==============================================================================
|
||||
MAPPINGS *rust-mappings*
|
||||
MAPPINGS *rust-mappings*
|
||||
|
||||
This plugin defines mappings for |[[| and |]]| to support hanging indents.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 9.0. Last change: 2022 Apr 03
|
||||
*gui.txt* For Vim version 9.0. Last change: 2022 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -889,6 +889,11 @@ s The menu was defined with "<silent>" to avoid showing what it is
|
||||
Note that hitting <Tab> while entering a menu name after a menu command may
|
||||
be used to complete the name of the menu item.
|
||||
|
||||
It is not allowed to change menus while listing them. *E1310*
|
||||
This doesn't normally happen, only when, for example, you would have a timer
|
||||
callback define a menu and the user lists menus in a way it shows
|
||||
|more-prompt|.
|
||||
|
||||
|
||||
5.4 Executing Menus *execute-menus*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 9.0. Last change: 2022 May 13
|
||||
*help.txt* For Vim version 9.0. Last change: 2022 Dec 03
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -153,6 +153,7 @@ Special issues ~
|
||||
|terminal.txt| Terminal window support
|
||||
|popup.txt| popup window support
|
||||
|vim9.txt| using Vim9 script
|
||||
|vim9class.txt| using Vim9 script classes
|
||||
|
||||
Programming language support ~
|
||||
|indent.txt| automatic indenting for C and other languages
|
||||
@@ -161,6 +162,8 @@ Programming language support ~
|
||||
|filetype.txt| settings done specifically for a type of file
|
||||
|quickfix.txt| commands for a quick edit-compile-fix cycle
|
||||
|ft_ada.txt| Ada (the programming language) support
|
||||
|ft_context.txt| Filetype plugin for ConTeXt
|
||||
|ft_mp.txt| Filetype plugin for METAFONT and MetaPost
|
||||
|ft_ps1.txt| Filetype plugin for Windows PowerShell
|
||||
|ft_raku.txt| Filetype plugin for Raku
|
||||
|ft_rust.txt| Filetype plugin for Rust
|
||||
|
||||
@@ -892,7 +892,7 @@ Groß): >
|
||||
endfor
|
||||
return res
|
||||
endfunc
|
||||
|
||||
|
||||
if exists('+thesaurusfunc')
|
||||
set thesaurusfunc=Thesaur
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Oct 12
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Nov 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.0. Last change: 2022 Sep 26
|
||||
*map.txt* For Vim version 9.0. Last change: 2022 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,18 +10,19 @@ This subject is introduced in sections |05.4|, |24.7| and |40.1| of the user
|
||||
manual.
|
||||
|
||||
1. Key mapping |key-mapping|
|
||||
1.1 MAP COMMANDS |:map-commands|
|
||||
1.2 Special arguments |:map-arguments|
|
||||
1.3 Mapping and modes |:map-modes|
|
||||
1.4 Listing mappings |map-listing|
|
||||
1.5 Mapping special keys |:map-special-keys|
|
||||
1.6 Special characters |:map-special-chars|
|
||||
1.7 What keys to map |map-which-keys|
|
||||
1.8 Examples |map-examples|
|
||||
1.9 Using mappings |map-typing|
|
||||
1.10 Mapping alt-keys |:map-alt-keys|
|
||||
1.11 Mapping in modifyOtherKeys mode |modifyOtherKeys|
|
||||
1.12 Mapping an operator |:map-operator|
|
||||
1.1 MAP COMMANDS |:map-commands|
|
||||
1.2 Special arguments |:map-arguments|
|
||||
1.3 Mapping and modes |:map-modes|
|
||||
1.4 Listing mappings |map-listing|
|
||||
1.5 Mapping special keys |:map-special-keys|
|
||||
1.6 Special characters |:map-special-chars|
|
||||
1.7 What keys to map |map-which-keys|
|
||||
1.8 Examples |map-examples|
|
||||
1.9 Using mappings |map-typing|
|
||||
1.10 Mapping alt-keys |:map-alt-keys|
|
||||
1.11 Mapping in modifyOtherKeys mode |modifyOtherKeys|
|
||||
1.12 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
|
||||
1.13 Mapping an operator |:map-operator|
|
||||
2. Abbreviations |abbreviations|
|
||||
3. Local mappings and functions |script-local|
|
||||
4. User-defined commands |user-commands|
|
||||
@@ -234,6 +235,9 @@ The search string will not be echoed when using this mapping. Messages from
|
||||
the executed command are still given though. To shut them up too, add a
|
||||
":silent" in the executed command: >
|
||||
:map <silent> ,h :exe ":silent normal /Header\r"<CR>
|
||||
Note that the effect of a command might also be silenced, e.g., when the
|
||||
mapping selects another entry for command line completion it won't be
|
||||
displayed.
|
||||
Prompts will still be given, e.g., for inputdialog().
|
||||
Using "<silent>" for an abbreviation is possible, but will cause redrawing of
|
||||
the command line to fail.
|
||||
@@ -581,6 +585,9 @@ is the start of the last selected Visual area in the current buffer |'<|.
|
||||
The |:filter| command can be used to select what mappings to list. The
|
||||
pattern is matched against the {lhs} and {rhs} in the raw form.
|
||||
|
||||
While mappings are being listed, it is not possible to add or clear mappings,
|
||||
e.g. from a timer callback. *E1309*
|
||||
|
||||
*:map-verbose*
|
||||
When 'verbose' is non-zero, listing a key map will also display where it was
|
||||
last defined. Example: >
|
||||
@@ -964,13 +971,18 @@ using other applications but not when inside Vim.
|
||||
Xterm and a few other terminals can be put in a mode where keys with modifiers
|
||||
are sent with a special escape code. Vim recognizes these codes and can then
|
||||
make a difference between CTRL-H and Backspace, even when Backspace sends the
|
||||
character 8. And many more special keys.
|
||||
character 8. And many more special keys, such as Tab and CTRL-I, which cannot
|
||||
be mapped separately otherwise.
|
||||
|
||||
For xterm modifyOtherKeys is enabled in the builtin termcap entry. If this is
|
||||
not used you can enable modifyOtherKeys with these lines in your vimrc: >
|
||||
let &t_TI = "\<Esc>[>4;2m"
|
||||
let &t_TE = "\<Esc>[>4;m"
|
||||
|
||||
This sets modifyOtherKeys to level 2. Note that modifyOtherKeys level 1 does
|
||||
not work. Some terminals do not support level 2 and then send key codes that
|
||||
Vim will not be able to correctly recognize.
|
||||
|
||||
In case the modifyOtherKeys mode causes problems you can disable it: >
|
||||
let &t_TI = ""
|
||||
let &t_TE = ""
|
||||
@@ -989,21 +1001,61 @@ mapping, see |map-bar|.
|
||||
WARNING: if you map <C-[> you may very well break any key codes that start
|
||||
with Esc. Make sure it comes AFTER other mappings.
|
||||
|
||||
Vim automatically detects if the modifyOtherKeys mode was enabled when it
|
||||
spots an escape sequence that must have been created by it. To see if Vim
|
||||
detected such an escape sequence use `:verbose map`, the first line will then
|
||||
show "Seen modifyOtherKeys: true" (possibly translated).
|
||||
Starting with xterm version 377 Vim can detect the modifyOtherKeys state by
|
||||
requesting it. For this the 't_RK' termcap entry is used. When the response
|
||||
is found then Vim will know whether modifyOtherKeys level 2 is enabled, and
|
||||
handle mappings accordingly.
|
||||
|
||||
Before version 377 Vim automatically detects if the modifyOtherKeys mode was
|
||||
enabled when it spots an escape sequence that must have been created by it.
|
||||
To see if Vim detected such an escape sequence use `:verbose map`, the first
|
||||
line will then show "Seen modifyOtherKeys: true" (possibly translated).
|
||||
|
||||
This automatic detection depends on receiving an escape code starting with
|
||||
"<1b>[27;". This is the normal way xterm sends these key codes. However, if
|
||||
the *formatOtherKeys* resource is set another form is used that is not
|
||||
recognized, therefore you must not set formatOtherKeys.
|
||||
|
||||
A known side effect is that in Insert mode the raw escape sequence is inserted
|
||||
after the CTRL-V key. This can be used to check whether modifyOtherKeys is
|
||||
enabled: In Insert mode type CTRL-SHIFT-V CTRL-V, if you get one byte then
|
||||
modifyOtherKeys is off, if you get <1b>27;5;118~ then it is on.
|
||||
modifyOtherKeys is off, if you get <1b>[27;5;118~ then it is on.
|
||||
|
||||
Note that xterm up to version 376 has a bug that makes Shift-Esc send a
|
||||
regular Esc code, the Shift modifier is dropped.
|
||||
|
||||
When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
|
||||
Insert mode to avoid every key with a modifier causing Insert mode to end.
|
||||
|
||||
|
||||
1.12 MAPPING AN OPERATOR *:map-operator*
|
||||
1.12 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
|
||||
|
||||
If the value of 'term' contains "kitty" then Vim will send out an escape
|
||||
sequence to enable the Kitty keyboard protocol. This can be changed with the
|
||||
'keyprotocol' option.
|
||||
|
||||
Like modifyOtherKeys, this will make it possible to distinguish between more
|
||||
keys with modifiers. Also, this protocol sends an escape sequence for the Esc
|
||||
key, so that Vim does not need to use a timeout to know whether receiving an
|
||||
Esc character means the Esc key was pressed or it's the start of an escape
|
||||
sequence.
|
||||
|
||||
Vim automatically detects if the Kitty keyboard protocol was enabled when it
|
||||
spots the response to the status request (this should be part of the |t_TI|
|
||||
termcap entry). To see if Vim detected such an escape sequence use: >
|
||||
:verbose map
|
||||
The first line will then show "Kitty keyboard protocol: {value}" (possibly
|
||||
translated). The meaning of {value}:
|
||||
Unknown no status received yet
|
||||
Off protocol is not used
|
||||
On protocol is used
|
||||
Disabled protocol was used but expected to have been disabled
|
||||
by 't_TE'
|
||||
Cleared protocol expected to have beeen disabled by 't_TE',
|
||||
previous state is unknown
|
||||
|
||||
|
||||
1.13 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
An operator is used before a {motion} command. To define your own operator
|
||||
you must create a mapping that first sets the 'operatorfunc' option and then
|
||||
@@ -1473,6 +1525,8 @@ See |:verbose-cmd| for more information.
|
||||
|
||||
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
|
||||
Delete the user-defined command {cmd}.
|
||||
This is not allowed while listing commands, e.g. from
|
||||
a timer. *E1311*
|
||||
|
||||
:delc[ommand] -buffer {cmd} *E1237*
|
||||
Delete the user-defined command {cmd} that was defined
|
||||
@@ -1483,7 +1537,7 @@ See |:verbose-cmd| for more information.
|
||||
|
||||
|
||||
Command attributes ~
|
||||
*command-attributes*
|
||||
*command-attributes*
|
||||
User-defined commands are treated by Vim just like any other Ex commands. They
|
||||
can have arguments, or have a range specified. Arguments are subject to
|
||||
completion as filenames, buffers, etc. Exactly how this works depends upon the
|
||||
@@ -1641,7 +1695,7 @@ Possible attributes are:
|
||||
number.
|
||||
-count=N A count (default N) which is specified either in the line
|
||||
number position, or as an initial argument (like |:Next|).
|
||||
-count acts like -count=0
|
||||
-count Acts like -count=0
|
||||
|
||||
Note that -range=N and -count=N are mutually exclusive - only one should be
|
||||
specified.
|
||||
@@ -1659,7 +1713,7 @@ Possible values are (second column is the short name used in listing):
|
||||
-addr=windows win Range for windows
|
||||
-addr=tabs tab Range for tab pages
|
||||
-addr=quickfix qf Range for quickfix entries
|
||||
-addr=other ? other kind of range; can use ".", "$" and "%"
|
||||
-addr=other ? Other kind of range; can use ".", "$" and "%"
|
||||
as with "lines" (this is the default for
|
||||
-count)
|
||||
|
||||
@@ -1817,7 +1871,7 @@ When executed as: >
|
||||
This will invoke: >
|
||||
:call Myfunc("arg1","arg2")
|
||||
|
||||
< *q-args-example*
|
||||
< *q-args-example*
|
||||
A more substantial example: >
|
||||
:function Allargs(command)
|
||||
: let i = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 9.0. Last change: 2022 Jan 26
|
||||
*message.txt* For Vim version 9.0. Last change: 2022 Oct 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -635,6 +635,7 @@ probably means that some other program changed the file. You will have to
|
||||
find out what happened, and decide which version of the file you want to keep.
|
||||
Set the 'autoread' option if you want to do this automatically.
|
||||
This message is not given when 'buftype' is not empty.
|
||||
Also see the |FileChangedShell| autocommand.
|
||||
|
||||
There is one situation where you get this message even though there is nothing
|
||||
wrong: If you save a file in Windows on the day the daylight saving time
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Nov 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3048,6 +3048,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When 'encoding' is set to a Unicode encoding, and 'fileencodings' was
|
||||
not set yet, the default for 'fileencodings' is changed.
|
||||
|
||||
*'endoffile'* *'eof'* *'noendoffile'* *'noeof'*
|
||||
'endoffile' 'eof' boolean (default off)
|
||||
local to buffer
|
||||
Indicates that a CTRL-Z character was found at the end of the file
|
||||
when reading it. Normally only happens when 'fileformat' is "dos".
|
||||
When writing a file and this option is off and the 'binary' option
|
||||
is on, or 'fixeol' option is off, no CTRL-Z will be written at the
|
||||
end of the file.
|
||||
See |eol-and-eof| for example settings.
|
||||
|
||||
*'endofline'* *'eol'* *'noendofline'* *'noeol'*
|
||||
'endofline' 'eol' boolean (default on)
|
||||
local to buffer
|
||||
@@ -3062,6 +3072,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
to remember the presence of a <EOL> for the last line in the file, so
|
||||
that when you write the file the situation from the original file can
|
||||
be kept. But you can change it if you want to.
|
||||
See |eol-and-eof| for example settings.
|
||||
|
||||
*'equalalways'* *'ea'* *'noequalalways'* *'noea'*
|
||||
'equalalways' 'ea' boolean (default on)
|
||||
@@ -3452,11 +3463,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'fixendofline' 'fixeol' boolean (default on)
|
||||
local to buffer
|
||||
When writing a file and this option is on, <EOL> at the end of file
|
||||
will be restored if missing. Turn this option off if you want to
|
||||
will be restored if missing. Turn this option off if you want to
|
||||
preserve the situation from the original file.
|
||||
When the 'binary' option is set the value of this option doesn't
|
||||
matter.
|
||||
See the 'endofline' option.
|
||||
See |eol-and-eof| for example settings.
|
||||
|
||||
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
|
||||
'fkmap' 'fk' boolean (default off)
|
||||
@@ -4536,17 +4548,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|+find_in_path| or |+eval| features}
|
||||
Expression to be used to transform the string found with the 'include'
|
||||
option to a file name. Mostly useful to change "." to "/" for Java: >
|
||||
:set includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
:setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
< The "v:fname" variable will be set to the file name that was detected.
|
||||
|
||||
Note the double backslash: the `:set` command first halves them, then
|
||||
one remains it the value, where "\." matches a dot literally. For
|
||||
simple character replacements `tr()` avoids the need for escaping: >
|
||||
:setlocal includeexpr=tr(v:fname,'.','/')
|
||||
<
|
||||
Also used for the |gf| command if an unmodified file name can't be
|
||||
found. Allows doing "gf" on the name after an 'include' statement.
|
||||
Also used for |<cfile>|.
|
||||
|
||||
If the expression starts with s: or |<SID>|, then it is replaced with
|
||||
the script ID (|local-function|). Example: >
|
||||
set includeexpr=s:MyIncludeExpr()
|
||||
set includeexpr=<SID>SomeIncludeExpr()
|
||||
setlocal includeexpr=s:MyIncludeExpr()
|
||||
setlocal includeexpr=<SID>SomeIncludeExpr()
|
||||
< Otherwise, the expression is evaluated in the context of the script
|
||||
where the option was set, thus script-local items are available.
|
||||
|
||||
@@ -4876,6 +4892,51 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<PageUp> and <PageDown>.
|
||||
The 'keymodel' option is set by the |:behave| command.
|
||||
|
||||
*'keyprotocol'* *'kpc'*
|
||||
'keyprotocol' 'kpc' string (default: see below)
|
||||
global
|
||||
Specifies what keyboard protocol to use depending on the value of
|
||||
'term'. The supported keyboard protocols names are:
|
||||
none whatever the terminal uses
|
||||
mok2 modifyOtherKeys level 2, as supported by xterm
|
||||
kitty Kitty keyboard protocol, as supported by Kitty
|
||||
|
||||
The option value is a list of comma separated items. Each item has
|
||||
a pattern that is matched against the 'term' option, a colon and the
|
||||
protocol name to be used. To illustrate this, the default value would
|
||||
be set with: >
|
||||
set keyprotocol=kitty:kitty,foot:kitty,wezterm:kitty,xterm:mok2
|
||||
|
||||
< This means that when 'term' contains "kitty, "foot" or "wezterm"
|
||||
somewhere then the "kitty" protocol is used. When 'term' contains
|
||||
"xterm" somewhere, then the "mok2" protocol is used.
|
||||
|
||||
The first match is used, thus if you want to have "kitty" use the
|
||||
kitty protocol, but "badkitty" not, then you should match "badkitty"
|
||||
first and use the "none" value: >
|
||||
set keyprotocol=badkitty:none,kitty:kitty
|
||||
<
|
||||
The option is used after 'term' has been changed. First the termcap
|
||||
entries are set, possibly using the builtin list, see |builtin-terms|.
|
||||
Then this option is inspected and if there is a match and a protocol
|
||||
is specified the following happens:
|
||||
none Nothing, the regular t_TE and t_TI values remain
|
||||
|
||||
mok2 The t_TE value is changed to:
|
||||
CSI >4;m disables modifyOtherKeys
|
||||
The t_TI value is changed to:
|
||||
CSI >4;2m enables modifyOtherKeys
|
||||
CSI ?4m request the modifyOtherKeys state
|
||||
|
||||
kitty The t_TE value is changed to:
|
||||
CSI >4;m disables modifyOtherKeys
|
||||
CSI =0;1u disables the kitty keyboard protocol
|
||||
The t_TI value is changed to:
|
||||
CSI =1;1u enables the kitty keyboard protocol
|
||||
CSI ?u request kitty keyboard protocol state
|
||||
CSI >c request the termresponse
|
||||
|
||||
|
||||
*'keywordprg'* *'kp'*
|
||||
'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help",
|
||||
VMS: "help")
|
||||
@@ -8509,10 +8570,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
xterm entries...).
|
||||
|
||||
*'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
|
||||
'ttyfast' 'tf' boolean (default off, on when 'term' is xterm, hpterm,
|
||||
sun-cmd, screen, rxvt, dtterm or
|
||||
iris-ansi; also on when running Vim in
|
||||
a DOS console)
|
||||
'ttyfast' 'tf' boolean (default on)
|
||||
global
|
||||
Indicates a fast terminal connection. More characters will be sent to
|
||||
the screen for redrawing, instead of using insert/delete line
|
||||
@@ -8522,6 +8580,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
line for lines that wrap. This helps when using copy/paste with the
|
||||
mouse in an xterm and other terminals.
|
||||
|
||||
The default used to be set only for some terminal names, but these
|
||||
days nearly all terminals are fast, therefore the default is now "on".
|
||||
If you have a slow connection you may want to set this option off,
|
||||
e.g. depending on the host name: >
|
||||
if hostname() =~ 'faraway'
|
||||
set nottyfast
|
||||
endif
|
||||
<
|
||||
*'ttymouse'* *'ttym'*
|
||||
'ttymouse' 'ttym' string (default depends on 'term')
|
||||
global
|
||||
|
||||
@@ -56,7 +56,7 @@ additionally installed over the GUI version. Typical build commands are:
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
--with-tlib=ncurses \
|
||||
--with-tlib=ncurses
|
||||
make clean
|
||||
make install
|
||||
|
||||
@@ -95,7 +95,7 @@ The default value for $VIM is set at compile time and can be determined with:
|
||||
|
||||
:version
|
||||
|
||||
The normal value is /boot/system/data/vim for Haikuports version,
|
||||
The normal value is /boot/system/data/vim for Haikuports version,
|
||||
/boot/system/non-packaged/data/vim for manual builds. If you don't like it
|
||||
you can set the VIM environment variable to override this, or set 'helpfile'
|
||||
in your .vimrc: >
|
||||
@@ -223,11 +223,11 @@ Thank you, all!
|
||||
|
||||
|
||||
14. Bugs & to-do *haiku-bugs*
|
||||
|
||||
|
||||
The port is under development now and far away from the perfect state. For bug
|
||||
reports, patches and wishes, please use the Vim mailing list or Vim Github
|
||||
repository.
|
||||
|
||||
|
||||
Mailing list: https://www.vim.org/maillist.php
|
||||
Vim Github repository: https://github.com/vim/vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_unix.txt* For Vim version 9.0. Last change: 2005 Mar 29
|
||||
*os_unix.txt* For Vim version 9.0. Last change: 2022 Nov 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,10 +28,11 @@ system() is used, which is a bit slower. The output of ":version" includes
|
||||
can be changed at compile time.
|
||||
(For forking of the GUI version see |gui-fork|.)
|
||||
|
||||
Because terminal updating under Unix is often slow (e.g. serial line
|
||||
terminal, shell window in suntools), the 'showcmd' and 'ruler' options
|
||||
are off by default. If you have a fast terminal, try setting them on. You
|
||||
might also want to set 'ttyfast'.
|
||||
For historic reasons terminal updating under Unix is expected to be slow (e.g.
|
||||
serial line terminal, shell window in suntools), the 'showcmd' and 'ruler'
|
||||
options are off by default. If you have a fast terminal, try setting them
|
||||
on: >
|
||||
set showcmd ruler
|
||||
|
||||
When using Vim in an xterm the mouse clicks can be used by Vim by setting
|
||||
'mouse' to "a". If there is access to an X-server gui style copy/paste will
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 9.0. Last change: 2022 Sep 30
|
||||
*os_vms.txt* For Vim version 9.0. Last change: 2022 Nov 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -458,18 +458,11 @@ Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
|
||||
|
||||
Vim will also recognize that they are fast terminals.
|
||||
|
||||
If you have some annoying line jumping on the screen between windows add to
|
||||
your .vimrc file: >
|
||||
|
||||
set ttyfast " set fast terminal
|
||||
|
||||
Note: if you're using Vim on remote host or through a very slow connection, it's
|
||||
recommended to avoid the fast terminal option with: >
|
||||
If you're using Vim on remote host or through a very slow connection, you
|
||||
might want to reset fast terminal option with: >
|
||||
|
||||
set nottyfast " set terminal to slow mode
|
||||
|
||||
(Zoltan Arpadffy, Vim 5.6)
|
||||
|
||||
|
||||
8.7 Hex-editing and other external tools
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_tar.txt* For Vim version 9.0. Last change: 2020 Jan 07
|
||||
*pi_tar.txt* For Vim version 9.0. Last change: 2022 Oct 17
|
||||
|
||||
+====================+
|
||||
| Tar File Interface |
|
||||
@@ -80,25 +80,25 @@ Copyright 2005-2017: *tar-copyright*
|
||||
|
||||
These options are variables that one may change, typically in one's
|
||||
<.vimrc> file.
|
||||
Default
|
||||
Variable Value Explanation
|
||||
*g:tar_browseoptions* "Ptf" used to get a list of contents
|
||||
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
|
||||
*g:tar_cmd* "tar" the name of the tar program
|
||||
*g:tar_nomax* 0 if true, file window will not be maximized
|
||||
*g:tar_secure* undef if exists:
|
||||
Default
|
||||
Variable Value Explanation
|
||||
*g:tar_browseoptions* "Ptf" used to get a list of contents
|
||||
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
|
||||
*g:tar_cmd* "tar" the name of the tar program
|
||||
*g:tar_nomax* 0 if true, file window will not be maximized
|
||||
*g:tar_secure* undef if exists:
|
||||
"--"s will be used to prevent unwanted
|
||||
option expansion in tar commands.
|
||||
Please be sure that your tar command
|
||||
accepts "--"; Posix compliant tar
|
||||
utilities do accept them.
|
||||
if not exists:
|
||||
The tar plugin will reject any tar
|
||||
The tar plugin will reject any tar
|
||||
files or member files that begin with
|
||||
"-"
|
||||
Not all tar's support the "--" which is why
|
||||
it isn't default.
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_zip.txt* For Vim version 9.0. Last change: 2021 Nov 08
|
||||
*pi_zip.txt* For Vim version 9.0. Last change: 2022 Oct 17
|
||||
|
||||
+====================+
|
||||
| Zip File Interface |
|
||||
@@ -39,7 +39,7 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
|
||||
OPTIONS~
|
||||
|
||||
*g:zip_nomax*
|
||||
*g:zip_nomax*
|
||||
|
||||
If this variable exists and is true, the file window will not be
|
||||
automatically maximized when opened.
|
||||
@@ -54,21 +54,21 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
under Windows ("). If you'd rather have no quotes, simply set
|
||||
g:zip_shq to the empty string (let g:zip_shq= "") in your <.vimrc>.
|
||||
|
||||
*g:zip_unzipcmd*
|
||||
*g:zip_unzipcmd*
|
||||
Use this option to specify the program which does the duty of "unzip".
|
||||
It's used during browsing. By default: >
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
<
|
||||
*g:zip_zipcmd*
|
||||
Use this option to specify the program which does the duty of "zip".
|
||||
It's used during the writing (updating) of a file already in a zip
|
||||
file; by default: >
|
||||
let g:zip_zipcmd= "zip"
|
||||
let g:zip_zipcmd= "zip"
|
||||
<
|
||||
*g:zip_extractcmd*
|
||||
This option specifies the program (and any options needed) used to
|
||||
extract a file from a zip archive. By default, >
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
let g:zip_extractcmd= g:zip_unzipcmd
|
||||
<
|
||||
PREVENTING LOADING~
|
||||
|
||||
@@ -103,14 +103,14 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
==============================================================================
|
||||
4. History *zip-history* {{{1
|
||||
v32 Oct 22, 2021 * to avoid an issue with a vim 8.2 patch, zipfile: has
|
||||
been changed to zipfile:// . This often shows up
|
||||
been changed to zipfile:// . This often shows up
|
||||
as zipfile:/// with zipped files that are root-based.
|
||||
v29 Apr 02, 2017 * (Klartext) reported that an encrypted zip file could
|
||||
opened but the swapfile held unencrypted contents.
|
||||
opened but the swapfile held unencrypted contents.
|
||||
The solution is to edit the contents of a zip file
|
||||
using the |:noswapfile| modifier.
|
||||
v28 Oct 08, 2014 * changed the sanity checks for executables to reflect
|
||||
the command actually to be attempted in zip#Read()
|
||||
the command actually to be attempted in zip#Read()
|
||||
and zip#Write()
|
||||
* added the extraction of a file capability
|
||||
Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -689,6 +689,7 @@ Short explanation of each option: *option-list*
|
||||
'edcompatible' 'ed' toggle flags of ":substitute" command
|
||||
'emoji' 'emo' emoji characters are considered full width
|
||||
'encoding' 'enc' encoding used internally
|
||||
'endoffile' 'eof' write CTRL-Z at end of the file
|
||||
'endofline' 'eol' write <EOL> for last line in file
|
||||
'equalalways' 'ea' windows are automatically made the same size
|
||||
'equalprg' 'ep' external program to use for "=" command
|
||||
@@ -774,6 +775,7 @@ Short explanation of each option: *option-list*
|
||||
'key' encryption key
|
||||
'keymap' 'kmp' name of a keyboard mapping
|
||||
'keymodel' 'km' enable starting/stopping selection with keys
|
||||
'keyprotocol' 'kpc' what keyboard protocol to use for what terminal
|
||||
'keywordprg' 'kp' program to use for the "K" command
|
||||
'langmap' 'lmap' alphabetic characters for other language mode
|
||||
'langmenu' 'lm' language to be used for the menus
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*scroll.txt* For Vim version 9.0. Last change: 2022 May 07
|
||||
*scroll.txt* For Vim version 9.0. Last change: 2022 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -280,6 +280,17 @@ You can also use Alt and Ctrl modifiers.
|
||||
|
||||
This only works when Vim gets the scroll wheel events, of course. You can
|
||||
check if this works with the "xev" program.
|
||||
*mouse-scrolling-off*
|
||||
If you do not want the mouse to cause scrolling (e.g. because resting your
|
||||
palm on the touchpad causes scroll events), you can disable that with: >
|
||||
:map <ScrollWheelDown> <Nop>
|
||||
:map! <ScrollWheelDown> <Nop>
|
||||
:map <ScrollWheelUp> <Nop>
|
||||
:map! <ScrollWheelUp> <Nop>
|
||||
:map <ScrollWheelLeft> <Nop>
|
||||
:map! <ScrollWheelLeft> <Nop>
|
||||
:map <ScrollWheelRight> <Nop>
|
||||
:map! <ScrollWheelRight> <Nop>
|
||||
|
||||
When using XFree86, the /etc/XF86Config file should have the correct entry for
|
||||
your mouse. For FreeBSD, this entry works for a Logitech scrollmouse: >
|
||||
|
||||
@@ -1008,8 +1008,8 @@ Note: even when using "num" or "long" the number of flags available to
|
||||
compounding and prefixes is limited to about 250.
|
||||
|
||||
|
||||
AFFIXES
|
||||
*spell-PFX* *spell-SFX*
|
||||
AFFIXES *spell-PFX* *spell-SFX*
|
||||
|
||||
The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
|
||||
documentation or the Aspell manual:
|
||||
http://aspell.net/man-html/Affix-Compression.html).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 9.0. Last change: 2022 Jun 14
|
||||
*starting.txt* For Vim version 9.0. Last change: 2022 Nov 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -348,7 +348,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
Start logging and write entries to {filename}.
|
||||
This works like calling `ch_logfile({filename}, 'ao')` very
|
||||
early during startup.
|
||||
{only available with the |+channel| feature}
|
||||
{only available with the |+eval| feature}
|
||||
|
||||
*-D*
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Oct 14
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -500,7 +500,7 @@ Force to omit the line numbers: >
|
||||
Go back to the default to use 'number' by deleting the variable: >
|
||||
:unlet g:html_number_lines
|
||||
<
|
||||
*g:html_line_ids*
|
||||
*g:html_line_ids*
|
||||
Default: 1 if |g:html_number_lines| is set, 0 otherwise.
|
||||
When 1, adds an HTML id attribute to each line number, or to an empty <span>
|
||||
inserted for that purpose if no line numbers are shown. This ID attribute
|
||||
@@ -692,6 +692,22 @@ the rendered page generated by 2html.vim.
|
||||
>
|
||||
:let g:html_no_pre = 1
|
||||
<
|
||||
*g:html_no_doc*
|
||||
Default: 0.
|
||||
When 1 it doesn't generate a full HTML document with a DOCTYPE, <head>,
|
||||
<body>, etc. If |g:html_use_css| is enabled (the default) you'll have to
|
||||
define the CSS manually. The |g:html_dynamic_folds| and |g:html_line_ids|
|
||||
settings (off by default) also insert some JavaScript.
|
||||
|
||||
|
||||
*g:html_no_links*
|
||||
Default: 0.
|
||||
Don't generate <a> tags for text that looks like an URL.
|
||||
|
||||
*g:html_no_modeline*
|
||||
Default: 0.
|
||||
Don't generate a modeline disabling folding.
|
||||
|
||||
*g:html_expand_tabs*
|
||||
Default: 0 if 'tabstop' is 8, 'expandtab' is 0, 'vartabstop' is not in use,
|
||||
and no fold column or line numbers occur in the generated HTML;
|
||||
@@ -1872,6 +1888,16 @@ following two lines to the syntax coloring file for that language
|
||||
Now you just need to make sure that you add all regions that contain
|
||||
the preprocessor language to the cluster htmlPreproc.
|
||||
|
||||
*html-folding*
|
||||
The HTML syntax file provides syntax |folding| (see |:syn-fold|) between start
|
||||
and end tags. This can be turned on by >
|
||||
|
||||
:let g:html_syntax_folding = 1
|
||||
:set foldmethod=syntax
|
||||
|
||||
Note: Syntax folding might slow down syntax highlighting significantly,
|
||||
especially for large files.
|
||||
|
||||
|
||||
HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax*
|
||||
|
||||
@@ -2400,7 +2426,7 @@ you set the variable: >
|
||||
|
||||
:let papp_include_html=1
|
||||
|
||||
in your startup file it will try to syntax-hilight html code inside phtml
|
||||
in your startup file it will try to syntax-highlight html code inside phtml
|
||||
sections, but this is relatively slow and much too colourful to be able to
|
||||
edit sensibly. ;)
|
||||
|
||||
@@ -2932,7 +2958,7 @@ Default folding is rather detailed, i.e., small syntax units like "if", "do",
|
||||
|
||||
You can set "ruby_foldable_groups" to restrict which groups are foldable: >
|
||||
|
||||
:let ruby_foldable_groups = 'if case %'
|
||||
:let ruby_foldable_groups = 'if case %'
|
||||
<
|
||||
The value is a space-separated list of keywords:
|
||||
|
||||
@@ -2940,22 +2966,22 @@ The value is a space-separated list of keywords:
|
||||
-------- ------------------------------------- ~
|
||||
ALL Most block syntax (default)
|
||||
NONE Nothing
|
||||
if "if" or "unless" block
|
||||
if "if" or "unless" block
|
||||
def "def" block
|
||||
class "class" block
|
||||
module "module" block
|
||||
do "do" block
|
||||
do "do" block
|
||||
begin "begin" block
|
||||
case "case" block
|
||||
for "for", "while", "until" loops
|
||||
{ Curly bracket block or hash literal
|
||||
[ Array literal
|
||||
% Literal with "%" notation, e.g.: %w(STRING), %!STRING!
|
||||
/ Regexp
|
||||
{ Curly bracket block or hash literal
|
||||
[ Array literal
|
||||
% Literal with "%" notation, e.g.: %w(STRING), %!STRING!
|
||||
/ Regexp
|
||||
string String and shell command output (surrounded by ', ", `)
|
||||
: Symbol
|
||||
# Multiline comment
|
||||
<< Here documents
|
||||
: Symbol
|
||||
# Multiline comment
|
||||
<< Here documents
|
||||
__END__ Source code after "__END__" directive
|
||||
|
||||
*ruby_no_expensive*
|
||||
@@ -3595,6 +3621,14 @@ highlighting is to put the following line in your |vimrc|: >
|
||||
<
|
||||
|
||||
|
||||
WDL *wdl.vim* *wdl-syntax*
|
||||
|
||||
The Workflow Description Language is a way to specify data processing workflows
|
||||
with a human-readable and writeable syntax. This is used a lot in
|
||||
bioinformatics. More info on the spec can be found here:
|
||||
https://github.com/openwdl/wdl
|
||||
|
||||
|
||||
XF86CONFIG *xf86conf.vim* *ft-xf86conf-syntax*
|
||||
|
||||
The syntax of XF86Config file differs in XFree86 v3.x and v4.x. Both
|
||||
@@ -3802,7 +3836,7 @@ SYNTAX ISKEYWORD SETTING *:syn-iskeyword*
|
||||
|
||||
clear: Syntax specific iskeyword setting is disabled and the
|
||||
buffer-local 'iskeyword' setting is used.
|
||||
{option} Set the syntax 'iskeyword' option to a new value.
|
||||
{option} Set the syntax 'iskeyword' option to a new value.
|
||||
|
||||
Example: >
|
||||
:syntax iskeyword @,48-57,192-255,$,_
|
||||
@@ -4875,7 +4909,7 @@ is mostly used, because it looks better.
|
||||
In the next section you can find information about indivisual highlight groups
|
||||
and how to specify colors for them. Most likely you want to just select a set
|
||||
of colors by using the `:colorscheme` command, for example: >
|
||||
|
||||
|
||||
colorscheme pablo
|
||||
<
|
||||
*:colo* *:colorscheme* *E185*
|
||||
@@ -4927,7 +4961,7 @@ Change a couple more colors: >
|
||||
augroup my_colorschemes
|
||||
au!
|
||||
au Colorscheme pablo hi Normal ctermbg=NONE
|
||||
\ | higlight Special ctermfg=63
|
||||
\ | highlight Special ctermfg=63
|
||||
\ | highlight Identifier ctermfg=44
|
||||
augroup END
|
||||
|
||||
@@ -5280,7 +5314,7 @@ guisp={color-name} *highlight-guisp*
|
||||
"gg" is the Green value
|
||||
"bb" is the Blue value
|
||||
All values are hexadecimal, range from "00" to "ff". Examples: >
|
||||
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
|
||||
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
|
||||
<
|
||||
If you are authoring a color scheme and use the same hexadecimal value
|
||||
repeatedly, you can define a name for it in |v:colornames|. For
|
||||
@@ -5370,16 +5404,16 @@ LineNrBelow Line number for when the 'relativenumber'
|
||||
*hl-CursorLineNr*
|
||||
CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt'
|
||||
contains "number" or is "both", for the cursor line.
|
||||
*hl-CursorLineSign*
|
||||
CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
||||
*hl-CursorLineFold*
|
||||
CursorLineFold Like FoldColumn when 'cursorline' is set for the cursor line.
|
||||
*hl-CursorLineSign*
|
||||
CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
||||
*hl-MatchParen*
|
||||
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 when 'cmdheight' is zero. If not
|
||||
defined |hl-WarningMsg| is used.
|
||||
MessageWindow Messages popup window used by `:echowindow`. If not defined
|
||||
|hl-WarningMsg| is used.
|
||||
*hl-ModeMsg*
|
||||
ModeMsg 'showmode' message (e.g., "-- INSERT --").
|
||||
*hl-MoreMsg*
|
||||
|
||||
@@ -231,7 +231,9 @@ $quote eval.txt /*$quote*
|
||||
'emoji' options.txt /*'emoji'*
|
||||
'enc' options.txt /*'enc'*
|
||||
'encoding' options.txt /*'encoding'*
|
||||
'endoffile' options.txt /*'endoffile'*
|
||||
'endofline' options.txt /*'endofline'*
|
||||
'eof' options.txt /*'eof'*
|
||||
'eol' options.txt /*'eol'*
|
||||
'ep' options.txt /*'ep'*
|
||||
'equalalways' options.txt /*'equalalways'*
|
||||
@@ -435,10 +437,12 @@ $quote eval.txt /*$quote*
|
||||
'key' options.txt /*'key'*
|
||||
'keymap' options.txt /*'keymap'*
|
||||
'keymodel' options.txt /*'keymodel'*
|
||||
'keyprotocol' options.txt /*'keyprotocol'*
|
||||
'keywordprg' options.txt /*'keywordprg'*
|
||||
'km' options.txt /*'km'*
|
||||
'kmp' options.txt /*'kmp'*
|
||||
'kp' options.txt /*'kp'*
|
||||
'kpc' options.txt /*'kpc'*
|
||||
'langmap' options.txt /*'langmap'*
|
||||
'langmenu' options.txt /*'langmenu'*
|
||||
'langnoremap' options.txt /*'langnoremap'*
|
||||
@@ -598,7 +602,9 @@ $quote eval.txt /*$quote*
|
||||
'noek' options.txt /*'noek'*
|
||||
'noemo' options.txt /*'noemo'*
|
||||
'noemoji' options.txt /*'noemoji'*
|
||||
'noendoffile' options.txt /*'noendoffile'*
|
||||
'noendofline' options.txt /*'noendofline'*
|
||||
'noeof' options.txt /*'noeof'*
|
||||
'noeol' options.txt /*'noeol'*
|
||||
'noequalalways' options.txt /*'noequalalways'*
|
||||
'noerrorbells' options.txt /*'noerrorbells'*
|
||||
@@ -1055,6 +1061,7 @@ $quote eval.txt /*$quote*
|
||||
't_RC' term.txt /*'t_RC'*
|
||||
't_RF' term.txt /*'t_RF'*
|
||||
't_RI' term.txt /*'t_RI'*
|
||||
't_RK' term.txt /*'t_RK'*
|
||||
't_RS' term.txt /*'t_RS'*
|
||||
't_RT' term.txt /*'t_RT'*
|
||||
't_RV' term.txt /*'t_RV'*
|
||||
@@ -2158,7 +2165,7 @@ $quote eval.txt /*$quote*
|
||||
:abclear map.txt /*:abclear*
|
||||
:abo windows.txt /*:abo*
|
||||
:aboveleft windows.txt /*:aboveleft*
|
||||
:abstract vim9.txt /*:abstract*
|
||||
:abstract vim9class.txt /*:abstract*
|
||||
:addd quickfix.txt /*:addd*
|
||||
:al windows.txt /*:al*
|
||||
:all windows.txt /*:all*
|
||||
@@ -2318,7 +2325,7 @@ $quote eval.txt /*$quote*
|
||||
:chistory quickfix.txt /*:chistory*
|
||||
:cl quickfix.txt /*:cl*
|
||||
:cla quickfix.txt /*:cla*
|
||||
:class vim9.txt /*:class*
|
||||
:class vim9class.txt /*:class*
|
||||
:clast quickfix.txt /*:clast*
|
||||
:cle motion.txt /*:cle*
|
||||
:clearjumps motion.txt /*:clearjumps*
|
||||
@@ -2495,15 +2502,15 @@ $quote eval.txt /*$quote*
|
||||
:emenu gui.txt /*:emenu*
|
||||
:en eval.txt /*:en*
|
||||
:end eval.txt /*:end*
|
||||
:endclass vim9.txt /*:endclass*
|
||||
:endclass vim9class.txt /*:endclass*
|
||||
:enddef vim9.txt /*:enddef*
|
||||
:endenum vim9.txt /*:endenum*
|
||||
:endenum vim9class.txt /*:endenum*
|
||||
:endf userfunc.txt /*:endf*
|
||||
:endfo eval.txt /*:endfo*
|
||||
:endfor eval.txt /*:endfor*
|
||||
:endfunction userfunc.txt /*:endfunction*
|
||||
:endif eval.txt /*:endif*
|
||||
:endinterface vim9.txt /*:endinterface*
|
||||
:endinterface vim9class.txt /*:endinterface*
|
||||
:endt eval.txt /*:endt*
|
||||
:endtry eval.txt /*:endtry*
|
||||
:endw eval.txt /*:endw*
|
||||
@@ -2512,7 +2519,7 @@ $quote eval.txt /*$quote*
|
||||
:ene! editing.txt /*:ene!*
|
||||
:enew editing.txt /*:enew*
|
||||
:enew! editing.txt /*:enew!*
|
||||
:enum vim9.txt /*:enum*
|
||||
:enum vim9class.txt /*:enum*
|
||||
:eval eval.txt /*:eval*
|
||||
:ex editing.txt /*:ex*
|
||||
:exe eval.txt /*:exe*
|
||||
@@ -2642,7 +2649,7 @@ $quote eval.txt /*$quote*
|
||||
:inoreme gui.txt /*:inoreme*
|
||||
:inoremenu gui.txt /*:inoremenu*
|
||||
:insert insert.txt /*:insert*
|
||||
:interface vim9.txt /*:interface*
|
||||
:interface vim9class.txt /*:interface*
|
||||
:intro starting.txt /*:intro*
|
||||
:is tagsrch.txt /*:is*
|
||||
:isearch tagsrch.txt /*:isearch*
|
||||
@@ -3038,6 +3045,9 @@ $quote eval.txt /*$quote*
|
||||
:r! insert.txt /*:r!*
|
||||
:range cmdline.txt /*:range*
|
||||
:range! change.txt /*:range!*
|
||||
:range-closed-fold cmdline.txt /*:range-closed-fold*
|
||||
:range-offset cmdline.txt /*:range-offset*
|
||||
:range-pattern cmdline.txt /*:range-pattern*
|
||||
:re insert.txt /*:re*
|
||||
:read insert.txt /*:read*
|
||||
:read! insert.txt /*:read!*
|
||||
@@ -3276,7 +3286,7 @@ $quote eval.txt /*$quote*
|
||||
:startgreplace insert.txt /*:startgreplace*
|
||||
:startinsert insert.txt /*:startinsert*
|
||||
:startreplace insert.txt /*:startreplace*
|
||||
:static vim9.txt /*:static*
|
||||
:static vim9class.txt /*:static*
|
||||
:stj tagsrch.txt /*:stj*
|
||||
:stjump tagsrch.txt /*:stjump*
|
||||
:stop starting.txt /*:stop*
|
||||
@@ -3454,7 +3464,7 @@ $quote eval.txt /*$quote*
|
||||
:tunma map.txt /*:tunma*
|
||||
:tunmap map.txt /*:tunmap*
|
||||
:tunmenu gui.txt /*:tunmenu*
|
||||
:type vim9.txt /*:type*
|
||||
:type vim9class.txt /*:type*
|
||||
:u undo.txt /*:u*
|
||||
:un undo.txt /*:un*
|
||||
:una map.txt /*:una*
|
||||
@@ -4350,7 +4360,14 @@ E1304 vim9.txt /*E1304*
|
||||
E1305 textprop.txt /*E1305*
|
||||
E1306 vim9.txt /*E1306*
|
||||
E1307 vim9.txt /*E1307*
|
||||
E1308 builtin.txt /*E1308*
|
||||
E1309 map.txt /*E1309*
|
||||
E131 userfunc.txt /*E131*
|
||||
E1310 gui.txt /*E1310*
|
||||
E1311 map.txt /*E1311*
|
||||
E1312 windows.txt /*E1312*
|
||||
E1313 eval.txt /*E1313*
|
||||
E1314 vim9class.txt /*E1314*
|
||||
E132 userfunc.txt /*E132*
|
||||
E133 userfunc.txt /*E133*
|
||||
E134 change.txt /*E134*
|
||||
@@ -5569,7 +5586,14 @@ VMS os_vms.txt /*VMS*
|
||||
Vi intro.txt /*Vi*
|
||||
View starting.txt /*View*
|
||||
Vim9 vim9.txt /*Vim9*
|
||||
Vim9-abstract-class vim9class.txt /*Vim9-abstract-class*
|
||||
Vim9-class vim9class.txt /*Vim9-class*
|
||||
Vim9-class-overview vim9class.txt /*Vim9-class-overview*
|
||||
Vim9-enum vim9class.txt /*Vim9-enum*
|
||||
Vim9-script vim9.txt /*Vim9-script*
|
||||
Vim9-simple-class vim9class.txt /*Vim9-simple-class*
|
||||
Vim9-type vim9class.txt /*Vim9-type*
|
||||
Vim9-using-interface vim9class.txt /*Vim9-using-interface*
|
||||
VimEnter autocmd.txt /*VimEnter*
|
||||
VimLeave autocmd.txt /*VimLeave*
|
||||
VimLeavePre autocmd.txt /*VimLeavePre*
|
||||
@@ -5603,7 +5627,10 @@ WinClosed autocmd.txt /*WinClosed*
|
||||
WinEnter autocmd.txt /*WinEnter*
|
||||
WinLeave autocmd.txt /*WinLeave*
|
||||
WinNew autocmd.txt /*WinNew*
|
||||
WinResized autocmd.txt /*WinResized*
|
||||
WinResized-event windows.txt /*WinResized-event*
|
||||
WinScrolled autocmd.txt /*WinScrolled*
|
||||
WinScrolled-event windows.txt /*WinScrolled-event*
|
||||
X change.txt /*X*
|
||||
X11 options.txt /*X11*
|
||||
X11-icon gui_x11.txt /*X11-icon*
|
||||
@@ -6237,6 +6264,8 @@ cino-w indent.txt /*cino-w*
|
||||
cino-{ indent.txt /*cino-{*
|
||||
cino-} indent.txt /*cino-}*
|
||||
cinoptions-values indent.txt /*cinoptions-values*
|
||||
class-member vim9class.txt /*class-member*
|
||||
class-method vim9class.txt /*class-method*
|
||||
clear-undo undo.txt /*clear-undo*
|
||||
clearmatches() builtin.txt /*clearmatches()*
|
||||
client-server remote.txt /*client-server*
|
||||
@@ -6651,6 +6680,7 @@ end intro.txt /*end*
|
||||
end-of-file pattern.txt /*end-of-file*
|
||||
enlightened-terminal syntax.txt /*enlightened-terminal*
|
||||
environ() builtin.txt /*environ()*
|
||||
eol-and-eof editing.txt /*eol-and-eof*
|
||||
erlang.vim syntax.txt /*erlang.vim*
|
||||
err_buf channel.txt /*err_buf*
|
||||
err_cb channel.txt /*err_cb*
|
||||
@@ -6680,6 +6710,8 @@ escape() builtin.txt /*escape()*
|
||||
escape-bar version4.txt /*escape-bar*
|
||||
euphoria3.vim syntax.txt /*euphoria3.vim*
|
||||
euphoria4.vim syntax.txt /*euphoria4.vim*
|
||||
euro digraph.txt /*euro*
|
||||
euro-digraph digraph.txt /*euro-digraph*
|
||||
eval eval.txt /*eval*
|
||||
eval() builtin.txt /*eval()*
|
||||
eval-examples eval.txt /*eval-examples*
|
||||
@@ -6807,6 +6839,7 @@ expression-syntax eval.txt /*expression-syntax*
|
||||
exrc starting.txt /*exrc*
|
||||
extend() builtin.txt /*extend()*
|
||||
extendnew() builtin.txt /*extendnew()*
|
||||
extends vim9class.txt /*extends*
|
||||
extension-removal cmdline.txt /*extension-removal*
|
||||
extensions-improvements todo.txt /*extensions-improvements*
|
||||
f motion.txt /*f*
|
||||
@@ -6948,6 +6981,7 @@ form.vim syntax.txt /*form.vim*
|
||||
format-bullet-list tips.txt /*format-bullet-list*
|
||||
format-comments change.txt /*format-comments*
|
||||
format-formatexpr change.txt /*format-formatexpr*
|
||||
formatOtherKeys map.txt /*formatOtherKeys*
|
||||
formatting change.txt /*formatting*
|
||||
forth.vim syntax.txt /*forth.vim*
|
||||
fortran.vim syntax.txt /*fortran.vim*
|
||||
@@ -7250,8 +7284,11 @@ g:html_id_expr syntax.txt /*g:html_id_expr*
|
||||
g:html_ignore_conceal syntax.txt /*g:html_ignore_conceal*
|
||||
g:html_ignore_folding syntax.txt /*g:html_ignore_folding*
|
||||
g:html_line_ids syntax.txt /*g:html_line_ids*
|
||||
g:html_no_doc syntax.txt /*g:html_no_doc*
|
||||
g:html_no_foldcolumn syntax.txt /*g:html_no_foldcolumn*
|
||||
g:html_no_invalid syntax.txt /*g:html_no_invalid*
|
||||
g:html_no_links syntax.txt /*g:html_no_links*
|
||||
g:html_no_modeline syntax.txt /*g:html_no_modeline*
|
||||
g:html_no_pre syntax.txt /*g:html_no_pre*
|
||||
g:html_no_progress syntax.txt /*g:html_no_progress*
|
||||
g:html_number_lines syntax.txt /*g:html_number_lines*
|
||||
@@ -7472,6 +7509,7 @@ get() builtin.txt /*get()*
|
||||
get-ms-debuggers debug.txt /*get-ms-debuggers*
|
||||
getbufinfo() builtin.txt /*getbufinfo()*
|
||||
getbufline() builtin.txt /*getbufline()*
|
||||
getbufoneline() builtin.txt /*getbufoneline()*
|
||||
getbufvar() builtin.txt /*getbufvar()*
|
||||
getchangelist() builtin.txt /*getchangelist()*
|
||||
getchar() builtin.txt /*getchar()*
|
||||
@@ -7503,6 +7541,7 @@ getloclist() builtin.txt /*getloclist()*
|
||||
getmarklist() builtin.txt /*getmarklist()*
|
||||
getmatches() builtin.txt /*getmatches()*
|
||||
getmousepos() builtin.txt /*getmousepos()*
|
||||
getmouseshape() builtin.txt /*getmouseshape()*
|
||||
getpid() builtin.txt /*getpid()*
|
||||
getpos() builtin.txt /*getpos()*
|
||||
getqflist() builtin.txt /*getqflist()*
|
||||
@@ -7823,6 +7862,7 @@ howto.txt howto.txt /*howto.txt*
|
||||
hpterm term.txt /*hpterm*
|
||||
hpterm-color syntax.txt /*hpterm-color*
|
||||
html-flavor insert.txt /*html-flavor*
|
||||
html-folding syntax.txt /*html-folding*
|
||||
html-indent indent.txt /*html-indent*
|
||||
html-indenting indent.txt /*html-indenting*
|
||||
html.vim syntax.txt /*html.vim*
|
||||
@@ -7974,6 +8014,7 @@ if_sniff.txt if_sniff.txt /*if_sniff.txt*
|
||||
if_tcl.txt if_tcl.txt /*if_tcl.txt*
|
||||
ignore-errors eval.txt /*ignore-errors*
|
||||
ignore-timestamp editing.txt /*ignore-timestamp*
|
||||
implements vim9class.txt /*implements*
|
||||
import-autoload vim9.txt /*import-autoload*
|
||||
import-legacy vim9.txt /*import-legacy*
|
||||
import-map vim9.txt /*import-map*
|
||||
@@ -8049,7 +8090,7 @@ interfaces-5.2 version5.txt /*interfaces-5.2*
|
||||
internal-variables eval.txt /*internal-variables*
|
||||
internal-wordlist spell.txt /*internal-wordlist*
|
||||
internet intro.txt /*internet*
|
||||
interp-string eval.txt /*interp-string*
|
||||
interpolated-string eval.txt /*interpolated-string*
|
||||
interrupt() builtin.txt /*interrupt()*
|
||||
intro intro.txt /*intro*
|
||||
intro.txt intro.txt /*intro.txt*
|
||||
@@ -8141,6 +8182,7 @@ keypad-plus intro.txt /*keypad-plus*
|
||||
keypad-point intro.txt /*keypad-point*
|
||||
keys() builtin.txt /*keys()*
|
||||
keytrans() builtin.txt /*keytrans()*
|
||||
kitty-keyboard-protocol map.txt /*kitty-keyboard-protocol*
|
||||
known-bugs todo.txt /*known-bugs*
|
||||
l motion.txt /*l*
|
||||
l: eval.txt /*l:*
|
||||
@@ -8418,6 +8460,7 @@ motion-count-multiplied motion.txt /*motion-count-multiplied*
|
||||
motion.txt motion.txt /*motion.txt*
|
||||
mouse-mode-table term.txt /*mouse-mode-table*
|
||||
mouse-overview term.txt /*mouse-overview*
|
||||
mouse-scrolling-off scroll.txt /*mouse-scrolling-off*
|
||||
mouse-swap-buttons term.txt /*mouse-swap-buttons*
|
||||
mouse-using term.txt /*mouse-using*
|
||||
mouse_col-variable eval.txt /*mouse_col-variable*
|
||||
@@ -9558,6 +9601,7 @@ spec_chglog_format pi_spec.txt /*spec_chglog_format*
|
||||
spec_chglog_prepend pi_spec.txt /*spec_chglog_prepend*
|
||||
spec_chglog_release_info pi_spec.txt /*spec_chglog_release_info*
|
||||
special-buffers windows.txt /*special-buffers*
|
||||
specifies vim9class.txt /*specifies*
|
||||
speed-up tips.txt /*speed-up*
|
||||
spell spell.txt /*spell*
|
||||
spell-ACCENT spell.txt /*spell-ACCENT*
|
||||
@@ -9772,6 +9816,7 @@ swap-file recover.txt /*swap-file*
|
||||
swapchoice-variable eval.txt /*swapchoice-variable*
|
||||
swapcommand-variable eval.txt /*swapcommand-variable*
|
||||
swapfile-changed version4.txt /*swapfile-changed*
|
||||
swapfilelist() builtin.txt /*swapfilelist()*
|
||||
swapinfo() builtin.txt /*swapinfo()*
|
||||
swapname() builtin.txt /*swapname()*
|
||||
swapname-variable eval.txt /*swapname-variable*
|
||||
@@ -9882,6 +9927,7 @@ t_RB term.txt /*t_RB*
|
||||
t_RC term.txt /*t_RC*
|
||||
t_RF term.txt /*t_RF*
|
||||
t_RI term.txt /*t_RI*
|
||||
t_RK term.txt /*t_RK*
|
||||
t_RS term.txt /*t_RS*
|
||||
t_RT term.txt /*t_RT*
|
||||
t_RV term.txt /*t_RV*
|
||||
@@ -10169,6 +10215,7 @@ termdebug_popup terminal.txt /*termdebug_popup*
|
||||
termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
|
||||
termdebug_use_prompt terminal.txt /*termdebug_use_prompt*
|
||||
termdebug_wide terminal.txt /*termdebug_wide*
|
||||
termdebug_winbar terminal.txt /*termdebug_winbar*
|
||||
terminal terminal.txt /*terminal*
|
||||
terminal-api terminal.txt /*terminal-api*
|
||||
terminal-autoshelldir terminal.txt /*terminal-autoshelldir*
|
||||
@@ -10745,6 +10792,7 @@ vim9-unpack-ignore vim9.txt /*vim9-unpack-ignore*
|
||||
vim9-user-command vim9.txt /*vim9-user-command*
|
||||
vim9-variable-arguments vim9.txt /*vim9-variable-arguments*
|
||||
vim9.txt vim9.txt /*vim9.txt*
|
||||
vim9class.txt vim9class.txt /*vim9class.txt*
|
||||
vim9script vim9.txt /*vim9script*
|
||||
vim: options.txt /*vim:*
|
||||
vim_announce intro.txt /*vim_announce*
|
||||
@@ -10836,11 +10884,14 @@ w:quickfix_title quickfix.txt /*w:quickfix_title*
|
||||
w:var eval.txt /*w:var*
|
||||
waittime channel.txt /*waittime*
|
||||
warningmsg-variable eval.txt /*warningmsg-variable*
|
||||
wdl-syntax syntax.txt /*wdl-syntax*
|
||||
wdl.vim syntax.txt /*wdl.vim*
|
||||
white-space pattern.txt /*white-space*
|
||||
whitespace pattern.txt /*whitespace*
|
||||
wildcard editing.txt /*wildcard*
|
||||
wildcards editing.txt /*wildcards*
|
||||
wildmenumode() builtin.txt /*wildmenumode()*
|
||||
win-scrolled-resized windows.txt /*win-scrolled-resized*
|
||||
win16 os_win32.txt /*win16*
|
||||
win32 os_win32.txt /*win32*
|
||||
win32-!start gui_w32.txt /*win32-!start*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 9.0. Last change: 2022 Apr 23
|
||||
*term.txt* For Vim version 9.0. Last change: 2022 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -90,6 +90,11 @@ Note: When 't_ti' is not empty, Vim assumes that it causes switching to the
|
||||
alternate screen. This may slightly change what happens when executing a
|
||||
shell command or exiting Vim. To avoid this use 't_TI' and 't_TE'.
|
||||
|
||||
Vim will try to detect what keyboard protocol the terminal is using with the
|
||||
't_RK' termcap entry. This is sent after 't_TI', but only when there is no
|
||||
work to do (no typeahead and no pending commands). That is to avoid the
|
||||
response to end up in a shell command or arrive after Vim exits.
|
||||
|
||||
*xterm-bracketed-paste*
|
||||
When the 't_BE' option is set then 't_BE' will be sent to the
|
||||
terminal when entering "raw" mode and 't_BD' when leaving "raw" mode. The
|
||||
@@ -388,6 +393,8 @@ Added by Vim (there are no standard codes for these):
|
||||
xterm and other terminal emulators) The
|
||||
response is stored in |v:termresponse| |xterm-8bit|
|
||||
|'ttymouse'| |xterm-codes|
|
||||
t_RK request terminal keyboard protocol state; *t_RK* *'t_RK'*
|
||||
sent after |t_TI|
|
||||
t_u7 request cursor position (for xterm) *t_u7* *'t_u7'*
|
||||
see |'ambiwidth'|
|
||||
The response is stored in |v:termu7resp|
|
||||
@@ -569,7 +576,7 @@ anymore.
|
||||
Vim supports using true colors in the terminal (taken from |highlight-guifg|
|
||||
and |highlight-guibg|), given that the terminal supports this. To make this
|
||||
work the 'termguicolors' option needs to be set.
|
||||
See https://gist.github.com/XVilka/8346728 for a list of terminals that
|
||||
See https://github.com/termstandard/colors for a list of terminals that
|
||||
support true colors.
|
||||
|
||||
Sometimes setting 'termguicolors' is not enough and one has to set the |t_8f|
|
||||
@@ -768,8 +775,9 @@ See the "Options" chapter |options|.
|
||||
|
||||
If your terminal does not support a scrolling region, but it does support
|
||||
insert/delete line commands, scrolling with multiple windows may make the
|
||||
lines jump up and down. If you don't want this set the 'ttyfast' option.
|
||||
This will redraw the window instead of scroll it.
|
||||
lines jump up and down. This would happen if the 'ttyfast' option has been
|
||||
reset. Check that with: >
|
||||
verbose set ttyfast?
|
||||
|
||||
If your terminal scrolls very slowly, but redrawing is not slow, set the
|
||||
'ttyscroll' option to a small number, e.g., 3. This will make Vim redraw the
|
||||
@@ -1005,6 +1013,8 @@ and then drag) will result in whole words to be selected. This continues
|
||||
until the button is released, at which point the selection is per character
|
||||
again.
|
||||
|
||||
For scrolling with the mouse see |scroll-mouse-wheel|.
|
||||
|
||||
*gpm-mouse*
|
||||
The GPM mouse is only supported when the |+mouse_gpm| feature was enabled at
|
||||
compile time. The GPM mouse driver (Linux console) does not support quadruple
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2022 Oct 10
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2022 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -469,7 +469,6 @@ ConPTY problems have been fixed "winpty" will be preferred.
|
||||
Environment variables are used to pass information to the running job:
|
||||
VIM_SERVERNAME v:servername
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Terminal functions *terminal-function-details*
|
||||
|
||||
@@ -1129,7 +1128,6 @@ reference: >
|
||||
|
||||
Creating a screen dump ~
|
||||
*terminal-screendump*
|
||||
|
||||
To create the screen dump, run Vim (or any other program) in a terminal and
|
||||
make it show the desired state. Then use the |term_dumpwrite()| function to
|
||||
create a screen dump file. For example: >
|
||||
@@ -1153,7 +1151,6 @@ If there are differences then v:errors will contain the error message.
|
||||
|
||||
Comparing screen dumps ~
|
||||
*terminal-diffscreendump*
|
||||
|
||||
|assert_equalfile()| does not make it easy to see what is different.
|
||||
To spot the problem use |term_dumpdiff()|: >
|
||||
call term_dumpdiff("mysyntax.dump", "test.dump")
|
||||
@@ -1350,6 +1347,7 @@ If 'mouse' is set the plugin adds a window toolbar with these entries:
|
||||
Eval `:Evaluate`
|
||||
This way you can use the mouse to perform the most common commands. You need
|
||||
to have the 'mouse' option set to enable mouse clicks.
|
||||
See |termdebug_winbar| for configuring this toolbar.
|
||||
*:Winbar*
|
||||
You can add the window toolbar in other windows you open with: >
|
||||
:Winbar
|
||||
@@ -1415,6 +1413,20 @@ TermdebugStopPost After debugging has ended, gdb-related windows
|
||||
the state before the debugging was restored.
|
||||
|
||||
|
||||
Customizing ~
|
||||
*termdebug-customizing* *g:termdebug_config*
|
||||
In the past several global variables were used for configuration. These are
|
||||
deprecated and using the g:termdebug_config dictionary is preferred. When
|
||||
g:termdebug_config exists the other global variables will NOT be used.
|
||||
The recommended way is to start with an empty dictionary: >
|
||||
let g:termdebug_config = {}
|
||||
|
||||
Then you can add entries to the dictionary as mentioned below. The
|
||||
deprecated global variable names are mentioned for completeness. If you are
|
||||
switching over to using g:termdebug_config you can find the old variable name
|
||||
and take over the value, then delete the deprecated variable.
|
||||
|
||||
|
||||
Prompt mode ~
|
||||
*termdebug-prompt*
|
||||
When the |+terminal| feature is not supported and on MS-Windows, gdb will run
|
||||
@@ -1430,13 +1442,13 @@ in a buffer with 'buftype' set to "prompt". This works slightly differently:
|
||||
*termdebug_use_prompt*
|
||||
Prompt mode can be used even when the |+terminal| feature is present with: >
|
||||
let g:termdebug_config['use_prompt'] = 1
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_use_prompt = 1
|
||||
<
|
||||
*termdebug_map_K*
|
||||
The K key is normally mapped to :Evaluate. If you do not want this use: >
|
||||
let g:termdebug_config['map_K'] = 0
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_map_K = 0
|
||||
<
|
||||
*termdebug_disasm_window*
|
||||
@@ -1444,7 +1456,7 @@ If you want the Asm window shown by default, set the flag to 1.
|
||||
the "disasm_window_height" entry can be used to set the window height: >
|
||||
let g:termdebug_config['disasm_window'] = 1
|
||||
let g:termdebug_config['disasm_window_height'] = 15
|
||||
or, if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_disasm_window = 15
|
||||
Any value greater than 1 will set the Asm window height to that value.
|
||||
|
||||
@@ -1462,25 +1474,18 @@ interrupt the running program. But after using the MI command
|
||||
communication channel.
|
||||
|
||||
|
||||
Customizing ~
|
||||
*termdebug-customizing* *g:termdebug_config*
|
||||
In the past several global variables were used for configuration. These are
|
||||
deprecated, using the g:termdebug_config dictionary is preferred. When
|
||||
g:termdebug_config exists the other global variables will not be used.
|
||||
|
||||
|
||||
GDB command ~
|
||||
*g:termdebugger*
|
||||
To change the name of the gdb command, set "debugger" entry in
|
||||
g:termdebug_config or the "g:termdebugger" variable before invoking
|
||||
`:Termdebug`: >
|
||||
let g:termdebug_config['command'] = "mygdb"
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebugger = "mygdb"
|
||||
|
||||
If the command needs an argument use a List: >
|
||||
let g:termdebug_config['command'] = ['rr', 'replay', '--']
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebugger = ['rr', 'replay', '--']
|
||||
|
||||
Several arguments will be added to make gdb work well for the debugger.
|
||||
@@ -1501,7 +1506,7 @@ Then your gdb is too old.
|
||||
|
||||
|
||||
Colors ~
|
||||
*hl-debugPC* *hl-debugBreakpoint*
|
||||
*hl-debugPC* *hl-debugBreakpoint*
|
||||
The color of the signs can be adjusted with these highlight groups:
|
||||
- debugPC the current position
|
||||
- debugBreakpoint a breakpoint
|
||||
@@ -1517,7 +1522,6 @@ When 'background' is "dark":
|
||||
|
||||
Shortcuts ~
|
||||
*termdebug_shortcuts*
|
||||
|
||||
You can define your own shortcuts (mappings) to control gdb, that can work in
|
||||
any window, using the TermDebugSendCommand() function. Example: >
|
||||
map ,w :call TermDebugSendCommand('where')<CR>
|
||||
@@ -1526,7 +1530,6 @@ The argument is the gdb command.
|
||||
|
||||
Popup menu ~
|
||||
*termdebug_popup*
|
||||
|
||||
By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds
|
||||
these entries to the popup menu:
|
||||
Set breakpoint `:Break`
|
||||
@@ -1534,17 +1537,23 @@ these entries to the popup menu:
|
||||
Evaluate `:Evaluate`
|
||||
If you don't want this then disable it with: >
|
||||
let g:termdebug_config['popup'] = 0
|
||||
or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_popup = 0
|
||||
|
||||
|
||||
Window toolbar ~
|
||||
*termdebug_winbar*
|
||||
By default the Termdebug plugin creates a window toolbar if the mouse is
|
||||
enabled (see |:Winbar|). If you don't want this then disable it with: >
|
||||
let g:termdebug_config['winbar'] = 0
|
||||
|
||||
|
||||
Vim window width ~
|
||||
*termdebug_wide*
|
||||
|
||||
To change the width of the Vim window when debugging starts and use a vertical
|
||||
split: >
|
||||
let g:termdebug_config['wide'] = 163
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_wide = 163
|
||||
|
||||
This will set 'columns' to 163 when `:Termdebug` is used. The value is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 May 16
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 Nov 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -135,9 +135,9 @@ test_gui_event({event}, {args})
|
||||
Inject either a mouse button click, or a mouse move, event.
|
||||
The supported items in {args} are:
|
||||
button: mouse button. The supported values are:
|
||||
0 right mouse button
|
||||
0 left mouse button
|
||||
1 middle mouse button
|
||||
2 left mouse button
|
||||
2 right mouse button
|
||||
3 mouse button release
|
||||
4 scroll wheel down
|
||||
5 scroll wheel up
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Oct 13
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Nov 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,7 +147,8 @@ prop_add({lnum}, {col}, {props})
|
||||
above/below the line if {col} is zero; prepend
|
||||
and/or append spaces for padding with
|
||||
highlighting; cannot be used with "length",
|
||||
"end_lnum" and "end_col" |virtual-text|
|
||||
"end_lnum" and "end_col"
|
||||
See |virtual-text| for more information.
|
||||
*E1294*
|
||||
text_align when "text" is present and {col} is zero;
|
||||
specifies where to display the text:
|
||||
|
||||
@@ -539,7 +539,7 @@ the current window, try this custom `:HelpCurwin` command:
|
||||
>
|
||||
command -bar -nargs=? -complete=help HelpCurwin execute s:HelpCurwin(<q-args>)
|
||||
let s:did_open_help = v:false
|
||||
|
||||
|
||||
function s:HelpCurwin(subject) abort
|
||||
let mods = 'silent noautocmd keepalt'
|
||||
if !s:did_open_help
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Oct 16
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Dec 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,20 +38,25 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
'smoothscroll':
|
||||
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
|
||||
- computing 'scrolloff' position row use w_skipcol
|
||||
|
||||
Check textprop right/above/below with 'number' set and "n" in 'cpo'.
|
||||
|
||||
Don't do anything for ":!". #11372
|
||||
Upcoming larger works:
|
||||
- Make spell checking work with recent .dic/.aff files, e.g. French. #4916
|
||||
Make Vim understand the format somehow? Search for "spell" below.
|
||||
Make sure suggestions are speedy, also with composed words (German).
|
||||
- Discuss alternatives for using other grammars (treesitter, TextMate).
|
||||
- Possibly conversion to Vim syntax rules.
|
||||
- Other mechanism than group and cluster to nest syntax items, to be used
|
||||
for grammars.
|
||||
- Possibly keeping the parsed syntax tree and incremental updates.
|
||||
- tree-sitter doesn't handle incorrect syntax (while typing) properly.
|
||||
- Make clear how it relates to LSP.
|
||||
- example plugin: https://github.com/uga-rosa/dps-vsctm.vim
|
||||
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- Use Vim9 for more runtime files.
|
||||
- implement :class and :interface: See |vim9-classes| #11544
|
||||
- implement :type
|
||||
- implement :enum
|
||||
- implement :class and :interface: See |vim9-classes|
|
||||
- Use Vim9 for more runtime files.
|
||||
- Inline call to map() and filter(), better type checking.
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
has(featureName), len(someString)
|
||||
@@ -164,6 +169,8 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Crash when a variable is removed while listing variables (Issue #11435)
|
||||
|
||||
Autoconf: must use autoconf 2.69, later version generates lots of warnings
|
||||
- try using autoconf 2.71 and fix all "obsolete" warnings #11322
|
||||
|
||||
@@ -177,20 +184,66 @@ reduced?
|
||||
|
||||
Add BufDeletePost. #11041
|
||||
|
||||
Add winid arg to col() and charcol() #11466 (request #11461)
|
||||
|
||||
Can we make 'noendofline' and 'endoffile' visible? Should show by default,
|
||||
since it's an unusual situation.
|
||||
- Show 'noendofline' when it would be used for writing ('fileformat' "dos")
|
||||
with an upside down exclamation mark? NonText highlighting.
|
||||
- Show 'endoffile' when it would be used for writing ('fileformat' "dos") with
|
||||
"CTRL-Z", NonText highlighting.
|
||||
- Add 'fillchars' items to change this, default behavior like:
|
||||
noeol:¡
|
||||
eof:CTRL-Z
|
||||
|
||||
Test property disappears when using CR twice in a row. OK when some text was
|
||||
entered. (#11151)
|
||||
|
||||
Add 'keywordprg' to various ftplugin files:
|
||||
https://github.com/vim/vim/pull/5566
|
||||
|
||||
PR #11579 to add visualtext(), return Visually selected text.
|
||||
|
||||
Issue #10512: Dynamic loading broken with Perl 5.36
|
||||
Damien has a patch (2022 Dec 4)
|
||||
|
||||
Add some kind of ":whathappend" command and functions to make visible what the
|
||||
last few typed keys and executed commands are. To be used when the user
|
||||
wonders what went wrong.
|
||||
- typed keys - Normal mode command - like what is recorded in a register and
|
||||
displayed by 'showcmd'.
|
||||
- executed command lines
|
||||
- with more verbosity: what scripts/functions/autocommands were executed
|
||||
|
||||
NFA regexp does not handle composing characters well: #10286
|
||||
[ɔ̃] matches both ɔ and ɔ̃
|
||||
\(ɔ\|ɔ̃\) matches ɔ and not ɔ̃
|
||||
|
||||
Improvement in terminal configuration mess: Request the terminfo entry from
|
||||
the terminal itself. The $TERM value then is only relevant for whether this
|
||||
feature is supported or not. Replaces the xterm mechanism to request each
|
||||
entry separately. #6609
|
||||
Multiplexers (screen, tmux) can request it to the underlying terminal, and
|
||||
pass it on with modifications.
|
||||
How to get all the text quickly (also over ssh)? Can we use a side channel?
|
||||
Is there a way to make 'autowriteall' make a clean exit when the xterm is
|
||||
closed? (Dennis Nazic says files are preserved, okt 28). Perhaps handle TERM
|
||||
like HUP?
|
||||
|
||||
Better terminal emulator support:
|
||||
> Somehow request the terminfo entry from the terminal itself. The $TERM
|
||||
value then is only relevant for whether this feature is supported or not.
|
||||
Replaces the xterm mechanism to request each entry separately. #6609
|
||||
Multiplexers (screen, tmux) can request it to the underlying terminal, and
|
||||
pass it on with modifications.
|
||||
How to get all the text quickly (also over ssh)? Can we use a side channel?
|
||||
> When xterm supports sending an Escape sequence for the Esc key, should
|
||||
have a way to request this state. That could be an XTGETTCAP entry, e.g.
|
||||
"k!". Add "esc_sends_sequence" flag.
|
||||
If we know this state, then do not pretend going out of Insert mode in
|
||||
vgetorpeek(), where kitty_protocol_state is checked.
|
||||
> If a response ends up in a shell command, one way to avoid this is by
|
||||
sending t_RV last and delay starting a shell command until the response
|
||||
has been seen.
|
||||
> Can we use the req_more_codes_from_term() mechanism with more terminals?
|
||||
Should we repeat it after executing a shell command?
|
||||
Can also add this to the 'keyprotocol' option: "mok2+tcap"
|
||||
> In the table of terminal names pointing to the list of termcap entries,
|
||||
add an optional additional one. So that "xterm-kitty" can first load
|
||||
"xterm" and then add "kitty" entries.
|
||||
|
||||
Using "A" and "o" in manually created fold (in empty buffer) does not behave
|
||||
consistenly (James McCoy, #10698)
|
||||
@@ -207,7 +260,7 @@ Resetting 't_ut' already causes this?
|
||||
|
||||
When scheme can't be found by configure there is no clear "not found" message:
|
||||
configure:5769: checking MzScheme install prefix
|
||||
configure:5781: result:
|
||||
configure:5781: result:
|
||||
|
||||
Can "CSI nr X" be used instead of outputting spaces? Is it faster? #8002
|
||||
|
||||
@@ -222,6 +275,15 @@ Idea: when typing ":e /some/dir/" and "dir" does not exist, highlight in red.
|
||||
initialization to figure out the default value from 'shell'. Add a test for
|
||||
this.
|
||||
|
||||
Support translations for plugins: #11637
|
||||
- Need a tool like xgettext for Vim script, generates a .pot file.
|
||||
Need the equivalent of _() and N_(), perhaps TR() and TRN().
|
||||
- Instructions for how to create .po files and translate.
|
||||
- Script or Makefile to generate .mo files.
|
||||
- Instructions and perhaps a script to install the .mo files in the right
|
||||
place.
|
||||
- Add variant of gettext() that takes a package name.
|
||||
|
||||
With concealed text mouse click doesn't put the cursor in the right position.
|
||||
(Herb Sitz) Fix by Christian Brabandt, 2011 Jun 16. Doesn't work properly,
|
||||
need to make the change in where RET_WIN_BUF_CHARTABSIZE() is called.
|
||||
@@ -264,8 +326,8 @@ Also, z= in German on a long word can take a very long time, but CTRL-C to
|
||||
interrupt does not work. Where to add ui_breakcheck()?
|
||||
New English spell files also have very slow suggestions.
|
||||
|
||||
French spell files don't work correctly. #4916
|
||||
Make Vim understand the format somehow?
|
||||
When 'spelloptions' is "camel" then zG doesn't work on some words.
|
||||
(Gary Johnson, 17 Oct 2022)
|
||||
|
||||
Make "g>" and "g<" in Visual mode move the text right or left.
|
||||
Also for a block selection. #8558
|
||||
@@ -299,6 +361,9 @@ when redirecting to a local variable (function or script) storing the value
|
||||
won't work. At least give an error. Is there a way to make it work?
|
||||
#10616
|
||||
|
||||
Completion for ":runtime" should show valid values, not what's in the current
|
||||
directory. (#11447)
|
||||
|
||||
Add an option to start_timer() to return from the input loop with K_IGNORE.
|
||||
This is useful e.g. when a popup was created that disables mappings, we need
|
||||
to return from vgetc() to make this happen. #7011
|
||||
@@ -340,6 +405,7 @@ Is this the right solution? Need to cleanup langmap behavior:
|
||||
So that replaying the register doesn't use keymap/langmap and still does the
|
||||
same thing.
|
||||
Also see #737: langmap not applied to replaying recording.
|
||||
Perhaps also related: #5147
|
||||
|
||||
Matchparen doesn't remove highlight after undo. (#7054)
|
||||
Is OK when syntax HL is active.
|
||||
@@ -380,6 +446,8 @@ and/or "sandbox" are set.
|
||||
|
||||
Problem with auto-formatting - inserting space and putting cursor before added
|
||||
character. (#6154)
|
||||
Auto-formatting comments joins a following non-comment line when the comment
|
||||
ends in a space. (Adam Levy, 18 Oct 2022)
|
||||
|
||||
When 'lazyredraw' is set sometimes the title is not updated.
|
||||
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
||||
@@ -2585,13 +2653,6 @@ Awaiting updated patches:
|
||||
- Add possibility to highlight specific columns (for Fortran). Or put a
|
||||
line in between columns (e.g., for 'textwidth').
|
||||
Patch to add 'hlcolumn' from Vit Stradal, 2004 May 20.
|
||||
8 Add functions:
|
||||
gettext() Translate a message. (Patch from Yasuhiro Matsumoto)
|
||||
Update 2004 Sep 10
|
||||
Another patch from Edward L. Fox (2005 Nov 24)
|
||||
Search in 'runtimepath'?
|
||||
More docs needed about how to use this.
|
||||
How to get the messages into the .po files?
|
||||
confirm() add "flags" argument, with 'v' for vertical
|
||||
layout and 'c' for console dialog. (Haegg)
|
||||
Flemming Madsen has a patch for the 'c' flag
|
||||
@@ -4475,8 +4536,11 @@ Autocommands:
|
||||
BufChangePre, BufChangePost and RevertBuf. (Shah)
|
||||
ViewChanged - triggered when the text scrolls and when the window size
|
||||
changes.
|
||||
WinResized - After a window has been resized
|
||||
WinClose - Just before closing a window
|
||||
QuickfixList - when any entry in the current list changes or another
|
||||
list is selected
|
||||
QuickfixPosition - when selecting another entry in the current quickfix
|
||||
list
|
||||
|
||||
- Write the file now and then ('autosave'):
|
||||
*'autosave'* *'as'* *'noautosave'* *'noas'*
|
||||
'autosave' 'as' number (default 0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2022 Sep 09
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2022 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -8,8 +8,8 @@ Defining and using functions.
|
||||
|
||||
This is introduced in section |41.7| of the user manual.
|
||||
|
||||
1. Defining a fuction |define-function|
|
||||
2. Calling a fuction |:call|
|
||||
1. Defining a function |define-function|
|
||||
2. Calling a function |:call|
|
||||
3. Cleaning up in a function |:defer|
|
||||
4. Automatically loading functions |autoload-functions|
|
||||
|
||||
@@ -405,7 +405,7 @@ function to abort. `:defer` can be used to avoid that: >
|
||||
call Handle('Outfile')
|
||||
endfunc
|
||||
|
||||
Note that deleting "Outfile" is scheduled before calling system(), since it
|
||||
Note that deleting "Outfile" is scheduled before calling `system()`, since it
|
||||
can be created even when `system()` fails.
|
||||
|
||||
The deferred functions are called in reverse order, the last one added is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_03.txt* For Vim version 9.0. Last change: 2020 Sep 03
|
||||
*usr_03.txt* For Vim version 9.0. Last change: 2022 Oct 30
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -223,7 +223,7 @@ you can see? This figure shows the three commands you can use:
|
||||
+---------------------------+
|
||||
|
||||
Hints: "H" stands for Home, "M" for Middle and "L" for Last. Alternatively,
|
||||
"H" for high, "M" for Middle and "L" for low.
|
||||
"H" for High, "M" for Middle and "L" for Low.
|
||||
|
||||
==============================================================================
|
||||
*03.6* Telling where you are
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_12.txt* For Vim version 9.0. Last change: 2021 Apr 19
|
||||
*usr_12.txt* For Vim version 9.0. Last change: 2022 Nov 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Dec 05
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -139,7 +139,7 @@ FOUR KINDS OF NUMBERS
|
||||
Numbers can be decimal, hexadecimal, octal and binary.
|
||||
|
||||
A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal
|
||||
31 and 0x1234 is decimal 4660.
|
||||
31 and "0x1234" is decimal 4660.
|
||||
|
||||
An octal number starts with "0o", "0O". "0o17" is decimal 15.
|
||||
|
||||
@@ -442,7 +442,7 @@ If you don't like the concatenation you can use the $"string" form, which
|
||||
accepts an expression in curly braces: >
|
||||
echo $"Name: {name}"
|
||||
|
||||
See |interp-string| for more information.
|
||||
See |interpolated-string| for more information.
|
||||
|
||||
Borrowed from the C language is the conditional expression: >
|
||||
|
||||
@@ -687,7 +687,7 @@ search() function uses its first argument as a search pattern and the second
|
||||
one as flags. The "W" flag means the search doesn't wrap around the end of
|
||||
the file.
|
||||
|
||||
Using the `call` command is optional in |Vim9| script. It is required in
|
||||
Using the `call` command is optional in |Vim9| script. It is required in
|
||||
legacy script and on the command line: >
|
||||
|
||||
call search("Date: ", "W")
|
||||
@@ -803,7 +803,7 @@ List manipulation: *list-functions*
|
||||
call() call a function with List as arguments
|
||||
index() index of a value in a List or Blob
|
||||
indexof() index in a List or Blob where an expression
|
||||
evaluates to true
|
||||
evaluates to true
|
||||
max() maximum value in a List
|
||||
min() minimum value in a List
|
||||
count() count number of times a value appears in a List
|
||||
@@ -935,6 +935,7 @@ Working with text in the current buffer: *text-functions*
|
||||
|
||||
Working with text in another buffer:
|
||||
getbufline() get a list of lines from the specified buffer
|
||||
getbufoneline() get a one line from the specified buffer
|
||||
setbufline() replace a line in the specified buffer
|
||||
appendbufline() append a list of lines in the specified buffer
|
||||
deletebufline() delete lines from a specified buffer
|
||||
@@ -1030,6 +1031,7 @@ Buffers, windows and the argument list:
|
||||
getwininfo() get a list with window information
|
||||
getchangelist() get a list of change list entries
|
||||
getjumplist() get a list of jump list entries
|
||||
swapfilelist() list of existing swap files in 'directory'
|
||||
swapinfo() information about a swap file
|
||||
swapname() get the swap file path of a buffer
|
||||
|
||||
@@ -1110,6 +1112,7 @@ Interactive: *interactive-functions*
|
||||
getcharstr() get a character from the user as a string
|
||||
getcharmod() get modifiers for the last typed character
|
||||
getmousepos() get last known mouse position
|
||||
getmouseshape() get name of the current mouse shape
|
||||
echoraw() output characters as-is
|
||||
feedkeys() put characters in the typeahead queue
|
||||
input() get a line from the user
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Oct 13
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -249,8 +249,7 @@ g8 Print the hex values of the bytes used in the
|
||||
|
||||
*:!cmd* *:!*
|
||||
:!{cmd} Execute {cmd} with the shell. See also the 'shell'
|
||||
and 'shelltype' option. `:!` without a {cmd} is a no-op,
|
||||
it does nothing.
|
||||
and 'shelltype' option.
|
||||
*E34*
|
||||
Any '!' in {cmd} is replaced with the previous
|
||||
external command (see also 'cpoptions'). But not when
|
||||
@@ -299,7 +298,8 @@ g8 Print the hex values of the bytes used in the
|
||||
:silent !{cmd}
|
||||
< The screen is not redrawn then, thus you have to use
|
||||
CTRL-L or ":redraw!" if the command did display
|
||||
something.
|
||||
something. However, this depends on what the |t_ti|
|
||||
and |t_te| termcap entries are set to.
|
||||
Also see |shell-window|.
|
||||
|
||||
*:!!*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version5.txt* For Vim version 9.0. Last change: 2022 Apr 06
|
||||
*version5.txt* For Vim version 9.0. Last change: 2022 Nov 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -118,7 +118,7 @@ Added |added-5.8|
|
||||
Fixed |fixed-5.8|
|
||||
|
||||
==============================================================================
|
||||
INCOMPATIBLE *incompatible-5*
|
||||
INCOMPATIBLE *incompatible-5*
|
||||
|
||||
Default value for 'compatible' changed *cp-default*
|
||||
--------------------------------------
|
||||
@@ -360,7 +360,7 @@ CTRL-_ key for this |i_CTRL-_|. >
|
||||
:imap <C-B> <C-O>:set revins!<CR>
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *new-5*
|
||||
NEW FEATURES *new-5*
|
||||
|
||||
Syntax highlighting *new-highlighting*
|
||||
-------------------
|
||||
@@ -635,7 +635,7 @@ Included support for the Farsi language (Shiran). Only when enabled at
|
||||
compile time. See |farsi|.
|
||||
|
||||
==============================================================================
|
||||
IMPROVEMENTS *improvements-5*
|
||||
IMPROVEMENTS *improvements-5*
|
||||
|
||||
Performance:
|
||||
- When 'showcmd' was set, mappings would execute much more slowly because the
|
||||
@@ -929,7 +929,7 @@ Some versions of Motif require "-lXpm". Added check for this in configure.
|
||||
Don't add "-L/usr/lib" to the link line, causes problems on a few systems.
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-5*
|
||||
COMPILE TIME CHANGES *compile-changes-5*
|
||||
|
||||
When compiling, allow a choice for minimal, normal or maximal features in an
|
||||
easy way, by changing a single line in src/feature.h.
|
||||
@@ -975,7 +975,7 @@ Don't use HPUX digraphs by default, but only when HPUX_DIGRAPHS is defined.
|
||||
|digraphs-default|
|
||||
|
||||
==============================================================================
|
||||
BUG FIXES *bug-fixes-5*
|
||||
BUG FIXES *bug-fixes-5*
|
||||
|
||||
Note: Some of these fixes may only apply to test versions which were
|
||||
created after version 4.6, but before 5.0.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.0. Last change: 2022 Jun 28
|
||||
*version9.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -254,12 +254,12 @@ summary.
|
||||
Many memory leaks, invalid memory accesses and crashes have been fixed.
|
||||
See the list of patches below: |bug-fixes-9|.
|
||||
|
||||
Support for Vim expression evaluation in a string. |interp-string|
|
||||
Support for Vim expression evaluation in a string. |interpolated-string|
|
||||
Support for evaluating Vim expressions in a heredoc. |:let-heredoc|
|
||||
|
||||
Support for fuzzy matching:
|
||||
- a string in a List of strings. |fuzzy-matching|
|
||||
- completion support for command line completion using 'wildoptions'
|
||||
- completion support for command line completion using 'wildoptions'.
|
||||
- for |:vimgrep|.
|
||||
|
||||
Added support for the |Haiku| OS.
|
||||
@@ -398,22 +398,22 @@ Update xdiff to version 2.33. Update libvterm to revision 789.
|
||||
|
||||
Support 'trim' for Python/Lua/Perl/Tcl/Ruby/MzScheme interface heredoc.
|
||||
|
||||
Add the |t_AU| and |t_8u| termap codes for underline and undercurl. Add the
|
||||
Add the |t_AU| and |t_8u| termcap codes for underline and undercurl. Add the
|
||||
t_fd and t_fe termcap codes for detecting focus events.
|
||||
|
||||
Support for indenting C pragmas like normal code. (|cino-P|)
|
||||
|
||||
Add support for defining the syntax fold level (|:syn-foldlevel|)
|
||||
Add support for defining the syntax fold level. (|:syn-foldlevel|)
|
||||
|
||||
Add support for using \<*xxx> in a string to prepend a modifier to a
|
||||
character. (|expr-quote|).
|
||||
character. (|expr-quote|)
|
||||
|
||||
Add support trimming characters at the beginning or end of a string using
|
||||
|trim()|.
|
||||
|
||||
Make ":verbose pwd" show the scope of the directory. |:pwd-verbose|
|
||||
|
||||
Add the "0o" notation for specifying octal numbers |scriptversion-4|
|
||||
Add the "0o" notation for specifying octal numbers. |scriptversion-4|
|
||||
|
||||
Support for changing to the previous tab-local and window-local directories
|
||||
using the "tcd -" and "lcd -" commands. (|:tcd-| and |:lcd-|)
|
||||
@@ -428,7 +428,7 @@ Add support for executing (|:@|) a register containing line continuation.
|
||||
Lua support:
|
||||
- Call Vim functions from Lua (vim.call() and vim.fn()).
|
||||
- Convert a Lua function and a closure to a Vim funcref so that it can be
|
||||
accessed in a Vimscript (|lua-funcref|).
|
||||
accessed in a Vim script (|lua-funcref|).
|
||||
- Not backwards compatible: Make Lua arrays one based.
|
||||
- Add support for using table.insert() and table.remove() functions with Vim
|
||||
lists.
|
||||
@@ -27366,7 +27366,7 @@ Files: src/evalfunc.c, src/testdir/test_vim9_builtin.vim
|
||||
Patch 8.2.4460
|
||||
Problem: Vim9: wrong error for defining dict function.
|
||||
Solution: Explicitly check for trying to define a dict function.
|
||||
(closes 9827)
|
||||
(closes #9827)
|
||||
Files: src/errors.h, src/userfunc.c, src/vim9compile.c,
|
||||
src/testdir/test_vim9_func.vim
|
||||
|
||||
@@ -28478,7 +28478,7 @@ Files: src/change.c, src/drawscreen.c, src/structs.h
|
||||
|
||||
Patch 8.2.4645
|
||||
Problem: 'shortmess' changed when session does not store options.
|
||||
Solution: Save and restore 'shortmess' if needed. (James Charti,
|
||||
Solution: Save and restore 'shortmess' if needed. (James Cherti,
|
||||
closes #10037)
|
||||
Files: src/session.c, src/testdir/test_mksession.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 11
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -16,7 +16,7 @@ features in Vim9 script.
|
||||
3. New style functions |fast-functions|
|
||||
4. Types |vim9-types|
|
||||
5. Namespace, Import and Export |vim9script|
|
||||
6. Future work: classes |vim9-classes|
|
||||
6. Classes and interfaces |vim9-classes|
|
||||
|
||||
9. Rationale |vim9-rationale|
|
||||
|
||||
@@ -1039,7 +1039,7 @@ In Vim9 script one can use the following predefined values: >
|
||||
`true` is the same as `v:true`, `false` the same as `v:false`, `null` the same
|
||||
as `v:null`.
|
||||
|
||||
While `null` has the type "special", the other "null_" types have the type
|
||||
While `null` has the type "special", the other "null_" values have the type
|
||||
indicated by their name. Quite often a null value is handled the same as an
|
||||
empty value, but not always. The values can be useful to clear a script-local
|
||||
variable, since they cannot be deleted with `:unlet`. E.g.: >
|
||||
@@ -1940,64 +1940,17 @@ Or: >
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. Future work: classes *vim9-classes*
|
||||
6. Classes and interfaces *vim9-classes*
|
||||
|
||||
Above "class" was mentioned a few times, but it has not been implemented yet.
|
||||
Most of Vim9 script can be created without this functionality, and since
|
||||
implementing classes is going to be a lot of work, it is left for the future.
|
||||
For now we'll just make sure classes can be added later.
|
||||
In legacy script a Dictionary could be used as a kind-of object, by adding
|
||||
members that are functions. However, this is quite inefficient and requires
|
||||
the writer to do the work of making sure all the objects have the right
|
||||
members. See |Dictionary-function|.
|
||||
|
||||
Thoughts:
|
||||
- `class` / `endclass`, the whole class must be in one file
|
||||
- Class names are always CamelCase (to avoid a name clash with builtin types)
|
||||
- A single constructor called "constructor"
|
||||
- Single inheritance with `class ThisClass extends BaseClass`
|
||||
- `abstract class` (class with incomplete implementation)
|
||||
- `interface` / `endinterface` (abstract class without any implementation)
|
||||
- `class SomeClass implements SomeInterface`
|
||||
- Generics for class: `class <Tkey, Tentry>`
|
||||
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
|
||||
In |Vim9| script you can have classes, objects and interfaces like in most
|
||||
popular object-oriented programming languages. Since this is a lot of
|
||||
functionality it is located in a separate help file: |vim9class.txt|.
|
||||
|
||||
Again, much of this is from TypeScript with a slightly different syntax.
|
||||
|
||||
Some things that look like good additions:
|
||||
- Use a class as an interface (like Dart)
|
||||
- Extend a class with methods, using an import (like Dart)
|
||||
- Mixins
|
||||
- For testing: Mock mechanism
|
||||
|
||||
An important class that will be provided is "Promise". Since Vim is single
|
||||
threaded, connecting asynchronous operations is a natural way of allowing
|
||||
plugins to do their work without blocking the user. It's a uniform way to
|
||||
invoke callbacks and handle timeouts and errors.
|
||||
|
||||
Some commands have already been reserved:
|
||||
*:class*
|
||||
*:endclass*
|
||||
*:abstract*
|
||||
*:enum*
|
||||
*:endenum*
|
||||
*:interface*
|
||||
*:endinterface*
|
||||
*:static*
|
||||
*:type*
|
||||
|
||||
Some examples: >
|
||||
|
||||
abstract class Person
|
||||
static const prefix = 'xxx'
|
||||
var name: string
|
||||
|
||||
def constructor(name: string)
|
||||
this.name = name
|
||||
enddef
|
||||
|
||||
def display(): void
|
||||
echo name
|
||||
enddef
|
||||
|
||||
abstract def find(string): Person
|
||||
endclass
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -2284,18 +2237,5 @@ tool need to be supported. Since most languages support classes the lack of
|
||||
support for classes in Vim is then a problem.
|
||||
|
||||
|
||||
Classes ~
|
||||
|
||||
Vim supports a kind-of object oriented programming by adding methods to a
|
||||
dictionary. With some care this can be made to work, but it does not look
|
||||
like real classes. On top of that, it's quite slow, because of the use of
|
||||
dictionaries.
|
||||
|
||||
It would be good to support real classes, and this is planned for a later
|
||||
version. The support is a "minimal common functionality" of class support in
|
||||
most languages. It will work much like Java, which is the most popular
|
||||
programming language.
|
||||
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
700
runtime/doc/vim9class.txt
Normal file
700
runtime/doc/vim9class.txt
Normal file
@@ -0,0 +1,700 @@
|
||||
*vim9class.txt* For Vim version 9.0. Last change: 2022 Dec 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
NOTE - This is under development, anything can still change! - NOTE
|
||||
|
||||
|
||||
Vim9 classes, objects, interfaces, types and enums.
|
||||
|
||||
1. Overview |Vim9-class-overview|
|
||||
2. A simple class |Vim9-simple-class|
|
||||
3. Using an abstract class |Vim9-abstract-class|
|
||||
4. Using an interface |Vim9-using-interface|
|
||||
5. More class details |Vim9-class|
|
||||
6. Type definition |Vim9-type|
|
||||
7. Enum |Vim9-enum|
|
||||
|
||||
9. Rationale
|
||||
10. To be done later
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. Overview *Vim9-class-overview*
|
||||
|
||||
The fancy term is "object-oriented programming". You can find lots of study
|
||||
material about this subject. Here we document what |Vim9| script provides,
|
||||
assuming you know the basics already. Added are helpful hints about how
|
||||
to use this functionality effectively.
|
||||
|
||||
The basic item is an object:
|
||||
- An object stores state. It contains one or more variables that can each
|
||||
have a value.
|
||||
- An object usually provides functions that manipulate its state. These
|
||||
functions are invoked "on the object", which is what sets it apart from the
|
||||
traditional separation of data and code that manipulates the data.
|
||||
- An object has a well defined interface, with typed member variables and
|
||||
member functions.
|
||||
- Objects are created by a class and all objects have the same interface.
|
||||
This never changes, it is not dynamic.
|
||||
|
||||
An object can only be created by a class. A class provides:
|
||||
- A new() method, the constructor, which returns an object for the class.
|
||||
This method is invoked on the class name: MyClass.new().
|
||||
- State shared by all objects of the class: class variables and constants.
|
||||
- A hierarchy of classes, with super-classes and sub-classes, inheritance.
|
||||
|
||||
An interface is used to specify properties of an object:
|
||||
- An object can declare several interfaces that it implements.
|
||||
- Different objects implementing the same interface can be used the same way.
|
||||
|
||||
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,
|
||||
don't try to model the real world. This can be confusing, especially because
|
||||
teachers use real-world objects to explain class relations and you might think
|
||||
your model should therefore reflect the real world. It doesn't! The model
|
||||
should match your purpose.
|
||||
|
||||
You will soon find that composition is often better than inheritance. Don't
|
||||
waste time trying to find the optimal class model. Or waste time discussing
|
||||
whether a square is a rectangle or that a rectangle is a square. It doesn't
|
||||
matter.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
2. A simple class *Vim9-simple-class*
|
||||
|
||||
Let's start with a simple example: a class that stores a text position: >
|
||||
|
||||
class TextPosition
|
||||
this.lnum: number
|
||||
this.col: number
|
||||
|
||||
def new(lnum: number, col: number)
|
||||
this.lnum = lnum
|
||||
this.col = col
|
||||
enddef
|
||||
|
||||
def SetLnum(lnum: number)
|
||||
this.lnum = lnum
|
||||
enddef
|
||||
|
||||
def SetCol(col: number)
|
||||
this.col = col
|
||||
enddef
|
||||
|
||||
def SetPosition(lnum: number, col: number)
|
||||
this.lnum = lnum
|
||||
this.col = col
|
||||
enddef
|
||||
endclass
|
||||
|
||||
You can create an object from this class with the new() method: >
|
||||
|
||||
var pos = TextPosition.new(1, 1)
|
||||
|
||||
The object members "lnum" and "col" can be accessed directly: >
|
||||
|
||||
echo $'The text position is ({pos.lnum}, {pos.col})'
|
||||
|
||||
If you have been using other object-oriented languages you will notice that
|
||||
in Vim the object members are consistently referred to with the "this."
|
||||
prefix. This is different from languages like Java and TypeScript. This
|
||||
naming convention makes the object members easy to spot. Also, when a
|
||||
variable does not have the "this." prefix you know it is not an object member.
|
||||
|
||||
|
||||
Member write access ~
|
||||
|
||||
Now try to change an object member directly: >
|
||||
|
||||
pos.lnum = 9
|
||||
|
||||
This will give you an error! That is because by default object members can be
|
||||
read but not set. That's why the class provides a method for it: >
|
||||
|
||||
pos.SetLnum(9)
|
||||
|
||||
Allowing to read but not set an object member is the most common and safest
|
||||
way. Most often there is no problem using a value, while setting a value may
|
||||
have side effects that need to be taken care of. In this case, the SetLnum()
|
||||
method could check if the line number is valid and either give an error or use
|
||||
the closest valid value.
|
||||
|
||||
If you don't care about side effects and want to allow the object member to be
|
||||
changed at any time, you can make it public: >
|
||||
|
||||
public this.lnum: number
|
||||
public this.col number
|
||||
|
||||
Now you don't need the SetLnum(), SetCol() and SetPosition() methods, setting
|
||||
"pos.lnum" directly above will no longer give an error.
|
||||
|
||||
|
||||
Private members ~
|
||||
|
||||
On the other hand, if you do not want the object members to be read directly,
|
||||
you can make them private. This is done by prefixing an underscore to the
|
||||
name: >
|
||||
|
||||
this._lnum: number
|
||||
this._col number
|
||||
|
||||
Now you need to provide methods to get the value of the private members.
|
||||
These are commonly call getters. We recommend using a name that starts with
|
||||
"Get": >
|
||||
|
||||
def GetLnum(): number
|
||||
return this._lnum
|
||||
enddef
|
||||
|
||||
def GetCol() number
|
||||
return this._col
|
||||
enddef
|
||||
|
||||
This example isn't very useful, the members might as well have been public.
|
||||
It does become useful if you check the value. For example, restrict the line
|
||||
number to the total number of lines: >
|
||||
|
||||
def GetLnum(): number
|
||||
if this._lnum > this._lineCount
|
||||
return this._lineCount
|
||||
endif
|
||||
return this._lnum
|
||||
enddef
|
||||
|
||||
|
||||
Simplifying the new() method ~
|
||||
|
||||
Many constructors take values for the object members. Thus you very often see
|
||||
this pattern: >
|
||||
|
||||
this.lnum: number
|
||||
this.col: number
|
||||
|
||||
def new(lnum: number, col: number)
|
||||
this.lnum = lnum
|
||||
this.col = col
|
||||
enddef
|
||||
|
||||
Not only is this text you need to write, it also has the type of each member
|
||||
twice. Since this is so common a shorter way to write new() is provided: >
|
||||
|
||||
def new(this.lnum, this.col)
|
||||
enddef
|
||||
|
||||
The semantics are easy to understand: Providing the object member name,
|
||||
including "this.", as the argument to new() means the value provided in the
|
||||
new() call is assigned to that object member. This mechanism is coming from
|
||||
the Dart language.
|
||||
|
||||
The sequence of constructing a new object is:
|
||||
1. Memory is allocated and cleared. All values are zero/false/empty.
|
||||
2. For each declared member that has an initializer, the expression is
|
||||
evaluated and assigned to the member. This happens in the sequence the
|
||||
members are declared in the class.
|
||||
3. Arguments in the new() method in the "this.name" form are assigned.
|
||||
4. The body of the new() method is executed.
|
||||
|
||||
TODO: for a sub-class the constructor of the parent class will be invoked
|
||||
somewhere.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. Using an abstract class *Vim9-abstract-class*
|
||||
|
||||
An abstract class forms the base for at least one sub-class. In the class
|
||||
model one often finds that a few classes have the same properties that can be
|
||||
shared, but a class with those properties does not have enough state to create
|
||||
an object from. A sub-class must extend the abstract class and add the
|
||||
missing state and/or methods before it can be used to create objects for.
|
||||
|
||||
An abstract class does not have a new() method.
|
||||
|
||||
For example, a Shape class could store a color and thickness. You cannot
|
||||
create a Shape object, it is missing the information about what kind of shape
|
||||
it is. The Shape class functions as the base for a Square and a Triangle
|
||||
class, for which objects can be created. Example: >
|
||||
|
||||
abstract class Shape
|
||||
this.color = Color.Black
|
||||
this.thickness = 10
|
||||
endclass
|
||||
|
||||
class Square extends Shape
|
||||
this.size: number
|
||||
|
||||
def new(this.size)
|
||||
enddef
|
||||
endclass
|
||||
|
||||
class Triangle extends Shape
|
||||
this.base: number
|
||||
this.height: number
|
||||
|
||||
def new(this.base, this.height)
|
||||
enddef
|
||||
endclass
|
||||
<
|
||||
*class-member* *:static*
|
||||
Class members are declared with "static". They are used by the name without a
|
||||
prefix: >
|
||||
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
def new(this.size)
|
||||
totalSize += this.size
|
||||
enddef
|
||||
endclass
|
||||
<
|
||||
*class-method*
|
||||
Class methods are also declared with "static". They have no access to object
|
||||
members, they cannot use the "this" keyword. >
|
||||
|
||||
class OtherThing
|
||||
this.size: number
|
||||
static totalSize: number
|
||||
|
||||
" Clear the total size and return the value it had before.
|
||||
static def ClearTotalSize(): number
|
||||
var prev = totalSize
|
||||
totalSize = 0
|
||||
return prev
|
||||
enddef
|
||||
endclass
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
4. Using an interface *Vim9-using-interface*
|
||||
|
||||
The example above with Shape, Square and Triangle can be made more useful if
|
||||
we add a method to compute the surface of the object. For that we create the
|
||||
interface called HasSurface, which specifies one method Surface() that returns
|
||||
a number. This example extends the one above: >
|
||||
|
||||
abstract class Shape
|
||||
this.color = Color.Black
|
||||
this.thickness = 10
|
||||
endclass
|
||||
|
||||
interface HasSurface
|
||||
def Surface(): number
|
||||
endinterface
|
||||
|
||||
class Square extends Shape implements HasSurface
|
||||
this.size: number
|
||||
|
||||
def new(this.size)
|
||||
enddef
|
||||
|
||||
def Surface(): number
|
||||
return this.size * this.size
|
||||
enddef
|
||||
endclass
|
||||
|
||||
class Triangle extends Shape implements HasSurface
|
||||
this.base: number
|
||||
this.height: number
|
||||
|
||||
def new(this.base, this.height)
|
||||
enddef
|
||||
|
||||
def Surface(): number
|
||||
return this.base * this.height / 2
|
||||
enddef
|
||||
endclass
|
||||
|
||||
The interface name can be used as a type: >
|
||||
|
||||
var shapes: list<HasSurface> = [
|
||||
Square.new(12),
|
||||
Triangle.new(8, 15),
|
||||
]
|
||||
for shape in shapes
|
||||
echo $'the surface is {shape.Surface()}'
|
||||
endfor
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
5. More class details *Vim9-class*
|
||||
|
||||
Defining a class ~
|
||||
*:class* *:endclass* *:abstract*
|
||||
A class is defined between `:class` and `:endclass`. The whole class is
|
||||
defined in one script file. It is not possible to add to a class later.
|
||||
|
||||
A class can only be defined in a |Vim9| script file. *E1315*
|
||||
A class cannot be defined inside a function.
|
||||
|
||||
It is possible to define more than one class in a script file. Although it
|
||||
usually is better to export only one main class. It can be useful to define
|
||||
types, enums and helper classes though.
|
||||
|
||||
The `:abstract` keyword may be prefixed and `:export` may be used. That gives
|
||||
these variants: >
|
||||
|
||||
class ClassName
|
||||
endclass
|
||||
|
||||
export class ClassName
|
||||
endclass
|
||||
|
||||
abstract class ClassName
|
||||
endclass
|
||||
|
||||
export abstract class ClassName
|
||||
endclass
|
||||
<
|
||||
*E1314*
|
||||
The class name should be CamelCased. It must start with an uppercase letter.
|
||||
That avoids clashing with builtin types.
|
||||
|
||||
After the class name these optional items can be used. Each can appear only
|
||||
once. They can appear in any order, although this order is recommended: >
|
||||
extends ClassName
|
||||
implements InterfaceName, OtherInterface
|
||||
specifies SomeInterface
|
||||
< *extends*
|
||||
A class can extend one other class.
|
||||
*implements*
|
||||
A class can implement one or more interfaces.
|
||||
*specifies*
|
||||
A class can declare its interface, the object members and methods, with a
|
||||
named interface. This avoids the need for separately specifying the
|
||||
interface, which is often done in many languages, especially Java.
|
||||
|
||||
|
||||
Defining an interface ~
|
||||
*:interface* *:endinterface*
|
||||
An interface is defined between `:interface` and `:endinterface`. It may be
|
||||
prefixed with `:export`: >
|
||||
|
||||
interface InterfaceName
|
||||
endinterface
|
||||
|
||||
export interface InterfaceName
|
||||
endinterface
|
||||
|
||||
An interface can declare object members, just like in a class but without any
|
||||
initializer.
|
||||
|
||||
An interface can declare methods with `:def`, including the arguments and
|
||||
return type, but without the body and without `:enddef`. Example: >
|
||||
|
||||
interface HasSurface
|
||||
this.size: number
|
||||
def Surface(): number
|
||||
endinterface
|
||||
|
||||
The "Has" prefix can be used to make it easier to guess this is an interface
|
||||
name, with a hint about what it provides.
|
||||
|
||||
|
||||
Default constructor ~
|
||||
|
||||
In case you define a class without a new() method, one will be automatically
|
||||
defined. This default constructor will have arguments for all the object
|
||||
members, in the order they were specified. Thus if your class looks like: >
|
||||
|
||||
class AutoNew
|
||||
this.name: string
|
||||
this.age: number
|
||||
this.gender: Gender
|
||||
endclass
|
||||
|
||||
Then The default constructor will be: >
|
||||
|
||||
def new(this.name, this.age, this.gender)
|
||||
enddef
|
||||
|
||||
All object members will be used, also private access ones.
|
||||
|
||||
|
||||
Multiple constructors ~
|
||||
|
||||
Normally a class has just one new() constructor. In case you find that the
|
||||
constructor is often called with the same arguments you may want to simplify
|
||||
your code by putting those arguments into a second constructor method. For
|
||||
example, if you tend to use the color black a lot: >
|
||||
|
||||
def new(this.garment, this.color, this.size)
|
||||
enddef
|
||||
...
|
||||
var pants = new(Garment.pants, Color.black, "XL")
|
||||
var shirt = new(Garment.shirt, Color.black, "XL")
|
||||
var shoes = new(Garment.shoes, Color.black, "45")
|
||||
|
||||
Instead of repeating the color every time you can add a constructor that
|
||||
includes it: >
|
||||
|
||||
def newBlack(this.garment, this.size)
|
||||
this.color = Color.black
|
||||
enddef
|
||||
...
|
||||
var pants = newBlack(Garment.pants, "XL")
|
||||
var shirt = newBlack(Garment.shirt, "XL")
|
||||
var shoes = newBlack(Garment.shoes, "9.5")
|
||||
|
||||
Note that the method name must start with "new". If there is no method called
|
||||
"new()" then the default constructor is added, even though there are other
|
||||
constructor methods.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
6. Type definition *Vim9-type* *:type*
|
||||
|
||||
A type definition is giving a name to a type specification. For Example: >
|
||||
|
||||
:type ListOfStrings list<string>
|
||||
|
||||
TODO: more explanation
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
7. Enum *Vim9-enum* *:enum* *:endenum*
|
||||
|
||||
An enum is a type that can have one of a list of values. Example: >
|
||||
|
||||
:enum Color
|
||||
White
|
||||
Red
|
||||
Green
|
||||
Blue
|
||||
Black
|
||||
:endenum
|
||||
|
||||
TODO: more explanation
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
9. Rationale
|
||||
|
||||
Most of the choices for |Vim9| classes come from popular and recently
|
||||
developed languages, such as Java, TypeScript and Dart. The syntax has been
|
||||
made to fit with the way Vim script works, such as using `endclass` instead of
|
||||
using curly braces around the whole class.
|
||||
|
||||
Some common constructs of object-oriented languages were chosen very long ago
|
||||
when this kind of programming was still new, and later found to be
|
||||
sub-optimal. By this time those constructs were widely used and changing them
|
||||
was not an option. In Vim we do have the freedom to make different choices,
|
||||
since classes are completely new. We can make the syntax simpler and more
|
||||
consistent than what "old" languages use. Without diverting too much, it
|
||||
should still mostly look like what you know from existing languages.
|
||||
|
||||
Some recently developed languages add all kinds of fancy features that we
|
||||
don't need for Vim. But some have nice ideas that we do want to use.
|
||||
Thus we end up with a base of what is common in popular languages, dropping
|
||||
what looks like a bad idea, and adding some nice features that are easy to
|
||||
understand.
|
||||
|
||||
The main rules we use to make decisions:
|
||||
- Keep it simple.
|
||||
- No surprises, mostly do what other languages are doing.
|
||||
- Avoid mistakes from the past.
|
||||
- Avoid the need for the script writer to consult the help to understand how
|
||||
things work, most things should be obvious.
|
||||
- Keep it consistent.
|
||||
- Aim at an average size plugin, not at a huge project.
|
||||
|
||||
|
||||
Using new() for the constructor ~
|
||||
|
||||
Many languages use the class name for the constructor method. A disadvantage
|
||||
is that quite often this is a long name. And when changing the class name all
|
||||
constructor methods need to be renamed. Not a big deal, but still a
|
||||
disadvantage.
|
||||
|
||||
Other languages, such as TypeScript, use a specific name, such as
|
||||
"constructor()". That seems better. However, using "new" or "new()" to
|
||||
create a new object has no obvious relation with "constructor()".
|
||||
|
||||
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
|
||||
functions. That means it is not possible to use the same function name with
|
||||
different types of arguments. Therefore there also is only one new()
|
||||
constructor.
|
||||
|
||||
With |Vim9| script it would be possible to support overloading, since
|
||||
arguments are typed. However, this gets complicated very quickly. Looking at
|
||||
a new() call one has to inspect the types of the arguments to know which of
|
||||
several new() methods is actually being called. And that can require
|
||||
inspecting quite a bit of code. For example, if one of the arguments is the
|
||||
return value of a method, you need to find that method to see what type it is
|
||||
returning.
|
||||
|
||||
Instead, every constructor has to have a different name, starting with "new".
|
||||
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
|
||||
arguments have, which would make it difficult to figure out what method is
|
||||
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.
|
||||
|
||||
|
||||
Using "this.member" everywhere ~
|
||||
|
||||
The object members in various programming languages can often be accessed in
|
||||
different ways, depending on the location. Sometimes "this." has to be
|
||||
prepended to avoid ambiguity. They are usually declared without "this.".
|
||||
That is quite inconsistent and sometimes confusing.
|
||||
|
||||
A very common issue is that in the constructor the arguments use the same name
|
||||
as the object member. Then for these members "this." needs to be prefixed in
|
||||
the body, while for other members this is not needed and often omitted. This
|
||||
leads to a mix of members with and without "this.", which is inconsistent.
|
||||
|
||||
For |Vim9| classes the "this." prefix is always used. Also for declaring the
|
||||
members. Simple and consistent. When looking at the code inside a class it's
|
||||
also directly clear which variable references are object members and which
|
||||
aren't.
|
||||
|
||||
|
||||
Single inheritance and interfaces ~
|
||||
|
||||
Some languages support multiple inheritance. Although that can be useful in
|
||||
some cases, it makes the rules of how a class works quite complicated.
|
||||
Instead, using interfaces to declare what is supported is much simpler. The
|
||||
very popular Java language does it this way, and it should be good enough for
|
||||
Vim. The "keep it simple" rule applies here.
|
||||
|
||||
Explicitly declaring that a class supports an interface makes it easy to see
|
||||
what a class is intended for. It also makes it possible to do proper type
|
||||
checking. When an interface is changed any class that declares to implement
|
||||
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 class members ~
|
||||
|
||||
Using "static member" to declare a class member is very common, nothing new
|
||||
here. In |Vim9| script these can be accessed directly by their name. Very
|
||||
much like how a script-local variable can be used in a function. Since object
|
||||
members are always accessed with "this." prepended, it's also quickly clear
|
||||
what kind of member it is.
|
||||
|
||||
TypeScript prepends the class name before the class member, also inside 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.
|
||||
|
||||
|
||||
Using "ClassName.new()" to construct an object ~
|
||||
|
||||
Many languages use the "new" operator to create an object, which is actually
|
||||
kind of strange, since the constructor is defined as a method with arguments,
|
||||
not a command. TypeScript also has the "new" keyword, but the method is
|
||||
called "constructor()", it is hard to see the relation between the two.
|
||||
|
||||
In |Vim9| script the constructor method is called new(), and it is invoked as
|
||||
new(), simple and straightforward. Other languages use "new ClassName()",
|
||||
while there is no ClassName() method, it's a method by another name in the
|
||||
class called ClassName. Quite confusing.
|
||||
|
||||
|
||||
Default read access to object members ~
|
||||
|
||||
Some users will remark that the access rules for object members are
|
||||
asymmetric. Well, that is intentional. Changing a value is a very different
|
||||
action than reading a value. The read operation has no side effects, it can
|
||||
be done any number of times without affecting the object. Changing the value
|
||||
can have many side effects, and even have a ripple effect, affecting other
|
||||
objects.
|
||||
|
||||
When adding object members one usually doesn't think much about this, just get
|
||||
the type right. And normally the values are set in the new() method.
|
||||
Therefore defaulting to read access only "just works" in most cases. And when
|
||||
directly writing you get an error, which makes you wonder if you actually want
|
||||
to allow that. This helps writing code with fewer mistakes.
|
||||
|
||||
|
||||
Making object members private with an underscore ~
|
||||
|
||||
When an object member is private, it can only be read and changed inside the
|
||||
class (and in sub-classes), then it cannot be used outside of the class.
|
||||
Prepending an underscore is a simple way to make that visible. Various
|
||||
programming languages have this as a recommendation.
|
||||
|
||||
In case you change your mind and want to make the object member accessible
|
||||
outside of the class, you will have to remove the underscore everywhere.
|
||||
Since the name only appears in the class (and sub-classes) they will be easy
|
||||
to find and change.
|
||||
|
||||
The other way around is much harder: you can easily prepend an underscore to
|
||||
the object member inside the class to make it private, but any usage elsewhere
|
||||
you will have to track down and change. You may have to make it a "set"
|
||||
method call. This reflects the real world problem that taking away access
|
||||
requires work to be done for all places where that access exists.
|
||||
|
||||
An alternative would have been using the "private" keyword, just like "public"
|
||||
changes the access in the other direction. Well, that's just to reduce the
|
||||
number of keywords.
|
||||
|
||||
|
||||
No protected object members ~
|
||||
|
||||
Some languages provide several ways to control access to object members. The
|
||||
most known is "protected", and the meaning varies from language to language.
|
||||
Others are "shared", "private" and even "friend".
|
||||
|
||||
These rules make life more difficult. That can be justified in projects where
|
||||
many people work on the same, complex code where it is easy to make mistakes.
|
||||
Especially when refactoring or other changes to the class model.
|
||||
|
||||
The Vim scripts are expected to be used in a plugin, with just one person or a
|
||||
small team working on it. Complex rules then only make it more complicated,
|
||||
the extra safety provide by the rules isn't really needed. Let's just keep it
|
||||
simple and not specify access details.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
10. To be done later
|
||||
|
||||
Can a newSomething() constructor invoke another constructor? If yes, what are
|
||||
the restrictions?
|
||||
|
||||
Thoughts:
|
||||
- Generics for a class: `class <Tkey, Tentry>`
|
||||
- Generics for a function: `def <Tkey> GetLast(key: Tkey)`
|
||||
- Mixins: not sure if that is useful, leave out for simplicity.
|
||||
|
||||
Some things that look like good additions:
|
||||
- For testing: Mock mechanism
|
||||
|
||||
An important class to be provided is "Promise". Since Vim is single
|
||||
threaded, connecting asynchronous operations is a natural way of allowing
|
||||
plugins to do their work without blocking the user. It's a uniform way to
|
||||
invoke callbacks and handle timeouts and errors.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
@@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 9.0. Last change: 2022 Jun 18
|
||||
*visual.txt* For Vim version 9.0. Last change: 2022 Dec 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -116,7 +116,7 @@ gn Search forward for the last used search pattern, like
|
||||
E.g., "dgn" deletes the text of the next match.
|
||||
If Visual mode is active, extends the selection
|
||||
until the end of the next match.
|
||||
'wrapscan' applies
|
||||
'wrapscan' applies.
|
||||
Note: Unlike `n` the search direction does not depend
|
||||
on the previous search command.
|
||||
|
||||
@@ -152,6 +152,11 @@ gN Like |gn| but searches backward, like with `N`.
|
||||
environment variable or the -display argument). Only
|
||||
when 'mouse' option contains 'n' or 'a'.
|
||||
|
||||
<LeftMouseNM> Internal mouse code, used for clicking on the status
|
||||
<LeftReleaseNM> line to focus a window. NM stands for non-mappable.
|
||||
You cannot use these, but they might show up in some
|
||||
places.
|
||||
|
||||
If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a
|
||||
count, the size of the previously highlighted area is used for a start. You
|
||||
can then move the end of the highlighted area and give an operator. The type
|
||||
@@ -510,11 +515,11 @@ mode Vim automatically switches to Visual mode, so that the same behavior as
|
||||
in Visual mode is effective. If you don't want this use |:xmap| or |:smap|.
|
||||
|
||||
One particular edge case: >
|
||||
:vnoremap <C-K> <Esc>
|
||||
:vnoremap <C-K> <Esc>
|
||||
This ends Visual mode when in Visual mode, but in Select mode it does not
|
||||
work, because Select mode is restored after executing the mapped keys. You
|
||||
need to use: >
|
||||
:snoremap <C-K> <Esc>
|
||||
:snoremap <C-K> <Esc>
|
||||
<
|
||||
Users will expect printable characters to replace the selected area.
|
||||
Therefore avoid mapping printable characters in Select mode. Or use
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 9.0. Last change: 2022 May 11
|
||||
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -561,9 +561,9 @@ CTRL-W = Make all windows (almost) equally high and wide, but use
|
||||
Windows with 'winfixheight' set keep their height and windows
|
||||
with 'winfixwidth' set keep their width.
|
||||
To equalize only vertically (make window equally high) use
|
||||
`vertical wincmd =`
|
||||
`vertical wincmd =`.
|
||||
To equalize only horizontally (make window equally wide) use
|
||||
`horizontal wincmd =`
|
||||
`horizontal wincmd =`.
|
||||
|
||||
:res[ize] -N *:res* *:resize* *CTRL-W_-*
|
||||
CTRL-W - Decrease current window height by N (default 1).
|
||||
@@ -631,6 +631,56 @@ it).
|
||||
The minimal height and width of a window is set with 'winminheight' and
|
||||
'winminwidth'. These are hard values, a window will never become smaller.
|
||||
|
||||
|
||||
WinScrolled and WinResized autocommands ~
|
||||
*win-scrolled-resized*
|
||||
If you want to get notified of changes in window sizes, the |WinResized|
|
||||
autocommand event can be used.
|
||||
If you want to get notified of text in windows scrolling vertically or
|
||||
horizontally, the |WinScrolled| autocommand event can be used. This will also
|
||||
trigger in window size changes.
|
||||
Exception: the events will not be triggered when the text scrolls for
|
||||
'incsearch'.
|
||||
*WinResized-event*
|
||||
The |WinResized| event is triggered after updating the display, several
|
||||
windows may have changed size then. A list of the IDs of windows that changed
|
||||
since last time is provided in the v:event.windows variable, for example:
|
||||
[1003, 1006]
|
||||
*WinScrolled-event*
|
||||
The |WinScrolled| event is triggered after |WinResized|, and also if a window
|
||||
was scrolled. That can be vertically (the text at the top of the window
|
||||
changed) or horizontally (when 'wrap' is off or when the first displayed part
|
||||
of the first line changes). Note that |WinScrolled| will trigger many more
|
||||
times than |WinResized|, it may slow down editing a bit.
|
||||
|
||||
The information provided by |WinScrolled| is a dictionary for each window that
|
||||
has changes, using the window ID as the key, and a total count of the changes
|
||||
with the key "all". Example value for |v:event| (|Vim9| syntax):
|
||||
{
|
||||
all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
|
||||
1003: {width: 0, height: -1, leftcol: 0, skipcol: 0, topline: 0, topfill: 0},
|
||||
1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
|
||||
}
|
||||
|
||||
Note that the "all" entry has the absolute values of the individual windows
|
||||
accumulated.
|
||||
|
||||
If you need more information about what changed, or you want to "debounce" the
|
||||
events (not handle every event to avoid doing too much work), you may want to
|
||||
use the `winlayout()` and `getwininfo()` functions.
|
||||
|
||||
|WinScrolled| and |WinResized| do not trigger when the first autocommand is
|
||||
added, only after the first scroll or resize. They may trigger when switching
|
||||
to another tab page.
|
||||
|
||||
The commands executed are expected to not cause window size or scroll changes.
|
||||
If this happens anyway, the event will trigger again very soon. In other
|
||||
words: Just before triggering the event, the current sizes and scroll
|
||||
positions are stored and used to decide whether there was a change.
|
||||
*E1312*
|
||||
It is not allowed to change the window layout here (split, close or move
|
||||
windows).
|
||||
|
||||
==============================================================================
|
||||
7. Argument and buffer list commands *buffer-list*
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Oct 12
|
||||
" Last Change: 2022 Dec 05
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -419,6 +419,12 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
|
||||
" Cooklang
|
||||
au BufNewFile,BufRead *.cook setf cook
|
||||
|
||||
" Clinical Quality Language (CQL)
|
||||
" .cql is also mentioned as the 'XDCC Catcher queue list' file extension.
|
||||
" If support for XDCC Catcher is needed in the future, the contents of the file
|
||||
" needs to be inspected.
|
||||
au BufNewFile,BufRead *.cql setf cqlang
|
||||
|
||||
" CSV Files
|
||||
au BufNewFile,BufRead *.csv setf csv
|
||||
|
||||
@@ -975,6 +981,8 @@ au BufNewFile,BufRead *.jsp setf jsp
|
||||
|
||||
" Java Properties resource file (note: doesn't catch font.properties.pl)
|
||||
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
|
||||
" Eclipse preference files use Java Properties syntax
|
||||
au BufNewFile,BufRead org.eclipse.*.prefs setf jproperties
|
||||
|
||||
" Jess
|
||||
au BufNewFile,BufRead *.clp setf jess
|
||||
@@ -1004,7 +1012,7 @@ au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc setf json
|
||||
au BufNewFile,BufRead *.jsonc setf jsonc
|
||||
|
||||
" Jsonnet
|
||||
au BufNewFile,BufRead *.jsonnet,*.libjsonnet setf jsonnet
|
||||
au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
|
||||
|
||||
" Julia
|
||||
au BufNewFile,BufRead *.jl setf julia
|
||||
@@ -1191,6 +1199,9 @@ au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
|
||||
" Mercurial config (looks like generic config file)
|
||||
au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
|
||||
|
||||
" Mermaid
|
||||
au BufNewFile,BufRead *.mmd,*.mmdc,*.mermaid setf mermaid
|
||||
|
||||
" Meson Build system config
|
||||
au BufNewFile,BufRead meson.build,meson_options.txt setf meson
|
||||
au BufNewFile,BufRead *.wrap setf dosini
|
||||
@@ -1334,6 +1345,9 @@ au BufNewFile,BufRead *.nse setf lua
|
||||
" NSIS
|
||||
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
|
||||
|
||||
" Oblivion Language and Oblivion Script Extender
|
||||
au BufNewFile,BufRead *.obl,*.obse,*.oblivion,*.obscript setf obse
|
||||
|
||||
" OCaml
|
||||
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
|
||||
|
||||
@@ -1372,6 +1386,7 @@ au BufNewFile,BufRead pf.conf setf pf
|
||||
|
||||
" ini style config files, using # comments
|
||||
au BufNewFile,BufRead */etc/pacman.conf,mpv.conf setf confini
|
||||
au BufNewFile,BufRead */.aws/config,*/.aws/credentials setf confini
|
||||
|
||||
" Pacman hooks
|
||||
au BufNewFile,BufRead *.hook
|
||||
@@ -1840,8 +1855,9 @@ au BufNewFile,BufRead .tcshrc,*.tcsh,tcsh.tcshrc,tcsh.login call dist#ft#SetFile
|
||||
" (patterns ending in a start further below)
|
||||
au BufNewFile,BufRead .login,.cshrc,csh.cshrc,csh.login,csh.logout,*.csh,.alias call dist#ft#CSH()
|
||||
|
||||
" Zig
|
||||
" Zig and Zir (Zig Intermediate Representation)
|
||||
au BufNewFile,BufRead *.zig setf zig
|
||||
au BufNewFile,BufRead *.zir setf zir
|
||||
|
||||
" Z-Shell script (patterns ending in a star further below)
|
||||
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
|
||||
@@ -2180,6 +2196,11 @@ au BufNewFile,BufRead *.va,*.vams setf verilogams
|
||||
" SystemVerilog
|
||||
au BufNewFile,BufRead *.sv,*.svh setf systemverilog
|
||||
|
||||
" VHS tape
|
||||
" .tape is also used by TapeCalc, which we do not support ATM. If TapeCalc
|
||||
" support is needed the contents of the file needs to be inspected.
|
||||
au BufNewFile,BufRead *.tape setf vhs
|
||||
|
||||
" VHDL
|
||||
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl
|
||||
|
||||
@@ -2331,6 +2352,9 @@ au BufNewFile,BufRead fglrxrc setf xml
|
||||
" Web Services Description Language (WSDL)
|
||||
au BufNewFile,BufRead *.wsdl setf xml
|
||||
|
||||
" Workflow Description Language (WDL)
|
||||
au BufNewFile,BufRead *.wdl setf wdl
|
||||
|
||||
" XLIFF (XML Localisation Interchange File Format) is also XML
|
||||
au BufNewFile,BufRead *.xlf setf xml
|
||||
au BufNewFile,BufRead *.xliff setf xml
|
||||
|
||||
16
runtime/ftplugin/apache.vim
Normal file
16
runtime/ftplugin/apache.vim
Normal file
@@ -0,0 +1,16 @@
|
||||
" Vim filetype plugin
|
||||
" Language: apache configuration file
|
||||
" Maintainer: Per Juchtmans <dubgeiser+vimNOSPAM@gmail.com>
|
||||
" Last Change: 2022 Oct 22
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< commentstring<"
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: C#
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2021-12-07
|
||||
" Last Change: 2022-11-16
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
|
||||
@@ -25,8 +25,9 @@ let b:undo_ftplugin = 'setl com< fo<'
|
||||
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
" #if/#endif support included by default
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '\%(^\s*\)\@<=#\s*region\>:\%(^\s*\)\@<=#\s*endregion\>,'
|
||||
let b:undo_ftplugin .= ' | unlet! b:match_words'
|
||||
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
|
||||
endif
|
||||
|
||||
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: Max Ischenko <mfi@ukr.net>
|
||||
" Contributor: Dorai Sitaram <ds26@gte.com>
|
||||
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
||||
" Last Change: 2022 Oct 15
|
||||
" Last Change: 2022 Nov 19
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -21,7 +21,7 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
||||
|
||||
" TODO: handle init.lua
|
||||
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
setlocal includeexpr=tr(v:fname,'.','/')
|
||||
setlocal suffixesadd=.lua
|
||||
|
||||
let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
|
||||
|
||||
49
runtime/ftplugin/mermaid.vim
Normal file
49
runtime/ftplugin/mermaid.vim
Normal file
@@ -0,0 +1,49 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Mermaid
|
||||
" Maintainer: Craig MacEachern <https://github.com/craigmac/vim-mermaid>
|
||||
" Last Change: 2022 Oct 13
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Use mermaid live editor's style
|
||||
setlocal expandtab
|
||||
setlocal shiftwidth=2
|
||||
setlocal softtabstop=-1
|
||||
setlocal tabstop=4
|
||||
|
||||
" TODO: comments, formatlist stuff, based on what?
|
||||
setlocal comments=b:#,fb:-
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= "|setl cms< com< fo< flp< et< ts< sts< sw<"
|
||||
else
|
||||
let b:undo_ftplugin = "setl cms< com< fo< flp< et< ts< sts< sw<"
|
||||
endif
|
||||
|
||||
if !exists("g:no_plugin_maps") && !exists("g:no_markdown_maps")
|
||||
nnoremap <silent><buffer> [[ :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
|
||||
nnoremap <silent><buffer> ]] :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
|
||||
xnoremap <silent><buffer> [[ :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
|
||||
xnoremap <silent><buffer> ]] :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
|
||||
let b:undo_ftplugin .= '|sil! nunmap <buffer> [[|sil! nunmap <buffer> ]]|sil! xunmap <buffer> [[|sil! xunmap <buffer> ]]'
|
||||
endif
|
||||
|
||||
" if has("folding") && get(g:, "markdown_folding", 0)
|
||||
" setlocal foldexpr=MarkdownFold()
|
||||
" setlocal foldmethod=expr
|
||||
" setlocal foldtext=MarkdownFoldText()
|
||||
" let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
|
||||
" endif
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:set sw=2:
|
||||
70
runtime/ftplugin/obse.vim
Normal file
70
runtime/ftplugin/obse.vim
Normal file
@@ -0,0 +1,70 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Oblivion Language (obl)
|
||||
" Original Creator: Kat <katisntgood@gmail.com>
|
||||
" Maintainer: Kat <katisntgood@gmail.com>
|
||||
" Created: August 08, 2021
|
||||
" Last Change: 13 November 2022
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms<"
|
||||
|
||||
noremap <script> <buffer> <silent> [[ <nop>
|
||||
noremap <script> <buffer> <silent> ]] <nop>
|
||||
|
||||
noremap <script> <buffer> <silent> [] <nop>
|
||||
noremap <script> <buffer> <silent> ][ <nop>
|
||||
|
||||
setlocal commentstring=;%s
|
||||
setlocal comments=:;
|
||||
|
||||
function s:NextSection(type, backwards, visual)
|
||||
if a:visual
|
||||
normal! gv
|
||||
endif
|
||||
|
||||
if a:type == 1
|
||||
let pattern = '\v(\n\n^\S|%^)'
|
||||
let flags = 'e'
|
||||
elseif a:type == 2
|
||||
let pattern = '\v^\S.*'
|
||||
let flags = ''
|
||||
endif
|
||||
|
||||
if a:backwards
|
||||
let dir = '?'
|
||||
else
|
||||
let dir = '/'
|
||||
endif
|
||||
|
||||
execute 'silent normal! ' . dir . pattern . dir . flags . "\r"
|
||||
endfunction
|
||||
|
||||
noremap <script> <buffer> <silent> ]]
|
||||
\ :call <SID>NextSection(1, 0, 0)<cr>
|
||||
|
||||
noremap <script> <buffer> <silent> [[
|
||||
\ :call <SID>NextSection(1, 1, 0)<cr>
|
||||
|
||||
noremap <script> <buffer> <silent> ][
|
||||
\ :call <SID>NextSection(2, 0, 0)<cr>
|
||||
|
||||
noremap <script> <buffer> <silent> []
|
||||
\ :call <SID>NextSection(2, 1, 0)<cr>
|
||||
|
||||
vnoremap <script> <buffer> <silent> ]]
|
||||
\ :<c-u>call <SID>NextSection(1, 0, 1)<cr>
|
||||
vnoremap <script> <buffer> <silent> [[
|
||||
\ :<c-u>call <SID>NextSection(1, 1, 1)<cr>
|
||||
vnoremap <script> <buffer> <silent> ][
|
||||
\ :<c-u>call <SID>NextSection(2, 0, 1)<cr>
|
||||
vnoremap <script> <buffer> <silent> []
|
||||
\ :<c-u>call <SID>NextSection(2, 1, 1)<cr>
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
14
runtime/ftplugin/openvpn.vim
Normal file
14
runtime/ftplugin/openvpn.vim
Normal file
@@ -0,0 +1,14 @@
|
||||
" Vim filetype plugin
|
||||
" Language: OpenVPN
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Last Change: 2022 Oct 16
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal iskeyword+=-,.,/
|
||||
setlocal comments=:#,:; commentstring=#%s
|
||||
|
||||
let b:undo_ftplugin = 'setl isk< com< cms<'
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Sep 20
|
||||
" Last Change: 2022 Nov 27
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -99,7 +99,7 @@ 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*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\%(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]\>,' .
|
||||
\ '{:},' .
|
||||
|
||||
66
runtime/ftplugin/zig.vim
Normal file
66
runtime/ftplugin/zig.vim
Normal file
@@ -0,0 +1,66 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Zig
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_orig = &cpo
|
||||
set cpo&vim
|
||||
|
||||
compiler zig_build
|
||||
|
||||
" Match Zig builtin fns
|
||||
setlocal iskeyword+=@-@
|
||||
|
||||
" Recomended code style, no tabs and 4-space indentation
|
||||
setlocal expandtab
|
||||
setlocal tabstop=8
|
||||
setlocal softtabstop=4
|
||||
setlocal shiftwidth=4
|
||||
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
setlocal suffixesadd=.zig,.zir
|
||||
|
||||
if has('comments')
|
||||
setlocal comments=:///,://!,://,:\\\\
|
||||
setlocal commentstring=//\ %s
|
||||
endif
|
||||
|
||||
if has('find_in_path')
|
||||
let &l:includeexpr='substitute(v:fname, "^([^.])$", "\1.zig", "")'
|
||||
let &l:include='\v(\@import>|\@cInclude>|^\s*\#\s*include)'
|
||||
endif
|
||||
|
||||
let &l:define='\v(<fn>|<const>|<var>|^\s*\#\s*define)'
|
||||
|
||||
if !exists('g:zig_std_dir') && exists('*json_decode') && executable('zig')
|
||||
silent let s:env = system('zig env')
|
||||
if v:shell_error == 0
|
||||
let g:zig_std_dir = json_decode(s:env)['std_dir']
|
||||
endif
|
||||
unlet! s:env
|
||||
endif
|
||||
|
||||
if exists('g:zig_std_dir')
|
||||
let &l:path = &l:path . ',' . g:zig_std_dir
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin =
|
||||
\ 'setl isk< et< ts< sts< sw< fo< sua< mp< com< cms< inex< inc< pa<'
|
||||
|
||||
augroup vim-zig
|
||||
autocmd! * <buffer>
|
||||
autocmd BufWritePre <buffer> if get(g:, 'zig_fmt_autosave', 1) | call zig#fmt#Format() | endif
|
||||
augroup END
|
||||
|
||||
let b:undo_ftplugin .= '|au! vim-zig * <buffer>'
|
||||
|
||||
let &cpo = s:cpo_orig
|
||||
unlet s:cpo_orig
|
||||
" vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab
|
||||
55
runtime/indent/obse.vim
Normal file
55
runtime/indent/obse.vim
Normal file
@@ -0,0 +1,55 @@
|
||||
" Vim indent file
|
||||
" Language: Oblivion Language (obl)
|
||||
" Original Creator: Kat <katisntgood@gmail.com>
|
||||
" Maintainer: Kat <katisntgood@gmail.com>
|
||||
" Created: 01 November 2021
|
||||
" Last Change: 13 November 2022
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
let b:undo_indent = 'setlocal indentkeys< indentexpr<'
|
||||
|
||||
setlocal indentexpr=GetOblIndent()
|
||||
setlocal indentkeys+==~endif,=~else,=~loop,=~end
|
||||
|
||||
if exists("*GetOblIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:SKIP_LINES = '^\s*\(;.*\)'
|
||||
function! GetOblIndent()
|
||||
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
let cur_text = getline(v:lnum)
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
let prev_text = getline(lnum)
|
||||
let found_cont = 0
|
||||
let ind = indent(lnum)
|
||||
|
||||
" indent next line on start terms
|
||||
let i = match(prev_text, '\c^\s*\(\s\+\)\?\(\(if\|while\|foreach\|begin\|else\%[if]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
|
||||
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
|
||||
let ind -= shiftwidth()
|
||||
endif
|
||||
endif
|
||||
" indent current line on end/else terms
|
||||
if cur_text =~ '\c^\s*\(\s\+\)\?\(\(loop\|endif\|else\%[if]\)\>\)'
|
||||
let ind = ind - shiftwidth()
|
||||
" if we are at a begin block just go to column 0
|
||||
elseif cur_text =~ '\c^\s*\(\s\+\)\?\(\(begin\|end\)\>\)'
|
||||
let ind = 0
|
||||
endif
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
80
runtime/indent/zig.vim
Normal file
80
runtime/indent/zig.vim
Normal file
@@ -0,0 +1,80 @@
|
||||
" Vim filetype indent file
|
||||
" Language: Zig
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
if (!has("cindent") || !has("eval"))
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal cindent
|
||||
|
||||
" L0 -> 0 indent for jump labels (i.e. case statement in c).
|
||||
" j1 -> indenting for "javascript object declarations"
|
||||
" J1 -> see j1
|
||||
" w1 -> starting a new line with `(` at the same indent as `(`
|
||||
" m1 -> if `)` starts a line, match its indent with the first char of its
|
||||
" matching `(` line
|
||||
" (s -> use one indent, when starting a new line after a trailing `(`
|
||||
setlocal cinoptions=L0,m1,(s,j1,J1,l1
|
||||
|
||||
" cinkeys: controls what keys trigger indent formatting
|
||||
" 0{ -> {
|
||||
" 0} -> }
|
||||
" 0) -> )
|
||||
" 0] -> ]
|
||||
" !^F -> make CTRL-F (^F) reindent the current line when typed
|
||||
" o -> when <CR> or `o` is used
|
||||
" O -> when the `O` command is used
|
||||
setlocal cinkeys=0{,0},0),0],!^F,o,O
|
||||
|
||||
setlocal indentexpr=GetZigIndent(v:lnum)
|
||||
|
||||
let b:undo_indent = "setlocal cindent< cinkeys< cinoptions< indentexpr<"
|
||||
|
||||
function! GetZigIndent(lnum)
|
||||
let curretLineNum = a:lnum
|
||||
let currentLine = getline(a:lnum)
|
||||
|
||||
" cindent doesn't handle multi-line strings properly, so force no indent
|
||||
if currentLine =~ '^\s*\\\\.*'
|
||||
return -1
|
||||
endif
|
||||
|
||||
let prevLineNum = prevnonblank(a:lnum-1)
|
||||
let prevLine = getline(prevLineNum)
|
||||
|
||||
" for lines that look like
|
||||
" },
|
||||
" };
|
||||
" try treating them the same as a }
|
||||
if prevLine =~ '\v^\s*},$'
|
||||
if currentLine =~ '\v^\s*};$' || currentLine =~ '\v^\s*}$'
|
||||
return indent(prevLineNum) - 4
|
||||
endif
|
||||
return indent(prevLineNum-1) - 4
|
||||
endif
|
||||
if currentLine =~ '\v^\s*},$'
|
||||
return indent(prevLineNum) - 4
|
||||
endif
|
||||
if currentLine =~ '\v^\s*};$'
|
||||
return indent(prevLineNum) - 4
|
||||
endif
|
||||
|
||||
|
||||
" cindent doesn't handle this case correctly:
|
||||
" switch (1): {
|
||||
" 1 => true,
|
||||
" ~
|
||||
" ^---- indents to here
|
||||
if prevLine =~ '.*=>.*,$' && currentLine !~ '.*}$'
|
||||
return indent(prevLineNum)
|
||||
endif
|
||||
|
||||
return cindent(a:lnum)
|
||||
endfunction
|
||||
@@ -1,6 +1,6 @@
|
||||
" Menu Translations: Danish
|
||||
" Maintainer: scootergrisen
|
||||
" Last Change: 2020 Apr 23
|
||||
" Last Change: 2022 Nov 17
|
||||
" Original translations
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
@@ -44,7 +44,7 @@ menut &Save<Tab>:w Gem<Tab>:w
|
||||
menut Save\ &As\.\.\.<Tab>:sav Gem\ som\.\.\.<Tab>:sav
|
||||
" -SEP2-
|
||||
menut Split\ &Diff\ with\.\.\. Opdel\ diff\ med\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Opdel\ patchet\ af\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Opdel\ patched\ af\.\.\.
|
||||
" -SEP3-
|
||||
menut &Print Udskriv
|
||||
" -SEP4-
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Mar 02
|
||||
" Last Change: 2022 Nov 27
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -341,7 +341,7 @@ def s:TextWidth()
|
||||
# Remove leading zeros to avoid it being used as an octal number.
|
||||
# But keep a zero by itself.
|
||||
var tw = substitute(n, "^0*", "", "")
|
||||
&tw = tw == '' ? 0 : tw
|
||||
&tw = tw == '' ? 0 : str2nr(tw)
|
||||
endif
|
||||
enddef
|
||||
|
||||
@@ -474,7 +474,7 @@ if has("spell")
|
||||
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>
|
||||
|
||||
let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
|
||||
def s:SpellLang()
|
||||
def s:SpellLang(encChanged = false)
|
||||
for cmd in s:undo_spelllang
|
||||
exe "silent! " .. cmd
|
||||
endfor
|
||||
@@ -482,7 +482,8 @@ if has("spell")
|
||||
|
||||
var enc = &enc == "iso-8859-15" ? "latin1" : &enc
|
||||
|
||||
if !exists("g:menutrans_set_lang_to")
|
||||
# Reset g:menutrans_set_lang_to when called for the EncodingChanged event.
|
||||
if !exists("g:menutrans_set_lang_to") || encChanged
|
||||
g:menutrans_set_lang_to = 'Set Language to'
|
||||
endif
|
||||
|
||||
@@ -510,12 +511,12 @@ if has("spell")
|
||||
else
|
||||
echomsg "Found " .. found .. " more spell files"
|
||||
endif
|
||||
|
||||
# Need to redo this when 'encoding' is changed.
|
||||
augroup spellmenu
|
||||
au! EncodingChanged * call <SID>SpellLang()
|
||||
au! EncodingChanged * call SpellLang(true)
|
||||
augroup END
|
||||
enddef
|
||||
|
||||
endif
|
||||
|
||||
" Tools.Fold Menu
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Oct 15
|
||||
" Last Change: 2022 Nov 23
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@@ -583,6 +583,8 @@ call <SID>BinOptionG("xtermcodes", &xtermcodes)
|
||||
call <SID>AddOption("weirdinvert", gettext("terminal that requires extra redrawing"))
|
||||
call <SID>BinOptionG("wiv", &wiv)
|
||||
|
||||
call <SID>AddOption("keyprotocol", gettext("what keyboard protocol to use for which terminal"))
|
||||
call <SID>OptionG("kpc", &kpc)
|
||||
call <SID>AddOption("esckeys", gettext("recognize keys that start with <Esc> in Insert mode"))
|
||||
call <SID>BinOptionG("ek", &ek)
|
||||
call <SID>AddOption("scrolljump", gettext("minimal number of lines to scroll at a time"))
|
||||
@@ -1047,6 +1049,9 @@ call <SID>BinOptionL("bin")
|
||||
call <SID>AddOption("endofline", gettext("last line in the file has an end-of-line"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("eol")
|
||||
call <SID>AddOption("endoffile", gettext("last line in the file followed by CTRL-Z"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("eof")
|
||||
call <SID>AddOption("fixendofline", gettext("fixes missing end-of-line at end of text file"))
|
||||
call append("$", "\t" .. s:local_to_buffer)
|
||||
call <SID>BinOptionL("fixeol")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2022 Jun 24
|
||||
" Last Change: 2022 Nov 10
|
||||
"
|
||||
" WORK IN PROGRESS - The basics works stable, more to come
|
||||
" Note: In general you need at least GDB 7.12 because this provides the
|
||||
@@ -891,7 +891,14 @@ func s:InstallCommands()
|
||||
endif
|
||||
|
||||
if has('menu') && &mouse != ''
|
||||
call s:InstallWinbar()
|
||||
" install the window toolbar by default, can be disabled in the config
|
||||
let winbar = 1
|
||||
if exists('g:termdebug_config')
|
||||
let winbar = get(g:termdebug_config, 'winbar', 1)
|
||||
endif
|
||||
if winbar
|
||||
call s:InstallWinbar()
|
||||
endif
|
||||
|
||||
let popup = 1
|
||||
if exists('g:termdebug_config')
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
" Vim plugin for using Vim as manpager.
|
||||
" Maintainer: Enno Nagel <ennonagel+vim@gmail.com>
|
||||
" Last Change: 2022 Sep 30
|
||||
" Last Change: 2022 Oct 17
|
||||
|
||||
if exists('g:loaded_manpager_plugin')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_manpager_plugin = 1
|
||||
|
||||
" Set up the current buffer (likely read from stdin) as a manpage
|
||||
command MANPAGER call s:ManPager()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Apr 08
|
||||
" Last Change: 2022 Dec 01
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -19,8 +19,8 @@ endif
|
||||
|
||||
augroup matchparen
|
||||
" Replace all matchparen autocommands
|
||||
autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
|
||||
autocmd! WinLeave * call s:Remove_Matches()
|
||||
autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair()
|
||||
autocmd! WinLeave,BufLeave * call s:Remove_Matches()
|
||||
if exists('##TextChanged')
|
||||
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
@@ -815,202 +815,204 @@ endif
|
||||
|
||||
" HTML header, with the title and generator ;-). Left free space for the CSS,
|
||||
" to be filled at the end.
|
||||
call extend(s:lines, [
|
||||
\ "<html>",
|
||||
\ "<head>"])
|
||||
" include encoding as close to the top as possible, but only if not already
|
||||
" contained in XML information (to avoid haggling over content type)
|
||||
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||
if s:html5
|
||||
call add(s:lines, '<meta charset="' . s:settings.encoding . '"' . s:tag_close)
|
||||
else
|
||||
call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . s:tag_close)
|
||||
endif
|
||||
endif
|
||||
call extend(s:lines, [
|
||||
\ ("<title>".expand("%:p:~")."</title>"),
|
||||
\ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close),
|
||||
\ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close)
|
||||
\ ])
|
||||
call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close)
|
||||
call add(s:lines, '<meta name="settings" content="'.
|
||||
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
|
||||
\ ',prevent_copy='.s:settings.prevent_copy.
|
||||
\ ',use_input_for_pc='.s:settings.use_input_for_pc.
|
||||
\ '"'.s:tag_close)
|
||||
call add(s:lines, '<meta name="colorscheme" content="'.
|
||||
\ (exists('g:colors_name')
|
||||
\ ? g:colors_name
|
||||
\ : 'none'). '"'.s:tag_close)
|
||||
|
||||
if s:settings.use_css
|
||||
if !s:settings.no_doc
|
||||
call extend(s:lines, [
|
||||
\ "<style" . (s:html5 ? "" : " type=\"text/css\"") . ">",
|
||||
\ s:settings.use_xhtml ? "" : "<!--"])
|
||||
let s:ieonly = []
|
||||
if s:settings.dynamic_folds
|
||||
if s:settings.hover_unfold
|
||||
" if we are doing hover_unfold, use css 2 with css 1 fallback for IE6
|
||||
call extend(s:lines, [
|
||||
\ ".FoldColumn { text-decoration: none; white-space: pre; }",
|
||||
\ "",
|
||||
\ "body * { margin: 0; padding: 0; }", "",
|
||||
\ ".open-fold > span.Folded { display: none; }",
|
||||
\ ".open-fold > .fulltext { display: inline; }",
|
||||
\ ".closed-fold > .fulltext { display: none; }",
|
||||
\ ".closed-fold > span.Folded { display: inline; }",
|
||||
\ "",
|
||||
\ ".open-fold > .toggle-open { display: none; }",
|
||||
\ ".open-fold > .toggle-closed { display: inline; }",
|
||||
\ ".closed-fold > .toggle-open { display: inline; }",
|
||||
\ ".closed-fold > .toggle-closed { display: none; }",
|
||||
\ "", "",
|
||||
\ '/* opening a fold while hovering won''t be supported by IE6 and other',
|
||||
\ "similar browsers, but it should fail gracefully. */",
|
||||
\ ".closed-fold:hover > .fulltext { display: inline; }",
|
||||
\ ".closed-fold:hover > .toggle-filler { display: none; }",
|
||||
\ ".closed-fold:hover > .Folded { display: none; }"])
|
||||
" TODO: IE6 is REALLY old and I can't even test it anymore. Maybe we
|
||||
" should remove this? Leave it in for now, it was working at one point,
|
||||
" and doesn't affect any modern browsers. Even newer IE versions should
|
||||
" support the above code and ignore the following.
|
||||
let s:ieonly = [
|
||||
\ "<!--[if lt IE 7]><style type=\"text/css\">",
|
||||
\ ".open-fold .fulltext { display: inline; }",
|
||||
\ ".open-fold span.Folded { display: none; }",
|
||||
\ ".open-fold .toggle-open { display: none; }",
|
||||
\ ".open-fold .toggle-closed { display: inline; }",
|
||||
\ "",
|
||||
\ ".closed-fold .fulltext { display: none; }",
|
||||
\ ".closed-fold span.Folded { display: inline; }",
|
||||
\ ".closed-fold .toggle-open { display: inline; }",
|
||||
\ ".closed-fold .toggle-closed { display: none; }",
|
||||
\ "</style>",
|
||||
\ "<![endif]-->",
|
||||
\]
|
||||
\ "<html>",
|
||||
\ "<head>"])
|
||||
" include encoding as close to the top as possible, but only if not already
|
||||
" contained in XML information (to avoid haggling over content type)
|
||||
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||
if s:html5
|
||||
call add(s:lines, '<meta charset="' . s:settings.encoding . '"' . s:tag_close)
|
||||
else
|
||||
" if we aren't doing hover_unfold, use CSS 1 only
|
||||
call extend(s:lines, [
|
||||
\ ".FoldColumn { text-decoration: none; white-space: pre; }",
|
||||
\ ".open-fold .fulltext { display: inline; }",
|
||||
\ ".open-fold span.Folded { display: none; }",
|
||||
\ ".open-fold .toggle-open { display: none; }",
|
||||
\ ".open-fold .toggle-closed { display: inline; }",
|
||||
\ "",
|
||||
\ ".closed-fold .fulltext { display: none; }",
|
||||
\ ".closed-fold span.Folded { display: inline; }",
|
||||
\ ".closed-fold .toggle-open { display: inline; }",
|
||||
\ ".closed-fold .toggle-closed { display: none; }",
|
||||
\])
|
||||
call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . s:tag_close)
|
||||
endif
|
||||
endif
|
||||
" else we aren't doing any dynamic folding, no need for any special rules
|
||||
|
||||
call extend(s:lines, [
|
||||
\ s:settings.use_xhtml ? "" : '-->',
|
||||
\ "</style>",
|
||||
\])
|
||||
call extend(s:lines, s:ieonly)
|
||||
unlet s:ieonly
|
||||
endif
|
||||
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
|
||||
|
||||
" insert script tag if needed
|
||||
if s:uses_script
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
|
||||
" insert javascript to toggle folds open and closed
|
||||
if s:settings.dynamic_folds
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "function toggleFold(objID)",
|
||||
\ "{",
|
||||
\ " var fold;",
|
||||
\ " fold = document.getElementById(objID);",
|
||||
\ " if (fold.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'open-fold';",
|
||||
\ " }",
|
||||
\ " else if (fold.className == 'open-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'closed-fold';",
|
||||
\ " }",
|
||||
\ "}"
|
||||
\ ("<title>".expand("%:p:~")."</title>"),
|
||||
\ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close),
|
||||
\ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close)
|
||||
\ ])
|
||||
endif
|
||||
call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close)
|
||||
call add(s:lines, '<meta name="settings" content="'.
|
||||
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
|
||||
\ ',prevent_copy='.s:settings.prevent_copy.
|
||||
\ ',use_input_for_pc='.s:settings.use_input_for_pc.
|
||||
\ '"'.s:tag_close)
|
||||
call add(s:lines, '<meta name="colorscheme" content="'.
|
||||
\ (exists('g:colors_name')
|
||||
\ ? g:colors_name
|
||||
\ : 'none'). '"'.s:tag_close)
|
||||
|
||||
if s:settings.line_ids
|
||||
" insert javascript to get IDs from line numbers, and to open a fold before
|
||||
" jumping to any lines contained therein
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
if s:settings.use_css
|
||||
call extend(s:lines, [
|
||||
\ "<style" . (s:html5 ? "" : " type=\"text/css\"") . ">",
|
||||
\ s:settings.use_xhtml ? "" : "<!--"])
|
||||
let s:ieonly = []
|
||||
if s:settings.dynamic_folds
|
||||
if s:settings.hover_unfold
|
||||
" if we are doing hover_unfold, use css 2 with css 1 fallback for IE6
|
||||
call extend(s:lines, [
|
||||
\ ".FoldColumn { text-decoration: none; white-space: pre; }",
|
||||
\ "",
|
||||
\ "body * { margin: 0; padding: 0; }", "",
|
||||
\ ".open-fold > span.Folded { display: none; }",
|
||||
\ ".open-fold > .fulltext { display: inline; }",
|
||||
\ ".closed-fold > .fulltext { display: none; }",
|
||||
\ ".closed-fold > span.Folded { display: inline; }",
|
||||
\ "",
|
||||
\ ".open-fold > .toggle-open { display: none; }",
|
||||
\ ".open-fold > .toggle-closed { display: inline; }",
|
||||
\ ".closed-fold > .toggle-open { display: inline; }",
|
||||
\ ".closed-fold > .toggle-closed { display: none; }",
|
||||
\ "", "",
|
||||
\ '/* opening a fold while hovering won''t be supported by IE6 and other',
|
||||
\ "similar browsers, but it should fail gracefully. */",
|
||||
\ ".closed-fold:hover > .fulltext { display: inline; }",
|
||||
\ ".closed-fold:hover > .toggle-filler { display: none; }",
|
||||
\ ".closed-fold:hover > .Folded { display: none; }"])
|
||||
" TODO: IE6 is REALLY old and I can't even test it anymore. Maybe we
|
||||
" should remove this? Leave it in for now, it was working at one point,
|
||||
" and doesn't affect any modern browsers. Even newer IE versions should
|
||||
" support the above code and ignore the following.
|
||||
let s:ieonly = [
|
||||
\ "<!--[if lt IE 7]><style type=\"text/css\">",
|
||||
\ ".open-fold .fulltext { display: inline; }",
|
||||
\ ".open-fold span.Folded { display: none; }",
|
||||
\ ".open-fold .toggle-open { display: none; }",
|
||||
\ ".open-fold .toggle-closed { display: inline; }",
|
||||
\ "",
|
||||
\ ".closed-fold .fulltext { display: none; }",
|
||||
\ ".closed-fold span.Folded { display: inline; }",
|
||||
\ ".closed-fold .toggle-open { display: inline; }",
|
||||
\ ".closed-fold .toggle-closed { display: none; }",
|
||||
\ "</style>",
|
||||
\ "<![endif]-->",
|
||||
\]
|
||||
else
|
||||
" if we aren't doing hover_unfold, use CSS 1 only
|
||||
call extend(s:lines, [
|
||||
\ ".FoldColumn { text-decoration: none; white-space: pre; }",
|
||||
\ ".open-fold .fulltext { display: inline; }",
|
||||
\ ".open-fold span.Folded { display: none; }",
|
||||
\ ".open-fold .toggle-open { display: none; }",
|
||||
\ ".open-fold .toggle-closed { display: inline; }",
|
||||
\ "",
|
||||
\ ".closed-fold .fulltext { display: none; }",
|
||||
\ ".closed-fold span.Folded { display: inline; }",
|
||||
\ ".closed-fold .toggle-open { display: inline; }",
|
||||
\ ".closed-fold .toggle-closed { display: none; }",
|
||||
\])
|
||||
endif
|
||||
endif
|
||||
" else we aren't doing any dynamic folding, no need for any special rules
|
||||
|
||||
call extend(s:lines, [
|
||||
\ s:settings.use_xhtml ? "" : '-->',
|
||||
\ "</style>",
|
||||
\])
|
||||
call extend(s:lines, s:ieonly)
|
||||
unlet s:ieonly
|
||||
endif
|
||||
|
||||
let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
|
||||
|
||||
" insert script tag if needed
|
||||
if s:uses_script
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
|
||||
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
|
||||
endif
|
||||
|
||||
" insert javascript to toggle folds open and closed
|
||||
if s:settings.dynamic_folds
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ "function toggleFold(objID)",
|
||||
\ "{",
|
||||
\ " var fold;",
|
||||
\ " fold = document.getElementById(objID);",
|
||||
\ " if (fold.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " node.className = 'open-fold';",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ " fold.className = 'open-fold';",
|
||||
\ " }",
|
||||
\ " else if (fold.className == 'open-fold')",
|
||||
\ " {",
|
||||
\ " fold.className = 'closed-fold';",
|
||||
\ " }",
|
||||
\ "}"
|
||||
\ ])
|
||||
endif
|
||||
call extend(s:lines, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call extend(s:lines, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
if s:settings.line_ids
|
||||
" insert javascript to get IDs from line numbers, and to open a fold before
|
||||
" jumping to any lines contained therein
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ "/* function to open any folds containing a jumped-to line before jumping to it */",
|
||||
\ "function JumpToLine()",
|
||||
\ "{",
|
||||
\ " var lineNum;",
|
||||
\ " lineNum = window.location.hash;",
|
||||
\ " lineNum = lineNum.substr(1); /* strip off '#' */",
|
||||
\ "",
|
||||
\ " if (lineNum.indexOf('L') == -1) {",
|
||||
\ " lineNum = 'L'+lineNum;",
|
||||
\ " }",
|
||||
\ " var lineElem = document.getElementById(lineNum);"
|
||||
\ ])
|
||||
|
||||
call extend(s:lines, ["</head>",
|
||||
\ "<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"])
|
||||
if s:settings.dynamic_folds
|
||||
call extend(s:lines, [
|
||||
\ "",
|
||||
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
|
||||
\ " var node = lineElem;",
|
||||
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
|
||||
\ " {",
|
||||
\ " if (node.className == 'closed-fold')",
|
||||
\ " {",
|
||||
\ " node.className = 'open-fold';",
|
||||
\ " }",
|
||||
\ " node = node.parentNode;",
|
||||
\ " }",
|
||||
\ ])
|
||||
endif
|
||||
call extend(s:lines, [
|
||||
\ " /* Always jump to new location even if the line was hidden inside a fold, or",
|
||||
\ " * we corrected the raw number to a line ID.",
|
||||
\ " */",
|
||||
\ " if (lineElem) {",
|
||||
\ " lineElem.scrollIntoView(true);",
|
||||
\ " }",
|
||||
\ " return true;",
|
||||
\ "}",
|
||||
\ "if ('onhashchange' in window) {",
|
||||
\ " window.onhashchange = JumpToLine;",
|
||||
\ "}"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
" insert script closing tag if needed
|
||||
if s:uses_script
|
||||
call extend(s:lines, [
|
||||
\ '',
|
||||
\ s:settings.use_xhtml ? '//]]>' : '-->',
|
||||
\ "</script>"
|
||||
\ ])
|
||||
endif
|
||||
|
||||
call extend(s:lines, ["</head>",
|
||||
\ "<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"])
|
||||
endif
|
||||
|
||||
if s:settings.no_pre
|
||||
" if we're not using CSS we use a font tag which can't have a div inside
|
||||
if s:settings.use_css
|
||||
call extend(s:lines, ["<div id='vimCodeElement".s:settings.id_suffix."'>"])
|
||||
call extend(s:lines, ["<div id='vimCodeElement" .. s:settings.id_suffix .. "'>"])
|
||||
endif
|
||||
else
|
||||
call extend(s:lines, ["<pre id='vimCodeElement".s:settings.id_suffix."'>"])
|
||||
call extend(s:lines, ["<pre id='vimCodeElement" .. s:settings.id_suffix .. "'>"])
|
||||
endif
|
||||
|
||||
exe s:orgwin . "wincmd w"
|
||||
@@ -1721,12 +1723,15 @@ endif
|
||||
if s:settings.no_pre
|
||||
if !s:settings.use_css
|
||||
" Close off the font tag that encapsulates the whole <body>
|
||||
call extend(s:lines, ["</font>", "</body>", "</html>"])
|
||||
call extend(s:lines, ["</font>"])
|
||||
else
|
||||
call extend(s:lines, ["</div>", "</body>", "</html>"])
|
||||
call extend(s:lines, ["</div>"])
|
||||
endif
|
||||
else
|
||||
call extend(s:lines, ["</pre>", "</body>", "</html>"])
|
||||
call extend(s:lines, ["</pre>"])
|
||||
endif
|
||||
if !s:settings.no_doc
|
||||
call extend(s:lines, ["</body>", "</html>"])
|
||||
endif
|
||||
|
||||
exe s:newwin . "wincmd w"
|
||||
@@ -1742,15 +1747,15 @@ unlet s:lines
|
||||
" The generated HTML is admittedly ugly and takes a LONG time to fold.
|
||||
" Make sure the user doesn't do syntax folding when loading a generated file,
|
||||
" using a modeline.
|
||||
call append(line('$'), "<!-- vim: set foldmethod=manual : -->")
|
||||
|
||||
" Now, when we finally know which, we define the colors and styles
|
||||
if s:settings.use_css
|
||||
1;/<style\>/+1
|
||||
if !s:settings.no_modeline
|
||||
call append(line('$'), "<!-- vim: set foldmethod=manual : -->")
|
||||
endif
|
||||
|
||||
" Normal/global attributes
|
||||
if s:settings.use_css
|
||||
" Now, when we finally know which, we define the colors and styles
|
||||
if s:settings.use_css && !s:settings.no_doc
|
||||
1;/<style\>/+1
|
||||
|
||||
" Normal/global attributes
|
||||
if s:settings.no_pre
|
||||
call append('.', "body { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: ". s:htmlfont ."; }")
|
||||
+
|
||||
@@ -1874,7 +1879,9 @@ if s:settings.use_css
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
else
|
||||
endif
|
||||
|
||||
if !s:settings.use_css && !s:settings_no_doc
|
||||
" For Netscape 4, set <body> attributes too, though, strictly speaking, it's
|
||||
" incorrect.
|
||||
execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"'
|
||||
@@ -1882,7 +1889,7 @@ endif
|
||||
|
||||
" Gather attributes for all other classes. Do diff first so that normal
|
||||
" highlight groups are inserted before it.
|
||||
if s:settings.use_css
|
||||
if s:settings.use_css && !s:settings.no_doc
|
||||
if s:diff_mode
|
||||
call append('.', filter(map(keys(s:diffstylelist), "s:diffstylelist[v:val]"), 'v:val != ""'))
|
||||
endif
|
||||
@@ -1892,20 +1899,22 @@ if s:settings.use_css
|
||||
endif
|
||||
|
||||
" Add hyperlinks
|
||||
" TODO: add option to not do this? Maybe just make the color the same as the
|
||||
" text highlight group normally is?
|
||||
%s+\(https\=://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|>\|<\|"\)+<a href="\1">\1</a>\2+ge
|
||||
|
||||
" The DTD
|
||||
if s:settings.use_xhtml
|
||||
exe "normal! gg$a\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
|
||||
elseif s:html5
|
||||
exe "normal! gg0i<!DOCTYPE html>\n"
|
||||
else
|
||||
exe "normal! gg0i<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"
|
||||
if !s:settings.no_links
|
||||
%s+\(https\=://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|>\|<\|"\)+<a href="\1">\1</a>\2+ge
|
||||
endif
|
||||
|
||||
if s:settings.use_xhtml
|
||||
" The DTD
|
||||
if !s:settings.no_doc
|
||||
if s:settings.use_xhtml
|
||||
exe "normal! gg$a\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
|
||||
elseif s:html5
|
||||
exe "normal! gg0i<!DOCTYPE html>\n"
|
||||
else
|
||||
exe "normal! gg0i<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:settings.use_xhtml && !s:settings.no_doc
|
||||
exe "normal! gg/<html/e\na xmlns=\"http://www.w3.org/1999/xhtml\"\e"
|
||||
endif
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
" Maintainer: Marcin Szamotulski <profunctor@pm.me>
|
||||
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
|
||||
" File Types: .cabal
|
||||
" Last Change: 21 Nov 2020
|
||||
" Last Change: 22 Oct 2022
|
||||
" v1.6: Added support for foreign-libraries
|
||||
" Added highlighting for various fields
|
||||
" v1.5: Incorporated changes from
|
||||
" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim
|
||||
" Use `syn keyword` instead of `syn match`.
|
||||
@@ -61,13 +63,14 @@ syn keyword cabalCategory contained
|
||||
\ test-suite
|
||||
\ source-repository
|
||||
\ flag
|
||||
\ foreign-library
|
||||
\ custom-setup
|
||||
\ common
|
||||
syn match cabalCategoryTitle contained /[^{]*\ze{\?/
|
||||
syn match cabalCategoryRegion
|
||||
\ contains=cabalCategory,cabalCategoryTitle
|
||||
\ nextgroup=cabalCategory skipwhite
|
||||
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
|
||||
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|foreign-library\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
|
||||
syn keyword cabalTruth true false
|
||||
|
||||
" cabalStatementRegion which limits the scope of cabalStatement keywords, this
|
||||
@@ -77,6 +80,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ default-language
|
||||
\ default-extensions
|
||||
\ author
|
||||
\ autogen-includes
|
||||
\ autogen-modules
|
||||
\ asm-sources
|
||||
\ asm-options
|
||||
@@ -84,7 +88,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ bug-reports
|
||||
\ build-depends
|
||||
\ build-tools
|
||||
\ build-tools-depends
|
||||
\ build-tool-depends
|
||||
\ build-type
|
||||
\ buildable
|
||||
\ c-sources
|
||||
@@ -95,6 +99,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ cmm-sources
|
||||
\ cmm-options
|
||||
\ cpp-options
|
||||
\ cxx-options
|
||||
\ cxx-sources
|
||||
\ data-dir
|
||||
\ data-files
|
||||
@@ -111,7 +116,9 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ extra-framework-dirs
|
||||
\ extra-ghci-libraries
|
||||
\ extra-lib-dirs
|
||||
\ extra-lib-dirs-static
|
||||
\ extra-libraries
|
||||
\ extra-libraries-static
|
||||
\ extra-library-flavours
|
||||
\ extra-source-files
|
||||
\ extra-tmp-files
|
||||
@@ -133,6 +140,8 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ install-includes
|
||||
\ js-sources
|
||||
\ ld-options
|
||||
\ lib-version-info
|
||||
\ lib-version-linux
|
||||
\ license
|
||||
\ license-file
|
||||
\ location
|
||||
@@ -141,20 +150,26 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ manual
|
||||
\ mixins
|
||||
\ module
|
||||
\ mod-def-file
|
||||
\ name
|
||||
\ nhc98-options
|
||||
\ options
|
||||
\ other-extensions
|
||||
\ other-language
|
||||
\ other-languages
|
||||
\ other-modules
|
||||
\ package-url
|
||||
\ pkgconfig-depends
|
||||
\ scope
|
||||
\ setup-depends
|
||||
\ signatures
|
||||
\ stability
|
||||
\ subdir
|
||||
\ synopsis
|
||||
\ reexported-modules
|
||||
\ tag
|
||||
\ tested-with
|
||||
\ test-module
|
||||
\ type
|
||||
\ version
|
||||
\ virtual-modules
|
||||
|
||||
@@ -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-03-01
|
||||
" Last Change: 2022-11-16
|
||||
" Filenames: *.cs
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
@@ -25,6 +25,9 @@ syn keyword csType bool byte char decimal double float int long object sbyte sho
|
||||
syn keyword csType nint nuint " contextual
|
||||
|
||||
syn keyword csStorage enum interface namespace struct
|
||||
syn match csStorage "\<record\ze\_s\+@\=\h\w*\_s*[<(:{;]"
|
||||
syn match csStorage "\%(\<\%(partial\|new\|public\|protected\|internal\|private\|abstract\|sealed\|static\|unsafe\|readonly\)\)\@9<=\_s\+record\>"
|
||||
syn match csStorage "\<record\ze\_s\+\%(class\|struct\)"
|
||||
syn match csStorage "\<delegate\>"
|
||||
syn keyword csRepeat break continue do for foreach goto return while
|
||||
syn keyword csConditional else if switch
|
||||
@@ -44,6 +47,9 @@ syn keyword csManagedModifier managed unmanaged contained
|
||||
" Modifiers
|
||||
syn match csUsingModifier "\<global\ze\_s\+using\>"
|
||||
syn keyword csAccessModifier internal private protected public
|
||||
syn keyword csModifier operator nextgroup=csCheckedModifier skipwhite skipempty
|
||||
syn keyword csCheckedModifier checked contained
|
||||
|
||||
" TODO: in new out
|
||||
syn keyword csModifier abstract const event override readonly sealed static virtual volatile
|
||||
syn match csModifier "\<\%(extern\|fixed\|unsafe\)\>"
|
||||
@@ -76,7 +82,7 @@ syn match csAccess "\<this\>"
|
||||
" Extension method parameter modifier
|
||||
syn match csModifier "\<this\ze\_s\+@\=\h"
|
||||
|
||||
syn keyword csUnspecifiedStatement as in is nameof operator out params ref sizeof stackalloc using
|
||||
syn keyword csUnspecifiedStatement as in is nameof out params ref sizeof stackalloc using
|
||||
syn keyword csUnsupportedStatement value
|
||||
syn keyword csUnspecifiedKeyword explicit implicit
|
||||
|
||||
@@ -183,7 +189,7 @@ syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier disp
|
||||
syn match csUnicodeNumber +\\U00\x\{6}+ contained contains=csUnicodeSpecifier display
|
||||
syn match csUnicodeSpecifier +\\[uUx]+ contained display
|
||||
|
||||
syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
syn region csString matchgroup=csQuote start=+"+ end=+"\%(u8\)\=+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError,csUnicodeNumber display
|
||||
syn match csCharacter "'\\''" contains=csSpecialChar display
|
||||
syn match csCharacter "'[^\\]'" display
|
||||
@@ -200,7 +206,7 @@ syn match csReal "\<\d\+\%(_\+\d\+\)*[fdm]\>" display
|
||||
syn case match
|
||||
syn cluster csNumber contains=csInteger,csReal
|
||||
|
||||
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"\%(u8\)\=+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
|
||||
syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat
|
||||
syn match csEscapedInterpolation "{{" transparent contains=NONE display
|
||||
@@ -210,10 +216,10 @@ syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFor
|
||||
syn match csInterpolationAlignDel +,+ contained display
|
||||
syn match csInterpolationFormatDel +:+ contained display
|
||||
|
||||
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell
|
||||
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csVerbatimQuote,@Spell
|
||||
syn match csVerbatimQuote +""+ contained
|
||||
|
||||
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
|
||||
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
|
||||
|
||||
@@ -256,6 +262,7 @@ hi def link csException Exception
|
||||
hi def link csModifier StorageClass
|
||||
hi def link csAccessModifier csModifier
|
||||
hi def link csAsyncModifier csModifier
|
||||
hi def link csCheckedModifier csModifier
|
||||
hi def link csManagedModifier csModifier
|
||||
hi def link csUsingModifier csModifier
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2022 Jul 25
|
||||
" Last Change: 2022 Oct 29
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,9 +21,9 @@ let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2022 Jul 25
|
||||
" Last Change: 2022 Oct 29
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -23,9 +23,9 @@ let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" go.vim: Vim syntax file for Go.
|
||||
" Language: Go
|
||||
" Maintainer: Billie Cleek <bhcleek@gmail.com>
|
||||
" Latest Revision: 2021-09-18
|
||||
" Latest Revision: 2022-11-17
|
||||
" License: BSD-style. See LICENSE file in source repository.
|
||||
" Repository: https://github.com/fatih/vim-go
|
||||
|
||||
@@ -117,7 +117,7 @@ hi def link goLabel Label
|
||||
hi def link goRepeat Repeat
|
||||
|
||||
" Predefined types
|
||||
syn keyword goType chan map bool string error
|
||||
syn keyword goType chan map bool string error any comparable
|
||||
syn keyword goSignedInts int int8 int16 int32 int64 rune
|
||||
syn keyword goUnsignedInts byte uint uint8 uint16 uint32 uint64 uintptr
|
||||
syn keyword goFloats float32 float64
|
||||
@@ -187,6 +187,8 @@ else
|
||||
syn region goRawString start=+`+ end=+`+
|
||||
endif
|
||||
|
||||
syn match goImportString /^\%(\s\+\|import \)\(\h\w* \)\?\zs"[^"]\+"$/ contained containedin=goImport
|
||||
|
||||
if s:HighlightFormatStrings()
|
||||
" [n] notation is valid for specifying explicit argument indexes
|
||||
" 1. Match a literal % not preceded by a %.
|
||||
@@ -204,6 +206,7 @@ if s:HighlightFormatStrings()
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
hi def link goImportString String
|
||||
hi def link goString String
|
||||
hi def link goRawString String
|
||||
|
||||
@@ -223,9 +226,9 @@ endif
|
||||
|
||||
" import
|
||||
if s:FoldEnable('import')
|
||||
syn region goImport start='import (' end=')' transparent fold contains=goImport,goString,goComment
|
||||
syn region goImport start='import (' end=')' transparent fold contains=goImport,goImportString,goComment
|
||||
else
|
||||
syn region goImport start='import (' end=')' transparent contains=goImport,goString,goComment
|
||||
syn region goImport start='import (' end=')' transparent contains=goImport,goImportString,goComment
|
||||
endif
|
||||
|
||||
" var, const
|
||||
@@ -245,14 +248,10 @@ endif
|
||||
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
||||
|
||||
" Integers
|
||||
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
||||
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>"
|
||||
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
||||
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:;]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
||||
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
||||
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>"
|
||||
syn match goDecimalInt "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+\>"
|
||||
syn match goOctalInt "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+\>"
|
||||
syn match goBinaryInt "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+\>"
|
||||
|
||||
hi def link goDecimalInt Integer
|
||||
hi def link goDecimalError Error
|
||||
@@ -265,19 +264,55 @@ hi def link goBinaryError Error
|
||||
hi def link Integer Number
|
||||
|
||||
" Floating point
|
||||
syn match goFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=\>"
|
||||
"float_lit = decimal_float_lit | hex_float_lit .
|
||||
"
|
||||
"decimal_float_lit = decimal_digits "." [ decimal_digits ] [ decimal_exponent ] |
|
||||
" decimal_digits decimal_exponent |
|
||||
" "." decimal_digits [ decimal_exponent ] .
|
||||
"decimal_exponent = ( "e" | "E" ) [ "+" | "-" ] decimal_digits .
|
||||
"
|
||||
"hex_float_lit = "0" ( "x" | "X" ) hex_mantissa hex_exponent .
|
||||
"hex_mantissa = [ "_" ] hex_digits "." [ hex_digits ] |
|
||||
" [ "_" ] hex_digits |
|
||||
" "." hex_digits .
|
||||
"hex_exponent = ( "p" | "P" ) [ "+" | "-" ] decimal_digits .
|
||||
" decimal floats with a decimal point
|
||||
syn match goFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\.\%(\%(\%(\d\|\d_\d\)\+\)\=\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=\>\)\="
|
||||
syn match goFloat "\s\zs-\=\.\%(\d\|\d_\d\)\+\%(\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\>\)\="
|
||||
" decimal floats without a decimal point
|
||||
syn match goFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)[Ee][-+]\=\%(\d\|\d_\d\)\+\>"
|
||||
" hexadecimal floats with a decimal point
|
||||
syn match goHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+\.\%(\%(\x\|\x_\x\)\+\)\=\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=\>"
|
||||
syn match goHexadecimalFloat "\<-\=0[xX]\.\%(\x\|\x_\x\)\+\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=\>"
|
||||
" hexadecimal floats without a decimal point
|
||||
syn match goHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+[Pp][-+]\=\%(\d\|\d_\d\)\+\>"
|
||||
|
||||
hi def link goFloat Float
|
||||
hi def link goHexadecimalFloat Float
|
||||
|
||||
" Imaginary literals
|
||||
syn match goImaginary "\<-\=\d\+i\>"
|
||||
syn match goImaginary "\<-\=\d\+[Ee][-+]\=\d\+i\>"
|
||||
syn match goImaginaryFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=i\>"
|
||||
syn match goImaginaryFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=i\>"
|
||||
syn match goImaginaryDecimal "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)i\>"
|
||||
syn match goImaginaryHexadecimal "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+i\>"
|
||||
syn match goImaginaryOctal "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+i\>"
|
||||
syn match goImaginaryBinary "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+i\>"
|
||||
|
||||
hi def link goImaginary Number
|
||||
hi def link goImaginaryFloat Float
|
||||
" imaginary decimal floats with a decimal point
|
||||
syn match goImaginaryFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\.\%(\%(\%(\d\|\d_\d\)\+\)\=\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=\)\=i\>"
|
||||
syn match goImaginaryFloat "\s\zs-\=\.\%(\d\|\d_\d\)\+\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=i\>"
|
||||
" imaginary decimal floats without a decimal point
|
||||
syn match goImaginaryFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)[Ee][-+]\=\%(\d\|\d_\d\)\+i\>"
|
||||
" imaginary hexadecimal floats with a decimal point
|
||||
syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+\.\%(\%(\x\|\x_\x\)\+\)\=\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=i\>"
|
||||
syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\.\%(\x\|\x_\x\)\+\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=i\>"
|
||||
" imaginary hexadecimal floats without a decimal point
|
||||
syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+[Pp][-+]\=\%(\d\|\d_\d\)\+i\>"
|
||||
|
||||
hi def link goImaginaryDecimal Number
|
||||
hi def link goImaginaryHexadecimal Number
|
||||
hi def link goImaginaryOctal Number
|
||||
hi def link goImaginaryBinary Number
|
||||
hi def link goImaginaryFloat Float
|
||||
hi def link goImaginaryHexadecimalFloat Float
|
||||
|
||||
" Spaces after "[]"
|
||||
if s:HighlightArrayWhitespaceError()
|
||||
@@ -346,6 +381,8 @@ if s:HighlightOperators()
|
||||
syn match goOperator /\%(<<\|>>\|&^\)=\?/
|
||||
" match remaining two-char operators: := && || <- ++ --
|
||||
syn match goOperator /:=\|||\|<-\|++\|--/
|
||||
" match ~
|
||||
syn match goOperator /\~/
|
||||
" match ...
|
||||
|
||||
hi def link goPointerOperator goOperator
|
||||
@@ -353,13 +390,37 @@ if s:HighlightOperators()
|
||||
endif
|
||||
hi def link goOperator Operator
|
||||
|
||||
" -> type constraint opening bracket
|
||||
" |-> start non-counting group
|
||||
" || -> any word character
|
||||
" || | -> at least one, as many as possible
|
||||
" || | | -> start non-counting group
|
||||
" || | | | -> match ~
|
||||
" || | | | | -> at most once
|
||||
" || | | | | | -> allow a slice type
|
||||
" || | | | | | | -> any word character
|
||||
" || | | | | | | | -> start a non-counting group
|
||||
" || | | | | | | | | -> that matches word characters and |
|
||||
" || | | | | | | | | | -> close the non-counting group
|
||||
" || | | | | | | | | | | -> close the non-counting group
|
||||
" || | | | | | | | | | | |-> any number of matches
|
||||
" || | | | | | | | | | | || -> start a non-counting group
|
||||
" || | | | | | | | | | | || | -> a comma and whitespace
|
||||
" || | | | | | | | | | | || | | -> at most once
|
||||
" || | | | | | | | | | | || | | | -> close the non-counting group
|
||||
" || | | | | | | | | | | || | | | | -> at least one of those non-counting groups, as many as possible
|
||||
" || | | | | | -------- | | | | || | | | | | -> type constraint closing bracket
|
||||
" || | | | | || | | | | | || | | | | | |
|
||||
syn match goTypeParams /\[\%(\w\+\s\+\%(\~\?\%(\[]\)\?\w\%(\w\||\)\)*\%(,\s*\)\?\)\+\]/ nextgroup=goSimpleParams,goDeclType contained
|
||||
|
||||
" Functions;
|
||||
if s:HighlightFunctions() || s:HighlightFunctionParameters()
|
||||
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction,goSimpleParams skipwhite skipnl
|
||||
syn match goReceiverDecl /(\s*\zs\%(\%(\w\+\s\+\)\?\*\?\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\)\ze\s*)/ contained contains=goReceiverVar,goReceiverType,goPointerOperator
|
||||
syn match goReceiverVar /\w\+\ze\s\+\%(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained
|
||||
syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl
|
||||
syn match goFunction /\w\+/ nextgroup=goSimpleParams contained skipwhite skipnl
|
||||
syn match goReceiverType /\w\+/ contained
|
||||
syn match goFunction /\w\+/ nextgroup=goSimpleParams,goTypeParams contained skipwhite skipnl
|
||||
syn match goReceiverType /\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\ze\s*)/ contained
|
||||
if s:HighlightFunctionParameters()
|
||||
syn match goSimpleParams /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType nextgroup=goFunctionReturn skipwhite skipnl
|
||||
syn match goFunctionReturn /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType skipwhite skipnl
|
||||
@@ -369,7 +430,7 @@ if s:HighlightFunctions() || s:HighlightFunctionParameters()
|
||||
hi def link goReceiverVar goParamName
|
||||
hi def link goParamName Identifier
|
||||
endif
|
||||
syn match goReceiver /(\s*\w\+\%(\s\+\*\?\s*\w\+\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl
|
||||
syn match goReceiver /(\s*\%(\w\+\s\+\)\?\*\?\s*\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverDecl skipwhite skipnl
|
||||
else
|
||||
syn keyword goDeclaration func
|
||||
endif
|
||||
@@ -377,7 +438,7 @@ hi def link goFunction Function
|
||||
|
||||
" Function calls;
|
||||
if s:HighlightFunctionCalls()
|
||||
syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration
|
||||
syn match goFunctionCall /\w\+\ze\%(\[\%(\%(\[]\)\?\w\+\(,\s*\)\?\)\+\]\)\?(/ contains=goBuiltins,goDeclaration
|
||||
endif
|
||||
hi def link goFunctionCall Type
|
||||
|
||||
@@ -404,7 +465,7 @@ hi def link goField Identifier
|
||||
if s:HighlightTypes()
|
||||
syn match goTypeConstructor /\<\w\+{\@=/
|
||||
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
|
||||
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
|
||||
syn match goTypeName /\w\+/ contained nextgroup=goDeclType,goTypeParams skipwhite skipnl
|
||||
syn match goDeclType /\<\%(interface\|struct\)\>/ skipwhite skipnl
|
||||
hi def link goReceiverType Type
|
||||
else
|
||||
@@ -444,7 +505,7 @@ if s:HighlightBuildConstraints()
|
||||
" The rs=s+2 option lets the \s*+build portion be part of the inner region
|
||||
" instead of the matchgroup so it will be highlighted as a goBuildKeyword.
|
||||
syn region goBuildComment matchgroup=goBuildCommentStart
|
||||
\ start="//\s*+build\s"rs=s+2 end="$"
|
||||
\ start="//\(\s*+build\s\|go:build\)"rs=s+2 end="$"
|
||||
\ contains=goBuildKeyword,goBuildDirectives
|
||||
hi def link goBuildCommentStart Comment
|
||||
hi def link goBuildDirectives Type
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2022 Sep 26
|
||||
" Last Change: 2022 Nov 13
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn match helpHeadline "^[-A-Z .][-A-Z0-9 .()_]*\ze\(\s\+\*\|$\)"
|
||||
syn match helpHeadline "^[A-Z.][-A-Z0-9 .,()_']*?\=\ze\(\s\+\*\|$\)"
|
||||
syn match helpSectionDelim "^===.*===$"
|
||||
syn match helpSectionDelim "^---.*--$"
|
||||
if has("conceal")
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Claudio Fleiner <claudio@fleiner.com>
|
||||
" Last Change: 2022 Jul 20
|
||||
" Last Change: 2022 Nov 18
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@@ -272,6 +272,16 @@ if main_syntax == "html"
|
||||
syn sync minlines=10
|
||||
endif
|
||||
|
||||
" Folding
|
||||
" Originally by Ingo Karkat and Marcus Zanona
|
||||
if get(g:, "html_syntax_folding", 0)
|
||||
syn region htmlFold start="<\z(\<\%(area\|base\|br\|col\|command\|embed\|hr\|img\|input\|keygen\|link\|meta\|param\|source\|track\|wbr\>\)\@![a-z-]\+\>\)\%(\_s*\_[^/]\?>\|\_s\_[^>]*\_[^>/]>\)" end="</\z1\_s*>" fold transparent keepend extend containedin=htmlHead,htmlH\d
|
||||
" fold comments (the real ones and the old Netscape ones)
|
||||
if exists("html_wrong_comments")
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>\%(\n\s*<!--\)\@!+ contains=@Spell fold
|
||||
endif
|
||||
endif
|
||||
|
||||
" The default highlighting.
|
||||
hi def link htmlTag Function
|
||||
hi def link htmlEndTag Identifier
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb>
|
||||
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
|
||||
" URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim
|
||||
" Last Change: 2020 Oct 16
|
||||
" Last Change: 2022 Nov 06
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -45,11 +45,11 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1
|
||||
syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2
|
||||
|
||||
syn region makeTarget transparent matchgroup=makeTarget
|
||||
\ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
|
||||
\ start="^[~A-Za-z0-9_./$(){}%-][A-Za-z0-9_./\t ${}()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1
|
||||
\ end="[^\\]$"
|
||||
\ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString
|
||||
\ skipnl nextGroup=makeCommands
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*&\?::\=\s*$"
|
||||
syn match makeTarget "^[~A-Za-z0-9_./$(){}%*@-][A-Za-z0-9_./\t $(){}%*@-]*&\?::\=\s*$"
|
||||
\ contains=makeIdent,makeSpecTarget,makeComment
|
||||
\ skipnl nextgroup=makeCommands,makeCommandError
|
||||
|
||||
|
||||
155
runtime/syntax/mermaid.vim
Normal file
155
runtime/syntax/mermaid.vim
Normal file
@@ -0,0 +1,155 @@
|
||||
" Vim syntax file
|
||||
" Language: Mermaid
|
||||
" Maintainer: Craig MacEahern <https://github.com/craigmac/vim-mermaid>
|
||||
" Filenames: *.mmd
|
||||
" Last Change: 2022 Nov 22
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syntax iskeyword @,48-57,192-255,$,_,-,:
|
||||
syntax keyword mermaidKeyword
|
||||
\ _blank
|
||||
\ _self
|
||||
\ _parent
|
||||
\ _top
|
||||
\ ::icon
|
||||
\ accDescr
|
||||
\ accTitle
|
||||
\ actor
|
||||
\ activate
|
||||
\ alt
|
||||
\ and
|
||||
\ as
|
||||
\ autonumber
|
||||
\ branch
|
||||
\ break
|
||||
\ callback
|
||||
\ checkout
|
||||
\ class
|
||||
\ classDef
|
||||
\ classDiagram
|
||||
\ click
|
||||
\ commit
|
||||
\ commitgitGraph
|
||||
\ critical
|
||||
\ dataFormat
|
||||
\ dateFormat
|
||||
\ deactivate
|
||||
\ direction
|
||||
\ element
|
||||
\ else
|
||||
\ end
|
||||
\ erDiagram
|
||||
\ flowchart
|
||||
\ gantt
|
||||
\ gitGraph
|
||||
\ graph
|
||||
\ journey
|
||||
\ link
|
||||
\ LR
|
||||
\ TD
|
||||
\ TB
|
||||
\ RL
|
||||
\ loop
|
||||
\ merge
|
||||
\ mindmap root
|
||||
\ Note
|
||||
\ Note right of
|
||||
\ Note left of
|
||||
\ Note over
|
||||
\ note
|
||||
\ note right of
|
||||
\ note left of
|
||||
\ note over
|
||||
\ opt
|
||||
\ option
|
||||
\ par
|
||||
\ participant
|
||||
\ pie
|
||||
\ rect
|
||||
\ requirement
|
||||
\ rgb
|
||||
\ section
|
||||
\ sequenceDiagram
|
||||
\ state
|
||||
\ stateDiagram
|
||||
\ stateDiagram-v2
|
||||
\ style
|
||||
\ subgraph
|
||||
\ title
|
||||
highlight link mermaidKeyword Keyword
|
||||
|
||||
syntax match mermaidStatement "|"
|
||||
syntax match mermaidStatement "--\?[>x)]>\?+\?-\?"
|
||||
syntax match mermaidStatement "\~\~\~"
|
||||
syntax match mermaidStatement "--"
|
||||
syntax match mermaidStatement "---"
|
||||
syntax match mermaidStatement "-->"
|
||||
syntax match mermaidStatement "-\."
|
||||
syntax match mermaidStatement "\.->"
|
||||
syntax match mermaidStatement "-\.-"
|
||||
syntax match mermaidStatement "-\.\.-"
|
||||
syntax match mermaidStatement "-\.\.\.-"
|
||||
syntax match mermaidStatement "=="
|
||||
syntax match mermaidStatement "==>"
|
||||
syntax match mermaidStatement "===>"
|
||||
syntax match mermaidStatement "====>"
|
||||
syntax match mermaidStatement "&"
|
||||
syntax match mermaidStatement "--o"
|
||||
syntax match mermaidStatement "--x"
|
||||
syntax match mermaidStatement "x--x"
|
||||
syntax match mermaidStatement "-----"
|
||||
syntax match mermaidStatement "---->"
|
||||
syntax match mermaidStatement "==="
|
||||
syntax match mermaidStatement "===="
|
||||
syntax match mermaidStatement "====="
|
||||
syntax match mermaidStatement ":::"
|
||||
syntax match mermaidStatement "<|--"
|
||||
syntax match mermaidStatement "\*--"
|
||||
syntax match mermaidStatement "o--"
|
||||
syntax match mermaidStatement "o--o"
|
||||
syntax match mermaidStatement "<--"
|
||||
syntax match mermaidStatement "<-->"
|
||||
syntax match mermaidStatement "\.\."
|
||||
syntax match mermaidStatement "<\.\."
|
||||
syntax match mermaidStatement "<|\.\."
|
||||
syntax match mermaidStatement "--|>"
|
||||
syntax match mermaidStatement "--\*"
|
||||
syntax match mermaidStatement "--o"
|
||||
syntax match mermaidStatement "\.\.>"
|
||||
syntax match mermaidStatement "\.\.|>"
|
||||
syntax match mermaidStatement "<|--|>"
|
||||
syntax match mermaidStatement "||--o{"
|
||||
highlight link mermaidStatement Statement
|
||||
|
||||
syntax match mermaidIdentifier "[\+-]\?\w\+(.*)[\$\*]\?"
|
||||
highlight link mermaidIdentifier Identifier
|
||||
|
||||
syntax match mermaidType "[\+-\#\~]\?\cint\>"
|
||||
syntax match mermaidType "[\+-\#\~]\?\cString\>"
|
||||
syntax match mermaidType "[\+-\#\~]\?\cbool\>"
|
||||
syntax match mermaidType "[\+-\#\~]\?\cBigDecimal\>"
|
||||
syntax match mermaidType "[\+-\#\~]\?\cList\~.\+\~"
|
||||
syntax match mermaidType "<<\w\+>>"
|
||||
highlight link mermaidType Type
|
||||
|
||||
syntax match mermaidComment "%%.*$"
|
||||
highlight link mermaidComment Comment
|
||||
|
||||
syntax region mermaidDirective start="%%{" end="\}%%"
|
||||
highlight link mermaidDirective PreProc
|
||||
|
||||
syntax region mermaidString start=/"/ skip=/\\"/ end=/"/
|
||||
highlight link mermaidString String
|
||||
|
||||
let b:current_syntax = "mermaid"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:set sw=2:
|
||||
@@ -2,18 +2,29 @@
|
||||
" Language: Modula-3
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Timo Pedersen <dat97tpe@ludat.lth.se>
|
||||
" Last Change: 2021 Apr 08
|
||||
" Last Change: 2022 Oct 31
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Modula-3 keywords
|
||||
syn keyword modula3Keyword ANY ARRAY AS BITS BRANDED BY CASE CONST DEFINITION
|
||||
syn keyword modula3Keyword EVAL EXIT EXCEPT EXCEPTION EXIT EXPORTS FINALLY
|
||||
syn keyword modula3Keyword FROM GENERIC IMPORT LOCK METHOD OF RAISE RAISES
|
||||
syn keyword modula3Keyword READONLY RECORD REF RETURN SET TRY TYPE TYPECASE
|
||||
syn keyword modula3Keyword UNSAFE VALUE VAR WITH
|
||||
" Whitespace errors {{{1
|
||||
if exists("modula3_space_errors")
|
||||
if !exists("modula3_no_trail_space_error")
|
||||
syn match modula3SpaceError display excludenl "\s\+$"
|
||||
endif
|
||||
if !exists("modula3_no_tab_space_error")
|
||||
syn match modula3SpaceError display " \+\t"me=e-1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Keywords {{{1
|
||||
syn keyword modula3Keyword ANY ARRAY AS BITS BRANDED BY CASE CONST
|
||||
syn keyword modula3Keyword DEFINITION EVAL EXIT EXCEPT EXCEPTION EXIT
|
||||
syn keyword modula3Keyword EXPORTS FINALLY FROM GENERIC IMPORT LOCK METHOD
|
||||
syn keyword modula3Keyword OF RAISE RAISES READONLY RECORD REF
|
||||
syn keyword modula3Keyword RETURN SET TRY TYPE TYPECASE UNSAFE
|
||||
syn keyword modula3Keyword VALUE VAR WITH
|
||||
|
||||
syn match modula3keyword "\<UNTRACED\>"
|
||||
|
||||
@@ -22,44 +33,71 @@ syn keyword modula3Block PROCEDURE FUNCTION MODULE INTERFACE REPEAT THEN
|
||||
syn keyword modula3Block BEGIN END OBJECT METHODS OVERRIDES RECORD REVEAL
|
||||
syn keyword modula3Block WHILE UNTIL DO TO IF FOR ELSIF ELSE LOOP
|
||||
|
||||
" Reserved identifiers
|
||||
" Reserved identifiers {{{1
|
||||
syn keyword modula3Identifier ABS ADR ADRSIZE BITSIZE BYTESIZE CEILING DEC
|
||||
syn keyword modula3Identifier DISPOSE FIRST FLOAT FLOOR INC ISTYPE LAST
|
||||
syn keyword modula3Identifier LOOPHOLE MAX MIN NARROW NEW NUMBER ORD ROUND
|
||||
syn keyword modula3Identifier SUBARRAY TRUNC TYPECODE VAL
|
||||
|
||||
" Predefined types
|
||||
" Predefined types {{{1
|
||||
syn keyword modula3Type ADDRESS BOOLEAN CARDINAL CHAR EXTENDED INTEGER
|
||||
syn keyword modula3Type LONGCARD LONGINT LONGREAL MUTEX NULL REAL REFANY TEXT
|
||||
syn keyword modula3Type WIDECHAR
|
||||
|
||||
syn match modula3Type "\<\%(UNTRACED\s\+\)\=ROOT\>"
|
||||
|
||||
" Operators
|
||||
syn keyword modulaOperator DIV MOD IN AND OR NOT
|
||||
" Operators {{{1
|
||||
syn keyword modula3Operator DIV MOD
|
||||
syn keyword modula3Operator IN
|
||||
syn keyword modula3Operator NOT AND OR
|
||||
|
||||
" TODO: exclude = from declarations
|
||||
if exists("modula3_operators")
|
||||
syn match modula3Operator "\^"
|
||||
syn match modula3Operator "+\|-\|\*\|/\|&"
|
||||
" TODO: need to exclude = in procedure definitions
|
||||
syn match modula3Operator "<=\|<\|>=\|>\|:\@<!=\|#"
|
||||
syn match modula3Operator "[-+/*]"
|
||||
syn match modula3Operator "&"
|
||||
syn match modula3Operator "<=\|<:\@!\|>=\|>"
|
||||
syn match modula3Operator ":\@<!=\|#"
|
||||
endif
|
||||
|
||||
" Literals {{{1
|
||||
|
||||
" Booleans
|
||||
syn keyword modula3Boolean TRUE FALSE
|
||||
|
||||
" Nil
|
||||
syn keyword modula3Nil NIL
|
||||
|
||||
" Integers
|
||||
syn match modula3Integer "\<\d\+L\=\>"
|
||||
syn match modula3Integer "\<\d\d\=_\x\+L\=\>"
|
||||
" Numbers {{{2
|
||||
|
||||
" Reals
|
||||
syn match modula3Real "\c\<\d\+\.\d\+\%([EDX][+-]\=\d\+\)\=\>"
|
||||
" NOTE: Negated numbers are constant expressions not literals
|
||||
|
||||
syn case ignore
|
||||
|
||||
" Integers
|
||||
|
||||
syn match modula3Integer "\<\d\+L\=\>"
|
||||
|
||||
if exists("modula3_number_errors")
|
||||
syn match modula3IntegerError "\<\d\d\=_\x\+L\=\>"
|
||||
endif
|
||||
|
||||
let s:digits = "0123456789ABCDEF"
|
||||
for s:radix in range(2, 16)
|
||||
exe $'syn match modula3Integer "\<{s:radix}_[{s:digits[:s:radix - 1]}]\+L\=\>"'
|
||||
endfor
|
||||
unlet s:digits s:radix
|
||||
|
||||
" Reals
|
||||
syn match modula3Real "\<\d\+\.\d\+\%([EDX][+-]\=\d\+\)\=\>"
|
||||
|
||||
syn case match
|
||||
|
||||
" Strings and characters {{{2
|
||||
|
||||
" String escape sequences
|
||||
syn match modula3Escape "\\['"ntrf]" contained display
|
||||
" TODO: limit to <= 377 (255)
|
||||
syn match modula3Escape "\\\o\{3}" contained display
|
||||
syn match modula3Escape "\\\\" contained display
|
||||
|
||||
@@ -69,13 +107,23 @@ syn match modula3Character "'\%([^']\|\\.\|\\\o\{3}\)'" contains=modula3Escape
|
||||
" Strings
|
||||
syn region modula3String start=+"+ end=+"+ contains=modula3Escape
|
||||
|
||||
" Pragmas
|
||||
" Pragmas {{{1
|
||||
" EXTERNAL INLINE ASSERT TRACE FATAL UNUSED OBSOLETE CALLBACK EXPORTED PRAGMA NOWARN LINE LL LL.sup SPEC
|
||||
" Documented: INLINE ASSERT TRACE FATAL UNUSED OBSOLETE NOWARN
|
||||
syn region modula3Pragma start="<\*" end="\*>"
|
||||
|
||||
" Comments
|
||||
syn region modula3Comment start="(\*" end="\*)" contains=modula3Comment,@Spell
|
||||
" Comments {{{1
|
||||
if !exists("modula3_no_comment_fold")
|
||||
syn region modula3Comment start="(\*" end="\*)" contains=modula3Comment,@Spell fold
|
||||
syn region modula3LineCommentBlock start="^\s*(\*.*\*)\s*\n\%(^\s*(\*.*\*)\s*$\)\@=" end="^\s*(\*.*\*)\s*\n\%(^\s*(\*.*\*)\s*$\)\@!" contains=modula3Comment transparent fold keepend
|
||||
else
|
||||
syn region modula3Comment start="(\*" end="\*)" contains=modula3Comment,@Spell
|
||||
endif
|
||||
|
||||
" Default highlighting
|
||||
" Syncing "{{{1
|
||||
syn sync minlines=100
|
||||
|
||||
" Default highlighting {{{1
|
||||
hi def link modula3Block Statement
|
||||
hi def link modula3Boolean Boolean
|
||||
hi def link modula3Character Character
|
||||
@@ -85,12 +133,13 @@ hi def link modula3Identifier Keyword
|
||||
hi def link modula3Integer Number
|
||||
hi def link modula3Keyword Statement
|
||||
hi def link modula3Nil Constant
|
||||
hi def link modula3IntegerError Error
|
||||
hi def link modula3Operator Operator
|
||||
hi def link modula3Pragma PreProc
|
||||
hi def link modula3Real Float
|
||||
hi def link modula3String String
|
||||
hi def link modula3Type Type
|
||||
hi def link modula3Type Type "}}}
|
||||
|
||||
let b:current_syntax = "modula3"
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:
|
||||
|
||||
210
runtime/syntax/nix.vim
Normal file
210
runtime/syntax/nix.vim
Normal file
@@ -0,0 +1,210 @@
|
||||
" Vim syntax file
|
||||
" Language: Nix
|
||||
" Maintainer: James Fleming <james@electronic-quill.net>
|
||||
" Original Author: Daiderd Jordan <daiderd@gmail.com>
|
||||
" Acknowledgement: Based on vim-nix maintained by Daiderd Jordan <daiderd@gmail.com>
|
||||
" https://github.com/LnL7/vim-nix
|
||||
" License: MIT
|
||||
" Last Change: 2022 Dec 06
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn keyword nixBoolean true false
|
||||
syn keyword nixNull null
|
||||
syn keyword nixRecKeyword rec
|
||||
|
||||
syn keyword nixOperator or
|
||||
syn match nixOperator '!=\|!'
|
||||
syn match nixOperator '<=\?'
|
||||
syn match nixOperator '>=\?'
|
||||
syn match nixOperator '&&'
|
||||
syn match nixOperator '//\='
|
||||
syn match nixOperator '=='
|
||||
syn match nixOperator '?'
|
||||
syn match nixOperator '||'
|
||||
syn match nixOperator '++\='
|
||||
syn match nixOperator '-'
|
||||
syn match nixOperator '\*'
|
||||
syn match nixOperator '->'
|
||||
|
||||
syn match nixParen '[()]'
|
||||
syn match nixInteger '\d\+'
|
||||
|
||||
syn keyword nixTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
||||
syn match nixComment '#.*' contains=nixTodo,@Spell
|
||||
syn region nixComment start=+/\*+ end=+\*/+ contains=nixTodo,@Spell
|
||||
|
||||
syn region nixInterpolation matchgroup=nixInterpolationDelimiter start="\${" end="}" contained contains=@nixExpr,nixInterpolationParam
|
||||
|
||||
syn match nixSimpleStringSpecial /\\\%([nrt"\\$]\|$\)/ contained
|
||||
syn match nixStringSpecial /''['$]/ contained
|
||||
syn match nixStringSpecial /\$\$/ contained
|
||||
syn match nixStringSpecial /''\\[nrt]/ contained
|
||||
|
||||
syn match nixSimpleStringSpecial /\$\$/ contained
|
||||
|
||||
syn match nixInvalidSimpleStringEscape /\\[^nrt"\\$]/ contained
|
||||
syn match nixInvalidStringEscape /''\\[^nrt]/ contained
|
||||
|
||||
syn region nixSimpleString matchgroup=nixStringDelimiter start=+"+ skip=+\\"+ end=+"+ contains=nixInterpolation,nixSimpleStringSpecial,nixInvalidSimpleStringEscape
|
||||
syn region nixString matchgroup=nixStringDelimiter start=+''+ skip=+''['$\\]+ end=+''+ contains=nixInterpolation,nixStringSpecial,nixInvalidStringEscape
|
||||
|
||||
syn match nixFunctionCall "[a-zA-Z_][a-zA-Z0-9_'-]*"
|
||||
|
||||
syn match nixPath "[a-zA-Z0-9._+-]*\%(/[a-zA-Z0-9._+-]\+\)\+"
|
||||
syn match nixHomePath "\~\%(/[a-zA-Z0-9._+-]\+\)\+"
|
||||
syn match nixSearchPath "[a-zA-Z0-9._+-]\+\%(\/[a-zA-Z0-9._+-]\+\)*" contained
|
||||
syn match nixPathDelimiter "[<>]" contained
|
||||
syn match nixSearchPathRef "<[a-zA-Z0-9._+-]\+\%(\/[a-zA-Z0-9._+-]\+\)*>" contains=nixSearchPath,nixPathDelimiter
|
||||
syn match nixURI "[a-zA-Z][a-zA-Z0-9.+-]*:[a-zA-Z0-9%/?:@&=$,_.!~*'+-]\+"
|
||||
|
||||
syn match nixAttributeDot "\." contained
|
||||
syn match nixAttribute "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%([^a-zA-Z0-9_'.-]\|$\)" contained
|
||||
syn region nixAttributeAssignment start="=" end="\ze;" contained contains=@nixExpr
|
||||
syn region nixAttributeDefinition start=/\ze[a-zA-Z_"$]/ end=";" contained contains=nixComment,nixAttribute,nixInterpolation,nixSimpleString,nixAttributeDot,nixAttributeAssignment
|
||||
|
||||
syn region nixInheritAttributeScope start="(" end="\ze)" contained contains=@nixExpr
|
||||
syn region nixAttributeDefinition matchgroup=nixInherit start="\<inherit\>" end=";" contained contains=nixComment,nixInheritAttributeScope,nixAttribute
|
||||
|
||||
syn region nixAttributeSet start="{" end="}" contains=nixComment,nixAttributeDefinition
|
||||
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn region nixArgumentDefinitionWithDefault matchgroup=nixArgumentDefinition start="[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*?\@=" matchgroup=NONE end="[,}]\@=" transparent contained contains=@nixExpr
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn match nixArgumentDefinition "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[,}]\@=" contained
|
||||
syn match nixArgumentEllipsis "\.\.\." contained
|
||||
syn match nixArgumentSeparator "," contained
|
||||
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn match nixArgOperator '@\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*:'he=s+1 contained contains=nixAttribute
|
||||
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn match nixArgOperator '[a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*@'hs=e-1 contains=nixAttribute nextgroup=nixFunctionArgument
|
||||
|
||||
" This is a bit more complicated, because function arguments can be passed in a
|
||||
" very similar form on how attribute sets are defined and two regions with the
|
||||
" same start patterns will shadow each other. Instead of a region we could use a
|
||||
" match on {\_.\{-\}}, which unfortunately doesn't take nesting into account.
|
||||
"
|
||||
" So what we do instead is that we look forward until we are sure that it's a
|
||||
" function argument. Unfortunately, we need to catch comments and both vertical
|
||||
" and horizontal white space, which the following regex should hopefully do:
|
||||
"
|
||||
" "\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*"
|
||||
"
|
||||
" It is also used throught the whole file and is marked with 'v's as well.
|
||||
"
|
||||
" Fortunately the matching rules for function arguments are much simpler than
|
||||
" for real attribute sets, because we can stop when we hit the first ellipsis or
|
||||
" default value operator, but we also need to paste the "whitespace & comments
|
||||
" eating" regex all over the place (marked with 'v's):
|
||||
"
|
||||
" Region match 1: { foo ? ... } or { foo, ... } or { ... } (ellipsis)
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv {----- identifier -----}vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn region nixFunctionArgument start="{\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*\%([a-zA-Z_][a-zA-Z0-9_'-]*\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[,?}]\|\.\.\.\)" end="}" contains=nixComment,nixArgumentDefinitionWithDefault,nixArgumentDefinition,nixArgumentEllipsis,nixArgumentSeparator nextgroup=nixArgOperator
|
||||
|
||||
" Now it gets more tricky, because we need to look forward for the colon, but
|
||||
" there could be something like "{}@foo:", even though it's highly unlikely.
|
||||
"
|
||||
" Region match 2: {}
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv@vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv{----- identifier -----} vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn region nixFunctionArgument start="{\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*}\%(\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*@\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*[a-zA-Z_][a-zA-Z0-9_'-]*\)\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*:" end="}" contains=nixComment nextgroup=nixArgOperator
|
||||
|
||||
" vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||
syn match nixSimpleFunctionArgument "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%(\s\|#.\{-\}\n\|\n\|/\*\_.\{-\}\*/\)*:\([\n ]\)\@="
|
||||
|
||||
syn region nixList matchgroup=nixListBracket start="\[" end="\]" contains=@nixExpr
|
||||
|
||||
syn region nixLetExpr matchgroup=nixLetExprKeyword start="\<let\>" end="\<in\>" contains=nixComment,nixAttributeDefinition
|
||||
|
||||
syn keyword nixIfExprKeyword then contained
|
||||
syn region nixIfExpr matchgroup=nixIfExprKeyword start="\<if\>" end="\<else\>" contains=@nixExpr,nixIfExprKeyword
|
||||
|
||||
syn region nixWithExpr matchgroup=nixWithExprKeyword start="\<with\>" matchgroup=NONE end=";" contains=@nixExpr
|
||||
|
||||
syn region nixAssertExpr matchgroup=nixAssertKeyword start="\<assert\>" matchgroup=NONE end=";" contains=@nixExpr
|
||||
|
||||
syn cluster nixExpr contains=nixBoolean,nixNull,nixOperator,nixParen,nixInteger,nixRecKeyword,nixConditional,nixBuiltin,nixSimpleBuiltin,nixComment,nixFunctionCall,nixFunctionArgument,nixArgOperator,nixSimpleFunctionArgument,nixPath,nixHomePath,nixSearchPathRef,nixURI,nixAttributeSet,nixList,nixSimpleString,nixString,nixLetExpr,nixIfExpr,nixWithExpr,nixAssertExpr,nixInterpolation
|
||||
|
||||
" These definitions override @nixExpr and have to come afterwards:
|
||||
|
||||
syn match nixInterpolationParam "[a-zA-Z_][a-zA-Z0-9_'-]*\%(\.[a-zA-Z_][a-zA-Z0-9_'-]*\)*" contained
|
||||
|
||||
" Non-namespaced Nix builtins as of version 2.0:
|
||||
syn keyword nixSimpleBuiltin
|
||||
\ abort baseNameOf derivation derivationStrict dirOf fetchGit
|
||||
\ fetchMercurial fetchTarball import isNull map mapAttrs placeholder removeAttrs
|
||||
\ scopedImport throw toString
|
||||
|
||||
|
||||
" Namespaced and non-namespaced Nix builtins as of version 2.0:
|
||||
syn keyword nixNamespacedBuiltin contained
|
||||
\ abort add addErrorContext all any attrNames attrValues baseNameOf
|
||||
\ catAttrs compareVersions concatLists concatStringsSep currentSystem
|
||||
\ currentTime deepSeq derivation derivationStrict dirOf div elem elemAt
|
||||
\ fetchGit fetchMercurial fetchTarball fetchurl filter \ filterSource
|
||||
\ findFile foldl' fromJSON functionArgs genList \ genericClosure getAttr
|
||||
\ getEnv hasAttr hasContext hashString head import intersectAttrs isAttrs
|
||||
\ isBool isFloat isFunction isInt isList isNull isString langVersion
|
||||
\ length lessThan listToAttrs map mapAttrs match mul nixPath nixVersion
|
||||
\ parseDrvName partition path pathExists placeholder readDir readFile
|
||||
\ removeAttrs replaceStrings scopedImport seq sort split splitVersion
|
||||
\ storeDir storePath stringLength sub substring tail throw toFile toJSON
|
||||
\ toPath toString toXML trace tryEval typeOf unsafeDiscardOutputDependency
|
||||
\ unsafeDiscardStringContext unsafeGetAttrPos valueSize fromTOML bitAnd
|
||||
\ bitOr bitXor floor ceil
|
||||
|
||||
syn match nixBuiltin "builtins\.[a-zA-Z']\+"he=s+9 contains=nixComment,nixNamespacedBuiltin
|
||||
|
||||
hi def link nixArgOperator Operator
|
||||
hi def link nixArgumentDefinition Identifier
|
||||
hi def link nixArgumentEllipsis Operator
|
||||
hi def link nixAssertKeyword Keyword
|
||||
hi def link nixAttribute Identifier
|
||||
hi def link nixAttributeDot Operator
|
||||
hi def link nixBoolean Boolean
|
||||
hi def link nixBuiltin Special
|
||||
hi def link nixComment Comment
|
||||
hi def link nixConditional Conditional
|
||||
hi def link nixHomePath Include
|
||||
hi def link nixIfExprKeyword Keyword
|
||||
hi def link nixInherit Keyword
|
||||
hi def link nixInteger Integer
|
||||
hi def link nixInterpolation Macro
|
||||
hi def link nixInterpolationDelimiter Delimiter
|
||||
hi def link nixInterpolationParam Macro
|
||||
hi def link nixInvalidSimpleStringEscape Error
|
||||
hi def link nixInvalidStringEscape Error
|
||||
hi def link nixLetExprKeyword Keyword
|
||||
hi def link nixNamespacedBuiltin Special
|
||||
hi def link nixNull Constant
|
||||
hi def link nixOperator Operator
|
||||
hi def link nixPath Include
|
||||
hi def link nixPathDelimiter Delimiter
|
||||
hi def link nixRecKeyword Keyword
|
||||
hi def link nixSearchPath Include
|
||||
hi def link nixSimpleBuiltin Keyword
|
||||
hi def link nixSimpleFunctionArgument Identifier
|
||||
hi def link nixSimpleString String
|
||||
hi def link nixSimpleStringSpecial SpecialChar
|
||||
hi def link nixString String
|
||||
hi def link nixStringDelimiter Delimiter
|
||||
hi def link nixStringSpecial Special
|
||||
hi def link nixTodo Todo
|
||||
hi def link nixURI Include
|
||||
hi def link nixWithExprKeyword Keyword
|
||||
|
||||
" This could lead up to slow syntax highlighting for large files, but usually
|
||||
" large files such as all-packages.nix are one large attribute set, so if we'd
|
||||
" use sync patterns we'd have to go back to the start of the file anyway
|
||||
syn sync fromstart
|
||||
|
||||
let b:current_syntax = "nix"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Ken Takata
|
||||
" URL: https://github.com/k-takata/vim-nsis
|
||||
" Previous Maintainer: Alex Jakushev <Alex.Jakushev@kemek.lt>
|
||||
" Last Change: 2020-10-18
|
||||
" Last Change: 2022-11-05
|
||||
|
||||
" quit when a syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -394,9 +394,13 @@ syn keyword nsisInstruction contained CreateShortcut nextgroup=nsisCreateShortcu
|
||||
syn region nsisCreateShortcutOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisCreateShortcutKwd
|
||||
syn match nsisCreateShortcutKwd contained "/NoWorkingDir\>"
|
||||
|
||||
syn keyword nsisInstruction contained GetWinVer nextgroup=nsisGetWinVerOpt skipwhite
|
||||
syn region nsisGetWinVerOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetWinVerKwd
|
||||
syn keyword nsisGetWinVerKwd contained Major Minor Build ServicePack
|
||||
|
||||
syn keyword nsisInstruction contained GetDLLVersion GetDLLVersionLocal nextgroup=nsisGetDLLVersionOpt skipwhite
|
||||
syn region nsisGetDLLVersionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetDLLVersionKwd
|
||||
syn match nsisGetDLLVersionKwd contained "/ProductVersion\>"
|
||||
syn region nsisGetDLLVersionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetDLLVersionKwd
|
||||
syn match nsisGetDLLVersionKwd contained "/ProductVersion\>"
|
||||
|
||||
syn keyword nsisInstruction contained GetFullPathName nextgroup=nsisGetFullPathNameOpt skipwhite
|
||||
syn region nsisGetFullPathNameOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisGetFullPathNameKwd
|
||||
@@ -562,10 +566,19 @@ syn match nsisSystem contained "!execute\>"
|
||||
syn match nsisSystem contained "!makensis\>"
|
||||
syn match nsisSystem contained "!packhdr\>"
|
||||
syn match nsisSystem contained "!finalize\>"
|
||||
syn match nsisSystem contained "!uninstfinalize\>"
|
||||
syn match nsisSystem contained "!system\>"
|
||||
syn match nsisSystem contained "!tempfile\>"
|
||||
syn match nsisSystem contained "!getdllversion\>"
|
||||
syn match nsisSystem contained "!gettlbversion\>"
|
||||
|
||||
" Add 'P' to avoid conflicts with nsisGetDLLVersionOpt. ('P' for preprocessor.)
|
||||
syn match nsisSystem contained "!getdllversion\>" nextgroup=nsisPGetdllversionOpt skipwhite
|
||||
syn region nsisPGetdllversionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPGetdllversionKwd
|
||||
syn match nsisPGetdllversionKwd contained "/\%(noerrors\|packed\|productversion\)\>"
|
||||
|
||||
syn match nsisSystem contained "!gettlbversion\>" nextgroup=nsisPGettlbversionOpt skipwhite
|
||||
syn region nsisPGettlbversionOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisPGettlbversionKwd
|
||||
syn match nsisPGettlbversionKwd contained "/\%(noerrors\|packed\)\>"
|
||||
|
||||
syn match nsisSystem contained "!warning\>"
|
||||
|
||||
syn match nsisSystem contained "!pragma\>" nextgroup=nsisPragmaOpt skipwhite
|
||||
@@ -581,7 +594,10 @@ syn match nsisDefine contained "!define\>" nextgroup=nsisDefineOpt skipwhite
|
||||
syn region nsisDefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisDefineKwd
|
||||
syn match nsisDefineKwd contained "/\%(ifndef\|redef\|date\|utcdate\|file\|intfmt\|math\)\>"
|
||||
|
||||
syn match nsisDefine contained "!undef\>"
|
||||
syn match nsisDefine contained "!undef\>" nextgroup=nsisUndefineOpt skipwhite
|
||||
syn region nsisUndefineOpt contained start="" end="$" transparent keepend contains=@nsisAnyOpt,nsisUndefineKwd
|
||||
syn match nsisUndefineKwd contained "/noerrors\>"
|
||||
|
||||
syn match nsisPreCondit contained "!ifdef\>"
|
||||
syn match nsisPreCondit contained "!ifndef\>"
|
||||
|
||||
@@ -659,6 +675,7 @@ hi def link nsisWriteRegMultiStrKwd Constant
|
||||
hi def link nsisSetRegViewKwd Constant
|
||||
hi def link nsisCopyFilesKwd Constant
|
||||
hi def link nsisCreateShortcutKwd Constant
|
||||
hi def link nsisGetWinVerKwd Constant
|
||||
hi def link nsisGetDLLVersionKwd Constant
|
||||
hi def link nsisGetFullPathNameKwd Constant
|
||||
hi def link nsisFileAttrib Constant
|
||||
@@ -696,9 +713,12 @@ hi def link nsisIncludeKwd Constant
|
||||
hi def link nsisAddplugindirKwd Constant
|
||||
hi def link nsisAppendfileKwd Constant
|
||||
hi def link nsisDelfileKwd Constant
|
||||
hi def link nsisPGetdllversionKwd Constant
|
||||
hi def link nsisPGettlbversionKwd Constant
|
||||
hi def link nsisPragmaKwd Constant
|
||||
hi def link nsisVerboseKwd Constant
|
||||
hi def link nsisDefineKwd Constant
|
||||
hi def link nsisUndefineKwd Constant
|
||||
hi def link nsisIfKwd Constant
|
||||
hi def link nsisSearchparseKwd Constant
|
||||
hi def link nsisSearchreplaceKwd Constant
|
||||
|
||||
3360
runtime/syntax/obse.vim
Normal file
3360
runtime/syntax/obse.vim
Normal file
File diff suppressed because it is too large
Load Diff
72
runtime/syntax/openvpn.vim
Normal file
72
runtime/syntax/openvpn.vim
Normal file
@@ -0,0 +1,72 @@
|
||||
" Vim syntax file
|
||||
" Language: OpenVPN
|
||||
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||
" Filenames: *.ovpn
|
||||
" Last Change: 2022 Oct 16
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
" Options
|
||||
syntax match openvpnOption /^[a-z-]\+/
|
||||
\ skipwhite nextgroup=openvpnArgList
|
||||
syntax match openvpnArgList /.*$/ transparent contained
|
||||
\ contains=openvpnArgument,openvpnNumber,
|
||||
\ openvpnIPv4Address,openvpnIPv6Address,
|
||||
\ openvpnSignal,openvpnComment
|
||||
|
||||
" Arguments
|
||||
syntax match openvpnArgument /[^\\"' \t]\+/
|
||||
\ contained contains=openvpnEscape
|
||||
syntax region openvpnArgument matchgroup=openvpnQuote
|
||||
\ start=/"/ skip=/\\"/ end=/"/
|
||||
\ oneline contained contains=openvpnEscape
|
||||
syntax region openvpnArgument matchgroup=openvpnQuote
|
||||
\ start=/'/ skip=/\\'/ end=/'/
|
||||
\ oneline contained
|
||||
syntax match openvpnEscape /\\[\\" \t]/ contained
|
||||
|
||||
" Numbers
|
||||
syntax match openvpnNumber /\<[1-9][0-9]*\(\.[0-9]\+\)\?\>/ contained
|
||||
|
||||
" Signals
|
||||
syntax match openvpnSignal /SIG\(HUP\|INT\|TERM\|USER[12]\)/ contained
|
||||
|
||||
" IP addresses
|
||||
syntax match openvpnIPv4Address /\(\d\{1,3}\.\)\{3}\d\{1,3}/
|
||||
\ contained nextgroup=openvpnSlash
|
||||
syntax match openvpnIPv6Address /\([A-F0-9]\{1,4}:\)\{7}\[A-F0-9]\{1,4}/
|
||||
\ contained nextgroup=openvpnSlash
|
||||
syntax match openvpnSlash "/" contained
|
||||
\ nextgroup=openvpnIPv4Address,openvpnIPv6Address,openvpnNumber
|
||||
|
||||
" Inline files
|
||||
syntax region openvpnInline matchgroup=openvpnTag
|
||||
\ start=+^<\z([a-z-]\+\)>+ end=+^</\z1>+
|
||||
|
||||
" Comments
|
||||
syntax keyword openvpnTodo contained TODO FIXME NOTE XXX
|
||||
syntax match openvpnComment /^[;#].*$/ contains=openvpnTodo
|
||||
syntax match openvpnComment /\s\+\zs[;#].*$/ contains=openvpnTodo
|
||||
|
||||
hi def link openvpnArgument String
|
||||
hi def link openvpnComment Comment
|
||||
hi def link openvpnEscape SpecialChar
|
||||
hi def link openvpnIPv4Address Constant
|
||||
hi def link openvpnIPv6Address Constant
|
||||
hi def link openvpnNumber Number
|
||||
hi def link openvpnOption Keyword
|
||||
hi def link openvpnQuote Quote
|
||||
hi def link openvpnSignal Special
|
||||
hi def link openvpnSlash Delimiter
|
||||
hi def link openvpnTag Tag
|
||||
hi def link openvpnTodo Todo
|
||||
|
||||
let b:current_syntax = 'openvpn'
|
||||
|
||||
let &cpoptions = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -53,7 +53,7 @@ syn match ptcapNumberError "#0x\x*[^[:xdigit:]:\\]"lc=1 contained
|
||||
" The `=' operator assigns a string to the preceding flag
|
||||
syn match ptcapOperator "[@#=]" contained
|
||||
|
||||
" Some terminal capabilites have special names like `#5' and `@1', and we
|
||||
" Some terminal capabilities have special names like `#5' and `@1', and we
|
||||
" need special rules to match these properly
|
||||
syn match ptcapSpecialCap "\W[#@]\d" contains=ptcapDelimiter contained
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: rego policy language
|
||||
" Maintainer: Matt Dunford (zenmatic@gmail.com)
|
||||
" URL: https://github.com/zenmatic/vim-syntax-rego
|
||||
" Last Change: 2019 Dec 12
|
||||
" Last Change: 2022 Dec 4
|
||||
|
||||
" https://www.openpolicyagent.org/docs/latest/policy-language/
|
||||
|
||||
@@ -14,36 +14,56 @@ endif
|
||||
syn case match
|
||||
|
||||
syn keyword regoDirective package import allow deny
|
||||
syn keyword regoKeywords as default else false not null true with some
|
||||
syn keyword regoKeywords as default else every false if import package not null true with some in print
|
||||
|
||||
syn keyword regoFuncAggregates count sum product max min sort all any
|
||||
syn match regoFuncArrays "\<array\.\(concat\|slice\)\>"
|
||||
syn match regoFuncArrays "\<array\.\(concat\|slice\|reverse\)\>"
|
||||
syn keyword regoFuncSets intersection union
|
||||
|
||||
syn keyword regoFuncStrings concat /\<contains\>/ endswith format_int indexof lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper
|
||||
syn match regoFuncStrings2 "\<strings\.replace_n\>"
|
||||
syn keyword regoFuncStrings concat /\<contains\>/ endswith format_int indexof indexof_n lower replace split sprintf startswith substring trim trim_left trim_prefix trim_right trim_suffix trim_space upper
|
||||
syn match regoFuncStrings2 "\<strings\.\(replace_n\|reverse\|any_prefix_match\|any_suffix_match\)\>"
|
||||
syn match regoFuncStrings3 "\<contains\>"
|
||||
|
||||
syn keyword regoFuncRegex re_match
|
||||
syn match regoFuncRegex2 "\<regex\.\(split\|globs_match\|template_match\|find_n\|find_all_string_submatch_n\)\>"
|
||||
syn match regoFuncRegex2 "\<regex\.\(is_valid\|split\|globs_match\|template_match\|find_n\|find_all_string_submatch_n\|replace\)\>"
|
||||
|
||||
syn match regoFuncUuid "\<uuid.rfc4122\>"
|
||||
syn match regoFuncBits "\<bits\.\(or\|and\|negate\|xor\|lsh\|rsh\)\>"
|
||||
syn match regoFuncObject "\<object\.\(get\|remove\|subset\|union\|union_n\|filter\)\>"
|
||||
syn match regoFuncGlob "\<glob\.\(match\|quote_meta\)\>"
|
||||
syn match regoFuncUnits "\<units\.parse_bytes\>"
|
||||
syn match regoFuncUnits "\<units\.parse\(_bytes\)\=\>"
|
||||
syn keyword regoFuncTypes is_number is_string is_boolean is_array is_set is_object is_null type_name
|
||||
syn match regoFuncEncoding1 "\<\(base64\|base64url\)\.\(encode\|decode\)\>"
|
||||
syn match regoFuncEncoding2 "\<urlquery\.\(encode\|decode\|encode_object\)\>"
|
||||
syn match regoFuncEncoding3 "\<\(json\|yaml\)\.\(marshal\|unmarshal\)\>"
|
||||
syn match regoFuncEncoding1 "\<base64\.\(encode\|decode\|is_valid\)\>"
|
||||
syn match regoFuncEncoding2 "\<base64url\.\(encode\(_no_pad\)\=\|decode\)\>"
|
||||
syn match regoFuncEncoding3 "\<urlquery\.\(encode\|decode\|\(en\|de\)code_object\)\>"
|
||||
syn match regoFuncEncoding4 "\<\(json\|yaml\)\.\(is_valid\|marshal\|unmarshal\)\>"
|
||||
syn match regoFuncEncoding5 "\<json\.\(filter\|patch\|remove\)\>"
|
||||
syn match regoFuncTokenSigning "\<io\.jwt\.\(encode_sign_raw\|encode_sign\)\>"
|
||||
syn match regoFuncTokenVerification "\<io\.jwt\.\(verify_rs256\|verify_ps256\|verify_es256\|verify_hs256\|decode\|decode_verify\)\>"
|
||||
syn match regoFuncTime "\<time\.\(now_ns\|parse_ns\|parse_rfc3339_ns\|parse_duration_ns\|date\|clock\|weekday\)\>"
|
||||
syn match regoFuncCryptography "\<crypto\.x509\.parse_certificates\>"
|
||||
syn match regoFuncTokenVerification1 "\<io\.jwt\.\(decode\|decode_verify\)\>"
|
||||
syn match regoFuncTokenVerification2 "\<io\.jwt\.verify_\(rs\|ps\|es\|hs\)\(256\|384\|512\)\>"
|
||||
syn match regoFuncTime "\<time\.\(now_ns\|parse_ns\|parse_rfc3339_ns\|parse_duration_ns\|date\|clock\|weekday\|diff\|add_date\)\>"
|
||||
syn match regoFuncCryptography "\<crypto\.x509\.\(parse_certificates\|parse_certificate_request\|parse_and_verify_certificates\|parse_rsa_private_key\)\>"
|
||||
syn match regoFuncCryptography "\<crypto\.\(md5\|sha1\|sha256\)"
|
||||
syn match regoFuncCryptography "\<crypto\.hmac\.\(md5\|sha1\|sha256\|sha512\)"
|
||||
syn keyword regoFuncGraphs walk
|
||||
syn match regoFuncGraphs2 "\<graph\.reachable\(_paths\)\=\>"
|
||||
syn match regoFuncGraphQl "\<graphql\.\(\(schema_\)\=is_valid\|parse\(_\(and_verify\|query\|schema\)\)\=\)\>"
|
||||
syn match regoFuncHttp "\<http\.send\>"
|
||||
syn match regoFuncNet "\<net\.\(cidr_contains\|cidr_intersects\)\>"
|
||||
syn match regoFuncRego "\<rego\.parse_module\>"
|
||||
syn match regoFuncNet "\<net\.\(cidr_merge\|cidr_contains\|cidr_contains_matches\|cidr_intersects\|cidr_expand\|lookup_ip_addr\|cidr_is_valid\)\>"
|
||||
syn match regoFuncRego "\<rego\.\(parse_module\|metadata\.\(rule\|chain\)\)\>"
|
||||
syn match regoFuncOpa "\<opa\.runtime\>"
|
||||
syn keyword regoFuncDebugging trace
|
||||
syn match regoFuncRand "\<rand\.intn\>"
|
||||
|
||||
syn match regoFuncNumbers "\<numbers\.\(range\|intn\)\>"
|
||||
syn keyword regoFuncNumbers round ceil floor abs
|
||||
|
||||
syn match regoFuncSemver "\<semver\.\(is_valid\|compare\)\>"
|
||||
syn keyword regoFuncConversions to_number
|
||||
syn match regoFuncHex "\<hex\.\(encode\|decode\)\>"
|
||||
|
||||
hi def link regoFuncUuid Statement
|
||||
hi def link regoFuncBits Statement
|
||||
hi def link regoDirective Statement
|
||||
hi def link regoKeywords Statement
|
||||
hi def link regoFuncAggregates Statement
|
||||
@@ -60,16 +80,27 @@ hi def link regoFuncTypes Statement
|
||||
hi def link regoFuncEncoding1 Statement
|
||||
hi def link regoFuncEncoding2 Statement
|
||||
hi def link regoFuncEncoding3 Statement
|
||||
hi def link regoFuncEncoding4 Statement
|
||||
hi def link regoFuncEncoding5 Statement
|
||||
hi def link regoFuncTokenSigning Statement
|
||||
hi def link regoFuncTokenVerification Statement
|
||||
hi def link regoFuncTokenVerification1 Statement
|
||||
hi def link regoFuncTokenVerification2 Statement
|
||||
hi def link regoFuncTime Statement
|
||||
hi def link regoFuncCryptography Statement
|
||||
hi def link regoFuncGraphs Statement
|
||||
hi def link regoFuncGraphQl Statement
|
||||
hi def link regoFuncGraphs2 Statement
|
||||
hi def link regoFuncHttp Statement
|
||||
hi def link regoFuncNet Statement
|
||||
hi def link regoFuncRego Statement
|
||||
hi def link regoFuncOpa Statement
|
||||
hi def link regoFuncDebugging Statement
|
||||
hi def link regoFuncObject Statement
|
||||
hi def link regoFuncNumbers Statement
|
||||
hi def link regoFuncSemver Statement
|
||||
hi def link regoFuncConversions Statement
|
||||
hi def link regoFuncHex Statement
|
||||
hi def link regoFuncRand Statement
|
||||
|
||||
" https://www.openpolicyagent.org/docs/latest/policy-language/#strings
|
||||
syn region regoString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: shell (sh) Korn shell (ksh) bash (sh)
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Previous Maintainer: Lennart Schultz <Lennart.Schultz@ecmwf.int>
|
||||
" Last Change: Jul 08, 2022
|
||||
" Version: 203
|
||||
" Last Change: Nov 25, 2022
|
||||
" Version: 204
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SH
|
||||
" For options and settings, please use: :help ft-sh-syntax
|
||||
" This file includes many ideas from Eric Brunet (eric.brunet@ens.fr) and heredoc fixes from Felipe Contreras
|
||||
@@ -84,15 +84,9 @@ elseif g:sh_fold_enabled != 0 && !has("folding")
|
||||
let g:sh_fold_enabled= 0
|
||||
echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support"
|
||||
endif
|
||||
if !exists("s:sh_fold_functions")
|
||||
let s:sh_fold_functions= and(g:sh_fold_enabled,1)
|
||||
endif
|
||||
if !exists("s:sh_fold_heredoc")
|
||||
let s:sh_fold_heredoc = and(g:sh_fold_enabled,2)
|
||||
endif
|
||||
if !exists("s:sh_fold_ifdofor")
|
||||
let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4)
|
||||
endif
|
||||
let s:sh_fold_functions= and(g:sh_fold_enabled,1)
|
||||
let s:sh_fold_heredoc = and(g:sh_fold_enabled,2)
|
||||
let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4)
|
||||
if g:sh_fold_enabled && &fdm == "manual"
|
||||
" Given that the user provided g:sh_fold_enabled
|
||||
" AND g:sh_fold_enabled is manual (usual default)
|
||||
@@ -113,6 +107,9 @@ endif
|
||||
|
||||
" Set up folding commands for shell {{{1
|
||||
" =================================
|
||||
sil! delc ShFoldFunctions
|
||||
sil! delc ShFoldHereDoc
|
||||
sil! delc ShFoldIfDoFor
|
||||
if s:sh_fold_functions
|
||||
com! -nargs=* ShFoldFunctions <args> fold
|
||||
else
|
||||
@@ -415,22 +412,22 @@ syn match shBQComment contained "#.\{-}\ze`" contains=@shCommentGroup
|
||||
" Here Documents: {{{1
|
||||
" (modified by Felipe Contreras)
|
||||
" =========================================
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1\s*$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc13 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1\s*$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc01 start="<<\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc01 end="^\z1$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc02 start="<<-\s*\z([^ \t|>]\+\)" matchgroup=shHereDoc02 end="^\s*\z1$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc03 start="<<\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc03 end="^\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc04 start="<<-\s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc04 end="^\s*\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc05 start="<<\s*'\z([^']\+\)'" matchgroup=shHereDoc05 end="^\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc06 start="<<-\s*'\z([^']\+\)'" matchgroup=shHereDoc06 end="^\s*\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc07 start="<<\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc07 end="^\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc08 start="<<-\s*\"\z([^"]\+\)\"" matchgroup=shHereDoc08 end="^\s*\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc09 start="<<\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc09 end="^\z1$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc10 start="<<-\s*\\\_$\_s*\z([^ \t|>]\+\)" matchgroup=shHereDoc10 end="^\s*\z1$" contains=@shDblQuoteList
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc11 start="<<\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc11 end="^\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc12 start="<<-\s*\\\_$\_s*\\\z([^ \t|>]\+\)" matchgroup=shHereDoc12 end="^\s*\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc13 start="<<\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc13 end="^\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc14 start="<<-\s*\\\_$\_s*'\z([^']\+\)'" matchgroup=shHereDoc14 end="^\s*\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc15 start="<<\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc15 end="^\z1$"
|
||||
ShFoldHereDoc syn region shHereDoc matchgroup=shHereDoc16 start="<<-\s*\\\_$\_s*\"\z([^"]\+\)\"" matchgroup=shHereDoc16 end="^\s*\z1$"
|
||||
|
||||
|
||||
" Here Strings: {{{1
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Contributor: Dean, Adam Kenneth <adam.ken.dean@hpe.com>
|
||||
" Last Change: 2021 Mar 29
|
||||
" Last Change: 2022 Nov 10
|
||||
" Added RemoteCommand from pull request #4809
|
||||
" Included additional keywords from Martin.
|
||||
" Included PR #5753
|
||||
" SSH Version: 8.5p1
|
||||
"
|
||||
|
||||
@@ -57,12 +58,12 @@ syn match sshconfigCiphers "\<aes256-gcm@openssh\.com\>"
|
||||
syn match sshconfigCiphers "\<chacha20-poly1305@openssh\.com\>"
|
||||
|
||||
syn keyword sshconfigMAC hmac-sha1
|
||||
syn keyword sshconfigMAC mac-sha1-96
|
||||
syn keyword sshconfigMAC mac-sha2-256
|
||||
syn keyword sshconfigMAC mac-sha2-512
|
||||
syn keyword sshconfigMAC mac-md5
|
||||
syn keyword sshconfigMAC mac-md5-96
|
||||
syn keyword sshconfigMAC mac-ripemd160
|
||||
syn keyword sshconfigMAC hmac-sha1-96
|
||||
syn keyword sshconfigMAC hmac-sha2-256
|
||||
syn keyword sshconfigMAC hmac-sha2-512
|
||||
syn keyword sshconfigMAC hmac-md5
|
||||
syn keyword sshconfigMAC hmac-md5-96
|
||||
syn keyword sshconfigMAC hmac-ripemd160
|
||||
syn match sshconfigMAC "\<hmac-ripemd160@openssh\.com\>"
|
||||
syn match sshconfigMAC "\<umac-64@openssh\.com\>"
|
||||
syn match sshconfigMAC "\<umac-128@openssh\.com\>"
|
||||
@@ -78,16 +79,24 @@ syn match sshconfigMAC "\<umac-128-etm@openssh\.com\>"
|
||||
|
||||
syn keyword sshconfigHostKeyAlgo ssh-ed25519
|
||||
syn match sshconfigHostKeyAlgo "\<ssh-ed25519-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<sk-ssh-ed25519@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<sk-ssh-ed25519-cert-v01@openssh\.com\>"
|
||||
syn keyword sshconfigHostKeyAlgo ssh-rsa
|
||||
syn keyword sshconfigHostKeyAlgo rsa-sha2-256
|
||||
syn keyword sshconfigHostKeyAlgo rsa-sha2-512
|
||||
syn keyword sshconfigHostKeyAlgo ssh-dss
|
||||
syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp256
|
||||
syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp384
|
||||
syn keyword sshconfigHostKeyAlgo ecdsa-sha2-nistp521
|
||||
syn match sshconfigHostKeyAlgo "\<sk-ecdsa-sha2-nistp256@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<ssh-rsa-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<rsa-sha2-256-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<rsa-sha2-512-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<ssh-dss-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp384-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<ecdsa-sha2-nistp521-cert-v01@openssh\.com\>"
|
||||
syn match sshconfigHostKeyAlgo "\<sk-ecdsa-sha2-nistp256-cert-v01@openssh\.com\>"
|
||||
|
||||
syn keyword sshconfigPreferredAuth hostbased publickey password gssapi-with-mic
|
||||
syn keyword sshconfigPreferredAuth keyboard-interactive
|
||||
@@ -162,6 +171,7 @@ syn keyword sshconfigKeyword EnableSSHKeysign
|
||||
syn keyword sshconfigKeyword EscapeChar
|
||||
syn keyword sshconfigKeyword ExitOnForwardFailure
|
||||
syn keyword sshconfigKeyword FingerprintHash
|
||||
syn keyword sshconfigKeyword ForkAfterAuthentication
|
||||
syn keyword sshconfigKeyword ForwardAgent
|
||||
syn keyword sshconfigKeyword ForwardX11
|
||||
syn keyword sshconfigKeyword ForwardX11Timeout
|
||||
@@ -212,13 +222,16 @@ syn keyword sshconfigKeyword RekeyLimit
|
||||
syn keyword sshconfigKeyword RemoteCommand
|
||||
syn keyword sshconfigKeyword RemoteForward
|
||||
syn keyword sshconfigKeyword RequestTTY
|
||||
syn keyword sshconfigKeyword RequiredRSASize
|
||||
syn keyword sshconfigKeyword RevokedHostKeys
|
||||
syn keyword sshconfigKeyword SecurityKeyProvider
|
||||
syn keyword sshconfigKeyword SendEnv
|
||||
syn keyword sshconfigKeyword ServerAliveCountMax
|
||||
syn keyword sshconfigKeyword ServerAliveInterval
|
||||
syn keyword sshconfigKeyword SessionType
|
||||
syn keyword sshconfigKeyword SmartcardDevice
|
||||
syn keyword sshconfigKeyword SetEnv
|
||||
syn keyword sshconfigKeyword StdinNull
|
||||
syn keyword sshconfigKeyword StreamLocalBindMask
|
||||
syn keyword sshconfigKeyword StreamLocalBindUnlink
|
||||
syn keyword sshconfigKeyword StrictHostKeyChecking
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
" Contributor: Leonard Ehrenfried <leonard.ehrenfried@web.de>
|
||||
" Contributor: Karsten Hopp <karsten@redhat.com>
|
||||
" Originally: 2009-07-09
|
||||
" Last Change: 2021-03-29
|
||||
" Last Change: 2022 Nov 10
|
||||
" SSH Version: 8.5p1
|
||||
"
|
||||
|
||||
@@ -59,12 +59,12 @@ syn match sshdconfigCiphers "\<aes256-gcm@openssh\.com\>"
|
||||
syn match sshdconfigCiphers "\<chacha20-poly1305@openssh\.com\>"
|
||||
|
||||
syn keyword sshdconfigMAC hmac-sha1
|
||||
syn keyword sshdconfigMAC mac-sha1-96
|
||||
syn keyword sshdconfigMAC mac-sha2-256
|
||||
syn keyword sshdconfigMAC mac-sha2-512
|
||||
syn keyword sshdconfigMAC mac-md5
|
||||
syn keyword sshdconfigMAC mac-md5-96
|
||||
syn keyword sshdconfigMAC mac-ripemd160
|
||||
syn keyword sshdconfigMAC hmac-sha1-96
|
||||
syn keyword sshdconfigMAC hmac-sha2-256
|
||||
syn keyword sshdconfigMAC hmac-sha2-512
|
||||
syn keyword sshdconfigMAC hmac-md5
|
||||
syn keyword sshdconfigMAC hmac-md5-96
|
||||
syn keyword sshdconfigMAC hmac-ripemd160
|
||||
syn match sshdconfigMAC "\<hmac-ripemd160@openssh\.com\>"
|
||||
syn match sshdconfigMAC "\<umac-64@openssh\.com\>"
|
||||
syn match sshdconfigMAC "\<umac-128@openssh\.com\>"
|
||||
@@ -221,6 +221,7 @@ syn keyword sshdconfigKeyword Match
|
||||
syn keyword sshdconfigKeyword MaxAuthTries
|
||||
syn keyword sshdconfigKeyword MaxSessions
|
||||
syn keyword sshdconfigKeyword MaxStartups
|
||||
syn keyword sshdconfigKeyword ModuliFile
|
||||
syn keyword sshdconfigKeyword PasswordAuthentication
|
||||
syn keyword sshdconfigKeyword PerSourceMaxStartups
|
||||
syn keyword sshdconfigKeyword PerSourceNetBlockSize
|
||||
@@ -244,6 +245,7 @@ syn keyword sshdconfigKeyword PubkeyAuthentication
|
||||
syn keyword sshdconfigKeyword PubkeyAuthOptions
|
||||
syn keyword sshdconfigKeyword RSAAuthentication
|
||||
syn keyword sshdconfigKeyword RekeyLimit
|
||||
syn keyword sshdconfigKeyword RequiredRSASize
|
||||
syn keyword sshdconfigKeyword RevokedKeys
|
||||
syn keyword sshdconfigKeyword RDomain
|
||||
syn keyword sshdconfigKeyword RhostsRSAAuthentication
|
||||
@@ -258,6 +260,8 @@ syn keyword sshdconfigKeyword Subsystem
|
||||
syn keyword sshdconfigKeyword SyslogFacility
|
||||
syn keyword sshdconfigKeyword TCPKeepAlive
|
||||
syn keyword sshdconfigKeyword TrustedUserCAKeys
|
||||
syn keyword sshdconfigKeyword UseBlacklist
|
||||
syn keyword sshdconfigKeyword UseBlocklist
|
||||
syn keyword sshdconfigKeyword UseDNS
|
||||
syn keyword sshdconfigKeyword UseLogin
|
||||
syn keyword sshdconfigKeyword UsePAM
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user