mirror of
https://github.com/vim/vim
synced 2025-07-30 18:31:51 +00:00
Compare commits
411 Commits
Author | SHA1 | Date | |
---|---|---|---|
ffcfddc759 | |||
c72bdd28ac | |||
cc7eb2aa7a | |||
5231224e11 | |||
648594eaf7 | |||
c03fe66ade | |||
4ece152ad6 | |||
0f1227f7d5 | |||
d9162550aa | |||
1aeddeb8bd | |||
de69a7353e | |||
482d2f37a5 | |||
a2438132a6 | |||
31e21766d6 | |||
c323527d67 | |||
fe3418abe0 | |||
5b73992d8f | |||
9da32e4d57 | |||
90fba5627b | |||
6bcb18253a | |||
981217c11f | |||
b885a7c72c | |||
c967d57aa9 | |||
f055d45023 | |||
f32f099761 | |||
d4ab807d62 | |||
09f688c33a | |||
deb108ba0a | |||
1594f31345 | |||
30441bb3d5 | |||
41fb723ee9 | |||
db86472770 | |||
6a9e5c69cf | |||
5ede5b231e | |||
efc5db5215 | |||
90df4b9d42 | |||
303215d60c | |||
b5098060f4 | |||
599a6e5b36 | |||
442b29c968 | |||
5cb09620c1 | |||
404557e6a6 | |||
04db26b360 | |||
f6d877975b | |||
d6fa7bd5b9 | |||
22f85d0459 | |||
6977dba04b | |||
97f227d9c9 | |||
b7480cd893 | |||
f33cae6050 | |||
3777d6e32b | |||
26e88ec8e2 | |||
67b17a6fc6 | |||
7a40ff00ed | |||
4197828dc6 | |||
999db2346b | |||
1d97efce0c | |||
6c72fd51a8 | |||
b17ab86e7b | |||
c60e959cba | |||
fb773a3e0a | |||
74509239df | |||
e28d9b3bd4 | |||
00aaa512d5 | |||
20cc528320 | |||
9cee4a1c9c | |||
fcde67c99f | |||
6fc0161682 | |||
acbb4b5720 | |||
a26f56f675 | |||
72463f883c | |||
b836f631db | |||
11a632d60b | |||
576cb75ceb | |||
a3d1b29bd3 | |||
834193afd7 | |||
d3d8feeb89 | |||
3f987b5917 | |||
80b2ba3e96 | |||
ea042677ab | |||
4067bd3604 | |||
7d7bcc6ba0 | |||
127950241e | |||
ffec6dd16a | |||
108010aa47 | |||
d887297ad0 | |||
1d1ce613cd | |||
17d868b8b2 | |||
577dc93da9 | |||
4d8f476176 | |||
e65081d1b5 | |||
65aee0b714 | |||
4cd5c52d64 | |||
054794c20f | |||
98f9a5f4cb | |||
e3ffaa6b7c | |||
015cf10311 | |||
307dec4567 | |||
14ded11fca | |||
3a3b10e87a | |||
4d5dfe2083 | |||
13e45d14ba | |||
ce024c3e20 | |||
444d878324 | |||
f3caeb63d6 | |||
6582e230a0 | |||
22480d147f | |||
f3d30842dc | |||
b420ac9d20 | |||
98703d7f6c | |||
3a62b14077 | |||
d415d26913 | |||
6738fd2000 | |||
44dea9da4b | |||
18d46587b9 | |||
8cec9273d2 | |||
cc65040986 | |||
8ce3ca8961 | |||
7237cab8f1 | |||
831bdf8622 | |||
ef7be8348f | |||
419a40ac96 | |||
226b28b961 | |||
22f17a29cd | |||
cb54bc6562 | |||
035bd1c99f | |||
f1e7449d56 | |||
2ac4b2536a | |||
4f8f54280f | |||
0d5e1ec37f | |||
2fb1b89d72 | |||
ca81f0e834 | |||
f573c6e1ed | |||
208f0b48b2 | |||
2fb7495686 | |||
6864efa596 | |||
ad52f96a2d | |||
59b50c3bee | |||
fae55a9cb0 | |||
74f4a965bc | |||
6e9695525e | |||
4cea536bdf | |||
29f0dc3689 | |||
6bc30b05e6 | |||
41a7f82dea | |||
b90ac5e96e | |||
55b6b60b69 | |||
61a417b7c1 | |||
a97c36310f | |||
f57b43c230 | |||
8ac681a280 | |||
968a5b62ff | |||
affd0bc626 | |||
caf1a2f296 | |||
3b814af7e1 | |||
47f6db9089 | |||
1b0a9dd413 | |||
26d711645c | |||
b69c6fb7b4 | |||
90478f35a8 | |||
2d6d718dde | |||
5ffefbb35a | |||
2346a63784 | |||
4ee9d8e04d | |||
e70e12b32f | |||
2e66b0d137 | |||
c2dec4cac4 | |||
c3a27bbd53 | |||
6d1792d408 | |||
d9f31c13d2 | |||
e99d422bbd | |||
e6174fd58d | |||
4a27aefe3b | |||
a993153538 | |||
7423577180 | |||
6654ca702c | |||
0b71955552 | |||
5958549760 | |||
744aecf877 | |||
22db0d549f | |||
8de901e1f1 | |||
f0a4069e3d | |||
4f13527598 | |||
3044324e8d | |||
7b4f76c030 | |||
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 |
34
.github/CODEOWNERS
vendored
34
.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,7 +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/powershell.vim @heaths
|
||||
runtime/compiler/rake.vim @tpope @dkearns
|
||||
runtime/compiler/rhino.vim @dkearns
|
||||
runtime/compiler/rspec.vim @tpope @dkearns
|
||||
@ -68,7 +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/doc/ps1.txt @heaths
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
@ -77,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
|
||||
@ -90,10 +89,16 @@ 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
|
||||
@ -101,6 +106,7 @@ 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
|
||||
@ -114,12 +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
|
||||
@ -136,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
|
||||
@ -148,11 +157,14 @@ 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
|
||||
@ -163,23 +175,31 @@ 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/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
|
||||
@ -192,6 +212,7 @@ 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
|
||||
@ -210,6 +231,9 @@ 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
|
||||
src/xxd/ @jnweiger
|
||||
|
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -56,7 +56,7 @@ jobs:
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
sudo apt update && sudo apt install -y \
|
||||
autoconf \
|
||||
lcov \
|
||||
gettext \
|
||||
@ -71,7 +71,8 @@ jobs:
|
||||
cscope \
|
||||
libgtk2.0-dev \
|
||||
desktop-file-utils \
|
||||
libtool-bin
|
||||
libtool-bin \
|
||||
libsodium-dev
|
||||
|
||||
- name: Install clang-11
|
||||
if: matrix.compiler == 'clang'
|
||||
|
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
|
||||
|
10
Filelist
10
Filelist
@ -68,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 \
|
||||
@ -133,6 +134,7 @@ SRC_ALL = \
|
||||
src/spell.h \
|
||||
src/spellfile.c \
|
||||
src/spellsuggest.c \
|
||||
src/strings.c \
|
||||
src/structs.h \
|
||||
src/syntax.c \
|
||||
src/tag.c \
|
||||
@ -246,6 +248,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 \
|
||||
@ -294,6 +297,7 @@ SRC_ALL = \
|
||||
src/proto/spell.pro \
|
||||
src/proto/spellfile.pro \
|
||||
src/proto/spellsuggest.pro \
|
||||
src/proto/strings.pro \
|
||||
src/proto/syntax.pro \
|
||||
src/proto/tag.pro \
|
||||
src/proto/term.pro \
|
||||
@ -437,7 +441,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 \
|
||||
@ -461,7 +464,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 \
|
||||
@ -481,6 +483,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 \
|
||||
@ -493,6 +496,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 \
|
||||
@ -567,7 +571,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.
|
||||
|
35
README.md
35
README.md
@ -4,15 +4,23 @@
|
||||
|
||||
<sub>For translations of this README see the end.</sub>
|
||||
|
||||
If you find a bug or want to discuss the best way to add a new feature, please
|
||||
open an [issue](https://github.com/vim/vim/issues).
|
||||
If you have a question or want to discuss the best way to do something with
|
||||
Vim, you can use [StackExchange](https://vi.stackexchange.com/)
|
||||
or one of the [Maillists](https://www.vim.org/community.php).
|
||||
|
||||
|
||||
## 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 +50,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 +61,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 +86,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 +96,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 +113,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 +122,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 ##
|
||||
|
@ -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 ..
|
||||
|
@ -66,12 +66,15 @@ 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
|
||||
unzip icons.zip
|
||||
|
||||
To build then, enter:
|
||||
Then build gvim.exe:
|
||||
|
||||
cd nsis
|
||||
makensis gvim.nsi
|
||||
|
@ -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
|
||||
|
@ -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} \
|
||||
|
11
runtime/autoload/dist/ft.vim
vendored
11
runtime/autoload/dist/ft.vim
vendored
@ -172,6 +172,17 @@ func dist#ft#FTent()
|
||||
setf dtd
|
||||
endfunc
|
||||
|
||||
func dist#ft#ExCheck()
|
||||
let lines = getline(1, min([line("$"), 100]))
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
|
||||
setf euphoria3
|
||||
else
|
||||
setf elixir
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func dist#ft#EuphoriaCheck()
|
||||
if exists('g:filetype_euphoria')
|
||||
exe 'setf ' . g:filetype_euphoria
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Feb 25
|
||||
" Last Change: 2020 Apr 12
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
@ -501,13 +501,8 @@ class VimRubyCompletion
|
||||
return if rails_base == nil
|
||||
$:.push rails_base unless $:.index( rails_base )
|
||||
|
||||
rails_config = rails_base + "config/"
|
||||
rails_lib = rails_base + "lib/"
|
||||
$:.push rails_config unless $:.index( rails_config )
|
||||
$:.push rails_lib unless $:.index( rails_lib )
|
||||
|
||||
bootfile = rails_config + "boot.rb"
|
||||
envfile = rails_config + "environment.rb"
|
||||
bootfile = rails_base + "config/boot.rb"
|
||||
envfile = rails_base + "config/environment.rb"
|
||||
if File.exists?( bootfile ) && File.exists?( envfile )
|
||||
begin
|
||||
require bootfile
|
||||
|
@ -1,12 +1,16 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 14.0
|
||||
" Last Change: 2020 Dec 30
|
||||
" 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
|
||||
@ -42,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.
|
||||
@ -90,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
|
||||
@ -145,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
|
||||
@ -183,7 +183,6 @@ 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')
|
||||
@ -200,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
|
||||
|
||||
@ -227,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
|
||||
@ -244,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},
|
||||
@ -329,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},
|
||||
@ -529,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
|
||||
@ -647,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
|
||||
@ -674,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
|
||||
@ -682,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
|
||||
@ -724,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 = ''
|
||||
@ -756,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
|
@ -31,6 +31,7 @@ DOCS = \
|
||||
fold.txt \
|
||||
ft_ada.txt \
|
||||
ft_ps1.txt \
|
||||
ft_raku.txt \
|
||||
ft_rust.txt \
|
||||
ft_sql.txt \
|
||||
gui.txt \
|
||||
@ -175,6 +176,7 @@ HTMLS = \
|
||||
fold.html \
|
||||
ft_ada.html \
|
||||
ft_ps1.html \
|
||||
ft_raku.html \
|
||||
ft_rust.html \
|
||||
ft_sql.html \
|
||||
gui.html \
|
||||
|
@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 8.2. Last change: 2019 May 05
|
||||
*arabic.txt* For Vim version 8.2. Last change: 2021 Jun 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
@ -176,6 +176,13 @@ o Enable Arabic settings [short-cut]
|
||||
and its support is preferred due to its level of offerings.
|
||||
'arabic' when 'termbidi' is enabled only sets the keymap.
|
||||
|
||||
For vertical window isolation while setting 'termbidi' an LTR
|
||||
vertical separator like "l" or "𝖨" may be used. It may also be
|
||||
hidden by changing its color to the foreground color: >
|
||||
:set fillchars=vert:l
|
||||
:hi VertSplit ctermbg=White
|
||||
< Note that this is a workaround, not a proper solution.
|
||||
|
||||
If, on the other hand, you'd like to be verbose and explicit and
|
||||
are opting not to use the 'arabic' short-cut command, here's what
|
||||
is needed (i.e. if you use ':set arabic' you can skip this section) -
|
||||
|
@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 Mar 13
|
||||
*autocmd.txt* For Vim version 8.2. Last change: 2021 Jul 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -54,7 +54,7 @@ effects. Be careful not to destroy your text.
|
||||
:au[tocmd] [group] {event} {pat} [++once] [++nested] {cmd}
|
||||
Add {cmd} to the list of commands that Vim will
|
||||
execute automatically on {event} for a file matching
|
||||
{pat} |autocmd-patterns|.
|
||||
{pat} |autocmd-patterns|.
|
||||
Here {event} cannot be "*". *E1155*
|
||||
Note: A quote character is seen as argument to the
|
||||
:autocmd and won't start a comment.
|
||||
@ -679,8 +679,10 @@ CursorHoldI Just like CursorHold, but in Insert mode.
|
||||
CursorMoved After the cursor was moved in Normal or Visual
|
||||
mode. Also when the text of the cursor line
|
||||
has been changed, e.g., with "x", "rx" or "p".
|
||||
Not triggered when there is typeahead or when
|
||||
an operator is pending.
|
||||
Not triggered when there is typeahead, when
|
||||
an operator is pending or when moving to
|
||||
another window while remaining at the same
|
||||
cursor position.
|
||||
For an example see |match-parens|.
|
||||
Note: This can not be skipped with
|
||||
`:noautocmd`.
|
||||
@ -985,9 +987,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
|
||||
@ -1522,7 +1525,14 @@ option will not cause any commands to be executed.
|
||||
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.
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Mar 01
|
||||
*change.txt* For Vim version 8.2. Last change: 2021 Jun 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -780,12 +780,15 @@ For compatibility with Vi these two exceptions are allowed:
|
||||
"\/{string}/" and "\?{string}?" do the same as "//{string}/r".
|
||||
"\&{string}&" does the same as "//{string}/".
|
||||
*pattern-delimiter* *E146*
|
||||
Instead of the '/' which surrounds the pattern and replacement string, you
|
||||
can use any other single-byte character, but not an alphanumeric character,
|
||||
'\', '"' or '|'. This is useful if you want to include a '/' in the search
|
||||
pattern or replacement string. Example: >
|
||||
Instead of the '/' which surrounds the pattern and replacement string, you can
|
||||
use another single-byte character. This is useful if you want to include a
|
||||
'/' in the search pattern or replacement string. Example: >
|
||||
:s+/+//+
|
||||
|
||||
You can use most characters, but not an alphanumeric character, '\', '"' or
|
||||
'|'. In Vim9 script you should not use '#' because it may be recognized as
|
||||
the start of a comment.
|
||||
|
||||
For the definition of a pattern, see |pattern|. In Visual block mode, use
|
||||
|/\%V| in the pattern to have the substitute work in the block only.
|
||||
Otherwise it works on whole lines anyway.
|
||||
@ -1042,6 +1045,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|).
|
||||
@ -1050,6 +1057,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
|
||||
@ -1126,6 +1139,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
|
||||
@ -1165,6 +1184,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 Apr 05
|
||||
*cmdline.txt* For Vim version 8.2. Last change: 2021 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -798,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*
|
||||
@ -1132,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: 2021 Feb 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 Apr 05
|
||||
*editing.txt* For Vim version 8.2. Last change: 2021 May 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -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 Apr 07
|
||||
*eval.txt* For Vim version 8.2. Last change: 2021 Jul 01
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1588,7 +1588,17 @@ The lambda expression is also useful for Channel, Job and timer: >
|
||||
Handler called
|
||||
Handler called
|
||||
|
||||
Note how execute() is used to execute an Ex command. That's ugly though.
|
||||
Note that it is possible to cause memory to be used and not freed if the
|
||||
closure is referenced by the context it depends on: >
|
||||
function Function()
|
||||
let x = 0
|
||||
let F = {-> x}
|
||||
endfunction
|
||||
The closure uses "x" from the function scope, and "F" in that same scope
|
||||
refers to the closure. This cycle results in the memory not being freed.
|
||||
Recommendation: don't do this.
|
||||
|
||||
Notice 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
|
||||
@ -1962,6 +1972,10 @@ 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 When evaluating 'includeexpr': the file name that was
|
||||
detected. Empty otherwise.
|
||||
|
||||
*v:fname_in* *fname_in-variable*
|
||||
v:fname_in The name of the input file. Valid while evaluating:
|
||||
option used for ~
|
||||
@ -2099,7 +2113,7 @@ v:null An empty String. Used to put "null" in JSON. See
|
||||
v:numbermax Maximum value of a number.
|
||||
|
||||
*v:numbermin* *numbermin-variable*
|
||||
v:numbermin Minimum value of a number (negative)
|
||||
v:numbermin Minimum value of a number (negative).
|
||||
|
||||
*v:numbersize* *numbersize-variable*
|
||||
v:numbersize Number of bits in a Number. This is normally 64, but on some
|
||||
@ -2505,7 +2519,7 @@ char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
|
||||
charclass({string}) Number character class of {string}
|
||||
charcol({expr}) Number column number of cursor or mark
|
||||
charidx({string}, {idx} [, {countcc}])
|
||||
Number char index of byte {idx} in {string}
|
||||
Number char index of byte {idx} in {string}
|
||||
chdir({dir}) String change current working directory
|
||||
cindent({lnum}) Number C indent for line {lnum}
|
||||
clearmatches([{win}]) none clear all matches
|
||||
@ -2526,7 +2540,7 @@ cscope_connection([{num}, {dbpath} [, {prepend}]])
|
||||
cursor({lnum}, {col} [, {off}])
|
||||
Number move cursor to {lnum}, {col}, {off}
|
||||
cursor({list}) Number move cursor to position in {list}
|
||||
debugbreak({pid}) Number interrupt process being debugged
|
||||
debugbreak({pid}) Number interrupt process being debugged
|
||||
deepcopy({expr} [, {noref}]) any make a full copy of {expr}
|
||||
delete({fname} [, {flags}]) Number delete the file or directory {fname}
|
||||
deletebufline({expr}, {first} [, {last}])
|
||||
@ -2591,10 +2605,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
|
||||
@ -3017,6 +3033,10 @@ test_feedinput({string}) none add key sequence to input buffer
|
||||
test_garbagecollect_now() none free memory right now for testing
|
||||
test_garbagecollect_soon() none free memory soon for testing
|
||||
test_getvalue({string}) any get value of an internal variable
|
||||
test_gui_drop_files({list}, {row}, {col}, {mods})
|
||||
none drop a list of files in a window
|
||||
test_gui_mouse_event({button}, {row}, {col}, {repeated}, {mods})
|
||||
none add a mouse event to the input buffer
|
||||
test_ignore_error({expr}) none ignore a specific error
|
||||
test_null_blob() Blob null value for testing
|
||||
test_null_channel() Channel null value for testing
|
||||
@ -4853,6 +4873,8 @@ foldclosed({lnum}) *foldclosed()*
|
||||
The result is a Number. If the line {lnum} is in a closed
|
||||
fold, the result is the number of the first line in that fold.
|
||||
If the line {lnum} is not in a closed fold, -1 is returned.
|
||||
{lnum} is used like with |getline()|. Thus "." is the current
|
||||
line, "'m" mark m, etc.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->foldclosed()
|
||||
@ -4861,6 +4883,8 @@ foldclosedend({lnum}) *foldclosedend()*
|
||||
The result is a Number. If the line {lnum} is in a closed
|
||||
fold, the result is the number of the last line in that fold.
|
||||
If the line {lnum} is not in a closed fold, -1 is returned.
|
||||
{lnum} is used like with |getline()|. Thus "." is the current
|
||||
line, "'m" mark m, etc.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->foldclosedend()
|
||||
@ -4874,6 +4898,8 @@ foldlevel({lnum}) *foldlevel()*
|
||||
returned for lines where folds are still to be updated and the
|
||||
foldlevel is unknown. As a special case the level of the
|
||||
previous line is usually available.
|
||||
{lnum} is used like with |getline()|. Thus "." is the current
|
||||
line, "'m" mark m, etc.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetLnum()->foldlevel()
|
||||
@ -4946,7 +4972,7 @@ funcref({name} [, {arglist}] [, {dict}])
|
||||
Can also be used as a |method|: >
|
||||
GetFuncname()->funcref([arg])
|
||||
<
|
||||
*function()* *E700* *E922* *E923*
|
||||
*function()* *partial* *E700* *E922* *E923*
|
||||
function({name} [, {arglist}] [, {dict}])
|
||||
Return a |Funcref| variable that refers to function {name}.
|
||||
{name} can be the name of a user defined function or an
|
||||
@ -5229,6 +5255,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
|
||||
@ -5354,6 +5381,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
|
||||
@ -5480,8 +5521,8 @@ getcurpos([{winid}])
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->getcurpos()
|
||||
|
||||
< *getcursorcharpos()*
|
||||
<
|
||||
*getcursorcharpos()*
|
||||
getcursorcharpos([{winid}])
|
||||
Same as |getcurpos()| but the column number in the returned
|
||||
List is a character index instead of a byte index.
|
||||
@ -5490,8 +5531,8 @@ getcursorcharpos([{winid}])
|
||||
With the cursor on '보' in line 3 with text "여보세요": >
|
||||
getcursorcharpos() returns [0, 3, 2, 0, 3]
|
||||
getcurpos() returns [0, 3, 4, 0, 3]
|
||||
|
||||
< Can also be used as a |method|: >
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->getcursorcharpos()
|
||||
|
||||
< *getcwd()*
|
||||
@ -5716,11 +5757,11 @@ getmarklist([{expr}]) *getmarklist()*
|
||||
see |bufname()|.
|
||||
|
||||
Each item in the returned List is a |Dict| with the following:
|
||||
name - name of the mark prefixed by "'"
|
||||
pos - a |List| with the position of the mark:
|
||||
mark name of the mark prefixed by "'"
|
||||
pos a |List| with the position of the mark:
|
||||
[bufnum, lnum, col, off]
|
||||
Refer to |getpos()| for more information.
|
||||
file - file name
|
||||
Refer to |getpos()| for more information.
|
||||
file file name
|
||||
|
||||
Refer to |getpos()| for getting information about a specific
|
||||
mark.
|
||||
@ -5734,6 +5775,8 @@ getmatches([{win}]) *getmatches()*
|
||||
|getmatches()| is useful in combination with |setmatches()|,
|
||||
as |setmatches()| can restore a list of matches saved by
|
||||
|getmatches()|.
|
||||
If {win} is specified, use the window with this number or
|
||||
window ID instead of the current window.
|
||||
Example: >
|
||||
:echo getmatches()
|
||||
< [{'group': 'MyGroup1', 'pattern': 'TODO',
|
||||
@ -5771,11 +5814,10 @@ getmousepos() *getmousepos()*
|
||||
are zero.
|
||||
|
||||
When the position is after the text then "column" is the
|
||||
length of the text in bytes.
|
||||
length of the text in bytes plus one.
|
||||
|
||||
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.
|
||||
|
||||
@ -5803,7 +5845,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
|
||||
'> is a large number.
|
||||
The column number in the returned List is the byte position
|
||||
within the line. To get the character position in the line,
|
||||
use |getcharpos()|
|
||||
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: >
|
||||
@ -5822,7 +5864,10 @@ getqflist([{what}]) *getqflist()*
|
||||
bufname() to get the name
|
||||
module module name
|
||||
lnum line number in the buffer (first line is 1)
|
||||
end_lnum
|
||||
end of line number if the item is multiline
|
||||
col column number (first column is 1)
|
||||
end_col end of column number if the item has range
|
||||
vcol |TRUE|: "col" is visual column
|
||||
|FALSE|: "col" is byte index
|
||||
nr error number
|
||||
@ -5832,8 +5877,10 @@ getqflist([{what}]) *getqflist()*
|
||||
valid |TRUE|: recognized error message
|
||||
|
||||
When there is no error list or it's empty, an empty list is
|
||||
returned. Quickfix list entries with non-existing buffer
|
||||
number are returned with "bufnr" set to zero.
|
||||
returned. Quickfix list entries with a non-existing buffer
|
||||
number are returned with "bufnr" set to zero (Note: some
|
||||
functions accept buffer number zero for the alternate buffer,
|
||||
you may need to explicitly check for zero).
|
||||
|
||||
Useful application: Find pattern matches in multiple files and
|
||||
do something with them: >
|
||||
@ -5977,12 +6024,12 @@ getregtype([{regname}]) *getregtype()*
|
||||
Can also be used as a |method|: >
|
||||
GetRegname()->getregtype()
|
||||
|
||||
gettabinfo([{arg}]) *gettabinfo()*
|
||||
If {arg} is not specified, then information about all the tab
|
||||
pages is returned as a |List|. Each List item is a |Dictionary|.
|
||||
Otherwise, {arg} specifies the tab page number and information
|
||||
about that one is returned. If the tab page does not exist an
|
||||
empty List is returned.
|
||||
gettabinfo([{tabnr}]) *gettabinfo()*
|
||||
If {tabnr} is not specified, then information about all the
|
||||
tab pages is returned as a |List|. Each List item is a
|
||||
|Dictionary|. Otherwise, {tabnr} specifies the tab page
|
||||
number and information about that one is returned. If the tab
|
||||
page does not exist an empty List is returned.
|
||||
|
||||
Each List item is a |Dictionary| with the following entries:
|
||||
tabnr tab page number.
|
||||
@ -6035,11 +6082,11 @@ gettabwinvar({tabnr}, {winnr}, {varname} [, {def}]) *gettabwinvar()*
|
||||
< Can also be used as a |method|: >
|
||||
GetTabnr()->gettabwinvar(winnr, varname)
|
||||
|
||||
gettagstack([{nr}]) *gettagstack()*
|
||||
The result is a Dict, which is the tag stack of window {nr}.
|
||||
{nr} can be the window number or the |window-ID|.
|
||||
When {nr} is not specified, the current window is used.
|
||||
When window {nr} doesn't exist, an empty Dict is returned.
|
||||
gettagstack([{winnr}]) *gettagstack()*
|
||||
The result is a Dict, which is the tag stack of window {winnr}.
|
||||
{winnr} can be the window number or the |window-ID|.
|
||||
When {winnr} is not specified, the current window is used.
|
||||
When window {winnr} doesn't exist, an empty Dict is returned.
|
||||
|
||||
The returned dictionary contains the following entries:
|
||||
curidx Current index in the stack. When at
|
||||
@ -6721,6 +6768,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()
|
||||
@ -7588,6 +7636,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"]. >
|
||||
@ -7614,7 +7665,7 @@ matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
|
||||
Same as |matchfuzzy()|, but returns the list of matched
|
||||
strings, the list of character positions where characters
|
||||
in {str} matches and a list of matching scores. You can
|
||||
use |byteidx()|to convert a character position to a byte
|
||||
use |byteidx()| to convert a character position to a byte
|
||||
position.
|
||||
|
||||
If {str} matches multiple times in a string, then only the
|
||||
@ -8179,6 +8230,8 @@ prompt_getprompt({buf}) *prompt_getprompt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_getprompt()
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
|
||||
prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
|
||||
Set prompt callback for buffer {buf} to {expr}. When {expr}
|
||||
@ -8212,6 +8265,7 @@ prompt_setcallback({buf}, {expr}) *prompt_setcallback()*
|
||||
< Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setcallback(callback)
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
|
||||
Set a callback for buffer {buf} to {expr}. When {expr} is an
|
||||
@ -8225,6 +8279,8 @@ prompt_setinterrupt({buf}, {expr}) *prompt_setinterrupt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setinterrupt(callback)
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
prompt_setprompt({buf}, {text}) *prompt_setprompt()*
|
||||
Set prompt for buffer {buf} to {text}. You most likely want
|
||||
{text} to end in a space.
|
||||
@ -8235,6 +8291,8 @@ prompt_setprompt({buf}, {text}) *prompt_setprompt()*
|
||||
Can also be used as a |method|: >
|
||||
GetBuffer()->prompt_setprompt('command: ')
|
||||
|
||||
< {only available when compiled with the |+channel| feature}
|
||||
|
||||
prop_ functions are documented here: |text-prop-functions|
|
||||
|
||||
pum_getpos() *pum_getpos()*
|
||||
@ -8874,6 +8932,10 @@ screenpos({winid}, {lnum}, {col}) *screenpos()*
|
||||
The "curscol" value is where the cursor would be placed. For
|
||||
a Tab it would be the same as "endcol", while for a double
|
||||
width character it would be the same as "col".
|
||||
The |conceal| feature is ignored here, the column numbers are
|
||||
as if 'conceallevel' is zero. You can set the cursor to the
|
||||
right position and use |screencol()| to get the value with
|
||||
|conceal| taken into account.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWinid()->screenpos(lnum, col)
|
||||
@ -9185,6 +9247,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()|.
|
||||
|
||||
@ -9836,6 +9900,10 @@ sha256({string}) *sha256()*
|
||||
|
||||
shellescape({string} [, {special}]) *shellescape()*
|
||||
Escape {string} for use as a shell command argument.
|
||||
When the 'shell' contains powershell (MS-Windows) or pwsh
|
||||
(MS-Windows, Linux, and MacOS) then it will enclose {string}
|
||||
in single quotes and will double up all internal single
|
||||
quotes.
|
||||
On MS-Windows, when 'shellslash' is not set, it will enclose
|
||||
{string} in double quotes and double all double quotes within
|
||||
{string}.
|
||||
@ -9936,7 +10004,7 @@ sinh({expr}) *sinh()*
|
||||
{only available when compiled with the |+float| feature}
|
||||
|
||||
|
||||
slice({expr}, {start} [, {end}]) *slice()*
|
||||
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
|
||||
@ -10998,7 +11066,8 @@ tempname() *tempname()* *temp-file-name*
|
||||
:exe "redir > " . tmpfile
|
||||
< For Unix, the file will be in a private directory |tempfile|.
|
||||
For MS-Windows forward slashes are used when the 'shellslash'
|
||||
option is set or when 'shellcmdflag' starts with '-'.
|
||||
option is set, or when 'shellcmdflag' starts with '-' and
|
||||
'shell' does not contain powershell or pwsh.
|
||||
|
||||
|
||||
term_ functions are documented here: |terminal-function-details|
|
||||
@ -11838,6 +11907,7 @@ diff Compiled with |vimdiff| and 'diff' support.
|
||||
digraphs Compiled with support for digraphs.
|
||||
directx Compiled with support for DirectX and 'renderoptions'.
|
||||
dnd Compiled with support for the "~ register |quote_~|.
|
||||
drop_file Compiled with |drop_file| support.
|
||||
ebcdic Compiled on a machine with ebcdic character set.
|
||||
emacs_tags Compiled with support for Emacs tags.
|
||||
eval Compiled with expression evaluation support. Always
|
||||
@ -11943,6 +12013,7 @@ scrollbind Compiled with 'scrollbind' support. (always true)
|
||||
showcmd Compiled with 'showcmd' support.
|
||||
signs Compiled with |:sign| support.
|
||||
smartindent Compiled with 'smartindent' support.
|
||||
sodium Compiled with libsodium for better crypt support
|
||||
sound Compiled with sound support, e.g. `sound_playevent()`
|
||||
spell Compiled with spell checking support |spell|.
|
||||
startuptime Compiled with |--startuptime| support.
|
||||
|
@ -632,7 +632,7 @@ For fish, add to the config file
|
||||
MARKDOWN *ft-markdown-plugin*
|
||||
|
||||
To enable folding use this: >
|
||||
let g:markdown_folding = 1
|
||||
let g:markdown_folding = 1
|
||||
<
|
||||
|
||||
PDF *ft-pdf-plugin*
|
||||
|
@ -1,4 +1,4 @@
|
||||
*ps1.txt* A Windows PowerShell syntax plugin for Vim
|
||||
*ft_ps1.txt* A Windows PowerShell syntax plugin for Vim
|
||||
|
||||
Author: Peter Provost <https://www.github.com/PProvost>
|
||||
License: Apache 2.0
|
||||
|
126
runtime/doc/ft_raku.txt
Normal file
126
runtime/doc/ft_raku.txt
Normal file
@ -0,0 +1,126 @@
|
||||
*ft_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 Jun 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -411,7 +411,8 @@ Mouse mapping with modifiers does not work for modeless selection.
|
||||
3.7 Drag and drop *drag-n-drop*
|
||||
|
||||
You can drag and drop one or more files into the Vim window, where they will
|
||||
be opened as if a |:drop| command was used.
|
||||
be opened as if a |:drop| command was used. You can check if this is
|
||||
supported with the *drop_file* feature: `has('drop_file')`.
|
||||
|
||||
If you hold down Shift while doing this, Vim changes to the first dropped
|
||||
file's directory. If you hold Ctrl Vim will always split a new window for the
|
||||
@ -620,6 +621,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).
|
||||
|
||||
|
@ -132,7 +132,7 @@ Advanced editing ~
|
||||
|windows.txt| commands for using multiple windows and buffers
|
||||
|tabpage.txt| commands for using multiple tab pages
|
||||
|spell.txt| spell checking
|
||||
|diff.txt| working with two to four versions of the same file
|
||||
|diff.txt| working with two to eight versions of the same file
|
||||
|autocmd.txt| automatically executing commands on an event
|
||||
|eval.txt| expression evaluation, conditional commands
|
||||
|channel.txt| Jobs, Channels, inter-process communication
|
||||
@ -145,6 +145,7 @@ Special issues ~
|
||||
|term.txt| using different terminals and mice
|
||||
|terminal.txt| Terminal window support
|
||||
|popup.txt| popup window support
|
||||
|vim9.txt| using Vim9 script
|
||||
|
||||
Programming language support ~
|
||||
|indent.txt| automatic indenting for C and other languages
|
||||
@ -153,6 +154,8 @@ Programming language support ~
|
||||
|filetype.txt| settings done specifically for a type of file
|
||||
|quickfix.txt| commands for a quick edit-compile-fix cycle
|
||||
|ft_ada.txt| Ada (the programming language) support
|
||||
|ft_ps1.txt| Filetype plugin for Windows PowerShell
|
||||
|ft_raku.txt| Filetype plugin for Raku
|
||||
|ft_rust.txt| Filetype plugin for Rust
|
||||
|ft_sql.txt| about the SQL filetype plugin
|
||||
|
||||
|
@ -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}.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Mar 22
|
||||
*index.txt* For Vim version 8.2. Last change: 2021 Jun 19
|
||||
|
||||
|
||||
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"
|
||||
@ -1309,6 +1312,7 @@ tag command action ~
|
||||
|:endtry| :endt[ry] end previous :try
|
||||
|:endwhile| :endw[hile] end previous :while
|
||||
|:enew| :ene[w] edit a new, unnamed buffer
|
||||
|:eval| :ev[al] evaluate an expression and discard the result
|
||||
|:ex| :ex same as ":edit"
|
||||
|:execute| :exe[cute] execute result of expressions
|
||||
|:exit| :exi[t] same as ":xit"
|
||||
@ -1396,6 +1400,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
|
||||
@ -1656,9 +1661,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
|
||||
|
@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 8.2. Last change: 2020 Oct 16
|
||||
*insert.txt* For Vim version 8.2. Last change: 2021 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1073,7 +1073,8 @@ On the second invocation the arguments are:
|
||||
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List.
|
||||
List. Note that the cursor may have moved since the first invocation, the
|
||||
text may have been changed.
|
||||
|
||||
In order to return more information than the matching words, return a Dict
|
||||
that contains the List. The Dict can have these items:
|
||||
|
@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 8.2. Last change: 2021 Mar 17
|
||||
*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,7 @@ 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: >
|
||||
@ -386,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 @@
|
||||
*motion.txt* For Vim version 8.2. Last change: 2021 Mar 28
|
||||
*motion.txt* For Vim version 8.2. Last change: 2021 Jun 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -59,9 +59,14 @@ or change text. The following operators are available:
|
||||
|<| < shift left
|
||||
|zf| zf define a fold
|
||||
|g@| g@ call function set with the 'operatorfunc' option
|
||||
|
||||
*motion-count-multiplied*
|
||||
If the motion includes a count and the operator also had a count before it,
|
||||
the two counts are multiplied. For example: "2d3w" deletes six words.
|
||||
*operator-doubled*
|
||||
When doubling the operator it operates on a line. When using a count, before
|
||||
or after the first character, that many lines are operated upon. Thus `3dd`
|
||||
deletes three lines. A count before and after the first character is
|
||||
multiplied, thus `2y3y` yanks six lines.
|
||||
|
||||
After applying the operator the cursor is mostly left at the start of the text
|
||||
that was operated upon. For example, "yfe" doesn't move the cursor, but "yFe"
|
||||
@ -195,9 +200,9 @@ l or *l*
|
||||
*$* *<End>* *<kEnd>*
|
||||
$ or <End> To the end of the line. When a count is given also go
|
||||
[count - 1] lines downward, or as far is possible.
|
||||
|inclusive| motion. If a count of 2 of larger is
|
||||
|inclusive| motion. If a count of 2 or larger is
|
||||
given and the cursor is on the last line, that is an
|
||||
error an the cursor doesn't move.
|
||||
error and the cursor doesn't move.
|
||||
In Visual mode the cursor goes to just after the last
|
||||
character in the line.
|
||||
When 'virtualedit' is active, "$" may move the cursor
|
||||
|
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Apr 07
|
||||
*options.txt* For Vim version 8.2. Last change: 2021 Jun 20
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2384,6 +2384,23 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
you write the file the encrypted bytes will be
|
||||
different. The whole undo file is encrypted, not just
|
||||
the pieces of text.
|
||||
*E1193* *E1194* *E1195* *E1196*
|
||||
*E1197* *E1198* *E1199* *E1200* *E1201*
|
||||
xchacha20 XChaCha20 Cipher with Poly1305 Message Authentication
|
||||
Code. Medium strong till strong encryption.
|
||||
Encryption is provided by the libsodium library, it
|
||||
requires Vim to be built with |+sodium|
|
||||
It adds a seed and a message authentication code (MAC)
|
||||
to the file. This needs at least a Vim 8.2.3022 to
|
||||
read the encrypted file.
|
||||
Encryption of swap files is not supported, therefore
|
||||
no swap file will be used when xchacha20 encryption is
|
||||
enabled.
|
||||
Encryption of undo files is not yet supported,
|
||||
therefore no undo file will currently be written.
|
||||
CURRENTLY EXPERIMENTAL: Files written with this method
|
||||
might have to be read back with the same version of
|
||||
Vim if the binary format changes later.
|
||||
|
||||
You should use "blowfish2", also to re-encrypt older files.
|
||||
|
||||
@ -2828,7 +2845,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
|
||||
@ -3115,9 +3133,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.
|
||||
@ -4564,7 +4583,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
|
||||
@ -5592,19 +5612,21 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
- abbreviations are disabled
|
||||
- 'autoindent' is reset
|
||||
- 'expandtab' is reset
|
||||
- 'formatoptions' is used like it is empty
|
||||
- 'hkmap' is reset
|
||||
- 'revins' is reset
|
||||
- 'ruler' is reset
|
||||
- 'showmatch' is reset
|
||||
- 'smartindent' is reset
|
||||
- 'smarttab' is reset
|
||||
- 'softtabstop' is set to 0
|
||||
- 'textwidth' is set to 0
|
||||
- 'wrapmargin' is set to 0
|
||||
- 'varsofttabstop' is made empty
|
||||
These options keep their value, but their effect is disabled:
|
||||
- 'cindent'
|
||||
- 'formatoptions' is used like it is empty
|
||||
- 'indentexpr'
|
||||
- 'lisp'
|
||||
- 'smartindent'
|
||||
NOTE: When you start editing another file while the 'paste' option is
|
||||
on, settings from the modelines or autocommands may change the
|
||||
settings again, causing trouble when pasting text. You might want to
|
||||
@ -6511,6 +6533,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
|
||||
@ -6571,23 +6594,25 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'shellcmdflag'* *'shcf'*
|
||||
'shellcmdflag' 'shcf' string (default: "-c";
|
||||
Win32, when 'shell' does not contain "sh"
|
||||
Win32, when 'shell' contains "powershell":
|
||||
"-Command", or when it does not contain "sh"
|
||||
somewhere: "/c")
|
||||
global
|
||||
Flag passed to the shell to execute "!" and ":!" commands; e.g.,
|
||||
"bash.exe -c ls" or "cmd.exe /c dir". For MS-Windows, the default is
|
||||
set according to the value of 'shell', to reduce the need to set this
|
||||
option by the user.
|
||||
"bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir".
|
||||
For MS-Windows, the default is set according to the value of 'shell',
|
||||
to reduce the need to set this option by the user.
|
||||
On Unix it can have more than one flag. Each white space separated
|
||||
part is passed as an argument to the shell command.
|
||||
See |option-backslash| about including spaces and backslashes.
|
||||
Also see |dos-shell| for MS-Windows.
|
||||
Also see |dos-shell| and |dos-powershell| for MS-Windows.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellpipe'* *'sp'*
|
||||
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee" or
|
||||
"2>&1| tee")
|
||||
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee"
|
||||
"2>&1| tee", or
|
||||
"2>&1 | Out-File -Encoding default")
|
||||
global
|
||||
{not available when compiled without the |+quickfix|
|
||||
feature}
|
||||
@ -6597,16 +6622,19 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The name of the temporary file can be represented by "%s" if necessary
|
||||
(the file name is appended automatically if no %s appears in the value
|
||||
of this option).
|
||||
For the Amiga the default is ">". For MS-Windows the default is
|
||||
">%s 2>&1". The output is directly saved in a file and not echoed to
|
||||
the screen.
|
||||
For the Amiga the default is ">". For MS-Windows using powershell the
|
||||
default is "2>&1 | Out-File -Encoding default", otherwise the default
|
||||
is ">%s 2>&1". The output is directly saved in a file and not echoed
|
||||
to the screen.
|
||||
For Unix the default is "| tee". The stdout of the compiler is saved
|
||||
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".
|
||||
For Unix and MS-Windows, when the 'shell' option is "pwsh" the default
|
||||
becomes ">%s 2>&1" and the output is not echoed to the screen.
|
||||
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
|
||||
@ -6622,8 +6650,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
security reasons.
|
||||
|
||||
*'shellquote'* *'shq'*
|
||||
'shellquote' 'shq' string (default: ""; Win32, when 'shell'
|
||||
contains "sh" somewhere: "\"")
|
||||
'shellquote' 'shq' string (default: "")
|
||||
global
|
||||
Quoting character(s), put around the command passed to the shell, for
|
||||
the "!" and ":!" commands. The redirection is kept outside of the
|
||||
@ -6631,14 +6658,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
probably not useful to set both options.
|
||||
This is an empty string by default. Only known to be useful for
|
||||
third-party shells on MS-Windows-like systems, such as the MKS Korn
|
||||
Shell or bash, where it should be "\"". The default is adjusted
|
||||
according the value of 'shell', to reduce the need to set this option
|
||||
by the user. See |dos-shell|.
|
||||
Shell or bash, where it should be "\"". See |dos-shell|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'shellredir'* *'srr'*
|
||||
'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1")
|
||||
'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or
|
||||
"2>&1 | Out-File -Encoding default")
|
||||
global
|
||||
String to be used to put the output of a filter command in a temporary
|
||||
file. See also |:!|. See |option-backslash| about including spaces
|
||||
@ -6649,10 +6675,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The default is ">". For Unix, if the 'shell' option is "csh" or
|
||||
"tcsh" during initializations, the default becomes ">&". If the
|
||||
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
|
||||
"bash" or "fish", the default becomes ">%s 2>&1". This means that
|
||||
stderr is also included. For Win32, the Unix checks are done and
|
||||
additionally "cmd" is checked for, which makes the default ">%s 2>&1".
|
||||
Also, the same names with ".exe" appended are checked for.
|
||||
"bash", "fish", or "pwsh", the default becomes ">%s 2>&1". This means
|
||||
that stderr is also included. For Win32, the Unix checks are done and
|
||||
additionally "cmd" is checked for, which makes the default ">%s 2>&1",
|
||||
and "powershell" is checked for which makes the default
|
||||
"2>&1 | Out-File -Encoding default" (see |dos-powershell|). Also, the
|
||||
same names with ".exe" appended are checked for.
|
||||
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 'shellredir' option changes automatically unless it was
|
||||
@ -6667,9 +6695,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
global
|
||||
{only for MS-Windows}
|
||||
When set, a forward slash is used when expanding file names. This is
|
||||
useful when a Unix-like shell is used instead of cmd.exe. Backward
|
||||
slashes can still be typed, but they are changed to forward slashes by
|
||||
Vim.
|
||||
useful when a Unix-like shell is used instead of cmd.exe, pwsh.exe, or
|
||||
powershell.exe. Backward slashes can still be typed, but they are
|
||||
changed to forward slashes by Vim.
|
||||
Note that setting or resetting this option has no effect for some
|
||||
existing file names, thus this option needs to be set before opening
|
||||
any file for best results. This might change in the future.
|
||||
@ -6723,6 +6751,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'shellxquote'* *'sxq'*
|
||||
'shellxquote' 'sxq' string (default: "";
|
||||
for Win32, when 'shell' is cmd.exe: "("
|
||||
for Win32, when 'shell' is
|
||||
powershell.exe: "\""
|
||||
for Win32, when 'shell' contains "sh"
|
||||
somewhere: "\""
|
||||
for Unix, when using system(): "\"")
|
||||
@ -6735,11 +6765,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
then ')"' is appended.
|
||||
When the value is '(' then also see 'shellxescape'.
|
||||
This is an empty string by default on most systems, but is known to be
|
||||
useful for on Win32 version, either for cmd.exe which automatically
|
||||
strips off the first and last quote on a command, or 3rd-party shells
|
||||
such as the MKS Korn Shell or bash, where it should be "\"". The
|
||||
default is adjusted according the value of 'shell', to reduce the need
|
||||
to set this option by the user. See |dos-shell|.
|
||||
useful for on Win32 version, either for cmd.exe, powershell.exe, or
|
||||
pwsh.exe which automatically strips off the first and last quote on a
|
||||
command, or 3rd-party shells such as the MKS Korn Shell or bash, where
|
||||
it should be "\"". The default is adjusted according the value of
|
||||
'shell', to reduce the need to set this option by the user. See
|
||||
|dos-shell|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
@ -7337,6 +7368,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.
|
||||
@ -7480,6 +7523,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).
|
||||
|
@ -17,6 +17,7 @@ versions of Vim. Also see |os_win32.txt| and |os_msdos.txt|.
|
||||
7. Interrupting |dos-CTRL-Break|
|
||||
8. Temp files |dos-temp-files|
|
||||
9. Shell option default |dos-shell|
|
||||
10. PowerShell |dos-powershell|
|
||||
|
||||
==============================================================================
|
||||
1. File locations *dos-locations*
|
||||
@ -297,8 +298,86 @@ For Win32 as:
|
||||
<shell> -c "command name >file"
|
||||
For DOS 32 bit, DJGPP does this internally somehow.
|
||||
|
||||
When starting up, Vim checks for the presence of "sh" anywhere in the 'shell'
|
||||
option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or
|
||||
'shellxquote' options will be set as described above.
|
||||
When starting up, if Vim does not recognise a standard Windows shell it checks
|
||||
for the presence of "sh" anywhere in the 'shell' option. If it is present,
|
||||
Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be
|
||||
set as described above.
|
||||
|
||||
==============================================================================
|
||||
10. PowerShell *dos-powershell* *dos-pwsh*
|
||||
|
||||
Vim supports PowerShell Desktop and PowerShell Core. PowerShell Desktop is
|
||||
the version of PowerShell that is installed with Windows, while PowerShell
|
||||
Core is a separate downloadable version that works cross-platform. To see
|
||||
which version you are using then enter the following in a PowerShell prompt -
|
||||
$PSVersionTable.PSEdition
|
||||
|
||||
If 'shell' includes "powershell" in the filename at startup then VIM sets
|
||||
'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
|
||||
following values:
|
||||
|
||||
'shellcmdflag' -Command
|
||||
'shellxquote' "
|
||||
'shellpipe' 2>&1 | Out-File -Encoding default
|
||||
'shellredir' 2>&1 | Out-File -Encoding default
|
||||
|
||||
If 'shell' includes "pwsh" in the filename at startup then VIM sets
|
||||
'shellcmdflag', 'shellxquote', 'shellpipe', and 'shellredir' options to the
|
||||
following values:
|
||||
|
||||
'shellcmdflag' -c
|
||||
'shellxquote' "
|
||||
'shellpipe' >%s 2>&1
|
||||
'shellredir' >%s 2>&1
|
||||
|
||||
If you find that PowerShell commands are taking a long time to run then try
|
||||
with "-NoProfile" at the beginning of the 'shellcmdflag'. Note this will
|
||||
prevent any PowerShell environment setup by the profile from taking place.
|
||||
|
||||
If you have problems running PowerShell scripts through the 'shell' then try
|
||||
with "-ExecutionPolicy RemoteSigned -Command" at the beginning of
|
||||
'shellcmdflag'. See online Windows documentation for more information on
|
||||
PowerShell Execution Policy settings.
|
||||
|
||||
See |option-backslash| about including spaces in 'shellcmdflag' when using
|
||||
multiple flags.
|
||||
|
||||
The 'shellpipe' and 'shellredir' option values re-encode the UTF-16le output
|
||||
from PowerShell Desktop to your currently configured console codepage. The
|
||||
output can be forced into a different encoding by changing "default" to one of
|
||||
the following:
|
||||
|
||||
unicode - UTF-16le (default output from PowerShell 5.1)
|
||||
bigendianunicode - UTF-16
|
||||
utf8 - UTF-8
|
||||
utf7 - UTF-7 (no BOM)
|
||||
utf32 - UTF-32
|
||||
ascii - 7-bit ASCII character set
|
||||
default - System's active code page (typically ANSI)
|
||||
oem - System's current OEM code page
|
||||
|
||||
Note The abovce multi-byte Unicode encodings include a leading BOM unless
|
||||
otherwise indicated.
|
||||
|
||||
By default PowerShell Core's output is UTF-8 encoded without a BOM. If you
|
||||
want to force the output of PowerShell Core into a different encoding then set
|
||||
'shellredir' and 'shellpipe' to "2>&1 | Out-File -Encoding encoding" where
|
||||
encoding is one of the following:
|
||||
|
||||
ascii - 7-bit ASCII character set
|
||||
bigendianunicode - UTF-16be
|
||||
bigendianutf32 - UTF-32be
|
||||
oem - System's current OEM code page
|
||||
unicode - UTF-16le
|
||||
utf7 - UTF-7
|
||||
utf8 - UTF-8
|
||||
utf8BOM - UTF-8, with BOM
|
||||
utf8NoBOM - UTF-8, no BOM (default output from PowerShell Core)
|
||||
utf32 - UTF-32
|
||||
|
||||
Since PowerShell Core 6.2, the Encoding parameter also supports specifying a
|
||||
numeric ID of a registered code page (-Encoding 1251) or string names of
|
||||
registered code pages (-Encoding "windows-1251"). The .NET documentation for
|
||||
Encoding.CodePage has more information
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
@ -767,12 +767,12 @@ GNU_TOOLS.ZIP package downloadable from http://www.polarhome.com/vim/
|
||||
|
||||
Version 8.2
|
||||
- make all changes needed for clean compile build of v8.2 on VMS on all platforms
|
||||
- fix the call mkdir bug (vicente_polo@yahoo.es)
|
||||
- fix the call mkdir bug (vicente_polo@yahoo.es)
|
||||
- test on VSI OpenVMS Alpha and Itanium platforms
|
||||
- added LUA support
|
||||
- added XPM support - Motif GUI with toolbar on all platforms
|
||||
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
|
||||
- start integrating the new test scripts
|
||||
- XPM v3.4.11 libraries for IA64, AXP and VAX are added
|
||||
- start integrating the new test scripts
|
||||
|
||||
Version 8.1
|
||||
- make necessary changes to build v8.1 on VMS
|
||||
|
@ -30,6 +30,7 @@ File formats |dos-file-formats|
|
||||
Interrupting |dos-CTRL-Break|
|
||||
Temp files |dos-temp-files|
|
||||
Shell option default |dos-shell|
|
||||
PowerShell defaults |dos-powershell|
|
||||
|
||||
Win32 GUI |gui-w32|
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 8.2. Last change: 2021 Feb 16
|
||||
*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*
|
||||
@ -928,13 +929,20 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
\%23l Matches in a specific line.
|
||||
\%<23l Matches above a specific line (lower line number).
|
||||
\%>23l Matches below a specific line (higher line number).
|
||||
\%.l Matches at the cursor line.
|
||||
\%<.l Matches above the cursor line.
|
||||
\%>.l Matches below the cursor line.
|
||||
These three can be used to match specific lines in a buffer. The "23"
|
||||
can be any line number. The first line is 1.
|
||||
WARNING: When inserting or deleting lines Vim does not automatically
|
||||
update the matches. This means Syntax highlighting quickly becomes
|
||||
wrong.
|
||||
wrong. Also when refering to the cursor position (".") and
|
||||
the cursor moves the display isn't updated for this change. An update
|
||||
is done when using the |CTRL-L| command (the whole screen is updated).
|
||||
Example, to highlight the line where the cursor currently is: >
|
||||
:exe '/\%' . line(".") . 'l.*'
|
||||
:exe '/\%' . line(".") . 'l'
|
||||
< Alternatively use: >
|
||||
/\%.l
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
|
||||
@ -942,15 +950,23 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
\%23c Matches in a specific column.
|
||||
\%<23c Matches before a specific column.
|
||||
\%>23c Matches after a specific column.
|
||||
\%.c Matches at the cursor column.
|
||||
\%<.c Matches before the cursor column.
|
||||
\%>.c Matches after the cursor column.
|
||||
These three can be used to match specific columns in a buffer or
|
||||
string. The "23" can be any column number. The first column is 1.
|
||||
Actually, the column is the byte number (thus it's not exactly right
|
||||
for multibyte characters).
|
||||
WARNING: When inserting or deleting text Vim does not automatically
|
||||
update the matches. This means Syntax highlighting quickly becomes
|
||||
wrong.
|
||||
wrong. Also when refering to the cursor position (".") and
|
||||
the cursor moves the display isn't updated for this change. An update
|
||||
is done when using the |CTRL-L| command (the whole screen is updated).
|
||||
|
||||
Example, to highlight the column where the cursor currently is: >
|
||||
:exe '/\%' . col(".") . 'c'
|
||||
< Alternatively use: >
|
||||
/\%.c
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
Example for matching a single byte in column 44: >
|
||||
@ -961,6 +977,9 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
\%23v Matches in a specific virtual column.
|
||||
\%<23v Matches before a specific virtual column.
|
||||
\%>23v Matches after a specific virtual column.
|
||||
\%.v Matches at the current virtual column.
|
||||
\%<.v Matches before the current virtual column.
|
||||
\%>.v Matches after the current virtual column.
|
||||
These three can be used to match specific virtual columns in a buffer
|
||||
or string. When not matching with a buffer in a window, the option
|
||||
values of the current window are used (e.g., 'tabstop').
|
||||
@ -970,13 +989,18 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
one screen character.
|
||||
WARNING: When inserting or deleting text Vim does not automatically
|
||||
update highlighted matches. This means Syntax highlighting quickly
|
||||
becomes wrong.
|
||||
becomes wrong. Also when refering to the cursor position (".") and
|
||||
the cursor moves the display isn't updated for this change. An update
|
||||
is done when using the |CTRL-L| command (the whole screen is updated).
|
||||
Example, to highlight all the characters after virtual column 72: >
|
||||
/\%>72v.*
|
||||
< When 'hlsearch' is set and you move the cursor around and make changes
|
||||
this will clearly show when the match is updated or not.
|
||||
To match the text up to column 17: >
|
||||
/^.*\%17v
|
||||
< To match all characters after the current virtual column (where the
|
||||
cursor is): >
|
||||
/\%>.v.*
|
||||
< Column 17 is not included, because this is a |/zero-width| match. To
|
||||
include the column use: >
|
||||
/^.*\%17v.
|
||||
@ -1216,7 +1240,7 @@ x A single character, with no special meaning, matches itself
|
||||
|
||||
\%d123 Matches the character specified with a decimal number. Must be
|
||||
followed by a non-digit.
|
||||
\%o40 Matches the character specified with an octal number up to 0377.
|
||||
\%o40 Matches the character specified with an octal number up to 0o377.
|
||||
Numbers below 0o40 must be followed by a non-octal digit or a
|
||||
non-digit.
|
||||
\%x2a Matches the character specified with up to two hexadecimal characters.
|
||||
@ -1431,5 +1455,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:
|
||||
|
@ -3809,7 +3809,7 @@ netrw:
|
||||
Decho.vim is provided as a "vimball"; see |vimball-intro|. You
|
||||
should edit the Decho.vba.gz file and source it in: >
|
||||
|
||||
vim Decho.vba.gz
|
||||
vim Decho.vba.gz
|
||||
:so %
|
||||
:q
|
||||
<
|
||||
|
@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 8.2. Last change: 2021 Feb 05
|
||||
*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
|
||||
@ -1026,6 +1024,22 @@ commands can be combined to create a NewGrep command: >
|
||||
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
|
||||
@ -1038,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: >
|
||||
@ -1059,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
|
||||
@ -1377,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 @@
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Feb 13
|
||||
*repeat.txt* For Vim version 8.2. Last change: 2021 Jun 27
|
||||
|
||||
|
||||
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).
|
||||
@ -270,7 +279,9 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
ftdetect scripts are loaded, only the matching
|
||||
directories are added to 'runtimepath'. This is
|
||||
useful in your .vimrc. The plugins will then be
|
||||
loaded during initialization, see |load-plugins|.
|
||||
loaded during initialization, see |load-plugins| (note
|
||||
that the loading order will be reversed, because each
|
||||
directory is inserted before others).
|
||||
Note that for ftdetect scripts to be loaded
|
||||
you will need to write `filetype plugin indent on`
|
||||
AFTER all `packadd!` commands.
|
||||
@ -363,7 +374,7 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|.
|
||||
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
|
||||
first sourced. The number is used for the script ID
|
||||
@ -833,6 +844,16 @@ About the additional commands in debug mode:
|
||||
is reset (because it's not clear what you want to repeat).
|
||||
- When you want to use the Ex command with the same name, prepend a colon:
|
||||
":cont", ":next", ":finish" (or shorter).
|
||||
*vim9-debug*
|
||||
When debugging a compiled :def function, "step" will stop before every
|
||||
executed line, not every single instruction. Thus it works mostly like a not
|
||||
compiled function. Access to local variables is limited you can use: >
|
||||
echo varname
|
||||
But not much else.
|
||||
When executing a command that is not a specific bytecode instruction but
|
||||
executed like a normal Ex command, "step" will stop once in the compiled
|
||||
context, where local variables can be inspected, and once just before
|
||||
executing the command.
|
||||
|
||||
The backtrace shows the hierarchy of function calls, e.g.:
|
||||
>bt ~
|
||||
|
@ -1,4 +1,4 @@
|
||||
*rileft.txt* For Vim version 8.2. Last change: 2019 May 05
|
||||
*rileft.txt* For Vim version 8.2. Last change: 2021 Jun 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Avner Lottem
|
||||
@ -75,7 +75,7 @@ o Invocations
|
||||
|
||||
o Typing backwards *ins-reverse*
|
||||
----------------
|
||||
In lieu of using full-fledged the 'rightleft' option, one can opt for
|
||||
In lieu of using the full-fledged 'rightleft' option, one can opt for
|
||||
reverse insertion. When the 'revins' (reverse insert) option is set,
|
||||
inserting happens backwards. This can be used to type right-to-left
|
||||
text. When inserting characters the cursor is not moved and the text
|
||||
|
@ -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 @@
|
||||
*sponsor.txt* For Vim version 8.2. Last change: 2008 Jun 21
|
||||
*sponsor.txt* For Vim version 8.2. Last change: 2021 Jul 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -11,9 +11,8 @@ Fixing bugs and adding new features takes a lot of time and effort. To show
|
||||
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 |uganda|. But at the same time donations increase Bram's
|
||||
motivation to keep working on Vim!
|
||||
Since Bram does not need the money it will be used to help children in Uganda,
|
||||
see |uganda|. Donations increase Bram's motivation to keep working on Vim!
|
||||
|
||||
For the most recent information about sponsoring look on the Vim web site:
|
||||
|
||||
@ -74,19 +73,6 @@ Other methods See |iccf-donations|.
|
||||
amount you transferred if you want to vote for features and
|
||||
show others you are a registered Vim user or sponsor.
|
||||
|
||||
Cash Small amounts can be sent with ordinary mail. Put something
|
||||
around the money, so that it's not noticeable from the
|
||||
outside. Mention your e-mail address if you want to vote for
|
||||
features and show others you are a registered Vim user or
|
||||
sponsor.
|
||||
|
||||
You can use this permanent address:
|
||||
Bram Moolenaar
|
||||
Finsterruetihof 1
|
||||
8134 Adliswil
|
||||
Switzerland
|
||||
|
||||
|
||||
|
||||
QUESTIONS AND ANSWERS *sponsor-faq* *register-faq*
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 8.2. Last change: 2021 Feb 10
|
||||
*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
|
||||
@ -1592,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).
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 Apr 02
|
||||
*syntax.txt* For Vim version 8.2. Last change: 2021 Jul 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1420,11 +1420,17 @@ To select syntax highlighting file for Euphoria, as well as for
|
||||
auto-detecting the *.e and *.E file extensions as Euphoria file type,
|
||||
add the following line to your startup file: >
|
||||
|
||||
:let filetype_euphoria="euphoria3"
|
||||
:let g:filetype_euphoria = "euphoria3"
|
||||
|
||||
or
|
||||
< or >
|
||||
|
||||
:let filetype_euphoria="euphoria4"
|
||||
:let g:filetype_euphoria = "euphoria4"
|
||||
|
||||
Elixir and Euphoria share the *.ex file extension. If the filetype is
|
||||
specifically set as Euphoria with the g:filetype_euphoria variable, or the
|
||||
file is determined to be Euphoria based on keywords in the file, then the
|
||||
filetype will be set as Euphoria. Otherwise, the filetype will default to
|
||||
Elixir.
|
||||
|
||||
|
||||
ERLANG *erlang.vim* *ft-erlang-syntax*
|
||||
@ -1442,6 +1448,22 @@ To enable highlighting some special atoms, put this in your vimrc: >
|
||||
:let g:erlang_highlight_special_atoms = 1
|
||||
|
||||
|
||||
ELIXIR *elixir.vim* *ft-elixir-syntax*
|
||||
|
||||
Elixir is a dynamic, functional language for building scalable and maintainable
|
||||
applications.
|
||||
|
||||
The following file extensions are auto-detected as Elixir file types:
|
||||
|
||||
*.ex, *.exs, *.eex, *.leex, *.lock
|
||||
|
||||
Elixir and Euphoria share the *.ex file extension. If the filetype is
|
||||
specifically set as Euphoria with the g:filetype_euphoria variable, or the
|
||||
file is determined to be Euphoria based on keywords in the file, then the
|
||||
filetype will be set as Euphoria. Otherwise, the filetype will default to
|
||||
Elixir.
|
||||
|
||||
|
||||
FLEXWIKI *flexwiki.vim* *ft-flexwiki-syntax*
|
||||
|
||||
FlexWiki is an ASP.NET-based wiki package available at http://www.flexwiki.com
|
||||
@ -3430,8 +3452,8 @@ syntax highlighting script handles this with the following logic:
|
||||
Tex: Match Check Control~
|
||||
|
||||
Sometimes one actually wants mismatched parentheses, square braces,
|
||||
and or curly braces; for example, \text{(1,10] is a range from but
|
||||
not including 1 to and including 10}. This wish, of course, conflicts
|
||||
and or curly braces; for example, \text{(1,10]} is a range from but
|
||||
not including 1 to and including 10. This wish, of course, conflicts
|
||||
with the desire to provide delimiter mismatch detection. To
|
||||
accommodate these conflicting goals, syntax/tex.vim provides >
|
||||
g:tex_matchcheck = '[({[]'
|
||||
@ -4084,7 +4106,7 @@ match in the same position overrules an earlier one). The "transparent"
|
||||
argument makes the "myVim" match use the same highlighting as "myString". But
|
||||
it does not contain anything. If the "contains=NONE" argument would be left
|
||||
out, then "myVim" would use the contains argument from myString and allow
|
||||
"myWord" to be contained, which will be highlighted as a Constant. This
|
||||
"myWord" to be contained, which will be highlighted as a Comment. This
|
||||
happens because a contained match doesn't match inside itself in the same
|
||||
position, thus the "myVim" match doesn't overrule the "myWord" match here.
|
||||
|
||||
@ -4967,6 +4989,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 -s default-terminal "tmux-256color"
|
||||
set -as terminal-overrides ",*-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
|
||||
|
@ -1384,6 +1384,7 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
+scrollbind various.txt /*+scrollbind*
|
||||
+signs various.txt /*+signs*
|
||||
+smartindent various.txt /*+smartindent*
|
||||
+sodium various.txt /*+sodium*
|
||||
+sound various.txt /*+sound*
|
||||
+spell various.txt /*+spell*
|
||||
+startuptime various.txt /*+startuptime*
|
||||
@ -1959,7 +1960,9 @@ $VIM_POSIX vi_diff.txt /*$VIM_POSIX*
|
||||
:& change.txt /*:&*
|
||||
:&& change.txt /*:&&*
|
||||
:' cmdline.txt /*:'*
|
||||
:++ vim9.txt /*:++*
|
||||
:, cmdline.txt /*:,*
|
||||
:-- vim9.txt /*:--*
|
||||
:. cmdline.txt /*:.*
|
||||
:/ cmdline.txt /*:\/*
|
||||
:0file editing.txt /*:0file*
|
||||
@ -2630,6 +2633,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+=*
|
||||
@ -3182,7 +3187,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*
|
||||
@ -3314,7 +3320,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*
|
||||
@ -3936,6 +3942,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*
|
||||
@ -3957,9 +3964,20 @@ 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*
|
||||
E1193 options.txt /*E1193*
|
||||
E1194 options.txt /*E1194*
|
||||
E1195 options.txt /*E1195*
|
||||
E1196 options.txt /*E1196*
|
||||
E1197 options.txt /*E1197*
|
||||
E1198 options.txt /*E1198*
|
||||
E1199 options.txt /*E1199*
|
||||
E12 message.txt /*E12*
|
||||
E120 eval.txt /*E120*
|
||||
E1200 options.txt /*E1200*
|
||||
E1201 options.txt /*E1201*
|
||||
E121 eval.txt /*E121*
|
||||
E122 eval.txt /*E122*
|
||||
E123 eval.txt /*E123*
|
||||
@ -6172,6 +6190,8 @@ dos-backslash os_dos.txt /*dos-backslash*
|
||||
dos-colors os_dos.txt /*dos-colors*
|
||||
dos-file-formats os_dos.txt /*dos-file-formats*
|
||||
dos-locations os_dos.txt /*dos-locations*
|
||||
dos-powershell os_dos.txt /*dos-powershell*
|
||||
dos-pwsh os_dos.txt /*dos-pwsh*
|
||||
dos-shell os_dos.txt /*dos-shell*
|
||||
dos-standard-mappings os_dos.txt /*dos-standard-mappings*
|
||||
dos-temp-files os_dos.txt /*dos-temp-files*
|
||||
@ -6184,6 +6204,7 @@ dp diff.txt /*dp*
|
||||
drag-n-drop gui.txt /*drag-n-drop*
|
||||
drag-n-drop-win32 gui_w32.txt /*drag-n-drop-win32*
|
||||
drag-status-line term.txt /*drag-status-line*
|
||||
drop_file gui.txt /*drop_file*
|
||||
dtd.vim syntax.txt /*dtd.vim*
|
||||
dtd2vim insert.txt /*dtd2vim*
|
||||
dying-variable eval.txt /*dying-variable*
|
||||
@ -6204,6 +6225,7 @@ efm-%> quickfix.txt /*efm-%>*
|
||||
efm-entries quickfix.txt /*efm-entries*
|
||||
efm-ignore quickfix.txt /*efm-ignore*
|
||||
eiffel.vim syntax.txt /*eiffel.vim*
|
||||
elixir.vim syntax.txt /*elixir.vim*
|
||||
emacs-keys tips.txt /*emacs-keys*
|
||||
emacs-tags tagsrch.txt /*emacs-tags*
|
||||
emacs_tags tagsrch.txt /*emacs_tags*
|
||||
@ -6438,6 +6460,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*
|
||||
@ -6552,6 +6575,7 @@ ft-docbkxml-syntax syntax.txt /*ft-docbkxml-syntax*
|
||||
ft-dosbatch-syntax syntax.txt /*ft-dosbatch-syntax*
|
||||
ft-dtd-syntax syntax.txt /*ft-dtd-syntax*
|
||||
ft-eiffel-syntax syntax.txt /*ft-eiffel-syntax*
|
||||
ft-elixir-syntax syntax.txt /*ft-elixir-syntax*
|
||||
ft-erlang-syntax syntax.txt /*ft-erlang-syntax*
|
||||
ft-euphoria-syntax syntax.txt /*ft-euphoria-syntax*
|
||||
ft-flexwiki-syntax syntax.txt /*ft-flexwiki-syntax*
|
||||
@ -6667,6 +6691,8 @@ ft-yaml-syntax syntax.txt /*ft-yaml-syntax*
|
||||
ft-zimbu-plugin filetype.txt /*ft-zimbu-plugin*
|
||||
ft-zsh-syntax syntax.txt /*ft-zsh-syntax*
|
||||
ft_ada.txt ft_ada.txt /*ft_ada.txt*
|
||||
ft_ps1.txt ft_ps1.txt /*ft_ps1.txt*
|
||||
ft_raku.txt ft_raku.txt /*ft_raku.txt*
|
||||
ft_rust.txt ft_rust.txt /*ft_rust.txt*
|
||||
ft_sql.txt ft_sql.txt /*ft_sql.txt*
|
||||
ftdetect filetype.txt /*ftdetect*
|
||||
@ -6687,6 +6713,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*
|
||||
@ -6992,6 +7019,7 @@ getchar() eval.txt /*getchar()*
|
||||
getcharmod() eval.txt /*getcharmod()*
|
||||
getcharpos() eval.txt /*getcharpos()*
|
||||
getcharsearch() eval.txt /*getcharsearch()*
|
||||
getcharstr() eval.txt /*getcharstr()*
|
||||
getcmdline() eval.txt /*getcmdline()*
|
||||
getcmdpos() eval.txt /*getcmdpos()*
|
||||
getcmdtype() eval.txt /*getcmdtype()*
|
||||
@ -7786,6 +7814,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*
|
||||
@ -7892,6 +7921,7 @@ moo.vim syntax.txt /*moo.vim*
|
||||
more-compatible version5.txt /*more-compatible*
|
||||
more-prompt message.txt /*more-prompt*
|
||||
more-variables eval.txt /*more-variables*
|
||||
motion-count-multiplied motion.txt /*motion-count-multiplied*
|
||||
motion.txt motion.txt /*motion.txt*
|
||||
mouse-mode-table term.txt /*mouse-mode-table*
|
||||
mouse-overview term.txt /*mouse-overview*
|
||||
@ -8339,6 +8369,7 @@ omni-sql-completion ft_sql.txt /*omni-sql-completion*
|
||||
online-help helphelp.txt /*online-help*
|
||||
opening-window windows.txt /*opening-window*
|
||||
operator motion.txt /*operator*
|
||||
operator-doubled motion.txt /*operator-doubled*
|
||||
operator-pending-index index.txt /*operator-pending-index*
|
||||
operator-variable eval.txt /*operator-variable*
|
||||
option-backslash options.txt /*option-backslash*
|
||||
@ -8392,6 +8423,7 @@ page_up intro.txt /*page_up*
|
||||
pager message.txt /*pager*
|
||||
papp.vim syntax.txt /*papp.vim*
|
||||
paragraph motion.txt /*paragraph*
|
||||
partial eval.txt /*partial*
|
||||
pascal.vim syntax.txt /*pascal.vim*
|
||||
patches-8 version8.txt /*patches-8*
|
||||
patches-8.1 version8.txt /*patches-8.1*
|
||||
@ -8589,7 +8621,6 @@ 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*
|
||||
@ -8717,6 +8748,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()*
|
||||
@ -9663,6 +9695,8 @@ test_feedinput() testing.txt /*test_feedinput()*
|
||||
test_garbagecollect_now() testing.txt /*test_garbagecollect_now()*
|
||||
test_garbagecollect_soon() testing.txt /*test_garbagecollect_soon()*
|
||||
test_getvalue() testing.txt /*test_getvalue()*
|
||||
test_gui_drop_files() testing.txt /*test_gui_drop_files()*
|
||||
test_gui_mouse_event() testing.txt /*test_gui_mouse_event()*
|
||||
test_ignore_error() testing.txt /*test_ignore_error()*
|
||||
test_null_blob() testing.txt /*test_null_blob()*
|
||||
test_null_channel() testing.txt /*test_null_channel()*
|
||||
@ -9734,6 +9768,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*
|
||||
@ -9873,6 +9908,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*
|
||||
@ -10054,6 +10090,7 @@ v_u change.txt /*v_u*
|
||||
v_v visual.txt /*v_v*
|
||||
v_x change.txt /*v_x*
|
||||
v_y change.txt /*v_y*
|
||||
v_zy change.txt /*v_zy*
|
||||
v_~ change.txt /*v_~*
|
||||
vab motion.txt /*vab*
|
||||
val-variable eval.txt /*val-variable*
|
||||
@ -10128,6 +10165,7 @@ 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-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-use intro.txt /*vim-use*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
@ -10138,14 +10176,17 @@ vim9 vim9.txt /*vim9*
|
||||
vim9-classes vim9.txt /*vim9-classes*
|
||||
vim9-const vim9.txt /*vim9-const*
|
||||
vim9-curly vim9.txt /*vim9-curly*
|
||||
vim9-debug repeat.txt /*vim9-debug*
|
||||
vim9-declaration vim9.txt /*vim9-declaration*
|
||||
vim9-declarations usr_46.txt /*vim9-declarations*
|
||||
vim9-differences vim9.txt /*vim9-differences*
|
||||
vim9-export vim9.txt /*vim9-export*
|
||||
vim9-final vim9.txt /*vim9-final*
|
||||
vim9-gotchas vim9.txt /*vim9-gotchas*
|
||||
vim9-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*
|
||||
@ -10153,7 +10194,9 @@ 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:*
|
||||
@ -10417,6 +10460,7 @@ zOS-PuTTY os_390.txt /*zOS-PuTTY*
|
||||
zOS-has-ebcdic os_390.txt /*zOS-has-ebcdic*
|
||||
zOS-limitations os_390.txt /*zOS-limitations*
|
||||
zOS-open-source os_390.txt /*zOS-open-source*
|
||||
zP change.txt /*zP*
|
||||
zR fold.txt /*zR*
|
||||
zW spell.txt /*zW*
|
||||
zX fold.txt /*zX*
|
||||
@ -10444,6 +10488,7 @@ zl scroll.txt /*zl*
|
||||
zm fold.txt /*zm*
|
||||
zn fold.txt /*zn*
|
||||
zo fold.txt /*zo*
|
||||
zp change.txt /*zp*
|
||||
zr fold.txt /*zr*
|
||||
zs scroll.txt /*zs*
|
||||
zsh.vim syntax.txt /*zsh.vim*
|
||||
@ -10455,6 +10500,7 @@ zuw spell.txt /*zuw*
|
||||
zv fold.txt /*zv*
|
||||
zw spell.txt /*zw*
|
||||
zx fold.txt /*zx*
|
||||
zy change.txt /*zy*
|
||||
zz scroll.txt /*zz*
|
||||
{ motion.txt /*{*
|
||||
{Visual} intro.txt /*{Visual}*
|
||||
|
@ -373,10 +373,10 @@ Added by Vim (there are no standard codes for these):
|
||||
t_Ri restore icon text from stack *t_Ri* *'t_Ri'*
|
||||
t_TE end of "raw" mode *t_TE* *'t_TE'*
|
||||
t_TI put terminal into "raw" mode *t_TI* *'t_TI'*
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
t_fe enable focus-event tracking *t_fe* *'t_fe'*
|
||||
|xterm-focus-event|
|
||||
t_fd disable focus-event tracking *t_fd* *'t_fd'*
|
||||
|xterm-focus-event|
|
||||
|
||||
Some codes have a start, middle and end part. The start and end are defined
|
||||
by the termcap option, the middle part is text.
|
||||
|
@ -1,4 +1,4 @@
|
||||
*testing.txt* For Vim version 8.2. Last change: 2021 Apr 02
|
||||
*testing.txt* For Vim version 8.2. Last change: 2021 Jul 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -78,6 +78,46 @@ test_getvalue({name}) *test_getvalue()*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetName()->test_getvalue()
|
||||
<
|
||||
*test_gui_drop_files()*
|
||||
test_gui_drop_files({list}, {row}, {col}, {mods})
|
||||
Drop one or more files in {list} in the window at {row}, {col}.
|
||||
This function only works when the GUI is running and the
|
||||
|drag-n-drop| feature is present.
|
||||
|
||||
The supported values for {mods} are:
|
||||
0x4 Shift
|
||||
0x8 Alt
|
||||
0x10 Ctrl
|
||||
The files are added to the argument list and the first file in
|
||||
{list} is edited in the window. See |drag-n-drop| for more
|
||||
information.
|
||||
|
||||
*test_gui_mouse_event()*
|
||||
test_gui_mouse_event({button}, {row}, {col}, {multiclick}, {modifiers})
|
||||
Inject a mouse button click event. This function only works
|
||||
when the GUI is running.
|
||||
The supported values for {button} are:
|
||||
0 right mouse button
|
||||
1 middle mouse button
|
||||
2 left mouse button
|
||||
3 mouse button release
|
||||
4 scroll wheel down
|
||||
5 scroll wheel up
|
||||
6 scroll wheel left
|
||||
7 scroll wheel right
|
||||
{row} and {col} specify the location of the mouse click. The
|
||||
first row of the Vim window is 1 and the last row is 'lines'.
|
||||
The maximum value of {col} is 'columns'.
|
||||
To inject a multiclick event, set {multiclick} to 1.
|
||||
The supported values for {modifiers} are:
|
||||
4 shift is pressed
|
||||
8 alt is pressed
|
||||
16 ctrl is pressed
|
||||
After injecting the mouse event you probably should call
|
||||
|feedkeys()| to have them processed, e.g.: >
|
||||
call feedkeys("y", 'Lx!')
|
||||
|
||||
|
||||
test_ignore_error({expr}) *test_ignore_error()*
|
||||
Ignore any error containing {expr}. A normal message is given
|
||||
|
@ -1,4 +1,4 @@
|
||||
*textprop.txt* For Vim version 8.2. Last change: 2021 Mar 22
|
||||
*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
|
||||
@ -228,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
|
||||
|
@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Apr 05
|
||||
*todo.txt* For Vim version 8.2. Last change: 2021 Jul 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -39,85 +39,59 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
Vim9 - Make everything work:
|
||||
- possible leak in test_vim9_builtin ?
|
||||
- Make "for _ in range()" work, do not store the value in a var.
|
||||
- use CheckLegacyAndVim9Success(lines) in many more places
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
- 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.
|
||||
- Using ".." at script level doesn't convert arguments to a string.
|
||||
- This fails in a :def function but not at the script level:
|
||||
var s = 'asdf'->((a) => a)('x')
|
||||
Disallow passing more arguments to lambda than expected?
|
||||
- Implement blob index and slice, also with assignment?
|
||||
- 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')
|
||||
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()
|
||||
- compile "expr" and "call" expression of a channel in channel_exe_cmd()?
|
||||
- give an error for "echo Func()" if Func() does not return anything.
|
||||
- Using "windo echo expr" does not accept a line break inside "expr" (in a
|
||||
:def function and at script level in a not executed block). #7681
|
||||
- "assert_fails()" cannot access local variables. Perhaps add this:
|
||||
assertfails
|
||||
... cmd ...
|
||||
endassertfails /E99:.*cmd/
|
||||
Similar to try/catch/endtry but without the boilerplate.
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
map() could check that the return type of the function argument matches
|
||||
the type of the list or dict member. (#8092)
|
||||
Same for other functions, such as searchpair().
|
||||
- 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',
|
||||
- Unexpected error message when using "var x: any | x.key = 9", because "x" is
|
||||
given the type number. Can we use VAR_ANY?
|
||||
|
||||
Once Vim9 is stable:
|
||||
- Add the "vim9script" feature, can use has('vim9script')
|
||||
- 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.
|
||||
- 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.
|
||||
- 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:
|
||||
- implement :type, "import type"
|
||||
- implement enum, "import enum".
|
||||
- implement class and interface: See |vim9-classes|
|
||||
- For range: make table of first ASCII character with flag to quickly check if
|
||||
it can be a Vim9 command. E.g. "+" can, but "." can't.
|
||||
- compile get_lambda_tv() in popup_add_timeout()
|
||||
- inline call to map() and filter()
|
||||
- Inline call to map() and filter(), better type checking.
|
||||
- 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.
|
||||
@ -126,6 +100,8 @@ 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)
|
||||
@ -148,6 +124,11 @@ 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
|
||||
@ -157,8 +138,6 @@ Text properties:
|
||||
- "cc" does not call inserted_bytes(). (Axel Forsman, #5763)
|
||||
- Combining text property with 'cursorline' does not always work (Billie
|
||||
Cleek, #5533)
|
||||
- Should we let the textprop highlight overrule other (e.g. diff) highlight if
|
||||
the priority is above a certain value? (#7392)
|
||||
- See remarks at top of src/textprop.c
|
||||
|
||||
'incsearch' with :s:
|
||||
@ -235,6 +214,11 @@ Terminal emulator window:
|
||||
|
||||
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
|
||||
@ -254,16 +238,27 @@ 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.
|
||||
|
||||
Mapping with partial match not executed properly in GTK. (Ingo Karkat, #7082)
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
|
||||
Also see #8487 for an example.
|
||||
|
||||
Patch for Template string: #4634
|
||||
Have another look at the implementation.
|
||||
|
||||
Patch to implement the vimtutor with a plugin: #6414
|
||||
Was originally written by Felipe Morales.
|
||||
|
||||
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
|
||||
@ -271,6 +266,9 @@ 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
|
||||
@ -279,6 +277,9 @@ inconsistent with the documentation.
|
||||
Making breakat support multibyte characters (Yasuhiro Matsumoto, #6598)
|
||||
Scroll doesn't work correctly, why?
|
||||
|
||||
glob() and globfile() do not always honor 'wildignorecase'. #8350
|
||||
globpath() does not use 'wildignorecase' at all?
|
||||
|
||||
Add 'termguiattr' option, use "gui=" attributes in the terminal? Would work
|
||||
with 'termguicolors'. #1740
|
||||
|
||||
@ -291,6 +292,12 @@ Missing filetype test for bashrc, PKGBUILD, etc.
|
||||
Add an option to not fetch terminal codes in xterm, to avoid flicker when t_Co
|
||||
changes.
|
||||
|
||||
MS-Windows: instead of "edit with multiple Vims" use "Edit with Vim in
|
||||
multiple tabs". #8404
|
||||
|
||||
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
|
||||
@ -308,6 +315,9 @@ 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
|
||||
@ -317,6 +327,12 @@ Should also work without any group:
|
||||
:echo matchstr('aaa bbb', '.\{-1,}\>\|.*')
|
||||
aaa bbb (should be aaa)
|
||||
|
||||
Should add a match/str/list/pos method that also returns the test and position
|
||||
of submatches. #8355
|
||||
|
||||
Syntax highlight for a region does not work with a "nextgroup" if the start
|
||||
match is empty. #8449
|
||||
|
||||
Check out PR #543 (Roland Puntaier).
|
||||
Patch for multibyte characters in langmap and applying a mapping on them.
|
||||
(Christian Brabandt, 2015 Jun 12, update July 25)
|
||||
@ -341,6 +357,7 @@ The buffer list and windows are locked, no changes possible
|
||||
|
||||
Add a ModeChanged autocommand that has an argument indicating the old and new
|
||||
mode, as what's returned from mode(). Also used for switching Terminal mode.
|
||||
#8360, #7863, #7363
|
||||
|
||||
Matchparen doesn't remove highlight after undo. (#7054)
|
||||
Is OK when syntax HL is active.
|
||||
@ -353,6 +370,10 @@ work.
|
||||
Using "au!" after "filetype on" is a bit slow. Can the matching of
|
||||
autocommands be made faster? (#7056)
|
||||
|
||||
Append in Visual block mode inserts the wrong character.
|
||||
Test_visual_block_mode() already has the proper check, which is commented out.
|
||||
(#8288)
|
||||
|
||||
Add the <=> (spaceship) operator and "cond ?< expr ?= expr ?> expr"
|
||||
replace this:
|
||||
let left = GetLeftFunc()
|
||||
@ -409,6 +430,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.
|
||||
@ -495,6 +518,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)
|
||||
|
||||
@ -1013,8 +1039,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)
|
||||
|
||||
@ -1228,7 +1253,7 @@ 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.
|
||||
|
||||
Suppoert sort(l, 'F'), convert strings to float. (#7857)
|
||||
Support sort(l, 'F'), convert strings to float. (#7857)
|
||||
|
||||
sort() is not stable when using numeric/float sort (Nikolay Pavlov, 2016 Sep
|
||||
4#1038)
|
||||
@ -1397,9 +1422,6 @@ Appveyor build with self-installing executable, includes getting most
|
||||
interfaces: https://github.com/k-takata/vim/tree/chrisbra-appveyor-build
|
||||
result: https://ci.appveyor.com/project/k-takata/vim/history
|
||||
|
||||
Problem that a previous silent ":throw" causes a following try/catch not to
|
||||
work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
|
||||
|
||||
Problem using ":try" inside ":execute". (ZyX, 2013 Sep 15)
|
||||
|
||||
Patch to make tests pass with EBCDIC. (Owen Leibman, 2016 Apr 10)
|
||||
@ -1407,9 +1429,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?
|
||||
|
||||
@ -1987,6 +2006,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)
|
||||
|
||||
@ -2231,9 +2254,6 @@ Win32: Improved Makefile for MSVC. (Leonardo Valeri Manera, 2010 Aug 18)
|
||||
|
||||
Win32: Expanding 'path' runs into a maximum size limit. (bgold12, 2009 Nov 15)
|
||||
|
||||
Win32: Patch for enabling quick edit mode in console. (Craig Barkhouse, 2010
|
||||
Sep 1)
|
||||
|
||||
Win32: Patch for using .png files for icons. (Charles Peacech, 2012 Feb 5)
|
||||
|
||||
Putting a Visual block while 'visualedit' is "all" does not leave the cursor
|
||||
@ -2983,7 +3003,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
|
||||
|
@ -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
|
||||
|
||||
@ -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_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 Mar 14
|
||||
*usr_41.txt* For Vim version 8.2. Last change: 2021 Jun 07
|
||||
|
||||
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 ~
|
||||
@ -944,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
|
||||
@ -1012,6 +1021,8 @@ Testing: *test-functions*
|
||||
test_garbagecollect_now() free memory right now
|
||||
test_garbagecollect_soon() set a flag to free memory soon
|
||||
test_getvalue() get value of an internal variable
|
||||
test_gui_drop_files() drop file(s) in a window
|
||||
test_gui_mouse_event() add a GUI mouse event to the input buffer
|
||||
test_ignore_error() ignore a specific error message
|
||||
test_null_blob() return a null Blob
|
||||
test_null_channel() return a null Channel
|
||||
|
@ -444,6 +444,7 @@ m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
|
||||
T *+scrollbind* |'scrollbind'|
|
||||
B *+signs* |:sign|
|
||||
N *+smartindent* |'smartindent'|
|
||||
B *+sodium* compiled with libsodium for better encryption support
|
||||
B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
|
||||
N *+spell* spell checking support, see |spell|
|
||||
N *+startuptime* |--startuptime| argument
|
||||
@ -724,7 +725,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
|
||||
|
@ -2696,7 +2696,7 @@ Multi-byte:
|
||||
double-wide character.
|
||||
- Overstrike mode for the cmdline replaced only the first byte of a multibyte
|
||||
character.
|
||||
- The cursor in Replace mode (also in the cmdline) was to small on a
|
||||
- The cursor in Replace mode (also in the cmdline) was too small on a
|
||||
double-wide character.
|
||||
- When a multibyte character contained a 0x80 byte, it didn't work (was using
|
||||
a CSI byte instead). (Muraoka Taro)
|
||||
@ -3546,7 +3546,7 @@ Added Simplified Chinese translation of the tutor. (Mendel L Chan)
|
||||
Added Russian keymap for yawerty keyboard.
|
||||
|
||||
Added an explanation of using the vimrc file in the tutor.
|
||||
Changed tutor.vim to get the right encoding for the Taiwainese tutor.
|
||||
Changed tutor.vim to get the right encoding for the Taiwanese tutor.
|
||||
|
||||
Added Russian tutor. (Andrey Kiselev)
|
||||
Added Polish tutor. (Mikolaj Machowski)
|
||||
@ -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
|
||||
@ -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
|
||||
@ -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)
|
||||
@ -35504,7 +35504,7 @@ Files: Filelist, src/testdir/Make_all.mak, src/testdir/check.vim,
|
||||
src/testdir/test_xxd.vim
|
||||
|
||||
Patch 8.1.1545
|
||||
Problem: When the screen is to small there is no message about that.
|
||||
Problem: When the screen is too small there is no message about that.
|
||||
(Daniel Hahler)
|
||||
Solution: Do not use :cquit. (closes #4534)
|
||||
Files: src/testdir/runtest.vim
|
||||
@ -41104,7 +41104,7 @@ Files: src/buffer.c, src/testdir/test_popupwin.vim
|
||||
Patch 8.1.2419
|
||||
Problem: With a long file name the hit-enter prompt appears. (J. Lewis
|
||||
Muir)
|
||||
Solution: When checking for text to wrap don't do this when outputing a CR.
|
||||
Solution: When checking for text to wrap don't do this when outputting a CR.
|
||||
Files: src/message.c, src/testdir/test_display.vim,
|
||||
src/testdir/dumps/Test_long_file_name_1.dump
|
||||
|
||||
|
@ -186,7 +186,7 @@ behave mostly like Vi, even though a .vimrc file exists.
|
||||
.TP
|
||||
\-d
|
||||
Start in diff mode.
|
||||
There should be two, three or four file name arguments.
|
||||
There should between two to eight file name arguments.
|
||||
.B Vim
|
||||
will open all the files and show differences between them.
|
||||
Works like vimdiff(1).
|
||||
@ -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
|
||||
|
@ -135,9 +135,9 @@ OPTIONS
|
||||
Vim behave mostly like Vi, even though a .vimrc file ex‐
|
||||
ists.
|
||||
|
||||
-d Start in diff mode. There should be two, three or four
|
||||
file name arguments. Vim will open all the files and show
|
||||
differences between them. Works like vimdiff(1).
|
||||
-d Start in diff mode. There should between two to eight file
|
||||
name arguments. Vim will open all the files and show dif‐
|
||||
ferences between them. Works like vimdiff(1).
|
||||
|
||||
-d {device} Open {device} for use as a terminal. Only on the Amiga.
|
||||
Example: "-d con:20/30/600/150".
|
||||
@ -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 Apr 06
|
||||
*vim9.txt* For Vim version 8.2. Last change: 2021 Jul 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -61,12 +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* *:vim9cmd*
|
||||
:vim9[cmd] {cmd}
|
||||
: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*
|
||||
@ -96,7 +101,8 @@ 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`, `:k`, `:append`, `:change`, `:insert`, `:open`
|
||||
- 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
|
||||
@ -152,12 +158,25 @@ Compilation is done when any of these is encountered:
|
||||
*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
|
||||
used for the command or inside a `:try` block), does not get a range passed
|
||||
cannot be a "dict" function, and can always be a closure.
|
||||
|
||||
Later classes will be added, which replaces the "dict function" mechanism.
|
||||
For now you will need to pass the dictionary explicitly: >
|
||||
def DictFunc(d: dict<any>, arg: string)
|
||||
echo d[arg]
|
||||
enddef
|
||||
var d = {item: 'value', func: DictFunc}
|
||||
d.func(d, 'item')
|
||||
|
||||
The argument types and return type need to be specified. The "any" type can
|
||||
be used, type checking will then be done at runtime, like with legacy
|
||||
functions.
|
||||
@ -334,6 +353,19 @@ 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 ~
|
||||
@ -368,13 +400,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 ~
|
||||
|
||||
@ -417,7 +442,8 @@ The function must already have been defined. >
|
||||
var Funcref = MyFunction
|
||||
|
||||
When using `function()` the resulting type is "func", a function with any
|
||||
number of arguments and any return type. The function can be defined later.
|
||||
number of arguments and any return type (including void). The function can be
|
||||
defined later.
|
||||
|
||||
|
||||
Lambda using => instead of -> ~
|
||||
@ -428,11 +454,12 @@ it is the start of a lambda or a dictionary, which is now more complicated
|
||||
because of the use of argument types.
|
||||
|
||||
To avoid these problems Vim9 script uses a different syntax for a lambda,
|
||||
which is similar to Javascript: >
|
||||
which is similar to JavaScript: >
|
||||
var Lambda = (arg) => expression
|
||||
|
||||
No line break is allowed in the arguments of a lambda up to and including the
|
||||
"=>". This is OK: >
|
||||
"=>" (so that Vim can tell the difference between an expression in parentheses
|
||||
and lambda arguments). This is OK: >
|
||||
filter(list, (k, v) =>
|
||||
v > 0)
|
||||
This does not work: >
|
||||
@ -505,7 +532,7 @@ And when a dict spans multiple lines: >
|
||||
one: 1,
|
||||
two: 2,
|
||||
}
|
||||
Function call: >
|
||||
With a function call: >
|
||||
var result = Func(
|
||||
arg1,
|
||||
arg2
|
||||
@ -538,10 +565,36 @@ at the start of the line indicates line continuation: >
|
||||
| echo 'match'
|
||||
| endif
|
||||
|
||||
< *E1050*
|
||||
Note that this means that in heredoc the first line cannot be a bar: >
|
||||
var lines =<< trim END
|
||||
| this doesn't work
|
||||
END
|
||||
Either use an empty line at the start or do not use heredoc. Or temporarily
|
||||
add the "C" flag to 'cpoptions': >
|
||||
set cpo+=C
|
||||
var lines =<< trim END
|
||||
| this doesn't work
|
||||
END
|
||||
set cpo-=C
|
||||
If the heredoc is inside a function 'cpoptions' must be set before :def and
|
||||
restored after the :enddef.
|
||||
|
||||
In places where line continuation with a backslash is still needed, such as
|
||||
splitting up a long Ex command, comments can start with '#\ ': >
|
||||
syn region Text
|
||||
\ start='foo'
|
||||
#\ comment
|
||||
\ end='bar'
|
||||
Like with legacy script '"\ ' is used. This is also needed when line
|
||||
continuation is used without a backslash and a line starts with a bar: >
|
||||
au CursorHold * echom 'BEFORE bar'
|
||||
#\ some comment
|
||||
| echom 'AFTER bar'
|
||||
<
|
||||
*E1050*
|
||||
To make it possible for the operator at the start of the line to be
|
||||
recognized, it is required to put a colon before a range. This will add
|
||||
"start" and print: >
|
||||
recognized, it is required to put a colon before a range. This example will
|
||||
add "start" and print: >
|
||||
var result = start
|
||||
+ print
|
||||
Like this: >
|
||||
@ -593,6 +646,47 @@ Notes:
|
||||
< This does not work: >
|
||||
echo [1, 2]
|
||||
[3, 4]
|
||||
- In some cases it is difficult for Vim to parse a command, especially when
|
||||
commands are used as an argument to another command, such as `windo`. In
|
||||
those cases the line continuation with a backslash has to be used.
|
||||
|
||||
|
||||
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 ~
|
||||
|
||||
@ -645,6 +739,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
|
||||
@ -668,43 +773,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.
|
||||
@ -875,6 +943,16 @@ 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
|
||||
|
||||
*:++* *:--*
|
||||
The ++ and -- commands have been added. They are very similar to adding or
|
||||
subtracting one: >
|
||||
++var
|
||||
var += 1
|
||||
--var
|
||||
var -= 1
|
||||
|
||||
Using ++var or --var in an expression is not supported yet.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. New style functions *fast-functions*
|
||||
@ -937,9 +1015,14 @@ prefix if they do not exist at the time of compiling.
|
||||
Note that for command line completion of {func} you
|
||||
can prepend "s:" to find script-local functions.
|
||||
|
||||
:disa[ssemble]! {func} Like `:disassemble` but with the instructions used for
|
||||
:disa[ssemble] profile {func}
|
||||
Like `:disassemble` but with the instructions used for
|
||||
profiling.
|
||||
|
||||
:disa[ssemble] debug {func}
|
||||
Like `:disassemble` but with the instructions used for
|
||||
debugging.
|
||||
|
||||
Limitations ~
|
||||
|
||||
Local variables will not be visible to string evaluation. For example: >
|
||||
@ -1007,10 +1090,8 @@ The following builtin types are supported:
|
||||
Not supported yet:
|
||||
tuple<a: {type}, b: {type}, ...>
|
||||
|
||||
These types can be used in declarations, but no value will have this type:
|
||||
{type}|{type} {not implemented yet}
|
||||
void
|
||||
any
|
||||
These types can be used in declarations, but no simple value will actually
|
||||
have the "void" type.
|
||||
|
||||
There is no array type, use list<{type}> instead. For a list constant an
|
||||
efficient implementation is used that avoids allocating lot of small pieces of
|
||||
@ -1019,8 +1100,16 @@ memory.
|
||||
A partial and function can be declared in more or less specific ways:
|
||||
func any kind of function reference, no type
|
||||
checking for arguments or return value
|
||||
func: void any number and type of arguments, no return
|
||||
value
|
||||
func: {type} any number and type of arguments with specific
|
||||
return type
|
||||
|
||||
func() function with no argument, does not return a
|
||||
value
|
||||
func(): void same
|
||||
func(): {type} function with no argument and return type
|
||||
|
||||
func({type}) function with argument type, does not return
|
||||
a value
|
||||
func({type}): {type} function with argument type and return type
|
||||
@ -1109,6 +1198,18 @@ dictionary. If there is a mix of types, the "any" type is used. >
|
||||
['a', 'b', 'c'] list<string>
|
||||
[1, 'x', 3] list<any>
|
||||
|
||||
The common type of function references, if they do not all have the same
|
||||
number of arguments, uses "(...)" to indicate the number of arguments is not
|
||||
specified. For example: >
|
||||
def Foo(x: bool)
|
||||
enddef
|
||||
def Bar(x: bool, y: bool)
|
||||
enddef
|
||||
var funclist = [Foo, Bar]
|
||||
echo funclist->typename()
|
||||
Results in:
|
||||
list<func(...)>
|
||||
|
||||
For script-local variables in Vim9 script the type is checked, also when the
|
||||
variable was declared in a legacy function.
|
||||
|
||||
@ -1125,16 +1226,24 @@ In Vim9 script this has been made stricter. In most places it works just as
|
||||
before, if the value used matches the expected type. There will sometimes be
|
||||
an error, thus breaking backwards compatibility. For example:
|
||||
- Using a number other than 0 or 1 where a boolean is expected. *E1023*
|
||||
- Using a string value when setting a number options.
|
||||
- Using a string value when setting a number option.
|
||||
- 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 Vim9 script: >
|
||||
map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
vim9 echo map([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
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.
|
||||
Instead use |mapnew(): >
|
||||
vim9 echo mapnew([1, 2, 3], (i, v) => 'item ' .. i)
|
||||
['item 0', 'item 1', 'item 2']
|
||||
|
||||
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: >
|
||||
var mylist = [1, 2.0, '3']
|
||||
# typename(mylist) == "list<any>"
|
||||
map(mylist, (i, v) => 'item ' .. i)
|
||||
# typename(mylist) == "list<string>", no error
|
||||
|
||||
Same for |extend()|, use |extendnew()| instead, and for |flatten()|, use
|
||||
|flattennew()| instead.
|
||||
|
||||
@ -1211,9 +1320,10 @@ Exporting an item can be written as: >
|
||||
export const someValue = ...
|
||||
export def MyFunc() ...
|
||||
export class MyClass ...
|
||||
export interface MyClass ...
|
||||
|
||||
As this suggests, only constants, variables, `:def` functions and classes can
|
||||
be exported. {not implemented yet: export class}
|
||||
be exported. {not implemented yet: class, interface}
|
||||
|
||||
*E1042*
|
||||
`:export` can only be used in Vim9 script, at the script level.
|
||||
@ -1313,27 +1423,46 @@ implementing classes is going to be a lot of work, it is left for the future.
|
||||
For now we'll just make sure classes can be added later.
|
||||
|
||||
Thoughts:
|
||||
- `class` / `endclass`, everything in one file
|
||||
- Class names are always CamelCase
|
||||
- Single constructor
|
||||
- `class` / `endclass`, the whole class must be in one file
|
||||
- Class names are always CamelCase (to avoid a name clash with builtin types)
|
||||
- A single constructor called "constructor"
|
||||
- Single inheritance with `class ThisClass extends BaseClass`
|
||||
- `abstract class`
|
||||
- `interface` (Abstract class without any implementation)
|
||||
- `abstract class` (class with incomplete implementation)
|
||||
- `interface` / `endinterface` (abstract class without any implementation)
|
||||
- `class SomeClass implements SomeInterface`
|
||||
- Generics for class: `class <Tkey, Tentry>`
|
||||
- Generics for function: `def <Tkey> GetLast(key: Tkey)`
|
||||
|
||||
Again, much of this is from TypeScript.
|
||||
Again, much of this is from TypeScript with a slightly different syntax.
|
||||
|
||||
Some things that look like good additions:
|
||||
- Use a class as an interface (like Dart)
|
||||
- Extend a class with methods, using an import (like Dart)
|
||||
- Mixins
|
||||
- For testing: Mock mechanism
|
||||
|
||||
An important class that will be provided is "Promise". Since Vim is single
|
||||
threaded, connecting asynchronous operations is a natural way of allowing
|
||||
plugins to do their work without blocking the user. It's a uniform way to
|
||||
invoke callbacks and handle timeouts and errors.
|
||||
|
||||
Some examples: >
|
||||
|
||||
abstract class Person
|
||||
static const prefix = 'xxx'
|
||||
var name: string
|
||||
|
||||
def constructor(name: string)
|
||||
this.name = name;
|
||||
enddef
|
||||
|
||||
def display(): void
|
||||
echo name
|
||||
enddef
|
||||
|
||||
abstract def find(string): Person
|
||||
endclass
|
||||
|
||||
==============================================================================
|
||||
|
||||
9. Rationale *vim9-rationale*
|
||||
@ -1522,7 +1651,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,17 +1,17 @@
|
||||
.TH VIMDIFF 1 "2001 March 30"
|
||||
.SH NAME
|
||||
vimdiff \- edit two, three or four versions of a file with Vim and show differences
|
||||
vimdiff \- edit between two and eight versions of a file with Vim and show differences
|
||||
.SH SYNOPSIS
|
||||
.br
|
||||
.B vimdiff
|
||||
[options] file1 file2 [file3 [file4]]
|
||||
[options] file1 file2 [file3 [file4 [file5 [file6 [file7 [file8]]]]]]
|
||||
.PP
|
||||
.B gvimdiff
|
||||
.SH DESCRIPTION
|
||||
.B Vimdiff
|
||||
starts
|
||||
.B Vim
|
||||
on two (or three or four) files.
|
||||
on two up to eight files.
|
||||
Each file gets its own window.
|
||||
The differences between the files are highlighted.
|
||||
This is a nice way to inspect changes and to move changes from one version
|
||||
|
@ -1,27 +1,28 @@
|
||||
VIMDIFF(1) VIMDIFF(1)
|
||||
VIMDIFF(1) General Commands Manual VIMDIFF(1)
|
||||
|
||||
|
||||
|
||||
NAME
|
||||
vimdiff - edit two, three or four versions of a file with Vim and show
|
||||
differences
|
||||
vimdiff - edit between two and eight versions of a file with Vim and
|
||||
show differences
|
||||
|
||||
SYNOPSIS
|
||||
vimdiff [options] file1 file2 [file3 [file4]]
|
||||
vimdiff [options] file1 file2 [file3 [file4 [file5 [file6 [file7
|
||||
[file8]]]]]]
|
||||
|
||||
gvimdiff
|
||||
|
||||
DESCRIPTION
|
||||
Vimdiff starts Vim on two (or three or four) files. Each file gets its
|
||||
own window. The differences between the files are highlighted. This
|
||||
is a nice way to inspect changes and to move changes from one version
|
||||
to another version of the same file.
|
||||
Vimdiff starts Vim on two up to eight files. Each file gets its own
|
||||
window. The differences between the files are highlighted. This is a
|
||||
nice way to inspect changes and to move changes from one version to an‐
|
||||
other version of the same file.
|
||||
|
||||
See vim(1) for details about Vim itself.
|
||||
|
||||
When started as gvimdiff the GUI will be started, if available.
|
||||
|
||||
In each window the 'diff' option will be set, which causes the differ-
|
||||
In each window the 'diff' option will be set, which causes the differ‐
|
||||
ences to be highlighted.
|
||||
The 'wrap' and 'scrollbind' options are set to make the text look good.
|
||||
The 'foldmethod' option is set to "diff", which puts ranges of lines
|
||||
|
@ -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: 2021 Mar 21
|
||||
*windows.txt* For Vim version 8.2. Last change: 2021 Apr 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -521,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*
|
||||
@ -571,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
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2021 Apr 05
|
||||
" Last Change: 2021 Jul 03
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
if exists("did_load_filetypes")
|
||||
@ -393,7 +393,7 @@ au BufNewFile,BufRead *.cfm,*.cfi,*.cfc setf cf
|
||||
" Configure scripts
|
||||
au BufNewFile,BufRead configure.in,configure.ac setf config
|
||||
|
||||
" CUDA Cumpute Unified Device Architecture
|
||||
" CUDA Compute Unified Device Architecture
|
||||
au BufNewFile,BufRead *.cu,*.cuh setf cuda
|
||||
|
||||
" Dockerfile; Podman uses the same syntax with name Containerfile
|
||||
@ -408,8 +408,15 @@ au BufNewFile,BufRead *enlightenment/*.cfg setf c
|
||||
" Eterm
|
||||
au BufNewFile,BufRead *Eterm/*.cfg setf eterm
|
||||
|
||||
" Elixir or Euphoria
|
||||
au BufNewFile,BufRead *.ex call dist#ft#ExCheck()
|
||||
|
||||
" Elixir
|
||||
au BufRead,BufNewFile mix.lock,*.exs setf elixir
|
||||
au BufRead,BufNewFile *.eex,*.leex setf eelixir
|
||||
|
||||
" Euphoria 3 or 4
|
||||
au BufNewFile,BufRead *.eu,*.ew,*.ex,*.exu,*.exw call dist#ft#EuphoriaCheck()
|
||||
au BufNewFile,BufRead *.eu,*.ew,*.exu,*.exw call dist#ft#EuphoriaCheck()
|
||||
if has("fname_case")
|
||||
au BufNewFile,BufRead *.EU,*.EW,*.EX,*.EXU,*.EXW call dist#ft#EuphoriaCheck()
|
||||
endif
|
||||
@ -417,6 +424,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
|
||||
@ -596,7 +607,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
|
||||
@ -639,8 +650,11 @@ au BufNewFile,BufRead *.mo,*.gdmo setf gdmo
|
||||
" Gedcom
|
||||
au BufNewFile,BufRead *.ged,lltxxxxx.txt setf gedcom
|
||||
|
||||
" Gemtext
|
||||
au BufNewFile,BufRead *.gmi,*.gemini setf gemtext
|
||||
|
||||
" 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
|
||||
@ -711,10 +725,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
|
||||
@ -851,6 +865,15 @@ au BufNewFile,BufRead *.jov,*.j73,*.jovial setf jovial
|
||||
" JSON
|
||||
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
|
||||
|
||||
" JSON Patch (RFC 6902)
|
||||
au BufNewFile,BufRead *.json-patch setf json
|
||||
|
||||
" Jupyter Notebook is also json
|
||||
au BufNewFile,BufRead *.ipynb setf json
|
||||
|
||||
" JSONC
|
||||
au BufNewFile,BufRead *.jsonc setf jsonc
|
||||
|
||||
" Kixtart
|
||||
au BufNewFile,BufRead *.kix setf kix
|
||||
|
||||
@ -1015,6 +1038,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
|
||||
@ -1045,10 +1069,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
|
||||
@ -1191,6 +1215,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
|
||||
|
||||
@ -1204,8 +1231,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
|
||||
@ -1219,7 +1244,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)
|
||||
@ -1338,12 +1362,15 @@ 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
|
||||
au BufNewFile,BufRead *.pk setf poke
|
||||
|
||||
" Protocols
|
||||
au BufNewFile,BufRead */etc/protocols setf protocols
|
||||
@ -1359,6 +1386,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
|
||||
|
||||
@ -1485,7 +1515,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
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Jan 06
|
||||
" Last Change: 2020 Jun 28
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -118,7 +118,7 @@ endif
|
||||
" TODO: comments=
|
||||
setlocal commentstring=<%#%s%>
|
||||
|
||||
let b:undo_ftplugin = "setl cms< "
|
||||
let b:undo_ftplugin = "setl cms< " .
|
||||
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
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')
|
||||
|
27
runtime/ftplugin/jsonc.vim
Normal file
27
runtime/ftplugin/jsonc.vim
Normal file
@ -0,0 +1,27 @@
|
||||
" Vim filetype plugin
|
||||
" Language: JSONC (JSON with Comments)
|
||||
" Original Author: Izhak Jakov <izhak724@gmail.com>
|
||||
" Acknowledgement: Based off of vim-jsonc maintained by Kevin Locke <kevin@kevinlocke.name>
|
||||
" https://github.com/kevinoid/vim-jsonc
|
||||
" License: MIT
|
||||
" Last Change: 2021-07-01
|
||||
|
||||
runtime! ftplugin/json.vim
|
||||
|
||||
if exists('b:did_ftplugin_jsonc')
|
||||
finish
|
||||
else
|
||||
let b:did_ftplugin_jsonc = 1
|
||||
endif
|
||||
|
||||
" A list of commands that undo buffer local changes made below.
|
||||
let s:undo_ftplugin = []
|
||||
|
||||
" Set comment (formatting) related options. {{{1
|
||||
setlocal commentstring=//%s comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||
call add(s:undo_ftplugin, 'commentstring< comments<')
|
||||
|
||||
" Let Vim know how to disable the plug-in.
|
||||
call map(s:undo_ftplugin, "'execute ' . string(v:val)")
|
||||
let b:undo_ftplugin = join(s:undo_ftplugin, ' | ')
|
||||
unlet s:undo_ftplugin
|
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
|
@ -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
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2019 Nov 06
|
||||
" Last Change: 2020 Feb 13
|
||||
|
||||
if (exists("b:did_ftplugin"))
|
||||
finish
|
||||
@ -112,7 +112,7 @@ else
|
||||
if !exists('g:ruby_default_path')
|
||||
if has("ruby") && has("win32")
|
||||
ruby ::VIM::command( 'let g:ruby_default_path = split("%s",",")' % $:.join(%q{,}) )
|
||||
elseif executable('ruby')
|
||||
elseif executable('ruby') && !empty($HOME)
|
||||
let g:ruby_default_path = s:query_path($HOME)
|
||||
else
|
||||
let g:ruby_default_path = map(split($RUBYLIB,':'), 'v:val ==# "." ? "" : v:val')
|
||||
|
@ -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 Feb 20
|
||||
" Last Change: 2021 Apr 11
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -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.
|
||||
|
@ -5,6 +5,7 @@
|
||||
Name[de]=GVim
|
||||
Name[eo]=GVim
|
||||
Name[fr]=GVim
|
||||
Name[it]=GVim
|
||||
Name[ru]=GVim
|
||||
Name[sr]=GVim
|
||||
Name[tr]=GVim
|
||||
@ -13,6 +14,7 @@ Name=GVim
|
||||
GenericName[de]=Texteditor
|
||||
GenericName[eo]=Tekstoredaktilo
|
||||
GenericName[fr]=Éditeur de texte
|
||||
GenericName[it]=Editor di testi
|
||||
GenericName[ja]=テキストエディタ
|
||||
GenericName[ru]=Текстовый редактор
|
||||
GenericName[sr]=Едитор текст
|
||||
@ -22,6 +24,7 @@ GenericName=Text Editor
|
||||
Comment[de]=Textdateien bearbeiten
|
||||
Comment[eo]=Redakti tekstajn dosierojn
|
||||
Comment[fr]=Éditer des fichiers texte
|
||||
Comment[it]=Edita file di testo
|
||||
Comment[ja]=テキストファイルを編集します
|
||||
Comment[ru]=Редактирование текстовых файлов
|
||||
Comment[sr]=Уређујте текст фајлове
|
||||
@ -60,7 +63,6 @@ Comment[hr]=Uređivanje tekstualne datoteke
|
||||
Comment[hu]=Szövegfájlok szerkesztése
|
||||
Comment[id]=Edit file teks
|
||||
Comment[is]=Vinna með textaskrár
|
||||
Comment[it]=Modifica file di testo
|
||||
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
|
||||
Comment[ko]=텍스트 파일을 편집합니다
|
||||
Comment[lt]=Redaguoti tekstines bylas
|
||||
@ -102,6 +104,7 @@ Type=Application
|
||||
Keywords[de]=Text;Editor;
|
||||
Keywords[eo]=Teksto;redaktilo;
|
||||
Keywords[fr]=Texte;éditeur;
|
||||
Keywords[it]=Testo;editor;
|
||||
Keywords[ja]=テキスト;エディタ;
|
||||
Keywords[ru]=текст;текстовый редактор;
|
||||
Keywords[sr]=Текст;едитор;
|
||||
@ -111,7 +114,9 @@ Keywords=Text;editor;
|
||||
Icon[de]=gvim
|
||||
Icon[eo]=gvim
|
||||
Icon[fr]=gvim
|
||||
Icon[it]=gvim
|
||||
Icon[ru]=gvim
|
||||
Icon[sr]=gvim
|
||||
Icon=gvim
|
||||
Categories=Utility;TextEditor;
|
||||
StartupNotify=true
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent script for HTML
|
||||
" Maintainer: Bram Moolenaar
|
||||
" Original Author: Andy Wokula <anwoku@yahoo.de>
|
||||
" Last Change: 2021 Jan 26
|
||||
" Last Change: 2021 Jun 13
|
||||
" Version: 1.0 "{{{
|
||||
" Description: HTML indent script with cached state for faster indenting on a
|
||||
" range of lines.
|
||||
@ -62,7 +62,7 @@ let s:tagname = '\w\+\(-\w\+\)*'
|
||||
" Prefer using buffer-local settings over global settings, so that there can
|
||||
" be defaults for all HTML files and exceptions for specific types of HTML
|
||||
" files.
|
||||
func! HtmlIndent_CheckUserSettings()
|
||||
func HtmlIndent_CheckUserSettings()
|
||||
"{{{
|
||||
let inctags = ''
|
||||
if exists("b:html_indent_inctags")
|
||||
@ -178,7 +178,7 @@ let s:endtags = [0,0,0,0,0,0,0] " long enough for the highest index
|
||||
"}}}
|
||||
|
||||
" Add a list of tag names for a pair of <tag> </tag> to "tags".
|
||||
func! s:AddITags(tags, taglist)
|
||||
func s:AddITags(tags, taglist)
|
||||
"{{{
|
||||
for itag in a:taglist
|
||||
let a:tags[itag] = 1
|
||||
@ -187,7 +187,7 @@ func! s:AddITags(tags, taglist)
|
||||
endfunc "}}}
|
||||
|
||||
" Take a list of tag name pairs that are not to be used as tag pairs.
|
||||
func! s:RemoveITags(tags, taglist)
|
||||
func s:RemoveITags(tags, taglist)
|
||||
"{{{
|
||||
for itag in a:taglist
|
||||
let a:tags[itag] = 1
|
||||
@ -196,7 +196,7 @@ func! s:RemoveITags(tags, taglist)
|
||||
endfunc "}}}
|
||||
|
||||
" Add a block tag, that is a tag with a different kind of indenting.
|
||||
func! s:AddBlockTag(tag, id, ...)
|
||||
func s:AddBlockTag(tag, id, ...)
|
||||
"{{{
|
||||
if !(a:id >= 2 && a:id < len(s:endtags))
|
||||
echoerr 'AddBlockTag ' . a:id
|
||||
@ -255,7 +255,7 @@ call s:AddBlockTag('<!--[', 6, '![endif]-->')
|
||||
" Return non-zero when "tagname" is an opening tag, not being a block tag, for
|
||||
" which there should be a closing tag. Can be used by scripts that include
|
||||
" HTML indenting.
|
||||
func! HtmlIndent_IsOpenTag(tagname)
|
||||
func HtmlIndent_IsOpenTag(tagname)
|
||||
"{{{
|
||||
if get(s:indent_tags, a:tagname) == 1
|
||||
return 1
|
||||
@ -264,7 +264,7 @@ func! HtmlIndent_IsOpenTag(tagname)
|
||||
endfunc "}}}
|
||||
|
||||
" Get the value for "tagname", taking care of buffer-local tags.
|
||||
func! s:get_tag(tagname)
|
||||
func s:get_tag(tagname)
|
||||
"{{{
|
||||
let i = get(s:indent_tags, a:tagname)
|
||||
if (i == 1 || i == -1) && get(b:hi_removed_tags, a:tagname) != 0
|
||||
@ -277,7 +277,7 @@ func! s:get_tag(tagname)
|
||||
endfunc "}}}
|
||||
|
||||
" Count the number of start and end tags in "text".
|
||||
func! s:CountITags(text)
|
||||
func s:CountITags(text)
|
||||
"{{{
|
||||
" Store the result in s:curind and s:nextrel.
|
||||
let s:curind = 0 " relative indent steps for current line [unit &sw]:
|
||||
@ -289,7 +289,7 @@ func! s:CountITags(text)
|
||||
endfunc "}}}
|
||||
|
||||
" Count the number of start and end tags in text.
|
||||
func! s:CountTagsAndState(text)
|
||||
func s:CountTagsAndState(text)
|
||||
"{{{
|
||||
" Store the result in s:curind and s:nextrel. Update b:hi_newstate.block.
|
||||
let s:curind = 0 " relative indent steps for current line [unit &sw]:
|
||||
@ -304,7 +304,7 @@ func! s:CountTagsAndState(text)
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CountITags() and s:CountTagsAndState().
|
||||
func! s:CheckTag(itag)
|
||||
func s:CheckTag(itag)
|
||||
"{{{
|
||||
" Returns an empty string or "SCRIPT".
|
||||
" a:itag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
@ -338,7 +338,7 @@ func! s:CheckTag(itag)
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CheckTag(). Returns an empty string or "SCRIPT".
|
||||
func! s:CheckBlockTag(blocktag, ind)
|
||||
func s:CheckBlockTag(blocktag, ind)
|
||||
"{{{
|
||||
if a:ind > 0
|
||||
" a block starts here
|
||||
@ -366,7 +366,7 @@ func! s:CheckBlockTag(blocktag, ind)
|
||||
endfunc "}}}
|
||||
|
||||
" Used by s:CheckTag().
|
||||
func! s:CheckCustomTag(ctag)
|
||||
func s:CheckCustomTag(ctag)
|
||||
"{{{
|
||||
" Returns 1 if ctag is the tag for a custom element, 0 otherwise.
|
||||
" a:ctag can be "tag" or "/tag" or "<!--" or "-->"
|
||||
@ -396,7 +396,7 @@ func! s:CheckCustomTag(ctag)
|
||||
endfunc "}}}
|
||||
|
||||
" Return the <script> type: either "javascript" or ""
|
||||
func! s:GetScriptType(str)
|
||||
func s:GetScriptType(str)
|
||||
"{{{
|
||||
if a:str == "" || a:str =~ "java"
|
||||
return "javascript"
|
||||
@ -407,7 +407,7 @@ endfunc "}}}
|
||||
|
||||
" Look back in the file, starting at a:lnum - 1, to compute a state for the
|
||||
" start of line a:lnum. Return the new state.
|
||||
func! s:FreshState(lnum)
|
||||
func s:FreshState(lnum)
|
||||
"{{{
|
||||
" A state is to know ALL relevant details about the
|
||||
" lines 1..a:lnum-1, initial calculating (here!) can be slow, but updating is
|
||||
@ -568,24 +568,29 @@ func! s:FreshState(lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Indent inside a <pre> block: Keep indent as-is.
|
||||
func! s:Alien2()
|
||||
func s:Alien2()
|
||||
"{{{
|
||||
return -1
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent inside a <script> block for javascript.
|
||||
func! s:Alien3()
|
||||
func s:Alien3()
|
||||
"{{{
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
while lnum > 1 && getline(lnum) =~ '^\s*/[/*]'
|
||||
" Skip over comments to avoid that cindent() aligns with the <script> tag
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
endwhile
|
||||
if lnum < b:hi_indent.blocklnr
|
||||
" indent for <script> itself
|
||||
return b:hi_indent.blocktagind
|
||||
endif
|
||||
if lnum == b:hi_indent.blocklnr
|
||||
" indent for the first line after <script>
|
||||
return eval(b:hi_js1indent)
|
||||
endif
|
||||
if b:hi_indent.scripttype == "javascript"
|
||||
" indent for further lines
|
||||
return eval(b:hi_js1indent) + GetJavascriptIndent()
|
||||
else
|
||||
return -1
|
||||
@ -593,7 +598,7 @@ func! s:Alien3()
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent inside a <style> block.
|
||||
func! s:Alien4()
|
||||
func s:Alien4()
|
||||
"{{{
|
||||
if prevnonblank(v:lnum-1) == b:hi_indent.blocklnr
|
||||
" indent for first content line
|
||||
@ -603,7 +608,7 @@ func! s:Alien4()
|
||||
endfunc "}}}
|
||||
|
||||
" Indending inside a <style> block. Returns the indent.
|
||||
func! s:CSSIndent()
|
||||
func s:CSSIndent()
|
||||
"{{{
|
||||
" This handles standard CSS and also Closure stylesheets where special lines
|
||||
" start with @.
|
||||
@ -720,13 +725,13 @@ endfunc "}}}
|
||||
" tag: blah
|
||||
" tag: blah &&
|
||||
" tag: blah ||
|
||||
func! s:CssUnfinished(text)
|
||||
func s:CssUnfinished(text)
|
||||
"{{{
|
||||
return a:text =~ '\(||\|&&\|:\|\k\)\s*$'
|
||||
endfunc "}}}
|
||||
|
||||
" Search back for the first unfinished line above "lnum".
|
||||
func! s:CssFirstUnfinished(lnum, min_lnum)
|
||||
func s:CssFirstUnfinished(lnum, min_lnum)
|
||||
"{{{
|
||||
let align_lnum = a:lnum
|
||||
while align_lnum > a:min_lnum && s:CssUnfinished(getline(align_lnum - 1))
|
||||
@ -736,7 +741,7 @@ func! s:CssFirstUnfinished(lnum, min_lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Find the non-empty line at or before "lnum" that is not a comment.
|
||||
func! s:CssPrevNonComment(lnum, stopline)
|
||||
func s:CssPrevNonComment(lnum, stopline)
|
||||
"{{{
|
||||
" caller starts from a line a:lnum + 1 that is not a comment
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
@ -761,7 +766,7 @@ func! s:CssPrevNonComment(lnum, stopline)
|
||||
endfunc "}}}
|
||||
|
||||
" Check the number of {} and () in line "lnum". Return a dict with the counts.
|
||||
func! HtmlIndent_CountBraces(lnum)
|
||||
func HtmlIndent_CountBraces(lnum)
|
||||
"{{{
|
||||
let brs = substitute(getline(a:lnum), '[''"].\{-}[''"]\|/\*.\{-}\*/\|/\*.*$\|[^{}()]', '', 'g')
|
||||
let c_open = 0
|
||||
@ -794,7 +799,7 @@ func! HtmlIndent_CountBraces(lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent for a comment: <!-- -->
|
||||
func! s:Alien5()
|
||||
func s:Alien5()
|
||||
"{{{
|
||||
let curtext = getline(v:lnum)
|
||||
if curtext =~ '^\s*\zs-->'
|
||||
@ -826,7 +831,7 @@ func! s:Alien5()
|
||||
endfunc "}}}
|
||||
|
||||
" Return the indent for conditional comment: <!--[ ![endif]-->
|
||||
func! s:Alien6()
|
||||
func s:Alien6()
|
||||
"{{{
|
||||
let curtext = getline(v:lnum)
|
||||
if curtext =~ '\s*\zs<!\[endif\]-->'
|
||||
@ -840,7 +845,7 @@ func! s:Alien6()
|
||||
endfunc "}}}
|
||||
|
||||
" When the "lnum" line ends in ">" find the line containing the matching "<".
|
||||
func! HtmlIndent_FindTagStart(lnum)
|
||||
func HtmlIndent_FindTagStart(lnum)
|
||||
"{{{
|
||||
" Avoids using the indent of a continuation line.
|
||||
" Moves the cursor.
|
||||
@ -863,7 +868,7 @@ func! HtmlIndent_FindTagStart(lnum)
|
||||
endfunc "}}}
|
||||
|
||||
" Find the unclosed start tag from the current cursor position.
|
||||
func! HtmlIndent_FindStartTag()
|
||||
func HtmlIndent_FindStartTag()
|
||||
"{{{
|
||||
" The cursor must be on or before a closing tag.
|
||||
" If found, positions the cursor at the match and returns the line number.
|
||||
@ -877,7 +882,7 @@ func! HtmlIndent_FindStartTag()
|
||||
endfunc "}}}
|
||||
|
||||
" Moves the cursor from a "<" to the matching ">".
|
||||
func! HtmlIndent_FindTagEnd()
|
||||
func HtmlIndent_FindTagEnd()
|
||||
"{{{
|
||||
" Call this with the cursor on the "<" of a start tag.
|
||||
" This will move the cursor to the ">" of the matching end tag or, when it's
|
||||
@ -897,7 +902,7 @@ func! HtmlIndent_FindTagEnd()
|
||||
endfunc "}}}
|
||||
|
||||
" Indenting inside a start tag. Return the correct indent or -1 if unknown.
|
||||
func! s:InsideTag(foundHtmlString)
|
||||
func s:InsideTag(foundHtmlString)
|
||||
"{{{
|
||||
if a:foundHtmlString
|
||||
" Inside an attribute string.
|
||||
@ -958,7 +963,7 @@ func! s:InsideTag(foundHtmlString)
|
||||
endfunc "}}}
|
||||
|
||||
" THE MAIN INDENT FUNCTION. Return the amount of indent for v:lnum.
|
||||
func! HtmlIndent()
|
||||
func HtmlIndent()
|
||||
"{{{
|
||||
if prevnonblank(v:lnum - 1) < 1
|
||||
" First non-blank line has no indent.
|
||||
|
189
runtime/indent/jsonc.vim
Normal file
189
runtime/indent/jsonc.vim
Normal file
@ -0,0 +1,189 @@
|
||||
" Vim indent file
|
||||
" Language: JSONC (JSON with Comments)
|
||||
" Original Author: Izhak Jakov <izhak724@gmail.com>
|
||||
" Acknowledgement: Based off of vim-json maintained by Eli Parra <eli@elzr.com>
|
||||
" https://github.com/elzr/vim-json
|
||||
" Last Change: 2021-07-01
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nosmartindent
|
||||
|
||||
" Now, set up our indentation expression and keys that trigger it.
|
||||
setlocal indentexpr=GetJSONCIndent()
|
||||
setlocal indentkeys=0{,0},0),0[,0],!^F,o,O,e
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetJSONCIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" 1. Variables {{{1
|
||||
" ============
|
||||
|
||||
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
|
||||
" Regex that defines blocks.
|
||||
let s:block_regex = '\%({\)\s*\%(|\%([*@]\=\h\w*,\=\s*\)\%(,\s*[*@]\=\h\w*\)*|\)\=' . s:line_term
|
||||
|
||||
" 2. Auxiliary Functions {{{1
|
||||
" ======================
|
||||
|
||||
" Check if the character at lnum:col is inside a string.
|
||||
function s:IsInString(lnum, col)
|
||||
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'jsonString'
|
||||
endfunction
|
||||
|
||||
" Find line above 'lnum' that isn't empty, or in a string.
|
||||
function s:PrevNonBlankNonString(lnum)
|
||||
let lnum = prevnonblank(a:lnum)
|
||||
while lnum > 0
|
||||
" If the line isn't empty or in a string, end search.
|
||||
let line = getline(lnum)
|
||||
if !(s:IsInString(lnum, 1) && s:IsInString(lnum, strlen(line)))
|
||||
break
|
||||
endif
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
endwhile
|
||||
return lnum
|
||||
endfunction
|
||||
|
||||
" Check if line 'lnum' has more opening brackets than closing ones.
|
||||
function s:LineHasOpeningBrackets(lnum)
|
||||
let open_0 = 0
|
||||
let open_2 = 0
|
||||
let open_4 = 0
|
||||
let line = getline(a:lnum)
|
||||
let pos = match(line, '[][(){}]', 0)
|
||||
while pos != -1
|
||||
let idx = stridx('(){}[]', line[pos])
|
||||
if idx % 2 == 0
|
||||
let open_{idx} = open_{idx} + 1
|
||||
else
|
||||
let open_{idx - 1} = open_{idx - 1} - 1
|
||||
endif
|
||||
let pos = match(line, '[][(){}]', pos + 1)
|
||||
endwhile
|
||||
return (open_0 > 0) . (open_2 > 0) . (open_4 > 0)
|
||||
endfunction
|
||||
|
||||
function s:Match(lnum, regex)
|
||||
let col = match(getline(a:lnum), a:regex) + 1
|
||||
return col > 0 && !s:IsInString(a:lnum, col) ? col : 0
|
||||
endfunction
|
||||
|
||||
" 3. GetJSONCIndent Function {{{1
|
||||
" =========================
|
||||
|
||||
function GetJSONCIndent()
|
||||
if !exists("s:inside_comment")
|
||||
let s:inside_comment = 0
|
||||
endif
|
||||
|
||||
" 3.1. Setup {{{2
|
||||
" ----------
|
||||
|
||||
" Set up variables for restoring position in file. Could use v:lnum here.
|
||||
let vcol = col('.')
|
||||
|
||||
" 3.2. Work on the current line {{{2
|
||||
" -----------------------------
|
||||
|
||||
|
||||
" Get the current line.
|
||||
let line = getline(v:lnum)
|
||||
let ind = -1
|
||||
if s:inside_comment == 0
|
||||
" TODO iterate through all the matches in a line
|
||||
let col = matchend(line, '\/\*')
|
||||
if col > 0 && !s:IsInString(v:lnum, col)
|
||||
let s:inside_comment = 1
|
||||
endif
|
||||
endif
|
||||
" If we're in the middle of a comment
|
||||
if s:inside_comment == 1
|
||||
let col = matchend(line, '\*\/')
|
||||
if col > 0 && !s:IsInString(v:lnum, col)
|
||||
let s:inside_comment = 0
|
||||
endif
|
||||
return ind
|
||||
endif
|
||||
if line =~ '^\s*//'
|
||||
return ind
|
||||
endif
|
||||
|
||||
" If we got a closing bracket on an empty line, find its match and indent
|
||||
" according to it.
|
||||
let col = matchend(line, '^\s*[]}]')
|
||||
|
||||
if col > 0 && !s:IsInString(v:lnum, col)
|
||||
call cursor(v:lnum, col)
|
||||
let bs = strpart('{}[]', stridx('}]', line[col - 1]) * 2, 2)
|
||||
|
||||
let pairstart = escape(bs[0], '[')
|
||||
let pairend = escape(bs[1], ']')
|
||||
let pairline = searchpair(pairstart, '', pairend, 'bW')
|
||||
|
||||
if pairline > 0
|
||||
let ind = indent(pairline)
|
||||
else
|
||||
let ind = virtcol('.') - 1
|
||||
endif
|
||||
|
||||
return ind
|
||||
endif
|
||||
|
||||
" If we are in a multi-line string, don't do anything to it.
|
||||
if s:IsInString(v:lnum, matchend(line, '^\s*') + 1)
|
||||
return indent('.')
|
||||
endif
|
||||
|
||||
" 3.3. Work on the previous line. {{{2
|
||||
" -------------------------------
|
||||
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Set up variables for current line.
|
||||
let line = getline(lnum)
|
||||
let ind = indent(lnum)
|
||||
|
||||
" If the previous line ended with a block opening, add a level of indent.
|
||||
" if s:Match(lnum, s:block_regex)
|
||||
" return indent(lnum) + shiftwidth()
|
||||
" endif
|
||||
|
||||
" If the previous line contained an opening bracket, and we are still in it,
|
||||
" add indent depending on the bracket type.
|
||||
if line =~ '[[({]'
|
||||
let counts = s:LineHasOpeningBrackets(lnum)
|
||||
if counts[0] == '1' || counts[1] == '1' || counts[2] == '1'
|
||||
return ind + shiftwidth()
|
||||
else
|
||||
call cursor(v:lnum, vcol)
|
||||
end
|
||||
endif
|
||||
|
||||
" }}}2
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
" }}}1
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
" vim:set sw=2 sts=2 ts=8 noet:
|
@ -20,8 +20,8 @@ let s:comment_rx = '^\s*#'
|
||||
let s:rule_rx = '^[^ \t#:][^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||
let s:continued_rule_rx = '^[^#:]*:\{1,2}\%([^=:]\|$\)'
|
||||
let s:continuation_rx = '\\$'
|
||||
let s:assignment_rx = '^\s*\h\w*\s*[+?]\==\s*\zs.*\\$'
|
||||
let s:folded_assignment_rx = '^\s*\h\w*\s*[+?]\=='
|
||||
let s:assignment_rx = '^\s*\h\w*\s*[+:?]\==\s*\zs.*\\$'
|
||||
let s:folded_assignment_rx = '^\s*\h\w*\s*[+:?]\=='
|
||||
" TODO: This needs to be a lot more restrictive in what it matches.
|
||||
let s:just_inserted_rule_rx = '^\s*[^#:]\+:\{1,2}$'
|
||||
let s:conditional_directive_rx = '^ *\%(ifn\=\%(eq\|def\)\|else\)\>'
|
||||
|
@ -2,6 +2,7 @@
|
||||
" Language: Meson
|
||||
" License: VIM License
|
||||
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
||||
" Liam Beguin <liambeguin@gmail.com>
|
||||
" Original Authors: David Bustos <bustos@caltech.edu>
|
||||
" Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2019 Oct 18
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Pascal
|
||||
" Maintainer: Neil Carter <n.carter@swansea.ac.uk>
|
||||
" Created: 2004 Jul 13
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2021 Jul 01
|
||||
"
|
||||
" This is version 2.0, a complete rewrite.
|
||||
"
|
||||
@ -20,6 +20,8 @@ setlocal indentkeys+==end;,==const,==type,==var,==begin,==repeat,==until,==for
|
||||
setlocal indentkeys+==program,==function,==procedure,==object,==private
|
||||
setlocal indentkeys+==record,==if,==else,==case
|
||||
|
||||
let b:undo_indent = "setl indentkeys< indentexpr<"
|
||||
|
||||
if exists("*GetPascalIndent")
|
||||
finish
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Python
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Original Author: David Bustos <bustos@caltech.edu>
|
||||
" Last Change: 2019 Feb 21
|
||||
" Last Change: 2021 May 26
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
@ -191,7 +191,7 @@ function GetPythonIndent(lnum)
|
||||
if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
|
||||
|
||||
" Unless the previous line was a one-liner
|
||||
if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>'
|
||||
if getline(plnumstart) =~ '^\s*\(for\|if\|elif\|try\)\>'
|
||||
return plindent
|
||||
endif
|
||||
|
||||
|
@ -36,7 +36,7 @@ let b:did_indent = 1
|
||||
" Is syntax highlighting active ?
|
||||
let b:indent_use_syntax = has("syntax")
|
||||
|
||||
setlocal indentexpr=GetPerl6Indent()
|
||||
setlocal indentexpr=GetRakuIndent()
|
||||
|
||||
" we reset it first because the Perl 5 indent file might have been loaded due
|
||||
" to a .pl/pm file extension, and indent files don't clean up afterwards
|
||||
@ -50,7 +50,7 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
function! GetPerl6Indent()
|
||||
function! GetRakuIndent()
|
||||
|
||||
" Get the line to be indented
|
||||
let cline = getline(v:lnum)
|
||||
@ -60,11 +60,6 @@ function! GetPerl6Indent()
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Don't reindent coments on first column
|
||||
if cline =~ '^#'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" Get current syntax item at the line's first char
|
||||
let csynid = ''
|
||||
if b:indent_use_syntax
|
||||
@ -72,7 +67,7 @@ function! GetPerl6Indent()
|
||||
endif
|
||||
|
||||
" Don't reindent POD and heredocs
|
||||
if csynid =~ "^p6Pod"
|
||||
if csynid =~ "^rakuPod"
|
||||
return indent(v:lnum)
|
||||
endif
|
||||
|
||||
@ -92,7 +87,7 @@ function! GetPerl6Indent()
|
||||
let skippin = 2
|
||||
while skippin
|
||||
let synid = synIDattr(synID(lnum,1,0),"name")
|
||||
if (synid =~ "^p6Pod" || synid =~ "p6Comment")
|
||||
if (synid =~ "^rakuPod" || synid =~ "rakuComment")
|
||||
let lnum = prevnonblank(lnum - 1)
|
||||
if lnum == 0
|
||||
return 0
|
||||
@ -107,19 +102,19 @@ function! GetPerl6Indent()
|
||||
endif
|
||||
|
||||
if line =~ '[<«\[{(]\s*\(#[^)}\]»>]*\)\=$'
|
||||
let ind = ind + shiftwidth()
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
if cline =~ '^\s*[)}\]»>]'
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
" Indent lines that begin with 'or' or 'and'
|
||||
if cline =~ '^\s*\(or\|and\)\>'
|
||||
if line !~ '^\s*\(or\|and\)\>'
|
||||
let ind = ind + shiftwidth()
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
elseif line =~ '^\s*\(or\|and\)\>'
|
||||
let ind = ind - shiftwidth()
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
return ind
|
@ -2,7 +2,7 @@
|
||||
" Language: Rmd
|
||||
" Author: Jakson Alves de Aquino <jalvesaq@gmail.com>
|
||||
" Homepage: https://github.com/jalvesaq/R-Vim-runtime
|
||||
" Last Change: Sun Aug 19, 2018 09:14PM
|
||||
" Last Change: Sun Mar 28, 2021 08:05PM
|
||||
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
@ -13,7 +13,7 @@ runtime indent/r.vim
|
||||
let s:RIndent = function(substitute(&indentexpr, "()", "", ""))
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentkeys=0{,0},:,!^F,o,O,e
|
||||
setlocal indentkeys=0{,0},<:>,!^F,o,O,e
|
||||
setlocal indentexpr=GetRmdIndent()
|
||||
|
||||
if exists("*GetRmdIndent")
|
||||
@ -23,6 +23,21 @@ endif
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Simple Python indentation algorithm
|
||||
function s:GetPyIndent()
|
||||
let plnum = prevnonblank(v:lnum - 1)
|
||||
let pline = getline(plnum)
|
||||
let cline = getline(v:lnum)
|
||||
if pline =~ '^s```\s*{\s*python '
|
||||
return 0
|
||||
elseif pline =~ ':$'
|
||||
return indent(plnum) + &shiftwidth
|
||||
elseif cline =~ 'else:$'
|
||||
return indent(plnum) - &shiftwidth
|
||||
endif
|
||||
return indent(plnum)
|
||||
endfunction
|
||||
|
||||
function s:GetMdIndent()
|
||||
let pline = getline(v:lnum - 1)
|
||||
let cline = getline(v:lnum)
|
||||
@ -37,13 +52,14 @@ function s:GetMdIndent()
|
||||
endfunction
|
||||
|
||||
function s:GetYamlIndent()
|
||||
let pline = getline(v:lnum - 1)
|
||||
let plnum = prevnonblank(v:lnum - 1)
|
||||
let pline = getline(plnum)
|
||||
if pline =~ ':\s*$'
|
||||
return indent(v:lnum) + shiftwidth()
|
||||
return indent(plnum) + shiftwidth()
|
||||
elseif pline =~ '^\s*- '
|
||||
return indent(v:lnum) + 2
|
||||
endif
|
||||
return indent(prevnonblank(v:lnum - 1))
|
||||
return indent(plnum)
|
||||
endfunction
|
||||
|
||||
function GetRmdIndent()
|
||||
@ -52,9 +68,11 @@ function GetRmdIndent()
|
||||
endif
|
||||
if search('^[ \t]*```{r', "bncW") > search('^[ \t]*```$', "bncW")
|
||||
return s:RIndent()
|
||||
elseif v:lnum > 1 && search('^---$', "bnW") == 1 &&
|
||||
\ (search('^---$', "nW") > v:lnum || search('^...$', "nW") > v:lnum)
|
||||
elseif v:lnum > 1 && (search('^---$', "bnW") == 1 &&
|
||||
\ (search('^---$', "nW") > v:lnum || search('^\.\.\.$', "nW") > v:lnum))
|
||||
return s:GetYamlIndent()
|
||||
elseif search('^[ \t]*```{python', "bncW") > search('^[ \t]*```$', "bncW")
|
||||
return s:GetPyIndent()
|
||||
else
|
||||
return s:GetMdIndent()
|
||||
endif
|
||||
|
@ -4,6 +4,7 @@
|
||||
" Previous Maintainer: Nikolai Weibull <now at bitwi.se>
|
||||
" URL: https://github.com/vim-ruby/vim-ruby
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2021 Feb 03
|
||||
|
||||
" 0. Initialization {{{1
|
||||
" =================
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user