mirror of
https://github.com/vim/vim
synced 2025-07-31 02:41:54 +00:00
Compare commits
590 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 | |||
fc74d03e76 | |||
e6329e4c55 | |||
27f4f6baee | |||
8adc8d9b73 | |||
193f6201b4 | |||
714cbe5b21 | |||
c4390fe6c0 | |||
50dc3ecc64 | |||
4792a679f9 | |||
ca359cbedd | |||
6a07644db3 | |||
2dfae04f37 | |||
e41decc892 | |||
6453cc8078 | |||
a065a14115 | |||
02764713a7 | |||
33aecb1f2c | |||
f4d61bc559 | |||
2ce7790348 | |||
8496c9eadb | |||
659bb2275e | |||
47c5ea44b9 | |||
957cf67d50 | |||
ea2d407f9c | |||
6f6244855f | |||
bbf9f344af | |||
29b281ba8d | |||
232f4612e2 | |||
5e1f22ff61 | |||
c56936e2ba | |||
f883508e36 | |||
ea696852e7 | |||
8cebd43e97 | |||
59d8e56e04 | |||
cbcd9cbd77 | |||
46f479c756 | |||
faebda8cc1 | |||
927495b1fe | |||
32e5ec0b01 | |||
85d9b03f84 | |||
22286895fc | |||
0fd797eacd | |||
3132cddd20 | |||
00806bceb6 | |||
b885b435d1 | |||
fabc3ca896 | |||
b4d16cb11d | |||
66669fc664 | |||
f65b35b446 | |||
631e8f9345 | |||
c7f7f6db3e | |||
64ffa9b5fb | |||
9c13f76275 | |||
348be7ed07 | |||
4778b4d0e1 | |||
c136a3528b | |||
35efa22ff2 | |||
0d90e728fe | |||
6fd3a4ba23 | |||
36113e46b4 | |||
dbfa795d8b | |||
399db046ed | |||
97a19005e1 | |||
3b6d57f2ce | |||
a46765a797 | |||
645cd3eb1f | |||
388908352f | |||
578f4cc7d0 | |||
e88c8e802c | |||
55e29611d2 | |||
963734e316 | |||
fbcbffe1ad | |||
749bc9521d | |||
0289065e41 | |||
cd030c4b60 | |||
d66960bf57 | |||
b2620202c7 | |||
6d967125ad | |||
086fc9a585 | |||
4f6b6ed208 | |||
185577e47e | |||
dcdd42a8cc | |||
cf4d454df0 | |||
28ee892ac4 | |||
3e2534ed1a | |||
159563b439 | |||
171fb923b8 | |||
6cf7e3b026 | |||
b4bcea474d | |||
70cf45810c | |||
68a48ee55e | |||
977fd0b327 | |||
caf73dcfad | |||
cb80aa2d53 | |||
8133cc6bf4 | |||
c8970b9464 | |||
f9d51354de | |||
a360dbe3b6 | |||
4882d98339 | |||
89b693e562 | |||
37e4e03c67 | |||
e974fa7b2b | |||
4ff2f2fb6b | |||
02194d2bd5 | |||
67def64a4e | |||
e100440158 | |||
5661ed6c83 | |||
e1be11864d | |||
210681c509 | |||
f4c6e1e75c | |||
8ded5b647a | |||
9c24cd11e2 | |||
683581eb49 | |||
081db1a66d | |||
b07a39de48 | |||
e6e70a10f1 | |||
15ab48f088 | |||
371806e164 | |||
2733779a1a | |||
a1224cb706 | |||
4ce5fe4c87 | |||
c58f5456e5 | |||
692d1a51e7 | |||
af7a9066a9 | |||
ca17453e73 | |||
8a99e66b4f | |||
b8f519e538 | |||
94738d8fab | |||
3da855c8e2 | |||
b53e13a91a | |||
20d89e0ac6 | |||
e9f9f16387 | |||
c95940c06a | |||
39ca4127a0 | |||
955347cc7e | |||
9a13e185e5 | |||
80b0e5ea11 | |||
66fa5fd54f | |||
1dcae59957 | |||
334a8b4bde | |||
e3c65ce4e5 | |||
2ea79ad835 | |||
a2c026d0fd | |||
335e671322 | |||
352134bbfb | |||
403dc31f5a | |||
218450ad5e | |||
9668cc57a1 | |||
e13bdec6b9 | |||
1e021e63c5 | |||
7a66a17190 | |||
ffdf8adfa8 | |||
27491cd3ef | |||
a604ccc959 | |||
ed234f24f3 | |||
74f8eece5e | |||
209f0208f7 | |||
fbbcd00367 | |||
8d739de43b | |||
3d30af8783 | |||
b9616af23f | |||
21cbe175ee | |||
2b9b17ea5d | |||
f4e8cdd3d2 | |||
fc8aa6d02d | |||
93be1644db | |||
c07b7f701f | |||
62cd26a229 | |||
6eb36ade98 | |||
efc0d94afc | |||
204ade6bcb | |||
aab9fada4a | |||
ef16c90423 | |||
4f4d51a942 | |||
c6ed254d9f | |||
bd6428b9e7 | |||
1b1e9df78b | |||
10a1a534d1 | |||
9becdf2b98 | |||
d747548c66 | |||
fcdc5d83fb | |||
28f224b2c1 | |||
f57497276b | |||
1a73923705 | |||
820d55a50b | |||
85d5e2b723 | |||
8956023920 | |||
e8211a33dc | |||
11416321ff | |||
6a61421f64 | |||
922acbda3d | |||
10c65860f8 | |||
0876c78527 | |||
9a033d7b18 | |||
d7e5e9430a | |||
4e2114e988 | |||
f12f0022e6 | |||
349f609f89 | |||
253b16a4ab | |||
80361a5f2b | |||
50c4e9e08f | |||
afe8cf6170 | |||
44aefffaad | |||
55b419b871 | |||
dda749ce85 | |||
d1ad99b654 | |||
1310660557 | |||
6abd3dc257 | |||
7b5d544269 | |||
2bb2658bef | |||
92f26c256e | |||
c8fe645c19 | |||
588d241d44 | |||
1bdae40323 | |||
794771cfd8 | |||
c1f0066b64 | |||
016faaa1b2 | |||
795aaa1e84 | |||
8a9bc95eae | |||
3f974ff45e | |||
fa79be6b10 | |||
bdf931c25b | |||
74273e6691 | |||
4537bcc889 | |||
668008be66 | |||
0022675aa3 | |||
5366e1aecf | |||
55759b5228 | |||
17bb4d4607 | |||
8ec92c9779 | |||
32fbc4f247 | |||
1b9129809d | |||
f43e7ac4ee | |||
391c362794 | |||
d569a9e746 | |||
4934ad0e44 | |||
d58a3bf7da | |||
b45cd36bd9 | |||
727345ebea | |||
7a9cbca00a | |||
9830938e77 | |||
06f9c6940a | |||
6c542f77eb | |||
d0e1b7103c | |||
ac564082f1 | |||
2914a20abc | |||
37ce6d3a6a | |||
5597ba0467 | |||
a5fe91e6dc | |||
cfcd011fcd | |||
c0e29010f6 | |||
8c7ad3631a | |||
f6a44f714a | |||
daff0fb738 | |||
bade44e5ca | |||
3697c9bbae | |||
c70bdab0b8 | |||
f3c51bbff1 | |||
8f187fc630 |
@ -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:
|
||||
|
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
|
||||
@ -38,6 +39,7 @@ runtime/compiler/jest.vim @dkearns
|
||||
runtime/compiler/jjs.vim @dkearns
|
||||
runtime/compiler/jshint.vim @dkearns
|
||||
runtime/compiler/jsonlint.vim @dkearns
|
||||
runtime/compiler/lazbuild.vim @dkearns
|
||||
runtime/compiler/php.vim @dkearns
|
||||
runtime/compiler/rake.vim @tpope @dkearns
|
||||
runtime/compiler/rhino.vim @dkearns
|
||||
@ -47,6 +49,7 @@ runtime/compiler/ruby.vim @tpope @dkearns
|
||||
runtime/compiler/rubyunit.vim @dkearns
|
||||
runtime/compiler/sass.vim @tpope
|
||||
runtime/compiler/se.vim @dkearns
|
||||
runtime/compiler/shellcheck.vim @dkearns
|
||||
runtime/compiler/stylelint.vim @dkearns
|
||||
runtime/compiler/tcl.vim @dkearns
|
||||
runtime/compiler/tidy.vim @dkearns
|
||||
@ -55,13 +58,16 @@ 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
|
||||
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/bst.vim @tpope
|
||||
runtime/ftplugin/cfg.vim @chrisbra
|
||||
runtime/ftplugin/css.vim @dkearns
|
||||
runtime/ftplugin/cucumber.vim @tpope
|
||||
runtime/ftplugin/eiffel.vim @dkearns
|
||||
@ -71,21 +77,27 @@ 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/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
|
||||
@ -97,18 +109,35 @@ 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/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
|
||||
@ -116,8 +145,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
|
||||
@ -132,12 +164,16 @@ runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/pdf.vim @tpope
|
||||
runtime/syntax/php.vim @TysonAndre
|
||||
runtime/syntax/privoxy.vim @dkearns
|
||||
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
|
||||
@ -147,6 +183,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
|
||||
|
228
.github/workflows/ci-windows.yaml
vendored
228
.github/workflows/ci-windows.yaml
vendored
@ -1,228 +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:
|
||||
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 "::set-env name=PYTHON_DIR::$python_dir"
|
||||
echo "::set-env name=PYTHON3_DIR::$python3_dir"
|
||||
|
||||
- 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
|
||||
)
|
62
.github/workflows/codeql-analysis.yml
vendored
Normal file
62
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 18 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['cpp', 'python']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
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:
|
||||
|
14
Filelist
14
Filelist
@ -3,19 +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/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? ##
|
||||
|
@ -80,7 +80,7 @@ e.g. each stack item is a typeval_T. And one of the instructions is
|
||||
"execute Ex command", for commands that are not compiled.
|
||||
|
||||
|
||||
## 2. PHASING OUT INTERFACES
|
||||
## 2. DEPRIORITIZE INTERFACES
|
||||
|
||||
Attempts have been made to implement functionality with built-in script
|
||||
languages such as Python, Perl, Lua, Tcl and Ruby. This never gained much
|
||||
@ -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 = ''
|
||||
|
@ -1,7 +1,8 @@
|
||||
"python3complete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Maintainer: <vacancy>
|
||||
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009 (small fix 2015 Sep 14 from Debian)
|
||||
" Last Updated: 2020 Oct 9
|
||||
"
|
||||
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
|
||||
"
|
||||
@ -83,7 +84,7 @@ function! python3complete#Complete(findstart, base)
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
execute "py3 vimpy3complete('" . cword . "', '" . a:base . "')"
|
||||
execute "py3 vimpy3complete('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
|
||||
return g:python3complete_completions
|
||||
endif
|
||||
endfunction
|
||||
|
@ -1,7 +1,8 @@
|
||||
"pythoncomplete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Maintainer: <vacancy>
|
||||
" Previous Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009
|
||||
" Last Updated: 2020 Oct 9
|
||||
"
|
||||
" Changes
|
||||
" TODO:
|
||||
@ -81,7 +82,7 @@ function! pythoncomplete#Complete(findstart, base)
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
execute "python vimcomplete('" . cword . "', '" . a:base . "')"
|
||||
execute "python vimcomplete('" . escape(cword, "'") . "', '" . escape(a:base, "'") . "')"
|
||||
return g:pythoncomplete_completions
|
||||
endif
|
||||
endfunction
|
||||
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jan 07, 2020
|
||||
" Version: 30
|
||||
" Version: 31
|
||||
" Maintainer: Charles E Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
|
||||
@ -20,7 +20,7 @@
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v30"
|
||||
let g:loaded_zip= "v31"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of zip needs vim 7.2 or later"
|
||||
@ -65,7 +65,7 @@ endif
|
||||
" zip#Browse: {{{2
|
||||
fun! zip#Browse(zipfile)
|
||||
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
|
||||
" sanity check: ensure that the zipfile has "PK" as its first two letters
|
||||
" sanity check: insure that the zipfile has "PK" as its first two letters
|
||||
" (zipped files have a leading PK as a "magic cookie")
|
||||
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
|
||||
exe "noswapfile noautocmd noswapfile e ".fnameescape(a:zipfile)
|
||||
|
@ -67,7 +67,7 @@ You can use ":highlight" to find out the current colors. Exception: the
|
||||
ctermfg and ctermbg values are numbers, which are only valid for the current
|
||||
terminal. Use the color names instead. See ":help cterm-colors".
|
||||
|
||||
The default color settings can be found in the source file src/syntax.c.
|
||||
The default color settings can be found in the source file src/highlight.c.
|
||||
Search for "highlight_init".
|
||||
|
||||
If you think you have a color scheme that is good enough to be used by others,
|
||||
|
@ -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,
|
||||
|
25
runtime/compiler/shellcheck.vim
Normal file
25
runtime/compiler/shellcheck.vim
Normal file
@ -0,0 +1,25 @@
|
||||
" Vim compiler file
|
||||
" Compiler: ShellCheck
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Sep 4
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "shellcheck"
|
||||
|
||||
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=shellcheck\ -f\ gcc
|
||||
CompilerSet errorformat=%f:%l:%c:\ %trror:\ %m\ [SC%n],
|
||||
\%f:%l:%c:\ %tarning:\ %m\ [SC%n],
|
||||
\%f:%l:%c:\ %tote:\ %m\ [SC%n],
|
||||
\%-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,7 +1,7 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last change: 2019 Oct 27
|
||||
" Last change: 2020 Sep 30
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
" Except when Vim is run with "-u NONE" or "-C".
|
||||
@ -85,17 +85,6 @@ if has('mouse')
|
||||
endif
|
||||
endif
|
||||
|
||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||
" GUI (which always has colors).
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
" Revert with ":syntax off".
|
||||
syntax on
|
||||
|
||||
" I like highlighting strings inside C comments.
|
||||
" Revert with ":unlet c_comment_strings".
|
||||
let c_comment_strings=1
|
||||
endif
|
||||
|
||||
" Only do this part when Vim was compiled with the +eval feature.
|
||||
if 1
|
||||
|
||||
@ -124,6 +113,17 @@ if 1
|
||||
|
||||
endif
|
||||
|
||||
" Switch syntax highlighting on when the terminal has colors or when using the
|
||||
" GUI (which always has colors).
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
" Revert with ":syntax off".
|
||||
syntax on
|
||||
|
||||
" I like highlighting strings inside C comments.
|
||||
" Revert with ":unlet c_comment_strings".
|
||||
let c_comment_strings=1
|
||||
endif
|
||||
|
||||
" Convenient command to see the difference between the current buffer and the
|
||||
" file it was loaded from, thus the changes you made.
|
||||
" Only define it when not defined already.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Aug 02
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -70,6 +70,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
|
||||
@ -278,7 +283,7 @@ Name triggered by ~
|
||||
|BufWinLeave| before a buffer is removed from a window
|
||||
|
||||
|BufUnload| before unloading a buffer
|
||||
|BufHidden| just after a buffer has become hidden
|
||||
|BufHidden| just before a buffer becomes hidden
|
||||
|BufNew| just after creating a new buffer
|
||||
|
||||
|SwapExists| detected an existing swap file
|
||||
@ -301,6 +306,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
|
||||
@ -551,12 +559,15 @@ CmdlineChanged After a change was made to the text in the
|
||||
*CmdlineEnter*
|
||||
CmdlineEnter After moving the cursor to the command line,
|
||||
where the user can type a command or search
|
||||
string.
|
||||
string; including non-interactive use of ":"
|
||||
in a mapping, but not when using |<Cmd>|.
|
||||
<afile> is set to a single character,
|
||||
indicating the type of command-line.
|
||||
|cmdwin-char|
|
||||
*CmdlineLeave*
|
||||
CmdlineLeave Before leaving the command line.
|
||||
CmdlineLeave Before leaving the command line; including
|
||||
non-interactive use of ":" in a mapping, but
|
||||
not when using |<Cmd>|.
|
||||
Also when abandoning the command line, after
|
||||
typing CTRL-C or <Esc>.
|
||||
When the commands result in an error the
|
||||
@ -631,7 +642,7 @@ CompleteDone After Insert mode completion is done. Either
|
||||
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
specified with 'updatetime'. Not re-triggered
|
||||
specified with 'updatetime'. Not triggered
|
||||
until the user has pressed a key (i.e. doesn't
|
||||
fire every 'updatetime' ms if you leave Vim to
|
||||
make some coffee. :) See |CursorHold-example|
|
||||
@ -840,6 +851,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|.
|
||||
@ -881,9 +894,14 @@ InsertEnter Just before starting Insert mode. Also for
|
||||
The cursor is restored afterwards. If you do
|
||||
not want that set |v:char| to a non-empty
|
||||
string.
|
||||
*InsertLeavePre*
|
||||
InsertLeavePre Just before leaving Insert mode. Also when
|
||||
using CTRL-O |i_CTRL-O|. Be careful not to
|
||||
change mode or use `:normal`, it will likely
|
||||
cause trouble.
|
||||
*InsertLeave*
|
||||
InsertLeave When leaving Insert mode. Also when using
|
||||
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||
InsertLeave Just after leaving Insert mode. Also when
|
||||
using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
|
||||
*MenuPopup*
|
||||
MenuPopup Just before showing the popup menu (under the
|
||||
right mouse button). Useful for adjusting the
|
||||
@ -1202,6 +1220,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,
|
||||
@ -1212,10 +1231,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 Aug 15
|
||||
*change.txt* For Vim version 8.2. Last change: 2020 Nov 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1801,7 +1801,7 @@ Vim has a sorting function and a sorting command. The sorting function can be
|
||||
found here: |sort()|, |uniq()|.
|
||||
|
||||
*:sor* *:sort*
|
||||
:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/]
|
||||
:[range]sor[t][!] [b][f][i][l][n][o][r][u][x] [/{pattern}/]
|
||||
Sort lines in [range]. When no range is given all
|
||||
lines are sorted.
|
||||
|
||||
@ -1809,6 +1809,16 @@ found here: |sort()|, |uniq()|.
|
||||
|
||||
With [i] case is ignored.
|
||||
|
||||
With [l] sort uses the current collation locale.
|
||||
Implementation details: strcoll() is used to compare
|
||||
strings. See |:language| to check or set the collation
|
||||
locale. Example: >
|
||||
:language collate en_US.UTF-8
|
||||
:%sort l
|
||||
< |v:collate| can also used to check the current locale.
|
||||
Sorting using the locale typically ignores case.
|
||||
This does not work properly on Mac.
|
||||
|
||||
Options [n][f][x][o][b] are mutually exclusive.
|
||||
|
||||
With [n] sorting is done on the first decimal number
|
||||
@ -1842,6 +1852,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: >
|
||||
@ -1875,8 +1887,7 @@ found here: |sort()|, |uniq()|.
|
||||
Note that using `:sort` with `:global` doesn't sort the matching lines, it's
|
||||
quite useless.
|
||||
|
||||
The details about sorting depend on the library function used. There is no
|
||||
guarantee that sorting obeys the current locale. You will have to try it out.
|
||||
`:sort` does not use the current locale unless the l flag is used.
|
||||
Vim does do a "stable" sort.
|
||||
|
||||
The sorting can be interrupted, but if you interrupt it too late in the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*channel.txt* For Vim version 8.2. Last change: 2020 Sep 03
|
||||
*channel.txt* For Vim version 8.2. Last change: 2020 Oct 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -965,6 +965,10 @@ job_status({job}) *job_status()* *E916*
|
||||
"fail", because a fork happens before the failure can be
|
||||
detected.
|
||||
|
||||
If in Vim9 script a variable is declared with type "job" but
|
||||
never assigned to, passing that variable to job_status()
|
||||
returns "fail".
|
||||
|
||||
If an exit callback was set with the "exit_cb" option and the
|
||||
job is now detected to be "dead" the callback will be invoked.
|
||||
|
||||
@ -1288,7 +1292,7 @@ prompt. >
|
||||
" Send the text to a shell with Enter appended.
|
||||
call ch_sendraw(g:shell_job, a:text .. "\n")
|
||||
endfunc
|
||||
|
||||
|
||||
" Function handling output from the shell: Added above the prompt.
|
||||
func GotOutput(channel, msg)
|
||||
call append(line("$") - 1, "- " . a:msg)
|
||||
|
@ -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: 2020 Dec 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),
|
||||
|
@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Aug 17
|
||||
*editing.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -73,10 +73,14 @@ g CTRL-G Prints the current position of the cursor in five
|
||||
ways: Column, Line, Word, Character and Byte. If the
|
||||
number of Characters and Bytes is the same then the
|
||||
Character position is omitted.
|
||||
|
||||
If there are characters in the line that take more
|
||||
than one position on the screen (<Tab> or special
|
||||
character), both the "real" column and the screen
|
||||
column are shown, separated with a dash.
|
||||
character), or characters using more than one byte per
|
||||
column (characters above 0x7F when 'encoding' is
|
||||
utf-8), both the byte column and the screen column are
|
||||
shown, separated by a dash.
|
||||
|
||||
Also see the 'ruler' option and the |wordcount()|
|
||||
function.
|
||||
|
||||
@ -1029,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*
|
||||
@ -1415,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 Sep 22
|
||||
*eval.txt* For Vim version 8.2. Last change: 2020 Dec 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -120,7 +120,7 @@ base, use |str2nr()|.
|
||||
|
||||
*TRUE* *FALSE* *Boolean*
|
||||
For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE.
|
||||
You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
|
||||
You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|.
|
||||
When TRUE is returned from a function it is the Number one, FALSE is the
|
||||
number zero.
|
||||
|
||||
@ -133,7 +133,27 @@ non-zero number it means TRUE: >
|
||||
:" executed
|
||||
To test for a non-empty string, use empty(): >
|
||||
:if !empty("foo")
|
||||
<
|
||||
|
||||
< *falsy* *truthy*
|
||||
An expression can be used as a condition, ignoring the type and only using
|
||||
whether the value is "sort of true" or "sort of false". Falsy is:
|
||||
the number zero
|
||||
empty string, blob, list or dictionary
|
||||
Other values are truthy. Examples:
|
||||
0 falsy
|
||||
1 truthy
|
||||
-1 truthy
|
||||
0.0 falsy
|
||||
0.1 truthy
|
||||
'' falsy
|
||||
'x' truthy
|
||||
[] falsy
|
||||
[0] truthy
|
||||
{} falsy
|
||||
#{x: 1} truthy
|
||||
0z falsy
|
||||
0z00 truthy
|
||||
|
||||
*non-zero-arg*
|
||||
Function arguments often behave slightly different from |TRUE|: If the
|
||||
argument is present and it evaluates to a non-zero Number, |v:true| or a
|
||||
@ -877,10 +897,13 @@ Example: >
|
||||
All expressions within one level are parsed from left to right.
|
||||
|
||||
|
||||
expr1 *expr1* *E109*
|
||||
expr1 *expr1* *trinary* *falsy-operator* *??* *E109*
|
||||
-----
|
||||
|
||||
expr2 ? expr1 : expr1
|
||||
The trinary operator: expr2 ? expr1 : expr1
|
||||
The falsy operator: expr2 ?? expr1
|
||||
|
||||
Trinary operator ~
|
||||
|
||||
The expression before the '?' is evaluated to a number. If it evaluates to
|
||||
|TRUE|, the result is the value of the expression between the '?' and ':',
|
||||
@ -903,6 +926,23 @@ To keep this readable, using |line-continuation| is suggested: >
|
||||
You should always put a space before the ':', otherwise it can be mistaken for
|
||||
use in a variable such as "a:1".
|
||||
|
||||
Falsy operator ~
|
||||
|
||||
This is also known as the "null coalescing operator", but that's too
|
||||
complicated, thus we just call it the falsy operator.
|
||||
|
||||
The expression before the '??' is evaluated. If it evaluates to
|
||||
|truthy|, this is used as the result. Otherwise the expression after the '??'
|
||||
is evaluated and used as the result. This is most useful to have a default
|
||||
value for an expression that may result in zero or empty: >
|
||||
echo theList ?? 'list is empty'
|
||||
echo GetName() ?? 'unknown'
|
||||
|
||||
These are similar, but not equal: >
|
||||
expr2 ?? expr1
|
||||
expr2 ? expr2 : expr1
|
||||
In the second line "expr2" is evaluated twice.
|
||||
|
||||
|
||||
expr2 and expr3 *expr2* *expr3*
|
||||
---------------
|
||||
@ -1810,6 +1850,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|.
|
||||
@ -2428,6 +2475,8 @@ 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}
|
||||
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
|
||||
@ -2629,8 +2678,9 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]])
|
||||
rhs of mapping {name} in mode {mode}
|
||||
mapcheck({name} [, {mode} [, {abbr}]])
|
||||
String check for mappings matching {name}
|
||||
mapset({mode}, {abbr}, {dict})
|
||||
none restore mapping from |maparg()| result
|
||||
mapnew({expr1}, {expr2}) List/Dict like |map()| but creates a new List
|
||||
or Dictionary
|
||||
mapset({mode}, {abbr}, {dict}) none restore mapping from |maparg()| result
|
||||
match({expr}, {pat} [, {start} [, {count}]])
|
||||
Number position where {pat} matches in {expr}
|
||||
matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
|
||||
@ -2706,7 +2756,7 @@ prop_type_change({name}, {props})
|
||||
none change an existing property type
|
||||
prop_type_delete({name} [, {props}])
|
||||
none delete a property type
|
||||
prop_type_get([{name} [, {props}]])
|
||||
prop_type_get({name} [, {props}])
|
||||
Dict get property type values
|
||||
prop_type_list([{props}]) List get list of property types
|
||||
pum_getpos() Dict position and size of pum if visible
|
||||
@ -3086,7 +3136,7 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()*
|
||||
error message is given. Example: >
|
||||
:let failed = appendbufline(13, 0, "# THE START")
|
||||
<
|
||||
< Can also be used as a |method| after a List, the base is
|
||||
Can also be used as a |method| after a List, the base is
|
||||
passed as the second argument: >
|
||||
mylist->appendbufline(buf, lnum)
|
||||
|
||||
@ -3432,8 +3482,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
|
||||
@ -3463,7 +3513,7 @@ 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 different from byteidx() when 'encoding' is set to
|
||||
Only works differently from byteidx() when 'encoding' is set to
|
||||
a Unicode encoding.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
@ -3540,6 +3590,31 @@ charclass({string}) *charclass()*
|
||||
other specific Unicode class
|
||||
The class is used in patterns and word motions.
|
||||
|
||||
*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
|
||||
@ -3758,7 +3833,7 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
|
||||
not need to be the first letter: >
|
||||
confirm("file has been modified", "&Save\nSave &All")
|
||||
< For the console, the first letter of each choice is used as
|
||||
the default shortcut key.
|
||||
the default shortcut key. Case is ignored.
|
||||
|
||||
The optional {default} argument is the number of the choice
|
||||
that is made if the user hits <CR>. Use 1 to make the first
|
||||
@ -4387,10 +4462,10 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
|
||||
|Dictionaries|.
|
||||
|
||||
If they are |Lists|: Append {expr2} to {expr1}.
|
||||
If {expr3} is given insert the items of {expr2} before item
|
||||
{expr3} in {expr1}. When {expr3} is zero insert before the
|
||||
first item. When {expr3} is equal to len({expr1}) then
|
||||
{expr2} is appended.
|
||||
If {expr3} is given insert the items of {expr2} before the
|
||||
item with index {expr3} in {expr1}. When {expr3} is zero
|
||||
insert before the first item. When {expr3} is equal to
|
||||
len({expr1}) then {expr2} is appended.
|
||||
Examples: >
|
||||
:echo sort(extend(mylist, [7, 5]))
|
||||
:call extend(mylist, [2, 3], 1)
|
||||
@ -4692,7 +4767,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|: >
|
||||
@ -5011,9 +5087,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.
|
||||
@ -5095,7 +5171,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
|
||||
@ -5485,8 +5564,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|): >
|
||||
@ -5599,7 +5678,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
|
||||
|
||||
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
|
||||
@ -6947,9 +7026,14 @@ luaeval({expr} [, {expr}]) *luaeval()*
|
||||
< {only available when compiled with the |+lua| feature}
|
||||
|
||||
map({expr1}, {expr2}) *map()*
|
||||
{expr1} must be a |List| or a |Dictionary|.
|
||||
{expr1} must be a |List|, |Blob| or |Dictionary|.
|
||||
Replace each item in {expr1} with the result of evaluating
|
||||
{expr2}. {expr2} must be a |string| or |Funcref|.
|
||||
{expr2}. For a |Blob| each byte is replaced.
|
||||
If the item type changes you may want to use |mapnew()| to
|
||||
create a new List or Dictionary. This is required when using
|
||||
Vim9 script.
|
||||
|
||||
{expr2} must be a |string| or |Funcref|.
|
||||
|
||||
If {expr2} is a |string|, inside {expr2} |v:val| has the value
|
||||
of the current item. For a |Dictionary| |v:key| has the key
|
||||
@ -6984,11 +7068,11 @@ map({expr1}, {expr2}) *map()*
|
||||
|Dictionary| to remain unmodified make a copy first: >
|
||||
:let tlist = map(copy(mylist), ' v:val . "\t"')
|
||||
|
||||
< Returns {expr1}, the |List| or |Dictionary| that was filtered.
|
||||
When an error is encountered while evaluating {expr2} no
|
||||
further items in {expr1} are processed. When {expr2} is a
|
||||
Funcref errors inside a function are ignored, unless it was
|
||||
defined with the "abort" flag.
|
||||
< Returns {expr1}, the |List|, |Blob| or |Dictionary| that was
|
||||
filtered. When an error is encountered while evaluating
|
||||
{expr2} no further items in {expr1} are processed. When
|
||||
{expr2} is a Funcref errors inside a function are ignored,
|
||||
unless it was defined with the "abort" flag.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
mylist->map(expr2)
|
||||
@ -7097,7 +7181,14 @@ mapcheck({name} [, {mode} [, {abbr}]]) *mapcheck()*
|
||||
GetKey()->mapcheck('n')
|
||||
|
||||
|
||||
mapset({mode}, {abbr}, {dict}) *mapset()*
|
||||
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. Items can still be changed by {expr2}, if you
|
||||
don't want that use |deepcopy()| first.
|
||||
|
||||
|
||||
mapset({mode}, {abbr}, {dict}) *mapset()*
|
||||
Restore a mapping from a dictionary returned by |maparg()|.
|
||||
{mode} and {abbr} should be the same as for the call to
|
||||
|maparg()|. *E460*
|
||||
@ -7323,12 +7414,19 @@ 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.
|
||||
|
||||
The optional {dict} argument always supports the following
|
||||
items:
|
||||
matchseq When this item is present and {str} contains
|
||||
multiple words separated by white space, then
|
||||
returns only matches that contain the words in
|
||||
the given sequence.
|
||||
|
||||
If {list} is a list of dictionaries, then the optional {dict}
|
||||
argument supports the following items:
|
||||
argument supports the following additional items:
|
||||
key key of the item which is fuzzy matched against
|
||||
{str}. The value of this item should be a
|
||||
string.
|
||||
@ -7342,6 +7440,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
matching is NOT supported. The maximum supported {str} length
|
||||
is 256.
|
||||
|
||||
When {str} has multiple words each separated by white space,
|
||||
then the list of strings that have all the words is returned.
|
||||
|
||||
If there are no matching strings or there is an error, then an
|
||||
empty list is returned. If length of {str} is greater than
|
||||
256, then returns an empty list.
|
||||
@ -7361,26 +7462,33 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
:echo v:oldfiles->matchfuzzy("test")
|
||||
< results in a list of file names fuzzy matching "test". >
|
||||
:let l = readfile("buffer.c")->matchfuzzy("str")
|
||||
< results in a list of lines in "buffer.c" fuzzy matching "str".
|
||||
< results in a list of lines in "buffer.c" fuzzy matching "str". >
|
||||
:echo ['one two', 'two one']->matchfuzzy('two one')
|
||||
< results in ['two one', 'one two']. >
|
||||
:echo ['one two', 'two one']->matchfuzzy('two one',
|
||||
\ {'matchseq': 1})
|
||||
< results in ['two one'].
|
||||
|
||||
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
|
||||
@ -7917,8 +8025,8 @@ printf({fmt}, {expr1} ...) *printf()*
|
||||
|
||||
|
||||
prompt_getprompt({buf}) *prompt_getprompt()*
|
||||
Returns the effective prompt text for buffer {buf}. {buf} can
|
||||
be a buffer name or number. |prompt-buffer|.
|
||||
Returns the effective prompt text for buffer {buf}. {buf} can
|
||||
be a buffer name or number. See |prompt-buffer|.
|
||||
|
||||
If the buffer doesn't exist or isn't a prompt buffer, an empty
|
||||
string is returned.
|
||||
@ -8264,15 +8372,18 @@ reg_recording() *reg_recording()*
|
||||
Returns an empty string when not recording. See |q|.
|
||||
|
||||
reltime([{start} [, {end}]]) *reltime()*
|
||||
Return an item that represents a time value. The format of
|
||||
the item depends on the system. It can be passed to
|
||||
|reltimestr()| to convert it to a string or |reltimefloat()|
|
||||
to convert to a Float.
|
||||
Without an argument it returns the current time.
|
||||
Return an item that represents a time value. The item is a
|
||||
list with items that depend on the system. In Vim 9 script
|
||||
list<any> can be used.
|
||||
The item can be passed to |reltimestr()| to convert it to a
|
||||
string or |reltimefloat()| to convert to a Float.
|
||||
|
||||
Without an argument reltime() returns the current time.
|
||||
With one argument is returns the time passed since the time
|
||||
specified in the argument.
|
||||
With two arguments it returns the time passed between {start}
|
||||
and {end}.
|
||||
|
||||
The {start} and {end} arguments must be values returned by
|
||||
reltime().
|
||||
|
||||
@ -8590,6 +8701,7 @@ screencol() *screencol()*
|
||||
the following mappings: >
|
||||
nnoremap <expr> GG ":echom ".screencol()."\n"
|
||||
nnoremap <silent> GG :echom screencol()<CR>
|
||||
nnoremap GG <Cmd>echom screencol()<CR>
|
||||
<
|
||||
screenpos({winid}, {lnum}, {col}) *screenpos()*
|
||||
The result is a Dict with the screen position of the text
|
||||
@ -8657,11 +8769,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
|
||||
@ -8843,7 +8960,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
|
||||
@ -9645,8 +9762,25 @@ sort({list} [, {func} [, {dict}]]) *sort()* *E702*
|
||||
When {func} is given and it is '1' or 'i' then case is
|
||||
ignored.
|
||||
|
||||
When {func} is given and it is 'l' then the current collation
|
||||
locale is used for ordering. Implementation details: strcoll()
|
||||
is used to compare strings. See |:language| check or set the
|
||||
collation locale. |v:collate| can also be used to check the
|
||||
current locale. Sorting using the locale typically ignores
|
||||
case. Example: >
|
||||
" ö is sorted similarly to o with English locale.
|
||||
:language collate en_US.UTF8
|
||||
:echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
|
||||
< ['n', 'o', 'O', 'ö', 'p', 'z'] ~
|
||||
>
|
||||
" ö is sorted after z with Swedish locale.
|
||||
:language collate sv_SE.UTF8
|
||||
:echo sort(['n', 'o', 'O', 'ö', 'p', 'z'], 'l')
|
||||
< ['n', 'o', 'O', 'p', 'z', 'ö'] ~
|
||||
This does not work properly on Mac.
|
||||
|
||||
When {func} is given and it is 'n' then all items will be
|
||||
sorted numerical (Implementation detail: This uses the
|
||||
sorted numerical (Implementation detail: this uses the
|
||||
strtod() function to parse numbers, Strings, Lists, Dicts and
|
||||
Funcrefs will be considered as being 0).
|
||||
|
||||
@ -10348,7 +10482,9 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
||||
"bg" background color (as with "fg")
|
||||
"font" font name (only available in the GUI)
|
||||
|highlight-font|
|
||||
"sp" special color (as with "fg") |highlight-guisp|
|
||||
"sp" special color for the GUI (as with "fg")
|
||||
|highlight-guisp|
|
||||
"ul" underline color for cterm: number as a string
|
||||
"fg#" like "fg", but for the GUI and the GUI is
|
||||
running the name in "#RRGGBB" form
|
||||
"bg#" like "fg#" for "bg"
|
||||
@ -10556,7 +10692,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|.
|
||||
@ -10648,12 +10784,12 @@ 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.
|
||||
cursor_style wether sending |t_RS| works **
|
||||
cursor_blink_mode wether sending |t_RC| works **
|
||||
cursor_style whether sending |t_RS| works **
|
||||
cursor_blink_mode whether sending |t_RC| works **
|
||||
underline_rgb whether |t_8u| works **
|
||||
mouse mouse type supported
|
||||
|
||||
@ -10737,6 +10873,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
|
||||
@ -11055,7 +11193,7 @@ win_execute({id}, {command} [, {silent}]) *win_execute()*
|
||||
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|: >
|
||||
@ -11309,7 +11447,8 @@ winsaveview() Returns a |Dictionary| that contains information to restore
|
||||
curswant column for vertical movement
|
||||
topline first line in the window
|
||||
topfill filler lines, only in diff mode
|
||||
leftcol first column displayed
|
||||
leftcol first column displayed; only used when
|
||||
'wrap' is off
|
||||
skipcol columns skipped
|
||||
Note that no option values are saved.
|
||||
|
||||
@ -11528,7 +11667,7 @@ menu Compiled with support for |:menu|.
|
||||
mksession Compiled with support for |:mksession|.
|
||||
modify_fname Compiled with file name modifiers. |filename-modifiers|
|
||||
(always true)
|
||||
mouse Compiled with support mouse.
|
||||
mouse Compiled with support for mouse.
|
||||
mouse_dec Compiled with support for Dec terminal mouse.
|
||||
mouse_gpm Compiled with support for gpm (Linux console mouse)
|
||||
mouse_gpm_enabled GPM mouse is working
|
||||
@ -12083,8 +12222,9 @@ be used to pass settings to the autoload script before it's loaded: >
|
||||
|
||||
Note that when you make a mistake and call a function that is supposed to be
|
||||
defined in an autoload script, but the script doesn't actually define the
|
||||
function, the script will be sourced every time you try to call the function.
|
||||
And you will get an error message every time.
|
||||
function, you will get an error message for the missing function. If you fix
|
||||
the autoload script it won't be automatically loaded again. Either restart
|
||||
Vim or manually source the script.
|
||||
|
||||
Also note that if you have two script files, and one calls a function in the
|
||||
other and vice versa, before the used function is defined, it won't work.
|
||||
@ -12812,7 +12952,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: 2019 Jul 16
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -397,6 +397,13 @@ ways to change this:
|
||||
3. Docs for the default filetype plugins. *ftplugin-docs*
|
||||
|
||||
|
||||
AWK *ft-awk-plugin*
|
||||
|
||||
Support for features specific to GNU Awk, like @include, can be enabled by
|
||||
setting: >
|
||||
let g:awk_is_gawk = 1
|
||||
|
||||
|
||||
CHANGELOG *ft-changelog-plugin*
|
||||
|
||||
Allows for easy entrance of Changelog entries in Changelog files. There are
|
||||
@ -556,16 +563,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:
|
||||
@ -575,24 +581,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: >
|
||||
@ -605,7 +612,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, ...)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.2. Last change: 2020 Mar 16
|
||||
*gui.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -547,15 +547,6 @@ floating menus that do not appear on the main menu bar.
|
||||
5.2 Creating New Menus *creating-menus*
|
||||
|
||||
*:me* *:menu* *:noreme* *:noremenu*
|
||||
*:am* *:amenu* *:an* *:anoremenu*
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu*
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu*
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu*
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
|
||||
*:tlm* *:tlmenu* *:tln* *:tlnoremenu*
|
||||
*E330* *E327* *E331* *E336* *E333*
|
||||
*E328* *E329* *E337* *E792*
|
||||
To create a new menu item, use the ":menu" commands. They are mostly like
|
||||
@ -596,6 +587,7 @@ With the shortcut "F" (while keeping the <Alt> key pressed), and then "O",
|
||||
this menu can be used. The second part is shown as "Open :e". The ":e"
|
||||
is right aligned, and the "O" is underlined, to indicate it is the shortcut.
|
||||
|
||||
*:am* *:amenu* *:an* *:anoremenu*
|
||||
The ":amenu" command can be used to define menu entries for all modes at once,
|
||||
except for Terminal mode. To make the command work correctly, a character is
|
||||
automatically inserted for some modes:
|
||||
@ -634,6 +626,30 @@ included they make the <> form and raw key codes not being recognized).
|
||||
Note that <Esc> in Cmdline mode executes the command, like in a mapping. This
|
||||
is Vi compatible. Use CTRL-C to quit Cmdline mode.
|
||||
|
||||
*:nme* *:nmenu* *:nnoreme* *:nnoremenu* *:nunme* *:nunmenu*
|
||||
Menu commands starting with "n" work in Normal mode. |mapmode-n|
|
||||
|
||||
*:ome* *:omenu* *:onoreme* *:onoremenu* *:ounme* *:ounmenu*
|
||||
Menu commands starting with "o" work in Operator-pending mode. |mapmode-o|
|
||||
|
||||
*:vme* *:vmenu* *:vnoreme* *:vnoremenu* *:vunme* *:vunmenu*
|
||||
Menu commands starting with "v" work in Visual mode. |mapmode-v|
|
||||
|
||||
*:xme* *:xmenu* *:xnoreme* *:xnoremenu* *:xunme* *:xunmenu*
|
||||
Menu commands starting with "x" work in Visual and Select mode. |mapmode-x|
|
||||
|
||||
*:sme* *:smenu* *:snoreme* *:snoremenu* *:sunme* *:sunmenu*
|
||||
Menu commands starting with "s" work in Select mode. |mapmode-s|
|
||||
|
||||
*:ime* *:imenu* *:inoreme* *:inoremenu* *:iunme* *:iunmenu*
|
||||
Menu commands starting with "i" work in Insert mode. |mapmode-i|
|
||||
|
||||
*:cme* *:cmenu* *:cnoreme* *:cnoremenu* *:cunme* *:cunmenu*
|
||||
Menu commands starting with "c" work in Cmdline mode. |mapmode-c|
|
||||
|
||||
*:tlm* *:tlmenu* *:tln* *:tlnoremenu* *:tlu* *:tlunmenu*
|
||||
Menu commands starting with "tl" work in Terminal mode. |mapmode-t|
|
||||
|
||||
*:menu-<silent>* *:menu-silent*
|
||||
To define a menu which will not be echoed on the command line, add
|
||||
"<silent>" as the first argument. Example: >
|
||||
@ -897,14 +913,6 @@ using the last visual selection.
|
||||
|
||||
*:unme* *:unmenu*
|
||||
*:aun* *:aunmenu*
|
||||
*:nunme* *:nunmenu*
|
||||
*:ounme* *:ounmenu*
|
||||
*:vunme* *:vunmenu*
|
||||
*:xunme* *:xunmenu*
|
||||
*:sunme* *:sunmenu*
|
||||
*:iunme* *:iunmenu*
|
||||
*:cunme* *:cunmenu*
|
||||
*:tlu* *:tlunmenu*
|
||||
To delete a menu item or a whole submenu, use the unmenu commands, which are
|
||||
analogous to the unmap commands. Eg: >
|
||||
:unmenu! Edit.Paste
|
||||
|
@ -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 @@
|
||||
*if_mzsch.txt* For Vim version 8.2. Last change: 2019 Dec 07
|
||||
*if_mzsch.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@ -43,7 +43,7 @@ To speed up the process, you might also want to use --disable-gracket and
|
||||
{script}
|
||||
{endmarker}
|
||||
Execute inlined MzScheme script {script}.
|
||||
Note: This command doesn't work if the MzScheme
|
||||
Note: This command doesn't work when the MzScheme
|
||||
feature wasn't compiled in. To avoid errors, see
|
||||
|script-here|.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 May 31
|
||||
*index.txt* For Vim version 8.2. Last change: 2020 Oct 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -784,10 +784,10 @@ tag char note action in Normal mode ~
|
||||
lines down
|
||||
|gk| gk 1 like "k", but when 'wrap' on go N screen
|
||||
lines up
|
||||
|gn| gn 1,2 find the next match with the last used
|
||||
search pattern and Visually select it
|
||||
|gm| gm 1 go to character at middle of the screenline
|
||||
|gM| gM 1 go to character at middle of the text line
|
||||
|gn| gn 1,2 find the next match with the last used
|
||||
search pattern and Visually select it
|
||||
|go| go 1 cursor to byte N in the buffer
|
||||
|gp| ["x]gp 2 put the text [from register x] after the
|
||||
cursor N times, leave the cursor after it
|
||||
@ -1317,6 +1317,7 @@ tag command action ~
|
||||
|:filetype| :filet[ype] switch file type detection on/off
|
||||
|:filter| :filt[er] filter output of following command
|
||||
|:find| :fin[d] find file in 'path' and edit it
|
||||
|:final| :final declare an immutable variable in Vim9
|
||||
|:finally| :fina[lly] part of a :try command
|
||||
|:finish| :fini[sh] quit sourcing a Vim script
|
||||
|:first| :fir[st] go to the first file in the argument list
|
||||
@ -1691,6 +1692,7 @@ tag command action ~
|
||||
|:unsilent| :uns[ilent] run a command not silently
|
||||
|:update| :up[date] write buffer if modified
|
||||
|:vglobal| :v[global] execute commands for not matching lines
|
||||
|:var| :var variable declaration in Vim9
|
||||
|:version| :ve[rsion] print version number and other info
|
||||
|:verbose| :verb[ose] execute command with 'verbose' set
|
||||
|:vertical| :vert[ical] make following command split vertically
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Sep 19
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Oct 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -312,6 +312,7 @@ If you enter a value of 10, it will end up in the file as a 0. The 10 is a
|
||||
the buffer to a file, the <NL> character is translated into <Nul>. The <NL>
|
||||
character is written at the end of each line. Thus if you want to insert a
|
||||
<NL> character in a file you will have to make a line break.
|
||||
Also see 'fileformat'.
|
||||
|
||||
*i_CTRL-X* *insert_expand*
|
||||
CTRL-X enters a sub-mode where several commands can be used. Most of these
|
||||
|
@ -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 Sep 09
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -252,6 +252,17 @@ For abbreviations |v:char| is set to the character that was typed to trigger
|
||||
the abbreviation. You can use this to decide how to expand the {lhs}. You
|
||||
should not either insert or change the v:char.
|
||||
|
||||
In case you want the mapping to not do anything, you can have the expression
|
||||
evaluate to an empty string. If something changed that requires Vim to
|
||||
go through the main loop (e.g. to update the display), return "\<Ignore>".
|
||||
This is similar to "nothing" but makes Vim return from the loop that waits for
|
||||
input. Example: >
|
||||
func s:OpenPopup()
|
||||
call popup_create(... arguments ...)
|
||||
return "\<Ignore>"
|
||||
endfunc
|
||||
nnoremap <expr> <F3> <Sid>OpenPopup()
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
For this reason the following is blocked:
|
||||
@ -260,7 +271,7 @@ For this reason the following is blocked:
|
||||
- The |:normal| command.
|
||||
- Moving the cursor is allowed, but it is restored afterwards.
|
||||
If you want the mapping to do any of these let the returned characters do
|
||||
that.
|
||||
that, or use a |<Cmd>| mapping instead.
|
||||
|
||||
You can use getchar(), it consumes typeahead if there is any. E.g., if you
|
||||
have these mappings: >
|
||||
@ -292,6 +303,43 @@ empty string, so that nothing is inserted.
|
||||
Note that using 0x80 as a single byte before other text does not work, it will
|
||||
be seen as a special key.
|
||||
|
||||
*<Cmd>* *:map-cmd*
|
||||
The special text <Cmd> begins a "command mapping", it executes the command
|
||||
directly without changing modes. Where you might use ":...<CR>" in the
|
||||
{rhs} of a mapping, you can instead use "<Cmd>...<CR>".
|
||||
Example: >
|
||||
noremap x <Cmd>echo mode(1)<CR>
|
||||
<
|
||||
This is more flexible than `:<C-U>` in Visual and Operator-pending mode, or
|
||||
`<C-O>:` in Insert mode, because the commands are executed directly in the
|
||||
current mode, instead of always going to Normal mode. Visual mode is
|
||||
preserved, so tricks with |gv| are not needed. Commands can be invoked
|
||||
directly in Command-line mode (which would otherwise require timer hacks).
|
||||
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) |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.
|
||||
|
||||
*E1135* *E1136*
|
||||
<Cmd> commands must terminate, that is, they must be followed by <CR> in the
|
||||
{rhs} of the mapping definition. |Command-line| mode is never entered.
|
||||
|
||||
*E1137*
|
||||
<Cmd> commands can have only normal characters and cannot contain special
|
||||
characters like function keys.
|
||||
|
||||
|
||||
1.3 MAPPING AND MODES *:map-modes*
|
||||
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
|
||||
@ -839,8 +887,15 @@ execute a shell command, e.g.: `!ls` Or put the lines in your |vimrc|.
|
||||
|
||||
When modifyOtherKeys is enabled you can map <C-[> and <C-S-{>: >
|
||||
imap <C-[> [[[
|
||||
imap <C-S-{> {{{
|
||||
Without modifyOtherKeys <C-[> and <C-S-{> are indistinguishable from Esc.
|
||||
imap <C-{> {{{
|
||||
Without modifyOtherKeys <C-[> and <C-{> are indistinguishable from Esc.
|
||||
Note that <C-{> is used and not <C-S-[> or <C-S-{>. This works on most
|
||||
keyboards. Similarly, <C-}> is used instead of <C-S-]> or <C-S-}> and
|
||||
<C-|> instead of <C-S-\> or <C-S-|>. Note that '|' has a special meaning in a
|
||||
mapping, see |map-bar|.
|
||||
|
||||
WARNING: if you map <C-[> you may very well break any key codes that start
|
||||
with Esc. Make sure it comes AFTER other mappings.
|
||||
|
||||
A known side effect is that in Insert mode the raw escape sequence is inserted
|
||||
after the CTRL-V key. This can be used to check whether modifyOtherKeys is
|
||||
@ -854,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.
|
||||
|
||||
@ -1186,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.
|
||||
@ -1266,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*
|
||||
@ -1484,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
|
||||
@ -1614,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 @@
|
||||
*motion.txt* For Vim version 8.2. Last change: 2020 Aug 24
|
||||
*motion.txt* For Vim version 8.2. Last change: 2020 Oct 18
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -190,11 +190,14 @@ l or *l*
|
||||
|
||||
*^*
|
||||
^ To the first non-blank character of the line.
|
||||
|exclusive| motion.
|
||||
|exclusive| motion. Any count is ignored.
|
||||
|
||||
*$* *<End>* *<kEnd>*
|
||||
$ or <End> To the end of the line. When a count is given also go
|
||||
[count - 1] lines downward. |inclusive| motion.
|
||||
[count - 1] lines downward, or as far is possible.
|
||||
|inclusive| motion. If a count of 2 of larger is
|
||||
given and the cursor is on the last line, that is an
|
||||
error an the cursor doesn't move.
|
||||
In Visual mode the cursor goes to just after the last
|
||||
character in the line.
|
||||
When 'virtualedit' is active, "$" may move the cursor
|
||||
|
@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*netbeans.txt* For Vim version 8.2. Last change: 2020 Nov 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@ -562,9 +562,10 @@ setModtime time
|
||||
saved directly by the Vim Controller.
|
||||
New in version 2.3.
|
||||
|
||||
setReadOnly
|
||||
Set a file as readonly
|
||||
Implemented in version 2.3.
|
||||
setReadOnly readonly
|
||||
When the boolean argument "readonly" is "T" for True, mark the
|
||||
buffer as readonly, when it is "F" for False, mark it as not
|
||||
readonly. Implemented in version 2.3.
|
||||
|
||||
setStyle Not implemented.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Sep 15
|
||||
*options.txt* For Vim version 8.2. Last change: 2020 Dec 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2554,7 +2554,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
"x" delete each combining character on its own. When it is off (the
|
||||
default) the character along with its combining characters are
|
||||
deleted.
|
||||
Note: When 'delcombine' is set "xx" may work different from "2x"!
|
||||
Note: When 'delcombine' is set "xx" may work differently from "2x"!
|
||||
|
||||
This is useful for Arabic, Hebrew and many other languages where one
|
||||
may have combining characters overtop of base characters, and want
|
||||
@ -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.
|
||||
@ -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")
|
||||
@ -4682,7 +4684,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
characters. Example: "abc;ABC"
|
||||
Example: "aA,fgh;FGH,cCdDeE"
|
||||
Special characters need to be preceded with a backslash. These are
|
||||
";", ',' and backslash itself.
|
||||
";", ',', '"', '|' and backslash itself.
|
||||
|
||||
This will allow you to activate vim actions without having to switch
|
||||
back and forth between the languages. Your language characters will
|
||||
@ -4943,6 +4945,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: "")
|
||||
@ -6317,7 +6321,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".
|
||||
|
||||
@ -7225,7 +7231,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
normal text. Each status line item is of the form:
|
||||
%-0{minwid}.{maxwid}{item}
|
||||
All fields except the {item} are optional. A single percent sign can
|
||||
be given as "%%". Up to 80 items can be specified. *E541*
|
||||
be given as "%%".
|
||||
|
||||
When the option starts with "%!" then it is used as an expression,
|
||||
evaluated and the result is used as the option value. Example: >
|
||||
|
@ -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: 2020 Dec 30
|
||||
|
||||
|
||||
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,13 @@ 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
|
||||
- test on VSI OpenVMS platforms
|
||||
- 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: 2020 Dec 25
|
||||
|
||||
|
||||
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
|
||||
|
@ -154,4 +154,4 @@ Copyright: Copyright (C) 2005-2015 Charles E Campbell *zip-copyright*
|
||||
v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:noet:ft=help:fdm=marker
|
||||
vim:tw=78:ts=8:ft=help:noet:norl:fdm=marker
|
||||
|
@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Sep 08
|
||||
*popup.txt* For Vim version 8.2. Last change: 2020 Nov 07
|
||||
|
||||
|
||||
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,11 +309,12 @@ 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.
|
||||
Always returns |v:true|.
|
||||
|
||||
A match is set on that line to highlight it, see
|
||||
|popup_menu()|.
|
||||
@ -711,7 +712,7 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
By default a double line is used all around when
|
||||
'encoding' is "utf-8" and 'ambiwidth' is "single",
|
||||
otherwise ASCII characters are used.
|
||||
scrollbar non-zero: show a scrollbar when the text doesn't fit.
|
||||
scrollbar 1 or true: show a scrollbar when the text doesn't fit.
|
||||
zero: do not show a scrollbar. Default is non-zero.
|
||||
Also see |popup-scrollbar|.
|
||||
scrollbarhighlight Highlight group name for the scrollbar. The
|
||||
@ -910,6 +911,11 @@ A mouse click arrives as <LeftMouse>. The coordinates can be obtained with
|
||||
Vim provides standard filters |popup_filter_menu()| and
|
||||
|popup_filter_yesno()|.
|
||||
|
||||
Keys coming from a `:normal` command do not pass through the filter. This can
|
||||
be used to move the cursor in a popup where the "cursorline" option is set: >
|
||||
call win_execute(winid, 'normal! 10Gzz')
|
||||
Keys coming from `feedkeys()` are passed through the filter.
|
||||
|
||||
Note that "x" is the normal way to close a popup. You may want to use Esc,
|
||||
but since many keys start with an Esc character, there may be a delay before
|
||||
Vim recognizes the Esc key. If you do use Esc, it is recommended to set the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -271,6 +271,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
directories are added to 'runtimepath'. This is
|
||||
useful in your .vimrc. The plugins will then be
|
||||
loaded during initialization, see |load-plugins|.
|
||||
Note that for ftdetect scripts to be loaded
|
||||
you will need to write `filetype plugin indent on`
|
||||
AFTER all `packadd!` commands.
|
||||
|
||||
Also see |pack-add|.
|
||||
{only available when compiled with |+eval|}
|
||||
@ -351,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.
|
||||
|
||||
:vim9script [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
|
||||
|
@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 8.2. Last change: 2020 Aug 31
|
||||
*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@ -81,6 +81,10 @@ on the same line, the attributes of the sign with the highest priority is used
|
||||
independently of the sign group. The default priority for a sign is 10. The
|
||||
priority is assigned at the time of placing a sign.
|
||||
|
||||
When two signs with the same priority are present, and one has an icon or text
|
||||
in the signcolumn while the other has line highlighting, then both are
|
||||
displayed.
|
||||
|
||||
When the line on which the sign is placed is deleted, the sign is moved to the
|
||||
next line (or the last line of the buffer, if there is no next line). When
|
||||
the delete is undone the sign does not move back.
|
||||
@ -458,11 +462,11 @@ sign_getplaced([{expr} [, {dict}]]) *sign_getplaced()*
|
||||
entries
|
||||
|
||||
The dictionary for each sign contains the following entries:
|
||||
group sign group. Set to '' for the global group.
|
||||
id identifier of the sign
|
||||
lnum line number where the sign is placed
|
||||
name name of the defined sign
|
||||
priority sign priority
|
||||
group sign group. Set to '' for the global group.
|
||||
id identifier of the sign
|
||||
lnum line number where the sign is placed
|
||||
name name of the defined sign
|
||||
priority sign priority
|
||||
|
||||
The returned signs in a buffer are ordered by their line
|
||||
number and priority.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Feb 04
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -513,6 +513,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
|
||||
'nocompatible': use Vim defaults
|
||||
- no |gvimrc| script is loaded
|
||||
- no viminfo file is read or written
|
||||
Note that a following "-u" argument overrules the effect of
|
||||
"-u DEFAULTS".
|
||||
|
||||
*-x*
|
||||
-x Use encryption to read/write files. Will prompt for a key,
|
||||
@ -994,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: 2020 Dec 17
|
||||
|
||||
|
||||
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
|
||||
@ -3006,7 +3006,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 +3183,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 +3200,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 +3424,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 +5323,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*
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*tabpage.txt* For Vim version 8.2. Last change: 2020 Aug 10
|
||||
*tabpage.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -195,8 +195,8 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>*
|
||||
:+2tabnext " go to the two next tab page
|
||||
:1tabnext " go to the first tab page
|
||||
:$tabnext " go to the last tab page
|
||||
:tabnext # " go to the last accessed tab page
|
||||
:tabnext $ " as above
|
||||
:tabnext # " go to the last accessed tab page
|
||||
:tabnext - " go to the previous tab page
|
||||
:tabnext -1 " as above
|
||||
:tabnext + " go to the next tab page
|
||||
@ -225,7 +225,7 @@ gT Go to the previous tab page. Wraps around from the first one
|
||||
*:tabl* *:tablast*
|
||||
:tabl[ast] Go to the last tab page.
|
||||
|
||||
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
|
||||
*g<Tab>* *CTRL-W_g<Tab>* *<C-Tab>*
|
||||
g<Tab> Go to the last accessed tab page.
|
||||
|
||||
Other commands:
|
||||
@ -259,7 +259,7 @@ REORDERING TAB PAGES:
|
||||
:tabmove " move the tab page to the last
|
||||
:$tabmove " as above
|
||||
:tabmove $ " as above
|
||||
:tabmove # " move the tab page after the last accessed
|
||||
:tabmove # " move the tab page after the last accessed
|
||||
" tab page
|
||||
|
||||
:tabm[ove] +[N]
|
||||
|
@ -2072,6 +2072,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 +2130,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*
|
||||
@ -2447,6 +2453,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:filter various.txt /*:filter*
|
||||
:fin editing.txt /*:fin*
|
||||
:fina eval.txt /*:fina*
|
||||
:final vim9.txt /*:final*
|
||||
:finally eval.txt /*:finally*
|
||||
:find editing.txt /*:find*
|
||||
:fini repeat.txt /*:fini*
|
||||
@ -2723,6 +2730,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*
|
||||
@ -3371,6 +3379,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:up editing.txt /*:up*
|
||||
:update editing.txt /*:update*
|
||||
:v repeat.txt /*:v*
|
||||
:var vim9.txt /*:var*
|
||||
:ve various.txt /*:ve*
|
||||
:ver various.txt /*:ver*
|
||||
:verb various.txt /*:verb*
|
||||
@ -3385,8 +3394,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*
|
||||
@ -3504,6 +3513,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>*
|
||||
@ -3689,6 +3699,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
>where repeat.txt /*>where*
|
||||
? pattern.txt /*?*
|
||||
?<CR> pattern.txt /*?<CR>*
|
||||
?? eval.txt /*??*
|
||||
@ repeat.txt /*@*
|
||||
@/ change.txt /*@\/*
|
||||
@: repeat.txt /*@:*
|
||||
@ -3920,6 +3931,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*
|
||||
@ -4375,7 +4389,6 @@ E538 options.txt /*E538*
|
||||
E539 options.txt /*E539*
|
||||
E54 pattern.txt /*E54*
|
||||
E540 options.txt /*E540*
|
||||
E541 options.txt /*E541*
|
||||
E542 options.txt /*E542*
|
||||
E543 options.txt /*E543*
|
||||
E544 options.txt /*E544*
|
||||
@ -4929,6 +4942,7 @@ InsertChange autocmd.txt /*InsertChange*
|
||||
InsertCharPre autocmd.txt /*InsertCharPre*
|
||||
InsertEnter autocmd.txt /*InsertEnter*
|
||||
InsertLeave autocmd.txt /*InsertLeave*
|
||||
InsertLeavePre autocmd.txt /*InsertLeavePre*
|
||||
Integer eval.txt /*Integer*
|
||||
J change.txt /*J*
|
||||
Japanese mbyte.txt /*Japanese*
|
||||
@ -5142,10 +5156,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*
|
||||
@ -5551,6 +5569,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>*
|
||||
@ -5736,6 +5758,7 @@ characterwise-visual visual.txt /*characterwise-visual*
|
||||
charclass() eval.txt /*charclass()*
|
||||
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*
|
||||
@ -6246,6 +6269,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*
|
||||
@ -6328,6 +6352,8 @@ extensions-improvements todo.txt /*extensions-improvements*
|
||||
f motion.txt /*f*
|
||||
false vim9.txt /*false*
|
||||
false-variable eval.txt /*false-variable*
|
||||
falsy eval.txt /*falsy*
|
||||
falsy-operator eval.txt /*falsy-operator*
|
||||
faq intro.txt /*faq*
|
||||
farsi farsi.txt /*farsi*
|
||||
farsi.txt farsi.txt /*farsi.txt*
|
||||
@ -6461,6 +6487,7 @@ ft-asm68k-syntax syntax.txt /*ft-asm68k-syntax*
|
||||
ft-asmh8300-syntax syntax.txt /*ft-asmh8300-syntax*
|
||||
ft-aspperl-syntax syntax.txt /*ft-aspperl-syntax*
|
||||
ft-aspvbs-syntax syntax.txt /*ft-aspvbs-syntax*
|
||||
ft-awk-plugin filetype.txt /*ft-awk-plugin*
|
||||
ft-bash-syntax syntax.txt /*ft-bash-syntax*
|
||||
ft-basic-syntax syntax.txt /*ft-basic-syntax*
|
||||
ft-c-omni insert.txt /*ft-c-omni*
|
||||
@ -6543,7 +6570,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*
|
||||
@ -6850,6 +6877,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*
|
||||
@ -7130,6 +7158,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*
|
||||
@ -7739,6 +7768,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()*
|
||||
@ -7756,6 +7786,7 @@ matcharg() eval.txt /*matcharg()*
|
||||
matchdelete() eval.txt /*matchdelete()*
|
||||
matchend() eval.txt /*matchend()*
|
||||
matchfuzzy() eval.txt /*matchfuzzy()*
|
||||
matchfuzzypos() eval.txt /*matchfuzzypos()*
|
||||
matchit-install usr_05.txt /*matchit-install*
|
||||
matchlist() eval.txt /*matchlist()*
|
||||
matchparen pi_paren.txt /*matchparen*
|
||||
@ -9160,8 +9191,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*
|
||||
@ -9596,6 +9629,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*
|
||||
@ -9649,10 +9683,12 @@ tooltips gui.txt /*tooltips*
|
||||
toupper() eval.txt /*toupper()*
|
||||
tr() eval.txt /*tr()*
|
||||
trim() eval.txt /*trim()*
|
||||
trinary eval.txt /*trinary*
|
||||
trojan-horse starting.txt /*trojan-horse*
|
||||
true vim9.txt /*true*
|
||||
true-variable eval.txt /*true-variable*
|
||||
trunc() eval.txt /*trunc()*
|
||||
truthy eval.txt /*truthy*
|
||||
try-conditionals eval.txt /*try-conditionals*
|
||||
try-echoerr eval.txt /*try-echoerr*
|
||||
try-finally eval.txt /*try-finally*
|
||||
@ -9771,6 +9807,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*
|
||||
@ -10040,11 +10077,13 @@ vim9-declaration vim9.txt /*vim9-declaration*
|
||||
vim9-declarations usr_46.txt /*vim9-declarations*
|
||||
vim9-differences vim9.txt /*vim9-differences*
|
||||
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.txt vim9.txt /*vim9.txt*
|
||||
|
@ -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: 2020 Dec 29
|
||||
|
||||
|
||||
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
|
||||
|
@ -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: 2020 Dec 28
|
||||
|
||||
|
||||
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
|
||||
@ -1411,16 +1418,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 @@
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Mar 05
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -101,7 +101,7 @@ Manipulating text property types:
|
||||
prop_type_add({name}, {props}) define a new property type
|
||||
prop_type_change({name}, {props}) change an existing property type
|
||||
prop_type_delete({name} [, {props}]) delete a property type
|
||||
prop_type_get([{name} [, {props}]]) get property type values
|
||||
prop_type_get({name} [, {props}]) get property type values
|
||||
prop_type_list([{props}]) get list of property types
|
||||
|
||||
|
||||
@ -291,7 +291,7 @@ prop_type_delete({name} [, {props}]) *prop_type_delete()*
|
||||
Can also be used as a |method|: >
|
||||
GetPropName()->prop_type_delete()
|
||||
|
||||
prop_type_get([{name} [, {props}]]) *prop_type_get()*
|
||||
prop_type_get({name} [, {props}]) *prop_type_get()*
|
||||
Returns the properties of property type {name}. This is a
|
||||
dictionary with the same fields as was given to
|
||||
prop_type_add().
|
||||
|
@ -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 Sep 19
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -38,103 +38,86 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Why does Test_invalid_sid() not work in the GUI?
|
||||
Reload: How to make sure type of script function hasn't changed?
|
||||
|
||||
Add matchfuzzy() and matchfuzzypos() Yegappan, #6947
|
||||
should be ready now
|
||||
Valgrind: test_vim9_cmd: uses uninitialized var
|
||||
|
||||
Making everything work:
|
||||
- Fix memory leak in test_vim9_func (through compile_nested_function and
|
||||
get_lambda_tv())
|
||||
- Fix memory leaks in test_vim9_script
|
||||
- At the Vim9 script level, keep script variables local to the block they are
|
||||
declared in, like in Javascript (using :let).
|
||||
-> Need to remember what variables were declared and delete them when
|
||||
leaving the block.
|
||||
-> if a function is defined it may need to keep the block-locals
|
||||
Then Implement { } block at the script level.
|
||||
- Recognize call to assert_fails() and execute it in the function context?
|
||||
Won't work if the command itself fails, not an expression failure:
|
||||
assert_fails("unknown", "E99:")
|
||||
Use try/catch is complicated:
|
||||
let did_catch = false
|
||||
try
|
||||
unknown
|
||||
catch
|
||||
assert_caught('E99:')
|
||||
did_catch = true
|
||||
endtry
|
||||
assert_true('did_catch')
|
||||
Add a new command,
|
||||
assertfail
|
||||
unknown
|
||||
endassertfail E99:.*unknown
|
||||
- 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'
|
||||
- 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
|
||||
- ":put" with ISN_PUT does not handle range correctly, e.g. ":$-2put".
|
||||
Add command to parse range at runtime?
|
||||
- Make map() give an error if the resulting type is wrong.
|
||||
Add mapnew() to create a new List/Dict for the result, which can have a
|
||||
different value type.
|
||||
- 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)
|
||||
Vim9 - Make everything work:
|
||||
- Implement "export {one, two three}".
|
||||
- Use "null" for v:null, like true and false? #7495
|
||||
- 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:
|
||||
let p = function('NoSuchFunc')
|
||||
- Give runtime error if function argument is wrong.
|
||||
def Increment(nr: number)
|
||||
range(3)->Increment()
|
||||
- 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:
|
||||
let Ref = (arg: type): type => {
|
||||
statement
|
||||
return expr
|
||||
}
|
||||
let Ref = (arg: type) => {
|
||||
statement
|
||||
statement
|
||||
}
|
||||
- implement { cmd } compiled
|
||||
- implement { cmd } at script level
|
||||
- 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)
|
||||
- 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)
|
||||
- Make map() give an error if the resulting type of the first argument is
|
||||
wrong. Only works if the type is known? Is this slow (need to go over all
|
||||
items)?
|
||||
- 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:
|
||||
let ret: dict<string> = #{}
|
||||
ret[i] = string(i)
|
||||
- Appending to dict item doesn't work:
|
||||
let 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:
|
||||
has('asdf'), len('string')
|
||||
- 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 "++nr" work. "++g:count" doesn't work, thinks it is a range.
|
||||
- Make closures work:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- nested closure only uses one context, not all (#7150)
|
||||
- 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".
|
||||
- Implement command modifiers, such as "silent". (#6530)
|
||||
New syntax and functionality:
|
||||
Improve error checking:
|
||||
- "echo Func()" is an error if Func() does not return anything.
|
||||
Before launch:
|
||||
- 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 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.
|
||||
@ -146,35 +129,40 @@ Also:
|
||||
- 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.
|
||||
- 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.
|
||||
- implement :type
|
||||
- import type declaration?
|
||||
- Future work: See |vim9-classes|
|
||||
- implement enum
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varags idx)
|
||||
LOADVARARG (varargs 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.
|
||||
Once Vim9 is stable:
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
Further improvements:
|
||||
- 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
|
||||
- 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()?
|
||||
|
||||
Popup windows:
|
||||
- Cursor not updated before a redraw, making it jump. (#5943)
|
||||
- Add a flag to make a popup window focusable?
|
||||
CTRL-W P cycle over any preview window or focusable popup, end up back in
|
||||
current window.
|
||||
? - switch between current window and all popup windows
|
||||
Esc in popup window goes back to previous current window
|
||||
- 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.?
|
||||
@ -204,6 +192,8 @@ Text properties:
|
||||
- "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:
|
||||
@ -238,6 +228,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".
|
||||
@ -282,18 +273,35 @@ Terminal emulator window:
|
||||
|
||||
Error numbers available: E653
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally written by Felipe Morales.
|
||||
|
||||
Patch to find Python dll using registry key. (#7540)
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
Patch to use collation based sorting. (Christian Brabandt, #6229)
|
||||
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
|
||||
|
||||
Patch for blockwise paste reporting changes: #6660.
|
||||
|
||||
Missing filetype test for bashrc, PKGBUILD, etc.
|
||||
|
||||
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
|
||||
changes.
|
||||
|
||||
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
|
||||
|
||||
Expanding <mods> should put the tab number from cmdmod.tab before "tab".
|
||||
Any way to convert "$" back by using a special value? (#6901)
|
||||
|
||||
@ -322,15 +330,19 @@ autocommands for the buffer lifecycle:
|
||||
BufIsRenamed (after buffer ID gets another name)
|
||||
The buffer list and windows are locked, no changes possible
|
||||
|
||||
Make it possible to map (console and GUI): #6457
|
||||
<C-[> 0x27 or is this <Esc> ?
|
||||
<C-\> 0x28
|
||||
<C-]> 0x29
|
||||
<C-^> 0x30
|
||||
<C-_> 0x31
|
||||
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.
|
||||
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
Matchparen doesn't remove highlight after undo. (#7054)
|
||||
Is OK when syntax HL is active.
|
||||
|
||||
Currently Del can be used to delete the last character of a typed count.
|
||||
Can it also be used to delete an incomplete Normal mode command? (#7096)
|
||||
After an operator: should work. After "a" or "i" for text objects: should
|
||||
work.
|
||||
|
||||
Using "au!" after "filetype on" is a bit slow. Can the matching of
|
||||
autocommands be made faster? (#7056)
|
||||
|
||||
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
|
||||
replace this:
|
||||
@ -341,6 +353,10 @@ Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
|
||||
let res = GetLeftFunc() <=> GetRightFunc() ?< lower ?= equal ?> upper
|
||||
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)
|
||||
|
||||
@ -410,9 +426,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.
|
||||
@ -432,12 +445,8 @@ Patch to fix session file when using multiple tab pages. (Jason Franklin, 2019
|
||||
May 20)
|
||||
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 #4994: window-local options not always restored, related to using :badd.
|
||||
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)
|
||||
|
||||
@ -525,6 +534,7 @@ 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)
|
||||
|
||||
When getting a focus event halfway a mapping this aborts the mapping. E.g.
|
||||
when "qq" is mapped and after the first "q" the mouse is moved outside of the
|
||||
@ -571,10 +581,6 @@ 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.
|
||||
|
||||
":2resize +10" uses size of the current window, adds 10 and applies it to
|
||||
window 2. User expects 10 to be added to size of window 2. (Daniel Steinberg,
|
||||
#5443)
|
||||
|
||||
Would be nice to set tab-local values for 'diffexpr' and 'diffopt'. Use
|
||||
t:diffexpr_option t:diffopt_option? (#4782)
|
||||
|
||||
@ -664,6 +670,38 @@ 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.
|
||||
@ -770,6 +808,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
|
||||
@ -852,13 +891,6 @@ 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)
|
||||
@ -900,9 +932,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.
|
||||
@ -1064,7 +1093,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().
|
||||
|
||||
@ -1123,7 +1152,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. (lacygolil) 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)
|
||||
@ -1230,10 +1259,6 @@ 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
|
||||
@ -1250,8 +1275,6 @@ GTK: When adding a timer from 'balloonexpr' it won't fire, because
|
||||
g_main_context_iteration() doesn't return. Need to trigger an event when the
|
||||
timer expires.
|
||||
|
||||
Screen update bug related to matchparen. (Chris Heath, 2017 Mar 4, #1532)
|
||||
|
||||
Rule to use "^" for statusline does not work if a space is defined with
|
||||
highlighting for both stl and stlnc. Patch by Ken Hamada (itchyny, 2016 Dec 11)
|
||||
|
||||
@ -1291,9 +1314,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)
|
||||
|
||||
@ -1351,6 +1371,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
|
||||
@ -1484,8 +1507,6 @@ Have a way to get the call stack, in a function and from an exception.
|
||||
Second problem in #966: ins_compl_add_tv() uses get_dict_string() multiple
|
||||
times, overwrites the one buffer. (Nikolay Pavlov, 2016 Aug 5)
|
||||
|
||||
Filetype plugin for awk. (Doug Kearns, 2016 Sep 5)
|
||||
|
||||
Patch to improve map documentation. Issue #799.
|
||||
|
||||
We can use '. to go to the last change in the current buffer, but how about
|
||||
@ -1696,17 +1717,11 @@ 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)
|
||||
OK to not block marks?
|
||||
|
||||
Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
|
||||
Patch on Issue 72: 'autochdir' causes problems for :vimgrep.
|
||||
|
||||
When two SIGWINCH arrive very quickly, the second one may be lost.
|
||||
@ -1773,14 +1788,6 @@ arguments.
|
||||
|
||||
Problem with transparent and matchgroup. Issue #475
|
||||
|
||||
Spell files use a latin single quote. Unicode also has another single quote:
|
||||
0x2019. (Ron Aaron, 2014 Apr 4)
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be downloaded.
|
||||
|
||||
Spell checking: Add a feature to only consider two spaces after a dot to start
|
||||
a new sentence. Don't give the capitalization error when there is one space.
|
||||
|
||||
Idea: For a window in the middle (has window above and below it), use
|
||||
right-mouse-drag on the status line to move a window up/down without changing
|
||||
its height? It's like dragging the status bar above it at the same time.
|
||||
@ -1838,9 +1845,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?
|
||||
|
||||
@ -2308,7 +2312,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)
|
||||
@ -2455,9 +2459,6 @@ Don't load macmap.vim on startup, turn it into a plugin. (Ron Aaron,
|
||||
|
||||
Add "no_hlsearch" to winsaveview().
|
||||
|
||||
Cursorline highlighting combines with Search ('hlsearch') but not with
|
||||
SpellBad. (Jim Karsten, 2009 Mar 18)
|
||||
|
||||
When 'foldmethod' is "indent", adding an empty line below a fold and then
|
||||
indented text, creates a new fold instead of joining it with the previous one.
|
||||
(Evan Laforge, 2009 Oct 17)
|
||||
@ -2492,9 +2493,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)
|
||||
|
||||
@ -2554,11 +2552,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.
|
||||
@ -2755,9 +2748,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.
|
||||
|
||||
@ -2964,12 +2954,6 @@ the Visual area. Can this be fixed? (James Vega, 2006 Sept 15)
|
||||
|
||||
GUI: When combining fg en bg make sure they are not equal.
|
||||
|
||||
Spell checking: Add a way to specify punctuation characters. Add the
|
||||
superscript numbers by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079.
|
||||
|
||||
Spell checking in popup menu: If the only problem is the case of the first
|
||||
character, don't offer "ignore" and "add to word list".
|
||||
|
||||
Use different pt_br dictionary for spell checking. (Jackson A. Aquino, 2006
|
||||
Jun 5)
|
||||
|
||||
@ -2983,10 +2967,6 @@ Jul 22)
|
||||
|
||||
There should be something about spell checking in the user manual.
|
||||
|
||||
Spell menu: When using the Popup menu to select a replacement word,
|
||||
":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use "z="
|
||||
somehow? Or use a new function.
|
||||
|
||||
Mac: Using gvim: netrw window disappears. (Nick Lo, 2006 Jun 21)
|
||||
|
||||
Add an option to specify the character to use when a double-width character is
|
||||
@ -3270,6 +3250,29 @@ Better 'rightleft' or BIDI support:
|
||||
- Minimal Vi with bidi support: https://github.com/aligrudi/neatvi
|
||||
By Ali Gholami Rudi, also worked on arabic.c
|
||||
|
||||
|
||||
Spell checking:
|
||||
- When 'cursorline' is set and the first word should have SpellCap
|
||||
highlighting, redrawing the line removes it when moving the cursor away
|
||||
from the line. (#7085) Would need to inspect the end of the previous line
|
||||
and update "capcol_lnum" and "cap_col".
|
||||
- Mixup of highlighting when there is a match and SpellBad. (ZyX, 2015 Jan 1)
|
||||
- Spell files use a latin single quote. Unicode also has another single
|
||||
quote: 0x2019. (Ron Aaron, 2014 Apr 4)
|
||||
New OpenOffice spell files support this with ICONV. But they are not
|
||||
compatible with Vim spell files. The old files can no longer be
|
||||
downloaded.
|
||||
- Add a feature to only consider two spaces after a dot to start a new
|
||||
sentence. Don't give the capitalization error when there is one space.
|
||||
- Add a way to specify punctuation characters. Add the superscript numbers
|
||||
by default: 0x2070, 0xb9, 0xb2, 0xb3, 0x2074 - 0x2079.
|
||||
- In popup menu: If the only problem is the case of the first character,
|
||||
don't offer "ignore" and "add to word list".
|
||||
- Spell menu: When using the Popup menu to select a replacement word,
|
||||
":spellrepeat" doesn't work. SpellReplace() uses setline(). Can it use
|
||||
"z=" somehow? Or use a new function.
|
||||
|
||||
|
||||
Quickfix/Location List:
|
||||
- Window size is wrong when using quickfix window. (Lifepillar, 2018 Aug 24,
|
||||
#2999)
|
||||
@ -3838,10 +3841,6 @@ Macintosh:
|
||||
on the status line (caused by 'winheight'). Select window on button up,
|
||||
instead of on button down.
|
||||
8 Dragging the status line doesn't scroll but redraw.
|
||||
9 Evaluating 'statusline' in build_stl_str_hl() does not properly check for
|
||||
reaching the end of the available buffer.
|
||||
Patch to dynamically allocate the buffer for % items. (Eric Arnold, 2006
|
||||
May 14)
|
||||
8 When performing incremental search, should abort searching as soon as a
|
||||
character is typed.
|
||||
8 When the value of $MAKE contains a path, configure can't handle this.
|
||||
@ -4019,8 +4018,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.
|
||||
@ -5938,7 +5935,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: 2019 Dec 07
|
||||
*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
|
||||
@ -392,7 +392,7 @@ back the text of three deletes ago with '"3P'.
|
||||
*redo-register*
|
||||
If you want to get back more than one part of deleted text, you can use a
|
||||
special feature of the repeat command ".". It will increase the number of the
|
||||
register used. So if you first do ""1P", the following "." will result in a
|
||||
register used. So if you first do '"1P', the following "." will result in a
|
||||
'"2P'. Repeating this will result in all numbered registers being inserted.
|
||||
|
||||
Example: If you deleted text with 'dd....' it can be restored with
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_11.txt* For Vim version 8.2. Last change: 2020 Jul 08
|
||||
*usr_11.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -294,7 +294,7 @@ If you really don't want to see this message, you can add the 'A' flag to the
|
||||
'shortmess' option. But it's very unusual that you need this.
|
||||
|
||||
For remarks about encryption and the swap file, see |:recover-crypt|.
|
||||
For programatic access to the swap file, see |swapinfo()|.
|
||||
For programmatic access to the swap file, see |swapinfo()|.
|
||||
|
||||
==============================================================================
|
||||
*11.4* Further reading
|
||||
|
@ -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: 2020 Dec 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -625,6 +625,7 @@ String manipulation: *string-functions*
|
||||
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
|
||||
@ -644,6 +645,7 @@ List manipulation: *list-functions*
|
||||
deepcopy() make a full copy of a List
|
||||
filter() remove selected items from a List
|
||||
map() change each List item
|
||||
mapnew() make a new List with changed items
|
||||
reduce() reduce a List to a value
|
||||
sort() sort a List
|
||||
reverse() reverse the order of a List
|
||||
@ -669,6 +671,7 @@ Dictionary manipulation: *dict-functions*
|
||||
extend() add entries from one Dictionary to another
|
||||
filter() remove selected entries from a Dictionary
|
||||
map() change each Dictionary entry
|
||||
mapnew() make a new Dictionary with changed items
|
||||
keys() get List of Dictionary keys
|
||||
values() get List of Dictionary values
|
||||
items() get List of Dictionary key-value pairs
|
||||
@ -1763,7 +1766,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: 2020 Nov 16
|
||||
|
||||
|
||||
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.
|
||||
|
||||
*:=*
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*version7.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -10260,7 +10260,7 @@ Commands:
|
||||
Brabandt)
|
||||
|
||||
Other:
|
||||
Lua interface now also uses userdata binded to Vim structures. (Taro
|
||||
Lua interface now also uses userdata bound to Vim structures. (Taro
|
||||
Muraoka, Luis Carvalho)
|
||||
|
||||
glob() and autocommand patterns used to work with the undocumented
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*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
|
||||
@ -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
|
||||
@ -47698,7 +47698,7 @@ Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
Patch 8.2.1064
|
||||
Problem: Vim9: no line break allowed before comparators.
|
||||
Solution: Check for comperator after line break.
|
||||
Solution: Check for comparator after line break.
|
||||
Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
Patch 8.2.1065
|
||||
@ -48515,7 +48515,7 @@ Solution: Recognize true and false.
|
||||
Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
Patch 8.2.1205
|
||||
Problem: Vim9: && and || work different when not compiled.
|
||||
Problem: Vim9: && and || work differently when not compiled.
|
||||
Solution: Keep the value.
|
||||
Files: src/eval.c, src/testdir/test_vim9_expr.vim
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -459,6 +459,9 @@ Use {name} as the server name. Used for the current Vim, unless used with a
|
||||
\-\-socketid {id}
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
|
||||
.TP
|
||||
\-\-startuptime {file}
|
||||
During startup write timing messages to the file {fname}.
|
||||
.TP
|
||||
\-\-version
|
||||
Print version information and exit.
|
||||
.SH ON-LINE HELP
|
||||
|
@ -345,6 +345,9 @@ OPTIONS
|
||||
GTK GUI only: Use the GtkPlug mechanism to run gvim in an‐
|
||||
other window.
|
||||
|
||||
--startuptime {file}
|
||||
During startup write timing messages to the file {fname}.
|
||||
|
||||
--version Print version information and exit.
|
||||
|
||||
ON-LINE HELP
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2020 Sep 26
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 03
|
||||
|
||||
|
||||
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
|
||||
|
||||
@ -65,6 +65,35 @@ rewrite old scripts, they keep working as before. You may want to use a few
|
||||
|
||||
THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
|
||||
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
|
||||
- Using a backslash for line continuation is hardly ever needed: >
|
||||
echo "hello "
|
||||
.. yourName
|
||||
.. ", how are you?"
|
||||
- White space is required in many places.
|
||||
- Assign values without `:let`, declare variables with `:var`: >
|
||||
var count = 0
|
||||
count += 3
|
||||
- Constants can be declared with `:final` and `:const`: >
|
||||
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')
|
||||
- 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
|
||||
|
||||
|
||||
Comments starting with # ~
|
||||
|
||||
In legacy Vim script comments start with double quote. In Vim9 script
|
||||
@ -83,8 +112,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 ~
|
||||
@ -95,8 +129,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.
|
||||
@ -104,8 +138,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
|
||||
@ -125,25 +160,30 @@ Functions and variables are script-local by default ~
|
||||
*vim9-scopes*
|
||||
When using `:function` or `:def` to specify a new function at the script level
|
||||
in a Vim9 script, the function is local to the script, as if "s:" was
|
||||
prefixed. Using the "s:" prefix is optional. To define or use a global
|
||||
function or variable the "g:" prefix should be used. For functions in an
|
||||
autoload script the "name#" prefix is sufficient. >
|
||||
prefixed. Using the "s:" prefix is optional. To define a global function or
|
||||
variable the "g:" prefix must be used. For functions in an autoload script
|
||||
the "name#" prefix is sufficient. >
|
||||
def ThisFunction() # script-local
|
||||
def s:ThisFunction() # script-local
|
||||
def g:ThatFunction() # global
|
||||
def ThatFunction() # global if no local ThatFunction()
|
||||
def scriptname#function() # autoload
|
||||
|
||||
When using `:function` or `:def` to specify a new function inside a function,
|
||||
the function is local to the function. It is not possible to define a
|
||||
script-local function inside a function. It is possible to define a global
|
||||
function, using the "g:" prefix.
|
||||
When using `:function` or `:def` to specify a nested function inside a `:def`
|
||||
function, this nested function is local to the code block it is defined in.
|
||||
In a `:def` function it is not possible to define a script-local function. It
|
||||
is possible to define a global function by using the "g:" prefix.
|
||||
|
||||
When referring to a function and no "s:" or "g:" prefix is used, Vim will
|
||||
prefer using a local function (in the function scope, script scope or
|
||||
imported) before looking for a global function.
|
||||
search for the function:
|
||||
- in the function scope, in block scopes
|
||||
- in the script scope, possibly imported
|
||||
- in the list of global functions
|
||||
However, it is recommended to always use "g:" to refer to a global function
|
||||
for clarity.
|
||||
|
||||
In all cases the function must be defined before used. That is when it is
|
||||
first called or when `:defcompile` causes the call to be compiled.
|
||||
called, when `:defcompile` causes it to be compiled, or when code that calls
|
||||
it is being compiled (to figure out the return type).
|
||||
|
||||
The result is that functions and variables without a namespace can usually be
|
||||
found in the script, either defined there or imported. Global functions and
|
||||
@ -153,9 +193,36 @@ 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*
|
||||
*vim9-declaration* *:var*
|
||||
Local variables need to be declared with `:var`. Local constants need to be
|
||||
declared with `:final` or `:const`. We refer to both as "variables" in this
|
||||
section.
|
||||
@ -232,7 +299,7 @@ Example: >
|
||||
myList = [3, 4] # Error!
|
||||
myList[0] = 9 # Error!
|
||||
muList->add(3) # Error!
|
||||
|
||||
< *:final*
|
||||
`:final` is used for making only the variable a constant, the value can be
|
||||
changed. This is well known from Java. Example: >
|
||||
final myList = [1, 2]
|
||||
@ -269,8 +336,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()
|
||||
@ -302,17 +368,55 @@ 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
|
||||
|
||||
To avoid the "{" of a dictionary literal to be recognized as a statement block
|
||||
wrap it in parenthesis: >
|
||||
var Lambda = (arg) => ({key: 42})
|
||||
|
||||
|
||||
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,
|
||||
}
|
||||
@ -343,6 +447,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
|
||||
@ -356,6 +466,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(
|
||||
@ -363,6 +476,16 @@ 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.
|
||||
|
||||
|
||||
Notes:
|
||||
- "enddef" cannot be used at the start of a continuation line, it ends the
|
||||
current function.
|
||||
@ -382,20 +505,39 @@ 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: >
|
||||
let 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: >
|
||||
let dict = {'key with space': value}
|
||||
let dict = {"key\twith\ttabs": value}
|
||||
let dict = {'': value} # empty key
|
||||
|
||||
In case the key needs to be an expression, square brackets can be used, just
|
||||
like in JavaScript: >
|
||||
let dict = {["key" .. nr]: value}
|
||||
|
||||
|
||||
No :xit, :t, :append, :change or :insert ~
|
||||
|
||||
These commands are too easily confused with local variable names.
|
||||
@ -423,6 +565,13 @@ 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!
|
||||
@ -438,16 +587,22 @@ White space is not allowed:
|
||||
|
||||
Conditions and expressions ~
|
||||
|
||||
Conditions and expressions are mostly working like they do in JavaScript. A
|
||||
difference is made where JavaScript does not work like most people expect.
|
||||
Specifically, an empty list is falsy.
|
||||
Conditions and expressions are mostly working like they do in other languages.
|
||||
Some values are different from legacy Vim script:
|
||||
value legacy Vim script Vim9 script ~
|
||||
0 falsy falsy
|
||||
1 truthy truthy
|
||||
99 truthy Error!
|
||||
"0" falsy Error!
|
||||
"99" truthy Error!
|
||||
"text" falsy Error!
|
||||
|
||||
Any type of variable can be used as a condition, there is no error, not even
|
||||
for using a list or job. This is very much like JavaScript, but there are a
|
||||
few exceptions.
|
||||
For the "??" operator and when using "!" then there is no error, every value
|
||||
is either falsy or truthy. This is mostly like JavaScript, except that an
|
||||
empty list and dict is falsy:
|
||||
|
||||
type TRUE when ~
|
||||
bool v:true or 1
|
||||
type truthy when ~
|
||||
bool true, v:true or 1
|
||||
number non-zero
|
||||
float non-zero
|
||||
string non-empty
|
||||
@ -455,30 +610,41 @@ few exceptions.
|
||||
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 "&&" do not change the value: >
|
||||
8 || 2 == 8
|
||||
0 || 2 == 2
|
||||
0 || '' == ''
|
||||
8 && 2 == 2
|
||||
0 && 2 == 0
|
||||
2 && 0 == 0
|
||||
[] && 2 == []
|
||||
The boolean operators "||" and "&&" expect the values to be boolean, zero or
|
||||
one: >
|
||||
1 || false == true
|
||||
0 || 1 == true
|
||||
0 || false == false
|
||||
1 && true == true
|
||||
0 && 1 == false
|
||||
8 || 0 Error!
|
||||
'yes' && 0 Error!
|
||||
[] || 99 Error!
|
||||
|
||||
When using `..` for string concatenation arguments of simple types are always
|
||||
converted to string. >
|
||||
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
|
||||
!![] == false
|
||||
!![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
|
||||
byte indexes. Example: >
|
||||
@ -549,6 +715,13 @@ command. This will give an error for missing `endif`: >
|
||||
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*
|
||||
@ -612,18 +785,24 @@ prefix and they do not need to exist (they can be deleted any time).
|
||||
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
|
||||
|
||||
==============================================================================
|
||||
|
||||
@ -718,12 +897,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
|
||||
@ -781,7 +962,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
|
||||
@ -853,7 +1034,7 @@ The script name after `import` can be:
|
||||
location of the script file itself. This is useful to split up a large
|
||||
plugin into several files.
|
||||
- An absolute path, starting with "/" on Unix or "D:/" on MS-Windows. This
|
||||
will be rarely used.
|
||||
will rarely be used.
|
||||
- A path not being relative or absolute. This will be found in the
|
||||
"import" subdirectories of 'runtimepath' entries. The name will usually be
|
||||
longer and unique, to avoid loading the wrong file.
|
||||
@ -1055,7 +1236,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
|
||||
@ -1092,7 +1273,7 @@ Two alternatives were considered:
|
||||
def Func(arg1 number, arg2 string) bool
|
||||
|
||||
The first is more familiar for anyone used to C or Java. The second one
|
||||
doesn't really has an advantage over the first, so let's discard the second.
|
||||
doesn't really have an advantage over the first, so let's discard the second.
|
||||
|
||||
Since we use type inference the type can be left out when it can be inferred
|
||||
from the value. This means that after `var` we don't know if a type or a name
|
||||
@ -1107,19 +1288,35 @@ declaration.
|
||||
|
||||
Expressions ~
|
||||
|
||||
Expression evaluation was already close to what JavaScript and other languages
|
||||
are doing. Some details are unexpected and can be fixed. For example how the
|
||||
|| and && operators work. Legacy Vim script: >
|
||||
var value = 44
|
||||
...
|
||||
var result = value || 0 # result == 1
|
||||
Expression evaluation was already close to what other languages are doing.
|
||||
Some details are unexpected and can be improved. For example a boolean
|
||||
condition would accept a string, convert it to a number and check if the
|
||||
number is non-zero. This is unexpected and often leads to mistakes, since
|
||||
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.
|
||||
|
||||
Vim9 script works like JavaScript/TypeScript, keep the value: >
|
||||
var value = 44
|
||||
...
|
||||
var result = value || 0 # result == 44
|
||||
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`
|
||||
false: `false`, `v:false`, `0`, `0 > 9`
|
||||
Note that the number zero is false and the number one is true. This is more
|
||||
permissive than most other languages. It was done because many builtin
|
||||
functions return these values.
|
||||
|
||||
TODO: the semantics of || and && need to be reconsidered.
|
||||
If you have any type of value and want to use it as a boolean, use the `!!`
|
||||
operator:
|
||||
true: !`!'text'`, `!![99]`, `!!{'x': 1}`, `!!99`
|
||||
false: `!!''`, `!![]`, `!!{}`
|
||||
|
||||
From a language like JavaScript we have this handy construct: >
|
||||
GetName() || 'unknown'
|
||||
However, this conflicts with only allowing a boolean for a condition.
|
||||
Therefore the "??" operator was added: >
|
||||
GetName() ?? 'unknown'
|
||||
Here you can explicitly express your intention to use the value as-is and not
|
||||
result in a boolean. This is called the |falsy-operator|.
|
||||
|
||||
|
||||
Import and Export ~
|
||||
|
@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Sep 02
|
||||
*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.
|
||||
|
||||
@ -1119,6 +1119,11 @@ list of buffers. |unlisted-buffer|
|
||||
line when the buffer is first entered. Note that other
|
||||
commands after the + will be ignored.
|
||||
|
||||
*:balt*
|
||||
:balt [+lnum] {fname}
|
||||
Like `:badd` and also set the alternate file for the current
|
||||
window to {fname}.
|
||||
|
||||
:[N]bd[elete][!] *:bd* *:bdel* *:bdelete* *E516*
|
||||
:bd[elete][!] [N]
|
||||
Unload buffer [N] (default: current buffer) and delete it from
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Aug 04
|
||||
" Last Change: 2020 Dec 24
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@ -317,7 +317,7 @@ au BufNewFile,BufRead *.css setf css
|
||||
au BufNewFile,BufRead *.con setf cterm
|
||||
|
||||
" Changelog
|
||||
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch
|
||||
au BufNewFile,BufRead changelog.Debian,changelog.dch,NEWS.Debian,NEWS.dch,*/debian/changelog
|
||||
\ setf debchangelog
|
||||
|
||||
au BufNewFile,BufRead [cC]hange[lL]og
|
||||
@ -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
|
||||
|
||||
@ -627,6 +630,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 +702,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 +1128,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 +1137,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
|
||||
|
||||
@ -1203,7 +1215,7 @@ au BufNewFile,BufRead *.pod6 setf pod6
|
||||
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp setf php
|
||||
|
||||
" PHP config
|
||||
au BufNewFile,BufRead php.ini,php.ini-* setf dosini
|
||||
au BufNewFile,BufRead php.ini-* setf dosini
|
||||
|
||||
" Pike and Cmod
|
||||
au BufNewFile,BufRead *.pike,*.pmod setf pike
|
||||
@ -1305,6 +1317,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
|
||||
@ -1342,13 +1355,6 @@ au BufNewFile,BufRead *.rego setf rego
|
||||
" Rexx
|
||||
au BufNewFile,BufRead *.rex,*.orx,*.rxo,*.rxj,*.jrexx,*.rexxj,*.rexx,*.testGroup,*.testUnit setf rexx
|
||||
|
||||
" R (Splus)
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.s,*.S setf r
|
||||
else
|
||||
au BufNewFile,BufRead *.s setf r
|
||||
endif
|
||||
|
||||
" R Help file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.rd,*.Rd setf rhelp
|
||||
@ -1513,9 +1519,10 @@ au BufNewFile,BufRead *.decl,*.dcl,*.dec
|
||||
au BufNewFile,BufRead catalog setf catalog
|
||||
|
||||
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
|
||||
" Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
|
||||
" Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
|
||||
" bash scripts.
|
||||
" NOTE: Patterns ending in a star are further down, these have lower priority.
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))
|
||||
|
||||
@ -1546,6 +1553,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
|
||||
|
||||
@ -1727,7 +1737,7 @@ au BufNewFile,BufRead *.latex,*.sty,*.dtx,*.ltx,*.bbl setf tex
|
||||
au BufNewFile,BufRead *.tex call dist#ft#FTtex()
|
||||
|
||||
" ConTeXt
|
||||
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi setf context
|
||||
au BufNewFile,BufRead *.mkii,*.mkiv,*.mkvi,*.mkxl,*.mklx setf context
|
||||
|
||||
" Texinfo
|
||||
au BufNewFile,BufRead *.texinfo,*.texi,*.txi setf texinfo
|
||||
@ -1744,6 +1754,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
|
||||
|
||||
@ -1765,8 +1778,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
|
||||
@ -2042,12 +2060,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.*
|
||||
@ -2170,7 +2190,7 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||
|
||||
" Shell scripts ending in a star
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
|
||||
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
" Vim filetype plugin
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2017 Feb 17
|
||||
" Language: awk, nawk, gawk, mawk
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Antonio Colombo <azc100@gmail.com>
|
||||
" Last Change: 2020 Sep 28
|
||||
|
||||
" This plugin was prepared by Mark Sikora
|
||||
" This plugin was updated as proposed by Doug Kearns
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -13,6 +15,42 @@ endif
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring<"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
setlocal define=function
|
||||
setlocal suffixesadd+=.awk
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms< def< sua<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
" TODO: set this in scripts.vim?
|
||||
if exists("g:awk_is_gawk")
|
||||
setlocal include=@include
|
||||
setlocal suffixesadd+=.gawk
|
||||
if has("unix") || has("win32unix")
|
||||
setlocal formatprg=gawk\ -f-\ -o/dev/stdout
|
||||
let b:undo_ftplugin .= " | setl fp<"
|
||||
endif
|
||||
|
||||
let path = system("gawk 'BEGIN { printf ENVIRON[\"AWKPATH\"] }'")
|
||||
let path = substitute(path, '^\.\=:\|:\.\=$\|:\.\=:', ',,', 'g') " POSIX cwd
|
||||
let path = substitute(path, ':', ',', 'g')
|
||||
|
||||
let &l:path = path
|
||||
let b:undo_ftplugin .= " | setl inc< path<"
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Awk Source Files (*.awk,*.gawk)\t*.awk;*.gawk\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
||||
|
@ -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,7 +1,7 @@
|
||||
" Vim ftplugin file
|
||||
" Language: Erlang
|
||||
" Author: Oscar Hellstr<EFBFBD>m <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jim<EFBFBD>nez <jimenezrick@gmail.com>
|
||||
" Author: Oscar Hellström <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
" Eduardo Lopez (http://github.com/tapichu)
|
||||
" License: Vim license
|
||||
" Version: 2012/01/25
|
||||
|
@ -3,6 +3,7 @@
|
||||
" Author: Steven Oliver <oliver.steven@gmail.com>
|
||||
" Copyright: Copyright (c) 2009-2013 Steven Oliver
|
||||
" License: You may redistribute this under the same terms as Vim itself
|
||||
" Last Update: 2020 Oct 10
|
||||
" --------------------------------------------------------------------------
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
@ -14,7 +15,7 @@ let b:did_ftplugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal softtabstop=4 shiftwidth=4 fileencoding=utf-8
|
||||
setlocal softtabstop=4 shiftwidth=4
|
||||
setlocal suffixesadd=.fal,.ftd
|
||||
|
||||
" Matchit support
|
||||
|
@ -1,13 +1,13 @@
|
||||
" Vim settings file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
||||
" Version: 0.50
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v52) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-plugin from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made by Stefano Zacchiroli, Hendrik Merx, Ben
|
||||
" Fritz, and David Barnett.
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Stefano Zacchiroli, Hendrik Merx, Ben Fritz, David Barnett, Eisuke Kawashima,
|
||||
" and Doug Kearns.
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -119,7 +119,7 @@ if !exists("b:match_words")
|
||||
endif
|
||||
|
||||
" File filters for :browse e
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Fortran Files (*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn)\t*.f;*.for;*.f77;*.f90;*.f95;*.f03;*.f08;*.fpp;*.ftn\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
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: 2020 Dec 29
|
||||
" 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
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Make
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Apr 02
|
||||
" Last Change: 2020 Oct 16
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -9,10 +9,10 @@ if exists("b:did_ftplugin")
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<"
|
||||
let b:undo_ftplugin = "setl et< sts< sw< fo< com< cms< inc<"
|
||||
|
||||
" Make sure a hard tab is used, required for most make programs
|
||||
setlocal noexpandtab softtabstop=0
|
||||
setlocal noexpandtab softtabstop=0 shiftwidth=0
|
||||
|
||||
" Set 'formatoptions' to break comment lines but not other lines,
|
||||
" and insert the comment leader when hitting <CR> or using "o".
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: man
|
||||
" Maintainer: Jason Franklin <vim@justemail.net>
|
||||
" Maintainer: SungHyun Nam <goweol@gmail.com>
|
||||
" Last Change: 2020 Jun 01
|
||||
" Last Change: 2020 Oct 09
|
||||
|
||||
" To make the ":Man" command available before editing a manual page, source
|
||||
" this script from your startup vimrc file.
|
||||
@ -76,7 +76,7 @@ catch /E145:/
|
||||
" Ignore the error in restricted mode
|
||||
endtry
|
||||
|
||||
func <SID>PreGetPage(cnt)
|
||||
func s:PreGetPage(cnt)
|
||||
if a:cnt == 0
|
||||
let old_isk = &iskeyword
|
||||
if &ft == 'man'
|
||||
@ -99,24 +99,27 @@ func <SID>PreGetPage(cnt)
|
||||
call s:GetPage('', sect, page)
|
||||
endfunc
|
||||
|
||||
func <SID>GetCmdArg(sect, page)
|
||||
if a:sect == ''
|
||||
return a:page
|
||||
func s:GetCmdArg(sect, page)
|
||||
|
||||
if empty(a:sect)
|
||||
return shellescape(a:page)
|
||||
endif
|
||||
return s:man_sect_arg.' '.a:sect.' '.a:page
|
||||
|
||||
return s:man_sect_arg . ' ' . shellescape(a:sect) . ' ' . shellescape(a:page)
|
||||
endfunc
|
||||
|
||||
func <SID>FindPage(sect, page)
|
||||
let where = system("man ".s:man_find_arg.' '.s:GetCmdArg(a:sect, a:page))
|
||||
if where !~ "^/"
|
||||
if matchstr(where, " [^ ]*$") !~ "^ /"
|
||||
return 0
|
||||
endif
|
||||
func s:FindPage(sect, page)
|
||||
let l:cmd = printf('man %s %s', s:man_find_arg, s:GetCmdArg(a:sect, a:page))
|
||||
call system(l:cmd)
|
||||
|
||||
if v:shell_error
|
||||
return 0
|
||||
endif
|
||||
|
||||
return 1
|
||||
endfunc
|
||||
|
||||
func <SID>GetPage(cmdmods, ...)
|
||||
func s:GetPage(cmdmods, ...)
|
||||
if a:0 >= 2
|
||||
let sect = a:1
|
||||
let page = a:2
|
||||
@ -226,7 +229,7 @@ func <SID>GetPage(cmdmods, ...)
|
||||
setl noma
|
||||
endfunc
|
||||
|
||||
func <SID>PopPage()
|
||||
func s:PopPage()
|
||||
if s:man_tag_depth > 0
|
||||
let s:man_tag_depth = s:man_tag_depth - 1
|
||||
exec "let s:man_tag_buf=s:man_tag_buf_".s:man_tag_depth
|
||||
|
@ -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.
|
||||
@ -391,9 +392,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 +522,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
|
||||
|
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
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Tom Picton <tom@tompicton.co.uk>
|
||||
" Previous Maintainer: James Sully <sullyj3@gmail.com>
|
||||
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: Sun 17 Mar 2019
|
||||
" Last Change: Mon, 5 October 2020
|
||||
" https://github.com/tpict/vim-ftplugin-python
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
@ -14,6 +14,7 @@ set cpo&vim
|
||||
setlocal cinkeys-=0#
|
||||
setlocal indentkeys-=0#
|
||||
setlocal include=^\\s*\\(from\\\|import\\)
|
||||
setlocal define=^\\s*\\(def\\\|class\\)
|
||||
|
||||
" For imports with leading .., append / and replace additional .s with ../
|
||||
let b:grandparent_match = '^\(.\.\)\(\.*\)'
|
||||
@ -38,7 +39,7 @@ setlocal comments=b:#,fb:-
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
if has('python3')
|
||||
setlocal omnifunc=python3complete#Complete
|
||||
setlocal omnifunc=python3complete#Complete
|
||||
elseif has('python')
|
||||
setlocal omnifunc=pythoncomplete#Complete
|
||||
endif
|
||||
@ -115,35 +116,18 @@ endif
|
||||
|
||||
if !exists("g:python_recommended_style") || g:python_recommended_style != 0
|
||||
" As suggested by PEP8.
|
||||
setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8
|
||||
setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
|
||||
endif
|
||||
|
||||
" First time: try finding "pydoc".
|
||||
if !exists('g:pydoc_executable')
|
||||
if executable('pydoc')
|
||||
let g:pydoc_executable = 1
|
||||
else
|
||||
let g:pydoc_executable = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" Windows-specific pydoc setup
|
||||
if has('win32') || has('win64')
|
||||
if executable('python')
|
||||
" available as Tools\scripts\pydoc.py
|
||||
let g:pydoc_executable = 1
|
||||
else
|
||||
let g:pydoc_executable = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
" If "pydoc" was found use it for keywordprg.
|
||||
if g:pydoc_executable
|
||||
if has('win32') || has('win64')
|
||||
setlocal keywordprg=python\ -m\ pydoc\
|
||||
else
|
||||
setlocal keywordprg=pydoc
|
||||
endif
|
||||
" Use pydoc for keywordprg.
|
||||
" Unix users preferentially get pydoc3, then pydoc2.
|
||||
" Windows doesn't have a standalone pydoc executable in $PATH by default, nor
|
||||
" does it have separate python2/3 executables, so Windows users just get
|
||||
" whichever version corresponds to their installed Python version.
|
||||
if executable('python3')
|
||||
setlocal keywordprg=python3\ -m\ pydoc
|
||||
elseif executable('python')
|
||||
setlocal keywordprg=python\ -m\ pydoc
|
||||
endif
|
||||
|
||||
" Script for filetype switching to undo the local stuff we may have changed
|
||||
|
@ -1,6 +1,6 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: RPL/2
|
||||
" Maintainer: Jo<EFBFBD>l BERTRAND <rpl2@free.fr>
|
||||
" Maintainer: Joël BERTRAND <rpl2@free.fr>
|
||||
" Last Change: 2012 Mar 07
|
||||
" Version: 0.1
|
||||
|
||||
|
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
|
||||
|
@ -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
|
@ -1,13 +1,13 @@
|
||||
" Vim indent file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77)
|
||||
" Version: 47
|
||||
" Last Change: 2020 Apr 20
|
||||
" Patched By: Eisuke Kawashima
|
||||
" Version: (v48) 2020 October 07
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-indent from Vim
|
||||
" Credits:
|
||||
" Useful suggestions were made, in chronological order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara and Philipp Edelmann.
|
||||
" Version 0.1 was created in September 2000 by Ajit Thakkar.
|
||||
" Since then, useful suggestions and contributions have been made, in order, by:
|
||||
" Albert Oliver Serra, Takuya Fujiwara, Philipp Edelmann, Eisuke Kawashima,
|
||||
" and Louis Cochen.
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -146,7 +146,7 @@ function FortranGetIndent(lnum)
|
||||
\. 'type\|forall\|associate\|enum\|block\)\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
" Fix indent for case statement immediately after select
|
||||
if prevstat =~? '\<select\s\+\(case\|type\)\>'
|
||||
if prevstat =~? '\<select\s*\(case\|type\)\>'
|
||||
let ind = ind + shiftwidth()
|
||||
endif
|
||||
endif
|
||||
|
@ -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
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: RPL/2
|
||||
" Version: 0.2
|
||||
" Last Change: 2017 Jun 13
|
||||
" Maintainer: BERTRAND Jo<EFBFBD>l <rpl2@free.fr>
|
||||
" Maintainer: BERTRAND Joël <rpl2@free.fr>
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
|
@ -1,5 +1,5 @@
|
||||
"Description: Indent scheme for the tilde weblanguage
|
||||
"Author: Tobias Rundstr<EFBFBD>m <tobi@tobi.nu>
|
||||
"Author: Tobias Rundström <tobi@tobi.nu>
|
||||
"URL: http://tilde.tildesoftware.net
|
||||
"Last Change: May 8 09:15:09 CEST 2002
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Vim script
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2020 Jul 19
|
||||
" Last Change: 2020 Sep 27
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -10,7 +10,7 @@ endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetVimIndent()
|
||||
setlocal indentkeys+==end,=},=else,=cat,=fina,=END,0\\,0=\"\\\
|
||||
setlocal indentkeys+==end,=},=else,=cat,=finall,=END,0\\,0=\"\\\
|
||||
setlocal indentkeys-=0#
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
@ -93,7 +93,7 @@ function GetVimIndentIntern()
|
||||
else
|
||||
" A line starting with :au does not increment/decrement indent.
|
||||
if prev_text !~ '^\s*au\%[tocmd]'
|
||||
let i = match(prev_text, '\(^\||\)\s*\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
let i = match(prev_text, '\(^\||\)\s*\(export\s\+\)\?\({\|\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\|finall\%[y]\|fu\%[nction]\|def\|el\%[seif]\)\>\)')
|
||||
if i >= 0
|
||||
let ind += shiftwidth()
|
||||
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
|
||||
@ -117,7 +117,7 @@ function GetVimIndentIntern()
|
||||
|
||||
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
|
||||
" :endfun, :enddef, :else and :augroup END.
|
||||
if cur_text =~ '^\s*\(ene\@!\|}\|cat\|fina\|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
|
||||
|
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,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
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user