mirror of
https://github.com/zoriya/vim.git
synced 2025-12-11 01:36:16 +00:00
Compare commits
492 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00385114db | ||
|
|
0dc5f603e9 | ||
|
|
dd07c02232 | ||
|
|
983d83ff1c | ||
|
|
dfc3db76b9 | ||
|
|
2c7080bf1c | ||
|
|
8c6951fa28 | ||
|
|
aad5f9d79a | ||
|
|
efa1923565 | ||
|
|
6502643677 | ||
|
|
f5a5116a96 | ||
|
|
038e09ee76 | ||
|
|
139348f3e8 | ||
|
|
ab65fc77c5 | ||
|
|
92bb83e41c | ||
|
|
8ab375706e | ||
|
|
6bcb877ec1 | ||
|
|
2c363a2e95 | ||
|
|
fef8064b54 | ||
|
|
fc1dafa91c | ||
|
|
8bead9a058 | ||
|
|
0dcd39bad5 | ||
|
|
4dba04256b | ||
|
|
7b6903f02c | ||
|
|
2e5910bfbb | ||
|
|
91478ae49a | ||
|
|
148be9bc1c | ||
|
|
d5e8c92816 | ||
|
|
e7bebc495d | ||
|
|
7781ebe50f | ||
|
|
3b69006973 | ||
|
|
9d20daffc2 | ||
|
|
f9547eb6ef | ||
|
|
5daa911626 | ||
|
|
0346b799fc | ||
|
|
e507ff15d5 | ||
|
|
80ad3e2569 | ||
|
|
f272ae12ac | ||
|
|
c03f5c677a | ||
|
|
853886722c | ||
|
|
3d2bb8b6f1 | ||
|
|
6a12e3342d | ||
|
|
4d8479b335 | ||
|
|
206c2a6e19 | ||
|
|
3445320839 | ||
|
|
f2b26bcf8f | ||
|
|
b63f3ca66d | ||
|
|
76ab5446d5 | ||
|
|
ebd211c8a3 | ||
|
|
f8c6a17180 | ||
|
|
59ff64079b | ||
|
|
92e5df8047 | ||
|
|
3eb6bd9c2b | ||
|
|
28976e2acc | ||
|
|
df2c2988bb | ||
|
|
97202d9516 | ||
|
|
61015162ba | ||
|
|
1d859e2421 | ||
|
|
5ed58c7b70 | ||
|
|
9a046fd08b | ||
|
|
d697ddea14 | ||
|
|
2e6cdb91e8 | ||
|
|
3e492c2d5f | ||
|
|
bed72df3e6 | ||
|
|
21829c5f2c | ||
|
|
b7e2670b6a | ||
|
|
bb4b93ed85 | ||
|
|
ce0370d9e6 | ||
|
|
98989a0014 | ||
|
|
ff0e57fe77 | ||
|
|
e0e3917554 | ||
|
|
e5ea346a07 | ||
|
|
5c829bf229 | ||
|
|
ab55f11d9b | ||
|
|
c05fe07529 | ||
|
|
4efd994829 | ||
|
|
107e9cecf7 | ||
|
|
ced68a0070 | ||
|
|
8323cab31c | ||
|
|
f002a41d12 | ||
|
|
b204990346 | ||
|
|
7cf0c114d6 | ||
|
|
40be52ba71 | ||
|
|
dfbc5fd879 | ||
|
|
7cebe8ba7d | ||
|
|
9a562c184d | ||
|
|
9ae3705b6e | ||
|
|
4bce26bb70 | ||
|
|
402115f1c2 | ||
|
|
0d3de8cb59 | ||
|
|
b3005ce191 | ||
|
|
9b6344613e | ||
|
|
57d5a01cb4 | ||
|
|
e32e516dfa | ||
|
|
f904133e1a | ||
|
|
e71996bd08 | ||
|
|
5e6a7aa2b2 | ||
|
|
ccb47a2899 | ||
|
|
b1f2857096 | ||
|
|
c5f59fab23 | ||
|
|
a0f7f73ebb | ||
|
|
77a849c4b3 | ||
|
|
99880f96cf | ||
|
|
a28639e711 | ||
|
|
e64f83cc6a | ||
|
|
09fbedc8dc | ||
|
|
98a29d00a4 | ||
|
|
82aa6e09e0 | ||
|
|
f30a14db3b | ||
|
|
585587dadb | ||
|
|
036d07144e | ||
|
|
1430ceeb2d | ||
|
|
3af15ab788 | ||
|
|
85773bf32b | ||
|
|
239f8d9326 | ||
|
|
e2edc2ed4a | ||
|
|
70250fb4d2 | ||
|
|
f898f7c68d | ||
|
|
9ebcf231bd | ||
|
|
351ead09dd | ||
|
|
7c886db915 | ||
|
|
a3b494d6af | ||
|
|
e2924328c1 | ||
|
|
bf78974ca4 | ||
|
|
648ea76e1d | ||
|
|
883cf97f10 | ||
|
|
97c6943e11 | ||
|
|
797e63b9f2 | ||
|
|
17d015b243 | ||
|
|
d44cc593ce | ||
|
|
8f81b22e86 | ||
|
|
033135eb8e | ||
|
|
2415669348 | ||
|
|
fadd55bd63 | ||
|
|
e1ee58ac78 | ||
|
|
845b72854d | ||
|
|
681fc3fa78 | ||
|
|
6601b62943 | ||
|
|
c423ad77ed | ||
|
|
9145846b6a | ||
|
|
1bb4de5302 | ||
|
|
37487e16da | ||
|
|
a47e05f04a | ||
|
|
64ed4d4398 | ||
|
|
67876de7bb | ||
|
|
b0e6b51364 | ||
|
|
7cd24227c0 | ||
|
|
a0122dcd1c | ||
|
|
cb6cbf29e9 | ||
|
|
9567efa1b4 | ||
|
|
082517570d | ||
|
|
9e1d9e3473 | ||
|
|
df4c9af7e7 | ||
|
|
82be4849ee | ||
|
|
48e11c1054 | ||
|
|
16a6f91ccb | ||
|
|
086ae06862 | ||
|
|
75ab91ff34 | ||
|
|
6f02b00bb0 | ||
|
|
31a11b942a | ||
|
|
0186e58639 | ||
|
|
ab360526ef | ||
|
|
cff40ff986 | ||
|
|
657137ca48 | ||
|
|
e7525c5520 | ||
|
|
9e0f883f89 | ||
|
|
b657198cb3 | ||
|
|
832ea89ca9 | ||
|
|
299f3036ec | ||
|
|
ece0b87c0f | ||
|
|
467b59c2eb | ||
|
|
17126b1396 | ||
|
|
43b69b39ac | ||
|
|
c37b655443 | ||
|
|
328eac2b5d | ||
|
|
ebbf11c119 | ||
|
|
32b3f82010 | ||
|
|
b23279d7a2 | ||
|
|
0acbf5ae66 | ||
|
|
ecac591cce | ||
|
|
a79925a0a8 | ||
|
|
752fc692ac | ||
|
|
d62d87d8f3 | ||
|
|
d1510ee946 | ||
|
|
cef1270dec | ||
|
|
0ea0440865 | ||
|
|
014f698cb6 | ||
|
|
d93a7fc1a9 | ||
|
|
82c38fe508 | ||
|
|
bb0956fc65 | ||
|
|
5f63938447 | ||
|
|
6797782127 | ||
|
|
2ef951dd31 | ||
|
|
e5a2dc87fd | ||
|
|
5afd081cd3 | ||
|
|
cec77d4530 | ||
|
|
fefa6c347e | ||
|
|
b0d8182fa3 | ||
|
|
31a201a04a | ||
|
|
e68b02a1c4 | ||
|
|
339c1bdbdf | ||
|
|
a11919fa44 | ||
|
|
9d19e4f4ba | ||
|
|
508b5618ec | ||
|
|
66c50c5653 | ||
|
|
9281c6cae4 | ||
|
|
a72514945b | ||
|
|
7e6a515ed1 | ||
|
|
02faa944c6 | ||
|
|
2f91e2f8da | ||
|
|
628c102d12 | ||
|
|
aa210a3aec | ||
|
|
3e0107ea16 | ||
|
|
38a434f7ba | ||
|
|
edc10b541b | ||
|
|
3862ea3f62 | ||
|
|
c368957b19 | ||
|
|
e7a73e0762 | ||
|
|
b8ba9b9197 | ||
|
|
5178b1b02f | ||
|
|
69f7050ceb | ||
|
|
a8b8af19e4 | ||
|
|
d5ea8f08f7 | ||
|
|
5efe0e5d16 | ||
|
|
a387083b2f | ||
|
|
beef4eeda5 | ||
|
|
2949cfdbe4 | ||
|
|
adc8e44645 | ||
|
|
1779ff4842 | ||
|
|
dd1f426bd6 | ||
|
|
ca2f7e7af3 | ||
|
|
6b55377303 | ||
|
|
a04d447d3a | ||
|
|
de4f95b041 | ||
|
|
2a5c61a019 | ||
|
|
2808da39f9 | ||
|
|
467676d468 | ||
|
|
4d8c96d466 | ||
|
|
285b15fce1 | ||
|
|
89015a6759 | ||
|
|
4012d26207 | ||
|
|
8242ebbdba | ||
|
|
864a28b6a6 | ||
|
|
41a834d1e3 | ||
|
|
dcc58e031d | ||
|
|
9b8d62267f | ||
|
|
ed1e4c9a70 | ||
|
|
746670604a | ||
|
|
dace9f785f | ||
|
|
3e112acc22 | ||
|
|
17793ef23a | ||
|
|
9618a25b9c | ||
|
|
e4862a0fe6 | ||
|
|
179eb567b1 | ||
|
|
39cb2dab18 | ||
|
|
4389f9cd00 | ||
|
|
e462f52db3 | ||
|
|
7e3ee7823f | ||
|
|
a629495530 | ||
|
|
07a65d26e7 | ||
|
|
cdc40c43f1 | ||
|
|
2b32700dab | ||
|
|
b0ac4ea5e1 | ||
|
|
e5730bdcea | ||
|
|
7e3682068b | ||
|
|
fc0e8f5c3e | ||
|
|
20a762987e | ||
|
|
6e2c2c50ba | ||
|
|
56ce9ea3ea | ||
|
|
f8103f274e | ||
|
|
7cfcd0c99c | ||
|
|
c754b4cc98 | ||
|
|
b2f9e0e2c5 | ||
|
|
3868f59466 | ||
|
|
9e68c32563 | ||
|
|
4aab88d919 | ||
|
|
38455a9213 | ||
|
|
0261a1aeeb | ||
|
|
c139aa8a2b | ||
|
|
b04ddb5b04 | ||
|
|
b54f1202b3 | ||
|
|
4941b5effd | ||
|
|
6dd41b1d57 | ||
|
|
65c4415276 | ||
|
|
b34f337472 | ||
|
|
16204962c7 | ||
|
|
bd318559cf | ||
|
|
27bf7af9d0 | ||
|
|
b3c8b1d254 | ||
|
|
23999d799c | ||
|
|
4072ba571b | ||
|
|
9f63a65f22 | ||
|
|
abcbb0e9ad | ||
|
|
1dcf55d4f1 | ||
|
|
89b474dd4f | ||
|
|
3bdc90b7df | ||
|
|
e5492609b3 | ||
|
|
58a52f215a | ||
|
|
077a42318c | ||
|
|
032a2d050b | ||
|
|
cd45ed03bf | ||
|
|
07761a3b96 | ||
|
|
5b3d1bb0f5 | ||
|
|
c882e4d169 | ||
|
|
1cfb9bb5c0 | ||
|
|
9a963377b4 | ||
|
|
60f63100b9 | ||
|
|
f4e2099e39 | ||
|
|
a3d10a508c | ||
|
|
6f17a3f023 | ||
|
|
4f5e397756 | ||
|
|
2e2f52a4a0 | ||
|
|
ef2dff52de | ||
|
|
6a78f32844 | ||
|
|
9aff970204 | ||
|
|
8c9d98a8af | ||
|
|
52c124d330 | ||
|
|
5082471f91 | ||
|
|
61e07b2394 | ||
|
|
f112f30a82 | ||
|
|
090728ad4d | ||
|
|
d24602f43c | ||
|
|
d88dc4d4e9 | ||
|
|
d0a1dee3f1 | ||
|
|
8f22f5c3aa | ||
|
|
17f700ac8b | ||
|
|
13656f02e4 | ||
|
|
03290b8444 | ||
|
|
1f33e0a7c4 | ||
|
|
8e7d6223f6 | ||
|
|
3beaf9cd8e | ||
|
|
6e562fcc07 | ||
|
|
9aed729fe9 | ||
|
|
b5b77378bc | ||
|
|
18f69229c5 | ||
|
|
0353f56ddb | ||
|
|
b125b535bb | ||
|
|
8dd46e72cf | ||
|
|
a79a8944da | ||
|
|
8ea05de6aa | ||
|
|
4c5bdb99ad | ||
|
|
1c0aa97827 | ||
|
|
530bed993e | ||
|
|
9987fb0b4b | ||
|
|
399ea8108c | ||
|
|
025cb1ca86 | ||
|
|
ec792290eb | ||
|
|
fffdf4754f | ||
|
|
8143a53c53 | ||
|
|
2a3cd3af45 | ||
|
|
acbae18df5 | ||
|
|
b5b9480ee9 | ||
|
|
e498429087 | ||
|
|
c530852315 | ||
|
|
93f82cbee5 | ||
|
|
57f799e6a4 | ||
|
|
2a9d5d386b | ||
|
|
3ae50c775c | ||
|
|
709664cca0 | ||
|
|
cc2335896b | ||
|
|
0ea7421ae6 | ||
|
|
100118c73a | ||
|
|
1b884a0053 | ||
|
|
70249ee831 | ||
|
|
0e12140550 | ||
|
|
8f1bf2ef78 | ||
|
|
08597875b2 | ||
|
|
d356fc65d2 | ||
|
|
9ec7026f24 | ||
|
|
a7a691cc14 | ||
|
|
730677a0da | ||
|
|
7988a6f0e9 | ||
|
|
f46bf5204c | ||
|
|
7bb4e74c38 | ||
|
|
2c78a772fd | ||
|
|
7257af477b | ||
|
|
61265b4000 | ||
|
|
1b3e0727ce | ||
|
|
ac665c24c9 | ||
|
|
023fd5d213 | ||
|
|
8e1cbb55c3 | ||
|
|
8a3da6a368 | ||
|
|
083966f671 | ||
|
|
8ff16e0183 | ||
|
|
b237ae7b83 | ||
|
|
7b130b9738 | ||
|
|
d5a986f460 | ||
|
|
41d6196e30 | ||
|
|
5402175815 | ||
|
|
8bb0f5472c | ||
|
|
67322bf74a | ||
|
|
918a424917 | ||
|
|
08cf0c0d82 | ||
|
|
56602ba153 | ||
|
|
f665e97ffa | ||
|
|
4029cabbe7 | ||
|
|
d0fe620cbb | ||
|
|
c0913d023b | ||
|
|
2d870f8d9e | ||
|
|
29d2f45c88 | ||
|
|
c5e6a7179d | ||
|
|
6cd42db9dc | ||
|
|
f6c177ab3a | ||
|
|
21e51221f2 | ||
|
|
476268c387 | ||
|
|
c0d670ce16 | ||
|
|
0684e36a7e | ||
|
|
af0df47a76 | ||
|
|
e0de171ecd | ||
|
|
7f76494aac | ||
|
|
ea87069d78 | ||
|
|
38bd8de551 | ||
|
|
1cbfc9914d | ||
|
|
a452b808b4 | ||
|
|
c478ee3d83 | ||
|
|
57cf4973a2 | ||
|
|
4324d87a44 | ||
|
|
4b8a065145 | ||
|
|
004d9b00ba | ||
|
|
da7c20c953 | ||
|
|
f0068c5154 | ||
|
|
23515b4ef7 | ||
|
|
287153c5d4 | ||
|
|
b46f57e87b | ||
|
|
f5452691ba | ||
|
|
ce2c5444e2 | ||
|
|
f8ca03bf91 | ||
|
|
ebec3e29b8 | ||
|
|
dc234caff2 | ||
|
|
4a44120e3d | ||
|
|
4d05af0a64 | ||
|
|
aeb313f355 | ||
|
|
6ee874d378 | ||
|
|
3482be6a33 | ||
|
|
fccbf068f8 | ||
|
|
ce7be3a0e6 | ||
|
|
2472a74be4 | ||
|
|
d49a35a1c3 | ||
|
|
c2ca935d26 | ||
|
|
47a2abf0bc | ||
|
|
34c54eb6cb | ||
|
|
6bed0dbc85 | ||
|
|
d653293c80 | ||
|
|
3a3b691042 | ||
|
|
36fe7b287e | ||
|
|
5dc4e2f883 | ||
|
|
448465e687 | ||
|
|
5ee0981fb5 | ||
|
|
ff94bd9e47 | ||
|
|
813196784a | ||
|
|
a09bee322e | ||
|
|
c9f8b849b6 | ||
|
|
8e6be34338 | ||
|
|
142f23544c | ||
|
|
60bc8e7244 | ||
|
|
9e40c4b15e | ||
|
|
f637bceb61 | ||
|
|
792f786aad | ||
|
|
6abdcf8285 | ||
|
|
dcbab75db3 | ||
|
|
18dc355395 | ||
|
|
4b2ce1297e | ||
|
|
5546688fb6 | ||
|
|
896ad2c33e | ||
|
|
9681f71392 | ||
|
|
e79cdb69a4 | ||
|
|
4466ad6baa | ||
|
|
2d718267f4 | ||
|
|
d91467f830 | ||
|
|
c71ee829ef | ||
|
|
95388e3179 | ||
|
|
eeece9e488 | ||
|
|
bebaa0d5c0 | ||
|
|
80d868ec25 | ||
|
|
2ea95b61f4 | ||
|
|
67d1c68f09 | ||
|
|
c6ca9f3a29 | ||
|
|
2bede173a1 | ||
|
|
ee8b787bcd | ||
|
|
79cdf80bed | ||
|
|
d92cc130fb | ||
|
|
9950280d37 | ||
|
|
8e02faf4e9 | ||
|
|
382319211a | ||
|
|
032f40afb8 | ||
|
|
17ab28daa0 | ||
|
|
88774a30c0 | ||
|
|
c77534c303 | ||
|
|
b3a01946b3 | ||
|
|
1efefda623 | ||
|
|
52bf81c2d5 | ||
|
|
0ba48e8c27 |
@@ -3,6 +3,8 @@ env:
|
||||
FEATURES: huge
|
||||
|
||||
freebsd_12_task:
|
||||
only_if: $CIRRUS_TAG == ''
|
||||
timeout_in: 20m
|
||||
freebsd_instance:
|
||||
image: freebsd-12-1-release-amd64
|
||||
install_script:
|
||||
|
||||
6
.codecov.yml
Normal file
6
.codecov.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
coverage:
|
||||
range: "80...100"
|
||||
status:
|
||||
project:
|
||||
default:
|
||||
threshold: 0.05%
|
||||
1
.coveralls.yml
Normal file
1
.coveralls.yml
Normal file
@@ -0,0 +1 @@
|
||||
service_name: github-actions
|
||||
45
.github/CODEOWNERS
vendored
45
.github/CODEOWNERS
vendored
@@ -19,6 +19,7 @@ runtime/autoload/netrwSettings.vim @cecamp
|
||||
runtime/autoload/rubycomplete.vim @segfault @dkearns
|
||||
runtime/autoload/tar.vim @cecamp
|
||||
runtime/autoload/vimball.vim @cecamp
|
||||
runtime/autoload/xmlformat.vim @chrisbra
|
||||
runtime/autoload/zip.vim @cecamp
|
||||
runtime/compiler/checkstyle.vim @dkearns
|
||||
runtime/compiler/cucumber.vim @tpope
|
||||
@@ -30,6 +31,7 @@ runtime/compiler/dartdevc.vim @dkearns
|
||||
runtime/compiler/dartdoc.vim @dkearns
|
||||
runtime/compiler/dartfmt.vim @dkearns
|
||||
runtime/compiler/eruby.vim @dkearns
|
||||
runtime/compiler/fbc.vim @dkearns
|
||||
runtime/compiler/gawk.vim @dkearns
|
||||
runtime/compiler/gjs.vim @dkearns
|
||||
runtime/compiler/haml.vim @tpope
|
||||
@@ -57,6 +59,7 @@ runtime/compiler/tsc.vim @dkearns
|
||||
runtime/compiler/typedoc.vim @dkearns
|
||||
runtime/compiler/xmllint.vim @dkearns
|
||||
runtime/compiler/xo.vim @dkearns
|
||||
runtime/compiler/zsh.vim @dkearns
|
||||
runtime/doc/pi_getscript.txt @cecamp
|
||||
runtime/doc/pi_logipat.txt @cecamp
|
||||
runtime/doc/pi_netrw.txt @cecamp
|
||||
@@ -64,31 +67,41 @@ runtime/doc/pi_tar.txt @cecamp
|
||||
runtime/doc/pi_vimball.txt @cecamp
|
||||
runtime/doc/pi_zip.txt @cecamp
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
runtime/ftplugin/cfg.vim @chrisbra
|
||||
runtime/ftplugin/css.vim @dkearns
|
||||
runtime/ftplugin/cucumber.vim @tpope
|
||||
runtime/ftplugin/eiffel.vim @dkearns
|
||||
runtime/ftplugin/eruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/freebasic.vim @dkearns
|
||||
runtime/ftplugin/git.vim @tpope
|
||||
runtime/ftplugin/gitcommit.vim @tpope
|
||||
runtime/ftplugin/gitconfig.vim @tpope
|
||||
runtime/ftplugin/gitrebase.vim @tpope
|
||||
runtime/ftplugin/gitsendemail.vim @tpope
|
||||
runtime/ftplugin/gprof.vim @dpelle
|
||||
runtime/ftplugin/haml.vim @tpope
|
||||
runtime/ftplugin/hgcommit.vim @k-takata
|
||||
runtime/ftplugin/javascript.vim @dkearns
|
||||
runtime/ftplugin/javascriptreact.vim @dkearns
|
||||
runtime/ftplugin/kconfig.vim @chrisbra
|
||||
runtime/ftplugin/liquid.vim @tpope
|
||||
runtime/ftplugin/markdown.vim @tpope
|
||||
runtime/ftplugin/matlab.vim @cecamp
|
||||
runtime/ftplugin/nroff.vim @a-vrma
|
||||
runtime/ftplugin/nsis.vim @k-takata
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
runtime/ftplugin/ruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/sass.vim @tpope
|
||||
runtime/ftplugin/scss.vim @tpope
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
runtime/ftplugin/tidy.vim @dkearns
|
||||
runtime/ftplugin/tmux.vim @ericpruitt
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
runtime/ftplugin/typescriptreact.vim @dkearns
|
||||
runtime/ftplugin/xml.vim @chrisbra
|
||||
runtime/ftplugin/zsh.vim @chrisbra
|
||||
runtime/indent/bst.vim @tpope
|
||||
runtime/indent/cucumber.vim @tpope
|
||||
runtime/indent/dosbatch.vim @k-takata
|
||||
@@ -100,21 +113,36 @@ runtime/indent/nsis.vim @k-takata
|
||||
runtime/indent/ruby.vim @AndrewRadev @dkearns
|
||||
runtime/indent/sass.vim @tpope
|
||||
runtime/indent/scss.vim @tpope
|
||||
runtime/indent/sh.vim @chrisbra
|
||||
runtime/indent/teraterm.vim @k-takata
|
||||
runtime/indent/xml.vim @chrisbra
|
||||
runtime/indent/zsh.vim @chrisbra
|
||||
runtime/keymap/tamil_tscii.vim @yegappan
|
||||
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan
|
||||
runtime/pack/dist/opt/matchit/ @chrisbra
|
||||
runtime/plugin/getscriptPlugin.vim @cecamp
|
||||
runtime/plugin/logiPat.vim @cecamp
|
||||
runtime/plugin/netrwPlugin.vim @cecamp
|
||||
runtime/plugin/tarPlugin.vim @cecamp
|
||||
runtime/plugin/vimballPlugin.vim @cecamp
|
||||
runtime/plugin/zipPlugin.vim @cecamp
|
||||
runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
runtime/syntax/asm.vim @dkearns
|
||||
runtime/syntax/asmh8300.vim @dkearns
|
||||
runtime/syntax/awk.vim @dkearns
|
||||
runtime/syntax/basic.vim @dkearns
|
||||
runtime/syntax/bst.vim @tpope
|
||||
runtime/syntax/cabal.vim @coot
|
||||
runtime/syntax/cabalconfig.vim @coot
|
||||
runtime/syntax/cabalproject.vim @coot
|
||||
runtime/syntax/cs.vim @nickspoons
|
||||
runtime/syntax/csh.vim @cecamp
|
||||
runtime/syntax/cucumber.vim @tpope
|
||||
runtime/syntax/datascript.vim @dpelle
|
||||
runtime/syntax/dcl.vim @cecamp
|
||||
runtime/syntax/doxygen.vim @frogonwheels
|
||||
runtime/syntax/dtd.vim @chrisbra
|
||||
runtime/syntax/elmfilt.vim @cecamp
|
||||
runtime/syntax/eruby.vim @tpope @dkearns
|
||||
runtime/syntax/exports.vim @cecamp
|
||||
@@ -122,8 +150,11 @@ runtime/syntax/git.vim @tpope
|
||||
runtime/syntax/gitcommit.vim @tpope
|
||||
runtime/syntax/gitconfig.vim @tpope
|
||||
runtime/syntax/gitrebase.vim @tpope
|
||||
runtime/syntax/gprof.vim @dpelle
|
||||
runtime/syntax/haml.vim @tpope
|
||||
runtime/syntax/haskell.vim @coot
|
||||
runtime/syntax/hgcommit.vim @k-takata
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
runtime/syntax/lex.vim @cecamp
|
||||
runtime/syntax/liquid.vim @tpope
|
||||
runtime/syntax/lisp.vim @cecamp
|
||||
@@ -138,12 +169,17 @@ runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/pdf.vim @tpope
|
||||
runtime/syntax/php.vim @TysonAndre
|
||||
runtime/syntax/privoxy.vim @dkearns
|
||||
runtime/syntax/prolog.vim @XVilka
|
||||
runtime/syntax/rc.vim @chrisbra
|
||||
runtime/syntax/rpcgen.vim @cecamp
|
||||
runtime/syntax/ruby.vim @dkearns
|
||||
runtime/syntax/sass.vim @tpope
|
||||
runtime/syntax/scss.vim @tpope
|
||||
runtime/syntax/sh.vim @cecamp
|
||||
runtime/syntax/sm.vim @cecamp
|
||||
runtime/syntax/spec.vim @ignatenkobrain
|
||||
runtime/syntax/sqloracle.vim @chrisbra
|
||||
runtime/syntax/sshdconfig.vim @Jakuje
|
||||
runtime/syntax/tags.vim @cecamp
|
||||
runtime/syntax/teraterm.vim @k-takata
|
||||
runtime/syntax/tex.vim @cecamp
|
||||
@@ -153,6 +189,15 @@ runtime/syntax/vim.vim @cecamp
|
||||
runtime/syntax/wget.vim @dkearns
|
||||
runtime/syntax/xbl.vim @dkearns
|
||||
runtime/syntax/xmath.vim @cecamp
|
||||
runtime/syntax/xml.vim @chrisbra
|
||||
runtime/syntax/xslt.vim @Boobies
|
||||
runtime/syntax/xxd.vim @cecamp
|
||||
runtime/syntax/yacc.vim @cecamp
|
||||
runtime/syntax/zsh.vim @chrisbra
|
||||
runtime/tutor/tutor.eo @dpelle
|
||||
runtime/tutor/tutor.eo.utf-8 @dpelle
|
||||
runtime/tutor/tutor.fr @dpelle
|
||||
runtime/tutor/tutor.fr.utf-8 @dpelle
|
||||
src/po/de.po @chrisbra
|
||||
src/po/eo.po @dpelle
|
||||
src/po/fr.po @dpelle
|
||||
|
||||
229
.github/workflows/ci-windows.yaml
vendored
229
.github/workflows/ci-windows.yaml
vendored
@@ -1,229 +0,0 @@
|
||||
name: GitHub CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
|
||||
|
||||
# Interfaces
|
||||
# Lua
|
||||
LUA_VER: 54
|
||||
LUA_VER_DOT: '5.4'
|
||||
LUA_RELEASE: 5.4.0
|
||||
LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
|
||||
LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
|
||||
LUA_DIR: D:\Lua
|
||||
# Python 2
|
||||
PYTHON_VER: 27
|
||||
PYTHON_VER_DOT: '2.7'
|
||||
# Python 3
|
||||
PYTHON3_VER: 38
|
||||
PYTHON3_VER_DOT: '3.8'
|
||||
|
||||
# Other dependencies
|
||||
# winpty
|
||||
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
|
||||
|
||||
# Escape sequences
|
||||
COL_RED: "\x1b[31m"
|
||||
COL_GREEN: "\x1b[32m"
|
||||
COL_YELLOW: "\x1b[33m"
|
||||
COL_RESET: "\x1b[m"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain: [msvc, mingw]
|
||||
arch: [x64, x86]
|
||||
features: [HUGE, NORMAL]
|
||||
include:
|
||||
- arch: x64
|
||||
vcarch: amd64
|
||||
warch: x64
|
||||
bits: 64
|
||||
msystem: MINGW64
|
||||
cygreg: registry
|
||||
pyreg: ""
|
||||
- arch: x86
|
||||
vcarch: x86
|
||||
warch: ia32
|
||||
bits: 32
|
||||
msystem: MINGW32
|
||||
cygreg: registry32
|
||||
pyreg: "-32"
|
||||
exclude:
|
||||
- toolchain: msvc
|
||||
arch: x64
|
||||
features: NORMAL
|
||||
- toolchain: mingw
|
||||
arch: x86
|
||||
features: NORMAL
|
||||
|
||||
steps:
|
||||
- name: Initalize
|
||||
id: init
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global core.autocrlf input
|
||||
python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
|
||||
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
|
||||
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
|
||||
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
if: matrix.toolchain == 'mingw'
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
release: false
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create a list of download URLs
|
||||
shell: cmd
|
||||
run: |
|
||||
type NUL > urls.txt
|
||||
echo %LUA_RELEASE%>> urls.txt
|
||||
echo %WINPTY_URL%>> urls.txt
|
||||
|
||||
- name: Cache downloaded files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: downloads
|
||||
key: ${{ runner.os }}-${{ matrix.bits }}-${{ hashFiles('urls.txt') }}
|
||||
|
||||
- name: Download dependencies
|
||||
shell: cmd
|
||||
run: |
|
||||
path C:\Program Files\7-Zip;%path%
|
||||
if not exist downloads mkdir downloads
|
||||
|
||||
echo %COL_GREEN%Download Lua%COL_RESET%
|
||||
call :downloadfile %LUA${{ matrix.bits }}_URL% downloads\lua.zip
|
||||
7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
|
||||
|
||||
echo %COL_GREEN%Download winpty%COL_RESET%
|
||||
call :downloadfile %WINPTY_URL% downloads\winpty.zip
|
||||
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
|
||||
copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty.dll src\winpty${{ matrix.bits }}.dll
|
||||
copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty-agent.exe src\
|
||||
|
||||
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
|
||||
|
||||
- name: Copy src directory to src2
|
||||
shell: cmd
|
||||
run: |
|
||||
xcopy src src2\ /E > nul
|
||||
|
||||
- name: Build (MSVC)
|
||||
if: matrix.toolchain == 'msvc'
|
||||
shell: cmd
|
||||
run: |
|
||||
call "%VCVARSALL%" ${{ matrix.vcarch }}
|
||||
cd src
|
||||
:: Filter out the progress bar from the build log
|
||||
sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
|
||||
if "${{ matrix.features }}"=="HUGE" (
|
||||
nmake -nologo -f Make_mvc2.mak ^
|
||||
FEATURES=${{ matrix.features }} ^
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
|
||||
DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
|
||||
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
|
||||
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
|
||||
) else (
|
||||
nmake -nologo -f Make_mvc2.mak ^
|
||||
FEATURES=${{ matrix.features }} ^
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes
|
||||
)
|
||||
if not exist vim${{ matrix.bits }}.dll (
|
||||
echo %COL_RED%Build failure.%COL_RESET%
|
||||
exit 1
|
||||
)
|
||||
|
||||
- name: Build (MinGW)
|
||||
if: matrix.toolchain == 'mingw'
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd src
|
||||
if [ "${{ matrix.features }}" = "HUGE" ]; then
|
||||
mingw32-make -f Make_ming.mak -j2 \
|
||||
FEATURES=${{ matrix.features }} \
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes \
|
||||
DYNAMIC_LUA=yes LUA=${LUA_DIR} \
|
||||
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
|
||||
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
|
||||
STATIC_STDCPLUS=yes
|
||||
else
|
||||
mingw32-make -f Make_ming.mak -j2 \
|
||||
FEATURES=${{ matrix.features }} \
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes \
|
||||
STATIC_STDCPLUS=yes
|
||||
fi
|
||||
|
||||
# - name: Prepare Artifact
|
||||
# shell: cmd
|
||||
# run: |
|
||||
# mkdir artifacts
|
||||
# copy src\*vim.exe artifacts
|
||||
# copy src\vim*.dll artifacts
|
||||
#
|
||||
# - name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v1
|
||||
# with:
|
||||
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
|
||||
# path: ./artifacts
|
||||
|
||||
- name: Test
|
||||
shell: cmd
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
|
||||
call "%VCVARSALL%" ${{ matrix.vcarch }}
|
||||
cd src
|
||||
echo.
|
||||
echo %COL_GREEN%vim version:%COL_RESET%
|
||||
.\vim --version || exit 1
|
||||
|
||||
echo %COL_GREEN%Start testing vim in background.%COL_RESET%
|
||||
start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
|
||||
|
||||
echo %COL_GREEN%Test gvim:%COL_RESET%
|
||||
cd testdir
|
||||
nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
|
||||
cd ..
|
||||
|
||||
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
|
||||
cd ..\src2\testdir
|
||||
:: Wait about 10 minutes.
|
||||
for /L %%i in (1,1,60) do (
|
||||
if exist done.txt goto exitloop
|
||||
timeout 10
|
||||
)
|
||||
set timeout=1
|
||||
:exitloop
|
||||
|
||||
echo %COL_GREEN%Test results of vim:%COL_RESET%
|
||||
if exist messages type messages
|
||||
nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
|
||||
if "%timeout%"=="1" (
|
||||
echo %COL_RED%Timed out.%COL_RESET%
|
||||
exit 1
|
||||
)
|
||||
526
.github/workflows/ci.yml
vendored
Normal file
526
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,526 @@
|
||||
name: GitHub CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['**']
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
TEST: test
|
||||
SRCDIR: ./src
|
||||
LEAK_CFLAGS: -DEXITFREE
|
||||
LOG_DIR: ${{ github.workspace }}/logs
|
||||
TERM: xterm
|
||||
DISPLAY: ':99'
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
features: [tiny, small, normal, huge]
|
||||
compiler: [clang, gcc]
|
||||
extra: [none]
|
||||
include:
|
||||
- features: tiny
|
||||
compiler: clang
|
||||
extra: nogui
|
||||
- features: tiny
|
||||
compiler: gcc
|
||||
extra: nogui
|
||||
- features: normal
|
||||
shadow: ./src/shadow
|
||||
- features: huge
|
||||
coverage: true
|
||||
- features: huge
|
||||
compiler: gcc
|
||||
coverage: true
|
||||
extra: testgui
|
||||
- features: huge
|
||||
compiler: clang
|
||||
extra: asan
|
||||
- features: huge
|
||||
compiler: gcc
|
||||
coverage: true
|
||||
extra: unittests
|
||||
- features: normal
|
||||
compiler: gcc
|
||||
extra: vimtags
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
autoconf \
|
||||
lcov \
|
||||
gettext \
|
||||
libcanberra-dev \
|
||||
libperl-dev \
|
||||
python-dev \
|
||||
python3-dev \
|
||||
liblua5.3-dev \
|
||||
lua5.3 \
|
||||
ruby-dev \
|
||||
tcl-dev \
|
||||
cscope \
|
||||
libgtk2.0-dev \
|
||||
desktop-file-utils \
|
||||
libtool-bin
|
||||
|
||||
- name: Install clang-11
|
||||
if: matrix.compiler == 'clang'
|
||||
run: |
|
||||
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
|
||||
. /etc/lsb-release
|
||||
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-11 main"
|
||||
sudo apt-get install -y clang-11
|
||||
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-11 100
|
||||
sudo update-alternatives --set clang /usr/bin/clang-11
|
||||
sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-11 100
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
mkdir -p "${LOG_DIR}"
|
||||
mkdir -p "${HOME}/bin"
|
||||
echo "${HOME}/bin" >> $GITHUB_PATH
|
||||
(
|
||||
echo "LINUX_VERSION=$(uname -r)"
|
||||
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
|
||||
echo "SND_DUMMY_DIR=${HOME}/snd-dummy"
|
||||
echo "TMPDIR=${{ runner.temp }}"
|
||||
|
||||
case "${{ matrix.features }}" in
|
||||
tiny|small)
|
||||
echo "TEST=testtiny"
|
||||
if ${{ contains(matrix.extra, 'nogui') }}; then
|
||||
echo "CONFOPT=--disable-gui"
|
||||
fi
|
||||
;;
|
||||
normal)
|
||||
;;
|
||||
huge)
|
||||
echo "TEST=scripttests test_libvterm"
|
||||
echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
;;
|
||||
esac
|
||||
|
||||
if ${{ matrix.coverage == true }}; then
|
||||
echo "CFLAGS=--coverage -DUSE_GCOV_FLUSH"
|
||||
echo "LDFLAGS=--coverage"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'testgui') }}; then
|
||||
echo "TEST=-C src testgui"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'unittests') }}; then
|
||||
echo "TEST=unittests"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'asan') }}; then
|
||||
echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
|
||||
echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
|
||||
echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
|
||||
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'vimtags') }}; then
|
||||
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
|
||||
fi
|
||||
) >> $GITHUB_ENV
|
||||
|
||||
- name: Set up system
|
||||
run: |
|
||||
if [[ ${CC} = clang ]]; then
|
||||
# Use llvm-cov instead of gcov when compiler is clang.
|
||||
ln -fs /usr/bin/llvm-cov ${HOME}/bin/gcov
|
||||
fi
|
||||
# Setup lua5.3 manually since its package doesn't provide alternative.
|
||||
# https://bugs.launchpad.net/ubuntu/+source/lua5.3/+bug/1707212
|
||||
if [[ ${CONFOPT} =~ luainterp ]]; then
|
||||
sudo update-alternatives --install /usr/bin/lua lua /usr/bin/lua5.3 10
|
||||
fi
|
||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||
sudo usermod -a -G audio "${USER}"
|
||||
sudo bash ci/setup-xvfb.sh
|
||||
|
||||
- name: Cache snd-dummy
|
||||
uses: actions/cache@v2
|
||||
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: Check autoconf
|
||||
if: contains(matrix.extra, 'unittests')
|
||||
run: |
|
||||
make -C src autoconf
|
||||
|
||||
- name: Set up shadow dir
|
||||
if: matrix.shadow
|
||||
run: |
|
||||
make -C src shadow
|
||||
echo "SRCDIR=${{ matrix.shadow }}" >> $GITHUB_ENV
|
||||
echo "SHADOWOPT=-C ${{ matrix.shadow }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
|
||||
# Append various warning flags to CFLAGS.
|
||||
sed -i -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
|
||||
sed -i -f ci/config.mk.${CC}.sed ${SRCDIR}/auto/config.mk
|
||||
|
||||
- name: Build
|
||||
if: (!contains(matrix.extra, 'unittests'))
|
||||
run: |
|
||||
make ${SHADOWOPT} -j${NPROC}
|
||||
|
||||
- name: Check version
|
||||
if: (!contains(matrix.extra, 'unittests'))
|
||||
run: |
|
||||
"${SRCDIR}"/vim --version
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
|
||||
- name: Test
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
do_test() { sg audio "sg $(id -gn) '$*'"; }
|
||||
do_test make ${SHADOWOPT} ${TEST}
|
||||
|
||||
- name: Coveralls
|
||||
if: matrix.coverage && success() && github.event_name != 'pull_request'
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
COVERALLS_PARALLEL: true
|
||||
TRAVIS_JOB_ID: ${{ github.run_id }}
|
||||
run: |
|
||||
sudo apt-get install -y python3-setuptools python3-wheel
|
||||
# needed for https support for coveralls building cffi only works with gcc, not with clang
|
||||
CC=gcc pip3 install --user cpp-coveralls pyopenssl ndg-httpsclient pyasn1
|
||||
~/.local/bin/coveralls -b "${SRCDIR}" -x .xs -e "${SRCDIR}"/if_perl.c -e "${SRCDIR}"/xxd -e "${SRCDIR}"/libvterm --encodings utf-8
|
||||
|
||||
- name: Codecov
|
||||
if: matrix.coverage && success()
|
||||
run: |
|
||||
cd "${SRCDIR}"
|
||||
bash <(curl -s https://codecov.io/bash) -F "${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}"
|
||||
|
||||
- name: ASan logs
|
||||
if: contains(matrix.extra, 'asan') && !cancelled()
|
||||
run: |
|
||||
for f in $(grep -lR '#[[:digit:]]* *0x[[:digit:]a-fA-F]*' "${LOG_DIR}"); do
|
||||
asan_symbolize-11 -l "$f"
|
||||
false # in order to fail a job
|
||||
done
|
||||
|
||||
coveralls:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: linux
|
||||
if: always() && github.event_name != 'pull_request'
|
||||
|
||||
steps:
|
||||
- name: Parallel finished
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
||||
run: |
|
||||
curl -k "https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN}" -d "payload[build_num]=${GITHUB_RUN_ID}&payload[status]=done"
|
||||
|
||||
macos:
|
||||
runs-on: macos-latest
|
||||
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
TEST: test
|
||||
SRCDIR: ./src
|
||||
LEAK_CFLAGS: -DEXITFREE
|
||||
TERM: xterm
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
features: [tiny, huge]
|
||||
compiler: [clang, gcc]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install packages
|
||||
env:
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
run: |
|
||||
brew install lua
|
||||
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
(
|
||||
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
|
||||
case "${{ matrix.features }}" in
|
||||
tiny)
|
||||
echo "TEST=testtiny"
|
||||
echo "CONFOPT=--disable-gui"
|
||||
;;
|
||||
huge)
|
||||
echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
|
||||
;;
|
||||
esac
|
||||
) >> $GITHUB_ENV
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
./configure --with-features=${{ matrix.features }} ${CONFOPT} --enable-fail-if-missing
|
||||
# Append various warning flags to CFLAGS.
|
||||
# BSD sed needs backup extension specified.
|
||||
sed -i.bak -f ci/config.mk.sed ${SRCDIR}/auto/config.mk
|
||||
# On macOS, the entity of gcc is clang.
|
||||
sed -i.bak -f ci/config.mk.clang.sed ${SRCDIR}/auto/config.mk
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
LC_ALL: C
|
||||
run: |
|
||||
make -j${NPROC}
|
||||
|
||||
- name: Check version
|
||||
run: |
|
||||
"${SRCDIR}"/vim --version
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
|
||||
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
|
||||
|
||||
- name: Test
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
make ${TEST}
|
||||
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
|
||||
env:
|
||||
VCVARSALL: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
|
||||
# Interfaces
|
||||
# Lua
|
||||
LUA_VER: 54
|
||||
LUA_VER_DOT: '5.4'
|
||||
LUA_RELEASE: 5.4.0
|
||||
LUA32_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win32_dllw6_lib.zip
|
||||
LUA64_URL: https://downloads.sourceforge.net/luabinaries/lua-%LUA_RELEASE%_Win64_dllw6_lib.zip
|
||||
LUA_DIR: D:\Lua
|
||||
# Python 2
|
||||
PYTHON_VER: 27
|
||||
PYTHON_VER_DOT: '2.7'
|
||||
# Python 3
|
||||
PYTHON3_VER: 38
|
||||
PYTHON3_VER_DOT: '3.8'
|
||||
# Other dependencies
|
||||
# winpty
|
||||
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
|
||||
# Escape sequences
|
||||
COL_RED: "\x1b[31m"
|
||||
COL_GREEN: "\x1b[32m"
|
||||
COL_YELLOW: "\x1b[33m"
|
||||
COL_RESET: "\x1b[m"
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
toolchain: [msvc, mingw]
|
||||
arch: [x64, x86]
|
||||
features: [HUGE, NORMAL]
|
||||
include:
|
||||
- arch: x64
|
||||
vcarch: amd64
|
||||
warch: x64
|
||||
bits: 64
|
||||
msystem: MINGW64
|
||||
cygreg: registry
|
||||
pyreg: ""
|
||||
- arch: x86
|
||||
vcarch: x86
|
||||
warch: ia32
|
||||
bits: 32
|
||||
msystem: MINGW32
|
||||
cygreg: registry32
|
||||
pyreg: "-32"
|
||||
exclude:
|
||||
- toolchain: msvc
|
||||
arch: x64
|
||||
features: NORMAL
|
||||
- toolchain: mingw
|
||||
arch: x86
|
||||
features: NORMAL
|
||||
|
||||
steps:
|
||||
- name: Initalize
|
||||
id: init
|
||||
shell: bash
|
||||
run: |
|
||||
git config --global core.autocrlf input
|
||||
python_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON_VER_DOT}/InstallPath/@")
|
||||
python3_dir=$(cat "/proc/${{ matrix.cygreg }}/HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/${PYTHON3_VER_DOT}${{ matrix.pyreg }}/InstallPath/@")
|
||||
echo "PYTHON_DIR=$python_dir" >> $GITHUB_ENV
|
||||
echo "PYTHON3_DIR=$python3_dir" >> $GITHUB_ENV
|
||||
|
||||
- uses: msys2/setup-msys2@v2
|
||||
if: matrix.toolchain == 'mingw'
|
||||
with:
|
||||
msystem: ${{ matrix.msystem }}
|
||||
release: false
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Create a list of download URLs
|
||||
shell: cmd
|
||||
run: |
|
||||
type NUL > urls.txt
|
||||
echo %LUA_RELEASE%>> urls.txt
|
||||
echo %WINPTY_URL%>> urls.txt
|
||||
|
||||
- name: Cache downloaded files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: downloads
|
||||
key: ${{ runner.os }}-${{ matrix.bits }}-${{ hashFiles('urls.txt') }}
|
||||
|
||||
- name: Download dependencies
|
||||
shell: cmd
|
||||
run: |
|
||||
path C:\Program Files\7-Zip;%path%
|
||||
if not exist downloads mkdir downloads
|
||||
|
||||
echo %COL_GREEN%Download Lua%COL_RESET%
|
||||
call :downloadfile %LUA${{ matrix.bits }}_URL% downloads\lua.zip
|
||||
7z x downloads\lua.zip -o%LUA_DIR% > nul || exit 1
|
||||
|
||||
echo %COL_GREEN%Download winpty%COL_RESET%
|
||||
call :downloadfile %WINPTY_URL% downloads\winpty.zip
|
||||
7z x -y downloads\winpty.zip -oD:\winpty > nul || exit 1
|
||||
copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty.dll src\winpty${{ matrix.bits }}.dll
|
||||
copy /Y D:\winpty\${{ matrix.warch }}\bin\winpty-agent.exe src\
|
||||
|
||||
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
|
||||
|
||||
- name: Copy src directory to src2
|
||||
shell: cmd
|
||||
run: |
|
||||
xcopy src src2\ /E > nul
|
||||
|
||||
- name: Build (MSVC)
|
||||
if: matrix.toolchain == 'msvc'
|
||||
shell: cmd
|
||||
run: |
|
||||
call "%VCVARSALL%" ${{ matrix.vcarch }}
|
||||
cd src
|
||||
:: Filter out the progress bar from the build log
|
||||
sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
|
||||
if "${{ matrix.features }}"=="HUGE" (
|
||||
nmake -nologo -f Make_mvc2.mak ^
|
||||
FEATURES=${{ matrix.features }} ^
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes ^
|
||||
DYNAMIC_LUA=yes LUA=%LUA_DIR% ^
|
||||
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
|
||||
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR%
|
||||
) else (
|
||||
nmake -nologo -f Make_mvc2.mak ^
|
||||
FEATURES=${{ matrix.features }} ^
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes
|
||||
)
|
||||
if not exist vim${{ matrix.bits }}.dll (
|
||||
echo %COL_RED%Build failure.%COL_RESET%
|
||||
exit 1
|
||||
)
|
||||
|
||||
- name: Build (MinGW)
|
||||
if: matrix.toolchain == 'mingw'
|
||||
shell: msys2 {0}
|
||||
run: |
|
||||
cd src
|
||||
if [ "${{ matrix.features }}" = "HUGE" ]; then
|
||||
mingw32-make -f Make_ming.mak -j2 \
|
||||
FEATURES=${{ matrix.features }} \
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes \
|
||||
DYNAMIC_LUA=yes LUA=${LUA_DIR} \
|
||||
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
|
||||
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
|
||||
STATIC_STDCPLUS=yes
|
||||
else
|
||||
mingw32-make -f Make_ming.mak -j2 \
|
||||
FEATURES=${{ matrix.features }} \
|
||||
GUI=yes IME=yes ICONV=yes VIMDLL=yes \
|
||||
STATIC_STDCPLUS=yes
|
||||
fi
|
||||
|
||||
#- name: Prepare Artifact
|
||||
# shell: cmd
|
||||
# run: |
|
||||
# mkdir artifacts
|
||||
# copy src\*vim.exe artifacts
|
||||
# copy src\vim*.dll artifacts
|
||||
#
|
||||
#- name: Upload Artifact
|
||||
# uses: actions/upload-artifact@v1
|
||||
# with:
|
||||
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
|
||||
# path: ./artifacts
|
||||
|
||||
- name: Test
|
||||
shell: cmd
|
||||
timeout-minutes: 20
|
||||
run: |
|
||||
PATH %LUA_DIR%;C:\msys64\${{ matrix.msystem }}\bin;%PATH%;%PYTHON3_DIR%
|
||||
call "%VCVARSALL%" ${{ matrix.vcarch }}
|
||||
cd src
|
||||
echo.
|
||||
echo %COL_GREEN%vim version:%COL_RESET%
|
||||
.\vim --version || exit 1
|
||||
|
||||
echo %COL_GREEN%Start testing vim in background.%COL_RESET%
|
||||
start cmd /c "cd ..\src2\testdir & nmake -nologo -f Make_dos.mak VIMPROG=..\..\src\vim > nul & echo done>done.txt"
|
||||
|
||||
echo %COL_GREEN%Test gvim:%COL_RESET%
|
||||
cd testdir
|
||||
nmake -nologo -f Make_dos.mak VIMPROG=..\gvim || exit 1
|
||||
cd ..
|
||||
|
||||
echo %COL_GREEN%Wait for vim tests to finish.%COL_RESET%
|
||||
cd ..\src2\testdir
|
||||
:: Wait about 10 minutes.
|
||||
for /L %%i in (1,1,60) do (
|
||||
if exist done.txt goto exitloop
|
||||
timeout 10 > NUL 2>&1
|
||||
if ERRORLEVEL 1 ping -n 11 localhost > NUL
|
||||
)
|
||||
set timeout=1
|
||||
:exitloop
|
||||
|
||||
echo %COL_GREEN%Test results of vim:%COL_RESET%
|
||||
if exist messages type messages
|
||||
nmake -nologo -f Make_dos.mak report VIMPROG=..\..\src\vim || exit 1
|
||||
if "%timeout%"=="1" (
|
||||
echo %COL_RED%Timed out.%COL_RESET%
|
||||
exit 1
|
||||
)
|
||||
9
.github/workflows/codeql-analysis.yml
vendored
9
.github/workflows/codeql-analysis.yml
vendored
@@ -31,15 +31,6 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
202
.travis.yml
202
.travis.yml
@@ -172,56 +172,56 @@ script:
|
||||
# Linux: 2 compilers on some of the environments + gcc on os390
|
||||
jobs:
|
||||
include:
|
||||
- <<: *osx
|
||||
name: tiny-nogui/clang
|
||||
compiler: clang
|
||||
env: *tiny-nogui
|
||||
- <<: *osx
|
||||
name: tiny-nogui/gcc
|
||||
compiler: gcc
|
||||
env: *tiny-nogui
|
||||
- <<: *osx
|
||||
<<: *osx-homebrew
|
||||
name: huge/clang
|
||||
compiler: clang
|
||||
env: *osx-huge
|
||||
- <<: *osx
|
||||
<<: *osx-homebrew
|
||||
name: huge/gcc
|
||||
compiler: gcc
|
||||
env: *osx-huge
|
||||
- <<: *linux
|
||||
name: tiny-nogui/clang
|
||||
compiler: clang
|
||||
env: *tiny-nogui
|
||||
- <<: *linux
|
||||
name: tiny-nogui/gcc
|
||||
compiler: gcc
|
||||
env: *tiny-nogui
|
||||
- <<: *linux
|
||||
name: tiny/clang
|
||||
compiler: clang
|
||||
env: *tiny
|
||||
- <<: *linux
|
||||
name: tiny/gcc
|
||||
compiler: gcc
|
||||
env: *tiny
|
||||
- <<: *linux
|
||||
name: small/gcc
|
||||
compiler: gcc
|
||||
env: *small
|
||||
- <<: *linux
|
||||
name: normal+shadow/clang
|
||||
compiler: clang
|
||||
env:
|
||||
- *normal
|
||||
- *shadowopt
|
||||
- <<: *linux
|
||||
name: normal+shadow/gcc
|
||||
compiler: gcc
|
||||
env:
|
||||
- *normal
|
||||
- *shadowopt
|
||||
#- <<: *osx
|
||||
# name: tiny-nogui/clang
|
||||
# compiler: clang
|
||||
# env: *tiny-nogui
|
||||
#- <<: *osx
|
||||
# name: tiny-nogui/gcc
|
||||
# compiler: gcc
|
||||
# env: *tiny-nogui
|
||||
#- <<: *osx
|
||||
# <<: *osx-homebrew
|
||||
# name: huge/clang
|
||||
# compiler: clang
|
||||
# env: *osx-huge
|
||||
#- <<: *osx
|
||||
# <<: *osx-homebrew
|
||||
# name: huge/gcc
|
||||
# compiler: gcc
|
||||
# env: *osx-huge
|
||||
#- <<: *linux
|
||||
# name: tiny-nogui/clang
|
||||
# compiler: clang
|
||||
# env: *tiny-nogui
|
||||
#- <<: *linux
|
||||
# name: tiny-nogui/gcc
|
||||
# compiler: gcc
|
||||
# env: *tiny-nogui
|
||||
#- <<: *linux
|
||||
# name: tiny/clang
|
||||
# compiler: clang
|
||||
# env: *tiny
|
||||
#- <<: *linux
|
||||
# name: tiny/gcc
|
||||
# compiler: gcc
|
||||
# env: *tiny
|
||||
#- <<: *linux
|
||||
# name: small/gcc
|
||||
# compiler: gcc
|
||||
# env: *small
|
||||
#- <<: *linux
|
||||
# name: normal+shadow/clang
|
||||
# compiler: clang
|
||||
# env:
|
||||
# - *normal
|
||||
# - *shadowopt
|
||||
#- <<: *linux
|
||||
# name: normal+shadow/gcc
|
||||
# compiler: gcc
|
||||
# env:
|
||||
# - *normal
|
||||
# - *shadowopt
|
||||
- <<: *linux
|
||||
arch: s390x
|
||||
name: huge/gcc-s390x
|
||||
@@ -234,57 +234,55 @@ jobs:
|
||||
compiler: gcc
|
||||
env: *linux-huge
|
||||
services: []
|
||||
- <<: *linux
|
||||
name: huge+coverage/clang
|
||||
compiler: clang
|
||||
env:
|
||||
- *linux-huge
|
||||
- *coverage
|
||||
# Clang cannot compile test_libvterm with "--coverage" flag.
|
||||
- TEST=scripttests
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux
|
||||
name: huge+coverage/gcc
|
||||
compiler: gcc
|
||||
env:
|
||||
- *linux-huge
|
||||
- *coverage
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux # ASAN
|
||||
name: huge+asan/clang
|
||||
compiler: clang-11
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
|
||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
packages:
|
||||
- *apt-packages
|
||||
- clang-11
|
||||
env:
|
||||
- *linux-huge
|
||||
- *asan
|
||||
after_failure: *asan_symbolize
|
||||
- <<: *linux
|
||||
name: huge-testgui+coverage/gcc
|
||||
compiler: gcc
|
||||
env:
|
||||
- *linux-huge
|
||||
- *coverage
|
||||
- TEST="-C src testgui"
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux
|
||||
name: unittests+coverage/gcc
|
||||
compiler: gcc
|
||||
env:
|
||||
- *unittests
|
||||
- *coverage
|
||||
after_success: *eval-coverage
|
||||
- <<: *linux
|
||||
name: vimtags/gcc
|
||||
compiler: gcc
|
||||
env:
|
||||
- *normal
|
||||
- TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
|
||||
#- <<: *linux
|
||||
# name: huge+coverage/clang
|
||||
# compiler: clang
|
||||
# env:
|
||||
# - *linux-huge
|
||||
# - *coverage
|
||||
# after_success: *eval-coverage
|
||||
#- <<: *linux
|
||||
# name: huge+coverage/gcc
|
||||
# compiler: gcc
|
||||
# env:
|
||||
# - *linux-huge
|
||||
# - *coverage
|
||||
# after_success: *eval-coverage
|
||||
#- <<: *linux # ASAN
|
||||
# name: huge+asan/clang
|
||||
# compiler: clang-11
|
||||
# addons:
|
||||
# apt:
|
||||
# sources:
|
||||
# - sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
|
||||
# key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||
# packages:
|
||||
# - *apt-packages
|
||||
# - clang-11
|
||||
# env:
|
||||
# - *linux-huge
|
||||
# - *asan
|
||||
# after_failure: *asan_symbolize
|
||||
#- <<: *linux
|
||||
# name: huge-testgui+coverage/gcc
|
||||
# compiler: gcc
|
||||
# env:
|
||||
# - *linux-huge
|
||||
# - *coverage
|
||||
# - TEST="-C src testgui"
|
||||
# after_success: *eval-coverage
|
||||
#- <<: *linux
|
||||
# name: unittests+coverage/gcc
|
||||
# compiler: gcc
|
||||
# env:
|
||||
# - *unittests
|
||||
# - *coverage
|
||||
# after_success: *eval-coverage
|
||||
#- <<: *linux
|
||||
# name: vimtags/gcc
|
||||
# compiler: gcc
|
||||
# env:
|
||||
# - *normal
|
||||
# - TEST="-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
|
||||
|
||||
# vim:set sts=2 sw=2 tw=0 et:
|
||||
|
||||
15
Filelist
15
Filelist
@@ -3,20 +3,23 @@
|
||||
|
||||
# source files for all source archives
|
||||
SRC_ALL = \
|
||||
.gitignore \
|
||||
.cirrus.yml \
|
||||
.coveralls.yml \
|
||||
.gitattributes \
|
||||
.github/CODEOWNERS \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.gitignore \
|
||||
.hgignore \
|
||||
.lgtm.yml \
|
||||
.travis.yml \
|
||||
.cirrus.yml \
|
||||
.github/workflows/ci-windows.yaml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/CODEOWNERS \
|
||||
appveyor.yml \
|
||||
ci/appveyor.bat \
|
||||
ci/build-snd-dummy.sh \
|
||||
ci/config.mk*.sed \
|
||||
ci/if_ver*.vim \
|
||||
ci/load-snd-dummy.sh \
|
||||
ci/config.mk*.sed \
|
||||
ci/setup-xvfb.sh \
|
||||
src/Make_all.mak \
|
||||
src/README.md \
|
||||
src/alloc.h \
|
||||
|
||||
15
README.md
15
README.md
@@ -1,15 +1,8 @@
|
||||

|
||||
[](https://www.vim.org)
|
||||
|
||||
[](https://travis-ci.org/vim/vim)
|
||||
[](https://ci.appveyor.com/project/chrisbra/vim)
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22)
|
||||
[](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)
|
||||
For translations of this README see the end.
|
||||
[](https://github.com/vim/vim/actions?query=workflow%3A%22GitHub+CI%22) [](https://travis-ci.com/github/vim/vim) [](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)
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
|
||||
## What is Vim? ##
|
||||
|
||||
@@ -159,18 +159,18 @@ thing I have been thinking of is assignments without ":let". I often
|
||||
make that mistake (after writing JavaScript especially). I think it is
|
||||
possible, if we make local variables shadow commands. That should be OK,
|
||||
if you shadow a command you want to use, just rename the variable.
|
||||
Using "let" and "const" to declare a variable, like in JavaScript and
|
||||
Using "var" and "const" to declare a variable, like in JavaScript and
|
||||
TypeScript, can work:
|
||||
|
||||
|
||||
``` vim
|
||||
def MyFunction(arg: number): number
|
||||
let local = 1
|
||||
let todo = arg
|
||||
var local = 1
|
||||
var todo = arg
|
||||
const ADD = 88
|
||||
while todo > 0
|
||||
local += ADD
|
||||
--todo
|
||||
todo -= 1
|
||||
endwhile
|
||||
return local
|
||||
enddef
|
||||
@@ -192,7 +192,7 @@ function and export it:
|
||||
``` vim
|
||||
vim9script " Vim9 script syntax used here
|
||||
|
||||
let local = 'local variable is not exported, script-local'
|
||||
var local = 'local variable is not exported, script-local'
|
||||
|
||||
export def MyFunction() " exported function
|
||||
...
|
||||
@@ -248,10 +248,10 @@ END
|
||||
return luaeval('sum')
|
||||
endfunc
|
||||
|
||||
def VimNew()
|
||||
let sum = 0
|
||||
def VimNew(): number
|
||||
var sum = 0
|
||||
for i in range(1, 2999999)
|
||||
let sum += i
|
||||
sum += i
|
||||
endfor
|
||||
return sum
|
||||
enddef
|
||||
@@ -277,7 +277,7 @@ echo 'Vim new: ' .. reltimestr(reltime(start))
|
||||
|
||||
``` vim
|
||||
def VimNew(): number
|
||||
let totallen = 0
|
||||
var totallen = 0
|
||||
for i in range(1, 100000)
|
||||
setline(i, ' ' .. getline(i))
|
||||
totallen += len(getline(i))
|
||||
|
||||
19
ci/build-snd-dummy.sh
Normal file
19
ci/build-snd-dummy.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -eu
|
||||
|
||||
LINUX_VERSION=$(uname -r | cut -d. -f1-2)
|
||||
LINUX_ARCHIVE_FILE=v${LINUX_VERSION}.tar.gz
|
||||
LINUX_SOURCE_DIR=linux-${LINUX_VERSION}
|
||||
|
||||
mkdir -p "${TMPDIR}"
|
||||
cd "${TMPDIR}"
|
||||
|
||||
wget -q "https://github.com/torvalds/linux/archive/${LINUX_ARCHIVE_FILE}"
|
||||
|
||||
tar -xf "${LINUX_ARCHIVE_FILE}" "${LINUX_SOURCE_DIR}/sound"
|
||||
cd "${LINUX_SOURCE_DIR}/sound"
|
||||
|
||||
CC=gcc make -C "/lib/modules/$(uname -r)/build" M="${PWD}" CONFIG_SOUND=m CONFIG_SND=m CONFIG_SND_PCM=m CONFIG_SND_DUMMY=m modules
|
||||
|
||||
mkdir -p "${SND_DUMMY_DIR}"
|
||||
cp soundcore.ko core/snd.ko core/snd-pcm.ko drivers/snd-dummy.ko "${SND_DUMMY_DIR}"
|
||||
17
ci/setup-xvfb.sh
Normal file
17
ci/setup-xvfb.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
apt-get install -y xvfb
|
||||
|
||||
cat <<EOT >/etc/systemd/system/xvfb.service
|
||||
[Unit]
|
||||
Description=X Virtual Frame Buffer Service
|
||||
After=network.target
|
||||
[Service]
|
||||
ExecStart=/usr/bin/Xvfb :99 -screen 0 1024x768x24
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOT
|
||||
|
||||
systemctl enable xvfb.service
|
||||
systemctl start xvfb.service
|
||||
@@ -1,13 +1,13 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Apr 08
|
||||
" Last Change: 2020 Nov 14
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! ccomplete#Complete(findstart, base)
|
||||
func ccomplete#Complete(findstart, base)
|
||||
if a:findstart
|
||||
" Locate the start of the item, including ".", "->" and "[...]".
|
||||
let line = getline('.')
|
||||
@@ -244,7 +244,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
return map(res, 's:Tagline2item(v:val, brackets)')
|
||||
endfunc
|
||||
|
||||
function! s:GetAddition(line, match, memarg, bracket)
|
||||
func s:GetAddition(line, match, memarg, bracket)
|
||||
" Guess if the item is an array.
|
||||
if a:bracket && match(a:line, a:match . '\s*\[') > 0
|
||||
return '['
|
||||
@@ -260,13 +260,13 @@ function! s:GetAddition(line, match, memarg, bracket)
|
||||
endif
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" Turn the tag info "val" into an item for completion.
|
||||
" "val" is is an item in the list returned by taglist().
|
||||
" If it is a variable we may add "." or "->". Don't do it for other types,
|
||||
" such as a typedef, by not including the info that s:GetAddition() uses.
|
||||
function! s:Tag2item(val)
|
||||
func s:Tag2item(val)
|
||||
let res = {'match': a:val['name']}
|
||||
|
||||
let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
|
||||
@@ -289,10 +289,10 @@ function! s:Tag2item(val)
|
||||
endif
|
||||
|
||||
return res
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" Use all the items in dictionary for the "info" entry.
|
||||
function! s:Dict2info(dict)
|
||||
func s:Dict2info(dict)
|
||||
let info = ''
|
||||
for k in sort(keys(a:dict))
|
||||
let info .= k . repeat(' ', 10 - len(k))
|
||||
@@ -307,7 +307,7 @@ function! s:Dict2info(dict)
|
||||
endfunc
|
||||
|
||||
" Parse a tag line and return a dictionary with items like taglist()
|
||||
function! s:ParseTagline(line)
|
||||
func s:ParseTagline(line)
|
||||
let l = split(a:line, "\t")
|
||||
let d = {}
|
||||
if len(l) >= 3
|
||||
@@ -334,12 +334,12 @@ function! s:ParseTagline(line)
|
||||
endif
|
||||
|
||||
return d
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" Turn a match item "val" into an item for completion.
|
||||
" "val['match']" is the matching item.
|
||||
" "val['tagline']" is the tagline in which the last part was found.
|
||||
function! s:Tagline2item(val, brackets)
|
||||
func s:Tagline2item(val, brackets)
|
||||
let line = a:val['tagline']
|
||||
let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
|
||||
let res = {'word': a:val['match'] . a:brackets . add }
|
||||
@@ -377,10 +377,10 @@ function! s:Tagline2item(val, brackets)
|
||||
let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))
|
||||
endif
|
||||
return res
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" Turn a command from a tag line to something that is useful in the menu
|
||||
function! s:Tagcmd2extra(cmd, name, fname)
|
||||
func s:Tagcmd2extra(cmd, name, fname)
|
||||
if a:cmd =~ '^/^'
|
||||
" The command is a search command, useful to see what it is.
|
||||
let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/')
|
||||
@@ -395,13 +395,13 @@ function! s:Tagcmd2extra(cmd, name, fname)
|
||||
let x = a:cmd . ' - ' . a:fname
|
||||
endif
|
||||
return x
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" Find composing type in "lead" and match items[0] with it.
|
||||
" Repeat this recursively for items[1], if it's there.
|
||||
" When resolving typedefs "depth" is used to avoid infinite recursion.
|
||||
" Return the list of matches.
|
||||
function! s:Nextitem(lead, items, depth, all)
|
||||
func s:Nextitem(lead, items, depth, all)
|
||||
|
||||
" Use the text up to the variable name and split it in tokens.
|
||||
let tokens = split(a:lead, '\s\+\|\<')
|
||||
@@ -485,7 +485,7 @@ function! s:Nextitem(lead, items, depth, all)
|
||||
endfor
|
||||
|
||||
return res
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
|
||||
" Search for members of structure "typename" in tags files.
|
||||
@@ -493,7 +493,7 @@ endfunction
|
||||
" Each match is a dictionary with "match" and "tagline" entries.
|
||||
" When "all" is non-zero find all, otherwise just return 1 if there is any
|
||||
" member.
|
||||
function! s:StructMembers(typename, items, all)
|
||||
func s:StructMembers(typename, items, all)
|
||||
" Todo: What about local structures?
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
if fnames == ''
|
||||
@@ -586,12 +586,12 @@ function! s:StructMembers(typename, items, all)
|
||||
|
||||
" Failed to find anything.
|
||||
return []
|
||||
endfunction
|
||||
endfunc
|
||||
|
||||
" For matching members, find matches for following items.
|
||||
" When "all" is non-zero find all, otherwise just return 1 if there is any
|
||||
" member.
|
||||
function! s:SearchMembers(matches, items, all)
|
||||
func s:SearchMembers(matches, items, all)
|
||||
let res = []
|
||||
for i in range(len(a:matches))
|
||||
let typename = ''
|
||||
|
||||
23
runtime/autoload/dist/ft.vim
vendored
23
runtime/autoload/dist/ft.vim
vendored
@@ -362,6 +362,10 @@ func dist#ft#FTinc()
|
||||
setf aspvbs
|
||||
elseif lines =~ "<?"
|
||||
setf php
|
||||
" Pascal supports // comments but they're vary rarely used for file
|
||||
" headers so assume POV-Ray
|
||||
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
else
|
||||
call dist#ft#FTasmsyntax()
|
||||
if exists("b:asmsyntax")
|
||||
@@ -408,6 +412,9 @@ func dist#ft#FTprogress_asm()
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
let s:ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
|
||||
let s:ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
|
||||
|
||||
func dist#ft#FTprogress_pascal()
|
||||
if exists("g:filetype_p")
|
||||
exe "setf " . g:filetype_p
|
||||
@@ -419,8 +426,7 @@ func dist#ft#FTprogress_pascal()
|
||||
let lnum = 1
|
||||
while lnum <= 10 && lnum < line('$')
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
|
||||
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
|
||||
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
return
|
||||
elseif line !~ '^\s*$' || line =~ '^/\*'
|
||||
@@ -433,6 +439,19 @@ func dist#ft#FTprogress_pascal()
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTpp()
|
||||
if exists("g:filetype_pp")
|
||||
exe "setf " . g:filetype_pp
|
||||
else
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
else
|
||||
setf puppet
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#FTr()
|
||||
let max = line("$") > 50 ? 50 : line("$")
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ fun! tar#Browse(tarfile)
|
||||
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
|
||||
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$'
|
||||
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzs\)$'
|
||||
if has("unix") && executable("file")
|
||||
let filekind= system("file ".shellescape(tarfile,1)) =~ "bzip2"
|
||||
else
|
||||
@@ -174,6 +174,8 @@ fun! tar#Browse(tarfile)
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif filekind =~ "XZ"
|
||||
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif filekind =~ "Zstandard"
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
endif
|
||||
@@ -190,6 +192,8 @@ fun! tar#Browse(tarfile)
|
||||
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(zst\|tzs\)$'
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
if tarfile =~ '^\s*-'
|
||||
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||
@@ -302,6 +306,9 @@ fun! tar#Read(fname,mode)
|
||||
elseif fname =~ '\.xz$' && executable("xzcat")
|
||||
let decmp= "|xzcat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.zst$' && executable("zstdcat")
|
||||
let decmp= "|zstdcat"
|
||||
let doro = 1
|
||||
else
|
||||
let decmp=""
|
||||
let doro = 0
|
||||
@@ -331,6 +338,8 @@ fun! tar#Read(fname,mode)
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif filekind =~ "XZ"
|
||||
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
elseif filekind =~ "Zstandard"
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
else
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
endif
|
||||
@@ -452,6 +461,10 @@ fun! tar#Write(fname)
|
||||
let tarfile = substitute(tarfile,'\.xz','','e')
|
||||
let compress= "xz -- ".shellescape(tarfile,0)
|
||||
" call Decho("compress<".compress.">")
|
||||
elseif tarfile =~# '\.zst'
|
||||
call system("zstd --decompress -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.zst','','e')
|
||||
let compress= "zstd -- ".shellescape(tarfile,0)
|
||||
elseif tarfile =~# '\.lzma'
|
||||
call system("lzma -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.lzma','','e')
|
||||
@@ -676,6 +689,28 @@ fun! tar#Extract()
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tzs")
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzs ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzs ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tzs ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
|
||||
elseif filereadable(tarbase.".tar.zst")
|
||||
let extractcmd= substitute(extractcmd,"-","--zstd","")
|
||||
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname).")")
|
||||
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
|
||||
if v:shell_error != 0
|
||||
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
|
||||
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!")
|
||||
else
|
||||
echo "***note*** successfully extracted ".fname
|
||||
endif
|
||||
endif
|
||||
|
||||
" restore option
|
||||
|
||||
27
runtime/compiler/fbc.vim
Normal file
27
runtime/compiler/fbc.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim compiler file
|
||||
" Compiler: FreeBASIC Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "fbc"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet makeprg=fbc
|
||||
CompilerSet errorformat=%-G%.%#Too\ many\ errors\\,\ exiting,
|
||||
\%f(%l)\ %tarning\ %n(%\\d%\\+):\ %m,
|
||||
\%E%f(%l)\ error\ %n:\ %m,
|
||||
\%-Z%p^,
|
||||
\%-C%.%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,11 +1,11 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: ocaml
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2020 Mar 28 - Improved error format (Thomas Leonard)
|
||||
" 2017 Nov 26 - Improved error format (Markus Mottl)
|
||||
" 2013 Aug 27 - Added a new OCaml error format (Markus Mottl)
|
||||
" 2013 Jun 30 - Initial version (Marc Weber)
|
||||
"
|
||||
" Marc Weber's comments:
|
||||
" Setting makeprg doesn't make sense, because there is ocamlc, ocamlopt,
|
||||
@@ -21,6 +21,7 @@
|
||||
"
|
||||
" So having it here makes people opt-in
|
||||
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
@@ -30,6 +31,7 @@ let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet errorformat =
|
||||
\%EFile\ \"%f\"\\,\ lines\ %*\\d-%l\\,\ characters\ %c-%*\\d:,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d:,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ characters\ %c-%*\\d\ %.%#,
|
||||
\%EFile\ \"%f\"\\,\ line\ %l\\,\ character\ %c:%m,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: HTML Tidy
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2016 Apr 21
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -12,8 +12,15 @@ if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes\ %:S
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" foo.html:8:1: Warning: inserting missing 'foobar' element
|
||||
" foo.html:9:2: Error: <foobar> is not recognized!
|
||||
CompilerSet errorformat=%f:%l:%c:\ %trror:%m,%f:%l:%c:\ %tarning:%m,%-G%.%#
|
||||
CompilerSet makeprg=tidy\ -quiet\ -errors\ --gnu-emacs\ yes
|
||||
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m,
|
||||
\%f:%l:%c:\ %tarning:\ %m,
|
||||
\%f:%l:%c:\ %tnfo:\ %m,
|
||||
\%f:%l:%c:\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
23
runtime/compiler/zsh.vim
Normal file
23
runtime/compiler/zsh.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Zsh
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Sep 6
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "zsh"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet makeprg=zsh\ -n\ --\ %:S
|
||||
CompilerSet errorformat=%f:\ line\ %l:\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Oct 26
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -54,7 +54,8 @@ effects. Be careful not to destroy your text.
|
||||
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
|
||||
Add {cmd} to the list of commands that Vim will
|
||||
execute automatically on {event} for a file matching
|
||||
{pat} |autocmd-patterns|.
|
||||
{pat} |autocmd-patterns|.
|
||||
Here {event} cannot be "*". *E1155*
|
||||
Note: A quote character is seen as argument to the
|
||||
:autocmd and won't start a comment.
|
||||
Vim always adds the {cmd} after existing autocommands,
|
||||
@@ -70,6 +71,11 @@ effects. Be careful not to destroy your text.
|
||||
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
|
||||
See |autocmd-buflocal|.
|
||||
|
||||
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.
|
||||
|
||||
Note: The ":autocmd" command can only be followed by another command when the
|
||||
'|' appears before {cmd}. This works: >
|
||||
:augroup mine | au! BufRead | augroup END
|
||||
@@ -301,6 +307,9 @@ Name triggered by ~
|
||||
|VimLeavePre| before exiting Vim, before writing the viminfo file
|
||||
|VimLeave| before exiting Vim, after writing the viminfo file
|
||||
|
||||
|VimSuspend| when suspending Vim
|
||||
|VimResume| when Vim is resumed after being suspended
|
||||
|
||||
Terminal
|
||||
|TerminalOpen| after a terminal buffer was created
|
||||
|TerminalWinOpen| after a terminal buffer was created in a new window
|
||||
@@ -843,6 +852,8 @@ FuncUndefined When a user function is used but it isn't
|
||||
when it's used. The pattern is matched
|
||||
against the function name. Both <amatch> and
|
||||
<afile> are set to the name of the function.
|
||||
Not triggered when compiling a |Vim9|
|
||||
function.
|
||||
NOTE: When writing Vim scripts a better
|
||||
alternative is to use an autoloaded function.
|
||||
See |autoload-functions|.
|
||||
@@ -1210,6 +1221,7 @@ VimLeave Before exiting Vim, just after writing the
|
||||
To detect an abnormal exit use |v:dying|.
|
||||
When v:dying is 2 or more this event is not
|
||||
triggered.
|
||||
To get the exit code use |v:exiting|.
|
||||
*VimLeavePre*
|
||||
VimLeavePre Before exiting Vim, just before writing the
|
||||
.viminfo file. This is executed only once,
|
||||
@@ -1220,10 +1232,22 @@ VimLeavePre Before exiting Vim, just before writing the
|
||||
< To detect an abnormal exit use |v:dying|.
|
||||
When v:dying is 2 or more this event is not
|
||||
triggered.
|
||||
To get the exit code use |v:exiting|.
|
||||
*VimResized*
|
||||
VimResized After the Vim window was resized, thus 'lines'
|
||||
and/or 'columns' changed. Not when starting
|
||||
up though.
|
||||
*VimResume*
|
||||
VimResume When the Vim instance is resumed after being
|
||||
suspended and |VimSuspend| was triggered.
|
||||
Useful for triggering |:checktime| and ensure
|
||||
the buffers content did not change while Vim
|
||||
was suspended: >
|
||||
:autocmd VimResume * checktime
|
||||
< *VimSuspend*
|
||||
VimSuspend When the Vim instance is suspended. Only when
|
||||
CTRL-Z was typed inside Vim, not when the
|
||||
SIGSTOP or SIGTSTP signal was sent to Vim.
|
||||
*WinEnter*
|
||||
WinEnter After entering another window. Not done for
|
||||
the first window, when Vim has just started.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.2. Last change: 2020 Nov 03
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1631,24 +1631,31 @@ default setting is "tcq". You can separate the option letters with commas for
|
||||
readability.
|
||||
|
||||
letter meaning when present in 'formatoptions' ~
|
||||
|
||||
*fo-t*
|
||||
t Auto-wrap text using textwidth
|
||||
*fo-c*
|
||||
c Auto-wrap comments using textwidth, inserting the current comment
|
||||
leader automatically.
|
||||
*fo-r*
|
||||
r Automatically insert the current comment leader after hitting
|
||||
<Enter> in Insert mode.
|
||||
*fo-o*
|
||||
o Automatically insert the current comment leader after hitting 'o' or
|
||||
'O' in Normal mode.
|
||||
*fo-q*
|
||||
q Allow formatting of comments with "gq".
|
||||
Note that formatting will not change blank lines or lines containing
|
||||
only the comment leader. A new paragraph starts after such a line,
|
||||
or when the comment leader changes.
|
||||
*fo-w*
|
||||
w Trailing white space indicates a paragraph continues in the next line.
|
||||
A line that ends in a non-white character ends a paragraph.
|
||||
*fo-a*
|
||||
a Automatic formatting of paragraphs. Every time text is inserted or
|
||||
deleted the paragraph will be reformatted. See |auto-format|.
|
||||
When the 'c' flag is present this only happens for recognized
|
||||
comments.
|
||||
*fo-n*
|
||||
n When formatting text, recognize numbered lists. This actually uses
|
||||
the 'formatlistpat' option, thus any kind of list can be used. The
|
||||
indent of the text after the number is used for the next line. The
|
||||
@@ -1659,6 +1666,7 @@ n When formatting text, recognize numbered lists. This actually uses
|
||||
1. the first item
|
||||
wraps
|
||||
2. the second item
|
||||
< *fo-2*
|
||||
2 When formatting text, use the indent of the second line of a paragraph
|
||||
for the rest of the paragraph, instead of the indent of the first
|
||||
line. This supports paragraphs in which the first line has a
|
||||
@@ -1668,36 +1676,46 @@ n When formatting text, recognize numbered lists. This actually uses
|
||||
second line of the same paragraph
|
||||
third line.
|
||||
< This also works inside comments, ignoring the comment leader.
|
||||
*fo-v*
|
||||
v Vi-compatible auto-wrapping in insert mode: Only break a line at a
|
||||
blank that you have entered during the current insert command. (Note:
|
||||
this is not 100% Vi compatible. Vi has some "unexpected features" or
|
||||
bugs in this area. It uses the screen column instead of the line
|
||||
column.)
|
||||
*fo-b*
|
||||
b Like 'v', but only auto-wrap if you enter a blank at or before
|
||||
the wrap margin. If the line was longer than 'textwidth' when you
|
||||
started the insert, or you do not enter a blank in the insert before
|
||||
reaching 'textwidth', Vim does not perform auto-wrapping.
|
||||
*fo-l*
|
||||
l Long lines are not broken in insert mode: When a line was longer than
|
||||
'textwidth' when the insert command started, Vim does not
|
||||
automatically format it.
|
||||
*fo-m*
|
||||
m Also break at a multibyte character above 255. This is useful for
|
||||
Asian text where every character is a word on its own.
|
||||
*fo-M*
|
||||
M When joining lines, don't insert a space before or after a multibyte
|
||||
character. Overrules the 'B' flag.
|
||||
*fo-B*
|
||||
B When joining lines, don't insert a space between two multibyte
|
||||
characters. Overruled by the 'M' flag.
|
||||
*fo-1*
|
||||
1 Don't break a line after a one-letter word. It's broken before it
|
||||
instead (if possible).
|
||||
*fo-]*
|
||||
] Respect textwidth rigorously. With this flag set, no line can be
|
||||
longer than textwidth, unless line-break-prohibition rules make this
|
||||
impossible. Mainly for CJK scripts and works only if 'encoding' is
|
||||
"utf-8".
|
||||
*fo-j*
|
||||
j Where it makes sense, remove a comment leader when joining lines. For
|
||||
example, joining:
|
||||
int i; // the index ~
|
||||
// in the list ~
|
||||
Becomes:
|
||||
int i; // the index in the list ~
|
||||
*fo-p*
|
||||
p Don't break lines at single spaces that follow periods. This is
|
||||
intended to complement 'joinspaces' and |cpo-J|, for prose with
|
||||
sentences separated by two spaces. For example, with 'textwidth' set
|
||||
@@ -1852,6 +1870,8 @@ found here: |sort()|, |uniq()|.
|
||||
When /{pattern}/ is specified and there is no [r] flag
|
||||
the text matched with {pattern} is skipped, so that
|
||||
you sort on what comes after the match.
|
||||
'ignorecase' applies to the pattern, but 'smartcase'
|
||||
is not used.
|
||||
Instead of the slash any non-letter can be used.
|
||||
For example, to sort on the second comma-separated
|
||||
field: >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2020 Sep 14
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -849,6 +849,16 @@ function |expand()|.
|
||||
file name n. See |:oldfiles| or |v:oldfiles| to get the
|
||||
number. *E809*
|
||||
{only when compiled with the |+eval| and |+viminfo| features}
|
||||
In |Vim9-script| # is used to start a comment, use %% for the alternate file
|
||||
name:
|
||||
% Is replaced with the current file name.
|
||||
%% Is replaced with the alternate file name. *:_%%* *c_%%*
|
||||
%%n (where n is a number) is replaced with *:_%%0* *:_%%n*
|
||||
the file name of buffer n. "%%0" is the same as "%%". *c_%%n*
|
||||
%%% Is replaced with all names in the argument *:_%%%* *c_%%%#*
|
||||
list concatenated, separated by spaces.
|
||||
%%<n (where n is a number > 0) is replaced with old *:_%%<* *c_%%<*
|
||||
file name n.
|
||||
|
||||
Note that these, except "#<n", give the file name as it was typed. If an
|
||||
absolute path is needed (when using the file name from a different directory),
|
||||
@@ -1086,7 +1096,7 @@ Also see |`=|.
|
||||
In the command-line window the command line can be edited just like editing
|
||||
text in any window. It is a special kind of window, because you cannot leave
|
||||
it in a normal way.
|
||||
{not available when compiled without the |+cmdline_hist| feature}
|
||||
{not available when compiled without the |+cmdwin| feature}
|
||||
|
||||
|
||||
OPEN *c_CTRL-F* *q:* *q/* *q?*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Oct 23
|
||||
*editing.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1014,7 +1014,7 @@ to write anyway add a '!' to the command.
|
||||
|
||||
*write-permissions*
|
||||
When writing a new file the permissions are read-write. For unix the mask is
|
||||
0666 with additionally umask applied. When writing a file that was read Vim
|
||||
0o666 with additionally umask applied. When writing a file that was read Vim
|
||||
will preserve the permissions, but clear the s-bit.
|
||||
|
||||
*write-readonly*
|
||||
@@ -1033,7 +1033,7 @@ original file fails, there will be an error message telling you that you
|
||||
lost the original file.
|
||||
|
||||
*DOS-format-write*
|
||||
If the 'fileformat' is "dos", <CR> <NL> is used for <EOL>. This is default
|
||||
If the 'fileformat' is "dos", <CR><NL> is used for <EOL>. This is default
|
||||
for Win32. On other systems the message "[dos format]" is shown to remind you
|
||||
that an unusual <EOL> was used.
|
||||
*Unix-format-write*
|
||||
@@ -1419,8 +1419,8 @@ There are a few things to remember when editing binary files:
|
||||
the file. It is also possible that you get an "out of memory" error when
|
||||
reading the file.
|
||||
- Make sure the 'binary' option is set BEFORE loading the
|
||||
file. Otherwise both <CR> <NL> and <NL> are considered to end a line
|
||||
and when the file is written the <NL> will be replaced with <CR> <NL>.
|
||||
file. Otherwise both <CR><NL> and <NL> are considered to end a line
|
||||
and when the file is written the <NL> will be replaced with <CR><NL>.
|
||||
- <Nul> characters are shown on the screen as ^@. You can enter them with
|
||||
"CTRL-V CTRL-@" or "CTRL-V 000"
|
||||
- To insert a <NL> character in the file split a line. When writing the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Nov 04
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -49,7 +49,7 @@ There are ten types of variables:
|
||||
*Number* *Integer*
|
||||
Number A 32 or 64 bit signed number. |expr-number|
|
||||
The number of bits is available in |v:numbersize|.
|
||||
Examples: -123 0x10 0177 0b1011
|
||||
Examples: -123 0x10 0177 0o177 0b1011
|
||||
|
||||
Float A floating point number. |floating-point-format| *Float*
|
||||
{only when compiled with the |+float| feature}
|
||||
@@ -97,9 +97,10 @@ the Number. Examples:
|
||||
Conversion from a String to a Number only happens in legacy Vim script, not in
|
||||
Vim9 script. It is done by converting the first digits to a number.
|
||||
Hexadecimal "0xf9", Octal "017" or "0o17", and Binary "0b10"
|
||||
numbers are recognized (NOTE: when using |scriptversion-4| octal with a
|
||||
leading "0" is not recognized). If the String doesn't start with digits, the
|
||||
result is zero.
|
||||
numbers are recognized
|
||||
NOTE: when using |scriptversion-4| octal with a leading "0" is not recognized.
|
||||
The 0o notation requires patch 8.2.0886.
|
||||
If the String doesn't start with digits, the result is zero.
|
||||
Examples:
|
||||
String "456" --> Number 456 ~
|
||||
String "6bar" --> Number 6 ~
|
||||
@@ -292,13 +293,13 @@ is not available it returns zero or the default value you specify: >
|
||||
|
||||
|
||||
List concatenation ~
|
||||
|
||||
*list-concatenation*
|
||||
Two lists can be concatenated with the "+" operator: >
|
||||
:let longlist = mylist + [5, 6]
|
||||
:let mylist += [7, 8]
|
||||
|
||||
To prepend or append an item turn the item into a list by putting [] around
|
||||
it. To change a list in-place see |list-modification| below.
|
||||
To prepend or append an item, turn the item into a list by putting [] around
|
||||
it. To change a list in-place, refer to |list-modification| below.
|
||||
|
||||
|
||||
Sublist ~
|
||||
@@ -313,6 +314,9 @@ similar to -1. >
|
||||
:let shortlist = mylist[2:2] " List with one item: [3]
|
||||
:let otherlist = mylist[:] " make a copy of the List
|
||||
|
||||
Notice that the last index is inclusive. If you prefer using an exclusive
|
||||
index use the |slice()| method.
|
||||
|
||||
If the first index is beyond the last item of the List or the second item is
|
||||
before the first item, the result is an empty list. There is no error
|
||||
message.
|
||||
@@ -1150,7 +1154,7 @@ expr7 *expr7*
|
||||
|
||||
For '!' |TRUE| becomes |FALSE|, |FALSE| becomes |TRUE| (one).
|
||||
For '-' the sign of the number is changed.
|
||||
For '+' the number is unchanged.
|
||||
For '+' the number is unchanged. Note: "++" has no effect.
|
||||
|
||||
A String will be converted to a Number first.
|
||||
|
||||
@@ -1191,6 +1195,7 @@ start with one!
|
||||
If the length of the String is less than the index, the result is an empty
|
||||
String. A negative index always results in an empty string (reason: backward
|
||||
compatibility). Use [-1:] to get the last byte or character.
|
||||
In Vim9 script a negative index is used like with a list: count from the end.
|
||||
|
||||
If expr8 is a |List| then it results the item at index expr1. See |list-index|
|
||||
for possible index values. If the index is out of range this results in an
|
||||
@@ -1215,6 +1220,9 @@ a Number it is first converted to a String.
|
||||
In Vim9 script the indexes are character indexes. To use byte indexes use
|
||||
|strpart()|.
|
||||
|
||||
The item at index expr1b is included, it is inclusive. For an exclusive index
|
||||
use the |slice()| function.
|
||||
|
||||
If expr1a is omitted zero is used. If expr1b is omitted the length of the
|
||||
string minus one is used.
|
||||
|
||||
@@ -1318,8 +1326,8 @@ When using the lambda form there must be no white space between the } and the
|
||||
number
|
||||
------
|
||||
number number constant *expr-number*
|
||||
*hex-number* *octal-number* *binary-number*
|
||||
|
||||
*0x* *hex-number* *0o* *octal-number* *binary-number*
|
||||
Decimal, Hexadecimal (starting with 0x or 0X), Binary (starting with 0b or 0B)
|
||||
and Octal (starting with 0, 0o or 0O).
|
||||
|
||||
@@ -1572,7 +1580,7 @@ Note how execute() is used to execute an Ex command. That's ugly though.
|
||||
|
||||
Lambda expressions have internal names like '<lambda>42'. If you get an error
|
||||
for a lambda expression, you can find what it is with the following command: >
|
||||
:function {'<lambda>42'}
|
||||
:function <lambda>42
|
||||
See also: |numbered-function|
|
||||
|
||||
==============================================================================
|
||||
@@ -1850,6 +1858,13 @@ v:dying Normally zero. When a deadly signal is caught it's set to
|
||||
< Note: if another deadly signal is caught when v:dying is one,
|
||||
VimLeave autocommands will not be executed.
|
||||
|
||||
*v:exiting* *exiting-variable*
|
||||
v:exiting Vim exit code. Normally zero, non-zero when something went
|
||||
wrong. The value is v:null before invoking the |VimLeavePre|
|
||||
and |VimLeave| autocmds. See |:q|, |:x| and |:cquit|.
|
||||
Example: >
|
||||
:au VimLeave * echo "Exit value is " .. v:exiting
|
||||
<
|
||||
*v:echospace* *echospace-variable*
|
||||
v:echospace Number of screen cells that can be used for an `:echo` message
|
||||
in the last screen line before causing the |hit-enter-prompt|.
|
||||
@@ -2067,6 +2082,12 @@ v:null An empty String. Used to put "null" in JSON. See
|
||||
That is so that eval() can parse the string back to the same
|
||||
value. Read-only.
|
||||
|
||||
*v:numbermax* *numbermax-variable*
|
||||
v:numbermax Maximum value of a number.
|
||||
|
||||
*v:numbermin* *numbermin-variable*
|
||||
v:numbermin Minimum value of a number (negative)
|
||||
|
||||
*v:numbersize* *numbersize-variable*
|
||||
v:numbersize Number of bits in a Number. This is normally 64, but on some
|
||||
systems it may be 32.
|
||||
@@ -2468,10 +2489,13 @@ ch_status({handle} [, {options}])
|
||||
changenr() Number current change number
|
||||
char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr}) 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 nr of cursor or mark
|
||||
col({expr}) 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
|
||||
@@ -2512,6 +2536,9 @@ expand({expr} [, {nosuf} [, {list}]])
|
||||
expandcmd({expr}) String expand {expr} like with `:edit`
|
||||
extend({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict insert items of {expr2} into {expr1}
|
||||
extendnew({expr1}, {expr2} [, {expr3}])
|
||||
List/Dict like |extend()| but creates a new
|
||||
List or Dictionary
|
||||
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
||||
filereadable({file}) Number |TRUE| if {file} is a readable file
|
||||
filewritable({file}) Number |TRUE| if {file} is a writable file
|
||||
@@ -2522,6 +2549,8 @@ finddir({name} [, {path} [, {count}]])
|
||||
findfile({name} [, {path} [, {count}]])
|
||||
String find file {name} in {path}
|
||||
flatten({list} [, {maxdepth}]) List flatten {list} up to {maxdepth} levels
|
||||
flattennew({list} [, {maxdepth}])
|
||||
List flatten a copy of {list}
|
||||
float2nr({expr}) Number convert Float {expr} to a Number
|
||||
floor({expr}) Float round {expr} down
|
||||
fmod({expr1}, {expr2}) Float remainder of {expr1} / {expr2}
|
||||
@@ -2533,6 +2562,7 @@ foldlevel({lnum}) Number fold level at {lnum}
|
||||
foldtext() String line displayed for closed fold
|
||||
foldtextresult({lnum}) String text for closed fold at {lnum}
|
||||
foreground() Number bring the Vim window to the foreground
|
||||
fullcommand({name}) String get full command from {name}
|
||||
funcref({name} [, {arglist}] [, {dict}])
|
||||
Funcref reference to function {name}
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
@@ -2549,6 +2579,7 @@ getbufvar({expr}, {varname} [, {def}])
|
||||
getchangelist([{expr}]) List list of change list items
|
||||
getchar([expr]) Number get one character from the user
|
||||
getcharmod() Number modifiers for the last typed character
|
||||
getcharpos({expr}) List position of cursor, mark, etc.
|
||||
getcharsearch() Dict last character search
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
@@ -2557,6 +2588,7 @@ getcmdwintype() String return current command-line window type
|
||||
getcompletion({pat}, {type} [, {filtered}])
|
||||
List list of cmdline completion matches
|
||||
getcurpos([{winnr}]) List position of the cursor
|
||||
getcursorcharpos([{winnr}]) List character position of the cursor
|
||||
getcwd([{winnr} [, {tabnr}]]) String get the current working directory
|
||||
getenv({name}) String return environment variable
|
||||
getfontname([{name}]) String name of font being used
|
||||
@@ -2758,6 +2790,7 @@ pyxeval({expr}) any evaluate |python_x| expression
|
||||
rand([{expr}]) Number get pseudo-random number
|
||||
range({expr} [, {max} [, {stride}]])
|
||||
List items from {expr} to {max}
|
||||
readblob({fname}) Blob read a |Blob| from {fname}
|
||||
readdir({dir} [, {expr} [, {dict}]])
|
||||
List file names in {dir} selected by {expr}
|
||||
readdirex({dir} [, {expr} [, {dict}]])
|
||||
@@ -2819,8 +2852,10 @@ setbufline({expr}, {lnum}, {text})
|
||||
setbufvar({expr}, {varname}, {val})
|
||||
none set {varname} in buffer {expr} to {val}
|
||||
setcellwidths({list}) none set character cell width overrides
|
||||
setcharpos({expr}, {list}) Number set the {expr} position to {list}
|
||||
setcharsearch({dict}) Dict set character search from {dict}
|
||||
setcmdpos({pos}) Number set cursor position in command-line
|
||||
setcursorcharpos({list}) Number move cursor to position in {list}
|
||||
setenv({name}, {val}) none set environment variable
|
||||
setfperm({fname}, {mode}) Number set {fname} file permissions to {mode}
|
||||
setline({lnum}, {line}) Number set line {lnum} to {line}
|
||||
@@ -2864,6 +2899,8 @@ sign_unplacelist({list}) List unplace a list of signs
|
||||
simplify({filename}) String simplify filename as much as possible
|
||||
sin({expr}) Float sine of {expr}
|
||||
sinh({expr}) Float hyperbolic sine of {expr}
|
||||
slice({expr}, {start} [, {end}]) String, List or Blob
|
||||
slice of a String, List or Blob
|
||||
sort({list} [, {func} [, {dict}]])
|
||||
List sort {list}, using {func} to compare
|
||||
sound_clear() none stop playing all sounds
|
||||
@@ -2997,7 +3034,8 @@ tr({src}, {fromstr}, {tostr}) String translate chars of {src} in {fromstr}
|
||||
trim({text} [, {mask} [, {dir}]])
|
||||
String trim characters in {mask} from {text}
|
||||
trunc({expr}) Float truncate Float {expr}
|
||||
type({name}) Number type of variable {name}
|
||||
type({expr}) Number type of value {expr}
|
||||
typename({expr}) String representation of the type of {expr}
|
||||
undofile({name}) String undo file name for {name}
|
||||
undotree() List undo file tree
|
||||
uniq({list} [, {func} [, {dict}]])
|
||||
@@ -3098,6 +3136,7 @@ append({lnum}, {text}) *append()*
|
||||
text line below line {lnum} in the current buffer.
|
||||
Otherwise append {text} as one text line below line {lnum} in
|
||||
the current buffer.
|
||||
Any type of item is accepted and converted to a String.
|
||||
{lnum} can be zero to insert a line before the first one.
|
||||
Returns 1 for failure ({lnum} out of range or out of memory),
|
||||
0 for success. Example: >
|
||||
@@ -3473,8 +3512,8 @@ byteidx({expr}, {nr}) *byteidx()*
|
||||
Return byte index of the {nr}'th character in the string
|
||||
{expr}. Use zero for the first character, it then returns
|
||||
zero.
|
||||
This function is only useful when there are multibyte
|
||||
characters, otherwise the returned value is equal to {nr}.
|
||||
If there are no multibyte characters the returned value is
|
||||
equal to {nr}.
|
||||
Composing characters are not counted separately, their byte
|
||||
length is added to the preceding base character. See
|
||||
|byteidxcomp()| below for counting composing characters
|
||||
@@ -3504,8 +3543,8 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()*
|
||||
< The first and third echo result in 3 ('e' plus composing
|
||||
character is 3 bytes), the second echo results in 1 ('e' is
|
||||
one byte).
|
||||
Only works differently from byteidx() when 'encoding' is set to
|
||||
a Unicode encoding.
|
||||
Only works differently from byteidx() when 'encoding' is set
|
||||
to a Unicode encoding.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->byteidxcomp(idx)
|
||||
@@ -3581,6 +3620,43 @@ charclass({string}) *charclass()*
|
||||
other specific Unicode class
|
||||
The class is used in patterns and word motions.
|
||||
|
||||
*charcol()*
|
||||
charcol({expr}) Same as |col()| but returns the character index of the column
|
||||
position given with {expr} instead of the byte position.
|
||||
|
||||
Example:
|
||||
With the cursor on '세' in line 5 with text "여보세요": >
|
||||
charcol('.') returns 3
|
||||
col('.') returns 7
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetPos()->col()
|
||||
<
|
||||
*charidx()*
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Return the character index of the byte at {idx} in {string}.
|
||||
The index of the first character is zero.
|
||||
If there are no multibyte characters the returned value is
|
||||
equal to {idx}.
|
||||
When {countcc} is omitted or zero, then composing characters
|
||||
are not counted separately, their byte length is added to the
|
||||
preceding base character.
|
||||
When {countcc} is set to 1, then composing characters are
|
||||
counted as separate characters.
|
||||
Returns -1 if the arguments are invalid or if {idx} is greater
|
||||
than the index of the last byte in {string}. An error is
|
||||
given if the first argument is not a string, the second
|
||||
argument is not a number or when the third argument is present
|
||||
and is not zero or one.
|
||||
See |byteidx()| and |byteidxcomp()| for getting the byte index
|
||||
from the character index.
|
||||
Examples: >
|
||||
echo charidx('áb́ć', 3) returns 1
|
||||
echo charidx('áb́ć', 6, 1) returns 4
|
||||
echo charidx('áb́ć', 16) returns -1
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetName()->charidx(idx)
|
||||
|
||||
chdir({dir}) *chdir()*
|
||||
Change the current working directory to {dir}. The scope of
|
||||
@@ -3646,7 +3722,8 @@ col({expr}) The result is a Number, which is the byte index of the column
|
||||
out of range then col() returns zero.
|
||||
To get the line number use |line()|. To get both use
|
||||
|getpos()|.
|
||||
For the screen column position use |virtcol()|.
|
||||
For the screen column position use |virtcol()|. For the
|
||||
character position use |charcol()|.
|
||||
Note that only marks in the current file can be used.
|
||||
Examples: >
|
||||
col(".") column of cursor
|
||||
@@ -3947,6 +4024,9 @@ cursor({list})
|
||||
This is like the return value of |getpos()| or |getcurpos()|,
|
||||
but without the first item.
|
||||
|
||||
To position the cursor using the character count, use
|
||||
|setcursorcharpos()|.
|
||||
|
||||
Does not change the jumplist.
|
||||
If {lnum} is greater than the number of lines in the buffer,
|
||||
the cursor will be positioned at the last line in the buffer.
|
||||
@@ -4014,8 +4094,9 @@ delete({fname} [, {flags}]) *delete()*
|
||||
|
||||
A symbolic link itself is deleted, not what it points to.
|
||||
|
||||
The result is a Number, which is 0 if the delete operation was
|
||||
successful and -1 when the deletion failed or partly failed.
|
||||
The result is a Number, which is 0/false if the delete
|
||||
operation was successful and -1/true when the deletion failed
|
||||
or partly failed.
|
||||
|
||||
Use |remove()| to delete an item from a |List|.
|
||||
To delete a line from the buffer use |:delete| or
|
||||
@@ -4463,6 +4544,13 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
mylist->extend(otherlist)
|
||||
|
||||
|
||||
extendnew({expr1}, {expr2} [, {expr3}]) *extendnew()*
|
||||
Like |extend()| but instead of adding items to {expr1} a new
|
||||
List or Dictionary is created and returned. {expr1} remains
|
||||
unchanged. Items can still be changed by {expr2}, if you
|
||||
don't want that use |deepcopy()| first.
|
||||
|
||||
|
||||
feedkeys({string} [, {mode}]) *feedkeys()*
|
||||
Characters in {string} are queued for processing as if they
|
||||
come from a mapping or were typed by the user.
|
||||
@@ -4627,8 +4715,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
|
||||
Flatten {list} up to {maxdepth} levels. Without {maxdepth}
|
||||
the result is a |List| without nesting, as if {maxdepth} is
|
||||
a very large number.
|
||||
The {list} is changed in place, make a copy first if you do
|
||||
The {list} is changed in place, use |flattennew()| if you do
|
||||
not want that.
|
||||
In Vim9 script flatten() cannot be used, you must always use
|
||||
|flattennew()|.
|
||||
*E900*
|
||||
{maxdepth} means how deep in nested lists changes are made.
|
||||
{list} is not modified when {maxdepth} is 0.
|
||||
@@ -4642,6 +4732,10 @@ flatten({list} [, {maxdepth}]) *flatten()*
|
||||
:echo flatten([1, [2, [3, 4]], 5], 1)
|
||||
< [1, 2, [3, 4], 5]
|
||||
|
||||
flattennew({list} [, {maxdepth}]) *flattennew()*
|
||||
Like |flatten()| but first make a copy of {list}.
|
||||
|
||||
|
||||
float2nr({expr}) *float2nr()*
|
||||
Convert {expr} to a Number by omitting the part after the
|
||||
decimal point.
|
||||
@@ -4733,7 +4827,8 @@ fnamemodify({fname}, {mods}) *fnamemodify()*
|
||||
:echo fnamemodify("main.c", ":p:h")
|
||||
< results in: >
|
||||
/home/mool/vim/vim/src
|
||||
< Note: Environment variables don't work in {fname}, use
|
||||
< If {mods} is empty then {fname} is returned.
|
||||
Note: Environment variables don't work in {fname}, use
|
||||
|expand()| first then.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@@ -4808,6 +4903,21 @@ foreground() Move the Vim window to the foreground. Useful when sent from
|
||||
{only in the Win32, Athena, Motif and GTK GUI versions and the
|
||||
Win32 console version}
|
||||
|
||||
fullcommand({name}) *fullcommand()*
|
||||
Get the full command name from a short abbreviated command
|
||||
name; see |20.2| for details on command abbreviations.
|
||||
|
||||
{name} may start with a `:` and can include a [range], these
|
||||
are skipped and not returned.
|
||||
Returns an empty string if a command doesn't exist or if it's
|
||||
ambiguous (for user-defined functions).
|
||||
|
||||
For example `fullcommand('s')`, `fullcommand('sub')`,
|
||||
`fullcommand(':%substitute')` all return "substitute".
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->fullcommand()
|
||||
<
|
||||
*funcref()*
|
||||
funcref({name} [, {arglist}] [, {dict}])
|
||||
Just like |function()|, but the returned Funcref will lookup
|
||||
@@ -5052,9 +5162,9 @@ getbufvar({expr}, {varname} [, {def}]) *getbufvar()*
|
||||
The result is the value of option or local buffer variable
|
||||
{varname} in buffer {expr}. Note that the name without "b:"
|
||||
must be used.
|
||||
When {varname} is empty returns a dictionary with all the
|
||||
When {varname} is empty returns a |Dictionary| with all the
|
||||
buffer-local variables.
|
||||
When {varname} is equal to "&" returns a dictionary with all
|
||||
When {varname} is equal to "&" returns a |Dictionary| with all
|
||||
the buffer-local options.
|
||||
Otherwise, when {varname} starts with "&" returns the value of
|
||||
a buffer-local option.
|
||||
@@ -5136,7 +5246,10 @@ getchar([expr]) *getchar()*
|
||||
|xterm-bracketed-paste|.
|
||||
|
||||
There is no prompt, you will somehow have to make clear to the
|
||||
user that a character has to be typed.
|
||||
user that a character has to be typed. The screen is not
|
||||
redrawn, e.g. when resizing the window. When using a popup
|
||||
window it should work better with a |popup-filter|.
|
||||
|
||||
There is no mapping for the character.
|
||||
Key codes are replaced, thus when the user presses the <Del>
|
||||
key you get the code for the <Del> key, not the raw character
|
||||
@@ -5182,6 +5295,20 @@ getcharmod() *getcharmod()*
|
||||
character itself are obtained. Thus Shift-a results in "A"
|
||||
without a modifier.
|
||||
|
||||
*getcharpos()*
|
||||
getcharpos({expr})
|
||||
Get the position for {expr}. Same as |getpos()| but the column
|
||||
number in the returned List is a character index instead of
|
||||
a byte index.
|
||||
|
||||
Example:
|
||||
With the cursor on '세' in line 5 with text "여보세요": >
|
||||
getcharpos('.') returns [0, 5, 3, 0]
|
||||
getpos('.') returns [0, 5, 7, 0]
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetMark()->getcharpos()
|
||||
|
||||
getcharsearch() *getcharsearch()*
|
||||
Return the current character search information as a {dict}
|
||||
with the following entries:
|
||||
@@ -5307,8 +5434,11 @@ getcurpos([{winid}])
|
||||
includes an extra "curswant" item in the list:
|
||||
[0, lnum, col, off, curswant] ~
|
||||
The "curswant" number is the preferred column when moving the
|
||||
cursor vertically. Also see |getpos()|.
|
||||
The first "bufnum" item is always zero.
|
||||
cursor vertically. Also see |getcursorcharpos()| and
|
||||
|getpos()|.
|
||||
The first "bufnum" item is always zero. The byte position of
|
||||
the cursor is returned in 'col'. To get the character
|
||||
position, use |getcursorcharpos()|.
|
||||
|
||||
The optional {winid} argument can specify the window. It can
|
||||
be the window number or the |window-ID|. The last known
|
||||
@@ -5322,7 +5452,24 @@ getcurpos([{winid}])
|
||||
call setpos('.', save_cursor)
|
||||
< Note that this only works within the window. See
|
||||
|winrestview()| for restoring more state.
|
||||
*getcwd()*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->getcurpos()
|
||||
|
||||
< *getcursorcharpos()*
|
||||
getcursorcharpos([{winid}])
|
||||
Same as |getcurpos()| but the column number in the returned
|
||||
List is a character index instead of a byte index.
|
||||
|
||||
Example:
|
||||
With the cursor on '보' in line 3 with text "여보세요": >
|
||||
getcursorcharpos() returns [0, 3, 2, 0, 3]
|
||||
getcurpos() returns [0, 3, 4, 0, 3]
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
GetWinid()->getcursorcharpos()
|
||||
|
||||
< *getcwd()*
|
||||
getcwd([{winnr} [, {tabnr}]])
|
||||
The result is a String, which is the name of the current
|
||||
working directory.
|
||||
@@ -5526,8 +5673,8 @@ getloclist({nr} [, {what}]) *getloclist()*
|
||||
|location-list-file-window| for more
|
||||
details.
|
||||
|
||||
Returns a Dictionary with default values if there is no location
|
||||
list for the window {nr}.
|
||||
Returns a |Dictionary| with default values if there is no
|
||||
location list for the window {nr}.
|
||||
Returns an empty Dictionary if window {nr} does not exist.
|
||||
|
||||
Examples (See also |getqflist-examples|): >
|
||||
@@ -5629,18 +5776,20 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
Note that for '< and '> Visual mode matters: when it is "V"
|
||||
(visual line mode) the column of '< is zero and the column of
|
||||
'> is a large number.
|
||||
The column number in the returned List is the byte position
|
||||
within the line. To get the character position in the line,
|
||||
use |getcharpos()|
|
||||
This can be used to save and restore the position of a mark: >
|
||||
let save_a_mark = getpos("'a")
|
||||
...
|
||||
call setpos("'a", save_a_mark)
|
||||
< Also see |getcurpos()| and |setpos()|.
|
||||
< Also see |getcharpos()|, |getcurpos()| and |setpos()|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetMark()->getpos()
|
||||
|
||||
|
||||
getqflist([{what}]) *getqflist()*
|
||||
Returns a list with all the current quickfix errors. Each
|
||||
Returns a |List| with all the current quickfix errors. Each
|
||||
list item is a dictionary with these entries:
|
||||
bufnr number of buffer that has the file name, use
|
||||
bufname() to get the name
|
||||
@@ -6105,8 +6254,8 @@ has({feature} [, {check}])
|
||||
|
||||
|
||||
has_key({dict}, {key}) *has_key()*
|
||||
The result is a Number, which is 1 if |Dictionary| {dict} has
|
||||
an entry with key {key}. Zero otherwise.
|
||||
The result is a Number, which is TRUE if |Dictionary| {dict}
|
||||
has an entry with key {key}. FALSE otherwise.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
mydict->has_key(key)
|
||||
@@ -6149,16 +6298,16 @@ haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
|
||||
GetWinnr()->haslocaldir()
|
||||
|
||||
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
|
||||
The result is a Number, which is 1 if there is a mapping that
|
||||
contains {what} in somewhere in the rhs (what it is mapped to)
|
||||
and this mapping exists in one of the modes indicated by
|
||||
{mode}.
|
||||
The result is a Number, which is TRUE if there is a mapping
|
||||
that contains {what} in somewhere in the rhs (what it is
|
||||
mapped to) and this mapping exists in one of the modes
|
||||
indicated by {mode}.
|
||||
When {abbr} is there and it is |TRUE| use abbreviations
|
||||
instead of mappings. Don't forget to specify Insert and/or
|
||||
Command-line mode.
|
||||
Both the global mappings and the mappings local to the current
|
||||
buffer are checked for a match.
|
||||
If no matching mapping is found 0 is returned.
|
||||
If no matching mapping is found FALSE is returned.
|
||||
The following characters are recognized in {mode}:
|
||||
n Normal mode
|
||||
v Visual and Select mode
|
||||
@@ -6194,8 +6343,8 @@ histadd({history}, {item}) *histadd()*
|
||||
character is sufficient.
|
||||
If {item} does already exist in the history, it will be
|
||||
shifted to become the newest entry.
|
||||
The result is a Number: 1 if the operation was successful,
|
||||
otherwise 0 is returned.
|
||||
The result is a Number: TRUE if the operation was successful,
|
||||
otherwise FALSE is returned.
|
||||
|
||||
Example: >
|
||||
:call histadd("input", strftime("%Y %b %d"))
|
||||
@@ -6218,8 +6367,8 @@ histdel({history} [, {item}]) *histdel()*
|
||||
an index, see |:history-indexing|. The respective entry will
|
||||
be removed if it exists.
|
||||
|
||||
The result is a Number: 1 for a successful operation,
|
||||
otherwise 0 is returned.
|
||||
The result is TRUE for a successful operation, otherwise FALSE
|
||||
is returned.
|
||||
|
||||
Examples:
|
||||
Clear expression register history: >
|
||||
@@ -6271,7 +6420,7 @@ histnr({history}) *histnr()*
|
||||
GetHistory()->histnr()
|
||||
<
|
||||
hlexists({name}) *hlexists()*
|
||||
The result is a Number, which is non-zero if a highlight group
|
||||
The result is a Number, which is TRUE if a highlight group
|
||||
called {name} exists. This is when the group has been
|
||||
defined in some way. Not necessarily when highlighting has
|
||||
been defined for it, it may also have been used for a syntax
|
||||
@@ -6444,7 +6593,7 @@ inputrestore() *inputrestore()*
|
||||
Restore typeahead that was saved with a previous |inputsave()|.
|
||||
Should be called the same number of times inputsave() is
|
||||
called. Calling it more often is harmless though.
|
||||
Returns 1 when there is nothing to restore, 0 otherwise.
|
||||
Returns TRUE when there is nothing to restore, FALSE otherwise.
|
||||
|
||||
inputsave() *inputsave()*
|
||||
Preserve typeahead (also from mappings) and clear it, so that
|
||||
@@ -6452,7 +6601,7 @@ inputsave() *inputsave()*
|
||||
followed by a matching inputrestore() after the prompt. Can
|
||||
be used several times, in which case there must be just as
|
||||
many inputrestore() calls.
|
||||
Returns 1 when out of memory, 0 otherwise.
|
||||
Returns TRUE when out of memory, FALSE otherwise.
|
||||
|
||||
inputsecret({prompt} [, {text}]) *inputsecret()*
|
||||
This function acts much like the |input()| function with but
|
||||
@@ -6928,7 +7077,7 @@ listener_flush([{buf}]) *listener_flush()*
|
||||
|
||||
listener_remove({id}) *listener_remove()*
|
||||
Remove a listener previously added with listener_add().
|
||||
Returns zero when {id} could not be found, one when {id} was
|
||||
Returns FALSE when {id} could not be found, TRUE when {id} was
|
||||
removed.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@@ -7146,7 +7295,8 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
|
||||
mapnew({expr1}, {expr2}) *mapnew()*
|
||||
Like |map()| but instead of replacing items in {expr1} a new
|
||||
List or Dictionary is created and returned. {expr1} remains
|
||||
unchanged.
|
||||
unchanged. Items can still be changed by {expr2}, if you
|
||||
don't want that use |deepcopy()| first.
|
||||
|
||||
|
||||
mapset({mode}, {abbr}, {dict}) *mapset()*
|
||||
@@ -7375,7 +7525,7 @@ matchend({expr}, {pat} [, {start} [, {count}]]) *matchend()*
|
||||
|
||||
|
||||
matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
If {list} is a list of strings, then returns a list with all
|
||||
If {list} is a list of strings, then returns a |List| with all
|
||||
the strings in {list} that fuzzy match {str}. The strings in
|
||||
the returned list are sorted based on the matching score.
|
||||
|
||||
@@ -7432,22 +7582,24 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
|
||||
matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
|
||||
Same as |matchfuzzy()|, but returns the list of matched
|
||||
strings and the list of character positions where characters
|
||||
in {str} matches.
|
||||
strings, the list of character positions where characters
|
||||
in {str} matches and a list of matching scores. You can
|
||||
use |byteidx()|to convert a character position to a byte
|
||||
position.
|
||||
|
||||
If {str} matches multiple times in a string, then only the
|
||||
positions for the best match is returned.
|
||||
|
||||
If there are no matching strings or there is an error, then a
|
||||
list with two empty list items is returned.
|
||||
list with three empty list items is returned.
|
||||
|
||||
Example: >
|
||||
:echo matchfuzzypos(['testing'], 'tsg')
|
||||
< results in [['testing'], [[0, 2, 6]]] >
|
||||
< results in [['testing'], [[0, 2, 6]], [99]] >
|
||||
:echo matchfuzzypos(['clay', 'lacy'], 'la')
|
||||
< results in [['lacy', 'clay'], [[0, 1], [1, 2]]] >
|
||||
< results in [['lacy', 'clay'], [[0, 1], [1, 2]], [153, 133]] >
|
||||
:echo [{'text': 'hello', 'id' : 10}]->matchfuzzypos('ll', {'key' : 'text'})
|
||||
< results in [{'id': 10, 'text': 'hello'}] [[2, 3]]
|
||||
< results in [[{'id': 10, 'text': 'hello'}], [[2, 3]], [127]]
|
||||
|
||||
matchlist({expr}, {pat} [, {start} [, {count}]]) *matchlist()*
|
||||
Same as |match()|, but return a |List|. The first item in the
|
||||
@@ -7501,8 +7653,10 @@ matchstrpos({expr}, {pat} [, {start} [, {count}]]) *matchstrpos()*
|
||||
<
|
||||
|
||||
*max()*
|
||||
max({expr}) Return the maximum value of all items in {expr}.
|
||||
{expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
max({expr}) Return the maximum value of all items in {expr}. Example: >
|
||||
echo max([apples, pears, oranges])
|
||||
|
||||
< {expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
it returns the maximum of all values in the Dictionary.
|
||||
If {expr} is neither a List nor a Dictionary, or one of the
|
||||
items in {expr} cannot be used as a Number this results in
|
||||
@@ -7572,8 +7726,10 @@ menu_info({name} [, {mode}]) *menu_info()*
|
||||
|
||||
|
||||
< *min()*
|
||||
min({expr}) Return the minimum value of all items in {expr}.
|
||||
{expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
min({expr}) Return the minimum value of all items in {expr}. Example: >
|
||||
echo min([apples, pears, oranges])
|
||||
|
||||
< {expr} can be a |List| or a |Dictionary|. For a Dictionary,
|
||||
it returns the minimum of all values in the Dictionary.
|
||||
If {expr} is neither a List nor a Dictionary, or one of the
|
||||
items in {expr} cannot be used as a Number this results in
|
||||
@@ -7590,13 +7746,13 @@ mkdir({name} [, {path} [, {prot}]])
|
||||
necessary. Otherwise it must be "".
|
||||
|
||||
If {prot} is given it is used to set the protection bits of
|
||||
the new directory. The default is 0755 (rwxr-xr-x: r/w for
|
||||
the user readable for others). Use 0700 to make it unreadable
|
||||
for others. This is only used for the last part of {name}.
|
||||
Thus if you create /tmp/foo/bar then /tmp/foo will be created
|
||||
with 0755.
|
||||
the new directory. The default is 0o755 (rwxr-xr-x: r/w for
|
||||
the user, readable for others). Use 0o700 to make it
|
||||
unreadable for others. This is only used for the last part of
|
||||
{name}. Thus if you create /tmp/foo/bar then /tmp/foo will be
|
||||
created with 0o755.
|
||||
Example: >
|
||||
:call mkdir($HOME . "/tmp/foo/bar", "p", 0700)
|
||||
:call mkdir($HOME . "/tmp/foo/bar", "p", 0o700)
|
||||
|
||||
< This function is not available in the |sandbox|.
|
||||
|
||||
@@ -7604,8 +7760,8 @@ mkdir({name} [, {path} [, {prot}]])
|
||||
flag is passed (since patch 8.0.1708). However, without the
|
||||
"p" option the call will fail.
|
||||
|
||||
The function result is a Number, which is 1 if the call was
|
||||
successful or 0 if the directory creation failed or partly
|
||||
The function result is a Number, which is TRUE if the call was
|
||||
successful or FALSE if the directory creation failed or partly
|
||||
failed.
|
||||
|
||||
Not available on all systems. To check use: >
|
||||
@@ -8150,6 +8306,14 @@ rand([{expr}]) *rand()* *random*
|
||||
:echo rand(seed)
|
||||
:echo rand(seed) % 16 " random number 0 - 15
|
||||
<
|
||||
|
||||
readblob({fname}) *readblob()*
|
||||
Read file {fname} in binary mode and return a |Blob|.
|
||||
When the file can't be opened an error message is given and
|
||||
the result is an empty |Blob|.
|
||||
Also see |readfile()| and |writefile()|.
|
||||
|
||||
|
||||
readdir({directory} [, {expr} [, {dict}]]) *readdir()*
|
||||
Return a list with file and directory names in {directory}.
|
||||
You can also use |glob()| if you don't need to do complicated
|
||||
@@ -8264,6 +8428,7 @@ readdirex({directory} [, {expr} [, {dict}]]) *readdirex()*
|
||||
Can also be used as a |method|: >
|
||||
GetDirName()->readdirex()
|
||||
<
|
||||
|
||||
*readfile()*
|
||||
readfile({fname} [, {type} [, {max}]])
|
||||
Read file {fname} and return a |List|, each line of the file
|
||||
@@ -8275,8 +8440,6 @@ readfile({fname} [, {type} [, {max}]])
|
||||
- When the last line ends in a NL an extra empty list item is
|
||||
added.
|
||||
- No CR characters are removed.
|
||||
When {type} contains "B" a |Blob| is returned with the binary
|
||||
data of the file unmodified.
|
||||
Otherwise:
|
||||
- CR characters that appear before a NL are removed.
|
||||
- Whether the last line ends in a NL or not does not matter.
|
||||
@@ -8294,6 +8457,9 @@ readfile({fname} [, {type} [, {max}]])
|
||||
Note that without {max} the whole file is read into memory.
|
||||
Also note that there is no recognition of encoding. Read a
|
||||
file into a buffer if you need to.
|
||||
Deprecated (use |readblob()| instead): When {type} contains
|
||||
"B" a |Blob| is returned with the binary data of the file
|
||||
unmodified.
|
||||
When the file can't be opened an error message is given and
|
||||
the result is an empty list.
|
||||
Also see |writefile()|.
|
||||
@@ -8728,11 +8894,16 @@ search({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])
|
||||
|
||||
'ignorecase', 'smartcase' and 'magic' are used.
|
||||
|
||||
When the 'z' flag is not given, searching always starts in
|
||||
column zero and then matches before the cursor are skipped.
|
||||
When the 'c' flag is present in 'cpo' the next search starts
|
||||
after the match. Without the 'c' flag the next search starts
|
||||
one column further.
|
||||
When the 'z' flag is not given, forward searching always
|
||||
starts in column zero and then matches before the cursor are
|
||||
skipped. When the 'c' flag is present in 'cpo' the next
|
||||
search starts after the match. Without the 'c' flag the next
|
||||
search starts one column further. This matters for
|
||||
overlapping matches.
|
||||
When searching backwards and the 'z' flag is given then the
|
||||
search starts in column zero, thus no match in the current
|
||||
line will be found (unless wrapping around the end of the
|
||||
file).
|
||||
|
||||
When the {stopline} argument is given then the search stops
|
||||
after searching this line. This is useful to restrict the
|
||||
@@ -8914,7 +9085,7 @@ searchcount([{options}]) *searchcount()*
|
||||
result. if search exceeded
|
||||
total count, "total" value
|
||||
becomes `maxcount + 1`
|
||||
(default: 0)
|
||||
(default: 99)
|
||||
pos |List| `[lnum, col, off]` value
|
||||
when recomputing the result.
|
||||
this changes "current" result
|
||||
@@ -9066,6 +9237,7 @@ server2client({clientid}, {string}) *server2client()*
|
||||
Send a reply string to {clientid}. The most recent {clientid}
|
||||
that sent a string can be retrieved with expand("<client>").
|
||||
{only available when compiled with the |+clientserver| feature}
|
||||
Returns zero for success, -1 for failure.
|
||||
Note:
|
||||
This id has to be stored before the next command can be
|
||||
received. I.e. before returning from the received command and
|
||||
@@ -9154,6 +9326,19 @@ setcellwidths({list}) *setcellwidths()*
|
||||
< You can use the script $VIMRUNTIME/tools/emoji_list.vim to see
|
||||
the effect for known emoji characters.
|
||||
|
||||
setcharpos({expr}, {list}) *setcharpos()*
|
||||
Same as |setpos()| but uses the specified column number as the
|
||||
character index instead of the byte index in the line.
|
||||
|
||||
Example:
|
||||
With the text "여보세요" in line 8: >
|
||||
call setcharpos('.', [0, 8, 4, 0])
|
||||
< positions the cursor on the fourth character '요'. >
|
||||
call setpos('.', [0, 8, 4, 0])
|
||||
< positions the cursor on the second character '보'.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetPosition()->setcharpos('.')
|
||||
|
||||
setcharsearch({dict}) *setcharsearch()*
|
||||
Set the current character search information to {dict},
|
||||
@@ -9190,12 +9375,27 @@ setcmdpos({pos}) *setcmdpos()*
|
||||
before inserting the resulting text.
|
||||
When the number is too big the cursor is put at the end of the
|
||||
line. A number smaller than one has undefined results.
|
||||
Returns 0 when successful, 1 when not editing the command
|
||||
line.
|
||||
Returns FALSE when successful, TRUE when not editing the
|
||||
command line.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetPos()->setcmdpos()
|
||||
|
||||
setcursorcharpos({lnum}, {col} [, {off}]) *setcursorcharpos()*
|
||||
setcursorcharpos({list})
|
||||
Same as |cursor()| but uses the specified column number as the
|
||||
character index instead of the byte index in the line.
|
||||
|
||||
Example:
|
||||
With the text "여보세요" in line 4: >
|
||||
call setcursorcharpos(4, 3)
|
||||
< positions the cursor on the third character '세'. >
|
||||
call cursor(4, 3)
|
||||
< positions the cursor on the first character '여'.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetCursorPos()->setcursorcharpos()
|
||||
|
||||
setenv({name}, {val}) *setenv()*
|
||||
Set environment variable {name} to {val}.
|
||||
When {val} is |v:null| the environment variable is deleted.
|
||||
@@ -9234,9 +9434,11 @@ setline({lnum}, {text}) *setline()*
|
||||
{lnum} is used like with |getline()|.
|
||||
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.
|
||||
|
||||
If this succeeds, 0 is returned. If this fails (most likely
|
||||
because {lnum} is invalid) 1 is returned.
|
||||
If this succeeds, FALSE is returned. If this fails (most likely
|
||||
because {lnum} is invalid) TRUE is returned.
|
||||
|
||||
Example: >
|
||||
:call setline(5, strftime("%c"))
|
||||
@@ -9307,7 +9509,8 @@ setpos({expr}, {list})
|
||||
|
||||
"lnum" and "col" are the position in the buffer. The first
|
||||
column is 1. Use a zero "lnum" to delete a mark. If "col" is
|
||||
smaller than 1 then 1 is used.
|
||||
smaller than 1 then 1 is used. To use the character count
|
||||
instead of the byte count, use |setcharpos()|.
|
||||
|
||||
The "off" number is only used when 'virtualedit' is set. Then
|
||||
it is the offset in screen columns from the start of the
|
||||
@@ -9327,7 +9530,7 @@ setpos({expr}, {list})
|
||||
Returns 0 when the position could be set, -1 otherwise.
|
||||
An error message is given if {expr} is invalid.
|
||||
|
||||
Also see |getpos()| and |getcurpos()|.
|
||||
Also see |setcharpos()|, |getpos()| and |getcurpos()|.
|
||||
|
||||
This does not restore the preferred column for moving
|
||||
vertically; if you set the cursor position with this, |j| and
|
||||
@@ -9702,6 +9905,18 @@ sinh({expr}) *sinh()*
|
||||
{only available when compiled with the |+float| feature}
|
||||
|
||||
|
||||
slice({expr}, {start} [, {end}]) *slice()*
|
||||
Similar to using a |slice| "expr[start : end]", but "end" is
|
||||
used exclusive. And for a string the indexes are used as
|
||||
character indexes instead of byte indexes, like in
|
||||
|vim9script|.
|
||||
When {end} is omitted the slice continues to the last item.
|
||||
When {end} is -1 the last item is omitted.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetList()->slice(offset)
|
||||
|
||||
|
||||
sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
Sort the items in {list} in-place. Returns {list}.
|
||||
|
||||
@@ -10646,7 +10861,7 @@ tagfiles() Returns a |List| with the file names used to search for tags
|
||||
|
||||
|
||||
taglist({expr} [, {filename}]) *taglist()*
|
||||
Returns a list of tags matching the regular expression {expr}.
|
||||
Returns a |List| of tags matching the regular expression {expr}.
|
||||
|
||||
If {filename} is passed it is used to prioritize the results
|
||||
in the same way that |:tselect| does. See |tag-priority|.
|
||||
@@ -10738,7 +10953,7 @@ term_ functions are documented here: |terminal-function-details|
|
||||
|
||||
|
||||
terminalprops() *terminalprops()*
|
||||
Returns a dictionary with properties of the terminal that Vim
|
||||
Returns a |Dictionary| with properties of the terminal that Vim
|
||||
detected from the response to |t_RV| request. See
|
||||
|v:termresponse| for the response itself. If |v:termresponse|
|
||||
is empty most values here will be 'u' for unknown.
|
||||
@@ -10827,6 +11042,8 @@ timer_start({time}, {callback} [, {options}])
|
||||
function or a |Funcref|. It is called with one argument, which
|
||||
is the timer ID. The callback is only invoked when Vim is
|
||||
waiting for input.
|
||||
If you want to show a message look at |popup_notification()|
|
||||
to avoid interfering with what the user is doing.
|
||||
|
||||
{options} is a dictionary. Supported entries:
|
||||
"repeat" Number of times to repeat calling the
|
||||
@@ -10979,6 +11196,14 @@ type({expr}) The result is a Number representing the type of {expr}.
|
||||
< Can also be used as a |method|: >
|
||||
mylist->type()
|
||||
|
||||
|
||||
typename({expr}) *typename()*
|
||||
Return a string representation of the type of {expr}.
|
||||
Example: >
|
||||
echo typename([1, 2, 3])
|
||||
list<number>
|
||||
|
||||
|
||||
undofile({name}) *undofile()*
|
||||
Return the name of the undo file that would be used for a file
|
||||
with name {name} when writing. This uses the 'undodir'
|
||||
@@ -11136,16 +11361,18 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
call win_execute(winid, 'set syntax=python')
|
||||
< Doing the same with `setwinvar()` would not trigger
|
||||
autocommands and not actually show syntax highlighting.
|
||||
|
||||
*E994*
|
||||
Not all commands are allowed in popup windows.
|
||||
When window {id} does not exist then no error is given.
|
||||
When window {id} does not exist then no error is given and
|
||||
an empty string is returned.
|
||||
|
||||
Can also be used as a |method|, the base is passed as the
|
||||
second argument: >
|
||||
GetCommand()->win_execute(winid)
|
||||
|
||||
win_findbuf({bufnr}) *win_findbuf()*
|
||||
Returns a list with |window-ID|s for windows that contain
|
||||
Returns a |List| with |window-ID|s for windows that contain
|
||||
buffer {bufnr}. When there is none the list is empty.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@@ -11186,7 +11413,7 @@ win_gettype([{nr}]) *win_gettype()*
|
||||
win_gotoid({expr}) *win_gotoid()*
|
||||
Go to window with ID {expr}. This may also change the current
|
||||
tabpage.
|
||||
Return 1 if successful, 0 if the window cannot be found.
|
||||
Return TRUE if successful, FALSE if the window cannot be found.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->win_gotoid()
|
||||
@@ -12904,7 +13131,7 @@ text...
|
||||
:exe[cute] {expr1} .. Executes the string that results from the evaluation
|
||||
of {expr1} as an Ex command.
|
||||
Multiple arguments are concatenated, with a space in
|
||||
between. To avoid the extra space use the "."
|
||||
between. To avoid the extra space use the ".."
|
||||
operator to concatenate strings into one argument.
|
||||
{expr1} is used as the processed command, command line
|
||||
editing keys are not recognized.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,6 +147,7 @@ can be used to overrule the filetype used for certain extensions:
|
||||
*.w g:filetype_w |ft-cweb-syntax|
|
||||
*.i g:filetype_i |ft-progress-syntax|
|
||||
*.p g:filetype_p |ft-pascal-syntax|
|
||||
*.pp g:filetype_pp |ft-pascal-syntax|
|
||||
*.sh g:bash_is_sh |ft-sh-syntax|
|
||||
*.tex g:tex_flavor |ft-tex-plugin|
|
||||
|
||||
@@ -563,16 +564,15 @@ Local mappings:
|
||||
|
||||
MAN *ft-man-plugin* *:Man* *man.vim*
|
||||
|
||||
Displays a manual page in a nice way. Also see the user manual
|
||||
|find-manpage|.
|
||||
|
||||
To start using the ":Man" command before any manual page was loaded, source
|
||||
this script from your startup vimrc file: >
|
||||
This plugin displays a manual page in a nice way. See |find-manpage| in the
|
||||
user manual for more information.
|
||||
|
||||
To start using the |:Man| command before any manual page has been loaded,
|
||||
source this script from your startup |vimrc| file: >
|
||||
runtime ftplugin/man.vim
|
||||
|
||||
Options:
|
||||
'iskeyword' the '.' character is added to be able to use CTRL-] on the
|
||||
'iskeyword' The '.' character is added to support the use of CTRL-] on the
|
||||
manual page name.
|
||||
|
||||
Commands:
|
||||
@@ -582,24 +582,25 @@ Man {number} {name}
|
||||
|
||||
Global mapping:
|
||||
<Leader>K Displays the manual page for the word under the cursor.
|
||||
<Plug>ManPreGetPage idem, allows for using a mapping: >
|
||||
nmap <F1> <Plug>ManPreGetPage<CR>
|
||||
<Plug>ManPreGetPage
|
||||
idem, allows for using a mapping: >
|
||||
nmap <F1> <Plug>ManPreGetPage
|
||||
|
||||
Local mappings:
|
||||
CTRL-] Jump to the manual page for the word under the cursor.
|
||||
CTRL-T Jump back to the previous manual page.
|
||||
q Same as ":quit"
|
||||
q Same as the |:quit| command.
|
||||
|
||||
To use a vertical split instead of horizontal: >
|
||||
let g:ft_man_open_mode = 'vert'
|
||||
To use a new tab: >
|
||||
let g:ft_man_open_mode = 'tab'
|
||||
|
||||
To enable folding use this: >
|
||||
let g:ft_man_folding_enable = 1
|
||||
If you do not like the default folding, use an autocommand to add your desired
|
||||
To enable |folding|, use this: >
|
||||
let g:ft_man_folding_enable = 1
|
||||
If you do not like the default folding, use an |autocommand| to add your desired
|
||||
folding style instead. For example: >
|
||||
autocmd FileType man setlocal foldmethod=indent foldenable
|
||||
autocmd FileType man setlocal foldmethod=indent foldenable
|
||||
|
||||
If you would like :Man {number} {name} to behave like man {number} {name} by
|
||||
not running man {name} if no page is found, then use this: >
|
||||
@@ -612,7 +613,7 @@ page in a Vim window: >
|
||||
|
||||
MANPAGER *manpager.vim*
|
||||
|
||||
The :Man command allows you to turn Vim into a manpager (that syntax highlights
|
||||
The |:Man| command allows you to turn Vim into a manpager (that syntax highlights
|
||||
manpages and follows linked manpages on hitting CTRL-]).
|
||||
|
||||
For bash,zsh,ksh or dash, add to the config file (.bashrc,.zshrc, ...)
|
||||
|
||||
@@ -8,7 +8,7 @@ Vim had built-in support for hangul, the Korean language, for users without
|
||||
XIM (X Input Method). Since it didn't work well and was not maintained it was
|
||||
removed in Vim 8.1.2327.
|
||||
|
||||
If you want this hangul input mehod you can go back to Vim 8.1.2326 or
|
||||
If you want this hangul input method you can go back to Vim 8.1.2326 or
|
||||
earlier. If you think this code is still useful and want to maintain it, make
|
||||
a patch to add it back. However, making it work with UTF-8 encoding would be
|
||||
best.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Jul 27
|
||||
*helphelp.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -92,9 +92,9 @@ Help on help files *helphelp*
|
||||
:help k| only
|
||||
< Note that a space before the '|' is seen as part of
|
||||
the ":help" argument.
|
||||
You can also use <LF> or <CR> to separate the help
|
||||
You can also use <NL> or <CR> to separate the help
|
||||
command from a following command. You need to type
|
||||
CTRL-V first to insert the <LF> or <CR>. Example: >
|
||||
CTRL-V first to insert the <NL> or <CR>. Example: >
|
||||
:help so<C-V><CR>only
|
||||
|
||||
:h[elp]! [subject] Like ":help", but in non-English help files prefer to
|
||||
@@ -158,9 +158,31 @@ When no argument is given to |:help| the file given with the 'helpfile' option
|
||||
will be opened. Otherwise the specified tag is searched for in all "doc/tags"
|
||||
files in the directories specified in the 'runtimepath' option.
|
||||
|
||||
If you would like to open the help in the current window, see this tip:
|
||||
|help-curwin|.
|
||||
|
||||
The initial height of the help window can be set with the 'helpheight' option
|
||||
(default 20).
|
||||
|
||||
When the help buffer is created, several local options are set to make sure
|
||||
the help text is displayed as it was intended:
|
||||
'iskeyword' nearly all ASCII chars except ' ', '*', '"' and '|'
|
||||
'foldmethod' "manual"
|
||||
'tabstop' 8
|
||||
'arabic' off
|
||||
'binary' off
|
||||
'buflisted' off
|
||||
'cursorbind' off
|
||||
'diff' off
|
||||
'foldenable' off
|
||||
'list' off
|
||||
'modifiable' off
|
||||
'number' off
|
||||
'relativenumber' off
|
||||
'rightleft' off
|
||||
'scrollbind' off
|
||||
'spell' off
|
||||
|
||||
Jump to specific subjects by using tags. This can be done in two ways:
|
||||
- Use the "CTRL-]" command while standing on the name of a command or option.
|
||||
This only works when the tag is a keyword. "<C-Leftmouse>" and
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 Oct 05
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1590,6 +1590,8 @@ tag command action ~
|
||||
|:sign| :sig[n] manipulate signs
|
||||
|:silent| :sil[ent] run a command silently
|
||||
|:sleep| :sl[eep] do nothing for a few seconds
|
||||
|:sleep!| :sl[eep]! do nothing for a few seconds, without the
|
||||
cursor visible
|
||||
|:slast| :sla[st] split window and go to last file in the
|
||||
argument list
|
||||
|:smagic| :sm[agic] :substitute with 'magic'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*intro.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -434,7 +434,7 @@ notation meaning equivalent decimal value(s) ~
|
||||
<CSI> command sequence intro ALT-Esc 155 *<CSI>*
|
||||
<xCSI> CSI when typed in the GUI *<xCSI>*
|
||||
|
||||
<EOL> end-of-line (can be <CR>, <LF> or <CR><LF>,
|
||||
<EOL> end-of-line (can be <CR>, <NL> or <CR><NL>,
|
||||
depends on system and 'fileformat') *<EOL>*
|
||||
|
||||
<Up> cursor-up *cursor-up* *cursor_up*
|
||||
@@ -678,8 +678,8 @@ Normal mode from any other mode. This can be used to make sure Vim is in
|
||||
Normal mode, without causing a beep like <Esc> would. However, this does not
|
||||
work in Ex mode. When used after a command that takes an argument, such as
|
||||
|f| or |m|, the timeout set with 'ttimeoutlen' applies.
|
||||
When focus is in a terminal window, CTRL-\ CTRL-N goes to Normal mode for only
|
||||
one command, see |t_CTRL-\_CTRL-N|.
|
||||
When focus is in a terminal window, CTRL-\ CTRL-N goes to Normal mode until an
|
||||
edit command is entered, see |t_CTRL-\_CTRL-N|.
|
||||
|
||||
*CTRL-\_CTRL-G* *i_CTRL-\_CTRL-G* *c_CTRL-\_CTRL-G* *v_CTRL-\_CTRL-G*
|
||||
The command CTRL-\ CTRL-G or <C-\><C-G> can be used to go to Insert mode when
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Nov 12
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -319,13 +319,16 @@ Example of using <Cmd> halfway Insert mode: >
|
||||
nnoremap <F3> aText <Cmd>echo mode(1)<CR> Added<Esc>
|
||||
|
||||
Unlike <expr> mappings, there are no special restrictions on the <Cmd>
|
||||
command: it is executed as if an (unrestricted) |autocmd| was invoked.
|
||||
command: it is executed as if an (unrestricted) |autocommand| was invoked.
|
||||
|
||||
Note:
|
||||
- Because <Cmd> avoids mode-changes it does not trigger |CmdlineEnter| and
|
||||
|CmdlineLeave| events, because no user interaction is expected.
|
||||
- For the same reason, |keycodes| like <C-R><C-W> are interpreted as plain,
|
||||
unmapped keys.
|
||||
- The command is not echo'ed, no need for <silent>.
|
||||
- In Visual mode you can use `line('v')` and `col('v')` to get one end of the
|
||||
Visual area, the cursor is at the other end.
|
||||
- In Select mode, |:map| and |:vmap| command mappings are executed in
|
||||
Visual mode. Use |:smap| to handle Select mode differently.
|
||||
|
||||
@@ -906,7 +909,7 @@ Insert mode to avoid every key with a modifier causing Insert mode to end.
|
||||
1.12 MAPPING AN OPERATOR *:map-operator*
|
||||
|
||||
An operator is used before a {motion} command. To define your own operator
|
||||
you must create mapping that first sets the 'operatorfunc' option and then
|
||||
you must create a mapping that first sets the 'operatorfunc' option and then
|
||||
invoke the |g@| operator. After the user types the {motion} command the
|
||||
specified function will be called.
|
||||
|
||||
@@ -1238,9 +1241,9 @@ Otherwise, using "<SID>" outside of a script context is an error.
|
||||
|
||||
If you need to get the script number to use in a complicated script, you can
|
||||
use this function: >
|
||||
function s:SID()
|
||||
return matchstr(expand('<sfile>'), '<SNR>\zs\d\+\ze_SID$')
|
||||
endfun
|
||||
func s:ScriptNumber()
|
||||
return matchstr(expand('<SID>'), '<SNR>\zs\d\+\ze_')
|
||||
endfunc
|
||||
|
||||
The "<SNR>" will be shown when listing functions and mappings. This is useful
|
||||
to find out what they are defined to.
|
||||
@@ -1318,15 +1321,15 @@ last defined. Example: >
|
||||
See |:verbose-cmd| for more information.
|
||||
|
||||
*E174* *E182*
|
||||
:com[mand][!] [{attr}...] {cmd} {rep}
|
||||
:com[mand][!] [{attr}...] {cmd} {repl}
|
||||
Define a user command. The name of the command is
|
||||
{cmd} and its replacement text is {rep}. The command's
|
||||
attributes (see below) are {attr}. If the command
|
||||
already exists, an error is reported, unless a ! is
|
||||
specified, in which case the command is redefined.
|
||||
There is one exception: When sourcing a script again,
|
||||
a command that was previously defined in that script
|
||||
will be silently replaced.
|
||||
{cmd} and its replacement text is {repl}. The
|
||||
command's attributes (see below) are {attr}. If the
|
||||
command already exists, an error is reported, unless a
|
||||
! is specified, in which case the command is
|
||||
redefined. There is one exception: When sourcing a
|
||||
script again, a command that was previously defined in
|
||||
that script will be silently replaced.
|
||||
|
||||
|
||||
:delc[ommand] {cmd} *:delc* *:delcommand* *E184*
|
||||
@@ -1536,11 +1539,11 @@ feature. Use the full name for new scripts.
|
||||
|
||||
Replacement text ~
|
||||
|
||||
The replacement text for a user defined command is scanned for special escape
|
||||
sequences, using <...> notation. Escape sequences are replaced with values
|
||||
from the entered command line, and all other text is copied unchanged. The
|
||||
resulting string is executed as an Ex command. To avoid the replacement use
|
||||
<lt> in place of the initial <. Thus to include "<bang>" literally use
|
||||
The replacement text {repl} for a user defined command is scanned for special
|
||||
escape sequences, using <...> notation. Escape sequences are replaced with
|
||||
values from the entered command line, and all other text is copied unchanged.
|
||||
The resulting string is executed as an Ex command. To avoid the replacement
|
||||
use <lt> in place of the initial <. Thus to include "<bang>" literally use
|
||||
"<lt>bang>".
|
||||
|
||||
The valid escape sequences are
|
||||
@@ -1666,6 +1669,11 @@ errors and the "update" command to write modified buffers): >
|
||||
This will invoke: >
|
||||
:call Allargs("%s/foo/bar/ge|update")
|
||||
<
|
||||
If the command is defined in Vim9 script (a script that starts with
|
||||
`:vim9script` and in a `:def` function) then {repl} will be executed as in Vim9
|
||||
script. Thus this depends on where the command is defined, not where it is
|
||||
used.
|
||||
|
||||
When defining a user command in a script, it will be able to call functions
|
||||
local to the script and use mappings local to the script. When the user
|
||||
invokes the user command, it will run in the context of the script it was
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 8.2. Last change: 2020 Sep 07
|
||||
*message.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -794,6 +794,9 @@ and the screen is about to be redrawn:
|
||||
-> Press <Enter> or <Space> to redraw the screen and continue, without that
|
||||
key being used otherwise.
|
||||
-> Press ':' or any other Normal mode command character to start that command.
|
||||
Note that after an external command some special keys, such as the cursor
|
||||
keys, may not work normally, because the terminal is still set to a state
|
||||
for executing the external command.
|
||||
-> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This
|
||||
works the same way as at the |more-prompt|. Only works when 'compatible'
|
||||
is off and 'more' is on.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Oct 10
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -438,7 +438,7 @@ the system, mostly it is something like 256 or 1024 characters.
|
||||
CTRL-? CTRL-H
|
||||
not CTRL-? CTRL-?
|
||||
|
||||
(CTRL-? is 0177 octal, 0x7f hex)
|
||||
(CTRL-? is 0o177 octal, 0x7f hex)
|
||||
|
||||
If your delete key terminal code is wrong, but the
|
||||
code for backspace is alright, you can put this in
|
||||
@@ -2801,6 +2801,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
toggled each time the flag is given. See |complex-change|. See
|
||||
also 'gdefault' option.
|
||||
Switching this option on may break plugins!
|
||||
This option is not used in |Vim9| script.
|
||||
|
||||
*'emoji'* *'emo'* *'noemoji'* *'noemo'*
|
||||
'emoji' 'emo' boolean (default: on)
|
||||
@@ -3121,7 +3122,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to buffer
|
||||
This gives the <EOL> of the current buffer, which is used for
|
||||
reading/writing the buffer from/to a file:
|
||||
dos <CR> <NL>
|
||||
dos <CR><NL>
|
||||
unix <NL>
|
||||
mac <CR>
|
||||
When "dos" is used, CTRL-Z at the end of a file is ignored.
|
||||
@@ -3272,7 +3273,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See the 'endofline' option.
|
||||
|
||||
*'fkmap'* *'fk'* *'nofkmap'* *'nofk'*
|
||||
'fkmap' 'fk' boolean (default off) *E198*
|
||||
'fkmap' 'fk' boolean (default off)
|
||||
global
|
||||
{only available when compiled with the |+rightleft|
|
||||
feature}
|
||||
@@ -3570,6 +3571,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
DEPRECATED: Setting this option may break plugins that are not aware
|
||||
of this option. Also, many users get confused that adding the /g flag
|
||||
has the opposite effect of that it normally does.
|
||||
This option is not used in |Vim9| script.
|
||||
|
||||
*'grepformat'* *'gfm'*
|
||||
'grepformat' 'gfm' string (default "%f:%l:%m,%f:%l%m,%f %l%m")
|
||||
@@ -4875,6 +4877,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*lcs-space*
|
||||
space:c Character to show for a space. When omitted, spaces
|
||||
are left blank.
|
||||
*lcs-lead*
|
||||
lead:c Character to show for leading spaces. When omitted,
|
||||
leading spaces are blank. Overrides the "space"
|
||||
setting for leading spaces.
|
||||
*lcs-trail*
|
||||
trail:c Character to show for trailing spaces. When omitted,
|
||||
trailing spaces are blank. Overrides the "space"
|
||||
@@ -4943,6 +4949,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Only switch it off when working with old Vi scripts. In any other
|
||||
situation write patterns that work when 'magic' is on. Include "\M"
|
||||
when you want to |/\M|.
|
||||
In |Vim9| script the value of 'magic' is ignored, patterns behave like
|
||||
it is always set.
|
||||
|
||||
*'makeef'* *'mef'*
|
||||
'makeef' 'mef' string (default: "")
|
||||
@@ -5217,7 +5225,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'mouse'* *E538*
|
||||
*'mouse'*
|
||||
'mouse' string (default "", "a" for GUI and Win32,
|
||||
set to "a" or "nvi" in |defaults.vim|)
|
||||
global
|
||||
@@ -6317,7 +6325,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to window
|
||||
Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
|
||||
set to half the number of lines in the window when the window size
|
||||
changes. If you give a count to the CTRL-U or CTRL-D command it will
|
||||
changes. This may happen when enabling the |status-line| or
|
||||
'tabline' option after setting the 'scroll' option.
|
||||
If you give a count to the CTRL-U or CTRL-D command it will
|
||||
be used as the new value for 'scroll'. Reset to half the window
|
||||
height with ":set scroll=0".
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_vms.txt* For Vim version 8.2. Last change: 2020 Jun 07
|
||||
*os_vms.txt* For Vim version 8.2. Last change: 2021 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
@@ -72,7 +72,7 @@ See the file [.SRC]INSTALLVMS.TXT.
|
||||
4. Problems *vms-problems*
|
||||
|
||||
The code has been tested under Open VMS 6.2 - 8.2 on Alpha, VAX and IA64
|
||||
platforms with the DEC C compiler. It should work without big problems.
|
||||
platforms with the DEC C compiler. It should work without major problems.
|
||||
If your system does not have some include libraries you can tune up in
|
||||
OS_VMS_CONF.H file.
|
||||
|
||||
@@ -765,6 +765,15 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
|
||||
9. VMS related changes *vms-changes*
|
||||
|
||||
Version 8.2
|
||||
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
|
||||
- fix the call mkdir bug (vicente_polo@yahoo.es)
|
||||
- test on VSI OpenVMS Alpha and Itanium platforms
|
||||
- added LUA support
|
||||
- added XPM support - Motif GUI with toolbar on all platforms
|
||||
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
|
||||
- start integrating the new test scripts
|
||||
|
||||
Version 8.1
|
||||
- make necessary changes to build v8.1 on VMS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2020 Sep 01
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -361,8 +361,8 @@ For starters, read chapter 27 of the user manual |usr_27.txt|.
|
||||
*/atom*
|
||||
5. An atom can be one of a long list of items. Many atoms match one character
|
||||
in the text. It is often an ordinary character or a character class.
|
||||
Braces can be used to make a pattern into an atom. The "\z(\)" construct
|
||||
is only for syntax highlighting.
|
||||
Parentheses can be used to make a pattern into an atom. The "\z(\)"
|
||||
construct is only for syntax highlighting.
|
||||
|
||||
atom ::= ordinary-atom |/ordinary-atom|
|
||||
or \( pattern \) |/\(|
|
||||
@@ -394,15 +394,19 @@ the pattern will not match. This is only useful when debugging Vim.
|
||||
==============================================================================
|
||||
3. Magic */magic*
|
||||
|
||||
Some characters in the pattern are taken literally. They match with the same
|
||||
character in the text. When preceded with a backslash however, these
|
||||
characters get a special meaning.
|
||||
Some characters in the pattern, such as letters, are taken literally. They
|
||||
match exactly the same character in the text. When preceded with a backslash
|
||||
however, these characters may get a special meaning. For example, "a" matches
|
||||
the letter "a", while "\a" matches any alphabetic character.
|
||||
|
||||
Other characters have a special meaning without a backslash. They need to be
|
||||
preceded with a backslash to match literally.
|
||||
preceded with a backslash to match literally. For example "." matches any
|
||||
character while "\." matches a dot.
|
||||
|
||||
If a character is taken literally or not depends on the 'magic' option and the
|
||||
items mentioned next.
|
||||
items in the pattern mentioned next. The 'magic' option should always be set,
|
||||
but it can be switched off for Vi compatibility. We mention the effect of
|
||||
'nomagic' here for completeness, but we recommend against using that.
|
||||
*/\m* */\M*
|
||||
Use of "\m" makes the pattern after it be interpreted as if 'magic' is set,
|
||||
ignoring the actual value of the 'magic' option.
|
||||
@@ -411,30 +415,28 @@ Use of "\M" makes the pattern after it be interpreted as if 'nomagic' is used.
|
||||
Use of "\v" means that after it, all ASCII characters except '0'-'9', 'a'-'z',
|
||||
'A'-'Z' and '_' have special meaning: "very magic"
|
||||
|
||||
Use of "\V" means that after it, only a backslash and terminating character
|
||||
(usually / or ?) have special meaning: "very nomagic"
|
||||
Use of "\V" means that after it, only a backslash and the terminating
|
||||
character (usually / or ?) have special meaning: "very nomagic"
|
||||
|
||||
Examples:
|
||||
after: \v \m \M \V matches ~
|
||||
'magic' 'nomagic'
|
||||
$ $ $ \$ matches end-of-line
|
||||
. . \. \. matches any character
|
||||
a a a a literal 'a'
|
||||
\a \a \a \a any alphabetic character
|
||||
. . \. \. any character
|
||||
\. \. . . literal dot
|
||||
$ $ $ \$ end-of-line
|
||||
* * \* \* any number of the previous atom
|
||||
~ ~ \~ \~ latest substitute string
|
||||
() \(\) \(\) \(\) grouping into an atom
|
||||
| \| \| \| separating alternatives
|
||||
\a \a \a \a alphabetic character
|
||||
() \(\) \(\) \(\) group as an atom
|
||||
| \| \| \| nothing: separates alternatives
|
||||
\\ \\ \\ \\ literal backslash
|
||||
\. \. . . literal dot
|
||||
\{ { { { literal '{'
|
||||
a a a a literal 'a'
|
||||
\{ { { { literal curly brace
|
||||
|
||||
{only Vim supports \m, \M, \v and \V}
|
||||
|
||||
It is recommended to always keep the 'magic' option at the default setting,
|
||||
which is 'magic'. This avoids portability problems. To make a pattern immune
|
||||
to the 'magic' option being set or not, put "\m" or "\M" at the start of the
|
||||
pattern.
|
||||
If you want to you can make a pattern immune to the 'magic' option being set
|
||||
or not by putting "\m" or "\M" at the start of the pattern.
|
||||
|
||||
==============================================================================
|
||||
4. Overview of pattern items *pattern-overview*
|
||||
@@ -676,7 +678,7 @@ overview.
|
||||
|
||||
Note that using "\&" works the same as using "\@=": "foo\&.." is the
|
||||
same as "\(foo\)\@=..". But using "\&" is easier, you don't need the
|
||||
braces.
|
||||
parentheses.
|
||||
|
||||
|
||||
*/\@!*
|
||||
@@ -1069,8 +1071,8 @@ x A single character, with no special meaning, matches itself
|
||||
|
||||
[] (with 'nomagic': \[]) */[]* */\[]* */\_[]* */collection*
|
||||
\_[]
|
||||
A collection. This is a sequence of characters enclosed in brackets.
|
||||
It matches any single character in the collection.
|
||||
A collection. This is a sequence of characters enclosed in square
|
||||
brackets. It matches any single character in the collection.
|
||||
Example matches ~
|
||||
[xyz] any 'x', 'y' or 'z'
|
||||
[a-zA-Z]$ any alphabetic character at the end of a line
|
||||
@@ -1129,11 +1131,12 @@ x A single character, with no special meaning, matches itself
|
||||
*[:ident:]* [:ident:] identifier character (same as "\i")
|
||||
*[:keyword:]* [:keyword:] keyword character (same as "\k")
|
||||
*[:fname:]* [:fname:] file name character (same as "\f")
|
||||
The brackets in character class expressions are additional to the
|
||||
brackets delimiting a collection. For example, the following is a
|
||||
plausible pattern for a UNIX filename: "[-./[:alnum:]_~]\+" That is,
|
||||
a list of at least one character, each of which is either '-', '.',
|
||||
'/', alphabetic, numeric, '_' or '~'.
|
||||
The square brackets in character class expressions are additional to
|
||||
the square brackets delimiting a collection. For example, the
|
||||
following is a plausible pattern for a UNIX filename:
|
||||
"[-./[:alnum:]_~]\+". That is, a list of at least one character,
|
||||
each of which is either '-', '.', '/', alphabetic, numeric, '_' or
|
||||
'~'.
|
||||
These items only work for 8-bit characters, except [:lower:] and
|
||||
[:upper:] also work for multibyte characters when using the new
|
||||
regexp engine. See |two-engines|. In the future these items may
|
||||
@@ -1176,7 +1179,7 @@ x A single character, with no special meaning, matches itself
|
||||
\b <BS>
|
||||
\n line break, see above |/[\n]|
|
||||
\d123 decimal number of character
|
||||
\o40 octal number of character up to 0377
|
||||
\o40 octal number of character up to 0o377
|
||||
\x20 hexadecimal number of character up to 0xff
|
||||
\u20AC hex. number of multibyte character up to 0xffff
|
||||
\U1234 hex. number of multibyte character up to 0xffffffff
|
||||
@@ -1214,7 +1217,8 @@ x A single character, with no special meaning, matches itself
|
||||
\%d123 Matches the character specified with a decimal number. Must be
|
||||
followed by a non-digit.
|
||||
\%o40 Matches the character specified with an octal number up to 0377.
|
||||
Numbers below 040 must be followed by a non-octal digit or a non-digit.
|
||||
Numbers below 0o40 must be followed by a non-octal digit or a
|
||||
non-digit.
|
||||
\%x2a Matches the character specified with up to two hexadecimal characters.
|
||||
\%u20AC Matches the character specified with up to four hexadecimal
|
||||
characters.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Oct 17
|
||||
*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -101,7 +101,7 @@ CLOSING THE POPUP WINDOW *popup-close*
|
||||
|
||||
Normally the plugin that created the popup window is also in charge of closing
|
||||
it. If somehow a popup hangs around, you can close all of them with: >
|
||||
call popup_clear()
|
||||
call popup_clear(1)
|
||||
Some popups, such as notifications, close after a specified time. This can be
|
||||
set with the "time" property on `popup_create()`.
|
||||
Otherwise, a popup can be closed by clicking on the X in the top-right corner
|
||||
@@ -309,8 +309,8 @@ popup_dialog({what}, {options}) *popup_dialog()*
|
||||
|
||||
popup_filter_menu({id}, {key}) *popup_filter_menu()*
|
||||
Filter that can be used for a popup. These keys can be used:
|
||||
j <Down> select item below
|
||||
k <Up> select item above
|
||||
j <Down> <C-N> select item below
|
||||
k <Up> <C-P> select item above
|
||||
<Space> <Enter> accept current selection
|
||||
x Esc CTRL-C cancel the menu
|
||||
Other keys are ignored.
|
||||
@@ -588,8 +588,6 @@ properties. It is in one of four forms:
|
||||
|
||||
If you want to create a new buffer yourself use |bufadd()| and pass the buffer
|
||||
number to popup_create().
|
||||
It is not possible to use the buffer of a terminal window. *E278* You CAN
|
||||
create a hidden terminal buffer and use that one in a popup window.
|
||||
|
||||
The second argument of |popup_create()| is a dictionary with options:
|
||||
line Screen line where to position the popup. Can use a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2020 Oct 09
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -354,6 +354,14 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
Vim version, or update Vim to a newer version. See
|
||||
|vimscript-version| for what changed between versions.
|
||||
|
||||
:vim9[script] [noclear] *:vim9* *:vim9script*
|
||||
Marks a script file as containing |Vim9-script|
|
||||
commands. Also see |vim9-namespace|.
|
||||
Must be the first command in the file.
|
||||
For [noclear] see |vim9-reload|.
|
||||
Without the |+eval| feature this changes the syntax
|
||||
for some commands.
|
||||
|
||||
*:scr* *:scriptnames*
|
||||
:scr[iptnames] List all sourced script names, in the order they were
|
||||
first sourced. The number is used for the script ID
|
||||
@@ -891,8 +899,9 @@ matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
|
||||
matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
|
||||
|
||||
The match for functions is done against the name as it's shown in the output
|
||||
of ":function". For local functions this means that something like "<SNR>99_"
|
||||
is prepended.
|
||||
of ":function". However, for local functions the script-specific prefix such
|
||||
as "<SNR>99_" is ignored to make it easier to match script-local functions
|
||||
without knowing the ID of the script.
|
||||
|
||||
Note that functions are first loaded and later executed. When they are loaded
|
||||
the "file" breakpoints are checked, when they are executed the "func"
|
||||
@@ -947,10 +956,10 @@ OBSCURE
|
||||
|
||||
Profiling means that Vim measures the time that is spent on executing
|
||||
functions and/or scripts. The |+profile| feature is required for this.
|
||||
It is only included when Vim was compiled with "huge" features.
|
||||
It is included when Vim was compiled with "huge" features.
|
||||
|
||||
You can also use the |reltime()| function to measure time. This only requires
|
||||
the |+reltime| feature, which is present more often.
|
||||
the |+reltime| feature, which is present in more builds.
|
||||
|
||||
For profiling syntax highlighting see |:syntime|.
|
||||
|
||||
@@ -997,7 +1006,12 @@ For example, to profile the one_script.vim script file: >
|
||||
|
||||
|
||||
You must always start with a ":profile start fname" command. The resulting
|
||||
file is written when Vim exits. Here is an example of the output, with line
|
||||
file is written when Vim exits. For example, to profile one specific
|
||||
function: >
|
||||
profile start /tmp/vimprofile
|
||||
profile func MyFunc
|
||||
|
||||
Here is an example of the output, with line
|
||||
numbers prepended for the explanation:
|
||||
|
||||
1 FUNCTION Test2() ~
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Sep 23
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -996,7 +996,7 @@ version 5.0) are not recognized.
|
||||
|
||||
MS-Windows line separators ~
|
||||
|
||||
On MS-Windows, Vim assumes that all the vimrc files have <CR> <NL> pairs as
|
||||
On MS-Windows, Vim assumes that all the vimrc files have <CR><NL> pairs as
|
||||
line separators. This will give problems if you have a file with only <NL>s
|
||||
and have a line like ":map xx yy^M". The trailing ^M will be ignored.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -66,8 +66,8 @@ This command also sources the |menu.vim| script when the GUI is running or
|
||||
will start soon. See |'go-M'| about avoiding that.
|
||||
|
||||
*:syn-on* *:syntax-on*
|
||||
The `:syntax enable` command will keep your current color settings. This
|
||||
allows using `:highlight` commands to set your preferred colors before or
|
||||
The `:syntax enable` command will keep most of your current color settings.
|
||||
This allows using `:highlight` commands to set your preferred colors before or
|
||||
after using this command. If you want Vim to overrule your settings with the
|
||||
defaults, use: >
|
||||
:syntax on
|
||||
@@ -2335,11 +2335,12 @@ http://papp.plan9.de.
|
||||
|
||||
PASCAL *pascal.vim* *ft-pascal-syntax*
|
||||
|
||||
Files matching "*.p" could be Progress or Pascal. If the automatic detection
|
||||
doesn't work for you, or you don't edit Progress at all, use this in your
|
||||
startup vimrc: >
|
||||
Files matching "*.p" could be Progress or Pascal and those matching "*.pp"
|
||||
could be Puppet or Pascal. If the automatic detection doesn't work for you,
|
||||
or you only edit Pascal files, use this in your startup vimrc: >
|
||||
|
||||
:let filetype_p = "pascal"
|
||||
:let filetype_p = "pascal"
|
||||
:let filetype_pp = "pascal"
|
||||
|
||||
The Pascal syntax file has been extended to take into account some extensions
|
||||
provided by Turbo Pascal, Free Pascal Compiler and GNU Pascal Compiler.
|
||||
@@ -3006,7 +3007,7 @@ vimrc file: >
|
||||
(Adapted from the html.vim help text by Claudio Fleiner <claudio@fleiner.com>)
|
||||
|
||||
|
||||
*ft-posix-synax* *ft-dash-syntax*
|
||||
*ft-posix-syntax* *ft-dash-syntax*
|
||||
SH *sh.vim* *ft-sh-syntax* *ft-bash-syntax* *ft-ksh-syntax*
|
||||
|
||||
This covers syntax highlighting for the older Unix (Bourne) sh, and newer
|
||||
@@ -3183,6 +3184,7 @@ redrawing can become slow.
|
||||
|
||||
|
||||
TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
|
||||
*syntax-tex* *syntax-latex*
|
||||
|
||||
Tex Contents~
|
||||
Tex: Want Syntax Folding? |tex-folding|
|
||||
@@ -3199,6 +3201,7 @@ TEX *tex.vim* *ft-tex-syntax* *latex-syntax*
|
||||
Tex: Selective Conceal Mode |g:tex_conceal|
|
||||
Tex: Controlling iskeyword |g:tex_isk|
|
||||
Tex: Fine Subscript and Superscript Control |tex-supersub|
|
||||
Tex: Match Check Control |tex-matchcheck|
|
||||
|
||||
*tex-folding* *g:tex_fold_enabled*
|
||||
Tex: Want Syntax Folding? ~
|
||||
@@ -3422,6 +3425,22 @@ syntax highlighting script handles this with the following logic:
|
||||
< in ~/.vim/ftplugin/tex/tex.vim in order to avoid having inscrutable
|
||||
utf-8 glyphs appear.
|
||||
|
||||
*tex-matchcheck* *g:tex_matchcheck*
|
||||
Tex: Match Check Control~
|
||||
|
||||
Sometimes one actually wants mismatched parentheses, square braces,
|
||||
and or curly braces; for example, \text{(1,10] is a range from but
|
||||
not including 1 to and including 10}. This wish, of course, conflicts
|
||||
with the desire to provide delimiter mismatch detection. To
|
||||
accommodate these conflicting goals, syntax/tex.vim provides >
|
||||
g:tex_matchcheck = '[({[]'
|
||||
< which is shown along with its default setting. So, if one doesn't
|
||||
want [] and () to be checked for mismatches, try using >
|
||||
let g:tex_matchcheck= '[{}]'
|
||||
< If you don't want matching to occur inside bold and italicized
|
||||
regions, >
|
||||
let g:tex_excludematcher= 1
|
||||
< will prevent the texMatcher group from being included in those regions.
|
||||
|
||||
TF *tf.vim* *ft-tf-syntax*
|
||||
|
||||
@@ -5305,6 +5324,12 @@ If you like Question highlighting for C comments, put this in your vimrc file: >
|
||||
Without the "default" in the C syntax file, the highlighting would be
|
||||
overruled when the syntax file is loaded.
|
||||
|
||||
To have a link survive `:highlight clear`, which is useful if you have
|
||||
highlighting for a specific filetype and you want to keep it when selecting
|
||||
another color scheme, put a command like this in the
|
||||
"after/syntax/{filetype}.vim" file: >
|
||||
highlight! default link cComment Question
|
||||
|
||||
==============================================================================
|
||||
15. Cleaning up *:syn-clear* *E391*
|
||||
|
||||
|
||||
@@ -1045,6 +1045,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
't_da' term.txt /*'t_da'*
|
||||
't_db' term.txt /*'t_db'*
|
||||
't_dl' term.txt /*'t_dl'*
|
||||
't_fd' term.txt /*'t_fd'*
|
||||
't_fe' term.txt /*'t_fe'*
|
||||
't_fs' term.txt /*'t_fs'*
|
||||
't_k1' term.txt /*'t_k1'*
|
||||
't_k2' term.txt /*'t_k2'*
|
||||
@@ -1783,6 +1785,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
09.2 usr_09.txt /*09.2*
|
||||
09.3 usr_09.txt /*09.3*
|
||||
09.4 usr_09.txt /*09.4*
|
||||
0o eval.txt /*0o*
|
||||
0x eval.txt /*0x*
|
||||
10.1 usr_10.txt /*10.1*
|
||||
10.2 usr_10.txt /*10.2*
|
||||
10.3 usr_10.txt /*10.3*
|
||||
@@ -1994,6 +1998,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:AdaTagFile ft_ada.txt /*:AdaTagFile*
|
||||
:AdaTypes ft_ada.txt /*:AdaTypes*
|
||||
:Arguments terminal.txt /*:Arguments*
|
||||
:Asm terminal.txt /*:Asm*
|
||||
:Break terminal.txt /*:Break*
|
||||
:Cfilter quickfix.txt /*:Cfilter*
|
||||
:Clear terminal.txt /*:Clear*
|
||||
@@ -2072,6 +2077,11 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:_#< cmdline.txt /*:_#<*
|
||||
:_#n cmdline.txt /*:_#n*
|
||||
:_% cmdline.txt /*:_%*
|
||||
:_%% cmdline.txt /*:_%%*
|
||||
:_%%% cmdline.txt /*:_%%%*
|
||||
:_%%0 cmdline.txt /*:_%%0*
|
||||
:_%%< cmdline.txt /*:_%%<*
|
||||
:_%%n cmdline.txt /*:_%%n*
|
||||
:_%: cmdline.txt /*:_%:*
|
||||
:_%< cmdline.txt /*:_%<*
|
||||
:a insert.txt /*:a*
|
||||
@@ -2125,6 +2135,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:bad windows.txt /*:bad*
|
||||
:badd windows.txt /*:badd*
|
||||
:ball windows.txt /*:ball*
|
||||
:balt windows.txt /*:balt*
|
||||
:bar cmdline.txt /*:bar*
|
||||
:bd windows.txt /*:bd*
|
||||
:bdel windows.txt /*:bdel*
|
||||
@@ -2724,6 +2735,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:map-<unique> map.txt /*:map-<unique>*
|
||||
:map-alt-keys map.txt /*:map-alt-keys*
|
||||
:map-arguments map.txt /*:map-arguments*
|
||||
:map-cmd map.txt /*:map-cmd*
|
||||
:map-commands map.txt /*:map-commands*
|
||||
:map-expression map.txt /*:map-expression*
|
||||
:map-local map.txt /*:map-local*
|
||||
@@ -3102,9 +3114,11 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:sip change.txt /*:sip*
|
||||
:sir change.txt /*:sir*
|
||||
:sl various.txt /*:sl*
|
||||
:sl! various.txt /*:sl!*
|
||||
:sla windows.txt /*:sla*
|
||||
:slast windows.txt /*:slast*
|
||||
:sleep various.txt /*:sleep*
|
||||
:sleep! various.txt /*:sleep!*
|
||||
:sm change.txt /*:sm*
|
||||
:smagic change.txt /*:smagic*
|
||||
:smap map.txt /*:smap*
|
||||
@@ -3387,8 +3401,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:vie editing.txt /*:vie*
|
||||
:view editing.txt /*:view*
|
||||
:vim quickfix.txt /*:vim*
|
||||
:vim9 vim9.txt /*:vim9*
|
||||
:vim9script vim9.txt /*:vim9script*
|
||||
:vim9 repeat.txt /*:vim9*
|
||||
:vim9script repeat.txt /*:vim9script*
|
||||
:vimgrep quickfix.txt /*:vimgrep*
|
||||
:vimgrepa quickfix.txt /*:vimgrepa*
|
||||
:vimgrepadd quickfix.txt /*:vimgrepadd*
|
||||
@@ -3506,6 +3520,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
<CSI> intro.txt /*<CSI>*
|
||||
<Char-> map.txt /*<Char->*
|
||||
<Char> map.txt /*<Char>*
|
||||
<Cmd> map.txt /*<Cmd>*
|
||||
<CursorHold> autocmd.txt /*<CursorHold>*
|
||||
<D- intro.txt /*<D-*
|
||||
<D-c> os_mac.txt /*<D-c>*
|
||||
@@ -3923,6 +3938,9 @@ E1112 eval.txt /*E1112*
|
||||
E1113 eval.txt /*E1113*
|
||||
E112 eval.txt /*E112*
|
||||
E113 eval.txt /*E113*
|
||||
E1135 map.txt /*E1135*
|
||||
E1136 map.txt /*E1136*
|
||||
E1137 map.txt /*E1137*
|
||||
E114 eval.txt /*E114*
|
||||
E115 eval.txt /*E115*
|
||||
E116 eval.txt /*E116*
|
||||
@@ -4014,7 +4032,6 @@ E194 message.txt /*E194*
|
||||
E195 starting.txt /*E195*
|
||||
E196 various.txt /*E196*
|
||||
E197 mlang.txt /*E197*
|
||||
E198 options.txt /*E198*
|
||||
E199 cmdline.txt /*E199*
|
||||
E20 motion.txt /*E20*
|
||||
E200 autocmd.txt /*E200*
|
||||
@@ -4100,7 +4117,6 @@ E274 eval.txt /*E274*
|
||||
E275 textprop.txt /*E275*
|
||||
E276 eval.txt /*E276*
|
||||
E277 remote.txt /*E277*
|
||||
E278 popup.txt /*E278*
|
||||
E279 terminal.txt /*E279*
|
||||
E28 syntax.txt /*E28*
|
||||
E280 if_tcl.txt /*E280*
|
||||
@@ -4166,7 +4182,6 @@ E337 gui.txt /*E337*
|
||||
E338 editing.txt /*E338*
|
||||
E339 message.txt /*E339*
|
||||
E34 various.txt /*E34*
|
||||
E340 vi_diff.txt /*E340*
|
||||
E341 message.txt /*E341*
|
||||
E342 message.txt /*E342*
|
||||
E343 options.txt /*E343*
|
||||
@@ -4374,7 +4389,6 @@ E534 options.txt /*E534*
|
||||
E535 options.txt /*E535*
|
||||
E536 options.txt /*E536*
|
||||
E537 options.txt /*E537*
|
||||
E538 options.txt /*E538*
|
||||
E539 options.txt /*E539*
|
||||
E54 pattern.txt /*E54*
|
||||
E540 options.txt /*E540*
|
||||
@@ -5145,10 +5159,14 @@ VIMINIT starting.txt /*VIMINIT*
|
||||
VMS os_vms.txt /*VMS*
|
||||
Vi intro.txt /*Vi*
|
||||
View starting.txt /*View*
|
||||
Vim9 vim9.txt /*Vim9*
|
||||
Vim9-script vim9.txt /*Vim9-script*
|
||||
VimEnter autocmd.txt /*VimEnter*
|
||||
VimLeave autocmd.txt /*VimLeave*
|
||||
VimLeavePre autocmd.txt /*VimLeavePre*
|
||||
VimResized autocmd.txt /*VimResized*
|
||||
VimResume autocmd.txt /*VimResume*
|
||||
VimSuspend autocmd.txt /*VimSuspend*
|
||||
Vimball-copyright pi_vimball.txt /*Vimball-copyright*
|
||||
Virtual-Replace-mode insert.txt /*Virtual-Replace-mode*
|
||||
VisVim if_ole.txt /*VisVim*
|
||||
@@ -5554,6 +5572,10 @@ c_## cmdline.txt /*c_##*
|
||||
c_#< cmdline.txt /*c_#<*
|
||||
c_#n cmdline.txt /*c_#n*
|
||||
c_% cmdline.txt /*c_%*
|
||||
c_%% cmdline.txt /*c_%%*
|
||||
c_%%%# cmdline.txt /*c_%%%#*
|
||||
c_%%< cmdline.txt /*c_%%<*
|
||||
c_%%n cmdline.txt /*c_%%n*
|
||||
c_<BS> cmdline.txt /*c_<BS>*
|
||||
c_<C-Left> cmdline.txt /*c_<C-Left>*
|
||||
c_<C-R> cmdline.txt /*c_<C-R>*
|
||||
@@ -5737,8 +5759,10 @@ characterwise motion.txt /*characterwise*
|
||||
characterwise-register change.txt /*characterwise-register*
|
||||
characterwise-visual visual.txt /*characterwise-visual*
|
||||
charclass() eval.txt /*charclass()*
|
||||
charcol() eval.txt /*charcol()*
|
||||
charconvert_from-variable eval.txt /*charconvert_from-variable*
|
||||
charconvert_to-variable eval.txt /*charconvert_to-variable*
|
||||
charidx() eval.txt /*charidx()*
|
||||
charity uganda.txt /*charity*
|
||||
charset mbyte.txt /*charset*
|
||||
charset-conversion mbyte.txt /*charset-conversion*
|
||||
@@ -6249,6 +6273,7 @@ exepath() eval.txt /*exepath()*
|
||||
exim starting.txt /*exim*
|
||||
exists() eval.txt /*exists()*
|
||||
exiting starting.txt /*exiting*
|
||||
exiting-variable eval.txt /*exiting-variable*
|
||||
exp() eval.txt /*exp()*
|
||||
expand() eval.txt /*expand()*
|
||||
expand-env options.txt /*expand-env*
|
||||
@@ -6326,6 +6351,7 @@ expression-commands eval.txt /*expression-commands*
|
||||
expression-syntax eval.txt /*expression-syntax*
|
||||
exrc starting.txt /*exrc*
|
||||
extend() eval.txt /*extend()*
|
||||
extendnew() eval.txt /*extendnew()*
|
||||
extension-removal cmdline.txt /*extension-removal*
|
||||
extensions-improvements todo.txt /*extensions-improvements*
|
||||
f motion.txt /*f*
|
||||
@@ -6405,7 +6431,26 @@ fname_new-variable eval.txt /*fname_new-variable*
|
||||
fname_out-variable eval.txt /*fname_out-variable*
|
||||
fnameescape() eval.txt /*fnameescape()*
|
||||
fnamemodify() eval.txt /*fnamemodify()*
|
||||
fo-1 change.txt /*fo-1*
|
||||
fo-2 change.txt /*fo-2*
|
||||
fo-B change.txt /*fo-B*
|
||||
fo-M change.txt /*fo-M*
|
||||
fo-] change.txt /*fo-]*
|
||||
fo-a change.txt /*fo-a*
|
||||
fo-b change.txt /*fo-b*
|
||||
fo-c change.txt /*fo-c*
|
||||
fo-j change.txt /*fo-j*
|
||||
fo-l change.txt /*fo-l*
|
||||
fo-m change.txt /*fo-m*
|
||||
fo-n change.txt /*fo-n*
|
||||
fo-o change.txt /*fo-o*
|
||||
fo-p change.txt /*fo-p*
|
||||
fo-q change.txt /*fo-q*
|
||||
fo-r change.txt /*fo-r*
|
||||
fo-t change.txt /*fo-t*
|
||||
fo-table change.txt /*fo-table*
|
||||
fo-v change.txt /*fo-v*
|
||||
fo-w change.txt /*fo-w*
|
||||
fold-behavior fold.txt /*fold-behavior*
|
||||
fold-colors fold.txt /*fold-colors*
|
||||
fold-commands fold.txt /*fold-commands*
|
||||
@@ -6549,7 +6594,7 @@ ft-php-syntax syntax.txt /*ft-php-syntax*
|
||||
ft-php3-syntax syntax.txt /*ft-php3-syntax*
|
||||
ft-phtml-syntax syntax.txt /*ft-phtml-syntax*
|
||||
ft-plaintex-syntax syntax.txt /*ft-plaintex-syntax*
|
||||
ft-posix-synax syntax.txt /*ft-posix-synax*
|
||||
ft-posix-syntax syntax.txt /*ft-posix-syntax*
|
||||
ft-postscr-syntax syntax.txt /*ft-postscr-syntax*
|
||||
ft-ppwiz-syntax syntax.txt /*ft-ppwiz-syntax*
|
||||
ft-printcap-syntax syntax.txt /*ft-printcap-syntax*
|
||||
@@ -6856,6 +6901,7 @@ g:tex_fast syntax.txt /*g:tex_fast*
|
||||
g:tex_flavor filetype.txt /*g:tex_flavor*
|
||||
g:tex_fold_enabled syntax.txt /*g:tex_fold_enabled*
|
||||
g:tex_isk syntax.txt /*g:tex_isk*
|
||||
g:tex_matchcheck syntax.txt /*g:tex_matchcheck*
|
||||
g:tex_no_error syntax.txt /*g:tex_no_error*
|
||||
g:tex_nospell syntax.txt /*g:tex_nospell*
|
||||
g:tex_stylish syntax.txt /*g:tex_stylish*
|
||||
@@ -6929,6 +6975,7 @@ getbufvar() eval.txt /*getbufvar()*
|
||||
getchangelist() eval.txt /*getchangelist()*
|
||||
getchar() eval.txt /*getchar()*
|
||||
getcharmod() eval.txt /*getcharmod()*
|
||||
getcharpos() eval.txt /*getcharpos()*
|
||||
getcharsearch() eval.txt /*getcharsearch()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
@@ -6936,6 +6983,7 @@ getcmdtype() eval.txt /*getcmdtype()*
|
||||
getcmdwintype() eval.txt /*getcmdwintype()*
|
||||
getcompletion() eval.txt /*getcompletion()*
|
||||
getcurpos() eval.txt /*getcurpos()*
|
||||
getcursorcharpos() eval.txt /*getcursorcharpos()*
|
||||
getcwd() eval.txt /*getcwd()*
|
||||
getenv() eval.txt /*getenv()*
|
||||
getfontname() eval.txt /*getfontname()*
|
||||
@@ -7136,6 +7184,7 @@ hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help helphelp.txt /*help*
|
||||
help-context help.txt /*help-context*
|
||||
help-curwin tips.txt /*help-curwin*
|
||||
help-summary usr_02.txt /*help-summary*
|
||||
help-tags tags 1
|
||||
help-translated helphelp.txt /*help-translated*
|
||||
@@ -7745,6 +7794,7 @@ mapmode-s map.txt /*mapmode-s*
|
||||
mapmode-t map.txt /*mapmode-t*
|
||||
mapmode-v map.txt /*mapmode-v*
|
||||
mapmode-x map.txt /*mapmode-x*
|
||||
mapnew() eval.txt /*mapnew()*
|
||||
mapping map.txt /*mapping*
|
||||
mapping-functions usr_41.txt /*mapping-functions*
|
||||
mapset() eval.txt /*mapset()*
|
||||
@@ -8236,9 +8286,12 @@ notation intro.txt /*notation*
|
||||
notepad gui_w32.txt /*notepad*
|
||||
nr2char() eval.txt /*nr2char()*
|
||||
nroff.vim syntax.txt /*nroff.vim*
|
||||
null vim9.txt /*null*
|
||||
null-variable eval.txt /*null-variable*
|
||||
number_relativenumber options.txt /*number_relativenumber*
|
||||
numbered-function eval.txt /*numbered-function*
|
||||
numbermax-variable eval.txt /*numbermax-variable*
|
||||
numbermin-variable eval.txt /*numbermin-variable*
|
||||
numbersize-variable eval.txt /*numbersize-variable*
|
||||
o insert.txt /*o*
|
||||
o_CTRL-V motion.txt /*o_CTRL-V*
|
||||
@@ -8649,6 +8702,7 @@ read-in-close-cb channel.txt /*read-in-close-cb*
|
||||
read-messages insert.txt /*read-messages*
|
||||
read-only-share editing.txt /*read-only-share*
|
||||
read-stdin version5.txt /*read-stdin*
|
||||
readblob() eval.txt /*readblob()*
|
||||
readdir() eval.txt /*readdir()*
|
||||
readdirex() eval.txt /*readdirex()*
|
||||
readfile() eval.txt /*readfile()*
|
||||
@@ -8847,8 +8901,10 @@ set-spc-auto spell.txt /*set-spc-auto*
|
||||
setbufline() eval.txt /*setbufline()*
|
||||
setbufvar() eval.txt /*setbufvar()*
|
||||
setcellwidths() eval.txt /*setcellwidths()*
|
||||
setcharpos() eval.txt /*setcharpos()*
|
||||
setcharsearch() eval.txt /*setcharsearch()*
|
||||
setcmdpos() eval.txt /*setcmdpos()*
|
||||
setcursorcharpos() eval.txt /*setcursorcharpos()*
|
||||
setenv() eval.txt /*setenv()*
|
||||
setfperm() eval.txt /*setfperm()*
|
||||
setline() eval.txt /*setline()*
|
||||
@@ -8912,6 +8968,7 @@ sinh() eval.txt /*sinh()*
|
||||
skeleton autocmd.txt /*skeleton*
|
||||
skip_defaults_vim starting.txt /*skip_defaults_vim*
|
||||
slice eval.txt /*slice*
|
||||
slice() eval.txt /*slice()*
|
||||
slow-fast-terminal term.txt /*slow-fast-terminal*
|
||||
slow-start starting.txt /*slow-start*
|
||||
slow-terminal term.txt /*slow-terminal*
|
||||
@@ -9167,8 +9224,10 @@ synstack() eval.txt /*synstack()*
|
||||
syntax syntax.txt /*syntax*
|
||||
syntax-functions usr_41.txt /*syntax-functions*
|
||||
syntax-highlighting syntax.txt /*syntax-highlighting*
|
||||
syntax-latex syntax.txt /*syntax-latex*
|
||||
syntax-loading syntax.txt /*syntax-loading*
|
||||
syntax-printing usr_06.txt /*syntax-printing*
|
||||
syntax-tex syntax.txt /*syntax-tex*
|
||||
syntax.txt syntax.txt /*syntax.txt*
|
||||
syntax_cmd syntax.txt /*syntax_cmd*
|
||||
sys-file-list help.txt /*sys-file-list*
|
||||
@@ -9305,6 +9364,8 @@ t_f6 version4.txt /*t_f6*
|
||||
t_f7 version4.txt /*t_f7*
|
||||
t_f8 version4.txt /*t_f8*
|
||||
t_f9 version4.txt /*t_f9*
|
||||
t_fd term.txt /*t_fd*
|
||||
t_fe term.txt /*t_fe*
|
||||
t_float-variable eval.txt /*t_float-variable*
|
||||
t_fs term.txt /*t_fs*
|
||||
t_func-variable eval.txt /*t_func-variable*
|
||||
@@ -9527,6 +9588,7 @@ termdebug-prompt terminal.txt /*termdebug-prompt*
|
||||
termdebug-starting terminal.txt /*termdebug-starting*
|
||||
termdebug-stepping terminal.txt /*termdebug-stepping*
|
||||
termdebug-variables terminal.txt /*termdebug-variables*
|
||||
termdebug_disasm_window terminal.txt /*termdebug_disasm_window*
|
||||
termdebug_map_K terminal.txt /*termdebug_map_K*
|
||||
termdebug_popup terminal.txt /*termdebug_popup*
|
||||
termdebug_shortcuts terminal.txt /*termdebug_shortcuts*
|
||||
@@ -9603,6 +9665,7 @@ tex-cole syntax.txt /*tex-cole*
|
||||
tex-conceal syntax.txt /*tex-conceal*
|
||||
tex-error syntax.txt /*tex-error*
|
||||
tex-folding syntax.txt /*tex-folding*
|
||||
tex-matchcheck syntax.txt /*tex-matchcheck*
|
||||
tex-math syntax.txt /*tex-math*
|
||||
tex-morecommands syntax.txt /*tex-morecommands*
|
||||
tex-nospell syntax.txt /*tex-nospell*
|
||||
@@ -9677,6 +9740,7 @@ type-inference vim9.txt /*type-inference*
|
||||
type-mistakes tips.txt /*type-mistakes*
|
||||
typecorr-settings usr_41.txt /*typecorr-settings*
|
||||
typecorr.txt usr_41.txt /*typecorr.txt*
|
||||
typename() eval.txt /*typename()*
|
||||
u undo.txt /*u*
|
||||
uganda uganda.txt /*uganda*
|
||||
uganda.txt uganda.txt /*uganda.txt*
|
||||
@@ -9780,6 +9844,7 @@ v:errmsg eval.txt /*v:errmsg*
|
||||
v:errors eval.txt /*v:errors*
|
||||
v:event eval.txt /*v:event*
|
||||
v:exception eval.txt /*v:exception*
|
||||
v:exiting eval.txt /*v:exiting*
|
||||
v:false eval.txt /*v:false*
|
||||
v:fcs_choice eval.txt /*v:fcs_choice*
|
||||
v:fcs_reason eval.txt /*v:fcs_reason*
|
||||
@@ -9803,6 +9868,8 @@ v:mouse_win eval.txt /*v:mouse_win*
|
||||
v:mouse_winid eval.txt /*v:mouse_winid*
|
||||
v:none eval.txt /*v:none*
|
||||
v:null eval.txt /*v:null*
|
||||
v:numbermax eval.txt /*v:numbermax*
|
||||
v:numbermin eval.txt /*v:numbermin*
|
||||
v:numbersize eval.txt /*v:numbersize*
|
||||
v:oldfiles eval.txt /*v:oldfiles*
|
||||
v:operator eval.txt /*v:operator*
|
||||
@@ -10045,6 +10112,7 @@ vim8 version8.txt /*vim8*
|
||||
vim9 vim9.txt /*vim9*
|
||||
vim9-classes vim9.txt /*vim9-classes*
|
||||
vim9-const vim9.txt /*vim9-const*
|
||||
vim9-curly vim9.txt /*vim9-curly*
|
||||
vim9-declaration vim9.txt /*vim9-declaration*
|
||||
vim9-declarations usr_46.txt /*vim9-declarations*
|
||||
vim9-differences vim9.txt /*vim9-differences*
|
||||
@@ -10052,11 +10120,13 @@ vim9-export vim9.txt /*vim9-export*
|
||||
vim9-final vim9.txt /*vim9-final*
|
||||
vim9-gotchas vim9.txt /*vim9-gotchas*
|
||||
vim9-import vim9.txt /*vim9-import*
|
||||
vim9-namespace vim9.txt /*vim9-namespace*
|
||||
vim9-rationale vim9.txt /*vim9-rationale*
|
||||
vim9-reload vim9.txt /*vim9-reload*
|
||||
vim9-scopes vim9.txt /*vim9-scopes*
|
||||
vim9-script vim9.txt /*vim9-script*
|
||||
vim9-script-intro usr_46.txt /*vim9-script-intro*
|
||||
vim9-types vim9.txt /*vim9-types*
|
||||
vim9-user-command vim9.txt /*vim9-user-command*
|
||||
vim9.txt vim9.txt /*vim9.txt*
|
||||
vim9script vim9.txt /*vim9script*
|
||||
vim: options.txt /*vim:*
|
||||
@@ -10274,6 +10344,7 @@ xterm-command-server term.txt /*xterm-command-server*
|
||||
xterm-copy-paste term.txt /*xterm-copy-paste*
|
||||
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-modifier-keys term.txt /*xterm-modifier-keys*
|
||||
xterm-mouse options.txt /*xterm-mouse*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Apr 19
|
||||
*tagsrch.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -556,7 +556,7 @@ The first format is a normal tag, which is completely compatible with Vi. It
|
||||
is the only format produced by traditional ctags implementations. This is
|
||||
often used for functions that are global, also referenced in other files.
|
||||
|
||||
The lines in the tags file can end in <LF> or <CR><LF>. On the Macintosh <CR>
|
||||
The lines in the tags file can end in <NL> or <CR><NL>. On the Macintosh <CR>
|
||||
also works. The <CR> and <NL> characters can never appear inside a line.
|
||||
|
||||
The second format is new. It includes additional information in optional
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 8.2. Last change: 2020 Apr 12
|
||||
*term.txt* For Vim version 8.2. Last change: 2021 Jan 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -217,6 +217,10 @@ it's different from Alt). They can be combined. Examples: >
|
||||
Another speciality about these codes is that they are not overwritten by
|
||||
another code. That is to avoid that the codes obtained from xterm directly
|
||||
|t_RV| overwrite them.
|
||||
|
||||
Another special value is a termcap entry ending in "@;*X". This is for cursor
|
||||
keys, which either use "CSI X" or "CSI 1 ; modifier X". Thus the "@"
|
||||
stands for either "1" if a modifier follows, or nothing.
|
||||
*xterm-scroll-region*
|
||||
The default termcap entry for xterm on Sun and other platforms does not
|
||||
contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm
|
||||
@@ -369,6 +373,10 @@ Added by Vim (there are no standard codes for these):
|
||||
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_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
|xterm-focus-event|
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
by the termcap option, the middle part is text.
|
||||
@@ -542,6 +550,16 @@ 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),
|
||||
there should be a tick at allow-window-ops.
|
||||
|
||||
*xterm-focus-event*
|
||||
Some terminals including xterm support the focus event tracking feature.
|
||||
If this feature is enabled by the 't_fe' sequence, special key sequences are
|
||||
sent from the terminal to Vim every time the terminal gains or loses focus.
|
||||
Vim fires focus events (|FocusGained|/|FocusLost|) by handling them accordingly.
|
||||
Focus event tracking is disabled by a 't_fd' sequence when exiting "raw" mode.
|
||||
If you would like to disable this feature, add the following to your .vimrc:
|
||||
`set t_fd=`
|
||||
`set t_fe=`
|
||||
|
||||
*termcap-colors*
|
||||
Note about colors: The 't_Co' option tells Vim the number of colors available.
|
||||
When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2020 Sep 04
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -123,12 +123,14 @@ use |:tlmenu| instead of |:tmenu|.
|
||||
|
||||
*options-in-terminal*
|
||||
After opening the terminal window and setting 'buftype' to "terminal" the
|
||||
TerminalOpen autocommand event is triggered. This makes it possible to set
|
||||
options specifically for the window and buffer. Example: >
|
||||
au TerminalOpen * if &buftype == 'terminal' | setlocal bufhidden=hide | endif
|
||||
The <abuf> is set to the terminal buffer, but if there is no window (hidden
|
||||
terminal) then setting options will happen in the wrong buffer, therefore the
|
||||
check for &buftype in the example.
|
||||
|TerminalWinOpen| autocommand event is triggered. This makes it possible to set
|
||||
options specifically for the terminal window and buffer. Example: >
|
||||
au TerminalWinOpen * setlocal bufhidden=hide
|
||||
|
||||
There is also the |TerminalOpen| event, but this may be triggered for a hidden
|
||||
terminal, and the current window and buffer may not be for the new terminal.
|
||||
You need to use <abuf>, which is set to the terminal buffer. Example: >
|
||||
au TerminalOpen * call setbufvar(+expand('<abuf>'), '&colorcolumn', 123)
|
||||
|
||||
Mouse events (click and drag) are passed to the terminal. Mouse move events
|
||||
are only passed when Vim itself is receiving them. For a terminal that is
|
||||
@@ -503,6 +505,8 @@ term_dumpdiff({filename}, {filename} [, {options}])
|
||||
a different attribute
|
||||
+ missing position in first file
|
||||
- missing position in second file
|
||||
> cursor position in first file, not in second
|
||||
< cursor position in second file, not in first
|
||||
|
||||
Using the "s" key the top and bottom parts are swapped. This
|
||||
makes it easy to spot a difference.
|
||||
@@ -738,6 +742,9 @@ term_setapi({buf}, {expr}) *term_setapi()*
|
||||
The default is "Tapi_". When {expr} is an empty string then
|
||||
no |terminal-api| function can be used for {buf}.
|
||||
|
||||
When used as a method the base is used for {buf}: >
|
||||
GetBufnr()->term_setapi({expr})
|
||||
|
||||
term_setansicolors({buf}, {colors}) *term_setansicolors()*
|
||||
Set the ANSI color palette used by terminal {buf}.
|
||||
{colors} must be a List of 16 valid color names or hexadecimal
|
||||
@@ -1323,6 +1330,8 @@ Other commands ~
|
||||
*:Program* jump to the window with the running program
|
||||
*:Source* jump to the window with the source code, create it if there
|
||||
isn't one
|
||||
*:Asm* jump to the window with the disassembly, create it if there
|
||||
isn't one
|
||||
|
||||
|
||||
Prompt mode ~
|
||||
@@ -1345,6 +1354,12 @@ Prompt mode can be used even when the |+terminal| feature is present with: >
|
||||
The K key is normally mapped to :Evaluate. If you do not want this use: >
|
||||
let g:termdebug_map_K = 0
|
||||
|
||||
<
|
||||
*termdebug_disasm_window*
|
||||
If you want the Asm window shown by default, set this to 1. Setting to
|
||||
any value greater than 1 will set the Asm window height to that value: >
|
||||
let g:termdebug_disasm_window = 15
|
||||
<
|
||||
|
||||
Communication ~
|
||||
*termdebug-communication*
|
||||
@@ -1411,16 +1426,18 @@ If you don't want this then disable it with: >
|
||||
|
||||
Vim window width *termdebug_wide*
|
||||
|
||||
To change the width of the Vim window when debugging starts, and use a
|
||||
vertical split: >
|
||||
let g:termdebug_wide = 163
|
||||
This will set &columns to 163 when `:Termdebug` is used. The value is restored
|
||||
when quitting the debugger.
|
||||
If g:termdebug_wide is set and &columns is already larger than
|
||||
g:termdebug_wide then a vertical split will be used without changing &columns.
|
||||
Set it to 1 to get a vertical split without every changing &columns (useful
|
||||
for when the terminal can't be resized by Vim).
|
||||
To change the width of the Vim window when debugging starts and use a vertical
|
||||
split: >
|
||||
let g:termdebug_wide = 163
|
||||
|
||||
This will set 'columns' to 163 when `:Termdebug` is used. The value is
|
||||
restored when quitting the debugger.
|
||||
|
||||
If g:termdebug_wide is set and 'columns' is already a greater value, then a
|
||||
vertical split will be used without modifying 'columns'.
|
||||
|
||||
Set g:termdebug_wide to 1 to use a vertical split without ever changing
|
||||
'columns'. This is useful when the terminal can't be resized by Vim.
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Sep 06
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -308,8 +308,11 @@ assert_fails({cmd} [, {error} [, {msg} [, {lnum} [, {context}]]]])
|
||||
first reported error: >
|
||||
assert_fails('cmd', ['E987:.*expected bool'])
|
||||
< The second pattern, if present, is matched against the last
|
||||
reported error. To only match the last error use an empty
|
||||
string for the first error: >
|
||||
reported error.
|
||||
If there is only one error then both patterns must match. This
|
||||
can be used to check that there is only one error.
|
||||
To only match the last error use an empty string for the first
|
||||
error: >
|
||||
assert_fails('cmd', ['', 'E987:'])
|
||||
<
|
||||
If {msg} is empty then it is not used. Do this to get the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*tips.txt* For Vim version 8.2. Last change: 2009 Nov 07
|
||||
*tips.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -30,6 +30,7 @@ Executing shell commands in a window |shell-window|
|
||||
Hex editing |hex-editing|
|
||||
Using <> notation in autocommands |autocmd-<>|
|
||||
Highlighting matching parens |match-parens|
|
||||
Opening help in the current window |help-curwin|
|
||||
|
||||
==============================================================================
|
||||
Editing C programs *C-editing*
|
||||
@@ -530,4 +531,28 @@ A slightly more advanced version is used in the |matchparen| plugin.
|
||||
autocmd InsertEnter * match none
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
Opening help in the current window *help-curwin*
|
||||
|
||||
By default, help is displayed in a split window. If you prefer it opens in
|
||||
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
|
||||
execute mods .. ' help'
|
||||
execute mods .. ' helpclose'
|
||||
let s:did_open_help = v:true
|
||||
endif
|
||||
if !getcompletion(a:subject, 'help')->empty()
|
||||
execute mods .. ' edit ' .. &helpfile
|
||||
endif
|
||||
return 'help ' .. a:subject
|
||||
endfunction
|
||||
<
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2020 Nov 04
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,67 +38,57 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
test_vim9_func fails: type from default value not used.
|
||||
|
||||
Without extra sleeps netbeans test has valgrind errors.
|
||||
PR #7248 from Yegappan - test doesn't fail without code changes
|
||||
|
||||
Making everything work:
|
||||
- Closure argument call should not always set varargs, like any function call?
|
||||
- Invoke user command in a :def function
|
||||
- Make map() give an error if the resulting type is wrong.
|
||||
Add mapnew() or mapcopy() to create a new List/Dict for the result, which
|
||||
can have a different value type.
|
||||
- Error message for "'yes && 0" is "using String as a Number", should be "using
|
||||
String as a Bool".
|
||||
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
|
||||
- In autocmd: use legacy syntax, not whatever the current script uses?
|
||||
- need to check type when a declaration specifies a type: #6507
|
||||
let nr: number = 'asdf'
|
||||
- Check many more builtin function arguments at compile time.
|
||||
- Make sure that in vim9script a function call without namespace only finds
|
||||
the script-local function, not a global one.
|
||||
- Make sure that where a callback is expected a function can be used (without
|
||||
quotes). E.g. sort() and map(). Also at the script level.
|
||||
- assignment to more complex lval: list[1][2][3] = 8
|
||||
Also "list[0] += value". test in Test_assign_dict_unknown_type().
|
||||
- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
|
||||
Add command to parse range at runtime?
|
||||
- When defining an :autocmd or :command, how to specify using Vim9 syntax?
|
||||
- always do this when defined in a Vim9 script
|
||||
- add some command modifier.
|
||||
- For an :autocmd and :command argument, if a following line starts with "|"
|
||||
append it. It's like line continuation. (#6702)
|
||||
- Implement "export {one, two three}".
|
||||
- ISN_CHECKTYPE could use check_argtype()
|
||||
- give error for variable name:
|
||||
let p = function('NoSuchFunc')
|
||||
- If a :def function is called with a function reference, compile it to get
|
||||
the function type.
|
||||
def Filter(x: string, Cond: func(string): bool)
|
||||
Filter(x, { v -> v =~ '^b' })
|
||||
Vim9 - Make everything work:
|
||||
- Add a test for profiling with nested function calls and lambda.
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
- Test that a function defined inside a :def function is local to that
|
||||
function, g: functions can be defined and script-local functions cannot be
|
||||
defined.
|
||||
- Does this work already: can use func as reference:
|
||||
def SomeFunc() ...
|
||||
map(list, SomeFunc)
|
||||
- Unlet with range: "unlet list[a : b]"
|
||||
- Implement "export {one, two three}".
|
||||
- ISN_CHECKTYPE could use check_argtype()
|
||||
- Using a script variable inside a :def function doesn't work if the variable
|
||||
is inside a block, see Test_nested_function(). Should it work?
|
||||
- give error for variable name:
|
||||
var p = function('NoSuchFunc')
|
||||
- Make closures work better:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- If a :def function is called with a function reference, compile it to get
|
||||
the function type.
|
||||
def Filter(x: string, Cond: func(string): bool)
|
||||
Filter(x, (v) => v =~ '^b')
|
||||
- Make inline function work, to be used as a funcref:
|
||||
var Ref = (arg: type): type => {
|
||||
statement
|
||||
return expr
|
||||
}
|
||||
var Ref = (arg: type) => {
|
||||
statement
|
||||
statement
|
||||
}
|
||||
- For builtin functions using tv_get_string*() use check_for_string() to be
|
||||
more strict about the argument type.
|
||||
- Implement :lockvar and :unlockvar. How about local variables? Perhaps only
|
||||
allow this for global variables. Use :final or :const otherwise.
|
||||
- Allow function names that will be script-local to start with lower case
|
||||
letter? Or also require names with s: prefix to use upper case?
|
||||
Also apply this function references "var ref = SomeFunc"
|
||||
- Support passing v:none to use the default argument value. (#6504)
|
||||
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
|
||||
- Check many more builtin function arguments at compile time.
|
||||
- make 0 == 'string' fail on the script level, like inside :def.
|
||||
- Check that when using a user function name without prefix, it does not find
|
||||
a global function. Prefixing g: is required.
|
||||
- Compile: for [key, value] in items(map)
|
||||
- Assignment to dict doesn't work:
|
||||
let ret: dict<string> = #{}
|
||||
ret[i] = string(i)
|
||||
- Appending to dict item doesn't work:
|
||||
let d[i] ..= value
|
||||
- Need the equivalent of get_lval() and set_var_lval() to implement assignment
|
||||
to nested list and dict members.
|
||||
- Assignment to dict doesn't work:
|
||||
var ret: dict<string> = #{}
|
||||
ret[i] = string(i)
|
||||
- Appending to dict item doesn't work:
|
||||
var d[i] ..= value
|
||||
- Using ".." at script level doesn't convert arguments to a string.
|
||||
- Compile replacement of :s command: s/pat/\=expr/
|
||||
- Compile redir to local variable: var_redir_start().
|
||||
- Implement type cast at the script level.
|
||||
- Compile builtin functions that access local variables:
|
||||
islocked()
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
@@ -106,56 +96,60 @@ Making everything work:
|
||||
- Implement "as Name" in "import Item as Name from ..."
|
||||
- Implement using imported items at script level from "import * as X" in
|
||||
eval_variable(). Should pass the ".xxx" that follows and return that.
|
||||
- Disallow unlet for local/script/imported vars
|
||||
- Make "++nr" work.
|
||||
- Make closures work:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- nested closure only uses one context, not all (#7150)
|
||||
- Make "++nr" work. "++g:count" doesn't work, thinks it is a range.
|
||||
- Reload: How to make sure type of script function hasn't changed?
|
||||
- expandcmd() with `=expr` in filename uses legacy expression.
|
||||
- eval_expr() in ex_cexpr()
|
||||
- eval_expr() call in dbg_parsearg() and debuggy_find()
|
||||
- has() is compiled as a constant, but some checks are dynamic.
|
||||
Check for dynamic values, such as "gui_running".
|
||||
New syntax and functionality:
|
||||
Improve error checking:
|
||||
- "echo Func()" is an error if Func() does not return anything.
|
||||
Also:
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
- compile "skip" argument of searchpair()
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- give an error for "echo Func()" if Func() does not return anything.
|
||||
- Using "windo echo expr" does not accept a line break inside "expr" (in a
|
||||
:def function and at script level in a not executed block). #7681
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
- Add all the error numbers in a good place in documentation.
|
||||
- In the generic eval docs, point out the Vim9 syntax where it differs.
|
||||
|
||||
Also for Vim9:
|
||||
- better implementation for partial and tests for that.
|
||||
- Make "g:imported = Export.exported" work in Vim9 script.
|
||||
- Make Foo.Bar() work to call the dict function. (#5676)
|
||||
- Error in any command in "vim9script" aborts sourcing.
|
||||
- Find a way to test expressions in legacy and Vim9 script without duplication
|
||||
- Test each level of expressions properly, with type checking
|
||||
- Test try/catch and throw better, also nested.
|
||||
Test return inside try/finally jumps to finally and then returns.
|
||||
- Test: Function declared inside a :def function is local, disappears at the
|
||||
end of the function. Unless g: is used, just like with variables.
|
||||
- implement :type
|
||||
- import type declaration?
|
||||
- Future work: See |vim9-classes|
|
||||
- implement enum
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varags idx)
|
||||
- Make debugging work - at least per function. Need to recompile a function
|
||||
to step through it line-by-line? Evaluate the stack and variables on the
|
||||
stack?
|
||||
- Make profiling work - Add ISN_PROFILE instructions after every line?
|
||||
- List commands when 'verbose' is set or :verbose is used.
|
||||
Further improvements:
|
||||
Test that return inside try/finally jumps to finally and then returns.
|
||||
- Test that a function defined inside a :def function is local to that
|
||||
function, g: functions can be defined and script-local functions cannot be
|
||||
defined.
|
||||
- compile options that are an expression, e.g. "expr:" in 'spellsuggest',
|
||||
'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
|
||||
'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'.
|
||||
- Make inline function work, to be used as a funcref:
|
||||
let ref = def(arg: type): rettype
|
||||
body
|
||||
enddef
|
||||
Give an error if compilation fails. (#7625)
|
||||
Use the location where the option was set for deciding whether it's to be
|
||||
evaluated in Vim9 script context.
|
||||
- implement :type; import type declaration.
|
||||
- implement enum; import enum.
|
||||
- Future work: See |vim9-classes|
|
||||
Define the keywords and commands to make sure it will be backwards
|
||||
compatible.
|
||||
- Make debugging work - at least per function. Need to recompile a function
|
||||
to step through it line-by-line? Evaluate the stack and variables on the
|
||||
stack?
|
||||
- List commands when 'verbose' is set or :verbose is used.
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
- inline call to map() and filter()
|
||||
- compile "skip" argument of searchpair()
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varargs idx)
|
||||
|
||||
|
||||
Popup windows:
|
||||
- Add a flag to make a popup window focusable?
|
||||
@@ -163,7 +157,6 @@ Popup windows:
|
||||
current window.
|
||||
? - switch between current window and all popup windows
|
||||
Esc in popup window goes back to previous current window
|
||||
- Cursor not updated before a redraw, making it jump. (#5943)
|
||||
- Add a termcap entry for changing the cursor when it goes under the popup and
|
||||
back. like t_SI and t_EI (t_SU and t_EU, where "U" means under?)
|
||||
- With terminal in popup, allow for popup_hide() to temporarily hide it.?
|
||||
@@ -188,11 +181,16 @@ Popup windows:
|
||||
- Figure out the size and position better if wrapping inserts indent
|
||||
|
||||
Text properties:
|
||||
- :goto does not go to the right place when text properties are present.
|
||||
(#5930)
|
||||
- Popup attached to text property stays visible when text is no longer
|
||||
visible. (#7736)
|
||||
- Popup attached to text property stays visible when text is deleted with
|
||||
"cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
|
||||
line.
|
||||
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
||||
- Combining text property with 'cursorline' does not always work (Billie
|
||||
Cleek, #5533)
|
||||
- Should we let the textprop highlight overrule other (e.g. diff) highlight if
|
||||
the priority is above a certain value? (#7392)
|
||||
- See remarks at top of src/textprop.c
|
||||
|
||||
'incsearch' with :s:
|
||||
@@ -227,6 +225,7 @@ Terminal debugger:
|
||||
with another Vim instance.
|
||||
|
||||
Terminal emulator window:
|
||||
- Can escape a terminal popup with win_gotoid(), should be an error
|
||||
- No support for underline color, t_8u.
|
||||
- When in terminal-Normal mode when the job finishes, the cursor jumps to the
|
||||
end but the window is not updated. This only happens when typing "a".
|
||||
@@ -247,7 +246,6 @@ Terminal emulator window:
|
||||
be redrawn.
|
||||
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
|
||||
(#3327)
|
||||
- GUI: hang until key typed. (#3530)
|
||||
- Allow for specifying the directory, with ++cwd={dir}.
|
||||
- With a vertical split only one window is updated. (Linwei, 2018 Jun 2,
|
||||
#2977)
|
||||
@@ -269,7 +267,9 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Error numbers available: E653
|
||||
Valgind reports memory leaks in test_options
|
||||
|
||||
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
@@ -279,8 +279,14 @@ Have another look at the implementation.
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally written by Felipe Morales.
|
||||
|
||||
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
|
||||
(#4087) Did patch 8.2.2379 help?
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
Scroll doesn't work correctly, why?
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
|
||||
@@ -295,15 +301,24 @@ 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
|
||||
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
Scroll doesn't work correctly, why?
|
||||
|
||||
Expanding <mods> should put the tab number from cmdmod.tab before "tab".
|
||||
Any way to convert "$" back by using a special value? (#6901)
|
||||
|
||||
Can we detect true color support? https://gist.github.com/XVilka/8346728
|
||||
Try setting a color then request the current color, like using t_u7.
|
||||
|
||||
Regexp to search for duplicate lines does not work correctly:
|
||||
/\(^.*\n\)\1 (Chris Morgan, #6239)
|
||||
|
||||
Changing a capturing group to non-capturing changes the result: #7607
|
||||
:echo matchstr('aaa bbb', '\(.\{-1,}\>\)\|.*')
|
||||
aaa
|
||||
:echo matchstr('aaa bbb', '\%(.\{-1,}\>\)\|.*')
|
||||
aaa bbb
|
||||
Should also work without any group:
|
||||
:echo matchstr('aaa bbb', '.\{-1,}\>\|.*')
|
||||
aaa bbb (should be aaa)
|
||||
|
||||
Check out PR #543 (Roland Puntaier).
|
||||
Patch for multibyte characters in langmap and applying a mapping on them.
|
||||
(Christian Brabandt, 2015 Jun 12, update July 25)
|
||||
@@ -326,6 +341,9 @@ autocommands for the buffer lifecycle:
|
||||
BufIsRenamed (after buffer ID gets another name)
|
||||
The buffer list and windows are locked, no changes possible
|
||||
|
||||
Add a ModeChanged autocommand that has an argument indicating the old and new
|
||||
mode, as what's returned from mode(). Also used for switching Terminal mode.
|
||||
|
||||
Matchparen doesn't remove highlight after undo. (#7054)
|
||||
Is OK when syntax HL is active.
|
||||
|
||||
@@ -348,6 +366,8 @@ Patch to make :q work with local arglist. (Christian Brabandt, #6286)
|
||||
|
||||
Why does Test_invalid_sid() not work in the GUI?
|
||||
|
||||
":pedit" ignores the local working directory when 'pvp' is set (#7267)
|
||||
|
||||
Lua: updating wrong buffer when using newly created, unloaded buffer.
|
||||
(#6539)
|
||||
|
||||
@@ -355,10 +375,6 @@ When "+ register is set then "" points to it. If another Vim grabs the "+
|
||||
register, then "" doesn't contain anything. Make it still follow "+.
|
||||
(#6435)
|
||||
|
||||
Patch to fix drawing error with DirectX. (James Grant, #5688)
|
||||
Causes flicker on resizing. Workaround from Ken Takata.
|
||||
How about only setting the attribute when part of the Vim window is offscreen?
|
||||
|
||||
File marks merging has duplicates since 7.4.1925. (Ingo Karkat, #5733)
|
||||
|
||||
"make test_gui" crashed in submenu_change(). Fix and remove workaround in
|
||||
@@ -384,9 +400,6 @@ corruption. (#6631)
|
||||
When 'lazyredraw' is set sometimes the title is not updated.
|
||||
(Jason Franklin, 2020 Feb 3) Looks like a race condition.
|
||||
|
||||
Regexp to search for duplicate lines does not work correctly:
|
||||
/\(^.*\n\)\1 (Chris Morgan, #6239)
|
||||
|
||||
With bash ":make" does not set v:shell_error. Possible solution: set
|
||||
'shellpipe' to "2>&1| tee %s; exit ${PIPESTATUS[0]}" #5994
|
||||
|
||||
@@ -417,9 +430,6 @@ Another spurious BufDelete. (Dani Dickstein, #5701)
|
||||
|
||||
Wrong error when using local arglist. (Harm te Hennepe, #6133)
|
||||
|
||||
Request to support <Cmd> in mappings, similar to how Neovim does this.
|
||||
(Daniel Hahler, #4784)
|
||||
|
||||
Test loose_clipboard() by selecting text before suspending.
|
||||
|
||||
Undo puts cursor in wrong line after "cG<Esc>" undo.
|
||||
@@ -441,9 +451,6 @@ Also put :argadd commands at the start for all buffers, so that their order
|
||||
remains equal? Then %argdel to clean it up. Do try this with 'hidden' set.
|
||||
Also #5326: netrw buffers are not restored.
|
||||
|
||||
Alternate file is not set in the session file. Use setwintabvar("@#") ?
|
||||
(#6714)
|
||||
|
||||
When 'backupdir' has a path ending in double slash (meaning: use full path of
|
||||
the file) combined with 'patchmode' the file name is wrong. (#5791)
|
||||
|
||||
@@ -461,12 +468,6 @@ Help for ":argadd fname" says that if "fname" is already in the argument list
|
||||
that entry is used. But instead it's always added. (#6210)
|
||||
Add flag AL_FIND_ADD, if there is one argument find it in the list.
|
||||
|
||||
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
|
||||
(#4087)
|
||||
|
||||
behavior of i_CTRl-R_CTRL-R differs from documentation. (Paul Desmond Parker,
|
||||
#5771)
|
||||
|
||||
":bnext" in a help buffer is supposed to go to the next help buffer, but it
|
||||
goes to any buffer, and then :bnext skips help buffers, since they are
|
||||
unlisted. (#4478)
|
||||
@@ -478,9 +479,6 @@ find them. (Max Kukartsev, #6218)
|
||||
|
||||
Enable 'termbidi' if $VTE_VERSION >= 5703 ?
|
||||
|
||||
Universal solution to detect if t_RS is working, using cursor position.
|
||||
Koichi Iwamoto, #2126
|
||||
|
||||
Sound: support on Mac? Or does libcanberra work there?
|
||||
|
||||
Python 3.8 doesn't work. (Antonios Hadjigeorgalis, #5509)
|
||||
@@ -493,15 +491,8 @@ support combining characters. (Charles Campbell) Also #4687
|
||||
Output from assert_equalfile() doesn't give a hint about what's different.
|
||||
Assuming the files are text, print the line with the difference.
|
||||
|
||||
Add "t" action to settagstack(): truncate and add new entries. (#5405)
|
||||
|
||||
When 'relativenumber' is set the line just below a diff change doesn't get
|
||||
updated. (#6138)
|
||||
|
||||
Result of synID() sometimes wrong in help files. (#5252)
|
||||
|
||||
Status line is nut updated when splitting windows. (Marcin Szamotulski, #5496)
|
||||
|
||||
Problem showing a line if the number column width changes when using "o".
|
||||
(Mateusz Morusiewicz, #4245)
|
||||
|
||||
@@ -514,9 +505,6 @@ with packages under "start". (xtal8, #1994)
|
||||
Patch to add new motion ]( and ]{. (Yasuhiro Matsumoto, #5320)
|
||||
Better: use the "z" prefix. or ]t) and [t(.
|
||||
|
||||
Modeless selection doesn't work in gvim. (#4783)
|
||||
Caused by patch 8.1.1534.
|
||||
|
||||
Visual highlight not removed when 'display' is "lastline" and line doesn't
|
||||
fit. (Kevin Lawler, #4457)
|
||||
|
||||
@@ -527,9 +515,6 @@ Does not build with MinGW out of the box:
|
||||
- WINVER conflict, should use 0x0600 by default?
|
||||
- INT_MAX not defined: need to include <limits.h> in vim.h
|
||||
|
||||
Crash when mixing matchadd and substitute()? (Max Christian Pohle, 2018 May
|
||||
13, #2910) Can't reproduce?
|
||||
|
||||
Display messed up with matchparen, wrapping and scrolling. (#5638)
|
||||
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
|
||||
|
||||
@@ -538,14 +523,6 @@ when "qq" is mapped and after the first "q" the mouse is moved outside of the
|
||||
gvim window (with focus follows mouse), then the K_FOCUSLOST key is put in the
|
||||
input buffer. (#5302)
|
||||
|
||||
xterm should be able to pass focus changes to Vim, so that Vim can check for
|
||||
buffers that changed. Perhaps in misc.c, function selectwindow().
|
||||
Xterm 224 supports it!
|
||||
Patch to make FocusGained and FocusLost work in modern terminals. (Hayaki
|
||||
Saito, 2013 Apr 24) Update 2016 Aug 12.
|
||||
Also see issue #609.
|
||||
We could add the enable/disable sequences to t_ti/t_te or t_ks/t_ke.
|
||||
|
||||
:buffer completion does not escape "+" properly and results in a regexp error.
|
||||
(#5467)
|
||||
|
||||
@@ -564,16 +541,10 @@ Patch to add the :bvimgrep command. (Christian Brabandt, 2014 Nov 12)
|
||||
Updated 2016 Jun 10, #858 Update 2017 Mar 28: use <buffer>.
|
||||
Better use ":bufgrep" ?
|
||||
|
||||
Errors found with random data:
|
||||
heap-buffer-overflow in alist_add (#2472)
|
||||
|
||||
Improve fallback for menu translations, to avoid having to create lots of
|
||||
files that source the actual file. E.g. menu_da_de -> menu_da
|
||||
Include part of #3242?
|
||||
|
||||
When a terminal exit_cb closes the window, a following typed key is lost, if
|
||||
it's in a mapping. (2018 Oct 6, #2302, #3522)
|
||||
|
||||
Patch to have text objects defined by arbitrary single characters. (Daniel
|
||||
Thau, 2013 Nov 20, 2014 Jan 29, 2014 Jan 31)
|
||||
Added tests (James McCoy, 2016 Aug 3, #958). Still needs more work.
|
||||
@@ -586,11 +557,6 @@ Williams, 2018 Oct 30)
|
||||
|
||||
'[ mark in wrong column after put. (#4776)
|
||||
|
||||
"exepath('bin/cmd')" does not work while ":!bin/cmd" does work.
|
||||
(Daniel Hahler, #4710) and executable('bin/cmd') returns 1
|
||||
|
||||
Error drawing the number column when 'cursorline' is set. (#3893)
|
||||
|
||||
Problem with :tlmenu: Detach item added with all modes? Issue #3563.
|
||||
|
||||
Add an argument to expandcmd() to expand like ":next" does.
|
||||
@@ -660,13 +626,42 @@ Should we include some part of pull request #4505, not increment changedtick
|
||||
in some cases? E.g. for ":write" when the changed flag was already off, the
|
||||
buffer didn't change at all.
|
||||
|
||||
Line numbers in profile are off when function was defined with ":execute".
|
||||
(Daniel Hahler, #4511)
|
||||
|
||||
Session file contains absolute paths when "curdir" is removed form
|
||||
'sessionoptions', making it impossible to have a session with a relative path.
|
||||
(#4450)
|
||||
|
||||
Session file only contains local option values for buffers that are in a
|
||||
window, not other buffers. (#7532)
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
change "edit fname" of first buffer to "hide edit fname"
|
||||
skip "badd fname" if "fname" is already in the buffer list
|
||||
remove remark about unloading buffers from documentation
|
||||
|
||||
When session file has name in argument list but the buffer was deleted, the
|
||||
buffer is not deleted when using the session file. (#1393)
|
||||
Should add the buffer in hidden state.
|
||||
|
||||
When a session file is created and there are "nofile" buffers, these are not
|
||||
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
|
||||
initial empty buffer better. (ZyX, 2015 March 8)
|
||||
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
Directory wrong in session file, caused by ":lcd" in BufEnter autocommand.
|
||||
(Felix Kater, 2009 Mar 3)
|
||||
|
||||
Something wrong with session that has "cd" commands and "badd", in such a way
|
||||
that Vim doesn't find the edited file in the buffer list, causing the
|
||||
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
|
||||
Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
|
||||
|
||||
'foldcolumn' in modeline applied to wrong window when using a session. (Teemu
|
||||
Likonen, March 19)
|
||||
|
||||
When using a timer callback vgetc_busy is reset, allowing for using input().
|
||||
But in a channel callback this does not happen. We need to do something
|
||||
similar to check_due_timer(). Also see #3809.
|
||||
@@ -693,9 +688,6 @@ a hint about how to fix it. (#4300)
|
||||
|
||||
Make balloon_show() work outside of 'balloonexpr'? Users expect it to work:
|
||||
#2948. (related to #1512?)
|
||||
On Win32 it stops showing, because showState is already ShS_SHOWING.
|
||||
balloon_show() does not work properly in the terminal. (Ben Jackson, 2017 Dec
|
||||
20, #2481)
|
||||
Also see #2352, want better control over balloon, perhaps set the position.
|
||||
Should also be possible to add highlighting, like in the status line?
|
||||
balloonexpr() on MS-Windows GUI doesn't handle accented chars? (nivaemail,
|
||||
@@ -721,12 +713,6 @@ Redo only remembers the last change. Could use "{count}g." to redo an older
|
||||
change. How does the user know which change? At least have a way to list
|
||||
them: ":repeats". Add to history, like search history and command line history.
|
||||
|
||||
Incsearch test fails when locale is "C". (Dominique Pelle, #3986)
|
||||
Also run all tests with C locale?
|
||||
|
||||
"vat" doesn't work well on XML when the closing > is on another line.
|
||||
#3927
|
||||
|
||||
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
|
||||
Related to bracketed paste. I cannot reproduce it.
|
||||
|
||||
@@ -745,8 +731,6 @@ Some xterm responses are not properly handled: (Markus Gömmel, 2019 Apr 1)
|
||||
Using CTRL-L to add a character to the search string that contains \v,
|
||||
punctuation is repeated. (Smylers, 2018 Nov 17, #3621)
|
||||
|
||||
ml_get error: (Israel Chauca Fuentes, 2018 Oct 17, #3550).
|
||||
|
||||
Using single wide base character with double wide composing character gives
|
||||
drawing errors. Fill up the base character? (Dominique, #4328)
|
||||
|
||||
@@ -773,6 +757,7 @@ Make ":interactive !cmd" stop termcap mode, also when used in an autocommand.
|
||||
|
||||
Add buffer argument to undotree(). (#4001)
|
||||
|
||||
Memory leak in test_debugger
|
||||
Using uninitialized value in test_crypt (can't explain why).
|
||||
Memory leak in test_terminal_fail
|
||||
TODO: be able to run all parts of test_alot with valgrind separately
|
||||
@@ -780,8 +765,6 @@ Memory leak in test_alot with pyeval() (allocating partial)
|
||||
Memory leak in test_alot with expand()
|
||||
Memory leaks in test_channel? (or is it because of fork())
|
||||
|
||||
gethostbyname() is old, use getaddrinfo() if available. (#3227)
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
@@ -801,22 +784,15 @@ Problem with Visual yank when 'linebreak' and 'showbreak' are set.
|
||||
Patch with tests, but it's not clear how it is supposed to work. (tommm, 2018
|
||||
Nov 17) Asked about this, Dec 22. Christian will have a look.
|
||||
|
||||
Patch to fix that using "5gj" starting inside a closed fold does not work on
|
||||
screen lines but on text lines. (Julius Hulsmann, #4095) Lacks a test.
|
||||
|
||||
home_replace() uses $HOME instead of "homedir". (Cesar Martins, 2018 Aug 9)
|
||||
|
||||
When the status line uses term_gettitle(), it does not get updated when the
|
||||
terminal title changes. (Josh Triplett, 2018 Sep 9, #3418)
|
||||
How would we know that the status line needs to be updated?
|
||||
|
||||
Adjust windows installer explanation of behavior. (scootergrisen, #3310)
|
||||
|
||||
Update for xim-input-style help (Tony Mechelynck, 2019 Jan 10).
|
||||
Feedback from someone who uses this?
|
||||
|
||||
ml_get error. (Dominique Pelle, 2018 Sep 14, #3434)
|
||||
|
||||
Only output t_Cs when t_Ce is also set. do not use Cs and Ce termcap entries. (Daniel Hahler, 2018 Sep 25)
|
||||
Add t_cS and t_cR for cursor color select and reset. Use Cs and Cr terminfo
|
||||
values.
|
||||
@@ -839,48 +815,22 @@ includes the first screen line. (2018 Aug 23, #3368)
|
||||
Refactored HTML indent file. (Michael Lee, #1821)
|
||||
Asked to write a test.
|
||||
|
||||
MS-Windows: .lnk file not resolved properly when 'encoding' is set.
|
||||
(lkintact, 2018 Sep 22, #3473)
|
||||
|
||||
Merge checking for 'cursorline' and 'concealcursor', see neovim #9492.
|
||||
|
||||
Display error when a conceal match uses '\%>1l'. (#4854)
|
||||
|
||||
Add a windowID argument to placing a sign, so that it only shows up in one
|
||||
window for the buffer.
|
||||
|
||||
Request to add sign_setlist() to make it faster to add a lot of signs, e.g.
|
||||
when adding a sign for every quickfix entry. (#4557)
|
||||
|
||||
Win32 key codes are messy. Mike Williams tried to fix that, but now old
|
||||
mappings no longer work. Create a new terminal for the better solution?
|
||||
|
||||
Script generated by :mksession does not work well if there are windows with
|
||||
modified buffers
|
||||
change "silent only" into "silent only!"
|
||||
change "edit fname" of first buffer to "hide edit fname"
|
||||
skip "badd fname" if "fname" is already in the buffer list
|
||||
remove remark about unloading buffers from documentation
|
||||
|
||||
Compiler warnings (geeknik, 2017 Oct 26):
|
||||
- signed integer overflow in do_sub() (#2249)
|
||||
- signed integer overflow in get_address() (#2248)
|
||||
- signed integer overflow in getdecchrs() (#2254)
|
||||
- undefined left shift in get_string_tv() (#2250)
|
||||
|
||||
Win32 console: <F11> and <F12> typed in Insert mode don't result in normal
|
||||
characters. (#3246)
|
||||
|
||||
'foldtext' is evaluated too often. (Daniel Hahler, #2773)
|
||||
|
||||
Add Native language protocol server (LSP) support. (Yegappan Lakshmanan, 2018
|
||||
Oct 28)
|
||||
|
||||
ml_get error when using a Python script. (Yggdroot, 2017 Jun 1, #1737)
|
||||
Lemonboy can reproduce (2017 Jun 5)
|
||||
Also reproduced by Benjamin Doherty, 2018 Oct 4.
|
||||
Simpler way: Ken Takata, Oct 6.
|
||||
|
||||
Add more testing of the GTK GUI.
|
||||
- gtk_test_widget_click() can be used to simulate a click in a widget.
|
||||
|
||||
@@ -903,9 +853,6 @@ Try out background make plugin:
|
||||
or asyncmake:
|
||||
https://github.com/yegappan/asyncmake
|
||||
|
||||
Add a ModeChanged autocommand that has an argument indicating the old and new
|
||||
mode, as what's returned from mode(). Also used for switching Terminal mode.
|
||||
|
||||
Add an option with file patterns, to be used when unloading a buffer: If there
|
||||
is a match, remove entries for the buffer from marks, jumplist, etc. To be
|
||||
used for git temp files.
|
||||
@@ -942,8 +889,6 @@ missing: --nofork, -A , -b, -h, etc.
|
||||
":au * * command" should not be allowed, only use * for event when listing or
|
||||
deleting autocmds, not when adding them.
|
||||
|
||||
Alternative manpager.vim. (Enno, 2018 Jan 5, #2529)
|
||||
|
||||
With 'foldmethod' "indent" and appending an empty line, what follows isn't
|
||||
included in the existing fold. Deleting the empty line and undo fixes it.
|
||||
(Oleg Koshovetc, 2018 Jul 15, #3214)
|
||||
@@ -965,9 +910,6 @@ Python indenting: alternative way to indent arguments:
|
||||
http://orchistro.tistory.com/236
|
||||
Should be supported with a flag.
|
||||
|
||||
Starting job with cwd option, when the directory does not exist, gives a
|
||||
confusing error message. (Wang Shidong, 2018 Jan 2, #2519)
|
||||
|
||||
Add the debug command line history to viminfo.
|
||||
|
||||
Add Makefiles to the runtime/spell directory tree, since nobody uses Aap.
|
||||
@@ -988,9 +930,6 @@ With foldmethod=syntax and nofoldenable comment highlighting isn't removed.
|
||||
Using 'wildignore' also applies to literally entered file name. Also with
|
||||
:drop (remote commands).
|
||||
|
||||
Inserting a line in a CompleteDone autocommand may confuse undo. (micbou,
|
||||
2018 Jun 18, #3027)
|
||||
|
||||
Implement option_save() and option_restore():
|
||||
option_restore({list}) *option_restore()*
|
||||
Restore options previously saved by option_save().
|
||||
@@ -1026,8 +965,6 @@ Also see #1689.
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
":file" does not show anything when 'shortmess' contains 'F'. (#3070)
|
||||
|
||||
No profile information for function that executes ":quit". (Daniel Hahler,
|
||||
2017 Dec 26, #2501)
|
||||
|
||||
@@ -1038,9 +975,6 @@ Add script number to profile? (#3330 breaks tests).
|
||||
A function defined locally and lambda's are not easily recognized.
|
||||
Mention where they were defined somewhere.
|
||||
|
||||
Invalid range error when using BufWinLeave for closing terminal.
|
||||
(Gabriel Barta, 2017 Nov 15, #2339)
|
||||
|
||||
ml_get errors with buggy script. (Dominique, 2017 Apr 30)
|
||||
|
||||
Error in emsg with buggy script. (Dominique, 2017 Apr 30)
|
||||
@@ -1067,7 +1001,7 @@ neovim #7431)
|
||||
Patch for improving detecting Ruby on Mac in configure. (Ilya Mikhaltsou, 2017
|
||||
Nov 21)
|
||||
|
||||
When t_Co is changed from termresponse, the OptionSet autocmmand event isn't
|
||||
When t_Co is changed from termresponse, the OptionSet autocommand event isn't
|
||||
triggered. Use the code from the end of set_num_option() in
|
||||
set_color_count().
|
||||
|
||||
@@ -1106,10 +1040,6 @@ line breaks. (Ken Takata, 2017 Aug 22)
|
||||
|
||||
The ":move" command does not honor closed folds. (Ryan Lue, #2351)
|
||||
|
||||
Patch to fix increment/decrement not working properly when 'virtualedit' is
|
||||
set. (Hirohito Higashi, 2016 Aug 1, #923)
|
||||
Was this fixed?
|
||||
|
||||
Cannot copy modeless selection when cursor is inside it. (lkintact, #2300)
|
||||
|
||||
Test_writefile_fails_conversion failure on Solaris because if different iconv
|
||||
@@ -1126,7 +1056,7 @@ Overlong utf-8 sequence is displayed wrong. (Harm te Hennepe, 2017 Sep 14,
|
||||
#2089) Patch with possible solution by Björn Linse.
|
||||
|
||||
The change list index is local to a buffer, but it doesn't make sense using it
|
||||
for another buffer. (lacygoll) Copy w_changelistidx to wininfo_S and back.
|
||||
for another buffer. (lacygoill) Copy w_changelistidx to wininfo_S and back.
|
||||
|
||||
X11: Putting more than about 262040 characters of text on the clipboard and
|
||||
pasting it in another Vim doesn't work. (Dominique Pelle, 2008 Aug 21-23)
|
||||
@@ -1149,9 +1079,6 @@ Patch from Christian Brabandt to preserve upper case marks when wiping out a
|
||||
buffer. (2013 Dec 9)
|
||||
Also fixes #2166?
|
||||
|
||||
Python: After "import vim" error messages only show the first line of the
|
||||
stack trace. (Yggdroot, 2017 Jul 28, #1887)
|
||||
|
||||
Profile of a dict function is lost when the dict is deleted. Would it be
|
||||
possible to collect this? (Daniel Hahler, #2350)
|
||||
|
||||
@@ -1162,8 +1089,6 @@ Patch to skip writing a temp file for diffing if the buffer is equal to the
|
||||
existing file. (Akria Sheng, 2017 Jul 22)
|
||||
Could also skip writing lines that are the same.
|
||||
|
||||
Patch with Files for Latvian language. (Vitolins, 2017 May 3, #1675)
|
||||
|
||||
MS-Windows: Opening same file in a second gvim hangs. (Sven Bruggemann, 2017
|
||||
Jul 4)
|
||||
|
||||
@@ -1186,16 +1111,9 @@ Use gvimext.dll from the nightly build? (Issue #249)
|
||||
Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
|
||||
8, #1690)
|
||||
|
||||
Bogus characters inserted when triggering indent while changing text.
|
||||
(Vitor Antunes, 2016 Nov 22, #1269)
|
||||
|
||||
Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows about,
|
||||
it only works when merging with an existing file. (Shougo, 2017 Jun 19, #1781)
|
||||
|
||||
Segmentation fault with complete(). (Lifepillar, 2017 Apr 29, #1668)
|
||||
Check for "pat" to be NULL in search_for_exact_line()?
|
||||
How did it get NULL? Comment by Christian, Apr 30.
|
||||
|
||||
Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
|
||||
@@ -1233,17 +1151,10 @@ Json string with trailing \u should be an error. (Lcd)
|
||||
import can't be used in define option when include matches too.
|
||||
(Romain Lafourcade, 2017 Jun 18, #1519)
|
||||
|
||||
When session file has name in argument list but the buffer was deleted, the
|
||||
buffer is not deleted when using the session file. (#1393)
|
||||
Should add the buffer in hidden state.
|
||||
|
||||
Wrong diff highlighting with three files. (2016 Oct 20, #1186)
|
||||
Also get E749 on exit.
|
||||
Another example in #1309
|
||||
|
||||
When deleting a mark or register, leave a tombstone, so that it's also deleted
|
||||
when writing viminfo (and the delete was the most recent action). #1339
|
||||
|
||||
Suggestion to improve pt-br spell checking. (Marcelo D Montu, 2016 Dec 15,
|
||||
#1330)
|
||||
|
||||
@@ -1272,9 +1183,6 @@ Check for errors E704 and E705 only does VAR_FUNC, should also do VAR_PARTIAL.
|
||||
(Nikolai Pavlov, 2017 Mar 13, #1557)
|
||||
Make a function to check for function-like type?
|
||||
|
||||
Screen updated delayed when using CTRL-O u in Insert mode.
|
||||
(Barlik, #1191) Perhaps because status message?
|
||||
|
||||
Implement named arguments for functions with optional arguments:
|
||||
func Foo(start, count = 1, all = 1)
|
||||
call Foo(12, all = 0)
|
||||
@@ -1292,9 +1200,6 @@ Once .exe with updated installer is available: Add remark to download page
|
||||
about /S and /D options (Ken Takata, 2016 Apr 13)
|
||||
Or point to nightly builds: https://github.com/vim/vim-win32-installer/releases
|
||||
|
||||
Problem passing non-UTF-8 strings to Python 3. (Björn Linse, 2016 Sep 11,
|
||||
#1053) With patch, does it work?
|
||||
|
||||
":sbr" docs state it respects 'switchbuf', but "vsplit" does not cause a
|
||||
vertical split. (Haldean Brown, 2017 Mar 1)
|
||||
|
||||
@@ -1313,9 +1218,6 @@ Useful to restore it. Is there another solution?
|
||||
|
||||
Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
(Ozaki Kiichi, 2016 Nov 25)
|
||||
Does this also fix #1408 ?
|
||||
|
||||
'cursorline' and match interfere. (Ozaki Kiichi, 2017 Jun 23, #1792)
|
||||
|
||||
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
|
||||
|
||||
@@ -1352,6 +1254,9 @@ no longer support.
|
||||
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
4#1038)
|
||||
|
||||
sort() does not use 'smartcase' for the skip pattern, even though 'ignorecase'
|
||||
is used. (Filipe Brandenburger, #7322)
|
||||
|
||||
+channel:
|
||||
- Add a in_cb, invoked when the write buffer has become empty. (Matteo Landi)
|
||||
- Add ch_readlines(): for a channel in NL mode, reads as many lines as are
|
||||
@@ -1361,7 +1266,6 @@ sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
gets redrawn in redraw_after_callback(). #6120
|
||||
- Add a separate timeout for opening a socket. Currently it's fixed at 50
|
||||
msec, which is too small for a remote connection. (tverniquet, #2130)
|
||||
- Problem with stderr on Windows? (Vincent Rischmann, 2016 Aug 31, #1026)
|
||||
- Writing raw mode to a buffer should still handle NL characters as line
|
||||
breaks. (Dmitry Zotikov, 2017 Aug 16)
|
||||
- When out_cb executes :sleep, the close_cb may be invoked. (Daniel Hahler,
|
||||
@@ -1477,11 +1381,6 @@ the system encoding (usually utf-8).
|
||||
MS-Windows: use WS_HIDE instead of SW_SHOWMINNOACTIVE in os_win32.c?
|
||||
Otherwise task flickers in taskbar.
|
||||
|
||||
Repeating 'opfunc' in a function only works once. (Tarmean, 2016 Jul 15, #925)
|
||||
|
||||
Have a way to get the call stack, in a function and from an exception.
|
||||
#1125
|
||||
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
@@ -1541,10 +1440,6 @@ Mechelynck) Perhaps use exists("::tearoff") to check?
|
||||
Use vim.vim syntax highlighting for help file examples, but without ":" in
|
||||
'iskeyword' for syntax.
|
||||
|
||||
When command names are very long :command output is difficult to read. Use a
|
||||
maximum for the column width? (#871)
|
||||
Patcy by varmanishant, 2016 Jun 18, #876
|
||||
|
||||
Installation of .desktop files does not work everywhere.
|
||||
It's now fixed, but the target directory probably isn't right.
|
||||
Add configure check?
|
||||
@@ -1561,12 +1456,6 @@ Especially useful when using 'linebreak'
|
||||
":cd C:\Windows\System32\drivers\etc*" does not work, even though the
|
||||
directory exists. (Sergio Gallelli, 2013 Dec 29)
|
||||
|
||||
In debug mode one can inspect variables, but not the function parameters
|
||||
(starting with a:). (Luc Hermitte, 2017 Jan 4, #1352)
|
||||
|
||||
If ":bd" also closes a Tab page then the " mark is not set. (Harm te Hennepe,
|
||||
2016 Apr 25, #780)
|
||||
|
||||
Patch to avoid redrawing tabline when the popup menu is visible.
|
||||
(Christian Brabandt, 2016 Jan 28)
|
||||
|
||||
@@ -1617,9 +1506,6 @@ Patch to add :mapgroup, put mappings in a group like augroup.
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
Value of virtcol() for '[ and '] depend on multibyte character.
|
||||
(Luchr, #277)
|
||||
|
||||
Can we cache the syntax attributes, so that updates for 'relativenumber' and
|
||||
'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes
|
||||
before combining them.
|
||||
@@ -1695,10 +1581,6 @@ Doesn't work completely (Dominique Orban)
|
||||
|
||||
Patch to add a "literal" argument to bufnr(). (Olaf Dabrunz, 2015 Aug 4)
|
||||
|
||||
When a session file is created and there are "nofile" buffers, these are not
|
||||
filled. Need to trigger BufReadCmd autocommands. Also handle deleting the
|
||||
initial empty buffer better. (ZyX, 2015 March 8)
|
||||
|
||||
Extended file attributes lost on write (backupcopy=no). Issue 306.
|
||||
|
||||
Patch to add :lockjumps. (Carlo Baldassi, 2015 May 25)
|
||||
@@ -1827,9 +1709,6 @@ Out of scope:
|
||||
- Development work on plugins (although diff with distributed version would be
|
||||
useful).
|
||||
|
||||
Setting the spell file in a session only reads the local additions, not the
|
||||
normal spell file. (Enno Nagel, 2014 Mar 29)
|
||||
|
||||
When typing the first character of a command, e.g. "f", then using a menu, the
|
||||
menu item doesn't work. Clear typeahead when using a menu?
|
||||
|
||||
@@ -2297,7 +2176,7 @@ Additional info by Dominique Pelle. (also on 2010 Apr 10)
|
||||
|
||||
CreateFile and CreateFileW are used without sharing, filewritable() fails when
|
||||
the file was already open (e.g. script is being sourced). Add FILE_SHARE_READ|
|
||||
FILE_SHARE_WRITE in mch_access()? (Phillippe Vaucher, 2010 Nov 2)
|
||||
FILE_SHARE_WRITE in mch_access()? (Philippe Vaucher, 2010 Nov 2)
|
||||
|
||||
Is ~/bin (literally) in $PATH supposed to work? (Paul, 2010 March 29)
|
||||
Looks like only bash can do it. (Yakov Lerner)
|
||||
@@ -2478,9 +2357,6 @@ opening/closing window causes other window with 'winfixheight' to change
|
||||
height. Also happens when there is another window in the frame, if it's not
|
||||
very high. (Yegappan Lakshmanan, 2010 Jul 22, Michael Peeters, 2010 Jul 22)
|
||||
|
||||
Directory wrong in session file, caused by ":lcd" in BufEnter autocommand.
|
||||
(Felix Kater, 2009 Mar 3)
|
||||
|
||||
Session file generates error upon loading, cause by --remote-silent-tab.
|
||||
(7tommm (ytommm) 2010 Nov 24)
|
||||
|
||||
@@ -2512,6 +2388,7 @@ part of standard Vim. The "1 to "9 registers are not sufficient.
|
||||
6 When yanking into the unnamed registers several times, somehow make the
|
||||
previous contents also available (like it's done for deleting). What
|
||||
register names to use? g"1, g"2, etc.?
|
||||
Also do this for the small delete register "-.
|
||||
|
||||
After doing "su" $HOME can be the old user's home, thus ~root/file is not
|
||||
correct. Don't use it in the swap file.
|
||||
@@ -2540,11 +2417,6 @@ still delete them. Also convert all buffer file names?
|
||||
"gqip" in Insert mode has an off-by-one error, causing it to reflow text.
|
||||
(Raul Coronado, 2009 Nov 2)
|
||||
|
||||
Something wrong with session that has "cd" commands and "badd", in such a way
|
||||
that Vim doesn't find the edited file in the buffer list, causing the
|
||||
ATTENTION message? (Tony Mechelynck, 2008 Dec 1)
|
||||
Also: swap files are in ~/tmp/ One has relative file name ".mozilla/...".
|
||||
|
||||
MS-Windows: editing the first, empty buffer, 'ffs' set to "unix,dos", ":enew"
|
||||
doesn't set 'ff' to "unix". (Ben Fritz, 2008 Dec 5) Reusing the old buffer
|
||||
probably causes this.
|
||||
@@ -2741,9 +2613,6 @@ New PHP syntax file, use it? (Peter Hodge)
|
||||
":echoe" in catch block stops processing, while this doesn't happen outside of
|
||||
a catch block. (ZyX, 2011 Jun 2)
|
||||
|
||||
'foldcolumn' in modeline applied to wrong window when using a session. (Teemu
|
||||
Likonen, March 19)
|
||||
|
||||
Test 54 uses shell commands, that doesn't work on non-Unix systems. Use some
|
||||
other way to test buffer-local autocommands.
|
||||
|
||||
@@ -3276,15 +3145,11 @@ Quickfix/Location List:
|
||||
window is cleared, to avoid going back to the list of errors buffer (would
|
||||
have two windows with it). Can we just remove the jump list entries for
|
||||
the quickfix buffer?
|
||||
- Quickfix window height is not kept with a vertical split. (Lifepillar,
|
||||
2018 Jun 10, #2998)
|
||||
- When an item in the quickfix list has a file name that does not exist,
|
||||
behave like the item was not a match for :cnext.
|
||||
- When adding an item to a new quickfix list make ":cnext" jump to that
|
||||
item. Make a difference being at the first item and not having used
|
||||
:cnext at all. (Afanasiy Fet, 2017 Jan 3)
|
||||
- This does not work: :set cscopequickfix=a-
|
||||
(Linewi, 2015 Jul 12, #914)
|
||||
- When opening quickfix window, disable spell checking?
|
||||
- Patch for supporting count before CR in quickfix window. (AOYAMA Shotaro,
|
||||
2007 Jan 1)
|
||||
@@ -4014,8 +3879,6 @@ Documentation:
|
||||
- if it can be undone (u/CTRL-R) and redone (.)
|
||||
- how it works for folded lines
|
||||
- how it works with multibyte characters
|
||||
9 In change.txt, remark about Javadoc isn't right. Right alignment would
|
||||
work too.
|
||||
8 Spread the windows commands over the other files. For example, ":stag"
|
||||
should be with ":tag". Cross-link with tags to avoid too much double
|
||||
text.
|
||||
@@ -5472,7 +5335,7 @@ Mappings and Abbreviations:
|
||||
not the <Space>.
|
||||
8 Give a warning when using CTRL-C in the lhs of a mapping. It will never
|
||||
(?) work.
|
||||
7 Add <0x8f> (hex), <033> (octal) and <123> (decimal) to <> notation?
|
||||
7 Add <0x8f> (hex), <0o33> (octal) and <123> (decimal) to <> notation?
|
||||
7 When someone tries to unmap with a trailing space, and it fails, try
|
||||
unmapping without the trailing space. Helps for ":unmap xx | unmap yy".
|
||||
6 Context-sensitive abbreviations: Specify syntax group(s) in which the
|
||||
@@ -5933,7 +5796,7 @@ Writing files:
|
||||
losing the original when writing twice. (Slootman)
|
||||
7 On non-Unix machines, also overwrite the original file in some situations
|
||||
(file system full, it's a link on an NFS partition).
|
||||
7 When editing a file, check that it has been change outside of Vim more
|
||||
7 When editing a file, check that it has been changed outside of Vim more
|
||||
often, not only when writing over it. E.g., at the time the swap file is
|
||||
flushed. Or every ten seconds or so (use the time of day, check it before
|
||||
waiting for a character to be typed).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 8.2. Last change: 2020 Oct 18
|
||||
*undo.txt* For Vim version 8.2. Last change: 2020 Nov 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -65,9 +65,9 @@ with the redo command. If you make a new change after the undo command,
|
||||
the redo will not be possible anymore.
|
||||
|
||||
'u' included, the Vi-compatible way:
|
||||
The undo command undoes the previous change, and also the previous undo command.
|
||||
The redo command repeats the previous undo command. It does NOT repeat a
|
||||
change command, use "." for that.
|
||||
The undo command undoes the previous change, and also the previous undo
|
||||
command. The redo command repeats the previous undo command. It does NOT
|
||||
repeat a change command, use "." for that.
|
||||
|
||||
Examples Vim way Vi-compatible way ~
|
||||
"uu" two times undo no-op
|
||||
@@ -103,7 +103,7 @@ change again. But you can do something like this: >
|
||||
|
||||
:undojoin | delete
|
||||
|
||||
After this an "u" command will undo the delete command and the previous
|
||||
After this a "u" command will undo the delete command and the previous
|
||||
change.
|
||||
|
||||
To do the opposite, break a change into two undo blocks, in Insert mode use
|
||||
|
||||
@@ -50,7 +50,7 @@ which moves to the previous end of a word:
|
||||
|
||||
This is a line with example text ~
|
||||
<----<----x---->------------>
|
||||
2ge ge e we
|
||||
2ge ge e 2e
|
||||
|
||||
If you are at the last word of a line, the "w" command will take you to the
|
||||
first word in the next line. Thus you can use this to move through a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_23.txt* For Vim version 8.2. Last change: 2006 Apr 24
|
||||
*usr_23.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -28,9 +28,9 @@ start a new line. One to move the carriage back to the first position
|
||||
(carriage return, <CR>), another to move the paper up (line feed, <LF>).
|
||||
When computers came out, storage was expensive. Some people decided that
|
||||
they did not need two characters for end-of-line. The UNIX people decided
|
||||
they could use <Line Feed> only for end-of-line. The Apple people
|
||||
standardized on <CR>. The Microsoft Windows folks decided to keep
|
||||
the old <CR><LF>.
|
||||
they could use <New Line> or <NL> only for end-of-line. The Apple people
|
||||
standardized on <CR>. The Microsoft Windows folks decided to keep the old
|
||||
<CR><NL> (we use <NL> for line feed in the help text).
|
||||
This means that if you try to move a file from one system to another, you
|
||||
have line-break problems. The Vim editor automatically recognizes the
|
||||
different file formats and handles things properly behind your back.
|
||||
@@ -55,20 +55,20 @@ which format you have, execute the following command: >
|
||||
|
||||
The three names that Vim uses are:
|
||||
|
||||
unix <LF>
|
||||
dos <CR><LF>
|
||||
unix <NL>
|
||||
dos <CR><NL>
|
||||
mac <CR>
|
||||
|
||||
|
||||
USING THE MAC FORMAT
|
||||
|
||||
On Unix, <LF> is used to break a line. It's not unusual to have a <CR>
|
||||
On Unix, <NL> is used to break a line. It's not unusual to have a <CR>
|
||||
character halfway a line. Incidentally, this happens quite often in Vi (and
|
||||
Vim) scripts.
|
||||
On the Macintosh, where <CR> is the line break character, it's possible to
|
||||
have a <LF> character halfway a line.
|
||||
have a <NL> character halfway a line.
|
||||
The result is that it's not possible to be 100% sure whether a file
|
||||
containing both <CR> and <LF> characters is a Mac or a Unix file. Therefore,
|
||||
containing both <CR> and <NL> characters is a Mac or a Unix file. Therefore,
|
||||
Vim assumes that on Unix you probably won't edit a Mac file, and doesn't check
|
||||
for this type of file. To check for this format anyway, add "mac" to
|
||||
'fileformats': >
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2020 Aug 30
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jan 13
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -122,14 +122,14 @@ starts with a zero. "017" is decimal 15. A binary number starts with "0b" or
|
||||
decimal number, it will be interpreted as an octal number!
|
||||
The ":echo" command always prints decimal numbers. Example: >
|
||||
|
||||
:echo 0x7f 036
|
||||
:echo 0x7f 0o36
|
||||
< 127 30 ~
|
||||
|
||||
A number is made negative with a minus sign. This also works for hexadecimal,
|
||||
octal and binary numbers. A minus sign is also used for subtraction. Compare
|
||||
this with the previous example: >
|
||||
|
||||
:echo 0x7f -036
|
||||
:echo 0x7f -0o36
|
||||
< 97 ~
|
||||
|
||||
White space in an expression is ignored. However, it's recommended to use it
|
||||
@@ -137,7 +137,7 @@ for separating items, to make the expression easier to read. For example, to
|
||||
avoid the confusion with a negative number above, put a space between the
|
||||
minus sign and the following number: >
|
||||
|
||||
:echo 0x7f - 036
|
||||
:echo 0x7f - 0o36
|
||||
|
||||
==============================================================================
|
||||
*41.2* Variables
|
||||
@@ -619,12 +619,15 @@ String manipulation: *string-functions*
|
||||
submatch() get a specific match in ":s" and substitute()
|
||||
strpart() get part of a string using byte index
|
||||
strcharpart() get part of a string using char index
|
||||
slice() take a slice of a string, using char index in
|
||||
Vim9 script
|
||||
strgetchar() get character from a string using char index
|
||||
expand() expand special keywords
|
||||
expandcmd() expand a command like done for `:edit`
|
||||
iconv() convert text from one encoding to another
|
||||
byteidx() byte index of a character in a string
|
||||
byteidxcomp() like byteidx() but count composing characters
|
||||
charidx() character index of a byte in a string
|
||||
repeat() repeat a string multiple times
|
||||
eval() evaluate a string expression
|
||||
execute() execute an Ex command and get the output
|
||||
@@ -639,6 +642,7 @@ List manipulation: *list-functions*
|
||||
insert() insert an item somewhere in a List
|
||||
add() append an item to a List
|
||||
extend() append a List to a List
|
||||
extendnew() make a new List and append items
|
||||
remove() remove one or more items from a List
|
||||
copy() make a shallow copy of a List
|
||||
deepcopy() make a full copy of a List
|
||||
@@ -646,6 +650,7 @@ List manipulation: *list-functions*
|
||||
map() change each List item
|
||||
mapnew() make a new List with changed items
|
||||
reduce() reduce a List to a value
|
||||
slice() take a slice of a List
|
||||
sort() sort a List
|
||||
reverse() reverse the order of a List
|
||||
uniq() remove copies of repeated adjacent items
|
||||
@@ -660,6 +665,7 @@ List manipulation: *list-functions*
|
||||
count() count number of times a value appears in a List
|
||||
repeat() repeat a List multiple times
|
||||
flatten() flatten a List
|
||||
flattennew() flatten a copy of a List
|
||||
|
||||
Dictionary manipulation: *dict-functions*
|
||||
get() get an entry without an error for a wrong key
|
||||
@@ -668,6 +674,7 @@ Dictionary manipulation: *dict-functions*
|
||||
empty() check if Dictionary is empty
|
||||
remove() remove an entry from a Dictionary
|
||||
extend() add entries from one Dictionary to another
|
||||
extendnew() make a new Dictionary and append items
|
||||
filter() remove selected entries from a Dictionary
|
||||
map() change each Dictionary entry
|
||||
mapnew() make a new Dictionary with changed items
|
||||
@@ -717,7 +724,8 @@ Other computation: *bitwise-function*
|
||||
srand() initialize seed used by rand()
|
||||
|
||||
Variables: *var-functions*
|
||||
type() type of a variable
|
||||
type() type of a variable as a number
|
||||
typename() type of a variable as text
|
||||
islocked() check if a variable is locked
|
||||
funcref() get a Funcref for a function reference
|
||||
function() get a Funcref for a function name
|
||||
@@ -752,6 +760,11 @@ Cursor and mark position: *cursor-functions* *mark-functions*
|
||||
screenchar() get character code at a screen line/row
|
||||
screenchars() get character codes at a screen line/row
|
||||
screenstring() get string of characters at a screen line/row
|
||||
charcol() character number of the cursor or a mark
|
||||
getcharpos() get character position of cursor, mark, etc.
|
||||
setcharpos() set character position of cursor, mark, etc.
|
||||
getcursorcharpos() get character position of the cursor
|
||||
setcursorcharpos() set character position of the cursor
|
||||
|
||||
Working with text in the current buffer: *text-functions*
|
||||
getline() get a line or list of lines from the buffer
|
||||
@@ -811,6 +824,7 @@ System functions and manipulation of files:
|
||||
setenv() set an environment variable
|
||||
hostname() name of the system
|
||||
readfile() read a file into a List of lines
|
||||
readblob() read a file into a Blob
|
||||
readdir() get a List of file names in a directory
|
||||
readdirex() get a List of file information in a directory
|
||||
writefile() write a List of lines or Blob into a file
|
||||
@@ -869,6 +883,7 @@ Command line: *command-line-functions*
|
||||
getcmdtype() return the current command-line type
|
||||
getcmdwintype() return the current command-line window type
|
||||
getcompletion() list of command-line completion matches
|
||||
fullcommand() get full command name
|
||||
|
||||
Quickfix and location lists: *quickfix-functions*
|
||||
getqflist() list of quickfix errors
|
||||
@@ -1765,7 +1780,7 @@ Here is a summary of items that apply to Vim scripts. They are also mentioned
|
||||
elsewhere, but form a nice checklist.
|
||||
|
||||
The end-of-line character depends on the system. For Unix a single <NL>
|
||||
character is used. For MS-Windows and the like, <CR><LF> is used. This is
|
||||
character is used. For MS-Windows and the like, <CR><NL> is used. This is
|
||||
important when using mappings that end in a <CR>. See |:source_crnl|.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 8.2. Last change: 2020 Aug 20
|
||||
*various.txt* For Vim version 8.2. Last change: 2021 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -142,15 +142,17 @@ g8 Print the hex values of the bytes used in the
|
||||
quit
|
||||
<
|
||||
*:z* *E144*
|
||||
:{range}z[+-^.=]{count} Display several lines of text surrounding the line
|
||||
specified with {range}, or around the current line
|
||||
if there is no {range}. If there is a {count}, that's
|
||||
how many lines you'll see; if there is no {count} and
|
||||
only one window then twice the value of the 'scroll'
|
||||
option is used, otherwise the current window height
|
||||
minus 3 is used.
|
||||
:[range]z[+-^.=][count] Display several lines of text surrounding the line
|
||||
specified with [range], or around the current line
|
||||
if there is no [range].
|
||||
|
||||
If there is a {count} the 'window' option is set to
|
||||
If there is a [count], that's how many lines you'll
|
||||
see; if there is no [count] and only one window then
|
||||
twice the value of the 'scroll' option is used,
|
||||
otherwise the current window height minus 3 is used.
|
||||
This is the value of "scr" in the table below.
|
||||
|
||||
If there is a [count] the 'window' option is set to
|
||||
its value.
|
||||
|
||||
:z can be used either alone or followed by any of
|
||||
@@ -168,7 +170,7 @@ g8 Print the hex values of the bytes used in the
|
||||
If the mark is "=", a line of dashes is printed
|
||||
around the current line.
|
||||
|
||||
:{range}z#[+-^.=]{count} *:z#*
|
||||
:[range]z#[+-^.=][count] *:z#*
|
||||
Like ":z", but number the lines.
|
||||
|
||||
*:=*
|
||||
@@ -343,8 +345,9 @@ N *+clientserver* Unix and Win32: Remote invocation |clientserver|
|
||||
*+clipboard* |clipboard| support compiled-in
|
||||
*+clipboard_working* |clipboard| support compiled-in and working
|
||||
T *+cmdline_compl* command line completion |cmdline-completion|
|
||||
S *+cmdline_hist* command line history |cmdline-history|
|
||||
T *+cmdline_hist* command line history |cmdline-history|
|
||||
N *+cmdline_info* |'showcmd'| and |'ruler'|
|
||||
S *+cmdwin* |cmdline-window| support
|
||||
T *+comments* |'comments'| support
|
||||
B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
|
||||
N *+cryptv* encryption support |encryption|
|
||||
@@ -409,7 +412,7 @@ N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
|
||||
B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
|
||||
B *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
|
||||
N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
|
||||
N *+multi_byte* 16 and 32 bit characters |multibyte|
|
||||
T *+multi_byte* Unicode support, 16 and 32 bit characters |multibyte|
|
||||
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
|
||||
N *+multi_lang* non-English language support |multi-lang|
|
||||
m *+mzscheme* Mzscheme interface |mzscheme|
|
||||
@@ -705,12 +708,12 @@ K Run a program to lookup the keyword under the
|
||||
not more than one line.
|
||||
|
||||
[N]gs *gs* *:sl* *:sleep*
|
||||
:[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
|
||||
:[N]sl[eep] [N][m] Do nothing for [N] seconds. When [m] is included,
|
||||
sleep for [N] milliseconds. The count for "gs" always
|
||||
uses seconds. The default is one second. >
|
||||
:sleep "sleep for one second
|
||||
:5sleep "sleep for five seconds
|
||||
:sleep 100m "sleep for a hundred milliseconds
|
||||
:sleep 100m "sleep for 100 milliseconds
|
||||
10gs "sleep for ten seconds
|
||||
< Can be interrupted with CTRL-C (CTRL-Break on
|
||||
MS-Windows). "gs" stands for "goto sleep".
|
||||
@@ -720,6 +723,9 @@ K Run a program to lookup the keyword under the
|
||||
available when compiled with the |+netbeans_intg|
|
||||
feature}
|
||||
|
||||
*:sl!* *:sleep!*
|
||||
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor
|
||||
|
||||
*:xrestore* *:xr*
|
||||
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
|
||||
after the X server restarts, e.g. when running Vim for
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version5.txt* For Vim version 8.2. Last change: 2020 Sep 02
|
||||
*version5.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -805,7 +805,7 @@ Using "~" for $HOME now works for all systems. |$HOME|
|
||||
Unix: Besides using CTRL-C, also use the INTR character from the tty settings.
|
||||
Somebody has INTR set to DEL.
|
||||
|
||||
Allow a <LF> in a ":help" command argument to end the help command, so another
|
||||
Allow a <NL> in a ":help" command argument to end the help command, so another
|
||||
command can follow.
|
||||
|
||||
Doing "%" on a line that starts with " #if" didn't jump to matching "#else".
|
||||
|
||||
@@ -1331,7 +1331,7 @@ eventhandler() Returns 1 when inside an event handler and interactive
|
||||
executable() Checks if a program or batch script can be executed.
|
||||
filewritable() Checks if a file can be written. (Ron Aaron)
|
||||
foldclosed() Find out if there is a closed fold. (Johannes Zellner).
|
||||
foldcloseend() Find the end of a closed fold.
|
||||
foldclosedend() Find the end of a closed fold.
|
||||
foldlevel() Find out the foldlevel. (Johannes Zellner)
|
||||
foreground() Move the GUI window to the foreground.
|
||||
getchar() Get one character from the user. Can be used to define a
|
||||
@@ -9661,7 +9661,7 @@ Solution: Check for tcsetattr() to return an error, retry when it does.
|
||||
Files: src/os_unix.c
|
||||
|
||||
Patch 6.2f.018
|
||||
Problem: Mac OS X 10.2: OK is defined to zero in cursus.h while Vim uses
|
||||
Problem: Mac OS X 10.2: OK is defined to zero in curses.h while Vim uses
|
||||
one. Redefining it causes a warning message.
|
||||
Solution: Undefine OK before defining it to one. (Taro Muraoka)
|
||||
Files: src/vim.h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Dec 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -76,7 +76,7 @@ Timers ~
|
||||
Also asynchronous are timers. They can fire once or repeatedly and invoke a
|
||||
function to do any work. For example: >
|
||||
let tempTimer = timer_start(4000, 'CheckTemp')
|
||||
This will call the CheckTemp() function four seconds (4000 milli seconds)
|
||||
This will call the CheckTemp() function four seconds (4000 milliseconds)
|
||||
later. See |timer_start()|.
|
||||
|
||||
|
||||
@@ -3282,7 +3282,7 @@ Solution: Convert the printer name from the active codepage to 'encoding'.
|
||||
Files: src/os_mswin.c
|
||||
|
||||
Patch 7.4.472
|
||||
Problem: The "precedes" entry in 'listchar' will be drawn when 'showbreak'
|
||||
Problem: The "precedes" entry in 'listchars' will be drawn when 'showbreak'
|
||||
is set and 'list' is not.
|
||||
Solution: Only draw this character when 'list' is on. (Christian Brabandt)
|
||||
Files: src/screen.c
|
||||
@@ -16933,7 +16933,7 @@ Solution: Add #ifdefs.
|
||||
Files: src/screen.c
|
||||
|
||||
Patch 8.0.0383 (after 8.0.0382)
|
||||
Problem: Misplaced #ifdef. (Christ van Willigen)
|
||||
Problem: Misplaced #ifdef. (Christ van Willegen)
|
||||
Solution: Split assignment.
|
||||
Files: src/screen.c
|
||||
|
||||
@@ -19612,7 +19612,7 @@ Files: Filelist
|
||||
|
||||
Patch 8.0.0815
|
||||
Problem: Terminal window not correctly updated when 'statusline' invokes
|
||||
":sleep". (NIkolay Pavlov)
|
||||
":sleep". (Nikolay Pavlov)
|
||||
Solution: Clear got_int. Repeat redrawing when needed.
|
||||
Files: src/terminal.c
|
||||
|
||||
@@ -35835,7 +35835,7 @@ Files: src/ex_cmds2.c, src/getchar.c, src/testdir/test_mapping.vim,
|
||||
Patch 8.1.1592
|
||||
Problem: May start file dialog while exiting.
|
||||
Solution: Ignore the "browse" modifier when exiting. (Ozaki Kiichi,
|
||||
closes #4582
|
||||
closes #4582)
|
||||
Files: src/ex_cmds.c, src/terminal.c
|
||||
|
||||
Patch 8.1.1593
|
||||
@@ -42557,7 +42557,7 @@ Files: src/buffer.c, src/testdir/test_statusline.vim,
|
||||
src/testdir/dumps/Test_statusline_1.dump
|
||||
|
||||
Patch 8.2.0236
|
||||
Problem: MS-Windows uninstall doesn't delete vimtutur.bat.
|
||||
Problem: MS-Windows uninstall doesn't delete vimtutor.bat.
|
||||
Solution: Change directory before deletion. (Ken Takata, closes #5603)
|
||||
Files: src/uninstall.c
|
||||
|
||||
@@ -46431,7 +46431,7 @@ Files: src/buffer.c, src/change.c, src/diff.c, src/evalbuffer.c,
|
||||
|
||||
Patch 8.2.0854
|
||||
Problem: Xxd cannot show offset as a decimal number.
|
||||
Solution: Add the "-d" flag. (Aapo Rantalainen, closes #5616
|
||||
Solution: Add the "-d" flag. (Aapo Rantalainen, closes #5616)
|
||||
Files: src/testdir/test_xxd.vim, src/xxd/xxd.c
|
||||
|
||||
Patch 8.2.0855
|
||||
@@ -46661,7 +46661,7 @@ Solution: Use // comments. (Yegappan Lakshmanan, closes #6190)
|
||||
Files: src/gui_xim.c
|
||||
|
||||
Patch 8.2.0890
|
||||
Problem: No color in terminal window when 'termguicolor' is set.
|
||||
Problem: No color in terminal window when 'termguicolors' is set.
|
||||
Solution: Clear the underline color. (closes #6186)
|
||||
Files: src/highlight.c
|
||||
|
||||
@@ -46728,7 +46728,7 @@ Files: runtime/doc/change.txt, src/mbyte.c, src/ops.c, src/option.h,
|
||||
|
||||
Patch 8.2.0902
|
||||
Problem: Using searchcount() in 'statusline' causes an error.
|
||||
Solution: Avoid saving/restoring the search patten recursively.
|
||||
Solution: Avoid saving/restoring the search pattern recursively.
|
||||
(closes #6194)
|
||||
Files: src/search.c, src/testdir/test_search_stat.vim,
|
||||
src/testdir/dumps/Test_searchstat_4.dump
|
||||
@@ -48832,7 +48832,7 @@ Files: src/buffer.c, src/testdir/test_tabline.vim
|
||||
Patch 8.2.1260
|
||||
Problem: There is no good test for CursorHold.
|
||||
Solution: Add a test. Remove duplicated test. (Yegappan Lakshmanan,
|
||||
closes #6503
|
||||
closes #6503)
|
||||
Files: src/testdir/test_autocmd.vim, src/testdir/test_buffer.vim,
|
||||
src/testdir/test_normal.vim
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vi_diff.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*vi_diff.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -73,7 +73,7 @@ edit the termcap entry and try again. Vim has the |terminal-options|.
|
||||
Vim has only a few limits for the files that can be edited {Vi: can not handle
|
||||
<Nul> characters and characters above 128, has limited line length, many other
|
||||
limits}.
|
||||
*E340*
|
||||
|
||||
Maximum line length 2147483647 characters. Longer lines are split.
|
||||
Maximum number of lines 2147483647 lines.
|
||||
Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Oct 17
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
Vim9 script commands and expressions. *vim9*
|
||||
Vim9 script commands and expressions. *Vim9* *vim9*
|
||||
|
||||
Most expression help is in |eval.txt|. This file is about the new syntax and
|
||||
features in Vim9 script.
|
||||
@@ -14,7 +14,7 @@ features in Vim9 script.
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
|
||||
1. What is Vim9 script? |vim9-script|
|
||||
1. What is Vim9 script? |Vim9-script|
|
||||
2. Differences |vim9-differences|
|
||||
3. New style functions |fast-functions|
|
||||
4. Types |vim9-types|
|
||||
@@ -25,7 +25,7 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. What is Vim9 script? *vim9-script*
|
||||
1. What is Vim9 script? *Vim9-script*
|
||||
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
@@ -52,8 +52,9 @@ The Vim9 script syntax and semantics are used in:
|
||||
- a script file where the first command is `vim9script`
|
||||
- an autocommand defined in the context of the above
|
||||
|
||||
When using `:function` in a Vim9 script file the legacy syntax is used.
|
||||
However, this can be confusing and is therefore discouraged.
|
||||
When using `:function` in a Vim9 script file the legacy syntax is used, with
|
||||
the highest |scriptversion|. However, this can be confusing and is therefore
|
||||
discouraged.
|
||||
|
||||
Vim9 script and legacy Vim script can be mixed. There is no requirement to
|
||||
rewrite old scripts, they keep working as before. You may want to use a few
|
||||
@@ -70,28 +71,29 @@ Overview ~
|
||||
Brief summary of the differences you will most often encounter when using Vim9
|
||||
script and `:def` functions; details are below:
|
||||
- Comments start with #, not ": >
|
||||
echo "hello" # comment
|
||||
echo "hello" # comment
|
||||
- Using a backslash for line continuation is hardly ever needed: >
|
||||
echo "hello "
|
||||
echo "hello "
|
||||
.. yourName
|
||||
.. ", how are you?"
|
||||
- White space is required in many places.
|
||||
- Assign values without `:let`, declare variables with `:var`: >
|
||||
var count = 0
|
||||
var count = 0
|
||||
count += 3
|
||||
- Constants can be declared with `:final` and `:const`: >
|
||||
final matches = [] # add matches
|
||||
final matches = [] # add matches
|
||||
const names = ['Betty', 'Peter'] # cannot be changed
|
||||
- `:final` cannot be used as an abbreviation of `:finally`.
|
||||
- Variables and functions are script-local by default.
|
||||
- Functions are declared with argument types and return type: >
|
||||
def CallMe(count: number, message: string): bool
|
||||
- Call functions without `:call`: >
|
||||
writefile(['done'], 'file.txt')
|
||||
writefile(['done'], 'file.txt')
|
||||
- You cannot use `:xit`, `:t`, `:append`, `:change`, `:insert` or curly-braces
|
||||
names.
|
||||
- A range before a command must be prefixed with a colon: >
|
||||
:%s/this/that
|
||||
:%s/this/that
|
||||
- Unless mentioned specifically, the highest |scriptversion| is used.
|
||||
|
||||
|
||||
Comments starting with # ~
|
||||
@@ -112,8 +114,13 @@ In Vi # is a command to list text with numbers. In Vim9 script you can use
|
||||
101 number
|
||||
|
||||
To improve readability there must be a space between a command and the #
|
||||
that starts a comment. Note that #{ is the start of a dictionary, therefore
|
||||
it does not start a comment.
|
||||
that starts a comment: >
|
||||
var name = value # comment
|
||||
var name = value# error!
|
||||
|
||||
In legacy Vim script # is also used for the alternate file name. In Vim9
|
||||
script you need to use %% instead. Instead of ## use %%% (stands for all
|
||||
arguments).
|
||||
|
||||
|
||||
Vim9 functions ~
|
||||
@@ -124,8 +131,8 @@ often 10x to 100x times.
|
||||
Many errors are already found when compiling, before the function is executed.
|
||||
The syntax is strict, to enforce code that is easy to read and understand.
|
||||
|
||||
Compilation is done when:
|
||||
- the function is first called
|
||||
Compilation is done when either of these is encountered:
|
||||
- the first time the function is called
|
||||
- when the `:defcompile` command is encountered in the script where the
|
||||
function was defined
|
||||
- `:disassemble` is used for the function.
|
||||
@@ -133,8 +140,9 @@ Compilation is done when:
|
||||
reference
|
||||
|
||||
`:def` has no options like `:function` does: "range", "abort", "dict" or
|
||||
"closure". A `:def` function always aborts on an error, does not get a range
|
||||
passed and cannot be a "dict" function.
|
||||
"closure". A `:def` function always aborts on an error (unless `:silent!` was
|
||||
used for the command or inside a `:try` block), does not get a range passed
|
||||
cannot be a "dict" function, and can always be a closure.
|
||||
|
||||
The argument types and return type need to be specified. The "any" type can
|
||||
be used, type checking will then be done at runtime, like with legacy
|
||||
@@ -187,6 +195,33 @@ Global functions can still be defined and deleted at nearly any time. In
|
||||
Vim9 script script-local functions are defined once when the script is sourced
|
||||
and cannot be deleted or replaced.
|
||||
|
||||
When compiling a function and a function call is encountered for a function
|
||||
that is not (yet) defined, the |FuncUndefined| autocommand is not triggered.
|
||||
You can use an autoload function if needed, or call a legacy function and have
|
||||
|FuncUndefined| triggered there.
|
||||
|
||||
|
||||
Reloading a Vim9 script clears functions and variables by default ~
|
||||
*vim9-reload*
|
||||
When loading a legacy Vim script a second time nothing is removed, the
|
||||
commands will replace existing variables and functions and create new ones.
|
||||
|
||||
When loading a Vim9 script a second time all existing script-local functions
|
||||
and variables are deleted, thus you start with a clean slate. This is useful
|
||||
if you are developing a plugin and want to try a new version. If you renamed
|
||||
something you don't have to worry about the old name still hanging around.
|
||||
|
||||
If you do want to keep items, use: >
|
||||
vim9script noclear
|
||||
|
||||
You want to use this in scripts that use a `finish` command to bail out at
|
||||
some point when loaded again. E.g. when a buffer local option is set: >
|
||||
vim9script noclear
|
||||
setlocal completefunc=SomeFunc
|
||||
if exists('*g:SomeFunc') | finish | endif
|
||||
def g:SomeFunc()
|
||||
....
|
||||
|
||||
|
||||
Variable declarations with :var, :final and :const ~
|
||||
*vim9-declaration* *:var*
|
||||
@@ -282,7 +317,7 @@ The constant only applies to the value itself, not what it refers to. >
|
||||
NAMES[0] = ["Jack"] # Error!
|
||||
NAMES[0][0] = "Jack" # Error!
|
||||
NAMES[1] = ["Emma"] # Error!
|
||||
Names[1][0] = "Emma" # OK, now females[0] == "Emma"
|
||||
NAMES[1][0] = "Emma" # OK, now females[0] == "Emma"
|
||||
|
||||
< *E1092*
|
||||
Declaring more than one variable at a time, using the unpack notation, is
|
||||
@@ -303,8 +338,7 @@ identifier or can't be an Ex command. Examples: >
|
||||
myList->add(123)
|
||||
g:myList->add(123)
|
||||
[1, 2, 3]->Process()
|
||||
#{a: 1, b: 2}->Process()
|
||||
{'a': 1, 'b': 2}->Process()
|
||||
{a: 1, b: 2}->Process()
|
||||
"foobar"->Process()
|
||||
("foobar")->Process()
|
||||
'foobar'->Process()
|
||||
@@ -336,17 +370,61 @@ When using `function()` the resulting type is "func", a function with any
|
||||
number of arguments and any return type. The function can be defined later.
|
||||
|
||||
|
||||
Lambda using => instead of -> ~
|
||||
|
||||
In legacy script there can be confusion between using "->" for a method call
|
||||
and for a lambda. Also, when a "{" is found the parser needs to figure out if
|
||||
it is the start of a lambda or a dictionary, which is now more complicated
|
||||
because of the use of argument types.
|
||||
|
||||
To avoid these problems Vim9 script uses a different syntax for a lambda,
|
||||
which is similar to Javascript: >
|
||||
var Lambda = (arg) => expression
|
||||
|
||||
No line break is allowed in the arguments of a lambda up to and including the
|
||||
"=>". This is OK: >
|
||||
filter(list, (k, v) =>
|
||||
v > 0)
|
||||
This does not work: >
|
||||
filter(list, (k, v)
|
||||
=> v > 0)
|
||||
This also does not work: >
|
||||
filter(list, (k,
|
||||
v) => v > 0)
|
||||
But you can use a backslash to concatenate the lines before parsing: >
|
||||
filter(list, (k,
|
||||
\ v)
|
||||
\ => v > 0)
|
||||
|
||||
Additionally, a lambda can contain statements in {}: >
|
||||
var Lambda = (arg) => {
|
||||
g:was_called = 'yes'
|
||||
return expression
|
||||
}
|
||||
NOT IMPLEMENTED YET
|
||||
|
||||
*vim9-curly*
|
||||
To avoid the "{" of a dictionary literal to be recognized as a statement block
|
||||
wrap it in parenthesis: >
|
||||
var Lambda = (arg) => ({key: 42})
|
||||
|
||||
Also when confused with the start of a command block: >
|
||||
({
|
||||
key: value
|
||||
})->method()
|
||||
|
||||
|
||||
Automatic line continuation ~
|
||||
|
||||
In many cases it is obvious that an expression continues on the next line. In
|
||||
those cases there is no need to prefix the line with a backslash
|
||||
|line-continuation|. For example, when a list spans multiple lines: >
|
||||
those cases there is no need to prefix the line with a backslash (see
|
||||
|line-continuation|). For example, when a list spans multiple lines: >
|
||||
var mylist = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
And when a dict spans multiple lines: >
|
||||
var mydict = #{
|
||||
var mydict = {
|
||||
one: 1,
|
||||
two: 2,
|
||||
}
|
||||
@@ -362,7 +440,7 @@ possible just before or after the operator. For example: >
|
||||
.. middle
|
||||
.. end
|
||||
var total = start +
|
||||
end -
|
||||
end -
|
||||
correction
|
||||
var result = positive
|
||||
? PosFunc(arg)
|
||||
@@ -377,6 +455,12 @@ before it: >
|
||||
var result = MyDict
|
||||
.member
|
||||
|
||||
For commands that have an argument that is a list of commands, the | character
|
||||
at the start of the line indicates line continuation: >
|
||||
autocmd BufNewFile *.match if condition
|
||||
| echo 'match'
|
||||
| endif
|
||||
|
||||
< *E1050*
|
||||
To make it possible for the operator at the start of the line to be
|
||||
recognized, it is required to put a colon before a range. This will add
|
||||
@@ -390,6 +474,9 @@ This will assign "start" and print a line: >
|
||||
var result = start
|
||||
:+ print
|
||||
|
||||
Note that the colon is not required for the |+cmd| argument: >
|
||||
edit +6 fname
|
||||
|
||||
It is also possible to split a function header over multiple lines, in between
|
||||
arguments: >
|
||||
def MyFunc(
|
||||
@@ -397,6 +484,19 @@ arguments: >
|
||||
separator = '-'
|
||||
): string
|
||||
|
||||
Since a continuation line cannot be easily recognized the parsing of commands
|
||||
has been made stricter. E.g., because of the error in the first line, the
|
||||
second line is seen as a separate command: >
|
||||
popup_create(some invalid expression, {
|
||||
exit_cb: Func})
|
||||
Now "exit_cb: Func})" is actually a valid command: save any changes to the
|
||||
file "_cb: Func})" and exit. To avoid this kind of mistake in Vim9 script
|
||||
there must be white space between most command names and the argument.
|
||||
|
||||
However, the argument of a command that is a command won't be recognized. For
|
||||
example, after "windo echo expr" a line break inside "expr" will not be seen.
|
||||
|
||||
|
||||
Notes:
|
||||
- "enddef" cannot be used at the start of a continuation line, it ends the
|
||||
current function.
|
||||
@@ -416,20 +516,45 @@ Notes:
|
||||
< This does not work: >
|
||||
echo [1, 2]
|
||||
[3, 4]
|
||||
- No line break is allowed in the arguments of a lambda, between the "{" and
|
||||
"->". This is OK: >
|
||||
filter(list, {k, v ->
|
||||
v > 0})
|
||||
< This does not work: >
|
||||
filter(list, {k,
|
||||
v -> v > 0})
|
||||
|
||||
|
||||
No curly braces expansion ~
|
||||
|
||||
|curly-braces-names| cannot be used.
|
||||
|
||||
|
||||
Dictionary literals ~
|
||||
|
||||
Traditionally Vim has supported dictionary literals with a {} syntax: >
|
||||
let dict = {'key': value}
|
||||
|
||||
Later it became clear that using a simple text key is very common, thus
|
||||
literal dictionaries were introduced in a backwards compatible way: >
|
||||
let dict = #{key: value}
|
||||
|
||||
However, this #{} syntax is unlike any existing language. As it turns out
|
||||
that using a literal key is much more common than using an expression, and
|
||||
considering that JavaScript uses this syntax, using the {} form for dictionary
|
||||
literals is considered a much more useful syntax. In Vim9 script the {} form
|
||||
uses literal keys: >
|
||||
var dict = {key: value}
|
||||
|
||||
This works for alphanumeric characters, underscore and dash. If you want to
|
||||
use another character, use a single or double quoted string: >
|
||||
var dict = {'key with space': value}
|
||||
var dict = {"key\twith\ttabs": value}
|
||||
var dict = {'': value} # empty key
|
||||
|
||||
In case the key needs to be an expression, square brackets can be used, just
|
||||
like in JavaScript: >
|
||||
var dict = {["key" .. nr]: value}
|
||||
|
||||
The key type can be string, number, bool or float. Other types result in an
|
||||
error. A number can be given with and without the []: >
|
||||
var dict = {123: 'without', [456]: 'with'}
|
||||
echo dict
|
||||
{'456': 'with', '123': 'without'}
|
||||
|
||||
|
||||
No :xit, :t, :append, :change or :insert ~
|
||||
|
||||
These commands are too easily confused with local variable names.
|
||||
@@ -442,6 +567,29 @@ Comparators ~
|
||||
The 'ignorecase' option is not used for comparators that use strings.
|
||||
|
||||
|
||||
For loop ~
|
||||
|
||||
Legacy Vim script has some tricks to make a for loop over a list handle
|
||||
deleting items at the current or previous item. In Vim9 script it just uses
|
||||
the index, if items are deleted then items in the list will be skipped.
|
||||
Example legacy script: >
|
||||
let l = [1, 2, 3, 4]
|
||||
for i in l
|
||||
echo i
|
||||
call remove(l, index(l, i))
|
||||
endfor
|
||||
Would echo:
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
In compiled Vim9 script you get:
|
||||
1
|
||||
3
|
||||
Generally, you should not change the list that is iterated over. Make a copy
|
||||
first if needed.
|
||||
|
||||
|
||||
White space ~
|
||||
|
||||
Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
@@ -457,17 +605,26 @@ command: >
|
||||
|
||||
White space is required around most operators.
|
||||
|
||||
White space is required in a sublist (list slice) around the ":", except at
|
||||
the start and end: >
|
||||
otherlist = mylist[v : count] # v:count has a different meaning
|
||||
otherlist = mylist[:] # make a copy of the List
|
||||
otherlist = mylist[v :]
|
||||
otherlist = mylist[: v]
|
||||
|
||||
White space is not allowed:
|
||||
- Between a function name and the "(": >
|
||||
call Func (arg) # Error!
|
||||
call Func
|
||||
Func (arg) # Error!
|
||||
Func
|
||||
\ (arg) # Error!
|
||||
call Func(arg) # OK
|
||||
call Func(
|
||||
\ arg) # OK
|
||||
call Func(
|
||||
\ arg # OK
|
||||
\ )
|
||||
Func
|
||||
(arg) # Error!
|
||||
Func(arg) # OK
|
||||
Func(
|
||||
arg) # OK
|
||||
Func(
|
||||
arg # OK
|
||||
)
|
||||
|
||||
|
||||
Conditions and expressions ~
|
||||
@@ -487,7 +644,7 @@ is either falsy or truthy. This is mostly like JavaScript, except that an
|
||||
empty list and dict is falsy:
|
||||
|
||||
type truthy when ~
|
||||
bool v:true or 1
|
||||
bool true, v:true or 1
|
||||
number non-zero
|
||||
float non-zero
|
||||
string non-empty
|
||||
@@ -495,11 +652,11 @@ empty list and dict is falsy:
|
||||
list non-empty (different from JavaScript)
|
||||
dictionary non-empty (different from JavaScript)
|
||||
func when there is a function name
|
||||
special v:true
|
||||
special true or v:true
|
||||
job when not NULL
|
||||
channel when not NULL
|
||||
class when not NULL
|
||||
object when not NULL (TODO: when isTrue() returns v:true)
|
||||
object when not NULL (TODO: when isTrue() returns true)
|
||||
|
||||
The boolean operators "||" and "&&" expect the values to be boolean, zero or
|
||||
one: >
|
||||
@@ -514,25 +671,37 @@ one: >
|
||||
|
||||
When using "!" for inverting, there is no error for using any type and the
|
||||
result is a boolean. "!!" can be used to turn any value into boolean: >
|
||||
!'yes' == false
|
||||
!'yes' == false
|
||||
!![] == false
|
||||
!![1, 2, 3] == true
|
||||
!![1, 2, 3] == true
|
||||
|
||||
When using "`.."` for string concatenation arguments of simple types are
|
||||
always converted to string: >
|
||||
'hello ' .. 123 == 'hello 123'
|
||||
'hello ' .. v:true == 'hello v:true'
|
||||
'hello ' .. v:true == 'hello true'
|
||||
|
||||
Simple types are string, float, special and bool. For other types |string()|
|
||||
can be used.
|
||||
*false* *true*
|
||||
In Vim9 script one can use "true" for v:true and "false" for v:false.
|
||||
*false* *true* *null*
|
||||
In Vim9 script one can use "true" for v:true, "false" for v:false and "null"
|
||||
for v:null. When converting a boolean to a string "false" and "true" are
|
||||
used, not "v:false" and "v:true" like in legacy script. "v:none" is not
|
||||
changed, it is only used in JSON and has no equivalent in other languages.
|
||||
|
||||
Indexing a string with [idx] or [idx, idx] uses character indexes instead of
|
||||
Indexing a string with [idx] or [idx : idx] uses character indexes instead of
|
||||
byte indexes. Example: >
|
||||
echo 'bár'[1]
|
||||
In legacy script this results in the character 0xc3 (an illegal byte), in Vim9
|
||||
script this results in the string 'á'.
|
||||
A negative index is counting from the end, "[-1]" is the last character.
|
||||
To exclude the last character use |slice()|.
|
||||
If the index is out of range then an empty string results.
|
||||
|
||||
In legacy script "++var" and "--var" would be silently accepted and have no
|
||||
effect. This is an error in Vim9 script.
|
||||
|
||||
Numbers starting with zero are not considered to be octal, only numbers
|
||||
starting with "0o" are octal: "0o744". |scriptversion-4|
|
||||
|
||||
|
||||
What to watch out for ~
|
||||
@@ -542,21 +711,22 @@ same time tries to support the legacy Vim commands. Some compromises had to
|
||||
be made. Here is a summary of what might be unexpected.
|
||||
|
||||
Ex command ranges need to be prefixed with a colon. >
|
||||
-> # legacy Vim: shifts the previous line to the right
|
||||
->func() # Vim9: method call in continuation line
|
||||
:-> # Vim9: shifts the previous line to the right
|
||||
-> legacy Vim: shifts the previous line to the right
|
||||
->func() Vim9: method call in a continuation line
|
||||
:-> Vim9: shifts the previous line to the right
|
||||
|
||||
%s/a/b # legacy Vim: substitute on all lines
|
||||
%s/a/b legacy Vim: substitute on all lines
|
||||
x = alongname
|
||||
% another # Vim9: line continuation without a backslash
|
||||
:%s/a/b # Vim9: substitute on all lines
|
||||
'text'->func() # Vim9: method call
|
||||
:'t # legacy Vim: jump to mark m
|
||||
% another Vim9: modulo operator in a continuation line
|
||||
:%s/a/b Vim9: substitute on all lines
|
||||
't legacy Vim: jump to mark t
|
||||
'text'->func() Vim9: method call
|
||||
:'t Vim9: jump to mark t
|
||||
|
||||
Some Ex commands can be confused with assignments in Vim9 script: >
|
||||
g:name = value # assignment
|
||||
g:pattern:cmd # invalid command - ERROR
|
||||
:g:pattern:cmd # :global command
|
||||
g:name = value # assignment
|
||||
g:pattern:cmd # invalid command - ERROR
|
||||
:g:pattern:cmd # :global command
|
||||
|
||||
Functions defined with `:def` compile the whole function. Legacy functions
|
||||
can bail out, and the following lines are not parsed: >
|
||||
@@ -571,12 +741,12 @@ Vim9 functions are compiled as a whole: >
|
||||
if !has('feature')
|
||||
return
|
||||
endif
|
||||
use-feature # May give compilation error
|
||||
use-feature # May give a compilation error
|
||||
enddef
|
||||
For a workaround, split it in two functions: >
|
||||
func Maybe()
|
||||
if has('feature')
|
||||
call MaybyInner()
|
||||
call MaybeInner()
|
||||
endif
|
||||
endfunc
|
||||
if has('feature')
|
||||
@@ -591,12 +761,38 @@ evaluates to false: >
|
||||
use-feature
|
||||
endif
|
||||
enddef
|
||||
< *vim9-user-command*
|
||||
Another side effect of compiling a function is that the presence of a user
|
||||
command is checked at compile time. If the user command is defined later an
|
||||
error will result. This works: >
|
||||
command -nargs=1 MyCommand echom <q-args>
|
||||
def Works()
|
||||
MyCommand 123
|
||||
enddef
|
||||
This will give an error for "MyCommand" not being defined: >
|
||||
def Works()
|
||||
command -nargs=1 MyCommand echom <q-args>
|
||||
MyCommand 123
|
||||
enddef
|
||||
A workaround is to invoke the command indirectly with `:execute`: >
|
||||
def Works()
|
||||
command -nargs=1 MyCommand echom <q-args>
|
||||
execute 'MyCommand 123'
|
||||
enddef
|
||||
|
||||
Note that for unrecognized commands there is no check for "|" and a following
|
||||
command. This will give an error for missing `endif`: >
|
||||
def Maybe()
|
||||
if has('feature') | use-feature | endif
|
||||
enddef
|
||||
|
||||
Other differences ~
|
||||
|
||||
Patterns are used like 'magic' is set, unless explicitly overruled.
|
||||
The 'edcompatible' option value is not used.
|
||||
The 'gdefault' option value is not used.
|
||||
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. New style functions *fast-functions*
|
||||
@@ -657,21 +853,30 @@ prefix and they do not need to exist (they can be deleted any time).
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
:disa[ssemble]! {func} Like `:disassemble` but with the instructions used for
|
||||
profiling.
|
||||
|
||||
Limitations ~
|
||||
|
||||
Local variables will not be visible to string evaluation. For example: >
|
||||
def EvalString(): list<string>
|
||||
def MapList(): list<string>
|
||||
var list = ['aa', 'bb', 'cc', 'dd']
|
||||
return range(1, 2)->map('list[v:val]')
|
||||
enddef
|
||||
|
||||
The map argument is a string expression, which is evaluated without the
|
||||
function scope. Instead, use a lambda: >
|
||||
def EvalString(): list<string>
|
||||
def MapList(): list<string>
|
||||
var list = ['aa', 'bb', 'cc', 'dd']
|
||||
return range(1, 2)->map({ _, v -> list[v] })
|
||||
return range(1, 2)->map(( _, v) => list[v])
|
||||
enddef
|
||||
|
||||
The same is true for commands that are not compiled, such as `:global`.
|
||||
For these the backtick expansion can be used. Example: >
|
||||
def Replace()
|
||||
var newText = 'blah'
|
||||
g/pattern/s/^/`=newText`/
|
||||
enddef
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -766,12 +971,14 @@ compiled code the "any" type is assumed.
|
||||
This can be a problem when the "any" type is undesired and the actual type is
|
||||
expected to always be the same. For example, when declaring a list: >
|
||||
var l: list<number> = [1, g:two]
|
||||
This will give an error, because "g:two" has type "any". To avoid this, use a
|
||||
type cast: >
|
||||
At compile time Vim doesn't know the type of "g:two" and the expression type
|
||||
becomes list<any>. An instruction is generated to check the list type before
|
||||
doing the assignment, which is a bit inefficient.
|
||||
*type-casting*
|
||||
To avoid this, use a type cast: >
|
||||
var l: list<number> = [1, <number>g:two]
|
||||
< *type-casting*
|
||||
The compiled code will then check that "g:two" is a number at runtime and give
|
||||
an error if it isn't. This is called type casting.
|
||||
The compiled code will then only check that "g:two" is a number and give an
|
||||
error if it isn't. This is called type casting.
|
||||
|
||||
The syntax of a type cast is: "<" {type} ">". There cannot be white space
|
||||
after the "<" or before the ">" (to avoid them being confused with
|
||||
@@ -813,6 +1020,12 @@ an error, thus breaking backwards compatibility. For example:
|
||||
- Using a string value when setting a number options.
|
||||
- Using a number where a string is expected. *E1024*
|
||||
|
||||
One consequence is that the item type of a list or dict given to map() must
|
||||
not change. This will give an error in compiled code: >
|
||||
map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
E1012: Type mismatch; expected list<number> but got list<string>
|
||||
Instead use |mapnew()|.
|
||||
|
||||
==============================================================================
|
||||
|
||||
5. Namespace, Import and Export
|
||||
@@ -829,7 +1042,7 @@ that you don't do that.
|
||||
|
||||
|
||||
Namespace ~
|
||||
*:vim9script* *:vim9*
|
||||
*vim9-namespace*
|
||||
To recognize a file that can be imported the `vim9script` statement must
|
||||
appear as the first statement in the file. It tells Vim to interpret the
|
||||
script in its own namespace, instead of the global namespace. If a file
|
||||
@@ -922,14 +1135,14 @@ actually needed. A recommended mechanism:
|
||||
|
||||
1. In the plugin define user commands, functions and/or mappings that refer to
|
||||
an autoload script. >
|
||||
command -nargs=1 SearchForStuff call searchfor#Stuff(<f-args>)
|
||||
command -nargs=1 SearchForStuff searchfor#Stuff(<f-args>)
|
||||
|
||||
< This goes in .../plugin/anyname.vim. "anyname.vim" can be freely chosen.
|
||||
|
||||
2. In the autoload script do the actual work. You can import items from
|
||||
other files to split up functionality in appropriate pieces. >
|
||||
vim9script
|
||||
import FilterFunc from "../import/someother.vim"
|
||||
import FilterFunc from "../import/someother.vim"
|
||||
def searchfor#Stuff(arg: string)
|
||||
var filtered = FilterFunc(arg)
|
||||
...
|
||||
@@ -1015,12 +1228,12 @@ When compiling lines of Vim commands into instructions as much as possible
|
||||
should be done at compile time. Postponing it to runtime makes the execution
|
||||
slower and means mistakes are found only later. For example, when
|
||||
encountering the "+" character and compiling this into a generic add
|
||||
instruction, at execution time the instruction would have to inspect the type
|
||||
of the arguments and decide what kind of addition to do. And when the
|
||||
type is dictionary throw an error. If the types are known to be numbers then
|
||||
an "add number" instruction can be used, which is faster. The error can be
|
||||
given at compile time, no error handling is needed at runtime, since adding
|
||||
two numbers cannot fail.
|
||||
instruction, at runtime the instruction would have to inspect the type of the
|
||||
arguments and decide what kind of addition to do. And when the type is
|
||||
dictionary throw an error. If the types are known to be numbers then an "add
|
||||
number" instruction can be used, which is faster. The error can be given at
|
||||
compile time, no error handling is needed at runtime, since adding two numbers
|
||||
cannot fail.
|
||||
|
||||
The syntax for types, using <type> for compound types, is similar to Java. It
|
||||
is easy to understand and widely used. The type names are what were used in
|
||||
@@ -1103,7 +1316,7 @@ are used. That is different, thus it's good to use a different command:
|
||||
`:var`. This is used in many languages. The semantics might be slightly
|
||||
different, but it's easily recognized as a declaration.
|
||||
|
||||
Using `:const` for constants is common, but the semantics vary. Some
|
||||
Using `:const` for constants is common, but the semantics varies. Some
|
||||
languages only make the variable immutable, others also make the value
|
||||
immutable. Since "final" is well known from Java for only making the variable
|
||||
immutable we decided to use that. And then `:const` can be used for making
|
||||
@@ -1163,7 +1376,7 @@ text not starting with a number would be converted to zero, which is
|
||||
considered false. Thus using a string for a condition would often not give an
|
||||
error and be considered false. That is confusing.
|
||||
|
||||
In Vim9 type checking is more strict to avoid mistakes. Where a condition is
|
||||
In Vim9 type checking is stricter to avoid mistakes. Where a condition is
|
||||
used, e.g. with the `:if` command and the `||` operator, only boolean-like
|
||||
values are accepted:
|
||||
true: `true`, `v:true`, `1`, `0 < 9`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Nov 07
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Dec 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -205,11 +205,6 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|
||||
This behaves like a ":split" first, and then an ":enew"
|
||||
command.
|
||||
|
||||
:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew*
|
||||
Like |:new|, but split vertically. If 'equalalways' is set
|
||||
and 'eadirection' isn't "ver" the windows will be spread out
|
||||
horizontally, unless a width was specified.
|
||||
|
||||
:[N]new [++opt] [+cmd] {file}
|
||||
:[N]sp[lit] [++opt] [+cmd] {file} *:split_f*
|
||||
Create a new window and start editing file {file} in it. This
|
||||
@@ -221,6 +216,11 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|
||||
height). Reduces the current window height to create room
|
||||
(and others, if the 'equalalways' option is set).
|
||||
|
||||
:[N]vne[w] [++opt] [+cmd] [file] *:vne* *:vnew*
|
||||
Like |:new|, but split vertically. If 'equalalways' is set
|
||||
and 'eadirection' isn't "ver" the windows will be spread out
|
||||
horizontally, unless a width was specified.
|
||||
|
||||
:[N]sv[iew] [++opt] [+cmd] [file] *:sv* *:sview* *splitview*
|
||||
Same as ":split", but set 'readonly' option for this buffer.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Oct 24
|
||||
" Last Change: 2021 Jan 21
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@@ -499,6 +499,9 @@ au BufNewFile,BufRead *.com call dist#ft#BindzoneCheck('dcl')
|
||||
" DOT
|
||||
au BufNewFile,BufRead *.dot,*.gv setf dot
|
||||
|
||||
" Dune
|
||||
au BufNewFile,BufRead jbuild,dune,dune-project,dune-workspace setf dune
|
||||
|
||||
" Dylan - lid files
|
||||
au BufNewFile,BufRead *.lid setf dylanlid
|
||||
|
||||
@@ -586,6 +589,9 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan
|
||||
" Factor
|
||||
au BufNewFile,BufRead *.factor setf factor
|
||||
|
||||
" Fennel
|
||||
autocmd BufRead,BufNewFile *.fnl setf fennel
|
||||
|
||||
" Fetchmail RC file
|
||||
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
||||
|
||||
@@ -627,6 +633,9 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
" Gedcom
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Gift (Moodle)
|
||||
autocmd BufRead,BufNewFile *.gift setf gift
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
au BufNewFile,BufRead *.git/config,.gitconfig,/etc/gitconfig setf gitconfig
|
||||
@@ -696,12 +705,15 @@ au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
|
||||
au BufNewFile,BufRead *.haml setf haml
|
||||
|
||||
" Hamster Classic | Playground files
|
||||
au BufNewFile,BufRead *.hsc,*.hsm setf hamster
|
||||
au BufNewFile,BufRead *.hsm setf hamster
|
||||
|
||||
" Haskell
|
||||
au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
|
||||
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot setf haskell
|
||||
au BufNewFile,BufRead *.lhs setf lhaskell
|
||||
au BufNewFile,BufRead *.chs setf chaskell
|
||||
au BufNewFile,BufRead cabal.project setf cabalproject
|
||||
au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig
|
||||
au BufNewFile,BufRead cabal.config setf cabalconfig
|
||||
|
||||
" Haste
|
||||
au BufNewFile,BufRead *.ht setf haste
|
||||
@@ -1119,8 +1131,8 @@ au BufNewFile,BufRead *.nse setf lua
|
||||
" NSIS
|
||||
au BufNewFile,BufRead *.nsi,*.nsh setf nsis
|
||||
|
||||
" OCAML
|
||||
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit setf ocaml
|
||||
" OCaml
|
||||
au BufNewFile,BufRead *.ml,*.mli,*.mll,*.mly,.ocamlinit,*.mlt,*.mlp,*.mlip,*.mli.cppo,*.ml.cppo setf ocaml
|
||||
|
||||
" Occam
|
||||
au BufNewFile,BufRead *.occ setf occam
|
||||
@@ -1128,6 +1140,9 @@ au BufNewFile,BufRead *.occ setf occam
|
||||
" Omnimark
|
||||
au BufNewFile,BufRead *.xom,*.xin setf omnimark
|
||||
|
||||
" OPAM
|
||||
au BufNewFile,BufRead opam,*.opam,*.opam.template setf opam
|
||||
|
||||
" OpenROAD
|
||||
au BufNewFile,BufRead *.or setf openroad
|
||||
|
||||
@@ -1161,8 +1176,11 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
|
||||
" Password file
|
||||
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
|
||||
|
||||
" Pascal (also *.p)
|
||||
au BufNewFile,BufRead *.pas,*.pp setf pascal
|
||||
" Pascal (also *.p, *.pp, *.inc)
|
||||
au BufNewFile,BufRead *.pas setf pascal
|
||||
|
||||
" Pascal or Puppet manifest
|
||||
au BufNewFile,BufRead *.pp call dist#ft#FTpp()
|
||||
|
||||
" Delphi or Lazarus program file
|
||||
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
||||
@@ -1252,7 +1270,7 @@ au BufNewFile,BufRead *.pov setf pov
|
||||
" Povray configuration
|
||||
au BufNewFile,BufRead .povrayrc setf povini
|
||||
|
||||
" Povray, PHP or assembly
|
||||
" Povray, Pascal, PHP or assembly
|
||||
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
|
||||
|
||||
" Printcap and Termcap
|
||||
@@ -1261,13 +1279,19 @@ au BufNewFile,BufRead *printcap
|
||||
au BufNewFile,BufRead *termcap
|
||||
\ let b:ptcap_type = "term" | setf ptcap
|
||||
|
||||
" PCCTS / ANTRL
|
||||
"au BufNewFile,BufRead *.g setf antrl
|
||||
" PCCTS / ANTLR
|
||||
"au BufNewFile,BufRead *.g setf antlr
|
||||
au BufNewFile,BufRead *.g setf pccts
|
||||
|
||||
" PPWizard
|
||||
au BufNewFile,BufRead *.it,*.ih setf ppwiz
|
||||
|
||||
" Puppet
|
||||
au BufNewFile,BufRead Puppetfile setf ruby
|
||||
|
||||
" Embedded Puppet
|
||||
au BufNewFile,BufRead *.epp setf epuppet
|
||||
|
||||
" Obj 3D file format
|
||||
" TODO: is there a way to avoid MS-Windows Object files?
|
||||
au BufNewFile,BufRead *.obj setf obj
|
||||
@@ -1305,6 +1329,7 @@ au BufNewFile,BufRead *.pml setf promela
|
||||
|
||||
" Google protocol buffers
|
||||
au BufNewFile,BufRead *.proto setf proto
|
||||
au BufNewFile,BufRead *.pbtxt setf pbtxt
|
||||
|
||||
" Protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
@@ -1409,8 +1434,8 @@ au BufNewFile,BufRead *.rb,*.rbw setf ruby
|
||||
" RubyGems
|
||||
au BufNewFile,BufRead *.gemspec setf ruby
|
||||
|
||||
" Rust
|
||||
au BufNewFile,BufRead *.rs setf rust
|
||||
" RBS (Ruby Signature)
|
||||
au BufNewFile,BufRead *.rbs setf rbs
|
||||
|
||||
" Rackup
|
||||
au BufNewFile,BufRead *.ru setf ruby
|
||||
@@ -1424,6 +1449,9 @@ au BufNewFile,BufRead *.builder,*.rxml,*.rjs setf ruby
|
||||
" Rantfile and Rakefile is like Ruby
|
||||
au BufNewFile,BufRead [rR]antfile,*.rant,[rR]akefile,*.rake setf ruby
|
||||
|
||||
" Rust
|
||||
au BufNewFile,BufRead *.rs setf rust
|
||||
|
||||
" S-lang (or shader language, or SmallLisp)
|
||||
au BufNewFile,BufRead *.sl setf slang
|
||||
|
||||
@@ -1540,6 +1568,9 @@ au BufNewFile,BufRead *.scm,*.ss,*.rkt setf scheme
|
||||
" Screen RC
|
||||
au BufNewFile,BufRead .screenrc,screenrc setf screen
|
||||
|
||||
" Sexplib
|
||||
au BufNewFile,BufRead *.sexp setf sexplib
|
||||
|
||||
" Simula
|
||||
au BufNewFile,BufRead *.sim setf simula
|
||||
|
||||
@@ -1600,6 +1631,9 @@ au BufNewFile,BufRead *.mib,*.my setf mib
|
||||
au BufNewFile,BufRead *.hog,snort.conf,vision.conf setf hog
|
||||
au BufNewFile,BufRead *.rules call dist#ft#FTRules()
|
||||
|
||||
" SPARQL queries
|
||||
au BufNewFile,BufRead *.rq,*.sparql setf sparql
|
||||
|
||||
" Spec (Linux RPM)
|
||||
au BufNewFile,BufRead *.spec setf spec
|
||||
|
||||
@@ -1710,8 +1744,13 @@ au BufNewFile,BufRead *.tli setf tli
|
||||
" Telix Salt
|
||||
au BufNewFile,BufRead *.slt setf tsalt
|
||||
|
||||
" Tera Term Language
|
||||
au BufRead,BufNewFile *.ttl setf teraterm
|
||||
" Tera Term Language or Turtle
|
||||
au BufRead,BufNewFile *.ttl
|
||||
\ if getline(1) =~ '^@\?\(prefix\|base\)' |
|
||||
\ setf turtle |
|
||||
\ else |
|
||||
\ setf teraterm |
|
||||
\ endif
|
||||
|
||||
" Terminfo
|
||||
au BufNewFile,BufRead *.ti setf terminfo
|
||||
@@ -1738,6 +1777,9 @@ au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
|
||||
" tmux configuration
|
||||
au BufNewFile,BufRead {.,}tmux*.conf setf tmux
|
||||
|
||||
" TOML
|
||||
au BufNewFile,BufRead *.toml setf toml
|
||||
|
||||
" TPP - Text Presentation Program
|
||||
au BufNewFile,BufReadPost *.tpp setf tpp
|
||||
|
||||
@@ -1759,8 +1801,13 @@ au BufNewFile,BufReadPost *.tsscl setf tsscl
|
||||
" TWIG files
|
||||
au BufNewFile,BufReadPost *.twig setf twig
|
||||
|
||||
" Typescript
|
||||
au BufNewFile,BufReadPost *.ts setf typescript
|
||||
" Typescript or Qt translation file (which is XML)
|
||||
au BufNewFile,BufReadPost *.ts
|
||||
\ if getline(1) =~ '<?xml' |
|
||||
\ setf xml |
|
||||
\ else |
|
||||
\ setf typescript |
|
||||
\ endif
|
||||
|
||||
" TypeScript with React
|
||||
au BufNewFile,BufRead *.tsx setf typescriptreact
|
||||
@@ -2036,12 +2083,14 @@ au BufNewFile,BufRead bzr_log.* setf bzr
|
||||
|
||||
" Bazel build file
|
||||
if !has("fname_case")
|
||||
au BufNewFile,BufRead *.BUILD,BUILD setf bzl
|
||||
au BufNewFile,BufRead *.BUILD,BUILD setf bzl
|
||||
endif
|
||||
|
||||
" BIND zone
|
||||
au BufNewFile,BufRead */named/db.*,*/bind/db.* call s:StarSetf('bindzone')
|
||||
|
||||
au BufNewFile,BufRead cabal.project.* call s:StarSetf('cabalproject')
|
||||
|
||||
" Calendar
|
||||
au BufNewFile,BufRead */.calendar/*,
|
||||
\*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
|
||||
|
||||
@@ -159,40 +159,41 @@ if exists("g:ada_abbrev")
|
||||
endif
|
||||
|
||||
" Section: Commands, Mapping, Menus {{{1
|
||||
"
|
||||
call ada#Map_Popup (
|
||||
\ 'Tag.List',
|
||||
\ 'l',
|
||||
\ 'call ada#List_Tag ()')
|
||||
call ada#Map_Popup (
|
||||
\'Tag.Jump',
|
||||
\'j',
|
||||
\'call ada#Jump_Tag ()')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create File',
|
||||
\':AdaTagFile',
|
||||
\'call ada#Create_Tags (''file'')')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create Dir',
|
||||
\':AdaTagDir',
|
||||
\'call ada#Create_Tags (''dir'')')
|
||||
if !exists(':AdaTagFile')
|
||||
call ada#Map_Popup (
|
||||
\ 'Tag.List',
|
||||
\ 'l',
|
||||
\ 'call ada#List_Tag ()')
|
||||
call ada#Map_Popup (
|
||||
\'Tag.Jump',
|
||||
\'j',
|
||||
\'call ada#Jump_Tag ()')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create File',
|
||||
\':AdaTagFile',
|
||||
\'call ada#Create_Tags (''file'')')
|
||||
call ada#Map_Menu (
|
||||
\'Tag.Create Dir',
|
||||
\':AdaTagDir',
|
||||
\'call ada#Create_Tags (''dir'')')
|
||||
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Space Errors',
|
||||
\ ':AdaSpaces',
|
||||
\'call ada#Switch_Syntax_Option (''space_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Lines Errors',
|
||||
\ ':AdaLines',
|
||||
\'call ada#Switch_Syntax_Option (''line_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Rainbow Color',
|
||||
\ ':AdaRainbow',
|
||||
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Standard Types',
|
||||
\ ':AdaTypes',
|
||||
\'call ada#Switch_Syntax_Option (''standard_types'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Space Errors',
|
||||
\ ':AdaSpaces',
|
||||
\'call ada#Switch_Syntax_Option (''space_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Lines Errors',
|
||||
\ ':AdaLines',
|
||||
\'call ada#Switch_Syntax_Option (''line_errors'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Rainbow Color',
|
||||
\ ':AdaRainbow',
|
||||
\'call ada#Switch_Syntax_Option (''rainbow_color'')')
|
||||
call ada#Map_Menu (
|
||||
\'Highlight.Toggle Standard Types',
|
||||
\ ':AdaTypes',
|
||||
\'call ada#Switch_Syntax_Option (''standard_types'')')
|
||||
endif
|
||||
|
||||
" 1}}}
|
||||
" Reset cpoptions
|
||||
|
||||
27
runtime/ftplugin/basic.vim
Normal file
27
runtime/ftplugin/basic.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: BASIC
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:REM,:'
|
||||
setlocal commentstring='\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "BASIC Source Files (*.bas)\t*.bas\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms< sua<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Bazel (http://bazel.io)
|
||||
" Maintainer: David Barnett (https://github.com/google/vim-ft-bzl)
|
||||
" Last Change: 2015 Aug 11
|
||||
" Last Change: 2021 Jan 19
|
||||
|
||||
""
|
||||
" @section Introduction, intro
|
||||
@@ -51,6 +51,8 @@ if get(g:, 'ft_bzl_fold', 0)
|
||||
endif
|
||||
|
||||
if exists('*BzlFoldText')
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
||||
finish
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: CSS
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-09
|
||||
" Last Change: 2020 Dec 21
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -12,11 +12,12 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo< ofu<"
|
||||
let b:undo_ftplugin = "setl com< cms< inc< fo< ofu< isk<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/ commentstring&
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
setlocal omnifunc=csscomplete#CompleteCSS
|
||||
setlocal iskeyword+=-
|
||||
|
||||
let &l:include = '^\s*@import\s\+\%(url(\)\='
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Language: Dune buildsystem
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" Anton Kochkov <anton.kochkov@gmail.com>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2018 Nov 3 - Added commentstring (Markus Mottl)
|
||||
" 2017 Sep 6 - Initial version (Etienne Millon)
|
||||
|
||||
@@ -1,87 +1,83 @@
|
||||
" Vim ftplugin file
|
||||
" Language: Erlang
|
||||
" Language: Erlang (http://www.erlang.org)
|
||||
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" Author: Oscar Hellström <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
" Eduardo Lopez (http://github.com/tapichu)
|
||||
" Arvid Bjurklint (http://github.com/slarwise)
|
||||
" Last Update: 2021-Jan-08
|
||||
" License: Vim license
|
||||
" Version: 2012/01/25
|
||||
" URL: https://github.com/vim-erlang/vim-erlang-runtime
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
else
|
||||
let b:did_ftplugin = 1
|
||||
endif
|
||||
|
||||
if exists('s:did_function_definitions')
|
||||
call s:SetErlangOptions()
|
||||
finish
|
||||
else
|
||||
let s:did_function_definitions = 1
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists('g:erlang_keywordprg')
|
||||
let g:erlang_keywordprg = 'erl -man'
|
||||
let &l:keywordprg = get(g:, 'erlang_keywordprg', 'erl -man')
|
||||
|
||||
if get(g:, 'erlang_folding', 0)
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=GetErlangFold(v:lnum)
|
||||
setlocal foldtext=ErlangFoldText()
|
||||
endif
|
||||
|
||||
if !exists('g:erlang_folding')
|
||||
let g:erlang_folding = 0
|
||||
endif
|
||||
setlocal comments=:%%%,:%%,:%
|
||||
setlocal commentstring=%%s
|
||||
|
||||
setlocal formatoptions+=ro
|
||||
|
||||
setlocal suffixesadd=.erl,.hrl
|
||||
|
||||
let &l:include = '^\s*-\%(include\|include_lib\)\s*("\zs\f*\ze")'
|
||||
let &l:define = '^\s*-\%(define\|record\|type\|opaque\)'
|
||||
|
||||
let s:erlang_fun_begin = '^\a\w*(.*$'
|
||||
let s:erlang_fun_end = '^[^%]*\.\s*\(%.*\)\?$'
|
||||
|
||||
function s:SetErlangOptions()
|
||||
if g:erlang_folding
|
||||
setlocal foldmethod=expr
|
||||
setlocal foldexpr=GetErlangFold(v:lnum)
|
||||
setlocal foldtext=ErlangFoldText()
|
||||
endif
|
||||
if !exists('*GetErlangFold')
|
||||
function GetErlangFold(lnum)
|
||||
let lnum = a:lnum
|
||||
let line = getline(lnum)
|
||||
|
||||
setlocal comments=:%%%,:%%,:%
|
||||
setlocal commentstring=%%s
|
||||
if line =~ s:erlang_fun_end
|
||||
return '<1'
|
||||
endif
|
||||
|
||||
setlocal formatoptions+=ro
|
||||
let &l:keywordprg = g:erlang_keywordprg
|
||||
endfunction
|
||||
if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
|
||||
return '1'
|
||||
endif
|
||||
|
||||
function GetErlangFold(lnum)
|
||||
let lnum = a:lnum
|
||||
let line = getline(lnum)
|
||||
if line =~ s:erlang_fun_begin
|
||||
return '>1'
|
||||
endif
|
||||
|
||||
if line =~ s:erlang_fun_end
|
||||
return '<1'
|
||||
endif
|
||||
return '='
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if line =~ s:erlang_fun_begin && foldlevel(lnum - 1) == 1
|
||||
return '1'
|
||||
endif
|
||||
if !exists('*ErlangFoldText')
|
||||
function ErlangFoldText()
|
||||
let line = getline(v:foldstart)
|
||||
let foldlen = v:foldend - v:foldstart + 1
|
||||
let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '')
|
||||
if foldlen < 10
|
||||
let lines = ' ' . lines
|
||||
endif
|
||||
let retval = '+' . v:folddashes . lines
|
||||
|
||||
if line =~ s:erlang_fun_begin
|
||||
return '>1'
|
||||
endif
|
||||
return retval
|
||||
endfunction
|
||||
endif
|
||||
|
||||
return '='
|
||||
endfunction
|
||||
|
||||
function ErlangFoldText()
|
||||
let line = getline(v:foldstart)
|
||||
let foldlen = v:foldend - v:foldstart + 1
|
||||
let lines = ' ' . foldlen . ' lines: ' . substitute(line, "[\ \t]*", '', '')
|
||||
if foldlen < 10
|
||||
let lines = ' ' . lines
|
||||
endif
|
||||
let retval = '+' . v:folddashes . lines
|
||||
|
||||
return retval
|
||||
endfunction
|
||||
|
||||
call s:SetErlangOptions()
|
||||
|
||||
let b:undo_ftplugin = "setlocal foldmethod< foldexpr< foldtext<"
|
||||
\ . " comments< commentstring< formatoptions<"
|
||||
let b:undo_ftplugin = "setlocal keywordprg< foldmethod< foldexpr< foldtext<"
|
||||
\ . " comments< commentstring< formatoptions< suffixesadd< include<"
|
||||
\ . " define<"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: sw=2 et
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2008-07-19
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< inc< | unlet! b:matchwords"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=/*\ %s\ */
|
||||
|
||||
13
runtime/ftplugin/freebasic.vim
Normal file
13
runtime/ftplugin/freebasic.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: FreeBasic
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2015 Jan 10
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
runtime! ftplugin/basic.vim
|
||||
|
||||
" vim: ts=8
|
||||
19
runtime/ftplugin/fstab.vim
Normal file
19
runtime/ftplugin/fstab.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim ftplugin file
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim
|
||||
" Last Change: 2021 Jan 02
|
||||
" Version: 1.0
|
||||
"
|
||||
" Credits:
|
||||
" Subhaditya Nath <sn03.general@gmail.com>
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=#%s
|
||||
let b:undo_ftplugin = "setlocal commentstring<"
|
||||
|
||||
" vim: ts=8 ft=vim
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Hamster Script
|
||||
" Version: 2.0.6.0
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Last Change: 2017 Mar 18
|
||||
" Last Change: 2021 Jan 19
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -57,6 +57,9 @@ if exists("loaded_matchit")
|
||||
endif
|
||||
|
||||
setlocal ignorecase
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
setlocal cpo+=M " makes \%( match \)
|
||||
|
||||
" Disabled, 'cpo' is a global option.
|
||||
" setlocal cpo+=M " makes \%( match \)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
" Vim filetype plugin
|
||||
" Language: roff(7)
|
||||
" Maintainer: Chris Spiegel <cspiegel@gmail.com>
|
||||
" Last Change: 2019 Apr 24
|
||||
" Maintainer: Aman Verma
|
||||
" Homepage: https://github.com/a-vrma/vim-nroff-ftplugin
|
||||
" Previous Maintainer: Chris Spiegel <cspiegel@gmail.com>
|
||||
" Last Change: 2020 Nov 21
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@@ -9,3 +11,7 @@ endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal commentstring=.\\\"%s
|
||||
setlocal comments=:.\\\"
|
||||
setlocal sections+=Sh
|
||||
|
||||
let b:undo_ftplugin = 'setlocal commentstring< comments< sections<'
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" Pierre Vittet <pierre-vittet@pvittet.com>
|
||||
" Stefano Zacchiroli <zack@bononia.it>
|
||||
" Vincent Aravantinos <firstname.name@imag.fr>
|
||||
" URL: https://github.com/rgrinberg/vim-ocaml
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2013 Oct 27 - Added commentstring (MM)
|
||||
" 2013 Jul 26 - load default compiler settings (MM)
|
||||
@@ -38,7 +38,8 @@ let s:cposet=&cpoptions
|
||||
set cpo&vim
|
||||
|
||||
" Comment string
|
||||
setlocal comments=
|
||||
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
|
||||
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
|
||||
setlocal commentstring=(*%s*)
|
||||
|
||||
" Add mappings, unless the user didn't want this.
|
||||
@@ -158,6 +159,8 @@ let b:undo_ftplugin = "setlocal efm< foldmethod< foldexpr<"
|
||||
" - Only definitions below, executed once -------------------------------------
|
||||
|
||||
if exists("*OMLetFoldLevel")
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -391,9 +394,9 @@ endfunction
|
||||
endif
|
||||
endfun
|
||||
|
||||
" This variable contain a dictionnary of list. Each element of the dictionnary
|
||||
" represent an annotation system. An annotation system is a list with :
|
||||
" - annotation file name as it's key
|
||||
" This variable contains a dictionary of lists. Each element of the dictionary
|
||||
" represents an annotation system. An annotation system is a list with:
|
||||
" - annotation file name as its key
|
||||
" - annotation file path as first element of the contained list
|
||||
" - build path as second element of the contained list
|
||||
" - annot_file_last_mod (contain the date of .annot file) as third element
|
||||
@@ -521,7 +524,7 @@ endfunction
|
||||
"c. link this stuff with what the user wants
|
||||
" ie. get the expression selected/under the cursor
|
||||
|
||||
let s:ocaml_word_char = '\w|[<EFBFBD>-<2D>]|'''
|
||||
let s:ocaml_word_char = '\w|[\xc0-\xff]|'''
|
||||
|
||||
"In: the current mode (eg. "visual", "normal", etc.)
|
||||
"Out: the borders of the expression we are looking for the type
|
||||
@@ -634,7 +637,7 @@ endfunction
|
||||
nnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("normal")<CR>
|
||||
xnoremap <silent> <Plug>OCamlPrintType :<C-U>call Ocaml_print_type("visual")<CR>`<
|
||||
|
||||
let &cpoptions=s:cposet
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
|
||||
" vim:sw=2 fdm=indent
|
||||
|
||||
21
runtime/ftplugin/pbtxt.vim
Normal file
21
runtime/ftplugin/pbtxt.vim
Normal file
@@ -0,0 +1,21 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Protobuf Text Format
|
||||
" Maintainer: Lakshay Garg <lakshayg@outlook.in>
|
||||
" Last Change: 2020 Nov 17
|
||||
" Homepage: https://github.com/lakshayg/vim-pbtxt
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet
|
||||
15
runtime/ftplugin/sexplib.vim
Normal file
15
runtime/ftplugin/sexplib.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Sexplib
|
||||
" Maintainer: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change:
|
||||
" 2017 Apr 12 - First version (MM)
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin=1
|
||||
|
||||
" Comment string
|
||||
setl commentstring=;\ %s
|
||||
setl comments=:;
|
||||
@@ -73,23 +73,23 @@ if !exists("*s:SpecChangelog")
|
||||
let chgline = -1
|
||||
while (line <= line("$"))
|
||||
let linestr = getline(line)
|
||||
if (name == "" && linestr =~? '^Name:')
|
||||
if name == "" && linestr =~? '^Name:'
|
||||
let nameline = line
|
||||
let name = substitute(strpart(linestr,5), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
elseif (ver == "" && linestr =~? '^Version:')
|
||||
elseif ver == "" && linestr =~? '^Version:'
|
||||
let verline = line
|
||||
let ver = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
elseif (rel == "" && linestr =~? '^Release:')
|
||||
elseif rel == "" && linestr =~? '^Release:'
|
||||
let relline = line
|
||||
let rel = substitute(strpart(linestr,8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
elseif (linestr =~? '^%changelog')
|
||||
elseif linestr =~? '^%changelog'
|
||||
let chgline = line
|
||||
execute line
|
||||
break
|
||||
endif
|
||||
let line = line+1
|
||||
endwhile
|
||||
if (nameline != -1 && verline != -1 && relline != -1)
|
||||
if nameline != -1 && verline != -1 && relline != -1
|
||||
let include_release_info = exists("g:spec_chglog_release_info")
|
||||
let name = s:ParseRpmVars(name, nameline)
|
||||
let ver = s:ParseRpmVars(ver, verline)
|
||||
@@ -100,20 +100,20 @@ if !exists("*s:SpecChangelog")
|
||||
|
||||
call s:GetRelVer()
|
||||
|
||||
if (chgline == -1)
|
||||
if chgline == -1
|
||||
let option = confirm("Can't find %changelog. Create one? ","&End of file\n&Here\n&Cancel",3)
|
||||
if (option == 1)
|
||||
if option == 1
|
||||
call append(line("$"),"")
|
||||
call append(line("$"),"%changelog")
|
||||
execute line("$")
|
||||
let chgline = line(".")
|
||||
elseif (option == 2)
|
||||
elseif option == 2
|
||||
call append(line("."),"%changelog")
|
||||
normal j
|
||||
chgline = line(".")
|
||||
let chgline = line(".")
|
||||
endif
|
||||
endif
|
||||
if (chgline != -1)
|
||||
if chgline != -1
|
||||
let tmptime = v:lc_time
|
||||
language time C
|
||||
let parsed_format = "* ".strftime(format)." - ".ver."-".rel
|
||||
@@ -122,16 +122,16 @@ if !exists("*s:SpecChangelog")
|
||||
let wrong_format = 0
|
||||
let wrong_release = 0
|
||||
let insert_line = 0
|
||||
if (getline(chgline+1) != parsed_format)
|
||||
if getline(chgline+1) != parsed_format
|
||||
let wrong_format = 1
|
||||
endif
|
||||
if (include_release_info && getline(chgline+2) != release_info)
|
||||
if include_release_info && getline(chgline+2) != release_info
|
||||
let wrong_release = 1
|
||||
endif
|
||||
if (wrong_format || wrong_release)
|
||||
if (include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release"))
|
||||
if wrong_format || wrong_release
|
||||
if include_release_info && !wrong_release && !exists("g:spec_chglog_never_increase_release")
|
||||
let option = confirm("Increase release? ","&Yes\n&No",1)
|
||||
if (option == 1)
|
||||
if option == 1
|
||||
execute relline
|
||||
normal
|
||||
let rel = substitute(strpart(getline(relline),8), '^[ ]*\([^ ]\+\)[ ]*$','\1','')
|
||||
@@ -171,13 +171,13 @@ if !exists("*s:ParseRpmVars")
|
||||
let ret = ""
|
||||
while (1)
|
||||
let start = match(a:str, "\%{", end+1)
|
||||
if (start == -1)
|
||||
if start == -1
|
||||
let ret = ret . strpart(a:str, end+1)
|
||||
break
|
||||
endif
|
||||
let ret = ret . strpart(a:str, end+1, start-(end+1))
|
||||
let end = match(a:str, "}", start)
|
||||
if (end == -1)
|
||||
if end == -1
|
||||
let ret = ret . strpart(a:str, start)
|
||||
break
|
||||
endif
|
||||
@@ -185,7 +185,7 @@ if !exists("*s:ParseRpmVars")
|
||||
execute a:strline
|
||||
let definestr = "^[ \t]*%\\(define\\|global\\)[ \t]\\+".varname."[ \t]\\+\\(.*\\)$"
|
||||
let linenum = search(definestr, "bW")
|
||||
if (linenum != 0)
|
||||
if linenum != 0
|
||||
let ret = ret . substitute(getline(linenum), definestr, "\\2", "")
|
||||
endif
|
||||
endwhile
|
||||
|
||||
@@ -6,7 +6,16 @@
|
||||
" See https://swift.org/LICENSE.txt for license information
|
||||
" See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
||||
"
|
||||
" Vim maintainer: Emir SARI <bitigchi@me.com>
|
||||
" Vim maintainer: Emir SARI <bitigchi@me.com>
|
||||
" Last Change: 2021 Jan 08
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let b:did_ftplugin = 1
|
||||
let b:undo_ftplugin = "setlocal comments< expandtab< tabstop< shiftwidth< smartindent<"
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal expandtab
|
||||
|
||||
32
runtime/ftplugin/tidy.vim
Normal file
32
runtime/ftplugin/tidy.vim
Normal file
@@ -0,0 +1,32 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: HMTL Tidy Configuration
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#,://
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "HTML Tidy Files (tidyrc, .tidyrc, tidy.conf)\ttidyrc;.tidyrc;tidy.conf\n" .
|
||||
\ "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
|
||||
\ "XHTML Files (*.xhtml, *.xhtm)\t*.xhtml;*.xhtm\n" .
|
||||
\ "XML Files (*.xml)\t*.xml\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 14
|
||||
" Last Change: 2021 Jan 23
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@@ -48,18 +48,23 @@ setlocal isk+=#
|
||||
" Use :help to lookup the keyword under the cursor with K.
|
||||
setlocal keywordprg=:help
|
||||
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
" Avoid that #{} starts a comment.
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,sO:#\ -,mO:#\ \ ,eO:##,:\",b:#
|
||||
if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
|
||||
" Set 'comments' to format dashed lists in comments
|
||||
setlocal com=sO:#\ -,mO:#\ \ ,eO:##,:#
|
||||
" Comments starts with # in Vim9 script
|
||||
setlocal commentstring=#%s
|
||||
else
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
|
||||
" Comments starts with a double quote in legacy script
|
||||
setlocal commentstring=\"%s
|
||||
endif
|
||||
|
||||
|
||||
" Format comments to be up to 78 characters long
|
||||
if &tw == 0
|
||||
setlocal tw=78
|
||||
endif
|
||||
|
||||
" Comments start with a double quote; in Vim9 script # would also work
|
||||
setlocal commentstring=\"%s
|
||||
|
||||
if !exists("no_plugin_maps") && !exists("no_vim_maps")
|
||||
let b:did_add_maps = 1
|
||||
|
||||
@@ -83,8 +88,13 @@ endif
|
||||
" Let the matchit plugin know what items can be matched.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
" "func" can also be used as a type:
|
||||
" var Ref: func
|
||||
" or to list functions:
|
||||
" func name
|
||||
" require a parenthesis following, then there can be an "endfunc".
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\>)\@!:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Zsh shell script
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2020-01-10
|
||||
" Latest Revision: 2020-09-01
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/chrisbra/vim-zsh
|
||||
|
||||
@@ -19,20 +19,21 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql
|
||||
let b:undo_ftplugin = "setl com< cms< fo< "
|
||||
|
||||
if executable('zsh')
|
||||
if !has('gui_running') && executable('less')
|
||||
command! -buffer -nargs=1 RunHelp silent exe '!zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
|
||||
elseif has('terminal')
|
||||
command! -buffer -nargs=1 RunHelp silent exe ':term zsh -ic "autoload -Uz run-help; run-help <args>"'
|
||||
else
|
||||
command! -buffer -nargs=1 RunHelp echo system('zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
endif
|
||||
if !has('gui_running') && executable('less')
|
||||
command! -buffer -nargs=1 RunHelp silent exe '!MANPAGER= zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null | LESS= less"' | redraw!
|
||||
elseif has('terminal')
|
||||
command! -buffer -nargs=1 RunHelp silent exe ':term zsh -ic "autoload -Uz run-help; run-help <args>"'
|
||||
else
|
||||
command! -buffer -nargs=1 RunHelp echo system('zsh -ic "autoload -Uz run-help; run-help <args> 2>/dev/null"')
|
||||
endif
|
||||
if !exists('current_compiler')
|
||||
compiler zsh
|
||||
endif
|
||||
setlocal keywordprg=:RunHelp
|
||||
setlocal makeprg=zsh\ -n\ --\ %:S
|
||||
setlocal errorformat=%f:\ line\ %l:\ %m
|
||||
let b:undo_ftplugin .= 'keywordprg< errorformat< makeprg<'
|
||||
let b:undo_ftplugin .= 'keywordprg<'
|
||||
endif
|
||||
|
||||
let b:match_words = ',\<if\>:\<elif\>:\<else\>:\<fi\>'
|
||||
let b:match_words = '\<if\>:\<elif\>:\<else\>:\<fi\>'
|
||||
\ . ',\<case\>:^\s*([^)]*):\<esac\>'
|
||||
\ . ',\<\%(select\|while\|until\|repeat\|for\%(each\)\=\)\>:\<done\>'
|
||||
let b:match_skip = 's:comment\|string\|heredoc\|subst'
|
||||
|
||||
@@ -15,7 +15,7 @@ GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[ja]=テキストエディタ
|
||||
GenericName[ru]=Текстовый редактор
|
||||
GenericName[sr]=Текст Едитор
|
||||
GenericName[sr]=Едитор текст
|
||||
GenericName[tr]=Metin Düzenleyici
|
||||
GenericName=Text Editor
|
||||
# Translators: This is the comment used in the Vim desktop file
|
||||
@@ -24,7 +24,7 @@ Comment[eo]=Redakti tekstajn dosierojn
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
Comment[ru]=Редактирование текстовых файлов
|
||||
Comment[sr]=Уређивање текст фајлова
|
||||
Comment[sr]=Уређујте текст фајлове
|
||||
Comment[tr]=Metin dosyaları düzenleyin
|
||||
Comment=Edit text files
|
||||
# The translations should come from the po file. Leave them here for now, they will
|
||||
@@ -112,7 +112,6 @@ Icon[de]=gvim
|
||||
Icon[eo]=gvim
|
||||
Icon[fr]=gvim
|
||||
Icon[ru]=gvim
|
||||
Icon[sr]=gvim
|
||||
Icon=gvim
|
||||
Categories=Utility;TextEditor;
|
||||
StartupNotify=true
|
||||
|
||||
13
runtime/indent/dune.vim
Normal file
13
runtime/indent/dune.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim indent file
|
||||
" Language: dune
|
||||
" Maintainers: Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change: 2021 Jan 01
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
" dune format-dune-file uses 1 space to indent
|
||||
setlocal softtabstop=1 shiftwidth=1 expandtab
|
||||
@@ -74,11 +74,15 @@ endif
|
||||
if (b:fortran_fixed_source == 1)
|
||||
setlocal indentexpr=FortranGetFixedIndent()
|
||||
if exists("*FortranGetFixedIndent")
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
finish
|
||||
endif
|
||||
else
|
||||
setlocal indentexpr=FortranGetFreeIndent()
|
||||
if exists("*FortranGetFreeIndent")
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
finish
|
||||
endif
|
||||
endif
|
||||
@@ -213,7 +217,7 @@ function FortranGetFixedIndent()
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
let &cpoptions=s:cposet
|
||||
let &cpoptions = s:cposet
|
||||
unlet s:cposet
|
||||
|
||||
" vim:sw=2 tw=130
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent script for HTML
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2020 Jul 06
|
||||
" Last Change: 2020 Dec 11
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@@ -815,7 +815,7 @@ func! s:Alien5()
|
||||
let idx = match(prevtext, '^\s*\zs<!--')
|
||||
if idx >= 0
|
||||
" just below comment start, add a shiftwidth
|
||||
return idx + shiftwidth()
|
||||
return indent(prevlnum) + shiftwidth()
|
||||
endif
|
||||
|
||||
" Some files add 4 spaces just below a TODO line. It's difficult to detect
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
" Maintainers: Jean-Francois Yuen <jfyuen@happycoders.org>
|
||||
" Mike Leary <leary@nwlink.com>
|
||||
" Markus Mottl <markus.mottl@gmail.com>
|
||||
" URL: http://www.ocaml.info/vim/indent/ocaml.vim
|
||||
" URL: https://github.com/ocaml/vim-ocaml
|
||||
" Last Change: 2017 Jun 13
|
||||
" 2005 Jun 25 - Fixed multiple bugs due to 'else\nreturn ind' working
|
||||
" 2005 May 09 - Added an option to not indent OCaml-indents specially (MM)
|
||||
@@ -30,7 +30,8 @@ setlocal nosmartindent
|
||||
" Comment formatting
|
||||
if !exists("no_ocaml_comments")
|
||||
if (has("comments"))
|
||||
setlocal comments=sr:(*,mb:*,ex:*)
|
||||
setlocal comments=sr:(*\ ,mb:\ ,ex:*)
|
||||
setlocal comments^=sr:(**,mb:\ \ ,ex:*)
|
||||
setlocal fo=cqort
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -227,4 +227,4 @@ endfunction
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:sw=2
|
||||
" vim:sw=2
|
||||
|
||||
@@ -10,6 +10,11 @@ let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
if 1
|
||||
let x = [
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
@@ -21,8 +26,27 @@ let cmd =
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 5
|
||||
|
||||
let list = [
|
||||
\ 'one',
|
||||
\ 'two']
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE unlet g:vim_indent_cont
|
||||
|
||||
let list = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
echo
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
|
||||
@@ -10,6 +10,11 @@ let cmd =
|
||||
\ 'some '
|
||||
\ 'string'
|
||||
|
||||
if 1
|
||||
let x = [
|
||||
\ ]
|
||||
endif
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
@@ -21,8 +26,27 @@ let cmd =
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE let g:vim_indent_cont = 5
|
||||
|
||||
let list = [
|
||||
\ 'one',
|
||||
\ 'two']
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_EXE unlet g:vim_indent_cont
|
||||
|
||||
let list = [
|
||||
'one',
|
||||
'two',
|
||||
]
|
||||
echo
|
||||
|
||||
" END_INDENT
|
||||
|
||||
" START_INDENT
|
||||
" INDENT_AT this-line
|
||||
func Some()
|
||||
let f = x " this-line
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Sep 27
|
||||
" Last Change: 2021 Jan 21
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@@ -38,6 +38,9 @@ function GetVimIndentIntern()
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" The previous line, ignoring line continuation
|
||||
let prev_text_end = lnum > 0 ? getline(lnum) : ''
|
||||
|
||||
" If the current line doesn't start with '\' or '"\ ' and below a line that
|
||||
" starts with '\' or '"\ ', use the indent of the line above it.
|
||||
let cur_text = getline(v:lnum)
|
||||
@@ -51,7 +54,10 @@ function GetVimIndentIntern()
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" the start of the previous line, skipping over line continuation
|
||||
let prev_text = getline(lnum)
|
||||
let found_cont = 0
|
||||
|
||||
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
|
||||
" and :else. Add it three times for a line that starts with '\' or '"\ '
|
||||
@@ -83,6 +89,7 @@ function GetVimIndentIntern()
|
||||
endif
|
||||
|
||||
if cur_text =~ s:lineContPat && v:lnum > 1 && prev_text !~ s:lineContPat
|
||||
let found_cont = 1
|
||||
if exists("g:vim_indent_cont")
|
||||
let ind = ind + g:vim_indent_cont
|
||||
else
|
||||
@@ -114,10 +121,50 @@ function GetVimIndentIntern()
|
||||
endif
|
||||
endif
|
||||
|
||||
" For a line starting with "}" find the matching "{". If it is at the start
|
||||
" of the line align with it, probably end of a block.
|
||||
" Use the mapped "%" from matchit to find the match, otherwise we may match
|
||||
" a { inside a comment or string.
|
||||
if cur_text =~ '^\s*}'
|
||||
if maparg('%') != ''
|
||||
exe v:lnum
|
||||
silent! normal %
|
||||
if line('.') < v:lnum && getline('.') =~ '^\s*{'
|
||||
let ind = indent('.')
|
||||
endif
|
||||
else
|
||||
" todo: use searchpair() to find a match
|
||||
endif
|
||||
endif
|
||||
|
||||
" Below a line starting with "}" find the matching "{". If it is at the
|
||||
" end of the line we must be below the end of a dictionary.
|
||||
if prev_text =~ '^\s*}'
|
||||
if maparg('%') != ''
|
||||
exe lnum
|
||||
silent! normal %
|
||||
if line('.') == lnum || getline('.') !~ '^\s*{'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
else
|
||||
" todo: use searchpair() to find a match
|
||||
endif
|
||||
endif
|
||||
|
||||
" Below a line starting with "]" we must be below the end of a list.
|
||||
if prev_text_end =~ '^\s*]'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
" A line ending in "{"/"[} is most likely the start of a dict/list literal,
|
||||
" indent the next line more. Not for a continuation line.
|
||||
if prev_text_end =~ '[{[]\s*$' && !found_cont
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :enddef, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
if cur_text =~ '^\s*\(ene\@!\|cat\|finall\|el\|aug\%[roup]\s\+[eE][nN][dD]\)'
|
||||
let ind = ind - shiftwidth()
|
||||
endif
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
" Maintainer: Christian Brabandt <cb@256bit.org>
|
||||
" Repository: https://github.com/chrisbra/vim-xml-ftplugin
|
||||
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Changed: 2019 Dec 02
|
||||
" Last Changed: 2020 Nov 4th
|
||||
" Last Change:
|
||||
" 20200529 - Handle empty closing tags correctly
|
||||
" 20191202 - Handle docbk filetype
|
||||
" 20190726 - Correctly handle non-tagged data
|
||||
" 20190204 - correctly handle wrap tags
|
||||
@@ -45,7 +46,7 @@ if !exists('b:xml_indent_open')
|
||||
endif
|
||||
|
||||
if !exists('b:xml_indent_close')
|
||||
let b:xml_indent_close = '.\{-}</'
|
||||
let b:xml_indent_close = '.\{-}</\|/>.\{-}'
|
||||
" end pre tag, e.g. </address>
|
||||
" let b:xml_indent_close = '.\{-}</\(address\)\@!'
|
||||
endif
|
||||
@@ -81,7 +82,7 @@ endfun
|
||||
|
||||
" [-- return the sum of indents of a:lnum --]
|
||||
fun! <SID>XmlIndentSum(line, style, add)
|
||||
if <SID>IsXMLContinuation(a:line) && a:style == 0
|
||||
if <SID>IsXMLContinuation(a:line) && a:style == 0 && !<SID>IsXMLEmptyClosingTag(a:line)
|
||||
" no complete tag, add one additional indent level
|
||||
" but only for the current line
|
||||
return a:add + shiftwidth()
|
||||
@@ -131,13 +132,25 @@ fun! XmlIndentGet(lnum, use_syntax_check)
|
||||
endif
|
||||
let syn_name_end = synIDattr(synID(a:lnum, strlen(curline) - 1, 1), 'name')
|
||||
let syn_name_start = synIDattr(synID(a:lnum, match(curline, '\S') + 1, 1), 'name')
|
||||
let prev_syn_name_end = synIDattr(synID(ptag, strlen(pline) - 1, 1), 'name')
|
||||
" not needed (yet?)
|
||||
" let prev_syn_name_start = synIDattr(synID(ptag, match(pline, '\S') + 1, 1), 'name')
|
||||
endif
|
||||
|
||||
if syn_name_end =~ 'Comment' && syn_name_start =~ 'Comment'
|
||||
return <SID>XmlIndentComment(a:lnum)
|
||||
elseif empty(syn_name_start) && empty(syn_name_end) && a:use_syntax_check
|
||||
" non-xml tag content: use indent from 'autoindent'
|
||||
return pind + shiftwidth()
|
||||
if pline =~ b:xml_indent_close
|
||||
return pind
|
||||
elseif !empty(prev_syn_name_end)
|
||||
" only indent by an extra shiftwidth, if the previous line ends
|
||||
" with an XML like tag
|
||||
return pind + shiftwidth()
|
||||
else
|
||||
" no extra indent, looks like a text continuation line
|
||||
return pind
|
||||
endif
|
||||
endif
|
||||
|
||||
" Get indent from previous tag line
|
||||
@@ -157,15 +170,28 @@ func! <SID>HasNoTagEnd(line)
|
||||
return a:line !~ '>\s*$'
|
||||
endfunc
|
||||
|
||||
func! <SID>IsXMLEmptyClosingTag(line)
|
||||
" Checks whether the line ends with an empty closing tag such as <lb/>
|
||||
return a:line =~? '<[^>]*/>\s*$'
|
||||
endfunc
|
||||
|
||||
" return indent for a commented line,
|
||||
" the middle part might be indented one additional level
|
||||
func! <SID>XmlIndentComment(lnum)
|
||||
let ptagopen = search(b:xml_indent_open, 'bnW')
|
||||
let ptagopen = search('.\{-}<[:A-Z_a-z]\_[^/]\{-}>.\{-}', 'bnW')
|
||||
let ptagclose = search(b:xml_indent_close, 'bnW')
|
||||
if getline(a:lnum) =~ '<!--'
|
||||
" if previous tag was a closing tag, do not add
|
||||
" one additional level of indent
|
||||
if ptagclose > ptagopen && a:lnum > ptagclose
|
||||
" If the previous tag was closed on the same line as it was
|
||||
" declared, we should indent with its indent level.
|
||||
if !<SID>IsXMLContinuation(getline(ptagclose))
|
||||
return indent(ptagclose)
|
||||
else
|
||||
return indent(ptagclose) - shiftwidth()
|
||||
endif
|
||||
elseif ptagclose == ptagopen
|
||||
return indent(ptagclose)
|
||||
else
|
||||
" start of comment, add one indentation level
|
||||
|
||||
@@ -2,16 +2,13 @@
|
||||
" Language: YAML
|
||||
" Maintainer: Nikolai Pavlov <zyx.vim@gmail.com>
|
||||
" Last Update: Lukas Reineke
|
||||
" Last Change: 2020 Jun 07
|
||||
" Last Change: 2021 Jan 19
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetYAMLIndent(v:lnum)
|
||||
@@ -25,6 +22,9 @@ if exists('*GetYAMLIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
function s:FindPrevLessIndentedLine(lnum, ...)
|
||||
let prevlnum = prevnonblank(a:lnum-1)
|
||||
let curindent = a:0 ? a:1 : indent(a:lnum)
|
||||
|
||||
11237
runtime/keymap/korean-dubeolsik_utf-8.vim
Normal file
11237
runtime/keymap/korean-dubeolsik_utf-8.vim
Normal file
File diff suppressed because it is too large
Load Diff
23
runtime/keymap/korean.vim
Normal file
23
runtime/keymap/korean.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
" Maintainer: Jang Whemoon <palindrom615@gmail.com>
|
||||
" Last Change: Nov 24, 2020
|
||||
"
|
||||
"
|
||||
"
|
||||
" Unlike Japanese or Chinese, modern Korean texts do not depends on conversion
|
||||
" to Hanja (Chinese character). Thus, general Korean text totally can be
|
||||
" covered without help of IME but this keymap.
|
||||
"
|
||||
" BUT, simply mapping each letter of Hangul with sequence of alphabet 1 by 1
|
||||
" can fail to combine Hangul jamo (conconants and vowels) right.
|
||||
" For example, sequentially pressing `ㅅㅓㅇㅜㄹㄷㅐㅎㅏㄱㅛ` can not only be
|
||||
" combined as `서울대학교`, but alse `성ㅜㄹ댛ㅏㄱ교`, which is totally
|
||||
" nonsense.
|
||||
" Though combining Hangul is deterministic with law that each letter must be
|
||||
" one of (consonant + vowel) or (consonant + vowel + consonant), there is no
|
||||
" way to apply such law without implementing input engine.
|
||||
"
|
||||
" Thus, user of this keymap should wait until previous hangul letter is
|
||||
" completed before typing next one. To reduce such inconvenience, I suggest to
|
||||
" set `timeoutlen` with their own value. (default value is 1000ms)
|
||||
|
||||
source <sfile>:p:h/korean-dubeolsik_utf-8.vim
|
||||
@@ -1,3 +1,3 @@
|
||||
" Menu Translations: Turkish
|
||||
|
||||
source <sfile>:p:h/menu_tr_tr.cp1254.vim
|
||||
source <sfile>:p:h/menu_tr_tr.cp1254.vim
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
" Menu Translations: Turkish
|
||||
|
||||
source <sfile>:p:h/menu_tr_tr.iso_8859-9.vim
|
||||
source <sfile>:p:h/menu_tr_tr.iso_8859-9.vim
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim script to work like "less"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 May 18
|
||||
" Last Change: 2020 Dec 17
|
||||
|
||||
" Avoid loading this file twice, allow the user to define his own script.
|
||||
if exists("loaded_less")
|
||||
@@ -35,8 +35,16 @@ if argc() > 0
|
||||
endwhile
|
||||
endif
|
||||
|
||||
set nocp
|
||||
syntax on
|
||||
" we don't want 'compatible' here
|
||||
if &cp
|
||||
set nocp
|
||||
endif
|
||||
|
||||
" enable syntax highlighting if not done already
|
||||
if !get(g:, 'syntax_on', 0)
|
||||
syntax enable
|
||||
endif
|
||||
|
||||
set so=0
|
||||
set hlsearch
|
||||
set incsearch
|
||||
|
||||
170
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
170
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
vendored
@@ -2,7 +2,7 @@
|
||||
"
|
||||
" Author: Bram Moolenaar
|
||||
" Copyright: Vim license applies, see ":help license"
|
||||
" Last Change: 2020 Oct 28
|
||||
" Last Change: 2021 Jan 03
|
||||
"
|
||||
" WORK IN PROGRESS - Only the basics work
|
||||
" Note: On MS-Windows you need a recent version of gdb. The one included with
|
||||
@@ -70,9 +70,14 @@ if !exists('g:termdebugger')
|
||||
endif
|
||||
|
||||
let s:pc_id = 12
|
||||
let s:break_id = 13 " breakpoint number is added to this
|
||||
let s:asm_id = 13
|
||||
let s:break_id = 14 " breakpoint number is added to this
|
||||
let s:stopped = 1
|
||||
|
||||
let s:parsing_disasm_msg = 0
|
||||
let s:asm_lines = []
|
||||
let s:asm_addr = ''
|
||||
|
||||
" Take a breakpoint number as used by GDB and turn it into an integer.
|
||||
" The breakpoint may contain a dot: 123.4 -> 123004
|
||||
" The main breakpoint has a zero subid.
|
||||
@@ -114,6 +119,7 @@ func s:StartDebug_internal(dict)
|
||||
|
||||
let s:ptywin = 0
|
||||
let s:pid = 0
|
||||
let s:asmwin = 0
|
||||
|
||||
" Uncomment this line to write logging in "debuglog".
|
||||
" call ch_logfile('debuglog', 'w')
|
||||
@@ -153,6 +159,14 @@ func s:StartDebug_internal(dict)
|
||||
else
|
||||
call s:StartDebug_term(a:dict)
|
||||
endif
|
||||
|
||||
if exists('g:termdebug_disasm_window')
|
||||
if g:termdebug_disasm_window
|
||||
let curwinid = win_getid(winnr())
|
||||
call s:GotoAsmwinOrCreateIt()
|
||||
call win_gotoid(curwinid)
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Use when debugger didn't start or ended.
|
||||
@@ -546,6 +560,14 @@ func s:GetFullname(msg)
|
||||
return name
|
||||
endfunc
|
||||
|
||||
" Extract the "addr" value from a gdb message with addr="0x0001234".
|
||||
func s:GetAsmAddr(msg)
|
||||
if a:msg !~ 'addr='
|
||||
return ''
|
||||
endif
|
||||
let addr = s:DecodeMessage(substitute(a:msg, '.*addr=', '', ''))
|
||||
return addr
|
||||
endfunc
|
||||
func s:EndTermDebug(job, status)
|
||||
exe 'bwipe! ' . s:commbuf
|
||||
unlet s:gdbwin
|
||||
@@ -609,6 +631,69 @@ func s:EndPromptDebug(job, status)
|
||||
call ch_log("Returning from EndPromptDebug()")
|
||||
endfunc
|
||||
|
||||
" Disassembly window - added by Michael Sartain
|
||||
"
|
||||
" - CommOutput: disassemble $pc
|
||||
" - CommOutput: &"disassemble $pc\n"
|
||||
" - CommOutput: ~"Dump of assembler code for function main(int, char**):\n"
|
||||
" - CommOutput: ~" 0x0000555556466f69 <+0>:\tpush rbp\n"
|
||||
" ...
|
||||
" - CommOutput: ~" 0x0000555556467cd0:\tpop rbp\n"
|
||||
" - CommOutput: ~" 0x0000555556467cd1:\tret \n"
|
||||
" - CommOutput: ~"End of assembler dump.\n"
|
||||
" - CommOutput: ^done
|
||||
|
||||
" - CommOutput: disassemble $pc
|
||||
" - CommOutput: &"disassemble $pc\n"
|
||||
" - CommOutput: &"No function contains specified address.\n"
|
||||
" - CommOutput: ^error,msg="No function contains specified address."
|
||||
func s:HandleDisasmMsg(msg)
|
||||
if a:msg =~ '^\^done'
|
||||
let curwinid = win_getid(winnr())
|
||||
if win_gotoid(s:asmwin)
|
||||
silent normal! gg0"_dG
|
||||
call setline(1, s:asm_lines)
|
||||
set nomodified
|
||||
set filetype=asm
|
||||
|
||||
let lnum = search('^' . s:asm_addr)
|
||||
if lnum != 0
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
endif
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
endif
|
||||
|
||||
let s:parsing_disasm_msg = 0
|
||||
let s:asm_lines = []
|
||||
elseif a:msg =~ '^\^error,msg='
|
||||
if s:parsing_disasm_msg == 1
|
||||
" Disassemble call ran into an error. This can happen when gdb can't
|
||||
" find the function frame address, so let's try to disassemble starting
|
||||
" at current PC
|
||||
call s:SendCommand('disassemble $pc,+100')
|
||||
endif
|
||||
let s:parsing_disasm_msg = 0
|
||||
elseif a:msg =~ '\&\"disassemble \$pc'
|
||||
if a:msg =~ '+100'
|
||||
" This is our second disasm attempt
|
||||
let s:parsing_disasm_msg = 2
|
||||
endif
|
||||
else
|
||||
let value = substitute(a:msg, '^\~\"[ ]*', '', '')
|
||||
let value = substitute(value, '^=>[ ]*', '', '')
|
||||
let value = substitute(value, '\\n\"
|
||||
$', '', '')
|
||||
let value = substitute(value, '\\n\"$', '', '')
|
||||
let value = substitute(value, '
|
||||
', '', '')
|
||||
let value = substitute(value, '\\t', ' ', 'g')
|
||||
|
||||
if value != '' || !empty(s:asm_lines)
|
||||
call add(s:asm_lines, value)
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Handle a message received from gdb on the GDB/MI interface.
|
||||
@@ -618,7 +703,10 @@ func s:CommOutput(chan, msg)
|
||||
for msg in msgs
|
||||
" remove prefixed NL
|
||||
if msg[0] == "\n"
|
||||
if msg != ''
|
||||
let msg = msg[1:]
|
||||
endif
|
||||
|
||||
if s:parsing_disasm_msg
|
||||
call s:HandleDisasmMsg(msg)
|
||||
elseif msg != ''
|
||||
if msg =~ '^\(\*stopped\|\*running\|=thread-selected\)'
|
||||
@@ -631,6 +719,9 @@ func s:CommOutput(chan, msg)
|
||||
call s:HandleProgramRun(msg)
|
||||
elseif msg =~ '^\^done,value='
|
||||
call s:HandleEvaluate(msg)
|
||||
elseif msg =~ '^\^error,msg='
|
||||
call s:HandleError(msg)
|
||||
elseif msg =~ '^disassemble'
|
||||
let s:parsing_disasm_msg = 1
|
||||
let s:asm_lines = []
|
||||
endif
|
||||
@@ -671,6 +762,7 @@ func s:InstallCommands()
|
||||
|
||||
command -range -nargs=* Evaluate call s:Evaluate(<range>, <q-args>)
|
||||
command Gdb call win_gotoid(s:gdbwin)
|
||||
command Program call s:GotoProgram()
|
||||
command Source call s:GotoSourcewinOrCreateIt()
|
||||
command Asm call s:GotoAsmwinOrCreateIt()
|
||||
command Winbar call s:InstallWinbar()
|
||||
@@ -724,10 +816,15 @@ func s:DeleteCommands()
|
||||
delcommand Continue
|
||||
delcommand Evaluate
|
||||
delcommand Gdb
|
||||
delcommand Program
|
||||
delcommand Source
|
||||
delcommand Asm
|
||||
if exists('s:k_map_saved') && !empty(s:k_map_saved)
|
||||
call mapset('n', 0, s:k_map_saved)
|
||||
delcommand Winbar
|
||||
|
||||
if exists('s:k_map_saved')
|
||||
if empty(s:k_map_saved)
|
||||
nunmap K
|
||||
else
|
||||
call mapset('n', 0, s:k_map_saved)
|
||||
endif
|
||||
unlet s:k_map_saved
|
||||
@@ -919,6 +1016,48 @@ func s:GotoSourcewinOrCreateIt()
|
||||
let s:sourcewin = win_getid(winnr())
|
||||
call s:InstallWinbar()
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func s:GotoAsmwinOrCreateIt()
|
||||
if !win_gotoid(s:asmwin)
|
||||
if win_gotoid(s:sourcewin)
|
||||
exe 'rightbelow new'
|
||||
else
|
||||
exe 'new'
|
||||
endif
|
||||
|
||||
let s:asmwin = win_getid(winnr())
|
||||
|
||||
setlocal nowrap
|
||||
setlocal number
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nofile
|
||||
|
||||
let asmbuf = bufnr('Termdebug-asm-listing')
|
||||
if asmbuf > 0
|
||||
exe 'buffer' . asmbuf
|
||||
else
|
||||
exe 'file Termdebug-asm-listing'
|
||||
endif
|
||||
|
||||
if exists('g:termdebug_disasm_window')
|
||||
if g:termdebug_disasm_window > 1
|
||||
exe 'resize ' . g:termdebug_disasm_window
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if s:asm_addr != ''
|
||||
let lnum = search('^' . s:asm_addr)
|
||||
if lnum == 0
|
||||
if s:stopped
|
||||
call s:SendCommand('disassemble $pc')
|
||||
endif
|
||||
else
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Handle stopping and running message from gdb.
|
||||
@@ -937,6 +1076,27 @@ func s:HandleCursor(msg)
|
||||
if a:msg =~ 'fullname='
|
||||
let fname = s:GetFullname(a:msg)
|
||||
else
|
||||
let fname = ''
|
||||
endif
|
||||
|
||||
if a:msg =~ 'addr='
|
||||
let asm_addr = s:GetAsmAddr(a:msg)
|
||||
if asm_addr != ''
|
||||
let s:asm_addr = asm_addr
|
||||
|
||||
let curwinid = win_getid(winnr())
|
||||
if win_gotoid(s:asmwin)
|
||||
let lnum = search('^' . s:asm_addr)
|
||||
if lnum == 0
|
||||
call s:SendCommand('disassemble $pc')
|
||||
else
|
||||
exe 'sign unplace ' . s:asm_id
|
||||
exe 'sign place ' . s:asm_id . ' line=' . lnum . ' name=debugPC'
|
||||
endif
|
||||
|
||||
call win_gotoid(curwinid)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:msg =~ '^\(\*stopped\|=thread-selected\)' && filereadable(fname)
|
||||
|
||||
@@ -44,6 +44,8 @@ augroup tar
|
||||
au BufReadCmd *.tar.lzma call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.xz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.txz call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tar.zst call tar#Browse(expand("<amatch>"))
|
||||
au BufReadCmd *.tzs call tar#Browse(expand("<amatch>"))
|
||||
augroup END
|
||||
com! -nargs=? -complete=file Vimuntar call tar#Vimuntar(<q-args>)
|
||||
|
||||
|
||||
@@ -182,6 +182,14 @@ if s:line1 =~# "^#!"
|
||||
elseif s:name =~# 'clojure'
|
||||
set ft=clojure
|
||||
|
||||
" Free Pascal
|
||||
elseif s:name =~# 'instantfpc\>'
|
||||
set ft=pascal
|
||||
|
||||
" Fennel
|
||||
elseif s:name =~# 'fennel\>'
|
||||
set ft=fennel
|
||||
|
||||
endif
|
||||
unlet s:name
|
||||
|
||||
|
||||
@@ -404,6 +404,7 @@ an 50.90.120 &Syntax.PQ.Pam\ config :cal SetSyn("pamconf")<CR>
|
||||
an 50.90.130 &Syntax.PQ.PApp :cal SetSyn("papp")<CR>
|
||||
an 50.90.140 &Syntax.PQ.Pascal :cal SetSyn("pascal")<CR>
|
||||
an 50.90.150 &Syntax.PQ.Password\ file :cal SetSyn("passwd")<CR>
|
||||
an 50.90.490 &Syntax.PQ.Pbtxt :cal SetSyn("pbtxt")<CR>
|
||||
an 50.90.160 &Syntax.PQ.PCCTS :cal SetSyn("pccts")<CR>
|
||||
an 50.90.170 &Syntax.PQ.PDF :cal SetSyn("pdf")<CR>
|
||||
an 50.90.180 &Syntax.PQ.Perl.Perl :cal SetSyn("perl")<CR>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim ABAP syntax file
|
||||
" Language: SAP - ABAP/R4
|
||||
" Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
|
||||
" Last Change: 2018 Dec 12
|
||||
" Last Change: 2021 Jan 02
|
||||
" Comment: Thanks to EPI-USE Labs for all your assistance. :)
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
@@ -193,4 +193,4 @@ hi def link abapHex Number
|
||||
|
||||
let b:current_syntax = "abap"
|
||||
|
||||
" vim: ts=8 sw=2
|
||||
" vim: ts=8 sw=2
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: aidl (Android Interface Definition Language)
|
||||
" https://developer.android.com/guide/components/aidl
|
||||
" Maintainer: Dominique Pelle <dominique.pelle@tomtom.com>
|
||||
" LastChange: 2020/07/25
|
||||
" LastChange: 2020/12/03
|
||||
|
||||
" Quit when a syntax file was already loaded.
|
||||
if exists("b:current_syntax")
|
||||
@@ -12,7 +12,7 @@ endif
|
||||
source <sfile>:p:h/java.vim
|
||||
|
||||
syn keyword aidlParamDir in out inout
|
||||
syn keyword aidlKeyword oneway parcelable
|
||||
syn keyword aidlKeyword const oneway parcelable
|
||||
|
||||
" Needed for the 'in', 'out', 'inout' keywords to be highlighted.
|
||||
syn cluster javaTop add=aidlParamDir
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user