mirror of
https://github.com/zoriya/vim.git
synced 2025-12-31 11:28:24 +00:00
Compare commits
248 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ec6666047 | ||
|
|
9cbf791995 | ||
|
|
dc7179f9a4 | ||
|
|
ebfec1c531 | ||
|
|
3d79f0a430 | ||
|
|
d343c60df4 | ||
|
|
3770f4c9cd | ||
|
|
f3da4c8427 | ||
|
|
040e795e8d | ||
|
|
145a6afe3a | ||
|
|
a6759381a5 | ||
|
|
51b2fc2ef5 | ||
|
|
11977f9175 | ||
|
|
47bba53bdb | ||
|
|
7193323b77 | ||
|
|
e446a017ff | ||
|
|
f97a295cca | ||
|
|
4aecaa168e | ||
|
|
4219698603 | ||
|
|
90c2353365 | ||
|
|
486fc25a29 | ||
|
|
64f1c4152e | ||
|
|
0ef9a5c094 | ||
|
|
541c87c808 | ||
|
|
da3dd7d857 | ||
|
|
66bb9ae70f | ||
|
|
f7d1c6e188 | ||
|
|
b391e1f805 | ||
|
|
29ac5df37b | ||
|
|
a41e221935 | ||
|
|
450c7a97d1 | ||
|
|
5a57a5e209 | ||
|
|
ae3205aa55 | ||
|
|
912bfee710 | ||
|
|
32517c4c14 | ||
|
|
f450804e14 | ||
|
|
4cae845ce3 | ||
|
|
474f226582 | ||
|
|
584b853ee0 | ||
|
|
24a8d06d7f | ||
|
|
034c350207 | ||
|
|
e857598896 | ||
|
|
378e6c03f9 | ||
|
|
b40a2fb3b3 | ||
|
|
32030a9f3b | ||
|
|
d40f00cb43 | ||
|
|
3213952966 | ||
|
|
60908c4922 | ||
|
|
232bdaaca9 | ||
|
|
c0c2c26265 | ||
|
|
3ce33b120c | ||
|
|
4059400993 | ||
|
|
a86655af84 | ||
|
|
a94bd9d939 | ||
|
|
0233bdfa2b | ||
|
|
043d7b2c84 | ||
|
|
6481accd40 | ||
|
|
bcbfaf32e0 | ||
|
|
6aa0937fb8 | ||
|
|
58b40092e6 | ||
|
|
ad15a39fdb | ||
|
|
f68cddabff | ||
|
|
ea125393af | ||
|
|
9a9432d3a2 | ||
|
|
a47c0fb4ad | ||
|
|
79c11e399b | ||
|
|
2bc849ff81 | ||
|
|
523f22d577 | ||
|
|
566f76e656 | ||
|
|
06cd14d0bf | ||
|
|
1b5f03ec9c | ||
|
|
d41262ed06 | ||
|
|
1cfb14aa97 | ||
|
|
765d82a657 | ||
|
|
01c5f2addf | ||
|
|
dda3053121 | ||
|
|
870cd76283 | ||
|
|
c8ab30a349 | ||
|
|
e01e5215f9 | ||
|
|
8367716a6e | ||
|
|
7f8b2559a3 | ||
|
|
df8f947359 | ||
|
|
0cb3ca9f7a | ||
|
|
eca2c5fff6 | ||
|
|
2c01131c2a | ||
|
|
7d4d87ba89 | ||
|
|
94674f2223 | ||
|
|
5bcd29b84e | ||
|
|
554d031302 | ||
|
|
cf760d50dc | ||
|
|
2468add0b8 | ||
|
|
3259ff3b3b | ||
|
|
c8b204952f | ||
|
|
3ac1d97a1d | ||
|
|
c32949b077 | ||
|
|
7b17eb4b06 | ||
|
|
f057171d8b | ||
|
|
aaa16b0918 | ||
|
|
574950dfb1 | ||
|
|
46ab925937 | ||
|
|
36818a9daa | ||
|
|
ea720aea85 | ||
|
|
e83c133eb9 | ||
|
|
03ff0c6681 | ||
|
|
bcf31ec36b | ||
|
|
a9fa8c58fb | ||
|
|
dc4daa3a39 | ||
|
|
a2942c7468 | ||
|
|
39c82ea656 | ||
|
|
7bdcba08bb | ||
|
|
993dbc33a8 | ||
|
|
6acf757c6a | ||
|
|
fc966c19f8 | ||
|
|
ec8b74f7ab | ||
|
|
1aeb3eb092 | ||
|
|
6bafdd41cb | ||
|
|
9f2d97efe2 | ||
|
|
f1dcd14fc5 | ||
|
|
db4d88c2ad | ||
|
|
c55e8f2c6f | ||
|
|
0d89d8ae89 | ||
|
|
dbe6ef1036 | ||
|
|
7b8db111e8 | ||
|
|
770713794a | ||
|
|
ed0c1d5d4b | ||
|
|
ef91ae4557 | ||
|
|
0a657124a5 | ||
|
|
7b0afc1d76 | ||
|
|
96dd34e534 | ||
|
|
254480736f | ||
|
|
c4b3f6477c | ||
|
|
c6951a76a5 | ||
|
|
73ade49c4b | ||
|
|
09ce0b8e11 | ||
|
|
87c1cbbe98 | ||
|
|
56310d38d8 | ||
|
|
b9a1edfc54 | ||
|
|
a7fbaa43b7 | ||
|
|
b536540ab3 | ||
|
|
d0883faac6 | ||
|
|
81b7ecc5cb | ||
|
|
465de3a57b | ||
|
|
b3d614369f | ||
|
|
71d53e7c57 | ||
|
|
6ef5471afa | ||
|
|
9b99411b93 | ||
|
|
590162cae0 | ||
|
|
e86190e7c1 | ||
|
|
f54cedd676 | ||
|
|
c9207d5d79 | ||
|
|
c53e7904b9 | ||
|
|
9fca133eb7 | ||
|
|
ff3d537704 | ||
|
|
c8b126d70d | ||
|
|
9b8a365d01 | ||
|
|
20b795e0eb | ||
|
|
418b547881 | ||
|
|
104b2ff4d0 | ||
|
|
34820944ed | ||
|
|
afa3f1cc72 | ||
|
|
33e543038b | ||
|
|
07146ad1d3 | ||
|
|
4ce1f99a2d | ||
|
|
8efdcee02e | ||
|
|
c336ae3ce6 | ||
|
|
d505d17885 | ||
|
|
731d00770d | ||
|
|
ba2d191932 | ||
|
|
b5328b46a7 | ||
|
|
b26461715b | ||
|
|
417e88bb75 | ||
|
|
8d754fada8 | ||
|
|
d097af7779 | ||
|
|
67f3094397 | ||
|
|
9d1184cd1d | ||
|
|
9aee8ec400 | ||
|
|
4ab1f4a32f | ||
|
|
4cd45f1408 | ||
|
|
ba936f6f4e | ||
|
|
3d473ee1a6 | ||
|
|
f94178db8d | ||
|
|
91c9d6d772 | ||
|
|
70ef3f546b | ||
|
|
eb53350c02 | ||
|
|
f593fc891c | ||
|
|
74e1274edf | ||
|
|
65b0d16768 | ||
|
|
692fe0889c | ||
|
|
cb94c91070 | ||
|
|
6342e2c5a6 | ||
|
|
67578e5bcf | ||
|
|
b7acea1806 | ||
|
|
7db29e4b5c | ||
|
|
79336e19cb | ||
|
|
3ea8a1b129 | ||
|
|
7ce7daf6cd | ||
|
|
6c87bbb4e4 | ||
|
|
c51a376265 | ||
|
|
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 |
@@ -1,10 +1,31 @@
|
||||
version: "{build}"
|
||||
|
||||
image: Visual Studio 2015
|
||||
|
||||
skip_tags: true
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- FEATURE: HUGE
|
||||
|
||||
# Alternate environments, not used right now. 2022 is a lot slower.
|
||||
#
|
||||
# - job_name: VS-2015
|
||||
# appveyor_build_worker_image: Visual Studio 2015
|
||||
# FEATURE: HUGE
|
||||
|
||||
# - job_name: VS-2017
|
||||
# appveyor_build_worker_image: Visual Studio 2017
|
||||
# FEATURE: HUGE
|
||||
|
||||
# - job_name: VS-2019
|
||||
# appveyor_build_worker_image: Visual Studio 2019
|
||||
# FEATURE: HUGE
|
||||
|
||||
# - job_name: VS-2022
|
||||
# appveyor_build_worker_image: Visual Studio 2022
|
||||
# FEATURE: HUGE
|
||||
|
||||
# disabled
|
||||
# - FEATURE: TINY
|
||||
# - FEATURE: NORMAL
|
||||
@@ -14,19 +35,19 @@ matrix:
|
||||
fast_finish: true
|
||||
|
||||
before_build:
|
||||
# Use Visual Studio 2015 compiler tools (default is 2012)
|
||||
- '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64'
|
||||
- call ver
|
||||
- ci\appveyor.bat install
|
||||
|
||||
build_script:
|
||||
- ci/appveyor.bat
|
||||
- ci\appveyor.bat build
|
||||
|
||||
test_script:
|
||||
- cd src/testdir
|
||||
# Testing with MSVC gvim
|
||||
- path C:\Python35-x64;%PATH%
|
||||
- nmake -f Make_mvc.mak VIMPROG=..\gvim
|
||||
- nmake -f Make_mvc.mak clean
|
||||
# Testing with MSVC console version
|
||||
- nmake -f Make_mvc.mak VIMPROG=..\vim
|
||||
- ci\appveyor.bat test
|
||||
|
||||
artifacts:
|
||||
- path: src/vim.exe
|
||||
name: vim
|
||||
- path: src/gvim.exe
|
||||
name: gvim
|
||||
|
||||
# vim: sw=2 sts=2 et ts=8 sr
|
||||
|
||||
@@ -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
|
||||
|
||||
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -51,6 +51,7 @@ runtime/compiler/dartanalyser.vim @dkearns
|
||||
runtime/compiler/dartdevc.vim @dkearns
|
||||
runtime/compiler/dartdoc.vim @dkearns
|
||||
runtime/compiler/dartfmt.vim @dkearns
|
||||
runtime/compiler/dotnet.vim @nickspoons
|
||||
runtime/compiler/eruby.vim @dkearns
|
||||
runtime/compiler/fbc.vim @dkearns
|
||||
runtime/compiler/gawk.vim @dkearns
|
||||
@@ -181,6 +182,7 @@ runtime/ftplugin/python.vim @tpict
|
||||
runtime/ftplugin/qb64.vim @dkearns
|
||||
runtime/ftplugin/r.vim @jalvesaq
|
||||
runtime/ftplugin/racket.vim @benknoble
|
||||
runtime/ftplugin/readline.vim @dkearns
|
||||
runtime/ftplugin/rhelp.vim @jalvesaq
|
||||
runtime/ftplugin/rmd.vim @jalvesaq
|
||||
runtime/ftplugin/rnoweb.vim @jalvesaq
|
||||
@@ -297,6 +299,7 @@ runtime/plugin/tarPlugin.vim @cecamp
|
||||
runtime/plugin/vimballPlugin.vim @cecamp
|
||||
runtime/plugin/zipPlugin.vim @cecamp
|
||||
runtime/plugin/manpager.vim @Konfekt
|
||||
runtime/syntax/shared/hgcommitDiff.vim @vegerot
|
||||
runtime/syntax/abaqus.vim @costerwi
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
@@ -331,6 +334,7 @@ runtime/syntax/dot.vim @mmottl
|
||||
runtime/syntax/doxygen.vim @frogonwheels
|
||||
runtime/syntax/dtd.vim @chrisbra
|
||||
runtime/syntax/dts.vim @zonque
|
||||
runtime/syntax/editorconfig.vim @gpanders
|
||||
runtime/syntax/eiffel.vim @jocelyn
|
||||
runtime/syntax/elmfilt.vim @cecamp
|
||||
runtime/syntax/erlang.vim @hcs42
|
||||
@@ -371,6 +375,7 @@ runtime/syntax/indent.vim @dkearns
|
||||
runtime/syntax/j.vim @glts
|
||||
runtime/syntax/jargon.vim @h3xx
|
||||
runtime/syntax/java.vim @fleiner
|
||||
runtime/syntax/javascript.vim @fleiner
|
||||
runtime/syntax/jsonc.vim @izhakjakov
|
||||
runtime/syntax/julia.vim @carlobaldassi
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
@@ -394,6 +399,7 @@ runtime/syntax/n1ql.vim @pr3d4t0r
|
||||
runtime/syntax/netrw.vim @cecamp
|
||||
runtime/syntax/nginx.vim @chr4
|
||||
runtime/syntax/ninja.vim @nico
|
||||
runtime/syntax/nix.vim @equill
|
||||
runtime/syntax/nroff.vim @jmarshall
|
||||
runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/openvpn.vim @ObserverOfTime
|
||||
@@ -464,6 +470,7 @@ runtime/syntax/vdf.vim @ObserverOfTime
|
||||
runtime/syntax/vim.vim @cecamp
|
||||
runtime/syntax/vroom.vim @dbarnett
|
||||
runtime/syntax/wast.vim @rhysd
|
||||
runtime/syntax/wdl.vim @zenmatic
|
||||
runtime/syntax/wget.vim @dkearns
|
||||
runtime/syntax/wget2.vim @dkearns
|
||||
runtime/syntax/xbl.vim @dkearns
|
||||
|
||||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -254,7 +254,7 @@ jobs:
|
||||
|
||||
- name: Codecov
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v3.1.1
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
|
||||
|
||||
@@ -373,8 +373,8 @@ jobs:
|
||||
PYTHON_VER_DOT: '2.7'
|
||||
PYTHON_DIR: 'C:\Python27'
|
||||
# Python 3
|
||||
PYTHON3_VER: 310
|
||||
PYTHON3_VER_DOT: '3.10'
|
||||
PYTHON3_VER: 311
|
||||
PYTHON3_VER_DOT: '3.11'
|
||||
# Other dependencies
|
||||
# winpty
|
||||
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
|
||||
@@ -613,7 +613,7 @@ jobs:
|
||||
|
||||
- name: Codecov
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v3.1.1
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
directory: src
|
||||
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Format of this file: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file
|
||||
path_classifiers:
|
||||
documentation:
|
||||
- runtime/tutor/tutor*
|
||||
4
Filelist
4
Filelist
@@ -15,7 +15,6 @@ SRC_ALL = \
|
||||
.github/dependabot.yml \
|
||||
.gitignore \
|
||||
.hgignore \
|
||||
.lgtm.yml \
|
||||
.appveyor.yml \
|
||||
.codecov.yml \
|
||||
ci/appveyor.bat \
|
||||
@@ -163,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 \
|
||||
@@ -327,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 \
|
||||
@@ -782,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 \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[](https://www.vim.org)
|
||||
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://lgtm.com/projects/g/vim/vim/context:cpp) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://ci.appveyor.com/project/chrisbra/vim) [](https://cirrus-ci.com/github/vim/vim) [](https://codecov.io/gh/vim/vim?branch=master) [](https://scan.coverity.com/projects/vim) [](https://buildd.debian.org/vim) [](https://repology.org/metapackage/vim) [](https://fossies.org/linux/test/vim-master.tar.gz/codespell.html)
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
@@ -101,7 +101,7 @@ for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
text must always be included. For modified versions a few restrictions apply.
|
||||
text must always be included. For modified versions, a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
@@ -122,7 +122,7 @@ For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
## Contributing ##
|
||||
|
||||
If you would like to help making Vim better, see the
|
||||
If you would like to help make Vim better, see the
|
||||
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
text must always be included. For modified versions a few restrictions apply.
|
||||
text must always be included. For modified versions, a few restrictions apply.
|
||||
The license is GPL compatible, you may compile Vim with GPL libraries and
|
||||
distribute it.
|
||||
|
||||
@@ -106,7 +106,7 @@ For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
CONTRIBUTING
|
||||
|
||||
If you would like to help making Vim better, see the CONTRIBUTING.md file.
|
||||
If you would like to help make Vim better, see the CONTRIBUTING.md file.
|
||||
|
||||
|
||||
INFORMATION
|
||||
|
||||
@@ -1,9 +1,54 @@
|
||||
@echo off
|
||||
:: Batch file for building/testing Vim on AppVeyor
|
||||
set target=%1
|
||||
|
||||
setlocal ENABLEDELAYEDEXPANSION
|
||||
cd %APPVEYOR_BUILD_FOLDER%
|
||||
|
||||
:: Python3
|
||||
set PYTHON3_VER=311
|
||||
set PYTHON3_RELEASE=3.11.1
|
||||
set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
|
||||
set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
|
||||
|
||||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
|
||||
if exist "%VSWHERE%" (
|
||||
for /f "usebackq delims=" %%i in (
|
||||
`"%VSWHERE%" -products * -latest -property installationPath`
|
||||
) do (
|
||||
set "VCVARSALL=%%i\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
)
|
||||
)
|
||||
|
||||
if not exist "%VCVARSALL%" (
|
||||
set "VCVARSALL=%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
|
||||
)
|
||||
call "%VCVARSALL%" x64
|
||||
|
||||
goto %target%
|
||||
echo Unknown build target.
|
||||
exit 1
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:install
|
||||
@echo on
|
||||
if not exist downloads mkdir downloads
|
||||
|
||||
:: Python 3
|
||||
if not exist %PYTHON3_DIR% (
|
||||
call :downloadfile %PYTHON3_URL% downloads\python3.exe
|
||||
cmd /c start /wait downloads\python3.exe /quiet TargetDir=%PYTHON3_DIR% ^
|
||||
Include_pip=0 Include_tcltk=0 Include_test=0 Include_tools=0 ^
|
||||
AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
|
||||
InstallLauncherAllUsers=0
|
||||
)
|
||||
@echo off
|
||||
goto :eof
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:build
|
||||
|
||||
cd src
|
||||
|
||||
echo "Building MSVC 64bit console Version"
|
||||
@@ -22,7 +67,7 @@ if "%FEATURE%" == "HUGE" (
|
||||
nmake -f Make_mvc.mak CPU=AMD64 ^
|
||||
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
|
||||
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
|
||||
PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^
|
||||
PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
|
||||
FEATURES=%FEATURE%
|
||||
) ELSE (
|
||||
nmake -f Make_mvc.mak CPU=AMD64 ^
|
||||
@@ -39,4 +84,31 @@ echo "version output MSVC console"
|
||||
.\vim --version || exit 1
|
||||
echo "version output MSVC GUI"
|
||||
type ver_msvc.txt || exit 1
|
||||
cd ..
|
||||
|
||||
goto :eof
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:test
|
||||
@echo on
|
||||
cd src/testdir
|
||||
:: Testing with MSVC gvim
|
||||
path %PYTHON3_DIR%;%PATH%
|
||||
nmake -f Make_mvc.mak VIMPROG=..\gvim
|
||||
nmake -f Make_mvc.mak clean
|
||||
:: Testing with MSVC console version
|
||||
nmake -f Make_mvc.mak VIMPROG=..\vim
|
||||
|
||||
@echo off
|
||||
goto :eof
|
||||
|
||||
:: ----------------------------------------------------------------------------
|
||||
:downloadfile
|
||||
:: call :downloadfile <URL> <localfile>
|
||||
if not exist %2 (
|
||||
curl -f -L %1 -o %2
|
||||
)
|
||||
if ERRORLEVEL 1 (
|
||||
rem Retry once.
|
||||
curl -f -L %1 -o %2 || exit 1
|
||||
)
|
||||
@goto :eof
|
||||
|
||||
@@ -29,12 +29,12 @@ To build the installable .exe:
|
||||
|
||||
4. Get a "diff.exe" program. If you skip this the built-in diff will always
|
||||
be used (which is fine for most users). If you do have your own
|
||||
"diff.exe" put it in the "../.." directory (above the "vim82" directory,
|
||||
"diff.exe" put it in the "../.." directory (above the "vim90" directory,
|
||||
it's the same for all Vim versions).
|
||||
You can find one in previous Vim versions or in this archive:
|
||||
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
|
||||
|
||||
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim82"
|
||||
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90"
|
||||
directory). This is required for the terminal window.
|
||||
|
||||
6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
|
||||
|
||||
9
runtime/autoload/dist/ft.vim
vendored
9
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 Dec 14
|
||||
|
||||
# These functions are moved here from runtime/filetype.vim to make startup
|
||||
# faster.
|
||||
@@ -810,10 +810,13 @@ export def SQL()
|
||||
enddef
|
||||
|
||||
# This function checks the first 25 lines of file extension "sc" to resolve
|
||||
# detection between scala and SuperCollider
|
||||
# detection between scala and SuperCollider.
|
||||
# NOTE: We don't check for 'Class : Method', as this can easily be confused
|
||||
# with valid Scala like `val x : Int = 3`. So we instead only rely on
|
||||
# checks that can't be confused.
|
||||
export def FTsc()
|
||||
for lnum in range(1, min([line("$"), 25]))
|
||||
if getline(lnum) =~# '[A-Za-z0-9]*\s:\s[A-Za-z0-9]\|var\s<\|classvar\s<\|\^this.*\||\w*|\|+\s\w*\s{\|\*ar\s'
|
||||
if getline(lnum) =~# 'var\s<\|classvar\s<\|\^this.*\||\w\+|\|+\s\w*\s{\|\*ar\s'
|
||||
setf supercollider
|
||||
return
|
||||
endif
|
||||
|
||||
2
runtime/autoload/dist/script.vim
vendored
2
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)
|
||||
|
||||
7
runtime/autoload/dist/vimindent.vim
vendored
7
runtime/autoload/dist/vimindent.vim
vendored
@@ -2,7 +2,7 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2022 Oct 15
|
||||
# Last Change: 2023 Jan 03
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
@@ -201,6 +201,7 @@ const ENDS_BLOCK: string = '^\s*\%('
|
||||
.. '\|' .. 'endw\%[hile]'
|
||||
.. '\|' .. 'endt\%[ry]'
|
||||
.. '\|' .. 'enddef'
|
||||
.. '\|' .. 'endclass'
|
||||
.. '\|' .. 'endf\%[unction]'
|
||||
.. '\|' .. 'aug\%[roup]\s\+[eE][nN][dD]'
|
||||
.. '\|' .. CLOSING_BRACKET
|
||||
@@ -212,6 +213,7 @@ patterns =<< trim END
|
||||
en\%[dif]
|
||||
el\%[se]
|
||||
endfor\=
|
||||
endclass
|
||||
endw\%[hile]
|
||||
endt\%[ry]
|
||||
fina\|finally\=
|
||||
@@ -251,6 +253,7 @@ patterns =<< trim END
|
||||
el\%[se]
|
||||
elseif\=
|
||||
for
|
||||
class
|
||||
wh\%[ile]
|
||||
try
|
||||
cat\%[ch]
|
||||
@@ -278,6 +281,8 @@ const START_MIDDLE_END: dict<list<string>> = {
|
||||
endif: ['if', 'el\%[se]\|elseif\=', 'en\%[dif]'],
|
||||
for: ['for', '', 'endfor\='],
|
||||
endfor: ['for', '', 'endfor\='],
|
||||
class: ['class', '', 'endclass'],
|
||||
endclass: ['class', '', 'endclass'],
|
||||
while: ['wh\%[ile]', '', 'endw\%[hile]'],
|
||||
endwhile: ['wh\%[ile]', '', 'endw\%[hile]'],
|
||||
try: ['try', 'cat\%[ch]\|fina\|finally\=', 'endt\%[ry]'],
|
||||
|
||||
100
runtime/autoload/zig/fmt.vim
Normal file
100
runtime/autoload/zig/fmt.vim
Normal file
@@ -0,0 +1,100 @@
|
||||
" Adapted from fatih/vim-go: autoload/go/fmt.vim
|
||||
"
|
||||
" Copyright 2011 The Go Authors. All rights reserved.
|
||||
" Use of this source code is governed by a BSD-style
|
||||
" license that can be found in the LICENSE file.
|
||||
"
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
function! zig#fmt#Format() abort
|
||||
" Save cursor position and many other things.
|
||||
let view = winsaveview()
|
||||
|
||||
if !executable('zig')
|
||||
echohl Error | echomsg "no zig binary found in PATH" | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
let cmdline = 'zig fmt --stdin --ast-check'
|
||||
let current_buf = bufnr('')
|
||||
|
||||
" The formatted code is output on stdout, the errors go on stderr.
|
||||
if exists('*systemlist')
|
||||
silent let out = systemlist(cmdline, current_buf)
|
||||
else
|
||||
silent let out = split(system(cmdline, current_buf))
|
||||
endif
|
||||
if len(out) == 1
|
||||
if out[0] == "error: unrecognized parameter: '--ast-check'"
|
||||
let cmdline = 'zig fmt --stdin'
|
||||
if exists('*systemlist')
|
||||
silent let out = systemlist(cmdline, current_buf)
|
||||
else
|
||||
silent let out = split(system(cmdline, current_buf))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
let err = v:shell_error
|
||||
|
||||
|
||||
if err == 0
|
||||
" remove undo point caused via BufWritePre.
|
||||
try | silent undojoin | catch | endtry
|
||||
|
||||
" Replace the file content with the formatted version.
|
||||
if exists('*deletebufline')
|
||||
call deletebufline(current_buf, len(out), line('$'))
|
||||
else
|
||||
silent execute ':' . len(out) . ',' . line('$') . ' delete _'
|
||||
endif
|
||||
call setline(1, out)
|
||||
|
||||
" No errors detected, close the loclist.
|
||||
call setloclist(0, [], 'r')
|
||||
lclose
|
||||
elseif get(g:, 'zig_fmt_parse_errors', 1)
|
||||
let errors = s:parse_errors(expand('%'), out)
|
||||
|
||||
call setloclist(0, [], 'r', {
|
||||
\ 'title': 'Errors',
|
||||
\ 'items': errors,
|
||||
\ })
|
||||
|
||||
let max_win_height = get(g:, 'zig_fmt_max_window_height', 5)
|
||||
" Prevent the loclist from becoming too long.
|
||||
let win_height = min([max_win_height, len(errors)])
|
||||
" Open the loclist, but only if there's at least one error to show.
|
||||
execute 'silent! lwindow ' . win_height
|
||||
endif
|
||||
|
||||
call winrestview(view)
|
||||
|
||||
if err != 0
|
||||
echohl Error | echomsg "zig fmt returned error" | echohl None
|
||||
return
|
||||
endif
|
||||
|
||||
" Run the syntax highlighter on the updated content and recompute the folds if
|
||||
" needed.
|
||||
syntax sync fromstart
|
||||
endfunction
|
||||
|
||||
" parse_errors parses the given errors and returns a list of parsed errors
|
||||
function! s:parse_errors(filename, lines) abort
|
||||
" list of errors to be put into location list
|
||||
let errors = []
|
||||
for line in a:lines
|
||||
let tokens = matchlist(line, '^\(.\{-}\):\(\d\+\):\(\d\+\)\s*\(.*\)')
|
||||
if !empty(tokens)
|
||||
call add(errors,{
|
||||
\"filename": a:filename,
|
||||
\"lnum": tokens[2],
|
||||
\"col": tokens[3],
|
||||
\"text": tokens[4],
|
||||
\ })
|
||||
endif
|
||||
endfor
|
||||
|
||||
return errors
|
||||
endfunction
|
||||
" vim: sw=2 ts=2 et
|
||||
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 Nov 22
|
||||
*autocmd.txt* For Vim version 9.0. Last change: 2022 Dec 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -97,7 +97,7 @@ If the `:autocmd` is in Vim9 script (a script that starts with `:vim9script`
|
||||
and in a `:def` function) then {cmd} will be executed as in Vim9
|
||||
script. Thus this depends on where the autocmd is defined, not where it is
|
||||
triggered.
|
||||
|
||||
*:autocmd-block*
|
||||
{cmd} can be a block, like with `:command`, see |:command-repl|. Example: >
|
||||
au BufReadPost *.xml {
|
||||
setlocal matchpairs+=<:>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Nov 21
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -211,6 +211,7 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
|
||||
getbufvar({buf}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {buf}
|
||||
getcellwidths() List get character cell width overrides
|
||||
getchangelist([{buf}]) List list of change list items
|
||||
getchar([expr]) Number or String
|
||||
get one character from the user
|
||||
@@ -608,6 +609,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}
|
||||
@@ -665,6 +667,8 @@ test_garbagecollect_soon() none free memory soon for testing
|
||||
test_getvalue({string}) any get value of an internal variable
|
||||
test_gui_event({event}, {args}) bool generate a GUI event for testing
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_mswin_event({event}, {args})
|
||||
bool generate MS-Windows event for testing
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
test_null_dict() Dict null value for testing
|
||||
@@ -3259,6 +3263,13 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
< Can also be used as a |method|: >
|
||||
GetBufnr()->getbufvar(varname)
|
||||
<
|
||||
getcellwidths() *getcellwidths()*
|
||||
Returns a |List| of cell widths of character ranges overridden
|
||||
by |setcellwidths()|. The format is equal to the argument of
|
||||
|setcellwidths()|. If no character ranges have their cell
|
||||
widths overridden, an empty List is returned.
|
||||
|
||||
|
||||
getchangelist([{buf}]) *getchangelist()*
|
||||
Returns the |changelist| for the buffer {buf}. For the use
|
||||
of {buf}, see |bufname()| above. If buffer {buf} doesn't
|
||||
@@ -3517,6 +3528,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
messages |:messages| suboptions
|
||||
option options
|
||||
packadd optional package |pack-add| names
|
||||
runtime runtime file names |:runtime|
|
||||
scriptnames sourced script names |:scriptnames|
|
||||
shellcmd Shell command
|
||||
sign |:sign| suboptions
|
||||
@@ -4134,7 +4146,7 @@ getscriptinfo([{opts}) *getscriptinfo()*
|
||||
this script name links to, if any, otherwise
|
||||
zero
|
||||
variables A dictionary with the script-local variables.
|
||||
Present only when the a particular script is
|
||||
Present only when a particular script is
|
||||
specified using the "sid" item in {opts}.
|
||||
Note that this is a copy, the value of
|
||||
script-local variables cannot be changed using
|
||||
@@ -7955,7 +7967,7 @@ setcellwidths({list}) *setcellwidths()*
|
||||
{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.
|
||||
Only characters with value 0x80 and higher can be used.
|
||||
|
||||
{width} must be either 1 or 2, indicating the character width
|
||||
in screen cells. *E1112*
|
||||
@@ -9110,6 +9122,8 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
|
||||
Blob 0z00112233.44556677.8899
|
||||
List [item, item]
|
||||
Dictionary {key: value, key: value}
|
||||
Class class SomeName
|
||||
Object object of SomeName {lnum: 1, col: 3}
|
||||
|
||||
When a |List| or |Dictionary| has a recursive reference it is
|
||||
replaced by "[...]" or "{...}". Using eval() on the result
|
||||
@@ -9314,6 +9328,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:
|
||||
@@ -9931,6 +9956,8 @@ type({expr}) The result is a Number representing the type of {expr}.
|
||||
Job: 8 |v:t_job|
|
||||
Channel: 9 |v:t_channel|
|
||||
Blob: 10 |v:t_blob|
|
||||
Class 12 |v:t_class|
|
||||
Object 13 |v:t_object|
|
||||
For backward compatibility, this method can be used: >
|
||||
:if type(myvar) == type(0)
|
||||
:if type(myvar) == type("")
|
||||
@@ -9951,7 +9978,7 @@ typename({expr}) *typename()*
|
||||
Return a string representation of the type of {expr}.
|
||||
Example: >
|
||||
echo typename([1, 2, 3])
|
||||
list<number>
|
||||
< list<number> ~
|
||||
|
||||
|
||||
undofile({name}) *undofile()*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 9.0. Last change: 2022 Oct 01
|
||||
*diff.txt* For Vim version 9.0. Last change: 2022 Dec 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -148,6 +148,10 @@ Otherwise they are set to their default value:
|
||||
'foldmethod' "manual"
|
||||
'foldcolumn' 0
|
||||
|
||||
'foldenable' will most-likely be reset to off. That is when 'foldmethod' is
|
||||
is restored to "manual". The folds themselves are not cleared but they should
|
||||
not show up, resetting 'foldenable' is the best way to do that.
|
||||
|
||||
==============================================================================
|
||||
2. Viewing diffs *view-diffs*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
*eval.txt* For Vim version 9.0. Last change: 2023 Jan 03
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -163,9 +163,10 @@ Note that " " and "0" are also non-empty strings, thus considered to be TRUE.
|
||||
A List, Dictionary or Float is not a Number or String, thus evaluate to FALSE.
|
||||
|
||||
*E611* *E745* *E728* *E703* *E729* *E730* *E731* *E908* *E910*
|
||||
*E913* *E974* *E975* *E976*
|
||||
|List|, |Dictionary|, |Funcref|, |Job|, |Channel| and |Blob| types are not
|
||||
automatically converted.
|
||||
*E913* *E974* *E975* *E976* *E1319* *E1320* *E1321* *E1322*
|
||||
*E1323* *E1324*
|
||||
|List|, |Dictionary|, |Funcref|, |Job|, |Channel|, |Blob|, |Class| and
|
||||
|object| types are not automatically converted.
|
||||
|
||||
*E805* *E806* *E808*
|
||||
When mixing Number and Float the Number is converted to Float. Otherwise
|
||||
@@ -633,6 +634,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 +651,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.
|
||||
@@ -2498,6 +2504,10 @@ v:t_number Value of |Number| type. Read-only. See: |type()|
|
||||
v:t_string Value of |String| type. Read-only. See: |type()|
|
||||
*v:t_blob* *t_blob-variable*
|
||||
v:t_blob Value of |Blob| type. Read-only. See: |type()|
|
||||
*v:t_class* *t_class-variable*
|
||||
v:t_class Value of |class| type. Read-only. See: |type()|
|
||||
*v:t_object* *t_object-variable*
|
||||
v:t_object Value of |object| type. Read-only. See: |type()|
|
||||
|
||||
*v:termresponse* *termresponse-variable*
|
||||
v:termresponse The escape sequence returned by the terminal for the |t_RV|
|
||||
@@ -2964,6 +2974,8 @@ text...
|
||||
deleted when the script ends). Function-local
|
||||
variables are automatically deleted when the function
|
||||
ends.
|
||||
In |Vim9| script variables declared in a function or
|
||||
script cannot be removed.
|
||||
|
||||
:unl[et] ${env-name} ... *:unlet-environment* *:unlet-$*
|
||||
Remove environment variable {env-name}.
|
||||
|
||||
@@ -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!
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.0. Last change: 2022 Oct 15
|
||||
*index.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1239,6 +1239,7 @@ tag command action ~
|
||||
|:checkpath| :che[ckpath] list included files
|
||||
|:checktime| :checkt[ime] check timestamp of loaded buffers
|
||||
|:chistory| :chi[story] list the error lists
|
||||
|:class| :class start of a class specification
|
||||
|:clast| :cla[st] go to the specified error, default last one
|
||||
|:clearjumps| :cle[arjumps] clear the jump list
|
||||
|:clist| :cl[ist] list all errors
|
||||
@@ -1313,6 +1314,7 @@ tag command action ~
|
||||
|:else| :el[se] part of an :if command
|
||||
|:elseif| :elsei[f] part of an :if command
|
||||
|:emenu| :em[enu] execute a menu by name
|
||||
|:endclass| :endclass end of a class specification
|
||||
|:enddef| :enddef end of a user function started with :def
|
||||
|:endif| :en[dif] end previous :if
|
||||
|:endfor| :endfo[r] end previous :for
|
||||
@@ -1529,6 +1531,7 @@ tag command action ~
|
||||
|:ptprevious| :ptp[revious] |:tprevious| in preview window
|
||||
|:ptrewind| :ptr[ewind] |:trewind| in preview window
|
||||
|:ptselect| :pts[elect] |:tselect| and show tag in preview window
|
||||
|:public| :public prefix for a class or object member
|
||||
|:put| :pu[t] insert contents of register in the text
|
||||
|:pwd| :pw[d] print current directory
|
||||
|:py3| :py3 execute Python 3 command
|
||||
@@ -1639,6 +1642,7 @@ tag command action ~
|
||||
|:startinsert| :star[tinsert] start Insert mode
|
||||
|:startgreplace| :startg[replace] start Virtual Replace mode
|
||||
|:startreplace| :startr[eplace] start Replace mode
|
||||
|:static| :static prefix for a class member or function
|
||||
|:stopinsert| :stopi[nsert] stop Insert mode
|
||||
|:stjump| :stj[ump] do ":tjump" and split window
|
||||
|:stselect| :sts[elect] do ":tselect" and split window
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -777,8 +777,8 @@ To avoid mapping of the characters you type in insert or Command-line mode,
|
||||
type a CTRL-V first. The mapping in Insert mode is disabled if the 'paste'
|
||||
option is on.
|
||||
*map-error*
|
||||
Note that when an error is encountered (that causes an error message or beep)
|
||||
the rest of the mapping is not executed. This is Vi-compatible.
|
||||
Note that when an error is encountered (that causes an error message or might
|
||||
cause a beep) the rest of the mapping is not executed. This is Vi-compatible.
|
||||
|
||||
Note that the second character (argument) of the commands @zZtTfF[]rm'`"v
|
||||
and CTRL-X is not mapped. This was done to be able to use all the named
|
||||
@@ -1695,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.
|
||||
@@ -1713,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)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
*options.txt* For Vim version 9.0. Last change: 2023 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -34,6 +34,8 @@ achieve special effects. These options come in three forms:
|
||||
key codes are not shown, because they are generated
|
||||
internally and can't be changed. Changing the terminal
|
||||
codes in the GUI is not useful either...
|
||||
The options have the form t_AB, see
|
||||
|terminal-options|.
|
||||
|
||||
:se[t]! termcap Idem, but don't use multiple columns.
|
||||
|
||||
@@ -1249,7 +1251,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
\ ' on word "' .. v:beval_text .. '"'
|
||||
endfunction
|
||||
set bexpr=MyBalloonExpr()
|
||||
set ballooneval
|
||||
set ballooneval balloonevalterm
|
||||
<
|
||||
Also see |balloon_show()|, it can be used if the content of the balloon
|
||||
is to be fetched asynchronously. In that case evaluating
|
||||
@@ -4936,6 +4938,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
CSI ?u request kitty keyboard protocol state
|
||||
CSI >c request the termresponse
|
||||
|
||||
If you notice problems, such as characters being displayed that
|
||||
disappear after `CTRL-L`, you might want to try making this option
|
||||
empty. Then set the 'term' option to have it take effect: >
|
||||
set keyprotocol=
|
||||
let &term = &term
|
||||
|
||||
|
||||
*'keywordprg'* *'kp'*
|
||||
'keywordprg' 'kp' string (default "man" or "man -s", DOS: ":help",
|
||||
@@ -7112,50 +7120,54 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'shortmess'* *'shm'*
|
||||
'shortmess' 'shm' string (Vim default "filnxtToOS", Vi default: "S",
|
||||
POSIX default: "AS")
|
||||
global
|
||||
global *E1336*
|
||||
This option helps to avoid all the |hit-enter| prompts caused by file
|
||||
messages, for example with CTRL-G, and to avoid some other messages.
|
||||
It is a list of flags:
|
||||
flag meaning when present ~
|
||||
f use "(3 of 5)" instead of "(file 3 of 5)"
|
||||
i use "[noeol]" instead of "[Incomplete last line]"
|
||||
l use "999L, 888B" instead of "999 lines, 888 bytes"
|
||||
m use "[+]" instead of "[Modified]"
|
||||
n use "[New]" instead of "[New File]"
|
||||
r use "[RO]" instead of "[readonly]"
|
||||
w use "[w]" instead of "written" for file write message
|
||||
f use "(3 of 5)" instead of "(file 3 of 5)" *shm-f*
|
||||
i use "[noeol]" instead of "[Incomplete last line]" *shm-i*
|
||||
l use "999L, 888B" instead of "999 lines, 888 bytes" *shm-l*
|
||||
m use "[+]" instead of "[Modified]" *shm-m*
|
||||
n use "[New]" instead of "[New File]" *shm-n*
|
||||
r use "[RO]" instead of "[readonly]" *shm-r*
|
||||
w use "[w]" instead of "written" for file write message *shm-w*
|
||||
and "[a]" instead of "appended" for ':w >> file' command
|
||||
x use "[dos]" instead of "[dos format]", "[unix]" instead of
|
||||
"[unix format]" and "[mac]" instead of "[mac format]".
|
||||
a all of the above abbreviations
|
||||
x use "[dos]" instead of "[dos format]", "[unix]" *shm-x*
|
||||
instead of "[unix format]" and "[mac]" instead of "[mac
|
||||
format]"
|
||||
a all of the above abbreviations *shm-a*
|
||||
|
||||
o overwrite message for writing a file with subsequent message
|
||||
for reading a file (useful for ":wn" or when 'autowrite' on)
|
||||
O message for reading a file overwrites any previous message.
|
||||
Also for quickfix message (e.g., ":cn").
|
||||
s don't give "search hit BOTTOM, continuing at TOP" or "search
|
||||
hit TOP, continuing at BOTTOM" messages; when using the search
|
||||
count do not show "W" after the count message (see S below)
|
||||
t truncate file message at the start if it is too long to fit
|
||||
on the command-line, "<" will appear in the left most column.
|
||||
Ignored in Ex mode.
|
||||
T truncate other messages in the middle if they are too long to
|
||||
fit on the command line. "..." will appear in the middle.
|
||||
Ignored in Ex mode.
|
||||
W don't give "written" or "[w]" when writing a file
|
||||
A don't give the "ATTENTION" message when an existing swap file
|
||||
is found.
|
||||
I don't give the intro message when starting Vim |:intro|.
|
||||
c don't give |ins-completion-menu| messages. For example,
|
||||
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
|
||||
"Pattern not found", "Back at original", etc.
|
||||
C don't give messages while scanning for ins-completion items,
|
||||
for instance "scanning tags"
|
||||
q use "recording" instead of "recording @a"
|
||||
F don't give the file info when editing a file, like `:silent`
|
||||
was used for the command; note that this also affects messages
|
||||
from autocommands
|
||||
S do not show search count message when searching, e.g.
|
||||
o overwrite message for writing a file with subsequent *shm-o*
|
||||
message for reading a file (useful for ":wn" or when
|
||||
'autowrite' on)
|
||||
O message for reading a file overwrites any previous *shm-O*
|
||||
message; also for quickfix message (e.g., ":cn")
|
||||
s don't give "search hit BOTTOM, continuing at TOP" or *shm-s*
|
||||
"search hit TOP, continuing at BOTTOM" messages; when using
|
||||
the search count do not show "W" after the count message (see
|
||||
S below)
|
||||
t truncate file message at the start if it is too long *shm-t*
|
||||
to fit on the command-line, "<" will appear in the left most
|
||||
column; ignored in Ex mode
|
||||
T truncate other messages in the middle if they are too *shm-T*
|
||||
long to fit on the command line; "..." will appear in the
|
||||
middle; ignored in Ex mode
|
||||
W don't give "written" or "[w]" when writing a file *shm-W*
|
||||
A don't give the "ATTENTION" message when an existing *shm-A*
|
||||
swap file is found
|
||||
I don't give the intro message when starting Vim, *shm-I*
|
||||
see |:intro|
|
||||
c don't give |ins-completion-menu| messages; for *shm-c*
|
||||
example, "-- XXX completion (YYY)", "match 1 of 2", "The only
|
||||
match", "Pattern not found", "Back at original", etc.
|
||||
C don't give messages while scanning for ins-completion *shm-C*
|
||||
items, for instance "scanning tags"
|
||||
q use "recording" instead of "recording @a" *shm-q*
|
||||
F don't give the file info when editing a file, like *shm-F*
|
||||
`:silent` was used for the command; note that this also
|
||||
affects messages from autocommands
|
||||
S do not show search count message when searching, e.g. *shm-S*
|
||||
"[1/5]"
|
||||
|
||||
This gives you the opportunity to avoid that a change between buffers
|
||||
@@ -7216,9 +7228,26 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- When selecting more than one line, the number of lines.
|
||||
- When selecting a block, the size in screen characters:
|
||||
{lines}x{columns}.
|
||||
This information can be displayed in an alternative location using the
|
||||
'showcmdloc' option.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'showcmdloc'* *'sloc'*
|
||||
'showcmdloc' 'sloc' string (default "last")
|
||||
global
|
||||
This option can be used to display the (partially) entered command in
|
||||
another location. Possible values are:
|
||||
last Last line of the screen (default).
|
||||
statusline Status line of the current window.
|
||||
tabline First line of the screen if 'showtabline' is enabled.
|
||||
Setting this option to "statusline" or "tabline" means that these will
|
||||
be redrawn whenever the command changes, which can be on every key
|
||||
pressed.
|
||||
The %S 'statusline' item can be used in 'statusline' or 'tabline' to
|
||||
place the text. Without a custom 'statusline' or 'tabline' it will be
|
||||
displayed in a convenient location.
|
||||
|
||||
*'showfulltag'* *'sft'* *'noshowfulltag'* *'nosft'*
|
||||
'showfulltag' 'sft' boolean (default off)
|
||||
global
|
||||
@@ -7657,6 +7686,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
When there is error while evaluating the option then it will be made
|
||||
empty to avoid further errors. Otherwise screen updating would loop.
|
||||
When the result contains unprintable characters the result is
|
||||
unpredictable.
|
||||
|
||||
Note that the only effect of 'ruler' when this option is set (and
|
||||
'laststatus' is 2) is controlling the output of |CTRL-G|.
|
||||
@@ -7716,6 +7747,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
P S Percentage through file of displayed window. This is like the
|
||||
percentage described for 'ruler'. Always 3 in length, unless
|
||||
translated.
|
||||
S S 'showcmd' content, see 'showcmdloc'.
|
||||
a S Argument list status as in default title. ({current} of {max})
|
||||
Empty if the argument file count is zero or one.
|
||||
{ NF Evaluate expression between '%{' and '}' and substitute result.
|
||||
@@ -8647,6 +8679,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set to a name that starts with "xterm", "mlterm", "screen", "tmux",
|
||||
"st" (full match only), "st-" or "stterm", and 'ttymouse' is not set
|
||||
already.
|
||||
If the terminfo/termcap entry "XM" exists and the first number is
|
||||
"1006" then 'ttymouse' will be set to "sgr". This works for many
|
||||
modern terminals.
|
||||
Additionally, if vim is compiled with the |+termresponse| feature and
|
||||
|t_RV| is set to the escape sequence to request the xterm version
|
||||
number, more intelligent detection is done.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1273,6 +1273,21 @@ not "b:current_compiler". What the command actually does is the following:
|
||||
For writing a compiler plugin, see |write-compiler-plugin|.
|
||||
|
||||
|
||||
DOTNET *compiler-dotnet*
|
||||
|
||||
The .NET CLI compiler outputs both errors and warnings by default. The output
|
||||
may be limited to include only errors, by setting the g:dotnet_errors_only
|
||||
variable to |v:true|.
|
||||
|
||||
The associated project name is included in each error and warning. To supress
|
||||
the project name, set the g:dotnet_show_project_file variable to |v:false|.
|
||||
|
||||
Example: limit output to only display errors, and suppress the project name: >
|
||||
let dotnet_errors_only = v:true
|
||||
let dotnet_show_project_file = v:false
|
||||
compiler dotnet
|
||||
<
|
||||
|
||||
GCC *quickfix-gcc* *compiler-gcc*
|
||||
|
||||
There's one variable you can set for the GCC compiler:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -902,7 +902,8 @@ Short explanation of each option: *option-list*
|
||||
'shortmess' 'shm' list of flags, reduce length of messages
|
||||
'shortname' 'sn' Filenames assumed to be 8.3 chars
|
||||
'showbreak' 'sbr' string to use at the start of wrapped lines
|
||||
'showcmd' 'sc' show (partial) command in status line
|
||||
'showcmd' 'sc' show (partial) command somewhere
|
||||
'showcmdloc' 'sloc' where to show (partial) command
|
||||
'showfulltag' 'sft' show full tag pattern when completing tag
|
||||
'showmatch' 'sm' briefly jump to matching bracket if insert one
|
||||
'showmode' 'smd' message on status line to show current mode
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 9.0. Last change: 2021 Dec 05
|
||||
*sign.txt* For Vim version 9.0. Last change: 2022 Dec 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@@ -625,9 +625,9 @@ sign_placelist({list})
|
||||
then a new unique identifier is allocated.
|
||||
Otherwise the specified number is used. See
|
||||
|sign-identifier| for more information.
|
||||
lnum line number in the buffer {expr} where the
|
||||
sign is to be placed. For the accepted values,
|
||||
see |line()|.
|
||||
lnum line number in the buffer where the sign is to
|
||||
be placed. For the accepted values, see
|
||||
|line()|.
|
||||
name name of the sign to place. See |sign_define()|
|
||||
for more information.
|
||||
priority priority of the sign. When multiple signs are
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Nov 15
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -3621,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
|
||||
@@ -4995,7 +5003,7 @@ in their own color.
|
||||
|
||||
*highlight-clear* *:hi-clear*
|
||||
:hi[ghlight] clear Reset all highlighting to the defaults. Removes all
|
||||
highlighting for groups added by the user!
|
||||
highlighting for groups added by the user.
|
||||
Uses the current value of 'background' to decide which
|
||||
default colors to use.
|
||||
If there was a default link, restore it. |:hi-link|
|
||||
|
||||
127
runtime/doc/tags
127
runtime/doc/tags
@@ -438,10 +438,8 @@ $quote eval.txt /*$quote*
|
||||
'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'*
|
||||
@@ -926,6 +924,7 @@ $quote eval.txt /*$quote*
|
||||
'shortname' options.txt /*'shortname'*
|
||||
'showbreak' options.txt /*'showbreak'*
|
||||
'showcmd' options.txt /*'showcmd'*
|
||||
'showcmdloc' options.txt /*'showcmdloc'*
|
||||
'showfulltag' options.txt /*'showfulltag'*
|
||||
'showmatch' options.txt /*'showmatch'*
|
||||
'showmode' options.txt /*'showmode'*
|
||||
@@ -938,6 +937,7 @@ $quote eval.txt /*$quote*
|
||||
'siso' options.txt /*'siso'*
|
||||
'sj' options.txt /*'sj'*
|
||||
'slm' options.txt /*'slm'*
|
||||
'sloc' options.txt /*'sloc'*
|
||||
'slow' vi_diff.txt /*'slow'*
|
||||
'slowopen' vi_diff.txt /*'slowopen'*
|
||||
'sm' options.txt /*'sm'*
|
||||
@@ -1061,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'*
|
||||
@@ -1081,6 +1082,7 @@ $quote eval.txt /*$quote*
|
||||
't_VS' term.txt /*'t_VS'*
|
||||
't_WP' term.txt /*'t_WP'*
|
||||
't_WS' term.txt /*'t_WS'*
|
||||
't_XM' term.txt /*'t_XM'*
|
||||
't_ZH' term.txt /*'t_ZH'*
|
||||
't_ZR' term.txt /*'t_ZR'*
|
||||
't_al' term.txt /*'t_al'*
|
||||
@@ -2164,7 +2166,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*
|
||||
@@ -2200,6 +2202,7 @@ $quote eval.txt /*$quote*
|
||||
:aun gui.txt /*:aun*
|
||||
:aunmenu gui.txt /*:aunmenu*
|
||||
:autocmd autocmd.txt /*:autocmd*
|
||||
:autocmd-block autocmd.txt /*:autocmd-block*
|
||||
:autocmd-verbose autocmd.txt /*:autocmd-verbose*
|
||||
:b windows.txt /*:b*
|
||||
:bN windows.txt /*:bN*
|
||||
@@ -2324,7 +2327,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*
|
||||
@@ -2501,15 +2504,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*
|
||||
@@ -2518,7 +2521,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*
|
||||
@@ -2648,7 +2651,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*
|
||||
@@ -3016,6 +3019,7 @@ $quote eval.txt /*$quote*
|
||||
:pts tagsrch.txt /*:pts*
|
||||
:ptselect tagsrch.txt /*:ptselect*
|
||||
:pu change.txt /*:pu*
|
||||
:public vim9class.txt /*:public*
|
||||
:put change.txt /*:put*
|
||||
:pw editing.txt /*:pw*
|
||||
:pwd editing.txt /*:pwd*
|
||||
@@ -3285,7 +3289,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*
|
||||
@@ -3463,7 +3467,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*
|
||||
@@ -3987,6 +3991,7 @@ CTRL-{char} intro.txt /*CTRL-{char}*
|
||||
Channel eval.txt /*Channel*
|
||||
Channels eval.txt /*Channels*
|
||||
Chinese mbyte.txt /*Chinese*
|
||||
Class vim9class.txt /*Class*
|
||||
Cmd-event autocmd.txt /*Cmd-event*
|
||||
CmdUndefined autocmd.txt /*CmdUndefined*
|
||||
Cmdline cmdline.txt /*Cmdline*
|
||||
@@ -4365,10 +4370,52 @@ E131 userfunc.txt /*E131*
|
||||
E1310 gui.txt /*E1310*
|
||||
E1311 map.txt /*E1311*
|
||||
E1312 windows.txt /*E1312*
|
||||
E1313 eval.txt /*E1313*
|
||||
E1314 vim9class.txt /*E1314*
|
||||
E1315 vim9class.txt /*E1315*
|
||||
E1316 vim9class.txt /*E1316*
|
||||
E1317 vim9class.txt /*E1317*
|
||||
E1318 vim9class.txt /*E1318*
|
||||
E1319 eval.txt /*E1319*
|
||||
E132 userfunc.txt /*E132*
|
||||
E1320 eval.txt /*E1320*
|
||||
E1321 eval.txt /*E1321*
|
||||
E1322 eval.txt /*E1322*
|
||||
E1323 eval.txt /*E1323*
|
||||
E1324 eval.txt /*E1324*
|
||||
E1325 vim9class.txt /*E1325*
|
||||
E1326 vim9class.txt /*E1326*
|
||||
E1327 vim9class.txt /*E1327*
|
||||
E1328 vim9class.txt /*E1328*
|
||||
E1329 vim9class.txt /*E1329*
|
||||
E133 userfunc.txt /*E133*
|
||||
E1330 vim9class.txt /*E1330*
|
||||
E1331 vim9class.txt /*E1331*
|
||||
E1332 vim9class.txt /*E1332*
|
||||
E1333 vim9class.txt /*E1333*
|
||||
E1334 vim9class.txt /*E1334*
|
||||
E1335 vim9class.txt /*E1335*
|
||||
E1336 options.txt /*E1336*
|
||||
E1337 vim9class.txt /*E1337*
|
||||
E1338 vim9class.txt /*E1338*
|
||||
E1339 textprop.txt /*E1339*
|
||||
E134 change.txt /*E134*
|
||||
E1340 vim9class.txt /*E1340*
|
||||
E1341 vim9class.txt /*E1341*
|
||||
E1342 vim9class.txt /*E1342*
|
||||
E1343 vim9class.txt /*E1343*
|
||||
E1344 vim9class.txt /*E1344*
|
||||
E1345 vim9class.txt /*E1345*
|
||||
E1346 vim9class.txt /*E1346*
|
||||
E1347 vim9class.txt /*E1347*
|
||||
E1348 vim9class.txt /*E1348*
|
||||
E1349 vim9class.txt /*E1349*
|
||||
E135 autocmd.txt /*E135*
|
||||
E1350 vim9class.txt /*E1350*
|
||||
E1351 vim9class.txt /*E1351*
|
||||
E1352 vim9class.txt /*E1352*
|
||||
E1353 vim9class.txt /*E1353*
|
||||
E1354 vim9class.txt /*E1354*
|
||||
E136 starting.txt /*E136*
|
||||
E137 starting.txt /*E137*
|
||||
E138 starting.txt /*E138*
|
||||
@@ -5424,6 +5471,7 @@ OS390-bugs os_390.txt /*OS390-bugs*
|
||||
OS390-has-ebcdic os_390.txt /*OS390-has-ebcdic*
|
||||
OS390-limitations os_390.txt /*OS390-limitations*
|
||||
OS390-open-source os_390.txt /*OS390-open-source*
|
||||
Object vim9class.txt /*Object*
|
||||
OffTheSpot mbyte.txt /*OffTheSpot*
|
||||
OnTheSpot mbyte.txt /*OnTheSpot*
|
||||
Operator-pending intro.txt /*Operator-pending*
|
||||
@@ -5583,7 +5631,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*
|
||||
@@ -6254,6 +6309,9 @@ cino-w indent.txt /*cino-w*
|
||||
cino-{ indent.txt /*cino-{*
|
||||
cino-} indent.txt /*cino-}*
|
||||
cinoptions-values indent.txt /*cinoptions-values*
|
||||
class vim9class.txt /*class*
|
||||
class-function vim9class.txt /*class-function*
|
||||
class-member vim9class.txt /*class-member*
|
||||
clear-undo undo.txt /*clear-undo*
|
||||
clearmatches() builtin.txt /*clearmatches()*
|
||||
client-server remote.txt /*client-server*
|
||||
@@ -6310,6 +6368,7 @@ compile-changes-8 version8.txt /*compile-changes-8*
|
||||
compile-changes-9 version9.txt /*compile-changes-9*
|
||||
compiler-compaqada ft_ada.txt /*compiler-compaqada*
|
||||
compiler-decada ft_ada.txt /*compiler-decada*
|
||||
compiler-dotnet quickfix.txt /*compiler-dotnet*
|
||||
compiler-gcc quickfix.txt /*compiler-gcc*
|
||||
compiler-gnat ft_ada.txt /*compiler-gnat*
|
||||
compiler-hpada ft_ada.txt /*compiler-hpada*
|
||||
@@ -6827,6 +6886,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*
|
||||
@@ -6968,6 +7028,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*
|
||||
@@ -8000,6 +8061,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*
|
||||
@@ -8168,6 +8230,7 @@ keypad-point intro.txt /*keypad-point*
|
||||
keys() builtin.txt /*keys()*
|
||||
keytrans() builtin.txt /*keytrans()*
|
||||
kitty-keyboard-protocol map.txt /*kitty-keyboard-protocol*
|
||||
kitty-terminal term.txt /*kitty-terminal*
|
||||
known-bugs todo.txt /*known-bugs*
|
||||
l motion.txt /*l*
|
||||
l: eval.txt /*l:*
|
||||
@@ -8445,6 +8508,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-reporting term.txt /*mouse-reporting*
|
||||
mouse-scrolling-off scroll.txt /*mouse-scrolling-off*
|
||||
mouse-swap-buttons term.txt /*mouse-swap-buttons*
|
||||
mouse-using term.txt /*mouse-using*
|
||||
@@ -8863,6 +8927,14 @@ nr2char() builtin.txt /*nr2char()*
|
||||
nroff.vim syntax.txt /*nroff.vim*
|
||||
null vim9.txt /*null*
|
||||
null-variable eval.txt /*null-variable*
|
||||
null_blob vim9.txt /*null_blob*
|
||||
null_channel vim9.txt /*null_channel*
|
||||
null_dict vim9.txt /*null_dict*
|
||||
null_function vim9.txt /*null_function*
|
||||
null_job vim9.txt /*null_job*
|
||||
null_list vim9.txt /*null_list*
|
||||
null_partial vim9.txt /*null_partial*
|
||||
null_string vim9.txt /*null_string*
|
||||
number_relativenumber options.txt /*number_relativenumber*
|
||||
numbered-function eval.txt /*numbered-function*
|
||||
numbermax-variable eval.txt /*numbermax-variable*
|
||||
@@ -8872,6 +8944,7 @@ o insert.txt /*o*
|
||||
o_CTRL-V motion.txt /*o_CTRL-V*
|
||||
o_V motion.txt /*o_V*
|
||||
o_v motion.txt /*o_v*
|
||||
object vim9class.txt /*object*
|
||||
object-motions motion.txt /*object-motions*
|
||||
object-select motion.txt /*object-select*
|
||||
objects index.txt /*objects*
|
||||
@@ -9530,6 +9603,28 @@ shellescape() builtin.txt /*shellescape()*
|
||||
shift intro.txt /*shift*
|
||||
shift-left-right change.txt /*shift-left-right*
|
||||
shiftwidth() builtin.txt /*shiftwidth()*
|
||||
shm-A options.txt /*shm-A*
|
||||
shm-C options.txt /*shm-C*
|
||||
shm-F options.txt /*shm-F*
|
||||
shm-I options.txt /*shm-I*
|
||||
shm-O options.txt /*shm-O*
|
||||
shm-S options.txt /*shm-S*
|
||||
shm-T options.txt /*shm-T*
|
||||
shm-W options.txt /*shm-W*
|
||||
shm-a options.txt /*shm-a*
|
||||
shm-c options.txt /*shm-c*
|
||||
shm-f options.txt /*shm-f*
|
||||
shm-i options.txt /*shm-i*
|
||||
shm-l options.txt /*shm-l*
|
||||
shm-m options.txt /*shm-m*
|
||||
shm-n options.txt /*shm-n*
|
||||
shm-o options.txt /*shm-o*
|
||||
shm-q options.txt /*shm-q*
|
||||
shm-r options.txt /*shm-r*
|
||||
shm-s options.txt /*shm-s*
|
||||
shm-t options.txt /*shm-t*
|
||||
shm-w options.txt /*shm-w*
|
||||
shm-x options.txt /*shm-x*
|
||||
short-name-changed version4.txt /*short-name-changed*
|
||||
showing-menus gui.txt /*showing-menus*
|
||||
sign-column sign.txt /*sign-column*
|
||||
@@ -9586,6 +9681,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*
|
||||
@@ -9800,6 +9896,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*
|
||||
@@ -9910,6 +10007,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*
|
||||
@@ -9930,6 +10028,7 @@ t_Us term.txt /*t_Us*
|
||||
t_VS term.txt /*t_VS*
|
||||
t_WP term.txt /*t_WP*
|
||||
t_WS term.txt /*t_WS*
|
||||
t_XM term.txt /*t_XM*
|
||||
t_ZH term.txt /*t_ZH*
|
||||
t_ZR term.txt /*t_ZR*
|
||||
t_al term.txt /*t_al*
|
||||
@@ -10246,6 +10345,7 @@ test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
|
||||
test_getvalue() testing.txt /*test_getvalue()*
|
||||
test_gui_event() testing.txt /*test_gui_event()*
|
||||
test_ignore_error() testing.txt /*test_ignore_error()*
|
||||
test_mswin_event() testing.txt /*test_mswin_event()*
|
||||
test_null_blob() testing.txt /*test_null_blob()*
|
||||
test_null_channel() testing.txt /*test_null_channel()*
|
||||
test_null_dict() testing.txt /*test_null_dict()*
|
||||
@@ -10774,6 +10874,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*
|
||||
@@ -10865,6 +10966,8 @@ 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*
|
||||
@@ -10999,6 +11102,7 @@ xterm-cursor-keys term.txt /*xterm-cursor-keys*
|
||||
xterm-end-home-keys term.txt /*xterm-end-home-keys*
|
||||
xterm-focus-event term.txt /*xterm-focus-event*
|
||||
xterm-function-keys term.txt /*xterm-function-keys*
|
||||
xterm-kitty term.txt /*xterm-kitty*
|
||||
xterm-modifier-keys term.txt /*xterm-modifier-keys*
|
||||
xterm-mouse options.txt /*xterm-mouse*
|
||||
xterm-mouse-wheel scroll.txt /*xterm-mouse-wheel*
|
||||
@@ -11007,6 +11111,7 @@ xterm-save-screen tips.txt /*xterm-save-screen*
|
||||
xterm-screens tips.txt /*xterm-screens*
|
||||
xterm-scroll-region term.txt /*xterm-scroll-region*
|
||||
xterm-shifted-keys term.txt /*xterm-shifted-keys*
|
||||
xterm-terminfo-entries term.txt /*xterm-terminfo-entries*
|
||||
xterm-true-color term.txt /*xterm-true-color*
|
||||
y change.txt /*y*
|
||||
yaml.vim syntax.txt /*yaml.vim*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 9.0. Last change: 2022 Oct 21
|
||||
*term.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -88,7 +88,8 @@ Output resumes when you hit <BS>.
|
||||
|
||||
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'.
|
||||
shell command or exiting Vim. To avoid this use 't_TI' and 't_TE' (but make
|
||||
sure to add to them, not overwrite).
|
||||
|
||||
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
|
||||
@@ -117,6 +118,10 @@ have a problem with this, disable bracketed paste by putting this in your
|
||||
If this is done while Vim is running the 't_BD' will be sent to the terminal
|
||||
to disable bracketed paste.
|
||||
|
||||
If |t_PS| or |t_PE| is not set, then |t_BE| will not be used. This is to make
|
||||
sure that bracketed paste is not enabled when the escape codes surrounding
|
||||
pasted text cannot be recognized.
|
||||
|
||||
If your terminal supports bracketed paste, but the options are not set
|
||||
automatically, you can try using something like this: >
|
||||
|
||||
@@ -126,7 +131,11 @@ automatically, you can try using something like this: >
|
||||
exec "set t_PS=\e[200~"
|
||||
exec "set t_PE=\e[201~"
|
||||
endif
|
||||
<
|
||||
|
||||
The terminfo entries "BE", "BD", "PS" and "PE" were added in ncurses version
|
||||
6.4, early 2023, for some terminals. If you have this version then you may
|
||||
not have to manually configure your terminal.
|
||||
|
||||
*tmux-integration*
|
||||
If you experience issues when running Vim inside tmux, here are a few hints.
|
||||
You can comment-out parts if something doesn't work (it may depend on the
|
||||
@@ -294,6 +303,53 @@ When Vim receives a response to the |t_RV| (request version) sequence and it
|
||||
starts with CSI, it assumes that the terminal is in 8-bit mode and will
|
||||
convert all key sequences to their 8-bit variants.
|
||||
|
||||
*xterm-terminfo-entries*
|
||||
For some time the terminfo entries were insufficient to describe all the
|
||||
features tht Vim can use. The builtin xterm termcap entries did have these,
|
||||
with the result that several terminals that were similar enough to xterm took
|
||||
advantage of these by prefixing "xterm-" to the terminal name in $TERM.
|
||||
|
||||
This leads to problems, because quite often these terminals are not 100%
|
||||
compatible with xterm. At the start of 2023 several entries have been added
|
||||
to the terminfo database to make it possible to use these features without
|
||||
using the "xterm" workaround. These are the relevant entries (so far):
|
||||
|
||||
name xterm value description ~
|
||||
RV "\033[>c" Request version |t_RV|
|
||||
|
||||
BE "\033[?2004h" enable bracketed paste mode |t_BE|
|
||||
BD "\033[?2004l" disable bracketed paste mode |t_BD|
|
||||
PS "\033[200~" pasted text start |t_PS|
|
||||
PE "\033[201~" pasted text end |t_PE|
|
||||
|
||||
XM "\033[?1006;1000%?%p1%{1}%=%th%el%;"
|
||||
mouse enable / disable |t_XM|
|
||||
|
||||
*xterm-kitty* *kitty-terminal*
|
||||
The Kitty terminal is a special case. Mainly because it works differently
|
||||
from most other terminals, but also because, instead of trying the fit in and
|
||||
make it behave like other terminals by default, it dictates how applications
|
||||
need to work when using Kitty. This makes it very difficult for Vim to work
|
||||
in a Kitty terminal. Some exceptions have been hard coded, but it is not at
|
||||
all nice to have to make exceptions for one specific terminal.
|
||||
|
||||
One of the problems is that the value for $TERM is set to "xterm-kitty". For
|
||||
Vim this is an indication that the terminal is xterm-compatible and the
|
||||
builtin xterm termcap entries should be used. Many other terminals depend on
|
||||
this. However, Kitty is not fully xterm compatible. The author suggested to
|
||||
ignore the "xterm-" prefix and use the terminfo entry anyway, so that is what
|
||||
happens now, the builtin xterm termcap entries are not used. However, the
|
||||
t_RV is set, otherwise other things would not work, such as automatically
|
||||
setting 'ttymouse' to "sgr" (at least until |t_XM| is being used for this).
|
||||
|
||||
It is not clear why kitty sets $TERM to "xterm-kitty", the terminal isn't
|
||||
really xterm compatible. "kitty" would be more appropriate, but a terminfo
|
||||
entry with that name is not widespread.
|
||||
|
||||
Note that using the kitty keyboard protocol is a separate feature, see
|
||||
|kitty-keyboard-protocol|.
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Terminal options *terminal-options* *termcap-options* *E436*
|
||||
|
||||
@@ -393,6 +449,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_XM enable/disable mouse reporting, *t_XM* *'t_XM'*
|
||||
see |mouse-reporting| below
|
||||
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'*
|
||||
@@ -423,10 +481,10 @@ Added by Vim (there are no standard codes for these):
|
||||
t_Si save icon text to stack *t_Si* *'t_Si'*
|
||||
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
|
||||
t_TE end of "raw" mode *t_TE* *'t_TE'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
|xterm-focus-event|
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
@@ -436,8 +494,8 @@ by the termcap option, the middle part is text.
|
||||
set cursor color: t_SC {color name} t_EC
|
||||
|
||||
t_SH must take one argument:
|
||||
0, 1 or none blinking block cursor
|
||||
2 block cursor
|
||||
0, 1 or none blinking block cursor
|
||||
2 block cursor
|
||||
3 blinking underline cursor
|
||||
4 underline cursor
|
||||
5 blinking vertical bar cursor
|
||||
@@ -446,6 +504,21 @@ t_SH must take one argument:
|
||||
t_RS is sent only if the response to t_RV has been received. It is not used
|
||||
on Mac OS when Terminal.app could be recognized from the termresponse.
|
||||
|
||||
*mouse-reporting*
|
||||
Many terminals can report mouse clicks and some can report mouse movement and
|
||||
dragging. Vim needs to know what codes are being used for this.
|
||||
|
||||
The "XM" terminfo/termcap entry is used for this. Vim also has the 'ttymouse'
|
||||
option to specify the mouse protocol being used. See the option for the
|
||||
possible values.
|
||||
|
||||
If Vim can read the "XM" terminfo/termcap entry then it will be used for
|
||||
enabling and disabling the mouse reporting. If it is missing, then the value
|
||||
from 'ttymouse' is used to decide how to do this.
|
||||
|
||||
If the "XM" entry exists and the first number is "1006" then 'ttymouse' will
|
||||
be set to "sgr", unless it was already set earlier.
|
||||
|
||||
|
||||
KEY CODES *terminal-key-codes*
|
||||
Note: Use the <> form if possible
|
||||
@@ -506,6 +579,7 @@ Note: Use the <> form if possible
|
||||
t_%1 <Help> help key *t_%1* *'t_%1'*
|
||||
t_&8 <Undo> undo key *t_&8* *'t_&8'*
|
||||
t_kI <Insert> insert key *t_kI* *'t_kI'*
|
||||
<kInsert> keypad insert key
|
||||
t_kD <Del> delete key *t_kD* *'t_kD'*
|
||||
t_kb <BS> backspace key *t_kb* *'t_kb'*
|
||||
t_kB <S-Tab> back-tab (shift-tab) *<S-Tab>* *t_kB* *'t_kB'*
|
||||
@@ -538,9 +612,13 @@ Note: Use the <> form if possible
|
||||
t_KK <k8> keypad 8 *<k8>* *t_KK* *'t_KK'*
|
||||
t_KL <k9> keypad 9 *<k9>* *t_KL* *'t_KL'*
|
||||
<Mouse> leader of mouse code *<Mouse>*
|
||||
*t_PS* *'t_PS'*
|
||||
t_PS start of bracketed paste |xterm-bracketed-paste|
|
||||
t_PE end of bracketed paste |xterm-bracketed-paste| *t_PE* *'t_PE'*
|
||||
|
||||
t_PS <PasteStart> start of bracketed paste *t_PS* *'t_PS'*
|
||||
|xterm-bracketed-paste|
|
||||
t_PE <PasteEnd> end of bracketed paste *t_PE* *'t_PE'*
|
||||
|xterm-bracketed-paste|
|
||||
<FocusGained> Vim window got focus (internal only)
|
||||
<FocusLost> Vim window lost focus (internal only)
|
||||
|
||||
Note about t_so and t_mr: When the termcap entry "so" is not present the
|
||||
entry for "mr" is used. And vice versa. The same is done for "se" and "me".
|
||||
@@ -579,12 +657,15 @@ work the 'termguicolors' option needs to be set.
|
||||
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|
|
||||
and |t_8b| options explicitly. Default values of these options are
|
||||
"^[[38;2;%lu;%lu;%lum" and "^[[48;2;%lu;%lu;%lum" respectively, but it is only
|
||||
set when `$TERM` is `xterm`. Some terminals accept the same sequences, but
|
||||
with all semicolons replaced by colons (this is actually more compatible, but
|
||||
less widely supported): >
|
||||
For telling the terminal what RGB color to use the |t_8f| and |t_8b| termcap
|
||||
entries are used. These are set by default to values that work for most
|
||||
terminals. If that does not work for your terminal you can set them manually.
|
||||
The default values are set like this: >
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
|
||||
Some terminals accept the same sequences, but with all semicolons replaced by
|
||||
colons (this is actually more compatible, but less widely supported): >
|
||||
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
||||
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
||||
|
||||
@@ -602,7 +683,7 @@ is actually the case.
|
||||
To overrule the default, put this line in your ~/.Xdefaults or
|
||||
~/.Xresources:
|
||||
>
|
||||
XTerm*allowWindowOps: true
|
||||
XTerm*allowWindowOps: true
|
||||
|
||||
And run "xrdb -merge .Xresources" to make it effective. You can check the
|
||||
value with the context menu (right mouse button while CTRL key is pressed),
|
||||
|
||||
@@ -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 Dec 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -94,7 +94,7 @@ test_gui_event({event}, {args})
|
||||
"findrepl" search and replace text.
|
||||
"mouse" mouse button click event.
|
||||
"scrollbar" move or drag the scrollbar.
|
||||
"sendevent" send a low-level GUI event.
|
||||
"key" send a low-level keyboard event.
|
||||
"tabline" select a tab page by mouse click.
|
||||
"tabmenu" select a tabline menu entry.
|
||||
|
||||
@@ -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
|
||||
@@ -178,8 +178,8 @@ test_gui_event({event}, {args})
|
||||
dragging: 1 to drag the scrollbar and 0 to click in the
|
||||
scrollbar.
|
||||
|
||||
"sendevent":
|
||||
Send a low-level GUI event (e.g. key-up or down).
|
||||
"key":
|
||||
Send a low-level keyboard event (e.g. key-up or down).
|
||||
Currently only supported on MS-Windows.
|
||||
The supported items in {args} are:
|
||||
event: The supported string values are:
|
||||
@@ -223,6 +223,77 @@ test_ignore_error({expr}) *test_ignore_error()*
|
||||
Can also be used as a |method|: >
|
||||
GetErrorText()->test_ignore_error()
|
||||
|
||||
|
||||
test_mswin_event({event}, {args}) *test_mswin_event()*
|
||||
Generate a low-level MS-Windows {event} with arguments {args}
|
||||
for testing Vim functionality. It works for MS-Windows GUI
|
||||
and for the console.
|
||||
|
||||
{event} is a String and the supported values are:
|
||||
"mouse" mouse event.
|
||||
"key" keyboard event.
|
||||
|
||||
"mouse":
|
||||
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
|
||||
1 middle mouse button
|
||||
2 left mouse button
|
||||
3 mouse button release
|
||||
4 scroll wheel down
|
||||
5 scroll wheel up
|
||||
6 scroll wheel left
|
||||
7 scroll wheel right
|
||||
row: mouse click row number. The first row of the
|
||||
Vim window is 1 and the last row is 'lines'.
|
||||
col: mouse click column number. The maximum value
|
||||
of {col} is 'columns'.
|
||||
Note: row and col are always interpreted as
|
||||
screen cells for the console application.
|
||||
But, they may be interpreted as pixels
|
||||
for the GUI, depending on "cell".
|
||||
multiclick: set to 1 to inject a double-click mouse event.
|
||||
modifiers: key modifiers. The supported values are:
|
||||
4 shift is pressed
|
||||
8 alt is pressed
|
||||
16 ctrl is pressed
|
||||
move: Optional; if used and TRUE then a mouse move
|
||||
event can be generated.
|
||||
Only {args} row: and col: are used and
|
||||
required.
|
||||
Only results in an event when 'mousemoveevent'
|
||||
is set or a popup uses mouse move events.
|
||||
cell: Optional for the GUI: when present and TRUE
|
||||
then "move" uses screen cells instead of pixel
|
||||
positions. Not used by the console.
|
||||
|
||||
"key":
|
||||
Send a low-level keyboard event (e.g. keyup or keydown).
|
||||
The supported items in {args} are:
|
||||
event: The supported string values are:
|
||||
keyup generate a keyup event
|
||||
keydown generate a keydown event
|
||||
keycode: Keycode to use for a keyup or a keydown event.
|
||||
modifiers: Optional; key modifiers.
|
||||
The supported values are:
|
||||
2 shift is pressed
|
||||
4 ctrl is pressed
|
||||
8 alt is pressed
|
||||
Note: These values are different from the
|
||||
mouse modifiers.
|
||||
execute: Optional. Similar to |feedkeys()| mode x.
|
||||
When this is included and set to true
|
||||
(non-zero) then Vim will process any buffered
|
||||
unprocessed key events. All other {args}
|
||||
items are optional when this is set and true.
|
||||
|
||||
Returns TRUE if the event is successfully added or executed,
|
||||
FALSE if there is a failure.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetEvent()->test_mswin_event({args})
|
||||
<
|
||||
|
||||
test_null_blob() *test_null_blob()*
|
||||
Return a |Blob| that is null. Only useful for testing.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Nov 18
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -220,10 +220,16 @@ prop_add({lnum}, {col}, {props})
|
||||
Any Tab and other control character in the text will be
|
||||
changed to a space (Rationale: otherwise the size of the text
|
||||
is difficult to compute).
|
||||
A negative "id" will be chosen and is returned. Once a
|
||||
property with "text" has been added for a buffer then using a
|
||||
negative "id" for any other property will give an error:
|
||||
*E1293*
|
||||
A negative "id" will be chosen and is returned.
|
||||
|
||||
Before text properties with text were supported it was
|
||||
possible to use a negative "id", even though this was very
|
||||
rare. Now that negative "id"s are reserved for text
|
||||
properties with text an error is given when using a negative
|
||||
"id". When a text property with text already exists using a
|
||||
negative "id" results in *E1293* . If a negative "id" was
|
||||
used and later a text property with text is added results in
|
||||
*E1339* .
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->prop_add(col, props)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,26 +38,6 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Keyboard protocol (also see below):
|
||||
- Use the kitty_protocol_state value, similar to seenModifyOtherKeys
|
||||
- When kitty_protocol_state is set then reset seenModifyOtherKeys.
|
||||
Do not set seenModifyOtherKeys for kitty-protocol sequences in
|
||||
handle_key_with_modifier().
|
||||
|
||||
virtual text issues:
|
||||
- #11520 `below` cannot be placed below empty lines
|
||||
James Alvarado looks into it
|
||||
- virtual text `below` highlighted incorrectly when `cursorline` enabled
|
||||
(Issue #11588)
|
||||
|
||||
'smoothscroll':
|
||||
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
|
||||
- computing 'scrolloff' position row use w_skipcol
|
||||
- Check this list: https://github.com/vim/vim/pulls?q=is%3Apr+is%3Aopen+smoothscroll+author%3Aychin
|
||||
- Long line spanning multiple pages: After a few CTRL-E then gj causes a
|
||||
scroll. (Ernie Rael, 18 Nov) Also pressing space or "l"
|
||||
|
||||
|
||||
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.
|
||||
@@ -67,37 +47,84 @@ Upcoming larger works:
|
||||
- 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
|
||||
- Better support for detecting terminal emulator behavior (esp. special key
|
||||
handling) and taking away the need for users to tweak their config.
|
||||
> In the table of names pointing to the list of entries, with an additional
|
||||
one. So that "xterm-kitty" can first load "xterm" and then add "kitty"
|
||||
entries.
|
||||
> Add an "expectKittyEsc" flag (Esc is always sent as a sequence, not one
|
||||
character) and always wait after an Esc for more to come, don't leave
|
||||
Insert mode.
|
||||
-> Request code for Esc after outputting t_KI, use "k!" value.
|
||||
Use response to set "expectKittyEsc".
|
||||
-> Add ESC[>1uESC[?u to t_KI, parse flag response.
|
||||
-> May also send t_RV and delay starting a shell command until the
|
||||
response has been seen, to make sure the other responses don't get read
|
||||
by a shell command.
|
||||
> 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"
|
||||
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- Use Vim9 for more runtime files.
|
||||
- implement :class and :interface: See |vim9-classes| #11544
|
||||
inheritance: how about super()?
|
||||
inheritance: new() method from parent used in child?
|
||||
import/export of a class
|
||||
type() should return different type for each class?
|
||||
give error for shadowing (variable and argument) when defining a class or
|
||||
interface, not later when compiling it.
|
||||
object empty(), len() - can class define a method to be used for them?
|
||||
how about lock/unlock?
|
||||
When checking "implements" also check types of members and function args.
|
||||
- implement :type
|
||||
- implement :enum
|
||||
- implement :class and :interface: See |vim9-classes| #11544
|
||||
- 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)
|
||||
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
|
||||
|
||||
Information missing in terminfo:
|
||||
Priority:
|
||||
- t_RV request terminal version string; xterm: "\033[>c"
|
||||
change in terminfo for "RV" uses the wrong escape sequence... ?
|
||||
Mouse support:
|
||||
on/off: hard coded in mch_setmouse() - use "XM" terminfo/termcap entry;
|
||||
If it starts with "\E[?1006;1000%" then set 'ttymouse' to "sgr".
|
||||
Codes used for focus gained and lost (currently using use_xterm_like_mouse())
|
||||
termcodes are hard-coded in set_termname(), not named.
|
||||
- t_fe enable focus-event tracking
|
||||
- t_fd disable focus-event tracking
|
||||
Underline and similar:
|
||||
- t_AU - Set underline color: like "AF" and "AB" entries.
|
||||
- t_Ce undercurl and underline end
|
||||
- t_Cs undercurl (curly underline) mode
|
||||
- t_Us double underline mode
|
||||
- t_ds dotted underline mode
|
||||
- t_Ds dashed underline mode
|
||||
- t_Te strikethrough end
|
||||
- t_Ts strikethrough mode
|
||||
Cursor codes: |termcap-cursor-shape|
|
||||
- t_RC request terminal cursor blinking
|
||||
- t_RS request terminal cursor style
|
||||
- t_VS cursor normally visible (no blink)
|
||||
- t_SI start insert mode (bar cursor shape)
|
||||
- t_SR start replace mode (underline cursor shape)
|
||||
- t_EI end insert or replace mode (block cursor shape)
|
||||
- t_SC set cursor color start
|
||||
- t_EC set cursor color end
|
||||
- t_SH set cursor shape
|
||||
State requests:
|
||||
- t_RF request terminal foreground color
|
||||
- t_RB request terminal background color
|
||||
Less important (not needed for regular editing):
|
||||
- t_IS set icon text start
|
||||
- t_IE set icon text end
|
||||
- t_ST save window title to stack
|
||||
- t_RT restore window title from stack
|
||||
- t_Si save icon text to stack
|
||||
- t_Ri restore icon text from stack
|
||||
- t_WP set window position (Y, X) in pixels
|
||||
- t_GP get window position (Y, X) in pixels
|
||||
- t_WS set window size (height, width in cells)
|
||||
Vim internal, but there should be a terminfo entry for these:
|
||||
- t_8f set foreground color (R, G, B) in printf() format
|
||||
- t_8b set background color (R, G, B) in printf() format
|
||||
- t_8u set underline color (R, G, B) in printf() format
|
||||
Probably Vim internal, not in terminfo:
|
||||
- t_TE end of "raw" mode
|
||||
- t_TI put terminal into "raw" mode
|
||||
- t_RK request terminal keyboard protocol state; sent after |t_TI|
|
||||
Already working, not properly documented:
|
||||
- t_u7 request cursor position
|
||||
|
||||
Popup windows:
|
||||
- Add a function to redraw a specific popup window. Esp. to be used when
|
||||
editing the command line, when screen updating doesn't happen. (Shougo)
|
||||
@@ -205,6 +232,8 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Patch adds showcmd() function #11708
|
||||
|
||||
Crash when a variable is removed while listing variables (Issue #11435)
|
||||
|
||||
Autoconf: must use autoconf 2.69, later version generates lots of warnings
|
||||
@@ -222,9 +251,6 @@ Add BufDeletePost. #11041
|
||||
|
||||
Add winid arg to col() and charcol() #11466 (request #11461)
|
||||
|
||||
Make the default for 'ttyfast' on, checking $TERM names doesn't make much
|
||||
sense right now, most terminals are fast. #11549
|
||||
|
||||
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")
|
||||
@@ -241,6 +267,17 @@ entered. (#11151)
|
||||
Add 'keywordprg' to various ftplugin files:
|
||||
https://github.com/vim/vim/pull/5566
|
||||
|
||||
PR #11579 to add visualtext(), return Visually selected text.
|
||||
|
||||
Stray characters in the shell #11719, caused by requesting a response for:
|
||||
- XT key sequences
|
||||
- Whether modifyOtherKeys is active
|
||||
- Whether kitty keyboard protocol is active
|
||||
Can we not request XT key sequences, or reduce them drastically?
|
||||
|
||||
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.
|
||||
@@ -257,15 +294,27 @@ 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?
|
||||
|
||||
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?
|
||||
|
||||
Horizontal mouse scroll only works when compiled with GUI? #11374
|
||||
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)
|
||||
@@ -276,8 +325,6 @@ overwritten. Could use ":echowin" and call redraw_cmd() in get_user_input().
|
||||
|
||||
Syntax include problem: #11277. Related to Patch 8.2.2761
|
||||
|
||||
Add str2blob() and blob2str() ? #4049
|
||||
|
||||
To avoid flicker: add an option that when a screen clear is requested, instead
|
||||
of clearing it draws everything and uses "clear to end of line" for every line.
|
||||
Resetting 't_ut' already causes this?
|
||||
@@ -299,6 +346,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.
|
||||
@@ -433,6 +489,10 @@ work.
|
||||
Using "au!" after "filetype on" is a bit slow. Can the matching of
|
||||
autocommands be made faster? (#7056)
|
||||
|
||||
Using a search pattern containing "\%V" and 'hlsearch' set keeps old matches
|
||||
when the Visual area changes. #11694. Do a redraw when starting a Visual
|
||||
selection?
|
||||
|
||||
Append in Visual block mode inserts the wrong character.
|
||||
Test_visual_block_mode() already has the proper check, which is commented out.
|
||||
(#8288)
|
||||
@@ -2668,13 +2728,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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2022 Nov 17
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -187,12 +187,21 @@ See |:verbose-cmd| for more information.
|
||||
If "[expr]" is not given, the number 0 is returned.
|
||||
When a function ends without an explicit ":return",
|
||||
the number 0 is returned.
|
||||
|
||||
In a :def function *E1095* is given if unreachable
|
||||
code follows after the `:return`.
|
||||
In legacy script there is no check for unreachable
|
||||
lines, thus there is no warning if commands follow
|
||||
`:return`.
|
||||
|
||||
`:return`. Also, there is no check if the following
|
||||
line contains a valid command. Forgetting the line
|
||||
continuation backslash may go unnoticed: >
|
||||
return 'some text'
|
||||
.. ' some more text'
|
||||
< Will happily return "some text" without an error. It
|
||||
should have been: >
|
||||
return 'some text'
|
||||
\ .. ' some more text'
|
||||
<
|
||||
If the ":return" is used after a |:try| but before the
|
||||
matching |:finally| (if present), the commands
|
||||
following the ":finally" up to the matching |:endtry|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Dec 20
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -757,6 +757,7 @@ String manipulation: *string-functions*
|
||||
strwidth() size of string when displayed
|
||||
strdisplaywidth() size of string when displayed, deals with tabs
|
||||
setcellwidths() set character cell width overrides
|
||||
getcellwidths() get character cell width overrides
|
||||
substitute() substitute a pattern match with a string
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
strpart() get part of a string using byte index
|
||||
@@ -1031,6 +1032,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
|
||||
|
||||
@@ -1185,6 +1187,7 @@ Testing: *test-functions*
|
||||
test_getvalue() get value of an internal variable
|
||||
test_gui_event() generate a GUI event for testing
|
||||
test_ignore_error() ignore a specific error message
|
||||
test_mswin_event() generate an MS-Windows event
|
||||
test_null_blob() return a null Blob
|
||||
test_null_channel() return a null Channel
|
||||
test_null_dict() return a null Dict
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Nov 04
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Dec 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -496,7 +496,7 @@ T *+visualextra* extra Visual mode commands |blockwise-operators|
|
||||
T *+vreplace* |gR| and |gr|
|
||||
*+vtp* on MS-Windows console: support for 'termguicolors'
|
||||
T *+wildignore* |'wildignore'| Always enabled since 9.0.0278
|
||||
T *+wildmenu* |'wildmenu'|| Always enabled since 9.0.0279
|
||||
T *+wildmenu* |'wildmenu'| Always enabled since 9.0.0279
|
||||
T *+windows* more than one window; Always enabled since 8.0.1118.
|
||||
m *+writebackup* |'writebackup'| is default on
|
||||
m *+xim* X input method |xim|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Nov 14
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 08
|
||||
|
||||
|
||||
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|
|
||||
|
||||
@@ -1023,7 +1023,9 @@ always converted to string: >
|
||||
|
||||
Simple types are Number, Float, Special and Bool. For other types |string()|
|
||||
should be used.
|
||||
*false* *true* *null* *E1034*
|
||||
*false* *true* *null* *null_blob* *null_channel*
|
||||
*null_dict* *null_function* *null_job* *null_list*
|
||||
*null_partial* *null_string* *E1034*
|
||||
In Vim9 script one can use the following predefined values: >
|
||||
true
|
||||
false
|
||||
@@ -1940,73 +1942,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" (similar to TypeScript)
|
||||
- Single inheritance: `class ThisClass extends BaseClass`
|
||||
- `interface` / `endinterface` (looks like a class without any implementation)
|
||||
- Explicit declaration that the class supports an interface, so that type
|
||||
checking works properly:
|
||||
`class SomeClass implements SomeInterface, OtherInterface`
|
||||
- `abstract class` (class with incomplete implementation) - not really needed?
|
||||
- Class (static) methods and Object methods: syntax to be defined.
|
||||
- Class (static) members and Object members: syntax to be defined.
|
||||
- Access control: private / protected / shared / public ? Keep it simple.
|
||||
- Access object members with `this.member` ?
|
||||
- Generics for class: `class <Tkey, Tentry>`
|
||||
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
|
||||
- Method overloading (two methods with the same name but different argument
|
||||
types): Most likely not
|
||||
- Mixins: not sure if that is useful, leave out for simplicity.
|
||||
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
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -2293,18 +2239,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:
|
||||
|
||||
822
runtime/doc/vim9class.txt
Normal file
822
runtime/doc/vim9class.txt
Normal file
@@ -0,0 +1,822 @@
|
||||
*vim9class.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
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
|
||||
< *object* *Object*
|
||||
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})'
|
||||
< *E1317* *E1327*
|
||||
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
|
||||
< *E1335*
|
||||
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.
|
||||
*:public* *E1331*
|
||||
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.
|
||||
*E1334*
|
||||
If you try to set an object member that doesn't exist you get an error: >
|
||||
pos.other = 9
|
||||
< E1334: Object member not found: other ~
|
||||
|
||||
|
||||
Private members ~
|
||||
*E1332* *E1333*
|
||||
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* *E1337* *E1338*
|
||||
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
|
||||
< *E1340* *E1341*
|
||||
Since the name is used as-is, shadowing the name by a function argument name
|
||||
or variable name is not allowed.
|
||||
|
||||
Just like object members the access can be made private by using an underscore
|
||||
as the first character in the name, and it can be made public by prefixing
|
||||
"public": >
|
||||
class OtherThing
|
||||
static total: number # anybody can read, only class can write
|
||||
static _sum: number # only class can read and write
|
||||
public static result: number # anybody can read and write
|
||||
endclass
|
||||
<
|
||||
*class-function*
|
||||
Class functions 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
|
||||
|
||||
If a class declares to implement an interface, all the items specified in the
|
||||
interface must appear in the class, with the same types. *E1348* *E1349*
|
||||
|
||||
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* *Class* *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. *E1316*
|
||||
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.
|
||||
*E1315*
|
||||
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. *E1352* *E1353* *E1354*
|
||||
*implements* *E1346* *E1347*
|
||||
A class can implement one or more interfaces. The "implements" keyword can
|
||||
only appear once *E1350* . Multiple interfaces can be specified, separated by
|
||||
commas. Each interface name can appear only once. *E1351*
|
||||
*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.
|
||||
|
||||
|
||||
Items in a class ~
|
||||
*E1318* *E1325* *E1326*
|
||||
Inside a class, in betweeen `:class` and `:endclass`, these items can appear:
|
||||
- An object member declaration: >
|
||||
this._memberName: memberType
|
||||
this.memberName: memberType
|
||||
public this.memberName: memberType
|
||||
- A constructor method: >
|
||||
def new(arguments)
|
||||
def newName(arguments)
|
||||
- An object method: >
|
||||
def SomeMethod(arguments)
|
||||
< *E1329*
|
||||
For the object member the type must be specified. The best way is to do this
|
||||
explicitly with ": {type}". For simple types you can also use an initializer,
|
||||
such as "= 123", and Vim will see that the type is a number. Avoid doing this
|
||||
for more complex types and when the type will be incomplete. For example: >
|
||||
this.nameList = []
|
||||
This specifies a list, but the item type is unknown. Better use: >
|
||||
this.nameList: list<string>
|
||||
The initialization isn't needed, the list is empty by default.
|
||||
*E1330*
|
||||
Some types cannot be used, such as "void", "null" and "v:none".
|
||||
|
||||
|
||||
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
|
||||
< *E1344*
|
||||
An interface can declare object members, just like in a class but without any
|
||||
initializer.
|
||||
*E1345*
|
||||
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
|
||||
|
||||
An interface name must start with an uppercase letter. *E1343*
|
||||
The "Has" prefix can be used to make it easier to guess this is an interface
|
||||
name, with a hint about what it provides.
|
||||
An interface can only be defined in a |Vim9| script file. *E1342*
|
||||
|
||||
|
||||
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 = v:none, this.age = v:none, this.gender = v:none)
|
||||
enddef
|
||||
|
||||
The "= v:none" default values make the arguments optional. Thus you can also
|
||||
call `new()` without any arguments. No assignment will happen and the default
|
||||
value for the object members will be used. This is a more useful example,
|
||||
with default values: >
|
||||
|
||||
class TextPosition
|
||||
this.lnum: number = 1
|
||||
this.col: number = 1
|
||||
endclass
|
||||
|
||||
If you want the constructor to have mandatory arguments, you need to write it
|
||||
yourself. For example, if for the AutoNew class above you insist on getting
|
||||
the name, you can define the constructor like this: >
|
||||
|
||||
def new(this.name, this.age = v:none, this.gender = v:none)
|
||||
enddef
|
||||
< *E1328*
|
||||
Note that you cannot use another default value than "v:none" here. If you
|
||||
want to initialize the object members, do it where they are declared. This
|
||||
way you only need to look in one place for the default values.
|
||||
|
||||
All object members will be used in the default constructor, also private
|
||||
access ones.
|
||||
|
||||
If the class extends another one, the object members of that class will come
|
||||
first.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
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 "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.
|
||||
|
||||
|
||||
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.
|
||||
|
||||
|
||||
Declaring object and class members ~
|
||||
|
||||
The main choice is whether to use "var" as with variable declarations.
|
||||
TypeScript does not use it: >
|
||||
class Point {
|
||||
x: number;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
Following that Vim object members could be declared like this: >
|
||||
class Point
|
||||
this.x: number
|
||||
this.y = 0
|
||||
endclass
|
||||
|
||||
Some users pointed out that this looks more like an assignment than a
|
||||
declaration. Adding "var" changes that: >
|
||||
class Point
|
||||
var this.x: number
|
||||
var this.y = 0
|
||||
endclass
|
||||
|
||||
We also need to be able to declare class members using the "static" keyword.
|
||||
There we can also choose to leave out "var": >
|
||||
class Point
|
||||
var this.x: number
|
||||
static count = 0
|
||||
endclass
|
||||
|
||||
Or do use it, before "static": >
|
||||
class Point
|
||||
var this.x: number
|
||||
var static count = 0
|
||||
endclass
|
||||
|
||||
Or after "static": >
|
||||
class Point
|
||||
var this.x: number
|
||||
static var count = 0
|
||||
endclass
|
||||
|
||||
This is more in line with "static def Func()".
|
||||
|
||||
There is no clear preference whether to use "var" or not. The two main
|
||||
reasons to leave it out are:
|
||||
1. TypeScript, Java and other popular languages do not use it.
|
||||
2. Less clutter.
|
||||
|
||||
|
||||
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
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -639,6 +639,8 @@ 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
|
||||
@@ -655,9 +657,9 @@ 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, topline: 1, skipcol: 0},
|
||||
1003: {width: 0, height: -1, leftcol: 0, topline: 0, skipcol: 0},
|
||||
1006: {width: 0, height: 1, leftcol: 0, topline: 1, skipcol: 0},
|
||||
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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Nov 23
|
||||
" Last Change: 2022 Dec 19
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -110,9 +110,11 @@ au BufNewFile,BufRead *.a65 setf a65
|
||||
" Applescript
|
||||
au BufNewFile,BufRead *.scpt setf applescript
|
||||
|
||||
" Automake (must be before the *.am pattern)
|
||||
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
|
||||
|
||||
" Applix ELF
|
||||
au BufNewFile,BufRead *.am
|
||||
\ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
|
||||
au BufNewFile,BufRead *.am setf elf
|
||||
|
||||
" ALSA configuration
|
||||
au BufNewFile,BufRead .asoundrc,*/usr/share/alsa/alsa.conf,*/etc/asound.conf setf alsaconf
|
||||
@@ -187,9 +189,6 @@ au BufNewFile,BufRead *.au3 setf autoit
|
||||
" Autohotkey
|
||||
au BufNewFile,BufRead *.ahk setf autohotkey
|
||||
|
||||
" Automake
|
||||
au BufNewFile,BufRead [mM]akefile.am,GNUmakefile.am setf automake
|
||||
|
||||
" Autotest .at files are actually m4
|
||||
au BufNewFile,BufRead *.at setf m4
|
||||
|
||||
@@ -265,7 +264,7 @@ au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
|
||||
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
|
||||
|
||||
" Bazel (http://bazel.io)
|
||||
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE setf bzl
|
||||
autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE,WORKSPACE.bzlmod setf bzl
|
||||
if has("fname_case")
|
||||
" There is another check for BUILD further below.
|
||||
autocmd BufRead,BufNewFile *.BUILD,BUILD setf bzl
|
||||
@@ -278,6 +277,9 @@ au BufNewFile,BufRead *.lpc,*.ulpc setf lpc
|
||||
" Calendar
|
||||
au BufNewFile,BufRead calendar setf calendar
|
||||
|
||||
" Cap'n Proto
|
||||
au BufNewFile,BufRead *.capnp setf capnp
|
||||
|
||||
" C#
|
||||
au BufNewFile,BufRead *.cs,*.csx setf cs
|
||||
|
||||
@@ -606,8 +608,8 @@ au BufNewFile,BufRead *.edn
|
||||
\ setf clojure |
|
||||
\ endif
|
||||
|
||||
" EditorConfig (close enough to dosini)
|
||||
au BufNewFile,BufRead .editorconfig setf dosini
|
||||
" EditorConfig
|
||||
au BufNewFile,BufRead .editorconfig setf editorconfig
|
||||
|
||||
" Embedix Component Description
|
||||
au BufNewFile,BufRead *.ecd setf ecd
|
||||
@@ -701,6 +703,9 @@ au BufRead,BufNewFile *.fusion setf fusion
|
||||
" F# or Forth
|
||||
au BufNewFile,BufRead *.fs call dist#ft#FTfs()
|
||||
|
||||
" FHIR Shorthand (FSH)
|
||||
au BufNewFile,BufRead *.fsh setf fsh
|
||||
|
||||
" F#
|
||||
au BufNewFile,BufRead *.fsi,*.fsx setf fsharp
|
||||
|
||||
@@ -847,6 +852,9 @@ au BufNewFile,BufRead *.htpp setf hastepreproc
|
||||
" HCL
|
||||
au BufRead,BufNewFile *.hcl setf hcl
|
||||
|
||||
" Go checksum file (must be before *.sum Hercules)
|
||||
au BufNewFile,BufRead go.sum setf gosum
|
||||
|
||||
" Hercules
|
||||
au BufNewFile,BufRead *.vc,*.ev,*.sum,*.errsum setf hercules
|
||||
|
||||
@@ -993,23 +1001,27 @@ au BufNewFile,BufRead *.jgr setf jgraph
|
||||
" Jovial
|
||||
au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
" Jq
|
||||
au BufNewFile,BufRead *.jq setf jq
|
||||
|
||||
" JSON5
|
||||
au BufNewFile,BufRead *.json5 setf json5
|
||||
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
" Jupyter Notebook is also json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
|
||||
" Other files that look like json
|
||||
au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc setf json
|
||||
au BufNewFile,BufRead .prettierrc,.firebaserc setf json
|
||||
|
||||
" JSONC
|
||||
au BufNewFile,BufRead *.jsonc setf jsonc
|
||||
" JSONC (JSON with comments)
|
||||
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
|
||||
au BufNewFile,BufRead .jshintc,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
|
||||
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
|
||||
" Jsonnet
|
||||
au BufNewFile,BufRead *.jsonnet,*.libsonnet setf jsonnet
|
||||
@@ -1491,7 +1503,7 @@ au BufNewFile,BufRead *.plp setf plp
|
||||
au BufNewFile,BufRead *.po,*.pot setf po
|
||||
|
||||
" Postfix main config
|
||||
au BufNewFile,BufRead main.cf setf pfmain
|
||||
au BufNewFile,BufRead main.cf,main.cf.proto setf pfmain
|
||||
|
||||
" PostScript (+ font files, encapsulated PostScript, Adobe Illustrator)
|
||||
au BufNewFile,BufRead *.ps,*.pfa,*.afm,*.eps,*.epsf,*.epsi,*.ai setf postscr
|
||||
@@ -1855,8 +1867,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
|
||||
@@ -1889,6 +1902,9 @@ au BufNewFile,BufRead *.il,*.ils,*.cdf setf skill
|
||||
au BufNewFile,BufRead .slrnrc setf slrnrc
|
||||
au BufNewFile,BufRead *.score setf slrnsc
|
||||
|
||||
" Smali
|
||||
au BufNewFile,BufRead *.smali setf smali
|
||||
|
||||
" Smalltalk
|
||||
au BufNewFile,BufRead *.st setf st
|
||||
|
||||
@@ -1917,6 +1933,9 @@ au BufNewFile,BufRead *.smi
|
||||
" SMITH
|
||||
au BufNewFile,BufRead *.smt,*.smith setf smith
|
||||
|
||||
" Smithy
|
||||
au BufNewFile,BufRead *.smithy setf smithy
|
||||
|
||||
" Snobol4 and spitbol
|
||||
au BufNewFile,BufRead *.sno,*.spt setf snobol4
|
||||
|
||||
@@ -2087,6 +2106,9 @@ au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
" TeX configuration
|
||||
au BufNewFile,BufRead texmf.cnf setf texmf
|
||||
|
||||
" Thrift (Apache)
|
||||
au BufNewFile,BufRead *.thrift setf thrift
|
||||
|
||||
" Tidy config
|
||||
au BufNewFile,BufRead .tidyrc,tidyrc,tidy.conf setf tidy
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: readline(3) configuration file
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Language: readline(3) configuration file
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Last Change: 2022 Dec 09
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -11,9 +12,25 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo<"
|
||||
|
||||
setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '$if:$else:$endif'
|
||||
let b:undo_ftplugin ..= " | unlet! b:match_ignorecase b:match_words"
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Readline Intialization Files (inputrc .inputrc)\tinputrc;*.inputrc\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
let b:undo_ftplugin ..= " | unlet! b:browsefilter"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
|
||||
@@ -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
|
||||
@@ -1,19 +1,78 @@
|
||||
" Vim indent file
|
||||
" Language: nginx.conf
|
||||
" Maintainer: Chris Aumann <me@chr4.org>
|
||||
" Last Change: 2022 Apr 06
|
||||
" Last Change: 2022 Dec 01
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=
|
||||
setlocal indentexpr=GetNginxIndent()
|
||||
|
||||
" cindent actually works for nginx' simple file structure
|
||||
setlocal cindent
|
||||
setlocal indentkeys=0{,0},0#,!^F,o,O
|
||||
|
||||
" Just make sure that the comments are not reset as defs would be.
|
||||
setlocal cinkeys-=0#
|
||||
let b:undo_indent = 'setl inde< indk<'
|
||||
|
||||
let b:undo_indent = "setl inde< cin< cink<"
|
||||
" Only define the function once.
|
||||
if exists('*GetNginxIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetNginxIndent() abort
|
||||
let plnum = s:PrevNotAsBlank(v:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if plnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(plnum)
|
||||
|
||||
" Add a 'shiftwidth' after '{'
|
||||
if s:AsEndWith(getline(plnum), '{')
|
||||
let ind = ind + shiftwidth()
|
||||
end
|
||||
|
||||
" Subtract a 'shiftwidth' on '}'
|
||||
" This is the part that requires 'indentkeys'.
|
||||
if getline(v:lnum) =~ '^\s*}'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
let pplnum = s:PrevNotAsBlank(plnum - 1)
|
||||
|
||||
if s:IsLineContinuation(plnum)
|
||||
if !s:IsLineContinuation(pplnum)
|
||||
let ind = ind + shiftwidth()
|
||||
end
|
||||
else
|
||||
if s:IsLineContinuation(pplnum)
|
||||
let ind = ind - shiftwidth()
|
||||
end
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" Find the first line at or above {lnum} that is non-blank and not a comment.
|
||||
function s:PrevNotAsBlank(lnum) abort
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
while lnum > 0
|
||||
if getline(lnum) !~ '^\s*#'
|
||||
break
|
||||
endif
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" Check whether {line} ends with {pat}, ignoring trailing comments.
|
||||
function s:AsEndWith(line, pat) abort
|
||||
return a:line =~ a:pat . '\m\s*\%(#.*\)\?$'
|
||||
endfunction
|
||||
|
||||
function s:IsLineContinuation(lnum) abort
|
||||
return a:lnum > 0 && !s:AsEndWith(getline(a:lnum), '[;{}]')
|
||||
endfunction
|
||||
|
||||
134
runtime/indent/testdir/vb.in
Normal file
134
runtime/indent/testdir/vb.in
Normal file
@@ -0,0 +1,134 @@
|
||||
' vim: filetype=vb shiftwidth=4 expandtab
|
||||
'
|
||||
' START_INDENT
|
||||
Public Type GEmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
|
||||
Public Enum InterfaceColors
|
||||
icMistyRose = &HE1E4FF&
|
||||
icSlateGray = &H908070&
|
||||
icDodgerBlue = &HFF901E&
|
||||
icDeepSkyBlue = &HFFBF00&
|
||||
icSpringGreen = &H7FFF00&
|
||||
icForestGreen = &H228B22&
|
||||
icGoldenrod = &H20A5DA&
|
||||
icFirebrick = &H2222B2&
|
||||
End Enum
|
||||
|
||||
Enum SecurityLevel
|
||||
IllegalEntry = -1
|
||||
SecurityLevel1 = 0
|
||||
SecurityLevel2 = 1
|
||||
End Enum
|
||||
|
||||
Public Function TestConditional (number As Integer, ext As String) As Boolean
|
||||
Dim inRange As Boolean
|
||||
|
||||
Select Case number
|
||||
Case <= 0
|
||||
inRange = False
|
||||
Case > 10
|
||||
inRange = False
|
||||
Case Else
|
||||
inRange = True
|
||||
End Select
|
||||
|
||||
' This is a special case identified in the indent script.
|
||||
Select Case number
|
||||
End Select
|
||||
|
||||
If ext = ".xlm" Then
|
||||
If inRange Then
|
||||
TestConditional = True
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
ElseIf ext = ".xlsx" Then
|
||||
If inRange Then
|
||||
TestConditional = False
|
||||
Else
|
||||
TestConditional = True
|
||||
End If
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub TestIterators (lLimit As Integer, uLimit As Integer)
|
||||
Dim a() As Variant
|
||||
Dim elmt As Variant
|
||||
Dim found As Boolean
|
||||
Dim indx As Integer
|
||||
Const specialValue As Integer = 5
|
||||
|
||||
If uLimit < lLimit Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ReDim a(lLimit To uLimit)
|
||||
For indx=lLimit To Ulimit
|
||||
a(indx) = 2 * indx
|
||||
Next indx
|
||||
|
||||
found = False
|
||||
For Each elmt in a
|
||||
If elmt = specialValue Then
|
||||
found = True
|
||||
End If
|
||||
Next elmt
|
||||
|
||||
If found then
|
||||
indx = uLimit
|
||||
Do While indx >= lLimit
|
||||
indx = indx - 1
|
||||
Loop
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub TestMultiline (cellAddr As String, rowNbr As Long)
|
||||
Dim rng As Range
|
||||
|
||||
Set rng = Range(cellAddr)
|
||||
With rng
|
||||
.Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
End With
|
||||
|
||||
' The following lines have whitespace after the underscore character
|
||||
' and therefore do not form a valid multiline statement. The indent
|
||||
' script correctly treats them as four single line statements contrary
|
||||
' to the author's obvious indent.
|
||||
rng..Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TestStmtLabel()
|
||||
GoTo stmtLabel
|
||||
|
||||
' Statement labels are never indented
|
||||
stmtLabel:
|
||||
|
||||
End Sub
|
||||
|
||||
Sub TestTypeKeyword()
|
||||
Type EmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
Dim varType As EmployeeRecord
|
||||
End Sub
|
||||
' END_INDENT
|
||||
134
runtime/indent/testdir/vb.ok
Normal file
134
runtime/indent/testdir/vb.ok
Normal file
@@ -0,0 +1,134 @@
|
||||
' vim: filetype=vb shiftwidth=4 expandtab
|
||||
'
|
||||
' START_INDENT
|
||||
Public Type GEmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
|
||||
Public Enum InterfaceColors
|
||||
icMistyRose = &HE1E4FF&
|
||||
icSlateGray = &H908070&
|
||||
icDodgerBlue = &HFF901E&
|
||||
icDeepSkyBlue = &HFFBF00&
|
||||
icSpringGreen = &H7FFF00&
|
||||
icForestGreen = &H228B22&
|
||||
icGoldenrod = &H20A5DA&
|
||||
icFirebrick = &H2222B2&
|
||||
End Enum
|
||||
|
||||
Enum SecurityLevel
|
||||
IllegalEntry = -1
|
||||
SecurityLevel1 = 0
|
||||
SecurityLevel2 = 1
|
||||
End Enum
|
||||
|
||||
Public Function TestConditional (number As Integer, ext As String) As Boolean
|
||||
Dim inRange As Boolean
|
||||
|
||||
Select Case number
|
||||
Case <= 0
|
||||
inRange = False
|
||||
Case > 10
|
||||
inRange = False
|
||||
Case Else
|
||||
inRange = True
|
||||
End Select
|
||||
|
||||
' This is a special case identified in the indent script.
|
||||
Select Case number
|
||||
End Select
|
||||
|
||||
If ext = ".xlm" Then
|
||||
If inRange Then
|
||||
TestConditional = True
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
ElseIf ext = ".xlsx" Then
|
||||
If inRange Then
|
||||
TestConditional = False
|
||||
Else
|
||||
TestConditional = True
|
||||
End If
|
||||
Else
|
||||
TestConditional = False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub TestIterators (lLimit As Integer, uLimit As Integer)
|
||||
Dim a() As Variant
|
||||
Dim elmt As Variant
|
||||
Dim found As Boolean
|
||||
Dim indx As Integer
|
||||
Const specialValue As Integer = 5
|
||||
|
||||
If uLimit < lLimit Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
ReDim a(lLimit To uLimit)
|
||||
For indx=lLimit To Ulimit
|
||||
a(indx) = 2 * indx
|
||||
Next indx
|
||||
|
||||
found = False
|
||||
For Each elmt in a
|
||||
If elmt = specialValue Then
|
||||
found = True
|
||||
End If
|
||||
Next elmt
|
||||
|
||||
If found then
|
||||
indx = uLimit
|
||||
Do While indx >= lLimit
|
||||
indx = indx - 1
|
||||
Loop
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub TestMultiline (cellAddr As String, rowNbr As Long)
|
||||
Dim rng As Range
|
||||
|
||||
Set rng = Range(cellAddr)
|
||||
With rng
|
||||
.Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
End With
|
||||
|
||||
' The following lines have whitespace after the underscore character
|
||||
' and therefore do not form a valid multiline statement. The indent
|
||||
' script correctly treats them as four single line statements contrary
|
||||
' to the author's obvious indent.
|
||||
rng..Cells(1,1).Value = _
|
||||
"Line 1 of multiline string; " & _
|
||||
"Line 2 of multiline string; " & _
|
||||
"Line 3 of multiline string"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TestStmtLabel()
|
||||
GoTo stmtLabel
|
||||
|
||||
' Statement labels are never indented
|
||||
stmtLabel:
|
||||
|
||||
End Sub
|
||||
|
||||
Sub TestTypeKeyword()
|
||||
Type EmployeeRecord ' Create user-defined type.
|
||||
ID As Integer ' Define elements of data type.
|
||||
Name As String * 20
|
||||
Address As String * 30
|
||||
Phone As Long
|
||||
HireDate As Date
|
||||
End Type
|
||||
Dim varType As EmployeeRecord
|
||||
End Sub
|
||||
' END_INDENT
|
||||
@@ -1,8 +1,12 @@
|
||||
" Vim indent file
|
||||
" Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb)
|
||||
" Author: Johannes Zellner <johannes@zellner.org>
|
||||
" Maintainer: Michael Soyka (mssr953@gmail.com)
|
||||
" Last Change: Fri, 18 Jun 2004 07:22:42 CEST
|
||||
" Small update 2010 Jul 28 by Maxim Kim
|
||||
" 2022/12/15: add support for multiline statements.
|
||||
" 2022/12/21: move VbGetIndent from global to script-local scope
|
||||
" 2022/12/26: recognize "Type" keyword
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@@ -10,28 +14,33 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=VbGetIndent(v:lnum)
|
||||
setlocal indentexpr=s:VbGetIndent(v:lnum)
|
||||
setlocal indentkeys&
|
||||
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:>
|
||||
setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop
|
||||
|
||||
let b:undo_indent = "set ai< indentexpr< indentkeys<"
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*VbGetIndent")
|
||||
if exists("*s:VbGetIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
fun! VbGetIndent(lnum)
|
||||
function s:VbGetIndent(lnum)
|
||||
let this_lnum = a:lnum
|
||||
let this_line = getline(this_lnum)
|
||||
|
||||
" labels and preprocessor get zero indent immediately
|
||||
let this_line = getline(a:lnum)
|
||||
let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)'
|
||||
if this_line =~? LABELS_OR_PREPROC
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Get the current value of "shiftwidth"
|
||||
let bShiftwidth = shiftwidth()
|
||||
|
||||
" Find a non-blank line above the current line.
|
||||
" Skip over labels and preprocessor directives.
|
||||
let lnum = a:lnum
|
||||
let lnum = this_lnum
|
||||
while lnum > 0
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
let previous_line = getline(lnum)
|
||||
@@ -45,34 +54,102 @@ fun! VbGetIndent(lnum)
|
||||
return 0
|
||||
endif
|
||||
|
||||
let ind = indent(lnum)
|
||||
" Variable "previous_line" now contains the text in buffer line "lnum".
|
||||
|
||||
" Multi-line statements have the underscore character at end-of-line:
|
||||
"
|
||||
" object.method(arguments, _
|
||||
" arguments, _
|
||||
" arguments)
|
||||
"
|
||||
" and require extra logic to determine the correct indentation.
|
||||
"
|
||||
" Case 1: Line "lnum" is the first line of a multiline statement.
|
||||
" Line "lnum" will have a trailing underscore character
|
||||
" but the preceding non-blank line does not.
|
||||
" Line "this_lnum" will be indented relative to "lnum".
|
||||
"
|
||||
" Case 2: Line "lnum" is the last line of a multiline statement.
|
||||
" Line "lnum" will not have a trailing underscore character
|
||||
" but the preceding non-blank line will.
|
||||
" Line "this_lnum" will have the same indentation as the starting
|
||||
" line of the multiline statement.
|
||||
"
|
||||
" Case 3: Line "lnum" is neither the first nor last line.
|
||||
" Lines "lnum" and "lnum-1" will have a trailing underscore
|
||||
" character.
|
||||
" Line "this_lnum" will have the same indentation as the preceding
|
||||
" line.
|
||||
"
|
||||
" No matter which case it is, the starting line of the statement must be
|
||||
" found. It will be assumed that multiline statements cannot have
|
||||
" intermingled comments, statement labels, preprocessor directives or
|
||||
" blank lines.
|
||||
"
|
||||
let lnum_is_continued = (previous_line =~ '_$')
|
||||
if lnum > 1
|
||||
let before_lnum = prevnonblank(lnum-1)
|
||||
let before_previous_line = getline(before_lnum)
|
||||
else
|
||||
let before_lnum = 0
|
||||
let before_previous_line = ""
|
||||
endif
|
||||
|
||||
if before_previous_line !~ '_$'
|
||||
" Variable "previous_line" contains the start of a statement.
|
||||
"
|
||||
let ind = indent(lnum)
|
||||
if lnum_is_continued
|
||||
let ind += bShiftwidth
|
||||
endif
|
||||
elseif ! lnum_is_continued
|
||||
" Line "lnum" contains the last line of a multiline statement.
|
||||
" Need to find where this multiline statement begins
|
||||
"
|
||||
while before_lnum > 0
|
||||
let before_lnum -= 1
|
||||
if getline(before_lnum) !~ '_$'
|
||||
let before_lnum += 1
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if before_lnum == 0
|
||||
let before_lnum = 1
|
||||
endif
|
||||
let previous_line = getline(before_lnum)
|
||||
let ind = indent(before_lnum)
|
||||
else
|
||||
" Line "lnum" is not the first or last line of a multiline statement.
|
||||
"
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
|
||||
" Add
|
||||
if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>'
|
||||
let ind = ind + shiftwidth()
|
||||
if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\|enum\|type\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|with\)\>'
|
||||
let ind = ind + bShiftwidth
|
||||
endif
|
||||
|
||||
" Subtract
|
||||
if this_line =~? '^\s*\<end\>\s\+\<select\>'
|
||||
if previous_line !~? '^\s*\<select\>'
|
||||
let ind = ind - 2 * shiftwidth()
|
||||
let ind = ind - 2 * bShiftwidth
|
||||
else
|
||||
" this case is for an empty 'select' -- 'end select'
|
||||
" (w/o any case statements) like:
|
||||
"
|
||||
" select case readwrite
|
||||
" end select
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - bShiftwidth
|
||||
endif
|
||||
elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - bShiftwidth
|
||||
elseif this_line =~? '^\s*\<\(case\|default\)\>'
|
||||
if previous_line !~? '^\s*\<select\>'
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - bShiftwidth
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfun
|
||||
endfunction
|
||||
|
||||
" vim:sw=4
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim indent file placeholder
|
||||
" Language: Vue
|
||||
" Maintainer: None, please volunteer if you have a real Vue indent script
|
||||
" Last Change: 2022 Dec 24
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
" don't set b:did_indent, otherwise html indenting won't be activated
|
||||
" let b:did_indent = 1
|
||||
|
||||
" Html comes closest
|
||||
runtime! indent/html.vim
|
||||
|
||||
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
|
||||
@@ -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.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Nov 23
|
||||
" Last Change: 2022 Dec 16
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@@ -743,10 +743,12 @@ call <SID>AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se
|
||||
call <SID>BinOptionG("terse", &terse)
|
||||
call <SID>AddOption("shortmess", gettext("list of flags to make messages shorter"))
|
||||
call <SID>OptionG("shm", &shm)
|
||||
call <SID>AddOption("showcmd", gettext("show (partial) command keys in the status line"))
|
||||
call <SID>AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'"))
|
||||
let &sc = s:old_sc
|
||||
call <SID>BinOptionG("sc", &sc)
|
||||
set nosc
|
||||
call <SID>AddOption("showcmdloc", gettext("location where to show the (partial) command keys for 'showcmd'"))
|
||||
call <SID>OptionG("sloc", &sloc)
|
||||
call <SID>AddOption("showmode", gettext("display the current mode in the status line"))
|
||||
call <SID>BinOptionG("smd", &smd)
|
||||
call <SID>AddOption("ruler", gettext("show cursor position below each window"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Nov 28
|
||||
" Last Change: 2022 Dec 01
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim syntax support file
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2020 Jan 05
|
||||
" Last Change: 2022 Dec 26
|
||||
"
|
||||
" Additional contributors:
|
||||
"
|
||||
@@ -1881,7 +1881,7 @@ if s:settings.use_css && !s:settings.no_doc
|
||||
endif
|
||||
endif
|
||||
|
||||
if !s:settings.use_css && !s:settings_no_doc
|
||||
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 .'"'
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
21
runtime/syntax/editorconfig.vim
Normal file
21
runtime/syntax/editorconfig.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
" Vim syntax file
|
||||
" Language: EditorConfig
|
||||
" Maintainer: Gregory Anders <greg@gpanders.com>
|
||||
" Last Change: 2023-01-03
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! syntax/dosini.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
syntax match editorconfigUnknownProperty "^\s*\zs\w\+\ze\s*="
|
||||
|
||||
syntax keyword editorconfigProperty root charset end_of_line indent_style
|
||||
syntax keyword editorconfigProperty indent_size tab_width max_line_length
|
||||
syntax keyword editorconfigProperty trim_trailing_whitespace insert_final_newline
|
||||
|
||||
hi def link editorconfigProperty dosiniLabel
|
||||
|
||||
let b:current_syntax = 'editorconfig'
|
||||
@@ -2,8 +2,8 @@
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim
|
||||
" Last Change: 2020 Dec 30
|
||||
" Version: 1.4
|
||||
" Last Change: 2022 Dec 11
|
||||
" Version: 1.6.2
|
||||
"
|
||||
" Credits:
|
||||
" David Necas (Yeti) <yeti@physics.muni.cz>
|
||||
@@ -56,71 +56,124 @@ syn keyword fsMountPointKeyword contained none swap
|
||||
" Type
|
||||
syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown
|
||||
syn match fsTypeUnknown /\s\+\zs\w\+/ contained
|
||||
syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 cfs cgroup cifs coda configfs cpuset cramfs devfs devpts devtmpfs e2compr efs ext2 ext2fs ext3 ext4 fdesc ffs filecore fuse fuseblk fusectl hfs hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfsd nilfs2 none ntfs null nwfs overlay ovlfs pipefs portal proc procfs pstore ptyfs qnx4 reiserfs ramfs romfs securityfs shm smbfs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs udf ufs umap umsdos union usbfs userfs vfat vs3fs vxfs wrapfs wvfs xenfs xfs zisofs
|
||||
syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 ceph cfs cgroup cifs coda coherent configfs cpuset cramfs debugfs devfs devpts devtmpfs dlmfs e2compr ecryptfs efivarfs efs erofs exfat ext2 ext2fs ext3 ext4 f2fs fdesc ffs filecore fuse fuseblk fusectl gfs2 hfs hfsplus hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfs4 nfsd nilfs2 none ntfs ntfs3 null nwfs ocfs2 omfs overlay ovlfs pipefs portal proc procfs pstore ptyfs pvfs2 qnx4 qnx6 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs spufs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs ubifs udf ufs umap umsdos union usbfs userfs v9fs vfat virtiofs vs3fs vxfs wrapfs wvfs xenfs xenix xfs zisofs zonefs
|
||||
|
||||
" Options
|
||||
" -------
|
||||
" Options: General
|
||||
syn cluster fsOptionsCluster contains=fsOperator,fsOptionsGeneral,fsOptionsKeywords,fsTypeUnknown
|
||||
syn match fsOptionsNumber /\d\+/
|
||||
syn match fsOptionsNumberSigned /[-+]\?\d\+/
|
||||
syn match fsOptionsNumberOctal /[0-8]\+/
|
||||
syn match fsOptionsString /[a-zA-Z0-9_-]\+/
|
||||
syn keyword fsOptionsTrueFalse true false
|
||||
syn keyword fsOptionsYesNo yes no
|
||||
syn keyword fsOptionsYN y n
|
||||
syn keyword fsOptions01 0 1
|
||||
syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck
|
||||
syn keyword fsOptionsSize 512 1024 2048
|
||||
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok
|
||||
syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok lazytime
|
||||
syn match fsOptionsGeneral /_netdev/
|
||||
|
||||
syn match fsOptionsKeywords contained /\<x-systemd\.\%(requires\|before\|after\|wanted-by\|required-by\|requires-mounts-for\|idle-timeout\|device-timeout\|mount-timeout\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<x-systemd\.\%(device-bound\|automount\|makefs\|growfs\|rw-only\)/
|
||||
syn match fsOptionsKeywords contained /\<x-initrd\.mount/
|
||||
|
||||
syn match fsOptionsKeywords contained /\<cache=/ nextgroup=fsOptionsCache
|
||||
syn keyword fsOptionsCache yes no none strict loose fscache mmap
|
||||
|
||||
syn match fsOptionsKeywords contained /\<dax=/ nextgroup=fsOptionsDax
|
||||
syn keyword fsOptionsDax inode never always
|
||||
|
||||
syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsErrors
|
||||
syn keyword fsOptionsErrors contained continue panic withdraw remount-ro recover zone-ro zone-offline repair
|
||||
|
||||
syn match fsOptionsKeywords contained /\<\%(sec\)=/ nextgroup=fsOptionsSecurityMode
|
||||
syn keyword fsOptionsSecurityMode contained none krb5 krb5i ntlm ntlmi ntlmv2 ntlmv2i ntlmssp ntlmsspi sys lkey lkeyi lkeyp spkm spkmi spkmp
|
||||
|
||||
" Options: adfs
|
||||
syn match fsOptionsKeywords contained /\<\%([ug]id\|o\%(wn\|th\)mask\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<ftsuffix=/ nextgroup=fsOptions01
|
||||
|
||||
" Options: affs
|
||||
syn match fsOptionsKeywords contained /\<\%(set[ug]id\|mode\|reserved\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<mode=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(set[ug]id\|reserved\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(prefix\|volume\|root\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<bs=/ nextgroup=fsOptionsSize
|
||||
syn keyword fsOptionsKeywords contained protect usemp verbose
|
||||
syn keyword fsOptionsKeywords contained protect usemp verbose nofilenametruncate mufs
|
||||
|
||||
" Options: btrfs
|
||||
syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|fatal_errors\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(subvol\|subvolid\|subvolrootid\|device\|compress\|compress-force\|check_int_print_mask\|space_cache\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(max_inline\|alloc_start\|thread_pool\|metadata_ratio\|check_int_print_mask\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained degraded nodatasum nodatacow nobarrier ssd ssd_spread noacl notreelog flushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag inode_cache enospc_debug recovery check_int check_int_data skip_balance discard
|
||||
syn match fsOptionsKeywords contained /\<discard=/ nextgroup=fsOptionsBtrfsDiscard
|
||||
syn keyword fsOptionsBtrfsDiscard sync async
|
||||
syn match fsOptionsKeywords contained /\<fatal_errors=/ nextgroup=fsOptionsBtrfsFatalErrors
|
||||
syn keyword fsOptionsBtrfsFatalErrors bug panic
|
||||
syn match fsOptionsKeywords contained /\<fragment=/ nextgroup=fsOptionsBtrfsFragment
|
||||
syn keyword fsOptionsBtrfsFragment data metadata all
|
||||
syn keyword fsOptionsKeywords contained degraded datasum nodatasum datacow nodatacow barrier nobarrier ssd ssd_spread nossd nossd_spread noacl treelog notreelog flushoncommit noflushoncommit space_cache nospace_cache clear_cache user_subvol_rm_allowed autodefrag noautodefrag inode_cache noinode_cache enospc_debug noenospc_debug recovery check_int check_int_data skip_balance discard nodiscard compress compress-force nologreplay rescan_uuid_tree rescue usebackuproot
|
||||
|
||||
" Options: cd9660
|
||||
syn keyword fsOptionsKeywords contained extatt gens norrip nostrictjoilet
|
||||
|
||||
" Options: ceph
|
||||
syn match fsOptionsKeywords contained /\<\%(mon_addr\|fsid\|rasize\|mount_timeout\|caps_max\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained rbytes norbytes nocrc dcache nodcache noasyncreaddir noquotadf nocopyfrom
|
||||
syn match fsOptionsKeywords contained /\<recover_session=/ nextgroup=fsOptionsCephRecoverSession
|
||||
syn keyword fsOptionsCephRecoverSession contained no clean
|
||||
|
||||
" Options: cifs
|
||||
syn match fsOptionsKeywords contained /\<\%(user\|password\|credentials\|servernetbiosname\|servern\|netbiosname\|file_mode\|dir_mode\|ip\|domain\|prefixpath\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(cruid\|backupuid\|backupgid\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained forceuid forcegid guest setuids nosetuids perm noperm dynperm strictcache rwpidforward mapchars nomapchars cifsacl nocase ignorecase nobrl sfu serverino noserverino nounix fsc multiuser posixpaths noposixpaths
|
||||
|
||||
" Options: devpts
|
||||
" -- everything already defined
|
||||
|
||||
" Options: ecryptfs
|
||||
syn match fsOptionsKeywords contained /\<\%(ecryptfs_\%(sig\|fnek_sig\|cipher\|key_bytes\)\|key\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained ecryptfs_passthrough no_sig_cache ecryptfs_encrypted_view ecryptfs_xattr
|
||||
syn match fsOptionsKeywords contained /\<ecryptfs_enable_filename_crypto=/ nextgroup=fsOptionsYN
|
||||
syn match fsOptionsKeywords contained /\<verbosity=/ nextgroup=fsOptions01
|
||||
|
||||
" Options: erofs
|
||||
syn match fsOptionsKeywords contained /\<cache_strategy=/ nextgroup=fsOptionsEroCacheStrategy
|
||||
syn keyword fsOptionsEroCacheStrategy contained disabled readahead readaround
|
||||
|
||||
" Options: ext2
|
||||
syn match fsOptionsKeywords contained /\<check=*/ nextgroup=@fsOptionsCheckCluster
|
||||
syn match fsOptionsKeywords contained /\<errors=/ nextgroup=fsOptionsExt2Errors
|
||||
syn match fsOptionsKeywords contained /\<\%(res[gu]id\|sb\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsExt2Check contained none normal strict
|
||||
syn keyword fsOptionsExt2Errors contained continue panic
|
||||
syn match fsOptionsExt2Errors contained /\<remount-ro\>/
|
||||
syn match fsOptionsErrors contained /\<remount-ro\>/
|
||||
syn keyword fsOptionsKeywords contained acl bsddf minixdf debug grpid bsdgroups minixdf nocheck nogrpid oldalloc orlov sysvgroups nouid32 nobh user_xattr nouser_xattr
|
||||
|
||||
" Options: ext3
|
||||
syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt3Journal
|
||||
syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt3Data
|
||||
syn match fsOptionsKeywords contained /\<data_err=/ nextgroup=fsOptionsExt3DataErr
|
||||
syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<jqfmt=/ nextgroup=fsOptionsExt3Jqfmt
|
||||
syn match fsOptionsKeywords contained /\<\%(usrjquota\|grpjquota\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsExt3Journal contained update inum
|
||||
syn keyword fsOptionsExt3Data contained journal ordered writeback
|
||||
syn keyword fsOptionsExt3DataErr contained ignore abort
|
||||
syn keyword fsOptionsExt3Jqfmt contained vfsold vfsv0 vfsv1
|
||||
syn keyword fsOptionsKeywords contained noload user_xattr nouser_xattr acl
|
||||
|
||||
" Options: ext4
|
||||
syn match fsOptionsKeywords contained /\<journal=/ nextgroup=fsOptionsExt4Journal
|
||||
syn match fsOptionsKeywords contained /\<data=/ nextgroup=fsOptionsExt4Data
|
||||
syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptionsExt4Barrier
|
||||
syn match fsOptionsKeywords contained /\<barrier=/ nextgroup=fsOptions01
|
||||
syn match fsOptionsKeywords contained /\<journal_dev=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<resuid=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<resgid=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<sb=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<commit=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(commit\|inode_readahead_blks\|stripe\|max_batch_time\|min_batch_time\|init_itable\|max_dir_size_kb\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<journal_ioprio=/ nextgroup=fsOptionsExt4JournalIoprio
|
||||
syn keyword fsOptionsExt4Journal contained update inum
|
||||
syn keyword fsOptionsExt4Data contained journal ordered writeback
|
||||
syn match fsOptionsExt4Barrier /[0-1]/
|
||||
syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh
|
||||
syn keyword fsOptionsExt4JournalIoprio contained 0 1 2 3 4 5 6 7
|
||||
syn keyword fsOptionsKeywords contained noload extents orlov oldalloc user_xattr nouser_xattr acl noacl reservation noreservation bsddf minixdf check=none nocheck debug grpid nogroupid sysvgroups bsdgroups quota noquota grpquota usrquota bh nobh journal_checksum nojournal_checksum journal_async_commit delalloc nodelalloc auto_da_alloc noauto_da_alloc noinit_itable block_validity noblock_validity dioread_lock dioread_nolock i_version nombcache prjquota
|
||||
|
||||
" Options: fat
|
||||
syn match fsOptionsKeywords contained /\<blocksize=/ nextgroup=fsOptionsSize
|
||||
@@ -135,39 +188,124 @@ syn keyword fsOptionsConv contained b t a binary text auto
|
||||
syn keyword fsOptionsFatType contained 12 16 32
|
||||
syn keyword fsOptionsKeywords contained quiet sys_immutable showexec dots nodots
|
||||
|
||||
" Options: fuse
|
||||
syn match fsOptionsKeywords contained /\<\%(fd\|user_id\|group_id\|blksize\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(rootmode\)=/ nextgroup=fsOptionsString
|
||||
|
||||
" Options: hfs
|
||||
syn match fsOptionsKeywords contained /\<\%(creator|type\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(creator\|type\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(dir\|file\|\)_umask=/ nextgroup=fsOptionsNumberOctal
|
||||
syn match fsOptionsKeywords contained /\<\%(session\|part\)=/ nextgroup=fsOptionsNumber
|
||||
|
||||
" Options: hfsplus
|
||||
syn match fsOptionsKeywords contained /\<nls=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained decompose nodecompose
|
||||
|
||||
" Options: f2fs
|
||||
syn match fsOptionsKeywords contained /\<background_gc=/ nextgroup=fsOptionsF2fsBackgroundGc
|
||||
syn keyword fsOptionsF2fsBackgroundGc contained on off sync
|
||||
syn match fsOptionsKeywords contained /\<active_logs=/ nextgroup=fsOptionsF2fsActiveLogs
|
||||
syn keyword fsOptionsF2fsActiveLogs contained 2 4 6
|
||||
syn match fsOptionsKeywords contained /\<alloc_mode=/ nextgroup=fsOptionsF2fsAllocMode
|
||||
syn keyword fsOptionsF2fsAllocMode contained reuse default
|
||||
syn match fsOptionsKeywords contained /\<fsync_mode=/ nextgroup=fsOptionsF2fsFsyncMode
|
||||
syn keyword fsOptionsF2fsFsyncMode contained posix strict nobarrier
|
||||
syn match fsOptionsKeywords contained /\<compress_mode=/ nextgroup=fsOptionsF2fsCompressMode
|
||||
syn keyword fsOptionsF2fsCompressMode contained fs user
|
||||
syn match fsOptionsKeywords contained /\<discard_unit=/ nextgroup=fsOptionsF2fsDiscardUnit
|
||||
syn keyword fsOptionsF2fsDiscardUnit contained block segment section
|
||||
syn match fsOptionsKeywords contained /\<memory=/ nextgroup=fsOptionsF2fsMemory
|
||||
syn keyword fsOptionsF2fsMemory contained normal low
|
||||
syn match fsOptionsKeywords contained /\<\%(inline_xattr_size\|reserve_root\|fault_injection\|fault_type\|io_bits\|compress_log_size\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(prjjquota\|test_dummy_encryption\|checkpoint\|compress_algorithm\|compress_extension\|nocompress_extension\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeyWords contained gc_merge nogc_merge disable_roll_forward no_heap disable_ext_identify inline_xattr noinline_xattr inline_data noinline_data inline_dentry noinline_dentry flush_merge fastboot extent_cache noextent_cache data_flush offusrjquota offgrpjquota offprjjquota test_dummy_encryption checkpoint_merge nocheckpoint_merge compress_chksum compress_cache inlinecrypt atgc
|
||||
|
||||
" Options: ffs
|
||||
syn keyword fsOptionsKeyWords contained noperm softdep
|
||||
|
||||
" Options: gfs2
|
||||
syn match fsOptionsKeywords contained /\<\%(lockproto\|locktable\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(quota_quantum\|statfs_quantum\|statfs_percent\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<quota=/ nextgroup=fsOptionsGfs2Quota
|
||||
syn keyword fsOptionsGfs2Quota contained off account on
|
||||
syn keyword fsOptionsKeywords contained localcaching localflocks ignore_local_fs upgrade spectator meta
|
||||
|
||||
" Options: hpfs
|
||||
syn match fsOptionsKeywords contained /\<case=/ nextgroup=fsOptionsHpfsCase
|
||||
syn keyword fsOptionsHpfsCase contained lower asis
|
||||
syn match fsOptionsKeywords contained /\<chkdsk=/ nextgroup=fsOptionsHpfsChkdsk
|
||||
syn keyword fsOptionsHpfsChkdsk contained no errors always
|
||||
syn match fsOptionsKeywords contained /\<eas=/ nextgroup=fsOptionsHpfsEas
|
||||
syn keyword fsOptionsHpfsEas contained no ro rw
|
||||
syn match fsOptionsKeywords contained /\<timeshift=/ nextgroup=fsOptionsNumberSigned
|
||||
|
||||
" Options: iso9660
|
||||
syn match fsOptionsKeywords contained /\<map=/ nextgroup=fsOptionsIsoMap
|
||||
syn match fsOptionsKeywords contained /\<block=/ nextgroup=fsOptionsSize
|
||||
syn match fsOptionsKeywords contained /\<\%(session\|sbsector\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(session\|sbsector\|dmode\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsIsoMap contained n o a normal off acorn
|
||||
syn keyword fsOptionsKeywords contained norock nojoilet unhide cruft
|
||||
syn keyword fsOptionsKeywords contained norock nojoliet hide unhide cruft overriderockperm showassoc
|
||||
syn keyword fsOptionsConv contained m mtext
|
||||
|
||||
" Options: jfs
|
||||
syn keyword fsOptionsKeywords nointegrity integrity
|
||||
|
||||
" Options: nfs
|
||||
syn match fsOptionsKeywords contained /\<\%(rsize\|wsize\|timeo\|retrans\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mounthost\|mountprog\|mountvers\|nfsprog\|nfsvers\|namelen\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock
|
||||
syn match fsOptionsKeywords contained /\<lookupcache=/ nextgroup=fsOptionsNfsLookupCache
|
||||
syn keyword fsOptionsNfsLookupCache contained all none pos positive
|
||||
syn match fsOptionsKeywords contained /\<local_lock=/ nextgroup=fsOptionsNfsLocalLock
|
||||
syn keyword fsOptionsNfsLocalLock contained all flock posix none
|
||||
syn match fsOptionsKeywords contained /\<\%(mounthost\|mountprog\|nfsprog\|namelen\|proto\|mountproto\|clientaddr\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(timeo\|retrans\|[rw]size\|acregmin\|acregmax\|acdirmin\|acdirmax\|actimeo\|retry\|port\|mountport\|mountvers\|namlen\|nfsvers\|vers\|minorversion\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained bg fg soft hard intr cto ac tcp udp lock nobg nofg nosoft nohard nointr noposix nocto noac notcp noudp nolock sharecache nosharecache resvport noresvport rdirplus nordirplus
|
||||
|
||||
" Options: nilfs2
|
||||
syn match fsOptionsKeywords contained /\<order=/ nextgroup=fsOptionsNilfs2Order
|
||||
syn keyword fsOptionsNilfs2Order contained relaxed strict
|
||||
syn match fsOptionsKeywords contained /\<\%([cp]p\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained nogc
|
||||
|
||||
" Options: ntfs
|
||||
syn match fsOptionsKeywords contained /\<mft_zone_multiplier=/ nextgroup=fsOptionsNtfsMftZoneMultiplier
|
||||
syn keyword fsOptionsNtfsMftZoneMultiplier contained 1 2 3 4
|
||||
syn match fsOptionsKeywords contained /\<\%(posix=*\|uni_xlate=\)/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(sloppy\|show_sys_files\|case_sensitive\|disable_sparse\)=/ nextgroup=fsOptionsTrueFalse
|
||||
syn keyword fsOptionsKeywords contained utf8
|
||||
|
||||
" Options: ntfs3
|
||||
syn keyword fsOptionsKeywords contained noacsrules nohidden sparse showmeta prealloc
|
||||
|
||||
" Options: ntfs-3g
|
||||
syn match fsOptionsKeywords contained /\<\%(usermapping\|locale\|streams_interface\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained permissions inherit recover norecover ignore_case remove_hiberfile hide_hid_files hide_dot_files windows_names silent no_def_opts efs_raw compression nocompression no_detach
|
||||
|
||||
" Options: ocfs2
|
||||
syn match fsOptionsKeywords contained /\<\%(resv_level\|dir_resv_level\)=/ nextgroup=fsOptionsOcfs2ResvLevel
|
||||
syn keyword fsOptionsOcfs2ResvLevel contained 0 1 2 3 4 5 6 7 8
|
||||
syn match fsOptionsKeywords contained /\<coherency=/ nextgroup=fsOptionsOcfs2Coherency
|
||||
syn keyword fsOptionsOcfs2Coherency contained full buffered
|
||||
syn match fsOptionsKeywords contained /\<\%(atime_quantum\|preferred_slot\|localalloc\)=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained strictatime inode64
|
||||
|
||||
" Options: overlay
|
||||
syn match fsOptionsKeywords contained /\<redirect_dir=/ nextgroup=fsOptionsOverlayRedirectDir
|
||||
syn keyword fsOptionsOverlayRedirectDir contained on follow off nofollow
|
||||
|
||||
" Options: proc
|
||||
" -- everything already defined
|
||||
syn match fsOptionsKeywords contained /\<\%(hidepid\|subset\)=/ nextgroup=fsOptionsString
|
||||
|
||||
" Options: qnx4
|
||||
syn match fsOptionsKeywords contained /\<bitmap=/ nextgroup=fsOptionsQnx4Bitmap
|
||||
syn keyword fsOptionsQnx4Bitmap contained always lazy nonrmv
|
||||
syn keyword fsOptionsKeywords contained grown noembed overalloc unbusy
|
||||
|
||||
" Options: qnx6
|
||||
syn match fsOptionsKeywords contained /\<hold=/ nextgroup=fsOptionsQnx6Hold
|
||||
syn keyword fsOptionsQnx6Hold contained allow root deny
|
||||
syn match fsOptionsKeywords contained /\<sync=/ nextgroup=fsOptionsQnx6Sync
|
||||
syn keyword fsOptionsQnx6Sync contained mandatory optional none
|
||||
syn match fsOptionsKeywords contained /\<snapshot=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained alignio
|
||||
|
||||
" Options: reiserfs
|
||||
syn match fsOptionsKeywords contained /\<hash=/ nextgroup=fsOptionsReiserHash
|
||||
@@ -176,7 +314,7 @@ syn keyword fsOptionsReiserHash contained rupasov tea r5 detect
|
||||
syn keyword fsOptionsKeywords contained hashed_relocation noborder nolog notail no_unhashed_relocation replayonly
|
||||
|
||||
" Options: sshfs
|
||||
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\|cache\)=/ nextgroup=fsOptionsYesNo
|
||||
syn match fsOptionsKeywords contained /\<\%(BatchMode\|ChallengeResponseAuthentication\|CheckHostIP\|ClearAllForwardings\|Compression\|EnableSSHKeysign\|ForwardAgent\|ForwardX11\|ForwardX11Trusted\|GatewayPorts\|GSSAPIAuthentication\|GSSAPIDelegateCredentials\|HashKnownHosts\|HostbasedAuthentication\|IdentitiesOnly\|NoHostAuthenticationForLocalhost\|PasswordAuthentication\|PubkeyAuthentication\|RhostsRSAAuthentication\|RSAAuthentication\|TCPKeepAlive\|UsePrivilegedPort\)=/ nextgroup=fsOptionsYesNo
|
||||
syn match fsOptionsKeywords contained /\<\%(ControlMaster\|StrictHostKeyChecking\|VerifyHostKeyDNS\)=/ nextgroup=fsOptionsSshYesNoAsk
|
||||
syn match fsOptionsKeywords contained /\<\%(AddressFamily\|BindAddress\|Cipher\|Ciphers\|ControlPath\|DynamicForward\|EscapeChar\|GlobalKnownHostsFile\|HostKeyAlgorithms\|HostKeyAlias\|HostName\|IdentityFile\|KbdInteractiveDevices\|LocalForward\|LogLevel\|MACs\|PreferredAuthentications\|Protocol\|ProxyCommand\|RemoteForward\|RhostsAuthentication\|SendEnv\|SmartcardDevice\|User\|UserKnownHostsFile\|XAuthLocation\|comment\|workaround\|idmap\|ssh_command\|sftp_server\|fsname\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(CompressionLevel\|ConnectionAttempts\|ConnectTimeout\|NumberOfPasswordPrompts\|Port\|ServerAliveCountMax\|ServerAliveInterval\|cache_timeout\|cache_X_timeout\|ssh_protocol\|directport\|max_read\|umask\|uid\|gid\|entry_timeout\|negative_timeout\|attr_timeout\)=/ nextgroup=fsOptionsNumber
|
||||
@@ -190,12 +328,19 @@ syn keyword fsOptionsKeywords contained procuid
|
||||
" Options: swap
|
||||
syn match fsOptionsKeywords contained /\<pri=/ nextgroup=fsOptionsNumber
|
||||
|
||||
" Options: ubifs
|
||||
syn match fsOptionsKeywords contained /\<\%(compr\|auth_key\|auth_hash_name\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained bulk_read no_bulk_read chk_data_crc no_chk_data_crc
|
||||
|
||||
" Options: tmpfs
|
||||
syn match fsOptionsKeywords contained /\<huge=/ nextgroup=fsOptionsTmpfsHuge
|
||||
syn keyword fsOptionsTmpfsHuge contained never always within_size advise deny force
|
||||
syn match fsOptionsKeywords contained /\<\%(size\|mpol\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<nr_\%(blocks\|inodes\)=/ nextgroup=fsOptionsNumber
|
||||
|
||||
" Options: udf
|
||||
syn match fsOptionsKeywords contained /\<\%(anchor\|partition\|lastblock\|fileset\|rootdir\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained unhide undelete strict novrs
|
||||
syn keyword fsOptionsKeywords contained unhide undelete strict nostrict novrs adinicb noadinicb shortad longad
|
||||
|
||||
" Options: ufs
|
||||
syn match fsOptionsKeywords contained /\<ufstype=/ nextgroup=fsOptionsUfsType
|
||||
@@ -208,14 +353,32 @@ syn keyword fsOptionsUfsError contained panic lock umount repair
|
||||
syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)\%(id\|gid\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<\%(dev\|bus\|list\)mode=/ nextgroup=fsOptionsNumberOctal
|
||||
|
||||
" Options: v9fs
|
||||
syn match fsOptionsKeywords contained /\<\%(trans\)=/ nextgroup=fsOptionsV9Trans
|
||||
syn keyword fsOptionsV9Trans unix tcp fd virtio rdma
|
||||
syn match fsOptionsKeywords contained /\<debug=/ nextgroup=fsOptionsV9Debug
|
||||
syn keyword fsOptionsV9Debug 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 0x100 0x200 0x400 0x800
|
||||
syn match fsOptionsKeywords contained /\<version=/ nextgroup=fsOptionsV9Version
|
||||
syn keyword fsOptionsV9Version 9p2000 9p2000.u 9p2000.L
|
||||
syn match fsOptionsKeywords contained /\<\%([ua]name\|[rw]fdno\|access\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<msize=/ nextgroup=fsOptionsNumber
|
||||
syn keyword fsOptionsKeywords contained noextend dfltuid dfltgid afid nodevmap cachetag
|
||||
|
||||
" Options: vfat
|
||||
syn keyword fsOptionsKeywords contained nonumtail posix utf8
|
||||
syn match fsOptionsKeywords contained /shortname=/ nextgroup=fsOptionsVfatShortname
|
||||
syn match fsOptionsKeywords contained /\<shortname=/ nextgroup=fsOptionsVfatShortname
|
||||
syn keyword fsOptionsVfatShortname contained lower win95 winnt mixed
|
||||
syn match fsOptionsKeywords contained /\<nfs=/ nextgroup=fsOptionsVfatNfs
|
||||
syn keyword fsOptionsVfatNfs contained stale_rw nostale_ro
|
||||
syn match fsOptionsKeywords contained /\<\%(tz\|dos1xfloppy\)=/ nextgroup=fsOptionsString
|
||||
syn match fsOptionsKeywords contained /\<\%(allow_utime\|codepage\)=/ nextgroup=fsOptionsNumber
|
||||
syn match fsOptionsKeywords contained /\<time_offset=/ nextgroup=fsOptionsNumberSigned
|
||||
syn keyword fsOptionsKeywords contained nonumtail posix utf8 usefree flush rodir
|
||||
|
||||
" Options: xfs
|
||||
syn match fsOptionsKeywords contained /\%(biosize\|logbufs\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce
|
||||
syn match fsOptionsKeywords contained /\<logbufs=/ nextgroup=fsOptionsXfsLogBufs
|
||||
syn keyword fsOptionsXfsLogBufs contained 2 3 4 5 6 7 8
|
||||
syn match fsOptionsKeywords contained /\%(allocsize\|biosize\|logbsize\|logdev\|rtdev\|sunit\|swidth\)=/ nextgroup=fsOptionsString
|
||||
syn keyword fsOptionsKeywords contained dmapi xdsm noalign noatime noquota norecovery osyncisdsync quota usrquota uqnoenforce grpquota gqnoenforce attr2 noattr2 filestreams ikeep noikeep inode32 inode64 largeio nolargeio nouuid uquota qnoenforce gquota pquota pqnoenforce swalloc wsync
|
||||
|
||||
" Frequency / Pass No.
|
||||
syn cluster fsFreqPassCluster contains=fsFreqPassNumber,fsFreqPassError
|
||||
@@ -257,31 +420,71 @@ hi def link fsMountPointError Error
|
||||
hi def link fsMountPointKeyword Keyword
|
||||
hi def link fsFreqPassError Error
|
||||
|
||||
hi def link fsOptionsBtrfsDiscard String
|
||||
hi def link fsOptionsBtrfsFatalErrors String
|
||||
hi def link fsOptionsBtrfsFragment String
|
||||
hi def link fsOptionsCache String
|
||||
hi def link fsOptionsCephRecoverSession String
|
||||
hi def link fsOptionsConv String
|
||||
hi def link fsOptionsDax String
|
||||
hi def link fsOptionsEroCacheStrategy String
|
||||
hi def link fsOptionsErrors String
|
||||
hi def link fsOptionsExt2Check String
|
||||
hi def link fsOptionsExt3Data String
|
||||
hi def link fsOptionsExt3DataErr String
|
||||
hi def link fsOptionsExt3Journal String
|
||||
hi def link fsOptionsExt3Jqfmt String
|
||||
hi def link fsOptionsExt4Data String
|
||||
hi def link fsOptionsExt4Journal String
|
||||
hi def link fsOptionsExt4JournalIoprio Number
|
||||
hi def link fsOptionsF2fsActiveLogs Number
|
||||
hi def link fsOptionsF2fsAllocMode String
|
||||
hi def link fsOptionsF2fsBackgroundGc String
|
||||
hi def link fsOptionsF2fsCompressMode String
|
||||
hi def link fsOptionsF2fsDiscardUnit String
|
||||
hi def link fsOptionsF2fsFsyncMode String
|
||||
hi def link fsOptionsF2fsMemory String
|
||||
hi def link fsOptionsFatCheck String
|
||||
hi def link fsOptionsFatType Number
|
||||
hi def link fsOptionsGeneral Type
|
||||
hi def link fsOptionsGfs2Quota String
|
||||
hi def link fsOptionsHpfsCase String
|
||||
hi def link fsOptionsHpfsChkdsk String
|
||||
hi def link fsOptionsHpfsEas String
|
||||
hi def link fsOptionsIsoMap String
|
||||
hi def link fsOptionsKeywords Keyword
|
||||
hi def link fsOptionsNfsLocalLock String
|
||||
hi def link fsOptionsNfsLookupCache String
|
||||
hi def link fsOptionsNilfs2Order String
|
||||
hi def link fsOptionsNtfsMftZoneMultiplier Number
|
||||
hi def link fsOptionsNumber Number
|
||||
hi def link fsOptionsNumberOctal Number
|
||||
hi def link fsOptionsString String
|
||||
hi def link fsOptionsSize Number
|
||||
hi def link fsOptionsExt2Check String
|
||||
hi def link fsOptionsExt2Errors String
|
||||
hi def link fsOptionsExt3Journal String
|
||||
hi def link fsOptionsExt3Data String
|
||||
hi def link fsOptionsExt4Journal String
|
||||
hi def link fsOptionsExt4Data String
|
||||
hi def link fsOptionsExt4Barrier Number
|
||||
hi def link fsOptionsFatCheck String
|
||||
hi def link fsOptionsConv String
|
||||
hi def link fsOptionsFatType Number
|
||||
hi def link fsOptionsYesNo String
|
||||
hi def link fsOptionsHpfsCase String
|
||||
hi def link fsOptionsIsoMap String
|
||||
hi def link fsOptionsNumberSigned Number
|
||||
hi def link fsOptionsOcfs2Coherency String
|
||||
hi def link fsOptionsOcfs2ResvLevel Number
|
||||
hi def link fsOptionsOverlayRedirectDir String
|
||||
hi def link fsOptionsQnx4Bitmap String
|
||||
hi def link fsOptionsQnx6Hold String
|
||||
hi def link fsOptionsQnx6Sync String
|
||||
hi def link fsOptionsReiserHash String
|
||||
hi def link fsOptionsSecurityMode String
|
||||
hi def link fsOptionsSize Number
|
||||
hi def link fsOptionsSshYesNoAsk String
|
||||
hi def link fsOptionsUfsType String
|
||||
hi def link fsOptionsString String
|
||||
hi def link fsOptionsTmpfsHuge String
|
||||
hi def link fsOptionsUfsError String
|
||||
|
||||
hi def link fsOptionsUfsType String
|
||||
hi def link fsOptionsV9Debug String
|
||||
hi def link fsOptionsV9Trans String
|
||||
hi def link fsOptionsV9Version String
|
||||
hi def link fsOptionsVfatNfs String
|
||||
hi def link fsOptionsVfatShortname String
|
||||
hi def link fsOptionsXfsLogBufs Number
|
||||
|
||||
hi def link fsOptionsTrueFalse Boolean
|
||||
hi def link fsOptionsYesNo String
|
||||
hi def link fsOptionsYN String
|
||||
hi def link fsOptions01 Number
|
||||
|
||||
let b:current_syntax = "fstab"
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: hg (Mercurial) commit file
|
||||
" Language: hg/sl (Mercurial / Sapling) commit file
|
||||
" Maintainer: Ken Takata <kentkt at csc dot jp>
|
||||
" Last Change: 2012 Aug 23
|
||||
" Filenames: hg-editor-*.txt
|
||||
" Max Coplan <mchcopl@gmail.com>
|
||||
" Last Change: 2022-12-08
|
||||
" License: VIM License
|
||||
" URL: https://github.com/k-takata/hg-vim
|
||||
|
||||
@@ -10,12 +10,15 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match hgcommitComment "^HG:.*$" contains=@NoSpell
|
||||
syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitComment "^\%(SL\|HG\): .*$" contains=@NoSpell
|
||||
syn match hgcommitUser "^\%(SL\|HG\): user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitBranch "^\%(SL\|HG\): branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitAdded "^\%(SL\|HG\): \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment
|
||||
|
||||
syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff
|
||||
syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim
|
||||
|
||||
hi def link hgcommitComment Comment
|
||||
hi def link hgcommitUser String
|
||||
|
||||
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
|
||||
@@ -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
|
||||
|
||||
390
runtime/syntax/shared/hgcommitDiff.vim
Normal file
390
runtime/syntax/shared/hgcommitDiff.vim
Normal file
@@ -0,0 +1,390 @@
|
||||
" Vim syntax file
|
||||
" Language: Sapling / Mecurial Diff (context or unified)
|
||||
" Maintainer: Max Coplan <mchcopl@gmail.com>
|
||||
" Translations by Jakson Alves de Aquino.
|
||||
" Last Change: 2022-12-08
|
||||
" Copied from: runtime/syntax/diff.vim
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
scriptencoding utf-8
|
||||
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Only in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Files .* and .* are identical$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Files .* and .* differ$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binary files .* and .* differ$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): File .* is a .* while file .* is a .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No newline at end of file .*"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Common subdirectories: .*"
|
||||
|
||||
" Disable the translations by setting diff_translations to zero.
|
||||
if !exists("diff_translations") || diff_translations
|
||||
|
||||
" ca
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Només a .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Els fitxers .* i .* són idèntics$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): El fitxer .* és un .* mentre que el fitxer .* és un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hi ha cap caràcter de salt de línia al final del fitxer"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoris comuns: .* i .*"
|
||||
|
||||
" cs
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Pouze v .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Soubory .* a .* jsou identické$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binární soubory .* a .* jsou rozdílné$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Soubor .* je .* pokud soubor .* je .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Chybí znak konce řádku na konci souboru"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Společné podadresáře: .* a .*"
|
||||
|
||||
" da
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Kun i .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Filerne .* og .* er identiske$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Filerne .* og .* er forskellige$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binære filer .* og .* er forskellige$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Filen .* er en .* mens filen .* er en .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Intet linjeskift ved filafslutning"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Identiske underkataloger: .* og .*"
|
||||
|
||||
" de
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Nur in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Dateien .* und .* sind identisch.$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Dateien .* und .* sind verschieden.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* and .* sind verschieden.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* und .* sind verschieden.$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Datei .* ist ein .* während Datei .* ein .* ist.$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Kein Zeilenumbruch am Dateiende."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Gemeinsame Unterverzeichnisse: .* und .*.$"
|
||||
|
||||
" el
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Μόνο στο .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Τα αρχεία .* καί .* είναι πανομοιότυπα$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Το αρχείο .* είναι .* ενώ το αρχείο .* είναι .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Οι υποκατάλογοι .* και .* είναι ταυτόσημοι$"
|
||||
|
||||
" eo
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Nur en .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Dosieroj .* kaj .* estas samaj$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Dosiero .* estas .*, dum dosiero .* estas .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Mankas linifino ĉe fino de dosiero"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Komunaj subdosierujoj: .* kaj .*"
|
||||
|
||||
" es
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Sólo en .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Los ficheros .* y .* son idénticos$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Los ficheros .* y .* son distintos$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Los ficheros binarios .* y .* son distintos$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): El fichero .* es un .* mientras que el .* es un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hay ningún carácter de nueva línea al final del fichero"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comunes: .* y .*"
|
||||
|
||||
" fi
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Vain hakemistossa .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Tiedostot .* ja .* ovat identtiset$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Tiedostot .* ja .* eroavat$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binääritiedostot .* ja .* eroavat$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tiedosto .* on .*, kun taas tiedosto .* on .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ei rivinvaihtoa tiedoston lopussa"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Yhteiset alihakemistot: .* ja .*"
|
||||
|
||||
" fr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Seulement dans .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Les fichiers .* et .* sont identiques.*"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Les fichiers .* et .* sont différents.*"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Les fichiers binaires .* et .* sont différents.*"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Le fichier .* est un .* alors que le fichier .* est un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Pas de fin de ligne à la fin du fichier.*"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Les sous-répertoires .* et .* sont identiques.*"
|
||||
|
||||
" ga
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): I .* amháin: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Is comhionann iad na comhaid .* agus .*"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tá comhad .* ina .* ach tá comhad .* ina .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Gan líne nua ag an chomhadchríoch"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Fochomhadlanna i gcoitianta: .* agus .*"
|
||||
|
||||
" gl
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Só en .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Os ficheiros .* e .* son idénticos$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Os ficheiros .* e .* son diferentes$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Os ficheiros binarios .* e .* son diferentes$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): O ficheiro .* é un .* mentres que o ficheiro .* é un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Non hai un salto de liña na fin da liña"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comúns: .* e .*"
|
||||
|
||||
" he
|
||||
" ^\%(SL\|HG\): .* are expansive patterns for long lines, so disabled unless we can match
|
||||
" some specific hebrew chars
|
||||
if search('\%u05d5\|\%u05d1', 'nw', '', 100)
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): .*-ב קר אצמנ .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): םיהז םניה .*-ו .* םיצבקה$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיצבקה$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיירניב םיצבק$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): .* .*-ל .* .* תוושהל ןתינ אל$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ץבוקה ףוסב השד.-הרוש ות רס."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): .*-ו .* :תוהז תויקית-תת$"
|
||||
endif
|
||||
|
||||
" hr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Samo u .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Datoteke .* i .* su identične$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Datoteke .* i .* se razlikuju$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne datoteke .* i .* se razlikuju$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Datoteka .* je .*, a datoteka .* je .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nema novog retka na kraju datoteke"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Uobičajeni poddirektoriji: .* i .*"
|
||||
|
||||
" hu
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Csak .* -ben: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): .* és .* fájlok azonosak$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nincs újsor a fájl végén"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Közös alkönyvtárak: .* és .*"
|
||||
|
||||
" id
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): File .* dan .* identik$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Berkas .* dan .* berbeda$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): File biner .* dan .* berbeda$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): File .* adalah .* sementara file .* adalah .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tidak ada baris-baru di akhir dari berkas"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori sama: .* dan .*"
|
||||
|
||||
" it
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Solo in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): I file .* e .* sono identici$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): I file binari .* e .* sono diversi$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): File .* è un .* mentre file .* è un .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Manca newline alla fine del file"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Sottodirectory in comune: .* e .*"
|
||||
|
||||
" ja
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): .*だけに発見: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): ファイル.*と.*は同一$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): ファイル.*と.*は違います$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリー・ファイル.*と.*は違います$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): ファイル.*は.*、ファイル.*は.*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): 共通の下位ディレクトリー: .*と.*"
|
||||
|
||||
" ja DiffUtils 3.3
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): .* のみに存在: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): ファイル .* と .* は同一です$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): ファイル .* と .* は異なります$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリーファイル .* と.* は異なります$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): ファイル .* は .* です。一方、ファイル .* は .* です$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): 共通のサブディレクトリー: .* と .*"
|
||||
|
||||
" lv
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Tikai iekš .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Fails .* un .* ir identiski$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binārie faili .* un .* atšķiras$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fails .* ir .* kamēr fails .* ir .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nav jaunu rindu faila beigās"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Kopējās apakšdirektorijas: .* un .*"
|
||||
|
||||
" ms
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Fail .* dan .* adalah serupa$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fail .* adalah .* manakala fail .* adalah .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tiada baris baru pada penghujung fail"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori umum: .* dan .*"
|
||||
|
||||
" nl
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Alleen in .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Bestanden .* en .* zijn identiek$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binaire bestanden .* en .* zijn verschillend$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Bestand .* is een .* terwijl bestand .* een .* is$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Geen regeleindeteken (LF) aan einde van bestand"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Gemeenschappelijke submappen: .* en .*"
|
||||
|
||||
" pl
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Tylko w .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Pliki .* i .* są identyczne$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne pliki .* i .* różnią się$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Plik .* jest .*, podczas gdy plik .* jest .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Brak znaku nowej linii na końcu pliku"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Wspólne podkatalogi: .* i .*"
|
||||
|
||||
" pt_BR
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Somente em .*"
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Apenas em .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Os aquivos .* e .* são idênticos$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Os arquivos .* e .* são diferentes$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Os arquivos binários .* e .* são diferentes$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): O arquivo .* é .* enquanto o arquivo .* é .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Falta o caracter nova linha no final do arquivo"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdiretórios idênticos: .* e .*"
|
||||
|
||||
" ro
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Doar în .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Fişierele .* şi .* sunt identice$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Fişierele .* şi .* diferă$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Fişierele binare .* şi .* diferă$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fişierul .* este un .* pe când fişierul .* este un .*.$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nici un element de linie nouă la sfârşitul fişierului"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoare comune: .* şi .*.$"
|
||||
|
||||
" ru
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Только в .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Файлы .* и .* идентичны$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Файл .* это .*, тогда как файл .* -- .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ В конце файла нет новой строки"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Общие подкаталоги: .* и .*"
|
||||
|
||||
" sr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Само у .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Датотеке „.*“ и „.*“ се подударају$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Датотеке .* и .* различите$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Бинарне датотеке .* и .* различите$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Датотека „.*“ је „.*“ док је датотека „.*“ „.*“$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Без новог реда на крају датотеке"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Заједнички поддиректоријуми: .* и .*"
|
||||
|
||||
" sv
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Endast i .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Filerna .* och .* är lika$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Fil .* är en .* medan fil .* är en .*"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): De binära filerna .* och .* skiljer$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Filen .* är .* medan filen .* är .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ingen nyrad vid filslut"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Lika underkataloger: .* och .*"
|
||||
|
||||
" tr
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Yalnızca .*'da: .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): .* ve .* dosyaları birbirinin aynı$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): İkili .* ve .* birbirinden farklı$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): .* dosyası, bir .*, halbuki .* dosyası bir .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Dosya sonunda yenisatır yok."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Ortak alt dizinler: .* ve .*"
|
||||
|
||||
" uk
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Лише у .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Файли .* та .* ідентичні$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Двійкові файли .* та .* відрізняються$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Файл .* це .*, тоді як файл .* -- .*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Наприкінці файлу немає нового рядка"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Спільні підкаталоги: .* та .*"
|
||||
|
||||
" vi
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): Chỉ trong .*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Hai tập tin .* và .* là bằng nhau.$"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): Cả .* và .* là cùng một tập tin$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin nhị phân .* và .* khác nhau$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* trong khi tập tin .* là một .*.$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* còn tập tin .* là một .*.$"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Không có ký tự dòng mới tại kêt thức tập tin."
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): Thư mục con chung: .* và .*"
|
||||
|
||||
" zh_CN
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): 文件 .* 是.*而文件 .* 是.*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 文件尾没有 newline 字符"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的子目录$"
|
||||
|
||||
" zh_TW
|
||||
syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*"
|
||||
syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$"
|
||||
syn match hgDiffDiffer "^\%(SL\|HG\): 檔案 .* 與 .* 不同$"
|
||||
syn match hgDiffBDiffer "^\%(SL\|HG\): 二元碼檔 .* 與 .* 不同$"
|
||||
syn match hgDiffIsA "^\%(SL\|HG\): 檔案 .* 是.*而檔案 .* 是.*"
|
||||
syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 檔案末沒有 newline 字元"
|
||||
syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的副目錄$"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
syn match hgDiffRemoved "^\%(SL\|HG\): -.*"
|
||||
syn match hgDiffRemoved "^\%(SL\|HG\): <.*"
|
||||
syn match hgDiffAdded "^\%(SL\|HG\): +.*"
|
||||
syn match hgDiffAdded "^\%(SL\|HG\): >.*"
|
||||
syn match hgDiffChanged "^\%(SL\|HG\): ! .*"
|
||||
|
||||
syn match hgDiffSubname " @@..*"ms=s+3 contained
|
||||
syn match hgDiffLine "^\%(SL\|HG\): @.*" contains=hgDiffSubname
|
||||
syn match hgDiffLine "^\%(SL\|HG\): \<\d\+\>.*"
|
||||
syn match hgDiffLine "^\%(SL\|HG\): \*\*\*\*.*"
|
||||
syn match hgDiffLine "^\%(SL\|HG\): ---$"
|
||||
|
||||
" Some versions of diff have lines like "#c#" and "#d#" (where # is a number)
|
||||
syn match hgDiffLine "^\%(SL\|HG\): \d\+\(,\d\+\)\=[cda]\d\+\>.*"
|
||||
|
||||
syn match hgDiffFile "^\%(SL\|HG\): diff\>.*"
|
||||
syn match hgDiffFile "^\%(SL\|HG\): Index: .*"
|
||||
syn match hgDiffFile "^\%(SL\|HG\): ==== .*"
|
||||
|
||||
if search('^\%(SL\|HG\): @@ -\S\+ +\S\+ @@', 'nw', '', 100)
|
||||
" unified
|
||||
syn match hgDiffOldFile "^\%(SL\|HG\): --- .*"
|
||||
syn match hgDiffNewFile "^\%(SL\|HG\): +++ .*"
|
||||
else
|
||||
" context / old style
|
||||
syn match hgDiffOldFile "^\%(SL\|HG\): \*\*\* .*"
|
||||
syn match hgDiffNewFile "^\%(SL\|HG\): --- .*"
|
||||
endif
|
||||
|
||||
" Used by git
|
||||
syn match hgDiffIndexLine "^\%(SL\|HG\): index \x\x\x\x.*"
|
||||
|
||||
syn match hgDiffComment "^\%(SL\|HG\): #.*"
|
||||
|
||||
" Define the default highlighting.
|
||||
" Only used when an item doesn't have highlighting yet
|
||||
hi def link hgDiffOldFile hgDiffFile
|
||||
hi def link hgDiffNewFile hgDiffFile
|
||||
hi def link hgDiffIndexLine PreProc
|
||||
hi def link hgDiffFile Type
|
||||
hi def link hgDiffOnly Constant
|
||||
hi def link hgDiffIdentical Constant
|
||||
hi def link hgDiffDiffer Constant
|
||||
hi def link hgDiffBDiffer Constant
|
||||
hi def link hgDiffIsA Constant
|
||||
hi def link hgDiffNoEOL Constant
|
||||
hi def link hgDiffCommon Constant
|
||||
hi def link hgDiffRemoved Special
|
||||
hi def link hgDiffChanged PreProc
|
||||
hi def link hgDiffAdded Identifier
|
||||
hi def link hgDiffLine Statement
|
||||
hi def link hgDiffSubname PreProc
|
||||
hi def link hgDiffComment Comment
|
||||
|
||||
let b:current_syntax = "hgcommitDiff"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim 9.0 script
|
||||
" Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" Last Change: October 20, 2022
|
||||
" Version: 9.0-08
|
||||
" Last Change: Jan 08, 2023
|
||||
" Version: 9.0-18
|
||||
" URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
|
||||
" Automatically generated keyword lists: {{{1
|
||||
|
||||
@@ -19,39 +19,38 @@ syn keyword vimTodo contained COMBAK FIXME TODO XXX
|
||||
syn cluster vimCommentGroup contains=vimTodo,@Spell
|
||||
|
||||
" regular vim commands {{{2
|
||||
syn keyword vimCommand contained a ar[gs] argl[ocal] bad[d] bn[ext] breakl[ist] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletl dep diffpu[t] dj[ump] dp earlier echow[indow] enddef endinterface ex files fini[sh] folddoc[losed] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vne[w] win[size] wq xmapc[lear] xr[estore]
|
||||
syn keyword vimCommand contained ab arga[dd] argu[ment] balt bo[tright] bro[wse] c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endenum endt[ry] exi[t] filet fir[st] foldo[pen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vs[plit] winc[md] wqa[ll] xme xunme
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] as[cii] bd[elete] bp[revious] bufdo ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delel delfunction dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endfo[r] endw[hile] exp filetype fix[del] for grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] wN[ext] windo wundo xmenu xunmenu
|
||||
syn keyword vimCommand contained abo[veleft] argded[upe] au bel[owright] br[ewind] buffers cabc[lear] call cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endfun ene[w] export filt[er] fo[ld] fun gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp static sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xnoreme xwininfo
|
||||
syn keyword vimCommand contained abstract argdo bN[ext] bf[irst] brea[k] bun[load] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] endfunc enum exu[sage] fin[d] foldc[lose] func gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] return rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoremenu y[ank]
|
||||
syn keyword vimCommand contained addd arge[dit] b[uffer] bl[ast] breaka[dd] bw[ipeout] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletep delp diffp[atch] disa[ssemble] doaut ea echon endclass endfunction eval f[ile] fina[lly] foldd[oopen] function h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xprop z[^.=]
|
||||
syn keyword vimCommand contained al[l] argg[lobal] ba[ll] bm[odified] breakd[el] cN[ext]
|
||||
syn keyword vimCommand contained a ar[gs] argg[lobal] b[uffer] bf[irst] br[ewind] bufdo c[hange] caddf[ile] cbel[ow] ce[nter] cgetb[uffer] chi[story] cmapc[lear] col[der] conf[irm] cr[ewind] cw[indow] defer deletl dep diffpu[t] dj[ump] dp earlier echow[indow] endf[unction] ex files fini[sh] folddoc[losed] grepa[dd] helpf[ind] hor[izontal] il[ist] interface ju[mps] keepp[atterns] lad[dexpr] later lch[dir] lefta[bove] lg[etfile] lhi[story] lmapc[lear] loadkeymap lpf[ile] luafile mak[e] mks[ession] mzf[ile] nmapc[lear] nos[wapfile] opt[ions] pe[rl] pre[serve] promptr[epl] ptl[ast] pw[d] pydo pyxfile red[o] res[ize] ru[ntime] sI sIp sav[eas] sbm[odified] sce scripte[ncoding] setg[lobal] sgc sgr sign sl[eep] smile sor[t] spellr[epall] srI srn startr[eplace] sun[hide] sy tN[ext] tabe[dit] tabnew tc[d] ter[minal] tlmenu tma[p] tr[ewind] u[ndo] unlo[ckvar] verb[ose] vim[grep] w[rite] winp[os] wv[iminfo] xmenu xunme
|
||||
syn keyword vimCommand contained ab arga[dd] argl[ocal] ba[ll] bl[ast] brea[k] buffers ca caf[ter] cbo[ttom] cex[pr] cgete[xpr] cl[ist] cn[ext] colo[rscheme] cons[t] cs d[elete] delc[ommand] deletp di[splay] diffs[plit] dl dr[op] ec el[se] endfo[r] exi[t] filet fir[st] foldo[pen] gui helpg[rep] i imapc[lear] intro k lN[ext] laddb[uffer] lb[uffer] lcl[ose] leg[acy] lgetb[uffer] ll lne[xt] loc[kmarks] lr[ewind] lv[imgrep] marks mksp[ell] n[ext] noa nu[mber] ownsyntax ped[it] prev[ious] ps[earch] ptn[ext] py3 pyf[ile] q[uit] redi[r] ret[ab] rub[y] sIc sIr sbN[ext] sbn[ext] scg scriptv[ersion] setl[ocal] sge sh[ell] sil[ent] sla[st] sn[ext] sp[lit] spellr[rare] src srp stj[ump] sunme syn ta[g] tabf[ind] tabo[nly] tch[dir] tf[irst] tln tmapc[lear] try una[bbreviate] uns[ilent] vert[ical] vimgrepa[dd] wa[ll] wn[ext] x[it] xnoreme xunmenu
|
||||
syn keyword vimCommand contained abc[lear] argd[elete] argu[ment] bad[d] bm[odified] breaka[dd] bun[load] cabc[lear] cal[l] cc cf[ile] changes cla[st] cnew[er] com cope[n] cscope debug delel delf[unction] dif[fupdate] difft[his] dli[st] ds[earch] echoc[onsole] elsei[f] endt[ry] exp filetype fix[del] for gvim helpt[ags] ia imp is[earch] kee[pmarks] lNf[ile] laddf[ile] lbe[fore] lcs lex[pr] lgete[xpr] lla[st] lnew[er] lockv[ar] ls lvimgrepa[dd] mat[ch] mkv[imrc] nb[key] noautocmd o[pen] p[rint] perld[o] pro ptN[ext] ptp[revious] py3do python3 qa[ll] redr[aw] retu[rn] rubyd[o] sIe sN[ext] sb[uffer] sbp[revious] sci scs sf[ind] sgi si sim[alt] sm[agic] sno[magic] spe[llgood] spellu[ndo] sre[wind] st[op] stopi[nsert] sunmenu sync tab tabfir[st] tabp[revious] tcl th[row] tlnoremenu tn[ext] ts[elect] undoj[oin] up[date] vi[sual] viu[sage] wh[ile] wp[revious] xa[ll] xnoremenu xwininfo
|
||||
syn keyword vimCommand contained abo[veleft] argded[upe] as[cii] balt bn[ext] breakd[el] bw[ipeout] cabo[ve] cat[ch] ccl[ose] cfdo chd[ir] class cnf[ile] comc[lear] cp[revious] cstag debugg[reedy] delep dell diffg[et] dig[raphs] do dsp[lit] echoe[rr] em[enu] endw[hile] export filt[er] fo[ld] fu[nction] h[elp] hi iabc[lear] import isp[lit] keepa l[ist] laf[ter] lbel[ow] lcscope lf[ile] lgr[ep] lli[st] lnf[ile] lol[der] lt[ag] lw[indow] menut[ranslate] mkvie[w] nbc[lose] noh[lsearch] ol[dfiles] pa[ckadd] po[p] prof[ile] pta[g] ptr[ewind] py3f[ile] pythonx quita[ll] redraws[tatus] rew[ind] rubyf[ile] sIg sa[rgument] sba[ll] sbr[ewind] scl scscope sfir[st] sgl sic sin sm[ap] snoreme spelld[ump] spellw[rong] srg sta[g] sts[elect] sus[pend] syncbind tabN[ext] tabl[ast] tabr[ewind] tcld[o] tj[ump] tlu tno[remap] tu[nmenu] undol[ist] v vie[w] vne[w] win[size] wq xmapc[lear] xprop y[ank]
|
||||
syn keyword vimCommand contained addd argdo au bd[elete] bo[tright] breakl[ist] cN[ext] cad[dbuffer] cb[uffer] cd cfir[st] che[ckpath] cle[arjumps] cnor comp[iler] cpf[ile] cun def deletel delm[arks] diffo[ff] dir doau e[dit] echom[sg] en[dif] ene[w] exu[sage] fin[d] foldc[lose] go[to] ha[rdcopy] hid[e] if in iuna[bbrev] keepalt la[st] lan[guage] lbo[ttom] ld[o] lfdo lgrepa[dd] lma lo[adview] lop[en] lua m[ove] mes[sages] mod[e] nbs[tart] nor omapc[lear] packl[oadall] popu[p] profd[el] ptf[irst] pts[elect] py3f[ile] pyx r[ead] redrawt[abline] ri[ght] rundo sIl sal[l] sbf[irst] sc scp se[t] sg sgn sie sip sme snoremenu spelli[nfo] spr[evious] sri star[tinsert] substitutepattern sv[iew] syntime tabc[lose] tabm[ove] tabs tclf[ile] tl[ast] tlunmenu to[pleft] tunma[p] unh[ide] var vim9[cmd] vs[plit] winc[md] wqa[ll] xme xr[estore] z[^.=]
|
||||
syn keyword vimCommand contained al[l] arge[dit] bN[ext] bel[owright] bp[revious] bro[wse] cNf[ile] cadde[xpr] cbe[fore] cdo cg[etfile] checkt[ime] clo[se] co[py] con[tinue] cq[uit] cuna[bbrev] defc[ompile] deletep delp diffp[atch] disa[ssemble] doaut ea echon enddef eval f[ile] fina[lly] foldd[oopen] gr[ep] helpc[lose] his[tory] ij[ump] inor j[oin] keepj[umps] lab[ove] lat lc[d] le[ft] lfir[st] lh[elpgrep] lmak[e] loadk lp[revious] luado ma[rk] mk[exrc] mz[scheme] new nore on[ly] pc[lose] pp[op] promptf[ind] ptj[ump] pu[t] py[thon] pyxdo rec[over] reg[isters] rightb[elow] rv[iminfo] sIn san[dbox] sbl[ast] scI scr[iptnames] setf[iletype] sgI sgp sig sir smenu so[urce] spellr[are] sr srl startg[replace] substituterepeat sw[apname] t tabd[o] tabn[ext] tags te[aroff] tlm tm[enu] tp[revious] type unl ve[rsion] vim9s[cript] wN[ext] windo wundo
|
||||
syn match vimCommand contained "\<z[-+^.=]\=\>"
|
||||
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man N[ext] Over P[rint] Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
|
||||
|
||||
" vimOptions are caught only when contained in a vimSet {{{2
|
||||
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keywordprg laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showfulltag signcolumn smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll tx undolevels vartabstop vfile virtualedit warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp km lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showmatch siso smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype uc undoreload vb vi visualbell wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endofline esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint kmp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmode sj smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udf updatecount vbs viewdir vop wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kp lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showtabline slm sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk udir updatetime vdir viewoptions vsts wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess shq sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws ul ur ve vif vts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname si smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undodir ut verbose viminfo wa wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak sidescroll smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undofile varsofttabstop verbosefile viminfofile wak weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
|
||||
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescrolloff smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse
|
||||
syn keyword vimOption contained acd ambw arshape aw backupskip beval bk bri bufhidden cdh ci cinsd cms commentstring conceallevel cpt cscopetagorder csto cursorlineopt dg dir ed enc equalprg expandtab fdls fex fileignorecase fml foldlevel formatexpr gcr gli guifont guitabtooltip hidden hlg imactivatefunc imi inc inex isident keymap langmap linebreak lm lsp makeencoding maxmem mh mmp more mousemoveevent mzq numberwidth opfunc patchexpr pfn pp printfont pumwidth pythonthreehome re restorescreen ro rulerformat scl scs sft shellslash shortmess showtabline slm smoothscroll spell spl srr statusline sw sxq tag tal tenc termwintype tgst titleold tpm ttm tw udir ur verbose viminfofile warn wfh wildchar wim winminheight wmh write
|
||||
syn keyword vimOption contained ai anti asd awa balloondelay bevalterm bkc briopt buflisted cdhome cin cinw co compatible confirm crb cscopeverbose csverb cwh dict directory edcompatible encoding errorbells exrc fdm ff filetype fmr foldlevelstart formatlistpat gd go guifontset helpfile highlight hls imactivatekey iminsert include inf isk keymodel langmenu lines lmap luadll makeprg maxmempattern mis mmt mouse mouses mzquantum nuw osfiletype patchmode ph preserveindent printheader pvh pyx readonly revins rop runtimepath scr sect sh shelltemp shortname shq sloc sms spellcapcheck splitbelow ss stl swapfile syn tagbsearch tb term terse thesaurus titlestring tr tty twk ul ut verbosefile virtualedit wb wfw wildcharm winaltkeys winminwidth wmnu writeany
|
||||
syn keyword vimOption contained akm antialias autochdir background ballooneval bex bl brk buftype cdpath cindent cinwords cocu complete copyindent cryptmethod csl cuc debug dictionary display ef endoffile errorfile fcl fdn ffs fillchars fo foldmarker formatoptions gdefault gp guifontwide helpheight history hlsearch imaf ims includeexpr infercase iskeyword keyprotocol langnoremap linespace lnr lw mat maxmemtot mkspellmem mod mousef mouseshape mzschemedll odev pa path pheader previewheight printmbcharset pvp pyxversion redrawtime ri rs sb scroll sections shcf shelltype showbreak si sm sn spellfile splitkeep ssl stmp swapsync synmaxcol tagcase tbi termbidi textauto thesaurusfunc tl ts ttybuiltin tws undodir varsofttabstop vfile visualbell wc wh wildignore wincolor winptydll wmw writebackup
|
||||
syn keyword vimOption contained al ar autoindent backspace balloonevalterm bexpr bo browsedir casemap cedit cink clipboard cole completefunc cot cscopepathcomp cspc cul deco diff dy efm endofline errorformat fcs fdo fic fixendofline foldclose foldmethod formatprg gfm grepformat guiheadroom helplang hk ic imak imsearch incsearch insertmode isp keywordprg langremap lisp loadplugins lz matchpairs mco ml modeline mousefocus mouset mzschemegcdll oft packpath pdev pi previewpopup printmbfont pvw qe regexpengine rightleft rtp sbo scrollbind secure shell shellxescape showcmd sidescroll smartcase so spelllang splitright ssop sts swb syntax tagfunc tbidi termencoding textmode tildeop tm tsl ttyfast twsl undofile vartabstop vi vop wcm whichwrap wildignorecase window winwidth wop writedelay
|
||||
syn keyword vimOption contained aleph arab autoread backup balloonexpr bg bomb bs cb cf cinkeys cm colorcolumn completeopt cp cscopeprg csprg culopt def diffexpr ea ei eof esckeys fdc fdt fileencoding fixeol foldcolumn foldminlines fp gfn grepprg guiligatures hf hkmap icon imc imsf inde is isprint km laststatus lispoptions lop ma matchtime mef mle modelineexpr mousehide mousetime nf ofu para penc pm previewwindow printoptions pw qftf relativenumber rightleftcmd ru sbr scrollfocus sel shellcmdflag shellxquote showcmdloc sidescrolloff smartindent softtabstop spelloptions spo st su swf ta taglength tbis termguicolors textwidth timeout to tsr ttym twt undolevels vb viewdir vsts wcr wi wildmenu winfixheight wiv wrap ws
|
||||
syn keyword vimOption contained allowrevins arabic autoshelldir backupcopy bdir bh breakat bsdir cc cfu cino cmdheight columns completepopup cpo cscopequickfix csqf cursorbind define diffopt ead ek eol et fde fen fileencodings fk foldenable foldnestmax fs gfs gtl guioptions hh hkmapp iconstring imcmdline imst indentexpr isf joinspaces kmp lazyredraw lispwords lpl macatsui maxcombine menc mls modelines mousem mp nrformats omnifunc paragraphs perldll pmbcs printdevice prompt pythondll quickfixtextfunc remap rl rubydll sc scrolljump selection shellpipe shiftround showfulltag signcolumn smarttab sol spellsuggest spr sta sua switchbuf tabline tagrelative tbs termwinkey tf timeoutlen toolbar tsrfu ttymouse tx undoreload vbs viewoptions vts wd wic wildmode winfixwidth wiw wrapmargin ww
|
||||
syn keyword vimOption contained altkeymap arabicshape autowrite backupdir bdlay bin breakindent bsk ccv ch cinoptions cmdwinheight com completeslash cpoptions cscoperelative csre cursorcolumn delcombine digraph eadirection emo ep eventignore fdi fenc fileformat fkmap foldexpr foldopen fsync gfw gtt guipty hi hkp ignorecase imd imstatusfunc indentkeys isfname js kp lbr list lrm magic maxfuncdepth menuitems mm modifiable mousemev mps nu opendevice paste pex pmbfn printencoding pt pythonhome quoteescape renderoptions rlc ruf scb scrolloff selectmode shellquote shiftwidth showmatch siso smc sp spf sps stal suffixes sws tabpagemax tags tc termwinscroll tfu title toolbariconsize ttimeout ttyscroll uc updatecount vdir vif wa weirdinvert wig wildoptions winheight wm wrapscan xtermcodes
|
||||
syn keyword vimOption contained ambiwidth ari autowriteall backupext belloff binary breakindentopt bt cd charconvert cinscopedecls cmp comments concealcursor cpp cscopetag cst cursorline dex dip eb emoji equalalways ex fdl fencs fileformats flp foldignore foldtext ft ghr guicursor guitablabel hid hl im imdisable imstyle indk isi key kpc lcs listchars ls makeef maxmapdepth mfd mmd modified mousemodel msm number operatorfunc pastetoggle pexpr popt printexpr pumheight pythonthreedll rdt report rnu ruler scf scrollopt sessionoptions shellredir shm showmode sj smd spc spk sr startofline suffixesadd sxe tabstop tagstack tcldll termwinsize tgc titlelen top ttimeoutlen ttytype udf updatetime ve viminfo wak
|
||||
|
||||
" vimOptions: These are the turn-off setting variants {{{2
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousehide noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosmoothscroll nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noasd noautoread noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendofline noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh nomod nomodifiable nomousef nonu noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosms nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup noxtermcodes
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautochdir noautoshelldir noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomodeline nomodified nomousefocus nonumber
|
||||
syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoindent noautowrite noawa noballoonevalterm nobin nobl nobri noci nocompatible nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noemoji noeof noerrorbells noex nofen nofixendofline nofkmap nofsync noguipty nohk nohkp noic noim noimd noinf nois nolangnoremap nolbr nolist nolpl noma nomh nomod nomodifiable nomousef nonu noopendevice nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscf noscrollfocus nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosmoothscroll nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows
|
||||
syn keyword vimOption contained noai noaltkeymap noar noarabicshape noasd noautoread noautowriteall nobackup nobeval nobinary nobomb nobuflisted nocin noconfirm nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noendoffile noeol noesckeys noexpandtab nofic nofixeol nofoldenable nogd nohid nohkmap nohls noicon noimc noimdisable noinfercase nojoinspaces nolangremap nolinebreak nolnr nolrm nomacatsui noml nomodeline nomodified nomousefocus nonumber nopaste nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscrollbind noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosms nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup noxtermcodes
|
||||
syn keyword vimOption contained noakm noanti noarab noari noautochdir noautoshelldir noaw noballooneval nobevalterm nobk nobreakindent nocf nocindent nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noemo noendofline noequalalways noet noexrc nofileignorecase nofk nofs nogdefault nohidden nohkmapp nohlsearch noignorecase noimcmdline noincsearch noinsertmode nojs nolazyredraw nolisp noloadplugins nolz nomagic nomle nomodelineexpr nomore nomousehide noodev nopi
|
||||
|
||||
" vimOptions: These are the invertible variants {{{2
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoindent invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodelineexpr invmore invmousehide invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscf invscrollfocus invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsmoothscroll invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd invautoread invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendofline inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh invmod invmodifiable invmousef invnu invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscrollbind invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsms invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup invxtermcodes
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmodeline invmodified invmousefocus invnumber
|
||||
syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoindent invautowrite invawa invballoonevalterm invbin invbl invbri invci invcompatible invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible invemoji inveof inverrorbells invex invfen invfixendofline invfkmap invfsync invguipty invhk invhkp invic invim invimd invinf invis invlangnoremap invlbr invlist invlpl invma invmh invmod invmodifiable invmousef invnu invopendevice invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscf invscrollfocus invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsmoothscroll invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws
|
||||
syn keyword vimOption contained invai invaltkeymap invar invarabicshape invasd invautoread invautowriteall invbackup invbeval invbinary invbomb invbuflisted invcin invconfirm invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invendoffile inveol invesckeys invexpandtab invfic invfixeol invfoldenable invgd invhid invhkmap invhls invicon invimc invimdisable invinfercase invjoinspaces invlangremap invlinebreak invlnr invlrm invmacatsui invml invmodeline invmodified invmousefocus invnumber invpaste invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscrollbind invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsms invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv invwrap invwrite invwritebackup invxtermcodes
|
||||
syn keyword vimOption contained invakm invanti invarab invari invautochdir invautoshelldir invaw invballooneval invbevalterm invbk invbreakindent invcf invcindent invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invemo invendofline invequalalways invet invexrc invfileignorecase invfk invfs invgdefault invhidden invhkmapp invhlsearch invignorecase invimcmdline invincsearch invinsertmode invjs invlazyredraw invlisp invloadplugins invlz invmagic invmle invmodelineexpr invmore invmousehide invodev invpi
|
||||
|
||||
" termcap codes (which can also be set) {{{2
|
||||
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI
|
||||
syn keyword vimOption contained t_8b t_8u t_AF t_AL t_bc t_BE t_ce t_cl t_Co t_Cs t_CV t_db t_DL t_Ds t_EI t_F2 t_F4 t_F6 t_F8 t_fd t_fs t_IE t_k1 t_k2 t_K3 t_K4 t_K5 t_K6 t_K7 t_K8 t_K9 t_kb t_KB t_kd t_KD t_KE t_KG t_KH t_KI t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_PE t_PS t_RB t_RC t_RF t_Ri t_RI t_RK t_RS t_RT t_RV t_Sb t_SC t_se t_Sf t_SH t_Si t_SI t_so t_sr t_SR t_ST t_te t_Te t_TE t_ti t_TI t_ts t_Ts t_u7 t_ue t_us t_Us t_ut t_vb t_ve t_vi t_vs t_VS t_WP t_WS t_xn t_xs t_ZH t_ZR
|
||||
syn keyword vimOption contained t_8f t_AB t_al t_AU t_BD t_cd t_Ce t_cm t_cs t_CS t_da t_dl t_ds t_EC t_F1 t_F3 t_F5 t_F7 t_F9 t_fe t_GP t_IS t_K1 t_k3 t_k4 t_k5 t_k6 t_k7 t_k8 t_k9 t_KA t_kB t_KC t_kD t_ke t_KF t_kh t_kI t_KJ
|
||||
syn match vimOption contained "t_%1"
|
||||
syn match vimOption contained "t_#2"
|
||||
syn match vimOption contained "t_#4"
|
||||
@@ -67,8 +66,8 @@ syn keyword vimErrSetting contained bioskey biosk conskey consk autoprint beauti
|
||||
|
||||
" AutoCmd Events {{{2
|
||||
syn case ignore
|
||||
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHoldI CursorMoved CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinScrolled
|
||||
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone CursorHold
|
||||
syn keyword vimAutoEvent contained BufAdd BufDelete BufFilePost BufHidden BufNew BufRead BufReadPost BufUnload BufWinLeave BufWrite BufWritePost CmdlineChanged CmdlineLeave CmdwinEnter ColorScheme CompleteChanged CompleteDonePre CursorHoldI CursorMovedI DiffUpdated DirChanged DirChangedPre EncodingChanged ExitPre FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileExplorer FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave InsertLeavePre MenuPopup ModeChanged OptionSet QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SafeState SafeStateAgain SessionLoadPost ShellCmdPost ShellFilterPost SigUSR1 SourceCmd SourcePost SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabClosed TabEnter TabLeave TabNew TermChanged TerminalOpen TerminalWinOpen TermResponse TextChanged TextChangedI TextChangedP TextChangedT TextYankPost User VimEnter VimLeave VimLeavePre VimResized VimResume VimSuspend WinClosed WinEnter WinLeave WinNew WinResized WinScrolled
|
||||
syn keyword vimAutoEvent contained BufCreate BufEnter BufFilePre BufLeave BufNewFile BufReadCmd BufReadPre BufWinEnter BufWipeout BufWriteCmd BufWritePre CmdlineEnter CmdUndefined CmdwinLeave ColorSchemePre CompleteDone CursorHold CursorMoved
|
||||
|
||||
" Highlight commonly used Groupnames {{{2
|
||||
syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo
|
||||
@@ -79,12 +78,12 @@ syn match vimHLGroup contained "Conceal"
|
||||
syn case match
|
||||
|
||||
" Function Names {{{2
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getcharmod getcmdpos getcursorcharpos getftime getmarklist getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg match matchend matchstrpos mode pathshorten popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getcharpos getcmdscreenpos getcwd getftype getmatches getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchadd matchfuzzy max mzeval perleval popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharsearch getcmdtype getenv getimstatus getmousepos getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufvar getcharstr getcmdwintype getfontname getjumplist getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getchangelist getcmdcompltype getcompletion getfperm getline getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getchar getcmdline getcurpos getfsize getloclist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map
|
||||
syn keyword vimFuncName contained abs argc assert_equal assert_match atan balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled extendnew findfile fnameescape foldtextresult get getchar getcmdline getcurpos getfsize getloclist getpos gettabinfo getwinpos globpath histdel hlset input insert islocked job_start json_decode libcallnr listener_add luaeval mapset matchend max nextnonblank popup_atcursor popup_dialog popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdline setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_channel test_null_partial test_setmouse timer_info tolower type values winbufnr win_getid win_id2win winnr win_splitmove
|
||||
syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp feedkeys flatten fnamemodify foreground getbufinfo getcharmod getcmdpos getcursorcharpos getftime getmarklist getqflist gettabvar getwinposx has histget hostname inputdialog interrupt isnan job_status json_encode line listener_flush map match matchfuzzy menu_info nr2char popup_beval popup_filter_menu popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_dict test_null_string test_settime timer_pause toupper typename virtcol wincol win_gettype winlayout winrestcmd winwidth
|
||||
syn keyword vimFuncName contained add arglistid assert_exception assert_notequal autocmd_add blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filereadable flattennew foldclosed fullcommand getbufline getcharpos getcmdscreenpos getcwd getftype getmatches getreg gettabwinvar getwinposy has_key histnr iconv inputlist invert items job_stop keys line2byte listener_remove maparg matchadd matchfuzzypos min or popup_clear popup_filter_yesno popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapfilelist synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_function test_option_not_set test_srand_seed timer_start tr undofile virtcol2col windowsversion win_gotoid winline winrestview wordcount
|
||||
syn keyword vimFuncName contained and argv assert_fails assert_notmatch autocmd_delete browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filewritable float2nr foldclosedend funcref getbufoneline getcharsearch getcmdtype getenv getimstatus getmousepos getreginfo gettagstack getwinvar haslocaldir hlexists indent inputrestore isabsolutepath job_getchannel join keytrans lispindent localtime mapcheck matchaddpos matchlist mkdir pathshorten popup_close popup_findecho popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_mswin_event test_null_job test_override test_unknown timer_stop trim undotree visualmode win_execute winheight win_move_separator winsaveview writefile
|
||||
syn keyword vimFuncName contained append asin assert_false assert_report autocmd_get browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath expr10 filter floor foldlevel function getbufvar getcharstr getcmdwintype getfontname getjumplist getmouseshape getregtype gettext glob hasmapto hlget index inputsave isdirectory job_info js_decode len list2blob log maplist matcharg matchstr mode perleval popup_create popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor
|
||||
syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extend finddir fmod foldtext garbagecollect getchangelist getcmdcompltype getcompletion getfperm getline getpid getscriptinfo getwininfo glob2regpat histadd hlID indexof inputsecret isinf job_setoptions js_encode libcall list2str log10 mapnew matchdelete matchstrpos mzeval
|
||||
|
||||
"--- syntax here and above generated by mkvimvim ---
|
||||
" Special Vim Highlighting (not automatic) {{{1
|
||||
@@ -245,7 +244,8 @@ endif
|
||||
syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
|
||||
syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
|
||||
syn match vimFunction "\<\(fu\%[nction]\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
syn match vimFunction "\<def!\=\s\+\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
"syn match vimFunction "\<def!\=\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
|
||||
|
||||
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
|
||||
syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
|
||||
@@ -354,7 +354,7 @@ syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z
|
||||
syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline
|
||||
syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass
|
||||
syn match vimCollClassErr contained "\[:.\{-\}:\]"
|
||||
syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]"
|
||||
syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]"
|
||||
syn match vimSubstSubstr contained "\\z\=\d"
|
||||
syn match vimSubstTwoBS contained "\\\\"
|
||||
syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags
|
||||
@@ -454,7 +454,7 @@ syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList
|
||||
" Angle-Bracket Notation: (tnx to Michael Geddes) {{{2
|
||||
" ======================
|
||||
syn case ignore
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cmd\|cr\|lf\|linefeed\|retu\%[rn]\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|mouse\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket
|
||||
syn match vimNotation "\%#=1\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket
|
||||
syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket
|
||||
@@ -482,7 +482,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror")
|
||||
syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/
|
||||
endif
|
||||
|
||||
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
|
||||
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
|
||||
|
||||
" Norm: {{{2
|
||||
" ====
|
||||
@@ -649,9 +649,8 @@ syn match vimCtrlChar "[--]"
|
||||
|
||||
" Beginners - Patterns that involve ^ {{{2
|
||||
" =========
|
||||
" Adjusted comment pattern - avoid matching string (appears in Vim9 code)
|
||||
syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle,vimComment
|
||||
syn match vimLineComment +^[ \t:]*"\("[^"]*"\|[^"]\)*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
"syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vim9LineComment +^[ \t:]\+#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
|
||||
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
|
||||
syn match vimContinue "^\s*\\"
|
||||
|
||||
41
runtime/syntax/wdl.vim
Normal file
41
runtime/syntax/wdl.vim
Normal file
@@ -0,0 +1,41 @@
|
||||
" Vim syntax file
|
||||
" Language: wdl
|
||||
" Maintainer: Matt Dunford (zenmatic@gmail.com)
|
||||
" URL: https://github.com/zenmatic/vim-syntax-wdl
|
||||
" Last Change: 2022 Nov 24
|
||||
|
||||
" https://github.com/openwdl/wdl
|
||||
|
||||
" quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn keyword wdlStatement alias task input command runtime input output workflow call scatter import as meta parameter_meta in version
|
||||
syn keyword wdlConditional if then else
|
||||
syn keyword wdlType struct Array String File Int Float Boolean Map Pair Object
|
||||
|
||||
syn keyword wdlFunctions stdout stderr read_lines read_tsv read_map read_object read_objects read_json read_int read_string read_float read_boolean write_lines write_tsv write_map write_object write_objects write_json size sub range transpose zip cross length flatten prefix select_first defined basename floor ceil round
|
||||
|
||||
syn region wdlCommandSection start="<<<" end=">>>"
|
||||
|
||||
syn region wdlString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region wdlString start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
|
||||
" Comments; their contents
|
||||
syn keyword wdlTodo contained TODO FIXME XXX BUG
|
||||
syn cluster wdlCommentGroup contains=wdlTodo
|
||||
syn region wdlComment start="#" end="$" contains=@wdlCommentGroup
|
||||
|
||||
hi def link wdlStatement Statement
|
||||
hi def link wdlConditional Conditional
|
||||
hi def link wdlType Type
|
||||
hi def link wdlFunctions Function
|
||||
hi def link wdlString String
|
||||
hi def link wdlCommandSection String
|
||||
hi def link wdlComment Comment
|
||||
hi def link wdlTodo Todo
|
||||
|
||||
let b:current_syntax = 'wdl'
|
||||
292
runtime/syntax/zig.vim
Normal file
292
runtime/syntax/zig.vim
Normal file
@@ -0,0 +1,292 @@
|
||||
" Vim syntax file
|
||||
" Language: Zig
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:zig_syntax_keywords = {
|
||||
\ 'zigBoolean': ["true"
|
||||
\ , "false"]
|
||||
\ , 'zigNull': ["null"]
|
||||
\ , 'zigType': ["bool"
|
||||
\ , "f16"
|
||||
\ , "f32"
|
||||
\ , "f64"
|
||||
\ , "f80"
|
||||
\ , "f128"
|
||||
\ , "void"
|
||||
\ , "type"
|
||||
\ , "anytype"
|
||||
\ , "anyerror"
|
||||
\ , "anyframe"
|
||||
\ , "volatile"
|
||||
\ , "linksection"
|
||||
\ , "noreturn"
|
||||
\ , "allowzero"
|
||||
\ , "i0"
|
||||
\ , "u0"
|
||||
\ , "isize"
|
||||
\ , "usize"
|
||||
\ , "comptime_int"
|
||||
\ , "comptime_float"
|
||||
\ , "c_short"
|
||||
\ , "c_ushort"
|
||||
\ , "c_int"
|
||||
\ , "c_uint"
|
||||
\ , "c_long"
|
||||
\ , "c_ulong"
|
||||
\ , "c_longlong"
|
||||
\ , "c_ulonglong"
|
||||
\ , "c_longdouble"
|
||||
\ , "anyopaque"]
|
||||
\ , 'zigConstant': ["undefined"
|
||||
\ , "unreachable"]
|
||||
\ , 'zigConditional': ["if"
|
||||
\ , "else"
|
||||
\ , "switch"]
|
||||
\ , 'zigRepeat': ["while"
|
||||
\ , "for"]
|
||||
\ , 'zigComparatorWord': ["and"
|
||||
\ , "or"
|
||||
\ , "orelse"]
|
||||
\ , 'zigStructure': ["struct"
|
||||
\ , "enum"
|
||||
\ , "union"
|
||||
\ , "error"
|
||||
\ , "packed"
|
||||
\ , "opaque"]
|
||||
\ , 'zigException': ["error"]
|
||||
\ , 'zigVarDecl': ["var"
|
||||
\ , "const"
|
||||
\ , "comptime"
|
||||
\ , "threadlocal"]
|
||||
\ , 'zigDummyVariable': ["_"]
|
||||
\ , 'zigKeyword': ["fn"
|
||||
\ , "try"
|
||||
\ , "test"
|
||||
\ , "pub"
|
||||
\ , "usingnamespace"]
|
||||
\ , 'zigExecution': ["return"
|
||||
\ , "break"
|
||||
\ , "continue"]
|
||||
\ , 'zigMacro': ["defer"
|
||||
\ , "errdefer"
|
||||
\ , "async"
|
||||
\ , "nosuspend"
|
||||
\ , "await"
|
||||
\ , "suspend"
|
||||
\ , "resume"
|
||||
\ , "export"
|
||||
\ , "extern"]
|
||||
\ , 'zigPreProc': ["catch"
|
||||
\ , "inline"
|
||||
\ , "noinline"
|
||||
\ , "asm"
|
||||
\ , "callconv"
|
||||
\ , "noalias"]
|
||||
\ , 'zigBuiltinFn': ["align"
|
||||
\ , "@addWithOverflow"
|
||||
\ , "@as"
|
||||
\ , "@atomicLoad"
|
||||
\ , "@atomicStore"
|
||||
\ , "@bitCast"
|
||||
\ , "@breakpoint"
|
||||
\ , "@alignCast"
|
||||
\ , "@alignOf"
|
||||
\ , "@cDefine"
|
||||
\ , "@cImport"
|
||||
\ , "@cInclude"
|
||||
\ , "@cUndef"
|
||||
\ , "@clz"
|
||||
\ , "@cmpxchgWeak"
|
||||
\ , "@cmpxchgStrong"
|
||||
\ , "@compileError"
|
||||
\ , "@compileLog"
|
||||
\ , "@ctz"
|
||||
\ , "@popCount"
|
||||
\ , "@divExact"
|
||||
\ , "@divFloor"
|
||||
\ , "@divTrunc"
|
||||
\ , "@embedFile"
|
||||
\ , "@export"
|
||||
\ , "@extern"
|
||||
\ , "@tagName"
|
||||
\ , "@TagType"
|
||||
\ , "@errorName"
|
||||
\ , "@call"
|
||||
\ , "@errorReturnTrace"
|
||||
\ , "@fence"
|
||||
\ , "@fieldParentPtr"
|
||||
\ , "@field"
|
||||
\ , "@unionInit"
|
||||
\ , "@frameAddress"
|
||||
\ , "@import"
|
||||
\ , "@newStackCall"
|
||||
\ , "@asyncCall"
|
||||
\ , "@intToPtr"
|
||||
\ , "@max"
|
||||
\ , "@min"
|
||||
\ , "@memcpy"
|
||||
\ , "@memset"
|
||||
\ , "@mod"
|
||||
\ , "@mulAdd"
|
||||
\ , "@mulWithOverflow"
|
||||
\ , "@splat"
|
||||
\ , "@src"
|
||||
\ , "@bitOffsetOf"
|
||||
\ , "@byteOffsetOf"
|
||||
\ , "@offsetOf"
|
||||
\ , "@OpaqueType"
|
||||
\ , "@panic"
|
||||
\ , "@prefetch"
|
||||
\ , "@ptrCast"
|
||||
\ , "@ptrToInt"
|
||||
\ , "@rem"
|
||||
\ , "@returnAddress"
|
||||
\ , "@setCold"
|
||||
\ , "@Type"
|
||||
\ , "@shuffle"
|
||||
\ , "@reduce"
|
||||
\ , "@select"
|
||||
\ , "@setRuntimeSafety"
|
||||
\ , "@setEvalBranchQuota"
|
||||
\ , "@setFloatMode"
|
||||
\ , "@shlExact"
|
||||
\ , "@This"
|
||||
\ , "@hasDecl"
|
||||
\ , "@hasField"
|
||||
\ , "@shlWithOverflow"
|
||||
\ , "@shrExact"
|
||||
\ , "@sizeOf"
|
||||
\ , "@bitSizeOf"
|
||||
\ , "@sqrt"
|
||||
\ , "@byteSwap"
|
||||
\ , "@subWithOverflow"
|
||||
\ , "@intCast"
|
||||
\ , "@floatCast"
|
||||
\ , "@intToFloat"
|
||||
\ , "@floatToInt"
|
||||
\ , "@boolToInt"
|
||||
\ , "@errSetCast"
|
||||
\ , "@truncate"
|
||||
\ , "@typeInfo"
|
||||
\ , "@typeName"
|
||||
\ , "@TypeOf"
|
||||
\ , "@atomicRmw"
|
||||
\ , "@intToError"
|
||||
\ , "@errorToInt"
|
||||
\ , "@intToEnum"
|
||||
\ , "@enumToInt"
|
||||
\ , "@setAlignStack"
|
||||
\ , "@frame"
|
||||
\ , "@Frame"
|
||||
\ , "@frameSize"
|
||||
\ , "@bitReverse"
|
||||
\ , "@Vector"
|
||||
\ , "@sin"
|
||||
\ , "@cos"
|
||||
\ , "@tan"
|
||||
\ , "@exp"
|
||||
\ , "@exp2"
|
||||
\ , "@log"
|
||||
\ , "@log2"
|
||||
\ , "@log10"
|
||||
\ , "@fabs"
|
||||
\ , "@floor"
|
||||
\ , "@ceil"
|
||||
\ , "@trunc"
|
||||
\ , "@wasmMemorySize"
|
||||
\ , "@wasmMemoryGrow"
|
||||
\ , "@round"]
|
||||
\ }
|
||||
|
||||
function! s:syntax_keyword(dict)
|
||||
for key in keys(a:dict)
|
||||
execute 'syntax keyword' key join(a:dict[key], ' ')
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
call s:syntax_keyword(s:zig_syntax_keywords)
|
||||
|
||||
syntax match zigType "\v<[iu][1-9]\d*>"
|
||||
syntax match zigOperator display "\V\[-+/*=^&?|!><%~]"
|
||||
syntax match zigArrowCharacter display "\V->"
|
||||
|
||||
" 12_34 (. but not ..)? (12_34)? (exponent 12_34)?
|
||||
syntax match zigDecNumber display "\v<\d%(_?\d)*%(\.\.@!)?%(\d%(_?\d)*)?%([eE][+-]?\d%(_?\d)*)?"
|
||||
syntax match zigHexNumber display "\v<0x\x%(_?\x)*%(\.\.@!)?%(\x%(_?\x)*)?%([pP][+-]?\d%(_?\d)*)?"
|
||||
syntax match zigOctNumber display "\v<0o\o%(_?\o)*"
|
||||
syntax match zigBinNumber display "\v<0b[01]%(_?[01])*"
|
||||
|
||||
syntax match zigCharacterInvalid display contained /b\?'\zs[\n\r\t']\ze'/
|
||||
syntax match zigCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:][:alnum:][:space:]]\ze'/
|
||||
syntax match zigCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=zigEscape,zigEscapeError,zigCharacterInvalid,zigCharacterInvalidUnicode
|
||||
syntax match zigCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{6}\)\)'/ contains=zigEscape,zigEscapeUnicode,zigEscapeError,zigCharacterInvalid
|
||||
|
||||
syntax region zigBlock start="{" end="}" transparent fold
|
||||
|
||||
syntax region zigCommentLine start="//" end="$" contains=zigTodo,@Spell
|
||||
syntax region zigCommentLineDoc start="//[/!]/\@!" end="$" contains=zigTodo,@Spell
|
||||
|
||||
syntax match zigMultilineStringPrefix /c\?\\\\/ contained containedin=zigMultilineString
|
||||
syntax region zigMultilineString matchgroup=zigMultilineStringDelimiter start="c\?\\\\" end="$" contains=zigMultilineStringPrefix display
|
||||
|
||||
syntax keyword zigTodo contained TODO
|
||||
|
||||
syntax region zigString matchgroup=zigStringDelimiter start=+c\?"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=zigEscape,zigEscapeUnicode,zigEscapeError,@Spell
|
||||
syntax match zigEscapeError display contained /\\./
|
||||
syntax match zigEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
|
||||
syntax match zigEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{6}\)/
|
||||
|
||||
highlight default link zigDecNumber zigNumber
|
||||
highlight default link zigHexNumber zigNumber
|
||||
highlight default link zigOctNumber zigNumber
|
||||
highlight default link zigBinNumber zigNumber
|
||||
|
||||
highlight default link zigBuiltinFn Statement
|
||||
highlight default link zigKeyword Keyword
|
||||
highlight default link zigType Type
|
||||
highlight default link zigCommentLine Comment
|
||||
highlight default link zigCommentLineDoc Comment
|
||||
highlight default link zigDummyVariable Comment
|
||||
highlight default link zigTodo Todo
|
||||
highlight default link zigString String
|
||||
highlight default link zigStringDelimiter String
|
||||
highlight default link zigMultilineString String
|
||||
highlight default link zigMultilineStringContent String
|
||||
highlight default link zigMultilineStringPrefix String
|
||||
highlight default link zigMultilineStringDelimiter Delimiter
|
||||
highlight default link zigCharacterInvalid Error
|
||||
highlight default link zigCharacterInvalidUnicode zigCharacterInvalid
|
||||
highlight default link zigCharacter Character
|
||||
highlight default link zigEscape Special
|
||||
highlight default link zigEscapeUnicode zigEscape
|
||||
highlight default link zigEscapeError Error
|
||||
highlight default link zigBoolean Boolean
|
||||
highlight default link zigNull Boolean
|
||||
highlight default link zigConstant Constant
|
||||
highlight default link zigNumber Number
|
||||
highlight default link zigArrowCharacter zigOperator
|
||||
highlight default link zigOperator Operator
|
||||
highlight default link zigStructure Structure
|
||||
highlight default link zigExecution Special
|
||||
highlight default link zigMacro Macro
|
||||
highlight default link zigConditional Conditional
|
||||
highlight default link zigComparatorWord Keyword
|
||||
highlight default link zigRepeat Repeat
|
||||
highlight default link zigSpecial Special
|
||||
highlight default link zigVarDecl Function
|
||||
highlight default link zigPreProc PreProc
|
||||
highlight default link zigException Exception
|
||||
|
||||
delfunction s:syntax_keyword
|
||||
|
||||
let b:current_syntax = "zig"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet! s:cpo_save
|
||||
49
runtime/syntax/zir.vim
Normal file
49
runtime/syntax/zir.vim
Normal file
@@ -0,0 +1,49 @@
|
||||
" Vim syntax file
|
||||
" Language: Zir
|
||||
" Upstream: https://github.com/ziglang/zig.vim
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = "zir"
|
||||
|
||||
syn region zirCommentLine start=";" end="$" contains=zirTodo,@Spell
|
||||
|
||||
syn region zirBlock start="{" end="}" transparent fold
|
||||
|
||||
syn keyword zirKeyword primitive fntype int str as ptrtoint fieldptr deref asm unreachable export ref fn
|
||||
|
||||
syn keyword zirTodo contained TODO
|
||||
|
||||
syn region zirString start=+c\?"+ skip=+\\\\\|\\"+ end=+"+ oneline contains=zirEscape,zirEscapeUnicode,zirEscapeError,@Spell
|
||||
|
||||
syn match zirEscapeError display contained /\\./
|
||||
syn match zirEscape display contained /\\\([nrt\\'"]\|x\x\{2}\)/
|
||||
syn match zirEscapeUnicode display contained /\\\(u\x\{4}\|U\x\{6}\)/
|
||||
|
||||
syn match zirDecNumber display "\<[0-9]\+\%(.[0-9]\+\)\=\%([eE][+-]\?[0-9]\+\)\="
|
||||
syn match zirHexNumber display "\<0x[a-fA-F0-9]\+\%([a-fA-F0-9]\+\%([pP][+-]\?[0-9]\+\)\?\)\="
|
||||
syn match zirOctNumber display "\<0o[0-7]\+"
|
||||
syn match zirBinNumber display "\<0b[01]\+\%(.[01]\+\%([eE][+-]\?[0-9]\+\)\?\)\="
|
||||
|
||||
syn match zirGlobal display "[^a-zA-Z0-9_]\?\zs@[a-zA-Z0-9_]\+"
|
||||
syn match zirLocal display "[^a-zA-Z0-9_]\?\zs%[a-zA-Z0-9_]\+"
|
||||
|
||||
hi def link zirCommentLine Comment
|
||||
hi def link zirTodo Todo
|
||||
|
||||
hi def link zirKeyword Keyword
|
||||
|
||||
hi def link zirString Constant
|
||||
|
||||
hi def link zirEscape Special
|
||||
hi def link zirEscapeUnicode zirEscape
|
||||
hi def link zirEscapeError Error
|
||||
|
||||
hi def link zirDecNumber Constant
|
||||
hi def link zirHexNumber Constant
|
||||
hi def link zirOctNumber Constant
|
||||
hi def link zirBinNumber Constant
|
||||
|
||||
hi def link zirGlobal Identifier
|
||||
hi def link zirLocal Identifier
|
||||
@@ -42,26 +42,30 @@ Contents:
|
||||
|
||||
|
||||
The currently recommended way (that means it has been verified to work) is
|
||||
using the "Visual Studio Community 2015" installation. This doesn't include
|
||||
the SDK for older Windows versions (95, 98), see "OLDER VERSIONS" below for
|
||||
that.
|
||||
using the "Visual Studio 2022 Community Edition" installation. This doesn't
|
||||
include the SDK for older Windows versions (95 - XP), see "OLDER VERSIONS"
|
||||
below for that.
|
||||
|
||||
|
||||
1. Microsoft Visual C++
|
||||
=======================
|
||||
|
||||
We do not provide download links, since Microsoft keeps changing them. You
|
||||
can search for "Visual Studio Community 2015", for example. You will need to
|
||||
create a Microsoft account (it's free). You need to download the "DVD", and
|
||||
execute the installer from it.
|
||||
can search for "Visual Studio 2022 Community Edition", for example. You will
|
||||
need to create a Microsoft account (it's free). You need to download the
|
||||
"DVD", and execute the installer from it.
|
||||
|
||||
When installing "Visual Studio Community 2015 with Update 3" or "Visual C++
|
||||
Build Tools for Visual Studio 2015 with Update 3" make sure to
|
||||
select "custom" and check all checkboxes under "Universal Windows App
|
||||
Development Tools". Or whatever they are called now.
|
||||
(If you still want to target Windows XP, check also "Windows XP Support for
|
||||
C++". Note that with the current source code this is no longer supported, you
|
||||
will have to check out an older version).
|
||||
When installing "Visual Studio 2022 Community Edition" or "Build Tools for
|
||||
Visual Studio 2022" make sure to select "custom" and check all checkboxes
|
||||
under "Universal Windows App Development Tools". Or whatever they are called
|
||||
now.
|
||||
|
||||
Note: Vim source code no longer supports Windows XP since Patch 9.0.0496.
|
||||
Also, Visual Studio 2017 was the last version to support a Windows XP target.
|
||||
If you still want to target Windows XP, you can check out an older version of
|
||||
vim source code and install Visual Studio 2017 or 2015 - making sure to check
|
||||
the checkbox for "Windows XP Support for C++". Additional build instructions
|
||||
for Windows XP are provided below. |new-msvc-windows-xp|
|
||||
|
||||
|
||||
Visual Studio
|
||||
@@ -70,6 +74,18 @@ Visual Studio
|
||||
Building with Visual Studio (VS2015, VS2017, VS2019 and VS2022) is
|
||||
straightforward. Older versions probably don't work.
|
||||
|
||||
Vim versions built with VS2015 and VS2017 are systematically tested and known
|
||||
to work well on Windows versions 7, 8 and 8.1.
|
||||
|
||||
Vim versions built with VS2015 and VS2017 are also known to work well on all
|
||||
early versions of Windows 10. However, Vim versions built with VS2015 and
|
||||
VS2017 may run into a known issue on the latest versions of Windows 10 and 11.
|
||||
Building Vim with VS2019 or VS2022 resolves the issue.
|
||||
|
||||
Vim versions built with VS2019 and VS2022 are systematically tested and
|
||||
known to work on Windows versions 7, 8, 8.1, 10, 11 and all respective server
|
||||
variants.
|
||||
|
||||
Visual Studio installed a batch file called vcvarsall.bat, which you must
|
||||
run to set up paths for nmake and MSVC. We provide a batch file
|
||||
"msvc2015.bat" for this. You may need to edit it if you didn't install Visual
|
||||
@@ -100,8 +116,8 @@ These files have been supplied by George V. Reilly, Ben Singer, Ken Scott and
|
||||
Ron Aaron; they have been tested. But several things changed after that...
|
||||
|
||||
|
||||
Targeting Windows XP with MSVC 2015 and later *new-msvc-windows-xp*
|
||||
---------------------------------------------
|
||||
Targeting Windows XP with MSVC 2015 or 2017 *new-msvc-windows-xp*
|
||||
-------------------------------------------
|
||||
|
||||
(The support for pre-Vista was removed in patch 9.0.0496. If you want to
|
||||
target Windows XP, use the source code before that.)
|
||||
@@ -155,9 +171,9 @@ The ARM64 support was provided by Leendert van Doorn.
|
||||
|
||||
OLDER VERSIONS
|
||||
|
||||
The minimal supported version is Windows 7. Building with compilers
|
||||
older than 2015 most likely doesn't work. Since MSVC 2015 can be obtained for
|
||||
free there is no point in supporting older versions.
|
||||
The minimal supported version is Windows 7. Building with compilers older than
|
||||
2015 most likely doesn't work. Since MSVC 2022 can be obtained for free there
|
||||
is no point in supporting older versions.
|
||||
|
||||
If you need the executable to run on Windows 98 or ME, use the 2005 one
|
||||
|msvc-2005-express|, and use the source code before 8.0.0029. See the
|
||||
|
||||
@@ -174,6 +174,7 @@ SRC += \
|
||||
userfunc.c \
|
||||
version.c \
|
||||
viminfo.c \
|
||||
vim9class.c \
|
||||
vim9cmds.c \
|
||||
vim9compile.c \
|
||||
vim9execute.c \
|
||||
|
||||
@@ -851,6 +851,7 @@ OBJ = \
|
||||
$(OUTDIR)/usercmd.o \
|
||||
$(OUTDIR)/userfunc.o \
|
||||
$(OUTDIR)/version.o \
|
||||
$(OUTDIR)/vim9class.o \
|
||||
$(OUTDIR)/vim9cmds.o \
|
||||
$(OUTDIR)/vim9compile.o \
|
||||
$(OUTDIR)/vim9execute.o \
|
||||
@@ -1251,6 +1252,8 @@ $(OUTDIR)/netbeans.o: netbeans.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/version.o: version.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/vim9class.o: vim9class.c $(INCL) vim9.h
|
||||
|
||||
$(OUTDIR)/vim9cmds.o: vim9cmds.c $(INCL) vim9.h
|
||||
|
||||
$(OUTDIR)/vim9compile.o: vim9compile.c $(INCL) vim9.h
|
||||
|
||||
@@ -735,6 +735,7 @@ OBJ = \
|
||||
$(OUTDIR)\undo.obj \
|
||||
$(OUTDIR)\usercmd.obj \
|
||||
$(OUTDIR)\userfunc.obj \
|
||||
$(OUTDIR)\vim9class.obj \
|
||||
$(OUTDIR)\vim9cmds.obj \
|
||||
$(OUTDIR)\vim9compile.obj \
|
||||
$(OUTDIR)\vim9execute.obj \
|
||||
@@ -1708,6 +1709,8 @@ $(OUTDIR)/userfunc.obj: $(OUTDIR) userfunc.c $(INCL)
|
||||
|
||||
$(OUTDIR)/version.obj: $(OUTDIR) version.c $(INCL) version.h
|
||||
|
||||
$(OUTDIR)/vim9class.obj: $(OUTDIR) vim9class.c $(INCL) vim9.h
|
||||
|
||||
$(OUTDIR)/vim9cmds.obj: $(OUTDIR) vim9cmds.c $(INCL) vim9.h
|
||||
|
||||
$(OUTDIR)/vim9compile.obj: $(OUTDIR) vim9compile.c $(INCL) vim9.h
|
||||
@@ -1915,6 +1918,7 @@ proto.h: \
|
||||
proto/undo.pro \
|
||||
proto/usercmd.pro \
|
||||
proto/userfunc.pro \
|
||||
proto/vim9class.pro \
|
||||
proto/vim9cmds.pro \
|
||||
proto/vim9compile.pro \
|
||||
proto/vim9execute.pro \
|
||||
|
||||
@@ -409,6 +409,7 @@ SRC = \
|
||||
usercmd.c \
|
||||
userfunc.c \
|
||||
version.c \
|
||||
vim9class.c \
|
||||
vim9cmds.c \
|
||||
vim9compile.c \
|
||||
vim9execute.c \
|
||||
@@ -534,6 +535,7 @@ OBJ = \
|
||||
usercmd.obj \
|
||||
userfunc.obj \
|
||||
version.obj \
|
||||
vim9class.obj \
|
||||
vim9cmds.obj \
|
||||
vim9compile.obj \
|
||||
vim9execute.obj \
|
||||
@@ -1122,6 +1124,10 @@ viminfo.obj : viminfo.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
errors.h globals.h version.h
|
||||
vim9class.obj : vim9class.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
errors.h globals.h version.h
|
||||
vim9cmds.obj : vim9cmds.c vim.h [.auto]config.h feature.h os_unix.h \
|
||||
ascii.h keymap.h termdefs.h macros.h structs.h regexp.h \
|
||||
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
|
||||
|
||||
11
src/Makefile
11
src/Makefile
@@ -1584,6 +1584,7 @@ BASIC_SRC = \
|
||||
usercmd.c \
|
||||
userfunc.c \
|
||||
version.c \
|
||||
vim9class.c \
|
||||
vim9cmds.c \
|
||||
vim9compile.c \
|
||||
vim9execute.c \
|
||||
@@ -1741,6 +1742,7 @@ OBJ_COMMON = \
|
||||
objects/usercmd.o \
|
||||
objects/userfunc.o \
|
||||
objects/version.o \
|
||||
objects/vim9class.o \
|
||||
objects/vim9cmds.o \
|
||||
objects/vim9compile.o \
|
||||
objects/vim9execute.o \
|
||||
@@ -1931,6 +1933,7 @@ PRO_AUTO = \
|
||||
usercmd.pro \
|
||||
userfunc.pro \
|
||||
version.pro \
|
||||
vim9class.pro \
|
||||
vim9cmds.pro \
|
||||
vim9compile.pro \
|
||||
vim9execute.pro \
|
||||
@@ -3489,6 +3492,9 @@ objects/usercmd.o: usercmd.c
|
||||
objects/userfunc.o: userfunc.c
|
||||
$(CCC) -o $@ userfunc.c
|
||||
|
||||
objects/vim9class.o: vim9class.c
|
||||
$(CCC) -o $@ vim9class.c
|
||||
|
||||
objects/vim9cmds.o: vim9cmds.c
|
||||
$(CCC) -o $@ vim9cmds.c
|
||||
|
||||
@@ -4168,6 +4174,11 @@ objects/version.o: version.c vim.h protodef.h auto/config.h feature.h os_unix.h
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
|
||||
libvterm/include/vterm_keycodes.h alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h errors.h version.h
|
||||
objects/vim9class.o: vim9class.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
|
||||
libvterm/include/vterm_keycodes.h alloc.h ex_cmds.h spell.h proto.h \
|
||||
globals.h errors.h vim9.h
|
||||
objects/vim9cmds.o: vim9cmds.c vim.h protodef.h auto/config.h feature.h os_unix.h \
|
||||
auto/osdef.h ascii.h keymap.h termdefs.h macros.h option.h beval.h \
|
||||
proto/gui_beval.pro structs.h regexp.h gui.h libvterm/include/vterm.h \
|
||||
|
||||
@@ -813,7 +813,7 @@ ga_copy_string(garray_T *gap, char_u *p)
|
||||
|
||||
/*
|
||||
* Add string "p" to "gap".
|
||||
* When out of memory "p" is freed and FAIL is returned.
|
||||
* When out of memory FAIL is returned (caller may want to free "p").
|
||||
*/
|
||||
int
|
||||
ga_add_string(garray_T *gap, char_u *p)
|
||||
|
||||
@@ -693,56 +693,56 @@ do_argfile(exarg_T *eap, int argn)
|
||||
emsg(_(e_cannot_go_before_first_file));
|
||||
else
|
||||
emsg(_(e_cannot_go_beyond_last_file));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setpcmark();
|
||||
#ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
#endif
|
||||
|
||||
// split window or create new tab page first
|
||||
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
|
||||
{
|
||||
if (win_split(0, 0) == FAIL)
|
||||
return;
|
||||
RESET_BINDING(curwin);
|
||||
}
|
||||
else
|
||||
{
|
||||
setpcmark();
|
||||
#ifdef FEAT_GUI
|
||||
need_mouse_correct = TRUE;
|
||||
#endif
|
||||
|
||||
// split window or create new tab page first
|
||||
if (*eap->cmd == 's' || cmdmod.cmod_tab != 0)
|
||||
// if 'hidden' set, only check for changed file when re-editing
|
||||
// the same buffer
|
||||
other = TRUE;
|
||||
if (buf_hide(curbuf))
|
||||
{
|
||||
if (win_split(0, 0) == FAIL)
|
||||
return;
|
||||
RESET_BINDING(curwin);
|
||||
p = fix_fname(alist_name(&ARGLIST[argn]));
|
||||
other = otherfile(p);
|
||||
vim_free(p);
|
||||
}
|
||||
else
|
||||
{
|
||||
// if 'hidden' set, only check for changed file when re-editing
|
||||
// the same buffer
|
||||
other = TRUE;
|
||||
if (buf_hide(curbuf))
|
||||
{
|
||||
p = fix_fname(alist_name(&ARGLIST[argn]));
|
||||
other = otherfile(p);
|
||||
vim_free(p);
|
||||
}
|
||||
if ((!buf_hide(curbuf) || !other)
|
||||
&& check_changed(curbuf, CCGD_AW
|
||||
| (other ? 0 : CCGD_MULTWIN)
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD))
|
||||
return;
|
||||
}
|
||||
|
||||
curwin->w_arg_idx = argn;
|
||||
if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
|
||||
arg_had_last = TRUE;
|
||||
|
||||
// Edit the file; always use the last known line number.
|
||||
// When it fails (e.g. Abort for already edited file) restore the
|
||||
// argument index.
|
||||
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
||||
eap, ECMD_LAST,
|
||||
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
|
||||
curwin->w_arg_idx = old_arg_idx;
|
||||
// like Vi: set the mark where the cursor is in the file.
|
||||
else if (eap->cmdidx != CMD_argdo)
|
||||
setmark('\'');
|
||||
if ((!buf_hide(curbuf) || !other)
|
||||
&& check_changed(curbuf, CCGD_AW
|
||||
| (other ? 0 : CCGD_MULTWIN)
|
||||
| (eap->forceit ? CCGD_FORCEIT : 0)
|
||||
| CCGD_EXCMD))
|
||||
return;
|
||||
}
|
||||
|
||||
curwin->w_arg_idx = argn;
|
||||
if (argn == ARGCOUNT - 1 && curwin->w_alist == &global_alist)
|
||||
arg_had_last = TRUE;
|
||||
|
||||
// Edit the file; always use the last known line number.
|
||||
// When it fails (e.g. Abort for already edited file) restore the
|
||||
// argument index.
|
||||
if (do_ecmd(0, alist_name(&ARGLIST[curwin->w_arg_idx]), NULL,
|
||||
eap, ECMD_LAST,
|
||||
(buf_hide(curwin->w_buffer) ? ECMD_HIDE : 0)
|
||||
+ (eap->forceit ? ECMD_FORCEIT : 0), curwin) == FAIL)
|
||||
curwin->w_arg_idx = old_arg_idx;
|
||||
// like Vi: set the mark where the cursor is in the file.
|
||||
else if (eap->cmdidx != CMD_argdo)
|
||||
setmark('\'');
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
17
src/auto/configure
vendored
17
src/auto/configure
vendored
@@ -4816,6 +4816,19 @@ fi
|
||||
|
||||
done
|
||||
|
||||
# 10.5 and earlier lack dispatch
|
||||
for ac_header in dispatch/dispatch.h
|
||||
do :
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "dispatch/dispatch.h" "ac_cv_header_dispatch_dispatch_h" "$ac_includes_default"
|
||||
if test "x$ac_cv_header_dispatch_dispatch_h" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_DISPATCH_DISPATCH_H 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -15041,8 +15054,8 @@ $as_echo "no" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we need -D_FORTIFY_SOURCE=1" >&5
|
||||
$as_echo_n "checking whether we need -D_FORTIFY_SOURCE=1... " >&6; }
|
||||
if test "$gccmajor" -gt "3"; then
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
else
|
||||
|
||||
@@ -1063,18 +1063,18 @@ au_get_grouparg(char_u **argp)
|
||||
|
||||
for (p = arg; *p && !VIM_ISWHITE(*p) && *p != '|'; ++p)
|
||||
;
|
||||
if (p > arg)
|
||||
{
|
||||
group_name = vim_strnsave(arg, p - arg);
|
||||
if (group_name == NULL) // out of memory
|
||||
return AUGROUP_ERROR;
|
||||
group = au_find_group(group_name);
|
||||
if (group == AUGROUP_ERROR)
|
||||
group = AUGROUP_ALL; // no match, use all groups
|
||||
else
|
||||
*argp = skipwhite(p); // match, skip over group name
|
||||
vim_free(group_name);
|
||||
}
|
||||
if (p <= arg)
|
||||
return AUGROUP_ALL;
|
||||
|
||||
group_name = vim_strnsave(arg, p - arg);
|
||||
if (group_name == NULL) // out of memory
|
||||
return AUGROUP_ERROR;
|
||||
group = au_find_group(group_name);
|
||||
if (group == AUGROUP_ERROR)
|
||||
group = AUGROUP_ALL; // no match, use all groups
|
||||
else
|
||||
*argp = skipwhite(p); // match, skip over group name
|
||||
vim_free(group_name);
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -2068,6 +2068,9 @@ apply_autocmds_group(
|
||||
&& (event == EVENT_WINLEAVE || event == EVENT_BUFLEAVE)))
|
||||
goto BYPASS_AU;
|
||||
|
||||
if (event == EVENT_CMDLINECHANGED)
|
||||
++aucmd_cmdline_changed_count;
|
||||
|
||||
/*
|
||||
* Save the autocmd_* variables and info about the current buffer.
|
||||
*/
|
||||
@@ -2088,8 +2091,8 @@ apply_autocmds_group(
|
||||
if (fname_io == NULL)
|
||||
{
|
||||
if (event == EVENT_COLORSCHEME || event == EVENT_COLORSCHEMEPRE
|
||||
|| event == EVENT_OPTIONSET
|
||||
|| event == EVENT_MODECHANGED)
|
||||
|| event == EVENT_OPTIONSET
|
||||
|| event == EVENT_MODECHANGED)
|
||||
autocmd_fname = NULL;
|
||||
else if (fname != NULL && !ends_excmd(*fname))
|
||||
autocmd_fname = fname;
|
||||
|
||||
@@ -517,7 +517,8 @@ bf_self_test(void)
|
||||
|
||||
// We can't simply use sizeof(UINT32_T), it would generate a compiler
|
||||
// warning.
|
||||
if (ui != 0xffffffffUL || ui + 1 != 0) {
|
||||
if (ui != 0xffffffffUL || ui + 1 != 0)
|
||||
{
|
||||
err++;
|
||||
emsg(_(e_sizeof_uint32_isnot_four));
|
||||
}
|
||||
@@ -573,13 +574,15 @@ bf_cfb_init(
|
||||
}
|
||||
}
|
||||
|
||||
#define BF_CFB_UPDATE(bfs, c) { \
|
||||
#define BF_CFB_UPDATE(bfs, c) \
|
||||
{ \
|
||||
bfs->cfb_buffer[bfs->update_offset] ^= (char_u)c; \
|
||||
if (++bfs->update_offset == bfs->cfb_len) \
|
||||
bfs->update_offset = 0; \
|
||||
}
|
||||
|
||||
#define BF_RANBYTE(bfs, t) { \
|
||||
#define BF_RANBYTE(bfs, t) \
|
||||
{ \
|
||||
if ((bfs->randbyte_offset & BF_BLOCK_MASK) == 0) \
|
||||
bf_e_cblock(bfs, &(bfs->cfb_buffer[bfs->randbyte_offset])); \
|
||||
t = bfs->cfb_buffer[bfs->randbyte_offset]; \
|
||||
|
||||
185
src/buffer.c
185
src/buffer.c
@@ -146,19 +146,19 @@ read_buffer(
|
||||
void
|
||||
buffer_ensure_loaded(buf_T *buf)
|
||||
{
|
||||
if (buf->b_ml.ml_mfp == NULL)
|
||||
{
|
||||
aco_save_T aco;
|
||||
if (buf->b_ml.ml_mfp != NULL)
|
||||
return;
|
||||
|
||||
// Make sure the buffer is in a window. If not then skip it.
|
||||
aucmd_prepbuf(&aco, buf);
|
||||
if (curbuf == buf)
|
||||
{
|
||||
if (swap_exists_action != SEA_READONLY)
|
||||
swap_exists_action = SEA_NONE;
|
||||
open_buffer(FALSE, NULL, 0);
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
aco_save_T aco;
|
||||
|
||||
// Make sure the buffer is in a window. If not then skip it.
|
||||
aucmd_prepbuf(&aco, buf);
|
||||
if (curbuf == buf)
|
||||
{
|
||||
if (swap_exists_action != SEA_READONLY)
|
||||
swap_exists_action = SEA_NONE;
|
||||
open_buffer(FALSE, NULL, 0);
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -357,34 +357,34 @@ open_buffer(
|
||||
apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
|
||||
#endif
|
||||
|
||||
if (retval == OK)
|
||||
if (retval != OK)
|
||||
return retval;
|
||||
|
||||
// The autocommands may have changed the current buffer. Apply the
|
||||
// modelines to the correct buffer, if it still exists and is loaded.
|
||||
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
|
||||
{
|
||||
// The autocommands may have changed the current buffer. Apply the
|
||||
// modelines to the correct buffer, if it still exists and is loaded.
|
||||
if (bufref_valid(&old_curbuf) && old_curbuf.br_buf->b_ml.ml_mfp != NULL)
|
||||
aco_save_T aco;
|
||||
|
||||
// Go to the buffer that was opened, make sure it is in a window.
|
||||
// If not then skip it.
|
||||
aucmd_prepbuf(&aco, old_curbuf.br_buf);
|
||||
if (curbuf == old_curbuf.br_buf)
|
||||
{
|
||||
aco_save_T aco;
|
||||
do_modelines(0);
|
||||
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
|
||||
|
||||
// Go to the buffer that was opened, make sure it is in a window.
|
||||
// If not then skip it.
|
||||
aucmd_prepbuf(&aco, old_curbuf.br_buf);
|
||||
if (curbuf == old_curbuf.br_buf)
|
||||
{
|
||||
do_modelines(0);
|
||||
curbuf->b_flags &= ~(BF_CHECK_RO | BF_NEVERLOADED);
|
||||
|
||||
if ((flags & READ_NOWINENTER) == 0)
|
||||
if ((flags & READ_NOWINENTER) == 0)
|
||||
#ifdef FEAT_EVAL
|
||||
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf, &retval);
|
||||
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf, &retval);
|
||||
#else
|
||||
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf);
|
||||
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL,
|
||||
FALSE, curbuf);
|
||||
#endif
|
||||
|
||||
// restore curwin/curbuf and a few other things
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
// restore curwin/curbuf and a few other things
|
||||
aucmd_restbuf(&aco);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1761,7 +1761,6 @@ do_bufdel(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return errormsg;
|
||||
}
|
||||
|
||||
@@ -3019,20 +3018,20 @@ fname_match(
|
||||
char_u *p;
|
||||
|
||||
// extra check for valid arguments
|
||||
if (name != NULL && rmp->regprog != NULL)
|
||||
if (name == NULL || rmp->regprog == NULL)
|
||||
return NULL;
|
||||
|
||||
// Ignore case when 'fileignorecase' or the argument is set.
|
||||
rmp->rm_ic = p_fic || ignore_case;
|
||||
if (vim_regexec(rmp, name, (colnr_T)0))
|
||||
match = name;
|
||||
else if (rmp->regprog != NULL)
|
||||
{
|
||||
// Ignore case when 'fileignorecase' or the argument is set.
|
||||
rmp->rm_ic = p_fic || ignore_case;
|
||||
if (vim_regexec(rmp, name, (colnr_T)0))
|
||||
// Replace $(HOME) with '~' and try matching again.
|
||||
p = home_replace_save(NULL, name);
|
||||
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
|
||||
match = name;
|
||||
else if (rmp->regprog != NULL)
|
||||
{
|
||||
// Replace $(HOME) with '~' and try matching again.
|
||||
p = home_replace_save(NULL, name);
|
||||
if (p != NULL && vim_regexec(rmp, p, (colnr_T)0))
|
||||
match = name;
|
||||
vim_free(p);
|
||||
}
|
||||
vim_free(p);
|
||||
}
|
||||
|
||||
return match;
|
||||
@@ -3160,16 +3159,15 @@ wininfo_other_tab_diff(wininfo_T *wip)
|
||||
{
|
||||
win_T *wp;
|
||||
|
||||
if (wip->wi_opt.wo_diff)
|
||||
{
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
// return FALSE when it's a window in the current tab page, thus
|
||||
// the buffer was in diff mode here
|
||||
if (wip->wi_win == wp)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (!wip->wi_opt.wo_diff)
|
||||
return FALSE;
|
||||
|
||||
FOR_ALL_WINDOWS(wp)
|
||||
// return FALSE when it's a window in the current tab page, thus
|
||||
// the buffer was in diff mode here
|
||||
if (wip->wi_win == wp)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3198,27 +3196,27 @@ find_wininfo(
|
||||
&& (!need_options || wip->wi_optset))
|
||||
break;
|
||||
|
||||
if (wip != NULL)
|
||||
return wip;
|
||||
|
||||
// If no wininfo for curwin, use the first in the list (that doesn't have
|
||||
// 'diff' set and is in another tab page).
|
||||
// If "need_options" is TRUE skip entries that don't have options set,
|
||||
// unless the window is editing "buf", so we can copy from the window
|
||||
// itself.
|
||||
if (wip == NULL)
|
||||
{
|
||||
#ifdef FEAT_DIFF
|
||||
if (skip_diff_buffer)
|
||||
{
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (!wininfo_other_tab_diff(wip)
|
||||
&& (!need_options || wip->wi_optset
|
||||
|| (wip->wi_win != NULL
|
||||
&& wip->wi_win->w_buffer == buf)))
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
wip = buf->b_wininfo;
|
||||
if (skip_diff_buffer)
|
||||
{
|
||||
FOR_ALL_BUF_WININFO(buf, wip)
|
||||
if (!wininfo_other_tab_diff(wip)
|
||||
&& (!need_options || wip->wi_optset
|
||||
|| (wip->wi_win != NULL
|
||||
&& wip->wi_win->w_buffer == buf)))
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
wip = buf->b_wininfo;
|
||||
return wip;
|
||||
}
|
||||
|
||||
@@ -3582,18 +3580,18 @@ buf_set_name(int fnum, char_u *name)
|
||||
buf_T *buf;
|
||||
|
||||
buf = buflist_findnr(fnum);
|
||||
if (buf != NULL)
|
||||
{
|
||||
if (buf->b_sfname != buf->b_ffname)
|
||||
vim_free(buf->b_sfname);
|
||||
vim_free(buf->b_ffname);
|
||||
buf->b_ffname = vim_strsave(name);
|
||||
buf->b_sfname = NULL;
|
||||
// Allocate ffname and expand into full path. Also resolves .lnk
|
||||
// files on Win32.
|
||||
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
|
||||
buf->b_fname = buf->b_sfname;
|
||||
}
|
||||
if (buf == NULL)
|
||||
return;
|
||||
|
||||
if (buf->b_sfname != buf->b_ffname)
|
||||
vim_free(buf->b_sfname);
|
||||
vim_free(buf->b_ffname);
|
||||
buf->b_ffname = vim_strsave(name);
|
||||
buf->b_sfname = NULL;
|
||||
// Allocate ffname and expand into full path. Also resolves .lnk
|
||||
// files on Win32.
|
||||
fname_expand(buf, &buf->b_ffname, &buf->b_sfname);
|
||||
buf->b_fname = buf->b_sfname;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4617,6 +4615,8 @@ build_stl_str_hl(
|
||||
#endif
|
||||
if (vim_strchr(STL_ALL, *s) == NULL)
|
||||
{
|
||||
if (*s == NUL) // can happen with "%0"
|
||||
break;
|
||||
s++;
|
||||
continue;
|
||||
}
|
||||
@@ -4775,6 +4775,11 @@ build_stl_str_hl(
|
||||
get_rel_pos(wp, str, TMPLEN);
|
||||
break;
|
||||
|
||||
case STL_SHOWCMD:
|
||||
if (p_sc && STRCMP(opt_name, p_sloc) == 0)
|
||||
str = showcmd_buf;
|
||||
break;
|
||||
|
||||
case STL_ARGLISTSTAT:
|
||||
fillable = FALSE;
|
||||
buf_tmp[0] = 0;
|
||||
@@ -5916,14 +5921,14 @@ buf_get_fname(buf_T *buf)
|
||||
void
|
||||
set_buflisted(int on)
|
||||
{
|
||||
if (on != curbuf->b_p_bl)
|
||||
{
|
||||
curbuf->b_p_bl = on;
|
||||
if (on)
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
|
||||
else
|
||||
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
|
||||
}
|
||||
if (on == curbuf->b_p_bl)
|
||||
return;
|
||||
|
||||
curbuf->b_p_bl = on;
|
||||
if (on)
|
||||
apply_autocmds(EVENT_BUFADD, NULL, NULL, FALSE, curbuf);
|
||||
else
|
||||
apply_autocmds(EVENT_BUFDELETE, NULL, NULL, FALSE, curbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
18
src/change.c
18
src/change.c
@@ -772,14 +772,7 @@ appended_lines(linenr_T lnum, long count)
|
||||
void
|
||||
appended_lines_mark(linenr_T lnum, long count)
|
||||
{
|
||||
// Skip mark_adjust when adding a line after the last one, there can't
|
||||
// be marks there. But it's still needed in diff mode.
|
||||
if (lnum + count < curbuf->b_ml.ml_line_count
|
||||
#ifdef FEAT_DIFF
|
||||
|| curwin->w_p_diff
|
||||
#endif
|
||||
)
|
||||
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
|
||||
mark_adjust(lnum + 1, (linenr_T)MAXLNUM, count, 0L);
|
||||
changed_lines(lnum + 1, 0, lnum + 1, count);
|
||||
}
|
||||
|
||||
@@ -2142,14 +2135,7 @@ open_line(
|
||||
goto theend;
|
||||
// Postpone calling changed_lines(), because it would mess up folding
|
||||
// with markers.
|
||||
// Skip mark_adjust when adding a line after the last one, there can't
|
||||
// be marks there. But still needed in diff mode.
|
||||
if (curwin->w_cursor.lnum + 1 < curbuf->b_ml.ml_line_count
|
||||
#ifdef FEAT_DIFF
|
||||
|| curwin->w_p_diff
|
||||
#endif
|
||||
)
|
||||
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
|
||||
mark_adjust(curwin->w_cursor.lnum + 1, (linenr_T)MAXLNUM, 1L, 0L);
|
||||
did_append = TRUE;
|
||||
#ifdef FEAT_PROP_POPUP
|
||||
if ((State & MODE_INSERT) && (State & VREPLACE_FLAG) == 0)
|
||||
|
||||
@@ -345,24 +345,25 @@ transstr(char_u *s)
|
||||
}
|
||||
else
|
||||
res = alloc(vim_strsize(s) + 1);
|
||||
if (res != NULL)
|
||||
|
||||
if (res == NULL)
|
||||
return NULL;
|
||||
|
||||
*res = NUL;
|
||||
p = s;
|
||||
while (*p != NUL)
|
||||
{
|
||||
*res = NUL;
|
||||
p = s;
|
||||
while (*p != NUL)
|
||||
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
|
||||
{
|
||||
if (has_mbyte && (l = (*mb_ptr2len)(p)) > 1)
|
||||
{
|
||||
c = (*mb_ptr2char)(p);
|
||||
if (vim_isprintc(c))
|
||||
STRNCAT(res, p, l); // append printable multi-byte char
|
||||
else
|
||||
transchar_hex(res + STRLEN(res), c);
|
||||
p += l;
|
||||
}
|
||||
c = (*mb_ptr2char)(p);
|
||||
if (vim_isprintc(c))
|
||||
STRNCAT(res, p, l); // append printable multi-byte char
|
||||
else
|
||||
STRCAT(res, transchar_byte(*p++));
|
||||
transchar_hex(res + STRLEN(res), c);
|
||||
p += l;
|
||||
}
|
||||
else
|
||||
STRCAT(res, transchar_byte(*p++));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -1181,7 +1182,7 @@ win_lbr_chartabsize(
|
||||
? col == 0
|
||||
: (s[0] == NUL || s[1] == NUL)
|
||||
&& cts->cts_with_trailing)))
|
||||
&& tp->tp_id - 1 < gap->ga_len)
|
||||
&& -tp->tp_id - 1 < gap->ga_len)
|
||||
{
|
||||
char_u *p = ((char_u **)gap->ga_data)[-tp->tp_id - 1];
|
||||
|
||||
@@ -1195,7 +1196,7 @@ win_lbr_chartabsize(
|
||||
|
||||
cells = text_prop_position(wp, tp, vcol,
|
||||
(vcol + size) % (wp->w_width - col_off) + col_off,
|
||||
&n_extra, &p, NULL, NULL);
|
||||
&n_extra, &p, NULL, NULL, FALSE);
|
||||
#ifdef FEAT_LINEBREAK
|
||||
no_sbr = TRUE; // don't use 'showbreak' now
|
||||
#endif
|
||||
|
||||
113
src/cindent.c
113
src/cindent.c
@@ -46,21 +46,21 @@ cin_is_cinword(char_u *line)
|
||||
|
||||
cinw_len = (int)STRLEN(curbuf->b_p_cinw) + 1;
|
||||
cinw_buf = alloc(cinw_len);
|
||||
if (cinw_buf != NULL)
|
||||
if (cinw_buf == NULL)
|
||||
return FALSE;
|
||||
|
||||
line = skipwhite(line);
|
||||
for (cinw = curbuf->b_p_cinw; *cinw; )
|
||||
{
|
||||
line = skipwhite(line);
|
||||
for (cinw = curbuf->b_p_cinw; *cinw; )
|
||||
len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
|
||||
if (STRNCMP(line, cinw_buf, len) == 0
|
||||
&& (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
|
||||
{
|
||||
len = copy_option_part(&cinw, cinw_buf, cinw_len, ",");
|
||||
if (STRNCMP(line, cinw_buf, len) == 0
|
||||
&& (!vim_iswordc(line[len]) || !vim_iswordc(line[len - 1])))
|
||||
{
|
||||
retval = TRUE;
|
||||
break;
|
||||
}
|
||||
retval = TRUE;
|
||||
break;
|
||||
}
|
||||
vim_free(cinw_buf);
|
||||
}
|
||||
vim_free(cinw_buf);
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -644,43 +644,42 @@ cin_islabel(void) // XXX
|
||||
if (cin_isscopedecl(s))
|
||||
return FALSE;
|
||||
|
||||
if (cin_islabel_skip(&s))
|
||||
if (!cin_islabel_skip(&s))
|
||||
return FALSE;
|
||||
|
||||
// Only accept a label if the previous line is terminated or is a case
|
||||
// label.
|
||||
pos_T cursor_save;
|
||||
pos_T *trypos;
|
||||
char_u *line;
|
||||
|
||||
cursor_save = curwin->w_cursor;
|
||||
while (curwin->w_cursor.lnum > 1)
|
||||
{
|
||||
// Only accept a label if the previous line is terminated or is a case
|
||||
// label.
|
||||
pos_T cursor_save;
|
||||
pos_T *trypos;
|
||||
char_u *line;
|
||||
--curwin->w_cursor.lnum;
|
||||
|
||||
cursor_save = curwin->w_cursor;
|
||||
while (curwin->w_cursor.lnum > 1)
|
||||
{
|
||||
--curwin->w_cursor.lnum;
|
||||
// If we're in a comment or raw string now, skip to the start of
|
||||
// it.
|
||||
curwin->w_cursor.col = 0;
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
|
||||
curwin->w_cursor = *trypos;
|
||||
|
||||
// If we're in a comment or raw string now, skip to the start of
|
||||
// it.
|
||||
curwin->w_cursor.col = 0;
|
||||
if ((trypos = ind_find_start_CORS(NULL)) != NULL) // XXX
|
||||
curwin->w_cursor = *trypos;
|
||||
line = ml_get_curline();
|
||||
if (cin_ispreproc(line)) // ignore #defines, #if, etc.
|
||||
continue;
|
||||
if (*(line = cin_skipcomment(line)) == NUL)
|
||||
continue;
|
||||
|
||||
line = ml_get_curline();
|
||||
if (cin_ispreproc(line)) // ignore #defines, #if, etc.
|
||||
continue;
|
||||
if (*(line = cin_skipcomment(line)) == NUL)
|
||||
continue;
|
||||
|
||||
curwin->w_cursor = cursor_save;
|
||||
if (cin_isterminated(line, TRUE, FALSE)
|
||||
|| cin_isscopedecl(line)
|
||||
|| cin_iscase(line, TRUE)
|
||||
|| (cin_islabel_skip(&line) && cin_nocode(line)))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
curwin->w_cursor = cursor_save;
|
||||
return TRUE; // label at start of file???
|
||||
if (cin_isterminated(line, TRUE, FALSE)
|
||||
|| cin_isscopedecl(line)
|
||||
|| cin_iscase(line, TRUE)
|
||||
|| (cin_islabel_skip(&line) && cin_nocode(line)))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
return FALSE;
|
||||
curwin->w_cursor = cursor_save;
|
||||
return TRUE; // label at start of file???
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1688,18 +1687,18 @@ find_match_paren_after_brace (int ind_maxparen) // XXX
|
||||
{
|
||||
pos_T *trypos = find_match_paren(ind_maxparen);
|
||||
|
||||
if (trypos != NULL)
|
||||
{
|
||||
pos_T *tryposBrace = find_start_brace();
|
||||
if (trypos == NULL)
|
||||
return NULL;
|
||||
|
||||
// If both an unmatched '(' and '{' is found. Ignore the '('
|
||||
// position if the '{' is further down.
|
||||
if (tryposBrace != NULL
|
||||
&& (trypos->lnum != tryposBrace->lnum
|
||||
? trypos->lnum < tryposBrace->lnum
|
||||
: trypos->col < tryposBrace->col))
|
||||
trypos = NULL;
|
||||
}
|
||||
pos_T *tryposBrace = find_start_brace();
|
||||
|
||||
// If both an unmatched '(' and '{' is found. Ignore the '('
|
||||
// position if the '{' is further down.
|
||||
if (tryposBrace != NULL
|
||||
&& (trypos->lnum != tryposBrace->lnum
|
||||
? trypos->lnum < tryposBrace->lnum
|
||||
: trypos->col < tryposBrace->col))
|
||||
trypos = NULL;
|
||||
return trypos;
|
||||
}
|
||||
|
||||
@@ -2642,7 +2641,7 @@ get_c_indent(void)
|
||||
|
||||
// It could have been something like
|
||||
// case 1: if (asdf &&
|
||||
// ldfd) {
|
||||
// condition) {
|
||||
// }
|
||||
if ((curbuf->b_ind_js || curbuf->b_ind_keep_case_label)
|
||||
&& cin_iscase(skipwhite(ml_get_curline()), FALSE))
|
||||
@@ -3276,7 +3275,7 @@ get_c_indent(void)
|
||||
}
|
||||
|
||||
// Check if we are after an "if", "while", etc.
|
||||
// Also allow " } else".
|
||||
// Also allow "} else".
|
||||
if (cin_is_cinword(l) || cin_iselse(skipwhite(l)))
|
||||
{
|
||||
// Found an unterminated line after an if (), line up
|
||||
@@ -3336,7 +3335,7 @@ get_c_indent(void)
|
||||
{
|
||||
// If we're looking at "} else", let's make sure we
|
||||
// find the opening brace of the enclosing scope,
|
||||
// not the one from "if () {".
|
||||
// not the one from "if (condition) {".
|
||||
if (*l == '}')
|
||||
curwin->w_cursor.col =
|
||||
(colnr_T)(l - ml_get_curline()) + 1;
|
||||
@@ -3681,7 +3680,7 @@ term_again:
|
||||
// line needs to be indented as a function type spec.
|
||||
// Don't do this if the current line looks like a comment or if the
|
||||
// current line is terminated, ie. ends in ';', or if the current line
|
||||
// contains { or }: "void f() {\n if (1)"
|
||||
// contains { or }: "void f(condition) {\n if (1)"
|
||||
if (cur_curpos.lnum < curbuf->b_ml.ml_line_count
|
||||
&& !cin_nocode(theline)
|
||||
&& vim_strchr(theline, '{') == NULL
|
||||
|
||||
@@ -157,22 +157,22 @@ serverConvert(
|
||||
char_u *res = data;
|
||||
|
||||
*tofree = NULL;
|
||||
if (client_enc != NULL && p_enc != NULL)
|
||||
{
|
||||
vimconv_T vimconv;
|
||||
if (client_enc == NULL || p_enc == NULL)
|
||||
return res;
|
||||
|
||||
vimconv.vc_type = CONV_NONE;
|
||||
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
|
||||
&& vimconv.vc_type != CONV_NONE)
|
||||
{
|
||||
res = string_convert(&vimconv, data, NULL);
|
||||
if (res == NULL)
|
||||
res = data;
|
||||
else
|
||||
*tofree = res;
|
||||
}
|
||||
convert_setup(&vimconv, NULL, NULL);
|
||||
vimconv_T vimconv;
|
||||
|
||||
vimconv.vc_type = CONV_NONE;
|
||||
if (convert_setup(&vimconv, client_enc, p_enc) != FAIL
|
||||
&& vimconv.vc_type != CONV_NONE)
|
||||
{
|
||||
res = string_convert(&vimconv, data, NULL);
|
||||
if (res == NULL)
|
||||
res = data;
|
||||
else
|
||||
*tofree = res;
|
||||
}
|
||||
convert_setup(&vimconv, NULL, NULL);
|
||||
return res;
|
||||
}
|
||||
#endif
|
||||
@@ -191,38 +191,38 @@ static char_u *build_drop_cmd(int filec, char **filev, int tabs, int sendReply);
|
||||
void
|
||||
exec_on_server(mparm_T *parmp)
|
||||
{
|
||||
if (parmp->serverName_arg == NULL || *parmp->serverName_arg != NUL)
|
||||
if (parmp->serverName_arg != NULL && *parmp->serverName_arg == NUL)
|
||||
return;
|
||||
|
||||
# ifdef MSWIN
|
||||
// Initialise the client/server messaging infrastructure.
|
||||
serverInitMessaging();
|
||||
# endif
|
||||
|
||||
/*
|
||||
* When a command server argument was found, execute it. This may
|
||||
* exit Vim when it was successful. Otherwise it's executed further
|
||||
* on. Remember the encoding used here in "serverStrEnc".
|
||||
*/
|
||||
if (parmp->serverArg)
|
||||
{
|
||||
# ifdef MSWIN
|
||||
// Initialise the client/server messaging infrastructure.
|
||||
serverInitMessaging();
|
||||
# endif
|
||||
|
||||
/*
|
||||
* When a command server argument was found, execute it. This may
|
||||
* exit Vim when it was successful. Otherwise it's executed further
|
||||
* on. Remember the encoding used here in "serverStrEnc".
|
||||
*/
|
||||
if (parmp->serverArg)
|
||||
{
|
||||
cmdsrv_main(&parmp->argc, parmp->argv,
|
||||
parmp->serverName_arg, &parmp->serverStr);
|
||||
parmp->serverStrEnc = vim_strsave(p_enc);
|
||||
}
|
||||
|
||||
// If we're still running, get the name to register ourselves.
|
||||
// On Win32 can register right now, for X11 need to setup the
|
||||
// clipboard first, it's further down.
|
||||
parmp->servername = serverMakeName(parmp->serverName_arg,
|
||||
parmp->argv[0]);
|
||||
# ifdef MSWIN
|
||||
if (parmp->servername != NULL)
|
||||
{
|
||||
serverSetName(parmp->servername);
|
||||
vim_free(parmp->servername);
|
||||
}
|
||||
# endif
|
||||
cmdsrv_main(&parmp->argc, parmp->argv,
|
||||
parmp->serverName_arg, &parmp->serverStr);
|
||||
parmp->serverStrEnc = vim_strsave(p_enc);
|
||||
}
|
||||
|
||||
// If we're still running, get the name to register ourselves.
|
||||
// On Win32 can register right now, for X11 need to setup the
|
||||
// clipboard first, it's further down.
|
||||
parmp->servername = serverMakeName(parmp->serverName_arg,
|
||||
parmp->argv[0]);
|
||||
# ifdef MSWIN
|
||||
if (parmp->servername != NULL)
|
||||
{
|
||||
serverSetName(parmp->servername);
|
||||
vim_free(parmp->servername);
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -35,7 +35,7 @@ static int compl_match_arraysize;
|
||||
static int compl_startcol;
|
||||
static int compl_selected;
|
||||
|
||||
#define SHOW_FILE_TEXT(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
|
||||
#define SHOW_MATCH(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
|
||||
|
||||
/*
|
||||
* Returns TRUE if fuzzy completion is supported for a given cmdline completion
|
||||
@@ -56,6 +56,7 @@ cmdline_fuzzy_completion_supported(expand_T *xp)
|
||||
&& xp->xp_context != EXPAND_OLD_SETTING
|
||||
&& xp->xp_context != EXPAND_OWNSYNTAX
|
||||
&& xp->xp_context != EXPAND_PACKADD
|
||||
&& xp->xp_context != EXPAND_RUNTIME
|
||||
&& xp->xp_context != EXPAND_SHELLCMD
|
||||
&& xp->xp_context != EXPAND_TAGS
|
||||
&& xp->xp_context != EXPAND_TAGS_LISTFILES
|
||||
@@ -339,7 +340,7 @@ cmdline_pum_create(
|
||||
compl_match_array = ALLOC_MULT(pumitem_T, compl_match_arraysize);
|
||||
for (i = 0; i < numMatches; i++)
|
||||
{
|
||||
compl_match_array[i].pum_text = SHOW_FILE_TEXT(i);
|
||||
compl_match_array[i].pum_text = SHOW_MATCH(i);
|
||||
compl_match_array[i].pum_info = NULL;
|
||||
compl_match_array[i].pum_extra = NULL;
|
||||
compl_match_array[i].pum_kind = NULL;
|
||||
@@ -369,7 +370,8 @@ cmdline_pum_create(
|
||||
/*
|
||||
* Display the cmdline completion matches in a popup menu
|
||||
*/
|
||||
void cmdline_pum_display(void)
|
||||
void
|
||||
cmdline_pum_display(void)
|
||||
{
|
||||
pum_display(compl_match_array, compl_match_arraysize, compl_selected);
|
||||
}
|
||||
@@ -377,7 +379,8 @@ void cmdline_pum_display(void)
|
||||
/*
|
||||
* Returns TRUE if the cmdline completion popup menu is being displayed.
|
||||
*/
|
||||
int cmdline_pum_active(void)
|
||||
int
|
||||
cmdline_pum_active(void)
|
||||
{
|
||||
return pum_visible() && compl_match_array != NULL;
|
||||
}
|
||||
@@ -386,7 +389,8 @@ int cmdline_pum_active(void)
|
||||
* Remove the cmdline completion popup menu (if present), free the list of
|
||||
* items and refresh the screen.
|
||||
*/
|
||||
void cmdline_pum_remove(void)
|
||||
void
|
||||
cmdline_pum_remove(void)
|
||||
{
|
||||
int save_p_lz = p_lz;
|
||||
int save_KeyTyped = KeyTyped;
|
||||
@@ -403,7 +407,8 @@ void cmdline_pum_remove(void)
|
||||
KeyTyped = save_KeyTyped;
|
||||
}
|
||||
|
||||
void cmdline_pum_cleanup(cmdline_info_T *cclp)
|
||||
void
|
||||
cmdline_pum_cleanup(cmdline_info_T *cclp)
|
||||
{
|
||||
cmdline_pum_remove();
|
||||
wildmenu_cleanup(cclp);
|
||||
@@ -413,7 +418,8 @@ void cmdline_pum_cleanup(cmdline_info_T *cclp)
|
||||
* Returns the starting column number to use for the cmdline completion popup
|
||||
* menu.
|
||||
*/
|
||||
int cmdline_compl_startcol(void)
|
||||
int
|
||||
cmdline_compl_startcol(void)
|
||||
{
|
||||
return compl_startcol;
|
||||
}
|
||||
@@ -484,7 +490,6 @@ win_redr_status_matches(
|
||||
int match,
|
||||
int showtail)
|
||||
{
|
||||
#define L_MATCH(m) (showtail ? showmatches_gettail(matches[m]) : matches[m])
|
||||
int row;
|
||||
char_u *buf;
|
||||
int len;
|
||||
@@ -520,7 +525,7 @@ win_redr_status_matches(
|
||||
highlight = FALSE;
|
||||
}
|
||||
// count 1 for the ending ">"
|
||||
clen = status_match_len(xp, L_MATCH(match)) + 3;
|
||||
clen = status_match_len(xp, SHOW_MATCH(match)) + 3;
|
||||
if (match == 0)
|
||||
first_match = 0;
|
||||
else if (match < first_match)
|
||||
@@ -533,7 +538,7 @@ win_redr_status_matches(
|
||||
{
|
||||
// check if match fits on the screen
|
||||
for (i = first_match; i < match; ++i)
|
||||
clen += status_match_len(xp, L_MATCH(i)) + 2;
|
||||
clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
|
||||
if (first_match > 0)
|
||||
clen += 2;
|
||||
// jumping right, put match at the left
|
||||
@@ -544,7 +549,7 @@ win_redr_status_matches(
|
||||
clen = 2;
|
||||
for (i = match; i < num_matches; ++i)
|
||||
{
|
||||
clen += status_match_len(xp, L_MATCH(i)) + 2;
|
||||
clen += status_match_len(xp, SHOW_MATCH(i)) + 2;
|
||||
if ((long)clen >= Columns)
|
||||
break;
|
||||
}
|
||||
@@ -555,7 +560,7 @@ win_redr_status_matches(
|
||||
if (add_left)
|
||||
while (first_match > 0)
|
||||
{
|
||||
clen += status_match_len(xp, L_MATCH(first_match - 1)) + 2;
|
||||
clen += status_match_len(xp, SHOW_MATCH(first_match - 1)) + 2;
|
||||
if ((long)clen >= Columns)
|
||||
break;
|
||||
--first_match;
|
||||
@@ -576,7 +581,7 @@ win_redr_status_matches(
|
||||
clen = len;
|
||||
|
||||
i = first_match;
|
||||
while ((long)(clen + status_match_len(xp, L_MATCH(i)) + 2) < Columns)
|
||||
while ((long)(clen + status_match_len(xp, SHOW_MATCH(i)) + 2) < Columns)
|
||||
{
|
||||
if (i == match)
|
||||
{
|
||||
@@ -584,7 +589,7 @@ win_redr_status_matches(
|
||||
selstart_col = clen;
|
||||
}
|
||||
|
||||
s = L_MATCH(i);
|
||||
s = SHOW_MATCH(i);
|
||||
// Check for menu separators - replace with '|'
|
||||
#ifdef FEAT_MENU
|
||||
emenu = (xp->xp_context == EXPAND_MENUS
|
||||
@@ -975,6 +980,10 @@ ExpandOne(
|
||||
FreeWild(xp->xp_numfiles, xp->xp_files);
|
||||
xp->xp_numfiles = -1;
|
||||
VIM_CLEAR(orig_save);
|
||||
|
||||
// The entries from xp_files may be used in the PUM, remove it.
|
||||
if (compl_match_array != NULL)
|
||||
cmdline_pum_remove();
|
||||
}
|
||||
findex = 0;
|
||||
|
||||
@@ -1120,7 +1129,7 @@ showmatches_oneline(
|
||||
// Expansion was done here, file names are literal.
|
||||
isdir = mch_isdir(matches[j]);
|
||||
if (showtail)
|
||||
p = SHOW_FILE_TEXT(j);
|
||||
p = SHOW_MATCH(j);
|
||||
else
|
||||
{
|
||||
home_replace(NULL, matches[j], NameBuff, MAXPATHL,
|
||||
@@ -1131,7 +1140,7 @@ showmatches_oneline(
|
||||
else
|
||||
{
|
||||
isdir = FALSE;
|
||||
p = SHOW_FILE_TEXT(j);
|
||||
p = SHOW_MATCH(j);
|
||||
}
|
||||
lastlen = msg_outtrans_attr(p, isdir ? dir_attr : 0);
|
||||
}
|
||||
@@ -1210,7 +1219,7 @@ showmatches(expand_T *xp, int wildmenu UNUSED)
|
||||
j = vim_strsize(NameBuff);
|
||||
}
|
||||
else
|
||||
j = vim_strsize(SHOW_FILE_TEXT(i));
|
||||
j = vim_strsize(SHOW_MATCH(i));
|
||||
if (j > maxlen)
|
||||
maxlen = j;
|
||||
}
|
||||
@@ -1354,6 +1363,7 @@ addstar(
|
||||
// For a tag pattern starting with "/" no translation is needed.
|
||||
if (context == EXPAND_HELP
|
||||
|| context == EXPAND_COLORS
|
||||
|| context == EXPAND_RUNTIME
|
||||
|| context == EXPAND_COMPILER
|
||||
|| context == EXPAND_OWNSYNTAX
|
||||
|| context == EXPAND_FILETYPE
|
||||
@@ -1842,21 +1852,22 @@ find_cmd_after_substitute_cmd(char_u *arg)
|
||||
find_cmd_after_isearch_cmd(expand_T *xp, char_u *arg)
|
||||
{
|
||||
arg = skipwhite(skipdigits(arg)); // skip count
|
||||
if (*arg == '/') // Match regexp, not just whole words
|
||||
{
|
||||
for (++arg; *arg && *arg != '/'; arg++)
|
||||
if (*arg == '\\' && arg[1] != NUL)
|
||||
arg++;
|
||||
if (*arg)
|
||||
{
|
||||
arg = skipwhite(arg + 1);
|
||||
if (*arg != '/')
|
||||
return NULL;
|
||||
|
||||
// Check for trailing illegal characters
|
||||
if (*arg == NUL || vim_strchr((char_u *)"|\"\n", *arg) == NULL)
|
||||
xp->xp_context = EXPAND_NOTHING;
|
||||
else
|
||||
return arg;
|
||||
}
|
||||
// Match regexp, not just whole words
|
||||
for (++arg; *arg && *arg != '/'; arg++)
|
||||
if (*arg == '\\' && arg[1] != NUL)
|
||||
arg++;
|
||||
if (*arg)
|
||||
{
|
||||
arg = skipwhite(arg + 1);
|
||||
|
||||
// Check for trailing illegal characters
|
||||
if (*arg == NUL || vim_strchr((char_u *)"|\"\n", *arg) == NULL)
|
||||
xp->xp_context = EXPAND_NOTHING;
|
||||
else
|
||||
return arg;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -2303,6 +2314,10 @@ set_context_by_cmdname(
|
||||
xp->xp_pattern = arg;
|
||||
break;
|
||||
|
||||
case CMD_runtime:
|
||||
set_context_in_runtime_cmd(xp, arg);
|
||||
break;
|
||||
|
||||
case CMD_compiler:
|
||||
xp->xp_context = EXPAND_COMPILER;
|
||||
xp->xp_pattern = arg;
|
||||
@@ -2772,7 +2787,7 @@ get_breakadd_arg(expand_T *xp UNUSED, int idx)
|
||||
{
|
||||
char *opts[] = {"expr", "file", "func", "here"};
|
||||
|
||||
if (idx >=0 && idx <= 3)
|
||||
if (idx >= 0 && idx <= 3)
|
||||
{
|
||||
// breakadd {expr, file, func, here}
|
||||
if (breakpt_expand_what == EXP_BREAKPT_ADD)
|
||||
@@ -3010,6 +3025,10 @@ ExpandFromContext(
|
||||
return ExpandRTDir(pat, DIP_START + DIP_OPT, numMatches, matches,
|
||||
directories);
|
||||
}
|
||||
if (xp->xp_context == EXPAND_RUNTIME)
|
||||
{
|
||||
return expand_runtime_cmd(pat, numMatches, matches);
|
||||
}
|
||||
if (xp->xp_context == EXPAND_COMPILER)
|
||||
{
|
||||
char *directories[] = {"compiler", NULL};
|
||||
@@ -3590,13 +3609,15 @@ ExpandUserList(
|
||||
/*
|
||||
* Expand "file" for all comma-separated directories in "path".
|
||||
* Adds the matches to "ga". Caller must init "ga".
|
||||
* If "dirs" is TRUE only expand directory names.
|
||||
*/
|
||||
void
|
||||
globpath(
|
||||
char_u *path,
|
||||
char_u *file,
|
||||
garray_T *ga,
|
||||
int expand_options)
|
||||
int expand_options,
|
||||
int dirs)
|
||||
{
|
||||
expand_T xpc;
|
||||
char_u *buf;
|
||||
@@ -3609,7 +3630,7 @@ globpath(
|
||||
return;
|
||||
|
||||
ExpandInit(&xpc);
|
||||
xpc.xp_context = EXPAND_FILES;
|
||||
xpc.xp_context = dirs ? EXPAND_DIRECTORIES : EXPAND_FILES;
|
||||
|
||||
// Loop over all entries in {path}.
|
||||
while (*path != NUL)
|
||||
@@ -4016,6 +4037,11 @@ f_getcompletion(typval_T *argvars, typval_T *rettv)
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
# endif
|
||||
if (xpc.xp_context == EXPAND_RUNTIME)
|
||||
{
|
||||
set_context_in_runtime_cmd(&xpc, xpc.xp_pattern);
|
||||
xpc.xp_pattern_len = (int)STRLEN(xpc.xp_pattern);
|
||||
}
|
||||
}
|
||||
|
||||
if (cmdline_fuzzy_completion_supported(&xpc))
|
||||
|
||||
@@ -460,44 +460,46 @@ del_history_entry(int histype, char_u *str)
|
||||
int last;
|
||||
int found = FALSE;
|
||||
|
||||
regmatch.regprog = NULL;
|
||||
if (hislen == 0 || histype < 0 || histype >= HIST_COUNT || *str == NUL
|
||||
|| hisidx[histype] < 0)
|
||||
return FALSE;
|
||||
|
||||
idx = hisidx[histype];
|
||||
regmatch.regprog = vim_regcomp(str, RE_MAGIC + RE_STRING);
|
||||
if (regmatch.regprog == NULL)
|
||||
return FALSE;
|
||||
|
||||
regmatch.rm_ic = FALSE; // always match case
|
||||
if (hislen != 0
|
||||
&& histype >= 0
|
||||
&& histype < HIST_COUNT
|
||||
&& *str != NUL
|
||||
&& (idx = hisidx[histype]) >= 0
|
||||
&& (regmatch.regprog = vim_regcomp(str, RE_MAGIC + RE_STRING))
|
||||
!= NULL)
|
||||
|
||||
i = last = idx;
|
||||
do
|
||||
{
|
||||
i = last = idx;
|
||||
do
|
||||
hisptr = &history[histype][i];
|
||||
if (hisptr->hisstr == NULL)
|
||||
break;
|
||||
if (vim_regexec(®match, hisptr->hisstr, (colnr_T)0))
|
||||
{
|
||||
hisptr = &history[histype][i];
|
||||
if (hisptr->hisstr == NULL)
|
||||
break;
|
||||
if (vim_regexec(®match, hisptr->hisstr, (colnr_T)0))
|
||||
found = TRUE;
|
||||
vim_free(hisptr->hisstr);
|
||||
clear_hist_entry(hisptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i != last)
|
||||
{
|
||||
found = TRUE;
|
||||
vim_free(hisptr->hisstr);
|
||||
history[histype][last] = *hisptr;
|
||||
clear_hist_entry(hisptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i != last)
|
||||
{
|
||||
history[histype][last] = *hisptr;
|
||||
clear_hist_entry(hisptr);
|
||||
}
|
||||
if (--last < 0)
|
||||
last += hislen;
|
||||
}
|
||||
if (--i < 0)
|
||||
i += hislen;
|
||||
} while (i != idx);
|
||||
if (history[histype][idx].hisstr == NULL)
|
||||
hisidx[histype] = -1;
|
||||
}
|
||||
if (--last < 0)
|
||||
last += hislen;
|
||||
}
|
||||
if (--i < 0)
|
||||
i += hislen;
|
||||
} while (i != idx);
|
||||
|
||||
if (history[histype][idx].hisstr == NULL)
|
||||
hisidx[histype] = -1;
|
||||
|
||||
vim_regfree(regmatch.regprog);
|
||||
return found;
|
||||
}
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
|
||||
/* Define if you have the header file: */
|
||||
#undef HAVE_DIRENT_H
|
||||
#undef HAVE_DISPATCH_DISPATCH_H
|
||||
#undef HAVE_ERRNO_H
|
||||
#undef HAVE_FCNTL_H
|
||||
#undef HAVE_FRAME_H
|
||||
|
||||
@@ -314,6 +314,8 @@ fi
|
||||
dnl Mac OS X 10.9+ no longer include AvailabilityMacros.h in Carbon
|
||||
dnl so we need to include it to have access to version macros.
|
||||
AC_CHECK_HEADERS(AvailabilityMacros.h)
|
||||
# 10.5 and earlier lack dispatch
|
||||
AC_CHECK_HEADERS(dispatch/dispatch.h)
|
||||
|
||||
AC_SUBST(OS_EXTRA_SRC)
|
||||
AC_SUBST(OS_EXTRA_OBJ)
|
||||
@@ -4586,8 +4588,8 @@ if test "$GCC" = yes; then
|
||||
dnl And undefine it first to avoid a warning.
|
||||
AC_MSG_CHECKING(whether we need -D_FORTIFY_SOURCE=1)
|
||||
if test "$gccmajor" -gt "3"; then
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
CFLAGS=`echo "$CFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g' -e 's/$/ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1/'`
|
||||
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-D_FORTIFY_SOURCE=.,//g' -e 's/ *-Wp,-D_FORTIFY_SOURCE=. / /g' -e 's/,-D_FORTIFY_SOURCE=. //g' -e 's/ *-D_FORTIFY_SOURCE=.//g' -e 's/ *-Wp,-U_FORTIFY_SOURCE/ /g' -e 's/ *-U_FORTIFY_SOURCE//g'`
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
||||
21
src/crypt.c
21
src/crypt.c
@@ -73,7 +73,7 @@ typedef struct {
|
||||
char_u *p2, int last);
|
||||
} cryptmethod_T;
|
||||
|
||||
static int crypt_sodium_init(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
|
||||
static int crypt_sodium_init_(cryptstate_T *state, char_u *key, char_u *salt, int salt_len, char_u *seed, int seed_len);
|
||||
static long crypt_sodium_buffer_decode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
|
||||
static long crypt_sodium_buffer_encode(cryptstate_T *state, char_u *from, size_t len, char_u **buf_out, int last);
|
||||
|
||||
@@ -145,7 +145,7 @@ static cryptmethod_T cryptmethods[CRYPT_M_COUNT] = {
|
||||
#endif
|
||||
FALSE,
|
||||
NULL,
|
||||
crypt_sodium_init,
|
||||
crypt_sodium_init_,
|
||||
NULL, NULL,
|
||||
crypt_sodium_buffer_encode, crypt_sodium_buffer_decode,
|
||||
NULL, NULL,
|
||||
@@ -198,6 +198,7 @@ typedef struct {
|
||||
dll_crypto_secretstream_xchacha20poly1305_pull
|
||||
# define crypto_pwhash dll_crypto_pwhash
|
||||
# define randombytes_buf dll_randombytes_buf
|
||||
# define randombytes_random dll_randombytes_random
|
||||
|
||||
static int (*dll_sodium_init)(void) = NULL;
|
||||
static void (*dll_sodium_free)(void *) = NULL;
|
||||
@@ -231,6 +232,7 @@ static int (*dll_crypto_pwhash)(unsigned char * const out,
|
||||
unsigned long long opslimit, size_t memlimit, int alg)
|
||||
= NULL;
|
||||
static void (*dll_randombytes_buf)(void * const buf, const size_t size);
|
||||
static uint32_t (*dll_randombytes_random)(void);
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
@@ -248,6 +250,7 @@ static struct {
|
||||
{"crypto_secretstream_xchacha20poly1305_pull", (SODIUM_PROC*)&dll_crypto_secretstream_xchacha20poly1305_pull},
|
||||
{"crypto_pwhash", (SODIUM_PROC*)&dll_crypto_pwhash},
|
||||
{"randombytes_buf", (SODIUM_PROC*)&dll_randombytes_buf},
|
||||
{"randombytes_random", (SODIUM_PROC*)&dll_randombytes_random},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
@@ -855,7 +858,7 @@ crypt_append_msg(
|
||||
}
|
||||
|
||||
static int
|
||||
crypt_sodium_init(
|
||||
crypt_sodium_init_(
|
||||
cryptstate_T *state UNUSED,
|
||||
char_u *key UNUSED,
|
||||
char_u *salt UNUSED,
|
||||
@@ -1143,6 +1146,18 @@ crypt_sodium_randombytes_buf(void *const buf, const size_t size)
|
||||
{
|
||||
randombytes_buf(buf, size);
|
||||
}
|
||||
|
||||
int
|
||||
crypt_sodium_init(void)
|
||||
{
|
||||
return sodium_init();
|
||||
}
|
||||
|
||||
uint32_t
|
||||
crypt_sodium_randombytes_random(void)
|
||||
{
|
||||
return randombytes_random();
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif // FEAT_CRYPT
|
||||
|
||||
@@ -60,7 +60,8 @@ make_crc_tab(void)
|
||||
/*
|
||||
* Return the next byte in the pseudo-random sequence.
|
||||
*/
|
||||
#define DECRYPT_BYTE_ZIP(keys, t) { \
|
||||
#define DECRYPT_BYTE_ZIP(keys, t) \
|
||||
{ \
|
||||
short_u temp = (short_u)keys[2] | 2; \
|
||||
t = (int)(((unsigned)(temp * (temp ^ 1U)) >> 8) & 0xff); \
|
||||
}
|
||||
|
||||
187
src/debugger.c
187
src/debugger.c
@@ -315,14 +315,14 @@ get_maxbacktrace_level(char_u *sname)
|
||||
char *p, *q;
|
||||
int maxbacktrace = 0;
|
||||
|
||||
if (sname != NULL)
|
||||
if (sname == NULL)
|
||||
return 0;
|
||||
|
||||
p = (char *)sname;
|
||||
while ((q = strstr(p, "..")) != NULL)
|
||||
{
|
||||
p = (char *)sname;
|
||||
while ((q = strstr(p, "..")) != NULL)
|
||||
{
|
||||
p = q + 2;
|
||||
maxbacktrace++;
|
||||
}
|
||||
p = q + 2;
|
||||
maxbacktrace++;
|
||||
}
|
||||
return maxbacktrace;
|
||||
}
|
||||
@@ -486,21 +486,20 @@ dbg_check_skipped(exarg_T *eap)
|
||||
{
|
||||
int prev_got_int;
|
||||
|
||||
if (debug_skipped)
|
||||
{
|
||||
// Save the value of got_int and reset it. We don't want a previous
|
||||
// interruption cause flushing the input buffer.
|
||||
prev_got_int = got_int;
|
||||
got_int = FALSE;
|
||||
debug_breakpoint_name = debug_skipped_name;
|
||||
// eap->skip is TRUE
|
||||
eap->skip = FALSE;
|
||||
(void)dbg_check_breakpoint(eap);
|
||||
eap->skip = TRUE;
|
||||
got_int |= prev_got_int;
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
if (!debug_skipped)
|
||||
return FALSE;
|
||||
|
||||
// Save the value of got_int and reset it. We don't want a previous
|
||||
// interruption cause flushing the input buffer.
|
||||
prev_got_int = got_int;
|
||||
got_int = FALSE;
|
||||
debug_breakpoint_name = debug_skipped_name;
|
||||
// eap->skip is TRUE
|
||||
eap->skip = FALSE;
|
||||
(void)dbg_check_breakpoint(eap);
|
||||
eap->skip = TRUE;
|
||||
got_int |= prev_got_int;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -682,44 +681,44 @@ ex_breakadd(exarg_T *eap)
|
||||
gap = &prof_ga;
|
||||
#endif
|
||||
|
||||
if (dbg_parsearg(eap->arg, gap) == OK)
|
||||
{
|
||||
bp = &DEBUGGY(gap, gap->ga_len);
|
||||
bp->dbg_forceit = eap->forceit;
|
||||
if (dbg_parsearg(eap->arg, gap) != OK)
|
||||
return;
|
||||
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
bp = &DEBUGGY(gap, gap->ga_len);
|
||||
bp->dbg_forceit = eap->forceit;
|
||||
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
{
|
||||
pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
|
||||
if (pat != NULL)
|
||||
{
|
||||
pat = file_pat_to_reg_pat(bp->dbg_name, NULL, NULL, FALSE);
|
||||
if (pat != NULL)
|
||||
{
|
||||
bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
|
||||
vim_free(pat);
|
||||
}
|
||||
if (pat == NULL || bp->dbg_prog == NULL)
|
||||
vim_free(bp->dbg_name);
|
||||
else
|
||||
{
|
||||
if (bp->dbg_lnum == 0) // default line number is 1
|
||||
bp->dbg_lnum = 1;
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx != CMD_profile)
|
||||
#endif
|
||||
{
|
||||
DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
}
|
||||
++gap->ga_len;
|
||||
}
|
||||
bp->dbg_prog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
|
||||
vim_free(pat);
|
||||
}
|
||||
if (pat == NULL || bp->dbg_prog == NULL)
|
||||
vim_free(bp->dbg_name);
|
||||
else
|
||||
{
|
||||
// DBG_EXPR
|
||||
DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
if (gap == &dbg_breakp)
|
||||
has_expr_breakpoint = TRUE;
|
||||
if (bp->dbg_lnum == 0) // default line number is 1
|
||||
bp->dbg_lnum = 1;
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx != CMD_profile)
|
||||
#endif
|
||||
{
|
||||
DEBUGGY(gap, gap->ga_len).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
}
|
||||
++gap->ga_len;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// DBG_EXPR
|
||||
DEBUGGY(gap, gap->ga_len++).dbg_nr = ++last_breakp;
|
||||
++debug_tick;
|
||||
if (gap == &dbg_breakp)
|
||||
has_expr_breakpoint = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -822,36 +821,37 @@ ex_breakdel(exarg_T *eap)
|
||||
}
|
||||
|
||||
if (todel < 0)
|
||||
semsg(_(e_breakpoint_not_found_str), eap->arg);
|
||||
else
|
||||
{
|
||||
while (gap->ga_len > 0)
|
||||
{
|
||||
vim_free(DEBUGGY(gap, todel).dbg_name);
|
||||
#ifdef FEAT_EVAL
|
||||
if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
|
||||
&& DEBUGGY(gap, todel).dbg_val != NULL)
|
||||
free_tv(DEBUGGY(gap, todel).dbg_val);
|
||||
#endif
|
||||
vim_regfree(DEBUGGY(gap, todel).dbg_prog);
|
||||
--gap->ga_len;
|
||||
if (todel < gap->ga_len)
|
||||
mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
|
||||
(gap->ga_len - todel) * sizeof(struct debuggy));
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx == CMD_breakdel)
|
||||
#endif
|
||||
++debug_tick;
|
||||
if (!del_all)
|
||||
break;
|
||||
}
|
||||
|
||||
// If all breakpoints were removed clear the array.
|
||||
if (gap->ga_len == 0)
|
||||
ga_clear(gap);
|
||||
if (gap == &dbg_breakp)
|
||||
update_has_expr_breakpoint();
|
||||
semsg(_(e_breakpoint_not_found_str), eap->arg);
|
||||
return;
|
||||
}
|
||||
|
||||
while (gap->ga_len > 0)
|
||||
{
|
||||
vim_free(DEBUGGY(gap, todel).dbg_name);
|
||||
#ifdef FEAT_EVAL
|
||||
if (DEBUGGY(gap, todel).dbg_type == DBG_EXPR
|
||||
&& DEBUGGY(gap, todel).dbg_val != NULL)
|
||||
free_tv(DEBUGGY(gap, todel).dbg_val);
|
||||
#endif
|
||||
vim_regfree(DEBUGGY(gap, todel).dbg_prog);
|
||||
--gap->ga_len;
|
||||
if (todel < gap->ga_len)
|
||||
mch_memmove(&DEBUGGY(gap, todel), &DEBUGGY(gap, todel + 1),
|
||||
(gap->ga_len - todel) * sizeof(struct debuggy));
|
||||
#ifdef FEAT_PROFILE
|
||||
if (eap->cmdidx == CMD_breakdel)
|
||||
#endif
|
||||
++debug_tick;
|
||||
if (!del_all)
|
||||
break;
|
||||
}
|
||||
|
||||
// If all breakpoints were removed clear the array.
|
||||
if (gap->ga_len == 0)
|
||||
ga_clear(gap);
|
||||
if (gap == &dbg_breakp)
|
||||
update_has_expr_breakpoint();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -864,23 +864,26 @@ ex_breaklist(exarg_T *eap UNUSED)
|
||||
int i;
|
||||
|
||||
if (dbg_breakp.ga_len == 0)
|
||||
{
|
||||
msg(_("No breakpoints defined"));
|
||||
else
|
||||
for (i = 0; i < dbg_breakp.ga_len; ++i)
|
||||
{
|
||||
bp = &BREAKP(i);
|
||||
if (bp->dbg_type == DBG_FILE)
|
||||
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
smsg(_("%3d %s %s line %ld"),
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < dbg_breakp.ga_len; ++i)
|
||||
{
|
||||
bp = &BREAKP(i);
|
||||
if (bp->dbg_type == DBG_FILE)
|
||||
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
|
||||
if (bp->dbg_type != DBG_EXPR)
|
||||
smsg(_("%3d %s %s line %ld"),
|
||||
bp->dbg_nr,
|
||||
bp->dbg_type == DBG_FUNC ? "func" : "file",
|
||||
bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
|
||||
(long)bp->dbg_lnum);
|
||||
else
|
||||
smsg(_("%3d expr %s"),
|
||||
else
|
||||
smsg(_("%3d expr %s"),
|
||||
bp->dbg_nr, bp->dbg_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
222
src/dict.c
222
src/dict.c
@@ -30,21 +30,21 @@ dict_alloc(void)
|
||||
dict_T *d;
|
||||
|
||||
d = ALLOC_CLEAR_ONE(dict_T);
|
||||
if (d != NULL)
|
||||
{
|
||||
// Add the dict to the list of dicts for garbage collection.
|
||||
if (first_dict != NULL)
|
||||
first_dict->dv_used_prev = d;
|
||||
d->dv_used_next = first_dict;
|
||||
d->dv_used_prev = NULL;
|
||||
first_dict = d;
|
||||
if (d == NULL)
|
||||
return NULL;
|
||||
|
||||
hash_init(&d->dv_hashtab);
|
||||
d->dv_lock = 0;
|
||||
d->dv_scope = 0;
|
||||
d->dv_refcount = 0;
|
||||
d->dv_copyID = 0;
|
||||
}
|
||||
// Add the dict to the list of dicts for garbage collection.
|
||||
if (first_dict != NULL)
|
||||
first_dict->dv_used_prev = d;
|
||||
d->dv_used_next = first_dict;
|
||||
d->dv_used_prev = NULL;
|
||||
first_dict = d;
|
||||
|
||||
hash_init(&d->dv_hashtab);
|
||||
d->dv_lock = 0;
|
||||
d->dv_scope = 0;
|
||||
d->dv_refcount = 0;
|
||||
d->dv_copyID = 0;
|
||||
return d;
|
||||
}
|
||||
|
||||
@@ -228,13 +228,13 @@ dictitem_alloc(char_u *key)
|
||||
size_t len = STRLEN(key);
|
||||
|
||||
di = alloc(offsetof(dictitem_T, di_key) + len + 1);
|
||||
if (di != NULL)
|
||||
{
|
||||
mch_memmove(di->di_key, key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
di->di_tv.v_lock = 0;
|
||||
di->di_tv.v_type = VAR_UNKNOWN;
|
||||
}
|
||||
if (di == NULL)
|
||||
return NULL;
|
||||
|
||||
mch_memmove(di->di_key, key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
di->di_tv.v_lock = 0;
|
||||
di->di_tv.v_type = VAR_UNKNOWN;
|
||||
return di;
|
||||
}
|
||||
|
||||
@@ -248,12 +248,12 @@ dictitem_copy(dictitem_T *org)
|
||||
size_t len = STRLEN(org->di_key);
|
||||
|
||||
di = alloc(offsetof(dictitem_T, di_key) + len + 1);
|
||||
if (di != NULL)
|
||||
{
|
||||
mch_memmove(di->di_key, org->di_key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
copy_tv(&org->di_tv, &di->di_tv);
|
||||
}
|
||||
if (di == NULL)
|
||||
return NULL;
|
||||
|
||||
mch_memmove(di->di_key, org->di_key, len + 1);
|
||||
di->di_flags = DI_FLAGS_ALLOC;
|
||||
copy_tv(&org->di_tv, &di->di_tv);
|
||||
return di;
|
||||
}
|
||||
|
||||
@@ -303,53 +303,53 @@ dict_copy(dict_T *orig, int deep, int top, int copyID)
|
||||
return NULL;
|
||||
|
||||
copy = dict_alloc();
|
||||
if (copy != NULL)
|
||||
if (copy == NULL)
|
||||
return NULL;
|
||||
|
||||
if (copyID != 0)
|
||||
{
|
||||
if (copyID != 0)
|
||||
{
|
||||
orig->dv_copyID = copyID;
|
||||
orig->dv_copydict = copy;
|
||||
}
|
||||
if (orig->dv_type == NULL || top || deep)
|
||||
copy->dv_type = NULL;
|
||||
else
|
||||
copy->dv_type = alloc_type(orig->dv_type);
|
||||
orig->dv_copyID = copyID;
|
||||
orig->dv_copydict = copy;
|
||||
}
|
||||
if (orig->dv_type == NULL || top || deep)
|
||||
copy->dv_type = NULL;
|
||||
else
|
||||
copy->dv_type = alloc_type(orig->dv_type);
|
||||
|
||||
todo = (int)orig->dv_hashtab.ht_used;
|
||||
for (hi = orig->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
|
||||
todo = (int)orig->dv_hashtab.ht_used;
|
||||
for (hi = orig->dv_hashtab.ht_array; todo > 0 && !got_int; ++hi)
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
{
|
||||
if (!HASHITEM_EMPTY(hi))
|
||||
--todo;
|
||||
|
||||
di = dictitem_alloc(hi->hi_key);
|
||||
if (di == NULL)
|
||||
break;
|
||||
if (deep)
|
||||
{
|
||||
--todo;
|
||||
|
||||
di = dictitem_alloc(hi->hi_key);
|
||||
if (di == NULL)
|
||||
break;
|
||||
if (deep)
|
||||
if (item_copy(&HI2DI(hi)->di_tv, &di->di_tv,
|
||||
deep, FALSE, copyID) == FAIL)
|
||||
{
|
||||
if (item_copy(&HI2DI(hi)->di_tv, &di->di_tv,
|
||||
deep, FALSE, copyID) == FAIL)
|
||||
{
|
||||
vim_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
copy_tv(&HI2DI(hi)->di_tv, &di->di_tv);
|
||||
if (dict_add(copy, di) == FAIL)
|
||||
{
|
||||
dictitem_free(di);
|
||||
vim_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
copy_tv(&HI2DI(hi)->di_tv, &di->di_tv);
|
||||
if (dict_add(copy, di) == FAIL)
|
||||
{
|
||||
dictitem_free(di);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
++copy->dv_refcount;
|
||||
if (todo > 0)
|
||||
{
|
||||
dict_unref(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
++copy->dv_refcount;
|
||||
if (todo > 0)
|
||||
{
|
||||
dict_unref(copy);
|
||||
copy = NULL;
|
||||
}
|
||||
|
||||
return copy;
|
||||
@@ -982,7 +982,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (*skipwhite(*arg) == ':')
|
||||
semsg(_(e_no_white_space_allowed_before_str_str), ":", *arg);
|
||||
else
|
||||
semsg(_(e_missing_colon_in_dictionary), *arg);
|
||||
semsg(_(e_missing_colon_in_dictionary_str), *arg);
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
item = dict_find(d, key, -1);
|
||||
if (item != NULL)
|
||||
{
|
||||
semsg(_(e_duplicate_key_in_dictionary), key);
|
||||
semsg(_(e_duplicate_key_in_dictionary_str), key);
|
||||
clear_tv(&tvkey);
|
||||
clear_tv(&tv);
|
||||
goto failret;
|
||||
@@ -1060,7 +1060,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (**arg == ',')
|
||||
semsg(_(e_no_white_space_allowed_before_str_str), ",", *arg);
|
||||
else
|
||||
semsg(_(e_missing_comma_in_dictionary), *arg);
|
||||
semsg(_(e_missing_comma_in_dictionary_str), *arg);
|
||||
goto failret;
|
||||
}
|
||||
}
|
||||
@@ -1068,7 +1068,7 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
if (**arg != '}')
|
||||
{
|
||||
if (evalarg != NULL)
|
||||
semsg(_(e_missing_dict_end), *arg);
|
||||
semsg(_(e_missing_dict_end_str), *arg);
|
||||
failret:
|
||||
if (d != NULL)
|
||||
dict_free(d);
|
||||
@@ -1270,50 +1270,52 @@ dict_extend_func(
|
||||
return;
|
||||
}
|
||||
d2 = argvars[1].vval.v_dict;
|
||||
if ((is_new || !value_check_lock(d1->dv_lock, arg_errmsg, TRUE))
|
||||
&& d2 != NULL)
|
||||
if (d2 == NULL)
|
||||
return;
|
||||
|
||||
if (!is_new && value_check_lock(d1->dv_lock, arg_errmsg, TRUE))
|
||||
return;
|
||||
|
||||
if (is_new)
|
||||
{
|
||||
if (is_new)
|
||||
{
|
||||
d1 = dict_copy(d1, FALSE, TRUE, get_copyID());
|
||||
if (d1 == NULL)
|
||||
return;
|
||||
}
|
||||
|
||||
// Check the third argument.
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
static char *(av[]) = {"keep", "force", "error"};
|
||||
|
||||
action = tv_get_string_chk(&argvars[2]);
|
||||
if (action == NULL)
|
||||
return;
|
||||
for (i = 0; i < 3; ++i)
|
||||
if (STRCMP(action, av[i]) == 0)
|
||||
break;
|
||||
if (i == 3)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), action);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
action = (char_u *)"force";
|
||||
|
||||
if (type != NULL && check_typval_arg_type(type, &argvars[1],
|
||||
func_name, 2) == FAIL)
|
||||
d1 = dict_copy(d1, FALSE, TRUE, get_copyID());
|
||||
if (d1 == NULL)
|
||||
return;
|
||||
dict_extend(d1, d2, action, func_name);
|
||||
|
||||
if (is_new)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = d1;
|
||||
rettv->v_lock = FALSE;
|
||||
}
|
||||
else
|
||||
copy_tv(&argvars[0], rettv);
|
||||
}
|
||||
|
||||
// Check the third argument.
|
||||
if (argvars[2].v_type != VAR_UNKNOWN)
|
||||
{
|
||||
static char *(av[]) = {"keep", "force", "error"};
|
||||
|
||||
action = tv_get_string_chk(&argvars[2]);
|
||||
if (action == NULL)
|
||||
return;
|
||||
for (i = 0; i < 3; ++i)
|
||||
if (STRCMP(action, av[i]) == 0)
|
||||
break;
|
||||
if (i == 3)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), action);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
action = (char_u *)"force";
|
||||
|
||||
if (type != NULL && check_typval_arg_type(type, &argvars[1],
|
||||
func_name, 2) == FAIL)
|
||||
return;
|
||||
dict_extend(d1, d2, action, func_name);
|
||||
|
||||
if (is_new)
|
||||
{
|
||||
rettv->v_type = VAR_DICT;
|
||||
rettv->vval.v_dict = d1;
|
||||
rettv->v_lock = FALSE;
|
||||
}
|
||||
else
|
||||
copy_tv(&argvars[0], rettv);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1454,7 +1456,7 @@ dict_remove(typval_T *argvars, typval_T *rettv, char_u *arg_errmsg)
|
||||
di = dict_find(d, key, -1);
|
||||
if (di == NULL)
|
||||
{
|
||||
semsg(_(e_key_not_present_in_dictionary), key);
|
||||
semsg(_(e_key_not_present_in_dictionary_str), key);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user