mirror of
https://github.com/vim/vim
synced 2025-07-31 02:41:54 +00:00
Compare commits
483 Commits
Author | SHA1 | Date | |
---|---|---|---|
544a38e44d | |||
31e299c08f | |||
a42e6e0082 | |||
54656015d3 | |||
c04f2a4cd4 | |||
e3f50ad640 | |||
b55d618f19 | |||
a733042b12 | |||
445f11d5bc | |||
dc73b4b75d | |||
c41badb748 | |||
8cf02e5cf8 | |||
2f9c209ba0 | |||
f7a023e580 | |||
3a7503c34c | |||
f05d2fc539 | |||
e729ce294f | |||
6db7b6375a | |||
518df27ebe | |||
99285550a9 | |||
2067733b5c | |||
c64ed2b714 | |||
3cfa5b16b0 | |||
7a2217bedd | |||
f5bfa8faa7 | |||
2752360646 | |||
59b262362f | |||
1328bde9d4 | |||
c6d71532dd | |||
8da6d6db34 | |||
b288ba9f1d | |||
4f2417ffee | |||
84e9ade826 | |||
21492743e8 | |||
56cddb3879 | |||
5fa9b24440 | |||
6c4c404c58 | |||
24951a67c2 | |||
6e0b553fa1 | |||
4f3c57f798 | |||
5072b47a22 | |||
85eee5b969 | |||
0a808598e4 | |||
01c798c31a | |||
a83d06026d | |||
c3cb1c92a3 | |||
0f37e3561d | |||
a2e468fcac | |||
eecf2b35a1 | |||
eeec254878 | |||
b54abeeafb | |||
6f1d2aa437 | |||
6a43b37b76 | |||
3d9c4eefe6 | |||
bb162367ac | |||
2ac7184d34 | |||
ef8706fb84 | |||
2fa9384ca1 | |||
d2ea7cf10a | |||
6ef5ab5904 | |||
f883d9027c | |||
e71c0ebe2c | |||
0b49648486 | |||
e0a7658bc8 | |||
e5b4486c42 | |||
28cf44f761 | |||
a5787c3742 | |||
1d3a14ecf0 | |||
74ede80aeb | |||
a06e345af5 | |||
5a6cfb3ff2 | |||
3e72dcad8b | |||
1174b018a6 | |||
f89be8de14 | |||
3552e74289 | |||
d0edaf9dc2 | |||
dc3275a1ac | |||
4ac198c61c | |||
2c4a1d0a61 | |||
bc869874fe | |||
89dcb4dce3 | |||
543467136f | |||
840f91f110 | |||
c512599b22 | |||
7d840e9ac7 | |||
4c8e8c6e19 | |||
34fcb69724 | |||
872bee557e | |||
1e469c72ee | |||
e97c7c962c | |||
15bbb8f4f3 | |||
611728f806 | |||
ad5c178a19 | |||
f5409dbf66 | |||
b777da9be8 | |||
1e615669c0 | |||
23c0192166 | |||
5cf94577cf | |||
4eb1914e1b | |||
46aa6f93ac | |||
56c9fd0107 | |||
4781d6fd86 | |||
796139ae3a | |||
485b627100 | |||
cbe178e3dc | |||
082a3bf961 | |||
ecb664501d | |||
d87c21a918 | |||
074f84c01f | |||
965c04486c | |||
fc643e6016 | |||
3b1373b193 | |||
1764faa386 | |||
dcfc311198 | |||
6b02b38ed0 | |||
ff65288aa8 | |||
3ec3217f04 | |||
50157ef1c2 | |||
0820f4de58 | |||
30e3de21fc | |||
d832c3c56e | |||
761ead497f | |||
847fe7d750 | |||
71c6f7a665 | |||
36f96a5151 | |||
fe8ebdbe5c | |||
588cf7547b | |||
68db996b62 | |||
918b08957c | |||
24f720998f | |||
f06ab6ba38 | |||
f18332fb9e | |||
e08795e1ec | |||
261417b872 | |||
5631836975 | |||
e3e598e82b | |||
6d37e8e3ba | |||
b7c978154e | |||
dc3e2e65c9 | |||
5f7d4c049e | |||
3a00659db7 | |||
1ad72c8eb6 | |||
0279510444 | |||
ad43199572 | |||
df36514a64 | |||
97a6c6a1fb | |||
5f8ed7408a | |||
551c1aed65 | |||
2bf6034e5c | |||
1bb0da25a6 | |||
4c295027a4 | |||
5f628a12e5 | |||
4a22897591 | |||
3d0e7a956a | |||
b6c2e9a010 | |||
4934ed34c3 | |||
aeed2a6359 | |||
227c58a486 | |||
03717bf6a2 | |||
b80d2fb0e7 | |||
b06b50dfa0 | |||
bb01a1ef3a | |||
5930ddcd25 | |||
b98cec28d9 | |||
d386e923c7 | |||
dc4c2309f2 | |||
730bf30020 | |||
340c59ec6f | |||
bdc0f1c698 | |||
96cf4ba8fb | |||
7ba1e4d363 | |||
e0c03c8e10 | |||
a6aa16423f | |||
f6d9935a13 | |||
9f28416e54 | |||
11e3c5ba82 | |||
459fbdbf92 | |||
a369c3d9c1 | |||
2d5f385cee | |||
753bcf8c7d | |||
169502fb0b | |||
16678eb50f | |||
d23f8bde5c | |||
9ce47ec0b6 | |||
5c787fb792 | |||
63276685f9 | |||
8238f08838 | |||
3f88e71fa2 | |||
6d4c1c7ba8 | |||
4f2df37a0d | |||
2d1c57ed3d | |||
4c13721482 | |||
e8209b91b9 | |||
39211cba72 | |||
b7c21afef1 | |||
d551d6c268 | |||
f7e92aae15 | |||
d23b714d8b | |||
51e933261b | |||
0995c81f2f | |||
c70fe460b0 | |||
6c7cc347af | |||
56994d2158 | |||
112a006417 | |||
635bd60804 | |||
aa1959bd5e | |||
fe090eb58f | |||
6bc00699c5 | |||
f387f5dfbc | |||
bd6406f15d | |||
b141926890 | |||
0e3ff19196 | |||
b47bed2f7a | |||
a3589a0d6c | |||
f62d73933a | |||
2e240bd428 | |||
f6a8d420a8 | |||
f2253963c2 | |||
f48b2fa33c | |||
68452177ca | |||
cfc3023cb6 | |||
af8ea0d066 | |||
09f067fca3 | |||
f93bbd0262 | |||
e8e3078184 | |||
fed9e830fc | |||
da479c7597 | |||
fe95b94ffa | |||
c429769776 | |||
bb8a7ce0a1 | |||
87795939d0 | |||
51e7e78de7 | |||
962c43bf0d | |||
599410cb3c | |||
701cc6ca9e | |||
1088b69451 | |||
2a38908b05 | |||
767034c5b8 | |||
dcae51facc | |||
d8db838392 | |||
175a41c13f | |||
fa5963880d | |||
15e5e53ef2 | |||
130cbfc312 | |||
125ed2745c | |||
e5b0b98a90 | |||
8dddc1f0e2 | |||
c9605f0595 | |||
643ce6c0c6 | |||
e3d1f4c982 | |||
e9b8b78e04 | |||
86cdb8a4bd | |||
e8c4660a55 | |||
0d351a04e1 | |||
58fb7c39a0 | |||
b9c0cd897a | |||
2927c07b0e | |||
01ac0a1f66 | |||
e42939af87 | |||
0865b15bc6 | |||
ce5b06a6a9 | |||
0b94e297af | |||
886e5e737d | |||
409da842db | |||
68ffe8cade | |||
f2dd9cb995 | |||
3c49e74e18 | |||
90193e6140 | |||
26af8e54ff | |||
3a6aadb328 | |||
ceb0619433 | |||
a7511c0f4f | |||
77709b194c | |||
440cf096fa | |||
6e50ec2f0a | |||
c17ba791a9 | |||
26f201345d | |||
6437475ffb | |||
c48f2dc0be | |||
b9c6b6fb73 | |||
0df6030145 | |||
f65ed86f6f | |||
1e6bbfb560 | |||
5b8cabfef7 | |||
dcf29ac87f | |||
f5906aa780 | |||
3fa5e64e0e | |||
ef38bcf051 | |||
160a2b4dac | |||
ca51cc0a33 | |||
d877a5700f | |||
ce0b75711a | |||
49c51b825a | |||
5c504f680e | |||
b91d3f857f | |||
529fb5a5f6 | |||
12be734faf | |||
e535db86e7 | |||
dad4473f02 | |||
ae0f151ddf | |||
82820d9bf1 | |||
38a3bfa9a2 | |||
9ea7e55ab9 | |||
8b9abfd86c | |||
9dbe701fe1 | |||
3215466af9 | |||
b2cb6c8bbd | |||
f6bdd82c7e | |||
b2ac7d0663 | |||
df749a2b9c | |||
f49a1fcdb9 | |||
24f21fdfca | |||
c580943965 | |||
7b45d46cf7 | |||
32105ae88f | |||
79efa2e3b3 | |||
7007e31bde | |||
bb5d87c850 | |||
ccc25aa285 | |||
c61cb8bfe1 | |||
74e54fcb44 | |||
522eefd9a2 | |||
a2b3e7dc92 | |||
0a1a6a1aa4 | |||
ff87140046 | |||
3a0f092ac0 | |||
fa984418e7 | |||
a91a71322d | |||
2fecb53115 | |||
1ff89deeaa | |||
c54f347d63 | |||
f4a2ed0714 | |||
f28f2ac425 | |||
49f1e9ec3e | |||
da1dbed0df | |||
1f448d906b | |||
e98f60a591 | |||
2cec027af4 | |||
f1387285e2 | |||
5ea79a2599 | |||
4c86830fc5 | |||
09f8b3a022 | |||
67da21a147 | |||
7a6eaa06f9 | |||
f90c855c71 | |||
196a1f7409 | |||
c5cf369e95 | |||
a0c8aea479 | |||
592f57f5fe | |||
a0399efa72 | |||
5c7a299c16 | |||
4355894869 | |||
240014321b | |||
af125866db | |||
74b99f6ab6 | |||
17709e280a | |||
a555e6fcb6 | |||
108cf0153c | |||
4b3e1964d8 | |||
5f91e74bf9 | |||
3f32788000 | |||
8863bda25d | |||
3e1916947d | |||
a4c81bea38 | |||
c970e4225b | |||
6ccfd99b92 | |||
18b7d86d7f | |||
f8c52e8d08 | |||
1e448465e1 | |||
3214812997 | |||
f4fcedc59d | |||
02b4d9b18a | |||
70ce8a1561 | |||
0289a093a4 | |||
240309c9bf | |||
77b10ffad4 | |||
2e34c34be1 | |||
6bce5856b5 | |||
93e1cae739 | |||
edba70703b | |||
6508880d6c | |||
cb4e80fab9 | |||
41cd80335c | |||
9e813b3dea | |||
0756f757ed | |||
0de8e2d6a3 | |||
c8cdf0f80b | |||
6fd367a97c | |||
c80f647512 | |||
12bce95887 | |||
776b954622 | |||
23b32a8d6b | |||
6635ae1437 | |||
f52f0606ed | |||
c23555de34 | |||
d345fb9216 | |||
7ad67d1150 | |||
ffb7dcdb77 | |||
37294bd6a2 | |||
e3ffcd9902 | |||
d00a7fb81a | |||
86c3a2162c | |||
9355ae4149 | |||
608d78fb45 | |||
6914e87d3c | |||
04947cc6ed | |||
a974953443 | |||
18062fcad6 | |||
8c801b374b | |||
f9a65505d1 | |||
008bff967f | |||
6057748a1a | |||
6c3843ca8a | |||
2e2d758902 | |||
f76ec1eeb5 | |||
51b477f74f | |||
4fa1175765 | |||
37096afd3f | |||
3dc3474f00 | |||
39d4cab494 | |||
3650fd7098 | |||
057e84afe5 | |||
087b5ff35d | |||
0a84284e60 | |||
3f1e9f000f | |||
0f2a5cc68b | |||
9faec4e3d4 | |||
0abc6e471a | |||
9f646c2e11 | |||
d0bce504ec | |||
0e62a6742b | |||
1bd3cb2019 | |||
7d41410a45 | |||
2c6553498e | |||
21a83bd53d | |||
eba13e4ea2 | |||
bc327ccc3d | |||
9cb577a682 | |||
41f0895c6e | |||
6bfc475f71 | |||
b4893b8450 | |||
7e82c5f338 | |||
21578271bb | |||
027c4ab4d2 | |||
dc167465f8 | |||
723ef5db98 | |||
a1070eae77 | |||
5b5ae29bd3 | |||
ada1d870b4 | |||
10b9421f3b | |||
12d265315f | |||
d3f8a9ee65 | |||
c7dac8534e | |||
064095012c | |||
527ed38cfa | |||
e0890d678d | |||
3aca5a6fbc | |||
c0fcb6e0b1 | |||
9bbd883b35 | |||
333bd56422 | |||
04ea7e9049 | |||
b8554304c3 | |||
eed9d46293 | |||
7c5b3c0369 | |||
4afa77419f | |||
6281815ecc | |||
2379f87eb4 | |||
9979fcd72e | |||
03dfde2b5f | |||
39f3b14110 | |||
10ccfb2a17 | |||
8d4be89011 | |||
a98f8a2305 | |||
942db23c9c | |||
0fa09676c2 | |||
c150c09ec4 | |||
31842cd077 | |||
44ec21c467 | |||
d9d7789b6f | |||
ca753ec862 | |||
f785aa1354 | |||
0bcadf14aa | |||
3b678047bc |
43
.github/CODEOWNERS
vendored
43
.github/CODEOWNERS
vendored
@ -9,9 +9,6 @@
|
||||
# So if a pull request only touches javascript files, only these owners
|
||||
# will be requested to review.
|
||||
|
||||
src/iscygpty.* @k-takata
|
||||
src/libvterm/ @leonerd
|
||||
|
||||
runtime/autoload/getscript.vim @cecamp
|
||||
runtime/autoload/netrw.vim @cecamp
|
||||
runtime/autoload/netrwFileHandlers.vim @cecamp
|
||||
@ -22,6 +19,7 @@ runtime/autoload/vimball.vim @cecamp
|
||||
runtime/autoload/xmlformat.vim @chrisbra
|
||||
runtime/autoload/zip.vim @cecamp
|
||||
runtime/compiler/checkstyle.vim @dkearns
|
||||
runtime/compiler/cm3.vim @dkearns
|
||||
runtime/compiler/cucumber.vim @tpope
|
||||
runtime/compiler/dart.vim @dkearns
|
||||
runtime/compiler/dart2js.vim @dkearns
|
||||
@ -42,6 +40,7 @@ runtime/compiler/jshint.vim @dkearns
|
||||
runtime/compiler/jsonlint.vim @dkearns
|
||||
runtime/compiler/lazbuild.vim @dkearns
|
||||
runtime/compiler/php.vim @dkearns
|
||||
runtime/compiler/powershell.vim @heaths
|
||||
runtime/compiler/rake.vim @tpope @dkearns
|
||||
runtime/compiler/rhino.vim @dkearns
|
||||
runtime/compiler/rspec.vim @tpope @dkearns
|
||||
@ -51,6 +50,7 @@ runtime/compiler/rubyunit.vim @dkearns
|
||||
runtime/compiler/sass.vim @tpope
|
||||
runtime/compiler/se.vim @dkearns
|
||||
runtime/compiler/shellcheck.vim @dkearns
|
||||
runtime/compiler/sml.vim @dkearns
|
||||
runtime/compiler/stylelint.vim @dkearns
|
||||
runtime/compiler/tcl.vim @dkearns
|
||||
runtime/compiler/tidy.vim @dkearns
|
||||
@ -66,6 +66,7 @@ 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/doc/ps1.txt @heaths
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
@ -74,6 +75,7 @@ runtime/ftplugin/css.vim @dkearns
|
||||
runtime/ftplugin/cucumber.vim @tpope
|
||||
runtime/ftplugin/eiffel.vim @dkearns
|
||||
runtime/ftplugin/eruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/fpcmake.vim @dkearns
|
||||
runtime/ftplugin/freebasic.vim @dkearns
|
||||
runtime/ftplugin/git.vim @tpope
|
||||
runtime/ftplugin/gitcommit.vim @tpope
|
||||
@ -87,15 +89,24 @@ runtime/ftplugin/javascript.vim @dkearns
|
||||
runtime/ftplugin/javascriptreact.vim @dkearns
|
||||
runtime/ftplugin/kconfig.vim @chrisbra
|
||||
runtime/ftplugin/liquid.vim @tpope
|
||||
runtime/ftplugin/m3build.vim @dkearns
|
||||
runtime/ftplugin/m3quake.vim @dkearns
|
||||
runtime/ftplugin/markdown.vim @tpope
|
||||
runtime/ftplugin/matlab.vim @cecamp
|
||||
runtime/ftplugin/meson.vim @Liambeguin
|
||||
runtime/ftplugin/modula3.vim @dkearns
|
||||
runtime/ftplugin/nroff.vim @a-vrma
|
||||
runtime/ftplugin/nsis.vim @k-takata
|
||||
runtime/ftplugin/pascal.vim @dkearns
|
||||
runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
runtime/ftplugin/ps1.vim @heaths
|
||||
runtime/ftplugin/ps1xml.vim @heaths
|
||||
runtime/ftplugin/ruby.vim @tpope @dkearns
|
||||
runtime/ftplugin/sass.vim @tpope
|
||||
runtime/ftplugin/scss.vim @tpope
|
||||
runtime/ftplugin/spec.vim @ignatenkobrain
|
||||
runtime/ftplugin/systemverilog.vim @Kocha
|
||||
runtime/ftplugin/tidy.vim @dkearns
|
||||
runtime/ftplugin/tmux.vim @ericpruitt
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
@ -109,11 +120,14 @@ runtime/indent/eruby.vim @tpope @dkearns
|
||||
runtime/indent/gitconfig.vim @tpope
|
||||
runtime/indent/haml.vim @tpope
|
||||
runtime/indent/liquid.vim @tpope
|
||||
runtime/indent/meson.vim @Liambeguin
|
||||
runtime/indent/nsis.vim @k-takata
|
||||
runtime/indent/ps1.vim @heaths
|
||||
runtime/indent/ruby.vim @AndrewRadev @dkearns
|
||||
runtime/indent/sass.vim @tpope
|
||||
runtime/indent/scss.vim @tpope
|
||||
runtime/indent/sh.vim @chrisbra
|
||||
runtime/indent/systemverilog.vim @Kocha
|
||||
runtime/indent/teraterm.vim @k-takata
|
||||
runtime/indent/xml.vim @chrisbra
|
||||
runtime/indent/zsh.vim @chrisbra
|
||||
@ -130,6 +144,7 @@ runtime/syntax/aidl.vim @dpelle
|
||||
runtime/syntax/amiga.vim @cecamp
|
||||
runtime/syntax/asm.vim @dkearns
|
||||
runtime/syntax/asmh8300.vim @dkearns
|
||||
runtime/syntax/asterisk.vim @jaunis
|
||||
runtime/syntax/awk.vim @dkearns
|
||||
runtime/syntax/basic.vim @dkearns
|
||||
runtime/syntax/bst.vim @tpope
|
||||
@ -141,35 +156,50 @@ runtime/syntax/csh.vim @cecamp
|
||||
runtime/syntax/cucumber.vim @tpope
|
||||
runtime/syntax/datascript.vim @dpelle
|
||||
runtime/syntax/dcl.vim @cecamp
|
||||
runtime/syntax/desktop.vim @e-kwsm
|
||||
runtime/syntax/dot.vim @mmottl
|
||||
runtime/syntax/doxygen.vim @frogonwheels
|
||||
runtime/syntax/dtd.vim @chrisbra
|
||||
runtime/syntax/dts.vim @zonque
|
||||
runtime/syntax/elmfilt.vim @cecamp
|
||||
runtime/syntax/eruby.vim @tpope @dkearns
|
||||
runtime/syntax/exports.vim @cecamp
|
||||
runtime/syntax/fpcmake.vim @dkearns
|
||||
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/groff.vim @jmarshall
|
||||
runtime/syntax/haml.vim @tpope
|
||||
runtime/syntax/haskell.vim @coot
|
||||
runtime/syntax/hgcommit.vim @k-takata
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
runtime/syntax/less.vim @genoma
|
||||
runtime/syntax/lex.vim @cecamp
|
||||
runtime/syntax/liquid.vim @tpope
|
||||
runtime/syntax/lisp.vim @cecamp
|
||||
runtime/syntax/lynx.vim @dkearns
|
||||
runtime/syntax/m3build.vim @dkearns
|
||||
runtime/syntax/m3quake.vim @dkearns
|
||||
runtime/syntax/mailcap.vim @dkearns
|
||||
runtime/syntax/make.vim @rohieb
|
||||
runtime/syntax/make.vim @rohieb
|
||||
runtime/syntax/maple.vim @cecamp
|
||||
runtime/syntax/markdown.vim @tpope
|
||||
runtime/syntax/meson.vim @Liambeguin
|
||||
runtime/syntax/modula3.vim @dkearns
|
||||
runtime/syntax/netrw.vim @cecamp
|
||||
runtime/syntax/nroff.vim @jmarshall
|
||||
runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/pascal.vim @dkearns
|
||||
runtime/syntax/pbtxt.vim @lakshayg
|
||||
runtime/syntax/pdf.vim @tpope
|
||||
runtime/syntax/php.vim @TysonAndre
|
||||
runtime/syntax/privoxy.vim @dkearns
|
||||
runtime/syntax/prolog.vim @XVilka
|
||||
runtime/syntax/ps1.vim @heaths
|
||||
runtime/syntax/ps1xml.vim @heaths
|
||||
runtime/syntax/psl.vim @danielkho
|
||||
runtime/syntax/rc.vim @chrisbra
|
||||
runtime/syntax/rpcgen.vim @cecamp
|
||||
runtime/syntax/ruby.vim @dkearns
|
||||
@ -179,7 +209,10 @@ runtime/syntax/sh.vim @cecamp
|
||||
runtime/syntax/sm.vim @cecamp
|
||||
runtime/syntax/spec.vim @ignatenkobrain
|
||||
runtime/syntax/sqloracle.vim @chrisbra
|
||||
runtime/syntax/sshconfig.vim @Jakuje
|
||||
runtime/syntax/sshdconfig.vim @Jakuje
|
||||
runtime/syntax/sudoers.vim @e-kwsm
|
||||
runtime/syntax/systemverilog.vim @Kocha
|
||||
runtime/syntax/tags.vim @cecamp
|
||||
runtime/syntax/teraterm.vim @k-takata
|
||||
runtime/syntax/tex.vim @cecamp
|
||||
@ -198,6 +231,8 @@ 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/iscygpty.* @k-takata
|
||||
src/libvterm/ @leonerd
|
||||
src/po/de.po @chrisbra
|
||||
src/po/eo.po @dpelle
|
||||
src/po/fr.po @dpelle
|
||||
|
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -7,7 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
env:
|
||||
CC: ${{ matrix.compiler }}
|
||||
@ -208,6 +208,7 @@ jobs:
|
||||
TRAVIS_JOB_ID: ${{ github.run_id }}
|
||||
run: |
|
||||
sudo apt-get install -y python3-setuptools python3-wheel
|
||||
sudo -H pip3 install pip -U
|
||||
# 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
|
||||
@ -227,7 +228,7 @@ jobs:
|
||||
done
|
||||
|
||||
coveralls:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
needs: linux
|
||||
if: always() && github.event_name != 'pull_request'
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -25,7 +25,6 @@ src/auto/pathdef.c
|
||||
# Windows
|
||||
*.exe
|
||||
*.idb
|
||||
*.manifest
|
||||
*.exp
|
||||
*.map
|
||||
*.obj
|
||||
|
@ -26,7 +26,6 @@ src/auto/pathdef.c
|
||||
# Windows
|
||||
*.exe
|
||||
*.idb
|
||||
*.manifest
|
||||
*.exp
|
||||
*.map
|
||||
*.obj
|
||||
|
11
Filelist
11
Filelist
@ -13,7 +13,8 @@ SRC_ALL = \
|
||||
.hgignore \
|
||||
.lgtm.yml \
|
||||
.travis.yml \
|
||||
appveyor.yml \
|
||||
.appveyor.yml \
|
||||
.codecov.yml \
|
||||
ci/appveyor.bat \
|
||||
ci/build-snd-dummy.sh \
|
||||
ci/config.mk*.sed \
|
||||
@ -67,6 +68,7 @@ SRC_ALL = \
|
||||
src/fileio.c \
|
||||
src/filepath.c \
|
||||
src/findfile.c \
|
||||
src/float.c \
|
||||
src/fold.c \
|
||||
src/getchar.c \
|
||||
src/globals.h \
|
||||
@ -245,6 +247,7 @@ SRC_ALL = \
|
||||
src/proto/fileio.pro \
|
||||
src/proto/filepath.pro \
|
||||
src/proto/findfile.pro \
|
||||
src/proto/float.pro \
|
||||
src/proto/fold.pro \
|
||||
src/proto/getchar.pro \
|
||||
src/proto/gui.pro \
|
||||
@ -436,7 +439,6 @@ SRC_UNIX = \
|
||||
src/gui_gtk_x11.c \
|
||||
src/gui_gtk_res.xml \
|
||||
src/gui_motif.c \
|
||||
src/gui_xim.c \
|
||||
src/gui_xmdlg.c \
|
||||
src/gui_xmebw.c \
|
||||
src/gui_xmebw.h \
|
||||
@ -460,7 +462,6 @@ SRC_UNIX = \
|
||||
src/proto/gui_gtk_x11.pro \
|
||||
src/proto/gui_gtk_gresources.pro \
|
||||
src/proto/gui_motif.pro \
|
||||
src/proto/gui_xim.pro \
|
||||
src/proto/gui_xmdlg.pro \
|
||||
src/proto/gui_x11.pro \
|
||||
src/proto/if_xcmdsrv.pro \
|
||||
@ -480,6 +481,7 @@ SRC_UNIX = \
|
||||
|
||||
# source files for both DOS and Unix
|
||||
SRC_DOS_UNIX = \
|
||||
src/gui_xim.c \
|
||||
src/if_cscope.c \
|
||||
src/if_cscope.h \
|
||||
src/if_lua.c \
|
||||
@ -492,6 +494,7 @@ SRC_DOS_UNIX = \
|
||||
src/if_py_both.h \
|
||||
src/if_ruby.c \
|
||||
src/if_tcl.c \
|
||||
src/proto/gui_xim.pro \
|
||||
src/proto/if_cscope.pro \
|
||||
src/proto/if_lua.pro \
|
||||
src/proto/if_mzsch.pro \
|
||||
@ -566,7 +569,7 @@ SRC_DOS = \
|
||||
src/uninstall.c \
|
||||
src/vim.def \
|
||||
src/vim.rc \
|
||||
src/gvim.exe.mnf \
|
||||
src/vim.manifest \
|
||||
src/vimrun.c \
|
||||
src/xpm_w32.c \
|
||||
src/xpm_w32.h \
|
||||
|
2
Makefile
2
Makefile
@ -94,7 +94,7 @@ MINOR = 2
|
||||
# src/Makefile, README.txt, README.md, src/README.md, READMEdir/README*.txt,
|
||||
# runtime/doc/*.txt and make nsis/gvim_version.nsh.
|
||||
# For a minor/major version: src/GvimExt/GvimExt.reg, src/vim.def,
|
||||
# src/gvim.exe.mnf.
|
||||
# src/vim.manifest.
|
||||
# - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, Lua, Cscope and
|
||||
# "huge" features. Add MZscheme if you can make it work.
|
||||
# Use "make reconfig" after selecting the configure arguments.
|
||||
|
29
README.md
29
README.md
@ -7,12 +7,14 @@
|
||||
|
||||
## What is Vim? ##
|
||||
|
||||
Vim is a greatly improved version of the good old UNIX editor Vi. Many new
|
||||
Vim is a greatly improved version of the good old UNIX editor
|
||||
[Vi](https://en.wikipedia.org/wiki/Vi). Many new
|
||||
features have been added: multi-level undo, syntax highlighting, command line
|
||||
history, on-line help, spell checking, filename completion, block operations,
|
||||
script language, etc. There is also a Graphical User Interface (GUI)
|
||||
available. Still, Vi compatibility is maintained, those who have Vi "in the
|
||||
fingers" will feel at home. See `runtime/doc/vi_diff.txt` for differences with
|
||||
fingers" will feel at home.
|
||||
See [`runtime/doc/vi_diff.txt`](runtime/doc/vi_diff.txt) for differences with
|
||||
Vi.
|
||||
|
||||
This editor is very useful for editing programs and other plain text files.
|
||||
@ -42,7 +44,7 @@ want or must compile it yourself. Check http://www.vim.org/download.php for
|
||||
an overview of currently available distributions.
|
||||
|
||||
Some popular places to get the latest Vim:
|
||||
* Check out the git repository from [github](https://github.com/vim/vim).
|
||||
* Check out the git repository from [GitHub](https://github.com/vim/vim).
|
||||
* Get the source code as an [archive](https://github.com/vim/vim/releases).
|
||||
* Get a Windows executable from the
|
||||
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
|
||||
@ -53,14 +55,14 @@ Some popular places to get the latest Vim:
|
||||
|
||||
If you obtained a binary distribution you don't need to compile Vim. If you
|
||||
obtained a source distribution, all the stuff for compiling Vim is in the
|
||||
`src` directory. See `src/INSTALL` for instructions.
|
||||
[`src`](/src) directory. See [`src/INSTALL`](src/INSTALL) for instructions.
|
||||
|
||||
|
||||
## Installation ##
|
||||
|
||||
See one of these files for system-specific instructions. Either in the
|
||||
READMEdir directory (in the repository) or the top directory (if you unpack an
|
||||
archive):
|
||||
[READMEdir directory](./READMEdir/) (in the repository) or
|
||||
the top directory (if you unpack an archive):
|
||||
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
@ -78,8 +80,9 @@ The Vim tutor is a one hour training course for beginners. Often it can be
|
||||
started as `vimtutor`. See `:help tutor` for more information.
|
||||
|
||||
The best is to use `:help` in Vim. If you don't have an executable yet, read
|
||||
`runtime/doc/help.txt`. It contains pointers to the other documentation
|
||||
files. The User Manual reads like a book and is recommended to learn to use
|
||||
[`runtime/doc/help.txt`](/runtime/doc/help.txt).
|
||||
It contains pointers to the other documentation files.
|
||||
The User Manual reads like a book and is recommended to learn to use
|
||||
Vim. See `:help user-manual`.
|
||||
|
||||
|
||||
@ -87,7 +90,8 @@ Vim. See `:help user-manual`.
|
||||
|
||||
Vim is Charityware. You can use and copy it as much as you like, but you are
|
||||
encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||
`runtime/doc/uganda.txt` for details (do `:help uganda` inside Vim).
|
||||
[`runtime/doc/uganda.txt`](runtime/doc/uganda.txt)
|
||||
for details (do `:help uganda` inside Vim).
|
||||
|
||||
Summary of the license: There are no restrictions on using or distributing an
|
||||
unmodified copy of Vim. Parts of Vim may also be distributed, but the license
|
||||
@ -103,8 +107,8 @@ your appreciation for the work and motivate Bram and others to continue
|
||||
working on Vim please send a donation.
|
||||
|
||||
Since Bram is back to a paid job the money will now be used to help children
|
||||
in Uganda. See `runtime/doc/uganda.txt`. But at the same time donations
|
||||
increase Bram's motivation to keep working on Vim!
|
||||
in Uganda. See [`runtime/doc/uganda.txt`](runtime/doc/uganda.txt). But
|
||||
at the same time donations increase Bram's motivation to keep working on Vim!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
http://www.vim.org/sponsor/
|
||||
@ -112,7 +116,8 @@ For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
## Contributing ##
|
||||
|
||||
If you would like to help making Vim better, see the [CONTRIBUTING.md](https://github.com/vim/vim/blob/master/CONTRIBUTING.md) file.
|
||||
If you would like to help making Vim better, see the
|
||||
[CONTRIBUTING.md](/CONTRIBUTING.md) file.
|
||||
|
||||
|
||||
## Information ##
|
||||
|
@ -70,6 +70,7 @@ the text. For example, reindent all the lines:
|
||||
| Vim new | 0.190276 |
|
||||
|
||||
The differences are smaller, but Vim 9 script is clearly the fastest.
|
||||
Using LuaJIT gives 0.25, only a little bit faster than plain Lua.
|
||||
|
||||
How does Vim9 script work? The function is first compiled into a sequence of
|
||||
instructions. Each instruction has one or two parameters and a stack is
|
||||
|
@ -1,28 +1,12 @@
|
||||
README_mac.txt for version 8.2 of Vim: Vi IMproved.
|
||||
|
||||
This file explains the installation of Vim on Macintosh systems.
|
||||
This file explains the installation of Vim on MacOS systems.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
To build from source get the files with git from https://github.com/vim/vim.
|
||||
The find the instructions in src/INSTALLmac.txt.
|
||||
|
||||
To build from sources, like on Unix
|
||||
|
||||
1. Get the build tools: "clang" and "make". These can be installed with the
|
||||
"CommandLineTools" package. If you don't have one, do
|
||||
xcode-select --install
|
||||
Just like for any software development with OS X.
|
||||
|
||||
2. Get the source code. Best is to use git (which you need to install first),
|
||||
see http://www.vim.org/git.php
|
||||
Or you can download and unpack the Unix tar archive, see
|
||||
http://www.vim.org/download.php
|
||||
|
||||
3. Go to the top directory of the source tree, do
|
||||
make
|
||||
sudo make install
|
||||
A newly built vim will be installed under "/usr/local".
|
||||
|
||||
|
||||
If you can't manage to make this work, there is a fallback using Homebrew:
|
||||
|
||||
Installing Vim using Homebrew:
|
||||
1. Install Homebrew from http://brew.sh/
|
||||
2. Install latest Vim with: brew install vim
|
||||
2. Install the latest Vim with:
|
||||
brew install vim
|
||||
|
@ -11,7 +11,11 @@ sed -e "s/@<<$/@<< | sed -e 's#.*\\\\r.*##'/" Make_mvc.mak > Make_mvc2.mak
|
||||
echo "Building MSVC 64bit console Version"
|
||||
nmake -f Make_mvc2.mak CPU=AMD64 ^
|
||||
OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
|
||||
FEATURES=%FEATURE% || exit 1
|
||||
FEATURES=%FEATURE%
|
||||
if not exist vim.exe (
|
||||
echo Build failure.
|
||||
exit 1
|
||||
)
|
||||
|
||||
:: build MSVC huge version with python and channel support
|
||||
:: GUI needs to be last, so that testing works
|
||||
@ -21,16 +25,20 @@ if "%FEATURE%" == "HUGE" (
|
||||
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
|
||||
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
|
||||
PYTHON3_VER=35 DYNAMIC_PYTHON3=yes PYTHON3=C:\Python35-x64 ^
|
||||
FEATURES=%FEATURE% || exit 1
|
||||
FEATURES=%FEATURE%
|
||||
) ELSE (
|
||||
nmake -f Make_mvc2.mak CPU=AMD64 ^
|
||||
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
|
||||
FEATURES=%FEATURE% || exit 1
|
||||
FEATURES=%FEATURE%
|
||||
)
|
||||
.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt
|
||||
if not exist gvim.exe (
|
||||
echo Build failure.
|
||||
exit 1
|
||||
)
|
||||
.\gvim -u NONE -c "redir @a | ver |0put a | wq" ver_msvc.txt || exit 1
|
||||
|
||||
echo "version output MSVC console"
|
||||
.\vim --version
|
||||
.\vim --version || exit 1
|
||||
echo "version output MSVC GUI"
|
||||
type ver_msvc.txt
|
||||
type ver_msvc.txt || exit 1
|
||||
cd ..
|
||||
|
@ -6,7 +6,7 @@ if 1
|
||||
echo "*** Interface versions ***\n"
|
||||
|
||||
echo 'Lua:'
|
||||
PrintVer lua print(_VERSION)
|
||||
PrintVer lua print(vim.lua_version, jit and "(LuaJIT)" or "")
|
||||
|
||||
echo 'MzScheme:'
|
||||
PrintVer mzscheme (display (version))
|
||||
|
@ -66,6 +66,9 @@ To build the installable .exe:
|
||||
|
||||
Install NSIS if you didn't do that already.
|
||||
Also install UPX, if you want a compressed file.
|
||||
Download and include the ShellExecAsUser.dll Unicode version which can be
|
||||
sourced from: https://nsis.sourceforge.io/ShellExecAsUser_plug-in
|
||||
|
||||
|
||||
Unpack the images:
|
||||
cd nsis
|
||||
|
@ -119,9 +119,9 @@ RequestExecutionLevel highest
|
||||
|
||||
!define MUI_COMPONENTSPAGE_SMALLDESC
|
||||
!define MUI_LICENSEPAGE_CHECKBOX
|
||||
!define MUI_FINISHPAGE_RUN "$0\gvim.exe"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
|
||||
!define MUI_FINISHPAGE_RUN_PARAMETERS "-R $\"$0\README.txt$\""
|
||||
|
||||
# This adds '\Vim' to the user choice automagically. The actual value is
|
||||
# obtained below with CheckOldVim.
|
||||
@ -300,6 +300,11 @@ Function CheckOldVim
|
||||
Exch $0 # put $0 on top of stack, restore $0 to original value
|
||||
FunctionEnd
|
||||
|
||||
Function LaunchApplication
|
||||
SetOutPath $0
|
||||
ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"'
|
||||
FunctionEnd
|
||||
|
||||
##########################################################
|
||||
Section "$(str_section_old_ver)" id_section_old_ver
|
||||
SectionIn 1 2 3 RO
|
||||
@ -359,6 +364,8 @@ Section "$(str_section_exe)" id_section_exe
|
||||
|
||||
SetOutPath $0\colors
|
||||
File ${VIMRT}\colors\*.*
|
||||
SetOutPath $0\colors\tools
|
||||
File ${VIMRT}\colors\tools\*.*
|
||||
|
||||
SetOutPath $0\compiler
|
||||
File ${VIMRT}\compiler\*.*
|
||||
|
@ -24,7 +24,7 @@ LangString ^UninstallCaption ${LANG_ENGLISH} \
|
||||
# "Destination Folder (Must end with $\"vim$\")"
|
||||
|
||||
LangString str_show_readme ${LANG_ENGLISH} \
|
||||
"Show README after installation finish"
|
||||
"Show README after installation finished"
|
||||
|
||||
# Install types:
|
||||
LangString str_type_typical ${LANG_ENGLISH} \
|
||||
|
File diff suppressed because one or more lines are too long
@ -3,7 +3,7 @@
|
||||
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
|
||||
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" URL: https://github.com/shawncplus/phpcomplete.vim
|
||||
" Last Change: 2018 Oct 10
|
||||
" Last Change: 2021 Feb 08
|
||||
"
|
||||
" OPTIONS:
|
||||
"
|
||||
@ -122,7 +122,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
" If exists b:php_menu it means completion was already constructed we
|
||||
" don't need to do anything more
|
||||
if exists("b:php_menu")
|
||||
@ -148,8 +147,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
try
|
||||
let eventignore = &eventignore
|
||||
let &eventignore = 'all'
|
||||
let winheight = winheight(0)
|
||||
let winnr = winnr()
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
|
||||
|
||||
@ -183,7 +180,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
|
||||
let sccontent = split(classcontent, "\n")
|
||||
@ -217,7 +213,6 @@ function! phpcomplete#CompletePHP(findstart, base) " {{{
|
||||
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
|
||||
endif
|
||||
finally
|
||||
silent! exec winnr.'resize '.winheight
|
||||
let &eventignore = eventignore
|
||||
endtry
|
||||
endfunction
|
||||
@ -1025,7 +1020,7 @@ function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) "
|
||||
let c_var = '$'.c_var
|
||||
endif
|
||||
let c_variables[c_var] = ''
|
||||
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0
|
||||
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index, '')) > 0
|
||||
let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index])
|
||||
endif
|
||||
let var_index += 1
|
||||
@ -2082,26 +2077,17 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
" ...
|
||||
" ]
|
||||
"
|
||||
let full_file_path = fnamemodify(a:file_path, ':p')
|
||||
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let cfile = join(a:file_lines, "\n")
|
||||
let full_file_path = fnamemodify(a:file_path, ':p')
|
||||
let result = []
|
||||
" We use new buffer and (later) normal! because
|
||||
" this is the most efficient way. The other way
|
||||
" is to go through the looong string looking for
|
||||
" matching {}
|
||||
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
|
||||
|
||||
" remember the window we started at
|
||||
let phpcomplete_original_window = winnr()
|
||||
call win_execute(popup_id, 'call search(''\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)'')')
|
||||
call win_execute(popup_id, "let cfline = line('.')")
|
||||
call win_execute(popup_id, "call search('{')")
|
||||
call win_execute(popup_id, "let endline = line('.')")
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =cfile
|
||||
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
|
||||
let cfline = line('.')
|
||||
call search('{')
|
||||
let endline = line('.')
|
||||
|
||||
let content = join(getline(cfline, endline), "\n")
|
||||
call win_execute(popup_id, 'let content = join(getline('.cfline.', '.endline.'), "\n")')
|
||||
" Catch extends
|
||||
if content =~? 'extends'
|
||||
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
|
||||
@ -2117,14 +2103,16 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
else
|
||||
let implemented_interfaces = []
|
||||
endif
|
||||
call searchpair('{', '', '}', 'W')
|
||||
let class_closing_bracket_line = line('.')
|
||||
|
||||
call win_execute(popup_id, 'let [class_closing_bracket_line, class_closing_bracket_col] = searchpairpos("{", "", "}", "W")')
|
||||
|
||||
" Include class docblock
|
||||
let doc_line = cfline - 1
|
||||
if getline(doc_line) =~? '^\s*\*/'
|
||||
call win_execute(popup_id, 'let l = getline('.doc_line.')')
|
||||
if l =~? '^\s*\*/'
|
||||
while doc_line != 0
|
||||
if getline(doc_line) =~? '^\s*/\*\*'
|
||||
call win_execute(popup_id, 'let l = getline('.doc_line.')')
|
||||
if l =~? '^\s*/\*\*'
|
||||
let cfline = doc_line
|
||||
break
|
||||
endif
|
||||
@ -2132,22 +2120,22 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
endwhile
|
||||
endif
|
||||
|
||||
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
|
||||
call win_execute(popup_id, 'let classcontent = join(getline('.cfline.', '.class_closing_bracket_line.'), "\n")')
|
||||
|
||||
let used_traits = []
|
||||
" move back to the line next to the class's definition
|
||||
call cursor(endline + 1, 1)
|
||||
call win_execute(popup_id, 'call cursor('.(endline + 1).', 1)')
|
||||
let keep_searching = 1
|
||||
while keep_searching != 0
|
||||
" try to grab "use..." keywords
|
||||
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
|
||||
let syn_name = synIDattr(synID(lnum, col, 0), "name")
|
||||
call win_execute(popup_id, 'let [lnum, col] = searchpos(''\c^\s\+use\s\+'.class_name_pattern.''', "cW", '.class_closing_bracket_line.')')
|
||||
call win_execute(popup_id, 'let syn_name = synIDattr(synID('.lnum.', '.col.', 0), "name")')
|
||||
if syn_name =~? 'string\|comment'
|
||||
call cursor(lnum + 1, 1)
|
||||
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
|
||||
continue
|
||||
endif
|
||||
|
||||
let trait_line = getline(lnum)
|
||||
call win_execute(popup_id, 'let trait_line = getline('.lnum.')')
|
||||
if trait_line !~? ';'
|
||||
" try to find the next line containing ';'
|
||||
let l = lnum
|
||||
@ -2157,25 +2145,23 @@ function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_nam
|
||||
while search_line !~? ';' && l > 0
|
||||
" file lines are reversed so we need to go backwards
|
||||
let l += 1
|
||||
let search_line = getline(l)
|
||||
call win_execute(popup_id, 'let search_line = getline('.l.')')
|
||||
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
|
||||
endwhile
|
||||
endif
|
||||
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
|
||||
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
|
||||
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
|
||||
call cursor(lnum + 1, 1)
|
||||
call win_execute(popup_id, 'call cursor('.(lnum + 1).', 1)')
|
||||
|
||||
if [lnum, col] == [0, 0]
|
||||
let keep_searching = 0
|
||||
endif
|
||||
endwhile
|
||||
|
||||
silent! bw! %
|
||||
call popup_close(popup_id)
|
||||
|
||||
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
|
||||
" go back to original window
|
||||
exe phpcomplete_original_window.'wincmd w'
|
||||
call add(result, {
|
||||
\ 'class': a:class_name,
|
||||
\ 'content': classcontent,
|
||||
@ -2532,40 +2518,37 @@ function! phpcomplete#FormatDocBlock(info) " {{{
|
||||
endif
|
||||
|
||||
return res
|
||||
endfunction!
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
|
||||
let original_window = winnr()
|
||||
|
||||
silent! below 1new
|
||||
silent! 0put =a:file_lines
|
||||
normal! G
|
||||
let popup_id = popup_create(a:file_lines, {'hidden': v:true})
|
||||
call win_execute(popup_id, 'normal! G')
|
||||
|
||||
" clear out classes, functions and other blocks
|
||||
while 1
|
||||
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
|
||||
call win_execute(popup_id, 'let block_start_pos = searchpos(''\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{'', "Web")')
|
||||
if block_start_pos == [0, 0]
|
||||
break
|
||||
endif
|
||||
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
|
||||
call win_execute(popup_id, 'let block_end_pos = searchpairpos("{", "", ''}\|\%$'', "W", ''synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"'')')
|
||||
|
||||
let popup_lines = winbufnr(popup_id)->getbufline(1, '$')
|
||||
if block_end_pos != [0, 0]
|
||||
" end of the block found, just delete it
|
||||
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
|
||||
call remove(popup_lines, block_start_pos[0] - 1, block_end_pos[0] - 1)
|
||||
else
|
||||
" block pair not found, use block start as beginning and the end
|
||||
" of the buffer instead
|
||||
silent! exec block_start_pos[0].',$d _'
|
||||
call remove(popup_lines, block_start_pos[0] - 1, -1)
|
||||
endif
|
||||
call popup_settext(popup_id, popup_lines)
|
||||
endwhile
|
||||
normal! G
|
||||
call win_execute(popup_id, 'normal! G', 'silent!')
|
||||
|
||||
" grab the remains
|
||||
let file_lines = reverse(getline(1, line('.') - 1))
|
||||
|
||||
silent! bw! %
|
||||
exe original_window.'wincmd w'
|
||||
call win_execute(popup_id, "let file_lines = reverse(getline(1, line('.')-1))")
|
||||
call popup_close(popup_id)
|
||||
|
||||
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
|
||||
let i = 0
|
||||
|
@ -1,12 +1,20 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 13.0
|
||||
" Last Change: 2019 Aug 08
|
||||
" Version: 15.0
|
||||
" Last Change: 2021 Apr 27
|
||||
" Usage: For detailed help, ":help ft-syntax-omni"
|
||||
|
||||
" History
|
||||
"
|
||||
" Version 15.0
|
||||
" - SyntaxComplete ignored all buffer specific overrides, always used global
|
||||
" https://github.com/vim/vim/issues/8153
|
||||
"
|
||||
" Version 14.0
|
||||
" - Fixed issue with single quotes and is_keyword
|
||||
" https://github.com/vim/vim/issues/7463
|
||||
"
|
||||
" Version 13.0
|
||||
" - Extended the option omni_syntax_group_include_{filetype}
|
||||
" to accept a comma separated list of regex's rather than
|
||||
@ -38,7 +46,7 @@
|
||||
" let g:omni_syntax_use_single_byte = 1
|
||||
" - This by default will only allow single byte ASCII
|
||||
" characters to be added and an additional check to ensure
|
||||
" the charater is printable (see documentation for isprint).
|
||||
" the character is printable (see documentation for isprint).
|
||||
"
|
||||
" Version 9.0
|
||||
" - Add the check for cpo.
|
||||
@ -86,7 +94,7 @@ endif
|
||||
if exists('g:loaded_syntax_completion')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntax_completion = 130
|
||||
let g:loaded_syntax_completion = 150
|
||||
|
||||
" Turn on support for line continuations when creating the script
|
||||
let s:cpo_save = &cpo
|
||||
@ -141,14 +149,10 @@ let s:prepended = ''
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_ignorecase')
|
||||
if exists('g:omni_syntax_ignorecase')
|
||||
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
|
||||
else
|
||||
let b:omni_syntax_ignorecase = &ignorecase
|
||||
endif
|
||||
" Allow user to override ignorecase per buffer
|
||||
let l:omni_syntax_ignorecase = g:omni_syntax_ignorecase
|
||||
if exists('b:omni_syntax_ignorecase')
|
||||
let l:omni_syntax_ignorecase = b:omni_syntax_ignorecase
|
||||
endif
|
||||
|
||||
if a:findstart
|
||||
@ -179,7 +183,7 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
endif
|
||||
|
||||
" let base = s:prepended . a:base
|
||||
let base = s:prepended
|
||||
let base = substitute(s:prepended, "'", "''", 'g')
|
||||
|
||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
|
||||
@ -195,13 +199,13 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
if base != ''
|
||||
" let compstr = join(compl_list, ' ')
|
||||
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
|
||||
" let expr = (l:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
|
||||
" let compstr = substitute(compstr, expr, '', 'g')
|
||||
" let compl_list = split(compstr, '\s\+')
|
||||
|
||||
" Filter the list based on the first few characters the user
|
||||
" entered
|
||||
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
|
||||
let expr = 'v:val '.(l:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
|
||||
let compl_list = filter(deepcopy(compl_list), expr)
|
||||
endif
|
||||
|
||||
@ -222,6 +226,26 @@ function! syntaxcomplete#OmniSyntaxList(...)
|
||||
endif
|
||||
endfunc
|
||||
|
||||
function! syntaxcomplete#OmniSyntaxClearCache()
|
||||
let s:cache_name = []
|
||||
let s:cache_list = []
|
||||
endfunction
|
||||
|
||||
" To retrieve all syntax items regardless of syntax group:
|
||||
" echo OmniSyntaxList( [] )
|
||||
"
|
||||
" To retrieve only the syntax items for the sqlOperator syntax group:
|
||||
" echo OmniSyntaxList( ['sqlOperator'] )
|
||||
"
|
||||
" To retrieve all syntax items for both the sqlOperator and sqlType groups:
|
||||
" echo OmniSyntaxList( ['sqlOperator', 'sqlType'] )
|
||||
"
|
||||
" A regular expression can also be used:
|
||||
" echo OmniSyntaxList( ['sql\w\+'] )
|
||||
"
|
||||
" From within a plugin, you would typically assign the output to a List: >
|
||||
" let myKeywords = []
|
||||
" let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
|
||||
function! OmniSyntaxList(...)
|
||||
let list_parms = []
|
||||
if a:0 > 0
|
||||
@ -239,37 +263,25 @@ function! OmniSyntaxList(...)
|
||||
" let use_dictionary = a:1
|
||||
" endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_use_iskeyword')
|
||||
if exists('g:omni_syntax_use_iskeyword')
|
||||
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
|
||||
else
|
||||
let b:omni_syntax_use_iskeyword = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_minimum_length')
|
||||
if exists('g:omni_syntax_minimum_length')
|
||||
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
|
||||
else
|
||||
let b:omni_syntax_minimum_length = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
let saveL = @l
|
||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||
|
||||
if empty(list_parms)
|
||||
" Allow user to override per buffer
|
||||
if exists('g:omni_syntax_group_include_'.filetype)
|
||||
let l:omni_syntax_group_include_{filetype} = g:omni_syntax_group_include_{filetype}
|
||||
endif
|
||||
if exists('b:omni_syntax_group_include_'.filetype)
|
||||
let l:omni_syntax_group_include_{filetype} = b:omni_syntax_group_include_{filetype}
|
||||
endif
|
||||
|
||||
" Default the include group to include the requested syntax group
|
||||
let syntax_group_include_{filetype} = ''
|
||||
" Check if there are any overrides specified for this filetype
|
||||
if exists('g:omni_syntax_group_include_'.filetype)
|
||||
if exists('l:omni_syntax_group_include_'.filetype)
|
||||
let syntax_group_include_{filetype} =
|
||||
\ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g')
|
||||
let list_parms = split(g:omni_syntax_group_include_{filetype}, ',')
|
||||
\ substitute( l:omni_syntax_group_include_{filetype},'\s\+','','g')
|
||||
let list_parms = split(l:omni_syntax_group_include_{filetype}, ',')
|
||||
if syntax_group_include_{filetype} =~ '\w'
|
||||
let syntax_group_include_{filetype} =
|
||||
\ substitute( syntax_group_include_{filetype},
|
||||
@ -324,11 +336,20 @@ function! OmniSyntaxList(...)
|
||||
else
|
||||
" Default the exclude group to nothing
|
||||
let syntax_group_exclude_{filetype} = ''
|
||||
" Check if there are any overrides specified for this filetype
|
||||
|
||||
" Allow user to override per buffer
|
||||
if exists('g:omni_syntax_group_exclude_'.filetype)
|
||||
let l:omni_syntax_group_exclude_{filetype} = g:omni_syntax_group_exclude_{filetype}
|
||||
endif
|
||||
if exists('b:omni_syntax_group_exclude_'.filetype)
|
||||
let l:omni_syntax_group_exclude_{filetype} = b:omni_syntax_group_exclude_{filetype}
|
||||
endif
|
||||
|
||||
" Check if there are any overrides specified for this filetype
|
||||
if exists('l:omni_syntax_group_exclude_'.filetype)
|
||||
let syntax_group_exclude_{filetype} =
|
||||
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
|
||||
let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',')
|
||||
\ substitute( l:omni_syntax_group_exclude_{filetype},'\s\+','','g')
|
||||
let list_exclude_groups = split(l:omni_syntax_group_exclude_{filetype}, ',')
|
||||
if syntax_group_exclude_{filetype} =~ '\w'
|
||||
let syntax_group_exclude_{filetype} =
|
||||
\ substitute( syntax_group_exclude_{filetype},
|
||||
@ -524,6 +545,30 @@ endfunction
|
||||
|
||||
function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
|
||||
" Allow user to override iskeyword per buffer
|
||||
let l:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
|
||||
if exists('b:omni_syntax_use_iskeyword')
|
||||
let l:omni_syntax_use_iskeyword = b:omni_syntax_use_iskeyword
|
||||
endif
|
||||
|
||||
" Allow user to override iskeyword_numeric per buffer
|
||||
let l:omni_syntax_use_iskeyword_numeric = g:omni_syntax_use_iskeyword_numeric
|
||||
if exists('b:omni_syntax_use_iskeyword_numeric')
|
||||
let l:omni_syntax_use_iskeyword_numeric = b:omni_syntax_use_iskeyword_numeric
|
||||
endif
|
||||
|
||||
" Allow user to override iskeyword_numeric per buffer
|
||||
let l:omni_syntax_use_single_byte = g:omni_syntax_use_single_byte
|
||||
if exists('b:omni_syntax_use_single_byte')
|
||||
let l:omni_syntax_use_single_byte = b:omni_syntax_use_single_byte
|
||||
endif
|
||||
|
||||
" Allow user to override minimum_length per buffer
|
||||
let l:omni_syntax_minimum_length = g:omni_syntax_minimum_length
|
||||
if exists('b:omni_syntax_minimum_length')
|
||||
let l:omni_syntax_minimum_length = b:omni_syntax_minimum_length
|
||||
endif
|
||||
|
||||
let syn_list = ""
|
||||
|
||||
" From the full syntax listing, strip out the portion for the
|
||||
@ -548,7 +593,7 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
|
||||
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
|
||||
|
||||
" We only want the words for the lines begining with
|
||||
" We only want the words for the lines beginning with
|
||||
" containedin, but there could be other items.
|
||||
|
||||
" Tried to remove all lines that do not begin with contained
|
||||
@ -642,14 +687,23 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
\ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)'
|
||||
\ , "", 'g'
|
||||
\ )
|
||||
|
||||
if b:omni_syntax_use_iskeyword == 0
|
||||
|
||||
if l:omni_syntax_use_iskeyword == 0
|
||||
" There are a number of items which have non-word characters in
|
||||
" them, *'T_F1'*. vim.vim is one such file.
|
||||
" This will replace non-word characters with spaces.
|
||||
" setlocal filetype=forth
|
||||
" let g:omni_syntax_use_iskeyword = 1
|
||||
" let g:omni_syntax_use_iskeyword_numeric = 1
|
||||
" You will see entries like
|
||||
" #>>
|
||||
" (.local)
|
||||
" These were found doing a grep in vim82\syntax
|
||||
" grep iskeyword *
|
||||
" forth.vim:setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
|
||||
else
|
||||
if g:omni_syntax_use_iskeyword_numeric == 1
|
||||
if l:omni_syntax_use_iskeyword_numeric == 1
|
||||
" iskeyword can contain value like this
|
||||
" 38,42,43,45,47-58,60-62,64-90,97-122,_,+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
|
||||
" Numeric values convert to their ASCII equivalent using the
|
||||
@ -669,7 +723,7 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
" cycle through each character within the range
|
||||
let [b:start, b:end] = split(item, '-')
|
||||
for range_item in range( b:start, b:end )
|
||||
if range_item <= 127 || g:omni_syntax_use_single_byte == 0
|
||||
if range_item <= 127 || l:omni_syntax_use_single_byte == 0
|
||||
if nr2char(range_item) =~ '\p'
|
||||
let accepted_chars = accepted_chars . nr2char(range_item)
|
||||
endif
|
||||
@ -677,13 +731,13 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
endfor
|
||||
elseif item =~ '^\d\+$'
|
||||
" Only numeric, translate to a character
|
||||
if item < 127 || g:omni_syntax_use_single_byte == 0
|
||||
if item < 127 || l:omni_syntax_use_single_byte == 0
|
||||
if nr2char(item) =~ '\p'
|
||||
let accepted_chars = accepted_chars . nr2char(item)
|
||||
endif
|
||||
endif
|
||||
else
|
||||
if char2nr(item) < 127 || g:omni_syntax_use_single_byte == 0
|
||||
if char2nr(item) < 127 || l:omni_syntax_use_single_byte == 0
|
||||
if item =~ '\p'
|
||||
let accepted_chars = accepted_chars . item
|
||||
endif
|
||||
@ -719,9 +773,9 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
endif
|
||||
endif
|
||||
|
||||
if b:omni_syntax_minimum_length > 0
|
||||
if l:omni_syntax_minimum_length > 0
|
||||
" If the user specified a minimum length, enforce it
|
||||
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
|
||||
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.l:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
|
||||
endif
|
||||
else
|
||||
let syn_list = ''
|
||||
@ -751,5 +805,6 @@ function! OmniSyntaxShowChars(spec)
|
||||
endfor
|
||||
return join(map(result, 'nr2char(v:val)'), ', ')
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
26
runtime/compiler/cm3.vim
Normal file
26
runtime/compiler/cm3.vim
Normal file
@ -0,0 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Critical Mass Modula-3 Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Apr 08
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "cm3"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" TODO: better handling of Quake errors
|
||||
CompilerSet makeprg=cm3
|
||||
CompilerSet errorformat=%D---\ building\ in\ %f\ ---,
|
||||
\%W\"%f\"\\,\ line\ %l:\ warning:\ %m,
|
||||
\%E\"%f\"\\,\ line\ %l:\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
84
runtime/compiler/powershell.vim
Normal file
84
runtime/compiler/powershell.vim
Normal file
@ -0,0 +1,84 @@
|
||||
" Vim compiler file
|
||||
" Compiler: powershell
|
||||
" URL: https://github.com/PProvost/vim-ps1
|
||||
" Last Change: 2020 Mar 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "powershell"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
if !exists("g:ps1_makeprg_cmd")
|
||||
if executable('pwsh')
|
||||
" pwsh is the future
|
||||
let g:ps1_makeprg_cmd = 'pwsh'
|
||||
elseif executable('pwsh.exe')
|
||||
let g:ps1_makeprg_cmd = 'pwsh.exe'
|
||||
elseif executable('powershell.exe')
|
||||
let g:ps1_makeprg_cmd = 'powershell.exe'
|
||||
else
|
||||
let g:ps1_makeprg_cmd = ''
|
||||
endif
|
||||
endif
|
||||
|
||||
if !executable(g:ps1_makeprg_cmd)
|
||||
echoerr "To use the powershell compiler, please set g:ps1_makeprg_cmd to the powershell executable!"
|
||||
endif
|
||||
|
||||
" Show CategoryInfo, FullyQualifiedErrorId, etc?
|
||||
let g:ps1_efm_show_error_categories = get(g:, 'ps1_efm_show_error_categories', 0)
|
||||
|
||||
" Use absolute path because powershell requires explicit relative paths
|
||||
" (./file.ps1 is okay, but # expands to file.ps1)
|
||||
let &l:makeprg = g:ps1_makeprg_cmd .' %:p:S'
|
||||
|
||||
" Parse file, line, char from callstacks:
|
||||
" Write-Ouput : The term 'Write-Ouput' is not recognized as the name of a
|
||||
" cmdlet, function, script file, or operable program. Check the spelling
|
||||
" of the name, or if a path was included, verify that the path is correct
|
||||
" and try again.
|
||||
" At C:\script.ps1:11 char:5
|
||||
" + Write-Ouput $content
|
||||
" + ~~~~~~~~~~~
|
||||
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
|
||||
" + FullyQualifiedErrorId : CommandNotFoundException
|
||||
|
||||
" Showing error in context with underlining.
|
||||
CompilerSet errorformat=%+G+%m
|
||||
" Error summary.
|
||||
CompilerSet errorformat+=%E%*\\S\ :\ %m
|
||||
" Error location.
|
||||
CompilerSet errorformat+=%CAt\ %f:%l\ char:%c
|
||||
" Errors that span multiple lines (may be wrapped to width of terminal).
|
||||
CompilerSet errorformat+=%C%m
|
||||
" Ignore blank/whitespace-only lines.
|
||||
CompilerSet errorformat+=%Z\\s%#
|
||||
|
||||
if g:ps1_efm_show_error_categories
|
||||
CompilerSet errorformat^=%+G\ \ \ \ +\ %.%#\\s%#:\ %m
|
||||
else
|
||||
CompilerSet errorformat^=%-G\ \ \ \ +\ %.%#\\s%#:\ %m
|
||||
endif
|
||||
|
||||
|
||||
" Parse file, line, char from of parse errors:
|
||||
" At C:\script.ps1:22 char:16
|
||||
" + Stop-Process -Name "invalidprocess
|
||||
" + ~~~~~~~~~~~~~~~
|
||||
" The string is missing the terminator: ".
|
||||
" + CategoryInfo : ParserError: (:) [], ParseException
|
||||
" + FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
|
||||
CompilerSet errorformat+=At\ %f:%l\ char:%c
|
||||
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:set sw=2 sts=2:
|
28
runtime/compiler/sml.vim
Normal file
28
runtime/compiler/sml.vim
Normal file
@ -0,0 +1,28 @@
|
||||
" Vim compiler file
|
||||
" Compiler: SML/NJ Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2020 Feb 10
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "sml"
|
||||
|
||||
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=sml
|
||||
CompilerSet errorformat=%f:%l.%c-%\\d%\\+.%\\d%\\+\ %trror:\ %m,
|
||||
\%f:%l.%c\ %trror:\ %m,
|
||||
\%trror:\ %m
|
||||
\%f:%l.%c-%\\d%\\+.%\\d%\\+\ %tarning:\ %m,
|
||||
\%f:%l.%c\ %tarning:\ %m,
|
||||
\%tarning:\ %m,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
@ -30,6 +30,8 @@ DOCS = \
|
||||
filetype.txt \
|
||||
fold.txt \
|
||||
ft_ada.txt \
|
||||
ft_ps1.txt \
|
||||
ft_raku.txt \
|
||||
ft_rust.txt \
|
||||
ft_sql.txt \
|
||||
gui.txt \
|
||||
@ -173,6 +175,8 @@ HTMLS = \
|
||||
filetype.html \
|
||||
fold.html \
|
||||
ft_ada.html \
|
||||
ft_ps1.html \
|
||||
ft_raku.html \
|
||||
ft_rust.html \
|
||||
ft_sql.html \
|
||||
gui.html \
|
||||
|
@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jan 28
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 May 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -985,9 +985,10 @@ QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
*QuitPre*
|
||||
QuitPre When using `:quit`, `:wq` or `:qall`, before
|
||||
deciding whether it closes the current window
|
||||
or quits Vim. Can be used to close any
|
||||
non-essential window if the current window is
|
||||
the last ordinary window.
|
||||
or quits Vim. For `:wq` the buffer is written
|
||||
before QuitPre is triggered. Can be used to
|
||||
close any non-essential window if the current
|
||||
window is the last ordinary window.
|
||||
Also see |ExitPre|.
|
||||
*RemoteReply*
|
||||
RemoteReply When a reply from a Vim that functions as
|
||||
@ -1519,9 +1520,18 @@ option will not cause any commands to be executed.
|
||||
*:doautoa* *:doautoall*
|
||||
:doautoa[ll] [<nomodeline>] [group] {event} [fname]
|
||||
Like ":doautocmd", but apply the autocommands to each
|
||||
loaded buffer. Note that [fname] is used to select
|
||||
the autocommands, not the buffers to which they are
|
||||
applied.
|
||||
loaded buffer. The current buffer is done last.
|
||||
|
||||
Note that [fname] is used to select the autocommands,
|
||||
not the buffers to which they are applied. Example: >
|
||||
augroup mine
|
||||
autocmd!
|
||||
autocmd FileType * echo expand('<amatch>')
|
||||
augroup END
|
||||
doautoall mine FileType Loaded-Buffer
|
||||
< Sourcing this script, you'll see as many
|
||||
"Loaded-Buffer" echoed as there are loaded buffers.
|
||||
|
||||
Careful: Don't use this for autocommands that delete a
|
||||
buffer, change to another buffer or change the
|
||||
contents of a buffer; the result is unpredictable.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Mar 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -649,6 +649,8 @@ For other systems the tmpnam() library function is used.
|
||||
The space between `:substitute` and the 'c', 'g',
|
||||
'i', 'I' and 'r' flags isn't required, but in scripts
|
||||
it's a good idea to keep it to avoid confusion.
|
||||
Also see the two and three letter commands to repeat
|
||||
:substitute below |:substitute-repeat|.
|
||||
|
||||
:[range]~[&][flags] [count] *:~*
|
||||
Repeat last substitute with same substitute string
|
||||
@ -877,20 +879,26 @@ either the first or second pattern in parentheses did not match, so either
|
||||
*:sge* *:sgi* *:sgI* *:sgl* *:sgn* *:sgp* *:sgr* *:sI* *:si*
|
||||
*:sic* *:sIc* *:sie* *:sIe* *:sIg* *:sIl* *:sin* *:sIn* *:sIp*
|
||||
*:sip* *:sIr* *:sir* *:sr* *:src* *:srg* *:sri* *:srI* *:srl*
|
||||
*:srn* *:srp*
|
||||
*:srn* *:srp* *:substitute-repeat*
|
||||
2-letter and 3-letter :substitute commands ~
|
||||
|
||||
These commands repeat the previous `:substitute` command with the given flags.
|
||||
The first letter is always "s", followed by one or two of the possible flag
|
||||
characters. For example `:sce` works like `:s///ce`. The table lists the
|
||||
possible combinations, not all flags are possible, because the command is
|
||||
short for another command.
|
||||
|
||||
List of :substitute commands
|
||||
| c e g i I n p l r
|
||||
| c :sc :sce :scg :sci :scI :scn :scp :scl ---
|
||||
| c :sc :sce :scg :sci :scI :scn :scp :scl
|
||||
| e
|
||||
| g :sgc :sge :sg :sgi :sgI :sgn :sgp :sgl :sgr
|
||||
| i :sic :sie --- :si :siI :sin :sip --- :sir
|
||||
| i :sic :sie :si :siI :sin :sip :sir
|
||||
| I :sIc :sIe :sIg :sIi :sI :sIn :sIp :sIl :sIr
|
||||
| n
|
||||
| p
|
||||
| l
|
||||
| r :src --- :srg :sri :srI :srn :srp :srl :sr
|
||||
| r :src :srg :sri :srI :srn :srp :srl :sr
|
||||
|
||||
Exceptions:
|
||||
:scr is `:scriptnames`
|
||||
@ -1034,6 +1042,10 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
cursor to the end of line (which is more logical,
|
||||
but not Vi-compatible) use ":map Y y$".
|
||||
|
||||
*zy*
|
||||
["x]zy{motion} Yank {motion} text [into register x]. Only differs
|
||||
from `y` when selecting a block of text, see |v_zy|.
|
||||
|
||||
*v_y*
|
||||
{Visual}["x]y Yank the highlighted text [into register x] (for
|
||||
{Visual} see |Visual-mode|).
|
||||
@ -1042,6 +1054,12 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
{Visual}["x]Y Yank the highlighted lines [into register x] (for
|
||||
{Visual} see |Visual-mode|).
|
||||
|
||||
*v_zy*
|
||||
{Visual}["x]zy Yank the highlighted text [into register x]. Trailing
|
||||
whitespace at the end of each line of a selected block
|
||||
won't be yanked. Especially useful in combination
|
||||
with `zp`. (for {Visual} see |Visual-mode|)
|
||||
|
||||
*:y* *:yank* *E850*
|
||||
:[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
|
||||
"* or "+ registers is possible only when the
|
||||
@ -1118,6 +1136,12 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
Using the mouse only works when 'mouse' contains 'n'
|
||||
or 'a'.
|
||||
|
||||
["x]zp or *zp* *zP*
|
||||
["x]zP Like "p" and "P", except without adding trailing spaces
|
||||
when pasting a block. Thus the inserted text will not
|
||||
always be a rectangle. Especially useful in
|
||||
combination with |v_zy|.
|
||||
|
||||
You can use these commands to copy text from one place to another. Do this
|
||||
by first getting the text into a register with a yank, delete or change
|
||||
command, then inserting the register contents with a put command. You can
|
||||
@ -1157,6 +1181,9 @@ a register, a paste on a visual selected area will paste that single line on
|
||||
each of the selected lines (thus replacing the blockwise selected region by a
|
||||
block of the pasted line).
|
||||
|
||||
Use |zP|/|zp| to paste a blockwise yanked register without appending trailing
|
||||
spaces.
|
||||
|
||||
*blockwise-register*
|
||||
If you use a blockwise Visual mode command to get the text into the register,
|
||||
the block of text will be inserted before ("P") or after ("p") the cursor
|
||||
|
@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2021 Jan 26
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2021 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -597,9 +597,11 @@ followed by another Vim command:
|
||||
:global
|
||||
:help
|
||||
:helpfind
|
||||
:helpgrep
|
||||
:lcscope
|
||||
:ldo
|
||||
:lfdo
|
||||
:lhelpgrep
|
||||
:make
|
||||
:normal
|
||||
:perl
|
||||
@ -796,18 +798,20 @@ three lines: >
|
||||
3:d<CR> is translated into: .,.+2d<CR>
|
||||
<
|
||||
|
||||
Visual Mode and Range *v_:*
|
||||
*:star-visual-range*
|
||||
Visual Mode and Range
|
||||
*v_:*
|
||||
{Visual}: Starts a command-line with the Visual selected lines as a
|
||||
range. The code `:'<,'>` is used for this range, which makes
|
||||
it possible to select a similar line from the command-line
|
||||
history for repeating a command on different Visually selected
|
||||
lines.
|
||||
|
||||
:* *:star* *:star-visual-range*
|
||||
When Visual mode was already ended, a short way to use the
|
||||
Visual area for a range is `:*`. This requires that "*" does
|
||||
not appear in 'cpo', see |cpo-star|. Otherwise you will have
|
||||
to type `:'<,'>`
|
||||
|
||||
For when "*" is in 'cpo' see |:star-compatible|.
|
||||
|
||||
==============================================================================
|
||||
5. Ex command-line flags *ex-flags*
|
||||
@ -1130,7 +1134,7 @@ in Normal mode and Insert mode.
|
||||
It is possible to use ":", "/" and other commands that use the command-line,
|
||||
but it's not possible to open another command-line window then. There is no
|
||||
nesting.
|
||||
*E11*
|
||||
*E11* *E1188*
|
||||
The command-line window is not a normal window. It is not possible to move to
|
||||
another window or edit another buffer. All commands that would do this are
|
||||
disabled in the command-line window. Of course it _is_ possible to execute
|
||||
|
@ -1,4 +1,4 @@
|
||||
*diff.txt* For Vim version 8.2. Last change: 2019 Nov 10
|
||||
*diff.txt* For Vim version 8.2. Last change: 2021 May 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -345,9 +345,11 @@ between file1 and file2: >
|
||||
|
||||
The ">" is replaced with the value of 'shellredir'.
|
||||
|
||||
The output of "diff" must be a normal "ed" style diff or a unified diff. Do
|
||||
NOT use a context diff. This example explains the format that Vim expects for
|
||||
the "ed" style diff: >
|
||||
The output of "diff" must be a normal "ed" style diff or a unified diff. A
|
||||
context diff will NOT work. For a unified diff no context lines can be used.
|
||||
Using "diff -u" will NOT work, use "diff -U0".
|
||||
|
||||
This example explains the format that Vim expects for the "ed" style diff: >
|
||||
|
||||
1a2
|
||||
> bbb
|
||||
|
@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
*editing.txt* For Vim version 8.2. Last change: 2021 May 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1253,7 +1253,7 @@ For versions of Vim where browsing is not supported, the command is executed
|
||||
unmodified.
|
||||
|
||||
*browsefilter*
|
||||
For MS Windows and GTK, you can modify the filters that are used in the browse
|
||||
For MS-Windows and GTK, you can modify the filters that are used in the browse
|
||||
dialog. By setting the g:browsefilter or b:browsefilter variables, you can
|
||||
change the filters globally or locally to the buffer. The variable is set to
|
||||
a string in the format "{filter label}\t{pattern};{pattern}\n" where {filter
|
||||
@ -1320,8 +1320,8 @@ present in 'cpoptions' and "!" is not used in the command.
|
||||
*:chd* *:chdir*
|
||||
:chd[ir][!] [path] Same as |:cd|.
|
||||
|
||||
*:tcd*
|
||||
:tcd[!] {path} Like |:cd|, but only set the directory for the current
|
||||
*:tc* *:tcd*
|
||||
:tc[d][!] {path} Like |:cd|, but only set the directory for the current
|
||||
tab. The current window will also use this directory.
|
||||
The current directory is not changed for windows in
|
||||
other tabs and for windows in the current tab that
|
||||
@ -1331,7 +1331,7 @@ present in 'cpoptions' and "!" is not used in the command.
|
||||
:tch[dir][!] Same as |:tcd|.
|
||||
|
||||
*:tcd-*
|
||||
:tcd[!] - Change to the previous current directory, before the
|
||||
:tc[d][!] - Change to the previous current directory, before the
|
||||
last ":tcd {path}" command.
|
||||
|
||||
*:lc* *:lcd*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 May 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -439,8 +439,8 @@ Changing the order of items in a list: >
|
||||
|
||||
For loop ~
|
||||
|
||||
The |:for| loop executes commands for each item in a list. A variable is set
|
||||
to each item in the list in sequence. Example: >
|
||||
The |:for| loop executes commands for each item in a List, String or Blob.
|
||||
A variable is set to each item in sequence. Example with a List: >
|
||||
:for item in mylist
|
||||
: call Doit(item)
|
||||
:endfor
|
||||
@ -457,7 +457,7 @@ If all you want to do is modify each item in the list then the |map()|
|
||||
function will be a simpler method than a for loop.
|
||||
|
||||
Just like the |:let| command, |:for| also accepts a list of variables. This
|
||||
requires the argument to be a list of lists. >
|
||||
requires the argument to be a List of Lists. >
|
||||
:for [lnum, col] in [[1, 3], [2, 8], [3, 0]]
|
||||
: call Doit(lnum, col)
|
||||
:endfor
|
||||
@ -473,6 +473,14 @@ It is also possible to put remaining items in a List variable: >
|
||||
: endif
|
||||
:endfor
|
||||
|
||||
For a Blob one byte at a time is used.
|
||||
|
||||
For a String one character, including any composing characters, is used as a
|
||||
String. Example: >
|
||||
for c in text
|
||||
echo 'This character is ' .. c
|
||||
endfor
|
||||
|
||||
|
||||
List functions ~
|
||||
*E714*
|
||||
@ -1187,7 +1195,8 @@ byte under the cursor: >
|
||||
|
||||
In Vim9 script:
|
||||
If expr8 is a String this results in a String that contains the expr1'th
|
||||
single character from expr8. To use byte indexes use |strpart()|.
|
||||
single character (including any composing characters) from expr8. To use byte
|
||||
indexes use |strpart()|.
|
||||
|
||||
Index zero gives the first byte or character. Careful: text column numbers
|
||||
start with one!
|
||||
@ -1217,8 +1226,9 @@ In legacy Vim script the indexes are byte indexes. This doesn't recognize
|
||||
multibyte encodings, see |byteidx()| for computing the indexes. If expr8 is
|
||||
a Number it is first converted to a String.
|
||||
|
||||
In Vim9 script the indexes are character indexes. To use byte indexes use
|
||||
|strpart()|.
|
||||
In Vim9 script the indexes are character indexes and include composing
|
||||
characters. To use byte indexes use |strpart()|. To use character indexes
|
||||
without including composing characters use |strcharpart()|.
|
||||
|
||||
The item at index expr1b is included, it is inclusive. For an exclusive index
|
||||
use the |slice()| function.
|
||||
@ -1540,8 +1550,11 @@ the following ways:
|
||||
|
||||
The arguments are optional. Example: >
|
||||
:let F = {-> 'error function'}
|
||||
:echo F()
|
||||
:echo F('ignored')
|
||||
< error function
|
||||
|
||||
Note that in Vim9 script another kind of lambda can be used: |vim9-lambda|.
|
||||
|
||||
*closure*
|
||||
Lambda expressions can access outer scope variables and arguments. This is
|
||||
often called a closure. Example where "i" and "a:arg" are used in a lambda
|
||||
@ -1576,7 +1589,7 @@ The lambda expression is also useful for Channel, Job and timer: >
|
||||
Handler called
|
||||
|
||||
Note how execute() is used to execute an Ex command. That's ugly though.
|
||||
|
||||
In Vim9 script you can use a command block, see |inline-function|.
|
||||
|
||||
Lambda expressions have internal names like '<lambda>42'. If you get an error
|
||||
for a lambda expression, you can find what it is with the following command: >
|
||||
@ -1949,6 +1962,9 @@ v:fcs_choice What should happen after a |FileChangedShell| event was
|
||||
The default is empty. If another (invalid) value is used then
|
||||
Vim behaves like it is empty, there is no warning message.
|
||||
|
||||
*v:fname* *fname-variable*
|
||||
v:fname The file name set by 'includeexpr'. Empty otherwise.
|
||||
|
||||
*v:fname_in* *fname_in-variable*
|
||||
v:fname_in The name of the input file. Valid while evaluating:
|
||||
option used for ~
|
||||
@ -2430,6 +2446,7 @@ assert_inrange({lower}, {upper}, {actual} [, {msg}])
|
||||
Number assert {actual} is inside the range
|
||||
assert_match({pat}, {text} [, {msg}])
|
||||
Number assert {pat} matches {text}
|
||||
assert_nobeep({cmd}) Number assert {cmd} does not cause a beep
|
||||
assert_notequal({exp}, {act} [, {msg}])
|
||||
Number assert {exp} is not equal {act}
|
||||
assert_notmatch({pat}, {text} [, {msg}])
|
||||
@ -2577,10 +2594,12 @@ getbufline({expr}, {lnum} [, {end}])
|
||||
getbufvar({expr}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {expr}
|
||||
getchangelist([{expr}]) List list of change list items
|
||||
getchar([expr]) Number get one character from the user
|
||||
getchar([expr]) Number or String
|
||||
get one character from the user
|
||||
getcharmod() Number modifiers for the last typed character
|
||||
getcharpos({expr}) List position of cursor, mark, etc.
|
||||
getcharsearch() Dict last character search
|
||||
getcharstr([expr]) String get one character from the user
|
||||
getcmdline() String return the current command-line
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcmdtype() String return current command-line type
|
||||
@ -2923,10 +2942,11 @@ str2list({expr} [, {utf8}]) List convert each character of {expr} to
|
||||
ASCII/UTF8 value
|
||||
str2nr({expr} [, {base} [, {quoted}]])
|
||||
Number convert String to Number
|
||||
strcharpart({str}, {start} [, {len}])
|
||||
strcharlen({expr}) Number character length of the String {expr}
|
||||
strcharpart({str}, {start} [, {len} [, {skipcc}]])
|
||||
String {len} characters of {str} at
|
||||
character {start}
|
||||
strchars({expr} [, {skipcc}]) Number character length of the String {expr}
|
||||
strchars({expr} [, {skipcc}]) Number character count of the String {expr}
|
||||
strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
|
||||
strftime({format} [, {time}]) String format time with a specified format
|
||||
strgetchar({str}, {index}) Number get char {index} from {str}
|
||||
@ -5096,6 +5116,13 @@ getbufinfo([{dict}])
|
||||
listed TRUE if the buffer is listed.
|
||||
lnum Line number used for the buffer when
|
||||
opened in the current window.
|
||||
Only valid if the buffer has been
|
||||
displayed in the window in the past.
|
||||
If you want the line number of the
|
||||
last known cursor position in a given
|
||||
window, use |line()|: >
|
||||
:echo line('.', {winid})
|
||||
<
|
||||
linecount Number of lines in the buffer (only
|
||||
valid when loaded)
|
||||
loaded TRUE if the buffer is loaded.
|
||||
@ -5207,6 +5234,7 @@ getchar([expr]) *getchar()*
|
||||
Return zero otherwise.
|
||||
If [expr] is 1, only check if a character is available, it is
|
||||
not consumed. Return zero if no character available.
|
||||
If you prefer always getting a string use |getcharstr()|.
|
||||
|
||||
Without [expr] and when [expr] is 0 a whole character or
|
||||
special key is returned. If it is a single character, the
|
||||
@ -5300,6 +5328,9 @@ getcharpos({expr})
|
||||
Get the position for {expr}. Same as |getpos()| but the column
|
||||
number in the returned List is a character index instead of
|
||||
a byte index.
|
||||
If |getpos()| returns a very large column number, such as
|
||||
2147483647, then getcharpos() will return the character index
|
||||
of the last character.
|
||||
|
||||
Example:
|
||||
With the cursor on '세' in line 5 with text "여보세요": >
|
||||
@ -5329,6 +5360,20 @@ getcharsearch() *getcharsearch()*
|
||||
:nnoremap <expr> , getcharsearch().forward ? ',' : ';'
|
||||
< Also see |setcharsearch()|.
|
||||
|
||||
|
||||
getcharstr([expr]) *getcharstr()*
|
||||
Get a single character from the user or input stream as a
|
||||
string.
|
||||
If [expr] is omitted, wait until a character is available.
|
||||
If [expr] is 0 or false, only get a character when one is
|
||||
available. Return an empty string otherwise.
|
||||
If [expr] is 1 or true, only check if a character is
|
||||
available, it is not consumed. Return an empty string
|
||||
if no character is available.
|
||||
Otherwise this works like |getchar()|, except that a number
|
||||
result is converted to a string.
|
||||
|
||||
|
||||
getcmdline() *getcmdline()*
|
||||
Return the current command-line. Only works when the command
|
||||
line is being edited, thus requires use of |c_CTRL-\_e| or
|
||||
@ -5750,7 +5795,6 @@ getmousepos() *getmousepos()*
|
||||
|
||||
If the mouse is over a popup window then that window is used.
|
||||
|
||||
|
||||
When using |getchar()| the Vim variables |v:mouse_lnum|,
|
||||
|v:mouse_col| and |v:mouse_winid| also provide these values.
|
||||
|
||||
@ -5779,6 +5823,8 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
The column number in the returned List is the byte position
|
||||
within the line. To get the character position in the line,
|
||||
use |getcharpos()|
|
||||
The column number can be very large, e.g. 2147483647, in which
|
||||
case it means "after the end of the line".
|
||||
This can be used to save and restore the position of a mark: >
|
||||
let save_a_mark = getpos("'a")
|
||||
...
|
||||
@ -5903,6 +5949,7 @@ getreg([{regname} [, 1 [, {list}]]]) *getreg()*
|
||||
When the register was not set an empty list is returned.
|
||||
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getreg()
|
||||
@ -5930,6 +5977,7 @@ getreginfo([{regname}]) *getreginfo()*
|
||||
will be returned.
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
The returned Dictionary can be passed to |setreg()|.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getreginfo()
|
||||
@ -5943,6 +5991,7 @@ getregtype([{regname}]) *getregtype()*
|
||||
"" for an empty or unknown register
|
||||
<CTRL-V> is one character with value 0x16.
|
||||
If {regname} is not specified, |v:register| is used.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getregtype()
|
||||
@ -6060,7 +6109,7 @@ getwininfo([{winid}]) *getwininfo()*
|
||||
tab pages is returned.
|
||||
|
||||
Each List item is a |Dictionary| with the following entries:
|
||||
botline last displayed buffer line
|
||||
botline last complete displayed buffer line
|
||||
bufnr number of buffer in the window
|
||||
height window height (excluding winbar)
|
||||
loclist 1 if showing a location list
|
||||
@ -6076,12 +6125,12 @@ getwininfo([{winid}]) *getwininfo()*
|
||||
width window width
|
||||
winbar 1 if the window has a toolbar, 0
|
||||
otherwise
|
||||
wincol leftmost screen column of the window,
|
||||
col from |win_screenpos()|
|
||||
wincol leftmost screen column of the window;
|
||||
"col" from |win_screenpos()|
|
||||
winid |window-ID|
|
||||
winnr window number
|
||||
winrow topmost screen column of the window,
|
||||
row from |win_screenpos()|
|
||||
winrow topmost screen line of the window;
|
||||
"row" from |win_screenpos()|
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinnr()->getwininfo()
|
||||
@ -6691,6 +6740,7 @@ islocked({expr}) *islocked()* *E786*
|
||||
|
||||
< When {expr} is a variable that does not exist you get an error
|
||||
message. Use |exists()| to check for existence.
|
||||
In Vim9 script it does not work for local variables.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->islocked()
|
||||
@ -7447,7 +7497,8 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
|
||||
to be used when fast match additions and deletions are
|
||||
required, for example to highlight matching parentheses.
|
||||
|
||||
The list {pos} can contain one of these items:
|
||||
{pos} is a list of positions. Each position can be one of
|
||||
these:
|
||||
- A number. This whole line will be highlighted. The first
|
||||
line has number 1.
|
||||
- A list with one number, e.g., [23]. The whole line with this
|
||||
@ -7460,7 +7511,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
|
||||
- A list with three numbers, e.g., [23, 11, 3]. As above, but
|
||||
the third number gives the length of the highlight in bytes.
|
||||
|
||||
The maximum number of positions is 8.
|
||||
The maximum number of positions in {pos} is 8.
|
||||
|
||||
Example: >
|
||||
:highlight MyGroup ctermbg=green guibg=green
|
||||
@ -7469,8 +7520,7 @@ matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
|
||||
:call matchdelete(m)
|
||||
|
||||
< Matches added by |matchaddpos()| are returned by
|
||||
|getmatches()| with an entry "pos1", "pos2", etc., with the
|
||||
value a list like the {pos} item.
|
||||
|getmatches()|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetGroup()->matchaddpos([23, 11])
|
||||
@ -7558,6 +7608,9 @@ matchfuzzy({list}, {str} [, {dict}]) *matchfuzzy()*
|
||||
empty list is returned. If length of {str} is greater than
|
||||
256, then returns an empty list.
|
||||
|
||||
Refer to |fuzzy-match| for more information about fuzzy
|
||||
matching strings.
|
||||
|
||||
Example: >
|
||||
:echo matchfuzzy(["clay", "crow"], "cay")
|
||||
< results in ["clay"]. >
|
||||
@ -9155,6 +9208,8 @@ searchpair({start}, {middle}, {end} [, {flags} [, {skip}
|
||||
and -1 returned.
|
||||
{skip} can be a string, a lambda, a funcref or a partial.
|
||||
Anything else makes the function fail.
|
||||
In a `:def` function when the {skip} argument is a string
|
||||
constant it is compiled into instructions.
|
||||
|
||||
For {stopline} and {timeout} see |search()|.
|
||||
|
||||
@ -9658,6 +9713,7 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
setreg({regname}, {value} [, {options}])
|
||||
Set the register {regname} to {value}.
|
||||
If {regname} is "" or "@", the unnamed register '"' is used.
|
||||
In |Vim9-script| {regname} must be one character.
|
||||
|
||||
{value} may be any value returned by |getreg()| or
|
||||
|getreginfo()|, including a |List| or |Dict|.
|
||||
@ -9909,7 +9965,7 @@ slice({expr}, {start} [, {end}]) *slice()*
|
||||
Similar to using a |slice| "expr[start : end]", but "end" is
|
||||
used exclusive. And for a string the indexes are used as
|
||||
character indexes instead of byte indexes, like in
|
||||
|vim9script|.
|
||||
|vim9script|. Also, composing characters are not counted.
|
||||
When {end} is omitted the slice continues to the last item.
|
||||
When {end} is -1 the last item is omitted.
|
||||
|
||||
@ -10267,23 +10323,44 @@ str2nr({expr} [, {base} [, {quoted}]]) *str2nr()*
|
||||
Can also be used as a |method|: >
|
||||
GetText()->str2nr()
|
||||
|
||||
strcharpart({src}, {start} [, {len}]) *strcharpart()*
|
||||
|
||||
strcharlen({expr}) *strcharlen()*
|
||||
The result is a Number, which is the number of characters
|
||||
in String {expr}. Composing characters are ignored.
|
||||
|strchars()| can count the number of characters, counting
|
||||
composing characters separately.
|
||||
|
||||
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetText()->strcharlen()
|
||||
|
||||
|
||||
strcharpart({src}, {start} [, {len} [, {skipcc}]]) *strcharpart()*
|
||||
Like |strpart()| but using character index and length instead
|
||||
of byte index and length.
|
||||
When {skipcc} is omitted or zero, composing characters are
|
||||
counted separately.
|
||||
When {skipcc} set to 1, Composing characters are ignored,
|
||||
similar to |slice()|.
|
||||
When a character index is used where a character does not
|
||||
exist it is assumed to be one character. For example: >
|
||||
exist it is omitted and counted as one character. For
|
||||
example: >
|
||||
strcharpart('abc', -1, 2)
|
||||
< results in 'a'.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetText()->strcharpart(5)
|
||||
|
||||
|
||||
strchars({expr} [, {skipcc}]) *strchars()*
|
||||
The result is a Number, which is the number of characters
|
||||
in String {expr}.
|
||||
When {skipcc} is omitted or zero, composing characters are
|
||||
counted separately.
|
||||
When {skipcc} set to 1, Composing characters are ignored.
|
||||
|strcharlen()| always does this.
|
||||
|
||||
Also see |strlen()|, |strdisplaywidth()| and |strwidth()|.
|
||||
|
||||
{skipcc} is only available after 7.4.755. For backward
|
||||
@ -11817,7 +11894,7 @@ gui_mac Compiled with Macintosh GUI.
|
||||
gui_motif Compiled with Motif GUI.
|
||||
gui_photon Compiled with Photon GUI.
|
||||
gui_running Vim is running in the GUI, or it will start soon.
|
||||
gui_win32 Compiled with MS Windows Win32 GUI.
|
||||
gui_win32 Compiled with MS-Windows Win32 GUI.
|
||||
gui_win32s idem, and Win32s system being used (Windows 3.1)
|
||||
haiku Haiku version of Vim.
|
||||
hangul_input Compiled with Hangul input support. |hangul|
|
||||
@ -12769,8 +12846,8 @@ text...
|
||||
it can no longer be changed (until it is unlocked).
|
||||
A locked variable can be deleted: >
|
||||
:lockvar v
|
||||
:let v = 'asdf' " fails!
|
||||
:unlet v
|
||||
:let v = 'asdf' " fails!
|
||||
:unlet v " works
|
||||
< *E741* *E940*
|
||||
If you try to change a locked variable you get an
|
||||
error message: "E741: Value is locked: {name}".
|
||||
@ -13108,7 +13185,12 @@ text...
|
||||
< If you just want a highlighted message use |:echohl|.
|
||||
And to get a beep: >
|
||||
:exe "normal \<Esc>"
|
||||
<
|
||||
|
||||
:echoc[onsole] {expr1} .. *:echoc* *:echoconsole*
|
||||
Intended for testing: works like `:echomsg` but when
|
||||
running in the GUI and started from a terminal write
|
||||
the text to stdout.
|
||||
|
||||
*:eval*
|
||||
:eval {expr} Evaluate {expr} and discard the result. Example: >
|
||||
:eval Getlist()->Filter()->append('$')
|
||||
@ -13138,7 +13220,7 @@ text...
|
||||
Cannot be followed by a comment.
|
||||
Examples: >
|
||||
:execute "buffer" nextbuf
|
||||
:execute "normal" count . "w"
|
||||
:execute "normal" count .. "w"
|
||||
<
|
||||
":execute" can be used to append a command to commands
|
||||
that don't accept a '|'. Example: >
|
||||
@ -13154,8 +13236,8 @@ text...
|
||||
file names. The |fnameescape()| function can be used
|
||||
for Vim commands, |shellescape()| for |:!| commands.
|
||||
Examples: >
|
||||
:execute "e " . fnameescape(filename)
|
||||
:execute "!ls " . shellescape(filename, 1)
|
||||
:execute "e " .. fnameescape(filename)
|
||||
:execute "!ls " .. shellescape(filename, 1)
|
||||
<
|
||||
Note: The executed string may be any command-line, but
|
||||
starting or ending "if", "while" and "for" does not
|
||||
|
@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
*filetype.txt* For Vim version 8.2. Last change: 2021 Mar 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -628,6 +628,13 @@ For fish, add to the config file
|
||||
|
||||
set -x MANPAGER "vim -M +MANPAGER -"
|
||||
|
||||
|
||||
MARKDOWN *ft-markdown-plugin*
|
||||
|
||||
To enable folding use this: >
|
||||
let g:markdown_folding = 1
|
||||
<
|
||||
|
||||
PDF *ft-pdf-plugin*
|
||||
|
||||
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
|
||||
|
64
runtime/doc/ft_ps1.txt
Normal file
64
runtime/doc/ft_ps1.txt
Normal file
@ -0,0 +1,64 @@
|
||||
*ps1.txt* A Windows PowerShell syntax plugin for Vim
|
||||
|
||||
Author: Peter Provost <https://www.github.com/PProvost>
|
||||
License: Apache 2.0
|
||||
URL: https://github.com/PProvost/vim-ps1
|
||||
|
||||
INTRODUCTION *ps1-syntax*
|
||||
|
||||
This plugin provides Vim syntax, indent and filetype detection for Windows
|
||||
PowerShell scripts, modules, and XML configuration files.
|
||||
|
||||
|
||||
ABOUT *ps1-about*
|
||||
|
||||
Grab the latest version or report a bug on GitHub:
|
||||
|
||||
https://github.com/PProvost/vim-ps1
|
||||
|
||||
|
||||
FOLDING *ps1-folding*
|
||||
|
||||
The ps1 syntax file provides syntax folding (see |:syn-fold|) for script blocks
|
||||
and digital signatures in scripts.
|
||||
|
||||
When 'foldmethod' is set to "syntax" then function script blocks will be
|
||||
folded unless you use the following in your .vimrc or before opening a script: >
|
||||
|
||||
:let g:ps1_nofold_blocks = 1
|
||||
<
|
||||
Digital signatures in scripts will also be folded unless you use: >
|
||||
|
||||
:let g:ps1_nofold_sig = 1
|
||||
<
|
||||
Note: syntax folding might slow down syntax highlighting significantly,
|
||||
especially for large files.
|
||||
|
||||
|
||||
COMPILER *ps1-compiler*
|
||||
|
||||
The powershell `:compiler` script configures |:make| to execute the script in
|
||||
PowerShell.
|
||||
|
||||
It tries to pick a smart default PowerShell command: `pwsh` if available and
|
||||
`powershell` otherwise, but you can customize the command: >
|
||||
|
||||
:let g:ps1_makeprg_cmd = '/path/to/pwsh'
|
||||
<
|
||||
To configure whether to show the exception type information: >
|
||||
|
||||
:let g:ps1_efm_show_error_categories = 1
|
||||
<
|
||||
|
||||
KEYWORD LOOKUP *ps1-keyword*
|
||||
|
||||
To look up keywords using PowerShell's Get-Help, press the |K| key. For more
|
||||
convenient paging, the pager `less` should be installed, which is included in
|
||||
many Linux distributions and in macOS.
|
||||
|
||||
Many other distributions are available for Windows like
|
||||
https://chocolatey.org/packages/less/. Make sure `less` is in a directory
|
||||
listed in the `PATH` environment variable, which chocolatey above does.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
vim:ft=help:
|
126
runtime/doc/ft_raku.txt
Normal file
126
runtime/doc/ft_raku.txt
Normal file
@ -0,0 +1,126 @@
|
||||
*vim-raku.txt* The Raku programming language filetype
|
||||
|
||||
*vim-raku*
|
||||
|
||||
Vim-raku provides syntax highlighting, indentation, and other support for
|
||||
editing Raku programs.
|
||||
|
||||
1. Using Unicode in your Raku files |raku-unicode|
|
||||
|
||||
==============================================================================
|
||||
1. Using Unicode in your Raku files *raku-unicode*
|
||||
|
||||
Defining new operators using Unicode symbols is a good way to make your
|
||||
Raku program easy to read. See:
|
||||
https://perl6advent.wordpress.com/2012/12/18/day-18-formulas-resistance-is-futile/
|
||||
|
||||
While Raku does define ASCII alternatives for some common operators (see
|
||||
https://docs.raku.org/language/unicode_ascii), using the full range of
|
||||
Unicode operators is highly desirable. Your operating system provides input
|
||||
facilities, but using the features built in to Vim may be preferable.
|
||||
|
||||
The natural way to produce these symbols in Vim is to use digraph shortcuts
|
||||
(:help |digraphs-use|). Many of them are defined; type `:digraphs` to get
|
||||
the list. A convenient way to read the list of digraphs is to save them in a
|
||||
file. From the shell: >
|
||||
vim +'redir >/tmp/vim-digraphs-listing.txt' +digraphs +'redir END' +q
|
||||
|
||||
Some of them are available with standard Vim digraphs:
|
||||
<< « /0 ∅ !< ≮ ~
|
||||
>> » Ob ∘ !> ≯ ~
|
||||
., … 00 ∞ (C ⊂ ~
|
||||
(U ∩ -: ÷ )C ⊃ ~
|
||||
)U ∪ (_ ⊆ >= ≥ ~
|
||||
?= ≅ )_ ⊇ =< ≤ ~
|
||||
(- ∈ ?= ≅ != ≠ ~
|
||||
-) ∋ ?- ≃ ~
|
||||
|
||||
The Greek alphabet is available with '*' followed by a similar Latin symbol:
|
||||
*p π ~
|
||||
*t τ ~
|
||||
*X × ~
|
||||
|
||||
Numbers, subscripts and superscripts are available with 's' and 'S':
|
||||
0s ₀ 0S ⁰ ~
|
||||
1s ₁ 1S ¹ ~
|
||||
2s ₂ 9S ⁹ ~
|
||||
|
||||
But some don´t come defined by default. Those are digraph definitions you can
|
||||
add in your ~/.vimrc file. >
|
||||
exec 'digraph \\ '.char2nr('∖')
|
||||
exec 'digraph \< '.char2nr('≼')
|
||||
exec 'digraph \> '.char2nr('≽')
|
||||
exec 'digraph (L '.char2nr('⊈')
|
||||
exec 'digraph )L '.char2nr('⊉')
|
||||
exec 'digraph (/ '.char2nr('⊄')
|
||||
exec 'digraph )/ '.char2nr('⊅')
|
||||
exec 'digraph )/ '.char2nr('⊅')
|
||||
exec 'digraph U+ '.char2nr('⊎')
|
||||
exec 'digraph 0- '.char2nr('⊖')
|
||||
" Euler's constant
|
||||
exec 'digraph ne '.char2nr('𝑒')
|
||||
" Raku's atomic operations marker
|
||||
exec 'digraph @@ '.char2nr('⚛')
|
||||
|
||||
Alternatively, you can write Insert mode abbreviations that convert ASCII-
|
||||
based operators into their single-character Unicode equivalent. >
|
||||
iabbrev <buffer> !(<) ⊄
|
||||
iabbrev <buffer> !(<=) ⊈
|
||||
iabbrev <buffer> !(>) ⊅
|
||||
iabbrev <buffer> !(>=) ⊉
|
||||
iabbrev <buffer> !(cont) ∌
|
||||
iabbrev <buffer> !(elem) ∉
|
||||
iabbrev <buffer> != ≠
|
||||
iabbrev <buffer> (&) ∩
|
||||
iabbrev <buffer> (+) ⊎
|
||||
iabbrev <buffer> (-) ∖
|
||||
iabbrev <buffer> (.) ⊍
|
||||
iabbrev <buffer> (<) ⊂
|
||||
iabbrev <buffer> (<+) ≼
|
||||
iabbrev <buffer> (<=) ⊆
|
||||
iabbrev <buffer> (>) ⊃
|
||||
iabbrev <buffer> (>+) ≽
|
||||
iabbrev <buffer> (>=) ⊇
|
||||
iabbrev <buffer> (\|) ∪
|
||||
iabbrev <buffer> (^) ⊖
|
||||
iabbrev <buffer> (atomic) ⚛
|
||||
iabbrev <buffer> (cont) ∋
|
||||
iabbrev <buffer> (elem) ∈
|
||||
iabbrev <buffer> * ×
|
||||
iabbrev <buffer> **0 ⁰
|
||||
iabbrev <buffer> **1 ¹
|
||||
iabbrev <buffer> **2 ²
|
||||
iabbrev <buffer> **3 ³
|
||||
iabbrev <buffer> **4 ⁴
|
||||
iabbrev <buffer> **5 ⁵
|
||||
iabbrev <buffer> **6 ⁶
|
||||
iabbrev <buffer> **7 ⁷
|
||||
iabbrev <buffer> **8 ⁸
|
||||
iabbrev <buffer> **9 ⁹
|
||||
iabbrev <buffer> ... …
|
||||
iabbrev <buffer> / ÷
|
||||
iabbrev <buffer> << «
|
||||
iabbrev <buffer> <<[=]<< «=«
|
||||
iabbrev <buffer> <<[=]>> «=»
|
||||
iabbrev <buffer> <= ≤
|
||||
iabbrev <buffer> =~= ≅
|
||||
iabbrev <buffer> >= ≥
|
||||
iabbrev <buffer> >> »
|
||||
iabbrev <buffer> >>[=]<< »=«
|
||||
iabbrev <buffer> >>[=]>> »=»
|
||||
iabbrev <buffer> Inf ∞
|
||||
iabbrev <buffer> atomic-add-fetch ⚛+=
|
||||
iabbrev <buffer> atomic-assign ⚛=
|
||||
iabbrev <buffer> atomic-fetch ⚛
|
||||
iabbrev <buffer> atomic-dec-fetch --⚛
|
||||
iabbrev <buffer> atomic-fetch-dec ⚛--
|
||||
iabbrev <buffer> atomic-fetch-inc ⚛++
|
||||
iabbrev <buffer> atomic-inc-fetch ++⚛
|
||||
iabbrev <buffer> atomic-sub-fetch ⚛−=
|
||||
iabbrev <buffer> e 𝑒
|
||||
iabbrev <buffer> o ∘
|
||||
iabbrev <buffer> pi π
|
||||
iabbrev <buffer> set() ∅
|
||||
iabbrev <buffer> tau τ
|
||||
<
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
@ -440,7 +440,7 @@ the space bar):
|
||||
replace the column list with the list of tables.
|
||||
- This allows you to quickly drill down into a
|
||||
table to view its columns and back again.
|
||||
- <Right> and <Left> can be also be chosen via
|
||||
- <Right> and <Left> can also be chosen via
|
||||
your |.vimrc| >
|
||||
let g:ftplugin_sql_omni_key_right = '<Right>'
|
||||
let g:ftplugin_sql_omni_key_left = '<Left>'
|
||||
|
@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 8.2. Last change: 2020 Sep 28
|
||||
*gui.txt* For Vim version 8.2. Last change: 2021 May 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -620,6 +620,11 @@ expression register: >
|
||||
|
||||
:amenu Insert.foobar "='foobar'<CR>P
|
||||
|
||||
The special text <Cmd> begins a "command menu", it executes the command
|
||||
directly without changing modes. Where you might use ":...<CR>" you can
|
||||
instead use "<Cmd>...<CR>". See |<Cmd>| for more info. Example: >
|
||||
anoremenu File.Next <Cmd>next<CR>
|
||||
|
||||
Note that the '<' and 'k' flags in 'cpoptions' also apply here (when
|
||||
included they make the <> form and raw key codes not being recognized).
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 8.2. Last change: 2020 Mar 25
|
||||
*gui_w32.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -403,7 +403,7 @@ The "File/Print" menu prints the text with syntax highlighting, see
|
||||
printer installed this should also work: >
|
||||
:w >>prn
|
||||
|
||||
Vim supports a number of standard MS Windows features. Some of these are
|
||||
Vim supports a number of standard MS-Windows features. Some of these are
|
||||
detailed elsewhere: see |'mouse'|, |win32-hidden-menus|.
|
||||
|
||||
*drag-n-drop-win32*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*if_lua.txt* For Vim version 8.2. Last change: 2020 Jun 28
|
||||
*if_lua.txt* For Vim version 8.2. Last change: 2021 Apr 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Luis Carvalho
|
||||
@ -208,6 +208,8 @@ Vim evaluation and command execution, and others.
|
||||
created on demand. Example: >
|
||||
:lua print(vim.fn.has('timers'))
|
||||
<
|
||||
vim.lua_version The Lua version Vim was compiled with, in the
|
||||
form {major}.{minor}.{patch}, e.g. "5.1.4".
|
||||
|
||||
==============================================================================
|
||||
3. List userdata *lua-list*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 8.2. Last change: 2019 Jul 21
|
||||
*if_tcl.txt* For Vim version 8.2. Last change: 2021 May 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
@ -25,12 +25,12 @@ comments, ideas etc to <Ingo.Wilken@informatik.uni-oldenburg.de>
|
||||
==============================================================================
|
||||
1. Commands *tcl-ex-commands* *E571* *E572*
|
||||
|
||||
*:tcl* *:tc*
|
||||
:tc[l] {cmd} Execute Tcl command {cmd}. A simple check if `:tcl`
|
||||
*:tcl*
|
||||
:tcl {cmd} Execute Tcl command {cmd}. A simple check if `:tcl`
|
||||
is working: >
|
||||
:tcl puts "Hello"
|
||||
|
||||
:[range]tc[l] << [trim] [{endmarker}]
|
||||
:[range]tcl << [trim] [{endmarker}]
|
||||
{script}
|
||||
{endmarker}
|
||||
Execute Tcl script {script}.
|
||||
|
@ -610,14 +610,14 @@ the use of square and curly brackets, and otherwise by community convention.
|
||||
These conventions are not universally followed, so the Clojure indent script
|
||||
offers a few configurable options, listed below.
|
||||
|
||||
If the current vim does not include |searchpairpos()|, the indent script falls
|
||||
If the current vim does not include searchpairpos(), the indent script falls
|
||||
back to normal 'lisp' indenting, and the following options are ignored.
|
||||
|
||||
*g:clojure_maxlines*
|
||||
|
||||
Set maximum scan distance of |searchpairpos()|. Larger values trade
|
||||
performance for correctness when dealing with very long forms. A value of 0
|
||||
will scan without limits.
|
||||
Set maximum scan distance of searchpairpos(). Larger values trade performance
|
||||
for correctness when dealing with very long forms. A value of 0 will scan
|
||||
without limits.
|
||||
>
|
||||
" Default
|
||||
let g:clojure_maxlines = 100
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Jan 15
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 May 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -864,6 +864,8 @@ tag char note action in Normal mode ~
|
||||
|zm| zm subtract one from 'foldlevel'
|
||||
|zn| zn reset 'foldenable'
|
||||
|zo| zo open fold
|
||||
|zp| zp paste in block-mode without trailing spaces
|
||||
|zP| zP paste in block-mode without trailing spaces
|
||||
|zr| zr add one to 'foldlevel'
|
||||
|zs| zs when 'wrap' off scroll horizontally to
|
||||
position the cursor at the start (left
|
||||
@ -876,6 +878,7 @@ tag char note action in Normal mode ~
|
||||
|zv| zv open enough folds to view the cursor line
|
||||
|zw| zw permanently mark word as incorrectly spelled
|
||||
|zx| zx re-apply 'foldlevel' and do "zv"
|
||||
|zy| zy yank without trailing spaces
|
||||
|zz| zz redraw, cursor line at center of window
|
||||
|z<Left>| z<Left> same as "zh"
|
||||
|z<Right>| z<Right> same as "zl"
|
||||
@ -1176,6 +1179,7 @@ tag command action ~
|
||||
|:bNext| :bN[ext] go to previous buffer in the buffer list
|
||||
|:ball| :ba[ll] open a window for each buffer in the buffer list
|
||||
|:badd| :bad[d] add buffer to the buffer list
|
||||
|:balt| :balt like ":badd" but also set the alternate file
|
||||
|:bdelete| :bd[elete] remove a buffer from the buffer list
|
||||
|:behave| :be[have] set mouse and selection behavior
|
||||
|:belowright| :bel[owright] make split window appear right or below
|
||||
@ -1293,6 +1297,7 @@ tag command action ~
|
||||
|:edit| :e[dit] edit a file
|
||||
|:earlier| :ea[rlier] go to older change, undo
|
||||
|:echo| :ec[ho] echoes the result of expressions
|
||||
|:echoconsole| :echoc[onsole] like :echomsg but write to stdout
|
||||
|:echoerr| :echoe[rr] like :echo, show like an error and use history
|
||||
|:echohl| :echoh[l] set highlighting for echo commands
|
||||
|:echomsg| :echom[sg] same as :echo, put message in history
|
||||
@ -1394,6 +1399,7 @@ tag command action ~
|
||||
|:lfdo| :lfd[o] execute command in each file in location list
|
||||
|:left| :le[ft] left align lines
|
||||
|:leftabove| :lefta[bove] make split window appear left or above
|
||||
|:legacy| :leg[acy] make following command use legacy script syntax
|
||||
|:let| :let assign a value to a variable or option
|
||||
|:lexpr| :lex[pr] read locations from expr and jump to first
|
||||
|:lfile| :lf[ile] read file with locations and jump to first
|
||||
@ -1654,9 +1660,9 @@ tag command action ~
|
||||
|:tab| :tab create new tab when opening new window
|
||||
|:tag| :ta[g] jump to tag
|
||||
|:tags| :tags show the contents of the tag stack
|
||||
|:tcd| :tcd change directory for tab page
|
||||
|:tcd| :tc[d] change directory for tab page
|
||||
|:tchdir| :tch[dir] change directory for tab page
|
||||
|:tcl| :tc[l] execute Tcl command
|
||||
|:tcl| :tcl execute Tcl command
|
||||
|:tcldo| :tcld[o] execute Tcl command for each line
|
||||
|:tclfile| :tclf[ile] execute Tcl script file
|
||||
|:tearoff| :te[aroff] tear-off a menu
|
||||
@ -1698,7 +1704,8 @@ tag command action ~
|
||||
|: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
|
||||
|:vim9script| :vim9[script] indicates Vim9 script file
|
||||
|:vim9cmd| :vim9[cmd] make following command use Vim9 script syntax
|
||||
|:vim9script| :vim9s[cript] indicates Vim9 script file
|
||||
|:vimgrep| :vim[grep] search for pattern in files
|
||||
|:vimgrepadd| :vimgrepa[dd] like :vimgrep, but append to current list
|
||||
|:visual| :vi[sual] same as ":edit", but turns off "Ex" mode
|
||||
|
@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2020 Dec 10
|
||||
*map.txt* For Vim version 8.2. Last change: 2021 May 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -244,9 +244,12 @@ have a look at |maparg()|.
|
||||
If the first argument to one of these commands is "<expr>" and it is used to
|
||||
define a new mapping or abbreviation, the argument is an expression. The
|
||||
expression is evaluated to obtain the {rhs} that is used. Example: >
|
||||
:inoremap <expr> . InsertDot()
|
||||
The result of the InsertDot() function will be inserted. It could check the
|
||||
:inoremap <expr> . <SID>InsertDot()
|
||||
The result of the s:InsertDot() function will be inserted. It could check the
|
||||
text before the cursor and start omni completion when some condition is met.
|
||||
Using a script-local function is preferred, to avoid polluting the global
|
||||
namespace. Use <SID> in the RHS so that the script that the mapping was
|
||||
defined in can be found.
|
||||
|
||||
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
|
||||
@ -261,7 +264,21 @@ input. Example: >
|
||||
call popup_create(... arguments ...)
|
||||
return "\<Ignore>"
|
||||
endfunc
|
||||
nnoremap <expr> <F3> <Sid>OpenPopup()
|
||||
nnoremap <expr> <F3> <SID>OpenPopup()
|
||||
|
||||
Also, keep in mind that the expression may be evaluated when looking for
|
||||
typeahead, before the previous command has been executed. For example: >
|
||||
func StoreColumn()
|
||||
let g:column = col('.')
|
||||
return 'x'
|
||||
endfunc
|
||||
nnoremap <expr> x StoreColumn()
|
||||
nmap ! f!x
|
||||
You will notice that g:column has the value from before executing "f!",
|
||||
because "x" is evaluated before "f!" is executed.
|
||||
This can be solved by inserting <Ignore> before the character that is
|
||||
expression-mapped: >
|
||||
nmap ! f!<Ignore>x
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
@ -372,6 +389,22 @@ Overview of which map command works in which mode. More details below.
|
||||
:cmap :cnoremap :cunmap Command-line
|
||||
:tmap :tnoremap :tunmap Terminal-Job
|
||||
|
||||
Same information in a table:
|
||||
*map-table*
|
||||
Mode | Norm | Ins | Cmd | Vis | Sel | Opr | Term | Lang | ~
|
||||
Command +------+-----+-----+-----+-----+-----+------+------+ ~
|
||||
[nore]map | yes | - | - | yes | yes | yes | - | - |
|
||||
n[nore]map | yes | - | - | - | - | - | - | - |
|
||||
[nore]map! | - | yes | yes | - | - | - | - | - |
|
||||
i[nore]map | - | yes | - | - | - | - | - | - |
|
||||
c[nore]map | - | - | yes | - | - | - | - | - |
|
||||
v[nore]map | - | - | - | yes | yes | - | - | - |
|
||||
x[nore]map | - | - | - | yes | - | - | - | - |
|
||||
s[nore]map | - | - | - | - | yes | - | - | - |
|
||||
o[nore]map | - | - | - | - | - | yes | - | - |
|
||||
t[nore]map | - | - | - | - | - | - | yes | - |
|
||||
l[nore]map | - | yes | yes | - | - | - | - | yes |
|
||||
|
||||
|
||||
COMMANDS MODES ~
|
||||
Normal Visual+Select Operator-pending ~
|
||||
|
@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*mbyte.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@ -770,7 +770,7 @@ is suitable for complex input, such as CJK.
|
||||
of the two ways: FrontEnd system and BackEnd system. In the FrontEnd
|
||||
system, input events are snatched by the |IM-server| first, then |IM-server|
|
||||
give the application the result of input. On the other hand, the BackEnd
|
||||
system works reverse order. MS Windows adopt BackEnd system. In X, most of
|
||||
system works reverse order. MS-Windows adopt BackEnd system. In X, most of
|
||||
|IM-server|s adopt FrontEnd system. The demerit of BackEnd system is the
|
||||
large overhead in communication, but it provides safe synchronization with
|
||||
no restrictions on applications.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 8.2. Last change: 2020 Oct 18
|
||||
*motion.txt* For Vim version 8.2. Last change: 2021 Mar 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -942,8 +942,7 @@ These commands are not marks themselves, but jump to a mark:
|
||||
line.
|
||||
|
||||
*]`*
|
||||
]` [count] times to lowercase mark after the cursor. {not
|
||||
in Vi}
|
||||
]` [count] times to lowercase mark after the cursor.
|
||||
|
||||
*['*
|
||||
[' [count] times to previous line with a lowercase mark
|
||||
@ -1037,6 +1036,12 @@ CTRL-I Go to [count] newer cursor position in jump list
|
||||
(not a motion command).
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
NOTE: In the GUI and in a terminal supporting
|
||||
|modifyOtherKeys|, CTRL-I can be mapped separately
|
||||
from <Tab>, on the condition that CTRL-I is
|
||||
mapped before <Tab>, otherwise the mapping applies to
|
||||
both.
|
||||
|
||||
*:ju* *:jumps*
|
||||
:ju[mps] Print the jump list (not a motion command).
|
||||
{not available without the |+jumplist| feature}
|
||||
@ -1054,11 +1059,11 @@ The maximum number of entries is fixed at 100.
|
||||
|
||||
For example, after three jump commands you have this jump list:
|
||||
|
||||
jump line col file/text ~
|
||||
3 1 0 some text ~
|
||||
2 70 0 another line ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
jump line col file/text ~
|
||||
3 1 0 some text ~
|
||||
2 70 0 another line ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
|
||||
The "file/text" column shows the file name, or the text at the jump if it is
|
||||
in the current file (an indent is removed and a long line is truncated to fit
|
||||
@ -1067,11 +1072,11 @@ in the window).
|
||||
You are currently in line 1167. If you then use the CTRL-O command, the
|
||||
cursor is put in line 1154. This results in:
|
||||
|
||||
jump line col file/text ~
|
||||
2 1 0 some text ~
|
||||
1 70 0 another line ~
|
||||
> 0 1154 23 end. ~
|
||||
1 1167 0 foo bar ~
|
||||
jump line col file/text ~
|
||||
2 1 0 some text ~
|
||||
1 70 0 another line ~
|
||||
> 0 1154 23 end. ~
|
||||
1 1167 0 foo bar ~
|
||||
|
||||
The pointer will be set at the last used jump position. The next CTRL-O
|
||||
command will use the entry above it, the next CTRL-I command will use the
|
||||
@ -1098,12 +1103,12 @@ that calling setpos() does not do this.
|
||||
After the CTRL-O command that got you into line 1154 you could give another
|
||||
jump command (e.g., "G"). The jump list would then become:
|
||||
|
||||
jump line col file/text ~
|
||||
4 1 0 some text ~
|
||||
3 70 0 another line ~
|
||||
2 1167 0 foo bar ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
jump line col file/text ~
|
||||
4 1 0 some text ~
|
||||
3 70 0 another line ~
|
||||
2 1167 0 foo bar ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
|
||||
The line numbers will be adjusted for deleted and inserted lines. This fails
|
||||
if you stop editing a file without writing, like with ":n!".
|
||||
@ -1152,7 +1157,7 @@ Note that when text has been inserted or deleted the cursor position might be
|
||||
a bit different from the position of the change. Especially when lines have
|
||||
been deleted.
|
||||
|
||||
When the |:keepjumps| command modifier is used the position of a change is not
|
||||
When the `:keepjumps` command modifier is used the position of a change is not
|
||||
remembered.
|
||||
|
||||
*:changes*
|
||||
@ -1193,7 +1198,7 @@ remembered.
|
||||
#if, #ifdef, #else, #elif, #endif
|
||||
C preprocessor conditionals (when the
|
||||
cursor is on the # or no ([{
|
||||
following)
|
||||
is following)
|
||||
For other items the matchit plugin can be used, see
|
||||
|matchit-install|. This plugin also helps to skip
|
||||
matches in comments.
|
||||
@ -1222,19 +1227,16 @@ remembered.
|
||||
#if/#else/#endif makes the movement linewise.
|
||||
|
||||
*[(*
|
||||
[( go to [count] previous unmatched '('.
|
||||
[( Go to [count] previous unmatched '('.
|
||||
|exclusive| motion.
|
||||
|
||||
*[{*
|
||||
[{ go to [count] previous unmatched '{'.
|
||||
[{ Go to [count] previous unmatched '{'.
|
||||
|exclusive| motion.
|
||||
|
||||
*])*
|
||||
]) go to [count] next unmatched ')'.
|
||||
]) Go to [count] next unmatched ')'.
|
||||
|exclusive| motion.
|
||||
|
||||
*]}*
|
||||
]} go to [count] next unmatched '}'.
|
||||
]} Go to [count] next unmatched '}'.
|
||||
|exclusive| motion.
|
||||
|
||||
The above four commands can be used to go to the start or end of the current
|
||||
@ -1268,7 +1270,7 @@ bring you back to the switch statement.
|
||||
class. When no '}' is found before the cursor this is
|
||||
an error. |exclusive| motion.
|
||||
|
||||
The above two commands assume that the file contains a class with methods.
|
||||
The above four commands assume that the file contains a class with methods.
|
||||
The class definition is surrounded in '{' and '}'. Each method in the class
|
||||
is also surrounded with '{' and '}'. This applies to the Java language. The
|
||||
file looks like this: >
|
||||
@ -1282,17 +1284,21 @@ file looks like this: >
|
||||
body_two();
|
||||
}
|
||||
}
|
||||
|
||||
[To try this out copy the text and put it in a new buffer, the help text above
|
||||
confuses the jump commands]
|
||||
|
||||
Starting with the cursor on "body_two()", using "[m" will jump to the '{' at
|
||||
the start of "method_two()" (obviously this is much more useful when the
|
||||
method is long!). Using "2[m" will jump to the start of "method_one()".
|
||||
Using "3[m" will jump to the start of the class.
|
||||
|
||||
*[#*
|
||||
[# go to [count] previous unmatched "#if" or "#else".
|
||||
[# Go to [count] previous unmatched "#if" or "#else".
|
||||
|exclusive| motion.
|
||||
|
||||
*]#*
|
||||
]# go to [count] next unmatched "#else" or "#endif".
|
||||
]# Go to [count] next unmatched "#else" or "#endif".
|
||||
|exclusive| motion.
|
||||
|
||||
These two commands work in C programs that contain #if/#else/#endif
|
||||
@ -1300,11 +1306,11 @@ constructs. It brings you to the start or end of the #if/#else/#endif where
|
||||
the current line is included. You can then use "%" to go to the matching line.
|
||||
|
||||
*[star* *[/*
|
||||
[* or [/ go to [count] previous start of a C comment "/*".
|
||||
[* or [/ Go to [count] previous start of a C comment "/*".
|
||||
|exclusive| motion.
|
||||
|
||||
*]star* *]/*
|
||||
]* or ]/ go to [count] next end of a C comment "*/".
|
||||
]* or ]/ Go to [count] next end of a C comment "*/".
|
||||
|exclusive| motion.
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 May 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -749,6 +749,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
or selected.
|
||||
Note: When this option is on some plugins may not work.
|
||||
|
||||
*'autoshelldir'* *'asd'* *'noautoshelldir'* *'noasd'*
|
||||
'autoshelldir' 'asd' boolean (default off)
|
||||
global
|
||||
When on, Vim will change the current working directory whenever you
|
||||
change the directory of the shell running in a terminal window. You
|
||||
need proper setting-up, so whenever the shell's pwd changes an OSC 7
|
||||
escape sequence will be emitted. For example, on Linux, you can source
|
||||
/etc/profile.d/vte.sh in your shell profile if you use bash or zsh.
|
||||
|
||||
*'arabic'* *'arab'* *'noarabic'* *'noarab'*
|
||||
'arabic' 'arab' boolean (default off)
|
||||
local to window
|
||||
@ -1568,7 +1577,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
{only in GUI versions or when the |+xterm_clipboard|
|
||||
feature is included}
|
||||
This option is a list of comma separated names.
|
||||
These names are recognized:
|
||||
Note: if one of the items is "exclude:", then you can't add an item
|
||||
after that. Therefore do append an item with += but use ^= to
|
||||
prepend, e.g.: >
|
||||
set clipboard^=unnamed
|
||||
< These names are recognized:
|
||||
|
||||
*clipboard-unnamed*
|
||||
unnamed When included, Vim will use the clipboard register '*'
|
||||
@ -2815,7 +2828,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|setcellwidths()| function to change the behavior.
|
||||
|
||||
*'encoding'* *'enc'* *E543*
|
||||
'encoding' 'enc' string (default: "latin1" or value from $LANG)
|
||||
'encoding' 'enc' string (default for MS-Windows: "utf-8",
|
||||
otherwise: value from $LANG or "latin1")
|
||||
global
|
||||
Sets the character encoding used inside Vim. It applies to text in
|
||||
the buffers, registers, Strings in expressions, text stored in the
|
||||
@ -3102,9 +3116,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
because Vim cannot detect an error, thus the encoding is always
|
||||
accepted.
|
||||
The special value "default" can be used for the encoding from the
|
||||
environment. This is the default value for 'encoding'. It is useful
|
||||
when 'encoding' is set to "utf-8" and your environment uses a
|
||||
non-latin1 encoding, such as Russian.
|
||||
environment. On MS-Windows this is the system encoding. Otherwise
|
||||
this is the default value for 'encoding'. It is useful when
|
||||
'encoding' is set to "utf-8" and your environment uses a non-latin1
|
||||
encoding, such as Russian.
|
||||
When 'encoding' is "utf-8" and a file contains an illegal byte
|
||||
sequence it won't be recognized as UTF-8. You can use the |8g8|
|
||||
command to find the illegal byte sequence.
|
||||
@ -3231,7 +3246,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
|
||||
*'fillchars'* *'fcs'*
|
||||
'fillchars' 'fcs' string (default "vert:|,fold:-")
|
||||
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
|
||||
global
|
||||
{not available when compiled without the |+folding|
|
||||
feature}
|
||||
@ -3243,7 +3258,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
stlnc:c ' ' or '=' statusline of the non-current windows
|
||||
vert:c '|' vertical separators |:vsplit|
|
||||
fold:c '-' filling 'foldtext'
|
||||
foldopen:c '-' mark the beginning of a fold
|
||||
foldclose:c '+' show a closed fold
|
||||
foldsep:c '|' open fold middle character
|
||||
diff:c '-' deleted lines of the 'diff' option
|
||||
eob:c '~' empty lines below the end of a buffer
|
||||
|
||||
Any one that is omitted will fall back to the default. For "stl" and
|
||||
"stlnc" the space will be used when there is highlighting, '^' or '='
|
||||
@ -3254,7 +3273,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
< This is similar to the default, except that these characters will also
|
||||
be used when there is highlighting.
|
||||
|
||||
for "stl" and "stlnc" only single-byte values are supported.
|
||||
For "stl" and "stlnc" single-byte and multibyte characters are
|
||||
supported. But double-width characters are not supported.
|
||||
|
||||
The highlighting used for these items:
|
||||
item highlight group ~
|
||||
@ -3263,6 +3283,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
vert:c VertSplit |hl-VertSplit|
|
||||
fold:c Folded |hl-Folded|
|
||||
diff:c DiffDelete |hl-DiffDelete|
|
||||
eob:c EndOfBuffer |hl-EndOfBuffer|
|
||||
|
||||
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
|
||||
'fixendofline' 'fixeol' boolean (default on)
|
||||
@ -3846,7 +3867,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'go-v'*
|
||||
'v' Use a vertical button layout for dialogs. When not included,
|
||||
a horizontal layout is preferred, but when it doesn't fit a
|
||||
vertical layout is used anyway.
|
||||
vertical layout is used anyway. Not supported in GTK 3.
|
||||
*'go-p'*
|
||||
'p' Use Pointer callbacks for X11 GUI. This is required for some
|
||||
window managers. If the cursor is not blinking or hollow at
|
||||
@ -4129,7 +4150,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
the window. This happens only when the 'icon' option is on.
|
||||
Only works if the terminal supports setting window icon text
|
||||
(currently only X11 GUI and terminals with a non-empty 't_IS' option).
|
||||
Does not work for MS Windows.
|
||||
Does not work for MS-Windows.
|
||||
When Vim was compiled with HAVE_X11 defined, the original icon will be
|
||||
restored if possible |X11|.
|
||||
When this option contains printf-style '%' items, they will be
|
||||
@ -4545,7 +4566,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Keywords are used in searching and recognizing with many commands:
|
||||
"w", "*", "[i", etc. It is also used for "\k" in a |pattern|. See
|
||||
'isfname' for a description of the format of this option. For '@'
|
||||
characters above 255 check the "word" character class.
|
||||
characters above 255 check the "word" character class (any character
|
||||
that is not white space or punctuation).
|
||||
For C programs you could use "a-z,A-Z,48-57,_,.,-,>".
|
||||
For a help file it is set to all non-blank printable characters except
|
||||
'*', '"' and '|' (so that CTRL-] on a command finds the help for that
|
||||
@ -4848,7 +4870,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'listchars'* *'lcs'*
|
||||
'listchars' 'lcs' string (default "eol:$")
|
||||
global
|
||||
global or local to window |global-local|
|
||||
Strings to use in 'list' mode and for the |:list| command. It is a
|
||||
comma separated list of string settings.
|
||||
*lcs-eol*
|
||||
@ -4882,8 +4904,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*lcs-lead*
|
||||
lead:c Character to show for leading spaces. When omitted,
|
||||
leading spaces are blank. Overrides the "space"
|
||||
setting for leading spaces.
|
||||
*lcs-trail*
|
||||
setting for leading spaces. You can combine it with
|
||||
"tab:", for example: >
|
||||
:set listchars+=tab:>-,lead:.
|
||||
< *lcs-trail*
|
||||
trail:c Character to show for trailing spaces. When omitted,
|
||||
trailing spaces are blank. Overrides the "space"
|
||||
setting for trailing spaces.
|
||||
@ -5015,7 +5039,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
jump between two double quotes.
|
||||
The characters must be separated by a colon.
|
||||
The pairs must be separated by a comma. Example for including '<' and
|
||||
'>' (HTML): >
|
||||
'>' (for HTML): >
|
||||
:set mps+=<:>
|
||||
|
||||
< A more exotic example, to jump between the '=' and ';' in an
|
||||
@ -6232,7 +6256,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
<
|
||||
*'runtimepath'* *'rtp'* *vimfiles*
|
||||
'runtimepath' 'rtp' string (default:
|
||||
Unix: "$HOME/.vim,
|
||||
Unix: "$HOME/.vim,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
@ -6242,7 +6266,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
home:vimfiles/after"
|
||||
PC: "$HOME/vimfiles,
|
||||
MS-Windows: "$HOME/vimfiles,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
@ -6254,8 +6278,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
$BE_USER_SETTINGS/vim/after")
|
||||
VMS: "sys$login:vimfiles,
|
||||
$BE_USER_SETTINGS/vim/after"
|
||||
VMS: "sys$login:vimfiles,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
@ -6490,6 +6514,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global values for local options)
|
||||
options all options and mappings (also global values for local
|
||||
options)
|
||||
skiprtp exclude 'runtimepath' and 'packpath' from the options
|
||||
resize size of the Vim window: 'lines' and 'columns'
|
||||
sesdir the directory in which the session file is located
|
||||
will become the current directory (useful with
|
||||
@ -6583,9 +6608,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
in a file and echoed to the screen. If the 'shell' option is "csh" or
|
||||
"tcsh" after initializations, the default becomes "|& tee". If the
|
||||
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
|
||||
"bash" or "fish" the default becomes "2>&1| tee". This means that
|
||||
stderr is also included. Before using the 'shell' option a path is
|
||||
removed, thus "/bin/sh" uses "sh".
|
||||
"bash", "fish", "ash" or "dash" the default becomes "2>&1| tee". This
|
||||
means that stderr is also included. Before using the 'shell' option a
|
||||
path is removed, thus "/bin/sh" uses "sh".
|
||||
The initialization of this option is done after reading the ".vimrc"
|
||||
and the other initializations, so that when the 'shell' option is set
|
||||
there, the 'shellpipe' option changes automatically, unless it was
|
||||
@ -7316,6 +7341,18 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Note that there is no '%' before the closing '}'. The
|
||||
expression cannot contain a '}' character, call a function to
|
||||
work around that. See |stl-%{| below.
|
||||
{% - This is almost same as { except the result of the expression is
|
||||
re-evaluated as a statusline format string. Thus if the
|
||||
return value of expr contains % items they will get expanded.
|
||||
The expression can contain the } character, the end of
|
||||
expression is denoted by %}.
|
||||
The For example: >
|
||||
func! Stl_filename() abort
|
||||
return "%t"
|
||||
endfunc
|
||||
< `stl=%{Stl_filename()}` results in `"%t"`
|
||||
`stl=%{%Stl_filename()%}` results in `"Name of current file"`
|
||||
} - End of `{%` expression
|
||||
( - Start of item group. Can be used for setting the width and
|
||||
alignment of a section. Must be followed by %) somewhere.
|
||||
) - End of item group. No width fields allowed.
|
||||
@ -7459,6 +7496,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
'switchbuf' 'swb' string (default "")
|
||||
global
|
||||
This option controls the behavior when switching between buffers.
|
||||
Mostly for |quickfix| commands some values are also used for other
|
||||
commands, as mentioned below.
|
||||
Possible values (comma separated list):
|
||||
useopen If included, jump to the first open window that
|
||||
contains the specified buffer (if there is one).
|
||||
@ -8769,23 +8808,31 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
part specifies what to do for each consecutive use of 'wildchar'. The
|
||||
first part specifies the behavior for the first use of 'wildchar',
|
||||
The second part for the second use, etc.
|
||||
These are the possible values for each part:
|
||||
|
||||
Each part consists of a colon separated list consisting of the
|
||||
following possible values:
|
||||
"" Complete only the first match.
|
||||
"full" Complete the next full match. After the last match,
|
||||
the original string is used and then the first match
|
||||
again.
|
||||
again. Will also start 'wildmenu' if it is enabled.
|
||||
"longest" Complete till longest common string. If this doesn't
|
||||
result in a longer string, use the next part.
|
||||
"longest:full" Like "longest", but also start 'wildmenu' if it is
|
||||
enabled.
|
||||
"list" When more than one match, list all matches.
|
||||
"lastused" When completing buffer names and more than one buffer
|
||||
matches, sort buffers by time last used (other than
|
||||
the current buffer).
|
||||
When there is only a single match, it is fully completed in all cases.
|
||||
|
||||
Examples of useful colon-separated values:
|
||||
"longest:full" Like "longest", but also start 'wildmenu' if it is
|
||||
enabled. Will not complete to the next full match.
|
||||
"list:full" When more than one match, list all matches and
|
||||
complete first match.
|
||||
"list:longest" When more than one match, list all matches and
|
||||
complete till longest common string.
|
||||
"list:lastused" When more than one buffer matches, sort buffers
|
||||
by time last used (other than the current buffer).
|
||||
When there is only a single match, it is fully completed in all cases.
|
||||
"list:lastused" When more than one buffer matches, list all matches
|
||||
and sort buffers by time last used (other than the
|
||||
current buffer).
|
||||
|
||||
Examples: >
|
||||
:set wildmode=full
|
||||
@ -8844,15 +8891,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'window'* *'wi'*
|
||||
'window' 'wi' number (default screen height - 1)
|
||||
global
|
||||
Window height. Do not confuse this with the height of the Vim window,
|
||||
use 'lines' for that.
|
||||
Used for |CTRL-F| and |CTRL-B| when there is only one window and the
|
||||
value is smaller than 'lines' minus one. The screen will scroll
|
||||
'window' minus two lines, with a minimum of one.
|
||||
Window height used for |CTRL-F| and |CTRL-B| when there is only one
|
||||
window and the value is smaller than 'lines' minus one. The screen
|
||||
will scroll 'window' minus two lines, with a minimum of one.
|
||||
When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
|
||||
in a much smarter way, taking care of wrapping lines.
|
||||
When resizing the Vim window, the value is smaller than 1 or more than
|
||||
or equal to 'lines' it will be set to 'lines' minus 1.
|
||||
Note: Do not confuse this with the height of the Vim window, use
|
||||
'lines' for that.
|
||||
|
||||
*'winheight'* *'wh'* *E591*
|
||||
'winheight' 'wh' number (default 1)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*os_win32.txt* For Vim version 8.2. Last change: 2017 Mar 21
|
||||
*os_win32.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by George Reilly
|
||||
@ -83,7 +83,7 @@ executable() returns 1 the executable can actually be executed.
|
||||
|
||||
Command line arguments *win32-cmdargs*
|
||||
|
||||
Analysis of a command line into parameters is not standardised in MS Windows.
|
||||
Analysis of a command line into parameters is not standardised in MS-Windows.
|
||||
Vim and gvim used to use different logic to parse it (before 7.4.432), and the
|
||||
logic was also depended on what it was compiled with. Now Vim and gvim both
|
||||
use the CommandLineToArgvW() Win32 API, so they behave in the same way.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2021 Jan 08
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2021 May 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -19,6 +19,7 @@ explanations are in chapter 27 |usr_27.txt|.
|
||||
8. Composing characters |patterns-composing|
|
||||
9. Compare with Perl patterns |perl-patterns|
|
||||
10. Highlighting matches |match-highlight|
|
||||
11. Fuzzy matching |fuzzy-match|
|
||||
|
||||
==============================================================================
|
||||
1. Search commands *search-commands*
|
||||
@ -229,7 +230,7 @@ This is like executing two search commands after each other, except that:
|
||||
*last-pattern*
|
||||
The last used pattern and offset are remembered. They can be used to repeat
|
||||
the search, possibly in another direction or with another count. Note that
|
||||
two patterns are remembered: One for 'normal' search commands and one for the
|
||||
two patterns are remembered: One for "normal" search commands and one for the
|
||||
substitute command ":s". Each time an empty pattern is given, the previously
|
||||
used pattern is used. However, if there is no previous search command, a
|
||||
previous substitute pattern is used, if possible.
|
||||
@ -1431,5 +1432,38 @@ Finally, these constructs are unique to Perl:
|
||||
are suggested to use ":match" for manual matching and
|
||||
":2match" for another plugin.
|
||||
|
||||
==============================================================================
|
||||
11. Fuzzy matching *fuzzy-match*
|
||||
|
||||
Fuzzy matching refers to matching strings using a non-exact search string.
|
||||
Fuzzy matching will match a string, if all the characters in the search string
|
||||
are present anywhere in the string in the same order. Case is ignored. In a
|
||||
matched string, other characters can be present between two consecutive
|
||||
characters in the search string. If the search string has multiple words, then
|
||||
each word is matched separately. So the words in the search string can be
|
||||
present in any order in a string.
|
||||
|
||||
Fuzzy matching assigns a score for each matched string based on the following
|
||||
criteria:
|
||||
- The number of sequentially matching characters.
|
||||
- The number of characters (distance) between two consecutive matching
|
||||
characters.
|
||||
- Matches at the beginning of a word
|
||||
- Matches after a camel case character or a path separator or a hyphen.
|
||||
- The number of unmatched characters in a string.
|
||||
The matching string with the highest score is returned first.
|
||||
|
||||
For example, when you search for the "get pat" string using fuzzy matching, it
|
||||
will match the strings "GetPattern", "PatternGet", "getPattern", "patGetter",
|
||||
"getSomePattern", "MatchpatternGet" etc.
|
||||
|
||||
The functions |matchfuzzy()| and |matchfuzzypos()| can be used to fuzzy search
|
||||
a string in a List of strings. The matchfuzzy() function returns a List of
|
||||
matching strings. The matchfuzzypos() functions returns the List of matches,
|
||||
the matching positions and the fuzzy match scores.
|
||||
|
||||
The "f" flag of `:vimgrep` enables fuzzy matching.
|
||||
|
||||
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
*popup.txt* For Vim version 8.2. Last change: 2021 Feb 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -620,7 +620,8 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
property moves. Use an empty string to remove. See
|
||||
|popup-textprop-pos|.
|
||||
textpropwin What window to search for the text property. When
|
||||
omitted or invalid the current window is used.
|
||||
omitted or invalid the current window is used. Used
|
||||
when "textprop" is present.
|
||||
textpropid Used to identify the text property when "textprop" is
|
||||
present. Use zero to reset.
|
||||
fixed When FALSE (the default), and:
|
||||
@ -692,8 +693,8 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
the left.
|
||||
border List with numbers, defining the border thickness
|
||||
above/right/below/left of the popup (similar to CSS).
|
||||
Only values of zero and non-zero are recognized.
|
||||
An empty list uses a border all around.
|
||||
Only values of zero and non-zero are currently
|
||||
recognized. An empty list uses a border all around.
|
||||
borderhighlight List of highlight group names to use for the border.
|
||||
When one entry it is used for all borders, otherwise
|
||||
the highlight for the top/right/bottom/left border.
|
||||
@ -741,10 +742,10 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
line or to another window.
|
||||
mousemoved Like "moved" but referring to the mouse pointer
|
||||
position
|
||||
cursorline non-zero: Highlight the cursor line. Also scrolls the
|
||||
text to show this line (only works properly
|
||||
when 'wrap' is off).
|
||||
zero: Do not highlight the cursor line.
|
||||
cursorline TRUE: Highlight the cursor line. Also scrolls the
|
||||
text to show this line (only works properly
|
||||
when 'wrap' is off).
|
||||
zero: Do not highlight the cursor line.
|
||||
Default is zero, except for |popup_menu()|.
|
||||
filter A callback that can filter typed characters, see
|
||||
|popup-filter|.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 8.2. Last change: 2020 May 31
|
||||
*quickfix.txt* For Vim version 8.2. Last change: 2021 May 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1008,13 +1008,11 @@ commands can be combined to create a NewGrep command: >
|
||||
5.1 using Vim's internal grep
|
||||
|
||||
*:vim* *:vimgrep* *E682* *E683*
|
||||
:vim[grep][!] /{pattern}/[g][j] {file} ...
|
||||
:vim[grep][!] /{pattern}/[g][j][f] {file} ...
|
||||
Search for {pattern} in the files {file} ... and set
|
||||
the error list to the matches. Files matching
|
||||
'wildignore' are ignored; files in 'suffixes' are
|
||||
searched last.
|
||||
Without the 'g' flag each line is added only once.
|
||||
With 'g' every match is added.
|
||||
|
||||
{pattern} is a Vim search pattern. Instead of
|
||||
enclosing it in / any non-ID character (see
|
||||
@ -1025,6 +1023,28 @@ commands can be combined to create a NewGrep command: >
|
||||
'smartcase' is not used.
|
||||
If {pattern} is empty (e.g. // is specified), the last
|
||||
used search pattern is used. |last-pattern|
|
||||
|
||||
Flags:
|
||||
'g' Without the 'g' flag each line is added only
|
||||
once. With 'g' every match is added.
|
||||
|
||||
'j' Without the 'j' flag Vim jumps to the first
|
||||
match. With 'j' only the quickfix list is
|
||||
updated. With the [!] any changes in the current
|
||||
buffer are abandoned.
|
||||
|
||||
'f' When the 'f' flag is specified, fuzzy string
|
||||
matching is used to find matching lines. In this
|
||||
case, {pattern} is treated as a literal string
|
||||
instead of a regular expression. See
|
||||
|fuzzy-match| for more information about fuzzy
|
||||
matching strings.
|
||||
|
||||
|QuickFixCmdPre| and |QuickFixCmdPost| are triggered.
|
||||
A file that is opened for matching may use a buffer
|
||||
number, but it is reused if possible to avoid
|
||||
consuming buffer numbers.
|
||||
|
||||
:{count}vim[grep] ...
|
||||
When a number is put before the command this is used
|
||||
as the maximum number of matches to find. Use
|
||||
@ -1032,11 +1052,6 @@ commands can be combined to create a NewGrep command: >
|
||||
Useful if you only want to check if there is a match
|
||||
and quit quickly when it's found.
|
||||
|
||||
Without the 'j' flag Vim jumps to the first match.
|
||||
With 'j' only the quickfix list is updated.
|
||||
With the [!] any changes in the current buffer are
|
||||
abandoned.
|
||||
|
||||
Every second or so the searched file name is displayed
|
||||
to give you an idea of the progress made.
|
||||
Examples: >
|
||||
@ -1053,20 +1068,20 @@ commands can be combined to create a NewGrep command: >
|
||||
:vimgrep Error *.c
|
||||
<
|
||||
*:lv* *:lvimgrep*
|
||||
:lv[imgrep][!] /{pattern}/[g][j] {file} ...
|
||||
:lv[imgrep][!] /{pattern}/[g][j][f] {file} ...
|
||||
:lv[imgrep][!] {pattern} {file} ...
|
||||
Same as ":vimgrep", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
*:vimgrepa* *:vimgrepadd*
|
||||
:vimgrepa[dd][!] /{pattern}/[g][j] {file} ...
|
||||
:vimgrepa[dd][!] /{pattern}/[g][j][f] {file} ...
|
||||
:vimgrepa[dd][!] {pattern} {file} ...
|
||||
Just like ":vimgrep", but instead of making a new list
|
||||
of errors the matches are appended to the current
|
||||
list.
|
||||
|
||||
*:lvimgrepa* *:lvimgrepadd*
|
||||
:lvimgrepa[dd][!] /{pattern}/[g][j] {file} ...
|
||||
:lvimgrepa[dd][!] /{pattern}/[g][j][f] {file} ...
|
||||
:lvimgrepa[dd][!] {pattern} {file} ...
|
||||
Same as ":vimgrepadd", except the location list for
|
||||
the current window is used instead of the quickfix
|
||||
@ -1371,7 +1386,8 @@ Basic items
|
||||
%o module name (finds a string)
|
||||
%l line number (finds a number)
|
||||
%c column number (finds a number representing character
|
||||
column of the error, (1 <tab> == 1 character column))
|
||||
column of the error, byte index, a <tab> is 1
|
||||
character column)
|
||||
%v virtual column number (finds a number representing
|
||||
screen column of the error (1 <tab> == 8 screen
|
||||
columns))
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 8.2. Last change: 2020 Aug 15
|
||||
*quickref.txt* For Vim version 8.2. Last change: 2021 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -605,6 +605,7 @@ Short explanation of each option: *option-list*
|
||||
'ambiwidth' 'ambw' what to do with Unicode chars of ambiguous width
|
||||
'antialias' 'anti' Mac OS X: use smooth, antialiased fonts
|
||||
'autochdir' 'acd' change directory to the file in the current window
|
||||
'autoshelldir' 'asd' change directory to the shell's current directory
|
||||
'arabic' 'arab' for Arabic as a default second language
|
||||
'arabicshape' 'arshape' do shaping for Arabic characters
|
||||
'autoindent' 'ai' take indent for new line from previous line
|
||||
|
@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 May 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -59,6 +59,11 @@ of area is used, see |visual-repeat|.
|
||||
:[range]v[global]/{pattern}/[cmd]
|
||||
Same as :g!.
|
||||
|
||||
Example: >
|
||||
:g/^Obsolete/d _
|
||||
Using the underscore after `:d` avoids clobbering registers or the clipboard.
|
||||
This also makes it faster.
|
||||
|
||||
Instead of the '/' which surrounds the {pattern}, you can use any other
|
||||
single byte character, but not an alphabetic character, '\', '"' or '|'.
|
||||
This is useful if you want to include a '/' in the search pattern or
|
||||
@ -150,15 +155,12 @@ q Stops recording. (Implementation note: The 'q' that
|
||||
*@@* *E748*
|
||||
@@ Repeat the previous @{0-9a-z":*} [count] times.
|
||||
|
||||
:[addr]*{0-9a-z".=+} *:@* *:star*
|
||||
*:@*
|
||||
:[addr]@{0-9a-z".=*+} Execute the contents of register {0-9a-z".=*+} as an Ex
|
||||
command. First set cursor at line [addr] (default is
|
||||
current line). When the last line in the register does
|
||||
not have a <CR> it will be added automatically when
|
||||
the 'e' flag is present in 'cpoptions'.
|
||||
Note that the ":*" command is only recognized when the
|
||||
'*' flag is present in 'cpoptions'. This is NOT the
|
||||
default when 'nocompatible' is used.
|
||||
For ":@=" the last used expression is used. The
|
||||
result of evaluating the expression is executed as an
|
||||
Ex command.
|
||||
@ -171,6 +173,13 @@ q Stops recording. (Implementation note: The 'q' that
|
||||
Future: Will execute the register for each line in the
|
||||
address range.
|
||||
|
||||
:[addr]*{0-9a-z".=+} *:star-compatible*
|
||||
When '*' is present in 'cpoptions' |cpo-star|, use
|
||||
":*" in the same way as ":@". This is NOT the default
|
||||
when 'nocompatible' is used. When the '*' flag is not
|
||||
present in 'cpoptions', ":*" is an alias for ":'<,'>",
|
||||
select the Visual area |:star|.
|
||||
|
||||
*:@:*
|
||||
:[addr]@: Repeat last command-line. First set cursor at line
|
||||
[addr] (default is current line).
|
||||
@ -354,13 +363,15 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
Vim version, or update Vim to a newer version. See
|
||||
|vimscript-version| for what changed between versions.
|
||||
|
||||
:vim9[script] [noclear] *:vim9* *:vim9script*
|
||||
:vim9s[cript] [noclear] *:vim9s* *: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.
|
||||
See |:vim9cmd| for executing one command with Vim9
|
||||
syntax and semantics.
|
||||
|
||||
*:scr* *:scriptnames*
|
||||
:scr[iptnames] List all sourced script names, in the order they were
|
||||
@ -675,9 +686,9 @@ Your directory layout would be like this:
|
||||
opt/fooextra/doc/tags " help tags
|
||||
|
||||
This allows for the user to do: >
|
||||
mkdir ~/.vim/pack/myfoobar
|
||||
cd ~/.vim/pack/myfoobar
|
||||
git clone https://github.com/you/foobar.git
|
||||
mkdir ~/.vim/pack
|
||||
cd ~/.vim/pack
|
||||
git clone https://github.com/you/foobar.git myfoobar
|
||||
|
||||
Here "myfoobar" is a name that the user can choose, the only condition is that
|
||||
it differs from other packages.
|
||||
@ -877,7 +888,7 @@ DEFINING BREAKPOINTS
|
||||
valid in the script where it has been defined and if that
|
||||
script is called from several other scripts, this will stop
|
||||
whenever that particular variable will become visible or
|
||||
unaccessible again.
|
||||
inaccessible again.
|
||||
|
||||
The [lnum] is the line number of the breakpoint. Vim will stop at or after
|
||||
this line. When omitted line 1 is used.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*sign.txt* For Vim version 8.2. Last change: 2020 Oct 28
|
||||
*sign.txt* For Vim version 8.2. Last change: 2021 Mar 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
@ -146,6 +146,9 @@ See |sign_define()| for the equivalent Vim script function.
|
||||
texthl={group}
|
||||
Highlighting group used for the text item.
|
||||
|
||||
Example: >
|
||||
:sign define MySign text=>> texthl=Search linehl=DiffText
|
||||
<
|
||||
|
||||
DELETING A SIGN *:sign-undefine* *E155*
|
||||
|
||||
@ -155,7 +158,9 @@ See |sign_undefine()| for the equivalent Vim script function.
|
||||
Deletes a previously defined sign. If signs with this {name}
|
||||
are still placed this will cause trouble.
|
||||
|
||||
|
||||
Example: >
|
||||
:sign undefine MySign
|
||||
<
|
||||
|
||||
LISTING SIGNS *:sign-list* *E156*
|
||||
|
||||
@ -209,6 +214,10 @@ See |sign_place()| for the equivalent Vim script function.
|
||||
Same, but use buffer {nr}. If the buffer argument is not
|
||||
given, place the sign in the current buffer.
|
||||
|
||||
Example: >
|
||||
:sign place 10 line=99 name=sign3
|
||||
:sign place 10 line=99 name=sign3 buffer=3
|
||||
<
|
||||
*E885*
|
||||
:sign place {id} name={name} file={fname}
|
||||
Change the placed sign {id} in file {fname} to use the defined
|
||||
@ -221,10 +230,17 @@ See |sign_place()| for the equivalent Vim script function.
|
||||
"priority={prio}" attribute can be used to change the priority
|
||||
of an existing sign.
|
||||
|
||||
Example: >
|
||||
:sign place 23 name=sign1 file=/path/to/edit.py
|
||||
<
|
||||
:sign place {id} name={name} [buffer={nr}]
|
||||
Same, but use buffer {nr}. If the buffer argument is not
|
||||
given, use the current buffer.
|
||||
|
||||
Example: >
|
||||
:sign place 23 name=sign1
|
||||
:sign place 23 name=sign1 buffer=7
|
||||
<
|
||||
|
||||
REMOVING SIGNS *:sign-unplace* *E159*
|
||||
|
||||
|
@ -1143,10 +1143,10 @@ flag to avoid lots of errors.
|
||||
CIRCUMFIX *spell-CIRCUMFIX*
|
||||
|
||||
The CIRCUMFIX flag means a prefix and suffix must be added at the same time.
|
||||
If a prefix has the CIRCUMFIX flag than only suffixes with the CIRCUMFIX flag
|
||||
If a prefix has the CIRCUMFIX flag then only suffixes with the CIRCUMFIX flag
|
||||
can be added, and the other way around.
|
||||
An alternative is to only specify the suffix, and give the that suffix two
|
||||
flags: The required prefix and the NEEDAFFIX flag. |spell-NEEDAFFIX|
|
||||
An alternative is to only specify the suffix, and give that suffix two flags:
|
||||
the required prefix and the NEEDAFFIX flag. |spell-NEEDAFFIX|
|
||||
|
||||
|
||||
PFXPOSTPONE *spell-PFXPOSTPONE*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*starting.txt* For Vim version 8.2. Last change: 2021 May 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1036,7 +1036,7 @@ giving the mapping.
|
||||
|
||||
|
||||
Defaults without a .vimrc file ~
|
||||
*defaults.vim*
|
||||
*defaults.vim* *E1187*
|
||||
If Vim is started normally and no user vimrc file is found, the
|
||||
$VIMRUNTIME/defaults.vim script is loaded. This will set 'compatible' off,
|
||||
switch on syntax highlighting and a few more things. See the script for
|
||||
@ -1344,7 +1344,11 @@ resulting file, when executed with a ":source" command:
|
||||
"options". Script-local mappings will not be written.
|
||||
2. Restores global variables that start with an uppercase letter and contain
|
||||
at least one lowercase letter, if 'sessionoptions' contains "globals".
|
||||
3. Unloads all currently loaded buffers.
|
||||
3. Closes all windows in the current tab page, except the current one; closes
|
||||
all tab pages except the current one (this results in currently loaded
|
||||
buffers to be unloaded, some may become hidden if 'hidden' is set or
|
||||
otherwise specified); wipes out the current buffer, if it is empty
|
||||
and unnamed.
|
||||
4. Restores the current directory if 'sessionoptions' contains "curdir", or
|
||||
sets the current directory to where the Session file is if 'sessionoptions'
|
||||
contains "sesdir".
|
||||
@ -1588,7 +1592,7 @@ VIMINFO FILE NAME *viminfo-file-name*
|
||||
file name given is "NONE" (all uppercase), no viminfo file is ever read or
|
||||
written. Also not for the commands below!
|
||||
- The 'viminfofile' option can be used like the "-i" argument. In fact, the
|
||||
value form the "-i" argument is stored in the 'viminfofile' option.
|
||||
value from the "-i" argument is stored in the 'viminfofile' option.
|
||||
- For the commands below, another file name can be given, overriding the
|
||||
default and the name given with 'viminfo' or "-i" (unless it's NONE).
|
||||
|
||||
@ -1640,13 +1644,17 @@ either have to fix the error, or delete the file (while Vim is running, so
|
||||
most of the information will be restored).
|
||||
|
||||
*:rv* *:rviminfo* *E195*
|
||||
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above).
|
||||
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see
|
||||
|viminfo-file-name| above).
|
||||
If [!] is given, then any information that is
|
||||
already set (registers, marks, |v:oldfiles|, etc.)
|
||||
will be overwritten
|
||||
|
||||
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *E929*
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above).
|
||||
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see
|
||||
|viminfo-file-name| above).
|
||||
This command has no effect when 'viminfofile' has been
|
||||
set to "NONE".
|
||||
The information in the file is first read in to make
|
||||
a merge between old and new info. When [!] is used,
|
||||
the old information is not read first, only the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 Jan 21
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1741,8 +1741,8 @@ The coloring scheme for tags in the HTML file works as follows.
|
||||
|
||||
The <> of opening tags are colored differently than the </> of a closing tag.
|
||||
This is on purpose! For opening tags the 'Function' color is used, while for
|
||||
closing tags the 'Type' color is used (See syntax.vim to check how those are
|
||||
defined for you)
|
||||
closing tags the 'Identifier' color is used (See syntax.vim to check how those
|
||||
are defined for you)
|
||||
|
||||
Known tag names are colored the same way as statements in C. Unknown tag
|
||||
names are colored with the same color as the <> or </> respectively which
|
||||
@ -2236,9 +2236,10 @@ can use them.
|
||||
|
||||
For example, Linux and BSD distributions use groff as their default text
|
||||
processing package. In order to activate the extra syntax highlighting
|
||||
features for groff, add the following option to your start-up files: >
|
||||
features for groff, arrange for files to be recognized as groff (see
|
||||
|ft-groff-syntax|) or add the following option to your start-up files: >
|
||||
|
||||
:let b:nroff_is_groff = 1
|
||||
:let nroff_is_groff = 1
|
||||
|
||||
Groff is different from the old AT&T n/troff that you may still find in
|
||||
Solaris. Groff macro and request names can be longer than 2 characters and
|
||||
@ -4676,7 +4677,7 @@ matches, nextgroup, etc. But there are a few differences:
|
||||
- A line continuation pattern can be given. It is used to decide which group
|
||||
of lines need to be searched like they were one line. This means that the
|
||||
search for a match with the specified items starts in the first of the
|
||||
consecutive that contain the continuation pattern.
|
||||
consecutive lines that contain the continuation pattern.
|
||||
- When using "nextgroup" or "contains", this only works within one line (or
|
||||
group of continued lines).
|
||||
- When using a region, it must start and end in the same line (or group of
|
||||
@ -4966,6 +4967,14 @@ ctermul={color-nr} *highlight-ctermul*
|
||||
colors for a color-xterm can be changed from the .Xdefaults file.
|
||||
Unfortunately this means that it's not possible to get the same colors
|
||||
for each user. See |xterm-color| for info about color xterms.
|
||||
*tmux*
|
||||
When using tmux you may want to use this in the tmux config: >
|
||||
# tmux colors
|
||||
set -g default-terminal "xterm-256color"
|
||||
set -ag terminal-overrides ",xterm-256color:Tc"
|
||||
< More info at:
|
||||
https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
|
||||
https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
|
||||
|
||||
The MS-Windows standard colors are fixed (in a console window), so
|
||||
these have been used for the names. But the meaning of color names in
|
||||
|
@ -57,11 +57,13 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'ari' options.txt /*'ari'*
|
||||
'arshape' options.txt /*'arshape'*
|
||||
'as' todo.txt /*'as'*
|
||||
'asd' options.txt /*'asd'*
|
||||
'autochdir' options.txt /*'autochdir'*
|
||||
'autoindent' options.txt /*'autoindent'*
|
||||
'autoprint' vi_diff.txt /*'autoprint'*
|
||||
'autoread' options.txt /*'autoread'*
|
||||
'autosave' todo.txt /*'autosave'*
|
||||
'autoshelldir' options.txt /*'autoshelldir'*
|
||||
'autowrite' options.txt /*'autowrite'*
|
||||
'autowriteall' options.txt /*'autowriteall'*
|
||||
'aw' options.txt /*'aw'*
|
||||
@ -508,10 +510,12 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
'noari' options.txt /*'noari'*
|
||||
'noarshape' options.txt /*'noarshape'*
|
||||
'noas' todo.txt /*'noas'*
|
||||
'noasd' options.txt /*'noasd'*
|
||||
'noautochdir' options.txt /*'noautochdir'*
|
||||
'noautoindent' options.txt /*'noautoindent'*
|
||||
'noautoread' options.txt /*'noautoread'*
|
||||
'noautosave' todo.txt /*'noautosave'*
|
||||
'noautoshelldir' options.txt /*'noautoshelldir'*
|
||||
'noautowrite' options.txt /*'noautowrite'*
|
||||
'noautowriteall' options.txt /*'noautowriteall'*
|
||||
'noaw' options.txt /*'noaw'*
|
||||
@ -1292,6 +1296,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+cmdline_compl various.txt /*+cmdline_compl*
|
||||
+cmdline_hist various.txt /*+cmdline_hist*
|
||||
+cmdline_info various.txt /*+cmdline_info*
|
||||
+cmdwin various.txt /*+cmdwin*
|
||||
+comments various.txt /*+comments*
|
||||
+conceal various.txt /*+conceal*
|
||||
+cryptv various.txt /*+cryptv*
|
||||
@ -2396,6 +2401,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:ec eval.txt /*:ec*
|
||||
:echo eval.txt /*:echo*
|
||||
:echo-redraw eval.txt /*:echo-redraw*
|
||||
:echoc eval.txt /*:echoc*
|
||||
:echoconsole eval.txt /*:echoconsole*
|
||||
:echoe eval.txt /*:echoe*
|
||||
:echoerr eval.txt /*:echoerr*
|
||||
:echoh eval.txt /*:echoh*
|
||||
@ -2623,6 +2630,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:left change.txt /*:left*
|
||||
:lefta windows.txt /*:lefta*
|
||||
:leftabove windows.txt /*:leftabove*
|
||||
:leg vim9.txt /*:leg*
|
||||
:legacy vim9.txt /*:legacy*
|
||||
:let eval.txt /*:let*
|
||||
:let%= eval.txt /*:let%=*
|
||||
:let+= eval.txt /*:let+=*
|
||||
@ -3175,7 +3184,8 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:st starting.txt /*:st*
|
||||
:sta windows.txt /*:sta*
|
||||
:stag windows.txt /*:stag*
|
||||
:star repeat.txt /*:star*
|
||||
:star cmdline.txt /*:star*
|
||||
:star-compatible repeat.txt /*:star-compatible*
|
||||
:star-visual-range cmdline.txt /*:star-visual-range*
|
||||
:start insert.txt /*:start*
|
||||
:startgreplace insert.txt /*:startgreplace*
|
||||
@ -3190,6 +3200,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:stselect tagsrch.txt /*:stselect*
|
||||
:su change.txt /*:su*
|
||||
:substitute change.txt /*:substitute*
|
||||
:substitute-repeat change.txt /*:substitute-repeat*
|
||||
:sun windows.txt /*:sun*
|
||||
:sunhide windows.txt /*:sunhide*
|
||||
:sunm map.txt /*:sunm*
|
||||
@ -3306,7 +3317,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:tabs tabpage.txt /*:tabs*
|
||||
:tag tagsrch.txt /*:tag*
|
||||
:tags tagsrch.txt /*:tags*
|
||||
:tc if_tcl.txt /*:tc*
|
||||
:tc editing.txt /*:tc*
|
||||
:tcd editing.txt /*:tcd*
|
||||
:tcd- editing.txt /*:tcd-*
|
||||
:tch editing.txt /*:tch*
|
||||
@ -3401,7 +3412,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:vie editing.txt /*:vie*
|
||||
:view editing.txt /*:view*
|
||||
:vim quickfix.txt /*:vim*
|
||||
:vim9 repeat.txt /*:vim9*
|
||||
:vim9 vim9.txt /*:vim9*
|
||||
:vim9cmd vim9.txt /*:vim9cmd*
|
||||
:vim9s repeat.txt /*:vim9s*
|
||||
:vim9script repeat.txt /*:vim9script*
|
||||
:vimgrep quickfix.txt /*:vimgrep*
|
||||
:vimgrepa quickfix.txt /*:vimgrepa*
|
||||
@ -3926,6 +3939,7 @@ E1050 vim9.txt /*E1050*
|
||||
E107 eval.txt /*E107*
|
||||
E108 eval.txt /*E108*
|
||||
E109 eval.txt /*E109*
|
||||
E1091 vim9.txt /*E1091*
|
||||
E1092 vim9.txt /*E1092*
|
||||
E1094 vim9.txt /*E1094*
|
||||
E11 cmdline.txt /*E11*
|
||||
@ -3943,9 +3957,12 @@ E1136 map.txt /*E1136*
|
||||
E1137 map.txt /*E1137*
|
||||
E114 eval.txt /*E114*
|
||||
E115 eval.txt /*E115*
|
||||
E1155 autocmd.txt /*E1155*
|
||||
E116 eval.txt /*E116*
|
||||
E117 eval.txt /*E117*
|
||||
E118 eval.txt /*E118*
|
||||
E1187 starting.txt /*E1187*
|
||||
E1188 cmdline.txt /*E1188*
|
||||
E119 eval.txt /*E119*
|
||||
E12 message.txt /*E12*
|
||||
E120 eval.txt /*E120*
|
||||
@ -5423,6 +5440,7 @@ assert_fails() testing.txt /*assert_fails()*
|
||||
assert_false() testing.txt /*assert_false()*
|
||||
assert_inrange() testing.txt /*assert_inrange()*
|
||||
assert_match() testing.txt /*assert_match()*
|
||||
assert_nobeep() testing.txt /*assert_nobeep()*
|
||||
assert_notequal() testing.txt /*assert_notequal()*
|
||||
assert_notmatch() testing.txt /*assert_notmatch()*
|
||||
assert_report() testing.txt /*assert_report()*
|
||||
@ -6416,6 +6434,7 @@ fixed-7.2 version7.txt /*fixed-7.2*
|
||||
fixed-7.3 version7.txt /*fixed-7.3*
|
||||
fixed-7.4 version7.txt /*fixed-7.4*
|
||||
flatten() eval.txt /*flatten()*
|
||||
flattennew() eval.txt /*flattennew()*
|
||||
flexwiki.vim syntax.txt /*flexwiki.vim*
|
||||
float-e eval.txt /*float-e*
|
||||
float-functions usr_41.txt /*float-functions*
|
||||
@ -6425,6 +6444,7 @@ floating-point-format eval.txt /*floating-point-format*
|
||||
floating-point-precision eval.txt /*floating-point-precision*
|
||||
floor() eval.txt /*floor()*
|
||||
fmod() eval.txt /*fmod()*
|
||||
fname-variable eval.txt /*fname-variable*
|
||||
fname_diff-variable eval.txt /*fname_diff-variable*
|
||||
fname_in-variable eval.txt /*fname_in-variable*
|
||||
fname_new-variable eval.txt /*fname_new-variable*
|
||||
@ -6573,6 +6593,7 @@ ft-mail.vim syntax.txt /*ft-mail.vim*
|
||||
ft-make-syntax syntax.txt /*ft-make-syntax*
|
||||
ft-man-plugin filetype.txt /*ft-man-plugin*
|
||||
ft-maple-syntax syntax.txt /*ft-maple-syntax*
|
||||
ft-markdown-plugin filetype.txt /*ft-markdown-plugin*
|
||||
ft-masm-syntax syntax.txt /*ft-masm-syntax*
|
||||
ft-mathematica-syntax syntax.txt /*ft-mathematica-syntax*
|
||||
ft-matlab-indent indent.txt /*ft-matlab-indent*
|
||||
@ -6663,6 +6684,7 @@ ftplugin-name usr_05.txt /*ftplugin-name*
|
||||
ftplugin-overrule filetype.txt /*ftplugin-overrule*
|
||||
ftplugin-special usr_41.txt /*ftplugin-special*
|
||||
ftplugins usr_05.txt /*ftplugins*
|
||||
fullcommand() eval.txt /*fullcommand()*
|
||||
funcref() eval.txt /*funcref()*
|
||||
function() eval.txt /*function()*
|
||||
function-argument eval.txt /*function-argument*
|
||||
@ -6672,6 +6694,7 @@ function-range-example eval.txt /*function-range-example*
|
||||
function-search-undo eval.txt /*function-search-undo*
|
||||
function_key intro.txt /*function_key*
|
||||
functions eval.txt /*functions*
|
||||
fuzzy-match pattern.txt /*fuzzy-match*
|
||||
fvwm.vim syntax.txt /*fvwm.vim*
|
||||
fvwm2rc syntax.txt /*fvwm2rc*
|
||||
fvwmrc syntax.txt /*fvwmrc*
|
||||
@ -7493,6 +7516,7 @@ info-message starting.txt /*info-message*
|
||||
inform.vim syntax.txt /*inform.vim*
|
||||
informix ft_sql.txt /*informix*
|
||||
initialization starting.txt /*initialization*
|
||||
inline-function vim9.txt /*inline-function*
|
||||
input() eval.txt /*input()*
|
||||
inputdialog() eval.txt /*inputdialog()*
|
||||
inputlist() eval.txt /*inputlist()*
|
||||
@ -7633,6 +7657,7 @@ lc_time-variable eval.txt /*lc_time-variable*
|
||||
lcs-conceal options.txt /*lcs-conceal*
|
||||
lcs-eol options.txt /*lcs-eol*
|
||||
lcs-extends options.txt /*lcs-extends*
|
||||
lcs-lead options.txt /*lcs-lead*
|
||||
lcs-nbsp options.txt /*lcs-nbsp*
|
||||
lcs-precedes options.txt /*lcs-precedes*
|
||||
lcs-space options.txt /*lcs-space*
|
||||
@ -7661,6 +7686,7 @@ linewise-visual visual.txt /*linewise-visual*
|
||||
lisp.vim syntax.txt /*lisp.vim*
|
||||
lispindent() eval.txt /*lispindent()*
|
||||
list eval.txt /*list*
|
||||
list-concatenation eval.txt /*list-concatenation*
|
||||
list-functions usr_41.txt /*list-functions*
|
||||
list-identity eval.txt /*list-identity*
|
||||
list-index eval.txt /*list-index*
|
||||
@ -7768,6 +7794,7 @@ map-return map.txt /*map-return*
|
||||
map-self-destroy tips.txt /*map-self-destroy*
|
||||
map-space_in_lhs map.txt /*map-space_in_lhs*
|
||||
map-space_in_rhs map.txt /*map-space_in_rhs*
|
||||
map-table map.txt /*map-table*
|
||||
map-typing map.txt /*map-typing*
|
||||
map-which-keys map.txt /*map-which-keys*
|
||||
map.txt map.txt /*map.txt*
|
||||
@ -8566,6 +8593,12 @@ prop_type_change() textprop.txt /*prop_type_change()*
|
||||
prop_type_delete() textprop.txt /*prop_type_delete()*
|
||||
prop_type_get() textprop.txt /*prop_type_get()*
|
||||
prop_type_list() textprop.txt /*prop_type_list()*
|
||||
ps1-about ft_ps1.txt /*ps1-about*
|
||||
ps1-compiler ft_ps1.txt /*ps1-compiler*
|
||||
ps1-folding ft_ps1.txt /*ps1-folding*
|
||||
ps1-keyword ft_ps1.txt /*ps1-keyword*
|
||||
ps1-syntax ft_ps1.txt /*ps1-syntax*
|
||||
ps1.txt ft_ps1.txt /*ps1.txt*
|
||||
psql ft_sql.txt /*psql*
|
||||
ptcap.vim syntax.txt /*ptcap.vim*
|
||||
pterm-mouse options.txt /*pterm-mouse*
|
||||
@ -8693,6 +8726,7 @@ quotestar gui.txt /*quotestar*
|
||||
quote~ change.txt /*quote~*
|
||||
r change.txt /*r*
|
||||
r.vim syntax.txt /*r.vim*
|
||||
raku-unicode ft_raku.txt /*raku-unicode*
|
||||
rand() eval.txt /*rand()*
|
||||
random eval.txt /*random*
|
||||
range() eval.txt /*range()*
|
||||
@ -9154,6 +9188,7 @@ str2float() eval.txt /*str2float()*
|
||||
str2list() eval.txt /*str2list()*
|
||||
str2nr() eval.txt /*str2nr()*
|
||||
strcasestr() eval.txt /*strcasestr()*
|
||||
strcharlen() eval.txt /*strcharlen()*
|
||||
strcharpart() eval.txt /*strcharpart()*
|
||||
strchars() eval.txt /*strchars()*
|
||||
strchr() eval.txt /*strchr()*
|
||||
@ -9709,6 +9744,7 @@ timestamp editing.txt /*timestamp*
|
||||
timestamps editing.txt /*timestamps*
|
||||
tips tips.txt /*tips*
|
||||
tips.txt tips.txt /*tips.txt*
|
||||
tmux syntax.txt /*tmux*
|
||||
todo todo.txt /*todo*
|
||||
todo.txt todo.txt /*todo.txt*
|
||||
toggle options.txt /*toggle*
|
||||
@ -9848,6 +9884,7 @@ 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*
|
||||
v:fname eval.txt /*v:fname*
|
||||
v:fname_diff eval.txt /*v:fname_diff*
|
||||
v:fname_in eval.txt /*v:fname_in*
|
||||
v:fname_new eval.txt /*v:fname_new*
|
||||
@ -10103,6 +10140,8 @@ vim-dev intro.txt /*vim-dev*
|
||||
vim-mac intro.txt /*vim-mac*
|
||||
vim-modes intro.txt /*vim-modes*
|
||||
vim-modes-intro intro.txt /*vim-modes-intro*
|
||||
vim-raku ft_raku.txt /*vim-raku*
|
||||
vim-raku.txt ft_raku.txt /*vim-raku.txt*
|
||||
vim-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-use intro.txt /*vim-use*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
@ -10119,14 +10158,20 @@ 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-ignored-argument vim9.txt /*vim9-ignored-argument*
|
||||
vim9-import vim9.txt /*vim9-import*
|
||||
vim9-lambda vim9.txt /*vim9-lambda*
|
||||
vim9-lambda-arguments vim9.txt /*vim9-lambda-arguments*
|
||||
vim9-mix vim9.txt /*vim9-mix*
|
||||
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-intro usr_46.txt /*vim9-script-intro*
|
||||
vim9-types vim9.txt /*vim9-types*
|
||||
vim9-unpack-ignore vim9.txt /*vim9-unpack-ignore*
|
||||
vim9-user-command vim9.txt /*vim9-user-command*
|
||||
vim9-variable-arguments vim9.txt /*vim9-variable-arguments*
|
||||
vim9.txt vim9.txt /*vim9.txt*
|
||||
vim9script vim9.txt /*vim9script*
|
||||
vim: options.txt /*vim:*
|
||||
|
@ -888,19 +888,25 @@ like |CTRL-]|.
|
||||
|
||||
The function used for generating the taglist is specified by setting the
|
||||
'tagfunc' option. The function will be called with three arguments:
|
||||
a:pattern The tag identifier used during the tag search.
|
||||
a:flags List of flags to control the function behavior.
|
||||
a:pattern The tag identifier or pattern used during the tag search.
|
||||
a:flags String containing flags to control the function behavior.
|
||||
a:info Dict containing the following entries:
|
||||
buf_ffname Full filename which can be used for priority.
|
||||
user_data Custom data String, if stored in the tag
|
||||
stack previously by tagfunc.
|
||||
|
||||
Currently two flags may be passed to the tag function:
|
||||
Currently up to three flags may be passed to the tag function:
|
||||
'c' The function was invoked by a normal command being processed
|
||||
(mnemonic: the tag function may use the context around the
|
||||
cursor to perform a better job of generating the tag list.)
|
||||
'i' In Insert mode, the user was completing a tag (with
|
||||
|i_CTRL-X_CTRL-]|).
|
||||
|i_CTRL-X_CTRL-]| or 'completeopt' contains `t`).
|
||||
'r' The first argument to tagfunc should be interpreted as a
|
||||
|pattern| (see |tag-regexp|), such as when using: >
|
||||
:tag /pat
|
||||
< It is also given when completing in insert mode.
|
||||
If this flag is not present, the argument is usually taken
|
||||
literally as the full tag name.
|
||||
|
||||
Note that when 'tagfunc' is set, the priority of the tags described in
|
||||
|tag-priority| does not apply. Instead, the priority is exactly as the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Jan 04
|
||||
*terminal.txt* For Vim version 8.2. Last change: 2021 Feb 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -126,11 +126,28 @@ After opening the terminal window and setting 'buftype' to "terminal" the
|
||||
|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
|
||||
This only works properly if the terminal is not hidden.
|
||||
|
||||
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.
|
||||
For both hidden and non-hidden terminals this works, both for buffer-local and
|
||||
window-local options: >
|
||||
au TerminalWinOpen,BufWinEnter * if &buftype == 'terminal'
|
||||
\ | setlocal bufhidden=hide colorcolumn=123
|
||||
\ | endif
|
||||
Note that for a hidden terminal the options are not set until the terminal is
|
||||
no longer hidden.
|
||||
|
||||
There is also the |TerminalOpen| event. Keep in mind this may be triggered
|
||||
for a hidden terminal, then the current window and buffer are not that of the
|
||||
new terminal.
|
||||
You need to use <abuf>, which is set to the terminal buffer. Example: >
|
||||
au TerminalOpen * call setbufvar(+expand('<abuf>'), '&colorcolumn', 123)
|
||||
au TerminalOpen * call setbufvar(expand('<abuf>')->str2nr(),
|
||||
\ '&termwinscroll', 1000)
|
||||
For a window-local option, you need to delay setting the option until the
|
||||
terminal window has been created (this only works for a hidden terminal): >
|
||||
au TerminalOpen * exe printf(
|
||||
\ 'au BufWinEnter <buffer=%d> ++once setlocal colorcolumn=%d',
|
||||
\ expand('<abuf>')->str2nr(), 123)
|
||||
For a non-hidden terminal use |TerminalWinOpen|.
|
||||
|
||||
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
|
||||
@ -717,6 +734,8 @@ term_scrape({buf}, {row}) *term_scrape()*
|
||||
"attr" attributes of the cell, use |term_getattr()|
|
||||
to get the individual flags
|
||||
"width" cell width: 1 or 2
|
||||
For a double-width cell there is one item, thus the list can
|
||||
be shorter than the width of the terminal.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetBufnr()->term_scrape(row)
|
||||
|
@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2020 Dec 12
|
||||
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -168,6 +168,7 @@ test_override({name}, {val}) *test_override()*
|
||||
wait time of up to 3 seconds for messages
|
||||
term_props reset all terminal properties when the version
|
||||
string is detected
|
||||
uptime overrules sysinfo.uptime
|
||||
ALL clear all overrides ({val} is not used)
|
||||
|
||||
"starting" is to be used when a test should behave like
|
||||
@ -242,7 +243,8 @@ test_srand_seed([seed]) *test_srand_seed()*
|
||||
assert_beeps({cmd}) *assert_beeps()*
|
||||
Run {cmd} and add an error message to |v:errors| if it does
|
||||
NOT produce a beep or visual bell.
|
||||
Also see |assert_fails()| and |assert-return|.
|
||||
Also see |assert_fails()|, |assert_nobeep()| and
|
||||
|assert-return|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetCmd()->assert_beeps()
|
||||
@ -375,6 +377,14 @@ assert_match({pattern}, {actual} [, {msg}])
|
||||
|
||||
Can also be used as a |method|: >
|
||||
getFile()->assert_match('foo.*')
|
||||
<
|
||||
assert_nobeep({cmd}) *assert_nobeep()*
|
||||
Run {cmd} and add an error message to |v:errors| if it
|
||||
produces a beep or visual bell.
|
||||
Also see |assert_beeps()|.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetCmd()->assert_nobeep()
|
||||
<
|
||||
*assert_notequal()*
|
||||
assert_notequal({expected}, {actual} [, {msg}])
|
||||
|
@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2020 Oct 14
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2021 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -126,7 +126,7 @@ prop_add({lnum}, {col}, {props})
|
||||
length length of text in bytes, can only be used
|
||||
for a property that does not continue in
|
||||
another line; can be zero
|
||||
end_lnum line number for the end of text
|
||||
end_lnum line number for the end of text (inclusive)
|
||||
end_col column just after the text; not used when
|
||||
"length" is present; when {col} and "end_col"
|
||||
are equal, and "end_lnum" is omitted or equal
|
||||
@ -175,6 +175,7 @@ prop_find({props} [, {direction}])
|
||||
Search for a text property as specified with {props}:
|
||||
id property with this ID
|
||||
type property with this type name
|
||||
both "id" and "type" must both match
|
||||
bufnr buffer to search in; when present a
|
||||
start position with "lnum" and "col"
|
||||
must be given; when omitted the
|
||||
@ -187,6 +188,7 @@ prop_find({props} [, {direction}])
|
||||
skipstart do not look for a match at the start
|
||||
position
|
||||
|
||||
A property matches when either "id" or "type" matches.
|
||||
{direction} can be "f" for forward and "b" for backward. When
|
||||
omitted forward search is performed.
|
||||
|
||||
@ -226,7 +228,8 @@ prop_remove({props} [, {lnum} [, {lnum-end}]])
|
||||
{lnum-end} is given, remove matching text properties from line
|
||||
{lnum} to {lnum-end} (inclusive).
|
||||
When {lnum} is omitted remove matching text properties from
|
||||
all lines.
|
||||
all lines (this requires going over all lines, thus will be a
|
||||
bit slow for a buffer with many lines).
|
||||
|
||||
{props} is a dictionary with these fields:
|
||||
id remove text properties with this ID
|
||||
@ -258,8 +261,8 @@ prop_type_add({name}, {props}) *prop_type_add()* *E969* *E970*
|
||||
properties the one with the highest priority
|
||||
will be used; negative values can be used, the
|
||||
default priority is zero
|
||||
combine when TRUE combine the highlight with any
|
||||
syntax highlight; when omitted or FALSE syntax
|
||||
combine when omitted or TRUE combine the highlight
|
||||
with any syntax highlight; when FALSE syntax
|
||||
highlight will not be used
|
||||
start_incl when TRUE inserts at the start position will
|
||||
be included in the text property
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jan 31
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 May 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -38,110 +38,71 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Geen memory leak?
|
||||
|
||||
Crash using outer var from nested lambda:
|
||||
vim9script
|
||||
def F(text: string): func(string): func(string): string
|
||||
return (arg: string): func(string): string => ((sep: string): string => {
|
||||
return text .. ' ' .. arg
|
||||
})
|
||||
enddef
|
||||
|
||||
echo F('hello')(' ')('there')
|
||||
|
||||
|
||||
|
||||
Vim9 - Make everything work:
|
||||
- Add a test for profiling with nested function calls and lambda.
|
||||
- Expand `=expr` in :next, :argedit, :argadd, :argdelete, :drop
|
||||
- Expand `=expr` in :vimgrep, :vimgrepadd, :lvimgrep, :lvimgrepadd
|
||||
- Expand `=expr` in :mkspell
|
||||
- Unlet with range: "unlet list[a : b]"
|
||||
- Implement "export {one, two three}".
|
||||
- ISN_CHECKTYPE could use check_argtype()
|
||||
- Using a script variable inside a :def function doesn't work if the variable
|
||||
is inside a block, see Test_nested_function(). Should it work?
|
||||
- give error for variable name:
|
||||
var p = function('NoSuchFunc')
|
||||
- Make closures work better:
|
||||
- Create closure in a loop. Need to make a list of them.
|
||||
- If a :def function is called with a function reference, compile it to get
|
||||
the function type.
|
||||
def Filter(x: string, Cond: func(string): bool)
|
||||
Filter(x, (v) => v =~ '^b')
|
||||
- Make inline function work, to be used as a funcref:
|
||||
var Ref = (arg: type): type => {
|
||||
statement
|
||||
return expr
|
||||
}
|
||||
var Ref = (arg: type) => {
|
||||
statement
|
||||
statement
|
||||
}
|
||||
- For builtin functions using tv_get_string*() use check_for_string() to be
|
||||
more strict about the argument type.
|
||||
- Implement :lockvar and :unlockvar. How about local variables? Perhaps only
|
||||
allow this for global variables. Use :final or :const otherwise.
|
||||
- Allow function names that will be script-local to start with lower case
|
||||
letter? Or also require names with s: prefix to use upper case?
|
||||
Also apply this function references "var ref = SomeFunc"
|
||||
- Support passing v:none to use the default argument value. (#6504)
|
||||
- Run the same tests in :def and Vim9 script, like in Test_expr7_not()
|
||||
- Check many more builtin function arguments at compile time.
|
||||
- make 0 == 'string' fail on the script level, like inside :def.
|
||||
- Check that when using a user function name without prefix, it does not find
|
||||
a global function. Prefixing g: is required.
|
||||
- Need the equivalent of get_lval() and set_var_lval() to implement assignment
|
||||
to nested list and dict members.
|
||||
- Assignment to dict doesn't work:
|
||||
var ret: dict<string> = #{}
|
||||
ret[i] = string(i)
|
||||
- Appending to dict item doesn't work:
|
||||
var d[i] ..= value
|
||||
- Using ".." at script level doesn't convert arguments to a string.
|
||||
- Compile replacement of :s command: s/pat/\=expr/
|
||||
- Compile redir to local variable: var_redir_start().
|
||||
- Implement type cast at the script level.
|
||||
- Compile builtin functions that access local variables:
|
||||
islocked()
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
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.
|
||||
- Make "++nr" work. "++g:count" doesn't work, thinks it is a range.
|
||||
- Reload: How to make sure type of script function hasn't changed?
|
||||
- expandcmd() with `=expr` in filename uses legacy expression.
|
||||
- eval_expr() in ex_cexpr()
|
||||
- eval_expr() call in dbg_parsearg() and debuggy_find()
|
||||
- compile "skip" argument of searchpair()
|
||||
- function returning nothing should return void instead of zero
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- give an error for "echo Func()" if Func() does not return anything.
|
||||
- Need some solution for dict function. Can we implement part of classes?
|
||||
- A lambda without {} does not require a return type, using { return x } does.
|
||||
That's unexpected, since the arguments are not required to have a type.
|
||||
alt 1: not require a return type, figure it out from the common type of all
|
||||
the return statements found
|
||||
alt 2: also require argument types
|
||||
- Using "windo echo expr" does not accept a line break inside "expr" (in a
|
||||
:def function and at script level in a not executed block). #7681
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
- Add all the error numbers in a good place in documentation.
|
||||
- In the generic eval docs, point out the Vim9 syntax where it differs.
|
||||
|
||||
Also for Vim9:
|
||||
- better implementation for partial and tests for that.
|
||||
- Make "g:imported = Export.exported" work in Vim9 script.
|
||||
- Make Foo.Bar() work to call the dict function. (#5676)
|
||||
- Error in any command in "vim9script" aborts sourcing.
|
||||
- Find a way to test expressions in legacy and Vim9 script without duplication
|
||||
- use CheckLegacyAndVim9Success(lines) in many more places
|
||||
- For builtin functions using tv_get_string*() use check_for_string() to be
|
||||
more strict about the argument type (not a bool).
|
||||
done: balloon_()
|
||||
- Check many more builtin function arguments at compile time.
|
||||
map() could check that the return type of the function argument matches
|
||||
the type of the list or dict member. (#8092)
|
||||
- Allow for using an autoload function name without quotes. It is then loaded
|
||||
(and compiled) right away. #8124
|
||||
- Test more expressions in legacy and Vim9 script, using
|
||||
CheckLegacyAndVim9Success()
|
||||
- Test try/catch and throw better, also nested.
|
||||
Test that return inside try/finally jumps to finally and then returns.
|
||||
- Test that a function defined inside a :def function is local to that
|
||||
function, g: functions can be defined and script-local functions cannot be
|
||||
defined.
|
||||
- compile options that are an expression, e.g. "expr:" in 'spellsuggest',
|
||||
- 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?
|
||||
- Reserve command for future use: :type, :class, :enum
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Change the help to prefer Vim9 syntax where appropriate
|
||||
- Add all the error numbers in a good place in documentation.
|
||||
- In the generic eval docs, point out the Vim9 syntax where it differs.
|
||||
- Add the "vim9script" feature, can use has('vim9script')
|
||||
- Use Vim9 for runtime files.
|
||||
PR #7497 for autoload/ccomplete.vim
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- better implementation for partial and tests for that.
|
||||
- Compile options that are an expression, e.g. "expr:" in 'spellsuggest',
|
||||
'foldexpr', 'foldtext', 'printexpr', 'diffexpr', 'patchexpr', 'charconvert',
|
||||
'balloonexpr', 'includeexpr', 'indentexpr', 'formatexpr'.
|
||||
Give an error if compilation fails. (#7625)
|
||||
Use the location where the option was set for deciding whether it's to be
|
||||
evaluated in Vim9 script context.
|
||||
- implement :type; import type declaration.
|
||||
- implement enum; import enum.
|
||||
- implement :type, import type declaration.
|
||||
- implement enum, import enum.
|
||||
- Future work: See |vim9-classes|
|
||||
Define the keywords and commands to make sure it will be backwards
|
||||
compatible.
|
||||
- Make debugging work - at least per function. Need to recompile a function
|
||||
to step through it line-by-line? Evaluate the stack and variables on the
|
||||
stack?
|
||||
- List commands when 'verbose' is set or :verbose is used.
|
||||
|
||||
Further Vim9 improvements, possibly after launch:
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
@ -149,9 +110,15 @@ Further Vim9 improvements, possibly after launch:
|
||||
- Make accessing varargs faster: arg[expr]
|
||||
EVAL expr
|
||||
LOADVARARG (varargs idx)
|
||||
- When evaluating constants for script variables, some functions could work:
|
||||
has(featureName), len(someString)
|
||||
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
|
||||
|
||||
|
||||
Popup windows:
|
||||
- Preview popup not properly updated when it overlaps with completion menu.
|
||||
(Yegappan Lakshmanan, 2021 May 22
|
||||
- In some cases prop_remove() does not work correctly. (#8261)
|
||||
- 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.
|
||||
@ -160,12 +127,15 @@ Popup windows:
|
||||
- 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.?
|
||||
- Make it possible to scroll horizontally when 'wrap' is off. Does this
|
||||
require an ascii scrollbar, like with the vertical one?
|
||||
- Fire some autocommand event after a new popup window was created and
|
||||
positioned? PopupNew? Could be used to set some options or move it out of
|
||||
the way. (#5737)
|
||||
However, it may also cause trouble, changing the popup of another plugin.
|
||||
- Width is not computed correctly when minwidth and maxwidth are &columns
|
||||
and padding and a scrollbar are used. (#6676)
|
||||
- Should popup_getoptions() also return the mask? #7774
|
||||
- Add a way to use popup_menu() synchronously: instead of invoking the
|
||||
callback, return the choice. (Ben Jackson, #6534)
|
||||
- Use popup (or popup menu) for command line completion
|
||||
@ -181,23 +151,25 @@ Popup windows:
|
||||
- Figure out the size and position better if wrapping inserts indent
|
||||
|
||||
Text properties:
|
||||
- property is overruled by cursorline. (#8225).
|
||||
Add better control over priority? Make list of all highlighting, specify
|
||||
where property fits in.
|
||||
Or Should we let the textprop highlight overrule other (e.g. diff) highlight
|
||||
if the priority is above a certain value? (#7392)
|
||||
- Popup attached to text property stays visible when text is no longer
|
||||
visible. (#7736)
|
||||
- Popup attached to text property stays visible when text is deleted with
|
||||
"cc". (#7737) "C" works OK. "dd" also files in a buffer with a single
|
||||
line.
|
||||
- Auto-indenting may cause highlighting to shift. (#7719)
|
||||
- "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:
|
||||
- :s/foo using CTRL-G moves to another line, should not happen, or use the
|
||||
correct line (it uses the last but one line) (Lifepillar, Aug 18, #3345)
|
||||
- :s@pat/tern@ doesn't include "/" in the pattern. (Takahiro Yoshihara, #3637)
|
||||
pass delim to do_search() ?
|
||||
- Also support range: :/foo/,/bar/delete
|
||||
- Also support for user command, e.g. Cfilter
|
||||
- :%s/foo should take the first match below the cursor line, unless there
|
||||
@ -267,7 +239,35 @@ Terminal emulator window:
|
||||
- When 'encoding' is not utf-8, or the job is using another encoding, setup
|
||||
conversions.
|
||||
|
||||
Valgind reports memory leaks in test_options
|
||||
Include patch #6290: recognize shell directory change.
|
||||
|
||||
MS-Windows GUI: default 'encoding' to "utf-8" ? (#8221)
|
||||
Add #ifdef MSWIN before enc_locale() in set_init_1().
|
||||
Or just always for MS-Windows? Conversion to 'termencoding' should always
|
||||
work?
|
||||
|
||||
Valgrind reports memory leaks in test_options.
|
||||
Valgrind reports overlapping memcpy in
|
||||
test_conceal.3
|
||||
test_edit.1
|
||||
test_functions.4
|
||||
test_ins_complete.3
|
||||
test_method
|
||||
test_normal
|
||||
test_popupwin.35 et al.
|
||||
test_search_stat
|
||||
Using uninitialized value in test_crypt (can't explain why).
|
||||
Memory leak in test_debugger
|
||||
Memory leak in test_paste, using XtOpenDisplay several times
|
||||
OLD:
|
||||
TODO: be able to run all parts of test_alot with valgrind separately
|
||||
Memory leak in test_alot with pyeval() (allocating partial)
|
||||
Memory leak in test_alot with expand()
|
||||
Memory leaks in test_channel? (or is it because of fork())
|
||||
|
||||
":set &shellpipe" and ":set &shellredir" should use the logic from
|
||||
initialization to figure out the default value from 'shell'. Add a test for
|
||||
this.
|
||||
|
||||
test_arglist func Test_all_not_allowed_from_cmdwin() hangs on MS-Windows.
|
||||
|
||||
@ -279,11 +279,24 @@ Have another look at the implementation.
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally written by Felipe Morales.
|
||||
|
||||
Request to use "." for the cursor column in search pattern \%<.c and \%<.v.
|
||||
(#8179)
|
||||
|
||||
Adding "10" to 'spellsuggest' causes spell suggestions to become very slow.
|
||||
(#4087) Did patch 8.2.2379 help?
|
||||
Also, z= in German on a long word can take a very long time, but CTRL-C to
|
||||
interrupt does not work. Where to add ui_breakcheck()?
|
||||
|
||||
Remove SPACE_IN_FILENAME ? It is only used for completion.
|
||||
|
||||
Searching for \%'> does not find anything when using line Visual selection.
|
||||
Probably because it's using MAXCOL. #8238
|
||||
|
||||
Add optional argument to virtcol() that specifies "start", "cursor" or "end"
|
||||
to tell which value from getvvcol() should be used. (#7964)
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
Scroll doesn't work correctly, why?
|
||||
|
||||
@ -292,11 +305,16 @@ with 'termguicolors'. #1740
|
||||
|
||||
Patch for blockwise paste reporting changes: #6660.
|
||||
|
||||
Patch to make fillchars global-local. (#5206)
|
||||
|
||||
Missing filetype test for bashrc, PKGBUILD, etc.
|
||||
|
||||
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
|
||||
changes.
|
||||
|
||||
When using ":bwipe!" also get rid of references to be buffer, e.g. in the
|
||||
jumplist and alternate file.
|
||||
|
||||
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
|
||||
@ -310,6 +328,13 @@ Try setting a color then request the current color, like using t_u7.
|
||||
Regexp to search for duplicate lines does not work correctly:
|
||||
/\(^.*\n\)\1 (Chris Morgan, #6239)
|
||||
|
||||
MS-Windows: when writing undo file the infostreams are copied in
|
||||
mch_copy_file_attribute(), that seems unnecessary. (#7925)
|
||||
Add a flag to only copy attributes?
|
||||
|
||||
Make the jumplist behave like a tag stack. (#7738) Should there be a more
|
||||
time bound navigation, like with undo?
|
||||
|
||||
Changing a capturing group to non-capturing changes the result: #7607
|
||||
:echo matchstr('aaa bbb', '\(.\{-1,}\>\)\|.*')
|
||||
aaa
|
||||
@ -386,6 +411,10 @@ manager. Problem with Motif?
|
||||
|
||||
Patch to add :argdedupe. (Nir Lichtman, #6235)
|
||||
|
||||
When editing a file with ":edit" the output of :swapname is relative, while
|
||||
editing it with "vim file" it is absolute. (#355)
|
||||
Which one should it be?
|
||||
|
||||
:map output does not clear the reset of the command line.
|
||||
(#5623, also see #5962)
|
||||
|
||||
@ -407,6 +436,8 @@ Using mode() when "/pat" is used in Visual mode returns "v" instead of "c",
|
||||
which is not useful. Return "c/v" instead. And "c/o" when using "d/pat".
|
||||
#6127
|
||||
|
||||
Add a cterm attribute for "dimmed" or "faint" text. (#8269)
|
||||
|
||||
When 'fileignorecase' is set ":e testfile.c" works to edit TestFile.c, but
|
||||
":find testfile.c" does not ignore case.
|
||||
Might be related to #6088.
|
||||
@ -493,6 +524,9 @@ Assuming the files are text, print the line with the difference.
|
||||
|
||||
Result of synID() sometimes wrong in help files. (#5252)
|
||||
|
||||
When a help file is opened that doesn't have "ft=help" in the modeline then
|
||||
the FileType is first set to "text" before it is set to "help". (#8099)
|
||||
|
||||
Problem showing a line if the number column width changes when using "o".
|
||||
(Mateusz Morusiewicz, #4245)
|
||||
|
||||
@ -568,7 +602,7 @@ The quoting of the [command] argument of :terminal is not clearly documented.
|
||||
Give a few examples. (#4288)
|
||||
|
||||
Opening a file with --remote-tab-silent that matches 'wildignore' does not
|
||||
work, results in (E479: No match". (#4610)
|
||||
work, results in "E479: No match". (#4610)
|
||||
|
||||
7 Add an option to add one pixel column to the character width? Lucida
|
||||
Console italic is wider than the normal font ("d" overlaps with next char).
|
||||
@ -757,25 +791,13 @@ 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
|
||||
Memory leak in test_alot with pyeval() (allocating partial)
|
||||
Memory leak in test_alot with expand()
|
||||
Memory leaks in test_channel? (or is it because of fork())
|
||||
|
||||
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
|
||||
19.
|
||||
|
||||
Should make 'listchars' global-local. Local to window or to buffer?
|
||||
Probably window. #5206
|
||||
Add something like 'fillchars' local to window, but allow for specifying a
|
||||
highlight name. Esp. for the statusline.
|
||||
And "extends" and "precedes" are also useful without 'list' set. Also in
|
||||
'fillchars' or another option?
|
||||
Related: #3820 - Support setting the character displayed below the last line?
|
||||
Neovim uses "eob:X" in 'fillchars'.
|
||||
|
||||
Sourceforge Vim pages still have content, redirect from empty page.
|
||||
Check for PHP errors. (Wayne Davison, 2018 Oct 26)
|
||||
@ -1023,8 +1045,7 @@ for a path separator. (xtal8, #2201)
|
||||
Would be nice for Insert mode completion to highlight the text that was added
|
||||
(and may change when picking another completion).
|
||||
|
||||
Test runtime files.
|
||||
Start with filetype detection: testdir/test_filetype.vim
|
||||
Test more runtime files.
|
||||
|
||||
Window not closed when deleting buffer. (Harm te Hennepe, 2017 Aug 27, #2029)
|
||||
|
||||
@ -1114,9 +1135,6 @@ Problem with using :cd when remotely editing a file. (Gerd Wachsmuth, 2017 May
|
||||
Using "wviminfo /tmp/viminfo" does not store file marks that Vim knows about,
|
||||
it only works when merging with an existing file. (Shougo, 2017 Jun 19, #1781)
|
||||
|
||||
Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
|
||||
Memory leak in test97? The string is actually freed. Weird.
|
||||
|
||||
assert_fails() can only check for the first error. Make it possible to have
|
||||
@ -1167,9 +1185,6 @@ timer expires.
|
||||
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)
|
||||
|
||||
8 "stl" and "stlnc" in 'fillchars' don't work for multibyte characters.
|
||||
Patch by Christian Wellenbrock, 2013 Jul 5.
|
||||
|
||||
Using CTRL-G_U in InsertCharPre causes trouble for redo. (Israel Chauca
|
||||
Fuentes, 2017 Feb 12, #1470)
|
||||
|
||||
@ -1221,10 +1236,6 @@ Patch for wrong cursor position on wrapped line, involving breakindent.
|
||||
|
||||
Patch for 'cursorlinenr' option. (Ozaki Kiichi, 2016 Nov 30)
|
||||
|
||||
When 'completeopt' has "noselect" does not insert a newline. (Lifepillar, 2017
|
||||
Apr 23, #1653)
|
||||
Can 'completeopt' be made buffer-local? (#5487)
|
||||
|
||||
Window resizing with 'winfixheight': With a vertical split the height changes
|
||||
anyway. (Tommy allen, 2017 Feb 21, #1502)
|
||||
|
||||
@ -1239,9 +1250,6 @@ Patch to add Zstandard compressed file support. (Nick Terrell, 2016 Oct 24)
|
||||
On Windows buffer completion sees backslash as escape char instead of path
|
||||
separator. (Toffanim, 2016 Nov 24, #1274)
|
||||
|
||||
min() and max() spawn lots of error messages if sorted list/dictionary
|
||||
contains invalid data (Nikolay Pavlov, 2016 Sep 4, #1039)
|
||||
|
||||
Should :vmap in matchit.vim be :xmap? (Tony Mechelynck)
|
||||
|
||||
Problem with whitespace in errorformat. (Gerd Wachsmuth, 2016 May 15, #807)
|
||||
@ -1251,6 +1259,8 @@ Undo problem: "g-" doesn't go back, gets stuck. (Björn Linse, 2016 Jul 18)
|
||||
Add "unicode true" to NSIS installer. Doesn't work with Windows 95, which we
|
||||
no longer support.
|
||||
|
||||
Support sort(l, 'F'), convert strings to float. (#7857)
|
||||
|
||||
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
4#1038)
|
||||
|
||||
@ -1342,9 +1352,6 @@ Regexp problems:
|
||||
Another one: echom matchstr(" sdfsfsf\n sfdsdfsdf",'[^\n]*')
|
||||
(2017 May 15, #1252)
|
||||
|
||||
Feature request: Complete members of a dictionary. (Luc Hermitte, 2017 Jan 4,
|
||||
#1350)
|
||||
|
||||
Undo message is not always properly displayed. Patch by Ken Takata, 2013 oct
|
||||
3. Doesn't work properly according to Yukihiro Nakadaira.
|
||||
Also see #1635.
|
||||
@ -1431,9 +1438,6 @@ Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
|
||||
Add ":read :command", to insert the output of an Ex command?
|
||||
Can already do it with ":$put =execute('command')".
|
||||
|
||||
When repeating the 'confirm' dialog one needs to press Enter. (ds26gte, 2016
|
||||
Apr 17) #762
|
||||
|
||||
exists(":tearoff") does not tell you if the command is implemented. (Tony
|
||||
Mechelynck) Perhaps use exists("::tearoff") to check?
|
||||
|
||||
@ -1503,9 +1507,6 @@ specifically? First try with the parens, then without.
|
||||
Patch to add :mapgroup, put mappings in a group like augroup.
|
||||
(Yasuhiro Matsumoto, 2016 Feb 19)
|
||||
|
||||
Value returned by virtcol() changes depending on how lines wrap. This is
|
||||
inconsistent with the documentation.
|
||||
|
||||
Can we cache the syntax attributes, so that updates for 'relativenumber' and
|
||||
'cursorline'/'cursorcolumn' are a lot faster? Thus store the attributes
|
||||
before combining them.
|
||||
@ -1520,9 +1521,6 @@ Build with Python on Mac does not always use the right library.
|
||||
To support Thai (and other languages) word boundaries, include the ICU
|
||||
library: http://userguide.icu-project.org/boundaryanalysis
|
||||
|
||||
When complete() first argument is before where insert started and 'backspace'
|
||||
is Vi compatible, the completion fails. (Hirohito Higashi, 2015 Feb 19)
|
||||
|
||||
Patch to use two highlight groups for relative numbers. (Shaun Brady, 2016 Jan
|
||||
30)
|
||||
|
||||
@ -1728,9 +1726,6 @@ Patch for XDG base directory support. (Jean François Bignolles, 2014 Mar 4)
|
||||
Remark on the docs. Should not be a compile time feature. But then what?
|
||||
Also see #2034.
|
||||
|
||||
Completion of ":e" is ":earlier", should be ":edit". Complete to the matching
|
||||
command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
|
||||
Patch to define macros for hardcoded values. (Elias Diem, 2013 Dec 14)
|
||||
|
||||
Several syntax file match "^\s*" which may get underlined if that's in the
|
||||
@ -1775,10 +1770,6 @@ The BufUnload event is triggered when re-using the empty buffer.
|
||||
(Pokey Rule, 2013 Jul 22)
|
||||
Patch by Marcin Szamotulski, 2013 Jul 22.
|
||||
|
||||
The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
|
||||
Patch to allow more types in remote_expr(). (Lech Lorens, 2014 Jan 5)
|
||||
Doesn't work for string in list. Other way to pass all types of variables
|
||||
reliably?
|
||||
@ -2024,6 +2015,10 @@ Patch for :tabrecently. (Hirokazu Yoshida, 2012 Jan 30)
|
||||
|
||||
Problem with "syn sync grouphere". (Gustavo Niemeyer, 2011 Jan 27)
|
||||
|
||||
Using "syn sync breaklines=2" works for when text is changed, but not when
|
||||
scrolling or redrawing. Should start search for syntax patterns above the
|
||||
first drawn line. (#8103)
|
||||
|
||||
Loading autoload script even when usage is inside "if 0". (Christian Brabandt,
|
||||
2010 Dec 18)
|
||||
|
||||
@ -2239,10 +2234,6 @@ Syntax priority problem. (Charles Campbell, 2011 Sep 15)
|
||||
When completion inserts the first match, it may trigger the line to be folded.
|
||||
Disable updating folds while completion is active? (Peter Odding, 2010 Jun 9)
|
||||
|
||||
When a:base in 'completefunc' starts with a number it's passed as a number,
|
||||
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
|
||||
string value.
|
||||
|
||||
For running gvim on a USB stick: avoid the OLE registration. Use a command
|
||||
line argument -noregister.
|
||||
|
||||
@ -2474,9 +2465,6 @@ backslash? (Robert Vibrant, 2008 Jun 5)
|
||||
When 'rightleft' is set, cursorcolumn isn't highlighted after the end of a
|
||||
line. It's also wrong in folds. (Dominique Pelle, 2010 Aug 21)
|
||||
|
||||
Using an insert mode expression mapping, cursor is not in the expected
|
||||
position. (ZyX, 2010 Aug 29)
|
||||
|
||||
After using <Tab> for command line completion after ":ta blah" and getting E33
|
||||
(no tags file), further editing the command to e.g., ":echo 'blah'", the
|
||||
command is not executed. Fix by Ian Kelling?
|
||||
@ -2633,10 +2621,6 @@ More AmigaOS4 patches. (Peter Bengtsson, Nov 9)
|
||||
Amiga patches with vbcc. (Adrien Destugues, 2010 Aug 30)
|
||||
http://pulkomandy.ath.cx/drop/vim73_vbcc_amiga.diff
|
||||
|
||||
Insert mode completion: When editing the text and pressing CTRL-N again goes
|
||||
back to originally completed text, edited text is gone. (Peng Yu, 2008 Jul 24)
|
||||
Suggestion by Ben Schmidt, 2008 Aug 6.
|
||||
|
||||
Problem with compound words? (Bert, 2008 May 6)
|
||||
No warning for when flags are defined after they are used in an affix.
|
||||
|
||||
@ -3031,7 +3015,7 @@ More patches:
|
||||
vimtutor.vim. (Jan Minar, 2008 Jul 20)
|
||||
- When fsync() fails there is no hint about what went wrong. Patch by Ben
|
||||
Schmidt, 2008 Jul 22.
|
||||
- testdir/Make_dos_sh.mak for running tests with MingW. (Bill Mccarthy, 2008
|
||||
- testdir/Make_dos_sh.mak for running tests with MingW. (Bill McCarthy, 2008
|
||||
Sep 13)
|
||||
- Replace ccomplete.vim by cppcomplete.vim from www.vim.org? script 1520 by
|
||||
Vissale Neang. (Martin Stubenschrott) Asked Vissale to make the scripts
|
||||
@ -4931,6 +4915,23 @@ Omni completion:
|
||||
|
||||
|
||||
Insert mode completion/expansion:
|
||||
- Is it possible to keep the complete menu open when calling complete()?
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
- When 'completeopt' has "noselect" does not insert a newline.
|
||||
(Lifepillar, 2017 Apr 23, #1653)
|
||||
- Can 'completeopt' be made buffer-local? (#5487)
|
||||
- When complete() first argument is before where insert started and
|
||||
'backspace' is Vi compatible, the completion fails.
|
||||
(Hirohito Higashi, 2015 Feb 19)
|
||||
- The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
- When a:base in 'completefunc' starts with a number it's passed as a
|
||||
number, not a string. (Sean Ma) Need to add flag to call_func_retlist()
|
||||
to force a string value.
|
||||
- When editing the text and pressing CTRL-N again goes back to originally
|
||||
completed text, edited text is gone. (Peng Yu, 2008 Jul 24)
|
||||
Suggestion by Ben Schmidt, 2008 Aug 6.
|
||||
- GUI implementation of the popup menu.
|
||||
7 When searching in other files the name flash by, too fast to read. Only
|
||||
display a name every second or so, like with ":vimgrep".
|
||||
@ -5028,6 +5029,10 @@ Command line editing:
|
||||
|
||||
|
||||
Command line completion:
|
||||
- Feature request: Complete members of a dictionary.
|
||||
(Luc Hermitte, 2017 Jan 4, #1350)
|
||||
- Completion of ":e" is ":earlier", should be ":edit". Complete to the
|
||||
matching command instead of doing this alphabetically. (Mikel Jorgensen)
|
||||
8 Change expand_interactively into a flag that is passed as an argument.
|
||||
8 With command line completion after '%' and '#', expand current/alternate
|
||||
file name, so it can be edited. Also with modifiers, such as "%:h".
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_02.txt* For Vim version 8.2. Last change: 2019 Nov 21
|
||||
*usr_02.txt* For Vim version 8.2. Last change: 2021 Apr 24
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -43,7 +43,7 @@ like:
|
||||
|~ |
|
||||
|"file.txt" [New file] |
|
||||
+---------------------------------------+
|
||||
('#" is the cursor position.)
|
||||
('#' is the cursor position.)
|
||||
|
||||
The tilde (~) lines indicate lines not in the file. In other words, when Vim
|
||||
runs out of file to display, it displays tilde lines. At the bottom of the
|
||||
@ -532,7 +532,7 @@ Summary: *help-summary* >
|
||||
< for the corresponding flag of the 'cpoptions' settings, substitute <letter>
|
||||
by a specific flag, e.g.: >
|
||||
:help cpo-;
|
||||
< And for the guioption flags: >
|
||||
< And for the 'guioptions' flags: >
|
||||
:help go-<letter>
|
||||
|
||||
4) Normal mode commands do not have a prefix. To go to the help page for the
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_04.txt* For Vim version 8.2. Last change: 2019 Nov 21
|
||||
*usr_04.txt* For Vim version 8.2. Last change: 2021 Feb 22
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -464,9 +464,9 @@ of characters to replace. It will not continue on the next line.
|
||||
|
||||
You can switch between Insert mode and Replace mode with the <Insert> key.
|
||||
|
||||
When you use <BS> (backspace) to make correction, you will notice that the
|
||||
old text is put back. Thus it works like an undo command for the last typed
|
||||
character.
|
||||
When you use <BS> (backspace) to make a correction, you will notice that the
|
||||
old text is put back. Thus it works like an undo command for the previously
|
||||
typed character.
|
||||
|
||||
==============================================================================
|
||||
*04.10* Conclusion
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_08.txt* For Vim version 8.2. Last change: 2017 Aug 11
|
||||
*usr_08.txt* For Vim version 8.2. Last change: 2021 May 20
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -235,7 +235,7 @@ windows like this:
|
||||
+----------------------------------+
|
||||
|
||||
Clearly the last one should be at the top. Go to that window (using CTRL-W w)
|
||||
and the type this command: >
|
||||
and then type this command: >
|
||||
|
||||
CTRL-W K
|
||||
|
||||
|
@ -113,7 +113,7 @@ when the 'wrap' option has been reset (more about that later).
|
||||
|
||||
When there are vertically split windows, only the windows on the right side
|
||||
will have a scrollbar. However, when you move the cursor to a window on the
|
||||
left, it will be this one the that scrollbar controls. This takes a bit of
|
||||
left, it will be this one that the scrollbar controls. This takes a bit of
|
||||
time to get used to.
|
||||
When you work with vertically split windows, consider adding a scrollbar on
|
||||
the left. This can be done with a menu item, or with the 'guioptions' option:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_12.txt* For Vim version 8.2. Last change: 2017 Aug 11
|
||||
*usr_12.txt* For Vim version 8.2. Last change: 2021 Apr 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -180,14 +180,14 @@ after it. That way you don't have this problem again.
|
||||
The |:global| command can be combined with the |:move| command to move all the
|
||||
lines before the first line, resulting in a reversed file. The command is: >
|
||||
|
||||
:global/^/m 0
|
||||
:global/^/move 0
|
||||
|
||||
Abbreviated: >
|
||||
|
||||
:g/^/m 0
|
||||
|
||||
The "^" regular expression matches the beginning of the line (even if the line
|
||||
is blank). The |:move| command moves the matching line to after the mythical
|
||||
is blank). The |:move| command moves the matching line to after the imaginary
|
||||
zeroth line, so the current matching line becomes the first line of the file.
|
||||
As the |:global| command is not confused by the changing line numbering,
|
||||
|:global| proceeds to match all remaining lines of the file and puts each as
|
||||
|
@ -1,4 +1,4 @@
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jan 13
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Apr 19
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@ -115,12 +115,20 @@ if you are impatient.
|
||||
|
||||
FOUR KINDS OF NUMBERS
|
||||
|
||||
Numbers can be decimal, hexadecimal, octal or binary. A hexadecimal number
|
||||
starts with "0x" or "0X". For example "0x1f" is decimal 31. An octal number
|
||||
starts with a zero. "017" is decimal 15. A binary number starts with "0b" or
|
||||
"0B". For example "0b101" is decimal 5. Careful: don't put a zero before a
|
||||
decimal number, it will be interpreted as an octal number!
|
||||
The ":echo" command always prints decimal numbers. Example: >
|
||||
Numbers can be decimal, hexadecimal, octal or binary.
|
||||
|
||||
A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal
|
||||
31.
|
||||
|
||||
An octal number starts with "0o", "0O" or a zero and another digit. "0o17" is
|
||||
decimal 15. Using just a zero prefix is not supported in Vim9 script.
|
||||
|
||||
A binary number starts with "0b" or "0B". For example "0b101" is decimal 5.
|
||||
|
||||
A decimal number is just digits. Careful: don't put a zero before a decimal
|
||||
number, it will be interpreted as an octal number in legacy script!
|
||||
|
||||
The ":echo" command always prints decimal numbers. Example: >
|
||||
|
||||
:echo 0x7f 0o36
|
||||
< 127 30 ~
|
||||
@ -611,7 +619,8 @@ String manipulation: *string-functions*
|
||||
stridx() first index of a short string in a long string
|
||||
strridx() last index of a short string in a long string
|
||||
strlen() length of a string in bytes
|
||||
strchars() length of a string in characters
|
||||
strcharlen() length of a string in characters
|
||||
strchars() number of characters in a string
|
||||
strwidth() size of string when displayed
|
||||
strdisplaywidth() size of string when displayed, deals with tabs
|
||||
setcellwidths() set character cell width overrides
|
||||
@ -943,6 +952,7 @@ Interactive: *interactive-functions*
|
||||
browsedir() put up a directory requester
|
||||
confirm() let the user make a choice
|
||||
getchar() get a character from the user
|
||||
getcharstr() get a character from the user as a string
|
||||
getcharmod() get modifiers for the last typed character
|
||||
getmousepos() get last known mouse position
|
||||
echoraw() output characters as-is
|
||||
@ -1002,6 +1012,7 @@ Testing: *test-functions*
|
||||
assert_true() assert that an expression is true
|
||||
assert_exception() assert that a command throws an exception
|
||||
assert_beeps() assert that a command beeps
|
||||
assert_nobeep() assert that a command does not cause a beep
|
||||
assert_fails() assert that a command fails
|
||||
assert_report() report a test failure
|
||||
test_alloc_fail() make memory allocation fail
|
||||
|
@ -1,4 +1,4 @@
|
||||
*various.txt* For Vim version 8.2. Last change: 2021 Jan 26
|
||||
*various.txt* For Vim version 8.2. Last change: 2021 Mar 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -572,7 +572,7 @@ N *+X11* Unix only: can restore window title |X11|
|
||||
it in / any non-ID character (see |'isident'|) can be
|
||||
used, so long as it does not appear in {pat}. Without
|
||||
the enclosing character the pattern cannot include the
|
||||
bar character.
|
||||
bar character. 'ignorecase' is not used.
|
||||
|
||||
The pattern is matched against the relevant part of
|
||||
the output, not necessarily the whole line. Only some
|
||||
@ -724,7 +724,7 @@ K Run a program to lookup the keyword under the
|
||||
feature}
|
||||
|
||||
*:sl!* *:sleep!*
|
||||
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor
|
||||
:[N]sl[eep]! [N] [m] Same as above, but hide the cursor.
|
||||
|
||||
*:xrestore* *:xr*
|
||||
:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version5.txt* For Vim version 8.2. Last change: 2020 Dec 19
|
||||
*version5.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -405,7 +405,7 @@ Both of these are only available when enabled at compile time.
|
||||
Win32 GUI version *added-win32-GUI*
|
||||
-----------------
|
||||
|
||||
The GUI has been ported to MS Windows 95 and NT. All the features of the X11
|
||||
The GUI has been ported to MS-Windows 95 and NT. All the features of the X11
|
||||
GUI are available to Windows users now. |gui-w32|
|
||||
This also fixes problems with running the Win32 console version under Windows
|
||||
95, where console support has always been bad.
|
||||
@ -4403,7 +4403,7 @@ the last char of the line, "<<" moved an extra line. Also for other operators
|
||||
that always work on lines.
|
||||
|
||||
link.sh changed "-lnsl_s" to "_s" when looking for "nsl" to be removed.
|
||||
Now it only remove whole words.
|
||||
Now it only removes whole words.
|
||||
|
||||
When jumped to a mark or using "fz", and there is an error, the current column
|
||||
was lost. E.g. when using "$fzj".
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version6.txt* For Vim version 8.2. Last change: 2020 Aug 17
|
||||
*version6.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1025,7 +1025,7 @@ Port to OS/390 Unix (Ralf Schandl)
|
||||
Included jsbmouse support. (Darren Garth)
|
||||
Support for dec mouse in Unix. (Steve Wall)
|
||||
|
||||
Port to 16-bit MS Windows (Windows 3.1x) (Vince Negri)
|
||||
Port to 16-bit MS-Windows (Windows 3.1x) (Vince Negri)
|
||||
|
||||
Port to QNX. Supports the Photon GUI, mouse, etc. (Julian Kinraid)
|
||||
|
||||
@ -9649,7 +9649,7 @@ Files: src/Make_cyg.mak, src/Make_ming.mak
|
||||
|
||||
Patch 6.2f.016
|
||||
Problem: "vim --version > ff" on non-Unix systems results in a file with a
|
||||
missing line break at the end. (Bill McCArthy)
|
||||
missing line break at the end. (Bill McCarthy)
|
||||
Solution: Add a line break.
|
||||
Files: src/main.c
|
||||
|
||||
@ -12864,7 +12864,7 @@ Files: src/message.c
|
||||
Patch 6.2.444
|
||||
Problem: When adding the 'c' flag to a ":substitute" command it may replace
|
||||
more times than without the 'c' flag. Happens for a match that
|
||||
starts with "\ze" (Marcel Svitalsk) and when using "\@<=" (Klaus
|
||||
starts with "\ze" (Marcel Svitalsky) and when using "\@<=" (Klaus
|
||||
Bosau).
|
||||
Solution: Correct "prev_matchcol" when replacing the line. Don't replace
|
||||
the line when the pattern uses look-behind matching.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version7.txt* For Vim version 8.2. Last change: 2020 Oct 25
|
||||
*version7.txt* For Vim version 8.2. Last change: 2021 May 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2300,7 +2300,7 @@ value didn't fill the whole screen. (SungHyun Nam)
|
||||
Win32 installer: The generated _vimrc contained an absolute path to diff.exe.
|
||||
After upgrading it becomes invalid. Now use $VIMRUNTIME instead.
|
||||
|
||||
The command line was cleared to often when 'showmode' was set and ":silent
|
||||
The command line was cleared too often when 'showmode' was set and ":silent
|
||||
normal vy" was used. Don't clear the command line unless the mode was
|
||||
actually displayed. Added the "mode_displayed" variable.
|
||||
|
||||
@ -9826,7 +9826,7 @@ Solution: Add AC_SYS_LARGEFILE to configure. (James Vega)
|
||||
Files: src/configure.in, src/config.h.in, src/auto/configure
|
||||
|
||||
Patch 7.2.414
|
||||
Problem: CTRK-K <space> <space> does not produce 0xa0 as expected. (Tony
|
||||
Problem: CTRL-K <space> <space> does not produce 0xa0 as expected. (Tony
|
||||
Mechelynck)
|
||||
Solution: Remove the Unicode range 0xe000 - 0xefff from digraphs, these are
|
||||
not valid characters.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*version8.txt* For Vim version 8.2. Last change: 2020 Dec 24
|
||||
*version8.txt* For Vim version 8.2. Last change: 2021 May 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1776,7 +1776,7 @@ Files: runtime/doc/change.txt, runtime/doc/eval.txt,
|
||||
|
||||
Patch 7.4.219
|
||||
Problem: When 'relativenumber' or 'cursorline' are set the window is
|
||||
redrawn much to often. (Patrick Hemmer, Dominique Pelle)
|
||||
redrawn much too often. (Patrick Hemmer, Dominique Pelle)
|
||||
Solution: Check the VALID_CROW flag instead of VALID_WROW.
|
||||
Files: src/move.c
|
||||
|
||||
@ -15341,7 +15341,7 @@ Solution: Link winpthread statically. (jmmerz, closes #1255, closes #1256)
|
||||
Files: src/Make_cyg_ming.mak
|
||||
|
||||
Patch 8.0.0116
|
||||
Problem: When reading English help and using CTRl-] the language from
|
||||
Problem: When reading English help and using CTRL-] the language from
|
||||
'helplang' is used.
|
||||
Solution: Make help tag jumps keep the language. (Tatsuki, test by Hirohito
|
||||
Higashi, closes #1249)
|
||||
|
@ -416,6 +416,10 @@ Denotes the end of the options.
|
||||
Arguments after this will be handled as a file name.
|
||||
This can be used to edit a filename that starts with a '\-'.
|
||||
.TP
|
||||
\-\-clean
|
||||
Do not use any personal configuration (vimrc, plugins, etc.). Useful to see if
|
||||
a problem reproduces with a clean Vim setup.
|
||||
.TP
|
||||
\-\-echo\-wid
|
||||
GTK GUI only: Echo the Window ID on stdout.
|
||||
.TP
|
||||
|
@ -300,6 +300,10 @@ OPTIONS
|
||||
be handled as a file name. This can be used to edit a
|
||||
filename that starts with a '-'.
|
||||
|
||||
--clean Do not use any personal configuration (vimrc, plugins,
|
||||
etc.). Useful to see if a problem reproduces with a clean
|
||||
Vim setup.
|
||||
|
||||
--echo-wid GTK GUI only: Echo the Window ID on stdout.
|
||||
|
||||
--help Give a help message and exit, just like "-h".
|
||||
|
@ -1,4 +1,4 @@
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jan 23
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 May 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -51,6 +51,7 @@ The Vim9 script syntax and semantics are used in:
|
||||
- a function defined with the `:def` command
|
||||
- a script file where the first command is `vim9script`
|
||||
- an autocommand defined in the context of the above
|
||||
- a command prefixed with the `vim9cmd` command modifier
|
||||
|
||||
When using `:function` in a Vim9 script file the legacy syntax is used, with
|
||||
the highest |scriptversion|. However, this can be confusing and is therefore
|
||||
@ -60,6 +61,17 @@ Vim9 script and legacy Vim script can be mixed. There is no requirement to
|
||||
rewrite old scripts, they keep working as before. You may want to use a few
|
||||
`:def` functions for code that needs to be fast.
|
||||
|
||||
:vim9[cmd] {cmd} *:vim9* *:vim9cmd*
|
||||
Execute {cmd} using Vim9 script syntax and semantics.
|
||||
Useful when typing a command and in a legacy script or
|
||||
function.
|
||||
|
||||
:leg[acy] {cmd} *:leg* *:legacy*
|
||||
Execute {cmd} using legacy script syntax and semantics. Only
|
||||
useful in a Vim9 script or a :def function.
|
||||
Note that {cmd} cannot use local variables, since it is parsed
|
||||
with legacy expression syntax.
|
||||
|
||||
==============================================================================
|
||||
|
||||
2. Differences from legacy Vim script *vim9-differences*
|
||||
@ -89,8 +101,9 @@ script and `:def` functions; details are below:
|
||||
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.
|
||||
- You cannot use `:xit`, `:t`, `:k`, `:append`, `:change`, `:insert`, `:open`,
|
||||
and `:s` or `:d` with only flags.
|
||||
or curly-braces names.
|
||||
- A range before a command must be prefixed with a colon: >
|
||||
:%s/this/that
|
||||
- Unless mentioned specifically, the highest |scriptversion| is used.
|
||||
@ -118,6 +131,10 @@ that starts a comment: >
|
||||
var name = value # comment
|
||||
var name = value# error!
|
||||
|
||||
Do not start a comment with #{, it looks like the legacy dictionary literal
|
||||
and produces an error where this might be confusing. #{{ or #{{{ are OK,
|
||||
these can be used to start a fold.
|
||||
|
||||
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).
|
||||
@ -126,18 +143,26 @@ arguments).
|
||||
Vim9 functions ~
|
||||
|
||||
A function defined with `:def` is compiled. Execution is many times faster,
|
||||
often 10x to 100x times.
|
||||
often 10 to 100 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 either of these is encountered:
|
||||
Compilation is done when any of these is encountered:
|
||||
- the first time the function is called
|
||||
- when the `:defcompile` command is encountered in the script where the
|
||||
- when the `:defcompile` command is encountered in the script after the
|
||||
function was defined
|
||||
- `:disassemble` is used for the function.
|
||||
- a function that is compiled calls the function or uses it as a function
|
||||
reference
|
||||
*E1091*
|
||||
If compilation fails it is not tried again on the next call, instead this
|
||||
error is given: "E1091: Function is not compiled: {name}".
|
||||
Compilation will fail when encountering a user command that has not been
|
||||
created yet. In this case you can call `execute()` to invoke it at runtime. >
|
||||
def MyFunc()
|
||||
execute('DefinedLater')
|
||||
enddef
|
||||
|
||||
`:def` has no options like `:function` does: "range", "abort", "dict" or
|
||||
"closure". A `:def` function always aborts on an error (unless `:silent!` was
|
||||
@ -150,13 +175,31 @@ functions.
|
||||
|
||||
Arguments are accessed by name, without "a:", just like any other language.
|
||||
There is no "a:" dictionary or "a:000" list.
|
||||
|
||||
*vim9-variable-arguments*
|
||||
Variable arguments are defined as the last argument, with a name and have a
|
||||
list type, similar to TypeScript. For example, a list of numbers: >
|
||||
def MyFunc(...itemlist: list<number>)
|
||||
for item in itemlist
|
||||
...
|
||||
|
||||
When a function argument is optional (it has a default value) passing `v:none`
|
||||
as the argument results in using the default value. This is useful when you
|
||||
want to specify a value for an argument that comes after an argument that
|
||||
should use its default value. Example: >
|
||||
def MyFunc(one = 'one', last = 'last)
|
||||
...
|
||||
enddef
|
||||
MyFunc(v:none, 'LAST') # first argument uses default value 'one'
|
||||
<
|
||||
*vim9-ignored-argument*
|
||||
The argument "_" (an underscore) can be used to ignore the argument. This is
|
||||
most useful in callbacks where you don't need it, but do need to give an
|
||||
argument to match the call. E.g. when using map() two arguments are passed,
|
||||
the key and the value, to ignore the key: >
|
||||
map(myList, (_, v) => v * 2)
|
||||
There is no error for using the "_" argument multiple times. No type needs to
|
||||
be given.
|
||||
|
||||
|
||||
Functions and variables are script-local by default ~
|
||||
*vim9-scopes*
|
||||
@ -183,6 +226,12 @@ search for the function:
|
||||
However, it is recommended to always use "g:" to refer to a global function
|
||||
for clarity.
|
||||
|
||||
Since a script-local function reference can be used without "s:" the name must
|
||||
start with an upper case letter even when using the "s:" prefix. In legacy
|
||||
script "s:funcref" could be used, because it could not be referred to with
|
||||
"funcref". In Vim9 script it can, therefore "s:Funcref" must be used to avoid
|
||||
that the name interferes with builtin functions.
|
||||
|
||||
In all cases the function must be defined before used. That is when it is
|
||||
called, when `:defcompile` causes it to be compiled, or when code that calls
|
||||
it is being compiled (to figure out the return type).
|
||||
@ -272,19 +321,43 @@ without any command. The same for global, window, tab, buffer and Vim
|
||||
variables, because they are not really declared. They can also be deleted
|
||||
with `:unlet`.
|
||||
|
||||
Variables and functions cannot shadow previously defined or imported variables
|
||||
and functions.
|
||||
`:lockvar` does not work on local variables. Use `:const` and `:final`
|
||||
instead.
|
||||
|
||||
Variables, functions and function arguments cannot shadow previously defined
|
||||
or imported variables and functions in the same script file.
|
||||
Variables may shadow Ex commands, rename the variable if needed.
|
||||
|
||||
Global variables and user defined functions must be prefixed with "g:", also
|
||||
at the script level. >
|
||||
Global variables must be prefixed with "g:", also at the script level. >
|
||||
vim9script
|
||||
var script_local = 'text'
|
||||
g:global = 'value'
|
||||
var Funcref = g:ThatFunction
|
||||
|
||||
Global functions must be prefixed with "g:" when defining them, but can be
|
||||
called without "g:". >
|
||||
vim9script
|
||||
def g:GlobalFunc(): string
|
||||
return 'text'
|
||||
enddef
|
||||
echo GlobalFunc()
|
||||
The "g:" prefix is not needed for auto-load functions.
|
||||
|
||||
Since `&opt = value` is now assigning a value to option "opt", ":&" cannot be
|
||||
used to repeat a `:substitute` command.
|
||||
*vim9-unpack-ignore*
|
||||
For an unpack assignment the underscore can be used to ignore a list item,
|
||||
similar to how a function argument can be ignored: >
|
||||
[a, _, c] = theList
|
||||
To ignore any remaining items: >
|
||||
[a, b; _] = longList
|
||||
|
||||
< *E1092*
|
||||
Declaring more than one variable at a time, using the unpack notation, is
|
||||
currently not supported: >
|
||||
var [v1, v2] = GetValues() # Error!
|
||||
That is because the type needs to be inferred from the list item type, which
|
||||
isn't that easy.
|
||||
|
||||
|
||||
Constants ~
|
||||
@ -300,14 +373,14 @@ Example: >
|
||||
const myList = [1, 2]
|
||||
myList = [3, 4] # Error!
|
||||
myList[0] = 9 # Error!
|
||||
muList->add(3) # Error!
|
||||
myList->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]
|
||||
myList = [3, 4] # Error!
|
||||
myList[0] = 9 # OK
|
||||
muList->add(3) # OK
|
||||
myList->add(3) # OK
|
||||
|
||||
It is common to write constants as ALL_CAPS, but you don't have to.
|
||||
|
||||
@ -319,13 +392,6 @@ The constant only applies to the value itself, not what it refers to. >
|
||||
NAMES[1] = ["Emma"] # Error!
|
||||
NAMES[1][0] = "Emma" # OK, now females[0] == "Emma"
|
||||
|
||||
< *E1092*
|
||||
Declaring more than one variable at a time, using the unpack notation, is
|
||||
currently not supported: >
|
||||
var [v1, v2] = GetValues() # Error!
|
||||
That is because the type needs to be inferred from the list item type, which
|
||||
isn't that easy.
|
||||
|
||||
|
||||
Omitting :call and :eval ~
|
||||
|
||||
@ -334,7 +400,8 @@ Functions can be called without `:call`: >
|
||||
Using `:call` is still possible, but this is discouraged.
|
||||
|
||||
A method call without `eval` is possible, so long as the start is an
|
||||
identifier or can't be an Ex command. Examples: >
|
||||
identifier or can't be an Ex command. For a function either "(" or "->" must
|
||||
be following, without a line break. Examples: >
|
||||
myList->add(123)
|
||||
g:myList->add(123)
|
||||
[1, 2, 3]->Process()
|
||||
@ -371,7 +438,7 @@ number of arguments and any return type. The function can be defined later.
|
||||
|
||||
|
||||
Lambda using => instead of -> ~
|
||||
|
||||
*vim9-lambda*
|
||||
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
|
||||
@ -395,17 +462,44 @@ But you can use a backslash to concatenate the lines before parsing: >
|
||||
filter(list, (k,
|
||||
\ v)
|
||||
\ => v > 0)
|
||||
< *vim9-lambda-arguments*
|
||||
In legacy script a lambda could be called with any number of extra arguments,
|
||||
there was no way to warn for not using them. In Vim9 script the number of
|
||||
arguments must match. If you do want to accept any arguments, or any further
|
||||
arguments, use "..._", which makes the function accept
|
||||
|vim9-variable-arguments|. Example: >
|
||||
var Callback = (..._) => 'anything'
|
||||
echo Callback(1, 2, 3) # displays "anything"
|
||||
|
||||
< *inline-function*
|
||||
Additionally, a lambda can contain statements in {}: >
|
||||
var Lambda = (arg) => {
|
||||
g:was_called = 'yes'
|
||||
return expression
|
||||
}
|
||||
NOT IMPLEMENTED YET
|
||||
This can be useful for a timer, for example: >
|
||||
var count = 0
|
||||
var timer = timer_start(500, (_) => {
|
||||
count += 1
|
||||
echom 'Handler called ' .. count
|
||||
}, {repeat: 3})
|
||||
|
||||
|
||||
The ending "}" must be at the start of a line. It can be followed by other
|
||||
characters, e.g.: >
|
||||
var d = mapnew(dict, (k, v): string => {
|
||||
return 'value'
|
||||
})
|
||||
No command can follow the "{", only a comment can be used there.
|
||||
|
||||
Rationale: The "}" cannot be after a command because it would require parsing
|
||||
the commands to find it. For consistency with that no command can follow the
|
||||
"{". Unfortunately this means using "() => { command }" does not work, line
|
||||
breaks are always required.
|
||||
|
||||
*vim9-curly*
|
||||
To avoid the "{" of a dictionary literal to be recognized as a statement block
|
||||
wrap it in parenthesis: >
|
||||
wrap it in parentheses: >
|
||||
var Lambda = (arg) => ({key: 42})
|
||||
|
||||
Also when confused with the start of a command block: >
|
||||
@ -517,6 +611,44 @@ Notes:
|
||||
echo [1, 2]
|
||||
[3, 4]
|
||||
|
||||
|
||||
White space ~
|
||||
|
||||
Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
var name=234 # Error!
|
||||
var name= 234 # Error!
|
||||
var name =234 # Error!
|
||||
There must be white space before and after the "=": >
|
||||
var name = 234 # OK
|
||||
White space must also be put before the # that starts a comment after a
|
||||
command: >
|
||||
var name = 234# Error!
|
||||
var name = 234 # OK
|
||||
|
||||
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 "(": >
|
||||
Func (arg) # Error!
|
||||
Func
|
||||
\ (arg) # Error!
|
||||
Func
|
||||
(arg) # Error!
|
||||
Func(arg) # OK
|
||||
Func(
|
||||
arg) # OK
|
||||
Func(
|
||||
arg # OK
|
||||
)
|
||||
|
||||
|
||||
No curly braces expansion ~
|
||||
|
||||
|curly-braces-names| cannot be used.
|
||||
@ -555,11 +687,12 @@ error. A number can be given with and without the []: >
|
||||
{'456': 'with', '123': 'without'}
|
||||
|
||||
|
||||
No :xit, :t, :append, :change or :insert ~
|
||||
No :xit, :t, :k, :append, :change or :insert ~
|
||||
|
||||
These commands are too easily confused with local variable names.
|
||||
Instead of `:x` or `:xit` you can use `:exit`.
|
||||
Instead of `:t` you can use `:copy`.
|
||||
Instead of `:k` you can use `:mark`.
|
||||
|
||||
|
||||
Comparators ~
|
||||
@ -567,6 +700,17 @@ Comparators ~
|
||||
The 'ignorecase' option is not used for comparators that use strings.
|
||||
|
||||
|
||||
Abort after error ~
|
||||
|
||||
In legacy script, when an error is encountered, Vim continues to execute
|
||||
following lines. This can lead to a long sequence of errors and need to type
|
||||
CTRL-C to stop it. In Vim9 script execution of commands stops at the first
|
||||
error. Example: >
|
||||
vim9script
|
||||
var x = does-not-exist
|
||||
echo 'not executed'
|
||||
|
||||
|
||||
For loop ~
|
||||
|
||||
Legacy Vim script has some tricks to make a for loop over a list handle
|
||||
@ -590,43 +734,6 @@ Generally, you should not change the list that is iterated over. Make a copy
|
||||
first if needed.
|
||||
|
||||
|
||||
White space ~
|
||||
|
||||
Vim9 script enforces proper use of white space. This is no longer allowed: >
|
||||
var name=234 # Error!
|
||||
var name= 234 # Error!
|
||||
var name =234 # Error!
|
||||
There must be white space before and after the "=": >
|
||||
var name = 234 # OK
|
||||
White space must also be put before the # that starts a comment after a
|
||||
command: >
|
||||
var name = 234# Error!
|
||||
var name = 234 # OK
|
||||
|
||||
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 "(": >
|
||||
Func (arg) # Error!
|
||||
Func
|
||||
\ (arg) # Error!
|
||||
Func
|
||||
(arg) # Error!
|
||||
Func(arg) # OK
|
||||
Func(
|
||||
arg) # OK
|
||||
Func(
|
||||
arg # OK
|
||||
)
|
||||
|
||||
|
||||
Conditions and expressions ~
|
||||
|
||||
Conditions and expressions are mostly working like they do in other languages.
|
||||
@ -688,13 +795,15 @@ 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: >
|
||||
Indexing a string with [idx] or taking a slice with [idx : idx] uses character
|
||||
indexes instead of byte indexes. Composing characters are included.
|
||||
Example: >
|
||||
echo 'bár'[1]
|
||||
In legacy script this results in the character 0xc3 (an illegal byte), in Vim9
|
||||
script this results in the string 'á'.
|
||||
A negative index is counting from the end, "[-1]" is the last character.
|
||||
To exclude the last character use |slice()|.
|
||||
To count composing characters separately use |strcharpart()|.
|
||||
If the index is out of range then an empty string results.
|
||||
|
||||
In legacy script "++var" and "--var" would be silently accepted and have no
|
||||
@ -792,6 +901,8 @@ Patterns are used like 'magic' is set, unless explicitly overruled.
|
||||
The 'edcompatible' option value is not used.
|
||||
The 'gdefault' option value is not used.
|
||||
|
||||
You may also find this wiki useful. It was written by an early adopter of
|
||||
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
|
||||
|
||||
==============================================================================
|
||||
|
||||
@ -835,12 +946,14 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
|
||||
:enddef End of a function defined with `:def`. It should be on
|
||||
a line by its own.
|
||||
|
||||
You may also find this wiki useful. It was written by an early adopter of
|
||||
Vim9 script: https://github.com/lacygoill/wiki/blob/master/vim/vim9.md
|
||||
|
||||
If the script the function is defined in is Vim9 script, then script-local
|
||||
variables can be accessed without the "s:" prefix. They must be defined
|
||||
before the function is compiled. If the script the function is defined in is
|
||||
legacy script, then script-local variables must be accessed with the "s:"
|
||||
prefix and they do not need to exist (they can be deleted any time).
|
||||
prefix if they do not exist at the time of compiling.
|
||||
|
||||
*:defc* *:defcompile*
|
||||
:defc[ompile] Compile functions defined in the current script that
|
||||
@ -878,6 +991,27 @@ For these the backtick expansion can be used. Example: >
|
||||
g/pattern/s/^/`=newText`/
|
||||
enddef
|
||||
|
||||
Closures defined in a loop will share the same context. For example: >
|
||||
var flist: list<func>
|
||||
for i in range(10)
|
||||
var inloop = i
|
||||
flist[i] = () => inloop
|
||||
endfor
|
||||
|
||||
The "inloop" variable will exist only once, all closures put in the list refer
|
||||
to the same instance, which in the end will have the value 9. This is
|
||||
efficient. If you do want a separate context for each closure call a function
|
||||
to define it: >
|
||||
def GetFunc(i: number): func
|
||||
var inloop = i
|
||||
return () => inloop
|
||||
enddef
|
||||
|
||||
var flist: list<func>
|
||||
for i in range(10)
|
||||
flist[i] = GetFunc(i)
|
||||
endfor
|
||||
|
||||
==============================================================================
|
||||
|
||||
4. Types *vim9-types*
|
||||
@ -1004,12 +1138,15 @@ dictionary. If there is a mix of types, the "any" type is used. >
|
||||
['a', 'b', 'c'] list<string>
|
||||
[1, 'x', 3] list<any>
|
||||
|
||||
For script-local variables in Vim9 script the type is checked, also when the
|
||||
variable was declared in a legacy function.
|
||||
|
||||
|
||||
Stricter type checking ~
|
||||
*type-checking*
|
||||
In legacy Vim script, where a number was expected, a string would be
|
||||
automatically converted to a number. This was convenient for an actual number
|
||||
such as "123", but leads to unexpected problems (but no error message) if the
|
||||
such as "123", but leads to unexpected problems (and no error message) if the
|
||||
string doesn't start with a number. Quite often this leads to hard-to-find
|
||||
bugs.
|
||||
|
||||
@ -1021,10 +1158,14 @@ an error, thus breaking backwards compatibility. For example:
|
||||
- Using a number where a string is expected. *E1024*
|
||||
|
||||
One consequence is that the item type of a list or dict given to map() must
|
||||
not change. This will give an error in compiled code: >
|
||||
not change. This will give an error in Vim9 script: >
|
||||
map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
E1012: Type mismatch; expected list<number> but got list<string>
|
||||
Instead use |mapnew()|.
|
||||
E1012: Type mismatch; expected number but got string
|
||||
Instead use |mapnew()|. If the item type was determined to be "any" it can
|
||||
change to a more specific type. E.g. when a list of mixed types gets changed
|
||||
to a list of numbers.
|
||||
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|
||||
|flattennew()| instead.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@ -1044,9 +1185,9 @@ that you don't do that.
|
||||
Namespace ~
|
||||
*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
|
||||
starts with: >
|
||||
appear as the first statement in the file (see |vim9-mix| for an exception).
|
||||
It tells Vim to interpret the script in its own namespace, instead of the
|
||||
global namespace. If a file starts with: >
|
||||
vim9script
|
||||
var myvar = 'yes'
|
||||
Then "myvar" will only exist in this file. While without `vim9script` it would
|
||||
@ -1064,7 +1205,30 @@ A side effect of `:vim9script` is that the 'cpoptions' option is set to the
|
||||
Vim default value, like with: >
|
||||
:set cpo&vim
|
||||
One of the effects is that |line-continuation| is always enabled.
|
||||
The original value of 'cpoptions' is restored at the end of the script.
|
||||
The original value of 'cpoptions' is restored at the end of the script, while
|
||||
flags added or removed in the script are also added to or removed from the
|
||||
original value to get the same effect. The order of flags may change.
|
||||
|
||||
*vim9-mix*
|
||||
There is one way to use both legacy and Vim9 syntax in one script file: >
|
||||
" comments may go here
|
||||
if !has('vim9script')
|
||||
" legacy script commands go here
|
||||
finish
|
||||
endif
|
||||
vim9script
|
||||
# Vim9 script commands go here
|
||||
This allows for writing a script that takes advantage of the Vim9 script
|
||||
syntax if possible, but will also work on a Vim version without it.
|
||||
|
||||
This can only work in two ways:
|
||||
1. The "if" statement evaluates to false, the commands up to `endif` are
|
||||
skipped and `vim9script` is then the first command actually executed.
|
||||
2. The "if" statement evaluates to true, the commands up to `endif` are
|
||||
executed and `finish` bails out before reaching `vim9script`.
|
||||
|
||||
TODO: The "vim9script" feature does not exist yet, it will only be added once
|
||||
the Vim9 script syntax has been fully implemented.
|
||||
|
||||
|
||||
Export ~
|
||||
@ -1078,7 +1242,7 @@ Exporting an item can be written as: >
|
||||
export class MyClass ...
|
||||
|
||||
As this suggests, only constants, variables, `:def` functions and classes can
|
||||
be exported. {classes are not implemented yet}
|
||||
be exported. {not implemented yet: export class}
|
||||
|
||||
*E1042*
|
||||
`:export` can only be used in Vim9 script, at the script level.
|
||||
@ -1387,7 +1551,7 @@ functions return these values.
|
||||
|
||||
If you have any type of value and want to use it as a boolean, use the `!!`
|
||||
operator:
|
||||
true: !`!'text'`, `!![99]`, `!!{'x': 1}`, `!!99`
|
||||
true: `!!'text'`, `!![99]`, `!!{'x': 1}`, `!!99`
|
||||
false: `!!''`, `!![]`, `!!{}`
|
||||
|
||||
From a language like JavaScript we have this handy construct: >
|
||||
|
@ -1,4 +1,4 @@
|
||||
*visual.txt* For Vim version 8.2. Last change: 2019 Nov 02
|
||||
*visual.txt* For Vim version 8.2. Last change: 2021 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -429,7 +429,7 @@ abcdefghijklmnopqrstuvwxyz
|
||||
|
||||
abcdefghijklmnSTRINGopqrstuvwxyz
|
||||
abc STRING defghijklmnopqrstuvwxyz
|
||||
abcdef ghi STRING jklmnopqrstuvwxyz
|
||||
abcdef ghi STRING jklmnopqrstuvwxyz
|
||||
abcdefghijklmnSTRINGopqrstuvwxyz
|
||||
|
||||
2. fo<C-v>3j$ASTRING<ESC> *v_b_A_example*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*windows.txt* For Vim version 8.2. Last change: 2020 Dec 18
|
||||
*windows.txt* For Vim version 8.2. Last change: 2021 Apr 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -138,10 +138,12 @@ status line is inverted anyway; you will only see this problem on terminals
|
||||
that have termcap codes for italics.
|
||||
|
||||
*filler-lines*
|
||||
The lines after the last buffer line in a window are called filler lines.
|
||||
These lines start with a tilde (~) character. By default, these are
|
||||
highlighted as NonText (|hl-NonText|). The EndOfBuffer highlight group
|
||||
(|hl-EndOfBuffer|) can be used to change the highlighting of filler lines.
|
||||
The lines after the last buffer line in a window are called filler lines. By
|
||||
default, these lines start with a tilde (~) character. The 'eob' item in the
|
||||
'fillchars' option can be used to change this character. By default, these
|
||||
characters are highlighted as NonText (|hl-NonText|). The EndOfBuffer
|
||||
highlight group (|hl-EndOfBuffer|) can be used to change the highlighting of
|
||||
the filler characters.
|
||||
|
||||
==============================================================================
|
||||
3. Opening and closing a window *opening-window* *E36*
|
||||
@ -208,7 +210,9 @@ CTRL-W CTRL_N *CTRL-W_CTRL-N*
|
||||
:[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
|
||||
behaves like a ":split" first, and then an ":e" command.
|
||||
behaves almost like a ":split" first, and then an ":edit"
|
||||
command, but the alternate file name in the original window is
|
||||
set to {file}.
|
||||
If [+cmd] is given, execute the command when the file has been
|
||||
loaded |+cmd|.
|
||||
Also see |++opt|.
|
||||
@ -517,14 +521,14 @@ CTRL-W J Move the current window to be at the very bottom, using the
|
||||
CTRL-W H Move the current window to be at the far left, using the
|
||||
full height of the screen. This works like closing the
|
||||
current window and then creating another one with
|
||||
":vert topleft split", except that the current window contents
|
||||
`:vert topleft split`, except that the current window contents
|
||||
is used for the new window.
|
||||
|
||||
*CTRL-W_L*
|
||||
CTRL-W L Move the current window to be at the far right, using the full
|
||||
height of the screen. This works like closing the
|
||||
current window and then creating another one with
|
||||
":vert botright split", except that the current window
|
||||
`:vert botright split`, except that the current window
|
||||
contents is used for the new window.
|
||||
|
||||
*CTRL-W_T*
|
||||
@ -567,7 +571,7 @@ CTRL-W < Decrease current window width by N (default 1).
|
||||
*CTRL-W_>*
|
||||
CTRL-W > Increase current window width by N (default 1).
|
||||
|
||||
:vertical res[ize] [N] *:vertical-resize* *CTRL-W_bar*
|
||||
:vert[ical] res[ize] [N] *:vertical-resize* *CTRL-W_bar*
|
||||
CTRL-W | Set current window width to N (default: widest possible).
|
||||
|
||||
You can also resize a window by dragging a status line up or down with the
|
||||
@ -786,7 +790,7 @@ can also get to them with the buffer list commands, like ":bnext".
|
||||
|
||||
Examples: >
|
||||
|
||||
:windo set nolist nofoldcolumn | normal zn
|
||||
:windo set nolist foldcolumn=0 | normal! zn
|
||||
|
||||
This resets the 'list' option and disables folding in all windows. >
|
||||
|
||||
@ -794,7 +798,7 @@ This resets the 'list' option and disables folding in all windows. >
|
||||
|
||||
This resets the 'fileencoding' in each buffer and writes it if this changed
|
||||
the buffer. The result is that all buffers will use the 'encoding' encoding
|
||||
(if conversion works properly).
|
||||
(if conversion succeeds).
|
||||
|
||||
==============================================================================
|
||||
9. Tag or file name under the cursor *window-tag*
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Jan 21
|
||||
" Last Change: 2021 Apr 17
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@ -168,6 +168,9 @@ au BufNewFile,BufRead *.mar setf vmasm
|
||||
" Atlas
|
||||
au BufNewFile,BufRead *.atl,*.as setf atlas
|
||||
|
||||
" Atom is based on XML
|
||||
au BufNewFile,BufRead *.atom setf xml
|
||||
|
||||
" Autoit v3
|
||||
au BufNewFile,BufRead *.au3 setf autoit
|
||||
|
||||
@ -216,6 +219,9 @@ au BufNewFile,BufRead *.bc setf bc
|
||||
" BDF font
|
||||
au BufNewFile,BufRead *.bdf setf bdf
|
||||
|
||||
" Beancount
|
||||
au BufNewFile,BufRead *.beancount setf beancount
|
||||
|
||||
" BibTeX bibliography database file
|
||||
au BufNewFile,BufRead *.bib setf bib
|
||||
|
||||
@ -411,6 +417,10 @@ endif
|
||||
" Lynx config files
|
||||
au BufNewFile,BufRead lynx.cfg setf lynx
|
||||
|
||||
" Modula-3 configuration language (must be before *.cfg and *makefile)
|
||||
au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake
|
||||
au BufNewFile,BufRead m3makefile,m3overrides setf m3build
|
||||
|
||||
" Quake
|
||||
au BufNewFile,BufRead *baseq[2-3]/*.cfg,*id1/*.cfg setf quake
|
||||
au BufNewFile,BufRead *quake[1-3]/*.cfg setf quake
|
||||
@ -590,7 +600,7 @@ au BufNewFile,BufRead *.fan,*.fwt setf fan
|
||||
au BufNewFile,BufRead *.factor setf factor
|
||||
|
||||
" Fennel
|
||||
autocmd BufRead,BufNewFile *.fnl setf fennel
|
||||
autocmd BufRead,BufNewFile *.fnl setf fennel
|
||||
|
||||
" Fetchmail RC file
|
||||
au BufNewFile,BufRead .fetchmailrc setf fetchmail
|
||||
@ -634,7 +644,7 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Gift (Moodle)
|
||||
autocmd BufRead,BufNewFile *.gift setf gift
|
||||
autocmd BufRead,BufNewFile *.gift setf gift
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead COMMIT_EDITMSG,MERGE_MSG,TAG_EDITMSG setf gitcommit
|
||||
@ -705,10 +715,10 @@ au BufNewFile,BufRead .gtkrc,gtkrc setf gtkrc
|
||||
au BufNewFile,BufRead *.haml setf haml
|
||||
|
||||
" Hamster Classic | Playground files
|
||||
au BufNewFile,BufRead *.hsm setf hamster
|
||||
au BufNewFile,BufRead *.hsm setf hamster
|
||||
|
||||
" Haskell
|
||||
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot setf haskell
|
||||
au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell
|
||||
au BufNewFile,BufRead *.lhs setf lhaskell
|
||||
au BufNewFile,BufRead *.chs setf chaskell
|
||||
au BufNewFile,BufRead cabal.project setf cabalproject
|
||||
@ -1009,6 +1019,7 @@ au BufNewFile,BufRead *.hgrc,*hgrc setf cfg
|
||||
|
||||
" Meson Build system config
|
||||
au BufNewFile,BufRead meson.build,meson_options.txt setf meson
|
||||
au BufNewFile,BufRead *.wrap setf dosini
|
||||
|
||||
" Messages (logs mostly)
|
||||
au BufNewFile,BufRead */log/{auth,cron,daemon,debug,kern,lpr,mail,messages,news/news,syslog,user}{,.log,.err,.info,.warn,.crit,.notice}{,.[0-9]*,-[0-9]*} setf messages
|
||||
@ -1039,10 +1050,10 @@ au BufNewFile,BufRead *.mod
|
||||
\ setf modsim3 |
|
||||
\ endif
|
||||
|
||||
" Modula 2 (.md removed in favor of Markdown)
|
||||
" Modula-2 (.md removed in favor of Markdown)
|
||||
au BufNewFile,BufRead *.m2,*.DEF,*.MOD,*.mi setf modula2
|
||||
|
||||
" Modula 3 (.m3, .i3, .mg, .ig)
|
||||
" Modula-3 (.m3, .i3, .mg, .ig)
|
||||
au BufNewFile,BufRead *.[mi][3g] setf modula3
|
||||
|
||||
" Monk
|
||||
@ -1185,6 +1196,9 @@ au BufNewFile,BufRead *.pp call dist#ft#FTpp()
|
||||
" Delphi or Lazarus program file
|
||||
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
||||
|
||||
" Free Pascal makefile definition file
|
||||
au BufNewFile,BufRead *.fpc setf fpcmake
|
||||
|
||||
" PDF
|
||||
au BufNewFile,BufRead *.pdf setf pdf
|
||||
|
||||
@ -1198,8 +1212,6 @@ else
|
||||
au BufNewFile,BufRead *.pl call dist#ft#FTpl()
|
||||
endif
|
||||
au BufNewFile,BufRead *.plx,*.al,*.psgi setf perl
|
||||
au BufNewFile,BufRead *.p6,*.pm6,*.pl6 setf perl6
|
||||
au BufNewFile,BufRead *.raku,*.rakumod setf perl6
|
||||
|
||||
" Perl, XPM or XPM2
|
||||
au BufNewFile,BufRead *.pm
|
||||
@ -1213,7 +1225,6 @@ au BufNewFile,BufRead *.pm
|
||||
|
||||
" Perl POD
|
||||
au BufNewFile,BufRead *.pod setf pod
|
||||
au BufNewFile,BufRead *.pod6 setf pod6
|
||||
|
||||
" Php, php3, php4, etc.
|
||||
" Also Phtml (was used for PHP 2 in the past)
|
||||
@ -1273,6 +1284,11 @@ au BufNewFile,BufRead .povrayrc setf povini
|
||||
" Povray, Pascal, PHP or assembly
|
||||
au BufNewFile,BufRead *.inc call dist#ft#FTinc()
|
||||
|
||||
" PowerShell
|
||||
au BufNewFile,BufRead *.ps1,*.psd1,*.psm1,*.pssc setf ps1
|
||||
au BufNewFile,BufRead *.ps1xml setf ps1xml
|
||||
au BufNewFile,BufRead *.cdxml,*.psc1 setf xml
|
||||
|
||||
" Printcap and Termcap
|
||||
au BufNewFile,BufRead *printcap
|
||||
\ let b:ptcap_type = "print" | setf ptcap
|
||||
@ -1327,10 +1343,16 @@ au BufNewFile,BufRead *.pdb setf prolog
|
||||
" Promela
|
||||
au BufNewFile,BufRead *.pml setf promela
|
||||
|
||||
" Property Specification Language (PSL)
|
||||
au BufNewFile,BufRead *.psl setf psl
|
||||
|
||||
" Google protocol buffers
|
||||
au BufNewFile,BufRead *.proto setf proto
|
||||
au BufNewFile,BufRead *.pbtxt setf pbtxt
|
||||
|
||||
" Poke
|
||||
au BufNewFile,BufRead *.pk setf poke
|
||||
|
||||
" Protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
|
||||
@ -1345,6 +1367,9 @@ au BufNewFile,BufRead *.ptl,*.pyi,SConstruct setf python
|
||||
" Radiance
|
||||
au BufNewFile,BufRead *.rad,*.mat setf radiance
|
||||
|
||||
" Raku (formelly Perl6)
|
||||
au BufNewFile,BufRead *.pm6,*.p6,*.t6,*.pod6,*.raku,*.rakumod,*.rakudoc,*.rakutest setf raku
|
||||
|
||||
" Ratpoison config/command files
|
||||
au BufNewFile,BufRead .ratpoisonrc,ratpoisonrc setf ratpoison
|
||||
|
||||
@ -1388,6 +1413,9 @@ else
|
||||
au BufNewFile,BufRead *.rmd,*.smd setf rmd
|
||||
endif
|
||||
|
||||
" RSS looks like XML
|
||||
au BufNewFile,BufRead *.rss setf xml
|
||||
|
||||
" R reStructuredText file
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.Rrst,*.rrst,*.Srst,*.srst setf rrst
|
||||
@ -1468,7 +1496,7 @@ au BufNewFile,BufRead *.sass setf sass
|
||||
au BufNewFile,BufRead *.sa setf sather
|
||||
|
||||
" Scala
|
||||
au BufNewFile,BufRead *.scala setf scala
|
||||
au BufNewFile,BufRead *.scala,*.sc setf scala
|
||||
|
||||
" SBT - Scala Build Tool
|
||||
au BufNewFile,BufRead *.sbt setf sbt
|
||||
@ -1488,6 +1516,9 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
|
||||
" sed
|
||||
au BufNewFile,BufRead *.sed setf sed
|
||||
|
||||
" svelte
|
||||
au BufNewFile,BufRead *.svelte setf svelte
|
||||
|
||||
" Sieve (RFC 3028, 5228)
|
||||
au BufNewFile,BufRead *.siv,*.sieve setf sieve
|
||||
|
||||
@ -1537,11 +1568,10 @@ au BufNewFile,BufRead catalog setf catalog
|
||||
" 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,APKBUILD call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.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))
|
||||
|
||||
|
||||
" Shell script (Arch Linux) or PHP file (Drupal)
|
||||
au BufNewFile,BufRead *.install
|
||||
\ if getline(1) =~ '<?php' |
|
||||
@ -2212,8 +2242,11 @@ au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
|
||||
" SGML catalog file
|
||||
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
|
||||
|
||||
" avoid doc files being recognized a shell files
|
||||
au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text
|
||||
|
||||
" Shell scripts ending in a star
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call dist#ft#SetFileTypeSH("bash")
|
||||
au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*} 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,11 +1,11 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
"
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 18 July 2016
|
||||
" Language: Clojure
|
||||
" Maintainer: Alex Vear <av@axvr.io>
|
||||
" Former Maintainers: Sung Pae <self@sungpae.com>
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-02-13
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -43,7 +43,7 @@ setlocal commentstring=;\ %s
|
||||
" specially and hence are not indented specially.
|
||||
"
|
||||
" -*- LISPWORDS -*-
|
||||
" Generated from https://github.com/guns/vim-clojure-static/blob/vim-release-011/clj/src/vim_clojure_static/generate.clj
|
||||
" Generated from https://github.com/clojure-vim/clojure.vim/blob/f8594e7030cdfb0b7990ac92953c77a08a7220f0/clj/src/vim_clojure_static/generate.clj
|
||||
setlocal lispwords=as->,binding,bound-fn,case,catch,cond->,cond->>,condp,def,definline,definterface,defmacro,defmethod,defmulti,defn,defn-,defonce,defprotocol,defrecord,defstruct,deftest,deftest-,deftype,doseq,dotimes,doto,extend,extend-protocol,extend-type,fn,for,if,if-let,if-not,if-some,let,letfn,locking,loop,ns,proxy,reify,set-test,testing,when,when-first,when-let,when-not,when-some,while,with-bindings,with-in-str,with-local-vars,with-open,with-precision,with-redefs,with-redefs-fn,with-test
|
||||
|
||||
" Provide insert mode completions for special forms and clojure.core. As
|
||||
@ -57,21 +57,6 @@ for s:setting in ['omnifunc', 'completefunc']
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Take all directories of the CLOJURE_SOURCE_DIRS environment variable
|
||||
" and add them to the path option.
|
||||
"
|
||||
" This is a legacy option for VimClojure users.
|
||||
if exists('$CLOJURE_SOURCE_DIRS')
|
||||
for s:dir in split($CLOJURE_SOURCE_DIRS, (has("win32") || has("win64")) ? ';' : ':')
|
||||
let s:dir = fnameescape(s:dir)
|
||||
" Whitespace escaping for Windows
|
||||
let s:dir = substitute(s:dir, '\', '\\\\', 'g')
|
||||
let s:dir = substitute(s:dir, '\ ', '\\ ', 'g')
|
||||
execute "setlocal path+=" . s:dir . "/**"
|
||||
endfor
|
||||
let b:undo_ftplugin .= ' | setlocal path<'
|
||||
endif
|
||||
|
||||
" Skip brackets in ignored syntax regions when using the % command
|
||||
if exists('loaded_matchit')
|
||||
let b:match_words = &matchpairs
|
||||
|
@ -1,13 +1,13 @@
|
||||
" Vim settings file
|
||||
" Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66)
|
||||
" Version: (v52) 2020 October 07
|
||||
" Version: (v53) 2021 April 06
|
||||
" Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/>
|
||||
" Usage: For instructions, do :help fortran-plugin from Vim
|
||||
" Credits:
|
||||
" 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.
|
||||
" Doug Kearns, and Fritz Reese.
|
||||
|
||||
" Only do these settings when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -66,12 +66,19 @@ endif
|
||||
" Set comments and textwidth according to source type
|
||||
if (b:fortran_fixed_source == 1)
|
||||
setlocal comments=:!,:*,:C
|
||||
" Fixed format requires a textwidth of 72 for code
|
||||
setlocal tw=72
|
||||
" Fixed format requires a textwidth of 72 for code,
|
||||
" but some vendor extensions allow longer lines
|
||||
if exists("fortran_extended_line_length")
|
||||
setlocal tw=132
|
||||
elseif exists("fortran_cardimage_line_length")
|
||||
setlocal tw=80
|
||||
else
|
||||
setlocal tw=72
|
||||
" If you need to add "&" on continued lines so that the code is
|
||||
" compatible with both free and fixed format, then you should do so
|
||||
" in column 73 and uncomment the next line
|
||||
" setlocal tw=73
|
||||
endif
|
||||
else
|
||||
setlocal comments=:!
|
||||
" Free format allows a textwidth of 132
|
||||
|
25
runtime/ftplugin/fpcmake.vim
Normal file
25
runtime/ftplugin/fpcmake.vim
Normal file
@ -0,0 +1,25 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Free Pascal Makefile Generator
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Apr 23
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
runtime! ftplugin/make.vim
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Free Pascal Makefile Definition Files (*.fpc)\t*.fpc\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = b:undo_ftplugin .. " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
@ -1,6 +1,6 @@
|
||||
" Language: gprof
|
||||
" Maintainer: Dominique Pelle <dominique.pelle@gmail.com>
|
||||
" Last Change: 2013 Jun 09
|
||||
" Last Change: 2021 Apr 08
|
||||
|
||||
" When cursor is on one line of the gprof call graph,
|
||||
" calling this function jumps to this function in the call graph.
|
||||
@ -16,7 +16,7 @@ fun! <SID>GprofJumpToFunctionIndex()
|
||||
norm! $y%
|
||||
call search('^' . escape(@", '[]'), 'sw')
|
||||
norm! zz
|
||||
elseif l:line =~ '^\(\s\+[0-9\.]\+\)\{3}\s\+'
|
||||
elseif l:line =~ '^\(\s*[0-9\.]\+\)\{3}\s\+'
|
||||
" We're in line in the flat profile.
|
||||
norm! 55|eby$
|
||||
call search('^\[\d\+\].*\d\s\+' . escape(@", '[]*.') . '\>', 'sW')
|
||||
|
@ -4,7 +4,7 @@
|
||||
" URL: http://sites.google.com/site/khorser/opensource/vim
|
||||
" Original author: Dorai Sitaram <ds26@gte.com>
|
||||
" Original URL: http://www.ccs.neu.edu/~dorai/vimplugins/vimplugins.html
|
||||
" Last Change: Oct 23, 2013
|
||||
" Last Change: Mar 10, 2021
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -14,13 +14,11 @@ endif
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setl comments=:;
|
||||
setl comments=:;;;;,:;;;,:;;,:;,sr:#\|,mb:\|,ex:\|#
|
||||
setl define=^\\s*(def\\k*
|
||||
setl formatoptions-=t
|
||||
setl iskeyword+=+,-,*,/,%,<,=,>,:,$,?,!,@-@,94
|
||||
setl lisp
|
||||
setl commentstring=;%s
|
||||
|
||||
setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|#
|
||||
|
||||
let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<"
|
||||
|
24
runtime/ftplugin/m3build.vim
Normal file
24
runtime/ftplugin/m3build.vim
Normal file
@ -0,0 +1,24 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-3 Makefile
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 April 15
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
runtime! ftplugin/m3quake.vim
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Modula-3 Makefile (m3makefile m3overrides)\tm3makefile;m3overrides\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
33
runtime/ftplugin/m3quake.vim
Normal file
33
runtime/ftplugin/m3quake.vim
Normal file
@ -0,0 +1,33 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-3 Quake
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 April 15
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=s1:/*,mb:*,ex:*/,:%
|
||||
setlocal commentstring=%\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_words = '\<\%(proc\|if\|foreach\)\>:\<else\>:\<end\>'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Modula-3 Quake Source Files (*.quake)\t*.quake\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
@ -1,6 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: meson
|
||||
" License: VIM License
|
||||
" Maintainer: Liam Beguin <liambeguin@gmail.com>
|
||||
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||
" Last Change: 2018 Nov 27
|
||||
|
||||
|
39
runtime/ftplugin/modula2.vim
Normal file
39
runtime/ftplugin/modula2.vim
Normal file
@ -0,0 +1,39 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-2
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Apr 08
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=s0:(*,mb:\ ,ex:*)
|
||||
setlocal commentstring=(*%s*)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
" The second branch of the middle pattern is intended to match CASE labels
|
||||
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
|
||||
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOOP\|WHILE\|WITH\)\>' ..
|
||||
\ ':' ..
|
||||
\ '\<\%(ELSIF\|ELSE\)\>\|\%(^\s*\)\@<=\w\+\%(\s*\,\s*\w\+\)\=\s*\:=\@!' ..
|
||||
\ ':' ..
|
||||
\ '\<END\>'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Modula-2 Source Files (*.def *.mod)\t*.def;*.mod\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
38
runtime/ftplugin/modula3.vim
Normal file
38
runtime/ftplugin/modula3.vim
Normal file
@ -0,0 +1,38 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Modula-3
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Apr 08
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=s0:(*,mb:\ ,ex:*)
|
||||
setlocal commentstring=(*%s*)
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit") && !exists("b:match_words")
|
||||
let b:match_words = '\<REPEAT\>:\<UNTIL\>,' ..
|
||||
\ '\<\%(BEGIN\|CASE\|FOR\|IF\|LOCK\|LOOP\|TRY\|TYPECASE\|WHILE\|WITH\)\>' ..
|
||||
\ ':' ..
|
||||
\ '\<\%(ELSIF\|ELSE\|EXCEPT\|FINALLY\)\>\|\%(^\s*\)\@<=\S.*=>' ..
|
||||
\ ':' ..
|
||||
\ '\<END\>'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Modula-3 Source Files (*.m3)\t*.m3\n" ..
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl com< cms< fo< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
@ -1,20 +1,50 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: pascal
|
||||
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Changed: 11 Apr 2011
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
|
||||
" Language: Pascal
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Previous Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
|
||||
" Last Change: 2021 Apr 23
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1 " (pascal is case-insensitive)
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let b:match_words = '\<\%(begin\|case\|record\|object\|try\)\>'
|
||||
let b:match_words .= ':\<^\s*\%(except\|finally\)\>:\<end\>'
|
||||
let b:match_words .= ',\<repeat\>:\<until\>'
|
||||
let b:match_words .= ',\<if\>:\<else\>'
|
||||
set comments=s:(*,m:\ ,e:*),s:{,m:\ ,e:}
|
||||
set commentstring={%s}
|
||||
|
||||
if exists("pascal_delphi")
|
||||
set comments+=:///
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "unlet! b:match_words"
|
||||
if !exists("pascal_traditional")
|
||||
set commentstring=//\ %s
|
||||
set comments+=://
|
||||
endif
|
||||
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 1 " (Pascal is case-insensitive)
|
||||
|
||||
let b:match_words = '\<\%(asm\|begin\|case\|\%(\%(=\|packed\)\s*\)\@<=\%(class\|object\)\|\%(=\s*\)\@<=interface\|record\|try\)\>'
|
||||
let b:match_words .= ':\%(^\s*\)\@<=\%(except\|finally\|else\|otherwise\)\>'
|
||||
let b:match_words .= ':\<end\>\.\@!'
|
||||
|
||||
let b:match_words .= ',\<repeat\>:\<until\>'
|
||||
" let b:match_words .= ',\<if\>:\<else\>' " FIXME - else clashing with middle else. It seems like a debatable use anyway.
|
||||
let b:match_words .= ',\<unit\>:\<\%(\%(^\s*\)\@<=interface\|implementation\|initialization\|finalization\)\>:\<end\.'
|
||||
endif
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Pascal Source Files (*.pas *.pp *.inc)\t*.pas;*.pp;*.inc\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< cms< com< " ..
|
||||
\ "| unlet! b:browsefilter b:match_words b:match_ignorecase"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8 noet:
|
||||
|
@ -1,77 +0,0 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Perl 6
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Homepage: https://github.com/vim-perl/vim-perl
|
||||
" Bugs/requests: https://github.com/vim-perl/vim-perl/issues
|
||||
" Last Change: 2020 Apr 15
|
||||
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||
"
|
||||
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Make sure the continuation lines below do not cause problems in
|
||||
" compatibility mode.
|
||||
let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal formatoptions-=t
|
||||
setlocal formatoptions+=crqol
|
||||
setlocal keywordprg=p6doc
|
||||
|
||||
setlocal comments=:#
|
||||
setlocal commentstring=#%s
|
||||
|
||||
" Change the browse dialog on Win32 to show mainly Perl-related files
|
||||
if has("gui_win32")
|
||||
let b:browsefilter = "Perl Source Files (*.pl)\t*.pl\n" .
|
||||
\ "Perl Modules (*.pm)\t*.pm\n" .
|
||||
\ "Perl Documentation Files (*.pod)\t*.pod\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Provided by Ned Konz <ned at bike-nomad dot com>
|
||||
"---------------------------------------------
|
||||
setlocal include=\\<\\(use\\\|require\\)\\>
|
||||
setlocal includeexpr=substitute(substitute(v:fname,'::','/','g'),'$','.pm','')
|
||||
setlocal define=[^A-Za-z_]
|
||||
|
||||
" The following line changes a global variable but is necessary to make
|
||||
" gf and similar commands work. Thanks to Andrew Pimlott for pointing out
|
||||
" the problem. If this causes a " problem for you, add an
|
||||
" after/ftplugin/perl6.vim file that contains
|
||||
" set isfname-=:
|
||||
set isfname+=:
|
||||
setlocal iskeyword=48-57,_,A-Z,a-z,:,-
|
||||
|
||||
" Set this once, globally.
|
||||
if !exists("perlpath")
|
||||
if executable("perl6")
|
||||
try
|
||||
if &shellxquote != '"'
|
||||
let perlpath = system('perl6 -e "@*INC.join(q/,/).say"')
|
||||
else
|
||||
let perlpath = system("perl6 -e '@*INC.join(q/,/).say'")
|
||||
endif
|
||||
let perlpath = substitute(perlpath,',.$',',,','')
|
||||
catch /E145:/
|
||||
let perlpath = ".,,"
|
||||
endtry
|
||||
else
|
||||
" If we can't call perl to get its path, just default to using the
|
||||
" current directory and the directory of the current file.
|
||||
let perlpath = ".,,"
|
||||
endif
|
||||
endif
|
||||
|
||||
let &l:path=perlpath
|
||||
"---------------------------------------------
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isk<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
" Restore the saved compatibility options.
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
32
runtime/ftplugin/poke.vim
Normal file
32
runtime/ftplugin/poke.vim
Normal file
@ -0,0 +1,32 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: GNU Poke
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 March 11
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
setlocal commentstring=//\ %s
|
||||
setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
setlocal include=load
|
||||
setlocal suffixesadd=.pk
|
||||
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "Poke Files (*.pk)\t*.pk\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
let b:undo_ftplugin = "setl fo< com< cms< inc< sua<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim: nowrap sw=2 sts=2 ts=8
|
59
runtime/ftplugin/ps1.vim
Normal file
59
runtime/ftplugin/ps1.vim
Normal file
@ -0,0 +1,59 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Windows PowerShell
|
||||
" URL: https://github.com/PProvost/vim-ps1
|
||||
" Last Change: 2021 Apr 02
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
|
||||
" Don't load another plug-in for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal tw=0
|
||||
setlocal commentstring=#%s
|
||||
setlocal formatoptions=tcqro
|
||||
" Enable autocompletion of hyphenated PowerShell commands,
|
||||
" e.g. Get-Content or Get-ADUser
|
||||
setlocal iskeyword+=-
|
||||
|
||||
" Change the browse dialog on Win32 to show mainly PowerShell-related files
|
||||
if has("gui_win32")
|
||||
let b:browsefilter =
|
||||
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
|
||||
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
|
||||
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
|
||||
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Look up keywords by Get-Help:
|
||||
" check for PowerShell Core in Windows, Linux or MacOS
|
||||
if executable('pwsh') | let s:pwsh_cmd = 'pwsh'
|
||||
" on Windows Subsystem for Linux, check for PowerShell Core in Windows
|
||||
elseif exists('$WSLENV') && executable('pwsh.exe') | let s:pwsh_cmd = 'pwsh.exe'
|
||||
" check for PowerShell <= 5.1 in Windows
|
||||
elseif executable('powershell.exe') | let s:pwsh_cmd = 'powershell.exe'
|
||||
endif
|
||||
|
||||
if exists('s:pwsh_cmd')
|
||||
if !has('gui_running') && executable('less') &&
|
||||
\ !(exists('$ConEmuBuild') && &term =~? '^xterm')
|
||||
" For exclusion of ConEmu, see https://github.com/Maximus5/ConEmu/issues/2048
|
||||
command! -buffer -nargs=1 GetHelp silent exe '!' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>" | ' . (has('unix') ? 'LESS= less' : 'less') | redraw!
|
||||
elseif has('terminal')
|
||||
command! -buffer -nargs=1 GetHelp silent exe 'term ' . s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full "<args>"' . (executable('less') ? ' | less' : '')
|
||||
else
|
||||
command! -buffer -nargs=1 GetHelp echo system(s:pwsh_cmd . ' -NoLogo -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -Command Get-Help -Full <args>')
|
||||
endif
|
||||
endif
|
||||
setlocal keywordprg=:GetHelp
|
||||
|
||||
" Undo the stuff we changed
|
||||
let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
34
runtime/ftplugin/ps1xml.vim
Normal file
34
runtime/ftplugin/ps1xml.vim
Normal file
@ -0,0 +1,34 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Windows PowerShell
|
||||
" URL: https://github.com/PProvost/vim-ps1
|
||||
" Last Change: 2021 Apr 02
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
|
||||
" Don't load another plug-in for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
setlocal tw=0
|
||||
setlocal commentstring=#%s
|
||||
setlocal formatoptions=tcqro
|
||||
|
||||
" Change the browse dialog on Win32 to show mainly PowerShell-related files
|
||||
if has("gui_win32")
|
||||
let b:browsefilter =
|
||||
\ "All PowerShell Files (*.ps1, *.psd1, *.psm1, *.ps1xml)\t*.ps1;*.psd1;*.psm1;*.ps1xml\n" .
|
||||
\ "PowerShell Script Files (*.ps1)\t*.ps1\n" .
|
||||
\ "PowerShell Module Files (*.psd1, *.psm1)\t*.psd1;*.psm1\n" .
|
||||
\ "PowerShell XML Files (*.ps1xml)\t*.ps1xml\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed
|
||||
let b:undo_ftplugin = "setlocal tw< cms< fo<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
@ -2,7 +2,7 @@
|
||||
" Language: R
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:38PM
|
||||
" Last Change: Sat Aug 15, 2020 11:37AM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -20,7 +20,7 @@ setlocal formatoptions-=t
|
||||
setlocal commentstring=#\ %s
|
||||
setlocal comments=:#',:###,:##,:#
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R)\t*.R\n" .
|
||||
\ "Files that include R (*.Rnw *.Rd *.Rmd *.Rrst)\t*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
|
127
runtime/ftplugin/raku.vim
Normal file
127
runtime/ftplugin/raku.vim
Normal file
@ -0,0 +1,127 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: Raku
|
||||
" Maintainer: vim-perl <vim-perl@googlegroups.com>
|
||||
" Homepage: https://github.com/Raku/vim-raku
|
||||
" Bugs/requests: https://github.com/Raku/vim-raku/issues
|
||||
" Last Change: 2021-04-16
|
||||
" Contributors: Hinrik Örn Sigurðsson <hinrik.sig@gmail.com>
|
||||
"
|
||||
" Based on ftplugin/perl.vim by Dan Sharp <dwsharp at hotmail dot com>
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Make sure the continuation lines below do not cause problems in
|
||||
" compatibility mode.
|
||||
let s:save_cpo = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal formatoptions-=t
|
||||
setlocal formatoptions+=crqol
|
||||
setlocal keywordprg=p6doc
|
||||
|
||||
setlocal comments=:#\|,:#=,:#
|
||||
setlocal commentstring=#%s
|
||||
|
||||
" Provided by Ned Konz <ned at bike-nomad dot com>
|
||||
"---------------------------------------------
|
||||
setlocal include=\\<\\(use\\\|require\\)\\>
|
||||
setlocal includeexpr=substitute(v:fname,'::','/','g')
|
||||
setlocal suffixesadd=.rakumod,.rakudoc,.pm6,.pm
|
||||
setlocal define=[^A-Za-z_]
|
||||
|
||||
" The following line changes a global variable but is necessary to make
|
||||
" gf and similar commands work. Thanks to Andrew Pimlott for pointing out
|
||||
" the problem. If this causes a problem for you, add an
|
||||
" after/ftplugin/raku.vim file that contains
|
||||
" set isfname-=:
|
||||
set isfname+=:
|
||||
setlocal iskeyword=@,48-57,_,192-255,-
|
||||
|
||||
" Raku exposes its CompUnits through $*REPO, but mapping module names to
|
||||
" compunit paths is nontrivial. Probably it's more convenient to rely on
|
||||
" people using zef, which has a handy store of sources for modules it has
|
||||
" installed.
|
||||
func s:compareReverseFtime(a, b)
|
||||
let atime = getftime(a:a)
|
||||
let btime = getftime(a:b)
|
||||
return atime > btime ? -1 : atime == btime ? 0 : 1
|
||||
endfunc
|
||||
|
||||
let &l:path = "lib,."
|
||||
if exists('$RAKULIB')
|
||||
let &l:path = &l:path . "," . $RAKULIB
|
||||
endif
|
||||
let &l:path = &l:path . "," . join(
|
||||
\ sort(glob("~/.zef/store/*/*/lib", 0, 1), "s:compareReverseFtime"),
|
||||
\ ',')
|
||||
|
||||
" Convert ascii-based ops into their single-character unicode equivalent
|
||||
if get(g:, 'raku_unicode_abbrevs', 0)
|
||||
iabbrev <buffer> !(<) ⊄
|
||||
iabbrev <buffer> !(<=) ⊈
|
||||
iabbrev <buffer> !(>) ⊅
|
||||
iabbrev <buffer> !(>=) ⊉
|
||||
iabbrev <buffer> !(cont) ∌
|
||||
iabbrev <buffer> !(elem) ∉
|
||||
iabbrev <buffer> != ≠
|
||||
iabbrev <buffer> (&) ∩
|
||||
iabbrev <buffer> (+) ⊎
|
||||
iabbrev <buffer> (-) ∖
|
||||
iabbrev <buffer> (.) ⊍
|
||||
iabbrev <buffer> (<) ⊂
|
||||
iabbrev <buffer> (<+) ≼
|
||||
iabbrev <buffer> (<=) ⊆
|
||||
iabbrev <buffer> (>) ⊃
|
||||
iabbrev <buffer> (>+) ≽
|
||||
iabbrev <buffer> (>=) ⊇
|
||||
iabbrev <buffer> (\|) ∪
|
||||
iabbrev <buffer> (^) ⊖
|
||||
iabbrev <buffer> (atomic) ⚛
|
||||
iabbrev <buffer> (cont) ∋
|
||||
iabbrev <buffer> (elem) ∈
|
||||
iabbrev <buffer> * ×
|
||||
iabbrev <buffer> **0 ⁰
|
||||
iabbrev <buffer> **1 ¹
|
||||
iabbrev <buffer> **2 ²
|
||||
iabbrev <buffer> **3 ³
|
||||
iabbrev <buffer> **4 ⁴
|
||||
iabbrev <buffer> **5 ⁵
|
||||
iabbrev <buffer> **6 ⁶
|
||||
iabbrev <buffer> **7 ⁷
|
||||
iabbrev <buffer> **8 ⁸
|
||||
iabbrev <buffer> **9 ⁹
|
||||
iabbrev <buffer> ... …
|
||||
iabbrev <buffer> / ÷
|
||||
iabbrev <buffer> << «
|
||||
iabbrev <buffer> <<[=]<< «=«
|
||||
iabbrev <buffer> <<[=]>> «=»
|
||||
iabbrev <buffer> <= ≤
|
||||
iabbrev <buffer> =~= ≅
|
||||
iabbrev <buffer> >= ≥
|
||||
iabbrev <buffer> >> »
|
||||
iabbrev <buffer> >>[=]<< »=«
|
||||
iabbrev <buffer> >>[=]>> »=»
|
||||
iabbrev <buffer> Inf ∞
|
||||
iabbrev <buffer> atomic-add-fetch ⚛+=
|
||||
iabbrev <buffer> atomic-assign ⚛=
|
||||
iabbrev <buffer> atomic-fetch ⚛
|
||||
iabbrev <buffer> atomic-dec-fetch --⚛
|
||||
iabbrev <buffer> atomic-fetch-dec ⚛--
|
||||
iabbrev <buffer> atomic-fetch-inc ⚛++
|
||||
iabbrev <buffer> atomic-inc-fetch ++⚛
|
||||
iabbrev <buffer> atomic-sub-fetch ⚛−=
|
||||
iabbrev <buffer> e 𝑒
|
||||
iabbrev <buffer> o ∘
|
||||
iabbrev <buffer> pi π
|
||||
iabbrev <buffer> set() ∅
|
||||
iabbrev <buffer> tau τ
|
||||
endif
|
||||
|
||||
" Undo the stuff we changed.
|
||||
let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path<" .
|
||||
\ " | unlet! b:browsefilter"
|
||||
|
||||
" Restore the saved compatibility options.
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:save_cpo
|
@ -2,7 +2,7 @@
|
||||
" Language: R help file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:37PM
|
||||
" Last Change: Sat Aug 15, 2020 12:01PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -17,7 +17,7 @@ set cpo&vim
|
||||
|
||||
setlocal iskeyword=@,48-57,_,.
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: R Markdown file
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Jul 22, 2018 06:51PM
|
||||
" Last Change: Sat Aug 15, 2020 12:03PM
|
||||
" Original work by Alex Zvoleff (adjusted from R help for rmd by Michel Kuhlmann)
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@ -46,7 +46,7 @@ runtime ftplugin/pandoc.vim
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Rnoweb
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Tue Apr 07, 2015 04:37PM
|
||||
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -24,7 +24,7 @@ setlocal iskeyword=@,48-57,_,.
|
||||
setlocal suffixesadd=.bib,.tex
|
||||
setlocal comments=b:%,b:#,b:##,b:###,b:#'
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: reStructuredText documentation format with R code
|
||||
" Maintainer: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Wed Nov 01, 2017 10:47PM
|
||||
" Last Change: Sat Aug 15, 2020 12:02PM
|
||||
" Original work by Alex Zvoleff
|
||||
|
||||
" Only do this when not yet done for this buffer
|
||||
@ -37,7 +37,7 @@ if !exists("g:rrst_dynamic_comments") || (exists("g:rrst_dynamic_comments") && g
|
||||
setlocal formatexpr=FormatRrst()
|
||||
endif
|
||||
|
||||
if has("gui_win32") && !exists("b:browsefilter")
|
||||
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
||||
let b:browsefilter = "R Source Files (*.R *.Rnw *.Rd *.Rmd *.Rrst)\t*.R;*.Rnw;*.Rd;*.Rmd;*.Rrst\n" .
|
||||
\ "All Files (*.*)\t*.*\n"
|
||||
endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: SystemVerilog
|
||||
" Maintainer: kocha <kocha.lsifrontend@gmail.com>
|
||||
" Last Change: 12-Aug-2013.
|
||||
" Last Change: 07-May-2021
|
||||
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
@ -9,3 +9,36 @@ endif
|
||||
|
||||
" Behaves just like Verilog
|
||||
runtime! ftplugin/verilog.vim
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Add SystemVerilog keywords for matchit plugin.
|
||||
if exists("loaded_matchit")
|
||||
let b:match_words =
|
||||
\ '\<begin\>:\<end\>,' .
|
||||
\ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
|
||||
\ '\<module\>:\<endmodule\>,' .
|
||||
\ '\<if\>:`\@<!\<else\>,' .
|
||||
\ '\<function\>:\<endfunction\>,' .
|
||||
\ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
|
||||
\ '\<task\>:\<endtask\>,' .
|
||||
\ '\<specify\>:\<endspecify\>,' .
|
||||
\ '\<config\>:\<endconfig\>,' .
|
||||
\ '\<generate\>:\<endgenerate\>,' .
|
||||
\ '\<fork\>:\<join\>\|\<join_any\>\|\<join_none\>,' .
|
||||
\ '\<primitive\>:\<endprimitive\>,' .
|
||||
\ '\<table\>:\<endtable\>,' .
|
||||
\ '\<checker\>:\<endchecker\>,' .
|
||||
\ '\<class\>:\<endclass\>,' .
|
||||
\ '\<clocking\>:\<endclocking\>,' .
|
||||
\ '\<gruop\>:\<endgruop\>,' .
|
||||
\ '\<interface\>:\<endinterface\>,' .
|
||||
\ '\<package\>:\<endpackage\>,' .
|
||||
\ '\<program\>:\<endprogram\>,' .
|
||||
\ '\<property\>:\<endproperty\>,' .
|
||||
\ '\<sequence\>:\<endsequence\>'
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Vim
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Jan 23
|
||||
" Last Change: 2021 Apr 11
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -54,7 +54,7 @@ if "\n" .. getline(1, 10)->join("\n") =~# '\n\s*vim9\%[script]\>'
|
||||
" Comments starts with # in Vim9 script
|
||||
setlocal commentstring=#%s
|
||||
else
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,:\"
|
||||
setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
|
||||
" Comments starts with a double quote in legacy script
|
||||
setlocal commentstring=\"%s
|
||||
endif
|
||||
@ -94,11 +94,11 @@ if exists("loaded_matchit")
|
||||
" func name
|
||||
" require a parenthesis following, then there can be an "endfunc".
|
||||
let b:match_words =
|
||||
\ '\<\%(fu\%[nction]\|def\)\s\+\S\+(:\<retu\%[rn]\>:\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' .
|
||||
\ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .
|
||||
\ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\(w\%[hile]\|fo\%[r]\)\>,' .
|
||||
\ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' .
|
||||
\ '{:},' .
|
||||
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' .
|
||||
\ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' .
|
||||
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,'
|
||||
" Ignore syntax region commands and settings, any 'en*' would clobber
|
||||
" if-endif.
|
||||
|
@ -62,10 +62,14 @@ fun! CdlGetIndent(lnum)
|
||||
" PREVIOUS LINE
|
||||
let ind = indent(lnum)
|
||||
let line = getline(lnum)
|
||||
let f = -1 " wether a '=' is a conditional or a asignment, -1 means we don't know yet
|
||||
" one 'closing' element at the beginning of the line has already reduced the
|
||||
" indent, but 'else', 'elseif' & 'then' increment it for the next line
|
||||
" '=' at the beginning has already de right indent (increased for asignments)
|
||||
|
||||
" Whether a '=' is a conditional or an assignment. -1 means we don't know
|
||||
" yet.
|
||||
" One 'closing' element at the beginning of the line has already reduced the
|
||||
" indent, but 'else', 'elseif' & 'then' increment it for the next line.
|
||||
" '=' at the beginning already has the right indent (increased for
|
||||
" asignments).
|
||||
let f = -1
|
||||
let inicio = matchend(line, '^\c\s*\(else\a*\|then\|endif\|/[*/]\|[);={]\)')
|
||||
if inicio > 0
|
||||
let c = line[inicio-1]
|
||||
|
@ -1,12 +1,11 @@
|
||||
" Vim indent file
|
||||
" Language: Clojure
|
||||
" Author: Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: http://kotka.de/projects/clojure/vimclojure.html
|
||||
"
|
||||
" Maintainer: Sung Pae <self@sungpae.com>
|
||||
" URL: https://github.com/guns/vim-clojure-static
|
||||
" License: Same as Vim
|
||||
" Last Change: 18 July 2016
|
||||
" Language: Clojure
|
||||
" Maintainer: Alex Vear <av@axvr.io>
|
||||
" Former Maintainers: Sung Pae <self@sungpae.com>
|
||||
" Meikel Brandmeyer <mb@kotka.de>
|
||||
" URL: https://github.com/clojure-vim/clojure.vim
|
||||
" License: Vim (see :h license)
|
||||
" Last Change: 2021-02-13
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@ -87,7 +86,7 @@ if exists("*searchpairpos")
|
||||
function! s:match_pairs(open, close, stopat)
|
||||
" Stop only on vector and map [ resp. {. Ignore the ones in strings and
|
||||
" comments.
|
||||
if a:stopat == 0
|
||||
if a:stopat == 0 && g:clojure_maxlines > 0
|
||||
let stopat = max([line(".") - g:clojure_maxlines, 0])
|
||||
else
|
||||
let stopat = a:stopat
|
||||
@ -121,7 +120,7 @@ if exists("*searchpairpos")
|
||||
if s:syn_id_name() !~? "string"
|
||||
return -1
|
||||
endif
|
||||
if s:current_char() != '\\'
|
||||
if s:current_char() != '\'
|
||||
return -1
|
||||
endif
|
||||
call cursor(0, col("$") - 1)
|
||||
@ -170,7 +169,35 @@ if exists("*searchpairpos")
|
||||
|
||||
call search('\S', 'W')
|
||||
let w = s:strip_namespace_and_macro_chars(s:current_word())
|
||||
|
||||
if g:clojure_special_indent_words =~# '\V\<' . w . '\>'
|
||||
|
||||
" `letfn` is a special-special-case.
|
||||
if w ==# 'letfn'
|
||||
" Earlier code left the cursor at:
|
||||
" (letfn [...] ...)
|
||||
" ^
|
||||
|
||||
" Search and get coordinates of first `[`
|
||||
" (letfn [...] ...)
|
||||
" ^
|
||||
call search('\[', 'W')
|
||||
let pos = getcurpos()
|
||||
let letfn_bracket = [pos[1], pos[2]]
|
||||
|
||||
" Move cursor to start of the form this function was
|
||||
" initially called on. Grab the coordinates of the
|
||||
" closest outer `[`.
|
||||
call cursor(a:position)
|
||||
let outer_bracket = s:match_pairs('\[', '\]', 0)
|
||||
|
||||
" If the located square brackets are not the same,
|
||||
" don't use special-case formatting.
|
||||
if outer_bracket != letfn_bracket
|
||||
return 0
|
||||
endif
|
||||
endif
|
||||
|
||||
return 1
|
||||
endif
|
||||
|
||||
@ -190,11 +217,7 @@ if exists("*searchpairpos")
|
||||
" Check if form is a reader conditional, that is, it is prefixed by #?
|
||||
" or @#?
|
||||
function! s:is_reader_conditional_special_case(position)
|
||||
if getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
|
||||
return 1
|
||||
endif
|
||||
|
||||
return 0
|
||||
return getline(a:position[0])[a:position[1] - 3 : a:position[1] - 2] == "#?"
|
||||
endfunction
|
||||
|
||||
" Returns 1 for opening brackets, -1 for _anything else_.
|
||||
@ -261,7 +284,7 @@ if exists("*searchpairpos")
|
||||
call cursor(paren)
|
||||
|
||||
if s:is_method_special_case(paren)
|
||||
return [paren[0], paren[1] + shiftwidth() - 1]
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
if s:is_reader_conditional_special_case(paren)
|
||||
@ -292,6 +315,19 @@ if exists("*searchpairpos")
|
||||
return paren
|
||||
endif
|
||||
|
||||
" If the keyword begins with #, check if it is an anonymous
|
||||
" function or set, in which case we indent by the shiftwidth
|
||||
" (minus one if g:clojure_align_subforms = 1), or if it is
|
||||
" ignored, in which case we use the ( position for indent.
|
||||
if w[0] == "#"
|
||||
" TODO: Handle #=() and other rare reader invocations?
|
||||
if w[1] == '(' || w[1] == '{'
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
|
||||
elseif w[1] == '_'
|
||||
return paren
|
||||
endif
|
||||
endif
|
||||
|
||||
" Test words without namespace qualifiers and leading reader macro
|
||||
" metacharacters.
|
||||
"
|
||||
@ -299,19 +335,19 @@ if exists("*searchpairpos")
|
||||
let ww = s:strip_namespace_and_macro_chars(w)
|
||||
|
||||
if &lispwords =~# '\V\<' . ww . '\>'
|
||||
return [paren[0], paren[1] + shiftwidth() - 1]
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
if g:clojure_fuzzy_indent
|
||||
\ && !s:match_one(g:clojure_fuzzy_indent_blacklist, ww)
|
||||
\ && s:match_one(g:clojure_fuzzy_indent_patterns, ww)
|
||||
return [paren[0], paren[1] + shiftwidth() - 1]
|
||||
return [paren[0], paren[1] + &shiftwidth - 1]
|
||||
endif
|
||||
|
||||
call search('\v\_s', 'cW')
|
||||
call search('\v\S', 'W')
|
||||
if paren[0] < line(".")
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : shiftwidth() - 1)]
|
||||
return [paren[0], paren[1] + (g:clojure_align_subforms ? 0 : &shiftwidth - 1)]
|
||||
endif
|
||||
|
||||
call search('\v\S', 'bW')
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent script for HTML
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2020 Dec 11
|
||||
" Last Change: 2021 Jan 26
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@ -941,11 +941,11 @@ func! s:InsideTag(foundHtmlString)
|
||||
let idx = match(text, '<' . s:tagname . '\s\+\zs\w')
|
||||
endif
|
||||
if idx == -1
|
||||
" after just "<tag" indent one level more
|
||||
" after just "<tag" indent two levels more
|
||||
let idx = match(text, '<' . s:tagname . '$')
|
||||
if idx >= 0
|
||||
call cursor(lnum, idx)
|
||||
return virtcol('.') + shiftwidth()
|
||||
call cursor(lnum, idx + 1)
|
||||
return virtcol('.') - 1 + shiftwidth() * 2
|
||||
endif
|
||||
endif
|
||||
if idx > 0
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user