mirror of
https://github.com/zoriya/vim.git
synced 2025-12-31 11:28:24 +00:00
Compare commits
425 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 | ||
|
|
89469d157a | ||
|
|
500c444283 | ||
|
|
c67c89c758 | ||
|
|
c96b7f5d2a | ||
|
|
9c8d12c811 | ||
|
|
b55ae8ce42 | ||
|
|
cf650b7c9b | ||
|
|
5390c05a3c | ||
|
|
1a173409ae | ||
|
|
023930d62e | ||
|
|
184a622ada | ||
|
|
45e4eead2a | ||
|
|
c3f1881aed | ||
|
|
733a69b29f | ||
|
|
4f501171f7 | ||
|
|
3b8c7083b2 | ||
|
|
4c5678ff0c | ||
|
|
a87749e3ea | ||
|
|
7c02ad9f89 | ||
|
|
dffa6ea85c | ||
|
|
064fd67e6a | ||
|
|
4e6072b8d3 | ||
|
|
6f2a227565 | ||
|
|
3719989431 | ||
|
|
28a896f54d | ||
|
|
c13e998d4a | ||
|
|
84497cd06f | ||
|
|
f86490ed4f | ||
|
|
e76062c078 | ||
|
|
74a694dbe2 | ||
|
|
269aa2b29a | ||
|
|
38854b565a | ||
|
|
3da8597fc0 | ||
|
|
502e91756e | ||
|
|
8b336a6614 | ||
|
|
19cf525c20 | ||
|
|
64fabf3802 | ||
|
|
9f14557d6a | ||
|
|
cc0907165d | ||
|
|
c255b78965 | ||
|
|
837ca8f43b | ||
|
|
f3f198b634 | ||
|
|
01105b37a1 | ||
|
|
c96311b5be | ||
|
|
ef2c325f5e | ||
|
|
c1cf4c9107 | ||
|
|
cc762a48d4 | ||
|
|
ad85af5b38 | ||
|
|
637862fc3c | ||
|
|
6ac16f0c0f | ||
|
|
d330e8422d | ||
|
|
f60bdc3417 | ||
|
|
1273dfb015 | ||
|
|
ebed1b0bea | ||
|
|
47f1fdc28c | ||
|
|
0b228cddc7 | ||
|
|
e2da59851a | ||
|
|
82946e1439 | ||
|
|
24482fbfd5 | ||
|
|
24fe33a83a | ||
|
|
b59ae59a58 | ||
|
|
43300f6034 | ||
|
|
ecfd511e8d | ||
|
|
36446bbb62 | ||
|
|
63a2e360cc | ||
|
|
0b6d6a186e | ||
|
|
1d822afaf6 | ||
|
|
96cbbe29de | ||
|
|
bc222152d8 | ||
|
|
df3c0eb41e | ||
|
|
c3e06e4bfa | ||
|
|
a787c24e00 | ||
|
|
364438d1e8 | ||
|
|
9af2ea80a8 | ||
|
|
b775e72439 | ||
|
|
9c5b7cb4cf | ||
|
|
0319306f20 | ||
|
|
35fc61cb5b | ||
|
|
ce30ccc06a | ||
|
|
2996773276 | ||
|
|
228e422855 | ||
|
|
0a60f79fd0 | ||
|
|
c896adbcde | ||
|
|
e6392b1021 | ||
|
|
c934bfa1b7 | ||
|
|
9fda81515b | ||
|
|
361895d2a1 | ||
|
|
d63a85592c | ||
|
|
ff95ce0930 | ||
|
|
02edfaa610 | ||
|
|
88456cd3c4 | ||
|
|
d13166e788 | ||
|
|
236dffab43 | ||
|
|
696d0a8625 | ||
|
|
0c34d56264 | ||
|
|
81ba26e9de | ||
|
|
4654d63dec | ||
|
|
75ac25b496 | ||
|
|
12babe45a3 | ||
|
|
1d8765daba | ||
|
|
780154bf7a | ||
|
|
ee28c707e4 | ||
|
|
01ee52bab6 | ||
|
|
f32fb93e43 | ||
|
|
fc1b2d0961 | ||
|
|
1573e73f1c | ||
|
|
8303035d67 | ||
|
|
f10952e8c0 | ||
|
|
a44c7811ff | ||
|
|
44c2209352 | ||
|
|
b53a190e9f | ||
|
|
cdeb65729d | ||
|
|
698a00f55d | ||
|
|
c3d27ada14 | ||
|
|
24dc19cdb2 | ||
|
|
161b6ac04f | ||
|
|
dcbdd82d05 | ||
|
|
b298fe6cba | ||
|
|
cf2594fbf3 | ||
|
|
68353e5270 | ||
|
|
398a26f7fc | ||
|
|
920d311480 | ||
|
|
bf533e4e88 | ||
|
|
623e94e138 | ||
|
|
3b014befa0 | ||
|
|
2f7bfe66a1 | ||
|
|
28c56d5013 | ||
|
|
1140b51e83 | ||
|
|
d6e91385f0 | ||
|
|
f7570f2107 | ||
|
|
b3052aa1b5 | ||
|
|
6600447c7b | ||
|
|
4c8d2f02b3 | ||
|
|
0aad88f073 | ||
|
|
9954dc39ea | ||
|
|
a20be06f97 | ||
|
|
fd3084b6e2 | ||
|
|
f00112d558 | ||
|
|
37f1030fd6 | ||
|
|
d55bfcaa9b | ||
|
|
09a93e3e66 | ||
|
|
7265851b2b | ||
|
|
98aebcc2c6 | ||
|
|
90e66ec1e1 | ||
|
|
1d139a012e | ||
|
|
38804d6457 | ||
|
|
157241e879 | ||
|
|
76db9e0763 | ||
|
|
0fd7be7f95 | ||
|
|
80613d64e6 | ||
|
|
f220643c26 | ||
|
|
4e7590ec00 | ||
|
|
7b224fdf4a | ||
|
|
1756f4b218 | ||
|
|
0e364c9fca | ||
|
|
7af3ee2b83 | ||
|
|
adbc08fd69 | ||
|
|
69a8bb8dc1 | ||
|
|
a25f718431 | ||
|
|
cd9c8d400c | ||
|
|
91c75d18d9 | ||
|
|
845bbb72ed | ||
|
|
f8ea10677d | ||
|
|
25b8420c2b | ||
|
|
5a5f17f9b3 | ||
|
|
6c3d3e6904 | ||
|
|
5375205761 | ||
|
|
3d19c81a11 | ||
|
|
c57b5bcd22 | ||
|
|
1410d1841b | ||
|
|
3af982196b | ||
|
|
8e0ccb6bc2 | ||
|
|
873f41a018 | ||
|
|
7a7db047dc | ||
|
|
8ab9ca93ee | ||
|
|
86e6717ace | ||
|
|
03d6e6f42b |
@@ -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
|
||||
|
||||
8
.github/CODEOWNERS
vendored
8
.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
|
||||
@@ -363,6 +367,7 @@ runtime/syntax/haml.vim @tpope
|
||||
runtime/syntax/hare.vim @rsaihe
|
||||
runtime/syntax/haskell.vim @coot
|
||||
runtime/syntax/hgcommit.vim @k-takata
|
||||
runtime/syntax/hollywood.vim @sodero
|
||||
runtime/syntax/html.vim @dkearns
|
||||
runtime/syntax/i3config.vim @hiqua
|
||||
runtime/syntax/icon.vim @dkearns
|
||||
@@ -370,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
|
||||
@@ -393,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
|
||||
@@ -463,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
|
||||
|
||||
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
@@ -174,22 +174,23 @@ jobs:
|
||||
sudo usermod -a -G audio "${USER}"
|
||||
sudo bash ci/setup-xvfb.sh
|
||||
|
||||
- name: Cache snd-dummy
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.SND_DUMMY_DIR }}
|
||||
key: linux-${{ env.LINUX_VERSION }}-snd-dummy
|
||||
# FIXME: Temporarily disabled because of build errors
|
||||
#- name: Cache snd-dummy
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: ${{ env.SND_DUMMY_DIR }}
|
||||
# key: linux-${{ env.LINUX_VERSION }}-snd-dummy
|
||||
|
||||
- name: Set up snd-dummy
|
||||
run: |
|
||||
if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
|
||||
bash ci/build-snd-dummy.sh
|
||||
fi
|
||||
cd "${SND_DUMMY_DIR}"
|
||||
sudo insmod soundcore.ko
|
||||
sudo insmod snd.ko
|
||||
sudo insmod snd-pcm.ko
|
||||
sudo insmod snd-dummy.ko
|
||||
#- name: Set up snd-dummy
|
||||
# run: |
|
||||
# if [[ ! -e ${SND_DUMMY_DIR}/snd-dummy.ko ]]; then
|
||||
# bash ci/build-snd-dummy.sh
|
||||
# fi
|
||||
# cd "${SND_DUMMY_DIR}"
|
||||
# sudo insmod soundcore.ko
|
||||
# sudo insmod snd.ko
|
||||
# sudo insmod snd-pcm.ko
|
||||
# sudo insmod snd-dummy.ko
|
||||
|
||||
- name: Check autoconf
|
||||
if: contains(matrix.extra, 'unittests')
|
||||
@@ -253,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 }}
|
||||
|
||||
@@ -372,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
|
||||
@@ -401,6 +402,9 @@ jobs:
|
||||
id: init
|
||||
shell: bash
|
||||
run: |
|
||||
# Show Windows version
|
||||
cmd /c ver
|
||||
|
||||
git config --global core.autocrlf input
|
||||
|
||||
if [ "${{ matrix.arch }}" = "x64" ]; then
|
||||
@@ -422,9 +426,9 @@ jobs:
|
||||
echo "VCVARSALL=$(vswhere -products \* -latest -property installationPath)\\VC\\Auxiliary\\Build\\vcvarsall.bat" >> $GITHUB_ENV
|
||||
if [ "${{ matrix.features }}" != "TINY" ]; then
|
||||
if [ "${{ matrix.arch }}" = "x86" ]; then
|
||||
choco install python2 --forcex86
|
||||
choco install python2 --no-progress --forcex86
|
||||
else
|
||||
choco install python2
|
||||
choco install python2 --no-progress
|
||||
fi
|
||||
fi
|
||||
python3_dir=$(cat "/proc/$cygreg/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}$pyreg/InstallPath/@")
|
||||
@@ -609,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 }}
|
||||
|
||||
11
.github/workflows/coverity.yml
vendored
11
.github/workflows/coverity.yml
vendored
@@ -15,20 +15,22 @@ jobs:
|
||||
CC: gcc
|
||||
CFLAGS: -Wno-deprecated-declarations
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
if: env.TOKEN
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download Coverity
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=vim" -O coverity_tool.tgz
|
||||
mkdir cov-scan
|
||||
tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
|
||||
- name: Install packages
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
sudo apt update && sudo apt install -y \
|
||||
autoconf \
|
||||
@@ -47,6 +49,7 @@ jobs:
|
||||
libsodium-dev
|
||||
|
||||
- name: Set up environment
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
|
||||
(
|
||||
@@ -55,6 +58,7 @@ jobs:
|
||||
) >> $GITHUB_ENV
|
||||
|
||||
- name: Configure
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
./configure --with-features=huge ${CONFOPT} --enable-fail-if-missing
|
||||
# Append various warning flags to CFLAGS.
|
||||
@@ -62,10 +66,12 @@ jobs:
|
||||
sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
|
||||
|
||||
- name: Build/scan vim
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
cov-build --dir cov-int make -j${NPROC}
|
||||
|
||||
- name: Submit results
|
||||
if: env.TOKEN
|
||||
run: |
|
||||
tar zcf cov-scan.tgz cov-int
|
||||
curl --form token=$TOKEN \
|
||||
@@ -75,5 +81,4 @@ jobs:
|
||||
--form description="Automatic GHA scan" \
|
||||
'https://scan.coverity.com/builds?project=vim'
|
||||
env:
|
||||
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
|
||||
EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }}
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
# Format of this file: https://lgtm.com/help/lgtm/lgtm.yml-configuration-file
|
||||
path_classifiers:
|
||||
documentation:
|
||||
- runtime/tutor/tutor*
|
||||
13
Filelist
13
Filelist
@@ -12,9 +12,9 @@ SRC_ALL = \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/workflows/coverity.yml \
|
||||
.github/dependabot.yml \
|
||||
.gitignore \
|
||||
.hgignore \
|
||||
.lgtm.yml \
|
||||
.appveyor.yml \
|
||||
.codecov.yml \
|
||||
ci/appveyor.bat \
|
||||
@@ -87,10 +87,11 @@ SRC_ALL = \
|
||||
src/job.c \
|
||||
src/json.c \
|
||||
src/json_test.c \
|
||||
src/keymap.h \
|
||||
src/kword_test.c \
|
||||
src/list.c \
|
||||
src/locale.c \
|
||||
src/keymap.h \
|
||||
src/logfile.c \
|
||||
src/macros.h \
|
||||
src/main.c \
|
||||
src/map.c \
|
||||
@@ -161,6 +162,7 @@ SRC_ALL = \
|
||||
src/version.h \
|
||||
src/vim.h \
|
||||
src/vim9.h \
|
||||
src/vim9class.c \
|
||||
src/vim9cmds.c \
|
||||
src/vim9compile.c \
|
||||
src/vim9execute.c \
|
||||
@@ -177,6 +179,8 @@ SRC_ALL = \
|
||||
src/testdir/Make_all.mak \
|
||||
src/testdir/*.in \
|
||||
src/testdir/*.py \
|
||||
src/testdir/keycode_check.vim \
|
||||
src/testdir/keycode_check.json \
|
||||
src/testdir/lsan-suppress.txt \
|
||||
src/testdir/sautest/autoload/*.vim \
|
||||
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
|
||||
@@ -271,6 +275,7 @@ SRC_ALL = \
|
||||
src/proto/json.pro \
|
||||
src/proto/list.pro \
|
||||
src/proto/locale.pro \
|
||||
src/proto/logfile.pro \
|
||||
src/proto/main.pro \
|
||||
src/proto/map.pro \
|
||||
src/proto/mark.pro \
|
||||
@@ -322,6 +327,7 @@ SRC_ALL = \
|
||||
src/proto/usercmd.pro \
|
||||
src/proto/userfunc.pro \
|
||||
src/proto/version.pro \
|
||||
src/proto/vim9class.pro \
|
||||
src/proto/vim9cmds.pro \
|
||||
src/proto/vim9compile.pro \
|
||||
src/proto/vim9execute.pro \
|
||||
@@ -394,6 +400,7 @@ SRC_ALL = \
|
||||
src/libvterm/t/66screen_extent.test \
|
||||
src/libvterm/t/67screen_dbl_wh.test \
|
||||
src/libvterm/t/68screen_termprops.test \
|
||||
src/libvterm/t/69screen_reflow.test \
|
||||
src/libvterm/t/90vttest_01-movement-1.test \
|
||||
src/libvterm/t/90vttest_01-movement-2.test \
|
||||
src/libvterm/t/90vttest_01-movement-3.test \
|
||||
@@ -641,6 +648,7 @@ SRC_MAC = \
|
||||
src/os_mac_conv.c \
|
||||
src/os_macosx.m \
|
||||
src/proto/os_mac_conv.pro \
|
||||
src/proto/os_macosx.pro \
|
||||
|
||||
# source files for VMS (in the extra archive)
|
||||
SRC_VMS = \
|
||||
@@ -775,6 +783,7 @@ RT_SCRIPTS = \
|
||||
runtime/autoload/README.txt \
|
||||
runtime/autoload/dist/*.vim \
|
||||
runtime/autoload/xml/*.vim \
|
||||
runtime/autoload/zig/*.vim \
|
||||
runtime/colors/*.vim \
|
||||
runtime/colors/README.txt \
|
||||
runtime/colors/lists/*.vim \
|
||||
|
||||
@@ -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
|
||||
|
||||
12
runtime/autoload/dist/ft.vim
vendored
12
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.
|
||||
@@ -712,7 +712,8 @@ export def SetFileTypeSH(name: string)
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
elseif name =~ '\<sh\>'
|
||||
elseif name =~ '\<sh\>' || name =~ '\<dash\>'
|
||||
# Ubuntu links "sh" to "dash", thus it is expected to work the same way
|
||||
b:is_sh = 1
|
||||
if exists("b:is_kornshell")
|
||||
unlet b:is_kornshell
|
||||
@@ -809,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
|
||||
|
||||
6
runtime/autoload/dist/script.vim
vendored
6
runtime/autoload/dist/script.vim
vendored
@@ -4,7 +4,7 @@ vim9script
|
||||
# Invoked from "scripts.vim" in 'runtimepath'
|
||||
#
|
||||
# Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
# Last Change: 2022 Feb 13
|
||||
# Last Change: 2022 Nov 24
|
||||
|
||||
export def DetectFiletype()
|
||||
var line1 = getline(1)
|
||||
@@ -53,8 +53,8 @@ def DetectFromHashBang(firstline: string)
|
||||
name = 'wish'
|
||||
endif
|
||||
|
||||
# Bourne-like shell scripts: bash bash2 ksh ksh93 sh
|
||||
if name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>'
|
||||
# Bourne-like shell scripts: bash bash2 dash ksh ksh93 sh
|
||||
if name =~ '^\(bash\d*\|dash\|ksh\d*\|sh\)\>'
|
||||
call dist#ft#SetFileTypeSH(line1)
|
||||
|
||||
# csh scripts
|
||||
|
||||
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 May 24
|
||||
*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+=<:>
|
||||
@@ -1058,8 +1058,8 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
command is run, before jumping to the first
|
||||
location. For |:cfile| and |:lfile| commands
|
||||
it is run after error file is read and before
|
||||
moving to the first error.
|
||||
it is run after the error file is read and
|
||||
before moving to the first error.
|
||||
See |QuickFixCmdPost-example|.
|
||||
*QuitPre*
|
||||
QuitPre When using `:quit`, `:wq` or `:qall`, before
|
||||
@@ -1342,8 +1342,9 @@ VimSuspend When the Vim instance is suspended. Only when
|
||||
CTRL-Z was typed inside Vim, or when the SIGTSTP
|
||||
signal was sent to Vim, but not for SIGSTOP.
|
||||
*WinClosed*
|
||||
WinClosed After closing a window. The pattern is
|
||||
matched against the |window-ID|. Both
|
||||
WinClosed When closing a window, just before it is
|
||||
removed from the window layout. The pattern
|
||||
is matched against the |window-ID|. Both
|
||||
<amatch> and <afile> are set to the
|
||||
|window-ID|. Non-recursive (event cannot
|
||||
trigger itself).
|
||||
@@ -1371,17 +1372,42 @@ WinNew When a new window was created. Not done for
|
||||
Before a WinEnter event.
|
||||
|
||||
*WinScrolled*
|
||||
WinScrolled After scrolling the content of a window or
|
||||
resizing a window.
|
||||
The pattern is matched against the
|
||||
|window-ID|. Both <amatch> and <afile> are
|
||||
set to the |window-ID|.
|
||||
Non-recursive (the event cannot trigger
|
||||
itself). However, if the command causes the
|
||||
window to scroll or change size another
|
||||
WinScrolled After any window in the current tab page
|
||||
scrolled the text (horizontally or vertically)
|
||||
or changed width or height. See
|
||||
|win-scrolled-resized|.
|
||||
|
||||
The pattern is matched against the |window-ID|
|
||||
of the first window that scrolled or resized.
|
||||
Both <amatch> and <afile> are set to the
|
||||
|window-ID|.
|
||||
|
||||
|v:event| is set with information about size
|
||||
and scroll changes. |WinScrolled-event|
|
||||
|
||||
Only starts triggering after startup finished
|
||||
and the first screen redraw was done.
|
||||
Does not trigger when defining the first
|
||||
WinScrolled or WinResized event, but may
|
||||
trigger when adding more.
|
||||
|
||||
Non-recursive: the event will not trigger
|
||||
while executing commands for the WinScrolled
|
||||
event. However, if the command causes a
|
||||
window to scroll or change size, then another
|
||||
WinScrolled event will be triggered later.
|
||||
Does not trigger when the command is added,
|
||||
only after the first scroll or resize.
|
||||
|
||||
|
||||
*WinResized*
|
||||
WinResized After a window in the current tab page changed
|
||||
width or height.
|
||||
See |win-scrolled-resized|.
|
||||
|
||||
|v:event| is set with information about size
|
||||
changes. |WinResized-event|
|
||||
|
||||
Same behavior as |WinScrolled| for the
|
||||
pattern, triggering and recursiveness.
|
||||
|
||||
==============================================================================
|
||||
6. Patterns *autocmd-patterns* *{aupat}*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 21
|
||||
*builtin.txt* For Vim version 9.0. Last change: 2022 Dec 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -116,13 +116,13 @@ ch_status({handle} [, {options}])
|
||||
changenr() Number current change number
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr}) Number column number of cursor or mark
|
||||
charcol({expr} [, {winid}]) Number column number of cursor or mark
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Number char index of byte {idx} in {string}
|
||||
chdir({dir}) String change current working directory
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches([{win}]) none clear all matches
|
||||
col({expr}) Number column byte index of cursor or mark
|
||||
col({expr} [, {winid}]) Number column byte index of cursor or mark
|
||||
complete({startcol}, {matches}) none set Insert mode completion
|
||||
complete_add({expr}) Number add completion match
|
||||
complete_check() Number check for key typed during completion
|
||||
@@ -208,8 +208,10 @@ get({func}, {what}) any get property of funcref/partial {func}
|
||||
getbufinfo([{buf}]) List information about buffers
|
||||
getbufline({buf}, {lnum} [, {end}])
|
||||
List lines {lnum} to {end} of buffer {buf}
|
||||
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
|
||||
getbufvar({buf}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {buf}
|
||||
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
|
||||
@@ -246,6 +248,7 @@ getloclist({nr}, {what}) Dict get specific location list properties
|
||||
getmarklist([{buf}]) List list of global/local marks
|
||||
getmatches([{win}]) List list of current matches
|
||||
getmousepos() Dict last known mouse position
|
||||
getmouseshape() String current mouse shape name
|
||||
getpid() Number process ID of Vim
|
||||
getpos({expr}) List position of cursor, mark, etc.
|
||||
getqflist() List list of quickfix items
|
||||
@@ -606,6 +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}
|
||||
@@ -663,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
|
||||
@@ -806,8 +812,10 @@ append({lnum}, {text}) *append()*
|
||||
{lnum} can be zero to insert a line before the first one.
|
||||
{lnum} is used like with |getline()|.
|
||||
Returns 1 for failure ({lnum} out of range or out of memory),
|
||||
0 for success. In |Vim9| script an invalid argument or
|
||||
negative number results in an error. Example: >
|
||||
0 for success. When {text} is an empty list zero is returned,
|
||||
no matter the value of {lnum}.
|
||||
In |Vim9| script an invalid argument or negative number
|
||||
results in an error. Example: >
|
||||
:let failed = append(line('$'), "# THE END")
|
||||
:let failed = append(0, ["Chapter 1", "the beginning"])
|
||||
|
||||
@@ -835,7 +843,9 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
|
||||
If {buf} is not a valid buffer or {lnum} is not valid, an
|
||||
error message is given. Example: >
|
||||
:let failed = appendbufline(13, 0, "# THE START")
|
||||
<
|
||||
< However, when {text} is an empty list then no error is given
|
||||
for an invalid {lnum}, since {lnum} isn't actually used.
|
||||
|
||||
Can also be used as a |method| after a List, the base is
|
||||
passed as the second argument: >
|
||||
mylist->appendbufline(buf, lnum)
|
||||
@@ -981,7 +991,7 @@ autocmd_add({acmds}) *autocmd_add()*
|
||||
let acmd.bufnr = 5
|
||||
let acmd.cmd = 'call BufEnterFunc()'
|
||||
call autocmd_add([acmd])
|
||||
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetAutocmdList()->autocmd_add()
|
||||
<
|
||||
@@ -1317,7 +1327,8 @@ bufwinid({buf}) *bufwinid()*
|
||||
|
||||
echo "A window containing buffer 1 is " .. (bufwinid(1))
|
||||
<
|
||||
Only deals with the current tab page.
|
||||
Only deals with the current tab page. See |win_findbuf()| for
|
||||
finding more.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
FindBuffer()->bufwinid()
|
||||
@@ -1469,7 +1480,7 @@ charclass({string}) *charclass()*
|
||||
Returns 0 if {string} is not a |String|.
|
||||
|
||||
|
||||
charcol({expr}) *charcol()*
|
||||
charcol({expr} [, {winid}]) *charcol()*
|
||||
Same as |col()| but returns the character index of the column
|
||||
position given with {expr} instead of the byte position.
|
||||
|
||||
@@ -1552,8 +1563,8 @@ clearmatches([{win}]) *clearmatches()*
|
||||
Can also be used as a |method|: >
|
||||
GetWin()->clearmatches()
|
||||
<
|
||||
*col()*
|
||||
col({expr}) The result is a Number, which is the byte index of the column
|
||||
col({expr} [, {winid}) *col()*
|
||||
The result is a Number, which is the byte index of the column
|
||||
position given with {expr}. The accepted positions are:
|
||||
. the cursor position
|
||||
$ the end of the cursor line (the result is the
|
||||
@@ -1568,6 +1579,8 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
and column number. Most useful when the column is "$", to get
|
||||
the last column of a specific line. When "lnum" or "col" is
|
||||
out of range then col() returns zero.
|
||||
With the optional {winid} argument the values are obtained for
|
||||
that window instead of the current window.
|
||||
To get the line number use |line()|. To get both use
|
||||
|getpos()|.
|
||||
For the screen column position use |virtcol()|. For the
|
||||
@@ -1578,14 +1591,15 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
col("$") length of cursor line plus one
|
||||
col("'t") column of mark t
|
||||
col("'" .. markname) column of mark markname
|
||||
< The first column is 1. Returns 0 if {expr} is invalid.
|
||||
< The first column is 1. Returns 0 if {expr} is invalid or when
|
||||
the window with ID {winid} is not found.
|
||||
For an uppercase mark the column may actually be in another
|
||||
buffer.
|
||||
For the cursor position, when 'virtualedit' is active, the
|
||||
column is one higher if the cursor is after the end of the
|
||||
line. Also, when using a <Cmd> mapping the cursor isn't
|
||||
moved, this can be used to obtain the column in Insert mode: >
|
||||
:imap <F2> <Cmd>echo col(".")<CR>
|
||||
:imap <F2> <Cmd>echowin col(".")<CR>
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetPos()->col()
|
||||
@@ -2769,7 +2783,7 @@ flattennew({list} [, {maxdepth}]) *flattennew()*
|
||||
float2nr({expr}) *float2nr()*
|
||||
Convert {expr} to a Number by omitting the part after the
|
||||
decimal point.
|
||||
{expr} must evaluate to a |Float| or a Number.
|
||||
{expr} must evaluate to a |Float| or a |Number|.
|
||||
Returns 0 if {expr} is not a |Float| or a |Number|.
|
||||
When the value of {expr} is out of range for a |Number| the
|
||||
result is truncated to 0x7fffffff or -0x7fffffff (or when
|
||||
@@ -3195,7 +3209,8 @@ getbufinfo([{dict}])
|
||||
getbufline({buf}, {lnum} [, {end}])
|
||||
Return a |List| with the lines starting from {lnum} to {end}
|
||||
(inclusive) in the buffer {buf}. If {end} is omitted, a
|
||||
|List| with only the line {lnum} is returned.
|
||||
|List| with only the line {lnum} is returned. See
|
||||
`getbufoneline()` for only getting the line.
|
||||
|
||||
For the use of {buf}, see |bufname()| above.
|
||||
|
||||
@@ -3218,6 +3233,11 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetBufnr()->getbufline(lnum)
|
||||
<
|
||||
*getbufoneline()*
|
||||
getbufoneline({buf}, {lnum})
|
||||
Just like `getbufline()` but only get one line and return it
|
||||
as a string.
|
||||
|
||||
getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
The result is the value of option or local buffer variable
|
||||
@@ -3243,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
|
||||
@@ -3501,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
|
||||
@@ -3762,7 +3790,8 @@ getline({lnum} [, {end}])
|
||||
< Can also be used as a |method|: >
|
||||
ComputeLnum()->getline()
|
||||
|
||||
< To get lines from another buffer see |getbufline()|
|
||||
< To get lines from another buffer see |getbufline()| and
|
||||
|getbufoneline()|
|
||||
|
||||
getloclist({nr} [, {what}]) *getloclist()*
|
||||
Returns a |List| with all the entries in the location list for
|
||||
@@ -3871,6 +3900,12 @@ getmousepos() *getmousepos()*
|
||||
When using |getchar()| the Vim variables |v:mouse_lnum|,
|
||||
|v:mouse_col| and |v:mouse_winid| also provide these values.
|
||||
|
||||
getmouseshape() *getmouseshape()*
|
||||
Returns the name of the currently showing mouse pointer.
|
||||
When the |+mouseshape| feature is not supported or the shape
|
||||
is unknown an empty string is returned.
|
||||
This function is mainly intended for testing.
|
||||
|
||||
*getpid()*
|
||||
getpid() Return a Number which is the process ID of the Vim process.
|
||||
On Unix and MS-Windows this is a unique number, until Vim
|
||||
@@ -4111,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
|
||||
@@ -5549,6 +5584,10 @@ map({expr1}, {expr2}) *map()*
|
||||
If {expr2} is a |Funcref| it is called with two arguments:
|
||||
1. The key or the index of the current item.
|
||||
2. the value of the current item.
|
||||
With a legacy script lambda you don't get an error if it only
|
||||
accepts one argument, but with a Vim9 lambda you get "E1106:
|
||||
One argument too many", the number of arguments must match.
|
||||
|
||||
The function must return the new value of the item. Example
|
||||
that changes each value by "key-value": >
|
||||
func KeyValue(key, val)
|
||||
@@ -7873,9 +7912,10 @@ setbufline({buf}, {lnum}, {text}) *setbufline()*
|
||||
To insert lines use |appendbufline()|.
|
||||
Any text properties in {lnum} are cleared.
|
||||
|
||||
{text} can be a string to set one line, or a list of strings
|
||||
to set multiple lines. If the list extends below the last
|
||||
line then those lines are added.
|
||||
{text} can be a string to set one line, or a List of strings
|
||||
to set multiple lines. If the List extends below the last
|
||||
line then those lines are added. If the List is empty then
|
||||
nothing is changed and zero is returned.
|
||||
|
||||
For the use of {buf}, see |bufname()| above.
|
||||
|
||||
@@ -7914,29 +7954,38 @@ setbufvar({buf}, {varname}, {val}) *setbufvar()*
|
||||
|
||||
setcellwidths({list}) *setcellwidths()*
|
||||
Specify overrides for cell widths of character ranges. This
|
||||
tells Vim how wide characters are, counted in screen cells.
|
||||
This overrides 'ambiwidth'. Example: >
|
||||
setcellwidths([[0xad, 0xad, 1],
|
||||
\ [0x2194, 0x2199, 2]])
|
||||
tells Vim how wide characters are when displayed in the
|
||||
terminal, counted in screen cells. The values override
|
||||
'ambiwidth'. Example: >
|
||||
call setcellwidths([
|
||||
\ [0x111, 0x111, 1],
|
||||
\ [0x2194, 0x2199, 2],
|
||||
\ ])
|
||||
|
||||
< *E1109* *E1110* *E1111* *E1112* *E1113* *E1114*
|
||||
The {list} argument is a list of lists with each three
|
||||
numbers. These three numbers are [low, high, width]. "low"
|
||||
and "high" can be the same, in which case this refers to one
|
||||
character. Otherwise it is the range of characters from "low"
|
||||
to "high" (inclusive). "width" is either 1 or 2, indicating
|
||||
the character width in screen cells.
|
||||
< The {list} argument is a List of Lists with each three
|
||||
numbers: [{low}, {high}, {width}]. *E1109* *E1110*
|
||||
{low} and {high} can be the same, in which case this refers to
|
||||
one character. Otherwise it is the range of characters from
|
||||
{low} to {high} (inclusive). *E1111* *E1114*
|
||||
Only characters with value 0x80 and higher can be used.
|
||||
|
||||
{width} must be either 1 or 2, indicating the character width
|
||||
in screen cells. *E1112*
|
||||
An error is given if the argument is invalid, also when a
|
||||
range overlaps with another.
|
||||
Only characters with value 0x100 and higher can be used.
|
||||
range overlaps with another. *E1113*
|
||||
|
||||
If the new value causes 'fillchars' or 'listchars' to become
|
||||
invalid it is rejected and an error is given.
|
||||
|
||||
To clear the overrides pass an empty list: >
|
||||
To clear the overrides pass an empty {list}: >
|
||||
setcellwidths([]);
|
||||
|
||||
< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
|
||||
the effect for known emoji characters.
|
||||
the effect for known emoji characters. Move the cursor
|
||||
through the text to check if the cell widths of your terminal
|
||||
match with what Vim knows about each emoji. If it doesn't
|
||||
look right you need to adjust the {list} argument.
|
||||
|
||||
|
||||
setcharpos({expr}, {list}) *setcharpos()*
|
||||
Same as |setpos()| but uses the specified column number as the
|
||||
@@ -8060,7 +8109,8 @@ setline({lnum}, {text}) *setline()*
|
||||
When {lnum} is just below the last line the {text} will be
|
||||
added below the last line.
|
||||
{text} can be any type or a List of any type, each item is
|
||||
converted to a String.
|
||||
converted to a String. When {text} is an empty List then
|
||||
nothing is changed and FALSE is returned.
|
||||
|
||||
If this succeeds, FALSE is returned. If this fails (most likely
|
||||
because {lnum} is invalid) TRUE is returned.
|
||||
@@ -9072,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
|
||||
@@ -9276,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:
|
||||
@@ -9893,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("")
|
||||
@@ -9913,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()*
|
||||
@@ -10198,6 +10263,7 @@ win_move_separator({nr}, {offset}) *win_move_separator()*
|
||||
FALSE otherwise.
|
||||
This will fail for the rightmost window and a full-width
|
||||
window, since it has no separator on the right.
|
||||
Only works for the current tab page. *E1308*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinnr()->win_move_separator(offset)
|
||||
@@ -10212,6 +10278,7 @@ win_move_statusline({nr}, {offset}) *win_move_statusline()*
|
||||
movement may be smaller than specified (e.g., as a consequence
|
||||
of maintaining 'winminheight'). Returns TRUE if the window can
|
||||
be found and FALSE otherwise.
|
||||
Only works for the current tab page.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinnr()->win_move_statusline(offset)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.0. Last change: 2022 Sep 13
|
||||
*change.txt* For Vim version 9.0. Last change: 2022 Nov 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 9.0. Last change: 2022 Jun 23
|
||||
*channel.txt* For Vim version 9.0. Last change: 2022 Dec 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -465,7 +465,7 @@ a close callback to the channel.
|
||||
|
||||
To read all normal output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel)
|
||||
To read all error output from a RAW channel that is available:: >
|
||||
To read all error output from a RAW channel that is available: >
|
||||
let output = ch_readraw(channel, {"part": "err"})
|
||||
Note that if the channel is in NL mode, ch_readraw() will only return one line
|
||||
for each call.
|
||||
@@ -618,6 +618,9 @@ ch_info({handle}) *ch_info()*
|
||||
ch_log({msg} [, {handle}]) *ch_log()*
|
||||
Write String {msg} in the channel log file, if it was opened
|
||||
with |ch_logfile()|.
|
||||
The text "ch_log():" is prepended to the message to make clear
|
||||
it came from this function call and make it easier to find in
|
||||
the log file.
|
||||
When {handle} is passed the channel number is used for the
|
||||
message.
|
||||
{handle} can be a Channel or a Job that has a Channel. The
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.0. Last change: 2022 Sep 26
|
||||
*cmdline.txt* For Vim version 9.0. Last change: 2022 Nov 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -736,7 +736,9 @@ Line numbers may be specified with: *:range* *{address}*
|
||||
'T position of mark T (uppercase); when the mark is in
|
||||
another file it cannot be used in a range
|
||||
/{pattern}[/] the next line where {pattern} matches *:/*
|
||||
also see |:range-pattern| below
|
||||
?{pattern}[?] the previous line where {pattern} matches *:?*
|
||||
also see |:range-pattern| below
|
||||
\/ the next line where the previously used search
|
||||
pattern matches
|
||||
\? the previous line where the previously used search
|
||||
@@ -744,11 +746,49 @@ Line numbers may be specified with: *:range* *{address}*
|
||||
\& the next line where the previously used substitute
|
||||
pattern matches
|
||||
|
||||
*:range-offset*
|
||||
Each may be followed (several times) by '+' or '-' and an optional number.
|
||||
This number is added or subtracted from the preceding line number. If the
|
||||
number is omitted, 1 is used. If there is nothing before the '+' or '-' then
|
||||
the current line is used.
|
||||
*:range-closed-fold*
|
||||
When a line number after the comma is in a closed fold it is adjusted to the
|
||||
last line of the fold, thus the whole fold is included.
|
||||
|
||||
When a number is added this is done after the adjustment to the last line of
|
||||
the fold. This means these lines are additionally included in the range. For
|
||||
example: >
|
||||
:3,4+2print
|
||||
On this text:
|
||||
1 one ~
|
||||
2 two ~
|
||||
3 three ~
|
||||
4 four FOLDED ~
|
||||
5 five FOLDED ~
|
||||
6 six ~
|
||||
7 seven ~
|
||||
8 eight ~
|
||||
Where lines four and five are a closed fold, ends up printing lines 3 to 7.
|
||||
The 7 comes from the "4" in the range, which is adjusted to the end of the
|
||||
closed fold, which is 5, and then the offset 2 is added.
|
||||
|
||||
An example for subtracting (which isn't very useful): >
|
||||
:2,4-1print
|
||||
On this text:
|
||||
1 one ~
|
||||
2 two ~
|
||||
3 three FOLDED~
|
||||
4 four FOLDED ~
|
||||
5 five FOLDED ~
|
||||
6 six FOLDED ~
|
||||
7 seven ~
|
||||
8 eight ~
|
||||
Where lines three to six are a closed fold, ends up printing lines 2 to 6.
|
||||
The 6 comes from the "4" in the range, which is adjusted to the end of the
|
||||
closed fold, which is 6, and then 1 is subtracted, then this is still in the
|
||||
closed fold and the last line of that fold is used, which is 6.
|
||||
|
||||
*:range-pattern*
|
||||
The "/" and "?" after {pattern} are required to separate the pattern from
|
||||
anything that follows.
|
||||
|
||||
@@ -804,7 +844,7 @@ always be swapped then.
|
||||
|
||||
Count and Range *N:*
|
||||
|
||||
When giving a count before entering ":", this is translated into:
|
||||
When giving a count before entering ":", this is translated into: >
|
||||
:.,.+(count - 1)
|
||||
In words: The "count" lines at and after the cursor. Example: To delete
|
||||
three lines: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*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 @@
|
||||
*digraph.txt* For Vim version 9.0. Last change: 2021 Jul 19
|
||||
*digraph.txt* For Vim version 9.0. Last change: 2022 Nov 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -162,7 +162,7 @@ These are the RFC1345 digraphs for the one-byte characters. See the output of
|
||||
":digraphs" for the others.
|
||||
|
||||
EURO
|
||||
|
||||
*euro* *euro-digraph*
|
||||
Exception: RFC1345 doesn't specify the euro sign. In Vim the digraph =e was
|
||||
added for this. Note the difference between latin1, where the digraph Cu is
|
||||
used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 9.0. Last change: 2022 Apr 16
|
||||
*editing.txt* For Vim version 9.0. Last change: 2022 Nov 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -578,6 +578,43 @@ single <NL> characters are unexpectedly replaced with <CR><NL>.
|
||||
You can encrypt files that are written by setting the 'key' option. This
|
||||
provides some security against others reading your files. |encryption|
|
||||
|
||||
END OF LINE AND END OF FILE *eol-and-eof*
|
||||
|
||||
Vim has several options to control the file format:
|
||||
'fileformat' the <EOL> style: Unix, DOS, Mac
|
||||
'endofline' whether the last line ends with a <EOL>
|
||||
'endoffile' whether the file ends with a CTRL-Z
|
||||
'fixendofline' whether to fix eol and eof
|
||||
|
||||
The first three values are normally detected automatically when reading the
|
||||
file and are used when writing the text to a file. While editing the buffer
|
||||
it looks like every line has a line ending and the CTRL-Z isn't there (an
|
||||
exception is when 'binary' is set, it works differently then).
|
||||
|
||||
The 'fixendofline' option can be used to choose what to write. You can also
|
||||
change the option values to write the file differently than how it was read.
|
||||
|
||||
Here are some examples how to use them.
|
||||
|
||||
If you want files in Unix format (every line NL terminated): >
|
||||
setl ff=unix fixeol
|
||||
You should probably do this on any Unix-like system. Also modern MS-Windows
|
||||
systems tend to work well with this. It is recommended to always use this
|
||||
format for Vim scripts.
|
||||
|
||||
If you want to use an old MS-DOS file in a modern environment, fixing line
|
||||
endings and dropping CTRL-Z, but keeping the <CR><NL> style <EOL>: >
|
||||
setl ff=dos fixeol
|
||||
This is useful for many MS-Windows programs, they regularly expect the
|
||||
<CR><NL> line endings.
|
||||
|
||||
If you want to drop the final <EOL> and add a final CTRL-Z (e.g. for an old
|
||||
system like CP/M): >
|
||||
setl ff=dos nofixeol noeol eof
|
||||
|
||||
If you want to preserve the fileformat exactly as-is, including any final
|
||||
<EOL> and final CTRL-Z: >
|
||||
setl nofixeol
|
||||
|
||||
==============================================================================
|
||||
3. The argument list *argument-list* *arglist*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
*eval.txt* For Vim version 9.0. Last change: 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.
|
||||
@@ -1548,7 +1554,7 @@ to be doubled. These two commands are equivalent: >
|
||||
if a =~ '\s*'
|
||||
|
||||
|
||||
interpolated-string *$quote* *interp-string*
|
||||
interpolated-string *$quote* *interpolated-string*
|
||||
--------------------
|
||||
$"string" interpolated string constant *expr-$quote*
|
||||
$'string' interpolated literal string constant *expr-$'*
|
||||
@@ -1965,7 +1971,7 @@ v:collate The current locale setting for collation order of the runtime
|
||||
command.
|
||||
See |multi-lang|.
|
||||
|
||||
*v:colornames*
|
||||
*v:colornames*
|
||||
v:colornames A dictionary that maps color names to hex color strings. These
|
||||
color names can be used with the |highlight-guifg|,
|
||||
|highlight-guibg|, and |highlight-guisp| parameters. Updating
|
||||
@@ -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|
|
||||
@@ -2859,7 +2869,7 @@ text...
|
||||
does not need to be doubled.
|
||||
If "eval" is specified, then any Vim expression in the
|
||||
form {expr} is evaluated and the result replaces the
|
||||
expression, like with |interp-string|.
|
||||
expression, like with |interpolated-string|.
|
||||
Example where $HOME is expanded: >
|
||||
let lines =<< trim eval END
|
||||
some text
|
||||
@@ -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}.
|
||||
@@ -3073,6 +3085,10 @@ text...
|
||||
Unlock the internal variable {name}. Does the
|
||||
opposite of |:lockvar|.
|
||||
|
||||
If {name} does not exist:
|
||||
- In |Vim9| script an error is given.
|
||||
- In legacy script this is silently ignored.
|
||||
|
||||
:if {expr1} *:if* *:end* *:endif* *:en* *E171* *E579* *E580*
|
||||
:en[dif] Execute the commands until the next matching `:else`
|
||||
or `:endif` if {expr1} evaluates to non-zero.
|
||||
@@ -3598,7 +3614,7 @@ this pending exception or command is discarded.
|
||||
For examples see |throw-catch| and |try-finally|.
|
||||
|
||||
|
||||
NESTING OF TRY CONDITIONALS *try-nesting*
|
||||
NESTING OF TRY CONDITIONALS *try-nesting*
|
||||
|
||||
Try conditionals can be nested arbitrarily. That is, a complete try
|
||||
conditional can be put into the try block, a catch clause, or the finally
|
||||
|
||||
@@ -571,7 +571,7 @@ used.
|
||||
For example, to set the dialect to a default of "fblite" but still allow for
|
||||
any #lang directive overrides, use the following command: >
|
||||
|
||||
let g:freebasic_lang = "fblite"
|
||||
let g:freebasic_lang = "fblite"
|
||||
|
||||
|
||||
GIT COMMIT *ft-gitcommit-plugin*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 9.0. Last change: 2022 Oct 01
|
||||
*fold.txt* For Vim version 9.0. Last change: 2022 Nov 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -598,6 +598,11 @@ line is folded, it cannot be displayed there.
|
||||
Many movement commands handle a sequence of folded lines like an empty line.
|
||||
For example, the "w" command stops once in the first column.
|
||||
|
||||
When starting a search in a closed fold it will not find a match in the
|
||||
current fold. It's like a forward search always starts from the end of the
|
||||
closed fold, while a backwards search starts from the start of the closed
|
||||
fold.
|
||||
|
||||
When in Insert mode, the cursor line is never folded. That allows you to see
|
||||
what you type!
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ The last command will create the following syntax files:
|
||||
- `context-data-context.vim`;
|
||||
- `context-data-interfaces.vim`;
|
||||
- `context-data-metafun.vim`;
|
||||
- `context-data-tex.vim`.
|
||||
- `context-data-tex.vim`.
|
||||
|
||||
The same command can be used to update those syntax files.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 9.0. Last change: 2022 Apr 03
|
||||
*gui.txt* For Vim version 9.0. Last change: 2022 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -889,6 +889,11 @@ s The menu was defined with "<silent>" to avoid showing what it is
|
||||
Note that hitting <Tab> while entering a menu name after a menu command may
|
||||
be used to complete the name of the menu item.
|
||||
|
||||
It is not allowed to change menus while listing them. *E1310*
|
||||
This doesn't normally happen, only when, for example, you would have a timer
|
||||
callback define a menu and the user lists menus in a way it shows
|
||||
|more-prompt|.
|
||||
|
||||
|
||||
5.4 Executing Menus *execute-menus*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 9.0. Last change: 2022 May 13
|
||||
*help.txt* For Vim version 9.0. Last change: 2022 Dec 03
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -153,6 +153,7 @@ Special issues ~
|
||||
|terminal.txt| Terminal window support
|
||||
|popup.txt| popup window support
|
||||
|vim9.txt| using Vim9 script
|
||||
|vim9class.txt| using Vim9 script classes
|
||||
|
||||
Programming language support ~
|
||||
|indent.txt| automatic indenting for C and other languages
|
||||
@@ -161,6 +162,8 @@ Programming language support ~
|
||||
|filetype.txt| settings done specifically for a type of file
|
||||
|quickfix.txt| commands for a quick edit-compile-fix cycle
|
||||
|ft_ada.txt| Ada (the programming language) support
|
||||
|ft_context.txt| Filetype plugin for ConTeXt
|
||||
|ft_mp.txt| Filetype plugin for METAFONT and MetaPost
|
||||
|ft_ps1.txt| Filetype plugin for Windows PowerShell
|
||||
|ft_raku.txt| Filetype plugin for Raku
|
||||
|ft_rust.txt| Filetype plugin for Rust
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -892,7 +892,7 @@ Groß): >
|
||||
endfor
|
||||
return res
|
||||
endfunc
|
||||
|
||||
|
||||
if exists('+thesaurusfunc')
|
||||
set thesaurusfunc=Thesaur
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Oct 12
|
||||
*intro.txt* For Vim version 9.0. Last change: 2022 Nov 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.0. Last change: 2022 Oct 19
|
||||
*map.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,18 +10,19 @@ This subject is introduced in sections |05.4|, |24.7| and |40.1| of the user
|
||||
manual.
|
||||
|
||||
1. Key mapping |key-mapping|
|
||||
1.1 MAP COMMANDS |:map-commands|
|
||||
1.2 Special arguments |:map-arguments|
|
||||
1.3 Mapping and modes |:map-modes|
|
||||
1.4 Listing mappings |map-listing|
|
||||
1.5 Mapping special keys |:map-special-keys|
|
||||
1.6 Special characters |:map-special-chars|
|
||||
1.7 What keys to map |map-which-keys|
|
||||
1.8 Examples |map-examples|
|
||||
1.9 Using mappings |map-typing|
|
||||
1.10 Mapping alt-keys |:map-alt-keys|
|
||||
1.11 Mapping in modifyOtherKeys mode |modifyOtherKeys|
|
||||
1.12 Mapping an operator |:map-operator|
|
||||
1.1 MAP COMMANDS |:map-commands|
|
||||
1.2 Special arguments |:map-arguments|
|
||||
1.3 Mapping and modes |:map-modes|
|
||||
1.4 Listing mappings |map-listing|
|
||||
1.5 Mapping special keys |:map-special-keys|
|
||||
1.6 Special characters |:map-special-chars|
|
||||
1.7 What keys to map |map-which-keys|
|
||||
1.8 Examples |map-examples|
|
||||
1.9 Using mappings |map-typing|
|
||||
1.10 Mapping alt-keys |:map-alt-keys|
|
||||
1.11 Mapping in modifyOtherKeys mode |modifyOtherKeys|
|
||||
1.12 Mapping with Kitty keyboard protocol |kitty-keyboard-protocol|
|
||||
1.13 Mapping an operator |:map-operator|
|
||||
2. Abbreviations |abbreviations|
|
||||
3. Local mappings and functions |script-local|
|
||||
4. User-defined commands |user-commands|
|
||||
@@ -234,6 +235,9 @@ The search string will not be echoed when using this mapping. Messages from
|
||||
the executed command are still given though. To shut them up too, add a
|
||||
":silent" in the executed command: >
|
||||
:map <silent> ,h :exe ":silent normal /Header\r"<CR>
|
||||
Note that the effect of a command might also be silenced, e.g., when the
|
||||
mapping selects another entry for command line completion it won't be
|
||||
displayed.
|
||||
Prompts will still be given, e.g., for inputdialog().
|
||||
Using "<silent>" for an abbreviation is possible, but will cause redrawing of
|
||||
the command line to fail.
|
||||
@@ -581,6 +585,9 @@ is the start of the last selected Visual area in the current buffer |'<|.
|
||||
The |:filter| command can be used to select what mappings to list. The
|
||||
pattern is matched against the {lhs} and {rhs} in the raw form.
|
||||
|
||||
While mappings are being listed, it is not possible to add or clear mappings,
|
||||
e.g. from a timer callback. *E1309*
|
||||
|
||||
*:map-verbose*
|
||||
When 'verbose' is non-zero, listing a key map will also display where it was
|
||||
last defined. Example: >
|
||||
@@ -770,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
|
||||
@@ -964,13 +971,18 @@ using other applications but not when inside Vim.
|
||||
Xterm and a few other terminals can be put in a mode where keys with modifiers
|
||||
are sent with a special escape code. Vim recognizes these codes and can then
|
||||
make a difference between CTRL-H and Backspace, even when Backspace sends the
|
||||
character 8. And many more special keys.
|
||||
character 8. And many more special keys, such as Tab and CTRL-I, which cannot
|
||||
be mapped separately otherwise.
|
||||
|
||||
For xterm modifyOtherKeys is enabled in the builtin termcap entry. If this is
|
||||
not used you can enable modifyOtherKeys with these lines in your vimrc: >
|
||||
let &t_TI = "\<Esc>[>4;2m"
|
||||
let &t_TE = "\<Esc>[>4;m"
|
||||
|
||||
This sets modifyOtherKeys to level 2. Note that modifyOtherKeys level 1 does
|
||||
not work. Some terminals do not support level 2 and then send key codes that
|
||||
Vim will not be able to correctly recognize.
|
||||
|
||||
In case the modifyOtherKeys mode causes problems you can disable it: >
|
||||
let &t_TI = ""
|
||||
let &t_TE = ""
|
||||
@@ -989,21 +1001,61 @@ mapping, see |map-bar|.
|
||||
WARNING: if you map <C-[> you may very well break any key codes that start
|
||||
with Esc. Make sure it comes AFTER other mappings.
|
||||
|
||||
Vim automatically detects if the modifyOtherKeys mode was enabled when it
|
||||
spots an escape sequence that must have been created by it. To see if Vim
|
||||
detected such an escape sequence use `:verbose map`, the first line will then
|
||||
show "Seen modifyOtherKeys: true" (possibly translated).
|
||||
Starting with xterm version 377 Vim can detect the modifyOtherKeys state by
|
||||
requesting it. For this the 't_RK' termcap entry is used. When the response
|
||||
is found then Vim will know whether modifyOtherKeys level 2 is enabled, and
|
||||
handle mappings accordingly.
|
||||
|
||||
Before version 377 Vim automatically detects if the modifyOtherKeys mode was
|
||||
enabled when it spots an escape sequence that must have been created by it.
|
||||
To see if Vim detected such an escape sequence use `:verbose map`, the first
|
||||
line will then show "Seen modifyOtherKeys: true" (possibly translated).
|
||||
|
||||
This automatic detection depends on receiving an escape code starting with
|
||||
"<1b>[27;". This is the normal way xterm sends these key codes. However, if
|
||||
the *formatOtherKeys* resource is set another form is used that is not
|
||||
recognized, therefore you must not set formatOtherKeys.
|
||||
|
||||
A known side effect is that in Insert mode the raw escape sequence is inserted
|
||||
after the CTRL-V key. This can be used to check whether modifyOtherKeys is
|
||||
enabled: In Insert mode type CTRL-SHIFT-V CTRL-V, if you get one byte then
|
||||
modifyOtherKeys is off, if you get <1b>27;5;118~ then it is on.
|
||||
modifyOtherKeys is off, if you get <1b>[27;5;118~ then it is on.
|
||||
|
||||
Note that xterm up to version 376 has a bug that makes Shift-Esc send a
|
||||
regular Esc code, the Shift modifier is dropped.
|
||||
|
||||
When the 'esckeys' option is off, then modifyOtherKeys will be disabled in
|
||||
Insert mode to avoid every key with a modifier causing Insert mode to end.
|
||||
|
||||
|
||||
1.12 MAPPING AN OPERATOR *:map-operator*
|
||||
1.12 MAPPING WITH KITTY KEYBOARD PROTOCOL *kitty-keyboard-protocol*
|
||||
|
||||
If the value of 'term' contains "kitty" then Vim will send out an escape
|
||||
sequence to enable the Kitty keyboard protocol. This can be changed with the
|
||||
'keyprotocol' option.
|
||||
|
||||
Like modifyOtherKeys, this will make it possible to distinguish between more
|
||||
keys with modifiers. Also, this protocol sends an escape sequence for the Esc
|
||||
key, so that Vim does not need to use a timeout to know whether receiving an
|
||||
Esc character means the Esc key was pressed or it's the start of an escape
|
||||
sequence.
|
||||
|
||||
Vim automatically detects if the Kitty keyboard protocol was enabled when it
|
||||
spots the response to the status request (this should be part of the |t_TI|
|
||||
termcap entry). To see if Vim detected such an escape sequence use: >
|
||||
:verbose map
|
||||
The first line will then show "Kitty keyboard protocol: {value}" (possibly
|
||||
translated). The meaning of {value}:
|
||||
Unknown no status received yet
|
||||
Off protocol is not used
|
||||
On protocol is used
|
||||
Disabled protocol was used but expected to have been disabled
|
||||
by 't_TE'
|
||||
Cleared protocol expected to have beeen disabled by 't_TE',
|
||||
previous state is unknown
|
||||
|
||||
|
||||
1.13 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
An operator is used before a {motion} command. To define your own operator
|
||||
you must create a mapping that first sets the 'operatorfunc' option and then
|
||||
@@ -1473,6 +1525,8 @@ See |:verbose-cmd| for more information.
|
||||
|
||||
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
|
||||
Delete the user-defined command {cmd}.
|
||||
This is not allowed while listing commands, e.g. from
|
||||
a timer. *E1311*
|
||||
|
||||
:delc[ommand] -buffer {cmd} *E1237*
|
||||
Delete the user-defined command {cmd} that was defined
|
||||
@@ -1641,7 +1695,7 @@ Possible attributes are:
|
||||
number.
|
||||
-count=N A count (default N) which is specified either in the line
|
||||
number position, or as an initial argument (like |:Next|).
|
||||
-count acts like -count=0
|
||||
-count Acts like -count=0
|
||||
|
||||
Note that -range=N and -count=N are mutually exclusive - only one should be
|
||||
specified.
|
||||
@@ -1659,7 +1713,7 @@ Possible values are (second column is the short name used in listing):
|
||||
-addr=windows win Range for windows
|
||||
-addr=tabs tab Range for tab pages
|
||||
-addr=quickfix qf Range for quickfix entries
|
||||
-addr=other ? other kind of range; can use ".", "$" and "%"
|
||||
-addr=other ? Other kind of range; can use ".", "$" and "%"
|
||||
as with "lines" (this is the default for
|
||||
-count)
|
||||
|
||||
@@ -1817,7 +1871,7 @@ When executed as: >
|
||||
This will invoke: >
|
||||
:call Myfunc("arg1","arg2")
|
||||
|
||||
< *q-args-example*
|
||||
< *q-args-example*
|
||||
A more substantial example: >
|
||||
:function Allargs(command)
|
||||
: let i = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.0. Last change: 2022 Oct 28
|
||||
*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
|
||||
@@ -3049,13 +3051,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
not set yet, the default for 'fileencodings' is changed.
|
||||
|
||||
*'endoffile'* *'eof'* *'noendoffile'* *'noeof'*
|
||||
'endoffile' 'eof' boolean (default on)
|
||||
'endoffile' 'eof' boolean (default off)
|
||||
local to buffer
|
||||
Indicates that a CTRL-Z character was found at the end of the file
|
||||
when reading it. Normally only happens when 'fileformat' is "dos".
|
||||
When writing a file and this option is off and the 'binary' option
|
||||
is on, or 'fixeol' option is off, no CTRL-Z will be written at the
|
||||
end of the file.
|
||||
See |eol-and-eof| for example settings.
|
||||
|
||||
*'endofline'* *'eol'* *'noendofline'* *'noeol'*
|
||||
'endofline' 'eol' boolean (default on)
|
||||
@@ -3071,6 +3074,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
to remember the presence of a <EOL> for the last line in the file, so
|
||||
that when you write the file the situation from the original file can
|
||||
be kept. But you can change it if you want to.
|
||||
See |eol-and-eof| for example settings.
|
||||
|
||||
*'equalalways'* *'ea'* *'noequalalways'* *'noea'*
|
||||
'equalalways' 'ea' boolean (default on)
|
||||
@@ -3466,6 +3470,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
When the 'binary' option is set the value of this option doesn't
|
||||
matter.
|
||||
See the 'endofline' option.
|
||||
See |eol-and-eof| for example settings.
|
||||
|
||||
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
|
||||
'fkmap' 'fk' boolean (default off)
|
||||
@@ -4545,17 +4550,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|+find_in_path| or |+eval| features}
|
||||
Expression to be used to transform the string found with the 'include'
|
||||
option to a file name. Mostly useful to change "." to "/" for Java: >
|
||||
:set includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
:setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
< The "v:fname" variable will be set to the file name that was detected.
|
||||
|
||||
Note the double backslash: the `:set` command first halves them, then
|
||||
one remains it the value, where "\." matches a dot literally. For
|
||||
simple character replacements `tr()` avoids the need for escaping: >
|
||||
:setlocal includeexpr=tr(v:fname,'.','/')
|
||||
<
|
||||
Also used for the |gf| command if an unmodified file name can't be
|
||||
found. Allows doing "gf" on the name after an 'include' statement.
|
||||
Also used for |<cfile>|.
|
||||
|
||||
If the expression starts with s: or |<SID>|, then it is replaced with
|
||||
the script ID (|local-function|). Example: >
|
||||
set includeexpr=s:MyIncludeExpr()
|
||||
set includeexpr=<SID>SomeIncludeExpr()
|
||||
setlocal includeexpr=s:MyIncludeExpr()
|
||||
setlocal includeexpr=<SID>SomeIncludeExpr()
|
||||
< Otherwise, the expression is evaluated in the context of the script
|
||||
where the option was set, thus script-local items are available.
|
||||
|
||||
@@ -4885,6 +4894,57 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<PageUp> and <PageDown>.
|
||||
The 'keymodel' option is set by the |:behave| command.
|
||||
|
||||
*'keyprotocol'* *'kpc'*
|
||||
'keyprotocol' 'kpc' string (default: see below)
|
||||
global
|
||||
Specifies what keyboard protocol to use depending on the value of
|
||||
'term'. The supported keyboard protocols names are:
|
||||
none whatever the terminal uses
|
||||
mok2 modifyOtherKeys level 2, as supported by xterm
|
||||
kitty Kitty keyboard protocol, as supported by Kitty
|
||||
|
||||
The option value is a list of comma separated items. Each item has
|
||||
a pattern that is matched against the 'term' option, a colon and the
|
||||
protocol name to be used. To illustrate this, the default value would
|
||||
be set with: >
|
||||
set keyprotocol=kitty:kitty,foot:kitty,wezterm:kitty,xterm:mok2
|
||||
|
||||
< This means that when 'term' contains "kitty, "foot" or "wezterm"
|
||||
somewhere then the "kitty" protocol is used. When 'term' contains
|
||||
"xterm" somewhere, then the "mok2" protocol is used.
|
||||
|
||||
The first match is used, thus if you want to have "kitty" use the
|
||||
kitty protocol, but "badkitty" not, then you should match "badkitty"
|
||||
first and use the "none" value: >
|
||||
set keyprotocol=badkitty:none,kitty:kitty
|
||||
<
|
||||
The option is used after 'term' has been changed. First the termcap
|
||||
entries are set, possibly using the builtin list, see |builtin-terms|.
|
||||
Then this option is inspected and if there is a match and a protocol
|
||||
is specified the following happens:
|
||||
none Nothing, the regular t_TE and t_TI values remain
|
||||
|
||||
mok2 The t_TE value is changed to:
|
||||
CSI >4;m disables modifyOtherKeys
|
||||
The t_TI value is changed to:
|
||||
CSI >4;2m enables modifyOtherKeys
|
||||
CSI ?4m request the modifyOtherKeys state
|
||||
|
||||
kitty The t_TE value is changed to:
|
||||
CSI >4;m disables modifyOtherKeys
|
||||
CSI =0;1u disables the kitty keyboard protocol
|
||||
The t_TI value is changed to:
|
||||
CSI =1;1u enables the kitty keyboard protocol
|
||||
CSI ?u request kitty keyboard protocol state
|
||||
CSI >c request the termresponse
|
||||
|
||||
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",
|
||||
VMS: "help")
|
||||
@@ -7060,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
|
||||
@@ -7164,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
|
||||
@@ -7605,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|.
|
||||
@@ -7664,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.
|
||||
@@ -8518,10 +8602,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
xterm entries...).
|
||||
|
||||
*'ttyfast'* *'tf'* *'nottyfast'* *'notf'*
|
||||
'ttyfast' 'tf' boolean (default off, on when 'term' is xterm, hpterm,
|
||||
sun-cmd, screen, rxvt, dtterm or
|
||||
iris-ansi; also on when running Vim in
|
||||
a DOS console)
|
||||
'ttyfast' 'tf' boolean (default on)
|
||||
global
|
||||
Indicates a fast terminal connection. More characters will be sent to
|
||||
the screen for redrawing, instead of using insert/delete line
|
||||
@@ -8531,6 +8612,14 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
line for lines that wrap. This helps when using copy/paste with the
|
||||
mouse in an xterm and other terminals.
|
||||
|
||||
The default used to be set only for some terminal names, but these
|
||||
days nearly all terminals are fast, therefore the default is now "on".
|
||||
If you have a slow connection you may want to set this option off,
|
||||
e.g. depending on the host name: >
|
||||
if hostname() =~ 'faraway'
|
||||
set nottyfast
|
||||
endif
|
||||
<
|
||||
*'ttymouse'* *'ttym'*
|
||||
'ttymouse' 'ttym' string (default depends on 'term')
|
||||
global
|
||||
@@ -8590,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.
|
||||
|
||||
@@ -56,7 +56,7 @@ additionally installed over the GUI version. Typical build commands are:
|
||||
./configure --prefix=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY` \
|
||||
--datarootdir=`finddir B_SYSTEM_NONPACKAGED_DATA_DIRECTORY` \
|
||||
--mandir=`finddir B_SYSTEM_NONPACKAGED_DIRECTORY`/documentation/man \
|
||||
--with-tlib=ncurses \
|
||||
--with-tlib=ncurses
|
||||
make clean
|
||||
make install
|
||||
|
||||
@@ -95,7 +95,7 @@ The default value for $VIM is set at compile time and can be determined with:
|
||||
|
||||
:version
|
||||
|
||||
The normal value is /boot/system/data/vim for Haikuports version,
|
||||
The normal value is /boot/system/data/vim for Haikuports version,
|
||||
/boot/system/non-packaged/data/vim for manual builds. If you don't like it
|
||||
you can set the VIM environment variable to override this, or set 'helpfile'
|
||||
in your .vimrc: >
|
||||
@@ -223,11 +223,11 @@ Thank you, all!
|
||||
|
||||
|
||||
14. Bugs & to-do *haiku-bugs*
|
||||
|
||||
|
||||
The port is under development now and far away from the perfect state. For bug
|
||||
reports, patches and wishes, please use the Vim mailing list or Vim Github
|
||||
repository.
|
||||
|
||||
|
||||
Mailing list: https://www.vim.org/maillist.php
|
||||
Vim Github repository: https://github.com/vim/vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_unix.txt* For Vim version 9.0. Last change: 2005 Mar 29
|
||||
*os_unix.txt* For Vim version 9.0. Last change: 2022 Nov 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -28,10 +28,11 @@ system() is used, which is a bit slower. The output of ":version" includes
|
||||
can be changed at compile time.
|
||||
(For forking of the GUI version see |gui-fork|.)
|
||||
|
||||
Because terminal updating under Unix is often slow (e.g. serial line
|
||||
terminal, shell window in suntools), the 'showcmd' and 'ruler' options
|
||||
are off by default. If you have a fast terminal, try setting them on. You
|
||||
might also want to set 'ttyfast'.
|
||||
For historic reasons terminal updating under Unix is expected to be slow (e.g.
|
||||
serial line terminal, shell window in suntools), the 'showcmd' and 'ruler'
|
||||
options are off by default. If you have a fast terminal, try setting them
|
||||
on: >
|
||||
set showcmd ruler
|
||||
|
||||
When using Vim in an xterm the mouse clicks can be used by Vim by setting
|
||||
'mouse' to "a". If there is access to an X-server gui style copy/paste will
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 9.0. Last change: 2022 Sep 30
|
||||
*os_vms.txt* For Vim version 9.0. Last change: 2022 Nov 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -458,18 +458,11 @@ Ins, Del buttons etc., except Backspace in GUI mode. To solve it, add to
|
||||
|
||||
Vim will also recognize that they are fast terminals.
|
||||
|
||||
If you have some annoying line jumping on the screen between windows add to
|
||||
your .vimrc file: >
|
||||
|
||||
set ttyfast " set fast terminal
|
||||
|
||||
Note: if you're using Vim on remote host or through a very slow connection, it's
|
||||
recommended to avoid the fast terminal option with: >
|
||||
If you're using Vim on remote host or through a very slow connection, you
|
||||
might want to reset fast terminal option with: >
|
||||
|
||||
set nottyfast " set terminal to slow mode
|
||||
|
||||
(Zoltan Arpadffy, Vim 5.6)
|
||||
|
||||
|
||||
8.7 Hex-editing and other external tools
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ Copyright 2005-2017: *tar-copyright*
|
||||
<.vimrc> file.
|
||||
Default
|
||||
Variable Value Explanation
|
||||
*g:tar_browseoptions* "Ptf" used to get a list of contents
|
||||
*g:tar_browseoptions* "Ptf" used to get a list of contents
|
||||
*g:tar_readoptions* "OPxf" used to extract a file from a tarball
|
||||
*g:tar_cmd* "tar" the name of the tar program
|
||||
*g:tar_nomax* 0 if true, file window will not be maximized
|
||||
@@ -98,7 +98,7 @@ Copyright 2005-2017: *tar-copyright*
|
||||
"-"
|
||||
Not all tar's support the "--" which is why
|
||||
it isn't default.
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
*g:tar_writeoptions* "uf" used to update/replace a file
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -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 Oct 28
|
||||
*quickref.txt* For Vim version 9.0. Last change: 2022 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -775,6 +775,7 @@ Short explanation of each option: *option-list*
|
||||
'key' encryption key
|
||||
'keymap' 'kmp' name of a keyboard mapping
|
||||
'keymodel' 'km' enable starting/stopping selection with keys
|
||||
'keyprotocol' 'kpc' what keyboard protocol to use for what terminal
|
||||
'keywordprg' 'kp' program to use for the "K" command
|
||||
'langmap' 'lmap' alphabetic characters for other language mode
|
||||
'langmenu' 'lm' language to be used for the menus
|
||||
@@ -901,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
|
||||
|
||||
@@ -1008,8 +1008,8 @@ Note: even when using "num" or "long" the number of flags available to
|
||||
compounding and prefixes is limited to about 250.
|
||||
|
||||
|
||||
AFFIXES
|
||||
*spell-PFX* *spell-SFX*
|
||||
AFFIXES *spell-PFX* *spell-SFX*
|
||||
|
||||
The usual PFX (prefix) and SFX (suffix) lines are supported (see the Myspell
|
||||
documentation or the Aspell manual:
|
||||
http://aspell.net/man-html/Affix-Compression.html).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 9.0. Last change: 2022 Jun 14
|
||||
*starting.txt* For Vim version 9.0. Last change: 2022 Nov 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -348,7 +348,7 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
Start logging and write entries to {filename}.
|
||||
This works like calling `ch_logfile({filename}, 'ao')` very
|
||||
early during startup.
|
||||
{only available with the |+channel| feature}
|
||||
{only available with the |+eval| feature}
|
||||
|
||||
*-D*
|
||||
-D Debugging. Go to debugging mode when executing the first
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Oct 17
|
||||
*syntax.txt* For Vim version 9.0. Last change: 2022 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1888,6 +1888,16 @@ following two lines to the syntax coloring file for that language
|
||||
Now you just need to make sure that you add all regions that contain
|
||||
the preprocessor language to the cluster htmlPreproc.
|
||||
|
||||
*html-folding*
|
||||
The HTML syntax file provides syntax |folding| (see |:syn-fold|) between start
|
||||
and end tags. This can be turned on by >
|
||||
|
||||
:let g:html_syntax_folding = 1
|
||||
:set foldmethod=syntax
|
||||
|
||||
Note: Syntax folding might slow down syntax highlighting significantly,
|
||||
especially for large files.
|
||||
|
||||
|
||||
HTML/OS (by Aestiva) *htmlos.vim* *ft-htmlos-syntax*
|
||||
|
||||
@@ -2416,7 +2426,7 @@ you set the variable: >
|
||||
|
||||
:let papp_include_html=1
|
||||
|
||||
in your startup file it will try to syntax-hilight html code inside phtml
|
||||
in your startup file it will try to syntax-highlight html code inside phtml
|
||||
sections, but this is relatively slow and much too colourful to be able to
|
||||
edit sensibly. ;)
|
||||
|
||||
@@ -3611,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
|
||||
@@ -4891,7 +4909,7 @@ is mostly used, because it looks better.
|
||||
In the next section you can find information about indivisual highlight groups
|
||||
and how to specify colors for them. Most likely you want to just select a set
|
||||
of colors by using the `:colorscheme` command, for example: >
|
||||
|
||||
|
||||
colorscheme pablo
|
||||
<
|
||||
*:colo* *:colorscheme* *E185*
|
||||
@@ -4943,7 +4961,7 @@ Change a couple more colors: >
|
||||
augroup my_colorschemes
|
||||
au!
|
||||
au Colorscheme pablo hi Normal ctermbg=NONE
|
||||
\ | higlight Special ctermfg=63
|
||||
\ | highlight Special ctermfg=63
|
||||
\ | highlight Identifier ctermfg=44
|
||||
augroup END
|
||||
|
||||
@@ -4985,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|
|
||||
@@ -5386,16 +5404,16 @@ LineNrBelow Line number for when the 'relativenumber'
|
||||
*hl-CursorLineNr*
|
||||
CursorLineNr Like LineNr when 'cursorline' is set and 'cursorlineopt'
|
||||
contains "number" or is "both", for the cursor line.
|
||||
*hl-CursorLineSign*
|
||||
CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
||||
*hl-CursorLineFold*
|
||||
CursorLineFold Like FoldColumn when 'cursorline' is set for the cursor line.
|
||||
*hl-CursorLineSign*
|
||||
CursorLineSign Like SignColumn when 'cursorline' is set for the cursor line.
|
||||
*hl-MatchParen*
|
||||
MatchParen Character under the cursor or just before it, if it
|
||||
is a paired bracket, and its match. |pi_paren.txt|
|
||||
*hl-MessageWindow*
|
||||
MessageWindow Messages popup window used when 'cmdheight' is zero. If not
|
||||
defined |hl-WarningMsg| is used.
|
||||
MessageWindow Messages popup window used by `:echowindow`. If not defined
|
||||
|hl-WarningMsg| is used.
|
||||
*hl-ModeMsg*
|
||||
ModeMsg 'showmode' message (e.g., "-- INSERT --").
|
||||
*hl-MoreMsg*
|
||||
|
||||
151
runtime/doc/tags
151
runtime/doc/tags
@@ -437,10 +437,10 @@ $quote eval.txt /*$quote*
|
||||
'key' options.txt /*'key'*
|
||||
'keymap' options.txt /*'keymap'*
|
||||
'keymodel' options.txt /*'keymodel'*
|
||||
'keywordprg' options.txt /*'keywordprg'*
|
||||
'keyprotocol' options.txt /*'keyprotocol'*
|
||||
'km' options.txt /*'km'*
|
||||
'kmp' options.txt /*'kmp'*
|
||||
'kp' options.txt /*'kp'*
|
||||
'kpc' options.txt /*'kpc'*
|
||||
'langmap' options.txt /*'langmap'*
|
||||
'langmenu' options.txt /*'langmenu'*
|
||||
'langnoremap' options.txt /*'langnoremap'*
|
||||
@@ -924,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'*
|
||||
@@ -936,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'*
|
||||
@@ -1059,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'*
|
||||
@@ -1079,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'*
|
||||
@@ -2162,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*
|
||||
@@ -2198,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*
|
||||
@@ -2322,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*
|
||||
@@ -2499,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*
|
||||
@@ -2516,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*
|
||||
@@ -2646,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*
|
||||
@@ -3014,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*
|
||||
@@ -3042,6 +3048,9 @@ $quote eval.txt /*$quote*
|
||||
:r! insert.txt /*:r!*
|
||||
:range cmdline.txt /*:range*
|
||||
:range! change.txt /*:range!*
|
||||
:range-closed-fold cmdline.txt /*:range-closed-fold*
|
||||
:range-offset cmdline.txt /*:range-offset*
|
||||
:range-pattern cmdline.txt /*:range-pattern*
|
||||
:re insert.txt /*:re*
|
||||
:read insert.txt /*:read*
|
||||
:read! insert.txt /*:read!*
|
||||
@@ -3280,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*
|
||||
@@ -3458,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*
|
||||
@@ -3982,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*
|
||||
@@ -4354,11 +4364,58 @@ E1304 vim9.txt /*E1304*
|
||||
E1305 textprop.txt /*E1305*
|
||||
E1306 vim9.txt /*E1306*
|
||||
E1307 vim9.txt /*E1307*
|
||||
E1308 builtin.txt /*E1308*
|
||||
E1309 map.txt /*E1309*
|
||||
E131 userfunc.txt /*E131*
|
||||
E1310 gui.txt /*E1310*
|
||||
E1311 map.txt /*E1311*
|
||||
E1312 windows.txt /*E1312*
|
||||
E1313 eval.txt /*E1313*
|
||||
E1314 vim9class.txt /*E1314*
|
||||
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*
|
||||
@@ -5414,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*
|
||||
@@ -5573,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*
|
||||
@@ -5607,7 +5672,10 @@ WinClosed autocmd.txt /*WinClosed*
|
||||
WinEnter autocmd.txt /*WinEnter*
|
||||
WinLeave autocmd.txt /*WinLeave*
|
||||
WinNew autocmd.txt /*WinNew*
|
||||
WinResized autocmd.txt /*WinResized*
|
||||
WinResized-event windows.txt /*WinResized-event*
|
||||
WinScrolled autocmd.txt /*WinScrolled*
|
||||
WinScrolled-event windows.txt /*WinScrolled-event*
|
||||
X change.txt /*X*
|
||||
X11 options.txt /*X11*
|
||||
X11-icon gui_x11.txt /*X11-icon*
|
||||
@@ -6241,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*
|
||||
@@ -6297,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*
|
||||
@@ -6655,6 +6727,7 @@ end intro.txt /*end*
|
||||
end-of-file pattern.txt /*end-of-file*
|
||||
enlightened-terminal syntax.txt /*enlightened-terminal*
|
||||
environ() builtin.txt /*environ()*
|
||||
eol-and-eof editing.txt /*eol-and-eof*
|
||||
erlang.vim syntax.txt /*erlang.vim*
|
||||
err_buf channel.txt /*err_buf*
|
||||
err_cb channel.txt /*err_cb*
|
||||
@@ -6684,6 +6757,8 @@ escape() builtin.txt /*escape()*
|
||||
escape-bar version4.txt /*escape-bar*
|
||||
euphoria3.vim syntax.txt /*euphoria3.vim*
|
||||
euphoria4.vim syntax.txt /*euphoria4.vim*
|
||||
euro digraph.txt /*euro*
|
||||
euro-digraph digraph.txt /*euro-digraph*
|
||||
eval eval.txt /*eval*
|
||||
eval() builtin.txt /*eval()*
|
||||
eval-examples eval.txt /*eval-examples*
|
||||
@@ -6811,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*
|
||||
@@ -6952,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*
|
||||
@@ -7479,6 +7556,7 @@ get() builtin.txt /*get()*
|
||||
get-ms-debuggers debug.txt /*get-ms-debuggers*
|
||||
getbufinfo() builtin.txt /*getbufinfo()*
|
||||
getbufline() builtin.txt /*getbufline()*
|
||||
getbufoneline() builtin.txt /*getbufoneline()*
|
||||
getbufvar() builtin.txt /*getbufvar()*
|
||||
getchangelist() builtin.txt /*getchangelist()*
|
||||
getchar() builtin.txt /*getchar()*
|
||||
@@ -7510,6 +7588,7 @@ getloclist() builtin.txt /*getloclist()*
|
||||
getmarklist() builtin.txt /*getmarklist()*
|
||||
getmatches() builtin.txt /*getmatches()*
|
||||
getmousepos() builtin.txt /*getmousepos()*
|
||||
getmouseshape() builtin.txt /*getmouseshape()*
|
||||
getpid() builtin.txt /*getpid()*
|
||||
getpos() builtin.txt /*getpos()*
|
||||
getqflist() builtin.txt /*getqflist()*
|
||||
@@ -7830,6 +7909,7 @@ howto.txt howto.txt /*howto.txt*
|
||||
hpterm term.txt /*hpterm*
|
||||
hpterm-color syntax.txt /*hpterm-color*
|
||||
html-flavor insert.txt /*html-flavor*
|
||||
html-folding syntax.txt /*html-folding*
|
||||
html-indent indent.txt /*html-indent*
|
||||
html-indenting indent.txt /*html-indenting*
|
||||
html.vim syntax.txt /*html.vim*
|
||||
@@ -7981,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*
|
||||
@@ -8056,7 +8137,7 @@ interfaces-5.2 version5.txt /*interfaces-5.2*
|
||||
internal-variables eval.txt /*internal-variables*
|
||||
internal-wordlist spell.txt /*internal-wordlist*
|
||||
internet intro.txt /*internet*
|
||||
interp-string eval.txt /*interp-string*
|
||||
interpolated-string eval.txt /*interpolated-string*
|
||||
interrupt() builtin.txt /*interrupt()*
|
||||
intro intro.txt /*intro*
|
||||
intro.txt intro.txt /*intro.txt*
|
||||
@@ -8148,6 +8229,8 @@ keypad-plus intro.txt /*keypad-plus*
|
||||
keypad-point intro.txt /*keypad-point*
|
||||
keys() builtin.txt /*keys()*
|
||||
keytrans() builtin.txt /*keytrans()*
|
||||
kitty-keyboard-protocol map.txt /*kitty-keyboard-protocol*
|
||||
kitty-terminal term.txt /*kitty-terminal*
|
||||
known-bugs todo.txt /*known-bugs*
|
||||
l motion.txt /*l*
|
||||
l: eval.txt /*l:*
|
||||
@@ -8425,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*
|
||||
@@ -8843,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*
|
||||
@@ -8852,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*
|
||||
@@ -9510,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*
|
||||
@@ -9566,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*
|
||||
@@ -9780,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*
|
||||
@@ -9890,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*
|
||||
@@ -9910,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*
|
||||
@@ -10177,6 +10296,7 @@ termdebug_popup terminal.txt /*termdebug_popup*
|
||||
termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
|
||||
termdebug_use_prompt terminal.txt /*termdebug_use_prompt*
|
||||
termdebug_wide terminal.txt /*termdebug_wide*
|
||||
termdebug_winbar terminal.txt /*termdebug_winbar*
|
||||
terminal terminal.txt /*terminal*
|
||||
terminal-api terminal.txt /*terminal-api*
|
||||
terminal-autoshelldir terminal.txt /*terminal-autoshelldir*
|
||||
@@ -10225,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()*
|
||||
@@ -10753,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*
|
||||
@@ -10844,11 +10966,14 @@ w:quickfix_title quickfix.txt /*w:quickfix_title*
|
||||
w:var eval.txt /*w:var*
|
||||
waittime channel.txt /*waittime*
|
||||
warningmsg-variable eval.txt /*warningmsg-variable*
|
||||
wdl-syntax syntax.txt /*wdl-syntax*
|
||||
wdl.vim syntax.txt /*wdl.vim*
|
||||
white-space pattern.txt /*white-space*
|
||||
whitespace pattern.txt /*whitespace*
|
||||
wildcard editing.txt /*wildcard*
|
||||
wildcards editing.txt /*wildcards*
|
||||
wildmenumode() builtin.txt /*wildmenumode()*
|
||||
win-scrolled-resized windows.txt /*win-scrolled-resized*
|
||||
win16 os_win32.txt /*win16*
|
||||
win32 os_win32.txt /*win32*
|
||||
win32-!start gui_w32.txt /*win32-!start*
|
||||
@@ -10977,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*
|
||||
@@ -10985,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,13 @@ 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
|
||||
work to do (no typeahead and no pending commands). That is to avoid the
|
||||
response to end up in a shell command or arrive after Vim exits.
|
||||
|
||||
*xterm-bracketed-paste*
|
||||
When the 't_BE' option is set then 't_BE' will be sent to the
|
||||
@@ -112,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: >
|
||||
|
||||
@@ -121,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
|
||||
@@ -289,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*
|
||||
|
||||
@@ -388,6 +449,10 @@ 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'*
|
||||
see |'ambiwidth'|
|
||||
The response is stored in |v:termu7resp|
|
||||
@@ -416,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
|
||||
@@ -429,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
|
||||
@@ -439,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
|
||||
@@ -499,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'*
|
||||
@@ -531,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".
|
||||
@@ -572,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"
|
||||
|
||||
@@ -595,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),
|
||||
@@ -768,8 +856,9 @@ See the "Options" chapter |options|.
|
||||
|
||||
If your terminal does not support a scrolling region, but it does support
|
||||
insert/delete line commands, scrolling with multiple windows may make the
|
||||
lines jump up and down. If you don't want this set the 'ttyfast' option.
|
||||
This will redraw the window instead of scroll it.
|
||||
lines jump up and down. This would happen if the 'ttyfast' option has been
|
||||
reset. Check that with: >
|
||||
verbose set ttyfast?
|
||||
|
||||
If your terminal scrolls very slowly, but redrawing is not slow, set the
|
||||
'ttyscroll' option to a small number, e.g., 3. This will make Vim redraw the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2022 Oct 10
|
||||
*terminal.txt* For Vim version 9.0. Last change: 2022 Nov 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -469,7 +469,6 @@ ConPTY problems have been fixed "winpty" will be preferred.
|
||||
Environment variables are used to pass information to the running job:
|
||||
VIM_SERVERNAME v:servername
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Terminal functions *terminal-function-details*
|
||||
|
||||
@@ -1129,7 +1128,6 @@ reference: >
|
||||
|
||||
Creating a screen dump ~
|
||||
*terminal-screendump*
|
||||
|
||||
To create the screen dump, run Vim (or any other program) in a terminal and
|
||||
make it show the desired state. Then use the |term_dumpwrite()| function to
|
||||
create a screen dump file. For example: >
|
||||
@@ -1153,7 +1151,6 @@ If there are differences then v:errors will contain the error message.
|
||||
|
||||
Comparing screen dumps ~
|
||||
*terminal-diffscreendump*
|
||||
|
||||
|assert_equalfile()| does not make it easy to see what is different.
|
||||
To spot the problem use |term_dumpdiff()|: >
|
||||
call term_dumpdiff("mysyntax.dump", "test.dump")
|
||||
@@ -1350,6 +1347,7 @@ If 'mouse' is set the plugin adds a window toolbar with these entries:
|
||||
Eval `:Evaluate`
|
||||
This way you can use the mouse to perform the most common commands. You need
|
||||
to have the 'mouse' option set to enable mouse clicks.
|
||||
See |termdebug_winbar| for configuring this toolbar.
|
||||
*:Winbar*
|
||||
You can add the window toolbar in other windows you open with: >
|
||||
:Winbar
|
||||
@@ -1415,6 +1413,20 @@ TermdebugStopPost After debugging has ended, gdb-related windows
|
||||
the state before the debugging was restored.
|
||||
|
||||
|
||||
Customizing ~
|
||||
*termdebug-customizing* *g:termdebug_config*
|
||||
In the past several global variables were used for configuration. These are
|
||||
deprecated and using the g:termdebug_config dictionary is preferred. When
|
||||
g:termdebug_config exists the other global variables will NOT be used.
|
||||
The recommended way is to start with an empty dictionary: >
|
||||
let g:termdebug_config = {}
|
||||
|
||||
Then you can add entries to the dictionary as mentioned below. The
|
||||
deprecated global variable names are mentioned for completeness. If you are
|
||||
switching over to using g:termdebug_config you can find the old variable name
|
||||
and take over the value, then delete the deprecated variable.
|
||||
|
||||
|
||||
Prompt mode ~
|
||||
*termdebug-prompt*
|
||||
When the |+terminal| feature is not supported and on MS-Windows, gdb will run
|
||||
@@ -1430,13 +1442,13 @@ in a buffer with 'buftype' set to "prompt". This works slightly differently:
|
||||
*termdebug_use_prompt*
|
||||
Prompt mode can be used even when the |+terminal| feature is present with: >
|
||||
let g:termdebug_config['use_prompt'] = 1
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_use_prompt = 1
|
||||
<
|
||||
*termdebug_map_K*
|
||||
The K key is normally mapped to :Evaluate. If you do not want this use: >
|
||||
let g:termdebug_config['map_K'] = 0
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_map_K = 0
|
||||
<
|
||||
*termdebug_disasm_window*
|
||||
@@ -1444,7 +1456,7 @@ If you want the Asm window shown by default, set the flag to 1.
|
||||
the "disasm_window_height" entry can be used to set the window height: >
|
||||
let g:termdebug_config['disasm_window'] = 1
|
||||
let g:termdebug_config['disasm_window_height'] = 15
|
||||
or, if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_disasm_window = 15
|
||||
Any value greater than 1 will set the Asm window height to that value.
|
||||
|
||||
@@ -1462,25 +1474,18 @@ interrupt the running program. But after using the MI command
|
||||
communication channel.
|
||||
|
||||
|
||||
Customizing ~
|
||||
*termdebug-customizing* *g:termdebug_config*
|
||||
In the past several global variables were used for configuration. These are
|
||||
deprecated, using the g:termdebug_config dictionary is preferred. When
|
||||
g:termdebug_config exists the other global variables will not be used.
|
||||
|
||||
|
||||
GDB command ~
|
||||
*g:termdebugger*
|
||||
To change the name of the gdb command, set "debugger" entry in
|
||||
g:termdebug_config or the "g:termdebugger" variable before invoking
|
||||
`:Termdebug`: >
|
||||
let g:termdebug_config['command'] = "mygdb"
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebugger = "mygdb"
|
||||
|
||||
If the command needs an argument use a List: >
|
||||
let g:termdebug_config['command'] = ['rr', 'replay', '--']
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebugger = ['rr', 'replay', '--']
|
||||
|
||||
Several arguments will be added to make gdb work well for the debugger.
|
||||
@@ -1501,7 +1506,7 @@ Then your gdb is too old.
|
||||
|
||||
|
||||
Colors ~
|
||||
*hl-debugPC* *hl-debugBreakpoint*
|
||||
*hl-debugPC* *hl-debugBreakpoint*
|
||||
The color of the signs can be adjusted with these highlight groups:
|
||||
- debugPC the current position
|
||||
- debugBreakpoint a breakpoint
|
||||
@@ -1517,7 +1522,6 @@ When 'background' is "dark":
|
||||
|
||||
Shortcuts ~
|
||||
*termdebug_shortcuts*
|
||||
|
||||
You can define your own shortcuts (mappings) to control gdb, that can work in
|
||||
any window, using the TermDebugSendCommand() function. Example: >
|
||||
map ,w :call TermDebugSendCommand('where')<CR>
|
||||
@@ -1526,7 +1530,6 @@ The argument is the gdb command.
|
||||
|
||||
Popup menu ~
|
||||
*termdebug_popup*
|
||||
|
||||
By default the Termdebug plugin sets 'mousemodel' to "popup_setpos" and adds
|
||||
these entries to the popup menu:
|
||||
Set breakpoint `:Break`
|
||||
@@ -1534,17 +1537,23 @@ these entries to the popup menu:
|
||||
Evaluate `:Evaluate`
|
||||
If you don't want this then disable it with: >
|
||||
let g:termdebug_config['popup'] = 0
|
||||
or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_popup = 0
|
||||
|
||||
|
||||
Window toolbar ~
|
||||
*termdebug_winbar*
|
||||
By default the Termdebug plugin creates a window toolbar if the mouse is
|
||||
enabled (see |:Winbar|). If you don't want this then disable it with: >
|
||||
let g:termdebug_config['winbar'] = 0
|
||||
|
||||
|
||||
Vim window width ~
|
||||
*termdebug_wide*
|
||||
|
||||
To change the width of the Vim window when debugging starts and use a vertical
|
||||
split: >
|
||||
let g:termdebug_config['wide'] = 163
|
||||
Or if there is no g:termdebug_config: >
|
||||
If there is no g:termdebug_config you can use: >
|
||||
let g:termdebug_wide = 163
|
||||
|
||||
This will set 'columns' to 163 when `:Termdebug` is used. The value is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 May 16
|
||||
*testing.txt* For Vim version 9.0. Last change: 2022 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 Oct 13
|
||||
*textprop.txt* For Vim version 9.0. Last change: 2022 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,7 +147,8 @@ prop_add({lnum}, {col}, {props})
|
||||
above/below the line if {col} is zero; prepend
|
||||
and/or append spaces for padding with
|
||||
highlighting; cannot be used with "length",
|
||||
"end_lnum" and "end_col" |virtual-text|
|
||||
"end_lnum" and "end_col"
|
||||
See |virtual-text| for more information.
|
||||
*E1294*
|
||||
text_align when "text" is present and {col} is zero;
|
||||
specifies where to display the text:
|
||||
@@ -219,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)
|
||||
|
||||
@@ -539,7 +539,7 @@ the current window, try this custom `:HelpCurwin` command:
|
||||
>
|
||||
command -bar -nargs=? -complete=help HelpCurwin execute s:HelpCurwin(<q-args>)
|
||||
let s:did_open_help = v:false
|
||||
|
||||
|
||||
function s:HelpCurwin(subject) abort
|
||||
let mods = 'silent noautocmd keepalt'
|
||||
if !s:did_open_help
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.0. Last change: 2022 Oct 28
|
||||
*todo.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,22 +38,93 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
'smoothscroll':
|
||||
- CTRL-E and gj in long line with 'scrolloff' 5 not working well yet.
|
||||
- computing 'scrolloff' position row use w_skipcol
|
||||
- PR: Error in screen dump for Test_smoothscroll_one_long_line. (PR #11436)
|
||||
Upcoming larger works:
|
||||
- Make spell checking work with recent .dic/.aff files, e.g. French. #4916
|
||||
Make Vim understand the format somehow? Search for "spell" below.
|
||||
Make sure suggestions are speedy, also with composed words (German).
|
||||
- Discuss alternatives for using other grammars (treesitter, TextMate).
|
||||
- Possibly conversion to Vim syntax rules.
|
||||
- Other mechanism than group and cluster to nest syntax items, to be used
|
||||
for grammars.
|
||||
- Possibly keeping the parsed syntax tree and incremental updates.
|
||||
- tree-sitter doesn't handle incorrect syntax (while typing) properly.
|
||||
- Make clear how it relates to LSP.
|
||||
- example plugin: https://github.com/uga-rosa/dps-vsctm.vim
|
||||
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- Use Vim9 for more runtime files.
|
||||
- implement :class and :interface: See |vim9-classes| #11544
|
||||
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|
|
||||
- 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)
|
||||
@@ -161,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
|
||||
@@ -176,20 +249,72 @@ reduced?
|
||||
|
||||
Add BufDeletePost. #11041
|
||||
|
||||
Add winid arg to col() and charcol() #11466 (request #11461)
|
||||
|
||||
Can we make 'noendofline' and 'endoffile' visible? Should show by default,
|
||||
since it's an unusual situation.
|
||||
- Show 'noendofline' when it would be used for writing ('fileformat' "dos")
|
||||
with an upside down exclamation mark? NonText highlighting.
|
||||
- Show 'endoffile' when it would be used for writing ('fileformat' "dos") with
|
||||
"CTRL-Z", NonText highlighting.
|
||||
- Add 'fillchars' items to change this, default behavior like:
|
||||
noeol:¡
|
||||
eof:CTRL-Z
|
||||
|
||||
Test property disappears when using CR twice in a row. OK when some text was
|
||||
entered. (#11151)
|
||||
|
||||
Add 'keywordprg' to various ftplugin files:
|
||||
https://github.com/vim/vim/pull/5566
|
||||
|
||||
PR #11579 to add visualtext(), return Visually selected text.
|
||||
|
||||
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.
|
||||
- typed keys - Normal mode command - like what is recorded in a register and
|
||||
displayed by 'showcmd'.
|
||||
- executed command lines
|
||||
- with more verbosity: what scripts/functions/autocommands were executed
|
||||
|
||||
NFA regexp does not handle composing characters well: #10286
|
||||
[ɔ̃] matches both ɔ and ɔ̃
|
||||
\(ɔ\|ɔ̃\) matches ɔ and not ɔ̃
|
||||
|
||||
Improvement in terminal configuration mess: Request the terminfo entry from
|
||||
the terminal itself. The $TERM value then is only relevant for whether this
|
||||
feature is supported or not. Replaces the xterm mechanism to request each
|
||||
entry separately. #6609
|
||||
Multiplexers (screen, tmux) can request it to the underlying terminal, and
|
||||
pass it on with modifications.
|
||||
How to get all the text quickly (also over ssh)? Can we use a side channel?
|
||||
Is there a way to make 'autowriteall' make a clean exit when the xterm is
|
||||
closed? (Dennis Nazic says files are preserved, okt 28). Perhaps handle TERM
|
||||
like HUP?
|
||||
|
||||
Better terminal emulator support:
|
||||
> Somehow request the terminfo entry from the terminal itself. The $TERM
|
||||
value then is only relevant for whether this feature is supported or not.
|
||||
Replaces the xterm mechanism to request each entry separately. #6609
|
||||
Multiplexers (screen, tmux) can request it to the underlying terminal, and
|
||||
pass it on with modifications.
|
||||
How to get all the text quickly (also over ssh)? Can we use a side channel?
|
||||
> When xterm supports sending an Escape sequence for the Esc key, should
|
||||
have a way to request this state. That could be an XTGETTCAP entry, e.g.
|
||||
"k!". Add "esc_sends_sequence" flag.
|
||||
If we know this state, then do not pretend going out of Insert mode in
|
||||
vgetorpeek(), where kitty_protocol_state is checked.
|
||||
> If a response ends up in a shell command, one way to avoid this is by
|
||||
sending t_RV last and delay starting a shell command until the response
|
||||
has been seen.
|
||||
> Can we use the req_more_codes_from_term() mechanism with more terminals?
|
||||
Should we repeat it after executing a shell command?
|
||||
Can also add this to the 'keyprotocol' option: "mok2+tcap"
|
||||
> In the table of terminal names pointing to the list of termcap entries,
|
||||
add an optional additional one. So that "xterm-kitty" can first load
|
||||
"xterm" and then add "kitty" entries.
|
||||
|
||||
Using "A" and "o" in manually created fold (in empty buffer) does not behave
|
||||
consistenly (James McCoy, #10698)
|
||||
@@ -206,7 +331,7 @@ Resetting 't_ut' already causes this?
|
||||
|
||||
When scheme can't be found by configure there is no clear "not found" message:
|
||||
configure:5769: checking MzScheme install prefix
|
||||
configure:5781: result:
|
||||
configure:5781: result:
|
||||
|
||||
Can "CSI nr X" be used instead of outputting spaces? Is it faster? #8002
|
||||
|
||||
@@ -221,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.
|
||||
@@ -263,9 +397,6 @@ Also, z= in German on a long word can take a very long time, but CTRL-C to
|
||||
interrupt does not work. Where to add ui_breakcheck()?
|
||||
New English spell files also have very slow suggestions.
|
||||
|
||||
French spell files don't work correctly. #4916
|
||||
Make Vim understand the format somehow?
|
||||
|
||||
When 'spelloptions' is "camel" then zG doesn't work on some words.
|
||||
(Gary Johnson, 17 Oct 2022)
|
||||
|
||||
@@ -301,6 +432,9 @@ when redirecting to a local variable (function or script) storing the value
|
||||
won't work. At least give an error. Is there a way to make it work?
|
||||
#10616
|
||||
|
||||
Completion for ":runtime" should show valid values, not what's in the current
|
||||
directory. (#11447)
|
||||
|
||||
Add an option to start_timer() to return from the input loop with K_IGNORE.
|
||||
This is useful e.g. when a popup was created that disables mappings, we need
|
||||
to return from vgetc() to make this happen. #7011
|
||||
@@ -355,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)
|
||||
@@ -2590,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
|
||||
@@ -4480,8 +4611,11 @@ Autocommands:
|
||||
BufChangePre, BufChangePost and RevertBuf. (Shah)
|
||||
ViewChanged - triggered when the text scrolls and when the window size
|
||||
changes.
|
||||
WinResized - After a window has been resized
|
||||
WinClose - Just before closing a window
|
||||
QuickfixList - when any entry in the current list changes or another
|
||||
list is selected
|
||||
QuickfixPosition - when selecting another entry in the current quickfix
|
||||
list
|
||||
|
||||
- Write the file now and then ('autosave'):
|
||||
*'autosave'* *'as'* *'noautosave'* *'noas'*
|
||||
'autosave' 'as' number (default 0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2022 Sep 09
|
||||
*userfunc.txt* For Vim version 9.0. Last change: 2023 Jan 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -8,8 +8,8 @@ Defining and using functions.
|
||||
|
||||
This is introduced in section |41.7| of the user manual.
|
||||
|
||||
1. Defining a fuction |define-function|
|
||||
2. Calling a fuction |:call|
|
||||
1. Defining a function |define-function|
|
||||
2. Calling a function |:call|
|
||||
3. Cleaning up in a function |:defer|
|
||||
4. Automatically loading functions |autoload-functions|
|
||||
|
||||
@@ -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|
|
||||
@@ -405,7 +414,7 @@ function to abort. `:defer` can be used to avoid that: >
|
||||
call Handle('Outfile')
|
||||
endfunc
|
||||
|
||||
Note that deleting "Outfile" is scheduled before calling system(), since it
|
||||
Note that deleting "Outfile" is scheduled before calling `system()`, since it
|
||||
can be created even when `system()` fails.
|
||||
|
||||
The deferred functions are called in reverse order, the last one added is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_03.txt* For Vim version 9.0. Last change: 2020 Sep 03
|
||||
*usr_03.txt* For Vim version 9.0. Last change: 2022 Oct 30
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -223,7 +223,7 @@ you can see? This figure shows the three commands you can use:
|
||||
+---------------------------+
|
||||
|
||||
Hints: "H" stands for Home, "M" for Middle and "L" for Last. Alternatively,
|
||||
"H" for high, "M" for Middle and "L" for low.
|
||||
"H" for High, "M" for Middle and "L" for Low.
|
||||
|
||||
==============================================================================
|
||||
*03.6* Telling where you are
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_12.txt* For Vim version 9.0. Last change: 2021 Apr 19
|
||||
*usr_12.txt* For Vim version 9.0. Last change: 2022 Nov 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Oct 07
|
||||
*usr_41.txt* For Vim version 9.0. Last change: 2022 Dec 20
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -139,7 +139,7 @@ FOUR KINDS OF NUMBERS
|
||||
Numbers can be decimal, hexadecimal, octal and binary.
|
||||
|
||||
A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal
|
||||
31 and 0x1234 is decimal 4660.
|
||||
31 and "0x1234" is decimal 4660.
|
||||
|
||||
An octal number starts with "0o", "0O". "0o17" is decimal 15.
|
||||
|
||||
@@ -442,7 +442,7 @@ If you don't like the concatenation you can use the $"string" form, which
|
||||
accepts an expression in curly braces: >
|
||||
echo $"Name: {name}"
|
||||
|
||||
See |interp-string| for more information.
|
||||
See |interpolated-string| for more information.
|
||||
|
||||
Borrowed from the C language is the conditional expression: >
|
||||
|
||||
@@ -687,7 +687,7 @@ search() function uses its first argument as a search pattern and the second
|
||||
one as flags. The "W" flag means the search doesn't wrap around the end of
|
||||
the file.
|
||||
|
||||
Using the `call` command is optional in |Vim9| script. It is required in
|
||||
Using the `call` command is optional in |Vim9| script. It is required in
|
||||
legacy script and on the command line: >
|
||||
|
||||
call search("Date: ", "W")
|
||||
@@ -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
|
||||
@@ -803,7 +804,7 @@ List manipulation: *list-functions*
|
||||
call() call a function with List as arguments
|
||||
index() index of a value in a List or Blob
|
||||
indexof() index in a List or Blob where an expression
|
||||
evaluates to true
|
||||
evaluates to true
|
||||
max() maximum value in a List
|
||||
min() minimum value in a List
|
||||
count() count number of times a value appears in a List
|
||||
@@ -935,6 +936,7 @@ Working with text in the current buffer: *text-functions*
|
||||
|
||||
Working with text in another buffer:
|
||||
getbufline() get a list of lines from the specified buffer
|
||||
getbufoneline() get a one line from the specified buffer
|
||||
setbufline() replace a line in the specified buffer
|
||||
appendbufline() append a list of lines in the specified buffer
|
||||
deletebufline() delete lines from a specified buffer
|
||||
@@ -1030,6 +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
|
||||
|
||||
@@ -1110,6 +1113,7 @@ Interactive: *interactive-functions*
|
||||
getcharstr() get a character from the user as a string
|
||||
getcharmod() get modifiers for the last typed character
|
||||
getmousepos() get last known mouse position
|
||||
getmouseshape() get name of the current mouse shape
|
||||
echoraw() output characters as-is
|
||||
feedkeys() put characters in the typeahead queue
|
||||
input() get a line from the user
|
||||
@@ -1183,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 Oct 17
|
||||
*various.txt* For Vim version 9.0. Last change: 2022 Dec 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -298,7 +298,8 @@ g8 Print the hex values of the bytes used in the
|
||||
:silent !{cmd}
|
||||
< The screen is not redrawn then, thus you have to use
|
||||
CTRL-L or ":redraw!" if the command did display
|
||||
something.
|
||||
something. However, this depends on what the |t_ti|
|
||||
and |t_te| termcap entries are set to.
|
||||
Also see |shell-window|.
|
||||
|
||||
*:!!*
|
||||
@@ -495,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 @@
|
||||
*version5.txt* For Vim version 9.0. Last change: 2022 Apr 06
|
||||
*version5.txt* For Vim version 9.0. Last change: 2022 Nov 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -118,7 +118,7 @@ Added |added-5.8|
|
||||
Fixed |fixed-5.8|
|
||||
|
||||
==============================================================================
|
||||
INCOMPATIBLE *incompatible-5*
|
||||
INCOMPATIBLE *incompatible-5*
|
||||
|
||||
Default value for 'compatible' changed *cp-default*
|
||||
--------------------------------------
|
||||
@@ -360,7 +360,7 @@ CTRL-_ key for this |i_CTRL-_|. >
|
||||
:imap <C-B> <C-O>:set revins!<CR>
|
||||
|
||||
==============================================================================
|
||||
NEW FEATURES *new-5*
|
||||
NEW FEATURES *new-5*
|
||||
|
||||
Syntax highlighting *new-highlighting*
|
||||
-------------------
|
||||
@@ -635,7 +635,7 @@ Included support for the Farsi language (Shiran). Only when enabled at
|
||||
compile time. See |farsi|.
|
||||
|
||||
==============================================================================
|
||||
IMPROVEMENTS *improvements-5*
|
||||
IMPROVEMENTS *improvements-5*
|
||||
|
||||
Performance:
|
||||
- When 'showcmd' was set, mappings would execute much more slowly because the
|
||||
@@ -929,7 +929,7 @@ Some versions of Motif require "-lXpm". Added check for this in configure.
|
||||
Don't add "-L/usr/lib" to the link line, causes problems on a few systems.
|
||||
|
||||
==============================================================================
|
||||
COMPILE TIME CHANGES *compile-changes-5*
|
||||
COMPILE TIME CHANGES *compile-changes-5*
|
||||
|
||||
When compiling, allow a choice for minimal, normal or maximal features in an
|
||||
easy way, by changing a single line in src/feature.h.
|
||||
@@ -975,7 +975,7 @@ Don't use HPUX digraphs by default, but only when HPUX_DIGRAPHS is defined.
|
||||
|digraphs-default|
|
||||
|
||||
==============================================================================
|
||||
BUG FIXES *bug-fixes-5*
|
||||
BUG FIXES *bug-fixes-5*
|
||||
|
||||
Note: Some of these fixes may only apply to test versions which were
|
||||
created after version 4.6, but before 5.0.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version9.txt* For Vim version 9.0. Last change: 2022 Jun 28
|
||||
*version9.txt* For Vim version 9.0. Last change: 2022 Nov 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -254,12 +254,12 @@ summary.
|
||||
Many memory leaks, invalid memory accesses and crashes have been fixed.
|
||||
See the list of patches below: |bug-fixes-9|.
|
||||
|
||||
Support for Vim expression evaluation in a string. |interp-string|
|
||||
Support for Vim expression evaluation in a string. |interpolated-string|
|
||||
Support for evaluating Vim expressions in a heredoc. |:let-heredoc|
|
||||
|
||||
Support for fuzzy matching:
|
||||
- a string in a List of strings. |fuzzy-matching|
|
||||
- completion support for command line completion using 'wildoptions'
|
||||
- completion support for command line completion using 'wildoptions'.
|
||||
- for |:vimgrep|.
|
||||
|
||||
Added support for the |Haiku| OS.
|
||||
@@ -398,22 +398,22 @@ Update xdiff to version 2.33. Update libvterm to revision 789.
|
||||
|
||||
Support 'trim' for Python/Lua/Perl/Tcl/Ruby/MzScheme interface heredoc.
|
||||
|
||||
Add the |t_AU| and |t_8u| termap codes for underline and undercurl. Add the
|
||||
Add the |t_AU| and |t_8u| termcap codes for underline and undercurl. Add the
|
||||
t_fd and t_fe termcap codes for detecting focus events.
|
||||
|
||||
Support for indenting C pragmas like normal code. (|cino-P|)
|
||||
|
||||
Add support for defining the syntax fold level (|:syn-foldlevel|)
|
||||
Add support for defining the syntax fold level. (|:syn-foldlevel|)
|
||||
|
||||
Add support for using \<*xxx> in a string to prepend a modifier to a
|
||||
character. (|expr-quote|).
|
||||
character. (|expr-quote|)
|
||||
|
||||
Add support trimming characters at the beginning or end of a string using
|
||||
|trim()|.
|
||||
|
||||
Make ":verbose pwd" show the scope of the directory. |:pwd-verbose|
|
||||
|
||||
Add the "0o" notation for specifying octal numbers |scriptversion-4|
|
||||
Add the "0o" notation for specifying octal numbers. |scriptversion-4|
|
||||
|
||||
Support for changing to the previous tab-local and window-local directories
|
||||
using the "tcd -" and "lcd -" commands. (|:tcd-| and |:lcd-|)
|
||||
@@ -428,7 +428,7 @@ Add support for executing (|:@|) a register containing line continuation.
|
||||
Lua support:
|
||||
- Call Vim functions from Lua (vim.call() and vim.fn()).
|
||||
- Convert a Lua function and a closure to a Vim funcref so that it can be
|
||||
accessed in a Vimscript (|lua-funcref|).
|
||||
accessed in a Vim script (|lua-funcref|).
|
||||
- Not backwards compatible: Make Lua arrays one based.
|
||||
- Add support for using table.insert() and table.remove() functions with Vim
|
||||
lists.
|
||||
@@ -27366,7 +27366,7 @@ Files: src/evalfunc.c, src/testdir/test_vim9_builtin.vim
|
||||
Patch 8.2.4460
|
||||
Problem: Vim9: wrong error for defining dict function.
|
||||
Solution: Explicitly check for trying to define a dict function.
|
||||
(closes 9827)
|
||||
(closes #9827)
|
||||
Files: src/errors.h, src/userfunc.c, src/vim9compile.c,
|
||||
src/testdir/test_vim9_func.vim
|
||||
|
||||
@@ -28478,7 +28478,7 @@ Files: src/change.c, src/drawscreen.c, src/structs.h
|
||||
|
||||
Patch 8.2.4645
|
||||
Problem: 'shortmess' changed when session does not store options.
|
||||
Solution: Save and restore 'shortmess' if needed. (James Charti,
|
||||
Solution: Save and restore 'shortmess' if needed. (James Cherti,
|
||||
closes #10037)
|
||||
Files: src/session.c, src/testdir/test_mksession.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 11
|
||||
*vim9.txt* For Vim version 9.0. Last change: 2022 Dec 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
|
||||
@@ -1039,7 +1041,7 @@ In Vim9 script one can use the following predefined values: >
|
||||
`true` is the same as `v:true`, `false` the same as `v:false`, `null` the same
|
||||
as `v:null`.
|
||||
|
||||
While `null` has the type "special", the other "null_" types have the type
|
||||
While `null` has the type "special", the other "null_" values have the type
|
||||
indicated by their name. Quite often a null value is handled the same as an
|
||||
empty value, but not always. The values can be useful to clear a script-local
|
||||
variable, since they cannot be deleted with `:unlet`. E.g.: >
|
||||
@@ -1940,64 +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"
|
||||
- Single inheritance with `class ThisClass extends BaseClass`
|
||||
- `abstract class` (class with incomplete implementation)
|
||||
- `interface` / `endinterface` (abstract class without any implementation)
|
||||
- `class SomeClass implements SomeInterface`
|
||||
- Generics for class: `class <Tkey, Tentry>`
|
||||
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
|
||||
In |Vim9| script you can have classes, objects and interfaces like in most
|
||||
popular object-oriented programming languages. Since this is a lot of
|
||||
functionality it is located in a separate help file: |vim9class.txt|.
|
||||
|
||||
Again, much of this is from TypeScript with a slightly different syntax.
|
||||
|
||||
Some things that look like good additions:
|
||||
- Use a class as an interface (like Dart)
|
||||
- Extend a class with methods, using an import (like Dart)
|
||||
- Mixins
|
||||
- For testing: Mock mechanism
|
||||
|
||||
An important class that will be provided is "Promise". Since Vim is single
|
||||
threaded, connecting asynchronous operations is a natural way of allowing
|
||||
plugins to do their work without blocking the user. It's a uniform way to
|
||||
invoke callbacks and handle timeouts and errors.
|
||||
|
||||
Some commands have already been reserved:
|
||||
*:class*
|
||||
*:endclass*
|
||||
*:abstract*
|
||||
*:enum*
|
||||
*:endenum*
|
||||
*:interface*
|
||||
*:endinterface*
|
||||
*:static*
|
||||
*:type*
|
||||
|
||||
Some examples: >
|
||||
|
||||
abstract class Person
|
||||
static const prefix = 'xxx'
|
||||
var name: string
|
||||
|
||||
def constructor(name: string)
|
||||
this.name = name
|
||||
enddef
|
||||
|
||||
def display(): void
|
||||
echo name
|
||||
enddef
|
||||
|
||||
abstract def find(string): Person
|
||||
endclass
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -2284,18 +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
|
||||
@@ -116,7 +116,7 @@ gn Search forward for the last used search pattern, like
|
||||
E.g., "dgn" deletes the text of the next match.
|
||||
If Visual mode is active, extends the selection
|
||||
until the end of the next match.
|
||||
'wrapscan' applies
|
||||
'wrapscan' applies.
|
||||
Note: Unlike `n` the search direction does not depend
|
||||
on the previous search command.
|
||||
|
||||
@@ -152,6 +152,11 @@ gN Like |gn| but searches backward, like with `N`.
|
||||
environment variable or the -display argument). Only
|
||||
when 'mouse' option contains 'n' or 'a'.
|
||||
|
||||
<LeftMouseNM> Internal mouse code, used for clicking on the status
|
||||
<LeftReleaseNM> line to focus a window. NM stands for non-mappable.
|
||||
You cannot use these, but they might show up in some
|
||||
places.
|
||||
|
||||
If Visual mode is not active and the "v", "V" or CTRL-V is preceded with a
|
||||
count, the size of the previously highlighted area is used for a start. You
|
||||
can then move the end of the highlighted area and give an operator. The type
|
||||
@@ -510,11 +515,11 @@ mode Vim automatically switches to Visual mode, so that the same behavior as
|
||||
in Visual mode is effective. If you don't want this use |:xmap| or |:smap|.
|
||||
|
||||
One particular edge case: >
|
||||
:vnoremap <C-K> <Esc>
|
||||
:vnoremap <C-K> <Esc>
|
||||
This ends Visual mode when in Visual mode, but in Select mode it does not
|
||||
work, because Select mode is restored after executing the mapped keys. You
|
||||
need to use: >
|
||||
:snoremap <C-K> <Esc>
|
||||
:snoremap <C-K> <Esc>
|
||||
<
|
||||
Users will expect printable characters to replace the selected area.
|
||||
Therefore avoid mapping printable characters in Select mode. Or use
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 9.0. Last change: 2022 May 11
|
||||
*windows.txt* For Vim version 9.0. Last change: 2022 Nov 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -561,9 +561,9 @@ CTRL-W = Make all windows (almost) equally high and wide, but use
|
||||
Windows with 'winfixheight' set keep their height and windows
|
||||
with 'winfixwidth' set keep their width.
|
||||
To equalize only vertically (make window equally high) use
|
||||
`vertical wincmd =`
|
||||
`vertical wincmd =`.
|
||||
To equalize only horizontally (make window equally wide) use
|
||||
`horizontal wincmd =`
|
||||
`horizontal wincmd =`.
|
||||
|
||||
:res[ize] -N *:res* *:resize* *CTRL-W_-*
|
||||
CTRL-W - Decrease current window height by N (default 1).
|
||||
@@ -631,6 +631,56 @@ it).
|
||||
The minimal height and width of a window is set with 'winminheight' and
|
||||
'winminwidth'. These are hard values, a window will never become smaller.
|
||||
|
||||
|
||||
WinScrolled and WinResized autocommands ~
|
||||
*win-scrolled-resized*
|
||||
If you want to get notified of changes in window sizes, the |WinResized|
|
||||
autocommand event can be used.
|
||||
If you want to get notified of text in windows scrolling vertically or
|
||||
horizontally, the |WinScrolled| autocommand event can be used. This will also
|
||||
trigger in window size changes.
|
||||
Exception: the events will not be triggered when the text scrolls for
|
||||
'incsearch'.
|
||||
*WinResized-event*
|
||||
The |WinResized| event is triggered after updating the display, several
|
||||
windows may have changed size then. A list of the IDs of windows that changed
|
||||
since last time is provided in the v:event.windows variable, for example:
|
||||
[1003, 1006]
|
||||
*WinScrolled-event*
|
||||
The |WinScrolled| event is triggered after |WinResized|, and also if a window
|
||||
was scrolled. That can be vertically (the text at the top of the window
|
||||
changed) or horizontally (when 'wrap' is off or when the first displayed part
|
||||
of the first line changes). Note that |WinScrolled| will trigger many more
|
||||
times than |WinResized|, it may slow down editing a bit.
|
||||
|
||||
The information provided by |WinScrolled| is a dictionary for each window that
|
||||
has changes, using the window ID as the key, and a total count of the changes
|
||||
with the key "all". Example value for |v:event| (|Vim9| syntax):
|
||||
{
|
||||
all: {width: 0, height: 2, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
|
||||
1003: {width: 0, height: -1, leftcol: 0, skipcol: 0, topline: 0, topfill: 0},
|
||||
1006: {width: 0, height: 1, leftcol: 0, skipcol: 0, topline: 1, topfill: 0},
|
||||
}
|
||||
|
||||
Note that the "all" entry has the absolute values of the individual windows
|
||||
accumulated.
|
||||
|
||||
If you need more information about what changed, or you want to "debounce" the
|
||||
events (not handle every event to avoid doing too much work), you may want to
|
||||
use the `winlayout()` and `getwininfo()` functions.
|
||||
|
||||
|WinScrolled| and |WinResized| do not trigger when the first autocommand is
|
||||
added, only after the first scroll or resize. They may trigger when switching
|
||||
to another tab page.
|
||||
|
||||
The commands executed are expected to not cause window size or scroll changes.
|
||||
If this happens anyway, the event will trigger again very soon. In other
|
||||
words: Just before triggering the event, the current sizes and scroll
|
||||
positions are stored and used to decide whether there was a change.
|
||||
*E1312*
|
||||
It is not allowed to change the window layout here (split, close or move
|
||||
windows).
|
||||
|
||||
==============================================================================
|
||||
7. Argument and buffer list commands *buffer-list*
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Oct 12
|
||||
" Last Change: 2022 Dec 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
|
||||
|
||||
@@ -419,6 +421,12 @@ au BufNewFile,BufRead configure.in,configure.ac setf config
|
||||
" Cooklang
|
||||
au BufNewFile,BufRead *.cook setf cook
|
||||
|
||||
" Clinical Quality Language (CQL)
|
||||
" .cql is also mentioned as the 'XDCC Catcher queue list' file extension.
|
||||
" If support for XDCC Catcher is needed in the future, the contents of the file
|
||||
" needs to be inspected.
|
||||
au BufNewFile,BufRead *.cql setf cqlang
|
||||
|
||||
" CSV Files
|
||||
au BufNewFile,BufRead *.csv setf csv
|
||||
|
||||
@@ -600,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
|
||||
@@ -695,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
|
||||
|
||||
@@ -841,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
|
||||
|
||||
@@ -975,6 +989,8 @@ au BufNewFile,BufRead *.jsp setf jsp
|
||||
|
||||
" Java Properties resource file (note: doesn't catch font.properties.pl)
|
||||
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
|
||||
" Eclipse preference files use Java Properties syntax
|
||||
au BufNewFile,BufRead org.eclipse.*.prefs setf jproperties
|
||||
|
||||
" Jess
|
||||
au BufNewFile,BufRead *.clp setf jess
|
||||
@@ -985,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
|
||||
@@ -1191,6 +1211,9 @@ au BufNewFile,BufRead hg-editor-*.txt setf hgcommit
|
||||
" Mercurial config (looks like generic config file)
|
||||
au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
|
||||
|
||||
" Mermaid
|
||||
au BufNewFile,BufRead *.mmd,*.mmdc,*.mermaid setf mermaid
|
||||
|
||||
" Meson Build system config
|
||||
au BufNewFile,BufRead meson.build,meson_options.txt setf meson
|
||||
au BufNewFile,BufRead *.wrap setf dosini
|
||||
@@ -1334,6 +1357,9 @@ au BufNewFile,BufRead *.nse setf lua
|
||||
" NSIS
|
||||
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
|
||||
|
||||
" Oblivion Language and Oblivion Script Extender
|
||||
au BufNewFile,BufRead *.obl,*.obse,*.oblivion,*.obscript setf obse
|
||||
|
||||
" OCaml
|
||||
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
|
||||
|
||||
@@ -1477,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
|
||||
@@ -1841,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
|
||||
@@ -1875,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
|
||||
|
||||
@@ -1903,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
|
||||
|
||||
@@ -2073,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
|
||||
|
||||
@@ -2181,6 +2217,11 @@ au BufNewFile,BufRead *.va,*.vams setf verilogams
|
||||
" SystemVerilog
|
||||
au BufNewFile,BufRead *.sv,*.svh setf systemverilog
|
||||
|
||||
" VHS tape
|
||||
" .tape is also used by TapeCalc, which we do not support ATM. If TapeCalc
|
||||
" support is needed the contents of the file needs to be inspected.
|
||||
au BufNewFile,BufRead *.tape setf vhs
|
||||
|
||||
" VHDL
|
||||
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst,*.vho setf vhdl
|
||||
|
||||
@@ -2332,6 +2373,9 @@ au BufNewFile,BufRead fglrxrc setf xml
|
||||
" Web Services Description Language (WSDL)
|
||||
au BufNewFile,BufRead *.wsdl setf xml
|
||||
|
||||
" Workflow Description Language (WDL)
|
||||
au BufNewFile,BufRead *.wdl setf wdl
|
||||
|
||||
" XLIFF (XML Localisation Interchange File Format) is also XML
|
||||
au BufNewFile,BufRead *.xlf setf xml
|
||||
au BufNewFile,BufRead *.xliff setf xml
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: C#
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2021-12-07
|
||||
" Last Change: 2022-11-16
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
|
||||
@@ -25,8 +25,9 @@ let b:undo_ftplugin = 'setl com< fo<'
|
||||
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
" #if/#endif support included by default
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '\%(^\s*\)\@<=#\s*region\>:\%(^\s*\)\@<=#\s*endregion\>,'
|
||||
let b:undo_ftplugin .= ' | unlet! b:match_words'
|
||||
let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'
|
||||
endif
|
||||
|
||||
if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
" Previous Maintainer: Max Ischenko <mfi@ukr.net>
|
||||
" Contributor: Dorai Sitaram <ds26@gte.com>
|
||||
" C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
||||
" Last Change: 2022 Oct 15
|
||||
" Last Change: 2022 Nov 19
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -21,7 +21,7 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
||||
|
||||
" TODO: handle init.lua
|
||||
setlocal includeexpr=substitute(v:fname,'\\.','/','g')
|
||||
setlocal includeexpr=tr(v:fname,'.','/')
|
||||
setlocal suffixesadd=.lua
|
||||
|
||||
let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
|
||||
|
||||
49
runtime/ftplugin/mermaid.vim
Normal file
49
runtime/ftplugin/mermaid.vim
Normal file
@@ -0,0 +1,49 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Mermaid
|
||||
" Maintainer: Craig MacEachern <https://github.com/craigmac/vim-mermaid>
|
||||
" Last Change: 2022 Oct 13
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Use mermaid live editor's style
|
||||
setlocal expandtab
|
||||
setlocal shiftwidth=2
|
||||
setlocal softtabstop=-1
|
||||
setlocal tabstop=4
|
||||
|
||||
" TODO: comments, formatlist stuff, based on what?
|
||||
setlocal comments=b:#,fb:-
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions+=tcqln formatoptions-=r formatoptions-=o
|
||||
setlocal formatlistpat=^\\s*\\d\\+\\.\\s\\+\\\|^\\s*[-*+]\\s\\+\\\|^\\[^\\ze[^\\]]\\+\\]:\\&^.\\{4\\}
|
||||
|
||||
if exists('b:undo_ftplugin')
|
||||
let b:undo_ftplugin .= "|setl cms< com< fo< flp< et< ts< sts< sw<"
|
||||
else
|
||||
let b:undo_ftplugin = "setl cms< com< fo< flp< et< ts< sts< sw<"
|
||||
endif
|
||||
|
||||
if !exists("g:no_plugin_maps") && !exists("g:no_markdown_maps")
|
||||
nnoremap <silent><buffer> [[ :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
|
||||
nnoremap <silent><buffer> ]] :<C-U>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
|
||||
xnoremap <silent><buffer> [[ :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "bsW")<CR>
|
||||
xnoremap <silent><buffer> ]] :<C-U>exe "normal! gv"<Bar>call search('\%(^#\{1,5\}\s\+\S\\|^\S.*\n^[=-]\+$\)', "sW")<CR>
|
||||
let b:undo_ftplugin .= '|sil! nunmap <buffer> [[|sil! nunmap <buffer> ]]|sil! xunmap <buffer> [[|sil! xunmap <buffer> ]]'
|
||||
endif
|
||||
|
||||
" if has("folding") && get(g:, "markdown_folding", 0)
|
||||
" setlocal foldexpr=MarkdownFold()
|
||||
" setlocal foldmethod=expr
|
||||
" setlocal foldtext=MarkdownFoldText()
|
||||
" let b:undo_ftplugin .= "|setl foldexpr< foldmethod< foldtext<"
|
||||
" endif
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:set sw=2:
|
||||
70
runtime/ftplugin/obse.vim
Normal file
70
runtime/ftplugin/obse.vim
Normal file
@@ -0,0 +1,70 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Oblivion Language (obl)
|
||||
" Original Creator: Kat <katisntgood@gmail.com>
|
||||
" Maintainer: Kat <katisntgood@gmail.com>
|
||||
" Created: August 08, 2021
|
||||
" Last Change: 13 November 2022
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms<"
|
||||
|
||||
noremap <script> <buffer> <silent> [[ <nop>
|
||||
noremap <script> <buffer> <silent> ]] <nop>
|
||||
|
||||
noremap <script> <buffer> <silent> [] <nop>
|
||||
noremap <script> <buffer> <silent> ][ <nop>
|
||||
|
||||
setlocal commentstring=;%s
|
||||
setlocal comments=:;
|
||||
|
||||
function s:NextSection(type, backwards, visual)
|
||||
if a:visual
|
||||
normal! gv
|
||||
endif
|
||||
|
||||
if a:type == 1
|
||||
let pattern = '\v(\n\n^\S|%^)'
|
||||
let flags = 'e'
|
||||
elseif a:type == 2
|
||||
let pattern = '\v^\S.*'
|
||||
let flags = ''
|
||||
endif
|
||||
|
||||
if a:backwards
|
||||
let dir = '?'
|
||||
else
|
||||
let dir = '/'
|
||||
endif
|
||||
|
||||
execute 'silent normal! ' . dir . pattern . dir . flags . "\r"
|
||||
endfunction
|
||||
|
||||
noremap <script> <buffer> <silent> ]]
|
||||
\ :call <SID>NextSection(1, 0, 0)<cr>
|
||||
|
||||
noremap <script> <buffer> <silent> [[
|
||||
\ :call <SID>NextSection(1, 1, 0)<cr>
|
||||
|
||||
noremap <script> <buffer> <silent> ][
|
||||
\ :call <SID>NextSection(2, 0, 0)<cr>
|
||||
|
||||
noremap <script> <buffer> <silent> []
|
||||
\ :call <SID>NextSection(2, 1, 0)<cr>
|
||||
|
||||
vnoremap <script> <buffer> <silent> ]]
|
||||
\ :<c-u>call <SID>NextSection(1, 0, 1)<cr>
|
||||
vnoremap <script> <buffer> <silent> [[
|
||||
\ :<c-u>call <SID>NextSection(1, 1, 1)<cr>
|
||||
vnoremap <script> <buffer> <silent> ][
|
||||
\ :<c-u>call <SID>NextSection(2, 0, 1)<cr>
|
||||
vnoremap <script> <buffer> <silent> []
|
||||
\ :<c-u>call <SID>NextSection(2, 1, 1)<cr>
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -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
|
||||
|
||||
55
runtime/indent/obse.vim
Normal file
55
runtime/indent/obse.vim
Normal file
@@ -0,0 +1,55 @@
|
||||
" Vim indent file
|
||||
" Language: Oblivion Language (obl)
|
||||
" Original Creator: Kat <katisntgood@gmail.com>
|
||||
" Maintainer: Kat <katisntgood@gmail.com>
|
||||
" Created: 01 November 2021
|
||||
" Last Change: 13 November 2022
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
let b:undo_indent = 'setlocal indentkeys< indentexpr<'
|
||||
|
||||
setlocal indentexpr=GetOblIndent()
|
||||
setlocal indentkeys+==~endif,=~else,=~loop,=~end
|
||||
|
||||
if exists("*GetOblIndent")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:SKIP_LINES = '^\s*\(;.*\)'
|
||||
function! GetOblIndent()
|
||||
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
let cur_text = getline(v:lnum)
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
let prev_text = getline(lnum)
|
||||
let found_cont = 0
|
||||
let ind = indent(lnum)
|
||||
|
||||
" indent next line on start terms
|
||||
let i = match(prev_text, '\c^\s*\(\s\+\)\?\(\(if\|while\|foreach\|begin\|else\%[if]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
|
||||
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
|
||||
let ind -= shiftwidth()
|
||||
endif
|
||||
endif
|
||||
" indent current line on end/else terms
|
||||
if cur_text =~ '\c^\s*\(\s\+\)\?\(\(loop\|endif\|else\%[if]\)\>\)'
|
||||
let ind = ind - shiftwidth()
|
||||
" if we are at a begin block just go to column 0
|
||||
elseif cur_text =~ '\c^\s*\(\s\+\)\?\(\(begin\|end\)\>\)'
|
||||
let ind = 0
|
||||
endif
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
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
|
||||
@@ -1,6 +1,6 @@
|
||||
" Menu Translations: Danish
|
||||
" Maintainer: scootergrisen
|
||||
" Last Change: 2020 Apr 23
|
||||
" Last Change: 2022 Nov 17
|
||||
" Original translations
|
||||
|
||||
" Quit when menu translations have already been done.
|
||||
@@ -44,7 +44,7 @@ menut &Save<Tab>:w Gem<Tab>:w
|
||||
menut Save\ &As\.\.\.<Tab>:sav Gem\ som\.\.\.<Tab>:sav
|
||||
" -SEP2-
|
||||
menut Split\ &Diff\ with\.\.\. Opdel\ diff\ med\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Opdel\ patchet\ af\.\.\.
|
||||
menut Split\ Patched\ &By\.\.\. Opdel\ patched\ af\.\.\.
|
||||
" -SEP3-
|
||||
menut &Print Udskriv
|
||||
" -SEP4-
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" You can also use this as a start for your own set of menus.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Mar 02
|
||||
" Last Change: 2022 Nov 27
|
||||
|
||||
" Note that ":an" (short for ":anoremenu") is often used to make a menu work
|
||||
" in all modes and avoid side effects from mappings defined by the user.
|
||||
@@ -341,7 +341,7 @@ def s:TextWidth()
|
||||
# Remove leading zeros to avoid it being used as an octal number.
|
||||
# But keep a zero by itself.
|
||||
var tw = substitute(n, "^0*", "", "")
|
||||
&tw = tw == '' ? 0 : tw
|
||||
&tw = tw == '' ? 0 : str2nr(tw)
|
||||
endif
|
||||
enddef
|
||||
|
||||
@@ -474,7 +474,7 @@ if has("spell")
|
||||
an <silent> 40.335.270 &Tools.&Spelling.&Find\ More\ Languages :call <SID>SpellLang()<CR>
|
||||
|
||||
let s:undo_spelllang = ['aun &Tools.&Spelling.&Find\ More\ Languages']
|
||||
def s:SpellLang()
|
||||
def s:SpellLang(encChanged = false)
|
||||
for cmd in s:undo_spelllang
|
||||
exe "silent! " .. cmd
|
||||
endfor
|
||||
@@ -482,7 +482,8 @@ if has("spell")
|
||||
|
||||
var enc = &enc == "iso-8859-15" ? "latin1" : &enc
|
||||
|
||||
if !exists("g:menutrans_set_lang_to")
|
||||
# Reset g:menutrans_set_lang_to when called for the EncodingChanged event.
|
||||
if !exists("g:menutrans_set_lang_to") || encChanged
|
||||
g:menutrans_set_lang_to = 'Set Language to'
|
||||
endif
|
||||
|
||||
@@ -510,12 +511,12 @@ if has("spell")
|
||||
else
|
||||
echomsg "Found " .. found .. " more spell files"
|
||||
endif
|
||||
|
||||
# Need to redo this when 'encoding' is changed.
|
||||
augroup spellmenu
|
||||
au! EncodingChanged * call <SID>SpellLang()
|
||||
au! EncodingChanged * call SpellLang(true)
|
||||
augroup END
|
||||
enddef
|
||||
|
||||
endif
|
||||
|
||||
" Tools.Fold Menu
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" These commands create the option window.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2022 Oct 28
|
||||
" Last Change: 2022 Dec 16
|
||||
|
||||
" If there already is an option window, jump to that one.
|
||||
let buf = bufnr('option-window')
|
||||
@@ -583,6 +583,8 @@ call <SID>BinOptionG("xtermcodes", &xtermcodes)
|
||||
call <SID>AddOption("weirdinvert", gettext("terminal that requires extra redrawing"))
|
||||
call <SID>BinOptionG("wiv", &wiv)
|
||||
|
||||
call <SID>AddOption("keyprotocol", gettext("what keyboard protocol to use for which terminal"))
|
||||
call <SID>OptionG("kpc", &kpc)
|
||||
call <SID>AddOption("esckeys", gettext("recognize keys that start with <Esc> in Insert mode"))
|
||||
call <SID>BinOptionG("ek", &ek)
|
||||
call <SID>AddOption("scrolljump", gettext("minimal number of lines to scroll at a time"))
|
||||
@@ -741,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"))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2022 Jun 24
|
||||
" Last Change: 2022 Nov 10
|
||||
"
|
||||
" WORK IN PROGRESS - The basics works stable, more to come
|
||||
" Note: In general you need at least GDB 7.12 because this provides the
|
||||
@@ -891,7 +891,14 @@ func s:InstallCommands()
|
||||
endif
|
||||
|
||||
if has('menu') && &mouse != ''
|
||||
call s:InstallWinbar()
|
||||
" install the window toolbar by default, can be disabled in the config
|
||||
let winbar = 1
|
||||
if exists('g:termdebug_config')
|
||||
let winbar = get(g:termdebug_config, 'winbar', 1)
|
||||
endif
|
||||
if winbar
|
||||
call s:InstallWinbar()
|
||||
endif
|
||||
|
||||
let popup = 1
|
||||
if exists('g:termdebug_config')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim plugin for showing matching parens
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Apr 08
|
||||
" Last Change: 2022 Dec 01
|
||||
|
||||
" Exit quickly when:
|
||||
" - this plugin was already loaded (or disabled)
|
||||
@@ -19,8 +19,8 @@ endif
|
||||
|
||||
augroup matchparen
|
||||
" Replace all matchparen autocommands
|
||||
autocmd! CursorMoved,CursorMovedI,WinEnter,WinScrolled * call s:Highlight_Matching_Pair()
|
||||
autocmd! WinLeave * call s:Remove_Matches()
|
||||
autocmd! CursorMoved,CursorMovedI,WinEnter,BufWinEnter,WinScrolled * call s:Highlight_Matching_Pair()
|
||||
autocmd! WinLeave,BufLeave * call s:Remove_Matches()
|
||||
if exists('##TextChanged')
|
||||
autocmd! TextChanged,TextChangedI * call s:Highlight_Matching_Pair()
|
||||
endif
|
||||
|
||||
@@ -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 .'"'
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
" Maintainer: Marcin Szamotulski <profunctor@pm.me>
|
||||
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
|
||||
" File Types: .cabal
|
||||
" Last Change: 21 Nov 2020
|
||||
" Last Change: 22 Oct 2022
|
||||
" v1.6: Added support for foreign-libraries
|
||||
" Added highlighting for various fields
|
||||
" v1.5: Incorporated changes from
|
||||
" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim
|
||||
" Use `syn keyword` instead of `syn match`.
|
||||
@@ -61,13 +63,14 @@ syn keyword cabalCategory contained
|
||||
\ test-suite
|
||||
\ source-repository
|
||||
\ flag
|
||||
\ foreign-library
|
||||
\ custom-setup
|
||||
\ common
|
||||
syn match cabalCategoryTitle contained /[^{]*\ze{\?/
|
||||
syn match cabalCategoryRegion
|
||||
\ contains=cabalCategory,cabalCategoryTitle
|
||||
\ nextgroup=cabalCategory skipwhite
|
||||
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
|
||||
\ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|foreign-library\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
|
||||
syn keyword cabalTruth true false
|
||||
|
||||
" cabalStatementRegion which limits the scope of cabalStatement keywords, this
|
||||
@@ -77,6 +80,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ default-language
|
||||
\ default-extensions
|
||||
\ author
|
||||
\ autogen-includes
|
||||
\ autogen-modules
|
||||
\ asm-sources
|
||||
\ asm-options
|
||||
@@ -84,7 +88,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ bug-reports
|
||||
\ build-depends
|
||||
\ build-tools
|
||||
\ build-tools-depends
|
||||
\ build-tool-depends
|
||||
\ build-type
|
||||
\ buildable
|
||||
\ c-sources
|
||||
@@ -95,6 +99,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ cmm-sources
|
||||
\ cmm-options
|
||||
\ cpp-options
|
||||
\ cxx-options
|
||||
\ cxx-sources
|
||||
\ data-dir
|
||||
\ data-files
|
||||
@@ -111,7 +116,9 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ extra-framework-dirs
|
||||
\ extra-ghci-libraries
|
||||
\ extra-lib-dirs
|
||||
\ extra-lib-dirs-static
|
||||
\ extra-libraries
|
||||
\ extra-libraries-static
|
||||
\ extra-library-flavours
|
||||
\ extra-source-files
|
||||
\ extra-tmp-files
|
||||
@@ -133,6 +140,8 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ install-includes
|
||||
\ js-sources
|
||||
\ ld-options
|
||||
\ lib-version-info
|
||||
\ lib-version-linux
|
||||
\ license
|
||||
\ license-file
|
||||
\ location
|
||||
@@ -141,20 +150,26 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
|
||||
\ manual
|
||||
\ mixins
|
||||
\ module
|
||||
\ mod-def-file
|
||||
\ name
|
||||
\ nhc98-options
|
||||
\ options
|
||||
\ other-extensions
|
||||
\ other-language
|
||||
\ other-languages
|
||||
\ other-modules
|
||||
\ package-url
|
||||
\ pkgconfig-depends
|
||||
\ scope
|
||||
\ setup-depends
|
||||
\ signatures
|
||||
\ stability
|
||||
\ subdir
|
||||
\ synopsis
|
||||
\ reexported-modules
|
||||
\ tag
|
||||
\ tested-with
|
||||
\ test-module
|
||||
\ type
|
||||
\ version
|
||||
\ virtual-modules
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainers: Anduin Withers <awithers@anduin.com>
|
||||
" Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2022-03-01
|
||||
" Last Change: 2022-11-16
|
||||
" Filenames: *.cs
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
@@ -25,6 +25,9 @@ syn keyword csType bool byte char decimal double float int long object sbyte sho
|
||||
syn keyword csType nint nuint " contextual
|
||||
|
||||
syn keyword csStorage enum interface namespace struct
|
||||
syn match csStorage "\<record\ze\_s\+@\=\h\w*\_s*[<(:{;]"
|
||||
syn match csStorage "\%(\<\%(partial\|new\|public\|protected\|internal\|private\|abstract\|sealed\|static\|unsafe\|readonly\)\)\@9<=\_s\+record\>"
|
||||
syn match csStorage "\<record\ze\_s\+\%(class\|struct\)"
|
||||
syn match csStorage "\<delegate\>"
|
||||
syn keyword csRepeat break continue do for foreach goto return while
|
||||
syn keyword csConditional else if switch
|
||||
@@ -44,6 +47,9 @@ syn keyword csManagedModifier managed unmanaged contained
|
||||
" Modifiers
|
||||
syn match csUsingModifier "\<global\ze\_s\+using\>"
|
||||
syn keyword csAccessModifier internal private protected public
|
||||
syn keyword csModifier operator nextgroup=csCheckedModifier skipwhite skipempty
|
||||
syn keyword csCheckedModifier checked contained
|
||||
|
||||
" TODO: in new out
|
||||
syn keyword csModifier abstract const event override readonly sealed static virtual volatile
|
||||
syn match csModifier "\<\%(extern\|fixed\|unsafe\)\>"
|
||||
@@ -76,7 +82,7 @@ syn match csAccess "\<this\>"
|
||||
" Extension method parameter modifier
|
||||
syn match csModifier "\<this\ze\_s\+@\=\h"
|
||||
|
||||
syn keyword csUnspecifiedStatement as in is nameof operator out params ref sizeof stackalloc using
|
||||
syn keyword csUnspecifiedStatement as in is nameof out params ref sizeof stackalloc using
|
||||
syn keyword csUnsupportedStatement value
|
||||
syn keyword csUnspecifiedKeyword explicit implicit
|
||||
|
||||
@@ -183,7 +189,7 @@ syn match csUnicodeNumber +\\u\x\{4}+ contained contains=csUnicodeSpecifier disp
|
||||
syn match csUnicodeNumber +\\U00\x\{6}+ contained contains=csUnicodeSpecifier display
|
||||
syn match csUnicodeSpecifier +\\[uUx]+ contained display
|
||||
|
||||
syn region csString matchgroup=csQuote start=+"+ end=+"+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
syn region csString matchgroup=csQuote start=+"+ end=+"\%(u8\)\=+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError,csUnicodeNumber display
|
||||
syn match csCharacter "'\\''" contains=csSpecialChar display
|
||||
syn match csCharacter "'[^\\]'" display
|
||||
@@ -200,7 +206,7 @@ syn match csReal "\<\d\+\%(_\+\d\+\)*[fdm]\>" display
|
||||
syn case match
|
||||
syn cluster csNumber contains=csInteger,csReal
|
||||
|
||||
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
syn region csInterpolatedString matchgroup=csQuote start=+\$"+ end=+"\%(u8\)\=+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
|
||||
syn region csInterpolation matchgroup=csInterpolationDelimiter start=+{+ end=+}+ keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat
|
||||
syn match csEscapedInterpolation "{{" transparent contains=NONE display
|
||||
@@ -210,10 +216,10 @@ syn match csInterpolationFormat +:[^}]\+}+ contained contains=csInterpolationFor
|
||||
syn match csInterpolationAlignDel +,+ contained display
|
||||
syn match csInterpolationFormatDel +:+ contained display
|
||||
|
||||
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"+ skip=+""+ extend contains=csVerbatimQuote,@Spell
|
||||
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csVerbatimQuote,@Spell
|
||||
syn match csVerbatimQuote +""+ contained
|
||||
|
||||
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
|
||||
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
|
||||
|
||||
syn cluster csString contains=csString,csInterpolatedString,csVerbatimString,csInterVerbString
|
||||
|
||||
@@ -256,6 +262,7 @@ hi def link csException Exception
|
||||
hi def link csModifier StorageClass
|
||||
hi def link csAccessModifier csModifier
|
||||
hi def link csAsyncModifier csModifier
|
||||
hi def link csCheckedModifier csModifier
|
||||
hi def link csManagedModifier csModifier
|
||||
hi def link csUsingModifier csModifier
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
|
||||
" Wichert Akkerman <wakkerma@debian.org>
|
||||
" Last Change: 2022 Jul 25
|
||||
" Last Change: 2022 Oct 29
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -21,9 +21,9 @@ let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Debian sources.list
|
||||
" Maintainer: Debian Vim Maintainers
|
||||
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
|
||||
" Last Change: 2022 Jul 25
|
||||
" Last Change: 2022 Oct 29
|
||||
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
|
||||
|
||||
" Standard syntax initialization
|
||||
@@ -23,9 +23,9 @@ let s:cpo = &cpo
|
||||
set cpo-=C
|
||||
let s:supported = [
|
||||
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie',
|
||||
\ 'buster', 'bullseye', 'bookworm', 'trixie', 'forky',
|
||||
\
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
|
||||
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic', 'lunar',
|
||||
\ 'devel'
|
||||
\ ]
|
||||
let s:unsupported = [
|
||||
|
||||
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"
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" go.vim: Vim syntax file for Go.
|
||||
" Language: Go
|
||||
" Maintainer: Billie Cleek <bhcleek@gmail.com>
|
||||
" Latest Revision: 2021-09-18
|
||||
" Latest Revision: 2022-11-17
|
||||
" License: BSD-style. See LICENSE file in source repository.
|
||||
" Repository: https://github.com/fatih/vim-go
|
||||
|
||||
@@ -117,7 +117,7 @@ hi def link goLabel Label
|
||||
hi def link goRepeat Repeat
|
||||
|
||||
" Predefined types
|
||||
syn keyword goType chan map bool string error
|
||||
syn keyword goType chan map bool string error any comparable
|
||||
syn keyword goSignedInts int int8 int16 int32 int64 rune
|
||||
syn keyword goUnsignedInts byte uint uint8 uint16 uint32 uint64 uintptr
|
||||
syn keyword goFloats float32 float64
|
||||
@@ -187,6 +187,8 @@ else
|
||||
syn region goRawString start=+`+ end=+`+
|
||||
endif
|
||||
|
||||
syn match goImportString /^\%(\s\+\|import \)\(\h\w* \)\?\zs"[^"]\+"$/ contained containedin=goImport
|
||||
|
||||
if s:HighlightFormatStrings()
|
||||
" [n] notation is valid for specifying explicit argument indexes
|
||||
" 1. Match a literal % not preceded by a %.
|
||||
@@ -204,6 +206,7 @@ if s:HighlightFormatStrings()
|
||||
hi def link goFormatSpecifier goSpecialString
|
||||
endif
|
||||
|
||||
hi def link goImportString String
|
||||
hi def link goString String
|
||||
hi def link goRawString String
|
||||
|
||||
@@ -223,9 +226,9 @@ endif
|
||||
|
||||
" import
|
||||
if s:FoldEnable('import')
|
||||
syn region goImport start='import (' end=')' transparent fold contains=goImport,goString,goComment
|
||||
syn region goImport start='import (' end=')' transparent fold contains=goImport,goImportString,goComment
|
||||
else
|
||||
syn region goImport start='import (' end=')' transparent contains=goImport,goString,goComment
|
||||
syn region goImport start='import (' end=')' transparent contains=goImport,goImportString,goComment
|
||||
endif
|
||||
|
||||
" var, const
|
||||
@@ -245,14 +248,10 @@ endif
|
||||
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
||||
|
||||
" Integers
|
||||
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
||||
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_)]\|__\)\S*\|_\)\>"
|
||||
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
||||
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:;]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
||||
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
||||
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_)]\S*\|__\S*\|_\)\>"
|
||||
syn match goDecimalInt "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\>"
|
||||
syn match goHexadecimalInt "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+\>"
|
||||
syn match goOctalInt "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+\>"
|
||||
syn match goBinaryInt "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+\>"
|
||||
|
||||
hi def link goDecimalInt Integer
|
||||
hi def link goDecimalError Error
|
||||
@@ -265,19 +264,55 @@ hi def link goBinaryError Error
|
||||
hi def link Integer Number
|
||||
|
||||
" Floating point
|
||||
syn match goFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=\>"
|
||||
syn match goFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=\>"
|
||||
"float_lit = decimal_float_lit | hex_float_lit .
|
||||
"
|
||||
"decimal_float_lit = decimal_digits "." [ decimal_digits ] [ decimal_exponent ] |
|
||||
" decimal_digits decimal_exponent |
|
||||
" "." decimal_digits [ decimal_exponent ] .
|
||||
"decimal_exponent = ( "e" | "E" ) [ "+" | "-" ] decimal_digits .
|
||||
"
|
||||
"hex_float_lit = "0" ( "x" | "X" ) hex_mantissa hex_exponent .
|
||||
"hex_mantissa = [ "_" ] hex_digits "." [ hex_digits ] |
|
||||
" [ "_" ] hex_digits |
|
||||
" "." hex_digits .
|
||||
"hex_exponent = ( "p" | "P" ) [ "+" | "-" ] decimal_digits .
|
||||
" decimal floats with a decimal point
|
||||
syn match goFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\.\%(\%(\%(\d\|\d_\d\)\+\)\=\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=\>\)\="
|
||||
syn match goFloat "\s\zs-\=\.\%(\d\|\d_\d\)\+\%(\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\>\)\="
|
||||
" decimal floats without a decimal point
|
||||
syn match goFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)[Ee][-+]\=\%(\d\|\d_\d\)\+\>"
|
||||
" hexadecimal floats with a decimal point
|
||||
syn match goHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+\.\%(\%(\x\|\x_\x\)\+\)\=\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=\>"
|
||||
syn match goHexadecimalFloat "\<-\=0[xX]\.\%(\x\|\x_\x\)\+\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=\>"
|
||||
" hexadecimal floats without a decimal point
|
||||
syn match goHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+[Pp][-+]\=\%(\d\|\d_\d\)\+\>"
|
||||
|
||||
hi def link goFloat Float
|
||||
hi def link goHexadecimalFloat Float
|
||||
|
||||
" Imaginary literals
|
||||
syn match goImaginary "\<-\=\d\+i\>"
|
||||
syn match goImaginary "\<-\=\d\+[Ee][-+]\=\d\+i\>"
|
||||
syn match goImaginaryFloat "\<-\=\d\+\.\d*\%([Ee][-+]\=\d\+\)\=i\>"
|
||||
syn match goImaginaryFloat "\<-\=\.\d\+\%([Ee][-+]\=\d\+\)\=i\>"
|
||||
syn match goImaginaryDecimal "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)i\>"
|
||||
syn match goImaginaryHexadecimal "\<-\=0[xX]_\?\%(\x\|\x_\x\)\+i\>"
|
||||
syn match goImaginaryOctal "\<-\=0[oO]\?_\?\%(\o\|\o_\o\)\+i\>"
|
||||
syn match goImaginaryBinary "\<-\=0[bB]_\?\%([01]\|[01]_[01]\)\+i\>"
|
||||
|
||||
hi def link goImaginary Number
|
||||
hi def link goImaginaryFloat Float
|
||||
" imaginary decimal floats with a decimal point
|
||||
syn match goImaginaryFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)\.\%(\%(\%(\d\|\d_\d\)\+\)\=\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=\)\=i\>"
|
||||
syn match goImaginaryFloat "\s\zs-\=\.\%(\d\|\d_\d\)\+\%([Ee][-+]\=\%(\d\|\d_\d\)\+\)\=i\>"
|
||||
" imaginary decimal floats without a decimal point
|
||||
syn match goImaginaryFloat "\<-\=\%(0\|\%(\d\|\d_\d\)\+\)[Ee][-+]\=\%(\d\|\d_\d\)\+i\>"
|
||||
" imaginary hexadecimal floats with a decimal point
|
||||
syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+\.\%(\%(\x\|\x_\x\)\+\)\=\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=i\>"
|
||||
syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\.\%(\x\|\x_\x\)\+\%([Pp][-+]\=\%(\d\|\d_\d\)\+\)\=i\>"
|
||||
" imaginary hexadecimal floats without a decimal point
|
||||
syn match goImaginaryHexadecimalFloat "\<-\=0[xX]\%(_\x\|\x\)\+[Pp][-+]\=\%(\d\|\d_\d\)\+i\>"
|
||||
|
||||
hi def link goImaginaryDecimal Number
|
||||
hi def link goImaginaryHexadecimal Number
|
||||
hi def link goImaginaryOctal Number
|
||||
hi def link goImaginaryBinary Number
|
||||
hi def link goImaginaryFloat Float
|
||||
hi def link goImaginaryHexadecimalFloat Float
|
||||
|
||||
" Spaces after "[]"
|
||||
if s:HighlightArrayWhitespaceError()
|
||||
@@ -346,6 +381,8 @@ if s:HighlightOperators()
|
||||
syn match goOperator /\%(<<\|>>\|&^\)=\?/
|
||||
" match remaining two-char operators: := && || <- ++ --
|
||||
syn match goOperator /:=\|||\|<-\|++\|--/
|
||||
" match ~
|
||||
syn match goOperator /\~/
|
||||
" match ...
|
||||
|
||||
hi def link goPointerOperator goOperator
|
||||
@@ -353,13 +390,37 @@ if s:HighlightOperators()
|
||||
endif
|
||||
hi def link goOperator Operator
|
||||
|
||||
" -> type constraint opening bracket
|
||||
" |-> start non-counting group
|
||||
" || -> any word character
|
||||
" || | -> at least one, as many as possible
|
||||
" || | | -> start non-counting group
|
||||
" || | | | -> match ~
|
||||
" || | | | | -> at most once
|
||||
" || | | | | | -> allow a slice type
|
||||
" || | | | | | | -> any word character
|
||||
" || | | | | | | | -> start a non-counting group
|
||||
" || | | | | | | | | -> that matches word characters and |
|
||||
" || | | | | | | | | | -> close the non-counting group
|
||||
" || | | | | | | | | | | -> close the non-counting group
|
||||
" || | | | | | | | | | | |-> any number of matches
|
||||
" || | | | | | | | | | | || -> start a non-counting group
|
||||
" || | | | | | | | | | | || | -> a comma and whitespace
|
||||
" || | | | | | | | | | | || | | -> at most once
|
||||
" || | | | | | | | | | | || | | | -> close the non-counting group
|
||||
" || | | | | | | | | | | || | | | | -> at least one of those non-counting groups, as many as possible
|
||||
" || | | | | | -------- | | | | || | | | | | -> type constraint closing bracket
|
||||
" || | | | | || | | | | | || | | | | | |
|
||||
syn match goTypeParams /\[\%(\w\+\s\+\%(\~\?\%(\[]\)\?\w\%(\w\||\)\)*\%(,\s*\)\?\)\+\]/ nextgroup=goSimpleParams,goDeclType contained
|
||||
|
||||
" Functions;
|
||||
if s:HighlightFunctions() || s:HighlightFunctionParameters()
|
||||
syn match goDeclaration /\<func\>/ nextgroup=goReceiver,goFunction,goSimpleParams skipwhite skipnl
|
||||
syn match goReceiverDecl /(\s*\zs\%(\%(\w\+\s\+\)\?\*\?\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\)\ze\s*)/ contained contains=goReceiverVar,goReceiverType,goPointerOperator
|
||||
syn match goReceiverVar /\w\+\ze\s\+\%(\w\|\*\)/ nextgroup=goPointerOperator,goReceiverType skipwhite skipnl contained
|
||||
syn match goPointerOperator /\*/ nextgroup=goReceiverType contained skipwhite skipnl
|
||||
syn match goFunction /\w\+/ nextgroup=goSimpleParams contained skipwhite skipnl
|
||||
syn match goReceiverType /\w\+/ contained
|
||||
syn match goFunction /\w\+/ nextgroup=goSimpleParams,goTypeParams contained skipwhite skipnl
|
||||
syn match goReceiverType /\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\ze\s*)/ contained
|
||||
if s:HighlightFunctionParameters()
|
||||
syn match goSimpleParams /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType nextgroup=goFunctionReturn skipwhite skipnl
|
||||
syn match goFunctionReturn /(\%(\w\|\_s\|[*\.\[\],\{\}<>-]\)*)/ contained contains=goParamName,goType skipwhite skipnl
|
||||
@@ -369,7 +430,7 @@ if s:HighlightFunctions() || s:HighlightFunctionParameters()
|
||||
hi def link goReceiverVar goParamName
|
||||
hi def link goParamName Identifier
|
||||
endif
|
||||
syn match goReceiver /(\s*\w\+\%(\s\+\*\?\s*\w\+\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverVar skipwhite skipnl
|
||||
syn match goReceiver /(\s*\%(\w\+\s\+\)\?\*\?\s*\w\+\%(\[\%(\%(\[\]\)\?\w\+\%(,\s*\)\?\)\+\]\)\?\s*)\ze\s*\w/ contained nextgroup=goFunction contains=goReceiverDecl skipwhite skipnl
|
||||
else
|
||||
syn keyword goDeclaration func
|
||||
endif
|
||||
@@ -377,7 +438,7 @@ hi def link goFunction Function
|
||||
|
||||
" Function calls;
|
||||
if s:HighlightFunctionCalls()
|
||||
syn match goFunctionCall /\w\+\ze(/ contains=goBuiltins,goDeclaration
|
||||
syn match goFunctionCall /\w\+\ze\%(\[\%(\%(\[]\)\?\w\+\(,\s*\)\?\)\+\]\)\?(/ contains=goBuiltins,goDeclaration
|
||||
endif
|
||||
hi def link goFunctionCall Type
|
||||
|
||||
@@ -404,7 +465,7 @@ hi def link goField Identifier
|
||||
if s:HighlightTypes()
|
||||
syn match goTypeConstructor /\<\w\+{\@=/
|
||||
syn match goTypeDecl /\<type\>/ nextgroup=goTypeName skipwhite skipnl
|
||||
syn match goTypeName /\w\+/ contained nextgroup=goDeclType skipwhite skipnl
|
||||
syn match goTypeName /\w\+/ contained nextgroup=goDeclType,goTypeParams skipwhite skipnl
|
||||
syn match goDeclType /\<\%(interface\|struct\)\>/ skipwhite skipnl
|
||||
hi def link goReceiverType Type
|
||||
else
|
||||
@@ -444,7 +505,7 @@ if s:HighlightBuildConstraints()
|
||||
" The rs=s+2 option lets the \s*+build portion be part of the inner region
|
||||
" instead of the matchgroup so it will be highlighted as a goBuildKeyword.
|
||||
syn region goBuildComment matchgroup=goBuildCommentStart
|
||||
\ start="//\s*+build\s"rs=s+2 end="$"
|
||||
\ start="//\(\s*+build\s\|go:build\)"rs=s+2 end="$"
|
||||
\ contains=goBuildKeyword,goBuildDirectives
|
||||
hi def link goBuildCommentStart Comment
|
||||
hi def link goBuildDirectives Type
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Vim help file
|
||||
" Maintainer: Bram Moolenaar (Bram@vim.org)
|
||||
" Last Change: 2022 Oct 17
|
||||
" Last Change: 2022 Nov 13
|
||||
|
||||
" Quit when a (custom) syntax file was already loaded
|
||||
if exists("b:current_syntax")
|
||||
@@ -11,7 +11,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
syn match helpHeadline "^ *[-A-Z.][-A-Z0-9 .()_]*?\=\ze\(\s\+\*\|$\)"
|
||||
syn match helpHeadline "^[A-Z.][-A-Z0-9 .,()_']*?\=\ze\(\s\+\*\|$\)"
|
||||
syn match helpSectionDelim "^===.*===$"
|
||||
syn match helpSectionDelim "^---.*--$"
|
||||
if has("conceal")
|
||||
|
||||
@@ -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
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
|
||||
" Claudio Fleiner <claudio@fleiner.com>
|
||||
" Last Change: 2022 Jul 20
|
||||
" Last Change: 2022 Nov 18
|
||||
|
||||
" Please check :help html.vim for some comments and a description of the options
|
||||
|
||||
@@ -272,6 +272,16 @@ if main_syntax == "html"
|
||||
syn sync minlines=10
|
||||
endif
|
||||
|
||||
" Folding
|
||||
" Originally by Ingo Karkat and Marcus Zanona
|
||||
if get(g:, "html_syntax_folding", 0)
|
||||
syn region htmlFold start="<\z(\<\%(area\|base\|br\|col\|command\|embed\|hr\|img\|input\|keygen\|link\|meta\|param\|source\|track\|wbr\>\)\@![a-z-]\+\>\)\%(\_s*\_[^/]\?>\|\_s\_[^>]*\_[^>/]>\)" end="</\z1\_s*>" fold transparent keepend extend containedin=htmlHead,htmlH\d
|
||||
" fold comments (the real ones and the old Netscape ones)
|
||||
if exists("html_wrong_comments")
|
||||
syn region htmlComment start=+<!--+ end=+--\s*>\%(\n\s*<!--\)\@!+ contains=@Spell fold
|
||||
endif
|
||||
endif
|
||||
|
||||
" The default highlighting.
|
||||
hi def link htmlTag Function
|
||||
hi def link htmlEndTag Identifier
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user