mirror of
https://github.com/zoriya/vim.git
synced 2025-12-06 07:16:15 +00:00
Compare commits
514 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8ba2738f06 | |||
|
|
663d18d610 | ||
|
|
fd771613b3 | ||
|
|
0c3e57b403 | ||
|
|
e80f345b5d | ||
|
|
8dc98bf427 | ||
|
|
d4088edae2 | ||
|
|
34e271b321 | ||
|
|
39a4eb0b2c | ||
|
|
f27e80a6e1 | ||
|
|
2bee7e43e1 | ||
|
|
810785c689 | ||
|
|
48fa3198b7 | ||
|
|
6de7191c31 | ||
|
|
80ed8b8761 | ||
|
|
2e1f757f7b | ||
|
|
32b7e3a8c9 | ||
|
|
ab9a8947d7 | ||
|
|
b0206e9fb5 | ||
|
|
df4b3ca5dc | ||
|
|
14ede1890f | ||
|
|
df67fc0e69 | ||
|
|
49a35f67eb | ||
|
|
5113831d16 | ||
|
|
f0ab3e4e41 | ||
|
|
3b3318b640 | ||
|
|
7b12ac3ad8 | ||
|
|
f2e08a1e54 | ||
|
|
f6ba8defc6 | ||
|
|
231b4fc3cc | ||
|
|
e51043ad9f | ||
|
|
223d6c0a94 | ||
|
|
7b239f6d47 | ||
|
|
e6ccb643a6 | ||
|
|
2e252474c4 | ||
|
|
b7f19a5459 | ||
|
|
6c57c30ad4 | ||
|
|
b9b762c21f | ||
|
|
0a3b9fb5c2 | ||
|
|
157397edff | ||
|
|
5a04999a74 | ||
|
|
f07ae5b3bd | ||
|
|
6d2efd4920 | ||
|
|
b9ea0a89fa | ||
|
|
9b67a2e1dd | ||
|
|
de6a313014 | ||
|
|
ae01b96004 | ||
|
|
5ddcecf05f | ||
|
|
9360de9027 | ||
|
|
a32daed559 | ||
|
|
b6ab33bdb2 | ||
|
|
00d3459ea6 | ||
|
|
9739086de2 | ||
|
|
e62d93ead1 | ||
|
|
084529c03d | ||
|
|
8d0bb6dc9f | ||
|
|
f07c10d7bb | ||
|
|
08be9ddc85 | ||
|
|
4ce1cb5bf1 | ||
|
|
89a107efd1 | ||
|
|
7cb24917a1 | ||
|
|
92195ae72f | ||
|
|
62e3014ab1 | ||
|
|
70881ba195 | ||
|
|
f173f4249f | ||
|
|
2328a39a54 | ||
|
|
fb27cf9cb1 | ||
|
|
c673b805ad | ||
|
|
af0fed5988 | ||
|
|
13c1153eef | ||
|
|
83029a354e | ||
|
|
c363ca1ecd | ||
|
|
3baf19a2b1 | ||
|
|
b183f50280 | ||
|
|
59c8880ade | ||
|
|
cbdc3c1f7a | ||
|
|
f25d8f9312 | ||
|
|
beccb33977 | ||
|
|
b2a8df35e8 | ||
|
|
d0186c54c2 | ||
|
|
80d72aa547 | ||
|
|
116d2787ad | ||
|
|
21c37d7f69 | ||
|
|
d32bf0a067 | ||
|
|
f4ccada5c3 | ||
|
|
a977883ef3 | ||
|
|
38281e1b96 | ||
|
|
98874dca6d | ||
|
|
6c3027744e | ||
|
|
9c3330de28 | ||
|
|
3353833f89 | ||
|
|
bb95589473 | ||
|
|
381ff7726e | ||
|
|
6a38aff218 | ||
|
|
368ef5a48c | ||
|
|
a2a2fe841e | ||
|
|
3920bb4356 | ||
|
|
468db1f8af | ||
|
|
3f7d584e96 | ||
|
|
0a4e57f44a | ||
|
|
b100477190 | ||
|
|
41d6de2974 | ||
|
|
6fea0a5480 | ||
|
|
3a3a2c921c | ||
|
|
b34622579c | ||
|
|
5a2e0cf5f1 | ||
|
|
b48108d58e | ||
|
|
3c5d782dbc | ||
|
|
6e19993991 | ||
|
|
7d1bb90dcf | ||
|
|
fbe9a6903a | ||
|
|
ed89206efe | ||
|
|
e203841e0d | ||
|
|
6cc3027e54 | ||
|
|
e29c8bafa7 | ||
|
|
618c4d36ca | ||
|
|
c942f84aad | ||
|
|
95a03fc321 | ||
|
|
d66d68763d | ||
|
|
5c42c77315 | ||
|
|
dff3c9c1a7 | ||
|
|
eed63f96d2 | ||
|
|
b66cac1a8e | ||
|
|
ff70518f12 | ||
|
|
36f36715e6 | ||
|
|
ad4764f65b | ||
|
|
ad3b6a3340 | ||
|
|
85ee742f1e | ||
|
|
65be834c30 | ||
|
|
92b36663f8 | ||
|
|
6e6aff0f7a | ||
|
|
8cc43daee1 | ||
|
|
d9e9f89e0f | ||
|
|
72212c9bea | ||
|
|
481992cea9 | ||
|
|
51d4d84d6a | ||
|
|
ee9bc68f03 | ||
|
|
41afa308d6 | ||
|
|
bdb5f85a51 | ||
|
|
73785accfd | ||
|
|
1c5a120a70 | ||
|
|
215c82d061 | ||
|
|
39a94d2048 | ||
|
|
eda923e9c9 | ||
|
|
ea0e41a115 | ||
|
|
8a52587ee0 | ||
|
|
4854647abe | ||
|
|
fdfcce56a6 | ||
|
|
c6db53ce5f | ||
|
|
336fb22eae | ||
|
|
189e24bb14 | ||
|
|
cdbbdb9ece | ||
|
|
23eea9b984 | ||
|
|
1d20ad0bbd | ||
|
|
0b5926f77f | ||
|
|
5ccf7f1407 | ||
|
|
2e359b98f2 | ||
|
|
876de275cb | ||
|
|
b534e80008 | ||
|
|
6fa304f27d | ||
|
|
12e1729e89 | ||
|
|
e7ea4ba723 | ||
|
|
fd6693ca5c | ||
|
|
198ada3d9f | ||
|
|
9a39483adb | ||
|
|
768728b487 | ||
|
|
959ef61430 | ||
|
|
c74a87eea2 | ||
|
|
c7a96d6d1a | ||
|
|
3c2596a9e9 | ||
|
|
aa16b30552 | ||
|
|
dd21c89626 | ||
|
|
a49c077a88 | ||
|
|
075aeea404 | ||
|
|
c0d30eff6d | ||
|
|
60ddb1a140 | ||
|
|
14382c8bc9 | ||
|
|
3d670bb191 | ||
|
|
65311c6f47 | ||
|
|
2cddf0e85a | ||
|
|
511eb84c08 | ||
|
|
80b662009c | ||
|
|
ac023e8baa | ||
|
|
7e501f4d99 | ||
|
|
9f25a3a237 | ||
|
|
0a850673e3 | ||
|
|
ea49002aca | ||
|
|
5757a20547 | ||
|
|
57b947e3c3 | ||
|
|
c1e6621a59 | ||
|
|
78ca80f856 | ||
|
|
c847c12cdd | ||
|
|
ccc024f3a7 | ||
|
|
f63449a5d1 | ||
|
|
9f860a14c3 | ||
|
|
a01148d2cb | ||
|
|
d7745acbd8 | ||
|
|
5e6ea92b2c | ||
|
|
991603cc04 | ||
|
|
cacfccf803 | ||
|
|
4dd6c22ebe | ||
|
|
9c69453f0e | ||
|
|
c8dfcfc53b | ||
|
|
cb34507b5f | ||
|
|
fa41a3ed1e | ||
|
|
3cf094edaf | ||
|
|
8bc4d25abe | ||
|
|
4927daef60 | ||
|
|
ae1c8b790b | ||
|
|
b5c1557323 | ||
|
|
e2c27ca8ef | ||
|
|
a13bd294ab | ||
|
|
fdac54d7bb | ||
|
|
9a65a8c270 | ||
|
|
a87462a498 | ||
|
|
a15dfc2d41 | ||
|
|
a73dfc2f55 | ||
|
|
bd4614f43d | ||
|
|
ba9e1570d2 | ||
|
|
9848face74 | ||
|
|
8b94afc207 | ||
|
|
deda23f850 | ||
|
|
5c66e23c62 | ||
|
|
54996ecda0 | ||
|
|
ba0b458570 | ||
|
|
232a77e80a | ||
|
|
7e4b861da9 | ||
|
|
7c3b65eb3e | ||
|
|
bc32bbddcf | ||
|
|
0684800c85 | ||
|
|
4bd9b2b246 | ||
|
|
de094dcd6f | ||
|
|
0acd3abfad | ||
|
|
460799d885 | ||
|
|
437bc13ea1 | ||
|
|
8b97ca66cf | ||
|
|
dbf231a4b7 | ||
|
|
c4208da0f4 | ||
|
|
8e013b1421 | ||
|
|
9b05326afd | ||
|
|
8b96858996 | ||
|
|
5ca8f223f0 | ||
|
|
f18987caa5 | ||
|
|
e798446362 | ||
|
|
210c49bbe8 | ||
|
|
24078e39cd | ||
|
|
13a6605ddf | ||
|
|
002ccbfac4 | ||
|
|
129a8446d2 | ||
|
|
4b9fa95712 | ||
|
|
a1b654ff36 | ||
|
|
2e48567007 | ||
|
|
feea1b444e | ||
|
|
1083cae709 | ||
|
|
6fbf63de86 | ||
|
|
45e0704d96 | ||
|
|
e7a1bbf210 | ||
|
|
56d45f1b66 | ||
|
|
622f6f5b9a | ||
|
|
7724d621f2 | ||
|
|
7c5152826f | ||
|
|
5b63b236a0 | ||
|
|
18defabaeb | ||
|
|
6065755a39 | ||
|
|
060107cbc4 | ||
|
|
bbe5252c2c | ||
|
|
8e6b5034f3 | ||
|
|
624bb83619 | ||
|
|
50732c7ba6 | ||
|
|
a14c457cad | ||
|
|
5e7f43b6ac | ||
|
|
815c822aaf | ||
|
|
0f60fbf679 | ||
|
|
07c9ab8c05 | ||
|
|
28d3941ede | ||
|
|
d91124f926 | ||
|
|
39f52a6249 | ||
|
|
6e410c9112 | ||
|
|
c9e8640476 | ||
|
|
6d9a145d71 | ||
|
|
64a536d4fa | ||
|
|
a063b22b3b | ||
|
|
715a58fda6 | ||
|
|
ea19e7856b | ||
|
|
fd1a838d36 | ||
|
|
39cd9061b1 | ||
|
|
3780c11267 | ||
|
|
5ccac75d96 | ||
|
|
59834ba6df | ||
|
|
8bb5eaf019 | ||
|
|
cef8ab2c75 | ||
|
|
c04bc64ba6 | ||
|
|
93f65a4ab8 | ||
|
|
19bc76c929 | ||
|
|
9dadfe7a52 | ||
|
|
09cc8c92d1 | ||
|
|
ac2bb9dfea | ||
|
|
c39c0230c4 | ||
|
|
2cf145b78b | ||
|
|
17c71daf83 | ||
|
|
a54816b884 | ||
|
|
6eda269600 | ||
|
|
ca6231b8a6 | ||
|
|
9fd5d9674f | ||
|
|
46dcd84d24 | ||
|
|
6081c17890 | ||
|
|
b256221e83 | ||
|
|
a13f3a4f5d | ||
|
|
0b8176dff2 | ||
|
|
b3ec5643cd | ||
|
|
29ce419076 | ||
|
|
bc10be7a40 | ||
|
|
d181bafd0b | ||
|
|
8854244587 | ||
|
|
8ce738de3f | ||
|
|
8d4477ef22 | ||
|
|
f1d83c4c71 | ||
|
|
a95d6a3d64 | ||
|
|
84b5b1c660 | ||
|
|
26113e5ae3 | ||
|
|
b5e7da1f27 | ||
|
|
15f69de263 | ||
|
|
69f85c6506 | ||
|
|
4d618006ec | ||
|
|
55adc5b46a | ||
|
|
6be21b937d | ||
|
|
79f6ffd388 | ||
|
|
a68bd6f089 | ||
|
|
d52fb2fabd | ||
|
|
8b0fa7a565 | ||
|
|
9f32069b8c | ||
|
|
aa2ce6f580 | ||
|
|
05a40e07c2 | ||
|
|
203c7225f5 | ||
|
|
20e045f781 | ||
|
|
baab7c0865 | ||
|
|
1e2007e643 | ||
|
|
d69ffbe4bc | ||
|
|
bdac2ef6fe | ||
|
|
70197885a8 | ||
|
|
7c96776729 | ||
|
|
3d7e567ea7 | ||
|
|
a04003a929 | ||
|
|
8f1d09828a | ||
|
|
2abec431e1 | ||
|
|
ce35ee8986 | ||
|
|
912fbaf6e8 | ||
|
|
91d26aa338 | ||
|
|
de79f9129a | ||
|
|
fdf135a052 | ||
|
|
118072862b | ||
|
|
d0809869d6 | ||
|
|
2f6efaccfd | ||
|
|
aeb1c97db5 | ||
|
|
626b6ab486 | ||
|
|
6d5f4a0bed | ||
|
|
3e5bbb8e11 | ||
|
|
b38700ac81 | ||
|
|
231480f975 | ||
|
|
a441a3eaab | ||
|
|
5e7a6a4a10 | ||
|
|
142cad1f88 | ||
|
|
94606f70e2 | ||
|
|
8be10aa9e4 | ||
|
|
19be0eb7f0 | ||
|
|
ceec8640df | ||
|
|
92b59c628a | ||
|
|
8df07d0ca3 | ||
|
|
6eca04e9f1 | ||
|
|
bfe568d8c4 | ||
|
|
421ed14b8a | ||
|
|
a7d456191d | ||
|
|
0887e62bce | ||
|
|
4f5681dbdf | ||
|
|
539349cb32 | ||
|
|
c73fc86bf8 | ||
|
|
cc15bbcbc4 | ||
|
|
f10db25367 | ||
|
|
b498c44444 | ||
|
|
5e48e97e42 | ||
|
|
8fc2a097e2 | ||
|
|
6c2fc377bf | ||
|
|
4bfb89996f | ||
|
|
5e53fca76f | ||
|
|
c0cba184f5 | ||
|
|
a2834e17d1 | ||
|
|
991657e87d | ||
|
|
6a1deaf5ad | ||
|
|
5bcfb5a30c | ||
|
|
793c315115 | ||
|
|
27fbf6e5e8 | ||
|
|
83a06705dc | ||
|
|
322ad0c953 | ||
|
|
0c59c30271 | ||
|
|
7b5e52d16f | ||
|
|
7d755d8ef3 | ||
|
|
b516598092 | ||
|
|
a2aa921f76 | ||
|
|
0f146b7925 | ||
|
|
f64bafd98a | ||
|
|
a4205471ad | ||
|
|
6e918538b1 | ||
|
|
5dcee3c723 | ||
|
|
367499c5c3 | ||
|
|
05d0893ed8 | ||
|
|
1961cafc99 | ||
|
|
eac806bf0b | ||
|
|
ea997edc7a | ||
|
|
59086a25c4 | ||
|
|
484facebe4 | ||
|
|
85f36d61e0 | ||
|
|
e58e9015cc | ||
|
|
7baa014d0f | ||
|
|
0fe17f8ffb | ||
|
|
0407d621bb | ||
|
|
347d43bd33 | ||
|
|
ded59139fd | ||
|
|
830a802f91 | ||
|
|
c9aa6e4f2a | ||
|
|
cb1d1dcc87 | ||
|
|
d3b55d7f76 | ||
|
|
015c84ce54 | ||
|
|
ccf8907570 | ||
|
|
6e56484f05 | ||
|
|
5df3cb2898 | ||
|
|
4f51f3a573 | ||
|
|
48f3833ff0 | ||
|
|
fd4e47e06b | ||
|
|
51b62387be | ||
|
|
818c641b6f | ||
|
|
ec0229414b | ||
|
|
a9c6f90918 | ||
|
|
1a31c430bb | ||
|
|
d4ad4c9b3e | ||
|
|
b065a10e24 | ||
|
|
7c3f9af0ed | ||
|
|
89872f58a9 | ||
|
|
af449f69c7 | ||
|
|
738ebfea41 | ||
|
|
8ee0e0b8e3 | ||
|
|
7b27fc49a8 | ||
|
|
40c6babc17 | ||
|
|
60310a4b26 | ||
|
|
075ab5ab3b | ||
|
|
a6d9e3c4e0 | ||
|
|
2982299699 | ||
|
|
ae62fe5c28 | ||
|
|
f416a2220f | ||
|
|
5d64e28011 | ||
|
|
6a89c94a9e | ||
|
|
e021f39b79 | ||
|
|
47f8584a80 | ||
|
|
25732435c5 | ||
|
|
baee8448d1 | ||
|
|
b50bc9ad55 | ||
|
|
563e8ec8c7 | ||
|
|
85f054aa3f | ||
|
|
de6c1d1182 | ||
|
|
0fb25515cc | ||
|
|
5dd4ec0089 | ||
|
|
ea84202372 | ||
|
|
ee20fc8062 | ||
|
|
9142136161 | ||
|
|
8feed3a525 | ||
|
|
fa117387ee | ||
|
|
6db3fc5632 | ||
|
|
c3989f184d | ||
|
|
8a2aea8a62 | ||
|
|
7cd6edf2b7 | ||
|
|
998f018df3 | ||
|
|
1678ca36c8 | ||
|
|
1a2870b57a | ||
|
|
06fe70c183 | ||
|
|
c854efc6fe | ||
|
|
2c41dad387 | ||
|
|
25876a6cdd | ||
|
|
d9af78b945 | ||
|
|
166f89e049 | ||
|
|
ac8a10ab76 | ||
|
|
6908428560 | ||
|
|
770b38df40 | ||
|
|
a7229c8a99 | ||
|
|
be551dacb8 | ||
|
|
f1694b439b | ||
|
|
a6de28755e | ||
|
|
a0c14ef310 | ||
|
|
e6b01cfe01 | ||
|
|
fdcb08264d | ||
|
|
87b65652e8 | ||
|
|
597aadcf21 | ||
|
|
50423ab808 | ||
|
|
35699f1749 | ||
|
|
e019f3626d | ||
|
|
9dfe1110fd | ||
|
|
f86568f918 | ||
|
|
23079450a8 | ||
|
|
41c7bbaf8f | ||
|
|
c18a9d5835 | ||
|
|
4298c5f472 | ||
|
|
89b9bb4ac8 | ||
|
|
202c467bb3 | ||
|
|
f21d28a5c7 | ||
|
|
a81813d007 | ||
|
|
3f6981d8c8 | ||
|
|
5ca3efa5d9 | ||
|
|
7cfe693f9b | ||
|
|
150227258d | ||
|
|
5e95c8f637 | ||
|
|
fdd1819b5f | ||
|
|
59b089c9df | ||
|
|
4d427d4cab | ||
|
|
0f5effbd1f | ||
|
|
59149f0269 | ||
|
|
86dc4f8b43 |
12
.cirrus.yml
12
.cirrus.yml
@@ -5,9 +5,9 @@ env:
|
||||
freebsd_task:
|
||||
name: FreeBSD
|
||||
matrix:
|
||||
- name: FreeBSD 14.1
|
||||
- name: FreeBSD 14.2
|
||||
freebsd_instance:
|
||||
image_family: freebsd-14-1
|
||||
image_family: freebsd-14-2
|
||||
timeout_in: 20m
|
||||
install_script:
|
||||
- pkg install -y gettext
|
||||
@@ -21,3 +21,11 @@ freebsd_task:
|
||||
- pw useradd cirrus -m
|
||||
- chown -R cirrus:cirrus .
|
||||
- sudo -u cirrus make test
|
||||
on_failure:
|
||||
test_artifacts:
|
||||
name: "Cirrus-CI-freebsd-failed-tests"
|
||||
path: |
|
||||
runtime/indent/testdir/*.fail
|
||||
runtime/syntax/testdir/failed/*
|
||||
src/testdir/failed/*
|
||||
type: application/octet-stream
|
||||
|
||||
254
.clang-format
Normal file
254
.clang-format
Normal file
@@ -0,0 +1,254 @@
|
||||
---
|
||||
Language: Cpp
|
||||
AccessModifierOffset: -4
|
||||
AlignAfterOpenBracket: Align
|
||||
AlignArrayOfStructures: None
|
||||
AlignConsecutiveAssignments:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveBitFields:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveDeclarations:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveMacros:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCompound: false
|
||||
AlignFunctionPointers: false
|
||||
PadOperators: false
|
||||
AlignConsecutiveShortCaseStatements:
|
||||
Enabled: false
|
||||
AcrossEmptyLines: false
|
||||
AcrossComments: false
|
||||
AlignCaseColons: false
|
||||
AlignEscapedNewlines: DontAlign
|
||||
AlignOperands: Align
|
||||
AlignTrailingComments:
|
||||
Kind: Leave
|
||||
OverEmptyLines: 0
|
||||
AllowAllArgumentsOnNextLine: false
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
AllowBreakBeforeNoexceptSpecifier: Never
|
||||
AllowShortBlocksOnASingleLine: Never
|
||||
AllowShortCaseLabelsOnASingleLine: false
|
||||
AllowShortCompoundRequirementOnASingleLine: true
|
||||
AllowShortEnumsOnASingleLine: false
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
AllowShortIfStatementsOnASingleLine: Never
|
||||
AllowShortLambdasOnASingleLine: None
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakAfterDefinitionReturnType: All
|
||||
AlwaysBreakAfterReturnType: AllDefinitions
|
||||
AlwaysBreakBeforeMultilineStrings: false
|
||||
AlwaysBreakTemplateDeclarations: MultiLine
|
||||
BinPackArguments: true
|
||||
BinPackParameters: false
|
||||
BitFieldColonSpacing: Both
|
||||
BraceWrapping:
|
||||
AfterCaseLabel: true
|
||||
AfterClass: true
|
||||
AfterControlStatement: Always
|
||||
AfterEnum: true
|
||||
AfterExternBlock: true
|
||||
AfterFunction: true
|
||||
AfterNamespace: true
|
||||
AfterObjCDeclaration: true
|
||||
AfterStruct: true
|
||||
AfterUnion: true
|
||||
BeforeCatch: true
|
||||
BeforeElse: true
|
||||
BeforeLambdaBody: false
|
||||
BeforeWhile: true
|
||||
IndentBraces: false
|
||||
SplitEmptyFunction: true
|
||||
SplitEmptyRecord: true
|
||||
SplitEmptyNamespace: true
|
||||
BreakAdjacentStringLiterals: true
|
||||
BreakAfterAttributes: Leave
|
||||
BreakAfterJavaFieldAnnotations: false
|
||||
BreakArrays: true
|
||||
BreakBeforeBinaryOperators: None
|
||||
BreakBeforeConceptDeclarations: Always
|
||||
BreakBeforeBraces: Custom
|
||||
BreakBeforeInlineASMColon: OnlyMultiline
|
||||
BreakBeforeTernaryOperators: true
|
||||
BreakConstructorInitializers: BeforeColon
|
||||
BreakInheritanceList: BeforeColon
|
||||
BreakStringLiterals: true
|
||||
ColumnLimit: 80
|
||||
CommentPragmas: '^ IWYU pragma:'
|
||||
CompactNamespaces: false
|
||||
ConstructorInitializerIndentWidth: 4
|
||||
ContinuationIndentWidth: 4
|
||||
Cpp11BracedListStyle: false
|
||||
DerivePointerAlignment: false
|
||||
DisableFormat: false
|
||||
EmptyLineAfterAccessModifier: Never
|
||||
EmptyLineBeforeAccessModifier: LogicalBlock
|
||||
ExperimentalAutoDetectBinPacking: false
|
||||
FixNamespaceComments: false
|
||||
IfMacros:
|
||||
- KJ_IF_MAYBE
|
||||
IncludeBlocks: Preserve
|
||||
IncludeCategories:
|
||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||
Priority: 2
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||
Priority: 3
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
- Regex: '.*'
|
||||
Priority: 1
|
||||
SortPriority: 0
|
||||
CaseSensitive: false
|
||||
IncludeIsMainRegex: '(Test)?$'
|
||||
IncludeIsMainSourceRegex: ''
|
||||
IndentAccessModifiers: false
|
||||
IndentCaseBlocks: false
|
||||
IndentCaseLabels: true
|
||||
IndentExternBlock: AfterExternBlock
|
||||
IndentGotoLabels: true
|
||||
IndentPPDirectives: AfterHash
|
||||
IndentRequiresClause: true
|
||||
IndentWidth: 4
|
||||
IndentWrappedFunctionNames: false
|
||||
InsertBraces: false
|
||||
InsertNewlineAtEOF: false
|
||||
InsertTrailingCommas: None
|
||||
IntegerLiteralSeparator:
|
||||
Binary: 0
|
||||
BinaryMinDigits: 0
|
||||
Decimal: 0
|
||||
DecimalMinDigits: 0
|
||||
Hex: 0
|
||||
HexMinDigits: 0
|
||||
JavaScriptQuotes: Leave
|
||||
JavaScriptWrapImports: true
|
||||
KeepEmptyLinesAtTheStartOfBlocks: true
|
||||
KeepEmptyLinesAtEOF: false
|
||||
LambdaBodyIndentation: Signature
|
||||
LineEnding: DeriveLF
|
||||
MacroBlockBegin: ''
|
||||
MacroBlockEnd: ''
|
||||
MaxEmptyLinesToKeep: 1
|
||||
NamespaceIndentation: None
|
||||
ObjCBinPackProtocolList: Auto
|
||||
ObjCBlockIndentWidth: 4
|
||||
ObjCBreakBeforeNestedBlockParam: true
|
||||
ObjCSpaceAfterProperty: false
|
||||
ObjCSpaceBeforeProtocolList: true
|
||||
PackConstructorInitializers: BinPack
|
||||
PenaltyBreakAssignment: 4
|
||||
PenaltyBreakBeforeFirstCallParameter: 19
|
||||
PenaltyBreakComment: 1000000000
|
||||
PenaltyBreakFirstLessLess: 120
|
||||
PenaltyBreakOpenParenthesis: 0
|
||||
PenaltyBreakScopeResolution: 500
|
||||
PenaltyBreakString: 1000
|
||||
PenaltyBreakTemplateDeclaration: 10
|
||||
PenaltyExcessCharacter: 1000000
|
||||
PenaltyIndentedWhitespace: 0
|
||||
PenaltyReturnTypeOnItsOwnLine: 60
|
||||
PointerAlignment: Right
|
||||
PPIndentWidth: 1
|
||||
QualifierAlignment: Leave
|
||||
ReferenceAlignment: Pointer
|
||||
ReflowComments: false
|
||||
RemoveBracesLLVM: false
|
||||
RemoveParentheses: Leave
|
||||
RemoveSemicolon: false
|
||||
RequiresClausePosition: OwnLine
|
||||
RequiresExpressionIndentation: OuterScope
|
||||
SeparateDefinitionBlocks: Leave
|
||||
ShortNamespaceLines: 1
|
||||
SkipMacroDefinitionBody: false
|
||||
SortIncludes: CaseSensitive
|
||||
SortJavaStaticImport: Before
|
||||
SortUsingDeclarations: LexicographicNumeric
|
||||
SpaceAfterCStyleCast: false
|
||||
SpaceAfterLogicalNot: false
|
||||
SpaceAfterTemplateKeyword: true
|
||||
SpaceAroundPointerQualifiers: Default
|
||||
SpaceBeforeAssignmentOperators: true
|
||||
SpaceBeforeCaseColon: false
|
||||
SpaceBeforeCpp11BracedList: false
|
||||
SpaceBeforeCtorInitializerColon: true
|
||||
SpaceBeforeInheritanceColon: true
|
||||
SpaceBeforeJsonColon: false
|
||||
SpaceBeforeParens: ControlStatementsExceptControlMacros
|
||||
SpaceBeforeRangeBasedForLoopColon: true
|
||||
SpaceBeforeSquareBrackets: false
|
||||
SpaceInEmptyBlock: false
|
||||
SpacesBeforeTrailingComments: 1
|
||||
SpacesInAngles: Never
|
||||
SpacesInContainerLiterals: true
|
||||
SpacesInLineCommentPrefix:
|
||||
Minimum: 1
|
||||
Maximum: -1
|
||||
SpacesInParens: Never
|
||||
SpacesInParensOptions:
|
||||
InCStyleCasts: false
|
||||
InConditionalStatements: false
|
||||
InEmptyParentheses: false
|
||||
Other: false
|
||||
SpacesInSquareBrackets: false
|
||||
Standard: c++03
|
||||
TabWidth: 8
|
||||
UseTab: Never
|
||||
VerilogBreakBetweenInstancePorts: true
|
||||
WhitespaceSensitiveMacros:
|
||||
- BOOST_PP_STRINGIZE
|
||||
- CF_SWIFT_NAME
|
||||
- NS_SWIFT_NAME
|
||||
- PP_STRINGIZE
|
||||
- STRINGIZE
|
||||
|
||||
# Taken from:
|
||||
# git grep '^#define *FOR_*' src | cut -d':' -f2 | grep -o '[A-Z]*_.*(' \
|
||||
# | tr -d '(' | LC_ALL=C sort -u
|
||||
ForEachMacros:
|
||||
- 'FOR_ALL_AUTOCMD_PATTERNS'
|
||||
- 'FOR_ALL_BUFFERS'
|
||||
- 'FOR_ALL_BUFS_FROM_LAST'
|
||||
- 'FOR_ALL_BUF_WININFO'
|
||||
- 'FOR_ALL_CHANNELS'
|
||||
- 'FOR_ALL_CHILD_MENUS'
|
||||
- 'FOR_ALL_DIFFBLOCKS_IN_TAB'
|
||||
- 'FOR_ALL_FRAMES'
|
||||
- 'FOR_ALL_HASHTAB_ITEMS'
|
||||
- 'FOR_ALL_JOBS'
|
||||
- 'FOR_ALL_LIST_ITEMS'
|
||||
- 'FOR_ALL_MENUS'
|
||||
- 'FOR_ALL_NODE_SIBLINGS'
|
||||
- 'FOR_ALL_POPUPWINS'
|
||||
- 'FOR_ALL_POPUPWINS_IN_TAB'
|
||||
- 'FOR_ALL_QFL_ITEMS'
|
||||
- 'FOR_ALL_SIGNS'
|
||||
- 'FOR_ALL_SIGNS_IN_BUF'
|
||||
- 'FOR_ALL_SPELL_LANGS'
|
||||
- 'FOR_ALL_SYNSTATES'
|
||||
- 'FOR_ALL_TABPAGES'
|
||||
- 'FOR_ALL_TAB_WINDOWS'
|
||||
- 'FOR_ALL_TERMS'
|
||||
- 'FOR_ALL_TIMERS'
|
||||
- 'FOR_ALL_WATCHERS'
|
||||
- 'FOR_ALL_WINDOWS'
|
||||
- 'FOR_ALL_WINDOWS_IN_TAB'
|
||||
...
|
||||
29
.editorconfig
Normal file
29
.editorconfig
Normal file
@@ -0,0 +1,29 @@
|
||||
# https://spec.editorconfig.org/#supported-pairs
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
tab_width = 8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{c,h,proto}]
|
||||
indent_size = 4
|
||||
|
||||
[*.{md,yml,sh,bat}]
|
||||
# This will become the default after we migrate the codebase
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
# Markdown uses trailing whitespaces to do an hard line break
|
||||
# https://spec.commonmark.org/0.31.2/#hard-line-breaks
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[runtime/doc/**.txt]
|
||||
# It can mess up some documentation by trying to strip trailing whitespaces
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[src/testdir/test*.vim]
|
||||
# Some tests need trailing whitespaces, for example `set showbreak=>>\ `
|
||||
trim_trailing_whitespace = false
|
||||
15
.git-blame-ignore-revs
Normal file
15
.git-blame-ignore-revs
Normal file
@@ -0,0 +1,15 @@
|
||||
# When making commits that are strictly formatting/style changes, add the
|
||||
# commit hash here, so git blame can ignore the change. See docs for more details:
|
||||
#
|
||||
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile
|
||||
#
|
||||
# Run this command to always ignore formatting commits in git blame
|
||||
# git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
# Patch v9.1.0829 expanded tabs to spaces in sound.c
|
||||
8ce738de3fd7192fa6274730594305cde780074c
|
||||
# Patch v9.1.0879 reformated sound.c and sign.c
|
||||
3cf094edaff815141d9941b8dba52b9e77d8dfc1
|
||||
# change indentation style of netrw plugin
|
||||
c363ca1ecd1f8db03663ef98dcf41eeacc3c22c7
|
||||
c673b805ad80d0aef07e745d412a2bf298ba1c07
|
||||
44
.github/MAINTAINERS
vendored
44
.github/MAINTAINERS
vendored
@@ -19,7 +19,7 @@ runtime/autoload/modula2.vim @dkearns
|
||||
runtime/autoload/php.vim @david-szabo97
|
||||
runtime/autoload/rubycomplete.vim @segfault @dkearns
|
||||
runtime/autoload/rust.vim @lilyball
|
||||
runtime/autoload/typst.vim @gpanders
|
||||
runtime/autoload/typst.vim @saccarosium
|
||||
runtime/autoload/xmlformat.vim @chrisbra
|
||||
runtime/autoload/dist/json.vim @habamax
|
||||
runtime/colors/blue.vim @habamax @romainl @neutaaaaan
|
||||
@@ -104,23 +104,35 @@ runtime/compiler/tidy.vim @dkearns
|
||||
runtime/compiler/ts-node.vim @dkearns
|
||||
runtime/compiler/tsc.vim @dkearns
|
||||
runtime/compiler/typedoc.vim @dkearns
|
||||
runtime/compiler/typst.vim @gpanders
|
||||
runtime/compiler/typst.vim @saccarosium
|
||||
runtime/compiler/xmllint.vim @dkearns
|
||||
runtime/compiler/xo.vim @dkearns
|
||||
runtime/compiler/yamllint.vim @romainl
|
||||
runtime/compiler/zsh.vim @dkearns
|
||||
runtime/doc/ft_hare.txt @selenebun
|
||||
runtime/doc/ps1.txt @heaths
|
||||
runtime/doc/evim-ru.1 @RestorerZ
|
||||
runtime/doc/evim-ru.UTF-8.1 @RestorerZ
|
||||
runtime/doc/vim-ru.1 @RestorerZ
|
||||
runtime/doc/vim-ru.UTF-8.1 @RestorerZ
|
||||
runtime/doc/vimdiff-ru.1 @RestorerZ
|
||||
runtime/doc/vimdiff-ru.UTF-8.1 @RestorerZ
|
||||
runtime/doc/vimtutor-ru.1 @RestorerZ
|
||||
runtime/doc/vimtutor-ru.UTF-8.1 @RestorerZ
|
||||
runtime/doc/xxd-ru.1 @RestorerZ
|
||||
runtime/doc/xxd-ru.UTF-8.1 @RestorerZ
|
||||
runtime/ftplugin/abaqus.vim @costerwi
|
||||
runtime/ftplugin/antlr4.vim @jiangyinzuo
|
||||
runtime/ftplugin/apache.vim @dubgeiser
|
||||
runtime/ftplugin/arduino.vim @k-takata
|
||||
runtime/ftplugin/asciidoc.vim @saccarosium
|
||||
runtime/ftplugin/astro.vim @romainl
|
||||
runtime/ftplugin/asy.vim @avidseeker
|
||||
runtime/ftplugin/autohotkey.vim @telemachus
|
||||
runtime/ftplugin/awk.vim @dkearns
|
||||
runtime/ftplugin/basic.vim @dkearns
|
||||
runtime/ftplugin/bst.vim @tpope
|
||||
runtime/ftplugin/c3.vim @ttytm
|
||||
runtime/ftplugin/cabal.vim @ribru17
|
||||
runtime/ftplugin/cedar.vim @ribru17
|
||||
runtime/ftplugin/cfg.vim @chrisbra
|
||||
@@ -128,6 +140,7 @@ runtime/ftplugin/chatito.vim @ObserverOfTime
|
||||
runtime/ftplugin/chicken.vim @evhan
|
||||
runtime/ftplugin/clojure.vim @axvr
|
||||
runtime/ftplugin/cmakecache.vim @ribru17
|
||||
runtime/ftplugin/cook.vim @ribru17
|
||||
runtime/ftplugin/cs.vim @nickspoons
|
||||
runtime/ftplugin/csh.vim @dkearns
|
||||
runtime/ftplugin/css.vim @dkearns
|
||||
@@ -163,11 +176,12 @@ runtime/ftplugin/gitconfig.vim @tpope
|
||||
runtime/ftplugin/gitignore.vim @ObserverOfTime
|
||||
runtime/ftplugin/gitrebase.vim @tpope
|
||||
runtime/ftplugin/gitsendemail.vim @tpope
|
||||
runtime/ftplugin/gleam.vim @trilowy
|
||||
runtime/ftplugin/go.vim @dbarnett
|
||||
runtime/ftplugin/goaccess.vim @meonkeys
|
||||
runtime/ftplugin/gomod.vim @yu-yk
|
||||
runtime/ftplugin/gprof.vim @dpelle
|
||||
runtime/ftplugin/graphql.vim @ribru17
|
||||
runtime/ftplugin/graphql.vim @jparise
|
||||
runtime/ftplugin/gyp.vim @ObserverOfTime
|
||||
runtime/ftplugin/haml.vim @tpope
|
||||
runtime/ftplugin/hare.vim @selenebun
|
||||
@@ -178,6 +192,7 @@ runtime/ftplugin/hgcommit.vim @k-takata
|
||||
runtime/ftplugin/hlsplaylist.vim @avidseeker
|
||||
runtime/ftplugin/hog.vim @wtfbbqhax
|
||||
runtime/ftplugin/html.vim @dkearns
|
||||
runtime/ftplugin/http.vim @ribru17
|
||||
runtime/ftplugin/hyprlang.vim @ribru17
|
||||
runtime/ftplugin/i3config.vim @hiqua
|
||||
runtime/ftplugin/icon.vim @dkearns
|
||||
@@ -199,6 +214,7 @@ runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
|
||||
runtime/ftplugin/kivy.vim @ribru17
|
||||
runtime/ftplugin/kotlin.vim @udalov
|
||||
runtime/ftplugin/ldapconf.vim @ribru17
|
||||
runtime/ftplugin/leo.vim @ribru17
|
||||
runtime/ftplugin/less.vim @genoma
|
||||
runtime/ftplugin/lex.vim @ribru17
|
||||
runtime/ftplugin/liquid.vim @tpope
|
||||
@@ -213,6 +229,7 @@ runtime/ftplugin/meson.vim @Liambeguin
|
||||
runtime/ftplugin/modula2.vim @dkearns
|
||||
runtime/ftplugin/modula3.vim @dkearns
|
||||
runtime/ftplugin/mojo.vim @ribru17
|
||||
runtime/ftplugin/mss.vim @Freed-Wu
|
||||
runtime/ftplugin/nginx.vim @chr4
|
||||
runtime/ftplugin/nim.vim @ribru17
|
||||
runtime/ftplugin/nroff.vim @a-vrma
|
||||
@@ -220,7 +237,9 @@ runtime/ftplugin/nsis.vim @k-takata
|
||||
runtime/ftplugin/nu.vim @mrcjkb
|
||||
runtime/ftplugin/octave.vim @dkearns
|
||||
runtime/ftplugin/ondir.vim @jparise
|
||||
runtime/ftplugin/opencl.vim @Freed-Wu
|
||||
runtime/ftplugin/openvpn.vim @ObserverOfTime
|
||||
runtime/ftplugin/org.vim @saccarosium
|
||||
runtime/ftplugin/pascal.vim @dkearns
|
||||
runtime/ftplugin/pbtxt.vim @lakshayg
|
||||
runtime/ftplugin/pdf.vim @tpope
|
||||
@@ -230,8 +249,10 @@ runtime/ftplugin/pod.vim @petdance @dkearns
|
||||
runtime/ftplugin/poefilter.vim @ObserverOfTime
|
||||
runtime/ftplugin/postscr.vim @mrdubya
|
||||
runtime/ftplugin/prisma.vim @ribru17
|
||||
runtime/ftplugin/proto.vim @Limero
|
||||
runtime/ftplugin/ps1.vim @heaths
|
||||
runtime/ftplugin/ps1xml.vim @heaths
|
||||
runtime/ftplugin/ptx.vim @jiangyinzuo
|
||||
runtime/ftplugin/purescript.vim @ribru17
|
||||
runtime/ftplugin/pymanifest.vim @ObserverOfTime
|
||||
runtime/ftplugin/python.vim @tpict
|
||||
@@ -261,6 +282,7 @@ runtime/ftplugin/squirrel.vim @ribru17
|
||||
runtime/ftplugin/ssa.vim @ObserverOfTime
|
||||
runtime/ftplugin/sshdconfig.vim @jiangyinzuo
|
||||
runtime/ftplugin/svelte.vim @igorlfs
|
||||
runtime/ftplugin/sway.vim @ribru17
|
||||
runtime/ftplugin/swayconfig.vim @jamespeapen
|
||||
runtime/ftplugin/systemverilog.vim @Kocha
|
||||
runtime/ftplugin/swig.vim @jmarrec
|
||||
@@ -275,7 +297,7 @@ runtime/ftplugin/toml.vim @averms
|
||||
runtime/ftplugin/tt2html.vim @petdance
|
||||
runtime/ftplugin/typescript.vim @dkearns
|
||||
runtime/ftplugin/typescriptreact.vim @dkearns
|
||||
runtime/ftplugin/typst.vim @gpanders
|
||||
runtime/ftplugin/typst.vim @saccarosium
|
||||
runtime/ftplugin/unison.vim @chuwy
|
||||
runtime/ftplugin/v.vim @ribru17
|
||||
runtime/ftplugin/vdf.vim @ObserverOfTime
|
||||
@@ -317,6 +339,7 @@ runtime/indent/gitconfig.vim @tpope
|
||||
runtime/indent/gitolite.vim @sitaramc
|
||||
runtime/indent/glsl.vim @gpanders
|
||||
runtime/indent/go.vim @dbarnett
|
||||
runtime/indent/graphql.vim @jparise
|
||||
runtime/indent/gyp.vim @ObserverOfTime
|
||||
runtime/indent/haml.vim @tpope
|
||||
runtime/indent/hare.vim @selenebun
|
||||
@@ -368,7 +391,7 @@ runtime/indent/teraterm.vim @k-takata
|
||||
runtime/indent/terraform.vim @gpanders
|
||||
runtime/indent/thrift.vim @jiangyinzuo
|
||||
runtime/indent/typescript.vim @HerringtonDarkholme
|
||||
runtime/indent/typst.vim @gpanders
|
||||
runtime/indent/typst.vim @saccarosium
|
||||
runtime/indent/vroom.vim @dbarnett
|
||||
runtime/indent/wast.vim @rhysd
|
||||
runtime/indent/xml.vim @chrisbra
|
||||
@@ -459,6 +482,7 @@ runtime/syntax/goaccess.vim @meonkeys
|
||||
runtime/syntax/godoc.vim @dbarnett
|
||||
runtime/syntax/gp.vim @KBelabas
|
||||
runtime/syntax/gprof.vim @dpelle
|
||||
runtime/syntax/graphql.vim @jparise
|
||||
runtime/syntax/groff.vim @jmarshall
|
||||
runtime/syntax/gyp.vim @ObserverOfTime
|
||||
runtime/syntax/haml.vim @tpope
|
||||
@@ -473,6 +497,7 @@ runtime/syntax/hog.vim @wtfbbqhax
|
||||
runtime/syntax/hollywood.vim @sodero
|
||||
runtime/syntax/html.vim @dkearns
|
||||
runtime/syntax/htmlangular.vim @dlvandenberg
|
||||
runtime/syntax/hyprlang.vim @saccarosium
|
||||
runtime/syntax/i3config.vim @hiqua
|
||||
runtime/syntax/icon.vim @dkearns
|
||||
runtime/syntax/indent.vim @dkearns
|
||||
@@ -480,17 +505,20 @@ runtime/syntax/j.vim @glts
|
||||
runtime/syntax/jargon.vim @h3xx
|
||||
runtime/syntax/java.vim @zzzyxwvut
|
||||
runtime/syntax/javascript.vim @fleiner
|
||||
runtime/syntax/jinja.vim @gpanders
|
||||
runtime/syntax/jj.vim @gpanders
|
||||
runtime/syntax/json.vim @vito-c
|
||||
runtime/syntax/jsonc.vim @izhakjakov
|
||||
runtime/syntax/julia.vim @carlobaldassi
|
||||
runtime/syntax/jq.vim @vito-c
|
||||
runtime/syntax/karel.vim @kirillmorozov
|
||||
runtime/syntax/kconfig.vim @chrisbra
|
||||
runtime/syntax/kivy.vim @prophittcorey
|
||||
runtime/syntax/kotlin.vim @udalov
|
||||
runtime/syntax/kdl.vim @imsnif @jiangyinzuo
|
||||
runtime/syntax/krl.vim @KnoP-01
|
||||
runtime/syntax/less.vim @genoma
|
||||
runtime/syntax/lf.vim @andis-sprinkis
|
||||
runtime/syntax/liquid.vim @tpope
|
||||
runtime/syntax/lua.vim @marcuscf
|
||||
runtime/syntax/lyrics.vim @ObserverOfTime
|
||||
@@ -509,6 +537,7 @@ runtime/syntax/modula2/opt/iso.vim @trijezdci
|
||||
runtime/syntax/modula2/opt/pim.vim @trijezdci
|
||||
runtime/syntax/modula2/opt/r10.vim @trijezdci
|
||||
runtime/syntax/modula3.vim @dkearns
|
||||
runtime/syntax/mss.vim @Freed-Wu
|
||||
runtime/syntax/n1ql.vim @pr3d4t0r
|
||||
runtime/syntax/nginx.vim @chr4
|
||||
runtime/syntax/ninja.vim @nico
|
||||
@@ -516,7 +545,9 @@ runtime/syntax/nix.vim @equill
|
||||
runtime/syntax/nroff.vim @jmarshall
|
||||
runtime/syntax/nsis.vim @k-takata
|
||||
runtime/syntax/ondir.vim @jparise
|
||||
runtime/syntax/opencl.vim @Freed-Wu
|
||||
runtime/syntax/openvpn.vim @ObserverOfTime
|
||||
runtime/syntax/org.vim @saccarosium
|
||||
runtime/syntax/pacmanlog.vim @rpigott
|
||||
runtime/syntax/pascal.vim @dkearns
|
||||
runtime/syntax/pbtxt.vim @lakshayg
|
||||
@@ -533,6 +564,7 @@ runtime/syntax/prolog.vim @XVilka
|
||||
runtime/syntax/ps1.vim @heaths
|
||||
runtime/syntax/ps1xml.vim @heaths
|
||||
runtime/syntax/psl.vim @danielkho
|
||||
runtime/syntax/ptx.vim @jiangyinzuo
|
||||
runtime/syntax/pymanifest.vim @ObserverOfTime
|
||||
runtime/syntax/qb64.vim @dkearns
|
||||
runtime/syntax/qml.vim @ChaseKnowlden
|
||||
@@ -550,6 +582,7 @@ runtime/syntax/rng.vim @jhradilek
|
||||
runtime/syntax/routeros.vim @zainin
|
||||
runtime/syntax/rst.vim @marshallward
|
||||
runtime/syntax/ruby.vim @dkearns
|
||||
runtime/syntax/salt.vim @gpanders
|
||||
runtime/syntax/sass.vim @tpope
|
||||
runtime/syntax/scala.vim @derekwyatt
|
||||
runtime/syntax/scheme.vim @evhan
|
||||
@@ -608,6 +641,7 @@ runtime/tutor/tutor.ru.cp1251 @RestorerZ
|
||||
runtime/tutor/tutor.ru.utf-8 @RestorerZ
|
||||
src/iscygpty.* @k-takata
|
||||
src/libvterm/ @leonerd
|
||||
src/po/am.po @gagikh
|
||||
src/po/ca.po @nfdisco
|
||||
src/po/de.po @chrisbra
|
||||
src/po/eo.po @dpelle
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'screendump'
|
||||
description: "Upload failed screendump tests"
|
||||
name: 'test_artifacts'
|
||||
description: "Upload failed test artifacts"
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -12,6 +12,7 @@ runs:
|
||||
# A file, directory or wildcard pattern that describes what
|
||||
# to upload.
|
||||
path: |
|
||||
${{ github.workspace }}/runtime/indent/testdir/*.fail
|
||||
${{ github.workspace }}/runtime/syntax/testdir/failed/*
|
||||
${{ github.workspace }}/src/testdir/failed/*
|
||||
# The desired behavior if no files are found using the
|
||||
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -171,7 +171,7 @@ jobs:
|
||||
normal)
|
||||
;;
|
||||
huge)
|
||||
echo "TEST=scripttests test_libvterm"
|
||||
echo "TEST=scripttests test_libvterm indenttest syntaxtest"
|
||||
INTERFACE=${{ matrix.interface || 'yes' }}
|
||||
if ${{ matrix.python3 == 'stable-abi' }}; then
|
||||
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
|
||||
@@ -194,9 +194,9 @@ jobs:
|
||||
echo "TEST=unittests"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'asan') }}; then
|
||||
echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
|
||||
echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
|
||||
echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
|
||||
echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
|
||||
echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
|
||||
echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
|
||||
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
|
||||
fi
|
||||
if ${{ contains(matrix.extra, 'vimtags') }}; then
|
||||
@@ -268,11 +268,11 @@ jobs:
|
||||
- name: Test
|
||||
timeout-minutes: 25
|
||||
run: |
|
||||
do_test() { sg audio "sg $(id -gn) '$*'"; }
|
||||
do_test() { echo "$*"; sg audio "sg $(id -gn) '$*'"; }
|
||||
do_test make ${SHADOWOPT} ${TEST}
|
||||
|
||||
- if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/screendump
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
- name: Vim tags
|
||||
if: contains(matrix.extra, 'vimtags')
|
||||
@@ -295,15 +295,16 @@ jobs:
|
||||
- name: Codecov
|
||||
timeout-minutes: 20
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
|
||||
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ join(matrix.extra, '-') }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: ASan logs
|
||||
if: contains(matrix.extra, 'asan') && !cancelled()
|
||||
run: |
|
||||
for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
|
||||
echo "$f"
|
||||
asan_symbolize -l "$f"
|
||||
false # in order to fail a job
|
||||
done
|
||||
@@ -322,7 +323,7 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
features: [tiny, normal, huge]
|
||||
runner: [macos-12, macos-14]
|
||||
runner: [macos-13, macos-15]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository from github
|
||||
@@ -334,19 +335,11 @@ jobs:
|
||||
brew install lua libtool
|
||||
echo "LUA_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
|
||||
|
||||
- name: Install blackhole-2ch for macos-12
|
||||
if: matrix.features == 'huge' && matrix.runner == 'macos-12'
|
||||
- name: Set up Xcode
|
||||
if: matrix.runner == 'macos-15'
|
||||
run: |
|
||||
# Install audio device for playing sound since some of macos-12 machines have no audio device installed.
|
||||
if system_profiler -json SPAudioDataType | jq -er '.SPAudioDataType[]._items == []'; then
|
||||
brew install blackhole-2ch
|
||||
fi
|
||||
|
||||
- name: Grant microphone access for macos-14
|
||||
if: matrix.features == 'huge' && matrix.runner == 'macos-14'
|
||||
run: |
|
||||
# Temporary fix to fix microphone permission issues for macos-14 when playing sound.
|
||||
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
|
||||
# Xcode 16 has compiler bugs which are fixed in 16.2+
|
||||
sudo xcode-select -s /Applications/Xcode_16.2.app/Contents/Developer
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
@@ -396,12 +389,12 @@ jobs:
|
||||
brew install diffutils
|
||||
|
||||
- name: Test
|
||||
timeout-minutes: 20
|
||||
timeout-minutes: 25
|
||||
run: |
|
||||
make ${TEST}
|
||||
|
||||
- if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/screendump
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
windows:
|
||||
runs-on: windows-2022
|
||||
@@ -711,7 +704,7 @@ jobs:
|
||||
)
|
||||
|
||||
- if: ${{ !cancelled() }}
|
||||
uses: ./.github/actions/screendump
|
||||
uses: ./.github/actions/test_artifacts
|
||||
|
||||
- name: Generate gcov files
|
||||
if: matrix.coverage
|
||||
@@ -723,7 +716,7 @@ jobs:
|
||||
- name: Codecov
|
||||
timeout-minutes: 20
|
||||
if: matrix.coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
uses: codecov/codecov-action@v5
|
||||
with:
|
||||
directory: src
|
||||
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
|
||||
|
||||
48
Filelist
48
Filelist
@@ -5,18 +5,21 @@
|
||||
SRC_ALL = \
|
||||
.cirrus.yml \
|
||||
.gitattributes \
|
||||
.git-blame-ignore-revs \
|
||||
.github/MAINTAINERS \
|
||||
.github/ISSUE_TEMPLATE/bug_report.yml \
|
||||
.github/ISSUE_TEMPLATE/feature_request.md \
|
||||
.github/workflows/ci.yml \
|
||||
.github/workflows/codeql-analysis.yml \
|
||||
.github/actions/screendump/action.yml \
|
||||
.github/workflows/coverity.yml \
|
||||
.github/actions/test_artifacts/action.yml \
|
||||
.github/dependabot.yml \
|
||||
.gitignore \
|
||||
.hgignore \
|
||||
.appveyor.yml \
|
||||
.clang-format \
|
||||
.codecov.yml \
|
||||
.editorconfig \
|
||||
ci/appveyor.bat \
|
||||
ci/config.mk*.sed \
|
||||
ci/if_ver*.vim \
|
||||
@@ -221,6 +224,7 @@ SRC_ALL = \
|
||||
src/testdir/samples/*.vim \
|
||||
src/testdir/samples/test000 \
|
||||
src/testdir/samples/test.zip \
|
||||
src/testdir/samples/test_undo.txt.undo \
|
||||
src/testdir/samples/testa.zip \
|
||||
src/testdir/color_ramp.vim \
|
||||
src/testdir/silent.wav \
|
||||
@@ -704,6 +708,8 @@ RT_ALL = \
|
||||
README_VIM9.md \
|
||||
LICENSE \
|
||||
CONTRIBUTING.md \
|
||||
lang/LICENSE.itx \
|
||||
lang/README.itx \
|
||||
runtime/bugreport.vim \
|
||||
runtime/doc/*.awk \
|
||||
runtime/doc/*.pl \
|
||||
@@ -760,8 +766,15 @@ RT_ALL = \
|
||||
runtime/tools/README.txt \
|
||||
runtime/tools/[a-z]*[a-z0-9] \
|
||||
runtime/tutor/README.txt \
|
||||
runtime/tutor/tutor \
|
||||
runtime/tutor/tutor1 \
|
||||
runtime/tutor/en/vim-01-beginner.tutor \
|
||||
runtime/tutor/en/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/it/vim-01-beginner.tutor \
|
||||
runtime/tutor/it/vim-01-beginner.tutor.json \
|
||||
runtime/tutor/tutor.tutor \
|
||||
runtime/tutor/tutor.tutor.json \
|
||||
runtime/tutor/tutor.vim \
|
||||
runtime/tutor/tutor2 \
|
||||
runtime/vimrc_example.vim \
|
||||
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
|
||||
runtime/pack/dist/opt/comment/plugin/comment.vim \
|
||||
@@ -783,6 +796,8 @@ RT_ALL = \
|
||||
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
|
||||
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
|
||||
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
|
||||
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim \
|
||||
runtime/pack/dist/opt/helptoc/plugin/helptoc.vim \
|
||||
runtime/pack/dist/opt/justify/plugin/justify.vim \
|
||||
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
|
||||
runtime/pack/dist/opt/matchit/doc/matchit.txt \
|
||||
@@ -1044,19 +1059,22 @@ LANG_GEN = \
|
||||
runtime/tutor/README.*.txt \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/Make_all.mak \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.??.utf-8 \
|
||||
runtime/tutor/tutor.??.euc \
|
||||
runtime/tutor/tutor.??.sjis \
|
||||
runtime/tutor/tutor.??.iso9 \
|
||||
runtime/tutor/tutor.??.big5 \
|
||||
runtime/tutor/tutor.??.cp1250 \
|
||||
runtime/tutor/tutor.??.cp1251 \
|
||||
runtime/tutor/tutor.??.cp737 \
|
||||
runtime/tutor/tutor.??_??.utf-8 \
|
||||
runtime/tutor/tutor.bar \
|
||||
runtime/tutor/tutor.bar.utf-8 \
|
||||
runtime/tutor/tutor1.utf-8 \
|
||||
runtime/tutor/tutor1.?? \
|
||||
runtime/tutor/tutor1.??.utf-8 \
|
||||
runtime/tutor/tutor1.??.euc \
|
||||
runtime/tutor/tutor1.??.sjis \
|
||||
runtime/tutor/tutor1.??.iso9 \
|
||||
runtime/tutor/tutor1.??.big5 \
|
||||
runtime/tutor/tutor1.??.cp1250 \
|
||||
runtime/tutor/tutor1.??.cp1251 \
|
||||
runtime/tutor/tutor1.??.cp737 \
|
||||
runtime/tutor/tutor1.??_??.utf-8 \
|
||||
runtime/tutor/tutor1.bar \
|
||||
runtime/tutor/tutor1.bar.utf-8 \
|
||||
runtime/tutor/tutor2.utf-8 \
|
||||
runtime/tutor/tutor2.?? \
|
||||
runtime/tutor/tutor2.??.utf-8 \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
runtime/spell/??/main.aap \
|
||||
|
||||
11
Makefile
11
Makefile
@@ -61,6 +61,9 @@ indenttest:
|
||||
# Executable used for running the syntax tests.
|
||||
VIM_FOR_SYNTAXTEST = ../../src/vim
|
||||
|
||||
# (For local testing only with GNU Make.)
|
||||
VIM_SYNTAX_TEST_FILTER =
|
||||
|
||||
syntaxtest:
|
||||
cd runtime/syntax && \
|
||||
$(MAKE) clean && \
|
||||
@@ -153,7 +156,7 @@ MINOR = 1
|
||||
# - > make dossrc
|
||||
# > make dosrt
|
||||
# Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
|
||||
# This creates the directory vim/vim90 and puts all files in there.
|
||||
# This creates the directory vim/vim91 and puts all files in there.
|
||||
# Win32 console version build:
|
||||
# - See src/INSTALLpc.txt for installing the compiler and SDK.
|
||||
# - Set environment for Visual C++ 2015:
|
||||
@@ -209,7 +212,7 @@ MINOR = 1
|
||||
# gvimext64.dll in src/GvimExt
|
||||
# gvimext64.dll can be obtained from:
|
||||
# https://github.com/vim/vim-win32-installer/releases
|
||||
# It is part of gvim_9.0.*_x64.zip as vim/vim90/GvimExt/gvimext64.dll.
|
||||
# It is part of gvim_9.1.*_x64.zip as vim/vim91/GvimExt/gvimext64.dll.
|
||||
# - Make sure there is a diff.exe two levels up (get it from a previous Vim
|
||||
# version). Also put winpty32.dll and winpty-agent.exe there.
|
||||
# - go to ../nsis and do:
|
||||
@@ -285,10 +288,10 @@ dist/$(COMMENT_RT): dist/comment
|
||||
echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
|
||||
|
||||
dist/$(COMMENT_W32): dist/comment
|
||||
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
|
||||
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows" > dist/$(COMMENT_W32)
|
||||
|
||||
dist/$(COMMENT_GVIM): dist/comment
|
||||
echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
|
||||
echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows" > dist/$(COMMENT_GVIM)
|
||||
|
||||
dist/$(COMMENT_OLE): dist/comment
|
||||
echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
|
||||
|
||||
@@ -2,7 +2,7 @@ README_amibin.txt for version 9.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_ami.txt" for installation instructions for the Amiga.
|
||||
These files are in the runtime archive (vim90rt.tgz).
|
||||
These files are in the runtime archive (vim91rt.tgz).
|
||||
|
||||
|
||||
The Amiga "bin" archive contains the Vim executable for the Amiga. It was
|
||||
|
||||
@@ -2,7 +2,7 @@ README_amisrc.txt for version 9.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_ami.txt" for installation instructions for the Amiga.
|
||||
These files are in the runtime archive (vim90rt.tgz).
|
||||
These files are in the runtime archive (vim91rt.tgz).
|
||||
|
||||
|
||||
The Amiga source archive contains the files needed to compile Vim on the
|
||||
|
||||
@@ -2,15 +2,15 @@ README_bindos.txt for version 9.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
||||
These files are in the runtime archive (vim90rt.zip).
|
||||
These files are in the runtime archive (vim91rt.zip).
|
||||
|
||||
|
||||
There are several binary distributions of Vim for the PC. You would normally
|
||||
pick only one of them, but it's also possible to install several.
|
||||
These ones are available (the version number may differ):
|
||||
vim91w32.zip Windows 95/98/NT/etc. console version
|
||||
gvim91.zip Windows 95/98/NT/etc. GUI version
|
||||
gvim91ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||
vim91w32.zip Windows console version
|
||||
gvim91.zip Windows GUI version
|
||||
gvim91ole.zip Windows GUI version with OLE
|
||||
|
||||
You MUST also get the runtime archive (vim91rt.zip).
|
||||
The sources are also available (vim91src.zip).
|
||||
|
||||
@@ -120,30 +120,6 @@ Remarks:
|
||||
entry, you can remove it by running the "uninstall.exe". See
|
||||
":help win32-popup-menu".
|
||||
|
||||
- In Windows 95/98/NT you can create a shortcut to Vim. This works for all
|
||||
DOS and Win32 console versions. For the console version this gives you the
|
||||
opportunity to set defaults for the Console where Vim runs in.
|
||||
|
||||
1. On the desktop, click right to get a menu. Select New/Shortcut.
|
||||
2. In the dialog, enter Command line: "C:\command.com". Click "Next".
|
||||
3. Enter any name. Click "Finish".
|
||||
The new shortcut will appear on the desktop.
|
||||
4. With the mouse pointer on the new shortcut, click right to get a menu.
|
||||
Select Properties.
|
||||
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
|
||||
Vim executable. Examples:
|
||||
C:\command.com /c C:\vim\vim91\vim.exe
|
||||
C:\command.com /c D:\editors\vim\vim91\vim.exe
|
||||
6. Select the font, window size, etc. that you like. If this isn't
|
||||
possible, select "Advanced" in the Program tab, and deselect "MS-DOS
|
||||
mode".
|
||||
7. Click OK.
|
||||
|
||||
For gvim, you can use a normal shortcut on the desktop, and set the size of
|
||||
the Window in your $VIM/_gvimrc:
|
||||
set lines=30 columns=90
|
||||
|
||||
|
||||
For further information, type one of these inside Vim:
|
||||
:help dos
|
||||
:help win32
|
||||
|
||||
@@ -27,7 +27,7 @@ src/gui_w32.* Files for the Win32 GUI.
|
||||
src/gui_w48.* Files for the Win32 and Win16 GUI.
|
||||
src/Make_mvc.mak MS Visual C++ makefile for the Win32 GUI.
|
||||
|
||||
src/if_ole.* OLE automation interface, for MS Windows 95 and NT.
|
||||
src/if_ole.* OLE automation interface, for MS Windows.
|
||||
|
||||
src/GvimExt/* DLL for the "Edit with Vim" context menu entry
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ README_ole.txt for version 9.1 of Vim: Vi IMproved.
|
||||
This archive contains gvim.exe with OLE interface.
|
||||
This version of gvim.exe can also load a number of interface dynamically (you
|
||||
can optionally install the .dll files for each interface).
|
||||
It is only for MS-Windows 95/98/ME/NT/2000/XP.
|
||||
It is only for MS-Windows.
|
||||
|
||||
Also see the README_bindos.txt, README_dos.txt and README.txt files.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ README_srcdos.txt for version 9.1 of Vim: Vi IMproved.
|
||||
|
||||
See "README.txt" for general information about Vim.
|
||||
See "README_dos.txt" for installation instructions for MS-Windows.
|
||||
These files are in the runtime archive (vim90rt.zip).
|
||||
These files are in the runtime archive (vim91rt.zip).
|
||||
|
||||
|
||||
The DOS source archive contains the files needed to compile Vim on MS-Windows.
|
||||
|
||||
99
lang/LICENSE.itx
Normal file
99
lang/LICENSE.itx
Normal file
@@ -0,0 +1,99 @@
|
||||
LICENZA VIM
|
||||
|
||||
Nota: Agli effetti legali ha valore non la seguente traduzione italiana, ma
|
||||
l'originale inglese su cui è basata. È alla versione inglese che si fa
|
||||
riferimento qui sotto quando si parla di "questa licenza" (NdT).
|
||||
|
||||
I) Non ci sono restrizioni alla distribuzione di copie non modificate di Vim,
|
||||
alla condizione che esse includano il testo di questa licenza. Si possono
|
||||
anche distribuire parti non modificate di Vim, sempre senza restrizioni,
|
||||
alla condizione che esse includano il testo di questa licenza. È anche
|
||||
consentito includere programmi eseguibili da voi preparati a partire dai
|
||||
file sorgenti Vim non modificati, più i vostri esempi di utilizzo e i
|
||||
vostri script Vim.
|
||||
|
||||
II) È consentito distribuire una versione modificata (o estesa) di Vim,
|
||||
contenente programmi eseguibile e/o codice sorgente, quando siano
|
||||
rispettare le seguenti quattro condizioni:
|
||||
1) Il testo di questa licenza deve essere incluso senza modifiche.
|
||||
2) La versione modificata di Vim dev'essere distribuita in una della
|
||||
seguenti cinque maniere:
|
||||
a) Se voi personalmente modificate a Vim, dovete descrivere
|
||||
chiaramente nella distribuzione come è possibile mettersi in
|
||||
contatto con voi. Quando il manutentore vi chiede (in qualsiasi
|
||||
forma) una copia della versione modificata di Vim da voi
|
||||
distribuita, dovete rendere disponibili le vostre modifiche,
|
||||
compreso il codice sorgente, al manutentore, senza alcuna spesa.
|
||||
Il manutentore si riserva il diritto di includere le vostre
|
||||
modifiche nella versione ufficiale di Vim. Quel che il manutentore
|
||||
potrà fare con le vostre modifiche e sotto quale licenza esse
|
||||
verranno distribuite può essere oggetto di negoziazione. Se non c'è
|
||||
stata alcuna negoziazione, questa licenza, o una versione successiva
|
||||
della stessa è anche applicabile alle vostre modifiche.
|
||||
I manutentori correnti sono elencati qui:
|
||||
https://github.com/orgs/vim/people.
|
||||
Se dovessero cambiare, ne sarò dato annuncio nei luoghi appropriati
|
||||
(verosimilmente vim.sf.net, www.vim.org e/o comp.editors). Quando
|
||||
sia completamente impossibile contattare il manutentore, l'obbligo
|
||||
di spedirgli le vostre modifiche viene meno. Una volta che il
|
||||
manutentore abbia confermato di aver ricevuto le vostre modifiche,
|
||||
non sarà necessario spedirle ulteriormente.
|
||||
b) Se avete ricevuto un Vim modificato che era stato distribuito come
|
||||
descritto al punto a) potete ulteriormente distribuirlo senza
|
||||
modificarlo, come menzionato al punto I). Se fate ulteriori
|
||||
modifiche, il testo al punto a) si applica a queste modifiche.
|
||||
c) Includete tutte le modifiche, compreso il codice sorgente, con ogni
|
||||
copia del Vim modificato da voi distribuito. Questo può essere
|
||||
fatto sotto forma dell'output di un comando "diff", che contenga
|
||||
anche il contesto [ossia anche le linee non modificate di sorgente
|
||||
che vengono prima o dopo le modifiche - NdT]. Potete scegliere
|
||||
quale licenza volete utilizzare per il nuovo codice sorgente che voi
|
||||
aggiungere. Le modifiche e la relativa licenza non devono impedire
|
||||
a terze parti di apportare le loro proprie modifiche a Vim.
|
||||
d) Quando avete un Vim modificato che comprende modifiche quali quelle
|
||||
menzionate al punto c), potete distribuirlo senza il codice sorgente
|
||||
che descrive le modifiche, se le seguenti tre condizioni sono
|
||||
soddisfatte:
|
||||
- La licenza applicabile alle modifiche vi consente di distribuire
|
||||
le modifiche al manutentore Vim senza alcun costo o restrizione, e
|
||||
permette al manutentore Vim di includere le modifiche nella
|
||||
versione ufficiale di Vim senza alcun costo o restrizione.
|
||||
- Le modifiche da voi fatte sono conservate per almeno tre anni,
|
||||
dopo che avrete distribuito per l'ultima volta il Vim modificato
|
||||
corrispondente alle modifiche stesse. Quando il manutentore o
|
||||
qualcuno a cui voi avete distribuito il Vim modificato vi chiede
|
||||
(in qualsiasi forma) le modifiche, entro il periodo qui indicato,
|
||||
dovete fargliele avere.
|
||||
- Dovete descrivere chiaramente nella distribuzione come è possibile
|
||||
mettersi in contatto con voi. Questa informazione di contatto
|
||||
deve rimanere valida per almeno tre anni dopo l'ultima data di
|
||||
distribuzione della corrispondente modifica di Vim, oppure il più
|
||||
a lungo possibile.
|
||||
e) Quando al GNU General Public License (GPL) si applica alle
|
||||
modifiche, potete distribuire il Vim modificato sotto la versione 2
|
||||
della licenza GNU GPL versione 2 o una qualsiasi versione successiva
|
||||
della stessa licenza.
|
||||
3) Un messaggio deve essere aggiunto, almeno all'output del comando
|
||||
":version" e nella schermata introduttiva, in modo che l'utilizzatore
|
||||
del Vim modificato sia in grado di comprendere cosa è stato modificato.
|
||||
Quando si distribuisca come menzionato al punto 2)e) l'aggiunta del
|
||||
messaggio è richiesta solo se ciò non conduca a conflitti con la
|
||||
licenza usata per le modifiche.
|
||||
4) L'informazione di contatto, richiesta ai punto 2)a) e 2)d) non deve
|
||||
essere rimossa o modificata, tranne che per il fatto che la persona
|
||||
stessa può apportare delle correzioni.
|
||||
|
||||
III) Se distribuite una versione modificata di Vim, siete incoraggiati a
|
||||
utilizzare la licenza Vim per le vostre modifiche, e a mettere le
|
||||
modifiche a disposizione del manutentore, compreso il codice sorgente.
|
||||
Il modo preferito in cui fare questo è tramite e-mail o caricando
|
||||
i file su un server ed inviandone l'indirizzo (URL) tramite e-mail.
|
||||
Se il numero di modifiche è piccolo (per esempio, una modifica a un
|
||||
Makefile) inviare tramite email l'output del comando diff con contesto
|
||||
può essere sufficiente. L'indirizzo e-mail da utilizzare è
|
||||
<maintainer@vim.org>
|
||||
|
||||
IV) Non è consentito rimuovere questa licenza dalla distribuzione dei codici
|
||||
sorgente Vim, anche in parte, o da una versione di Vim modificata.
|
||||
Potete usare questa licenza per precedenti versioni di Vim, invece della
|
||||
licenza con cui esse sono state distribuite, a vostra scelta.
|
||||
167
lang/README.itx
Normal file
167
lang/README.itx
Normal file
@@ -0,0 +1,167 @@
|
||||
README.txt per la versione 9.1 di Vim: VI Migliorato.
|
||||
|
||||
|
||||
COS'È VIM?
|
||||
|
||||
Vim è una versione migliorata del classico programma di videoscrittura UNIX
|
||||
Vi. Molte nuove funzionalità sono state aggiunte: la possibilità di avere
|
||||
multipli annullamenti di comando, l'evidenziazione sintattica, una storia dei
|
||||
comandi immessi, file di aiuto facilmente consultabili, controlli ortografici,
|
||||
completamento di nomi di file, operazioni su blocchi di dati, un linguaggio di
|
||||
script, etc. È anche disponibile una versione grafica (GUI). Tuttavia è
|
||||
possibile lavorare come se si stesse usando il Vi "classico". Chi avesse Vi
|
||||
"sulle dita" si troverà a suo agio. Vedere il file "runtime/doc/vi_diff.txt"
|
||||
[in inglese] per dettagli sulle differenze di Vim rispetto a Vi.
|
||||
|
||||
Questo editor è molto utile per modificare programmi e altri file di testo.
|
||||
Tutti i comandi sono immessi usando i tasti presenti sulla tastiera, in modo
|
||||
che chi è in grado di digitare usando tutte e dieci le dita può lavorare molto
|
||||
velocemente. Inoltre, i tasti funzione possono essere mappati per inserire
|
||||
comandi dell'utente, ed è possibile usare il mouse.
|
||||
|
||||
Vim è disponibile in ambiente MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS e
|
||||
in quasi tutte le varianti di Unix. L'adattamento a nuovi sistemi operativi
|
||||
non dovrebbe essere molto difficile.
|
||||
Precedenti versioni di Vim funzionano in ambiente MS-DOS, MS-Windows
|
||||
95/98/Me/NT/2000/XP/Vista, Amiga DOS, Atari MiNT, BeOS, RISC OS e OS/2.
|
||||
Tali versioni non sono più supportate.
|
||||
|
||||
|
||||
DISTRIBUZIONE
|
||||
|
||||
Spesso è possibile usare il vostro Gestore applicazioni preferito per
|
||||
installare Vim. Negli ambienti Mac e Linux una versione base di Vim è inclusa
|
||||
nel sistema operativo, ma può ancora essere necessario installare Vim se si
|
||||
desiderano funzionalità ulteriori.
|
||||
|
||||
Ci sono distribuzioni separate di Vim per gli ambienti Unix, PC, Amiga e per
|
||||
qualche altro sistema operativo. Questo file README.txt è contenuto nelle
|
||||
directory che contengono i file usati da Vim in fase di esecuzione. Nelle
|
||||
stesse directory sono presente la documentazione, i file usati per
|
||||
l'evidenziazione sintattica e altri file usati da Vim in fase di esecuzione.
|
||||
Per installare Vim occorre ottenere un archivio che contiene solo i file
|
||||
eseguibili, o un archivio che permette di compilare Vim a partire dai file
|
||||
sorgente. Quale alternativa preferire dipende dal sistema su cui si vuole
|
||||
usare Vim, e dal preferire (o meno) di compilarlo direttamente a partire dai
|
||||
file sorgente. Consultate "https://www.vim.org/download.php" per una
|
||||
panoramica delle distribuzioni correntemente disponibili.
|
||||
|
||||
Alcuni siti da cui ottenere l'ultima versione di Vim:
|
||||
* Consultare la repository git in github: https://github.com/vim/vim.
|
||||
* Procurarsi il codice sorgente come archivio https://github.com/vim/vim/tags.
|
||||
* Ottenere un file per installare Vim in ambiente Windows dalla repository
|
||||
vim-win32-installer:
|
||||
https://github.com/vim/vim-win32-installer/releases.
|
||||
|
||||
|
||||
COMPILARE VIM
|
||||
|
||||
Se si è ottenuta una distribuzione di file eseguibili di Vim non è necessario
|
||||
compilarlo. Se si è ottenuta una distribuzione di file sorgente, tutto ciò
|
||||
che serve per compilare Vim è nella directory "src". Vedere src/INSTALL per
|
||||
come procedere.
|
||||
|
||||
|
||||
INSTALLAZIONE
|
||||
|
||||
Vedere uno dei file elencati più sotto per istruzioni riguardo a uno specifico
|
||||
sistema operativo. Tali file sono (nella repository git) nella directory
|
||||
READMEdir oppure nella directory principale se si scompatta un archivio:
|
||||
|
||||
README_ami.txt Amiga
|
||||
README_unix.txt Unix
|
||||
README_dos.txt MS-DOS e MS-Windows
|
||||
README_mac.txt Macintosh
|
||||
README_haiku.txt Haiku
|
||||
README_vms.txt VMS
|
||||
|
||||
Esistono altri file README_*.txt, a seconda della distribuzione in uso.
|
||||
|
||||
|
||||
DOCUMENTAZIONE
|
||||
|
||||
Esiste un corso di introduzione a Vim per principianti, della durata di circa
|
||||
un'ora. Normalmente si può accedervi tramite il comando "vimtutor". Vedere
|
||||
":help tutor" per ulteriori informazioni.
|
||||
|
||||
Ma la cosa migliore è usare la documentazione disponibile in una sessione di
|
||||
Vim, tramite il comando ":help". Se ancora non si ha a disposizione Vim, si
|
||||
può leggere il file "runtime/doc/help.txt". Questo file contiene puntatori
|
||||
agli altri file che costituiscono la documentazione.
|
||||
All'interno della documentazione esiste anche uno User Manual (manuale utente)
|
||||
che si legge come un libro ed è raccomandato per imparare a usare Vim.
|
||||
Vedere ":help user-manual". Il manuale utente è stato interamente tradotto in
|
||||
italiano, ed è disponibile, vedere:
|
||||
https://www.vim.org/translations.php
|
||||
|
||||
|
||||
COPIE
|
||||
|
||||
Vim è un Charityware (ossia eventuali offerte per il suo utilizzo vanno a
|
||||
un'attività caritativa). Vim può essere usato e copiato liberamente, senza
|
||||
limitazioni, ma è incoraggiata un'offerta a favore di orfani ugandesi. Si
|
||||
prega di leggere il file "runtime/doc/uganda.txt" per dettagli su come fare
|
||||
(il file si può visualizzare digitando ":help uganda" all'interno di Vim).
|
||||
|
||||
Sommario della licenza: Non ci sono restrizioni nell'uso e nella distribuzione
|
||||
di una copia non modificata di Vim. Parti di Vim possono anche essere
|
||||
distribuite, ma il testo della licenza va sempre incluso. Per versioni
|
||||
modificate di Vim, valgono alcune limitazioni. La licenza di Vim è
|
||||
compatibile con la licenza GPL, è possibile compilare Vim utilizzando librerie
|
||||
con licenza GPL e distribuirlo.
|
||||
|
||||
|
||||
SPONSORIZZAZIONI
|
||||
|
||||
Correggere errori e aggiungere nuove funzionalità richiede tempo e fatica.
|
||||
Per mostrare la vostra stima per quest'attività e per fornire motivazioni
|
||||
agli sviluppatori perché continuino a lavorare su Vim, siete invitati a
|
||||
fare una donazione.
|
||||
|
||||
Le somme donate saranno usate principalmente per aiutare dei bambini in
|
||||
Uganda. Vedere "runtime/doc/uganda.txt". Allo stesso tempo, le donazioni
|
||||
aumentano la motivazione del gruppo di sviluppo a continuare a lavorare su
|
||||
Vim!
|
||||
|
||||
Informazioni più aggiornate sulla sponsorizzazione, possono essere trovate
|
||||
sul sito Internet di Vim:
|
||||
https://www.vim.org/sponsor/
|
||||
|
||||
|
||||
CONTRIBUIRE
|
||||
|
||||
Chi vuole contribuire a rendere Vim ancora migliore, può consultare
|
||||
il file CONTRIBUTING.md (in inglese).
|
||||
|
||||
|
||||
INFORMAZIONE
|
||||
|
||||
Se il vostro sistema operativo è macOS, potete usare MacVim:
|
||||
https://macvim.org
|
||||
|
||||
Le ultime notizie riguardo a Vim si possono trovare sulla pagina Internet di
|
||||
Vim:
|
||||
https://www.vim.org/
|
||||
|
||||
Se avete problemi, è possibile consultare la documentazione Vim e i
|
||||
suggerimenti su come utilizzarlo:
|
||||
https://www.vim.org/docs.php
|
||||
https://vim.fandom.com/wiki/Vim_Tips_Wiki
|
||||
|
||||
Se avete ancora problemi o qualsiasi altra richiesta, è possibile usare una
|
||||
delle mailing list per discuterne con utenti e sviluppatori di Vim:
|
||||
https://www.vim.org/maillist.php
|
||||
|
||||
Se nient'altro funziona, potete riferire direttamente i problemi incontrati
|
||||
alla mailing list degli sviluppatori, vim-dev:
|
||||
<vim-dev@vim.org>
|
||||
|
||||
|
||||
AUTORE PRINCIPALE
|
||||
|
||||
La maggior parte di Vim è stata creata da Bram Moolenaar <Bram@vim.org>,
|
||||
vedere ":help Bram-Moolenaar"
|
||||
|
||||
Spedire tutti gli altri commenti, modifiche al codice sorgente, fiori e
|
||||
suggerimenti alla mailing list vim-dev:
|
||||
<vim-dev@vim.org>
|
||||
@@ -53,6 +53,12 @@ Unicode true
|
||||
!define WIN64 0
|
||||
!endif
|
||||
|
||||
# if you don't want to include libgcc_s_sjlj-1.dll in the package, use the
|
||||
# switch /DINCLUDE_LIBGCC=0 on the command line makensis.exe.
|
||||
!ifndef INCLUDE_LIBGCC
|
||||
!define INCLUDE_LIBGCC 1
|
||||
!endif
|
||||
|
||||
!include gvim_version.nsh # for version number
|
||||
|
||||
# Definition of Patch for Vim.
|
||||
@@ -728,12 +734,14 @@ Section "$(str_section_nls)" id_section_nls
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext${BIT}\libiconv-2.dll" \
|
||||
"$0\libiconv-2.dll" "$0"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
# !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
|
||||
# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
# "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \
|
||||
# "$0\libgcc_s_sjlj-1.dll" "$0"
|
||||
# !endif
|
||||
!if ${INCLUDE_LIBGCC}
|
||||
!if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \
|
||||
"$0\libgcc_s_sjlj-1.dll" "$0"
|
||||
!endif
|
||||
!endif
|
||||
|
||||
${If} ${SectionIsSelected} ${id_section_editwith}
|
||||
${If} ${RunningX64}
|
||||
@@ -759,12 +767,14 @@ Section "$(str_section_nls)" id_section_nls
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libiconv-2.dll" \
|
||||
"$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
# !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
|
||||
# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
# "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
|
||||
# "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
|
||||
# !endif
|
||||
!if ${INCLUDE_LIBGCC}
|
||||
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
|
||||
# Install libgcc_s_sjlj-1.dll only if it is needed.
|
||||
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
|
||||
"${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
|
||||
"$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
|
||||
!endif
|
||||
!endif
|
||||
${EndIf}
|
||||
SectionEnd
|
||||
!endif
|
||||
|
||||
17
runtime/autoload/dist/ft.vim
vendored
17
runtime/autoload/dist/ft.vim
vendored
@@ -144,6 +144,14 @@ export def FTcfg()
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTcl()
|
||||
if join(getline(1, 4), '') =~ '/\*'
|
||||
setf opencl
|
||||
else
|
||||
setf lisp
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTcls()
|
||||
if exists("g:filetype_cls")
|
||||
exe "setf " .. g:filetype_cls
|
||||
@@ -169,6 +177,14 @@ export def FTcls()
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTll()
|
||||
if getline(1) =~ ';\|\<source_filename\>\|\<target\>'
|
||||
setf llvm
|
||||
else
|
||||
setf lifelines
|
||||
endif
|
||||
enddef
|
||||
|
||||
export def FTlpc()
|
||||
if exists("g:lpc_syntax_for_c")
|
||||
var lnum = 1
|
||||
@@ -880,6 +896,7 @@ export def SetFileTypeSH(name: string, setft = true): string
|
||||
if exists("b:is_sh")
|
||||
unlet b:is_sh
|
||||
endif
|
||||
return SetFileTypeShell("bash", setft)
|
||||
elseif name =~ '\<sh\>' || name =~ '\<dash\>'
|
||||
# Ubuntu links "sh" to "dash", thus it is expected to work the same way
|
||||
b:is_sh = 1
|
||||
|
||||
1
runtime/autoload/dist/vim.vim
vendored
1
runtime/autoload/dist/vim.vim
vendored
@@ -19,7 +19,6 @@ if !has('vim9script')
|
||||
function dist#vim#IsSafeExecutable(filetype, executable)
|
||||
let cwd = getcwd()
|
||||
if empty(exepath(a:executable))
|
||||
echomsg a:executable .. " not found in $PATH"
|
||||
return v:false
|
||||
endif
|
||||
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
|
||||
|
||||
1
runtime/autoload/dist/vim9.vim
vendored
1
runtime/autoload/dist/vim9.vim
vendored
@@ -7,7 +7,6 @@ vim9script
|
||||
|
||||
export def IsSafeExecutable(filetype: string, executable: string): bool
|
||||
if empty(exepath(executable))
|
||||
echomsg executable .. " not found in $PATH"
|
||||
return v:false
|
||||
endif
|
||||
var cwd = getcwd()
|
||||
|
||||
26
runtime/autoload/dist/vimindent.vim
vendored
26
runtime/autoload/dist/vimindent.vim
vendored
@@ -2,10 +2,12 @@ vim9script
|
||||
|
||||
# Language: Vim script
|
||||
# Maintainer: github user lacygoill
|
||||
# Last Change: 2023 Jun 29
|
||||
# Last Change: 2024 Dec 26
|
||||
#
|
||||
# Includes Changes from Vim:
|
||||
# Includes changes from The Vim Project:
|
||||
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
|
||||
# - 2024 Nov 08: Fix indent after :silent! function (D. Kearns via #16009)
|
||||
# - 2024 Dec 26: Fix indent for enums (Jim Zhou via #16293)
|
||||
|
||||
# NOTE: Whenever you change the code, make sure the tests are still passing:
|
||||
#
|
||||
@@ -171,6 +173,7 @@ const MODIFIERS: dict<string> = {
|
||||
def: ['export', 'static'],
|
||||
class: ['export', 'abstract', 'export abstract'],
|
||||
interface: ['export'],
|
||||
enum: ['export'],
|
||||
}
|
||||
# ...
|
||||
# class: ['export', 'abstract', 'export abstract'],
|
||||
@@ -295,7 +298,7 @@ patterns = []
|
||||
endfor
|
||||
}
|
||||
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
|
||||
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]!\=\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
|
||||
|
||||
# STARTS_CURLY_BLOCK {{{3
|
||||
|
||||
@@ -633,6 +636,7 @@ def Offset( # {{{2
|
||||
elseif !line_A.isfirst
|
||||
&& (line_B->EndsWithLineContinuation()
|
||||
|| line_A.text =~ LINE_CONTINUATION_AT_SOL)
|
||||
&& !(line_B->EndsWithComma() && line_A.lnum->IsInside('EnumBlock'))
|
||||
return shiftwidth()
|
||||
endif
|
||||
|
||||
@@ -1050,6 +1054,22 @@ def ContinuesBelowBracketBlock( # {{{3
|
||||
enddef
|
||||
|
||||
def IsInside(lnum: number, syntax: string): bool # {{{3
|
||||
if syntax == 'EnumBlock'
|
||||
var cur_pos = getpos('.')
|
||||
cursor(lnum, 1)
|
||||
var enum_pos = search('^\C\s*\%(export\s\)\=\s*enum\s\+\S\+', 'bnW')
|
||||
var endenum_pos = search('^\C\s*endenum\>', 'bnW')
|
||||
setpos('.', cur_pos)
|
||||
|
||||
if enum_pos == 0 && endenum_pos == 0
|
||||
return false
|
||||
endif
|
||||
if (enum_pos > 0 && (endenum_pos == 0 || enum_pos > endenum_pos))
|
||||
return true
|
||||
endif
|
||||
return false
|
||||
endif
|
||||
|
||||
if !exists('b:vimindent')
|
||||
|| !b:vimindent->has_key($'is_{syntax}')
|
||||
return false
|
||||
|
||||
@@ -3,11 +3,15 @@
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Original Author: Charles E. Campbell
|
||||
" Date: Jan 21, 2014
|
||||
" Version: 36
|
||||
" Version: 37
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
" Last Change: {{{1
|
||||
" 2024 Sep 08 by Vim Project: several small fixes
|
||||
" 2024 Sep 08 by Vim Project: several small fixes (#15640)
|
||||
" 2024 Sep 23 by Vim Project: runtime dir selection fix (#15722)
|
||||
" autoloading search path fix
|
||||
" substitution of hardcoded commands with global variables
|
||||
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
|
||||
" }}}
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
@@ -19,14 +23,14 @@
|
||||
if exists("g:loaded_getscript")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscript= "v36"
|
||||
let g:loaded_getscript= "v37"
|
||||
if &cp
|
||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
finish
|
||||
endif
|
||||
if v:version < 702
|
||||
if v:version < 901
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of GetLatestVimScripts needs vim 7.2"
|
||||
echo "***warning*** this version of GetLatestVimScripts needs vim 9.1"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
@@ -54,6 +58,9 @@ endif
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
if executable("wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
elseif executable("curl.exe")
|
||||
" enforce extension: windows powershell desktop version has a curl alias that hides curl.exe
|
||||
let g:GetLatestVimScripts_wget= "curl.exe"
|
||||
elseif executable("curl")
|
||||
let g:GetLatestVimScripts_wget= "curl"
|
||||
else
|
||||
@@ -66,7 +73,7 @@ endif
|
||||
if !exists("g:GetLatestVimScripts_options")
|
||||
if g:GetLatestVimScripts_wget == "wget"
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
elseif g:GetLatestVimScripts_wget == "curl"
|
||||
elseif g:GetLatestVimScripts_wget =~ "curl"
|
||||
let g:GetLatestVimScripts_options= "-s -o"
|
||||
else
|
||||
let g:GetLatestVimScripts_options= ""
|
||||
@@ -87,6 +94,24 @@ if !exists("g:GetLatestVimScripts_downloadaddr")
|
||||
let g:GetLatestVimScripts_downloadaddr = 'https://www.vim.org/scripts/download_script.php?src_id='
|
||||
endif
|
||||
|
||||
" define decompression tools (on windows this allows redirection to wsl or git tools).
|
||||
" Note tar is available as builtin since Windows 11.
|
||||
if !exists("g:GetLatestVimScripts_bunzip2")
|
||||
let g:GetLatestVimScripts_bunzip2= "bunzip2"
|
||||
endif
|
||||
|
||||
if !exists("g:GetLatestVimScripts_gunzip")
|
||||
let g:GetLatestVimScripts_gunzip= "gunzip"
|
||||
endif
|
||||
|
||||
if !exists("g:GetLatestVimScripts_unxz")
|
||||
let g:GetLatestVimScripts_unxz= "unxz"
|
||||
endif
|
||||
|
||||
if !exists("g:GetLatestVimScripts_unzip")
|
||||
let g:GetLatestVimScripts_unzip= "unzip"
|
||||
endif
|
||||
|
||||
"" For debugging:
|
||||
"let g:GetLatestVimScripts_wget = "echo"
|
||||
"let g:GetLatestVimScripts_options = "options"
|
||||
@@ -96,18 +121,19 @@ endif
|
||||
let s:autoinstall= ""
|
||||
if g:GetLatestVimScripts_allowautoinstall
|
||||
|
||||
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell !~ '\cbash\|pwsh\|powershell'
|
||||
" windows (but not cygwin/bash)
|
||||
let s:dotvim= "vimfiles"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "move"
|
||||
endif
|
||||
let s:is_windows = has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
|
||||
let s:dotvim= s:is_windows ? "vimfiles" : ".vim"
|
||||
|
||||
else
|
||||
" unix
|
||||
let s:dotvim= ".vim"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "mv"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
if &shell =~? '\<pwsh\>\|\<powershell\>'
|
||||
let g:GetLatestVimScripts_mv= "move -Force"
|
||||
elseif s:is_windows && &shell =~? '\<cmd\>'
|
||||
" windows (but not cygwin/bash)
|
||||
let g:GetLatestVimScripts_mv= "move /Y"
|
||||
else
|
||||
" unix or cygwin bash/zsh
|
||||
" 'mv' overrides existing files without asking
|
||||
let g:GetLatestVimScripts_mv= "mv"
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -141,12 +167,6 @@ fun! getscript#GetLatestVimScripts()
|
||||
return
|
||||
endif
|
||||
|
||||
" insure that fnameescape() is available
|
||||
if !exists("*fnameescape")
|
||||
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
|
||||
return
|
||||
endif
|
||||
|
||||
" Find the .../GetLatest subdirectory under the runtimepath
|
||||
for datadir in split(&rtp,',') + ['']
|
||||
if isdirectory(datadir."/GetLatest")
|
||||
@@ -215,10 +235,15 @@ fun! getscript#GetLatestVimScripts()
|
||||
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
||||
let lastline = line("$")
|
||||
" call Decho("lastline#".lastline)
|
||||
let firstdir = substitute(&rtp,',.{-}$','','')
|
||||
let firstdir = substitute(&rtp,',.*$','','')
|
||||
let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n')
|
||||
let plugins += split(globpath(firstdir,"ftplugin/**/*.vim"),'\n')
|
||||
let plugins += split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
|
||||
" extend the search to the packages too (this script predates the feature)
|
||||
let plugins += split(globpath(firstdir,"pack/*/start/*/plugin/**/*.vim"),'\n')
|
||||
let plugins += split(globpath(firstdir,"pack/*/opt/*/plugin/**/*.vim"),'\n')
|
||||
let plugins += split(globpath(firstdir,"pack/*/start/*/ftplugin/**/*.vim"),'\n')
|
||||
let plugins += split(globpath(firstdir,"pack/*/opt/*/ftplugin/**/*.vim"),'\n')
|
||||
let foundscript = 0
|
||||
|
||||
" this loop updates the GetLatestVimScripts.dat file
|
||||
@@ -341,7 +366,7 @@ fun! getscript#GetLatestVimScripts()
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
|
||||
" GetOneScript: (Get Latest Vim script) this function operates {{{1
|
||||
" on the current line, interpreting two numbers and text as
|
||||
" ScriptID, SourceID, and Filename.
|
||||
" It downloads any scripts that have newer versions from vim.sourceforge.net.
|
||||
@@ -353,7 +378,16 @@ fun! s:GetOneScript(...)
|
||||
let t_ti= &t_ti
|
||||
let t_te= &t_te
|
||||
let rs = &rs
|
||||
let ssl = &ssl
|
||||
|
||||
set t_ti= t_te= nors
|
||||
" avoid issues with shellescape() on Windows
|
||||
if s:is_windows && &shell =~? '\<cmd\>'
|
||||
set noshellslash
|
||||
endif
|
||||
|
||||
" restore valures afterwards
|
||||
defer execute("let @a = rega | let &t_ti = t_ti | let &t_te = t_te | let &rs = rs | let &ssl = ssl")
|
||||
|
||||
" put current line on top-of-screen and interpret it into
|
||||
" a script identifier : used to obtain webpage
|
||||
@@ -370,7 +404,6 @@ fun! s:GetOneScript(...)
|
||||
else
|
||||
let curline = getline(".")
|
||||
if curline =~ '^\s*#'
|
||||
let @a= rega
|
||||
" call Dret("GetOneScript : skipping a pure comment line")
|
||||
return
|
||||
endif
|
||||
@@ -405,7 +438,6 @@ fun! s:GetOneScript(...)
|
||||
" plugin author protection from downloading his/her own scripts atop their latest work
|
||||
if scriptid == 0 || srcid == 0
|
||||
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
|
||||
let @a= rega
|
||||
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
|
||||
return
|
||||
endif
|
||||
@@ -473,7 +505,6 @@ fun! s:GetOneScript(...)
|
||||
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
|
||||
" call Dret("GetOneScript : srch for /Click on the package/ failed")
|
||||
let @a= rega
|
||||
return
|
||||
endif
|
||||
" call Decho('found "Click on the package to download"')
|
||||
@@ -489,7 +520,6 @@ fun! s:GetOneScript(...)
|
||||
let s:downerrors = s:downerrors + 1
|
||||
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
|
||||
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
|
||||
let @a= rega
|
||||
" call Dret("GetOneScript : srch for /src_id/ failed")
|
||||
return
|
||||
endif
|
||||
@@ -523,11 +553,11 @@ fun! s:GetOneScript(...)
|
||||
" call Decho(".downloading new <".sname.">")
|
||||
echomsg ".downloading new <".sname.">"
|
||||
if has("win32") || has("win16") || has("win95")
|
||||
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)."|q")
|
||||
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|q
|
||||
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)."|bw!")
|
||||
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|bw!
|
||||
else
|
||||
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
|
||||
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
|
||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
|
||||
endif
|
||||
|
||||
" --------------------------------------------------------------------------
|
||||
@@ -564,17 +594,17 @@ fun! s:GetOneScript(...)
|
||||
" decompress
|
||||
if sname =~ '\.bz2$'
|
||||
" call Decho("decompress: attempt to bunzip2 ".sname)
|
||||
exe "sil !bunzip2 ".shellescape(sname)
|
||||
exe "sil !".g:GetLatestVimScripts_bunzip2." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.bz2$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after bunzip2")
|
||||
elseif sname =~ '\.gz$'
|
||||
" call Decho("decompress: attempt to gunzip ".sname)
|
||||
exe "sil !gunzip ".shellescape(sname)
|
||||
exe "sil !".g:GetLatestVimScripts_gunzip." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.gz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||
elseif sname =~ '\.xz$'
|
||||
" call Decho("decompress: attempt to unxz ".sname)
|
||||
exe "sil !unxz ".shellescape(sname)
|
||||
exe "sil !".g:GetLatestVimScripts_unxz." ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.xz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after unxz")
|
||||
else
|
||||
@@ -584,7 +614,7 @@ fun! s:GetOneScript(...)
|
||||
" distribute archive(.zip, .tar, .vba, .vmb, ...) contents
|
||||
if sname =~ '\.zip$'
|
||||
" call Decho("dearchive: attempt to unzip ".sname)
|
||||
exe "silent !unzip -o ".shellescape(sname)
|
||||
exe "silent !".g:GetLatestVimScripts_unzip." -o ".shellescape(sname)
|
||||
elseif sname =~ '\.tar$'
|
||||
" call Decho("dearchive: attempt to untar ".sname)
|
||||
exe "silent !tar -xvf ".shellescape(sname)
|
||||
@@ -630,8 +660,8 @@ fun! s:GetOneScript(...)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
|
||||
endif
|
||||
if tgtdir != "plugin"
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir)
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir
|
||||
endif
|
||||
|
||||
" helptags step
|
||||
@@ -656,13 +686,7 @@ fun! s:GetOneScript(...)
|
||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
|
||||
endif
|
||||
|
||||
" restore options
|
||||
let &t_ti = t_ti
|
||||
let &t_te = t_te
|
||||
let &rs = rs
|
||||
let @a = rega
|
||||
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
|
||||
|
||||
" call Dret("GetOneScript")
|
||||
endfun
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Last Change: 2024 Nov 25
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
@@ -148,6 +148,9 @@ fun gzip#read(cmd)
|
||||
else
|
||||
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
|
||||
endif
|
||||
if filereadable(undofile(expand("%")))
|
||||
exe "sil rundo " . fnameescape(undofile(expand("%")))
|
||||
endif
|
||||
if &verbose >= 8
|
||||
execute "doau BufReadPost " . fname
|
||||
else
|
||||
|
||||
92
runtime/autoload/javaformat.vim
Normal file
92
runtime/autoload/javaformat.vim
Normal file
@@ -0,0 +1,92 @@
|
||||
" Vim formatting plugin file
|
||||
" Language: Java
|
||||
" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com>
|
||||
" Repository: https://github.com/zzzyxwvut/java-vim.git
|
||||
" Last Change: 2024 Sep 26
|
||||
|
||||
" Documented in ":help ft-java-plugin".
|
||||
if &cp || exists("g:loaded_javaformat") || exists("g:java_ignore_javadoc") || exists("g:java_ignore_markdown")
|
||||
finish
|
||||
endif
|
||||
|
||||
let g:loaded_javaformat = 1
|
||||
|
||||
"""" STRIVE TO REMAIN COMPATIBLE FOR AT LEAST VIM 7.0.
|
||||
|
||||
function! javaformat#RemoveCommonMarkdownWhitespace() abort
|
||||
if mode() != 'n'
|
||||
return 0
|
||||
endif
|
||||
|
||||
let pattern = '\(^\s*///\)\(\s*\)\(.*\)'
|
||||
|
||||
" E121 for v:numbermax before v8.2.2388.
|
||||
" E15 for expr-<< before v8.2.5003.
|
||||
let common = 0x7fffffff
|
||||
let comments = []
|
||||
|
||||
for n in range(v:lnum, (v:lnum + v:count - 1))
|
||||
let parts = matchlist(getline(n), pattern)
|
||||
let whitespace = get(parts, 2, '')
|
||||
let nonwhitespace = get(parts, 3, '')
|
||||
|
||||
if !empty(whitespace)
|
||||
let common = min([common, strlen(whitespace)])
|
||||
elseif !empty(nonwhitespace) || empty(parts)
|
||||
" No whitespace prefix or not a Markdown comment.
|
||||
return 0
|
||||
endif
|
||||
|
||||
call add(comments, [whitespace, parts[1], nonwhitespace])
|
||||
endfor
|
||||
|
||||
let cursor = v:lnum
|
||||
|
||||
for line in comments
|
||||
call setline(cursor, join(line[1 :], strpart(line[0], common)))
|
||||
let cursor += 1
|
||||
endfor
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" See ":help vim9-mix".
|
||||
if !has("vim9script")
|
||||
finish
|
||||
endif
|
||||
|
||||
def! g:javaformat#RemoveCommonMarkdownWhitespace(): number
|
||||
if mode() != 'n'
|
||||
return 0
|
||||
endif
|
||||
|
||||
const pattern: string = '\(^\s*///\)\(\s*\)\(.*\)'
|
||||
var common: number = v:numbermax
|
||||
var comments: list<list<string>> = []
|
||||
|
||||
for n in range(v:lnum, (v:lnum + v:count - 1))
|
||||
const parts: list<string> = matchlist(getline(n), pattern)
|
||||
const whitespace: string = get(parts, 2, '')
|
||||
const nonwhitespace: string = get(parts, 3, '')
|
||||
|
||||
if !empty(whitespace)
|
||||
common = min([common, strlen(whitespace)])
|
||||
elseif !empty(nonwhitespace) || empty(parts)
|
||||
# No whitespace prefix or not a Markdown comment.
|
||||
return 0
|
||||
endif
|
||||
|
||||
add(comments, [whitespace, parts[1], nonwhitespace])
|
||||
endfor
|
||||
|
||||
var cursor: number = v:lnum
|
||||
|
||||
for line in comments
|
||||
setline(cursor, join(line[1 :], strpart(line[0], common)))
|
||||
cursor += 1
|
||||
endfor
|
||||
|
||||
return 0
|
||||
enddef
|
||||
|
||||
" vim: fdm=syntax sw=4 ts=8 noet sta
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,363 +0,0 @@
|
||||
" netrwFileHandlers: contains various extension-based file handlers for
|
||||
" netrw's browsers' x command ("eXecute launcher")
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Original Author: Charles E. Campbell
|
||||
" Date: Sep 18, 2020
|
||||
" Version: 11
|
||||
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
" netrwFileHandlers.vim is provided *as is* and comes with no
|
||||
" warranty of any kind, either expressed or implied. In no
|
||||
" event will the copyright holder be liable for any damages
|
||||
" resulting from the use of this software.
|
||||
"
|
||||
" Rom 6:23 (WEB) For the wages of sin is death, but the free gift of God {{{1
|
||||
" is eternal life in Christ Jesus our Lord.
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
if exists("g:loaded_netrwFileHandlers") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwFileHandlers= "v11"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#Invoke: {{{1
|
||||
fun! netrwFileHandlers#Invoke(exten,fname)
|
||||
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
|
||||
let exten= a:exten
|
||||
" list of supported special characters. Consider rcs,v --- that can be
|
||||
" supported with a NFH_rcsCOMMAv() handler
|
||||
if exten =~ '[@:,$!=\-+%?;~]'
|
||||
let specials= {
|
||||
\ '@' : 'AT',
|
||||
\ ':' : 'COLON',
|
||||
\ ',' : 'COMMA',
|
||||
\ '$' : 'DOLLAR',
|
||||
\ '!' : 'EXCLAMATION',
|
||||
\ '=' : 'EQUAL',
|
||||
\ '-' : 'MINUS',
|
||||
\ '+' : 'PLUS',
|
||||
\ '%' : 'PERCENT',
|
||||
\ '?' : 'QUESTION',
|
||||
\ ';' : 'SEMICOLON',
|
||||
\ '~' : 'TILDE'}
|
||||
let exten= substitute(a:exten,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
|
||||
" call Decho('fname<'.fname.'> done with dictionary')
|
||||
endif
|
||||
|
||||
if a:exten != "" && exists("*NFH_".exten)
|
||||
" support user NFH_*() functions
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
|
||||
exe "let ret= NFH_".exten.'("'.a:fname.'")'
|
||||
elseif a:exten != "" && exists("*s:NFH_".exten)
|
||||
" use builtin-NFH_*() functions
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
|
||||
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
|
||||
return 0
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_html: handles html when the user hits "x" when the {{{1
|
||||
" cursor is atop a *.html file
|
||||
fun! s:NFH_html(pagefile)
|
||||
" call Dfunc("s:NFH_html(".a:pagefile.")")
|
||||
|
||||
let page= substitute(a:pagefile,'^','file://','')
|
||||
|
||||
if executable("mozilla")
|
||||
" call Decho("executing !mozilla ".page)
|
||||
exe "!mozilla ".shellescape(page,1)
|
||||
elseif executable("netscape")
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape ".shellescape(page,1)
|
||||
else
|
||||
" call Dret("s:NFH_html 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_html 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_htm: handles html when the user hits "x" when the {{{1
|
||||
" cursor is atop a *.htm file
|
||||
fun! s:NFH_htm(pagefile)
|
||||
" call Dfunc("s:NFH_htm(".a:pagefile.")")
|
||||
|
||||
let page= substitute(a:pagefile,'^','file://','')
|
||||
|
||||
if executable("mozilla")
|
||||
" call Decho("executing !mozilla ".page)
|
||||
exe "!mozilla ".shellescape(page,1)
|
||||
elseif executable("netscape")
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape ".shellescape(page,1)
|
||||
else
|
||||
" call Dret("s:NFH_htm 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_htm 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_jpg: {{{1
|
||||
fun! s:NFH_jpg(jpgfile)
|
||||
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
|
||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_jpg 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_jpg 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_gif: {{{1
|
||||
fun! s:NFH_gif(giffile)
|
||||
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".shellescape(a:giffile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
|
||||
else
|
||||
" call Dret("s:NFH_gif 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_gif 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_png: {{{1
|
||||
fun! s:NFH_png(pngfile)
|
||||
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".shellescape(a:pngfile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_png 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_png 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_pnm: {{{1
|
||||
fun! s:NFH_pnm(pnmfile)
|
||||
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_pnm 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_pnm 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_bmp: visualize bmp files {{{1
|
||||
fun! s:NFH_bmp(bmpfile)
|
||||
" call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:bmpfile
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_bmp 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_bmp 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_pdf: visualize pdf files {{{1
|
||||
fun! s:NFH_pdf(pdf)
|
||||
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
|
||||
if executable("gs")
|
||||
exe 'silent! !gs '.shellescape(a:pdf,1)
|
||||
elseif executable("pdftotext")
|
||||
exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
|
||||
else
|
||||
" call Dret("s:NFH_pdf 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_pdf 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_doc: visualize doc files {{{1
|
||||
fun! s:NFH_doc(doc)
|
||||
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter '.shellescape(a:doc,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_doc 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_doc 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_sxw: visualize sxw files {{{1
|
||||
fun! s:NFH_sxw(sxw)
|
||||
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter '.shellescape(a:sxw,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_sxw 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_sxw 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_xls: visualize xls files {{{1
|
||||
fun! s:NFH_xls(xls)
|
||||
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
|
||||
|
||||
if executable("oocalc")
|
||||
exe 'silent! !oocalc '.shellescape(a:xls,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_xls 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_xls 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_ps: handles PostScript files {{{1
|
||||
fun! s:NFH_ps(ps)
|
||||
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
|
||||
if executable("gs")
|
||||
" call Decho("exe silent! !gs ".a:ps)
|
||||
exe "silent! !gs ".shellescape(a:ps,1)
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
" call Decho("exe silent! !ghostscript ".a:ps)
|
||||
exe "silent! !ghostscript ".shellescape(a:ps,1)
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
" call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
|
||||
exe "silent! !gswin32 ".shellescape(a:ps,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_ps 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_ps 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_eps: handles encapsulated PostScript files {{{1
|
||||
fun! s:NFH_eps(eps)
|
||||
" call Dfunc("s:NFH_eps()")
|
||||
if executable("gs")
|
||||
exe "silent! !gs ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
exe "silent! !gswin32 ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_eps 0")
|
||||
return 0
|
||||
endif
|
||||
" call Dret("s:NFH_eps 0")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_fig: handles xfig files {{{1
|
||||
fun! s:NFH_fig(fig)
|
||||
" call Dfunc("s:NFH_fig()")
|
||||
if executable("xfig")
|
||||
exe "silent! !xfig ".a:fig
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_fig 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_fig 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:NFH_obj: handles tgif's obj files {{{1
|
||||
fun! s:NFH_obj(obj)
|
||||
" call Dfunc("s:NFH_obj()")
|
||||
if has("unix") && executable("tgif")
|
||||
exe "silent! !tgif ".a:obj
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_obj 0")
|
||||
return 0
|
||||
endif
|
||||
|
||||
" call Dret("s:NFH_obj 1")
|
||||
return 1
|
||||
endfun
|
||||
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
@@ -1,6 +1,6 @@
|
||||
" Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com>
|
||||
" URL: https://github.com/benknoble/vim-racket
|
||||
" Last Change: 2023 Sep 22
|
||||
" Last Change: 2024 Nov 12
|
||||
vim9script
|
||||
|
||||
def MakePatternFromLiterals(xs: list<string>): string
|
||||
@@ -170,7 +170,7 @@ def PosLT(left: dict<any>, right: dict<any>): bool
|
||||
enddef
|
||||
|
||||
def IsForFold(word: string): bool
|
||||
return ['for/fold', 'for/foldr', 'for*/fold', 'for*/foldr']->index(word) >= 0
|
||||
return ['for/fold', 'for/foldr', 'for/lists', 'for*/fold', 'for*/foldr', 'for*/lists']->index(word) >= 0
|
||||
enddef
|
||||
|
||||
def IsSecondForm(blnum: number, bcol: number, vlnum: number): bool
|
||||
@@ -209,5 +209,5 @@ def IsSecondForm(blnum: number, bcol: number, vlnum: number): bool
|
||||
endwhile
|
||||
|
||||
# assert_report(printf('forms seen pre-return: %d', forms_seen))
|
||||
return forms_seen == 2 || (forms_seen == 1 && !empty(stack))
|
||||
return (forms_seen == 2 && empty(stack)) || (forms_seen == 1 && !empty(stack))
|
||||
enddef
|
||||
|
||||
352
runtime/autoload/spotbugs.vim
Normal file
352
runtime/autoload/spotbugs.vim
Normal file
@@ -0,0 +1,352 @@
|
||||
" Default pre- and post-compiler actions and commands for SpotBugs
|
||||
" Maintainers: @konfekt and @zzzyxwvut
|
||||
" Last Change: 2024 Dec 08
|
||||
|
||||
let s:save_cpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Look for the setting of "g:spotbugs#state" in "ftplugin/java.vim".
|
||||
let s:state = get(g:, 'spotbugs#state', {})
|
||||
let s:commands = get(s:state, 'commands', {})
|
||||
let s:compiler = get(s:state, 'compiler', '')
|
||||
let s:readable = filereadable($VIMRUNTIME . '/compiler/' . s:compiler . '.vim')
|
||||
|
||||
if has_key(s:commands, 'DefaultPreCompilerCommand')
|
||||
let g:SpotBugsPreCompilerCommand = s:commands.DefaultPreCompilerCommand
|
||||
else
|
||||
|
||||
function! s:DefaultPreCompilerCommand(arguments) abort
|
||||
execute 'make ' . a:arguments
|
||||
cc
|
||||
endfunction
|
||||
|
||||
let g:SpotBugsPreCompilerCommand = function('s:DefaultPreCompilerCommand')
|
||||
endif
|
||||
|
||||
if has_key(s:commands, 'DefaultPreCompilerTestCommand')
|
||||
let g:SpotBugsPreCompilerTestCommand = s:commands.DefaultPreCompilerTestCommand
|
||||
else
|
||||
|
||||
function! s:DefaultPreCompilerTestCommand(arguments) abort
|
||||
execute 'make ' . a:arguments
|
||||
cc
|
||||
endfunction
|
||||
|
||||
let g:SpotBugsPreCompilerTestCommand = function('s:DefaultPreCompilerTestCommand')
|
||||
endif
|
||||
|
||||
if has_key(s:commands, 'DefaultPostCompilerCommand')
|
||||
let g:SpotBugsPostCompilerCommand = s:commands.DefaultPostCompilerCommand
|
||||
else
|
||||
|
||||
function! s:DefaultPostCompilerCommand(arguments) abort
|
||||
execute 'make ' . a:arguments
|
||||
endfunction
|
||||
|
||||
let g:SpotBugsPostCompilerCommand = function('s:DefaultPostCompilerCommand')
|
||||
endif
|
||||
|
||||
if v:version > 900
|
||||
|
||||
function! spotbugs#DeleteClassFiles() abort
|
||||
if !exists('b:spotbugs_class_files')
|
||||
return
|
||||
endif
|
||||
|
||||
for pathname in b:spotbugs_class_files
|
||||
let classname = pathname =~# "^'.\\+\\.class'$"
|
||||
\ ? eval(pathname)
|
||||
\ : pathname
|
||||
|
||||
if classname =~# '\.class$' && filereadable(classname)
|
||||
" Since v9.0.0795.
|
||||
let octad = readblob(classname, 0, 8)
|
||||
|
||||
" Test the magic number and the major version number (45 for v1.0).
|
||||
" Since v9.0.2027.
|
||||
if len(octad) == 8 && octad[0 : 3] == 0zcafe.babe &&
|
||||
\ or((octad[6] << 8), octad[7]) >= 45
|
||||
echomsg printf('Deleting %s: %d', classname, delete(classname))
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
let b:spotbugs_class_files = []
|
||||
endfunction
|
||||
|
||||
else
|
||||
|
||||
function! s:DeleteClassFilesWithNewLineCodes(classname) abort
|
||||
" The distribution of "0a"s in class file versions 2560 and 2570:
|
||||
"
|
||||
" 0zca.fe.ba.be.00.00.0a.00 0zca.fe.ba.be.00.00.0a.0a
|
||||
" 0zca.fe.ba.be.00.0a.0a.00 0zca.fe.ba.be.00.0a.0a.0a
|
||||
" 0zca.fe.ba.be.0a.00.0a.00 0zca.fe.ba.be.0a.00.0a.0a
|
||||
" 0zca.fe.ba.be.0a.0a.0a.00 0zca.fe.ba.be.0a.0a.0a.0a
|
||||
let numbers = [0, 0, 0, 0, 0, 0, 0, 0]
|
||||
let offset = 0
|
||||
let lines = readfile(a:classname, 'b', 4)
|
||||
|
||||
" Track NL byte counts to handle files of less than 8 bytes.
|
||||
let nl_cnt = len(lines)
|
||||
" Track non-NL byte counts for "0zca.fe.ba.be.0a.0a.0a.0a".
|
||||
let non_nl_cnt = 0
|
||||
|
||||
for line in lines
|
||||
for idx in range(strlen(line))
|
||||
" Remap NLs to Nuls.
|
||||
let numbers[offset] = (line[idx] == "\n") ? 0 : char2nr(line[idx]) % 256
|
||||
let non_nl_cnt += 1
|
||||
let offset += 1
|
||||
|
||||
if offset > 7
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
let nl_cnt -= 1
|
||||
|
||||
if offset > 7 || (nl_cnt < 1 && non_nl_cnt > 4)
|
||||
break
|
||||
endif
|
||||
|
||||
" Reclaim NLs.
|
||||
let numbers[offset] = 10
|
||||
let offset += 1
|
||||
|
||||
if offset > 7
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Test the magic number and the major version number (45 for v1.0).
|
||||
if offset > 7 && numbers[0] == 0xca && numbers[1] == 0xfe &&
|
||||
\ numbers[2] == 0xba && numbers[3] == 0xbe &&
|
||||
\ (numbers[6] * 256 + numbers[7]) >= 45
|
||||
echomsg printf('Deleting %s: %d', a:classname, delete(a:classname))
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DeleteClassFiles() abort
|
||||
if !exists('b:spotbugs_class_files')
|
||||
return
|
||||
endif
|
||||
|
||||
let encoding = &encoding
|
||||
|
||||
try
|
||||
set encoding=latin1
|
||||
|
||||
for pathname in b:spotbugs_class_files
|
||||
let classname = pathname =~# "^'.\\+\\.class'$"
|
||||
\ ? eval(pathname)
|
||||
\ : pathname
|
||||
|
||||
if classname =~# '\.class$' && filereadable(classname)
|
||||
let line = get(readfile(classname, 'b', 1), 0, '')
|
||||
let length = strlen(line)
|
||||
|
||||
" Test the magic number and the major version number (45 for v1.0).
|
||||
if length > 3 && line[0 : 3] == "\xca\xfe\xba\xbe"
|
||||
if length > 7 && ((line[6] == "\n" ? 0 : char2nr(line[6]) % 256) * 256 +
|
||||
\ (line[7] == "\n" ? 0 : char2nr(line[7]) % 256)) >= 45
|
||||
echomsg printf('Deleting %s: %d', classname, delete(classname))
|
||||
else
|
||||
call s:DeleteClassFilesWithNewLineCodes(classname)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
finally
|
||||
let &encoding = encoding
|
||||
endtry
|
||||
|
||||
let b:spotbugs_class_files = []
|
||||
endfunction
|
||||
|
||||
endif
|
||||
|
||||
function! spotbugs#DefaultPostCompilerAction() abort
|
||||
" Since v7.4.191.
|
||||
call call(g:SpotBugsPostCompilerCommand, ['%:S'])
|
||||
endfunction
|
||||
|
||||
if s:readable && s:compiler ==# 'maven' && executable('mvn')
|
||||
|
||||
function! spotbugs#DefaultPreCompilerAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler maven
|
||||
call call(g:SpotBugsPreCompilerCommand, ['compile'])
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultPreCompilerTestAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler maven
|
||||
call call(g:SpotBugsPreCompilerTestCommand, ['test-compile'])
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultProperties() abort
|
||||
return {
|
||||
\ 'PreCompilerAction':
|
||||
\ function('spotbugs#DefaultPreCompilerAction'),
|
||||
\ 'PreCompilerTestAction':
|
||||
\ function('spotbugs#DefaultPreCompilerTestAction'),
|
||||
\ 'PostCompilerAction':
|
||||
\ function('spotbugs#DefaultPostCompilerAction'),
|
||||
\ 'sourceDirPath': ['src/main/java'],
|
||||
\ 'classDirPath': ['target/classes'],
|
||||
\ 'testSourceDirPath': ['src/test/java'],
|
||||
\ 'testClassDirPath': ['target/test-classes'],
|
||||
\ }
|
||||
endfunction
|
||||
|
||||
unlet s:readable s:compiler
|
||||
elseif s:readable && s:compiler ==# 'ant' && executable('ant')
|
||||
|
||||
function! spotbugs#DefaultPreCompilerAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler ant
|
||||
call call(g:SpotBugsPreCompilerCommand, ['compile'])
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultPreCompilerTestAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler ant
|
||||
call call(g:SpotBugsPreCompilerTestCommand, ['compile-test'])
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultProperties() abort
|
||||
return {
|
||||
\ 'PreCompilerAction':
|
||||
\ function('spotbugs#DefaultPreCompilerAction'),
|
||||
\ 'PreCompilerTestAction':
|
||||
\ function('spotbugs#DefaultPreCompilerTestAction'),
|
||||
\ 'PostCompilerAction':
|
||||
\ function('spotbugs#DefaultPostCompilerAction'),
|
||||
\ 'sourceDirPath': ['src'],
|
||||
\ 'classDirPath': ['build/classes'],
|
||||
\ 'testSourceDirPath': ['test'],
|
||||
\ 'testClassDirPath': ['build/test/classes'],
|
||||
\ }
|
||||
endfunction
|
||||
|
||||
unlet s:readable s:compiler
|
||||
elseif s:readable && s:compiler ==# 'javac' && executable('javac')
|
||||
let s:filename = tempname()
|
||||
|
||||
function! spotbugs#DefaultPreCompilerAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler javac
|
||||
|
||||
if get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')) =~ '\s@\S'
|
||||
" Only read options and filenames from @options [@sources ...] and do
|
||||
" not update these files when filelists change.
|
||||
call call(g:SpotBugsPreCompilerCommand, [''])
|
||||
else
|
||||
" Collect filenames so that Javac can figure out what to compile.
|
||||
let filelist = []
|
||||
|
||||
for arg_num in range(argc(-1))
|
||||
let arg_name = argv(arg_num)
|
||||
|
||||
if arg_name =~# '\.java\=$'
|
||||
call add(filelist, fnamemodify(arg_name, ':p:S'))
|
||||
endif
|
||||
endfor
|
||||
|
||||
for buf_num in range(1, bufnr('$'))
|
||||
if !buflisted(buf_num)
|
||||
continue
|
||||
endif
|
||||
|
||||
let buf_name = bufname(buf_num)
|
||||
|
||||
if buf_name =~# '\.java\=$'
|
||||
let buf_name = fnamemodify(buf_name, ':p:S')
|
||||
|
||||
if index(filelist, buf_name) < 0
|
||||
call add(filelist, buf_name)
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
|
||||
noautocmd call writefile(filelist, s:filename)
|
||||
call call(g:SpotBugsPreCompilerCommand, [shellescape('@' . s:filename)])
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultPreCompilerTestAction() abort
|
||||
call spotbugs#DefaultPreCompilerAction()
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultProperties() abort
|
||||
return {
|
||||
\ 'PreCompilerAction':
|
||||
\ function('spotbugs#DefaultPreCompilerAction'),
|
||||
\ 'PostCompilerAction':
|
||||
\ function('spotbugs#DefaultPostCompilerAction'),
|
||||
\ }
|
||||
endfunction
|
||||
|
||||
unlet s:readable s:compiler g:SpotBugsPreCompilerTestCommand
|
||||
delfunction! s:DefaultPreCompilerTestCommand
|
||||
else
|
||||
|
||||
function! spotbugs#DefaultPreCompilerAction() abort
|
||||
echomsg printf('Not supported: "%s"', s:compiler)
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultPreCompilerTestAction() abort
|
||||
call spotbugs#DefaultPreCompilerAction()
|
||||
endfunction
|
||||
|
||||
function! spotbugs#DefaultProperties() abort
|
||||
return {}
|
||||
endfunction
|
||||
|
||||
" XXX: Keep "s:compiler" around for "spotbugs#DefaultPreCompilerAction()",
|
||||
" "s:DefaultPostCompilerCommand" -- "spotbugs#DefaultPostCompilerAction()".
|
||||
unlet s:readable g:SpotBugsPreCompilerCommand g:SpotBugsPreCompilerTestCommand
|
||||
delfunction! s:DefaultPreCompilerCommand
|
||||
delfunction! s:DefaultPreCompilerTestCommand
|
||||
endif
|
||||
|
||||
function! s:DefineBufferAutocmd(event, ...) abort
|
||||
if !exists('#java_spotbugs#User')
|
||||
return 1
|
||||
endif
|
||||
|
||||
for l:event in insert(copy(a:000), a:event)
|
||||
if l:event != 'User'
|
||||
execute printf('silent! autocmd! java_spotbugs %s <buffer>', l:event)
|
||||
execute printf('autocmd java_spotbugs %s <buffer> doautocmd User', l:event)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
function! s:RemoveBufferAutocmd(event, ...) abort
|
||||
if !exists('#java_spotbugs')
|
||||
return 1
|
||||
endif
|
||||
|
||||
for l:event in insert(copy(a:000), a:event)
|
||||
if l:event != 'User'
|
||||
execute printf('silent! autocmd! java_spotbugs %s <buffer>', l:event)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return 0
|
||||
endfunction
|
||||
|
||||
" Documented in ":help compiler-spotbugs".
|
||||
command! -bar -nargs=+ -complete=event SpotBugsDefineBufferAutocmd
|
||||
\ call s:DefineBufferAutocmd(<f-args>)
|
||||
command! -bar -nargs=+ -complete=event SpotBugsRemoveBufferAutocmd
|
||||
\ call s:RemoveBufferAutocmd(<f-args>)
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
unlet s:commands s:state s:save_cpo
|
||||
|
||||
" vim: set foldmethod=syntax shiftwidth=2 expandtab:
|
||||
@@ -1,6 +1,6 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Nov 14, 2023
|
||||
" Date: Nov 11, 2024
|
||||
" Version: 32b (with modifications from the Vim Project)
|
||||
" Maintainer: This runtime file is looking for a new maintainer.
|
||||
" Former Maintainer: Charles E Campbell
|
||||
@@ -23,7 +23,7 @@
|
||||
if &cp || exists("g:loaded_tar")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v32a"
|
||||
let g:loaded_tar= "v32b"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of tar needs vim 7.2"
|
||||
@@ -41,7 +41,7 @@ if !exists("g:tar_browseoptions")
|
||||
let g:tar_browseoptions= "Ptf"
|
||||
endif
|
||||
if !exists("g:tar_readoptions")
|
||||
let g:tar_readoptions= "OPxf"
|
||||
let g:tar_readoptions= "pPxf"
|
||||
endif
|
||||
if !exists("g:tar_cmd")
|
||||
let g:tar_cmd= "tar"
|
||||
@@ -80,7 +80,7 @@ if !exists("g:tar_copycmd")
|
||||
let g:tar_copycmd= g:netrw_localcopycmd
|
||||
endif
|
||||
if !exists("g:tar_extractcmd")
|
||||
let g:tar_extractcmd= "tar -xf"
|
||||
let g:tar_extractcmd= "tar -pxf"
|
||||
endif
|
||||
|
||||
" set up shell quoting character
|
||||
@@ -294,6 +294,41 @@ fun! tar#Read(fname,mode)
|
||||
set report=10
|
||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
|
||||
" changing the directory to the temporary earlier to allow tar to extract the file with permissions intact
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
||||
let &report= repkeep
|
||||
return
|
||||
endif
|
||||
|
||||
let curdir= getcwd()
|
||||
let tmpdir= tempname()
|
||||
let b:curdir= tmpdir
|
||||
let b:tmpdir= curdir
|
||||
if tmpdir =~ '\.'
|
||||
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
|
||||
endif
|
||||
call mkdir(tmpdir,"p")
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
try
|
||||
exe "cd ".fnameescape(tmpdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
|
||||
let &report= repkeep
|
||||
return
|
||||
endtry
|
||||
|
||||
" place temporary files under .../_ZIPVIM_/
|
||||
if isdirectory("_ZIPVIM_")
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
endif
|
||||
call mkdir("_ZIPVIM_")
|
||||
cd _ZIPVIM_
|
||||
|
||||
if has("win32unix") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||
@@ -332,9 +367,10 @@ fun! tar#Read(fname,mode)
|
||||
|
||||
if tarfile =~# '\.bz2$'
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif tarfile =~# '\.\(gz\)$'
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
|
||||
exe "read ".fname
|
||||
elseif tarfile =~# '\(\.tgz\|\.tbz\|\.txz\)'
|
||||
if has("unix") && executable("file")
|
||||
let filekind= system("file ".shellescape(tarfile,1))
|
||||
@@ -343,20 +379,27 @@ fun! tar#Read(fname,mode)
|
||||
endif
|
||||
if filekind =~ "bzip2"
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif filekind =~ "XZ"
|
||||
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif filekind =~ "Zstandard"
|
||||
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
else
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
endif
|
||||
|
||||
elseif tarfile =~# '\.lrp$'
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif tarfile =~# '\.lzma$'
|
||||
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
else
|
||||
if tarfile =~ '^\s*-'
|
||||
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||
@@ -364,6 +407,16 @@ fun! tar#Read(fname,mode)
|
||||
endif
|
||||
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
|
||||
exe "read ".fname
|
||||
endif
|
||||
|
||||
redraw!
|
||||
|
||||
if v:shell_error != 0
|
||||
cd ..
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
exe "cd ".fnameescape(curdir)
|
||||
echohl Error | echo "***error*** (tar#Read) sorry, unable to open or extract ".tarfile." with ".fname | echohl None
|
||||
endif
|
||||
|
||||
if doro
|
||||
@@ -388,6 +441,10 @@ fun! tar#Write(fname)
|
||||
" call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
|
||||
" temporary buffer variable workaround because too fucking tired. but it works now
|
||||
let curdir= b:curdir
|
||||
let tmpdir= b:tmpdir
|
||||
|
||||
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
|
||||
redraw!
|
||||
@@ -404,44 +461,6 @@ fun! tar#Write(fname)
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
endif
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
" call Decho("***error*** (tar#Write) sorry, mkdir() doesn't work on your system")
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
endif
|
||||
|
||||
let curdir= getcwd()
|
||||
let tmpdir= tempname()
|
||||
" call Decho("orig tempname<".tmpdir.">")
|
||||
if tmpdir =~ '\.'
|
||||
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
|
||||
endif
|
||||
" call Decho("tmpdir<".tmpdir.">")
|
||||
call mkdir(tmpdir,"p")
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
try
|
||||
exe "cd ".fnameescape(tmpdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
" call Decho("***error*** (tar#Write) cannot cd to temporary directory")
|
||||
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
endtry
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
" place temporary files under .../_ZIPVIM_/
|
||||
if isdirectory("_ZIPVIM_")
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
endif
|
||||
call mkdir("_ZIPVIM_")
|
||||
cd _ZIPVIM_
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
|
||||
219
runtime/autoload/tutor.vim
Normal file
219
runtime/autoload/tutor.vim
Normal file
@@ -0,0 +1,219 @@
|
||||
" vim: fdm=marker et ts=4 sw=4
|
||||
|
||||
" Setup: {{{1
|
||||
function! tutor#SetupVim()
|
||||
if !exists('g:did_load_ftplugin') || g:did_load_ftplugin != 1
|
||||
filetype plugin on
|
||||
endif
|
||||
if has('syntax')
|
||||
if !exists('g:syntax_on') || g:syntax_on == 0
|
||||
syntax on
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Loads metadata file, if available
|
||||
function! tutor#LoadMetadata()
|
||||
let b:tutor_metadata = json_decode(join(readfile(expand('%').'.json'), "\n"))
|
||||
endfunction
|
||||
|
||||
" Mappings: {{{1
|
||||
|
||||
function! tutor#SetNormalMappings()
|
||||
nnoremap <silent> <buffer> <CR> :call tutor#FollowLink(0)<cr>
|
||||
nnoremap <silent> <buffer> <2-LeftMouse> :call tutor#MouseDoubleClick()<cr>
|
||||
nnoremap <buffer> >> :call tutor#InjectCommand()<cr>
|
||||
endfunction
|
||||
|
||||
function! tutor#MouseDoubleClick()
|
||||
if foldclosed(line('.')) > -1
|
||||
normal! zo
|
||||
else
|
||||
if match(getline('.'), '^#\{1,} ') > -1
|
||||
silent normal! zc
|
||||
else
|
||||
call tutor#FollowLink(0)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! tutor#InjectCommand()
|
||||
let l:cmd = substitute(getline('.'), '^\s*', '', '')
|
||||
exe l:cmd
|
||||
redraw | echohl WarningMsg | echon "tutor: ran" | echohl None | echon " " | echohl Statement | echon l:cmd
|
||||
endfunction
|
||||
|
||||
function! tutor#FollowLink(force)
|
||||
let l:stack_s = join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), '')
|
||||
if l:stack_s =~# 'tutorLink'
|
||||
let l:link_start = searchpairpos('\[', '', ')', 'nbcW')
|
||||
let l:link_end = searchpairpos('\[', '', ')', 'ncW')
|
||||
if l:link_start[0] == l:link_end[0]
|
||||
let l:linkData = getline(l:link_start[0])[l:link_start[1]-1:l:link_end[1]-1]
|
||||
else
|
||||
return
|
||||
endif
|
||||
let l:target = matchstr(l:linkData, '(\@<=.*)\@=')
|
||||
if a:force != 1 && match(l:target, '\*.\+\*') > -1
|
||||
call cursor(l:link_start[0], l:link_end[1])
|
||||
call search(l:target, '')
|
||||
normal! ^
|
||||
elseif a:force != 1 && match(l:target, '^@tutor:') > -1
|
||||
let l:tutor = matchstr(l:target, '@tutor:\zs.*')
|
||||
exe "Tutor ".l:tutor
|
||||
else
|
||||
exe "help ".l:target
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Folding And Info: {{{1
|
||||
|
||||
function! tutor#TutorFolds()
|
||||
if getline(v:lnum) =~# '^#\{1,6}'
|
||||
return ">". len(matchstr(getline(v:lnum), '^#\{1,6}'))
|
||||
else
|
||||
return "="
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Marks: {{{1
|
||||
|
||||
function! tutor#ApplyMarks()
|
||||
hi! link tutorExpect Special
|
||||
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
|
||||
let b:tutor_sign_id = 1
|
||||
for expct in keys(b:tutor_metadata['expect'])
|
||||
let lnum = eval(expct)
|
||||
call matchaddpos('tutorExpect', [lnum])
|
||||
call tutor#CheckLine(lnum)
|
||||
endfor
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! tutor#ApplyMarksOnChanged()
|
||||
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
|
||||
let lnum = line('.')
|
||||
if index(keys(b:tutor_metadata['expect']), string(lnum)) > -1
|
||||
call tutor#CheckLine(lnum)
|
||||
endif
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! tutor#CheckLine(line)
|
||||
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
|
||||
let bufn = bufnr('%')
|
||||
let ctext = getline(a:line)
|
||||
if b:tutor_metadata['expect'][string(a:line)] == -1 || ctext ==# b:tutor_metadata['expect'][string(a:line)]
|
||||
exe "sign place ".b:tutor_sign_id." line=".a:line." name=tutorok buffer=".bufn
|
||||
else
|
||||
exe "sign place ".b:tutor_sign_id." line=".a:line." name=tutorbad buffer=".bufn
|
||||
endif
|
||||
let b:tutor_sign_id+=1
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Tutor Cmd: {{{1
|
||||
|
||||
function! s:Locale()
|
||||
if exists('v:lang') && v:lang =~ '\a\a'
|
||||
let l:lang = v:lang
|
||||
elseif $LC_ALL =~ '\a\a'
|
||||
let l:lang = $LC_ALL
|
||||
elseif $LANG =~ '\a\a'
|
||||
let l:lang = $LANG
|
||||
else
|
||||
let l:lang = 'en_US'
|
||||
endif
|
||||
return split(l:lang, '_')
|
||||
endfunction
|
||||
|
||||
function! s:GlobPath(lp, pat)
|
||||
if version >= 704 && has('patch279')
|
||||
return globpath(a:lp, a:pat, 1, 1)
|
||||
else
|
||||
return split(globpath(a:lp, a:pat, 1), '\n')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! s:Sort(a, b)
|
||||
let mod_a = fnamemodify(a:a, ':t')
|
||||
let mod_b = fnamemodify(a:b, ':t')
|
||||
if mod_a == mod_b
|
||||
let retval = 0
|
||||
elseif mod_a > mod_b
|
||||
if match(mod_a, '^vim-') > -1 && match(mod_b, '^vim-') == -1
|
||||
let retval = -1
|
||||
else
|
||||
let retval = 1
|
||||
endif
|
||||
else
|
||||
if match(mod_b, '^vim-') > -1 && match(mod_a, '^vim-') == -1
|
||||
let retval = 1
|
||||
else
|
||||
let retval = -1
|
||||
endif
|
||||
endif
|
||||
return retval
|
||||
endfunction
|
||||
|
||||
function! s:GlobTutorials(name)
|
||||
" search for tutorials:
|
||||
" 1. non-localized
|
||||
let l:tutors = s:GlobPath(&rtp, 'tutor/'.a:name.'.tutor')
|
||||
" 2. localized for current locale
|
||||
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/'.s:Locale()[0].'/'.a:name.'.tutor')
|
||||
" 3. fallback to 'en'
|
||||
if len(l:locale_tutors) == 0
|
||||
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/en/'.a:name.'.tutor')
|
||||
endif
|
||||
call extend(l:tutors, l:locale_tutors)
|
||||
return uniq(sort(l:tutors, 's:Sort'), 's:Sort')
|
||||
endfunction
|
||||
|
||||
function! tutor#TutorCmd(tutor_name)
|
||||
if match(a:tutor_name, '[[:space:]]') > 0
|
||||
echom "Only one argument accepted (check spaces)"
|
||||
return
|
||||
endif
|
||||
|
||||
if a:tutor_name == ''
|
||||
let l:tutor_name = 'vim-01-beginner.tutor'
|
||||
else
|
||||
let l:tutor_name = a:tutor_name
|
||||
endif
|
||||
|
||||
if match(l:tutor_name, '\.tutor$') > 0
|
||||
let l:tutor_name = fnamemodify(l:tutor_name, ':r')
|
||||
endif
|
||||
|
||||
let l:tutors = s:GlobTutorials(l:tutor_name)
|
||||
|
||||
if len(l:tutors) == 0
|
||||
echom "No tutorial with that name found"
|
||||
return
|
||||
endif
|
||||
|
||||
if len(l:tutors) == 1
|
||||
let l:to_open = l:tutors[0]
|
||||
else
|
||||
let l:idx = 0
|
||||
let l:candidates = ['Several tutorials with that name found. Select one:']
|
||||
for candidate in map(copy(l:tutors),
|
||||
\'fnamemodify(v:val, ":h:h:t")."/".s:Locale()[0]."/".fnamemodify(v:val, ":t")')
|
||||
let l:idx += 1
|
||||
call add(l:candidates, l:idx.'. '.candidate)
|
||||
endfor
|
||||
let l:tutor_to_open = inputlist(l:candidates)
|
||||
let l:to_open = l:tutors[l:tutor_to_open-1]
|
||||
endif
|
||||
|
||||
call tutor#SetupVim()
|
||||
exe "edit ".l:to_open
|
||||
endfunction
|
||||
|
||||
function! tutor#TutorCmdComplete(lead,line,pos)
|
||||
let l:tutors = s:GlobTutorials('*')
|
||||
let l:names = uniq(sort(map(l:tutors, 'fnamemodify(v:val, ":t:r")'), 's:Sort'))
|
||||
return join(l:names, "\n")
|
||||
endfunction
|
||||
@@ -1,6 +1,7 @@
|
||||
" Language: Typst
|
||||
" Maintainer: Gregory Anders
|
||||
" Last Change: 2024-07-14
|
||||
" Previous Maintainer: Gregory Anders
|
||||
" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
|
||||
" Last Change: 2024 Dec 09
|
||||
" Based on: https://github.com/kaarmu/typst.vim
|
||||
|
||||
function! typst#indentexpr() abort
|
||||
@@ -18,6 +19,9 @@ function! typst#indentexpr() abort
|
||||
" Use last indent for block comments
|
||||
if l:synname == 'typstCommentBlock'
|
||||
return l:ind
|
||||
" do not change the indents of bullet lists
|
||||
elseif l:synname == 'typstMarkupBulletList'
|
||||
return indent(a:lnum)
|
||||
endif
|
||||
|
||||
if l:pline =~ '\v[{[(]\s*$'
|
||||
@@ -31,6 +35,31 @@ function! typst#indentexpr() abort
|
||||
return l:ind
|
||||
endfunction
|
||||
|
||||
function typst#foldexpr()
|
||||
let line = getline(v:lnum)
|
||||
|
||||
" Whenever the user wants to fold nested headers under the parent
|
||||
let nested = get(g:, "typst_foldnested", 1)
|
||||
|
||||
" Regular headers
|
||||
let depth = match(line, '\(^=\+\)\@<=\( .*$\)\@=')
|
||||
|
||||
" Do not fold nested regular headers
|
||||
if depth > 1 && !nested
|
||||
let depth = 1
|
||||
endif
|
||||
|
||||
if depth > 0
|
||||
" check syntax, it should be typstMarkupHeading
|
||||
let syncode = synstack(v:lnum, 1)
|
||||
if len(syncode) > 0 && synIDattr(syncode[0], 'name') ==# 'typstMarkupHeading'
|
||||
return ">" . depth
|
||||
endif
|
||||
endif
|
||||
|
||||
return "="
|
||||
endfunction
|
||||
|
||||
" Gets the previous non-blank line that is not a comment.
|
||||
function! s:get_prev_nonblank(lnum) abort
|
||||
let l:lnum = prevnonblank(a:lnum)
|
||||
|
||||
12
runtime/compiler/bash.vim
Normal file
12
runtime/compiler/bash.vim
Normal file
@@ -0,0 +1,12 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Bash Syntax Checker
|
||||
" Maintainer: @konfekt
|
||||
" Last Change: 2024 Dec 27
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "bash"
|
||||
|
||||
CompilerSet makeprg=bash\ -n
|
||||
CompilerSet errorformat=%f:\ line\ %l:\ %m
|
||||
40
runtime/compiler/cppcheck.vim
Normal file
40
runtime/compiler/cppcheck.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
" vim compiler file
|
||||
" Compiler: cppcheck (C++ static checker)
|
||||
" Maintainer: Vincent B. (twinside@free.fr)
|
||||
" Last Change: 2024 Nov 19 by @Konfekt
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "cppcheck"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
let s:slash = has('win32')? '\' : '/'
|
||||
|
||||
if !exists('g:c_cppcheck_params')
|
||||
let g:c_cppcheck_params = '--verbose --force --inline-suppr'
|
||||
\ ..' '..'--enable=warning,style,performance,portability,information,missingInclude'
|
||||
\ ..' '..(executable('getconf') ? '-j' .. systemlist('getconf _NPROCESSORS_ONLN')[0] : '')
|
||||
let s:undo_compiler = 'unlet! g:c_cppcheck_params'
|
||||
endif
|
||||
|
||||
let &l:makeprg = 'cppcheck --quiet'
|
||||
\ ..' --template="{file}:{line}:{column}: {severity}: [{id}] {message} {callstack}"'
|
||||
\ ..' '..get(b:, 'c_cppcheck_params', get(g:, 'c_cppcheck_params', (&filetype ==# 'cpp' ? ' --language=c++' : '')))
|
||||
\ ..' '..get(b:, 'c_cppcheck_includes', get(g:, 'c_cppcheck_includes',
|
||||
\ (filereadable('compile_commands.json') ? '--project=compile_commands.json' :
|
||||
\ (!empty(glob('*'..s:slash..'compile_commands.json', 1, 1)) ? '--project='..glob('*'..s:slash..'compile_commands.json', 1, 1)[0] :
|
||||
\ (empty(&path) ? '' : '-I')..join(map(filter(split(&path, ','), 'isdirectory(v:val)'),'shellescape(v:val)'), ' -I')))))
|
||||
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%f:%l:%c:\ %tarning:\ %m,
|
||||
\%f:%l:%c:\ %trror:\ %m,
|
||||
\%f:%l:%c:\ %tnformation:\ %m,
|
||||
\%f:%l:%c:\ %m,
|
||||
\%.%#\ :\ [%f:%l]\ %m
|
||||
|
||||
exe get(s:, 'undo_compiler', '')
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,13 +1,12 @@
|
||||
" Vim compiler file
|
||||
" Compiler: ESLint for JavaScript
|
||||
" Maintainer: Romain Lafourcade <romainlafourcade@gmail.com>
|
||||
" Last Change: 2020 August 20
|
||||
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
|
||||
" Last Change: 2024 Nov 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "eslint"
|
||||
|
||||
CompilerSet makeprg=npx\ eslint\ --format\ compact
|
||||
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m,%-G%.%#
|
||||
CompilerSet makeprg=npx\ eslint\ --format\ stylish
|
||||
CompilerSet errorformat=%-P%f,\%\\s%#%l:%c\ %#\ %trror\ \ %m,\%\\s%#%l:%c\ %#\ %tarning\ \ %m,\%-Q,\%-G%.%#,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Groff
|
||||
" Maintainer: Konfekt
|
||||
" Last Change: 2024 Sep 8
|
||||
" Last Change: 2024 Nov 19
|
||||
"
|
||||
" Expects output file extension, say `:make html` or `:make pdf`.
|
||||
" Supported devices as of Sept 2024 are: (x)html, pdf, ps, dvi, lj4, lbp ...
|
||||
@@ -30,7 +30,7 @@ execute 'CompilerSet makeprg=groff'..escape(
|
||||
\ ' '..s:groff_compiler_lang()..
|
||||
\ ' -K'..get(b:, 'groff_compiler_encoding', get(g:, 'groff_compiler_encoding', 'utf8'))..
|
||||
\ ' '..get(b:, 'groff_compiler_args', get(g:, 'groff_compiler_args', ''))..
|
||||
\ ' -mom -T$* -- %:S > %:r:S.$*', ' ')
|
||||
\ ' -mom -T$* -- %:S > %:r:S.$*', ' \|"')
|
||||
" From Gavin Freeborn's https://github.com/Gavinok/vim-troff under Vim License
|
||||
" https://github.com/Gavinok/vim-troff/blob/91017b1423caa80aba541c997909a4f810edd275/compiler/troff.vim#L39
|
||||
CompilerSet errorformat=%o:<standard\ input>\ (%f):%l:%m,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Java Development Kit Compiler
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Last Change: 2024 Jun 14
|
||||
" Last Change: 2024 Nov 19 (enable local javac_makeprg_params)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -11,11 +11,7 @@ let current_compiler = "javac"
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists("g:javac_makeprg_params")
|
||||
execute $'CompilerSet makeprg=javac\ {escape(g:javac_makeprg_params, ' \|"')}'
|
||||
else
|
||||
CompilerSet makeprg=javac
|
||||
endif
|
||||
execute $'CompilerSet makeprg=javac\ {escape(get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')), ' \|"')}'
|
||||
|
||||
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
|
||||
\%W%f:%l:\ warning:\ %m,
|
||||
|
||||
40
runtime/compiler/maven.vim
Normal file
40
runtime/compiler/maven.vim
Normal file
@@ -0,0 +1,40 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Maven
|
||||
" Maintainer: D. Ben Knoble <ben.knoble+vim@gmail.com>
|
||||
" Maintainer: Konfekt
|
||||
" Original Source: https://github.com/JalaiAmitahl/maven-compiler.vim/blob/master/compiler/mvn.vim
|
||||
" (Copyright Dan Taylor, distributed under the same terms as LICENSE)
|
||||
" Original Source: https://github.com/mikelue/vim-maven-plugin/blob/master/compiler/maven.vim
|
||||
" (distributed under same terms as LICENSE per
|
||||
" https://github.com/mikelue/vim-maven-plugin/issues/13)
|
||||
" Last Change: 2024 Nov 12
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "maven"
|
||||
|
||||
execute $'CompilerSet makeprg=mvn\ --batch-mode\ {escape(get(b:, 'maven_makeprg_params', get(g:, 'maven_makeprg_params', '')), ' \|"')}'
|
||||
|
||||
" Error message for POM
|
||||
CompilerSet errorformat=[FATAL]\ Non-parseable\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#,
|
||||
CompilerSet errorformat+=[%tRROR]\ Malformed\ POM\ %f:\ %m%\\s%\\+@%.%#line\ %l\\,\ column\ %c%.%#
|
||||
|
||||
" Java related build messages
|
||||
CompilerSet errorformat+=[%tARNING]\ %f:[%l\\,%c]\ %m
|
||||
CompilerSet errorformat+=[%tRROR]\ %f:[%l\\,%c]\ %m
|
||||
CompilerSet errorformat+=%A[%t%[A-Z]%#]\ %f:[%l\\,%c]\ %m,%Z
|
||||
CompilerSet errorformat+=%A%f:[%l\\,%c]\ %m,%Z
|
||||
|
||||
" jUnit related build messages
|
||||
CompilerSet errorformat+=%+E\ \ %#test%m,%Z
|
||||
CompilerSet errorformat+=%+E[ERROR]\ Please\ refer\ to\ %f\ for\ the\ individual\ test\ results.
|
||||
" Message from JUnit 5(5.3.X), TestNG(6.14.X), JMockit(1.43), and AssertJ(3.11.X)
|
||||
CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ FAILURE!,
|
||||
CompilerSet errorformat+=%+E%>[ERROR]\ %.%\\+Time\ elapsed:%.%\\+<<<\ ERROR!,
|
||||
CompilerSet errorformat+=%+Z%\\s%#at\ %f(%\\f%\\+:%l),
|
||||
CompilerSet errorformat+=%+C%.%#
|
||||
|
||||
" Misc message removal
|
||||
CompilerSet errorformat+=%-G[INFO]\ %.%#,
|
||||
CompilerSet errorformat+=%-G[debug]\ %.%#
|
||||
19
runtime/compiler/mypy.vim
Normal file
19
runtime/compiler/mypy.vim
Normal file
@@ -0,0 +1,19 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Mypy (Python static checker)
|
||||
" Maintainer: @Konfekt
|
||||
" Last Change: 2024 Nov 19
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "mypy"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=mypy
|
||||
let &l:makeprg = 'mypy --show-column-numbers '
|
||||
\ ..get(b:, 'mypy_makeprg_params', get(g:, 'mypy_makeprg_params', '--strict --ignore-missing-imports'))
|
||||
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
||||
CompilerSet errorformat=%f:%l:%c:\ %t%*[^:]:\ %m
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Pandoc
|
||||
" Maintainer: Konfekt
|
||||
" Last Change: 2024 Sep 8
|
||||
" Last Change: 2024 Nov 19
|
||||
"
|
||||
" Expects output file extension, say `:make html` or `:make pdf`.
|
||||
" Passes additional arguments to pandoc, say `:make html --self-contained`.
|
||||
@@ -56,7 +56,7 @@ execute 'CompilerSet makeprg=pandoc'..escape(
|
||||
\ ' '..s:PandocLang()..
|
||||
\ ' --from='..s:PandocFiletype(&filetype)..
|
||||
\ ' '..get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', ''))..
|
||||
\ ' --output %:r:S.$* -- %:S', ' ')
|
||||
\ ' --output %:r:S.$* -- %:S', ' \|"')
|
||||
CompilerSet errorformat=\"%f\",\ line\ %l:\ %m
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
" URL: https://github.com/PProvost/vim-ps1
|
||||
" Contributors: Enno Nagel
|
||||
" Last Change: 2024 Mar 29
|
||||
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
|
||||
" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg)
|
||||
" 2024 Apr 03 by the Vim Project (removed :CompilerSet definition)
|
||||
" 2024 Apr 05 by the Vim Project (avoid leaving behind g:makeprg)
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -49,7 +50,7 @@ let s:makeprg = g:ps1_makeprg_cmd .. ' %:p:S'
|
||||
" + CategoryInfo : ObjectNotFound: (Write-Ouput:String) [], CommandNotFoundException
|
||||
" + FullyQualifiedErrorId : CommandNotFoundException
|
||||
|
||||
execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ')
|
||||
execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' \|"')
|
||||
|
||||
" Showing error in context with underlining.
|
||||
CompilerSet errorformat=%+G+%m
|
||||
|
||||
@@ -1,13 +1,21 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Pylint for Python
|
||||
" Maintainer: Daniel Moch <daniel@danielmoch.com>
|
||||
" Last Change: 2016 May 20
|
||||
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
|
||||
" Compiler: Pylint for Python
|
||||
" Maintainer: Daniel Moch <daniel@danielmoch.com>
|
||||
" Last Change: 2024 Nov 07 by The Vim Project (added params variable)
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "pylint"
|
||||
|
||||
CompilerSet makeprg=pylint\ --output-format=text\ --msg-template=\"{path}:{line}:{column}:{C}:\ [{symbol}]\ {msg}\"\ --reports=no
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=ruff
|
||||
let &l:makeprg = 'pylint ' .
|
||||
\ '--output-format=text --msg-template="{path}:{line}:{column}:{C}: [{symbol}] {msg}" --reports=no ' .
|
||||
\ get(b:, "pylint_makeprg_params", get(g:, "pylint_makeprg_params", '--jobs=0'))
|
||||
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
||||
CompilerSet errorformat=%A%f:%l:%c:%t:\ %m,%A%f:%l:\ %m,%A%f:(%l):\ %m,%-Z%p^%.%#,%-G%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
103
runtime/compiler/pytest.vim
Normal file
103
runtime/compiler/pytest.vim
Normal file
@@ -0,0 +1,103 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Pytest (Python testing framework)
|
||||
" Maintainer: @Konfekt and @mgedmin
|
||||
" Last Change: 2024 Nov 28
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "pytest"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=pytest
|
||||
if has('unix')
|
||||
execute $'CompilerSet makeprg=/usr/bin/env\ PYTHONWARNINGS=ignore\ pytest\ {escape(get(b:, 'pytest_makeprg_params', get(g:, 'pytest_makeprg_params', '--tb=short --quiet')), ' \|"')}'
|
||||
elseif has('win32')
|
||||
execute $'CompilerSet makeprg=set\ PYTHONWARNINGS=ignore\ &&\ pytest\ {escape(get(b:, 'pytest_makeprg_params', get(g:, 'pytest_makeprg_params', '--tb=short --quiet')), ' \|"')}'
|
||||
else
|
||||
CompilerSet makeprg=pytest\ --tb=short\ --quiet
|
||||
execute $'CompilerSet makeprg=pytest\ {escape(get(b:, 'pytest_makeprg_params', get(g:, 'pytest_makeprg_params', '--tb=short --quiet')), ' \|"')}'
|
||||
endif
|
||||
|
||||
" Pytest syntax errors {{{2
|
||||
|
||||
" Reset error format so that sourcing .vimrc again and again doesn't grow it
|
||||
" without bounds
|
||||
setlocal errorformat&
|
||||
|
||||
" For the record, the default errorformat is this:
|
||||
"
|
||||
" %*[^"]"%f"%*\D%l: %m
|
||||
" "%f"%*\D%l: %m
|
||||
" %-G%f:%l: (Each undeclared identifier is reported only once
|
||||
" %-G%f:%l: for each function it appears in.)
|
||||
" %-GIn file included from %f:%l:%c:
|
||||
" %-GIn file included from %f:%l:%c\,
|
||||
" %-GIn file included from %f:%l:%c
|
||||
" %-GIn file included from %f:%l
|
||||
" %-G%*[ ]from %f:%l:%c
|
||||
" %-G%*[ ]from %f:%l:
|
||||
" %-G%*[ ]from %f:%l\,
|
||||
" %-G%*[ ]from %f:%l
|
||||
" %f:%l:%c:%m
|
||||
" %f(%l):%m
|
||||
" %f:%l:%m
|
||||
" "%f"\, line %l%*\D%c%*[^ ] %m
|
||||
" %D%*\a[%*\d]: Entering directory %*[`']%f'
|
||||
" %X%*\a[%*\d]: Leaving directory %*[`']%f'
|
||||
" %D%*\a: Entering directory %*[`']%f'
|
||||
" %X%*\a: Leaving directory %*[`']%f'
|
||||
" %DMaking %*\a in %f
|
||||
" %f|%l| %m
|
||||
"
|
||||
" and sometimes it misfires, so let's fix it up a bit
|
||||
" (TBH I don't even know what compiler produces filename(lineno) so why even
|
||||
" have it?)
|
||||
setlocal errorformat-=%f(%l):%m
|
||||
|
||||
" Sometimes Vim gets confused about ISO-8601 timestamps and thinks they're
|
||||
" filenames; this is a big hammer that ignores anything filename-like on lines
|
||||
" that start with at least two spaces, possibly preceded by a number and
|
||||
" optional punctuation
|
||||
setlocal errorformat^=%+G%\\d%#%.%\\=\ \ %.%#
|
||||
|
||||
" Similar, but when the entire line starts with a date
|
||||
setlocal errorformat^=%+G\\d\\d\\d\\d-\\d\\d-\\d\\d\ \\d\\d:\\d\\d%.%#
|
||||
|
||||
" make: *** [Makefile:14: target] Error 1
|
||||
setlocal errorformat^=%+Gmake:\ ***\ %.%#
|
||||
|
||||
" FAILED tests.py::test_with_params[YYYY-MM-DD:HH:MM:SS] - Exception: bla bla
|
||||
setlocal errorformat^=%+GFAILED\ %.%#
|
||||
|
||||
" AssertionError: assert ...YYYY-MM-DD:HH:MM:SS...
|
||||
setlocal errorformat^=%+GAssertionError:\ %.%#
|
||||
|
||||
" --- /path/to/file:before YYYY-MM-DD HH:MM:SS.ssssss
|
||||
setlocal errorformat^=---%f:%m
|
||||
|
||||
" +++ /path/to/file:before YYYY-MM-DD HH:MM:SS.ssssss
|
||||
setlocal errorformat^=+++%f:%m
|
||||
|
||||
" Sometimes pytest prepends an 'E' marker at the beginning of a traceback line
|
||||
setlocal errorformat+=E\ %#File\ \"%f\"\\,\ line\ %l%.%#
|
||||
|
||||
" Python tracebacks (unittest + doctest output) {{{2
|
||||
|
||||
" This collapses the entire traceback into just the last file+lineno,
|
||||
" which is convenient when you want to jump to the line that failed (and not
|
||||
" the top-level entry point), but it makes it impossible to see the full
|
||||
" traceback, which sucks.
|
||||
""setlocal errorformat+=
|
||||
"" \File\ \"%f\"\\,\ line\ %l%.%#,
|
||||
"" \%C\ %.%#,
|
||||
"" \%-A\ \ File\ \"unittest%.py\"\\,\ line\ %.%#,
|
||||
"" \%-A\ \ File\ \"%f\"\\,\ line\ 0%.%#,
|
||||
"" \%A\ \ File\ \"%f\"\\,\ line\ %l%.%#,
|
||||
"" \%Z%[%^\ ]%\\@=%m
|
||||
setlocal errorformat+=File\ \"%f\"\\,\ line\ %l\\,%#%m
|
||||
|
||||
exe 'CompilerSet errorformat='..escape(&l:errorformat, ' \|"')
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
20
runtime/compiler/ruff.vim
Normal file
20
runtime/compiler/ruff.vim
Normal file
@@ -0,0 +1,20 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Ruff (Python linter)
|
||||
" Maintainer: @pbnj-dragon
|
||||
" Last Change: 2024 Nov 07
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
|
||||
if exists("current_compiler") | finish | endif
|
||||
let current_compiler = "ruff"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" CompilerSet makeprg=ruff
|
||||
let &l:makeprg= 'ruff check --output-format=concise '
|
||||
\ ..get(b:, 'ruff_makeprg_params', get(g:, 'ruff_makeprg_params', '--preview'))
|
||||
exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
||||
CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,%f:%l:%c\ -\ %m,%f:
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
254
runtime/compiler/spotbugs.vim
Normal file
254
runtime/compiler/spotbugs.vim
Normal file
@@ -0,0 +1,254 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Spotbugs (Java static checker; needs javac compiled classes)
|
||||
" Maintainers: @konfekt and @zzzyxwvut
|
||||
" Last Change: 2024 Dec 20
|
||||
|
||||
if exists('g:current_compiler') || bufname() !~# '\.java\=$' || wordcount().chars < 9
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Unfortunately Spotbugs does not output absolute paths, so you need to
|
||||
" pass the directory of the files being checked as `-sourcepath` parameter.
|
||||
" The regex, auxpath and glob try to include all dependent classes of the
|
||||
" current buffer. See https://github.com/spotbugs/spotbugs/issues/856
|
||||
|
||||
" FIXME: When "search()" is used with the "e" flag, it makes no _further_
|
||||
" progress after claiming an EOL match (i.e. "\_" or "\n", but not "$").
|
||||
" XXX: Omit anonymous class declarations
|
||||
let s:keywords = '\C\<\%(\.\@1<!class\|@\=interface\|enum\|record\|package\)\%(\s\|$\)'
|
||||
let s:type_names = '\C\<\%(\.\@1<!class\|@\=interface\|enum\|record\)\s*\(\K\k*\)\>'
|
||||
" Capture ";" for counting a class file directory (see s:package_dir_heads below)
|
||||
let s:package_names = '\C\<package\s*\(\K\%(\k*\.\=\)\+;\)'
|
||||
let s:package = ''
|
||||
|
||||
if has('syntax') && exists('g:syntax_on') &&
|
||||
\ exists('b:current_syntax') && b:current_syntax == 'java' &&
|
||||
\ hlexists('javaClassDecl') && hlexists('javaExternal')
|
||||
|
||||
function! s:GetDeclaredTypeNames() abort
|
||||
if bufname() =~# '\<\%(module\|package\)-info\.java\=$'
|
||||
return [expand('%:t:r')]
|
||||
endif
|
||||
defer execute('silent! normal! g``')
|
||||
call cursor(1, 1)
|
||||
let type_names = []
|
||||
let lnum = search(s:keywords, 'eW')
|
||||
while lnum > 0
|
||||
let name_attr = synIDattr(synID(lnum, (col('.') - 1), 0), 'name')
|
||||
if name_attr ==# 'javaClassDecl'
|
||||
let tokens = matchlist(getline(lnum)..getline(lnum + 1), s:type_names)
|
||||
if !empty(tokens) | call add(type_names, tokens[1]) | endif
|
||||
elseif name_attr ==# 'javaExternal'
|
||||
let tokens = matchlist(getline(lnum)..getline(lnum + 1), s:package_names)
|
||||
if !empty(tokens) | let s:package = tokens[1] | endif
|
||||
endif
|
||||
let lnum = search(s:keywords, 'eW')
|
||||
endwhile
|
||||
return type_names
|
||||
endfunction
|
||||
|
||||
else
|
||||
function! s:GetDeclaredTypeNames() abort
|
||||
if bufname() =~# '\<\%(module\|package\)-info\.java\=$'
|
||||
return [expand('%:t:r')]
|
||||
endif
|
||||
" Undo the unsetting of &hls, see below
|
||||
if &hls
|
||||
defer execute('set hls')
|
||||
endif
|
||||
" Possibly restore the current values for registers '"' and "y", see below
|
||||
defer call('setreg', ['"', getreg('"'), getregtype('"')])
|
||||
defer call('setreg', ['y', getreg('y'), getregtype('y')])
|
||||
defer execute('silent bwipeout')
|
||||
" Copy buffer contents for modification
|
||||
silent %y y
|
||||
new
|
||||
" Apply ":help scratch-buffer" effects and match "$" in Java (generated)
|
||||
" type names (see s:type_names)
|
||||
setlocal iskeyword+=$ buftype=nofile bufhidden=hide noswapfile nohls
|
||||
0put y
|
||||
" Discard text blocks and strings
|
||||
silent keeppatterns %s/\\\@<!"""\_.\{-}\\\@<!"""\|\\"//ge
|
||||
silent keeppatterns %s/".*"//ge
|
||||
" Discard comments
|
||||
silent keeppatterns %s/\/\/.\+$//ge
|
||||
silent keeppatterns %s/\/\*\_.\{-}\*\///ge
|
||||
call cursor(1, 1)
|
||||
let type_names = []
|
||||
let lnum = search(s:keywords, 'eW')
|
||||
while lnum > 0
|
||||
let line = getline(lnum)
|
||||
if line =~# '\<package\>'
|
||||
let tokens = matchlist(line..getline(lnum + 1), s:package_names)
|
||||
if !empty(tokens) | let s:package = tokens[1] | endif
|
||||
else
|
||||
let tokens = matchlist(line..getline(lnum + 1), s:type_names)
|
||||
if !empty(tokens) | call add(type_names, tokens[1]) | endif
|
||||
endif
|
||||
let lnum = search(s:keywords, 'eW')
|
||||
endwhile
|
||||
return type_names
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if has('win32')
|
||||
|
||||
function! s:GlobClassFiles(src_type_name) abort
|
||||
return glob(a:src_type_name..'$*.class', 1, 1)
|
||||
endfunction
|
||||
|
||||
else
|
||||
function! s:GlobClassFiles(src_type_name) abort
|
||||
return glob(a:src_type_name..'\$*.class', 1, 1)
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if exists('b:spotbugs_properties')
|
||||
" Let "ftplugin/java.vim" merge global entries, if any, in buffer-local
|
||||
" entries
|
||||
|
||||
function! s:GetProperty(name, default) abort
|
||||
return get(b:spotbugs_properties, a:name, a:default)
|
||||
endfunction
|
||||
|
||||
elseif exists('g:spotbugs_properties')
|
||||
|
||||
function! s:GetProperty(name, default) abort
|
||||
return get(g:spotbugs_properties, a:name, a:default)
|
||||
endfunction
|
||||
|
||||
else
|
||||
function! s:GetProperty(dummy, default) abort
|
||||
return a:default
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if (exists('g:spotbugs_properties') || exists('b:spotbugs_properties')) &&
|
||||
\ ((!empty(s:GetProperty('sourceDirPath', [])) &&
|
||||
\ !empty(s:GetProperty('classDirPath', []))) ||
|
||||
\ (!empty(s:GetProperty('testSourceDirPath', [])) &&
|
||||
\ !empty(s:GetProperty('testClassDirPath', []))))
|
||||
|
||||
function! s:CommonIdxsAndDirs() abort
|
||||
let src_dir_path = s:GetProperty('sourceDirPath', [])
|
||||
let bin_dir_path = s:GetProperty('classDirPath', [])
|
||||
let test_src_dir_path = s:GetProperty('testSourceDirPath', [])
|
||||
let test_bin_dir_path = s:GetProperty('testClassDirPath', [])
|
||||
let dir_cnt = min([len(src_dir_path), len(bin_dir_path)])
|
||||
let test_dir_cnt = min([len(test_src_dir_path), len(test_bin_dir_path)])
|
||||
" Do not break up path pairs with filtering!
|
||||
return [[range(dir_cnt),
|
||||
\ src_dir_path[0 : dir_cnt - 1],
|
||||
\ bin_dir_path[0 : dir_cnt - 1]],
|
||||
\ [range(test_dir_cnt),
|
||||
\ test_src_dir_path[0 : test_dir_cnt - 1],
|
||||
\ test_bin_dir_path[0 : test_dir_cnt - 1]]]
|
||||
endfunction
|
||||
|
||||
let s:common_idxs_and_dirs = s:CommonIdxsAndDirs()
|
||||
delfunction s:CommonIdxsAndDirs
|
||||
|
||||
function! s:FindClassFiles(src_type_name) abort
|
||||
let class_files = []
|
||||
" Match pairwise the components of source and class pathnames
|
||||
for [idxs, src_dirs, bin_dirs] in s:common_idxs_and_dirs
|
||||
" Do not use "fnamemodify(a:src_type_name, ':p:s?src?bin?')" because
|
||||
" only the rightmost "src" is looked for
|
||||
for idx in idxs
|
||||
let tail_idx = strridx(a:src_type_name, src_dirs[idx])
|
||||
" No such directory or no such inner type (i.e. without "$")
|
||||
if tail_idx < 0 | continue | endif
|
||||
" Substitute "bin_dirs[idx]" for the rightmost "src_dirs[idx]"
|
||||
let candidate_type_name = strpart(a:src_type_name, 0, tail_idx)..
|
||||
\ bin_dirs[idx]..
|
||||
\ strpart(a:src_type_name, (tail_idx + strlen(src_dirs[idx])))
|
||||
for candidate in insert(s:GlobClassFiles(candidate_type_name),
|
||||
\ candidate_type_name..'.class')
|
||||
if filereadable(candidate) | call add(class_files, shellescape(candidate)) | endif
|
||||
endfor
|
||||
if !empty(class_files) | break | endif
|
||||
endfor
|
||||
if !empty(class_files) | break | endif
|
||||
endfor
|
||||
return class_files
|
||||
endfunction
|
||||
|
||||
else
|
||||
function! s:FindClassFiles(src_type_name) abort
|
||||
let class_files = []
|
||||
for candidate in insert(s:GlobClassFiles(a:src_type_name),
|
||||
\ a:src_type_name..'.class')
|
||||
if filereadable(candidate) | call add(class_files, shellescape(candidate)) | endif
|
||||
endfor
|
||||
return class_files
|
||||
endfunction
|
||||
endif
|
||||
|
||||
if exists('g:spotbugs_alternative_path') &&
|
||||
\ !empty(get(g:spotbugs_alternative_path, 'fromPath', '')) &&
|
||||
\ !empty(get(g:spotbugs_alternative_path, 'toPath', ''))
|
||||
|
||||
" See https://github.com/spotbugs/spotbugs/issues/909
|
||||
function! s:ResolveAbsolutePathname() abort
|
||||
let pathname = expand('%:p')
|
||||
let head_idx = stridx(pathname, g:spotbugs_alternative_path.toPath)
|
||||
" No such file: a mismatched path request for a project
|
||||
if head_idx < 0 | return pathname | endif
|
||||
" Settle for failure with file readability tests _in s:FindClassFiles()_
|
||||
return strpart(pathname, 0, head_idx)..
|
||||
\ g:spotbugs_alternative_path.fromPath..
|
||||
\ strpart(pathname, (head_idx + strlen(g:spotbugs_alternative_path.toPath)))
|
||||
endfunction
|
||||
|
||||
else
|
||||
function! s:ResolveAbsolutePathname() abort
|
||||
return expand('%:p')
|
||||
endfunction
|
||||
endif
|
||||
|
||||
function! s:CollectClassFiles() abort
|
||||
" Possibly obtain a symlinked path for an unsupported directory name
|
||||
let pathname = s:ResolveAbsolutePathname()
|
||||
" Get a platform-independent pathname prefix, cf. "expand('%:p:h')..'/'"
|
||||
let tail_idx = strridx(pathname, expand('%:t'))
|
||||
let src_pathname = strpart(pathname, 0, tail_idx)
|
||||
let all_class_files = []
|
||||
" Get all type names in the current buffer and let the filename globbing
|
||||
" discover inner type names from arbitrary type names
|
||||
for type_name in s:GetDeclaredTypeNames()
|
||||
call extend(all_class_files, s:FindClassFiles(src_pathname..type_name))
|
||||
endfor
|
||||
return all_class_files
|
||||
endfunction
|
||||
|
||||
" Expose class files for removal etc.
|
||||
let b:spotbugs_class_files = s:CollectClassFiles()
|
||||
let s:package_dir_heads = repeat(':h', (1 + strlen(substitute(s:package, '[^.;]', '', 'g'))))
|
||||
let s:package_root_dir = fnamemodify(s:ResolveAbsolutePathname(), s:package_dir_heads..':S')
|
||||
let g:current_compiler = 'spotbugs'
|
||||
" CompilerSet makeprg=spotbugs
|
||||
let &l:makeprg = 'spotbugs'..(has('win32') ? '.bat' : '')..' '..
|
||||
\ get(b:, 'spotbugs_makeprg_params', get(g:, 'spotbugs_makeprg_params', '-workHard -experimental'))..
|
||||
\ ' -textui -emacs -auxclasspath '..s:package_root_dir..' -sourcepath '..s:package_root_dir..' '..
|
||||
\ join(b:spotbugs_class_files, ' ')
|
||||
" Emacs expects doubled line numbers
|
||||
setlocal errorformat=%f:%l:%*[0-9]\ %m,%f:-%*[0-9]:-%*[0-9]\ %m
|
||||
|
||||
" " This compiler is meant to be used for a single buffer only
|
||||
" exe 'CompilerSet makeprg='..escape(&l:makeprg, ' \|"')
|
||||
" exe 'CompilerSet errorformat='..escape(&l:errorformat, ' \|"')
|
||||
|
||||
delfunction s:CollectClassFiles
|
||||
delfunction s:ResolveAbsolutePathname
|
||||
delfunction s:FindClassFiles
|
||||
delfunction s:GetProperty
|
||||
delfunction s:GlobClassFiles
|
||||
delfunction s:GetDeclaredTypeNames
|
||||
let &cpo = s:cpo_save
|
||||
unlet! s:package_root_dir s:package_dir_heads s:common_idxs_and_dirs s:package
|
||||
unlet! s:package_names s:type_names s:keywords s:cpo_save
|
||||
|
||||
" vim: set foldmethod=syntax shiftwidth=2 expandtab:
|
||||
@@ -3,8 +3,9 @@
|
||||
" Maintainer: Artem Chuprina <ran@ran.pp.ru>
|
||||
" Contributors: Enno Nagel
|
||||
" Last Change: 2024 Mar 29
|
||||
" 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
|
||||
" 2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg)
|
||||
" 2024 Apr 03 by the Vim Project (removed :CompilerSet definition)
|
||||
" 2024 Apr 05 by the Vim Project (avoid leaving behind g:makeprg)
|
||||
" 2024 Nov 19 by the Vim Project (properly escape makeprg setting)
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -27,7 +28,7 @@ if exists('b:tex_ignore_makefile') || exists('g:tex_ignore_makefile') ||
|
||||
let current_compiler = "latex"
|
||||
endif
|
||||
let s:makeprg=current_compiler .. ' -interaction=nonstopmode'
|
||||
execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ')
|
||||
execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' \|"')
|
||||
else
|
||||
let current_compiler = 'make'
|
||||
endif
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" Vim compiler file
|
||||
" Language: Typst
|
||||
" Maintainer: Gregory Anders
|
||||
" Last Change: 2024-07-14
|
||||
" Previous Maintainer: Gregory Anders
|
||||
" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
|
||||
" Last Change: 2024 Dec 09
|
||||
" Based on: https://github.com/kaarmu/typst.vim
|
||||
|
||||
if exists('current_compiler')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" The default vimrc file.
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last change: 2023 Aug 10
|
||||
" Last Change: 2024 Dec 01
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
"
|
||||
" This is loaded if no vimrc file was found.
|
||||
@@ -33,13 +33,8 @@ silent! while 0
|
||||
set nocompatible
|
||||
silent! endwhile
|
||||
|
||||
" Allow backspacing over everything in insert mode.
|
||||
set backspace=indent,eol,start
|
||||
|
||||
set history=200 " keep 200 lines of command line history
|
||||
set ruler " show the cursor position all the time
|
||||
set showcmd " display incomplete commands
|
||||
set wildmenu " display completion matches in a status line
|
||||
|
||||
set ttimeout " time out for key codes
|
||||
set ttimeoutlen=100 " wait up to 100ms after Esc for special key
|
||||
@@ -107,14 +102,19 @@ if 1
|
||||
" (happens when dropping a file on gvim), for a commit or rebase message
|
||||
" (likely a different one than last time), and when using xxd(1) to filter
|
||||
" and edit binary files (it transforms input files back and forth, causing
|
||||
" them to have dual nature, so to speak)
|
||||
" them to have dual nature, so to speak) or when running the new tutor
|
||||
autocmd BufReadPost *
|
||||
\ let line = line("'\"")
|
||||
\ | if line >= 1 && line <= line("$") && &filetype !~# 'commit'
|
||||
\ && index(['xxd', 'gitrebase'], &filetype) == -1
|
||||
\ && index(['xxd', 'gitrebase', 'tutor'], &filetype) == -1
|
||||
\ | execute "normal! g`\""
|
||||
\ | endif
|
||||
|
||||
" Set the default background for putty to dark. Putty usually sets the
|
||||
" $TERM to xterm and by default it starts with a dark background which
|
||||
" makes syntax highlighting often hard to read with bg=light
|
||||
" undo this using: ":au! vimStartup TermResponse"
|
||||
autocmd TermResponse * if v:termresponse == "\e[>0;136;0c" | set bg=dark | endif
|
||||
augroup END
|
||||
|
||||
" Quite a few people accidentally type "q:" instead of ":q" and get confused
|
||||
|
||||
@@ -75,6 +75,7 @@ DOCS = \
|
||||
pi_paren.txt \
|
||||
pi_spec.txt \
|
||||
pi_tar.txt \
|
||||
pi_tutor.txt \
|
||||
pi_vimball.txt \
|
||||
pi_zip.txt \
|
||||
popup.txt \
|
||||
@@ -151,6 +152,7 @@ DOCS = \
|
||||
vim9.txt \
|
||||
vim9class.txt \
|
||||
visual.txt \
|
||||
vietnamese.txt \
|
||||
windows.txt \
|
||||
workshop.txt
|
||||
|
||||
@@ -228,6 +230,7 @@ HTMLS = \
|
||||
pi_paren.html \
|
||||
pi_spec.html \
|
||||
pi_tar.html \
|
||||
pi_tutor.html \
|
||||
pi_vimball.html \
|
||||
pi_zip.html \
|
||||
popup.html \
|
||||
@@ -301,6 +304,7 @@ HTMLS = \
|
||||
version8.html \
|
||||
version9.html \
|
||||
vi_diff.html \
|
||||
vietnamese.html \
|
||||
vimindex.html \
|
||||
vim9.html \
|
||||
vim9class.html \
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
# TODO: to think about what to use instead of awk. PowerShell?
|
||||
#AWK =
|
||||
|
||||
# Correct the following line for the where executeable file vim is installed.
|
||||
# Correct the following line for the where executable file vim is installed.
|
||||
# Please do not put the path in quotes.
|
||||
VIMPROG = D:\Programs\Vim\vim90\vim.exe
|
||||
VIMPROG = D:\Programs\Vim\vim91\vim.exe
|
||||
|
||||
# Correct the following line for the directory where iconv installed.
|
||||
# Please do not put the path in quotes.
|
||||
|
||||
@@ -93,7 +93,7 @@ test_urls:
|
||||
$(VIMPROG) --clean -S test_urls.vim
|
||||
|
||||
clean:
|
||||
-rm -f doctags *.html tags.ref
|
||||
-rm -f doctags *.html tags.ref tags-* vim-stylesheet.css
|
||||
|
||||
# These files are in the extra archive, skip if not present
|
||||
|
||||
@@ -151,6 +151,9 @@ os_risc.txt:
|
||||
os_win32.txt:
|
||||
touch $@
|
||||
|
||||
vietnamese.txt:
|
||||
touch $@
|
||||
|
||||
# In *BSD, the variable '$<' is used in suffix-transformation rules (in GNU this
|
||||
# is called "implicit rules", and in MS Windows it is called "inference rules").
|
||||
# For code portability, it is better to use the '$?' variable for explicit rules.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 9.1. Last change: 2024 Aug 18
|
||||
*autocmd.txt* For Vim version 9.1. Last change: 2024 Dec 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -702,6 +702,12 @@ CompleteDone After Insert mode completion is done. Either
|
||||
The |v:completed_item| variable contains
|
||||
information about the completed item.
|
||||
|
||||
Sets these |v:event| keys:
|
||||
complete_word The word that was
|
||||
selected, empty if
|
||||
abandoned complete.
|
||||
complete_type |complete_info_mode|
|
||||
|
||||
*CursorHold*
|
||||
CursorHold When the user doesn't press a key for the time
|
||||
specified with 'updatetime'. Not triggered
|
||||
@@ -1254,10 +1260,19 @@ TerminalWinOpen Just after a terminal buffer was created, with
|
||||
TermResponse After the response to |t_RV| is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
can be used to do things depending on the
|
||||
terminal version. Note that this event may be
|
||||
triggered halfway executing another event,
|
||||
especially if file I/O, a shell command or
|
||||
anything else that takes time is involved.
|
||||
terminal version.
|
||||
This is used in |defaults.vim| to detect
|
||||
putty terminal and set a dark background: >
|
||||
|
||||
au TermResponse *
|
||||
\ if v:termresponse == "\e[>0;136;0c"
|
||||
\ set bg=dark
|
||||
\ endif
|
||||
<
|
||||
Note: that this event may be triggered halfway
|
||||
executing another event, especially if file
|
||||
I/O, a shell command or anything else that
|
||||
takes time is involved.
|
||||
*TermResponseAll*
|
||||
TermResponseAll After the response to |t_RV|, |t_RC|, |t_RS|,
|
||||
|t_RB|, |t_RF|, or |t_u7| are received from
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2024 Sep 10
|
||||
*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -67,6 +67,8 @@ autocmd_get([{opts}]) List return a list of autocmds
|
||||
balloon_gettext() String current text in the balloon
|
||||
balloon_show({expr}) none show {expr} inside the balloon
|
||||
balloon_split({msg}) List split {msg} as used for a balloon
|
||||
base64_decode({string}) Blob base64 decode {string} characters
|
||||
base64_encode({blob}) String base64 encode the bytes in {blob}
|
||||
bindtextdomain({package}, {path})
|
||||
Bool bind text domain to specified path
|
||||
blob2list({blob}) List convert {blob} into a list of numbers
|
||||
@@ -222,6 +224,7 @@ getbufline({buf}, {lnum} [, {end}])
|
||||
getbufoneline({buf}, {lnum}) String line {lnum} of buffer {buf}
|
||||
getbufvar({buf}, {varname} [, {def}])
|
||||
any variable {varname} in buffer {buf}
|
||||
getcellpixels() List get character cell pixel size
|
||||
getcellwidths() List get character cell width overrides
|
||||
getchangelist([{buf}]) List list of change list items
|
||||
getchar([{expr}]) Number or String
|
||||
@@ -230,10 +233,13 @@ 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
|
||||
getcmdcomplpat() String return the completion pattern of the
|
||||
current command-line completion
|
||||
getcmdcompltype() String return the type of the current
|
||||
command-line completion
|
||||
getcmdline() String return the current command-line
|
||||
getcmdline() String return the current command-line input
|
||||
getcmdpos() Number return cursor position in command-line
|
||||
getcmdprompt() String return the current command-line prompt
|
||||
getcmdscreenpos() Number return cursor screen position in
|
||||
command-line
|
||||
getcmdtype() String return current command-line type
|
||||
@@ -273,6 +279,7 @@ getregionpos({pos1}, {pos2} [, {opts}])
|
||||
List get a list of positions for a region
|
||||
getregtype([{regname}]) String type of a register
|
||||
getscriptinfo([{opts}]) List list of sourced scripts
|
||||
getstacktrace() List get current stack trace of Vim scripts
|
||||
gettabinfo([{expr}]) List list of tab pages
|
||||
gettabvar({nr}, {varname} [, {def}])
|
||||
any variable {varname} in tab {nr} or {def}
|
||||
@@ -464,9 +471,9 @@ prop_type_get({name} [, {props}])
|
||||
prop_type_list([{props}]) List get list of property types
|
||||
pum_getpos() Dict position and size of pum if visible
|
||||
pumvisible() Number whether popup menu is visible
|
||||
py3eval({expr}) any evaluate |python3| expression
|
||||
pyeval({expr}) any evaluate |Python| expression
|
||||
pyxeval({expr}) any evaluate |python_x| expression
|
||||
py3eval({expr} [, {locals}]) any evaluate |python3| expression
|
||||
pyeval({expr} [, {locals}]) any evaluate |Python| expression
|
||||
pyxeval({expr} [, {locals}]) any evaluate |python_x| expression
|
||||
rand([{expr}]) Number get pseudo-random number
|
||||
range({expr} [, {max} [, {stride}]])
|
||||
List items from {expr} to {max}
|
||||
@@ -1221,6 +1228,43 @@ balloon_split({msg}) *balloon_split()*
|
||||
|
||||
Return type: list<any> or list<string>
|
||||
|
||||
base64_decode({string}) *base64_decode()*
|
||||
Return a Blob containing the bytes decoded from the base64
|
||||
encoded characters in {string}.
|
||||
|
||||
The {string} argument should contain only base64-encoded
|
||||
characters and should have a length that is a multiple of 4.
|
||||
|
||||
Returns an empty blob on error.
|
||||
|
||||
Examples: >
|
||||
" Write the decoded contents to a binary file
|
||||
call writefile(base64_decode(s), 'tools.bmp')
|
||||
" Decode a base64-encoded string
|
||||
echo list2str(blob2list(base64_decode(encodedstr)))
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetEncodedString()->base64_decode()
|
||||
<
|
||||
Return type: |Blob|
|
||||
|
||||
|
||||
base64_encode({blob}) *base64_encode()*
|
||||
Return a base64-encoded String representing the bytes in
|
||||
{blob}. The base64 alphabet defined in RFC 4648 is used.
|
||||
|
||||
Examples: >
|
||||
" Encode the contents of a binary file
|
||||
echo base64_encode(readblob('somefile.bin'))
|
||||
" Encode a string
|
||||
echo base64_encode(list2blob(str2list(somestr)))
|
||||
<
|
||||
Can also be used as a |method|: >
|
||||
GetBinaryData()->base64_encode()
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
|
||||
bindtextdomain({package}, {path}) *bindtextdomain()*
|
||||
Bind a specific {package} to a {path} so that the
|
||||
|gettext()| function can be used to get language-specific
|
||||
@@ -1622,7 +1666,7 @@ charclass({string}) *charclass()*
|
||||
The character class is one of:
|
||||
0 blank
|
||||
1 punctuation
|
||||
2 word character
|
||||
2 word character (depends on 'iskeyword')
|
||||
3 emoji
|
||||
other specific Unicode class
|
||||
The class is used in patterns and word motions.
|
||||
@@ -1853,10 +1897,15 @@ complete_info([{what}]) *complete_info()*
|
||||
See |complete_info_mode| for the values.
|
||||
pum_visible |TRUE| if popup menu is visible.
|
||||
See |pumvisible()|.
|
||||
items List of completion matches. Each item is a
|
||||
dictionary containing the entries "word",
|
||||
items List of all completion candidates. Each item
|
||||
is a dictionary containing the entries "word",
|
||||
"abbr", "menu", "kind", "info" and "user_data".
|
||||
See |complete-items|.
|
||||
matches Same as "items", but only returns items that
|
||||
are matching current query. If both "matches"
|
||||
and "items" are in "what", the returned list
|
||||
will still be named "items", but each item
|
||||
will have an additional "match" field.
|
||||
selected Selected item index. First index is zero.
|
||||
Index is -1 if no item is selected (showing
|
||||
typed text only, or the last completion after
|
||||
@@ -3783,6 +3832,20 @@ getbufvar({buf}, {varname} [, {def}]) *getbufvar()*
|
||||
Return type: any, depending on {varname}
|
||||
|
||||
|
||||
getcellpixels() *getcellpixels()*
|
||||
Returns a |List| of terminal cell pixel size.
|
||||
List format is [xpixel, ypixel].
|
||||
|
||||
Only works on Unix (terminal and gVim) and Windows (gVim only).
|
||||
Returns [] on other systems or on failure.
|
||||
Note that there could be variations across different terminals.
|
||||
On macOS, system Terminal.app returns sizes in points (before
|
||||
Retina scaling), whereas third-party terminals return raw pixel
|
||||
sizes (post Retina scaling).
|
||||
|
||||
Return type: list<any>
|
||||
|
||||
|
||||
getcellwidths() *getcellwidths()*
|
||||
Returns a |List| of cell widths of character ranges overridden
|
||||
by |setcellwidths()|. The format is equal to the argument of
|
||||
@@ -3972,27 +4035,37 @@ getcharstr([{expr}]) *getcharstr()*
|
||||
|
||||
Return type: |String|
|
||||
|
||||
getcmdcomplpat() *getcmdcomplpat()*
|
||||
Return completion pattern of the current command-line.
|
||||
Only works when the command line is being edited, thus
|
||||
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|
||||
|getcmdprompt()|, |getcmdcompltype()| and |setcmdline()|.
|
||||
Returns an empty string when completion is not defined.
|
||||
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getcmdcompltype() *getcmdcompltype()*
|
||||
Return the type of the current command-line completion.
|
||||
Only works when the command line is being edited, thus
|
||||
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
See |:command-completion| for the return string.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()| and
|
||||
|setcmdline()|.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|
||||
|getcmdprompt()|, |getcmdcomplpat()| and |setcmdline()|.
|
||||
Returns an empty string when completion is not defined.
|
||||
|
||||
Return type: |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
|
||||
|c_CTRL-R_=|.
|
||||
Return the current command-line input. Only works when the
|
||||
command line is being edited, thus requires use of
|
||||
|c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
Example: >
|
||||
:cmap <F7> <C-\>eescape(getcmdline(), ' \')<CR>
|
||||
< Also see |getcmdtype()|, |getcmdpos()|, |setcmdpos()| and
|
||||
|setcmdline()|.
|
||||
< Also see |getcmdtype()|, |getcmdpos()|, |setcmdpos()|,
|
||||
|getcmdprompt()| and |setcmdline()|.
|
||||
Returns an empty string when entering a password or using
|
||||
|inputsecret()|.
|
||||
|
||||
@@ -4005,12 +4078,23 @@ getcmdpos() *getcmdpos()*
|
||||
Only works when editing the command line, thus requires use of
|
||||
|c_CTRL-\_e| or |c_CTRL-R_=| or an expression mapping.
|
||||
Returns 0 otherwise.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()| and
|
||||
|setcmdline()|.
|
||||
Also see |getcmdtype()|, |setcmdpos()|, |getcmdline()|,
|
||||
|getcmdprompt()| and |setcmdline()|.
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
getcmdprompt() *getcmdprompt()*
|
||||
Return the current command-line prompt when using functions
|
||||
like |input()| or |confirm()|.
|
||||
Only works when the command line is being edited, thus
|
||||
requires use of |c_CTRL-\_e| or |c_CTRL-R_=|.
|
||||
Also see |getcmdtype()|, |getcmdline()|, |getcmdpos()|,
|
||||
|setcmdpos()| and |setcmdline()|.
|
||||
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getcmdscreenpos() *getcmdscreenpos()*
|
||||
Return the screen position of the cursor in the command line
|
||||
as a byte count. The first column is 1.
|
||||
@@ -4067,7 +4151,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
cscope |:cscope| suboptions
|
||||
custom,{func} custom completion, defined via {func}
|
||||
customlist,{func} custom completion, defined via {func}
|
||||
diff_buffer |:diffget| and |:diffput| completion
|
||||
diff_buffer |:diffget| and |:diffput| completion
|
||||
dir directory names
|
||||
dir_in_path directory names in |'cdpath'|
|
||||
environment environment variable names
|
||||
@@ -4091,6 +4175,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
|
||||
runtime |:runtime| completion
|
||||
scriptnames sourced script names |:scriptnames|
|
||||
shellcmd Shell command
|
||||
shellcmdline Shell command line with filename arguments
|
||||
sign |:sign| suboptions
|
||||
syntax syntax file names |'syntax'|
|
||||
syntime |:syntime| suboptions
|
||||
@@ -4811,7 +4896,7 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
|
||||
<
|
||||
Return type: list<string>
|
||||
|
||||
<
|
||||
|
||||
getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
|
||||
Same as |getregion()|, but returns a list of positions
|
||||
describing the buffer text segments bound by {pos1} and
|
||||
@@ -4868,6 +4953,7 @@ getregtype([{regname}]) *getregtype()*
|
||||
<
|
||||
Return type: |String|
|
||||
|
||||
|
||||
getscriptinfo([{opts}]) *getscriptinfo()*
|
||||
Returns a |List| with information about all the sourced Vim
|
||||
scripts in the order they were sourced, like what
|
||||
@@ -4912,6 +4998,21 @@ getscriptinfo([{opts}]) *getscriptinfo()*
|
||||
Return type: list<dict<any>>
|
||||
|
||||
|
||||
getstacktrace() *getstacktrace()*
|
||||
Returns the current stack trace of Vim scripts.
|
||||
Stack trace is a |List|, of which each item is a |Dictionary|
|
||||
with the following items:
|
||||
funcref The funcref if the stack is at the function,
|
||||
otherwise this item is not exist.
|
||||
event The string of the event description if the
|
||||
stack is at autocmd event, otherwise this item
|
||||
is not exist.
|
||||
lnum The line number of the script on the stack.
|
||||
filepath The file path of the script on the stack.
|
||||
|
||||
Return type: list<dict<any>>
|
||||
|
||||
|
||||
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
|
||||
@@ -5045,6 +5146,8 @@ getwininfo([{winid}]) *getwininfo()*
|
||||
botline last complete displayed buffer line
|
||||
bufnr number of buffer in the window
|
||||
height window height (excluding winbar)
|
||||
leftcol first column displayed; only used when
|
||||
'wrap' is off
|
||||
loclist 1 if showing a location list
|
||||
{only with the +quickfix feature}
|
||||
quickfix 1 if quickfix or location list window
|
||||
@@ -5177,7 +5280,7 @@ glob({expr} [, {nosuf} [, {list} [, {alllinks}]]]) *glob()*
|
||||
on {list}
|
||||
|
||||
|
||||
glob2regpat({string}) *glob2regpat()*
|
||||
glob2regpat({string}) *glob2regpat()*
|
||||
Convert a file pattern, as used by glob(), into a search
|
||||
pattern. The result can be used to match with a string that
|
||||
is a file name. E.g. >
|
||||
@@ -5630,7 +5733,7 @@ iconv({string}, {from}, {to}) *iconv()*
|
||||
Return type: |String|
|
||||
|
||||
|
||||
id({item}) *id()*
|
||||
id({item}) *id()*
|
||||
The result is a unique String associated with the {item} and
|
||||
not with the {item}'s contents. It is only valid while the
|
||||
{item} exists and is referenced. It is valid only in the
|
||||
@@ -7055,7 +7158,7 @@ matchbufline({buf}, {pat}, {lnum}, {end}, [, {dict}])
|
||||
Return type: list<dict<any>> or list<any>
|
||||
|
||||
|
||||
matchdelete({id} [, {win}) *matchdelete()* *E802* *E803*
|
||||
matchdelete({id} [, {win}) *matchdelete()* *E802* *E803*
|
||||
Deletes a match with ID {id} previously defined by |matchadd()|
|
||||
or one of the |:match| commands. Returns 0 if successful,
|
||||
otherwise -1. See example for |matchadd()|. All matches can
|
||||
@@ -8101,9 +8204,14 @@ pumvisible() *pumvisible()*
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
py3eval({expr}) *py3eval()*
|
||||
py3eval({expr} [, {locals}]) *py3eval()*
|
||||
Evaluate Python expression {expr} and return its result
|
||||
converted to Vim data structures.
|
||||
If a {locals} |Dictionary| is given, it defines set of local
|
||||
variables available in the expression. The keys are variable
|
||||
names and the values are the variable values. |Dictionary| and
|
||||
|List| values are referenced, and may be updated by the
|
||||
expression (as if |python-bindeval| was used).
|
||||
Numbers and strings are returned as they are (strings are
|
||||
copied though, Unicode strings are additionally converted to
|
||||
'encoding').
|
||||
@@ -8115,15 +8223,17 @@ py3eval({expr}) *py3eval()*
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetExpr()->py3eval()
|
||||
'b",".join(l)'->py3eval({'l': ['a', 'b', 'c']})
|
||||
<
|
||||
Return type: any, depending on {expr}
|
||||
|
||||
{only available when compiled with the |+python3| feature}
|
||||
|
||||
*E858* *E859*
|
||||
pyeval({expr}) *pyeval()*
|
||||
pyeval({expr} [, {locals}]) *pyeval()*
|
||||
Evaluate Python expression {expr} and return its result
|
||||
converted to Vim data structures.
|
||||
For {locals} see |py3eval()|.
|
||||
Numbers and strings are returned as they are (strings are
|
||||
copied though).
|
||||
Lists are represented as Vim |List| type.
|
||||
@@ -8139,9 +8249,10 @@ pyeval({expr}) *pyeval()*
|
||||
|
||||
{only available when compiled with the |+python| feature}
|
||||
|
||||
pyxeval({expr}) *pyxeval()*
|
||||
pyxeval({expr} [, {locals}]) *pyxeval()*
|
||||
Evaluate Python expression {expr} and return its result
|
||||
converted to Vim data structures.
|
||||
For {locals} see |py3eval()|.
|
||||
Uses Python 2 or 3, see |python_x| and 'pyxversion'.
|
||||
See also: |pyeval()|, |py3eval()|
|
||||
|
||||
@@ -8504,10 +8615,10 @@ remote_expr({server}, {string} [, {idvar} [, {timeout}]])
|
||||
string, also see |{server}|.
|
||||
|
||||
The string is sent as an expression and the result is returned
|
||||
after evaluation. The result must be a String or a |List|. A
|
||||
|List| is turned into a String by joining the items with a
|
||||
line break in between (not at the end), like with join(expr,
|
||||
"\n").
|
||||
after evaluation. The result must be a String or a |List|
|
||||
other types will be converted to String. A |List| is turned
|
||||
into a String by joining the items with a line break in
|
||||
between (not at the end), like with join(expr, "\n").
|
||||
|
||||
If {idvar} is present and not empty, it is taken as the name
|
||||
of a variable and a {serverid} for later use with
|
||||
@@ -9741,6 +9852,8 @@ setqflist({list} [, {action} [, {what}]]) *setqflist()*
|
||||
clear the list: >
|
||||
:call setqflist([], 'r')
|
||||
<
|
||||
'u' Like 'r', but tries to preserve the current selection
|
||||
in the quickfix list.
|
||||
'f' All the quickfix lists in the quickfix stack are
|
||||
freed.
|
||||
|
||||
@@ -11927,7 +12040,7 @@ wildmenumode() *wildmenumode()*
|
||||
For example to make <c-j> work like <down> in wildmode, use: >
|
||||
:cnoremap <expr> <C-j> wildmenumode() ? "\<Down>\<Tab>" : "\<c-j>"
|
||||
<
|
||||
(Note, this needs the 'wildcharm' option set appropriately).
|
||||
(Note: this needs the 'wildcharm' option set appropriately).
|
||||
|
||||
Return type: |Number|
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 9.1. Last change: 2024 Jul 28
|
||||
*change.txt* For Vim version 9.1. Last change: 2024 Dec 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -586,6 +586,8 @@ comment (starting with '"') after the `:!` command.
|
||||
program {filter} (for {Visual} see |Visual-mode|).
|
||||
|
||||
:{range}![!]{filter} [!][arg] *:range!*
|
||||
For executing external commands see |:!|
|
||||
|
||||
Filter {range} lines through the external program
|
||||
{filter}. Vim replaces the optional bangs with the
|
||||
latest given command and appends the optional [arg].
|
||||
@@ -1283,8 +1285,7 @@ mapped. E.g. |%| is mapped by the matchit plugin.
|
||||
With each successive deletion or change, Vim shifts the previous contents
|
||||
of register 1 into register 2, 2 into 3, and so forth, losing the previous
|
||||
contents of register 9.
|
||||
{Vi: numbered register contents are lost when changing files; register 0 does
|
||||
not exist}
|
||||
{Vi: register 0 does not exist}
|
||||
|
||||
3. Small delete register "- *quote_-* *quote-*
|
||||
This register contains text from commands that delete less than one line,
|
||||
@@ -1511,18 +1512,17 @@ since formatting is highly dependent on the type of file. It makes
|
||||
sense to use an |autoload| script, so the corresponding script is only loaded
|
||||
when actually needed and the script should be called <filetype>format.vim.
|
||||
|
||||
For example, the XML filetype plugin distributed with Vim in the $VIMRUNTIME
|
||||
directory, sets the 'formatexpr' option to: >
|
||||
For example, the XML filetype plugin distributed with Vim in the
|
||||
$VIMRUNTIME/ftplugin directory, sets the 'formatexpr' option to: >
|
||||
|
||||
setlocal formatexpr=xmlformat#Format()
|
||||
|
||||
That means, you will find the corresponding script, defining the
|
||||
xmlformat#Format() function, in the directory:
|
||||
`$VIMRUNTIME/autoload/xmlformat.vim`
|
||||
xmlformat#Format() function, in the file `$VIMRUNTIME/autoload/xmlformat.vim`
|
||||
|
||||
Here is an example script that removes trailing whitespace from the selected
|
||||
text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim: >
|
||||
|
||||
text. Put it in your autoload directory, e.g. ~/.vim/autoload/format.vim:
|
||||
>vim
|
||||
func! format#Format()
|
||||
" only reformat on explicit gq command
|
||||
if mode() != 'n'
|
||||
@@ -1555,7 +1555,7 @@ debugging it helps to set the 'debug' option.
|
||||
|
||||
*right-justify*
|
||||
There is no command in Vim to right justify text. You can do it with
|
||||
an external command, like "par" (e.g.: "!}par" to format until the end of the
|
||||
an external command, like "par" (e.g.: `:.,}!par` to format until the end of the
|
||||
paragraph) or set 'formatprg' to "par".
|
||||
|
||||
*format-comments*
|
||||
@@ -1621,7 +1621,7 @@ type of comment string. A part consists of:
|
||||
some indent for the start or end part that can be removed.
|
||||
|
||||
When a string has none of the 'f', 's', 'm' or 'e' flags, Vim assumes the
|
||||
comment string repeats at the start of each line. The flags field may be
|
||||
comment string repeats at the start of each line. The {flags} field may be
|
||||
empty.
|
||||
|
||||
Any blank space in the text before and after the {string} is part of the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 9.1. Last change: 2024 Aug 20
|
||||
*cmdline.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -481,13 +481,13 @@ The 'wildignorecase' option can be set to ignore case in filenames. For
|
||||
completing other texts (e.g. command names), the 'ignorecase' option is used
|
||||
instead (fuzzy matching always ignores case, however).
|
||||
|
||||
If you like tcsh's autolist completion, you can use this mapping:
|
||||
If you like tcsh's autolist completion, you can use this mapping: >
|
||||
:cnoremap X <C-L><C-D>
|
||||
(Where X is the command key to use, <C-L> is CTRL-L and <C-D> is CTRL-D)
|
||||
This will find the longest match and then list all matching files.
|
||||
|
||||
If you like tcsh's autolist completion, you can use the 'wildmode' option to
|
||||
emulate it. For example, this mimics autolist=ambiguous:
|
||||
emulate it. For example, this mimics autolist=ambiguous: >
|
||||
:set wildmode=longest,list
|
||||
This will find the longest match with the first 'wildchar', then list all
|
||||
matching files with the next.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 9.1. Last change: 2024 May 11
|
||||
*develop.txt* For Vim version 9.1. Last change: 2024 Dec 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -157,6 +157,7 @@ VIM IS... NOT *design-not*
|
||||
being less consistent over all platforms. But functional GUI features are
|
||||
welcomed.
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Coding style *coding-style*
|
||||
|
||||
@@ -165,23 +166,36 @@ stick to these rules, to keep the sources readable and maintainable.
|
||||
|
||||
This list is not complete. Look in the source code for more examples.
|
||||
|
||||
The code repository contains an editorconfig file, that can be used together
|
||||
with the distributed editorconfig plugin |editorconfig-install| to ensure the
|
||||
recommended style is followed.
|
||||
|
||||
|
||||
MAKING CHANGES *style-changes*
|
||||
|
||||
The basic steps to make changes to the code:
|
||||
1. Get the code from github. That makes it easier to keep your changed
|
||||
version in sync with the main code base (it may be a while before your
|
||||
changes will be included). You do need to spend some time learning git,
|
||||
it's not the most user friendly tool.
|
||||
changes will be included).
|
||||
2. Adjust the documentation. Doing this first gives you an impression of how
|
||||
your changes affect the user.
|
||||
3. Make the source code changes.
|
||||
4. Check ../doc/todo.txt if the change affects any listed item.
|
||||
5. Make a patch with "git diff". You can also create a pull request on
|
||||
github, but it's the diff that matters.
|
||||
6. Make a note about what changed, preferably mentioning the problem and the
|
||||
5. Add a test to src/testdir to verify the new behaviour and ensure it won't
|
||||
regress in the future.
|
||||
6. Make a patch with "git diff".
|
||||
7. Make a note about what changed, preferably mentioning the problem and the
|
||||
solution. Send an email to the |vim-dev| maillist with an explanation and
|
||||
include the diff. Or create a pull request on github.
|
||||
include the diff.
|
||||
|
||||
For any non-trivial change, please always create a pull request on github,
|
||||
since this triggers the test suite.
|
||||
|
||||
*style-clang-format*
|
||||
sound.c and sign.c can be (semi-) automatically formated using the
|
||||
`clang-format` formatter according to the distributed .clang-format file.
|
||||
Other source files do not yet correspond to the .clang-format file. This may
|
||||
change in the future and they may be reformatted as well.
|
||||
|
||||
|
||||
C COMPILER *style-compiler* *ANSI-C* *C89* *C99*
|
||||
@@ -191,52 +205,234 @@ Later standards, such as C99, are not widely supported, or at least not 100%
|
||||
supported. Therefore we use only some of the C99 features and explicitly
|
||||
disallow some (this will gradually be adjusted over time).
|
||||
|
||||
Please don't make changes everywhere to use the C99 features, it causes merge
|
||||
problems for existing patches. Only use them for new and changed code.
|
||||
|
||||
Comments ~
|
||||
|
||||
Traditionally Vim uses /* comments */. We intend to keep it that way
|
||||
for file and function headers and larger blocks of code, E.g.:
|
||||
/*
|
||||
* The "foo" argument does something useful.
|
||||
* Return OK or FAIL.
|
||||
*/
|
||||
For new code or lines of code that change, it is preferred to use // comments.
|
||||
Especially when it comes after code:
|
||||
int some_var; // single line comment useful here
|
||||
|
||||
Enums ~
|
||||
|
||||
The last item in an enum may have a trailing comma. C89 didn't allow this.
|
||||
|
||||
Types ~
|
||||
|
||||
"long long" is allowed and can be expected to be 64 bits. Use %lld in printf
|
||||
formats. Also "long long unsigned" with %llu.
|
||||
|
||||
Declarations ~
|
||||
|
||||
Now that the minimal supported compiler is MSVC 2015 declarations do not need
|
||||
to be at the start of a block. However, it is often a good idea to do this
|
||||
anyway.
|
||||
|
||||
Declaration of the for loop variable inside the loop is recommended:
|
||||
for (int i = 0; i < len; ++i)
|
||||
Since this is clearly an advantage we'll use this more often.
|
||||
|
||||
|
||||
Not to be used ~
|
||||
Features not to be used ~
|
||||
|
||||
These C99 features are not to be used, because not enough compilers support
|
||||
them:
|
||||
- Variable length arrays (even in C11 this is an optional feature).
|
||||
- _Bool and _Complex types.
|
||||
- C99 _Bool and _Complex types.
|
||||
- "inline" (it's hardly ever needed, let the optimizer do its work)
|
||||
- flexible array members: Not supported by HP-UX C compiler (John Marriott)
|
||||
|
||||
|
||||
USE OF COMMON FUNCTIONS *style-functions*
|
||||
COMMENTS *style-comments*
|
||||
|
||||
Try to avoid putting multiline comments inside a function body: if the
|
||||
function is so complex that you need to separately comment parts of it, you
|
||||
should probably rethink the structure of the function.
|
||||
|
||||
For file headers and function descriptions use: >
|
||||
/*
|
||||
* Description
|
||||
*/
|
||||
<
|
||||
For everything else use: >
|
||||
// comment
|
||||
<
|
||||
|
||||
|
||||
INDENTATION *style-indentation*
|
||||
|
||||
We use 4 space to indent the code. If you are using Vim to edit the source,
|
||||
you don't need to do anything due to the |modeline|.
|
||||
|
||||
For other editors an `.editorconfig` is provided at the root of the repo.
|
||||
|
||||
|
||||
DECLARATIONS *style-declarations*
|
||||
|
||||
Declare, when possible, `for` loop variables in the guard:
|
||||
OK: >
|
||||
for (int i = 0; i < len; ++i)
|
||||
<
|
||||
Wrong: >
|
||||
int i;
|
||||
for (i = 0; i < len; ++i)
|
||||
<
|
||||
Always declare a variable with a default value:
|
||||
OK: >
|
||||
int n = 0;
|
||||
int *ptr = NULL;
|
||||
<
|
||||
Wrong: >
|
||||
int n;
|
||||
int *ptr;
|
||||
<
|
||||
|
||||
|
||||
BRACES *style-braces*
|
||||
|
||||
All curly braces must be returned onto a new line:
|
||||
OK: >
|
||||
if (cond)
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
<
|
||||
Wrong: >
|
||||
if (cond) {
|
||||
cmd;
|
||||
cmd;
|
||||
} else {
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
<
|
||||
OK: >
|
||||
while (cond)
|
||||
{
|
||||
cmd;
|
||||
}
|
||||
<
|
||||
Wrong: >
|
||||
while (cond) {
|
||||
cmd;
|
||||
}
|
||||
<
|
||||
When a block has one line, including comments, the braces can be left out.
|
||||
OK: >
|
||||
if (cond)
|
||||
cmd;
|
||||
else
|
||||
cmd;
|
||||
<
|
||||
Wrong: >
|
||||
if (cond)
|
||||
/*
|
||||
* comment
|
||||
*/
|
||||
cmd;
|
||||
else
|
||||
cmd;
|
||||
<
|
||||
When an `if`/`else` has braces on one block, the other should have it too.
|
||||
OK: >
|
||||
if (cond)
|
||||
{
|
||||
cmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
<
|
||||
Wrong: >
|
||||
if (cond)
|
||||
cmd;
|
||||
else
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
|
||||
if (cond)
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
else
|
||||
cmd;
|
||||
<
|
||||
OK: >
|
||||
while (cond)
|
||||
cmd;
|
||||
<
|
||||
Wrong:
|
||||
>
|
||||
while (cond)
|
||||
if (cond)
|
||||
cmd;
|
||||
<
|
||||
|
||||
|
||||
TYPES *style-types*
|
||||
|
||||
Use descriptive types. You can find a list of them in the src/structs.h file
|
||||
and probably in a typedef in the file you are working on.
|
||||
|
||||
Note that all custom types are postfixed with "_T"
|
||||
|
||||
OK: >
|
||||
int is_valid_line_number(linenr_T lnum);
|
||||
<
|
||||
Wrong: >
|
||||
int is_valid_line_number(unsigned long lnum);
|
||||
<
|
||||
|
||||
|
||||
SPACES AND PUNCTUATION *style-spaces*
|
||||
|
||||
No space between a function name and the bracket:
|
||||
|
||||
OK: func(arg);
|
||||
Wrong: func (arg);
|
||||
|
||||
Do use a space after `if`, `while`, `switch`, etc.
|
||||
|
||||
OK: if (arg) for (;;)
|
||||
Wrong: if(arg) for(;;)
|
||||
|
||||
Use a space after a comma or semicolon:
|
||||
|
||||
OK: func(arg1, arg2); for (i = 0; i < 2; ++i)
|
||||
Wrong: func(arg1,arg2); for (i = 0;i < 2;++i)
|
||||
|
||||
Use a space before and after '=', '+', '/', etc.
|
||||
|
||||
Wrong: var=a*5;
|
||||
OK: var = a * 5;
|
||||
|
||||
Use empty lines to group similar actions together.
|
||||
|
||||
OK: >
|
||||
msg_puts_title(_("\n--- Signs ---"));
|
||||
msg_putchar('\n');
|
||||
|
||||
if (rbuf == NULL)
|
||||
buf = firstbuf;
|
||||
else
|
||||
buf = rbuf;
|
||||
|
||||
while (buf != NULL && !got_int)
|
||||
<
|
||||
Wrong: >
|
||||
msg_puts_title(_("\n--- Signs ---"));
|
||||
msg_putchar('\n');
|
||||
if (rbuf == NULL)
|
||||
buf = firstbuf;
|
||||
else
|
||||
buf = rbuf;
|
||||
while (buf != NULL && !got_int)
|
||||
<
|
||||
|
||||
|
||||
FUNCTIONS *style-functions*
|
||||
|
||||
Use function declarations with the return type on a separate indented line.
|
||||
|
||||
OK: >
|
||||
int
|
||||
function_name(int arg1, int arg2)
|
||||
{
|
||||
}
|
||||
<
|
||||
Wrong: >
|
||||
int function_name(int arg1, int arg2)
|
||||
{
|
||||
}
|
||||
<
|
||||
|
||||
Give meaningful names to function parameters.
|
||||
|
||||
|
||||
USE OF COMMON FUNCTIONS *style-common-functions*
|
||||
|
||||
Some functions that are common to use, have a special Vim version. Always
|
||||
consider using the Vim version, because they were introduced with a reason.
|
||||
@@ -311,27 +507,30 @@ get_env_value() Linux system function
|
||||
|
||||
VARIOUS *style-various*
|
||||
|
||||
Typedef'ed names should end in "_T": >
|
||||
typedef int some_T;
|
||||
Define'ed names should be uppercase: >
|
||||
Define'd names should be uppercase: >
|
||||
#define SOME_THING
|
||||
<
|
||||
|
||||
Features always start with "FEAT_": >
|
||||
#define FEAT_FOO
|
||||
<
|
||||
|
||||
Don't use '\"', some compilers can't handle it. '"' works fine.
|
||||
|
||||
Don't use:
|
||||
Don't use: >
|
||||
#if HAVE_SOME
|
||||
<
|
||||
Some compilers can't handle that and complain that "HAVE_SOME" is not defined.
|
||||
Use
|
||||
Use >
|
||||
#ifdef HAVE_SOME
|
||||
or
|
||||
<
|
||||
or >
|
||||
#if defined(HAVE_SOME)
|
||||
|
||||
<
|
||||
|
||||
STYLE *style-examples*
|
||||
|
||||
General rule: One statement per line.
|
||||
One statement per line.
|
||||
|
||||
Wrong: if (cond) a = 1;
|
||||
|
||||
@@ -349,101 +548,6 @@ OK: do
|
||||
a = 1;
|
||||
while (cond);
|
||||
|
||||
Wrong: if (cond) {
|
||||
cmd;
|
||||
cmd;
|
||||
} else {
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
|
||||
OK: if (cond)
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
|
||||
When a block has one line the braces can be left out. When an if/else has
|
||||
braces on one block, it usually looks better when the other block also has
|
||||
braces:
|
||||
OK: if (cond)
|
||||
cmd;
|
||||
else
|
||||
cmd;
|
||||
|
||||
OK: if (cond)
|
||||
{
|
||||
cmd;
|
||||
}
|
||||
else
|
||||
{
|
||||
cmd;
|
||||
cmd;
|
||||
}
|
||||
|
||||
Use ANSI (new style) function declarations with the return type on a separate
|
||||
indented line.
|
||||
|
||||
Wrong: int function_name(int arg1, int arg2)
|
||||
|
||||
OK: /*
|
||||
* Explanation of what this function is used for.
|
||||
*
|
||||
* Return value explanation.
|
||||
*/
|
||||
int
|
||||
function_name(
|
||||
int arg1, // short comment about arg1
|
||||
int arg2) // short comment about arg2
|
||||
{
|
||||
int local; // comment about local
|
||||
|
||||
local = arg1 * arg2;
|
||||
|
||||
|
||||
|
||||
SPACES AND PUNCTUATION *style-spaces*
|
||||
|
||||
No space between a function name and the bracket:
|
||||
|
||||
Wrong: func (arg);
|
||||
OK: func(arg);
|
||||
|
||||
Do use a space after if, while, switch, etc.
|
||||
|
||||
Wrong: if(arg) for(;;)
|
||||
OK: if (arg) for (;;)
|
||||
|
||||
Use a space after a comma and semicolon:
|
||||
|
||||
Wrong: func(arg1,arg2); for (i = 0;i < 2;++i)
|
||||
OK: func(arg1, arg2); for (i = 0; i < 2; ++i)
|
||||
|
||||
Use a space before and after '=', '+', '/', etc.
|
||||
|
||||
Wrong: var=a*5;
|
||||
OK: var = a * 5;
|
||||
|
||||
In general: Use empty lines to group lines of code together. Put a comment
|
||||
just above the group of lines. This makes it easier to quickly see what is
|
||||
being done.
|
||||
|
||||
OK: /* Prepare for building the table. */
|
||||
get_first_item();
|
||||
table_idx = 0;
|
||||
|
||||
/* Build the table */
|
||||
while (has_item())
|
||||
table[table_idx++] = next_item();
|
||||
|
||||
/* Finish up. */
|
||||
cleanup_items();
|
||||
generate_hash(table);
|
||||
|
||||
==============================================================================
|
||||
3. Design decisions *design-decisions*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 9.1. Last change: 2024 Jul 10
|
||||
*editing.txt* For Vim version 9.1. Last change: 2024 Oct 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1058,6 +1058,15 @@ explanation of when the copy is made and when the file is renamed.
|
||||
If the creation of a backup file fails, the write is not done. If you want
|
||||
to write anyway add a '!' to the command.
|
||||
|
||||
*file-watcher*
|
||||
When you notice issues with programs, that act upon when a buffer is written
|
||||
(like inotify, entr or fswatch) or when external applications execute Vim to
|
||||
edit the file (like git) and those programs do not seem to notice that the
|
||||
original file has been changed, you may want to consider switching the
|
||||
'backupcopy' option value to "yes". This makes sure, Vim writes to the same
|
||||
file, that those watcher programs expect, without creating a new file (which
|
||||
prevents them from detecting that the file has changed). See also |crontab|
|
||||
|
||||
*write-permissions*
|
||||
When writing a new file the permissions are read-write. For unix the mask is
|
||||
0o666 with additionally umask applied. When writing a file that was read Vim
|
||||
@@ -1325,7 +1334,7 @@ used (Motif only offers one pattern, but you can edit it).
|
||||
For example, to have only Vim files in the dialog, you could use the following
|
||||
command: >
|
||||
|
||||
let g:browsefilter = "Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n"
|
||||
let g:browsefilter = "Vim scripts\t*.vim\nVim Startup Files\t*vimrc\n"
|
||||
|
||||
You can override the filter setting on a per-buffer basis by setting the
|
||||
b:browsefilter variable. You would most likely set b:browsefilter in a
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*eval.txt* For Vim version 9.1. Last change: 2024 Jul 28
|
||||
*eval.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -797,7 +797,7 @@ length minus one is used: >
|
||||
|
||||
|
||||
Blob modification ~
|
||||
*blob-modification* *E1182* *E1184*
|
||||
*blob-modification* *E1184*
|
||||
To change a specific byte of a blob use |:let| this way: >
|
||||
:let blob[4] = 0x44
|
||||
|
||||
@@ -1953,7 +1953,8 @@ variables for each buffer. Use local buffer variables instead |b:var|.
|
||||
|
||||
PREDEFINED VIM VARIABLES *vim-variable* *v:var* *v:*
|
||||
*E963* *E1063*
|
||||
Some variables can be set by the user, but the type cannot be changed.
|
||||
Most variables are read-only, when a variable can be set by the user, it will
|
||||
be mentioned at the variable description below. The type cannot be changed.
|
||||
|
||||
*v:argv* *argv-variable*
|
||||
v:argv The command line arguments Vim was invoked with. This is a
|
||||
@@ -2026,6 +2027,7 @@ v:cmdbang Set like v:cmdarg for a file read/write command. When a "!"
|
||||
was used the value is 1, otherwise it is 0. Note that this
|
||||
can only be used in autocommands. For user commands |<bang>|
|
||||
can be used.
|
||||
|
||||
*v:collate* *collate-variable*
|
||||
v:collate The current locale setting for collation order of the runtime
|
||||
environment. This allows Vim scripts to be aware of the
|
||||
@@ -2171,7 +2173,8 @@ v:event Dictionary containing information about the current
|
||||
<
|
||||
*v:exception* *exception-variable*
|
||||
v:exception The value of the exception most recently caught and not
|
||||
finished. See also |v:throwpoint| and |throw-variables|.
|
||||
finished. See also |v:stacktrace|, |v:throwpoint|, and
|
||||
|throw-variables|.
|
||||
Example: >
|
||||
:try
|
||||
: throw "oops"
|
||||
@@ -2547,6 +2550,12 @@ v:sizeofpointer Number of bytes in a pointer. Depends on how Vim was compiled.
|
||||
This is only useful for deciding whether a test will give the
|
||||
expected result.
|
||||
|
||||
*v:stacktrace* *stacktrace-variable*
|
||||
v:stacktrace The stack trace of the exception most recently caught and
|
||||
not finished. Refer to |getstacktrace()| for the structure of
|
||||
stack trace. See also |v:exception|, |v:throwpoint|, and
|
||||
|throw-variables|.
|
||||
|
||||
*v:statusmsg* *statusmsg-variable*
|
||||
v:statusmsg Last given status message. It's allowed to set this variable.
|
||||
|
||||
@@ -2675,7 +2684,7 @@ v:this_session Full filename of the last loaded or saved session file. See
|
||||
*v:throwpoint* *throwpoint-variable*
|
||||
v:throwpoint The point where the exception most recently caught and not
|
||||
finished was thrown. Not set when commands are typed. See
|
||||
also |v:exception| and |throw-variables|.
|
||||
also |v:exception|, |v:stacktrace|, and |throw-variables|.
|
||||
Example: >
|
||||
:try
|
||||
: throw "oops"
|
||||
@@ -3855,7 +3864,8 @@ in the variable |v:exception|: >
|
||||
: echo "Number thrown. Value is" v:exception
|
||||
|
||||
You may also be interested where an exception was thrown. This is stored in
|
||||
|v:throwpoint|. Note that "v:exception" and "v:throwpoint" are valid for the
|
||||
|v:throwpoint|. And you can obtain the stack trace from |v:stacktrace|.
|
||||
Note that "v:exception", "v:stacktrace" and "v:throwpoint" are valid for the
|
||||
exception most recently caught as long it is not finished.
|
||||
Example: >
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2024 Aug 21
|
||||
*filetype.txt* For Vim version 9.1. Last change: 2024 Dec 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -634,7 +634,7 @@ To disable this behavior, set the following variable in your vimrc: >
|
||||
let g:gdscript_recommended_style = 0
|
||||
|
||||
|
||||
GIT COMMIT *ft-gitcommit-plugin*
|
||||
GIT COMMIT *ft-gitcommit-plugin*
|
||||
|
||||
One command, :DiffGitCached, is provided to show a diff of the current commit
|
||||
in the preview window. It is equivalent to calling "git diff --cached" plus
|
||||
@@ -667,6 +667,19 @@ HARE *ft-hare*
|
||||
Since the text for this plugin is rather long it has been put in a separate
|
||||
file: |ft_hare.txt|.
|
||||
|
||||
IDRIS2 *ft-idris2-plugin*
|
||||
|
||||
By default the following options are set: >
|
||||
|
||||
setlocal shiftwidth=2 tabstop=2 expandtab
|
||||
setlocal comments=s1:{-,mb:-,ex:-},:\|\|\|,:--
|
||||
setlocal commentstring=--\ %s
|
||||
setlocal wildignore+=*.ibc
|
||||
|
||||
To use tabs instead of spaces for indentation, set the following variable
|
||||
in your vimrc: >
|
||||
|
||||
let g:idris2#allow_tabchar = 1
|
||||
|
||||
JAVA *ft-java-plugin*
|
||||
|
||||
@@ -698,7 +711,28 @@ Remember to manually trigger the |FileType| event from a buffer with a Java
|
||||
file loaded in it each time after assigning a new value to the variable: >
|
||||
doautocmd FileType
|
||||
<
|
||||
Markdown documentation comments may contain common runs of vertical leading
|
||||
whitespace following the comment marks (`///`) for aesthetic reasons; however,
|
||||
some horizontal runs of leading whitespace are significant in Markdown because
|
||||
they denote code blocks etc. For convenience, a 'formatexpr' function is
|
||||
provided for the |gq| operator. As long as neither "g:java_ignore_javadoc"
|
||||
nor "g:java_ignore_markdown" is defined, the reformatting of Markdown comments
|
||||
can be enabled on demand with: >
|
||||
setlocal formatexpr=g:javaformat#RemoveCommonMarkdownWhitespace()
|
||||
<
|
||||
Or for Vim versions less than `7.4.265`, with: >
|
||||
setlocal formatexpr=javaformat#RemoveCommonMarkdownWhitespace()
|
||||
<
|
||||
This function accepts a range of lines, removes a common run of vertical
|
||||
leading whitespace, and rewrites the lines of the range. Depending on the
|
||||
author's layout style and the comment contents, which lines to select for
|
||||
reformatting can vary from the whole comment to only some portion of it.
|
||||
|
||||
To enable the recognition of Markdown comments each time after removing
|
||||
"g:java_ignore_markdown" or "g:java_ignore_javadoc", remember to manually
|
||||
re-source "javaformat.vim" for Vim versions greater than `8.2.1397`: >
|
||||
runtime autoload/javaformat.vim
|
||||
<
|
||||
JSON-FORMAT *ft-json-plugin*
|
||||
|
||||
JSON filetype can be extended to use 'formatexpr' and "json.FormatExpr()"
|
||||
@@ -710,6 +744,11 @@ Add following lines to $HOME/.vim/ftplugin/json.vim: >
|
||||
import autoload 'dist/json.vim'
|
||||
setl formatexpr=json.FormatExpr()
|
||||
|
||||
LUA *ft-lua-plugin*
|
||||
|
||||
You can enable folding of Lua functions using |fold-expr| by: >
|
||||
|
||||
let g:lua_folding = 1
|
||||
|
||||
MAIL *ft-mail-plugin*
|
||||
|
||||
@@ -754,7 +793,7 @@ Global mapping:
|
||||
|
||||
Local mappings:
|
||||
<Plug>ManBS
|
||||
<LocalLeader>h Clear backspace <BS> characters from the buffer
|
||||
<LocalLeader>h Clear backspace <BS> characters from the buffer.
|
||||
CTRL-] Jump to the manual page for the word under the cursor.
|
||||
CTRL-T Jump back to the previous manual page.
|
||||
|
||||
@@ -781,7 +820,7 @@ page in a Vim window: >
|
||||
set keywordprg=:Man
|
||||
|
||||
|
||||
MANPAGER *manpager.vim*
|
||||
MANPAGER *manpager.vim*
|
||||
|
||||
The |:Man| command allows you to turn Vim into a manpager (that syntax
|
||||
highlights manpages and follows linked manpages on hitting CTRL-]).
|
||||
@@ -799,7 +838,7 @@ For fish, add to the config file
|
||||
set -x MANPAGER "vim +MANPAGER --not-a-term -"
|
||||
|
||||
|
||||
MARKDOWN *ft-markdown-plugin*
|
||||
MARKDOWN *ft-markdown-plugin*
|
||||
|
||||
To enable folding use this: >
|
||||
let g:markdown_folding = 1
|
||||
@@ -808,6 +847,12 @@ To enable folding use this: >
|
||||
let g:markdown_recommended_style = 0
|
||||
|
||||
|
||||
ORG *ft-org-plugin*
|
||||
|
||||
To enable folding use this: >
|
||||
let g:org_folding = 1
|
||||
<
|
||||
|
||||
PDF *ft-pdf-plugin*
|
||||
|
||||
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
|
||||
@@ -872,7 +917,7 @@ To enable this behavior, set the following variable in your vimrc: >
|
||||
let g:rst_style = 1
|
||||
|
||||
|
||||
RNOWEB *ft-rnoweb-plugin*
|
||||
RNOWEB *ft-rnoweb-plugin*
|
||||
|
||||
The 'formatexpr' option is set dynamically with different values for R code
|
||||
and for LaTeX code. If you prefer that 'formatexpr' is not set, add to your
|
||||
@@ -917,6 +962,19 @@ TYPST *ft-typst-plugin*
|
||||
*g:typst_conceal*
|
||||
When |TRUE| the Typst filetype plugin will set the 'conceallevel' option to 2.
|
||||
|
||||
*g:typst_folding*
|
||||
When |TRUE| the Typst filetype plugin will fold headings. (default: |FALSE|)
|
||||
|
||||
To enable: >
|
||||
let g:typst_folding = 1
|
||||
<
|
||||
*g:typst_foldnested*
|
||||
When |TRUE| the Typst filetype plugin will fold nested heading under their
|
||||
parents. (default: |TRUE|)
|
||||
|
||||
To disable: >
|
||||
let g:typst_foldnested = 0
|
||||
<
|
||||
VIM *ft-vim-plugin*
|
||||
|
||||
The Vim filetype plugin defines mappings to move to the start and end of
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 9.1. Last change: 2023 Mar 24
|
||||
*fold.txt* For Vim version 9.1. Last change: 2024 Dec 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -87,9 +87,11 @@ The most efficient is to call a compiled function without arguments: >
|
||||
The function must use v:lnum. See |expr-option-function|.
|
||||
|
||||
These are the conditions with which the expression is evaluated:
|
||||
|
||||
- The current buffer and window are set for the line.
|
||||
- The variable "v:lnum" is set to the line number.
|
||||
- The result is used for the fold level in this way:
|
||||
|
||||
The result of foldexpr then determines the fold level as follows:
|
||||
value meaning ~
|
||||
0 the line is not in a fold
|
||||
1, 2, .. the line is in a fold with this level
|
||||
@@ -104,6 +106,9 @@ These are the conditions with which the expression is evaluated:
|
||||
"<1", "<2", .. a fold with this level ends at this line
|
||||
">1", ">2", .. a fold with this level starts at this line
|
||||
|
||||
The result values "=", "s" and "a" are more expensive, please see
|
||||
|fold-expr-slow|.
|
||||
|
||||
It is not required to mark the start (end) of a fold with ">1" ("<1"), a fold
|
||||
will also start (end) when the fold level is higher (lower) than the fold
|
||||
level of the previous line.
|
||||
@@ -117,14 +122,8 @@ recognized, there is no error message and the fold level will be zero.
|
||||
For debugging the 'debug' option can be set to "msg", the error messages will
|
||||
be visible then.
|
||||
|
||||
Note: Since the expression has to be evaluated for every line, this fold
|
||||
method can be very slow!
|
||||
|
||||
Try to avoid the "=", "a" and "s" return values, since Vim often has to search
|
||||
backwards for a line for which the fold level is defined. This can be slow.
|
||||
|
||||
If the 'foldexpr' expression starts with s: or |<SID>|, then it is replaced
|
||||
with the script ID (|local-function|). Examples: >
|
||||
with the script ID (|local-function|). Examples: >
|
||||
set foldexpr=s:MyFoldExpr()
|
||||
set foldexpr=<SID>SomeFoldExpr()
|
||||
<
|
||||
@@ -148,6 +147,39 @@ end in that line.
|
||||
It may happen that folds are not updated properly. You can use |zx| or |zX|
|
||||
to force updating folds.
|
||||
|
||||
MINIMIZING COMPUTATIONAL COST *fold-expr-slow*
|
||||
|
||||
Due to its computational cost, this fold method can make Vim unresponsive,
|
||||
especially when the fold level of all lines have to be initially computed.
|
||||
Afterwards, after each change, Vim restricts the computation of foldlevels
|
||||
to those lines whose fold level was affected by it (and reuses the known
|
||||
foldlevels of all the others).
|
||||
|
||||
The fold expression should therefore strive to minimize the number of
|
||||
dependent lines needed for the computation of a given line: For example, try
|
||||
to avoid the "=", "a" and "s" return values, because these will require the
|
||||
evaluation of the fold levels on previous lines until an independent fold
|
||||
level is found.
|
||||
|
||||
If this proves difficult, the next best thing could be to cache all fold
|
||||
levels in a buffer-local variable (b:foldlevels) that is only updated on
|
||||
|b:changedtick|:
|
||||
>vim
|
||||
vim9script
|
||||
def MyFoldFunc(): number
|
||||
if b:lasttick == b:changedtick
|
||||
return b:foldlevels[v:lnum - 1]
|
||||
endif
|
||||
b:lasttick = b:changedtick
|
||||
b:foldlevels = []
|
||||
# compute foldlevels ...
|
||||
return b:foldlevels[v:lnum - 1]
|
||||
enddef
|
||||
set foldexpr=s:MyFoldFunc()
|
||||
<
|
||||
In above example further speedup was gained by using a precompiled Vim9 script
|
||||
function without arguments (that must still use v:lnum). See
|
||||
|expr-option-function|.
|
||||
|
||||
SYNTAX *fold-syntax*
|
||||
|
||||
@@ -384,8 +416,8 @@ zX Undo manually opened and closed folds: re-apply 'foldlevel'.
|
||||
Also forces recomputing folds, like |zx|.
|
||||
|
||||
*zm*
|
||||
zm Fold more: Subtract |v:count1| from 'foldlevel'. If 'foldlevel' was
|
||||
already zero nothing happens.
|
||||
zm Fold more: Subtract |v:count1| from 'foldlevel'. If
|
||||
'foldlevel' was already zero nothing happens.
|
||||
'foldenable' will be set.
|
||||
|
||||
*zM*
|
||||
@@ -449,7 +481,7 @@ zk Move upwards to the end of the previous fold. A closed fold
|
||||
|
||||
EXECUTING COMMANDS ON FOLDS ~
|
||||
|
||||
:[range]foldd[oopen] {cmd} *:foldd* *:folddo* *:folddoopen*
|
||||
:[range]foldd[oopen] {cmd} *:foldd* *:folddo* *:folddoopen*
|
||||
Execute {cmd} on all lines that are not in a closed fold.
|
||||
When [range] is given, only these lines are used.
|
||||
Each time {cmd} is executed the cursor is positioned on the
|
||||
@@ -539,7 +571,7 @@ When there is room after the text, it is filled with the character specified
|
||||
by 'fillchars'.
|
||||
|
||||
If the 'foldtext' expression starts with s: or |<SID>|, then it is replaced
|
||||
with the script ID (|local-function|). Examples: >
|
||||
with the script ID (|local-function|). Examples: >
|
||||
set foldtext=s:MyFoldText()
|
||||
set foldtext=<SID>SomeFoldText()
|
||||
<
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*ft_ada.txt* For Vim version 9.1. Last change: 2022 Mar 13
|
||||
*ft_ada.txt* For Vim version 9.1. Last change: 2024 Sep 29
|
||||
|
||||
|
||||
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
|
||||
@@ -48,14 +48,12 @@ ctermfg=White often shows well).
|
||||
There are several options you can select in this Ada mode. See |ft-ada-options|
|
||||
for a complete list.
|
||||
|
||||
To enable them, assign a value to the option. For example, to turn one on:
|
||||
>
|
||||
> let g:ada_standard_types = 1
|
||||
>
|
||||
To disable them use ":unlet". Example:
|
||||
>
|
||||
> unlet g:ada_standard_types
|
||||
|
||||
To enable them, assign a value to the option. For example, to turn one on: >
|
||||
let g:ada_standard_types = 1
|
||||
<
|
||||
To disable them use ":unlet". Example: >
|
||||
unlet g:ada_standard_types
|
||||
<
|
||||
You can just use ":" and type these into the command line to set these
|
||||
temporarily before loading an Ada file. You can make these option settings
|
||||
permanent by adding the "let" command(s), without a colon, to your "~/.vimrc"
|
||||
@@ -158,10 +156,9 @@ several versions available which differ in the licence terms used.
|
||||
|
||||
The GNAT compiler plug-in will perform a compile on pressing <F7> and then
|
||||
immediately shows the result. You can set the project file to be used by
|
||||
setting:
|
||||
>
|
||||
> call g:gnat.Set_Project_File ('my_project.gpr')
|
||||
|
||||
setting: >
|
||||
call g:gnat.Set_Project_File ('my_project.gpr')
|
||||
<
|
||||
Setting a project file will also create a Vim session (|views-sessions|) so -
|
||||
like with the GPS - opened files, window positions etc. will be remembered
|
||||
separately for all projects.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 9.1. Last change: 2024 Jul 17
|
||||
*gui.txt* For Vim version 9.1. Last change: 2024 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -474,6 +474,8 @@ When the "unnamed" string is included in the 'clipboard' option, the unnamed
|
||||
register is the same as the "* register. Thus you can yank to and paste the
|
||||
selection without prepending "* to commands.
|
||||
|
||||
See also |W23| and |W24|.
|
||||
|
||||
==============================================================================
|
||||
5. Menus *menus*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 9.1. Last change: 2024 Apr 22
|
||||
*gui_x11.txt* For Vim version 9.1. Last change: 2024 Nov 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -708,6 +708,33 @@ Examples: (assuming the default option values)
|
||||
Note that the text in the "+ register remains available when making a Visual
|
||||
selection, which makes other text available in the "* register. That allows
|
||||
overwriting selected text.
|
||||
|
||||
*W23*
|
||||
When you are yanking into the "* or "+ register and Vim cannot establish a
|
||||
connection to the X11 selection (or clipboard), it will use register 0 and
|
||||
output a warning:
|
||||
|
||||
Warning: Clipboard register not available, using register 0 ~
|
||||
|
||||
*W24*
|
||||
Vim comes in different flavors, from a tiny build, that just tries to be
|
||||
compatible to original Vi, to enhanced builds which include many improvements
|
||||
(like a GUI). However, on servers and embedded systems, Vim is typically
|
||||
compiled without clipboard support, since this feature requires X11 libraries
|
||||
to be present. Check the ":version" output for the flag |+clipboard| or
|
||||
-clipboard. The former means clipboard support is present while the latter
|
||||
means your Vim does not contain clipboard support.
|
||||
|
||||
In the case when you are trying to access the "* or "+ register and Vim has
|
||||
no clipboard support, you will see this warning:
|
||||
|
||||
Warning: Clipboard register not available. See :h W24~
|
||||
|
||||
If you have a vim with no clipboard support but would like to use the
|
||||
clipboard, try to install a more enhanced Vim package like vim-enhanced or
|
||||
vim-gtk3 (the gui packages usually also come with a terminal Vim that has
|
||||
clipboard support included).
|
||||
|
||||
*x11-cut-buffer*
|
||||
There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7. Vim only
|
||||
uses CUT_BUFFER0, which is the one that xterm uses by default.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 9.1. Last change: 2024 May 27
|
||||
*help.txt* For Vim version 9.1. Last change: 2024 Dec 06
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -180,6 +180,7 @@ Language support ~
|
||||
|hebrew.txt| Hebrew language support and editing
|
||||
|russian.txt| Russian language support and editing
|
||||
|hangulin.txt| Hangul (Korean) input mode
|
||||
|vietnamese.txt| Vietnamese language support and editing
|
||||
|
||||
GUI ~
|
||||
|gui.txt| Graphical User Interface (GUI)
|
||||
@@ -232,6 +233,7 @@ Standard plugins ~
|
||||
|pi_paren.txt| Highlight matching parens
|
||||
|pi_spec.txt| Filetype plugin to work with rpm spec files
|
||||
|pi_tar.txt| Tar file explorer
|
||||
|pi_tutor.txt| Interactive tutorial for Vim
|
||||
|pi_vimball.txt| Create a self-installing Vim script
|
||||
|pi_zip.txt| Zip archive explorer
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*helphelp.txt* For Vim version 9.1. Last change: 2024 Apr 10
|
||||
*helphelp.txt* For Vim version 9.1. Last change: 2024 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -246,6 +246,62 @@ command: >
|
||||
To rebuild the help tags in the runtime directory
|
||||
(requires write permission there): >
|
||||
:helptags $VIMRUNTIME/doc
|
||||
<
|
||||
*:HelpToc* *help-TOC* *help-toc-install*
|
||||
|
||||
If you want to access an interactive table of contents, from any position in
|
||||
the file, you can use the helptoc plugin. Load the plugin with: >
|
||||
|
||||
packadd helptoc
|
||||
|
||||
Then you can use the `:HelpToc` command to open a popup menu.
|
||||
The latter supports the following normal commands: >
|
||||
|
||||
key | effect
|
||||
----+---------------------------------------------------------
|
||||
j | select next entry
|
||||
k | select previous entry
|
||||
J | same as j, and jump to corresponding line in main buffer
|
||||
K | same as k, and jump to corresponding line in main buffer
|
||||
c | select nearest entry from cursor position in main buffer
|
||||
g | select first entry
|
||||
G | select last entry
|
||||
H | collapse one level
|
||||
L | expand one level
|
||||
p | print current entry on command-line
|
||||
|
||||
P | same as p but automatically, whenever selection changes
|
||||
| press multiple times to toggle feature on/off
|
||||
|
||||
q | quit menu
|
||||
z | redraw menu with current entry at center
|
||||
+ | increase width of popup menu
|
||||
- | decrease width of popup menu
|
||||
? | show/hide a help window
|
||||
/ | search for pattern
|
||||
|
||||
<C-D> | scroll down half a page
|
||||
<C-U> | scroll up half a page
|
||||
<PageUp> | scroll down a whole page
|
||||
<PageDown> | scroll up a whole page
|
||||
<Home> | select first entry
|
||||
<End> | select last entry
|
||||
|
||||
The plugin can also provide a table of contents in man pages, markdown files,
|
||||
and terminal buffers. In the latter, the entries will be the past executed
|
||||
shell commands. To find those, the following pattern is used: >
|
||||
|
||||
^\w\+@\w\+:\f\+\$\s
|
||||
|
||||
This is meant to match a default bash prompt. If it doesn't match your prompt,
|
||||
you can change the regex with the `shell_prompt` key from the `g:helptoc`
|
||||
dictionary variable: >
|
||||
|
||||
let g:helptoc = {'shell_prompt': 'regex matching your shell prompt'}
|
||||
|
||||
Tip: After inserting a pattern to look for with the `/` command, if you press
|
||||
<Esc> instead of <CR>, you can then get more context for each remaining entry
|
||||
by pressing `J` or `K`.
|
||||
|
||||
==============================================================================
|
||||
2. Translated help files *help-translated*
|
||||
@@ -377,11 +433,31 @@ To quote a block of ex-commands verbatim, place a greater than (>) character
|
||||
at the end of the line before the block and a less than (<) character as the
|
||||
first non-blank on a line following the block. Any line starting in column 1
|
||||
also implicitly stops the block of ex-commands before it. E.g. >
|
||||
function Example_Func()
|
||||
echo "Example"
|
||||
endfunction
|
||||
function Example_Func()
|
||||
echo "Example"
|
||||
endfunction
|
||||
<
|
||||
To enable syntax highlighting for a block of code, place a language name
|
||||
annotation (e.g. "vim") after a greater than (>) character. E.g. >vim
|
||||
function Example_Func()
|
||||
echo "Example"
|
||||
endfunction
|
||||
<
|
||||
*g:help_example_languages*
|
||||
By default, help files only support Vim script highlighting. If you need
|
||||
syntax highlighting for other languages, add to your |vimrc|: >
|
||||
:let g:help_example_languages = { "vim": "vim", "sh": "bash" }
|
||||
The key represents the annotation marker name, and the value is the 'syntax'
|
||||
name.
|
||||
|
||||
Note: If you do not include "vim" in "g:help_example_languages", its syntax
|
||||
highlighting will not be enabled. If you set "g:help_example_languages" to an
|
||||
empty value, syntax highlighting for embedded languages will be disabled.
|
||||
|
||||
Further note: Including arbitrary syntax languages into help files may not
|
||||
always work perfectly, if the included 'syntax' script does not account for
|
||||
such an import.
|
||||
*help-notation*
|
||||
The following are highlighted differently in a Vim help file:
|
||||
- a special key name expressed either in <> notation as in <PageDown>, or
|
||||
as a Ctrl character as in CTRL-X
|
||||
@@ -398,15 +474,15 @@ You can find the details in $VIMRUNTIME/syntax/help.vim
|
||||
GENDER NEUTRAL LANGUAGE
|
||||
|
||||
*gender-neutral* *inclusion*
|
||||
Vim is for everybody, no matter race, gender or anything. For new or updated
|
||||
help text, gender neutral language is recommended. Some of the help text is
|
||||
many years old and there is no need to change it. We do not make any
|
||||
Vim is for everybody, no matter race, gender or anything. For new or updated
|
||||
help text, gender neutral language is recommended. Some of the help text is
|
||||
many years old and there is no need to change it. We do not make any
|
||||
assumptions about the gender of the user, no matter how the text is phrased.
|
||||
The goal is that the reader understands how Vim works, the exact wording is
|
||||
secondary.
|
||||
|
||||
Many online technical style guides include sections about gender neutral
|
||||
language. Here are a few: >
|
||||
language. Here are a few: >
|
||||
|
||||
https://developers.google.com/style/pronouns
|
||||
https://techwhirl.com/gender-neutral-technical-writing/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 9.1. Last change: 2024 May 16
|
||||
*if_pyth.txt* For Vim version 9.1. Last change: 2024 Nov 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -201,6 +201,10 @@ vim.eval(str) *python-eval*
|
||||
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name': ~
|
||||
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}] ~
|
||||
|
||||
NOTE: In Vim9 script, local variables in def functions are not visible
|
||||
to python evaluations. To pass local variables to python evaluations,
|
||||
use the {locals} dict when calling |py3eval()| and friends.
|
||||
|
||||
vim.bindeval(str) *python-bindeval*
|
||||
Like |python-eval|, but returns special objects described in
|
||||
|python-bindeval-objects|. These python objects let you modify (|List|
|
||||
@@ -741,6 +745,10 @@ To facilitate bi-directional interface, you can use |pyeval()| and |py3eval()|
|
||||
functions to evaluate Python expressions and pass their values to Vim script.
|
||||
|pyxeval()| is also available.
|
||||
|
||||
You can inject local variables into the evaluation using the optional {locals}
|
||||
dict. This can be particularly useful in vim9script where vim.eval
|
||||
|python-eval| will not find locals in a def func.
|
||||
|
||||
The Python value "None" is converted to v:none.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 9.1. Last change: 2022 Jan 08
|
||||
*if_tcl.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
@@ -461,14 +461,14 @@ Input from stdin is currently not supported.
|
||||
Here are a few small (and maybe useful) Tcl scripts.
|
||||
|
||||
This script sorts the lines of the entire buffer (assume it contains a list
|
||||
of names or something similar):
|
||||
of names or something similar): >
|
||||
set buf $::vim::current(buffer)
|
||||
set lines [$buf get top bottom]
|
||||
set lines [lsort -dictionary $lines]
|
||||
$buf set top bottom $lines
|
||||
|
||||
This script reverses the lines in the buffer. Note the use of "::vim::lbase"
|
||||
and "$buf last" to work with any line number setting.
|
||||
and "$buf last" to work with any line number setting: >
|
||||
set buf $::vim::current(buffer)
|
||||
set t $::vim::lbase
|
||||
set b [$buf last]
|
||||
@@ -481,7 +481,7 @@ and "$buf last" to work with any line number setting.
|
||||
incr b -1
|
||||
}
|
||||
|
||||
This script adds a consecutive number to each line in the current range:
|
||||
This script adds a consecutive number to each line in the current range: >
|
||||
set buf $::vim::current(buffer)
|
||||
set i $::vim::range(start)
|
||||
set n 1
|
||||
@@ -491,17 +491,17 @@ This script adds a consecutive number to each line in the current range:
|
||||
incr i ; incr n
|
||||
}
|
||||
|
||||
The same can also be done quickly with two Ex commands, using ":tcldo":
|
||||
The same can also be done quickly with two Ex commands, using ":tcldo": >
|
||||
:tcl set n 1
|
||||
:[range]tcldo set line "$n\t$line" ; incr n
|
||||
|
||||
This procedure runs an Ex command on each buffer (idea stolen from Ron Aaron):
|
||||
This procedure runs an Ex command on each buffer (idea stolen from Ron Aaron): >
|
||||
proc eachbuf { cmd } {
|
||||
foreach b [::vim::buffer list] {
|
||||
$b command $cmd
|
||||
}
|
||||
}
|
||||
Use it like this:
|
||||
Use it like this: >
|
||||
:tcl eachbuf %s/foo/bar/g
|
||||
Be careful with Tcl's string and backslash substitution, tough. If in doubt,
|
||||
surround the Ex command with curly braces.
|
||||
@@ -509,7 +509,7 @@ surround the Ex command with curly braces.
|
||||
|
||||
If you want to add some Tcl procedures permanently to vim, just place them in
|
||||
a file (e.g. "~/.vimrc.tcl" on Unix machines), and add these lines to your
|
||||
startup file (usually "~/.vimrc" on Unix):
|
||||
startup file (usually "~/.vimrc" on Unix): >
|
||||
if has("tcl")
|
||||
tclfile ~/.vimrc.tcl
|
||||
endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 9.1. Last change: 2024 Feb 29
|
||||
*indent.txt* For Vim version 9.1. Last change: 2024 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -117,7 +117,7 @@ If you really want to reindent when you type 'o', 'O', 'e', '0', '<', '>',
|
||||
"<!>", respectively, for those keys.
|
||||
|
||||
For an emacs-style indent mode where lines aren't indented every time you
|
||||
press <Enter> but only if you press <Tab>, I suggest:
|
||||
press <Enter> but only if you press <Tab>, I suggest: >
|
||||
:set cinkeys=0{,0},:,0#,!<Tab>,!^F
|
||||
You might also want to switch off 'autoindent' then.
|
||||
|
||||
@@ -813,6 +813,38 @@ Detail:
|
||||
: GetCSSIndent() else
|
||||
<!-- --> : -1
|
||||
|
||||
IDRIS2 *ft-idris2-indent*
|
||||
|
||||
Idris 2 indentation can be configured with several variables that control the
|
||||
indentation level for different language constructs:
|
||||
|
||||
The "g:idris2_indent_if" variable controls the indentation of `then` and `else`
|
||||
blocks after `if` statements. Defaults to 3.
|
||||
|
||||
The "g:idris2_indent_case" variable controls the indentation of patterns in
|
||||
`case` expressions. Defaults to 5.
|
||||
|
||||
The "g:idris2_indent_let" variable controls the indentation after `let`
|
||||
bindings. Defaults to 4.
|
||||
|
||||
The "g:idris2_indent_rewrite" variable controls the indentation after `rewrite`
|
||||
expressions. Defaults to 8.
|
||||
|
||||
The "g:idris2_indent_where" variable controls the indentation of `where`
|
||||
blocks. Defaults to 6.
|
||||
|
||||
The "g:idris2_indent_do" variable controls the indentation in `do` blocks.
|
||||
Defaults to 3.
|
||||
|
||||
Example configuration: >
|
||||
|
||||
let g:idris2_indent_if = 2
|
||||
let g:idris2_indent_case = 4
|
||||
let g:idris2_indent_let = 4
|
||||
let g:idris2_indent_rewrite = 8
|
||||
let g:idris2_indent_where = 6
|
||||
let g:idris2_indent_do = 3
|
||||
<
|
||||
|
||||
MATLAB *ft-matlab-indent* *matlab-indent* *matlab-indenting*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 9.1. Last change: 2023 Jul 14
|
||||
*index.txt* For Vim version 9.1. Last change: 2025 Jan 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -1185,6 +1185,7 @@ tag command action ~
|
||||
|:abbreviate| :ab[breviate] enter abbreviation
|
||||
|:abclear| :abc[lear] remove all abbreviations
|
||||
|:aboveleft| :abo[veleft] make split window appear left or above
|
||||
|:abstract| :abstract declare a Vim9 abstract class
|
||||
|:all| :al[l] open a window for each file in the argument
|
||||
list
|
||||
|:amenu| :am[enu] enter new menu item for all modes
|
||||
@@ -1224,7 +1225,7 @@ tag command action ~
|
||||
|:breakdel| :breakd[el] delete a debugger breakpoint
|
||||
|:breaklist| :breakl[ist] list debugger breakpoints
|
||||
|:browse| :bro[wse] use file selection dialog
|
||||
|:bufdo| :bufdo execute command in each listed buffer
|
||||
|:bufdo| :bufd[o] execute command in each listed buffer
|
||||
|:buffers| :buffers list all files in the buffer list
|
||||
|:bunload| :bun[load] unload a specific buffer
|
||||
|:bwipeout| :bw[ipeout] really delete a buffer
|
||||
@@ -1240,7 +1241,7 @@ tag command action ~
|
||||
|:cafter| :caf[ter] go to error after current cursor
|
||||
|:call| :cal[l] call a function
|
||||
|:catch| :cat[ch] part of a :try command
|
||||
|:cbefore| :cbef[ore] go to error before current cursor
|
||||
|:cbefore| :cbe[fore] go to error before current cursor
|
||||
|:cbelow| :cbel[ow] go to error below current line
|
||||
|:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
|
||||
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|
||||
@@ -1300,7 +1301,7 @@ tag command action ~
|
||||
|:debuggreedy| :debugg[reedy] read debug mode commands from normal input
|
||||
|:def| :def define a Vim9 user function
|
||||
|:defcompile| :defc[ompile] compile Vim9 user functions in current script
|
||||
|:defer| :defer call function when current function is done
|
||||
|:defer| :defe[r] call function when current function is done
|
||||
|:delcommand| :delc[ommand] delete user-defined command
|
||||
|:delfunction| :delf[unction] delete a user function
|
||||
|:delmarks| :delm[arks] delete marks
|
||||
@@ -1310,7 +1311,7 @@ tag command action ~
|
||||
|:diffpatch| :diffp[atch] apply a patch and show differences
|
||||
|:diffput| :diffpu[t] remove differences in other buffer
|
||||
|:diffsplit| :diffs[plit] show differences with another file
|
||||
|:diffthis| :diffthis make current window a diff window
|
||||
|:diffthis| :difft[his] make current window a diff window
|
||||
|:digraphs| :dig[raphs] show or enter digraphs
|
||||
|:display| :di[splay] display registers
|
||||
|:disassemble| :disa[ssemble] disassemble Vim9 user function
|
||||
@@ -1338,12 +1339,15 @@ tag command action ~
|
||||
|:emenu| :em[enu] execute a menu by name
|
||||
|:endclass| :endclass end of a class specification
|
||||
|:enddef| :enddef end of a user function started with :def
|
||||
|:endenum| :endenum end of an enum specification
|
||||
|:endif| :en[dif] end previous :if
|
||||
|:endinterface| :endinterface end of an interface specification
|
||||
|:endfor| :endfo[r] end previous :for
|
||||
|:endfunction| :endf[unction] end of a user function started with :function
|
||||
|:endtry| :endt[ry] end previous :try
|
||||
|:endwhile| :endw[hile] end previous :while
|
||||
|:enew| :ene[w] edit a new, unnamed buffer
|
||||
|:enum| :enum start of an enum declaration
|
||||
|:eval| :ev[al] evaluate an expression and discard the result
|
||||
|:ex| :ex same as ":edit"
|
||||
|:execute| :exe[cute] execute result of expressions
|
||||
@@ -1397,6 +1401,7 @@ tag command action ~
|
||||
|:inoreabbrev| :inorea[bbrev] like ":noreabbrev" but for Insert mode
|
||||
|:inoremenu| :inoreme[nu] like ":noremenu" but for Insert mode
|
||||
|:intro| :int[ro] print the introductory message
|
||||
|:interface| :interface start of an interface declaration
|
||||
|:isearch| :is[earch] list one line where identifier matches
|
||||
|:isplit| :isp[lit] split window and jump to definition of
|
||||
identifier
|
||||
@@ -1421,7 +1426,7 @@ tag command action ~
|
||||
|:last| :la[st] go to the last file in the argument list
|
||||
|:language| :lan[guage] set the language (locale)
|
||||
|:later| :lat[er] go to newer change, redo
|
||||
|:lbefore| :lbef[ore] go to location before current cursor
|
||||
|:lbefore| :lbe[fore] go to location before current cursor
|
||||
|:lbelow| :lbel[ow] go to location below current line
|
||||
|:lbottom| :lbo[ttom] scroll to the bottom of the location window
|
||||
|:lbuffer| :lb[uffer] parse locations and jump to first location
|
||||
@@ -1461,7 +1466,7 @@ tag command action ~
|
||||
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|
||||
|:lockvar| :lockv[ar] lock variables
|
||||
|:lolder| :lol[der] go to older location list
|
||||
|:lopen| :lope[n] open location window
|
||||
|:lopen| :lop[en] open location window
|
||||
|:lprevious| :lp[revious] go to previous location
|
||||
|:lpfile| :lpf[ile] go to last location in previous file
|
||||
|:lrewind| :lr[ewind] go to the specified location, default first one
|
||||
@@ -1496,7 +1501,7 @@ tag command action ~
|
||||
|:mzfile| :mzf[ile] execute MzScheme script file
|
||||
|:nbclose| :nbc[lose] close the current Netbeans session
|
||||
|:nbkey| :nb[key] pass a key to Netbeans
|
||||
|:nbstart| :nbs[art] start a new Netbeans session
|
||||
|:nbstart| :nbs[tart] start a new Netbeans session
|
||||
|:next| :n[ext] go to next file in the argument list
|
||||
|:new| :new create a new empty window
|
||||
|:nmap| :nm[ap] like ":map" but for Normal mode
|
||||
@@ -1529,6 +1534,7 @@ tag command action ~
|
||||
|:ownsyntax| :ow[nsyntax] set new local syntax highlight for this window
|
||||
|:packadd| :pa[ckadd] add a plugin from 'packpath'
|
||||
|:packloadall| :packl[oadall] load all packages under 'packpath'
|
||||
|:pbuffer| :pb[uffer] edit buffer in the preview window
|
||||
|:pclose| :pc[lose] close preview window
|
||||
|:pedit| :ped[it] edit file in the preview window
|
||||
|:perl| :pe[rl] execute Perl command
|
||||
@@ -1681,7 +1687,7 @@ tag command action ~
|
||||
|:tNext| :tN[ext] jump to previous matching tag
|
||||
|:tabNext| :tabN[ext] go to previous tab page
|
||||
|:tabclose| :tabc[lose] close current tab page
|
||||
|:tabdo| :tabdo execute command in each tab page
|
||||
|:tabdo| :tabd[o] execute command in each tab page
|
||||
|:tabedit| :tabe[dit] edit a file in a new tab page
|
||||
|:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page
|
||||
|:tabfirst| :tabfir[st] go to first tab page
|
||||
@@ -1705,6 +1711,8 @@ tag command action ~
|
||||
|:terminal| :ter[minal] open a terminal window
|
||||
|:tfirst| :tf[irst] jump to first matching tag
|
||||
|:throw| :th[row] throw an exception
|
||||
|:this| :this prefix for an object member during
|
||||
initialization (e.g. on |new()|)
|
||||
|:tjump| :tj[ump] like ":tselect", but jump directly when there
|
||||
is only one match
|
||||
|:tlast| :tl[ast] jump to last matching tag
|
||||
@@ -1723,6 +1731,7 @@ tag command action ~
|
||||
|:tselect| :ts[elect] list matching tags and select one
|
||||
|:tunmap| :tunma[p] like ":unmap" but for Terminal-Job mode
|
||||
|:tunmenu| :tu[nmenu] remove menu tooltip
|
||||
|:type| :type create a type alias
|
||||
|:undo| :u[ndo] undo last change(s)
|
||||
|:undojoin| :undoj[oin] join next change with previous undo block
|
||||
|:undolist| :undol[ist] list leafs of the undo tree
|
||||
@@ -1756,7 +1765,7 @@ tag command action ~
|
||||
|:vsplit| :vs[plit] split current window vertically
|
||||
|:vunmap| :vu[nmap] like ":unmap" but for Visual+Select mode
|
||||
|:vunmenu| :vunme[nu] remove menu for Visual+Select mode
|
||||
|:windo| :windo execute command in each window
|
||||
|:windo| :wind[o] execute command in each window
|
||||
|:write| :w[rite] write to a file
|
||||
|:wNext| :wN[ext] write to a file and go to previous file in
|
||||
argument list
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Aug 25
|
||||
*insert.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -51,7 +51,7 @@ char action ~
|
||||
abbreviation.
|
||||
Note: If your <Esc> key is hard to hit on your keyboard, train
|
||||
yourself to use CTRL-[.
|
||||
If Esc doesn't work and you are using a Mac, try CTRL-Esc.
|
||||
If Esc doesn't work and you are using a Mac, try CTRL-<Esc>.
|
||||
Or disable Listening under Accessibility preferences.
|
||||
*i_CTRL-C*
|
||||
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
|
||||
@@ -1183,18 +1183,19 @@ items:
|
||||
user_data custom data which is associated with the item and
|
||||
available in |v:completed_item|; it can be any type;
|
||||
defaults to an empty string
|
||||
hl_group an additional highlight group whose attributes are
|
||||
abbr_hlgroup an additional highlight group whose attributes are
|
||||
combined with |hl-PmenuSel| and |hl-Pmenu| or
|
||||
|hl-PmenuMatchSel| and |hl-PmenuMatch| highlight
|
||||
attributes in the popup menu to apply cterm and gui
|
||||
properties (with higher priority) like strikethrough
|
||||
to the completion items
|
||||
to the completion items abbreviation
|
||||
kind_hlgroup an additional highlight group specifically for setting
|
||||
the highlight attributes of the completion kind. When
|
||||
this field is present, it will override the
|
||||
|hl-PmenuKind| highlight group, allowing for the
|
||||
customization of ctermfg and guifg properties for the
|
||||
completion kind
|
||||
match See "matches" in |complete_info()|.
|
||||
|
||||
All of these except "icase", "equal", "dup" and "empty" must be a string. If
|
||||
an item does not meet these requirements then an error message is given and
|
||||
@@ -2090,7 +2091,7 @@ the cursor is, or below the specified line. To insert text above the first
|
||||
line use the command ":0r {name}".
|
||||
|
||||
After the ":read" command, the cursor is left on the first non-blank in the
|
||||
first new line. Unless in Ex mode, then the cursor is left on the last new
|
||||
first new line. If in Ex mode, then the cursor is left on the last new
|
||||
line (sorry, this is Vi compatible).
|
||||
|
||||
If a file name is given with ":r", it becomes the alternate file. This can be
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 9.1. Last change: 2024 Apr 11
|
||||
*intro.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -825,7 +825,7 @@ The current mode is "-- INSERT --" or "-- REPLACE --", see |'showmode'|. The
|
||||
command characters are those that you typed but were not used yet.
|
||||
|
||||
If you have a slow terminal you can switch off the status messages to speed
|
||||
up editing:
|
||||
up editing: >
|
||||
:set nosc noru nosm
|
||||
|
||||
If there is an error, an error message will be shown for at least one second
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 9.1. Last change: 2024 Aug 31
|
||||
*map.txt* For Vim version 9.1. Last change: 2024 Oct 08
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -84,6 +84,8 @@ modes.
|
||||
where the map command applies. Disallow mapping of
|
||||
{rhs}, to avoid nested and recursive mappings. Often
|
||||
used to redefine a command.
|
||||
Note: Keys in {rhs} also won't trigger abbreviation,
|
||||
with the exception of |i_CTRL-]| and |c_CTRL-]|.
|
||||
Note: When <Plug> appears in the {rhs} this part is
|
||||
always applied even if remapping is disallowed.
|
||||
|
||||
@@ -1655,6 +1657,8 @@ completion can be enabled:
|
||||
-complete=runtime file and directory names in |'runtimepath'|
|
||||
-complete=scriptnames sourced script names
|
||||
-complete=shellcmd Shell command
|
||||
-complete=shellcmdline First is a shell command and subsequent ones
|
||||
are filenames. The same behavior as |:!cmd|
|
||||
-complete=sign |:sign| suboptions
|
||||
-complete=syntax syntax file names |'syntax'|
|
||||
-complete=syntime |:syntime| suboptions
|
||||
@@ -1832,7 +1836,7 @@ The valid escape sequences are
|
||||
nothing. Supported modifiers are |:aboveleft|, |:belowright|,
|
||||
|:botright|, |:browse|, |:confirm|, |:hide|, |:horizontal|,
|
||||
|:keepalt|, |:keepjumps|, |:keepmarks|, |:keeppatterns|,
|
||||
|:leftabove|, |:lockmarks|, |:noautocmd|, |:noswapfile|
|
||||
|:leftabove|, |:lockmarks|, |:noautocmd|, |:noswapfile|,
|
||||
|:rightbelow|, |:sandbox|, |:silent|, |:tab|, |:topleft|,
|
||||
|:unsilent|, |:verbose|, and |:vertical|.
|
||||
Note that |:filter| is not supported.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 9.1. Last change: 2024 Mar 13
|
||||
*message.txt* For Vim version 9.1. Last change: 2024 Dec 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -29,7 +29,7 @@ depends on the 'shortmess' option.
|
||||
Clear messages, keeping only the {count} most
|
||||
recent ones.
|
||||
|
||||
The number of remembered messages is fixed at 200.
|
||||
The number of remembered messages is determined by the 'messagesopt' option.
|
||||
|
||||
*g<*
|
||||
The "g<" command can be used to see the last page of previous command output.
|
||||
@@ -837,6 +837,7 @@ If you accidentally hit <Enter> or <Space> and you want to see the displayed
|
||||
text then use |g<|. This only works when 'more' is set.
|
||||
|
||||
To reduce the number of hit-enter prompts:
|
||||
- Set 'messagesopt'.
|
||||
- Set 'cmdheight' to 2 or higher.
|
||||
- Add flags to 'shortmess'.
|
||||
- Reset 'showcmd' and/or 'ruler'.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 9.1. Last change: 2024 Aug 28
|
||||
*motion.txt* For Vim version 9.1. Last change: 2024 Dec 17
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -68,10 +68,12 @@ 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.
|
||||
|
||||
*operator-resulting-pos*
|
||||
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"
|
||||
moves the cursor leftwards to the "e" where the yank started.
|
||||
The 'startofline' option applies only to the "d", "<<", "==" and ">>" linewise
|
||||
operations.
|
||||
|
||||
*linewise* *characterwise*
|
||||
The operator either affects whole lines, or the characters between the start
|
||||
@@ -120,6 +122,12 @@ This cannot be repeated: >
|
||||
endif<CR>
|
||||
Note that when using ":" any motion becomes characterwise exclusive.
|
||||
|
||||
*inclusive-motion-selection-exclusive*
|
||||
When 'selection' is "exclusive", |Visual| mode is active and an inclusive
|
||||
motion has been used, the cursor position will be adjusted by another
|
||||
character to the right, so that the Visual selection includes the expected
|
||||
text and can be acted upon.
|
||||
|
||||
*forced-motion*
|
||||
FORCING A MOTION TO BE LINEWISE, CHARACTERWISE OR BLOCKWISE
|
||||
|
||||
@@ -169,9 +177,9 @@ h or *h*
|
||||
CTRL-H or *CTRL-H* *<BS>*
|
||||
<BS> [count] characters to the left. |exclusive| motion.
|
||||
Note: If you prefer <BS> to delete a character, use
|
||||
the mapping:
|
||||
the mapping: >
|
||||
:map CTRL-V<BS> X
|
||||
(to enter "CTRL-V<BS>" type the CTRL-V key, followed
|
||||
< (to enter "CTRL-V<BS>" type the CTRL-V key, followed
|
||||
by the <BS> key)
|
||||
See |:fixdel| if the <BS> key does not do what you
|
||||
want.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2024 Sep 10
|
||||
*options.txt* For Vim version 9.1. Last change: 2024 Dec 28
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -396,13 +396,14 @@ between string and number-based options.
|
||||
options which are different from the default.
|
||||
|
||||
For buffer-local and window-local options:
|
||||
Command global value local value ~
|
||||
:set option=value set set
|
||||
:setlocal option=value - set
|
||||
:setglobal option=value set -
|
||||
:set option? - display
|
||||
:setlocal option? - display
|
||||
:setglobal option? display -
|
||||
Command global value local value condition ~
|
||||
:set option=value set set
|
||||
:setlocal option=value - set
|
||||
:setglobal option=value set -
|
||||
:set option? - display local value is set
|
||||
:set option? display - local value is not set
|
||||
:setlocal option? - display
|
||||
:setglobal option? display -
|
||||
|
||||
|
||||
Global options with a local value *global-local*
|
||||
@@ -438,10 +439,11 @@ Note: In the future more global options can be made |global-local|. Using
|
||||
":setlocal" on a global option might work differently then.
|
||||
|
||||
*option-value-function*
|
||||
Some options ('completefunc', 'imactivatefunc', 'imstatusfunc', 'omnifunc',
|
||||
'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc') are set to
|
||||
a function name or a function reference or a lambda function. When using a
|
||||
lambda it will be converted to the name, e.g. "<lambda>123". Examples:
|
||||
Some options ('completefunc', 'findfunc', 'imactivatefunc', 'imstatusfunc',
|
||||
'omnifunc', 'operatorfunc', 'quickfixtextfunc', 'tagfunc' and 'thesaurusfunc')
|
||||
are set to a function name or a function reference or a lambda function. When
|
||||
using a lambda it will be converted to the name, e.g. "<lambda>123".
|
||||
Examples:
|
||||
>
|
||||
set opfunc=MyOpFunc
|
||||
set opfunc=function('MyOpFunc')
|
||||
@@ -1067,8 +1069,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
done with ":syntax on".
|
||||
|
||||
*'backspace'* *'bs'*
|
||||
'backspace' 'bs' string (default "", set to "indent,eol,start"
|
||||
in |defaults.vim|)
|
||||
'backspace' 'bs' string (Vim default: "indent,eol,start",
|
||||
Vi default: "")
|
||||
global
|
||||
Influences the working of <BS>, <Del>, CTRL-W and CTRL-U in Insert
|
||||
mode. This is a list of items, separated by commas. Each item allows
|
||||
@@ -1150,12 +1152,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
useful for example in source trees where all the files are symbolic or
|
||||
hard links and any changes should stay in the local source tree, not
|
||||
be propagated back to the original source.
|
||||
*crontab*
|
||||
*crontab*
|
||||
One situation where "no" and "auto" will cause problems: A program
|
||||
that opens a file, invokes Vim to edit that file, and then tests if
|
||||
the open file was changed (through the file descriptor) will check the
|
||||
backup file instead of the newly created file. "crontab -e" is an
|
||||
example.
|
||||
example, as are several |file-watcher| daemons like inotify. In that
|
||||
case you probably want to switch this option.
|
||||
|
||||
When a copy is made, the original file is truncated and then filled
|
||||
with the new text. This means that protection bits, owner and
|
||||
@@ -1650,9 +1653,10 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
The default is CTRL-F when 'compatible' is off.
|
||||
Only non-printable keys are allowed.
|
||||
The key can be specified as a single character, but it is difficult to
|
||||
type. The preferred way is to use the <> notation. Examples: >
|
||||
:exe "set cedit=\<C-Y>"
|
||||
:exe "set cedit=\<Esc>"
|
||||
type. The preferred way is to use |key-notation| (e.g. <Up>, <C-F>) or
|
||||
a letter preceded with a caret (e.g. `^F` is CTRL-F). Examples: >
|
||||
:set cedit=^Y
|
||||
:set cedit=<Esc>
|
||||
< |Nvi| also has this option, but it only uses the first character.
|
||||
See |cmdwin|.
|
||||
NOTE: This option is set to the Vim default value when 'compatible'
|
||||
@@ -2100,6 +2104,16 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
*'completeitemalign'* *'cia'*
|
||||
'completeitemalign' 'cia' string (default: "abbr,kind,menu")
|
||||
global
|
||||
A comma-separated list of |complete-items| that controls the alignment
|
||||
and display order of items in the popup menu during Insert mode
|
||||
completion. The supported values are abbr, kind, and menu. These
|
||||
options allow to customize how the completion items are shown in the
|
||||
popup menu. Note: must always contain those three values in any
|
||||
order.
|
||||
|
||||
*'completeopt'* *'cot'*
|
||||
'completeopt' 'cot' string (default: "menu,preview")
|
||||
global or local to buffer |global-local|
|
||||
@@ -2141,9 +2155,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
a match from the menu. Only works in combination with
|
||||
"menu" or "menuone". No effect if "longest" is present.
|
||||
|
||||
noselect Do not select a match in the menu, force the user to
|
||||
select one from the menu. Only works in combination with
|
||||
"menu" or "menuone".
|
||||
noselect Same as "noinsert", except that no menu item is
|
||||
pre-selected. If both "noinsert" and "noselect" are
|
||||
present, "noselect" has precedence.
|
||||
|
||||
fuzzy Enable |fuzzy-matching| for completion candidates. This
|
||||
allows for more flexible and intuitive matching, where
|
||||
@@ -3390,7 +3404,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
*'fileformat'* *'ff'*
|
||||
'fileformat' 'ff' string (MS-Windows default: "dos",
|
||||
Unix, macOS default: "unix")
|
||||
Unix default: "unix")
|
||||
local to buffer
|
||||
This gives the <EOL> of the current buffer, which is used for
|
||||
reading/writing the buffer from/to a file:
|
||||
@@ -3413,7 +3427,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
*'fileformats'* *'ffs'*
|
||||
'fileformats' 'ffs' string (default:
|
||||
Vim+Vi MS-Windows: "dos,unix",
|
||||
Vim Unix, macOS: "unix,dos",
|
||||
Vim Unix: "unix,dos",
|
||||
Vi Cygwin: "unix,dos",
|
||||
Vi others: "")
|
||||
global
|
||||
@@ -3491,17 +3505,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
/* vim: set filetype=idl : */ ~
|
||||
|FileType| |filetypes|
|
||||
When a dot appears in the value then this separates two filetype
|
||||
names. Example:
|
||||
names, it should therefore not be used for a filetype. Example:
|
||||
/* vim: set filetype=c.doxygen : */ ~
|
||||
This will use the "c" filetype first, then the "doxygen" filetype.
|
||||
This works both for filetype plugins and for syntax files. More than
|
||||
one dot may appear.
|
||||
This option is not copied to another buffer, independent of the 's' or
|
||||
'S' flag in 'cpoptions'.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
Only alphanumeric characters, '-' and '_' can be used.
|
||||
|
||||
*'fillchars'* *'fcs'*
|
||||
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~")
|
||||
'fillchars' 'fcs' string (default "vert:|,fold:-,eob:~,lastline:@")
|
||||
global or local to window |global-local|
|
||||
Characters to fill the statuslines, vertical separators and special
|
||||
lines in the window.
|
||||
@@ -3539,6 +3553,56 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
eob EndOfBuffer |hl-EndOfBuffer|
|
||||
lastline NonText |hl-NonText|
|
||||
|
||||
*'findfunc'* *'ffu'* *E1514*
|
||||
'findfunc' 'ffu' string (default empty)
|
||||
global or local to buffer |global-local|
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
Function that is called to obtain the filename(s) for the |:find|
|
||||
command. When this option is empty, the internal |file-searching|
|
||||
mechanism is used.
|
||||
|
||||
The value can be the name of a function, a |lambda| or a |Funcref|.
|
||||
See |option-value-function| for more information.
|
||||
|
||||
The function is called with two arguments. The first argument is a
|
||||
|String| and is the |:find| command argument. The second argument is
|
||||
a |Boolean| and is set to |v:true| when the function is called to get
|
||||
a List of command-line completion matches for the |:find| command.
|
||||
The function should return a List of strings.
|
||||
|
||||
The function is called only once per |:find| command invocation.
|
||||
The function can process all the directories specified in 'path'.
|
||||
|
||||
If a match is found, the function should return a |List| containing
|
||||
one or more file names. If a match is not found, the function
|
||||
should return an empty List.
|
||||
|
||||
If any errors are encountered during the function invocation, an
|
||||
empty List is used as the return value.
|
||||
|
||||
It is not allowed to change text or jump to another window while
|
||||
executing the 'findfunc' |textlock|.
|
||||
|
||||
This option cannot be set from a |modeline| or in the |sandbox|, for
|
||||
security reasons.
|
||||
|
||||
Examples:
|
||||
>
|
||||
" Use glob()
|
||||
func FindFuncGlob(cmdarg, cmdcomplete)
|
||||
let pat = a:cmdcomplete ? $'{a:cmdarg}*' : a:cmdarg
|
||||
return glob(pat, v:false, v:true)
|
||||
endfunc
|
||||
set findfunc=FindFuncGlob
|
||||
|
||||
" Use the 'git ls-files' output
|
||||
func FindGitFiles(cmdarg, cmdcomplete)
|
||||
let fnames = systemlist('git ls-files')
|
||||
return fnames->filter('v:val =~? a:cmdarg')
|
||||
endfunc
|
||||
set findfunc=FindGitFiles
|
||||
<
|
||||
*'fixendofline'* *'fixeol'* *'nofixendofline'* *'nofixeol'*
|
||||
'fixendofline' 'fixeol' boolean (default on)
|
||||
local to buffer
|
||||
@@ -4371,12 +4435,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
See |highlight-default| for the default highlight groups.
|
||||
|
||||
*'history'* *'hi'*
|
||||
'history' 'hi' number (Vim default: 50, Vi default: 0,
|
||||
set to 200 in |defaults.vim|)
|
||||
'history' 'hi' number (Vim default: 200, Vi default: 0)
|
||||
global
|
||||
A history of ":" commands, and a history of previous search patterns
|
||||
is remembered. This option decides how many entries may be stored in
|
||||
each of these histories (see |cmdline-editing|).
|
||||
each of these histories (see |cmdline-editing| and 'messagesopt' for
|
||||
the number of messages to remember).
|
||||
The maximum value is 10000.
|
||||
NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
@@ -4904,7 +4968,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
|
||||
*'isprint'* *'isp'*
|
||||
'isprint' 'isp' string (default for Win32 and macOS:
|
||||
'isprint' 'isp' string (default for Win32 and VMS:
|
||||
"@,~-255"; otherwise: "@,161-255")
|
||||
global
|
||||
The characters given by this option are displayed directly on the
|
||||
@@ -4980,7 +5044,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Setting this option to a valid keymap name has the side effect of
|
||||
setting 'iminsert' to one, so that the keymap becomes effective.
|
||||
'imsearch' is also set to one, unless it was -1
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
Only alphanumeric characters, '.', '-' and '_' can be used.
|
||||
|
||||
*'keymodel'* *'km'*
|
||||
'keymodel' 'km' string (default "")
|
||||
@@ -5008,11 +5072,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
a pattern that is matched against the 'term' option, a colon and the
|
||||
protocol name to be used. To illustrate this, the default value would
|
||||
be set with: >
|
||||
set keyprotocol=kitty:kitty,foot:kitty,wezterm:kitty,xterm:mok2
|
||||
set keyprotocol=kitty:kitty,foot:kitty,ghostty:kitty,wezterm:kitty
|
||||
set keyprotocol+=xterm:mok2
|
||||
|
||||
< This means that when 'term' contains "kitty, "foot" or "wezterm"
|
||||
somewhere then the "kitty" protocol is used. When 'term' contains
|
||||
"xterm" somewhere, then the "mok2" protocol is used.
|
||||
< This means that when 'term' contains "kitty, "foot", "ghostty" or
|
||||
"wezterm" somewhere, then the "kitty" protocol is used. When 'term'
|
||||
contains "xterm" somewhere, then the "mok2" protocol is used.
|
||||
|
||||
The first match is used, thus if you want to have "kitty" use the
|
||||
kitty protocol, but "badkitty" not, then you should match "badkitty"
|
||||
@@ -5570,6 +5635,29 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
generated from a list of items, e.g., the Buffers menu. Changing this
|
||||
option has no direct effect, the menu must be refreshed first.
|
||||
|
||||
*'messagesopt'* *'mopt'*
|
||||
'messagesopt' 'mopt' string (default "hit-enter,history:500")
|
||||
global
|
||||
|
||||
Option settings for outputting messages. It can consist of the
|
||||
following items. Items must be separated by a comma.
|
||||
|
||||
hit-enter Use a |hit-enter| prompt when the message is longer than
|
||||
'cmdheight' size.
|
||||
|
||||
wait:{n} Instead of using a |hit-enter| prompt, simply wait for
|
||||
{n} milliseconds so that the user has a chance to read
|
||||
the message. The maximum value of {n} is 10000. Use
|
||||
0 to disable the wait (but then the user may miss an
|
||||
important message).
|
||||
This item is ignored when "hit-enter" is present, but
|
||||
required when "hit-enter" is not present.
|
||||
|
||||
history:{n} Determines how many entries are remembered in the
|
||||
|:messages| history. The maximum value is 10000.
|
||||
Setting it to zero clears the message history.
|
||||
This item must always be present.
|
||||
|
||||
*'mkspellmem'* *'msm'*
|
||||
'mkspellmem' 'msm' string (default "460000,2000,500")
|
||||
global
|
||||
@@ -5853,6 +5941,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
time in msec between two mouse clicks for the second click to be
|
||||
recognized as a multi click.
|
||||
|
||||
|
||||
*'mzquantum'* *'mzq'*
|
||||
'mzquantum' 'mzq' number (default 100)
|
||||
global
|
||||
@@ -6729,9 +6818,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
$VIMRUNTIME,
|
||||
$VIM/vimfiles/after,
|
||||
$HOME/vimfiles/after"
|
||||
macOS: "$VIM:vimfiles,
|
||||
$VIMRUNTIME,
|
||||
$VIM:vimfiles:after"
|
||||
Haiku: "$BE_USER_SETTINGS/vim,
|
||||
$VIM/vimfiles,
|
||||
$VIMRUNTIME,
|
||||
@@ -6933,6 +7019,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
selection.
|
||||
When "old" is used and 'virtualedit' allows the cursor to move past
|
||||
the end of line the line break still isn't included.
|
||||
When "exclusive" is used, cursor position in visual mode will be
|
||||
adjusted for inclusive motions |inclusive-motion-selection-exclusive|.
|
||||
Note that when "exclusive" is used and selecting from the end
|
||||
backwards, you cannot include the last character of a line, when
|
||||
starting in Normal mode and 'virtualedit' empty.
|
||||
@@ -7777,7 +7865,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
non-blank of the line. When off the cursor is kept in the same column
|
||||
(if possible). This applies to the commands:
|
||||
- CTRL-D, CTRL-U, CTRL-B, CTRL-F, "G", "H", "M", "L", "gg"
|
||||
- "d", "<<" and ">>" with a linewise operator
|
||||
- "d", "<<", "==" and ">>" with a linewise operator
|
||||
(|operator-resulting-pos|)
|
||||
- "%" with a count
|
||||
- buffer changing commands (CTRL-^, :bnext, :bNext, etc.)
|
||||
- Ex commands that only has a line number, e.g., ":25" or ":+".
|
||||
@@ -7799,6 +7888,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
All fields except the {item} are optional. A single percent sign can
|
||||
be given as "%%".
|
||||
|
||||
*stl-%!*
|
||||
When the option starts with "%!" then it is used as an expression,
|
||||
evaluated and the result is used as the option value. Example: >
|
||||
:set statusline=%!MyStatusLine()
|
||||
@@ -7956,7 +8046,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|
||||
Examples:
|
||||
Emulate standard status line with 'ruler' set >
|
||||
:set statusline=%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
|
||||
:set statusline=%<%f\ %h%w%m%r%=%-14.(%l,%c%V%)\ %P
|
||||
< Similar, but add ASCII value of char under the cursor (like "ga") >
|
||||
:set statusline=%<%f%h%m%r%=%b\ 0x%B\ \ %l,%c%V\ %P
|
||||
< Display byte count and byte value, modified flag in red. >
|
||||
@@ -8100,7 +8190,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Syntax autocommand event is triggered with the value as argument.
|
||||
This option is not copied to another buffer, independent of the 's' or
|
||||
'S' flag in 'cpoptions'.
|
||||
Only normal file name characters can be used, "/\*?[|<>" are illegal.
|
||||
Only alphanumeric characters, '.', '-' and '_' can be used.
|
||||
|
||||
*'tabclose'* *'tcl'*
|
||||
'tabclose' 'tcl' string (default "")
|
||||
@@ -8420,8 +8510,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
local to window
|
||||
The key that starts a CTRL-W command in a terminal window. Other keys
|
||||
are sent to the job running in the window.
|
||||
The <> notation can be used, e.g.: >
|
||||
:set termwinkey=<C-L>
|
||||
The key can be specified as a single character, a |key-notation| (e.g.
|
||||
<Up>, <C-F>) or a letter preceded with a caret (e.g. `^F` is CTRL-F): >
|
||||
:set twk=X
|
||||
:set twk=^I
|
||||
:set twk=<C-L>
|
||||
< The string must be one key stroke but can be multiple bytes.
|
||||
When not set CTRL-W is used, so that CTRL-W : gets you to the command
|
||||
line. If 'termwinkey' is set to CTRL-L then CTRL-L : gets you to the
|
||||
@@ -8688,7 +8781,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
be restored if possible, see |X11|.
|
||||
|
||||
When this option contains printf-style '%' items, they will be
|
||||
expanded according to the rules used for 'statusline'.
|
||||
expanded according to the rules used for 'statusline'. If it contains
|
||||
an invalid '%' format, the value is used as-is and no error or warning
|
||||
will be given when the value is set.
|
||||
This option cannot be set in a modeline when 'modelineexpr' is off.
|
||||
|
||||
Example: >
|
||||
@@ -9038,7 +9133,6 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
for Win32: "$HOME/vimfiles/view",
|
||||
for Unix: "$HOME/.vim/view" or
|
||||
"$XDG_CONFIG_HOME/vim/view"
|
||||
for macOS: "$VIM/vimfiles/view",
|
||||
for VMS: "sys$login:vimfiles/view")
|
||||
global
|
||||
{not available when compiled without the |+mksession|
|
||||
@@ -9318,7 +9412,12 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
Some keys will not work, such as CTRL-C, <CR> and Enter.
|
||||
<Esc> can be used, but hitting it twice in a row will still exit
|
||||
command-line as a failsafe measure.
|
||||
Although 'wc' is a number option, you can set it to a special key: >
|
||||
Although 'wc' is a number option, it can be specified as a number, a
|
||||
single character, a |key-notation| (e.g. <Up>, <C-F>) or a letter
|
||||
preceded with a caret (e.g. `^F` is CTRL-F): >
|
||||
:set wc=27
|
||||
:set wc=X
|
||||
:set wc=^I
|
||||
:set wc=<Tab>
|
||||
< NOTE: This option is set to the Vi default value when 'compatible' is
|
||||
set and to the Vim default value when 'compatible' is reset.
|
||||
@@ -9359,7 +9458,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
happens when there are special characters.
|
||||
|
||||
*'wildmenu'* *'wmnu'* *'nowildmenu'* *'nowmnu'*
|
||||
'wildmenu' 'wmnu' boolean (default off, set in |defaults.vim|)
|
||||
'wildmenu' 'wmnu' boolean (default on)
|
||||
global
|
||||
When 'wildmenu' is on, command-line completion operates in an enhanced
|
||||
mode. On pressing 'wildchar' (usually <Tab>) to invoke completion,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_dos.txt* For Vim version 9.1. Last change: 2024 Apr 25
|
||||
*os_dos.txt* For Vim version 9.1. Last change: 2024 Dec 25
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -195,8 +195,8 @@ The defaults for the various highlight modes are:
|
||||
t_so 31 standout mode: White (15) text on DarkBlue (16)
|
||||
t_se 0 standout mode end (revert to default)
|
||||
|
||||
t_czh 225 italic mode: DarkBlue text (1) on Yellow (224)
|
||||
t_czr 0 italic mode end (revert to default)
|
||||
t_ZH 225 italic mode: DarkBlue text (1) on Yellow (224)
|
||||
t_ZR 0 italic mode end (revert to default)
|
||||
|
||||
t_us 67 underline mode: DarkCyan text (3) on DarkRed (64)
|
||||
t_ue 0 underline mode end (revert to default)
|
||||
@@ -292,9 +292,9 @@ should be:
|
||||
'shellquote' "
|
||||
'shellxquote' "
|
||||
|
||||
For Dos 16 bit this starts the shell as:
|
||||
For Dos 16 bit this starts the shell as: >
|
||||
<shell> -c "command name" >file
|
||||
For Win32 as:
|
||||
For Win32 as: >
|
||||
<shell> -c "command name >file"
|
||||
For DOS 32 bit, DJGPP does this internally somehow.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_mac.txt* For Vim version 9.1. Last change: 2019 Apr 21
|
||||
*os_mac.txt* For Vim version 9.1. Last change: 2024 Nov 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -118,9 +118,13 @@ Shift-Control-2.
|
||||
|
||||
When reporting any Mac specific bug or feature change, please use the vim-mac
|
||||
maillist |vim-mac|. However, you need to be subscribed. An alternative is to
|
||||
send a message to the current MacVim maintainers:
|
||||
report issues either directly at the Vim github repository:
|
||||
|
||||
mac@vim.org
|
||||
https://github.com/vim/vim/issues
|
||||
|
||||
or for MacVim specific issues, you may report those over here:
|
||||
|
||||
https://github.com/macvim-dev/macvim/issues
|
||||
|
||||
==============================================================================
|
||||
7. Compiling Vim *mac-compile*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pattern.txt* For Vim version 9.1. Last change: 2024 Jun 18
|
||||
*pattern.txt* For Vim version 9.1. Last change: 2024 Dec 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -164,7 +164,7 @@ or auto suspended with nohlsearch plugin. See |nohlsearch-install|.
|
||||
|
||||
|
||||
When 'shortmess' does not include the "S" flag, Vim will automatically show an
|
||||
index, on which the cursor is. This can look like this: >
|
||||
index, on which the cursor is. This can look like this: >
|
||||
|
||||
[1/5] Cursor is on first of 5 matches.
|
||||
[1/>99] Cursor is on first of more than 99 matches.
|
||||
@@ -757,7 +757,7 @@ overview.
|
||||
\([a-z]\+\)\zs,\1 ",abc" in "abc,abc"
|
||||
|
||||
\@123<=
|
||||
Like "\@<=" but only look back 123 bytes. This avoids trying lots
|
||||
Like "\@<=" but only look back 123 bytes. This avoids trying lots
|
||||
of matches that are known to fail and make executing the pattern very
|
||||
slow. Example, check if there is a "<" just before "span":
|
||||
/<\@1<=span
|
||||
@@ -783,7 +783,7 @@ overview.
|
||||
\(\/\/.*\)\@<!in "in" which is not after "//"
|
||||
|
||||
\@123<!
|
||||
Like "\@<!" but only look back 123 bytes. This avoids trying lots of
|
||||
Like "\@<!" but only look back 123 bytes. This avoids trying lots of
|
||||
matches that are known to fail and make executing the pattern very
|
||||
slow.
|
||||
|
||||
@@ -907,7 +907,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
inside the Visual area put it at the start and just before the end of
|
||||
the pattern, e.g.: >
|
||||
/\%Vfoo.*ba\%Vr
|
||||
< This also works if only "foo bar" was Visually selected. This: >
|
||||
< This also works if only "foo bar" was Visually selected. This: >
|
||||
/\%Vfoo.*bar\%V
|
||||
< would match "foo bar" if the Visual selection continues after the "r".
|
||||
Only works for the current buffer.
|
||||
@@ -1014,7 +1014,7 @@ $ At end of pattern or in front of "\|", "\)" or "\n" ('magic' on):
|
||||
< 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
|
||||
< Column 17 is not included, because this is a |/zero-width| match. To
|
||||
include the column use: >
|
||||
/^.*\%17v.
|
||||
< This command does the same thing, but also matches when there is no
|
||||
@@ -1138,11 +1138,11 @@ x A single character, with no special meaning, matches itself
|
||||
in the collection: "[^xyz]" matches anything but 'x', 'y' and 'z'.
|
||||
- If two characters in the sequence are separated by '-', this is
|
||||
shorthand for the full list of ASCII characters between them. E.g.,
|
||||
"[0-9]" matches any decimal digit. If the starting character exceeds
|
||||
the ending character, e.g. [c-a], E944 occurs. Non-ASCII characters
|
||||
"[0-9]" matches any decimal digit. If the starting character exceeds
|
||||
the ending character, e.g. [c-a], E944 occurs. Non-ASCII characters
|
||||
can be used, but the character values must not be more than 256 apart
|
||||
in the old regexp engine. For example, searching by [\u3000-\u4000]
|
||||
after setting re=1 emits a E945 error. Prepending \%#=2 will fix it.
|
||||
in the old regexp engine. For example, searching by [\u3000-\u4000]
|
||||
after setting re=1 emits a E945 error. Prepending \%#=2 will fix it.
|
||||
- A character class expression is evaluated to the set of characters
|
||||
belonging to that character class. The following character classes
|
||||
are supported:
|
||||
@@ -1208,7 +1208,7 @@ x A single character, with no special meaning, matches itself
|
||||
any character that's not in "^]-\bdertnoUux". "[\xyz]" matches '\',
|
||||
'x', 'y' and 'z'. It's better to use "\\" though, future expansions
|
||||
may use other characters after '\'.
|
||||
- Omitting the trailing ] is not considered an error. "[]" works like
|
||||
- Omitting the trailing ] is not considered an error. "[]" works like
|
||||
"[]]", it matches the ']' character.
|
||||
- The following translations are accepted when the 'l' flag is not
|
||||
included in 'cpoptions':
|
||||
@@ -1444,14 +1444,14 @@ Finally, these constructs are unique to Perl:
|
||||
display you may get unexpected results. That is because Vim
|
||||
looks for a match in the line where redrawing starts.
|
||||
|
||||
Also see |matcharg()| and |getmatches()|. The former returns
|
||||
Also see |matcharg()| and |getmatches()|. The former returns
|
||||
the highlight group and pattern of a previous |:match|
|
||||
command. The latter returns a list with highlight groups and
|
||||
patterns defined by both |matchadd()| and |:match|.
|
||||
|
||||
Highlighting matches using |:match| are limited to three
|
||||
matches (aside from |:match|, |:2match| and |:3match| are
|
||||
available). |matchadd()| does not have this limitation and in
|
||||
available). |matchadd()| does not have this limitation and in
|
||||
addition makes it possible to prioritize matches.
|
||||
|
||||
Another example, which highlights all characters in virtual
|
||||
@@ -1480,7 +1480,7 @@ Finally, these constructs are unique to Perl:
|
||||
with the lowest number has priority if several match at the
|
||||
same position. It uses the match id 3.
|
||||
The ":3match" command is used by (Vim < 9.0.2054) |matchparen|
|
||||
plugin. You are suggested to use ":match" for manual matching
|
||||
plugin. You are suggested to use ":match" for manual matching
|
||||
and ":2match" for another plugin or even better make use of
|
||||
the more flexible |matchadd()| (and similar) functions instead.
|
||||
|
||||
@@ -1489,10 +1489,10 @@ Finally, these constructs are unique to Perl:
|
||||
|
||||
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
|
||||
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
|
||||
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
|
||||
@@ -1504,6 +1504,7 @@ criteria:
|
||||
- Matches at a camel case character (e.g. Case in CamelCase)
|
||||
- Matches after a path separator or a hyphen.
|
||||
- The number of unmatched characters in a string.
|
||||
- A full/exact match is preferred.
|
||||
The matching string with the highest score is returned first.
|
||||
|
||||
For example, when you search for the "get pat" string using fuzzy matching, it
|
||||
@@ -1511,8 +1512,8 @@ 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,
|
||||
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.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Sep 08
|
||||
*pi_getscript.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
>
|
||||
GETSCRIPT REFERENCE MANUAL by Charles E. Campbell
|
||||
<
|
||||
Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
Original Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
(remove NOSPAM from the email address)
|
||||
*GetLatestVimScripts-copyright*
|
||||
Copyright: (c) 2004-2012 by Charles E. Campbell *glvs-copyright*
|
||||
@@ -281,14 +281,14 @@ With :AutoInstall: enabled, as it is by default, files which end with
|
||||
|
||||
---.tar.bz2 : decompressed & untarred in .vim/ directory
|
||||
---.vba.bz2 : decompressed in .vim/ directory, then vimball handles it
|
||||
---.vmb.bz2 : decompressed in .vim/ directory, then vimball handles it
|
||||
---.vmb.bz2 : idem
|
||||
---.vim.bz2 : decompressed & moved into .vim/plugin directory
|
||||
---.tar.gz : decompressed & untarred in .vim/ directory
|
||||
---.vba.gz : decompressed in .vim/ directory, then vimball handles it
|
||||
---.vmb.gz : decompressed in .vim/ directory, then vimball handles it
|
||||
---.vmb.gz : idem
|
||||
---.vim.gz : decompressed & moved into .vim/plugin directory
|
||||
---.vba : moved to .vim/ directory, then vimball handles it
|
||||
---.vmb : moved to .vim/ directory, then vimball handles it
|
||||
---.vmb : idem
|
||||
---.vim : moved to .vim/plugin directory
|
||||
---.zip : unzipped in .vim/ directory
|
||||
|
||||
@@ -357,6 +357,35 @@ after/syntax/c.vim contained in it to overwrite a user's c.vim.
|
||||
Override this if your system needs
|
||||
... ='http://vim.sourceforge.net/scripts/download_script.php?src_id='
|
||||
>
|
||||
g:GetLatestVimScripts_bunzip2
|
||||
< default= bunzip2
|
||||
This variable holds the name of the command to decompress .bz2
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_gunzip
|
||||
< default= gunzip
|
||||
This variable holds the name of the command to decompress .gz
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_unxz
|
||||
< default= unxz
|
||||
This variable holds the name of the command to decompress .xz
|
||||
files
|
||||
>
|
||||
g:GetLatestVimScripts_unzip
|
||||
< default= unzip
|
||||
This variable holds the name of the command to decompress .zip
|
||||
files
|
||||
|
||||
Note: The variables associated with decompression commands help workaround
|
||||
crossplatform issues. For example, on Windows is possible to delegate this
|
||||
calls into `wsl` by doing: >
|
||||
|
||||
let g:GetLatestVimScripts_bunzip2= "wsl -e bunzip2"
|
||||
let g:GetLatestVimScripts_gunzip= "wsl -e gunzip"
|
||||
let g:GetLatestVimScripts_unxz= "wsl -e unxz"
|
||||
let g:GetLatestVimScripts_unzip= "wsl -e unzip"
|
||||
<
|
||||
==============================================================================
|
||||
8. GetLatestVimScripts Algorithm *glvs-algorithm* *glvs-alg*
|
||||
|
||||
@@ -393,6 +422,11 @@ The AutoInstall process will:
|
||||
==============================================================================
|
||||
9. GetLatestVimScripts History *getscript-history* *glvs-hist* {{{1
|
||||
|
||||
v37 Sep 23, 2024 : * Support for the new vimball's .vmb extension (old .vba
|
||||
extension conflicted with visual basic).
|
||||
* Support for |glvs-autoinstall| in ftplugins and packages.
|
||||
* Allow platform driven customization of decompressing
|
||||
commands.
|
||||
v36 Apr 22, 2013 : * (glts) suggested use of plugin/**/*.vim instead of
|
||||
plugin/*.vim in globpath() call.
|
||||
* (Andy Wokula) got warning message when setting
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
*pi_netrw.txt* For Vim version 9.1. Last change: 2024 Jul 13
|
||||
*pi_netrw.txt* For Vim version 9.1. Last change: 2024 Nov 23
|
||||
|
||||
------------------------------------------------
|
||||
NETRW REFERENCE MANUAL by Charles E. Campbell
|
||||
------------------------------------------------
|
||||
Author: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
|
||||
(remove NOSPAM from Campbell's email first)
|
||||
Original Author: Charles E. Campbell
|
||||
|
||||
Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
The VIM LICENSE applies to the files in this package, including
|
||||
netrw.vim, pi_netrw.txt, netrwFileHandlers.vim, netrwSettings.vim, and
|
||||
netrw.vim, pi_netrw.txt, netrwSettings.vim, and
|
||||
syntax/netrw.vim. Like anything else that's free, netrw.vim and its
|
||||
associated files are provided *as is* and comes with no warranty of
|
||||
any kind, either expressed or implied. No guarantees of
|
||||
@@ -54,9 +53,10 @@ Copyright: Copyright (C) 2017 Charles E Campbell *netrw-copyright*
|
||||
Browsing With A Horizontally Split Window...........|netrw-o|
|
||||
Browsing With A New Tab.............................|netrw-t|
|
||||
Browsing With A Vertically Split Window.............|netrw-v|
|
||||
Change File Permission..............................|netrw-gp|
|
||||
Change Listing Style.(thin wide long tree)..........|netrw-i|
|
||||
Change Listing Style (thin wide long tree)..........|netrw-i|
|
||||
Changing To A Bookmarked Directory..................|netrw-gb|
|
||||
Quick hide/unhide of dot-files......................|netrw-gh|
|
||||
Changing local-only File Permission.................|netrw-gp|
|
||||
Changing To A Predecessor Directory.................|netrw-u|
|
||||
Changing To A Successor Directory...................|netrw-U|
|
||||
Customizing Browsing With A Special Handler.........|netrw-x|
|
||||
@@ -1469,98 +1469,106 @@ With either form of the command, netrw will first ask for confirmation
|
||||
that the removal is in fact what you want to do. If netrw doesn't have
|
||||
permission to remove a file, it will issue an error message.
|
||||
|
||||
*netrw-gx*
|
||||
CUSTOMIZING BROWSING WITH A SPECIAL HANDLER *netrw-x* *netrw-handler* {{{2
|
||||
(also see |netrw_filehandler|)
|
||||
|
||||
Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
|
||||
best seen with a special handler (ie. a tool provided with your computer's
|
||||
operating system). Netrw allows one to invoke such special handlers by: >
|
||||
operating system). Netrw allows one to invoke such special handlers by:
|
||||
|
||||
* when Exploring, hit the "x" key
|
||||
* when editing, hit gx with the cursor atop the special filename
|
||||
< (latter not available if the |g:netrw_nogx| variable exists)
|
||||
* hitting gx with the cursor atop the file path or alternatively x
|
||||
in a netrw buffer; the former can be disabled by defining the
|
||||
|g:netrw_nogx| variable
|
||||
* when in command line, typing :Open <path>, see |:Open| below.
|
||||
|
||||
Netrw determines which special handler by the following method:
|
||||
|
||||
* if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
|
||||
view files. Examples of useful settings (place into your <.vimrc>): >
|
||||
|
||||
:let g:netrw_browsex_viewer= "kfmclient exec"
|
||||
< or >
|
||||
:let g:netrw_browsex_viewer= "xdg-open"
|
||||
<
|
||||
If g:netrw_browsex_viewer == '-', then netrwFileHandlers#Invoke() will be
|
||||
used instead (see |netrw_filehandler|).
|
||||
|
||||
If the viewer you wish to use does not support handling of a remote URL
|
||||
directory, set |g:netrw_browsex_support_remote| to 0.
|
||||
* for Windows 32 or 64, the URL and FileProtocolHandler dlls are used.
|
||||
* for Gnome (with gnome-open): gnome-open is used.
|
||||
* for KDE (with kfmclient) : kfmclient is used
|
||||
* for Mac OS X : open is used.
|
||||
* otherwise the netrwFileHandler plugin is used.
|
||||
|
||||
The file's suffix is used by these various approaches to determine an
|
||||
appropriate application to use to "handle" these files. Such things as
|
||||
OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
|
||||
*.eps) can be handled.
|
||||
|
||||
The gx mapping extends to all buffers; apply "gx" while atop a word and netrw
|
||||
will apply a special handler to it (like "x" works when in a netrw buffer).
|
||||
One may also use visual mode (see |visual-start|) to select the text that the
|
||||
special handler will use. Normally gx uses expand("<cfile>") to pick up the
|
||||
text under the cursor; one may change what |expand()| uses via the
|
||||
special handler will use. Normally gx checks for a close-by URL or file name
|
||||
to pick up the text under the cursor; one may change what |expand()| uses via the
|
||||
|g:netrw_gx| variable (options include "<cword>", "<cWORD>"). Note that
|
||||
expand("<cfile>") depends on the |'isfname'| setting. Alternatively, one may
|
||||
select the text to be used by gx by making a visual selection (see
|
||||
|visual-block|) and then pressing gx.
|
||||
|
||||
The selection function can be adapted for each filetype by adding a function
|
||||
`Netrw_get_URL_<filetype>`, where <filetype> is given by the 'filetype'.
|
||||
The function should return the URL or file name to be used by gx, and will
|
||||
fall back to the default behavior if it returns an empty string.
|
||||
For example, special handlers for links Markdown and HTML are
|
||||
|
||||
" make gx work on concealed links regardless of exact cursor position: >
|
||||
|
||||
function Netrw_get_URL_markdown()
|
||||
" markdown URL such as [link text](http://ya.ru 'yandex search')
|
||||
try
|
||||
let save_view = winsaveview()
|
||||
if searchpair('\[.\{-}\](', '', ')\zs', 'cbW', '', line('.')) > 0
|
||||
return matchstr(getline('.')[col('.')-1:],
|
||||
\ '\[.\{-}\](\zs' .. g:netrw_regex_url .. '\ze\(\s\+.\{-}\)\?)')
|
||||
endif
|
||||
return ''
|
||||
finally
|
||||
call winrestview(save_view)
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
function Netrw_get_URL_html()
|
||||
" HTML URL such as <a href='http://www.python.org'>Python is here</a>
|
||||
" <a href="http://www.python.org"/>
|
||||
try
|
||||
let save_view = winsaveview()
|
||||
if searchpair('<a\s\+href=', '', '\%(</a>\|/>\)\zs', 'cbW', '', line('.')) > 0
|
||||
return matchstr(getline('.')[col('.') - 1 : ],
|
||||
\ 'href=["'.."'"..']\?\zs\S\{-}\ze["'.."'"..']\?/\?>')
|
||||
endif
|
||||
return ''
|
||||
finally
|
||||
call winrestview(save_view)
|
||||
endtry
|
||||
endfunction
|
||||
<
|
||||
Other than a file path, the text under the cursor may be a URL. Netrw uses
|
||||
by default the following regular expression to determine if the text under the
|
||||
cursor is a URL:
|
||||
>
|
||||
:let g:netrw_regex_url = '\%(\%(http\|ftp\|irc\)s\?\|file\)://\S\{-}'
|
||||
<
|
||||
Associated setting variables:
|
||||
|g:netrw_gx| control how gx picks up the text under the cursor
|
||||
|g:netrw_nogx| prevent gx map while editing
|
||||
|g:netrw_suppress_gx_mesg| controls gx's suppression of browser messages
|
||||
|
||||
*netrw_filehandler*
|
||||
OPENING FILES AND LAUNCHING APPS *netrw-gx* *:Open* *:Launch* {{{2
|
||||
|
||||
When |g:netrw_browsex_viewer| exists and is "-", then netrw will attempt to
|
||||
handle the special file with a vim function. The "x" map applies a function
|
||||
to a file, based on its extension. Of course, the handler function must exist
|
||||
for it to be called!
|
||||
>
|
||||
Ex. mypgm.html x -> NFH_html("scp://user@host/some/path/mypgm.html")
|
||||
Netrw determines which special handler by the following method:
|
||||
|
||||
< Users may write their own netrw File Handler functions to
|
||||
support more suffixes with special handling. See
|
||||
<autoload/netrwFileHandlers.vim> for examples on how to make
|
||||
file handler functions. As an example: >
|
||||
* if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
|
||||
view files.
|
||||
If the viewer you wish to use does not support handling of a remote URL
|
||||
directory, set |g:netrw_browsex_support_remote| to 0.
|
||||
* otherwise:
|
||||
|
||||
" NFH_suffix(filename)
|
||||
fun! NFH_suffix(filename)
|
||||
..do something special with filename..
|
||||
endfun
|
||||
* for Windows : explorer.exe is used
|
||||
* for Mac OS X : open is used.
|
||||
* for Linux : xdg-open is used.
|
||||
|
||||
To open a path (or URL) <path> by the appropriate handler, type >
|
||||
|
||||
:Open <path>
|
||||
<
|
||||
These functions need to be defined in some file in your .vim/plugin
|
||||
(vimfiles\plugin) directory. Vim's function names may not have punctuation
|
||||
characters (except for the underscore) in them. To support suffices that
|
||||
contain such characters, netrw will first convert the suffix using the
|
||||
following table: >
|
||||
No escaping, neither for the shell nor for Vim's command-line, is needed.
|
||||
|
||||
@ -> AT ! -> EXCLAMATION % -> PERCENT
|
||||
: -> COLON = -> EQUAL ? -> QUESTION
|
||||
, -> COMMA - -> MINUS ; -> SEMICOLON
|
||||
$ -> DOLLAR + -> PLUS ~ -> TILDE
|
||||
To launch a specific application <app> <args>, often <args> being <path> >
|
||||
|
||||
:Launch <app> <args>.
|
||||
|
||||
Since <args> can be arbitrarily complex, in particular contain many file
|
||||
paths, the escaping is left to the user.
|
||||
|
||||
If you disabled the netrw plugin by setting g:loaded_netrwPlugin (see
|
||||
|netrw-noload|), then you can use >
|
||||
|
||||
:call netrw#Launch('<app> <args>')
|
||||
:call netrw#Open('<path>')
|
||||
<
|
||||
So, for example: >
|
||||
|
||||
file.rcs,v -> NFH_rcsCOMMAv()
|
||||
<
|
||||
If more such translations are necessary, please send me email: >
|
||||
NcampObell@SdrPchip.AorgM-NOSPAM
|
||||
with a request. (remove the embedded NOSPAM first)
|
||||
|
||||
Associated setting variable: |g:netrw_browsex_viewer|
|
||||
|
||||
*netrw-curdir*
|
||||
DELETING BOOKMARKS *netrw-mB* {{{2
|
||||
|
||||
@@ -2583,12 +2591,7 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
*g:netrw_browsex_viewer* specify user's preference for a viewer: >
|
||||
"kfmclient exec"
|
||||
"gnome-open"
|
||||
< If >
|
||||
"-"
|
||||
< is used, then netrwFileHandler() will look for
|
||||
a script/function to handle the given
|
||||
extension. (see |netrw_filehandler|).
|
||||
|
||||
<
|
||||
*g:netrw_browsex_support_remote*
|
||||
specify if the specified viewer supports a
|
||||
remote URL. (see |netrw-handler|).
|
||||
@@ -2655,10 +2658,34 @@ your browsing preferences. (see also: |netrw-settings|)
|
||||
netrw last saw |g:netrw_cursor| >= 5 or when
|
||||
netrw was initially run.
|
||||
|
||||
*g:netrw_decompress* = { ".gz" : "gunzip" ,
|
||||
".bz2" : "bunzip2" ,
|
||||
".zip" : "unzip" ,
|
||||
".tar" : "tar -xf"}
|
||||
*g:netrw_decompress* = { '.lz4': 'lz4 -d',
|
||||
'.lzo': 'lzop -d',
|
||||
'.lz': 'lzip -dk',
|
||||
'.7z': '7za x',
|
||||
'.001': '7za x',
|
||||
'.tar.bz': 'tar -xvjf',
|
||||
'.tar.bz2': 'tar -xvjf',
|
||||
'.tbz': 'tar -xvjf',
|
||||
'.tbz2': 'tar -xvjf',
|
||||
'.tar.gz': 'tar -xvzf',
|
||||
'.tgz': 'tar -xvzf',
|
||||
'.tar.zst': 'tar --use-compress-program=unzstd -xvf',
|
||||
'.tzst': 'tar --use-compress-program=unzstd -xvf',
|
||||
'.tar': 'tar -xvf',
|
||||
'.zip': 'unzip',
|
||||
'.bz': 'bunzip2 -k',
|
||||
'.bz2': 'bunzip2 -k',
|
||||
'.gz': 'gunzip -k',
|
||||
'.lzma': 'unlzma -T0 -k',
|
||||
'.xz': 'unxz -T0 -k',
|
||||
'.zst': 'zstd -T0 -d',
|
||||
'.Z': 'uncompress -k',
|
||||
'.rar': 'unrar x -ad',
|
||||
'.tar.lzma': 'tar --lzma -xvf',
|
||||
'.tlz': 'tar --lzma -xvf',
|
||||
'.tar.xz': 'tar -xvJf',
|
||||
'.txz': 'tar -xvJf'}
|
||||
|
||||
A dictionary mapping suffices to
|
||||
decompression programs.
|
||||
|
||||
@@ -3868,7 +3895,7 @@ netrw:
|
||||
netrw-safe guioptions
|
||||
Nov 15, 2021 * removed netrw_localrm and netrw_localrmdir
|
||||
references
|
||||
Aug 18, 2022 * (Miguel Barro) improving compatability with
|
||||
Aug 18, 2022 * (Miguel Barro) improving compatibility with
|
||||
powershell
|
||||
v171: Oct 09, 2020 * included code in s:NetrwOptionsSafe()
|
||||
to allow |'bh'| to be set to delete when
|
||||
@@ -4099,7 +4126,7 @@ netrw:
|
||||
The "<nowait>" modifier has been included
|
||||
with most of netrw's mappings to avoid that
|
||||
delay.
|
||||
Jun 26, 2015 * |netrw-gn| mapping implemted
|
||||
Jun 26, 2015 * |netrw-gn| mapping implemented
|
||||
* :Ntree NotADir resulted in having
|
||||
the tree listing expand in the error messages
|
||||
window. Fixed.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*pi_paren.txt* For Vim version 9.1. Last change: 2013 May 08
|
||||
*pi_paren.txt* For Vim version 9.1. Last change: 2024 Nov 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -10,6 +10,7 @@ The functionality mentioned here is a |standard-plugin|.
|
||||
This plugin is only available if 'compatible' is not set.
|
||||
|
||||
You can avoid loading this plugin by setting the "loaded_matchparen" variable: >
|
||||
|
||||
:let loaded_matchparen = 1
|
||||
|
||||
The plugin installs CursorMoved, CursorMovedI and WinEnter autocommands to
|
||||
@@ -29,6 +30,16 @@ the ":highlight" command. Example: >
|
||||
|
||||
:hi MatchParen ctermbg=blue guibg=lightblue
|
||||
|
||||
By default the plugin will highlight both the paren under the cursor and the
|
||||
matching one using the |hl-MatchParen| highlighting group. This may result in
|
||||
the cursor briefly disappearing from the screen as the MatchParen colors take
|
||||
over the cursor highlight. To prevent this from happening and have the plugin
|
||||
only highlight the matching paren and not the one under the cursor
|
||||
(effectively leaving the cursor style unchanged), you can set the
|
||||
"matchparen_disable_cursor_hl" variable: >
|
||||
|
||||
:let matchparen_disable_cursor_hl = 1
|
||||
|
||||
The characters to be matched come from the 'matchpairs' option. You can
|
||||
change the value to highlight different matches. Note that not everything is
|
||||
possible. For example, you can't highlight single or double quotes, because
|
||||
@@ -46,10 +57,10 @@ are:
|
||||
closed folds.
|
||||
- 'synmaxcol' times 2 bytes before or after the cursor to avoid a delay
|
||||
in a long line with syntax highlighting.
|
||||
- A timeout of 300 msec (60 msec in Insert mode). This can be changed with the
|
||||
g:matchparen_timeout and g:matchparen_insert_timeout variables and their
|
||||
buffer-local equivalents b:matchparen_timeout and
|
||||
b:matchparen_insert_timeout.
|
||||
- A timeout of 300 msec (60 msec in Insert mode). This can be changed with
|
||||
the "g:matchparen_timeout" and "g:matchparen_insert_timeout" variables and
|
||||
their buffer-local equivalents "b:matchparen_timeout" and
|
||||
"b:matchparen_insert_timeout".
|
||||
|
||||
If you would like the |%| command to work better, the matchit plugin can be
|
||||
used, see |matchit-install|. This plugin also helps to skip matches in
|
||||
|
||||
59
runtime/doc/pi_tutor.txt
Normal file
59
runtime/doc/pi_tutor.txt
Normal file
@@ -0,0 +1,59 @@
|
||||
*pi_tutor.txt* For Vim version 9.1. Last change: 2024 Dec 17
|
||||
|
||||
INTERACTIVE TUTORIALS FOR VIM *vim-tutor-mode*
|
||||
|
||||
vim-tutor-mode provides a system to follow and create interactive tutorials
|
||||
for vim and third party plugins. It replaces the venerable `vimtutor` system.
|
||||
|
||||
=============================================================================
|
||||
1. Usage *vim-tutor-usage*
|
||||
|
||||
vim-tutor-mode tutorials are hypertext documents, they have rich text and
|
||||
contain links. To stand out from the rest of the text, links are underlined.
|
||||
You can follow them by placing the cursor over them and pressing <Enter>, or
|
||||
by double-clicking them.
|
||||
|
||||
1.1 Commands
|
||||
------------
|
||||
*:Tutor*
|
||||
:Tutor [tutorial] Opens a tutorial. Command-line completion for
|
||||
[tutorial] is provided, the candidates are a list of
|
||||
".tutor" files found in the "tutor/<lang>/" folder in
|
||||
the 'runtimepath'. Tutorials prefixed with "vim-"
|
||||
will always be shown first.
|
||||
|
||||
If no [tutorial] is provided, the command starts the
|
||||
"vim-01-beginner" tutorial, which is equivalent to
|
||||
Vim's `vimtutor`, chapter 1.
|
||||
|
||||
Uses the translated tutorial for the current message
|
||||
language if possible (|v:lang|), e.g. to open the
|
||||
chapter 1 of the Italian tutor, use: >
|
||||
|
||||
:lang it_IT.UTF-8
|
||||
:Tutor
|
||||
<
|
||||
=============================================================================
|
||||
2. Creating tutorials *vim-tutor-create*
|
||||
|
||||
Writing vim-tutor-mode tutorials is easy. For an overview of the format used,
|
||||
please consult the "tutor.tutor" file: >
|
||||
|
||||
:Tutor tutor
|
||||
<
|
||||
New tutorials must be placed in the 'tutor/' folder in the 'runtimepath'
|
||||
to be detected by the :Tutor command.
|
||||
|
||||
It is recommended to use a less formal style when writing tutorials than in
|
||||
regular documentation (unless the content requires it).
|
||||
|
||||
=============================================================================
|
||||
3. Contributing
|
||||
|
||||
Development of the plugin is done over at github [1]. Feel free to report
|
||||
issues and make suggestions.
|
||||
|
||||
[1]: https://github.com/fmoralesc/vim-tutor-mode
|
||||
|
||||
=============================================================================
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
@@ -1,4 +1,4 @@
|
||||
*popup.txt* For Vim version 9.1. Last change: 2024 Jun 16
|
||||
*popup.txt* For Vim version 9.1. Last change: 2024 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -705,7 +705,6 @@ The second argument of |popup_create()| is a dictionary with options:
|
||||
present. Use zero to reset.
|
||||
fixed When FALSE (the default), and:
|
||||
- "pos" is "botleft" or "topleft", and
|
||||
- "wrap" is off, and
|
||||
- the popup would be truncated at the right edge of
|
||||
the screen, then
|
||||
the popup is moved to the left so as to fit the
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickfix.txt* For Vim version 9.1. Last change: 2024 Sep 10
|
||||
*quickfix.txt* For Vim version 9.1. Last change: 2024 Dec 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -361,7 +361,7 @@ processing a quickfix or location list command, it will be aborted.
|
||||
Example: >
|
||||
:g/mypattern/caddexpr expand("%") .. ":" .. line(".") .. ":" .. getline(".")
|
||||
<
|
||||
*:lad* *:addd* *:laddexpr*
|
||||
*:lad* *:ladd* *:laddexpr*
|
||||
:lad[dexpr] {expr} Same as ":caddexpr", except the location list for the
|
||||
current window is used instead of the quickfix list.
|
||||
|
||||
@@ -1278,6 +1278,32 @@ For writing a compiler plugin, see |write-compiler-plugin|.
|
||||
|
||||
Use the |compiler-make| plugin to undo the effect of a compiler plugin.
|
||||
|
||||
CPPCHECK *quickfix-cppcheck* *compiler-cppcheck*
|
||||
|
||||
Use g/b:`c_cppcheck_params` to set cppcheck parameters. The global
|
||||
settings by default include
|
||||
|
||||
- `--verbose`: Enables verbose output.
|
||||
- `--force`: Forces checking of all configurations.
|
||||
- `--inline-suppr`: Allows inline suppressions.
|
||||
- `--enable=...`: Enables specific checks like warnings, style, performance,
|
||||
portability, information, and missing includes.
|
||||
- `-j`: Utilizes multiple processors if available, determined by the
|
||||
`getconf` command if available (requires omitting the unusedFunction check)
|
||||
|
||||
For C++ files (`filetype == 'cpp'`), the `--language=c++` option is added to
|
||||
ensure Cppcheck treats the file as C++.
|
||||
|
||||
If compile_commands.json is present in the current directory, it is added as a
|
||||
`--project` parameter to the command line. Otherwise, by default the
|
||||
directories in &path are passed as include directories. These can be set by
|
||||
g/b:`c_cppcheck_includes` as a list of `-I` flags. Tim Pope's vim-apathy
|
||||
plug-in [0] can expand &path. To also append the folders in a git repo use >
|
||||
|
||||
let &l:path = join(systemlist('git ls-tree -d --name-only -r HEAD'), ',')
|
||||
|
||||
[0] https://github.com/tpope/vim-apathy
|
||||
|
||||
DOTNET *compiler-dotnet*
|
||||
|
||||
The .NET CLI compiler outputs both errors and warnings by default. The output
|
||||
@@ -1305,10 +1331,235 @@ g:compiler_gcc_ignore_unmatched_lines
|
||||
JAVAC *compiler-javac*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
g:javac_makeprg_params variable. For example: >
|
||||
b/g:javac_makeprg_params variable. For example: >
|
||||
|
||||
let g:javac_makeprg_params = "-Xlint:all -encoding utf-8"
|
||||
<
|
||||
|
||||
MAVEN *compiler-maven*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
b/g:maven_makeprg_params variable. For example: >
|
||||
|
||||
let g:maven_makeprg_params = "-DskipTests -U -X"
|
||||
|
||||
SPOTBUGS *compiler-spotbugs*
|
||||
|
||||
SpotBugs is a static analysis tool that can be used to find bugs in Java.
|
||||
It scans the Java bytecode of all classes in the currently open buffer.
|
||||
(Therefore, `:compiler! spotbugs` is not supported.)
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
"b:" or "g:spotbugs_makeprg_params" variable. For example: >vim
|
||||
|
||||
let b:spotbugs_makeprg_params = "-longBugCodes -effort:max -low"
|
||||
|
||||
The global default is "-workHard -experimental".
|
||||
|
||||
By default, the class files are searched in the directory where the source
|
||||
files are placed. However, typical Java projects use distinct directories
|
||||
for source files and class files. To make both known to SpotBugs, assign
|
||||
their paths (distinct and relative to their common root directory) to the
|
||||
following properties (using the example of a common Maven project): >vim
|
||||
|
||||
let g:spotbugs_properties = {
|
||||
\ 'sourceDirPath': ['src/main/java'],
|
||||
\ 'classDirPath': ['target/classes'],
|
||||
\ 'testSourceDirPath': ['src/test/java'],
|
||||
\ 'testClassDirPath': ['target/test-classes'],
|
||||
\ }
|
||||
|
||||
Note that source and class path entries are expected to come in pairs: define
|
||||
both "sourceDirPath" and "classDirPath" when you are considering at least one,
|
||||
and apply the same logic to "testSourceDirPath" and "testClassDirPath".
|
||||
Note that values for the path keys describe only for SpotBugs where to look
|
||||
for files; refer to the documentation for particular compiler plugins for more
|
||||
information.
|
||||
|
||||
The default pre- and post-compiler actions are provided for Ant, Maven, and
|
||||
Javac compiler plugins and can be selected by assigning the name of a compiler
|
||||
plugin (`ant`, `maven`, or `javac`) to the "compiler" key: >vim
|
||||
|
||||
let g:spotbugs_properties = {
|
||||
\ 'compiler': 'maven',
|
||||
\ }
|
||||
|
||||
This single setting is essentially equivalent to all the settings below, with
|
||||
the exception made for the "PreCompilerAction" and "PreCompilerTestAction"
|
||||
values: their listed |Funcref|s will obtain no-op implementations whereas the
|
||||
implicit Funcrefs of the "compiler" key will obtain the requested defaults if
|
||||
available. >vim
|
||||
|
||||
let g:spotbugs_properties = {
|
||||
\ 'PreCompilerAction':
|
||||
\ function('spotbugs#DefaultPreCompilerAction'),
|
||||
\ 'PreCompilerTestAction':
|
||||
\ function('spotbugs#DefaultPreCompilerTestAction'),
|
||||
\ 'PostCompilerAction':
|
||||
\ function('spotbugs#DefaultPostCompilerAction'),
|
||||
\ 'sourceDirPath': ['src/main/java'],
|
||||
\ 'classDirPath': ['target/classes'],
|
||||
\ 'testSourceDirPath': ['src/test/java'],
|
||||
\ 'testClassDirPath': ['target/test-classes'],
|
||||
\ }
|
||||
|
||||
With default actions, the compiler of choice will attempt to rebuild the class
|
||||
files for the buffer (and possibly for the whole project) as soon as a Java
|
||||
syntax file is loaded; then, `spotbugs` will attempt to analyze the quality of
|
||||
the compilation unit of the buffer.
|
||||
|
||||
Vim commands proficient in 'makeprg' [0] can be composed with default actions.
|
||||
Begin by considering which of the supported keys, "DefaultPreCompilerCommand",
|
||||
"DefaultPreCompilerTestCommand", or "DefaultPostCompilerCommand", you need to
|
||||
write an implementation for, observing that each of these keys corresponds to
|
||||
a particular "*Action" key. Follow it by defining a new function that always
|
||||
declares an only parameter of type string and puts to use a command equivalent
|
||||
of |:make|, and assigning its |Funcref| to the selected key. For example:
|
||||
>vim
|
||||
function! GenericPostCompilerCommand(arguments) abort
|
||||
execute 'make ' . a:arguments
|
||||
endfunction
|
||||
|
||||
let g:spotbugs_properties = {
|
||||
\ 'DefaultPostCompilerCommand':
|
||||
\ function('GenericPostCompilerCommand'),
|
||||
\ }
|
||||
|
||||
When "PostCompilerAction" is available, "PostCompilerActionExecutor" is also
|
||||
supported. Its value must be a Funcref pointing to a function that always
|
||||
declares a single parameter of type string and decides whether |:execute| can
|
||||
be dispatched on its argument, containing a pending post-compiler action,
|
||||
after ascertaining the current status of |:cc| (or |:ll|): >vim
|
||||
|
||||
function! GenericPostCompilerActionExecutor(action) abort
|
||||
try
|
||||
cc
|
||||
catch /\<E42:/
|
||||
execute a:action
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
Complementary, some or all of the available "Pre*Action"s (or "*Pre*Command"s)
|
||||
may run `:doautocmd java_spotbugs_post User` in their implementations before
|
||||
|:make| (or its equivalent) to define a once-only |ShellCmdPost| `:autocmd`
|
||||
that will arrange for "PostCompilerActionExecutor" to be invoked; and then run
|
||||
`:doautocmd java_spotbugs_post ShellCmdPost` to consume this event: >vim
|
||||
|
||||
function! GenericPreCompilerCommand(arguments) abort
|
||||
if !exists('g:spotbugs_compilation_done')
|
||||
doautocmd java_spotbugs_post User
|
||||
execute 'make ' . a:arguments
|
||||
" only run doautocmd when :make was synchronous
|
||||
" see note below
|
||||
doautocmd java_spotbugs_post ShellCmdPost " XXX: (a)
|
||||
let g:spotbugs_compilation_done = 1
|
||||
else
|
||||
cc
|
||||
endif
|
||||
endfunction
|
||||
|
||||
function! GenericPreCompilerTestCommand(arguments) abort
|
||||
if !exists('g:spotbugs_test_compilation_done')
|
||||
doautocmd java_spotbugs_post User
|
||||
execute 'make ' . a:arguments
|
||||
" only run doautocmd when :make was synchronous
|
||||
" see note below
|
||||
doautocmd java_spotbugs_post ShellCmdPost " XXX: (b)
|
||||
let g:spotbugs_test_compilation_done = 1
|
||||
else
|
||||
cc
|
||||
endif
|
||||
endfunction
|
||||
|
||||
let g:spotbugs_properties = {
|
||||
\ 'compiler': 'maven',
|
||||
\ 'DefaultPreCompilerCommand':
|
||||
\ function('GenericPreCompilerCommand'),
|
||||
\ 'DefaultPreCompilerTestCommand':
|
||||
\ function('GenericPreCompilerTestCommand'),
|
||||
\ 'PostCompilerActionExecutor':
|
||||
\ function('GenericPostCompilerActionExecutor'),
|
||||
\ }
|
||||
|
||||
If a command equivalent of `:make` is capable of asynchronous execution and
|
||||
consuming `ShellCmdPost` events, `:doautocmd java_spotbugs_post ShellCmdPost`
|
||||
must be removed from such "*Action" (or "*Command") implementations (i.e. the
|
||||
lines `(a)` and `(b)` in the listed examples) to retain a sequential order for
|
||||
non-blocking execution, and any notification (see below) must be suppressed.
|
||||
A `ShellCmdPost` `:autocmd` can be associated with any |:augroup| by assigning
|
||||
its name to the "augroupForPostCompilerAction" key.
|
||||
|
||||
When default actions are not suited to a desired workflow, proceed by writing
|
||||
arbitrary functions yourself and matching their Funcrefs to the supported
|
||||
keys: "PreCompilerAction", "PreCompilerTestAction", and "PostCompilerAction".
|
||||
|
||||
The next example re-implements the default pre-compiler actions for a Maven
|
||||
project and requests other default Maven settings with the "compiler" entry:
|
||||
>vim
|
||||
function! MavenPreCompilerAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler maven
|
||||
make compile
|
||||
cc
|
||||
endfunction
|
||||
|
||||
function! MavenPreCompilerTestAction() abort
|
||||
call spotbugs#DeleteClassFiles()
|
||||
compiler maven
|
||||
make test-compile
|
||||
cc
|
||||
endfunction
|
||||
|
||||
let g:spotbugs_properties = {
|
||||
\ 'compiler': 'maven',
|
||||
\ 'PreCompilerAction':
|
||||
\ function('MavenPreCompilerAction'),
|
||||
\ 'PreCompilerTestAction':
|
||||
\ function('MavenPreCompilerTestAction'),
|
||||
\ }
|
||||
|
||||
Note that all entered custom settings will take precedence over the matching
|
||||
default settings in "g:spotbugs_properties".
|
||||
Note that it is necessary to notify the plugin of the result of a pre-compiler
|
||||
action before further work can be undertaken. Using |:cc| after |:make| (or
|
||||
|:ll| after |:lmake|) as the last command of an action is the supported means
|
||||
of such communication.
|
||||
|
||||
Two commands, "SpotBugsRemoveBufferAutocmd" and "SpotBugsDefineBufferAutocmd",
|
||||
are provided to toggle actions for buffer-local autocommands. For example, to
|
||||
also run actions on any |BufWritePost| and |SigUSR1| event, add these lines to
|
||||
`~/.vim/after/ftplugin/java.vim`: >vim
|
||||
|
||||
if exists(':SpotBugsDefineBufferAutocmd') == 2
|
||||
SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
|
||||
endif
|
||||
|
||||
Otherwise, you can turn to `:doautocmd java_spotbugs User` at any time.
|
||||
|
||||
The "g:spotbugs_properties" variable is consulted by the Java filetype plugin
|
||||
(|ft-java-plugin|) to arrange for the described automation, and, therefore, it
|
||||
must be defined before |FileType| events can take place for the buffers loaded
|
||||
with Java source files. It could, for example, be set in a project-local
|
||||
|vimrc| loaded by [1].
|
||||
|
||||
Both "g:spotbugs_properties" and "b:spotbugs_properties" are recognized and
|
||||
must be modifiable (|:unlockvar|). The "*Command" entries are always treated
|
||||
as global functions to be shared among all Java buffers.
|
||||
|
||||
The SpotBugs Java library and, by extension, its distributed shell scripts do
|
||||
not support in the `-textui` mode listed pathnames with directory filenames
|
||||
that contain blank characters [2]. To work around this limitation, consider
|
||||
making a symbolic link to such a directory from a directory that does not have
|
||||
blank characters in its name and passing this information to SpotBugs: >vim
|
||||
|
||||
let g:spotbugs_alternative_path = {
|
||||
\ 'fromPath': 'path/to/dir_without_blanks',
|
||||
\ 'toPath': 'path/to/dir with blanks',
|
||||
\ }
|
||||
|
||||
[0] https://github.com/Konfekt/vim-compilers
|
||||
[1] https://github.com/MarcWeber/vim-addon-local-vimrc
|
||||
[2] https://github.com/spotbugs/spotbugs/issues/909
|
||||
|
||||
GNU MAKE *compiler-make*
|
||||
|
||||
Since the default make program is "make", the compiler plugin for make,
|
||||
@@ -1349,7 +1600,7 @@ make, say :make html or :make pdf.
|
||||
Additional arguments can be passed to groff by setting them in
|
||||
`b:groff_compiler_args` or `g:groff_compiler_args`. The `language` argument
|
||||
passed to groff is set using 'spelllang'; it can be overridden by setting
|
||||
`b:groff_compiler_lang`. The default enconding is `UTF-8` and can be changed
|
||||
`b:groff_compiler_lang`. The default encoding is `UTF-8` and can be changed
|
||||
by setting `b:groff_compiler_encoding` or `g:groff_compiler_encoding`.
|
||||
|
||||
PANDOC *quickfix-pandoc* *compiler-pandoc*
|
||||
@@ -1379,6 +1630,32 @@ being checked. To disable this set g:perl_compiler_force_warnings to a zero
|
||||
value. For example: >
|
||||
let g:perl_compiler_force_warnings = 0
|
||||
|
||||
MYPY TYPE CHECKER *compiler-mypy*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
b/g:mypy_makeprg_params variable. For example: >
|
||||
|
||||
let b:mypy_makeprg_params = "--warn-unused-ignores"
|
||||
|
||||
The global default is "--strict --ignore-missing-imports".
|
||||
|
||||
RUFF LINTER *compiler-ruff*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
b/g:ruff_makeprg_params variable. For example: >
|
||||
|
||||
let b:ruff_makeprg_params = "--max-line-length "..&textwidth
|
||||
|
||||
The global default is "--preview".
|
||||
|
||||
PYLINT LINTER *compiler-pylint*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
b/g:pylint_makeprg_params variable. For example: >
|
||||
|
||||
let b:pylint_makeprg_params = "--max-line-length "..&textwidth
|
||||
|
||||
The global default is "--jobs=0" to use (almost) all cores.
|
||||
|
||||
PYUNIT COMPILER *compiler-pyunit*
|
||||
|
||||
@@ -1398,6 +1675,14 @@ Useful values for the 'makeprg' options therefore are:
|
||||
|
||||
Also see http://vim.sourceforge.net/tip_view.php?tip_id=280.
|
||||
|
||||
PYTEST COMPILER *compiler-pytest*
|
||||
|
||||
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||
b/g:pytest_makeprg_params variable. For example: >
|
||||
|
||||
let b:pytest_makeprg_params = "--verbose --no-summary --disable-warnings"
|
||||
|
||||
The global default is "--tb=short --quiet"; Python warnings are suppressed.
|
||||
|
||||
TEX COMPILER *compiler-tex*
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*quickref.txt* For Vim version 9.1. Last change: 2024 Mar 03
|
||||
*quickref.txt* For Vim version 9.1. Last change: 2024 Nov 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -707,6 +707,7 @@ Short explanation of each option: *option-list*
|
||||
'fileignorecase' 'fic' ignore case when using file names
|
||||
'filetype' 'ft' type of file, used for autocommands
|
||||
'fillchars' 'fcs' characters to use for displaying special items
|
||||
'findfunc' 'ffu' function to be called for the |:find| command
|
||||
'fixendofline' 'fixeol' make sure last line in file has <EOL>
|
||||
'fkmap' 'fk' obsolete option for Farsi
|
||||
'foldclose' 'fcl' close a fold when the cursor leaves it
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*repeat.txt* For Vim version 9.1. Last change: 2024 Aug 12
|
||||
*repeat.txt* For Vim version 9.1. Last change: 2024 Oct 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -105,9 +105,9 @@ where the cursor was before the global command).
|
||||
|
||||
The global command sets both the last used search pattern and the last used
|
||||
substitute pattern (this is vi compatible). This makes it easy to globally
|
||||
replace a string:
|
||||
replace a string: >
|
||||
:g/pat/s//PAT/g
|
||||
This replaces all occurrences of "pat" with "PAT". The same can be done with:
|
||||
This replaces all occurrences of "pat" with "PAT". The same can be done with: >
|
||||
:%s/pat/PAT/g
|
||||
Which is two characters shorter!
|
||||
|
||||
@@ -526,7 +526,7 @@ Example: the lines >
|
||||
\:%,
|
||||
\n:>,
|
||||
\fb:-
|
||||
are interpreted as if they were given in one line:
|
||||
are interpreted as if they were given in one line: >
|
||||
:set comments=sr:/*,mb:*,el:*/,://,b:#,:%,n:>,fb:-
|
||||
|
||||
All leading whitespace characters in the line before a backslash are ignored.
|
||||
@@ -611,7 +611,7 @@ advantages over normal plugins:
|
||||
Using a package and loading automatically ~
|
||||
|
||||
Let's assume your Vim files are in the "~/.vim" directory and you want to add a
|
||||
package from a zip archive "/tmp/foopack.zip":
|
||||
package from a zip archive "/tmp/foopack.zip": >
|
||||
% mkdir -p ~/.vim/pack/foo
|
||||
% cd ~/.vim/pack/foo
|
||||
% unzip /tmp/foopack.zip
|
||||
@@ -661,7 +661,7 @@ If the package has an "after" directory, that directory is added to the end of
|
||||
Using a single plugin and loading it automatically ~
|
||||
|
||||
If you don't have a package but a single plugin, you need to create the extra
|
||||
directory level:
|
||||
directory level: >
|
||||
% mkdir -p ~/.vim/pack/foo/start/foobar
|
||||
% cd ~/.vim/pack/foo/start/foobar
|
||||
% unzip /tmp/someplugin.zip
|
||||
@@ -978,13 +978,13 @@ will put the MO files in the "lang/" directory of the Vim editor.
|
||||
Type the following commands:
|
||||
>
|
||||
cd /d f:\forkvim\src\po
|
||||
(the following command must be entered in one line, here it is separated for example)
|
||||
For Russian:
|
||||
< (the following command must be entered in one line, here it is separated for example)
|
||||
For Russian: >
|
||||
nmake.exe -f Make_mvc.mak "PLUGPACKAGE=aap"
|
||||
"PO_PLUGPACKAGE=e:\project\translate\plugins\ru.po"
|
||||
"MO_PLUGPACKAGE_PATH=d:\Programs\vim\vim91\lang\ru\LC_MESSAGES"
|
||||
aap.mo
|
||||
For German:
|
||||
< For German: >
|
||||
nmake.exe -f Make_mvc.mak "PLUGPACKAGE=aap"
|
||||
"PO_PLUGPACKAGE=e:\project\translate\plugins\de.po"
|
||||
"MO_PLUGPACKAGE_PATH=d:\Programs\vim\vim91\lang\de\LC_MESSAGES"
|
||||
@@ -1398,9 +1398,9 @@ For example, to profile the one_script.vim script file: >
|
||||
clear the profiling statistics and start profiling again.
|
||||
|
||||
:prof[ile] pause
|
||||
Don't profile until the following `:profile continue`. Can be
|
||||
used when doing something that should not be counted (e.g., an
|
||||
external command). Does not nest.
|
||||
Stop profiling until the next `:profile continue` command.
|
||||
Can be used when doing something that should not be counted
|
||||
(e.g., an external command). Does not nest.
|
||||
|
||||
:prof[ile] continue
|
||||
Continue profiling after `:profile pause`.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*spell.txt* For Vim version 9.1. Last change: 2024 May 17
|
||||
*spell.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -792,7 +792,7 @@ them before the Vim word list is made. The tools for this can be found in the
|
||||
The format for the affix and word list files is based on what Myspell uses
|
||||
(the spell checker of Mozilla and OpenOffice.org). A description can be found
|
||||
here:
|
||||
http://lingucomponent.openoffice.org/affix.readme ~
|
||||
http://lingucomponent.openoffice.org/affix.readme
|
||||
Note that affixes are case sensitive, this isn't obvious from the description.
|
||||
|
||||
Vim supports quite a few extras. They are described below |spell-affix-vim|.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*starting.txt* For Vim version 9.1. Last change: 2024 Sep 05
|
||||
*starting.txt* For Vim version 9.1. Last change: 2024 Dec 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -847,7 +847,8 @@ accordingly. Vim proceeds in this order:
|
||||
'compatible' is only done later. Add a ":set nocp" command if you
|
||||
like. For the Macintosh the $VIMRUNTIME/macmap.vim is read.
|
||||
|
||||
*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc* *$MYVIMRC* *$MYVIMDIR*
|
||||
*VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc*
|
||||
*$MYVIMRC* *$MYVIMDIR*
|
||||
c. Five places are searched for initializations. The first that exists
|
||||
is used, the others are ignored. The $MYVIMRC environment variable is
|
||||
set to the file that was first found, unless $MYVIMRC was already set
|
||||
@@ -972,9 +973,10 @@ accordingly. Vim proceeds in this order:
|
||||
The |v:vim_did_enter| variable is set to 1.
|
||||
The |VimEnter| autocommands are executed.
|
||||
|
||||
The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
|
||||
gvimrc file while $MYVIMDIR is set to the users personal runtime directory
|
||||
'rtp' (typically the first entry in 'runtimepath').
|
||||
The $MYVIMRC or $MYGVIMRC environment variable will be set to the first found
|
||||
vimrc and/or gvimrc file while $MYVIMDIR is set to the users personal runtime
|
||||
directory 'rtp' (typically the first entry in 'runtimepath').
|
||||
Note: These environment variables resolve symbolic links, but 'rtp' does not.
|
||||
|
||||
|
||||
Some hints on using initializations ~
|
||||
@@ -1077,9 +1079,10 @@ This should work well for new Vim users. If you create your own .vimrc, it is
|
||||
recommended to add these lines somewhere near the top: >
|
||||
unlet! skip_defaults_vim
|
||||
source $VIMRUNTIME/defaults.vim
|
||||
Then Vim works like before you had a .vimrc. Copying $VIMRUNTIME/vimrc_example
|
||||
is way to do this. Alternatively, you can copy defaults.vim to your .vimrc
|
||||
and modify it (but then you won't get updates when it changes).
|
||||
Then Vim works like before you had a .vimrc.
|
||||
Copying $VIMRUNTIME/vimrc_example.vim to your .vimrc is another way to do
|
||||
this. Alternatively, you can copy defaults.vim to your .vimrc and modify it
|
||||
(but then you won't get updates when it changes).
|
||||
|
||||
If you don't like some of the defaults, you can still source defaults.vim and
|
||||
revert individual settings. See the defaults.vim file for hints on how to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2024 Aug 31
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2024 Dec 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -883,12 +883,15 @@ There are many types of assembly languages that all use the same file name
|
||||
extensions. Therefore you will have to select the type yourself, or add a
|
||||
line in the assembly file that Vim will recognize. Currently these syntax
|
||||
files are included:
|
||||
asm GNU assembly (the default)
|
||||
asm GNU assembly (usually have .s or .S extension and were
|
||||
already built using C compiler such as GCC or CLANG)
|
||||
asm68k Motorola 680x0 assembly
|
||||
asmh8300 Hitachi H-8300 version of GNU assembly
|
||||
ia64 Intel Itanium 64
|
||||
fasm Flat assembly (http://flatassembler.net)
|
||||
masm Microsoft assembly (probably works for any 80x86)
|
||||
masm Microsoft assembly (.masm files are compiled with
|
||||
Microsoft's Macro Assembler. This is only supported
|
||||
for x86, x86_64, ARM and AARCH64 CPU families)
|
||||
nasm Netwide assembly
|
||||
tasm Turbo Assembly (with opcodes 80x86 up to Pentium, and
|
||||
MMX)
|
||||
@@ -1679,20 +1682,20 @@ on" command in your .vimrc file.
|
||||
When you edit an existing Fortran file, the syntax script will assume free
|
||||
source form if the fortran_free_source variable has been set, and assumes
|
||||
fixed source form if the fortran_fixed_source variable has been set. Suppose
|
||||
neither of these variables have been set. In that case, the syntax script attempts to
|
||||
determine which source form has been used by examining the file extension
|
||||
using conventions common to the ifort, gfortran, Cray, NAG, and PathScale
|
||||
compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08 for
|
||||
free-source). No default is used for the .fpp and .ftn file extensions because
|
||||
different compilers treat them differently. If none of this works, then the
|
||||
script examines the first five columns of the first 500 lines of your file. If
|
||||
no signs of free source form are detected, then the file is assumed to be in
|
||||
fixed source form. The algorithm should work in the vast majority of cases.
|
||||
In some cases, such as a file that begins with 500 or more full-line comments,
|
||||
the script may incorrectly decide that the code is in fixed form. If that
|
||||
happens, just add a non-comment statement beginning anywhere in the first five
|
||||
columns of the first twenty-five lines, save (:w), and then reload (:e!) the
|
||||
file.
|
||||
neither of these variables have been set. In that case, the syntax script
|
||||
attempts to determine which source form has been used by examining the file
|
||||
extension using conventions common to the ifort, gfortran, Cray, NAG, and
|
||||
PathScale compilers (.f, .for, .f77 for fixed-source, .f90, .f95, .f03, .f08
|
||||
for free-source). No default is used for the .fpp and .ftn file extensions
|
||||
because different compilers treat them differently. If none of this works,
|
||||
then the script examines the first five columns of the first 500 lines of your
|
||||
file. If no signs of free source form are detected, then the file is assumed
|
||||
to be in fixed source form. The algorithm should work in the vast majority of
|
||||
cases. In some cases, such as a file that begins with 500 or more full-line
|
||||
comments, the script may incorrectly decide that the code is in fixed form.
|
||||
If that happens, just add a non-comment statement beginning anywhere in the
|
||||
first five columns of the first twenty-five lines, save (:w), and then reload
|
||||
(:e!) the file.
|
||||
|
||||
Vendor extensions ~
|
||||
Fixed-form Fortran requires a maximum line length of 72 characters but the
|
||||
@@ -2106,7 +2109,8 @@ respectively.
|
||||
Javadoc is a program that takes special comments out of Java program files and
|
||||
creates HTML pages. The standard configuration will highlight this HTML code
|
||||
similarly to HTML files (see |html.vim|). You can even add JavaScript and CSS
|
||||
inside this code (see below). The HTML rendering diverges as follows:
|
||||
inside this code (see below). The HTML rendering and the Markdown rendering
|
||||
diverge as follows:
|
||||
1. The first sentence (all characters up to the first period `.`, which is
|
||||
followed by a whitespace character or a line terminator, or up to the
|
||||
first block tag, e.g. `@param`, `@return`) is colored as
|
||||
@@ -2119,8 +2123,14 @@ inside this code (see below). The HTML rendering diverges as follows:
|
||||
*Special special symbols
|
||||
and some of their arguments are colored as
|
||||
*Function function names.
|
||||
To turn this feature off, add the following line to your startup file: >
|
||||
To turn this feature off for both HTML and Markdown, add the following line to
|
||||
your startup file: >
|
||||
:let g:java_ignore_javadoc = 1
|
||||
Alternatively, only suppress HTML comments or Markdown comments: >
|
||||
:let g:java_ignore_html = 1
|
||||
:let g:java_ignore_markdown = 1
|
||||
|
||||
See |ft-java-plugin| for additional support available for Markdown comments.
|
||||
|
||||
If you use the special Javadoc comment highlighting described above, you can
|
||||
also turn on special highlighting for JavaScript, Visual Basic scripts, and
|
||||
@@ -2155,6 +2165,12 @@ In order to highlight nested parens with different colors, define colors for
|
||||
or >
|
||||
:hi javaParen ctermfg=blue guifg=#0000ff
|
||||
|
||||
Certain modifiers are incompatible with each other, e.g. `abstract` and
|
||||
`final`: >
|
||||
:syn list javaConceptKind
|
||||
and can be differently highlighted as a group than other modifiers with >
|
||||
:hi link javaConceptKind NonText
|
||||
|
||||
If you notice highlighting errors while scrolling backwards, which are fixed
|
||||
when redrawing with CTRL-L, try setting the "g:java_minlines" variable to
|
||||
a larger number: >
|
||||
@@ -2170,10 +2186,12 @@ cycles for such a feature to become either integrated into the platform or
|
||||
withdrawn from this effort. To cater for early adopters, there is optional
|
||||
support in Vim for syntax related preview features that are implemented. You
|
||||
can request it by specifying a list of preview feature numbers as follows: >
|
||||
:let g:java_syntax_previews = [430]
|
||||
:let g:java_syntax_previews = [455, 476]
|
||||
|
||||
The supported JEP numbers are to be drawn from this table:
|
||||
`430`: String Templates [JDK 21]
|
||||
`455`: Primitive types in Patterns, instanceof, and switch
|
||||
`476`: Module Import Declarations
|
||||
|
||||
Note that as soon as the particular preview feature will have been integrated
|
||||
into the Java platform, its entry will be removed from the table and related
|
||||
@@ -2181,7 +2199,7 @@ optionality will be discontinued.
|
||||
|
||||
|
||||
JSON *json.vim* *ft-json-syntax* *g:vim_json_conceal*
|
||||
*g:vim_json_warnings*
|
||||
*g:vim_json_warnings*
|
||||
|
||||
The json syntax file provides syntax highlighting with conceal support by
|
||||
default. To disable concealment: >
|
||||
@@ -2208,6 +2226,20 @@ define the vim variable 'lace_case_insensitive' in your startup file: >
|
||||
:let lace_case_insensitive=1
|
||||
|
||||
|
||||
LF (LFRC) *lf.vim* *ft-lf-syntax* *g:lf_shell_syntax*
|
||||
*b:lf_shell_syntax*
|
||||
|
||||
For the lf file manager configuration files (lfrc) the shell commands syntax
|
||||
highlighting can be changed globally and per buffer by setting a different
|
||||
'include' command search pattern using these variables: >
|
||||
let g:lf_shell_syntax = "syntax/dosbatch.vim"
|
||||
let b:lf_shell_syntax = "syntax/zsh.vim"
|
||||
|
||||
These variables are unset by default.
|
||||
|
||||
The default 'include' command search pattern is 'syntax/sh.vim'.
|
||||
|
||||
|
||||
LEX *lex.vim* *ft-lex-syntax*
|
||||
|
||||
Lex uses brute-force synchronizing as the "^%%$" section delimiter
|
||||
@@ -2509,6 +2541,13 @@ set "msql_minlines" to the value you desire. Example: >
|
||||
:let msql_minlines = 200
|
||||
|
||||
|
||||
NEOMUTT *neomutt.vim* *ft-neomuttrc-syntax*
|
||||
*ft-neomuttlog-syntax*
|
||||
|
||||
To disable the default NeoMutt log colors: >
|
||||
|
||||
:let g:neolog_disable_default_colors = 1
|
||||
|
||||
N1QL *n1ql.vim* *ft-n1ql-syntax*
|
||||
|
||||
N1QL is a SQL-like declarative language for manipulating JSON documents in
|
||||
@@ -2634,7 +2673,7 @@ To specify elements that should not be concealed, set the following variable: >
|
||||
|
||||
:let g:pandoc#syntax#conceal#blacklist = []
|
||||
|
||||
This is a list of the rules wich can be used here:
|
||||
This is a list of the rules which can be used here:
|
||||
|
||||
- titleblock
|
||||
- image
|
||||
@@ -2675,9 +2714,9 @@ specified. Default = 1 >
|
||||
|
||||
:let g:pandoc#syntax#codeblocks#embeds#use = 1
|
||||
|
||||
For specify what languages and using what syntax files to highlight embeds. This is a
|
||||
list of language names. When the language pandoc and vim use don't match, you
|
||||
can use the "PANDOC=VIM" syntax. For example: >
|
||||
For specify what languages and using what syntax files to highlight embeds.
|
||||
This is a list of language names. When the language pandoc and vim use don't
|
||||
match, you can use the "PANDOC=VIM" syntax. For example: >
|
||||
|
||||
:let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby", "bash=sh"]
|
||||
|
||||
@@ -3887,7 +3926,7 @@ set "tf_minlines" to the value you desire. Example: >
|
||||
:let tf_minlines = your choice
|
||||
<
|
||||
TYPESCRIPT *typescript.vim* *ft-typescript-syntax*
|
||||
*typescriptreact.vim* *ft-typescriptreact-syntax*
|
||||
*typescriptreact.vim* *ft-typescriptreact-syntax*
|
||||
|
||||
There is one option to control the TypeScript syntax highlighting.
|
||||
|
||||
@@ -3941,10 +3980,13 @@ mzscheme and embedded perl).
|
||||
Some folding is now supported with when 'foldmethod' is set to "syntax": >
|
||||
|
||||
g:vimsyn_folding == 0 or doesn't exist: no syntax-based folding
|
||||
g:vimsyn_folding =~ 'a' : augroups
|
||||
g:vimsyn_folding =~ 'a' : fold augroups
|
||||
g:vimsyn_folding =~ 'c' : fold Vim9 classes
|
||||
g:vimsyn_folding =~ 'e' : fold Vim9 enums
|
||||
g:vimsyn_folding =~ 'f' : fold functions
|
||||
g:vimsyn_folding =~ 'h' : fold heredocs
|
||||
g:vimsyn_folding =~ 'H' : fold Vim9-script legacy headers
|
||||
g:vimsyn_folding =~ 'i' : fold Vim9 interfaces
|
||||
g:vimsyn_folding =~ 'H' : fold Vim9 legacy headers
|
||||
g:vimsyn_folding =~ 'l' : fold Lua script
|
||||
g:vimsyn_folding =~ 'm' : fold MzScheme script
|
||||
g:vimsyn_folding =~ 'p' : fold Perl script
|
||||
@@ -5271,12 +5313,15 @@ of colors by using the `:colorscheme` command, for example: >
|
||||
This is basically the same as >
|
||||
:echo g:colors_name
|
||||
< In case g:colors_name has not been defined :colo will
|
||||
output "default". When compiled without the |+eval|
|
||||
feature it will output "unknown".
|
||||
output "default". Its palette is defined in the file
|
||||
"$VIMRUNTIME/syntax/syncolor.vim" and is based on
|
||||
legacy versions of peachpuff and desert. When compiled
|
||||
without the |+eval| feature it will output "unknown".
|
||||
|
||||
:colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath'
|
||||
for the file "colors/{name}.vim". The first one that
|
||||
is found is loaded.
|
||||
Use `:colo default` to load the default colorscheme.
|
||||
Also searches all plugins in 'packpath', first below
|
||||
"start" and then under "opt".
|
||||
|
||||
@@ -5680,8 +5725,8 @@ guisp={color-name} *highlight-guisp*
|
||||
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
|
||||
<
|
||||
If you are authoring a color scheme and use the same hexadecimal value
|
||||
repeatedly, you can define a (lower case) name for it in |v:colornames|.
|
||||
For example: >
|
||||
repeatedly, you can define a (lower case) name for it in
|
||||
|v:colornames|. For example: >
|
||||
|
||||
# provide a default value for this color but allow the user to
|
||||
# override it.
|
||||
@@ -5812,6 +5857,8 @@ PmenuThumb Popup menu: Thumb of the scrollbar.
|
||||
PmenuMatch Popup menu: Matched text in normal item.
|
||||
*hl-PmenuMatchSel*
|
||||
PmenuMatchSel Popup menu: Matched text in selected item.
|
||||
*hl-ComplMatchIns*
|
||||
ComplMatchIns Matched text of the currently inserted completion.
|
||||
*hl-PopupNotification*
|
||||
PopupNotification
|
||||
Popup window created with |popup_notification()|. If not
|
||||
@@ -6101,7 +6148,8 @@ This will set the "w:current_syntax" variable to "foo". The value of
|
||||
restoring "b:current_syntax", since the syntax files do set
|
||||
"b:current_syntax". The value set by the syntax file is assigned to
|
||||
"w:current_syntax".
|
||||
Note: This resets the 'spell', 'spellcapcheck' and 'spellfile' options.
|
||||
Note: This resets the 'spell', 'spellcapcheck', 'spellfile' and 'spelloptions'
|
||||
options.
|
||||
|
||||
Once a window has its own syntax, syntax commands executed from other windows
|
||||
on the same buffer (including :syntax clear) have no effect. Conversely,
|
||||
|
||||
@@ -134,6 +134,7 @@ $quote eval.txt /*$quote*
|
||||
'character' intro.txt /*'character'*
|
||||
'charconvert' options.txt /*'charconvert'*
|
||||
'ci' options.txt /*'ci'*
|
||||
'cia' options.txt /*'cia'*
|
||||
'cin' options.txt /*'cin'*
|
||||
'cindent' options.txt /*'cindent'*
|
||||
'cink' options.txt /*'cink'*
|
||||
@@ -161,6 +162,7 @@ $quote eval.txt /*$quote*
|
||||
'compatible' options.txt /*'compatible'*
|
||||
'complete' options.txt /*'complete'*
|
||||
'completefunc' options.txt /*'completefunc'*
|
||||
'completeitemalign' options.txt /*'completeitemalign'*
|
||||
'completeopt' options.txt /*'completeopt'*
|
||||
'completepopup' options.txt /*'completepopup'*
|
||||
'completeslash' options.txt /*'completeslash'*
|
||||
@@ -267,6 +269,7 @@ $quote eval.txt /*$quote*
|
||||
'fex' options.txt /*'fex'*
|
||||
'ff' options.txt /*'ff'*
|
||||
'ffs' options.txt /*'ffs'*
|
||||
'ffu' options.txt /*'ffu'*
|
||||
'fic' options.txt /*'fic'*
|
||||
'fileencoding' options.txt /*'fileencoding'*
|
||||
'fileencodings' options.txt /*'fileencodings'*
|
||||
@@ -275,6 +278,7 @@ $quote eval.txt /*$quote*
|
||||
'fileignorecase' options.txt /*'fileignorecase'*
|
||||
'filetype' options.txt /*'filetype'*
|
||||
'fillchars' options.txt /*'fillchars'*
|
||||
'findfunc' options.txt /*'findfunc'*
|
||||
'fixendofline' options.txt /*'fixendofline'*
|
||||
'fixeol' options.txt /*'fixeol'*
|
||||
'fk' options.txt /*'fk'*
|
||||
@@ -495,6 +499,7 @@ $quote eval.txt /*$quote*
|
||||
'menc' options.txt /*'menc'*
|
||||
'menuitems' options.txt /*'menuitems'*
|
||||
'mesg' vi_diff.txt /*'mesg'*
|
||||
'messagesopt' options.txt /*'messagesopt'*
|
||||
'mfd' options.txt /*'mfd'*
|
||||
'mh' options.txt /*'mh'*
|
||||
'mis' options.txt /*'mis'*
|
||||
@@ -512,6 +517,7 @@ $quote eval.txt /*$quote*
|
||||
'modelines' options.txt /*'modelines'*
|
||||
'modifiable' options.txt /*'modifiable'*
|
||||
'modified' options.txt /*'modified'*
|
||||
'mopt' options.txt /*'mopt'*
|
||||
'more' options.txt /*'more'*
|
||||
'mouse' options.txt /*'mouse'*
|
||||
'mousef' options.txt /*'mousef'*
|
||||
@@ -2121,10 +2127,12 @@ $quote eval.txt /*$quote*
|
||||
:GnatFind ft_ada.txt /*:GnatFind*
|
||||
:GnatPretty ft_ada.txt /*:GnatPretty*
|
||||
:GnatTags ft_ada.txt /*:GnatTags*
|
||||
:HelpToc helphelp.txt /*:HelpToc*
|
||||
:Hexplore pi_netrw.txt /*:Hexplore*
|
||||
:LP pi_logipat.txt /*:LP*
|
||||
:LPE pi_logipat.txt /*:LPE*
|
||||
:LPF pi_logipat.txt /*:LPF*
|
||||
:Launch pi_netrw.txt /*:Launch*
|
||||
:Lexplore pi_netrw.txt /*:Lexplore*
|
||||
:Lfilter quickfix.txt /*:Lfilter*
|
||||
:LogiPat pi_logipat.txt /*:LogiPat*
|
||||
@@ -2142,6 +2150,7 @@ $quote eval.txt /*$quote*
|
||||
:Ntree pi_netrw.txt /*:Ntree*
|
||||
:Nw pi_netrw.txt /*:Nw*
|
||||
:Nwrite pi_netrw.txt /*:Nwrite*
|
||||
:Open pi_netrw.txt /*:Open*
|
||||
:Over terminal.txt /*:Over*
|
||||
:P various.txt /*:P*
|
||||
:Pexplore pi_netrw.txt /*:Pexplore*
|
||||
@@ -2171,6 +2180,7 @@ $quote eval.txt /*$quote*
|
||||
:Termdebug terminal.txt /*:Termdebug*
|
||||
:TermdebugCommand terminal.txt /*:TermdebugCommand*
|
||||
:Texplore pi_netrw.txt /*:Texplore*
|
||||
:Tutor pi_tutor.txt /*:Tutor*
|
||||
:Until terminal.txt /*:Until*
|
||||
:Up terminal.txt /*:Up*
|
||||
:UseVimball pi_vimball.txt /*:UseVimball*
|
||||
@@ -2209,7 +2219,6 @@ $quote eval.txt /*$quote*
|
||||
:abo windows.txt /*:abo*
|
||||
:aboveleft windows.txt /*:aboveleft*
|
||||
:abstract vim9class.txt /*:abstract*
|
||||
:addd quickfix.txt /*:addd*
|
||||
:al windows.txt /*:al*
|
||||
:all windows.txt /*:all*
|
||||
:am gui.txt /*:am*
|
||||
@@ -2729,6 +2738,7 @@ $quote eval.txt /*$quote*
|
||||
:lab quickfix.txt /*:lab*
|
||||
:labove quickfix.txt /*:labove*
|
||||
:lad quickfix.txt /*:lad*
|
||||
:ladd quickfix.txt /*:ladd*
|
||||
:laddb quickfix.txt /*:laddb*
|
||||
:laddbuffer quickfix.txt /*:laddbuffer*
|
||||
:laddexpr quickfix.txt /*:laddexpr*
|
||||
@@ -3016,6 +3026,8 @@ $quote eval.txt /*$quote*
|
||||
:packadd repeat.txt /*:packadd*
|
||||
:packl repeat.txt /*:packl*
|
||||
:packloadall repeat.txt /*:packloadall*
|
||||
:pb windows.txt /*:pb*
|
||||
:pbuffer windows.txt /*:pbuffer*
|
||||
:pc windows.txt /*:pc*
|
||||
:pclose windows.txt /*:pclose*
|
||||
:pe if_perl.txt /*:pe*
|
||||
@@ -3046,9 +3058,9 @@ $quote eval.txt /*$quote*
|
||||
:promptrepl change.txt /*:promptrepl*
|
||||
:ps windows.txt /*:ps*
|
||||
:psearch windows.txt /*:psearch*
|
||||
:pt windows.txt /*:pt*
|
||||
:ptN tagsrch.txt /*:ptN*
|
||||
:ptNext tagsrch.txt /*:ptNext*
|
||||
:pta windows.txt /*:pta*
|
||||
:ptag windows.txt /*:ptag*
|
||||
:ptf tagsrch.txt /*:ptf*
|
||||
:ptfirst tagsrch.txt /*:ptfirst*
|
||||
@@ -4280,7 +4292,7 @@ E1179 options.txt /*E1179*
|
||||
E118 eval.txt /*E118*
|
||||
E1180 vim9.txt /*E1180*
|
||||
E1181 vim9.txt /*E1181*
|
||||
E1182 eval.txt /*E1182*
|
||||
E1182 vim9.txt /*E1182*
|
||||
E1183 eval.txt /*E1183*
|
||||
E1184 eval.txt /*E1184*
|
||||
E1185 various.txt /*E1185*
|
||||
@@ -4570,6 +4582,7 @@ E1510 change.txt /*E1510*
|
||||
E1511 options.txt /*E1511*
|
||||
E1512 options.txt /*E1512*
|
||||
E1513 message.txt /*E1513*
|
||||
E1514 options.txt /*E1514*
|
||||
E152 helphelp.txt /*E152*
|
||||
E153 helphelp.txt /*E153*
|
||||
E154 helphelp.txt /*E154*
|
||||
@@ -5775,6 +5788,7 @@ V visual.txt /*V*
|
||||
VIMINIT starting.txt /*VIMINIT*
|
||||
VMS os_vms.txt /*VMS*
|
||||
Vi intro.txt /*Vi*
|
||||
Vietnamese vietnamese.txt /*Vietnamese*
|
||||
View starting.txt /*View*
|
||||
Vim9 vim9.txt /*Vim9*
|
||||
Vim9-abstract-class vim9class.txt /*Vim9-abstract-class*
|
||||
@@ -5810,6 +5824,8 @@ W19 autocmd.txt /*W19*
|
||||
W20 if_pyth.txt /*W20*
|
||||
W21 if_pyth.txt /*W21*
|
||||
W22 userfunc.txt /*W22*
|
||||
W23 gui_x11.txt /*W23*
|
||||
W24 gui_x11.txt /*W24*
|
||||
WORD motion.txt /*WORD*
|
||||
WSL os_win32.txt /*WSL*
|
||||
WWW intro.txt /*WWW*
|
||||
@@ -6119,6 +6135,7 @@ b:changelog_name filetype.txt /*b:changelog_name*
|
||||
b:clojure_syntax_keywords syntax.txt /*b:clojure_syntax_keywords*
|
||||
b:clojure_syntax_without_core_keywords syntax.txt /*b:clojure_syntax_without_core_keywords*
|
||||
b:current_syntax-variable syntax.txt /*b:current_syntax-variable*
|
||||
b:lf_shell_syntax syntax.txt /*b:lf_shell_syntax*
|
||||
b:netrw_lastfile pi_netrw.txt /*b:netrw_lastfile*
|
||||
b:rust_cargo_avoid_whole_workspace ft_rust.txt /*b:rust_cargo_avoid_whole_workspace*
|
||||
b:rust_cargo_check_all_features ft_rust.txt /*b:rust_cargo_check_all_features*
|
||||
@@ -6147,6 +6164,8 @@ balloon_show() builtin.txt /*balloon_show()*
|
||||
balloon_split() builtin.txt /*balloon_split()*
|
||||
bar motion.txt /*bar*
|
||||
bars help.txt /*bars*
|
||||
base64_decode() builtin.txt /*base64_decode()*
|
||||
base64_encode() builtin.txt /*base64_encode()*
|
||||
base_font_name_list mbyte.txt /*base_font_name_list*
|
||||
basic.vim syntax.txt /*basic.vim*
|
||||
beep options.txt /*beep*
|
||||
@@ -6541,6 +6560,7 @@ compile-changes-8 version8.txt /*compile-changes-8*
|
||||
compile-changes-9 version9.txt /*compile-changes-9*
|
||||
compile-changes-9.2 version9.txt /*compile-changes-9.2*
|
||||
compiler-compaqada ft_ada.txt /*compiler-compaqada*
|
||||
compiler-cppcheck quickfix.txt /*compiler-cppcheck*
|
||||
compiler-decada ft_ada.txt /*compiler-decada*
|
||||
compiler-dotnet quickfix.txt /*compiler-dotnet*
|
||||
compiler-gcc quickfix.txt /*compiler-gcc*
|
||||
@@ -6550,10 +6570,16 @@ compiler-hpada ft_ada.txt /*compiler-hpada*
|
||||
compiler-javac quickfix.txt /*compiler-javac*
|
||||
compiler-make quickfix.txt /*compiler-make*
|
||||
compiler-manx quickfix.txt /*compiler-manx*
|
||||
compiler-maven quickfix.txt /*compiler-maven*
|
||||
compiler-mypy quickfix.txt /*compiler-mypy*
|
||||
compiler-pandoc quickfix.txt /*compiler-pandoc*
|
||||
compiler-perl quickfix.txt /*compiler-perl*
|
||||
compiler-pylint quickfix.txt /*compiler-pylint*
|
||||
compiler-pytest quickfix.txt /*compiler-pytest*
|
||||
compiler-pyunit quickfix.txt /*compiler-pyunit*
|
||||
compiler-ruff quickfix.txt /*compiler-ruff*
|
||||
compiler-select quickfix.txt /*compiler-select*
|
||||
compiler-spotbugs quickfix.txt /*compiler-spotbugs*
|
||||
compiler-tex quickfix.txt /*compiler-tex*
|
||||
compiler-typst quickfix.txt /*compiler-typst*
|
||||
compiler-vaxada ft_ada.txt /*compiler-vaxada*
|
||||
@@ -7110,6 +7136,7 @@ file-read insert.txt /*file-read*
|
||||
file-searching editing.txt /*file-searching*
|
||||
file-type filetype.txt /*file-type*
|
||||
file-types filetype.txt /*file-types*
|
||||
file-watcher editing.txt /*file-watcher*
|
||||
file_readable() builtin.txt /*file_readable()*
|
||||
filecopy() builtin.txt /*filecopy()*
|
||||
fileencoding-changed version6.txt /*fileencoding-changed*
|
||||
@@ -7195,6 +7222,7 @@ fold-create-marker fold.txt /*fold-create-marker*
|
||||
fold-delete-marker fold.txt /*fold-delete-marker*
|
||||
fold-diff fold.txt /*fold-diff*
|
||||
fold-expr fold.txt /*fold-expr*
|
||||
fold-expr-slow fold.txt /*fold-expr-slow*
|
||||
fold-foldcolumn fold.txt /*fold-foldcolumn*
|
||||
fold-foldlevel fold.txt /*fold-foldlevel*
|
||||
fold-foldtext fold.txt /*fold-foldtext*
|
||||
@@ -7318,6 +7346,8 @@ ft-html-omni insert.txt /*ft-html-omni*
|
||||
ft-html-syntax syntax.txt /*ft-html-syntax*
|
||||
ft-htmlos-syntax syntax.txt /*ft-htmlos-syntax*
|
||||
ft-ia64-syntax syntax.txt /*ft-ia64-syntax*
|
||||
ft-idris2-indent indent.txt /*ft-idris2-indent*
|
||||
ft-idris2-plugin filetype.txt /*ft-idris2-plugin*
|
||||
ft-inform-syntax syntax.txt /*ft-inform-syntax*
|
||||
ft-java-plugin filetype.txt /*ft-java-plugin*
|
||||
ft-java-syntax syntax.txt /*ft-java-syntax*
|
||||
@@ -7328,10 +7358,12 @@ ft-json-syntax syntax.txt /*ft-json-syntax*
|
||||
ft-ksh-syntax syntax.txt /*ft-ksh-syntax*
|
||||
ft-lace-syntax syntax.txt /*ft-lace-syntax*
|
||||
ft-lex-syntax syntax.txt /*ft-lex-syntax*
|
||||
ft-lf-syntax syntax.txt /*ft-lf-syntax*
|
||||
ft-lifelines-syntax syntax.txt /*ft-lifelines-syntax*
|
||||
ft-lisp-syntax syntax.txt /*ft-lisp-syntax*
|
||||
ft-lite-syntax syntax.txt /*ft-lite-syntax*
|
||||
ft-lpc-syntax syntax.txt /*ft-lpc-syntax*
|
||||
ft-lua-plugin filetype.txt /*ft-lua-plugin*
|
||||
ft-lua-syntax syntax.txt /*ft-lua-syntax*
|
||||
ft-mail-plugin filetype.txt /*ft-mail-plugin*
|
||||
ft-mail.vim syntax.txt /*ft-mail.vim*
|
||||
@@ -7360,8 +7392,11 @@ ft-msql-syntax syntax.txt /*ft-msql-syntax*
|
||||
ft-n1ql-syntax syntax.txt /*ft-n1ql-syntax*
|
||||
ft-nasm-syntax syntax.txt /*ft-nasm-syntax*
|
||||
ft-ncf-syntax syntax.txt /*ft-ncf-syntax*
|
||||
ft-neomuttlog-syntax syntax.txt /*ft-neomuttlog-syntax*
|
||||
ft-neomuttrc-syntax syntax.txt /*ft-neomuttrc-syntax*
|
||||
ft-nroff-syntax syntax.txt /*ft-nroff-syntax*
|
||||
ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax*
|
||||
ft-org-plugin filetype.txt /*ft-org-plugin*
|
||||
ft-pandoc-syntax syntax.txt /*ft-pandoc-syntax*
|
||||
ft-papp-syntax syntax.txt /*ft-papp-syntax*
|
||||
ft-pascal-syntax syntax.txt /*ft-pascal-syntax*
|
||||
@@ -7550,6 +7585,7 @@ g:gzip_exec pi_gzip.txt /*g:gzip_exec*
|
||||
g:hare_recommended_style ft_hare.txt /*g:hare_recommended_style*
|
||||
g:hare_space_error ft_hare.txt /*g:hare_space_error*
|
||||
g:haredoc_search_depth ft_hare.txt /*g:haredoc_search_depth*
|
||||
g:help_example_languages helphelp.txt /*g:help_example_languages*
|
||||
g:html_charset_override syntax.txt /*g:html_charset_override*
|
||||
g:html_diff_one_file syntax.txt /*g:html_diff_one_file*
|
||||
g:html_dynamic_folds syntax.txt /*g:html_dynamic_folds*
|
||||
@@ -7578,6 +7614,7 @@ g:html_use_encoding syntax.txt /*g:html_use_encoding*
|
||||
g:html_use_input_for_pc syntax.txt /*g:html_use_input_for_pc*
|
||||
g:html_use_xhtml syntax.txt /*g:html_use_xhtml*
|
||||
g:html_whole_filler syntax.txt /*g:html_whole_filler*
|
||||
g:lf_shell_syntax syntax.txt /*g:lf_shell_syntax*
|
||||
g:markdown_fenced_languages syntax.txt /*g:markdown_fenced_languages*
|
||||
g:markdown_minlines syntax.txt /*g:markdown_minlines*
|
||||
g:markdown_syntax_conceal syntax.txt /*g:markdown_syntax_conceal*
|
||||
@@ -7738,6 +7775,8 @@ g:typescript_host_keyword syntax.txt /*g:typescript_host_keyword*
|
||||
g:typst_cmd quickfix.txt /*g:typst_cmd*
|
||||
g:typst_conceal filetype.txt /*g:typst_conceal*
|
||||
g:typst_embedded_languages syntax.txt /*g:typst_embedded_languages*
|
||||
g:typst_folding filetype.txt /*g:typst_folding*
|
||||
g:typst_foldnested filetype.txt /*g:typst_foldnested*
|
||||
g:var eval.txt /*g:var*
|
||||
g:vim_indent indent.txt /*g:vim_indent*
|
||||
g:vim_indent_cont indent.txt /*g:vim_indent_cont*
|
||||
@@ -7817,6 +7856,7 @@ getbufinfo() builtin.txt /*getbufinfo()*
|
||||
getbufline() builtin.txt /*getbufline()*
|
||||
getbufoneline() builtin.txt /*getbufoneline()*
|
||||
getbufvar() builtin.txt /*getbufvar()*
|
||||
getcellpixels() builtin.txt /*getcellpixels()*
|
||||
getcellwidths() builtin.txt /*getcellwidths()*
|
||||
getchangelist() builtin.txt /*getchangelist()*
|
||||
getchar() builtin.txt /*getchar()*
|
||||
@@ -7824,9 +7864,11 @@ getcharmod() builtin.txt /*getcharmod()*
|
||||
getcharpos() builtin.txt /*getcharpos()*
|
||||
getcharsearch() builtin.txt /*getcharsearch()*
|
||||
getcharstr() builtin.txt /*getcharstr()*
|
||||
getcmdcomplpat() builtin.txt /*getcmdcomplpat()*
|
||||
getcmdcompltype() builtin.txt /*getcmdcompltype()*
|
||||
getcmdline() builtin.txt /*getcmdline()*
|
||||
getcmdpos() builtin.txt /*getcmdpos()*
|
||||
getcmdprompt() builtin.txt /*getcmdprompt()*
|
||||
getcmdscreenpos() builtin.txt /*getcmdscreenpos()*
|
||||
getcmdtype() builtin.txt /*getcmdtype()*
|
||||
getcmdwintype() builtin.txt /*getcmdwintype()*
|
||||
@@ -7866,6 +7908,7 @@ getscript-history pi_getscript.txt /*getscript-history*
|
||||
getscript-plugins pi_getscript.txt /*getscript-plugins*
|
||||
getscript-start pi_getscript.txt /*getscript-start*
|
||||
getscriptinfo() builtin.txt /*getscriptinfo()*
|
||||
getstacktrace() builtin.txt /*getstacktrace()*
|
||||
gettabinfo() builtin.txt /*gettabinfo()*
|
||||
gettabvar() builtin.txt /*gettabvar()*
|
||||
gettabwinvar() builtin.txt /*gettabwinvar()*
|
||||
@@ -8043,11 +8086,14 @@ hasmapto() builtin.txt /*hasmapto()*
|
||||
hebrew hebrew.txt /*hebrew*
|
||||
hebrew.txt hebrew.txt /*hebrew.txt*
|
||||
help helphelp.txt /*help*
|
||||
help-TOC helphelp.txt /*help-TOC*
|
||||
help-buffer-options helphelp.txt /*help-buffer-options*
|
||||
help-context help.txt /*help-context*
|
||||
help-curwin tips.txt /*help-curwin*
|
||||
help-notation helphelp.txt /*help-notation*
|
||||
help-summary usr_02.txt /*help-summary*
|
||||
help-tags tags 1
|
||||
help-toc-install helphelp.txt /*help-toc-install*
|
||||
help-translated helphelp.txt /*help-translated*
|
||||
help-writing helphelp.txt /*help-writing*
|
||||
help-xterm-window helphelp.txt /*help-xterm-window*
|
||||
@@ -8095,6 +8141,7 @@ hit-return message.txt /*hit-return*
|
||||
hitest.vim syntax.txt /*hitest.vim*
|
||||
hjkl usr_02.txt /*hjkl*
|
||||
hl-ColorColumn syntax.txt /*hl-ColorColumn*
|
||||
hl-ComplMatchIns syntax.txt /*hl-ComplMatchIns*
|
||||
hl-Conceal syntax.txt /*hl-Conceal*
|
||||
hl-CurSearch syntax.txt /*hl-CurSearch*
|
||||
hl-Cursor syntax.txt /*hl-Cursor*
|
||||
@@ -8366,6 +8413,7 @@ inactive-buffer windows.txt /*inactive-buffer*
|
||||
include-search tagsrch.txt /*include-search*
|
||||
inclusion helphelp.txt /*inclusion*
|
||||
inclusive motion.txt /*inclusive*
|
||||
inclusive-motion-selection-exclusive motion.txt /*inclusive-motion-selection-exclusive*
|
||||
incomp-small-6 version6.txt /*incomp-small-6*
|
||||
incompatible-5 version5.txt /*incompatible-5*
|
||||
incompatible-6 version6.txt /*incompatible-6*
|
||||
@@ -8551,6 +8599,7 @@ len() builtin.txt /*len()*
|
||||
less various.txt /*less*
|
||||
letter print.txt /*letter*
|
||||
lex.vim syntax.txt /*lex.vim*
|
||||
lf.vim syntax.txt /*lf.vim*
|
||||
lhaskell.vim syntax.txt /*lhaskell.vim*
|
||||
libcall() builtin.txt /*libcall()*
|
||||
libcallnr() builtin.txt /*libcallnr()*
|
||||
@@ -8866,6 +8915,7 @@ nb-protocol_errors netbeans.txt /*nb-protocol_errors*
|
||||
nb-special netbeans.txt /*nb-special*
|
||||
nb-terms netbeans.txt /*nb-terms*
|
||||
ncf.vim syntax.txt /*ncf.vim*
|
||||
neomutt.vim syntax.txt /*neomutt.vim*
|
||||
netbeans netbeans.txt /*netbeans*
|
||||
netbeans-commands netbeans.txt /*netbeans-commands*
|
||||
netbeans-configure netbeans.txt /*netbeans-configure*
|
||||
@@ -9109,7 +9159,6 @@ netrw-write pi_netrw.txt /*netrw-write*
|
||||
netrw-x pi_netrw.txt /*netrw-x*
|
||||
netrw-xfer pi_netrw.txt /*netrw-xfer*
|
||||
netrw.vim pi_netrw.txt /*netrw.vim*
|
||||
netrw_filehandler pi_netrw.txt /*netrw_filehandler*
|
||||
netterm-mouse options.txt /*netterm-mouse*
|
||||
network pi_netrw.txt /*network*
|
||||
new() vim9class.txt /*new()*
|
||||
@@ -9257,6 +9306,7 @@ o_CTRL-V motion.txt /*o_CTRL-V*
|
||||
o_V motion.txt /*o_V*
|
||||
o_object-select motion.txt /*o_object-select*
|
||||
o_v motion.txt /*o_v*
|
||||
obj-var-type-any vim9class.txt /*obj-var-type-any*
|
||||
object vim9class.txt /*object*
|
||||
object-const-variable vim9class.txt /*object-const-variable*
|
||||
object-empty() vim9class.txt /*object-empty()*
|
||||
@@ -9289,6 +9339,7 @@ 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-resulting-pos motion.txt /*operator-resulting-pos*
|
||||
operator-variable eval.txt /*operator-variable*
|
||||
option-backslash options.txt /*option-backslash*
|
||||
option-list quickref.txt /*option-list*
|
||||
@@ -9305,6 +9356,7 @@ options.txt options.txt /*options.txt*
|
||||
optwin options.txt /*optwin*
|
||||
or() builtin.txt /*or()*
|
||||
oracle ft_sql.txt /*oracle*
|
||||
os-support vi_diff.txt /*os-support*
|
||||
os2 os_os2.txt /*os2*
|
||||
os390 os_390.txt /*os390*
|
||||
os_390.txt os_390.txt /*os_390.txt*
|
||||
@@ -9416,6 +9468,7 @@ pi_netrw.txt pi_netrw.txt /*pi_netrw.txt*
|
||||
pi_paren.txt pi_paren.txt /*pi_paren.txt*
|
||||
pi_spec.txt pi_spec.txt /*pi_spec.txt*
|
||||
pi_tar.txt pi_tar.txt /*pi_tar.txt*
|
||||
pi_tutor.txt pi_tutor.txt /*pi_tutor.txt*
|
||||
pi_vimball.txt pi_vimball.txt /*pi_vimball.txt*
|
||||
pi_zip.txt pi_zip.txt /*pi_zip.txt*
|
||||
pkzip options.txt /*pkzip*
|
||||
@@ -9638,6 +9691,7 @@ quickfix-ID quickfix.txt /*quickfix-ID*
|
||||
quickfix-buffer quickfix.txt /*quickfix-buffer*
|
||||
quickfix-changedtick quickfix.txt /*quickfix-changedtick*
|
||||
quickfix-context quickfix.txt /*quickfix-context*
|
||||
quickfix-cppcheck quickfix.txt /*quickfix-cppcheck*
|
||||
quickfix-directory-stack quickfix.txt /*quickfix-directory-stack*
|
||||
quickfix-error-lists quickfix.txt /*quickfix-error-lists*
|
||||
quickfix-functions usr_41.txt /*quickfix-functions*
|
||||
@@ -10165,6 +10219,7 @@ sqrt() builtin.txt /*sqrt()*
|
||||
squirrel.vim syntax.txt /*squirrel.vim*
|
||||
srand() builtin.txt /*srand()*
|
||||
sscanf eval.txt /*sscanf*
|
||||
stacktrace-variable eval.txt /*stacktrace-variable*
|
||||
standard-plugin usr_05.txt /*standard-plugin*
|
||||
standard-plugin-list help.txt /*standard-plugin-list*
|
||||
standout syntax.txt /*standout*
|
||||
@@ -10183,6 +10238,7 @@ state() builtin.txt /*state()*
|
||||
static-tag tagsrch.txt /*static-tag*
|
||||
status-line windows.txt /*status-line*
|
||||
statusmsg-variable eval.txt /*statusmsg-variable*
|
||||
stl-%! options.txt /*stl-%!*
|
||||
stl-%{ options.txt /*stl-%{*
|
||||
str2float() builtin.txt /*str2float()*
|
||||
str2list() builtin.txt /*str2list()*
|
||||
@@ -10214,12 +10270,19 @@ strstr() builtin.txt /*strstr()*
|
||||
strtrans() builtin.txt /*strtrans()*
|
||||
strutf16len() builtin.txt /*strutf16len()*
|
||||
strwidth() builtin.txt /*strwidth()*
|
||||
style-braces develop.txt /*style-braces*
|
||||
style-changes develop.txt /*style-changes*
|
||||
style-clang-format develop.txt /*style-clang-format*
|
||||
style-comments develop.txt /*style-comments*
|
||||
style-common-functions develop.txt /*style-common-functions*
|
||||
style-compiler develop.txt /*style-compiler*
|
||||
style-declarations develop.txt /*style-declarations*
|
||||
style-examples develop.txt /*style-examples*
|
||||
style-functions develop.txt /*style-functions*
|
||||
style-indentation develop.txt /*style-indentation*
|
||||
style-names develop.txt /*style-names*
|
||||
style-spaces develop.txt /*style-spaces*
|
||||
style-types develop.txt /*style-types*
|
||||
style-various develop.txt /*style-various*
|
||||
sub-menu-priority gui.txt /*sub-menu-priority*
|
||||
sub-replace-\= change.txt /*sub-replace-\\=*
|
||||
@@ -10598,6 +10661,7 @@ template autocmd.txt /*template*
|
||||
tempname() builtin.txt /*tempname()*
|
||||
term++close terminal.txt /*term++close*
|
||||
term++open terminal.txt /*term++open*
|
||||
term++shell terminal.txt /*term++shell*
|
||||
term-dependent-settings term.txt /*term-dependent-settings*
|
||||
term-list syntax.txt /*term-list*
|
||||
term.txt term.txt /*term.txt*
|
||||
@@ -10644,7 +10708,9 @@ termdebug-starting terminal.txt /*termdebug-starting*
|
||||
termdebug-stepping terminal.txt /*termdebug-stepping*
|
||||
termdebug-timeout terminal.txt /*termdebug-timeout*
|
||||
termdebug-variables terminal.txt /*termdebug-variables*
|
||||
termdebug_contributing terminal.txt /*termdebug_contributing*
|
||||
termdebug_disasm_window terminal.txt /*termdebug_disasm_window*
|
||||
termdebug_evaluate_in_popup terminal.txt /*termdebug_evaluate_in_popup*
|
||||
termdebug_map_K terminal.txt /*termdebug_map_K*
|
||||
termdebug_map_minus terminal.txt /*termdebug_map_minus*
|
||||
termdebug_map_plus terminal.txt /*termdebug_map_plus*
|
||||
@@ -10676,6 +10742,7 @@ terminal-job-index index.txt /*terminal-job-index*
|
||||
terminal-key-codes term.txt /*terminal-key-codes*
|
||||
terminal-mouse term.txt /*terminal-mouse*
|
||||
terminal-ms-windows terminal.txt /*terminal-ms-windows*
|
||||
terminal-nospecial terminal.txt /*terminal-nospecial*
|
||||
terminal-options term.txt /*terminal-options*
|
||||
terminal-output-codes term.txt /*terminal-output-codes*
|
||||
terminal-resizing terminal.txt /*terminal-resizing*
|
||||
@@ -10854,6 +10921,7 @@ using-menus gui.txt /*using-menus*
|
||||
using-scripts repeat.txt /*using-scripts*
|
||||
using-xxd tips.txt /*using-xxd*
|
||||
using_CTRL-V map.txt /*using_CTRL-V*
|
||||
usr usr_toc.txt /*usr*
|
||||
usr_01.txt usr_01.txt /*usr_01.txt*
|
||||
usr_02.txt usr_02.txt /*usr_02.txt*
|
||||
usr_03.txt usr_03.txt /*usr_03.txt*
|
||||
@@ -10972,6 +11040,7 @@ v:shell_error eval.txt /*v:shell_error*
|
||||
v:sizeofint eval.txt /*v:sizeofint*
|
||||
v:sizeoflong eval.txt /*v:sizeoflong*
|
||||
v:sizeofpointer eval.txt /*v:sizeofpointer*
|
||||
v:stacktrace eval.txt /*v:stacktrace*
|
||||
v:statusmsg eval.txt /*v:statusmsg*
|
||||
v:swapchoice eval.txt /*v:swapchoice*
|
||||
v:swapcommand eval.txt /*v:swapcommand*
|
||||
@@ -11187,6 +11256,15 @@ vi-features vi_diff.txt /*vi-features*
|
||||
vi: options.txt /*vi:*
|
||||
vi_diff.txt vi_diff.txt /*vi_diff.txt*
|
||||
vib motion.txt /*vib*
|
||||
vietnamese vietnamese.txt /*vietnamese*
|
||||
vietnamese-ime_diff vietnamese.txt /*vietnamese-ime_diff*
|
||||
vietnamese-intro vietnamese.txt /*vietnamese-intro*
|
||||
vietnamese-keymap vietnamese.txt /*vietnamese-keymap*
|
||||
vietnamese-l10n vietnamese.txt /*vietnamese-l10n*
|
||||
vietnamese-telex_utf-8 vietnamese.txt /*vietnamese-telex_utf-8*
|
||||
vietnamese-viqr_utf-8 vietnamese.txt /*vietnamese-viqr_utf-8*
|
||||
vietnamese-vni_utf-8 vietnamese.txt /*vietnamese-vni_utf-8*
|
||||
vietnamese.txt vietnamese.txt /*vietnamese.txt*
|
||||
view starting.txt /*view*
|
||||
view-diffs diff.txt /*view-diffs*
|
||||
view-file starting.txt /*view-file*
|
||||
@@ -11213,6 +11291,9 @@ vim-script-intro usr_41.txt /*vim-script-intro*
|
||||
vim-script-library eval.txt /*vim-script-library*
|
||||
vim-security intro.txt /*vim-security*
|
||||
vim-shebang various.txt /*vim-shebang*
|
||||
vim-tutor-create pi_tutor.txt /*vim-tutor-create*
|
||||
vim-tutor-mode pi_tutor.txt /*vim-tutor-mode*
|
||||
vim-tutor-usage pi_tutor.txt /*vim-tutor-usage*
|
||||
vim-use intro.txt /*vim-use*
|
||||
vim-variable eval.txt /*vim-variable*
|
||||
vim.b if_lua.txt /*vim.b*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*term.txt* For Vim version 9.1. Last change: 2024 May 05
|
||||
*term.txt* For Vim version 9.1. Last change: 2024 Dec 31
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -292,11 +292,11 @@ entry in /etc/termcap and everything should work.
|
||||
On some systems (at least on FreeBSD with XFree86 3.1.2) the codes that the
|
||||
<End> and <Home> keys send contain a <Nul> character. To make these keys send
|
||||
the proper key code, add these lines to your ~/.Xdefaults file:
|
||||
|
||||
*VT100.Translations: #override \n\
|
||||
<Key>Home: string("0x1b") string("[7~") \n\
|
||||
<Key>End: string("0x1b") string("[8~")
|
||||
|
||||
>
|
||||
*VT100.Translations: #override \n\
|
||||
<Key>Home: string("0x1b") string("[7~") \n\
|
||||
<Key>End: string("0x1b") string("[8~")
|
||||
<
|
||||
*xterm-8bit* *xterm-8-bit*
|
||||
Xterm can be run in a mode where it uses 8-bit escape sequences. The CSI code
|
||||
is used instead of <Esc>[. The advantage is that an <Esc> can quickly be
|
||||
@@ -688,10 +688,11 @@ The default values are set like this: >
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
|
||||
Some terminals accept the same sequences, but with all semicolons replaced by
|
||||
colons (this is actually more compatible, but less widely supported): >
|
||||
let &t_8f = "\<Esc>[38:2:%lu:%lu:%lum"
|
||||
let &t_8b = "\<Esc>[48:2:%lu:%lu:%lum"
|
||||
Some terminals accept similar sequences, with semicolons replaced by colons
|
||||
and an extra colon after the number 2 (this is conformant to the ISO 8613-6
|
||||
standard, but less widely supported): >
|
||||
let &t_8f = "\<Esc>[38:2::%lu:%lu:%lum"
|
||||
let &t_8b = "\<Esc>[48:2::%lu:%lu:%lum"
|
||||
|
||||
These options contain printf strings, with |printf()| (actually, its C
|
||||
equivalent hence `l` modifier) invoked with the t_ option value and three
|
||||
@@ -719,9 +720,9 @@ If this feature is enabled by the 't_fe' sequence, special key sequences are
|
||||
sent from the terminal to Vim every time the terminal gains or loses focus.
|
||||
Vim fires focus events (|FocusGained|/|FocusLost|) by handling them accordingly.
|
||||
Focus event tracking is disabled by a 't_fd' sequence when exiting "raw" mode.
|
||||
If you would like to disable this feature, add the following to your .vimrc:
|
||||
`set t_fd=`
|
||||
`set t_fe=`
|
||||
If you would like to disable this feature, add the following to your .vimrc: >
|
||||
set t_fd=
|
||||
set t_fe=
|
||||
If your terminal does support this but Vim does not recognize the terminal,
|
||||
you may have to set the options yourself: >
|
||||
let &t_fe = "\<Esc>[?1004h"
|
||||
@@ -810,13 +811,13 @@ region. It should be set to an empty string otherwise.
|
||||
Note for xterm users: The shifted cursor keys normally don't work. You can
|
||||
make them work with the xmodmap command and some mappings in Vim.
|
||||
|
||||
Give these commands in the xterm:
|
||||
Give these commands in the xterm: >
|
||||
xmodmap -e "keysym Up = Up F13"
|
||||
xmodmap -e "keysym Down = Down F16"
|
||||
xmodmap -e "keysym Left = Left F18"
|
||||
xmodmap -e "keysym Right = Right F19"
|
||||
|
||||
And use these mappings in Vim:
|
||||
<
|
||||
And use these mappings in Vim: >
|
||||
:map <t_F3> <S-Up>
|
||||
:map! <t_F3> <S-Up>
|
||||
:map <t_F6> <S-Down>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2024 Jul 28
|
||||
*terminal.txt* For Vim version 9.1. Last change: 2024 Dec 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -197,6 +197,16 @@ Command syntax ~
|
||||
if [command] is NONE no job is started, the pty of the
|
||||
terminal can be used by a command like gdb.
|
||||
|
||||
If [command] outputs NUL bytes, those will be
|
||||
converted to new lines |NL-used-for-Nul|.
|
||||
|
||||
*terminal-nospecial*
|
||||
Vim itself only recognizes |cmdline-special|
|
||||
characters inside [command]. Everything else will be
|
||||
passed untouched. When needed to expand wildcards,
|
||||
environment variables or other shell specials consider
|
||||
|term++shell| option.
|
||||
|
||||
If [command] is missing the default behavior is to
|
||||
close the terminal when the shell exits. This can be
|
||||
changed with the ++noclose argument.
|
||||
@@ -241,10 +251,16 @@ Command syntax ~
|
||||
no window will be used.
|
||||
++norestore Do not include this terminal window
|
||||
in a session file.
|
||||
|
||||
*term++shell*
|
||||
++shell Instead of executing {command}
|
||||
directly, use a shell, like with
|
||||
`:!command` *E279*
|
||||
{only works on Unix and MS-Windows}
|
||||
The resulting command will look like
|
||||
'shell' 'shellcmdflag' [command]
|
||||
Other options related to `:!command`
|
||||
have no effect.
|
||||
++kill={how} When trying to close the terminal
|
||||
window kill the job with {how}. See
|
||||
|term_setkill()| for the values.
|
||||
@@ -1537,6 +1553,7 @@ If there is no g:termdebug_config you can use: >
|
||||
<
|
||||
However, the latter form will be deprecated in future releases.
|
||||
|
||||
|
||||
Mappings ~
|
||||
The termdebug plugin enables a few default mappings. All those mappings
|
||||
are reset to their original values once the termdebug session concludes.
|
||||
@@ -1591,6 +1608,7 @@ If the current window has enough horizontal space, it will be vertically split
|
||||
and the Var window will be shown side by side with the source code window (and
|
||||
the height options won't be used).
|
||||
|
||||
|
||||
Communication ~
|
||||
*termdebug-communication*
|
||||
There is another, hidden, buffer, which is used for Vim to communicate with
|
||||
@@ -1675,18 +1693,23 @@ If there is no g:termdebug_config you can use: >
|
||||
|
||||
However, the latter form will be deprecated in future releases.
|
||||
|
||||
|
||||
Change default signs ~
|
||||
*termdebug_signs*
|
||||
Termdebug uses the hex number of the breakpoint ID in the signcolumn to
|
||||
represent breakpoints. if it is greater than "0xFF", then it will be displayed
|
||||
represent breakpoints. If it is greater than "0xFF", then it will be displayed
|
||||
as "F+", due to we really only have two screen cells for the sign.
|
||||
You may also use decimal breakpoint signs instead, in which case IDs greater
|
||||
than 99 will be displayed as "9+".
|
||||
|
||||
If you want to customize the breakpoint signs: >
|
||||
If you want to customize the breakpoint signs to show `>>` in the signcolumn: >
|
||||
let g:termdebug_config['sign'] = '>>'
|
||||
If there is no g:terminal_config yet you can use: >
|
||||
If you would like to use decimal (base 10) breakpoint signs: >
|
||||
let g:termdebug_config['sign_decimal'] = 1
|
||||
If the variable g:termdebug_config does not yet exist, you can use: >
|
||||
let g:termdebug_config = {'sign': '>>'}
|
||||
|
||||
After this, breakpoints will be displayed as `>>` in the signcolumn.
|
||||
Likewise, to enable decimal signs: >
|
||||
let g:termdebug_config = {'sign_decimal': 1}
|
||||
|
||||
|
||||
Window toolbar ~
|
||||
@@ -1716,4 +1739,37 @@ Set the wide value to 1 to use a vertical split without ever changing
|
||||
'columns'. This is useful when the terminal can't be resized by Vim.
|
||||
|
||||
|
||||
Evaluate in Popup Window at Cursor ~
|
||||
*termdebug_evaluate_in_popup*
|
||||
By default |:Evaluate| will simply echo its output. For larger entities this
|
||||
might become difficult to read or even truncated.
|
||||
Alternatively, the evaluation result may be output into a popup window at the
|
||||
current cursor position: >
|
||||
let g:termdebug_config['evaluate_in_popup'] = v:true
|
||||
This can also be used in a "one-shot" manner: >
|
||||
func OnCursorHold()
|
||||
let g:termdebug_config['evaluate_in_popup'] = v:true
|
||||
:Evaluate
|
||||
let g:termdebug_config['evaluate_in_popup'] = v:false
|
||||
endfunc
|
||||
<
|
||||
|
||||
Contributing ~
|
||||
*termdebug_contributing*
|
||||
Contributions for termdebug improvements are welcome.
|
||||
However, it is fairly common that during the development process you need some
|
||||
mechanisms like `echo` statements (or similar) to help you in your job.
|
||||
For this reason, you can set: >
|
||||
let g:termdebug_config['debug'] = true
|
||||
<
|
||||
This sets the `DEBUG` variable to `true`, which can be referenced in the
|
||||
source code. An example of its usage follows: >
|
||||
if exists('g:termdebug_loaded')
|
||||
if DEBUG
|
||||
Echoerr('Termdebug already loaded.')
|
||||
endif
|
||||
finish
|
||||
endif
|
||||
<
|
||||
|
||||
vim:tw=78:ts=8:noet:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*todo.txt* For Vim version 9.1. Last change: 2024 Jul 11
|
||||
*todo.txt* For Vim version 9.1. Last change: 2024 Dec 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -38,9 +38,6 @@ browser use: https://github.com/vim/vim/issues/1234
|
||||
*known-bugs*
|
||||
-------------------- Known bugs and current work -----------------------
|
||||
|
||||
FILETYPE_FILE is defined to the same value in multiple places.
|
||||
Only use the one in feature.h. Others too.
|
||||
|
||||
Mapping with modifier is not recognized after a partial mapping. Probably
|
||||
because the typeahead was simplified when looking for a matching mapping.
|
||||
Need to somehow undo the simplification. #12002
|
||||
@@ -58,36 +55,21 @@ When a help item can't be found, then open 'helpfile'. Search for the tag in
|
||||
that file and gtive E149 only when not found. Helps for a tiny Vim installed
|
||||
without all the help files.
|
||||
|
||||
SpellCap highlight not updated - PR #12428
|
||||
|
||||
Virtual text problems:
|
||||
- If 'list' is on, 'below' virtual text which includes 1 or 2 characters are
|
||||
gone (Issue #12028)
|
||||
- Virtual text aligned "above": Wrong indentation when using tabs (Issue
|
||||
#12232)
|
||||
- Virtual text to the right of the line that isn't visible doesn't cause the
|
||||
'extends' character to show in 'list' mode. #12478
|
||||
- Virtual text to the right of the line that fits exactly on screen causes
|
||||
that line and all lines below it not to be displayed (Issue #12213)
|
||||
- Window screen gets wrong when a virtual text is placed on 'above' or
|
||||
'below' on an empty line (Issue #11959)
|
||||
- truncated Virtual text below an empty line causes display error #12493
|
||||
|
||||
When 'virtualedit' is "all" and 'cursorcolumn' is set, the wrong column may be
|
||||
highlighted. (van-de-bugger, 2018 Jan 23, #2576)
|
||||
|
||||
Improve profiling by caching matching functions: PR #12192
|
||||
|
||||
With 'smoothscroll' set and "lastline" in 'display', moving the cursor to a
|
||||
wrapping line that makes the display scroll up may scroll much more than
|
||||
needed, thus jump-scrolling. (part of issue 12411)
|
||||
|
||||
Implement foreach() PR #12166
|
||||
|
||||
Errors when running tests with valgrind:
|
||||
- test_codestyle.vim: e.g.:
|
||||
command line..script /home/mool/vim/vim90/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 6: keycode_check.vim: space before tab: Expected 0 but got 7
|
||||
command line..script /home/mool/vim/vim90/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 10: setup.vim: trailing white space: Expected 0 but got 23
|
||||
command line..script /home/mool/vim/vim91/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 6: keycode_check.vim: space before tab: Expected 0 but got 7
|
||||
command line..script /home/mool/vim/vim91/src/testdir/runtest.vim[569]..function RunTheTest[52]..Test_test_files line 10: setup.vim: trailing white space: Expected 0 but got 23
|
||||
- test_gui.vim:
|
||||
Found errors in Test_gui_mouse_event():
|
||||
|
||||
@@ -120,7 +102,6 @@ Upcoming larger works:
|
||||
|
||||
Further Vim9 improvements:
|
||||
- Classes and Interfaces. See |vim9-classes|
|
||||
- Cannot use class type of itself in the method (Issue #12369)
|
||||
- Getting member of variable with "any" type should be handled at runtime.
|
||||
Remove temporary solution from #12096 / patch 9.0.1375.
|
||||
- "obj.Method()" does not always work in a compiled function, assumes "obj"
|
||||
@@ -130,9 +111,6 @@ Further Vim9 improvements:
|
||||
Possibly issue #11981 can be fixed at the same time (has two examples).
|
||||
- Forward declaration of a class? E.g. for Clone() function.
|
||||
Email lifepillar 2023 Mar 26
|
||||
- When "Meta" is a class, is "const MetaAlias = Meta" allowed? It should
|
||||
either work or given an error. Possibly give an error now and implement it
|
||||
later (using a typedef). #12006
|
||||
- how about lock/unlock?
|
||||
- For chaining, allow using the class name as type for function return
|
||||
value.
|
||||
@@ -150,7 +128,7 @@ Further Vim9 improvements:
|
||||
has(featureName), len(someString)
|
||||
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
|
||||
- The use of the literal value "null" and the type specific "null_xxx"
|
||||
values is confusing (#13458, #11770).
|
||||
values is confusing (#13433, #11770).
|
||||
|
||||
Information missing in terminfo:
|
||||
- Codes used for focus gained and lost termcodes are hard-coded in
|
||||
@@ -228,8 +206,6 @@ Popup windows:
|
||||
positioned? PopupNew? Could be used to set some options or move it out of
|
||||
the way. (#5737)
|
||||
However, it may also cause trouble, changing the popup of another plugin.
|
||||
- Width is not computed correctly when minwidth and maxwidth are &columns
|
||||
and padding and a scrollbar are used. (#6676)
|
||||
- Should popup_getoptions() also return the mask? #7774
|
||||
- Add a way to use popup_menu() synchronously: instead of invoking the
|
||||
callback, return the choice. (Ben Jackson, #6534)
|
||||
@@ -299,8 +275,6 @@ Terminal emulator window:
|
||||
- Use CTRL-W CTRL-K to enter a digraph? #5371
|
||||
- When Vim runs in the terminal and changes the title, the statusline needs to
|
||||
be redrawn.
|
||||
- GUI: When using ":set go+=!" a system() call causes the hit-enter prompt.
|
||||
(#3327)
|
||||
- Allow for specifying the directory, with ++cwd={dir}.
|
||||
- When pasting should call vterm_keyboard_start_paste(), e.g. when using
|
||||
K_MIDDLEMOUSE, calling insert_reg().
|
||||
@@ -326,9 +300,6 @@ Cursor is after the end of the line: #12137.
|
||||
|
||||
Crash when a variable is removed while listing variables (Issue #11435)
|
||||
|
||||
Autoconf: must use autoconf 2.69, later version generates lots of warnings
|
||||
- try using autoconf 2.71 and fix all "obsolete" warnings #11322
|
||||
|
||||
Problem with Visual highlight when 'linebreak' and 'showbreak' are set.
|
||||
#11272
|
||||
|
||||
@@ -346,8 +317,6 @@ Support dark mode for MS-Windows: #12282
|
||||
Remote command escapes single quote with backslash, should be doubling the
|
||||
single quote in vim_strsave_escaped_ext() #12202.
|
||||
|
||||
PR to add custom and customlist completion types. #12228
|
||||
|
||||
Can deref_func_name() and deref_function_name() be merged?
|
||||
|
||||
Using :global with a pattern containing \zs doesn't use the line where \zs
|
||||
@@ -1124,9 +1093,6 @@ Problem with 'delcombine'. (agguser, 2017 Nov 10, #2313)
|
||||
MS-Windows: buffer completion doesn't work when using backslash (or slash)
|
||||
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 more runtime files.
|
||||
|
||||
Window not closed when deleting buffer. (Harm te Hennepe, 2017 Aug 27, #2029)
|
||||
@@ -4232,8 +4198,6 @@ Vim script language:
|
||||
char2hex() convert char string to hex string.
|
||||
crypt() encrypt string
|
||||
decrypt() decrypt string
|
||||
base64enc() base 64 encoding
|
||||
base64dec() base 64 decoding
|
||||
attributes() return file protection flags "drwxrwxrwx"
|
||||
shorten(fname) shorten a file name, like home_replace()
|
||||
perl(cmd) call Perl and return string
|
||||
@@ -4780,13 +4744,9 @@ Insert mode completion/expansion:
|
||||
(Prabir Shrestha, 2017 May 19, #1713)
|
||||
- When 'completeopt' has "noselect" does not insert a newline.
|
||||
(Lifepillar, 2017 Apr 23, #1653)
|
||||
- Can 'completeopt' be made buffer-local? (#5487)
|
||||
- When complete() first argument is before where insert started and
|
||||
'backspace' is Vi compatible, the completion fails.
|
||||
(Hirohito Higashi, 2015 Feb 19)
|
||||
- The CompleteDone autocommand needs some info passed to it:
|
||||
- The word that was selected (empty if abandoned complete)
|
||||
- Type of completion: tag, omnifunc, user func.
|
||||
- When a:base in 'completefunc' starts with a number it's passed as a
|
||||
number, not a string. (Sean Ma) Need to add flag to call_func_retlist()
|
||||
to force a string value.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*undo.txt* For Vim version 9.1. Last change: 2022 Jun 02
|
||||
*undo.txt* For Vim version 9.1. Last change: 2024 Nov 09
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -164,13 +164,13 @@ This is explained in the user manual: |usr_32.txt|.
|
||||
g- Go to older text state. With a count repeat that many
|
||||
times.
|
||||
*:ea* *:earlier*
|
||||
:earlier {count} Go to older text state {count} times.
|
||||
:earlier {N}s Go to older text state about {N} seconds before.
|
||||
:earlier {N}m Go to older text state about {N} minutes before.
|
||||
:earlier {N}h Go to older text state about {N} hours before.
|
||||
:earlier {N}d Go to older text state about {N} days before.
|
||||
:ea[rlier] {count} Go to older text state {count} times.
|
||||
:ea[rlier] {N}s Go to older text state about {N} seconds before.
|
||||
:ea[rlier] {N}m Go to older text state about {N} minutes before.
|
||||
:ea[rlier] {N}h Go to older text state about {N} hours before.
|
||||
:ea[rlier] {N}d Go to older text state about {N} days before.
|
||||
|
||||
:earlier {N}f Go to older text state {N} file writes before.
|
||||
:ea[rlier] {N}f Go to older text state {N} file writes before.
|
||||
When changes were made since the last write
|
||||
":earlier 1f" will revert the text to the state when
|
||||
it was written. Otherwise it will go to the write
|
||||
@@ -183,13 +183,13 @@ g- Go to older text state. With a count repeat that many
|
||||
g+ Go to newer text state. With a count repeat that many
|
||||
times.
|
||||
*:lat* *:later*
|
||||
:later {count} Go to newer text state {count} times.
|
||||
:later {N}s Go to newer text state about {N} seconds later.
|
||||
:later {N}m Go to newer text state about {N} minutes later.
|
||||
:later {N}h Go to newer text state about {N} hours later.
|
||||
:later {N}d Go to newer text state about {N} days later.
|
||||
:lat[er] {count} Go to newer text state {count} times.
|
||||
:lat[er] {N}s Go to newer text state about {N} seconds later.
|
||||
:lat[er] {N}m Go to newer text state about {N} minutes later.
|
||||
:lat[er] {N}h Go to newer text state about {N} hours later.
|
||||
:lat[er] {N}d Go to newer text state about {N} days later.
|
||||
|
||||
:later {N}f Go to newer text state {N} file writes later.
|
||||
:lat[er] {N}f Go to newer text state {N} file writes later.
|
||||
When at the state of the last file write, ":later 1f"
|
||||
will go to the newest text state.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_01.txt* For Vim version 9.1. Last change: 2024 May 11
|
||||
*usr_01.txt* For Vim version 9.1. Last change: 2024 Dec 17
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -107,19 +107,25 @@ For more info see |vimrc| and |compatible-default|.
|
||||
==============================================================================
|
||||
*01.3* Using the Vim tutor *tutor* *vimtutor*
|
||||
|
||||
For the interactive tutor, see |vim-tutor-mode|
|
||||
|
||||
Instead of reading the text (boring!) you can use the vimtutor to learn your
|
||||
first Vim commands. This is a 30-minute tutorial that teaches the most basic
|
||||
Vim functionality hands-on.
|
||||
first Vim commands. This is a 30-minute tutorial provided in 2 chapters, that
|
||||
teaches the most basic Vim functionality hands-on.
|
||||
|
||||
On Unix, if Vim has been properly installed, you can start it from the shell:
|
||||
>
|
||||
vimtutor
|
||||
|
||||
On MS-Windows you can find it in the Program/Vim menu. Or execute
|
||||
vimtutor.bat in the $VIMRUNTIME directory.
|
||||
On MS-Windows you can find it in the "Program/Vim 9.1" menu. Or execute
|
||||
vimtutor.bat from the installation directory (You can use `:echo $VIMRUNTIME`
|
||||
from within Vim to find this directory).
|
||||
|
||||
This will make a copy of the tutor file, so that you can edit it without
|
||||
the risk of damaging the original.
|
||||
This will make a copy of chapter 1 tutor file, so that you can edit it without
|
||||
the risk of damaging the original. To continue with chapter 2, you can use
|
||||
the following command: >
|
||||
vimtutor -c 2
|
||||
<
|
||||
There are a few translated versions of the tutor. To find out if yours is
|
||||
available, use the two-letter language code. For French: >
|
||||
|
||||
@@ -140,13 +146,13 @@ On other systems, you have to do a little work:
|
||||
|
||||
1. Copy the tutor file. You can do this with Vim (it knows where to find it):
|
||||
>
|
||||
vim --clean -c 'e $VIMRUNTIME/tutor/tutor' -c 'w! TUTORCOPY' -c 'q'
|
||||
vim --clean -c 'e $VIMRUNTIME/tutor/tutor1' -c 'w! TUTORCOPY' -c 'q'
|
||||
<
|
||||
This will write the file "TUTORCOPY" in the current directory. To use a
|
||||
translated version of the tutor, append the two-letter language code to the
|
||||
filename. For French:
|
||||
>
|
||||
vim --clean -c 'e $VIMRUNTIME/tutor/tutor.fr' -c 'w! TUTORCOPY' -c 'q'
|
||||
vim --clean -c 'e $VIMRUNTIME/tutor/tutor1.fr' -c 'w! TUTORCOPY' -c 'q'
|
||||
<
|
||||
2. Edit the copied file with Vim:
|
||||
>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_02.txt* For Vim version 9.1. Last change: 2021 Apr 24
|
||||
*usr_02.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -32,7 +32,7 @@ To start Vim, enter this command: >
|
||||
In UNIX you can type this at any command prompt. If you are running Microsoft
|
||||
Windows, open a Command Prompt and enter the command.
|
||||
In either case, Vim starts editing a file called file.txt. Because this
|
||||
is a new file, you get a blank window. This is what your screen will look
|
||||
is a new file, you get a blank window. This is what your screen will look
|
||||
like:
|
||||
|
||||
+---------------------------------------+
|
||||
@@ -322,7 +322,7 @@ the "a" (append) command.
|
||||
to
|
||||
and that's not saying much for the turtle!!! ~
|
||||
|
||||
move the cursor over to the dot at the end of the line. Then type "x" to
|
||||
move the cursor over to the dot at the end of the line. Then type "x" to
|
||||
delete the period. The cursor is now positioned at the end of the line on the
|
||||
e in turtle. Now type >
|
||||
|
||||
@@ -535,7 +535,7 @@ Summary: *help-summary* >
|
||||
< 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
|
||||
4) Normal mode commands do not have a prefix. To go to the help page for the
|
||||
"gt" command: >
|
||||
:help gt
|
||||
|
||||
@@ -585,7 +585,7 @@ Summary: *help-summary* >
|
||||
at: >
|
||||
:help pattern.txt
|
||||
|
||||
12) Registers always start with "quote". To find out about the special ":"
|
||||
12) Registers always start with "quote". To find out about the special ":"
|
||||
register: >
|
||||
:help quote:
|
||||
|
||||
@@ -604,7 +604,7 @@ Summary: *help-summary* >
|
||||
< talks about the append Vim script function rather than how to append text
|
||||
in the current buffer.
|
||||
|
||||
14) Mappings are talked about in the help page :h |map.txt|. Use >
|
||||
14) Mappings are talked about in the help page :h |map.txt|. Use >
|
||||
:help mapmode-i
|
||||
< to find out about the |:imap| command. Also use :map-topic
|
||||
to find out about certain subtopics particular for mappings. e.g: >
|
||||
@@ -640,7 +640,7 @@ Summary: *help-summary* >
|
||||
friendly way. Start at |usr_toc.txt| to find the table of content (as you
|
||||
might have guessed): >
|
||||
:help usr_toc.txt
|
||||
< Skim over the contents to find interesting topics. The "Digraphs" and
|
||||
< Skim over the contents to find interesting topics. The "Digraphs" and
|
||||
"Entering special characters" items are in chapter 24, so to go to that
|
||||
particular help page: >
|
||||
:help usr_24.txt
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_05.txt* For Vim version 9.1. Last change: 2024 Jun 28
|
||||
*usr_05.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -446,7 +446,7 @@ This way you can use the plugin with the default key bindings `gc` and similar
|
||||
for commenting (which is a well-established mapping in the Vim community).
|
||||
|
||||
If you add this line to your vimrc file, then you need to restart Vim to have
|
||||
the package loaded. Once the package is loaded, read about it at: >
|
||||
the package loaded. Once the package is loaded, read about it at: >
|
||||
:h comment.txt
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_06.txt* For Vim version 9.1. Last change: 2021 Nov 07
|
||||
*usr_06.txt* For Vim version 9.1. Last change: 2024 Oct 05
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -184,7 +184,7 @@ this command: >
|
||||
:runtime syntax/colortest.vim
|
||||
|
||||
You will see text in various color combinations. You can check which ones are
|
||||
readable and look nice. These aren't the only colors available to you though.
|
||||
readable and look nice. These aren't the only colors available to you though.
|
||||
You can specify #rrggbb hex colors and you can define new names for hex
|
||||
colors in |v:colornames| like so: >
|
||||
|
||||
@@ -196,7 +196,7 @@ to define these colors only when they do not exist: >
|
||||
call extend(v:colornames, {'mine_red': '#aa0000'}, 'keep')
|
||||
|
||||
This allows users of the color scheme to override the precise definition of
|
||||
that color prior to loading your color scheme. For example, in a |.vimrc|
|
||||
that color prior to loading your color scheme. For example, in a |.vimrc|
|
||||
file: >
|
||||
|
||||
runtime colors/lists/css_colors.vim
|
||||
@@ -204,7 +204,7 @@ file: >
|
||||
colorscheme yourscheme
|
||||
|
||||
As a color scheme author, you should be able to rely on some color names for
|
||||
GUI colors. These are defined in `colors/lists/default.vim`. All such files
|
||||
GUI colors. These are defined in `colors/lists/default.vim`. All such files
|
||||
found on the |'runtimepath'| are loaded each time the colorscheme command is
|
||||
run. A canonical list is provided by the vim distribution, which should
|
||||
include all X11 colors (previously defined in rgb.txt).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*usr_10.txt* For Vim version 9.1. Last change: 2019 Nov 22
|
||||
*usr_10.txt* For Vim version 9.1. Last change: 2024 Nov 12
|
||||
|
||||
VIM USER MANUAL - by Bram Moolenaar
|
||||
|
||||
@@ -736,6 +736,11 @@ The "!!" command filters the current line through a filter. In Unix the "date"
|
||||
command prints the current time and date. "!!date<Enter>" replaces the current
|
||||
line with the output of "date". This is useful to add a timestamp to a file.
|
||||
|
||||
Note: There is a difference between "!cmd" (e.g. using it without any file
|
||||
range) and "{range}!cmd". While the former will simply execute the external
|
||||
command and Vim will show the output, the latter will filter {range}lines
|
||||
through the filter and replace that range by the result of the filter command.
|
||||
See |:!| and |:range!| for details.
|
||||
|
||||
WHEN IT DOESN'T WORK
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user