mirror of
https://github.com/zoriya/vim.git
synced 2025-12-11 17:56:17 +00:00
Compare commits
1292 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
32f649e1fc | ||
|
|
2dfb38659c | ||
|
|
10d77eb6ac | ||
|
|
e0659a680c | ||
|
|
adc2182c40 | ||
|
|
337ae06ff9 | ||
|
|
27b6056d85 | ||
|
|
96bcc5e6cd | ||
|
|
42431a7aa0 | ||
|
|
316dca03ca | ||
|
|
4228bec0ae | ||
|
|
30fec7bc7f | ||
|
|
21377c8d5f | ||
|
|
b3c5284c5b | ||
|
|
b05b10a3c0 | ||
|
|
cab49dff91 | ||
|
|
a29a37d533 | ||
|
|
0b2f94db23 | ||
|
|
662db673f9 | ||
|
|
e9d4b58dda | ||
|
|
fd30cd41dc | ||
|
|
f63c49d4e9 | ||
|
|
6eb634ef1f | ||
|
|
ec737235c7 | ||
|
|
b4b0a08c81 | ||
|
|
ba7cc9f83f | ||
|
|
4cf35c2fa4 | ||
|
|
0c1f3f4d49 | ||
|
|
c725c0ad9b | ||
|
|
ede547afcf | ||
|
|
128773b21d | ||
|
|
e698addf88 | ||
|
|
49789dc987 | ||
|
|
2f70a34e2e | ||
|
|
0065402f9a | ||
|
|
c30846f525 | ||
|
|
cab35ad26d | ||
|
|
c2b4c62d0b | ||
|
|
542512a3e5 | ||
|
|
b75d09d42b | ||
|
|
c41fc713ba | ||
|
|
e627fb00fc | ||
|
|
b292a2a04c | ||
|
|
4e509b6369 | ||
|
|
5ec3aea854 | ||
|
|
d58e929fa2 | ||
|
|
95474ca34c | ||
|
|
ba81e4660b | ||
|
|
b18919146d | ||
|
|
1d87f516f2 | ||
|
|
6145285c90 | ||
|
|
acf1728ef5 | ||
|
|
c98d5ee923 | ||
|
|
3c2d6534ef | ||
|
|
5e3d6ca435 | ||
|
|
f3d419d719 | ||
|
|
445edda2f9 | ||
|
|
4124e72373 | ||
|
|
164c60f5b1 | ||
|
|
d2c340a6a6 | ||
|
|
e279335752 | ||
|
|
48ac02c9eb | ||
|
|
2a8a3ecb67 | ||
|
|
13d831ff0c | ||
|
|
fd0e75683f | ||
|
|
6d0efdaab5 | ||
|
|
870b05c4c0 | ||
|
|
d91f704b03 | ||
|
|
7eb4652e74 | ||
|
|
b0d3f878a4 | ||
|
|
9980835c68 | ||
|
|
946ffd4606 | ||
|
|
657ae0bddd | ||
|
|
de1b092c77 | ||
|
|
7a8ef14c69 | ||
|
|
b57aa92d2c | ||
|
|
f82a2d2e5f | ||
|
|
9c26303293 | ||
|
|
0215e8e15b | ||
|
|
540fc6fbdb | ||
|
|
45d9d02d71 | ||
|
|
81af9250a7 | ||
|
|
7c5676b5d6 | ||
|
|
56f7804065 | ||
|
|
3d27070767 | ||
|
|
9c52c3a0a1 | ||
|
|
2e2e13ca14 | ||
|
|
e980d8a934 | ||
|
|
005c3c27ee | ||
|
|
bf9680e441 | ||
|
|
863053d1d4 | ||
|
|
94950a9ee0 | ||
|
|
4161dccada | ||
|
|
d4ddfafc2a | ||
|
|
df6b11e955 | ||
|
|
f666f0e5c0 | ||
|
|
ef2f028a66 | ||
|
|
0785ccf995 | ||
|
|
4dbbff57ba | ||
|
|
0818b87cbf | ||
|
|
96e5ceed93 | ||
|
|
166af9bb6f | ||
|
|
644d37b84d | ||
|
|
00b78c17b2 | ||
|
|
7ad7d01074 | ||
|
|
03531f79c3 | ||
|
|
3c53160348 | ||
|
|
66b4bf8980 | ||
|
|
bf55e1442d | ||
|
|
67b3f99eb0 | ||
|
|
a3e7b1f42b | ||
|
|
2a8caa414e | ||
|
|
37dd018cdd | ||
|
|
27d9eceb66 | ||
|
|
22e193ddd5 | ||
|
|
2d0860d06c | ||
|
|
dba01a0197 | ||
|
|
16a6165bb3 | ||
|
|
0536570fa2 | ||
|
|
2d73ff4500 | ||
|
|
b3ae56cf2b | ||
|
|
ee236d0d19 | ||
|
|
3ca71f1f1f | ||
|
|
beca055b0c | ||
|
|
22df3f90fc | ||
|
|
c395a3aac2 | ||
|
|
fc3c83e47e | ||
|
|
264e9fd61b | ||
|
|
6b5ef067a5 | ||
|
|
786989ba37 | ||
|
|
8bbe993c79 | ||
|
|
ebbcb824ba | ||
|
|
b8e86705ca | ||
|
|
bd74325960 | ||
|
|
727c876b78 | ||
|
|
483c5d80a7 | ||
|
|
680eeca955 | ||
|
|
f75d498844 | ||
|
|
b60574ba21 | ||
|
|
464c92545a | ||
|
|
77a0aa457d | ||
|
|
78f74a91bf | ||
|
|
a4f332b44c | ||
|
|
624891f3ef | ||
|
|
d5784f9fc4 | ||
|
|
423f97277d | ||
|
|
341ad7a699 | ||
|
|
4a74803ef8 | ||
|
|
c2a406b317 | ||
|
|
d622beb3c3 | ||
|
|
a8fc79895e | ||
|
|
173c98550f | ||
|
|
3967692f9e | ||
|
|
417f5e7f11 | ||
|
|
f9b5ef8c88 | ||
|
|
3c9ab1c0e0 | ||
|
|
006590697c | ||
|
|
62b42181fb | ||
|
|
b05034a4ed | ||
|
|
d32a99a6d9 | ||
|
|
3368ea2152 | ||
|
|
2eea198564 | ||
|
|
24ea3babed | ||
|
|
60bb4e1b46 | ||
|
|
217d285fdd | ||
|
|
73a92fe013 | ||
|
|
66e1f8860a | ||
|
|
832f80e310 | ||
|
|
c24b6977a1 | ||
|
|
da9836cfa9 | ||
|
|
7f03644116 | ||
|
|
35f330c0d2 | ||
|
|
db84e4599c | ||
|
|
d04f440259 | ||
|
|
d732f9aee0 | ||
|
|
10d4664330 | ||
|
|
abf39e880d | ||
|
|
e00289df69 | ||
|
|
755bd26c59 | ||
|
|
bb3d5dc320 | ||
|
|
cda000e97f | ||
|
|
4421d6af22 | ||
|
|
bfc8b97639 | ||
|
|
dc685aba75 | ||
|
|
daf3b39559 | ||
|
|
673b87b577 | ||
|
|
35a3423c6a | ||
|
|
4a474d36d7 | ||
|
|
b744b2fa32 | ||
|
|
2a988a162c | ||
|
|
0fcd237614 | ||
|
|
6b6eedfc1c | ||
|
|
580061a821 | ||
|
|
31710268ed | ||
|
|
f354981d4b | ||
|
|
7900f14991 | ||
|
|
8df7f88890 | ||
|
|
2f1e050414 | ||
|
|
0e97531298 | ||
|
|
2bd6a1b542 | ||
|
|
0be992e347 | ||
|
|
d7b734a493 | ||
|
|
ede981a27f | ||
|
|
fae6c1a02d | ||
|
|
9bc040c8e1 | ||
|
|
0ee8df9ce5 | ||
|
|
d70b2a8355 | ||
|
|
7fc0c065f0 | ||
|
|
2d7c47de45 | ||
|
|
d5ee95f964 | ||
|
|
d54a688130 | ||
|
|
9de9997949 | ||
|
|
bc226b6ded | ||
|
|
314f11d44c | ||
|
|
b61f95c31f | ||
|
|
82d1c33a8a | ||
|
|
6af737fdb4 | ||
|
|
4eccc3e301 | ||
|
|
5eba45c74b | ||
|
|
3479c5dc48 | ||
|
|
e2b590ebf6 | ||
|
|
463ee340d0 | ||
|
|
09092155a6 | ||
|
|
83687a7215 | ||
|
|
a0a2d437c2 | ||
|
|
96118f3e38 | ||
|
|
2d231cb89c | ||
|
|
5a7d7cde15 | ||
|
|
db41fa255d | ||
|
|
06583f137b | ||
|
|
1549e29af4 | ||
|
|
c0cba4d9b1 | ||
|
|
b92159d59e | ||
|
|
7ba6ed34fe | ||
|
|
bebca9daa4 | ||
|
|
706e84b3ea | ||
|
|
311dc17d96 | ||
|
|
d3dd26658c | ||
|
|
dd10ce91a8 | ||
|
|
6ab1cc4d65 | ||
|
|
33aea1875c | ||
|
|
0390ded91b | ||
|
|
c3d2c4478d | ||
|
|
3737f8988c | ||
|
|
97cfe90de8 | ||
|
|
e90ee31c40 | ||
|
|
076e8b2a0b | ||
|
|
84f888a5b3 | ||
|
|
74cbdf0334 | ||
|
|
a9d0cba165 | ||
|
|
5c3bd0a0fb | ||
|
|
e4ce65d445 | ||
|
|
257a9c873f | ||
|
|
3ea5fa7a11 | ||
|
|
1affd72471 | ||
|
|
80a7dcf8b5 | ||
|
|
150a1321b2 | ||
|
|
280a29f931 | ||
|
|
a411e5d97d | ||
|
|
3832c466d7 | ||
|
|
f9bb734367 | ||
|
|
006d2b036b | ||
|
|
a68cac57de | ||
|
|
5aae419afe | ||
|
|
245803840b | ||
|
|
7f0f621c4c | ||
|
|
57adda1e90 | ||
|
|
bf65051b7b | ||
|
|
61a91766f7 | ||
|
|
4b22cdb060 | ||
|
|
413177336f | ||
|
|
bdc975cdfe | ||
|
|
bbdcb4848a | ||
|
|
3f97ebf730 | ||
|
|
e04abda52f | ||
|
|
90df5507c0 | ||
|
|
3a0ae77fe6 | ||
|
|
9379f83030 | ||
|
|
4b26dff329 | ||
|
|
92096d529e | ||
|
|
c0f15ce171 | ||
|
|
44886d93c4 | ||
|
|
1a509df322 | ||
|
|
f4274feeef | ||
|
|
f9d5ca1de4 | ||
|
|
7e88c3dc19 | ||
|
|
00ec6854e3 | ||
|
|
95e8579e1c | ||
|
|
121d95f7d1 | ||
|
|
3b0dd7cd35 | ||
|
|
a539df01f8 | ||
|
|
d1cb65e440 | ||
|
|
a621a03839 | ||
|
|
760d14a55c | ||
|
|
7805004319 | ||
|
|
ca8a4dfe7a | ||
|
|
3b1c48569d | ||
|
|
a9d52e3b79 | ||
|
|
a26559b553 | ||
|
|
460fbaca72 | ||
|
|
8408a9ad9b | ||
|
|
f878bcfb2e | ||
|
|
68392724b8 | ||
|
|
8b68277fdc | ||
|
|
0e1673aef4 | ||
|
|
3b72f1d2aa | ||
|
|
48bae372e9 | ||
|
|
30a8635b56 | ||
|
|
40af4e3903 | ||
|
|
1587a1e37d | ||
|
|
8ada2cca0a | ||
|
|
16c98f9c9f | ||
|
|
92048a3110 | ||
|
|
162bd91564 | ||
|
|
8e46927a32 | ||
|
|
1dba0fbb7a | ||
|
|
477db060eb | ||
|
|
6e202e52b7 | ||
|
|
e0021c79a5 | ||
|
|
c6485bceb1 | ||
|
|
2929160846 | ||
|
|
59c0395e6b | ||
|
|
5ac3b1aae2 | ||
|
|
8765a4ac3a | ||
|
|
3b95389d45 | ||
|
|
611df5b96e | ||
|
|
5e109c4ab0 | ||
|
|
0ed0eea206 | ||
|
|
f82bac3717 | ||
|
|
c3301874a6 | ||
|
|
6fc45b55fc | ||
|
|
7fd7320014 | ||
|
|
fa0ff9aedf | ||
|
|
8d9b40e71a | ||
|
|
0fe849a13b | ||
|
|
0ad014c8a0 | ||
|
|
904fb861e7 | ||
|
|
22b306f3e0 | ||
|
|
d68554d4fe | ||
|
|
bed7beca58 | ||
|
|
8220a6813e | ||
|
|
7510fe7433 | ||
|
|
e6dc573b6e | ||
|
|
170bf1aed5 | ||
|
|
365bdf7a7b | ||
|
|
eb80f04f6e | ||
|
|
1b20d3d608 | ||
|
|
1deee627fa | ||
|
|
59f931ef54 | ||
|
|
72ada0f8c2 | ||
|
|
ffbbcb597c | ||
|
|
2c3b1d9976 | ||
|
|
904c622b10 | ||
|
|
5dff57d714 | ||
|
|
9f5e36bc60 | ||
|
|
b31e4383cd | ||
|
|
4f99eae082 | ||
|
|
fa9a37096d | ||
|
|
4c3a326c53 | ||
|
|
2a7e2a6254 | ||
|
|
ca8c9867c2 | ||
|
|
f691b84fba | ||
|
|
f70e3d6c7e | ||
|
|
d497a30cbe | ||
|
|
f5963f719e | ||
|
|
c88ebf7fa8 | ||
|
|
8a09b98ff1 | ||
|
|
27c735b2f8 | ||
|
|
fa5d1e63c7 | ||
|
|
2334b6d594 | ||
|
|
766fb0d2b2 | ||
|
|
c89533b525 | ||
|
|
e06c188bbf | ||
|
|
cdda8fe1c6 | ||
|
|
60aad974be | ||
|
|
ce69e82711 | ||
|
|
b65905262b | ||
|
|
b8521960d6 | ||
|
|
c095b280df | ||
|
|
5bedfc6091 | ||
|
|
9c44972817 | ||
|
|
cb9d45cb84 | ||
|
|
49771f4fb0 | ||
|
|
c7040a5615 | ||
|
|
704ac92541 | ||
|
|
fa01c39d48 | ||
|
|
973bd47c48 | ||
|
|
fcb7ab6117 | ||
|
|
9e193ac732 | ||
|
|
97ff9de4a5 | ||
|
|
25f076536f | ||
|
|
3804aebf60 | ||
|
|
368373e909 | ||
|
|
a7781e0516 | ||
|
|
c400cb9ca7 | ||
|
|
01a8f38fcd | ||
|
|
d160c34019 | ||
|
|
d28478b557 | ||
|
|
16d79a3b62 | ||
|
|
4d32c2d31f | ||
|
|
69154f22a6 | ||
|
|
607cc1e015 | ||
|
|
6df6f47d6d | ||
|
|
dc536095ac | ||
|
|
72597a57b5 | ||
|
|
9855d6b361 | ||
|
|
5074e3018b | ||
|
|
fdf732eed7 | ||
|
|
7c86f4cca3 | ||
|
|
85363abfb1 | ||
|
|
ac550fdb4b | ||
|
|
0d2e4fce8d | ||
|
|
55d5c0348c | ||
|
|
bd5e15fd5c | ||
|
|
02c707a87d | ||
|
|
76b96fc08b | ||
|
|
58f0a1f8e1 | ||
|
|
c5604bc165 | ||
|
|
f91787cb9a | ||
|
|
11505dcd2b | ||
|
|
624c7aa691 | ||
|
|
349b2fb048 | ||
|
|
0ba042961f | ||
|
|
26dcc7e8df | ||
|
|
61623362be | ||
|
|
865242e121 | ||
|
|
23c347c66b | ||
|
|
66bd1c9b54 | ||
|
|
1a38442dbc | ||
|
|
b28ebbca84 | ||
|
|
c8bbaa3b18 | ||
|
|
cc448b373d | ||
|
|
d43848c0dd | ||
|
|
164fca39bd | ||
|
|
7abcaab78d | ||
|
|
0c56c60a0f | ||
|
|
1c727d8208 | ||
|
|
4d770fb566 | ||
|
|
2cefbedaab | ||
|
|
b02cbe3468 | ||
|
|
69f787af84 | ||
|
|
a9dc375744 | ||
|
|
a3f4166286 | ||
|
|
cabf20199a | ||
|
|
dc781a79b4 | ||
|
|
700303e8f7 | ||
|
|
3acfc30409 | ||
|
|
9028b10dfe | ||
|
|
7e6d3bd3da | ||
|
|
893eaab41f | ||
|
|
622925875c | ||
|
|
9c754c4542 | ||
|
|
06a108f34c | ||
|
|
0bc380a96b | ||
|
|
d04b7507fd | ||
|
|
b0b508808f | ||
|
|
84e67dfa9c | ||
|
|
ab8205e8b8 | ||
|
|
ccd9ccfa59 | ||
|
|
e667c95335 | ||
|
|
0af8cebc6c | ||
|
|
996343d38e | ||
|
|
b2c0350c67 | ||
|
|
730cde924c | ||
|
|
a800b42975 | ||
|
|
d69980f9dd | ||
|
|
644044794e | ||
|
|
0eda7ac7f8 | ||
|
|
51f53dfe17 | ||
|
|
182c5be111 | ||
|
|
ba52cde53d | ||
|
|
e242b83535 | ||
|
|
e77fb8ca53 | ||
|
|
f506c5bb1c | ||
|
|
7cfea75ed6 | ||
|
|
370df58df9 | ||
|
|
883f5d08e4 | ||
|
|
a8ffcbbf5d | ||
|
|
191e0a2bc7 | ||
|
|
80794b1ce6 | ||
|
|
31c8f28cca | ||
|
|
46f9d49601 | ||
|
|
9ea339d58c | ||
|
|
8bcf9654dc | ||
|
|
97ea511bbf | ||
|
|
f9b0129f5f | ||
|
|
6f0d3dd270 | ||
|
|
d5b3a2cbd9 | ||
|
|
cdddaa46a2 | ||
|
|
6a3c997104 | ||
|
|
e0c6a656f3 | ||
|
|
9d6650f6c4 | ||
|
|
debe25a2a5 | ||
|
|
fd29f4628e | ||
|
|
1950c3529b | ||
|
|
56be950094 | ||
|
|
860cae1cec | ||
|
|
945e2dbb63 | ||
|
|
f949563afa | ||
|
|
a76638f47d | ||
|
|
2c704a77c1 | ||
|
|
9160441955 | ||
|
|
bbd6afe03e | ||
|
|
04c9bafa71 | ||
|
|
8cd213c09a | ||
|
|
83d09bb85e | ||
|
|
914703bee2 | ||
|
|
20a825ae0f | ||
|
|
a3ff49fdcc | ||
|
|
6ed8ed84f9 | ||
|
|
fd3e5dc97f | ||
|
|
a17d4c1934 | ||
|
|
504a82173c | ||
|
|
d96699e696 | ||
|
|
8f1f629d85 | ||
|
|
6773b2ba7e | ||
|
|
644fdff7c1 | ||
|
|
9db580634c | ||
|
|
f05e3b0220 | ||
|
|
cdf04208f3 | ||
|
|
97bc5a52c9 | ||
|
|
bc42c1e427 | ||
|
|
5d4c25b335 | ||
|
|
04fa5427b8 | ||
|
|
0e1e25fb0a | ||
|
|
1d68952a3e | ||
|
|
167632fcdd | ||
|
|
6a18eb6f62 | ||
|
|
83ad0147c0 | ||
|
|
07e8db1da5 | ||
|
|
64354da438 | ||
|
|
b230bd5a16 | ||
|
|
9d72807646 | ||
|
|
6a244fefd9 | ||
|
|
442b4225d3 | ||
|
|
e66194a54e | ||
|
|
7db5fc838a | ||
|
|
55debbe384 | ||
|
|
c39125d7c4 | ||
|
|
1d2beae176 | ||
|
|
be18d10fd4 | ||
|
|
b26e6327e6 | ||
|
|
67c5384434 | ||
|
|
ca7e1f2066 | ||
|
|
06b5d5167a | ||
|
|
db7c686ea5 | ||
|
|
b382ad13ca | ||
|
|
f50a2533d0 | ||
|
|
6dc79f2890 | ||
|
|
6019078ece | ||
|
|
7a329911b9 | ||
|
|
c6af8125c7 | ||
|
|
218116c1d0 | ||
|
|
fa7584cb86 | ||
|
|
b702c84d0d | ||
|
|
4890f1f7f4 | ||
|
|
6323508e5e | ||
|
|
4a9b19ace8 | ||
|
|
76e69cef0c | ||
|
|
edac185487 | ||
|
|
927edbd134 | ||
|
|
30bb41445c | ||
|
|
cfc0eee85f | ||
|
|
0bbabe8080 | ||
|
|
823a165119 | ||
|
|
40e6a71c67 | ||
|
|
64486671c3 | ||
|
|
13c4c5da67 | ||
|
|
ff312a4eb8 | ||
|
|
8ce55d13c4 | ||
|
|
2767c60008 | ||
|
|
2e530fa526 | ||
|
|
281798deab | ||
|
|
34b4daf2b7 | ||
|
|
4137564709 | ||
|
|
546b35e190 | ||
|
|
2dfa4d7c13 | ||
|
|
23d99ec5f7 | ||
|
|
fc2d5bdfc6 | ||
|
|
864665d1b2 | ||
|
|
abb8d0b23a | ||
|
|
0b65f8938b | ||
|
|
fff2beeeaa | ||
|
|
00a927d62b | ||
|
|
f1eeae94fd | ||
|
|
70b11cdd56 | ||
|
|
7871a50071 | ||
|
|
9c0044df7c | ||
|
|
2efbc66e26 | ||
|
|
f9ddb94283 | ||
|
|
9dbe4758b1 | ||
|
|
6af0506370 | ||
|
|
2321c9255e | ||
|
|
e685079848 | ||
|
|
9577c3e973 | ||
|
|
54ab0f1e54 | ||
|
|
38ab0e21b8 | ||
|
|
eb4883fabc | ||
|
|
103e6efc84 | ||
|
|
ccbab93b42 | ||
|
|
ae61bcf0ab | ||
|
|
0387e653c8 | ||
|
|
ad249fb74c | ||
|
|
ceb45be4d3 | ||
|
|
317fd3ae3b | ||
|
|
5ea0ac77b3 | ||
|
|
dfdf3c446f | ||
|
|
63fa526b50 | ||
|
|
d25bc23870 | ||
|
|
46475520d7 | ||
|
|
06975a4a98 | ||
|
|
70c49c1af4 | ||
|
|
53339b2877 | ||
|
|
216b71069a | ||
|
|
94127e4abc | ||
|
|
b52073ac11 | ||
|
|
baff0fec3f | ||
|
|
b91e59b0f3 | ||
|
|
639a2554e4 | ||
|
|
8c79cafcfa | ||
|
|
9b73a78ed7 | ||
|
|
08bb82e8c5 | ||
|
|
9c27fc3dba | ||
|
|
97e7a84b6d | ||
|
|
33cfa2b0ee | ||
|
|
595a7bee57 | ||
|
|
581f6dc94d | ||
|
|
37d619f896 | ||
|
|
be678f86d1 | ||
|
|
12682fda7a | ||
|
|
66ca320d9e | ||
|
|
42d57f0017 | ||
|
|
42624592cb | ||
|
|
f679a43dbb | ||
|
|
2498b3ab10 | ||
|
|
8b9c05fa54 | ||
|
|
8006d69d3c | ||
|
|
5e3dae8b6b | ||
|
|
42b4ddab95 | ||
|
|
58cb0898a3 | ||
|
|
8cac9fd020 | ||
|
|
1a89bbe849 | ||
|
|
86ce1cc086 | ||
|
|
72b73c12dc | ||
|
|
89c0ea4ea1 | ||
|
|
3fac56e87e | ||
|
|
a4e782eee0 | ||
|
|
48f80c276b | ||
|
|
25153e127d | ||
|
|
f4d7f944ba | ||
|
|
54c1b4965b | ||
|
|
83bac8b756 | ||
|
|
8a33e74dd2 | ||
|
|
bacd9da40e | ||
|
|
8c83ac3d83 | ||
|
|
175aa24846 | ||
|
|
3a0573acae | ||
|
|
33d0b69ab8 | ||
|
|
165641da25 | ||
|
|
0b69c73411 | ||
|
|
0ca4b350f0 | ||
|
|
b4990bf90b | ||
|
|
0413d48711 | ||
|
|
6dfc28be25 | ||
|
|
cee6a352b2 | ||
|
|
6427c608e7 | ||
|
|
990bb661a1 | ||
|
|
f86f26c06a | ||
|
|
4d526ad35a | ||
|
|
d21d9a6c61 | ||
|
|
c5d5d01ad9 | ||
|
|
6d1dcffc35 | ||
|
|
da4d7a92d5 | ||
|
|
0dbf720d86 | ||
|
|
38ef43b262 | ||
|
|
5075aad6a8 | ||
|
|
7ad01410da | ||
|
|
8d8ef0b0b9 | ||
|
|
fc307fa1a6 | ||
|
|
d836bb90ab | ||
|
|
e4ebd29ea9 | ||
|
|
3ee0229f64 | ||
|
|
c4e4198730 | ||
|
|
6b29b0e809 | ||
|
|
3d63e3f160 | ||
|
|
7e506b6a42 | ||
|
|
6d8027a6c2 | ||
|
|
8065d7fd9c | ||
|
|
2660c0ea9b | ||
|
|
3ea38ef239 | ||
|
|
f68f656213 | ||
|
|
c0880db674 | ||
|
|
9db9d9ce05 | ||
|
|
555cdc2f8c | ||
|
|
3e8cb58725 | ||
|
|
5890b2cf9e | ||
|
|
e37d79928d | ||
|
|
ef3c1a7fd7 | ||
|
|
a17c9cebd3 | ||
|
|
7608643f38 | ||
|
|
d8e21d3deb | ||
|
|
5c73622a90 | ||
|
|
8f3f58f2c3 | ||
|
|
28c3795987 | ||
|
|
ba07ce32cc | ||
|
|
6f97701373 | ||
|
|
70d60e9da1 | ||
|
|
742d1ecd17 | ||
|
|
281daf62aa | ||
|
|
3084894793 | ||
|
|
c7be3f30d0 | ||
|
|
0a1c0ece44 | ||
|
|
088598d7d6 | ||
|
|
5d985b9cca | ||
|
|
f5b6386f4f | ||
|
|
56d1db3067 | ||
|
|
72951077b9 | ||
|
|
d7cd61723e | ||
|
|
d7834d3065 | ||
|
|
243973325e | ||
|
|
f4888d0535 | ||
|
|
43b36a3bc6 | ||
|
|
d32a319f40 | ||
|
|
5ea08a893a | ||
|
|
d3005803d5 | ||
|
|
099d01d4a7 | ||
|
|
19f990e497 | ||
|
|
331dafdbb8 | ||
|
|
4592dee576 | ||
|
|
f11021be13 | ||
|
|
97b9810bdf | ||
|
|
f05da21900 | ||
|
|
2d7ff056e1 | ||
|
|
50daf405f7 | ||
|
|
cde547a8f3 | ||
|
|
34ef52dd56 | ||
|
|
627b1d3862 | ||
|
|
eaf0339211 | ||
|
|
d7d5b47dc7 | ||
|
|
be1138baba | ||
|
|
5462018872 | ||
|
|
21160b9808 | ||
|
|
f6f95d962f | ||
|
|
be2c9ae915 | ||
|
|
954e8c54a0 | ||
|
|
ef94eec644 | ||
|
|
76675565ac | ||
|
|
3234cc6a31 | ||
|
|
e161c791f6 | ||
|
|
eda6eb9f00 | ||
|
|
bb6a705451 | ||
|
|
362f3569ae | ||
|
|
a1381de5f3 | ||
|
|
5b88ba47e8 | ||
|
|
fa316dd1f7 | ||
|
|
2ac5e603d8 | ||
|
|
740885b78b | ||
|
|
ec98647b1c | ||
|
|
2f59b5c1cc | ||
|
|
d0ba34a6e5 | ||
|
|
0af561dbf2 | ||
|
|
60462877cb | ||
|
|
3f269675d4 | ||
|
|
badfde1bfe | ||
|
|
8701cd6a22 | ||
|
|
da9591ecfd | ||
|
|
becf428bc0 | ||
|
|
09736232af | ||
|
|
79ef6d642e | ||
|
|
67b891e16c | ||
|
|
194b94c5a8 | ||
|
|
2db24dc29b | ||
|
|
5b7880dea2 | ||
|
|
86c800a1b3 | ||
|
|
5e69de4421 | ||
|
|
bef9d835f5 | ||
|
|
319bdbd5ef | ||
|
|
c066202665 | ||
|
|
fa68b0fc1a | ||
|
|
183bb3e4b6 | ||
|
|
1d7ad738e5 | ||
|
|
dc7e00e848 | ||
|
|
1c6136a8a5 | ||
|
|
2d6db76d97 | ||
|
|
e484c94514 | ||
|
|
8ae39d8432 | ||
|
|
b5cdf2eab3 | ||
|
|
32b485f2b0 | ||
|
|
5e9b4540fd | ||
|
|
801f8b865c | ||
|
|
6bef63c651 | ||
|
|
9f8650c969 | ||
|
|
6ec0a6c43d | ||
|
|
363cb67afa | ||
|
|
20de1c20e6 | ||
|
|
996b6d86cc | ||
|
|
b245016c15 | ||
|
|
055a2ba10e | ||
|
|
a2974d70f1 | ||
|
|
2572492eba | ||
|
|
3f947ead6f | ||
|
|
d31aca26de | ||
|
|
262735ed58 | ||
|
|
9fa49da747 | ||
|
|
fcfbc670c7 | ||
|
|
cdcaa58929 | ||
|
|
13df0fea4b | ||
|
|
031e0dd663 | ||
|
|
8e258a4a94 | ||
|
|
8d5946760b | ||
|
|
bbc936bebe | ||
|
|
2bc76e617b | ||
|
|
a0b1997e13 | ||
|
|
a48b1659b3 | ||
|
|
0c77b7ba51 | ||
|
|
b849e713e2 | ||
|
|
f061e0befb | ||
|
|
8d3b8c4a8a | ||
|
|
0dc79e8594 | ||
|
|
fab578f605 | ||
|
|
782027ee28 | ||
|
|
85388b5652 | ||
|
|
dc40a2b5f5 | ||
|
|
2a7b9ee0a7 | ||
|
|
adb09c2e69 | ||
|
|
bd42a0f5e6 | ||
|
|
1e7ac8596a | ||
|
|
da2f99aa8a | ||
|
|
746ebd3b6a | ||
|
|
8b38e2416c | ||
|
|
3a6eaa58d5 | ||
|
|
feba08b22a | ||
|
|
bfa2824d7e | ||
|
|
0bd40c0c0a | ||
|
|
446b179cac | ||
|
|
f56322c8b3 | ||
|
|
9085f80276 | ||
|
|
535c540085 | ||
|
|
cdb92aff69 | ||
|
|
2c2398c0aa | ||
|
|
9e70cf192e | ||
|
|
42b9436cf8 | ||
|
|
4be506815d | ||
|
|
c0a6fac5af | ||
|
|
a41b1395cb | ||
|
|
30f9ca9f59 | ||
|
|
cd8b20a914 | ||
|
|
4bdbbf7066 | ||
|
|
32f31b1a0f | ||
|
|
a9d455172f | ||
|
|
b85cb21cb1 | ||
|
|
2c4278fc73 | ||
|
|
bf0c4526bf | ||
|
|
e1fbddcd62 | ||
|
|
af0167fa39 | ||
|
|
8f0b2d46c7 | ||
|
|
856b9fef3a | ||
|
|
78a1531005 | ||
|
|
0c094b9d7f | ||
|
|
d30f9d92c4 | ||
|
|
985cb44573 | ||
|
|
f1726cc8d6 | ||
|
|
5fd0ca70d3 | ||
|
|
0c7ce77a00 | ||
|
|
4221e5fa6c | ||
|
|
0ab2a8870c | ||
|
|
3c65e314b4 | ||
|
|
5135d46481 | ||
|
|
81d00078be | ||
|
|
876f6d7f3c | ||
|
|
04c0f8a9b0 | ||
|
|
bd1e5d2e1d | ||
|
|
f242762d0d | ||
|
|
94ba1ce055 | ||
|
|
92a990ba84 | ||
|
|
fe81d45db4 | ||
|
|
7bfef80fab | ||
|
|
69f2d5a9ac | ||
|
|
12c22cee34 | ||
|
|
9439cdddf7 | ||
|
|
77ab2801c7 | ||
|
|
b9c1e96ce1 | ||
|
|
99133038dc | ||
|
|
798b30bdfd | ||
|
|
f3205d1ee7 | ||
|
|
1b636fa0e8 | ||
|
|
496c5267df | ||
|
|
80b6a0e8d5 | ||
|
|
c84e8952eb | ||
|
|
f4580d80e2 | ||
|
|
8281f44518 | ||
|
|
2bea291af0 | ||
|
|
f837ef9e7b | ||
|
|
552c8a5677 | ||
|
|
dd310301ec | ||
|
|
9d77dccb7f | ||
|
|
8e8fe9b2b8 | ||
|
|
60f39aecb1 | ||
|
|
5d294d19b4 | ||
|
|
21fa1ed4b5 | ||
|
|
bf1b7a7efe | ||
|
|
fab0623bcf | ||
|
|
76243bd847 | ||
|
|
e8bd5cea37 | ||
|
|
c0b3565d55 | ||
|
|
51306d2d8f | ||
|
|
de0dfed701 | ||
|
|
e4bfca808d | ||
|
|
f08fa44a1a | ||
|
|
fa47a9218d | ||
|
|
87e817c586 | ||
|
|
b3dc8fd3fd | ||
|
|
884ae6446f | ||
|
|
ffcce30fdb | ||
|
|
2a9e4df9fb | ||
|
|
bb9c7d1cc5 | ||
|
|
086fad3a27 | ||
|
|
926e815779 | ||
|
|
ec90622aae | ||
|
|
7670fa0ef1 | ||
|
|
fa363cd16f | ||
|
|
54ef7116a0 | ||
|
|
25648a5e54 | ||
|
|
28e8d27868 | ||
|
|
f69d9a354b | ||
|
|
8de49e183d | ||
|
|
6ae167a484 | ||
|
|
1bf0ddcbfe | ||
|
|
4352f134ef | ||
|
|
1f26d2f57f | ||
|
|
4e2a59505e | ||
|
|
13658318b9 | ||
|
|
73881403a2 | ||
|
|
faff14ae03 | ||
|
|
b67cc16e02 | ||
|
|
0725608d1a | ||
|
|
65b9a6ad59 | ||
|
|
57fb0da2f9 | ||
|
|
5b3e460036 | ||
|
|
3ca9a8a00d | ||
|
|
7b76b0a0e9 | ||
|
|
db867d50ba | ||
|
|
a850a711fa | ||
|
|
370feaf87f | ||
|
|
282937bc56 | ||
|
|
6bab9fa19a | ||
|
|
5cc6a6e739 | ||
|
|
6768a3305a | ||
|
|
d72b386a63 | ||
|
|
51460cd634 | ||
|
|
1418a0d586 | ||
|
|
c937213e08 | ||
|
|
0f6c9487b7 | ||
|
|
d7f8f5c847 | ||
|
|
238b8e20bb | ||
|
|
e0e6f99212 | ||
|
|
3576da72b4 | ||
|
|
cbb8eb3480 | ||
|
|
dc5e218396 | ||
|
|
2a8ced0150 | ||
|
|
90dca41948 | ||
|
|
61665aa512 | ||
|
|
8ba1bd2f01 | ||
|
|
19c9c76c4d | ||
|
|
67a060e9ad | ||
|
|
42ba12662e | ||
|
|
42022d5e45 | ||
|
|
0133bba301 | ||
|
|
555b3d5aba | ||
|
|
4eac38fb45 | ||
|
|
f4f664c50e | ||
|
|
3d0089f5f4 | ||
|
|
9f94b05b1f | ||
|
|
5d55c0ff02 | ||
|
|
10d4cecefd | ||
|
|
2eb6eb323f | ||
|
|
9bf1361652 | ||
|
|
fe86f2d7cd | ||
|
|
a40b46614a | ||
|
|
6f507d6a12 | ||
|
|
bb5ddda46a | ||
|
|
3f3766b60d | ||
|
|
36f692dd8c | ||
|
|
8df74be587 | ||
|
|
0300597f4c | ||
|
|
3025b39e97 | ||
|
|
9774ecc80c | ||
|
|
0cd49305c4 | ||
|
|
03cd93a576 | ||
|
|
bf9065c925 | ||
|
|
d4153d4a62 | ||
|
|
701f7afcdf | ||
|
|
1c8603613a | ||
|
|
0f71c6d020 | ||
|
|
fbc0cfad0c | ||
|
|
a878510770 | ||
|
|
12806c8844 | ||
|
|
5a22181f59 | ||
|
|
9381ab7761 | ||
|
|
223a18948c | ||
|
|
121932191b | ||
|
|
d812df6300 | ||
|
|
c590f62349 | ||
|
|
73a9d7b990 | ||
|
|
8dd9ac5a96 | ||
|
|
2161bd8dc1 | ||
|
|
9fd01c6ab8 | ||
|
|
d9205ca1fd | ||
|
|
991e10f3c7 | ||
|
|
85595c5815 | ||
|
|
34b6cb1209 | ||
|
|
f6dad43c98 | ||
|
|
806875ddb5 | ||
|
|
ca9f958114 | ||
|
|
da2bd6ff50 | ||
|
|
24d92ceaf3 | ||
|
|
d6e7cc67c5 | ||
|
|
f2e53dada8 | ||
|
|
6cad8bd4b0 | ||
|
|
89417b99aa | ||
|
|
e511f29adb | ||
|
|
a85fb757a1 | ||
|
|
3094a9e1a7 | ||
|
|
ccf22171f1 | ||
|
|
5bd266c96d | ||
|
|
ac98e5db6e | ||
|
|
12b87e55ba | ||
|
|
61c4e2cb89 | ||
|
|
627943d3c3 | ||
|
|
6949d1ddc6 | ||
|
|
acbd442709 | ||
|
|
95dd9c185b | ||
|
|
ed39e1d53c | ||
|
|
a6404a4e10 | ||
|
|
1b24e4b599 | ||
|
|
dc9cf9cd6d | ||
|
|
e37d50a5de | ||
|
|
da40c8536c | ||
|
|
c62e2fe59e | ||
|
|
1b8d33b6b2 | ||
|
|
be555e704a | ||
|
|
149e807e13 | ||
|
|
a983fe9473 | ||
|
|
2bf6a2d781 | ||
|
|
9bf749bc5b | ||
|
|
380841106e | ||
|
|
ee0f5a60e0 | ||
|
|
1387a60919 | ||
|
|
e6a91fd994 | ||
|
|
7693ec6e8a | ||
|
|
4bfa60812d | ||
|
|
15bfa09582 | ||
|
|
3a0254090d | ||
|
|
01dd60cb91 | ||
|
|
688e5f7ee7 | ||
|
|
4394bfff3f | ||
|
|
01b9a406f0 | ||
|
|
a1aed62928 | ||
|
|
0ab2c5adfb | ||
|
|
9b22871b6e | ||
|
|
de1656ec20 | ||
|
|
ffd66c4508 | ||
|
|
9c24ccc7b8 | ||
|
|
af51e66c5a | ||
|
|
d91ffe986b | ||
|
|
b713283225 | ||
|
|
c236c16d08 | ||
|
|
b316376b48 | ||
|
|
c93e791042 | ||
|
|
3a847972c3 | ||
|
|
990d95c079 | ||
|
|
b3c722a015 | ||
|
|
1378fca608 | ||
|
|
05bb95391f | ||
|
|
47b46d7c47 | ||
|
|
e30de2d1dc | ||
|
|
89bf0927af | ||
|
|
0d1498ea69 | ||
|
|
c4a87015f7 | ||
|
|
8d00f9c5b9 | ||
|
|
b983921b0c | ||
|
|
ed0e745361 | ||
|
|
4a630f6fc4 | ||
|
|
b23a7e8463 | ||
|
|
632deedd0f | ||
|
|
00ca284cc0 | ||
|
|
aba8857aa3 | ||
|
|
7b6d4a8ce8 | ||
|
|
cd053162b9 | ||
|
|
0a05b0db9f | ||
|
|
e043b56f4b | ||
|
|
c32599f87a | ||
|
|
e465af5132 | ||
|
|
fc58bdfece | ||
|
|
c85ec7ffbe | ||
|
|
ea1b56248c | ||
|
|
236eb54d0f | ||
|
|
907664ed36 | ||
|
|
2971ce0086 | ||
|
|
7d1b66df6b | ||
|
|
1a427d1f16 | ||
|
|
810abb8a5f | ||
|
|
85027ca8cd | ||
|
|
badce65198 | ||
|
|
5784c33dfd | ||
|
|
2e57285f3d | ||
|
|
b2b6fe03d4 | ||
|
|
e606c23684 | ||
|
|
5dc08e6f93 | ||
|
|
9a6a1e7b51 | ||
|
|
8c8de83932 | ||
|
|
864207de08 | ||
|
|
c1a11ed54c | ||
|
|
446cb837a0 | ||
|
|
3577c6fafb | ||
|
|
a7241f5f19 | ||
|
|
f233048a12 | ||
|
|
176dd1e03c | ||
|
|
88f3d3a267 | ||
|
|
bf820723f5 | ||
|
|
b64bb6e3a5 | ||
|
|
196b3b09ad | ||
|
|
f982106440 | ||
|
|
38f12a9e2b | ||
|
|
ba79b4e389 | ||
|
|
9ecd023206 | ||
|
|
98385dc027 | ||
|
|
e7cb9cf672 | ||
|
|
48be32b61e | ||
|
|
e82080179b | ||
|
|
4678465a4b | ||
|
|
7c94c26fb2 | ||
|
|
fde483c865 | ||
|
|
7d96acd66b | ||
|
|
ff064e1698 | ||
|
|
595f51cb22 | ||
|
|
847abc2747 | ||
|
|
f453d35dbe | ||
|
|
c4ea3f46e8 | ||
|
|
63ce8c03d6 | ||
|
|
2c45e945a3 | ||
|
|
bbb7972f6c | ||
|
|
c24dca26ac | ||
|
|
bcebfb6925 | ||
|
|
59fb5aaacb | ||
|
|
0356c8c90e | ||
|
|
497683bc34 | ||
|
|
a6b1a7e182 | ||
|
|
aebaf89fd4 | ||
|
|
7a98925587 | ||
|
|
ec80df74ac | ||
|
|
588ebeb7a5 | ||
|
|
2b57078d73 | ||
|
|
a9aafe5c31 | ||
|
|
7a91a4a12e | ||
|
|
34cbfdf8f8 | ||
|
|
91519e4d6b | ||
|
|
6a5d2ac1d0 | ||
|
|
2a32974646 | ||
|
|
e9b2884c08 | ||
|
|
525145642b | ||
|
|
dfefb9831d | ||
|
|
c52da9dab3 | ||
|
|
d9ff7d5d70 | ||
|
|
cb4cef2206 | ||
|
|
0fde290e55 | ||
|
|
9701da0169 | ||
|
|
4c4f7105d2 | ||
|
|
7dc767c8d5 | ||
|
|
39858af5d5 | ||
|
|
57e4846713 | ||
|
|
81a8209323 | ||
|
|
1b60e50bf2 | ||
|
|
b561a6171d | ||
|
|
02f07e0c23 | ||
|
|
91d8e0c194 | ||
|
|
6ae909839f | ||
|
|
aad8664d07 | ||
|
|
f2b2e70b3b | ||
|
|
5bbc21de81 | ||
|
|
e3b3f28db9 | ||
|
|
d25f42c7eb | ||
|
|
c9dd5bc263 | ||
|
|
cf5a5b8e75 | ||
|
|
ddfc978f58 | ||
|
|
1015fde398 | ||
|
|
18081e3c4e | ||
|
|
ffd82c5307 | ||
|
|
9c33a7c971 | ||
|
|
561f9db88c | ||
|
|
5bcbd537b4 | ||
|
|
c7486c858d | ||
|
|
0ff8f6044a | ||
|
|
4d0ec16687 | ||
|
|
5360af919e | ||
|
|
c87841ca3d | ||
|
|
48c99164f4 | ||
|
|
275a8a0c9b | ||
|
|
4ef9e495af | ||
|
|
f2f70252d1 | ||
|
|
e3300c8887 | ||
|
|
0825043045 | ||
|
|
e21877ae75 | ||
|
|
8b131505eb | ||
|
|
ae0f2caeb3 | ||
|
|
6f7743ef82 | ||
|
|
e60c58d965 | ||
|
|
2a6f21144c | ||
|
|
d4e20a7813 | ||
|
|
b44df0af83 | ||
|
|
9a31f881f2 | ||
|
|
92de73db65 | ||
|
|
e9e3b57915 | ||
|
|
91a4e82243 | ||
|
|
4bad6c8d3d | ||
|
|
bb8f88bbf4 | ||
|
|
21669c0ed2 | ||
|
|
b3c7098365 | ||
|
|
21b17e7741 | ||
|
|
f33943efe7 | ||
|
|
ce3be4756a | ||
|
|
ef6fc09758 | ||
|
|
dbe3175049 | ||
|
|
332fa0c55a | ||
|
|
a6c2c91d32 | ||
|
|
c4cd38f369 | ||
|
|
c724791b14 | ||
|
|
0e25314f20 | ||
|
|
e77c760819 | ||
|
|
1f14d57a48 | ||
|
|
56cefaf15a | ||
|
|
81993f4744 | ||
|
|
426e5c9521 | ||
|
|
82ad324c8f | ||
|
|
9d188ab087 | ||
|
|
bd7cc03e57 | ||
|
|
d2b6601bf8 | ||
|
|
7b88a0e324 | ||
|
|
76929293e0 | ||
|
|
6203ff97b7 | ||
|
|
51b5ab9729 | ||
|
|
afbdeb852f | ||
|
|
5eaf8729e7 | ||
|
|
589e43a19e | ||
|
|
8af1fbf979 | ||
|
|
b52e532abe | ||
|
|
33f54431b6 | ||
|
|
c048f672ee | ||
|
|
690ffc0384 | ||
|
|
383c6f5579 | ||
|
|
066b62206f | ||
|
|
12ddc3e02c | ||
|
|
ce51ebcdf0 | ||
|
|
6c9176db47 | ||
|
|
525ad4d05f | ||
|
|
b238909e06 | ||
|
|
5f91c0ca81 | ||
|
|
aacbb0039c | ||
|
|
6784078701 | ||
|
|
a045324992 | ||
|
|
913626cedb | ||
|
|
21af89e2e8 | ||
|
|
30405d35ef | ||
|
|
a0174af16f | ||
|
|
2c994e8516 | ||
|
|
ad8958b188 | ||
|
|
d42107724b | ||
|
|
f13be0df61 | ||
|
|
3a169c3c22 | ||
|
|
3d66014eea | ||
|
|
9b5d4ddd8a | ||
|
|
78d4abaa93 | ||
|
|
ee3f7a51c8 | ||
|
|
4f246a9a2a | ||
|
|
f5dcf7c3b5 | ||
|
|
6c964835b1 | ||
|
|
a713933cd1 | ||
|
|
11717bb0a1 | ||
|
|
49feabd5d6 | ||
|
|
c3b730796c | ||
|
|
e6f565a7be | ||
|
|
ea40888076 | ||
|
|
e9c3bcda1d | ||
|
|
0a30746d70 | ||
|
|
c2a27c3dc3 | ||
|
|
8f5c578a5e | ||
|
|
9273c73e36 | ||
|
|
ed53fb9a48 | ||
|
|
e0ca7b2b04 | ||
|
|
9f10875ed0 | ||
|
|
f9ffd188e5 | ||
|
|
85a3e5c7c6 |
51
.gitignore
vendored
Normal file
51
.gitignore
vendored
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
# Unixen: object and executable files.
|
||||||
|
*.o
|
||||||
|
src/vim
|
||||||
|
src/xxd/xxd
|
||||||
|
src/auto/if_perl.c
|
||||||
|
src/tags
|
||||||
|
|
||||||
|
# We do need src/auto/configure.
|
||||||
|
src/auto/config.aap
|
||||||
|
src/auto/config.cache
|
||||||
|
src/auto/config.h
|
||||||
|
src/auto/config.log
|
||||||
|
src/auto/config.mk
|
||||||
|
src/auto/config.status
|
||||||
|
src/auto/configure.aap
|
||||||
|
src/auto/osdef.h
|
||||||
|
src/auto/link.log
|
||||||
|
src/auto/link.sed
|
||||||
|
src/auto/pathdef.c
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
*.exe
|
||||||
|
*.idb
|
||||||
|
*.manifest
|
||||||
|
*.exp
|
||||||
|
*.obj
|
||||||
|
*.pdb
|
||||||
|
*.ilk
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.res
|
||||||
|
*.RES
|
||||||
|
src/pathdef.c
|
||||||
|
src/Obj*/pathdef.c
|
||||||
|
gvimext.dll
|
||||||
|
gvimext.lib
|
||||||
|
|
||||||
|
# All platforms
|
||||||
|
*.rej
|
||||||
|
*.orig
|
||||||
|
*.mo
|
||||||
|
*.swp
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Generated by "make test"
|
||||||
|
src/po/*.ck
|
||||||
|
src/testdir/mbyte.vim
|
||||||
|
src/testdir/mzscheme.vim
|
||||||
|
src/testdir/small.vim
|
||||||
|
src/testdir/tiny.vim
|
||||||
|
src/testdir/test*.out
|
||||||
8
Contents
8
Contents
@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
|
|||||||
messages, shows current file name in window title, on-line
|
messages, shows current file name in window title, on-line
|
||||||
help, rectangular cut/paste, etc., etc., etc...
|
help, rectangular cut/paste, etc., etc., etc...
|
||||||
|
|
||||||
Version 7.1. Also runs under UNIX, MSDOS and other systems.
|
Version 7.3. Also runs under UNIX, MSDOS and other systems.
|
||||||
vim71rt.tgz contains the documentation and syntax files.
|
vim73rt.tgz contains the documentation and syntax files.
|
||||||
vim71bin.tgz contains the binaries.
|
vim73bin.tgz contains the binaries.
|
||||||
vim71src.tgz contains the sources.
|
vim73src.tgz contains the sources.
|
||||||
Author: Bram Moolenaar et al.
|
Author: Bram Moolenaar et al.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
41
Filelist
41
Filelist
@@ -7,6 +7,7 @@ SRC_ALL = \
|
|||||||
src/arabic.c \
|
src/arabic.c \
|
||||||
src/arabic.h \
|
src/arabic.h \
|
||||||
src/ascii.h \
|
src/ascii.h \
|
||||||
|
src/blowfish.c \
|
||||||
src/buffer.c \
|
src/buffer.c \
|
||||||
src/charset.c \
|
src/charset.c \
|
||||||
src/diff.c \
|
src/diff.c \
|
||||||
@@ -38,6 +39,7 @@ SRC_ALL = \
|
|||||||
src/mark.c \
|
src/mark.c \
|
||||||
src/mbyte.c \
|
src/mbyte.c \
|
||||||
src/memfile.c \
|
src/memfile.c \
|
||||||
|
src/memfile_test.c \
|
||||||
src/memline.c \
|
src/memline.c \
|
||||||
src/menu.c \
|
src/menu.c \
|
||||||
src/message.c \
|
src/message.c \
|
||||||
@@ -58,6 +60,7 @@ SRC_ALL = \
|
|||||||
src/regexp.h \
|
src/regexp.h \
|
||||||
src/screen.c \
|
src/screen.c \
|
||||||
src/search.c \
|
src/search.c \
|
||||||
|
src/sha256.c \
|
||||||
src/structs.h \
|
src/structs.h \
|
||||||
src/spell.c \
|
src/spell.c \
|
||||||
src/syntax.c \
|
src/syntax.c \
|
||||||
@@ -79,6 +82,7 @@ SRC_ALL = \
|
|||||||
src/testdir/test49.vim \
|
src/testdir/test49.vim \
|
||||||
src/testdir/test60.vim \
|
src/testdir/test60.vim \
|
||||||
src/proto.h \
|
src/proto.h \
|
||||||
|
src/proto/blowfish.pro \
|
||||||
src/proto/buffer.pro \
|
src/proto/buffer.pro \
|
||||||
src/proto/charset.pro \
|
src/proto/charset.pro \
|
||||||
src/proto/diff.pro \
|
src/proto/diff.pro \
|
||||||
@@ -116,6 +120,7 @@ SRC_ALL = \
|
|||||||
src/proto/regexp.pro \
|
src/proto/regexp.pro \
|
||||||
src/proto/screen.pro \
|
src/proto/screen.pro \
|
||||||
src/proto/search.pro \
|
src/proto/search.pro \
|
||||||
|
src/proto/sha256.pro \
|
||||||
src/proto/spell.pro \
|
src/proto/spell.pro \
|
||||||
src/proto/syntax.pro \
|
src/proto/syntax.pro \
|
||||||
src/proto/tag.pro \
|
src/proto/tag.pro \
|
||||||
@@ -137,6 +142,7 @@ SRC_UNIX = \
|
|||||||
pixmaps/gen-inline-pixbufs.sh \
|
pixmaps/gen-inline-pixbufs.sh \
|
||||||
pixmaps/stock_icons.h \
|
pixmaps/stock_icons.h \
|
||||||
src/INSTALL \
|
src/INSTALL \
|
||||||
|
src/INSTALLx.txt \
|
||||||
src/Makefile \
|
src/Makefile \
|
||||||
src/auto/configure \
|
src/auto/configure \
|
||||||
src/config.aap.in \
|
src/config.aap.in \
|
||||||
@@ -193,6 +199,7 @@ SRC_UNIX = \
|
|||||||
src/vim_icon.xbm \
|
src/vim_icon.xbm \
|
||||||
src/vim_mask.xbm \
|
src/vim_mask.xbm \
|
||||||
src/vimtutor \
|
src/vimtutor \
|
||||||
|
src/gvimtutor \
|
||||||
src/which.sh \
|
src/which.sh \
|
||||||
src/workshop.c \
|
src/workshop.c \
|
||||||
src/workshop.h \
|
src/workshop.h \
|
||||||
@@ -204,19 +211,24 @@ SRC_UNIX = \
|
|||||||
SRC_DOS_UNIX = \
|
SRC_DOS_UNIX = \
|
||||||
src/if_cscope.c \
|
src/if_cscope.c \
|
||||||
src/if_cscope.h \
|
src/if_cscope.h \
|
||||||
|
src/if_lua.c \
|
||||||
src/if_mzsch.c \
|
src/if_mzsch.c \
|
||||||
src/if_mzsch.h \
|
src/if_mzsch.h \
|
||||||
src/if_perl.xs \
|
src/if_perl.xs \
|
||||||
src/if_perlsfio.c \
|
src/if_perlsfio.c \
|
||||||
src/if_python.c \
|
src/if_python.c \
|
||||||
|
src/if_python3.c \
|
||||||
|
src/if_py_both.h \
|
||||||
src/if_ruby.c \
|
src/if_ruby.c \
|
||||||
src/if_sniff.h \
|
src/if_sniff.h \
|
||||||
src/if_tcl.c \
|
src/if_tcl.c \
|
||||||
src/proto/if_cscope.pro \
|
src/proto/if_cscope.pro \
|
||||||
|
src/proto/if_lua.pro \
|
||||||
src/proto/if_mzsch.pro \
|
src/proto/if_mzsch.pro \
|
||||||
src/proto/if_perl.pro \
|
src/proto/if_perl.pro \
|
||||||
src/proto/if_perlsfio.pro \
|
src/proto/if_perlsfio.pro \
|
||||||
src/proto/if_python.pro \
|
src/proto/if_python.pro \
|
||||||
|
src/proto/if_python3.pro \
|
||||||
src/proto/if_ruby.pro \
|
src/proto/if_ruby.pro \
|
||||||
src/proto/if_tcl.pro \
|
src/proto/if_tcl.pro \
|
||||||
src/typemap \
|
src/typemap \
|
||||||
@@ -249,6 +261,7 @@ SRC_DOS = \
|
|||||||
src/Make_w16.mak \
|
src/Make_w16.mak \
|
||||||
src/bigvim.bat \
|
src/bigvim.bat \
|
||||||
src/msvcsetup.bat \
|
src/msvcsetup.bat \
|
||||||
|
src/msvc2008.bat \
|
||||||
src/dimm.idl \
|
src/dimm.idl \
|
||||||
src/dlldata.c \
|
src/dlldata.c \
|
||||||
src/dosinst.c \
|
src/dosinst.c \
|
||||||
@@ -282,6 +295,7 @@ SRC_DOS = \
|
|||||||
src/proto/os_win32.pro \
|
src/proto/os_win32.pro \
|
||||||
src/proto/os_mswin.pro \
|
src/proto/os_mswin.pro \
|
||||||
src/testdir/Make_dos.mak \
|
src/testdir/Make_dos.mak \
|
||||||
|
src/testdir/Make_ming.mak \
|
||||||
src/testdir/dos.vim \
|
src/testdir/dos.vim \
|
||||||
src/uninstal.c \
|
src/uninstal.c \
|
||||||
src/vim.def \
|
src/vim.def \
|
||||||
@@ -365,7 +379,7 @@ SRC_MAC = \
|
|||||||
src/os_mac.h \
|
src/os_mac.h \
|
||||||
src/os_mac.rsr.hqx \
|
src/os_mac.rsr.hqx \
|
||||||
src/os_mac_conv.c \
|
src/os_mac_conv.c \
|
||||||
src/os_macosx.c \
|
src/os_macosx.m \
|
||||||
src/proto/gui_mac.pro \
|
src/proto/gui_mac.pro \
|
||||||
src/proto/os_mac_conv.pro \
|
src/proto/os_mac_conv.pro \
|
||||||
|
|
||||||
@@ -513,6 +527,7 @@ RT_SCRIPTS = \
|
|||||||
runtime/indent/*.vim \
|
runtime/indent/*.vim \
|
||||||
runtime/indent/README.txt \
|
runtime/indent/README.txt \
|
||||||
runtime/ftplugin/*.vim \
|
runtime/ftplugin/*.vim \
|
||||||
|
runtime/ftplugin/logtalk.dict \
|
||||||
runtime/ftplugin/README.txt \
|
runtime/ftplugin/README.txt \
|
||||||
runtime/plugin/*.vim \
|
runtime/plugin/*.vim \
|
||||||
runtime/plugin/README.txt \
|
runtime/plugin/README.txt \
|
||||||
@@ -649,13 +664,12 @@ EXTRA = \
|
|||||||
farsi/fonts/*/far-* \
|
farsi/fonts/*/far-* \
|
||||||
runtime/vimlogo.xpm \
|
runtime/vimlogo.xpm \
|
||||||
src/swis.s \
|
src/swis.s \
|
||||||
src/tee/Makefile* \
|
src/tee/Makefile \
|
||||||
src/tee/tee.c \
|
src/tee/tee.c \
|
||||||
csdpmi4b.zip \
|
csdpmi4b.zip \
|
||||||
|
|
||||||
# generic language files
|
# generic language files
|
||||||
LANG_GEN = \
|
LANG_GEN = \
|
||||||
README_lang.txt \
|
|
||||||
runtime/doc/*-fr.1 \
|
runtime/doc/*-fr.1 \
|
||||||
runtime/doc/*-fr.UTF-8.1 \
|
runtime/doc/*-fr.UTF-8.1 \
|
||||||
runtime/doc/*-it.1 \
|
runtime/doc/*-it.1 \
|
||||||
@@ -670,25 +684,22 @@ LANG_GEN = \
|
|||||||
runtime/keymap/*.vim \
|
runtime/keymap/*.vim \
|
||||||
runtime/tutor/README.*.txt \
|
runtime/tutor/README.*.txt \
|
||||||
runtime/tutor/Makefile \
|
runtime/tutor/Makefile \
|
||||||
|
runtime/tutor/tutor.utf-8 \
|
||||||
runtime/tutor/tutor.?? \
|
runtime/tutor/tutor.?? \
|
||||||
runtime/tutor/tutor.cs.* \
|
runtime/tutor/tutor.??.* \
|
||||||
runtime/tutor/tutor.gr.* \
|
runtime/tutor/tutor.bar \
|
||||||
runtime/tutor/tutor.hu.* \
|
runtime/tutor/tutor.bar.* \
|
||||||
runtime/tutor/tutor.ja.* \
|
|
||||||
runtime/tutor/tutor.ko.* \
|
|
||||||
runtime/tutor/tutor.pl.* \
|
|
||||||
runtime/tutor/tutor.ru.* \
|
|
||||||
runtime/tutor/tutor.sk.* \
|
|
||||||
runtime/tutor/tutor.tr.* \
|
|
||||||
runtime/tutor/tutor.zh.* \
|
|
||||||
runtime/spell/README.txt \
|
runtime/spell/README.txt \
|
||||||
runtime/spell/??/*.diff \
|
runtime/spell/??/*.diff \
|
||||||
runtime/spell/??/main.aap \
|
runtime/spell/??/main.aap \
|
||||||
|
runtime/spell/tet/*.diff \
|
||||||
|
runtime/spell/tet/main.aap \
|
||||||
|
runtime/spell/check/main.aap \
|
||||||
|
runtime/spell/check/*.aff \
|
||||||
|
runtime/spell/check/*.dic \
|
||||||
runtime/spell/yi/README.txt \
|
runtime/spell/yi/README.txt \
|
||||||
runtime/spell/main.aap \
|
runtime/spell/main.aap \
|
||||||
runtime/spell/cleanadd.vim \
|
|
||||||
runtime/spell/*.vim \
|
runtime/spell/*.vim \
|
||||||
runtime/spell/fixdup \
|
|
||||||
|
|
||||||
# generic language files, binary
|
# generic language files, binary
|
||||||
LANG_GEN_BIN = \
|
LANG_GEN_BIN = \
|
||||||
|
|||||||
239
Makefile
239
Makefile
@@ -3,8 +3,10 @@
|
|||||||
# 2. Creating the various distribution files.
|
# 2. Creating the various distribution files.
|
||||||
|
|
||||||
|
|
||||||
# 1. Using this Makefile without an argument will compile Vim for Unix.
|
#########################################################################
|
||||||
|
# 1. Starting the compilation of Vim for Unix.
|
||||||
#
|
#
|
||||||
|
# Using this Makefile without an argument will compile Vim for Unix.
|
||||||
# "make install" is also possible.
|
# "make install" is also possible.
|
||||||
#
|
#
|
||||||
# NOTE: If this doesn't work properly, first change directory to "src" and use
|
# NOTE: If this doesn't work properly, first change directory to "src" and use
|
||||||
@@ -21,6 +23,9 @@
|
|||||||
# has run can result in compiling with $(CC) empty.
|
# has run can result in compiling with $(CC) empty.
|
||||||
|
|
||||||
first:
|
first:
|
||||||
|
@if test ! -f src/auto/config.mk; then \
|
||||||
|
cp src/config.mk.dist src/auto/config.mk; \
|
||||||
|
fi
|
||||||
@echo "Starting make in the src directory."
|
@echo "Starting make in the src directory."
|
||||||
@echo "If there are problems, cd to the src directory and run make there"
|
@echo "If there are problems, cd to the src directory and run make there"
|
||||||
cd src && $(MAKE) $@
|
cd src && $(MAKE) $@
|
||||||
@@ -28,25 +33,22 @@ first:
|
|||||||
# Some make programs use the last target for the $@ default; put the other
|
# Some make programs use the last target for the $@ default; put the other
|
||||||
# targets separately to always let $@ expand to "first" by default.
|
# targets separately to always let $@ expand to "first" by default.
|
||||||
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
|
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
|
||||||
|
@if test ! -f src/auto/config.mk; then \
|
||||||
|
cp src/config.mk.dist src/auto/config.mk; \
|
||||||
|
fi
|
||||||
@echo "Starting make in the src directory."
|
@echo "Starting make in the src directory."
|
||||||
@echo "If there are problems, cd to the src directory and run make there"
|
@echo "If there are problems, cd to the src directory and run make there"
|
||||||
cd src && $(MAKE) $@
|
cd src && $(MAKE) $@
|
||||||
|
|
||||||
|
|
||||||
# 2. Create the various distributions:
|
#########################################################################
|
||||||
|
# 2. Creating the various distribution files.
|
||||||
#
|
#
|
||||||
# TARGET PRODUCES CONTAINS
|
# TARGET PRODUCES CONTAINS
|
||||||
# unixall vim-#.#.tar.bz2 Runtime files and Sources for Unix
|
# unixall vim-#.#.tar.bz2 All runtime files and sources, for Unix
|
||||||
#
|
|
||||||
# extra vim-#.#-extra.tar.gz Extra source and runtime files
|
|
||||||
# lang vim-#.#-lang.tar.gz multi-language files
|
|
||||||
#
|
#
|
||||||
# html vim##html.zip HTML docs
|
# html vim##html.zip HTML docs
|
||||||
#
|
#
|
||||||
# amisrc vim##src.tgz sources for Amiga
|
|
||||||
# amirt vim##rt.tgz runtime for Amiga
|
|
||||||
# amibin vim##bin.tgz binary for Amiga
|
|
||||||
#
|
|
||||||
# dossrc vim##src.zip sources for MS-DOS
|
# dossrc vim##src.zip sources for MS-DOS
|
||||||
# dosrt vim##rt.zip runtime for MS-DOS
|
# dosrt vim##rt.zip runtime for MS-DOS
|
||||||
# dosbin vim##d16.zip binary for MS-DOS 16 bits
|
# dosbin vim##d16.zip binary for MS-DOS 16 bits
|
||||||
@@ -55,7 +57,11 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
|
|||||||
# gvim##.zip binary for GUI Win32
|
# gvim##.zip binary for GUI Win32
|
||||||
# gvim##ole.zip OLE exe for Win32 GUI
|
# gvim##ole.zip OLE exe for Win32 GUI
|
||||||
# gvim##_s.zip exe for Win32s GUI
|
# gvim##_s.zip exe for Win32s GUI
|
||||||
# doslang vim##lang.zip language files for Win32
|
#
|
||||||
|
# OBSOLETE
|
||||||
|
# amisrc vim##src.tgz sources for Amiga
|
||||||
|
# amirt vim##rt.tgz runtime for Amiga
|
||||||
|
# amibin vim##bin.tgz binary for Amiga
|
||||||
#
|
#
|
||||||
# os2bin vim##os2.zip binary for OS/2
|
# os2bin vim##os2.zip binary for OS/2
|
||||||
# (use RT from dosrt)
|
# (use RT from dosrt)
|
||||||
@@ -64,31 +70,37 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
|
|||||||
#
|
#
|
||||||
# All output files are created in the "dist" directory. Existing files are
|
# All output files are created in the "dist" directory. Existing files are
|
||||||
# overwritten!
|
# overwritten!
|
||||||
# To do all this you need the unix, extra and lang archives, and
|
# To do all this you need the Unix archive and compiled binaries.
|
||||||
# compiled binaries.
|
|
||||||
# Before creating an archive first delete all backup files, *.orig, etc.
|
# Before creating an archive first delete all backup files, *.orig, etc.
|
||||||
|
|
||||||
MAJOR = 7
|
MAJOR = 7
|
||||||
MINOR = 1
|
MINOR = 3
|
||||||
|
|
||||||
# Uncomment this line if the Win32s version is to be included.
|
# Uncomment this line if the Win32s version is to be included.
|
||||||
DOSBIN_S = dosbin_s
|
DOSBIN_S = dosbin_s
|
||||||
|
|
||||||
|
# Uncomment this line if the 16 bit DOS version is to be included.
|
||||||
|
# DOSBIN_D16 = dosbin_d16
|
||||||
|
|
||||||
# CHECKLIST for creating a new version:
|
# CHECKLIST for creating a new version:
|
||||||
#
|
#
|
||||||
# - Update Vim version number. For a test version in: src/version.h, Contents,
|
# - Update Vim version number. For a test version in: src/version.h, Contents,
|
||||||
# MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
|
# MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
|
||||||
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
|
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
|
||||||
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
|
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def,
|
||||||
|
# src/gvim.exe.mnf.
|
||||||
|
# - Adjust the date and other info in src/version.h.
|
||||||
# - Correct included_patches[] in src/version.c.
|
# - Correct included_patches[] in src/version.c.
|
||||||
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme (if you can make it
|
# - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, MZscheme, Lua (if
|
||||||
# work), Cscope and "huge" features. Exclude workshop and SNiFF.
|
# you can make it all work), Cscope and "huge" features. Exclude workshop
|
||||||
|
# and SNiFF.
|
||||||
# - With these features: "make proto" (requires cproto and Motif installed;
|
# - With these features: "make proto" (requires cproto and Motif installed;
|
||||||
# ignore warnings for missing include files, fix problems for syntax errors).
|
# ignore warnings for missing include files, fix problems for syntax errors).
|
||||||
# - With these features: "make depend" (works best with gcc).
|
# - With these features: "make depend" (works best with gcc).
|
||||||
# - "make lint" and check the output (ignore GTK warnings).
|
# - If you have a lint program: "make lint" and check the output (ignore GTK
|
||||||
# - Enable the efence library in "src/Makefile" and run "make test". May
|
# warnings).
|
||||||
# require disabling Python and Ruby to avoid trouble with threads.
|
# - Enable the efence library in "src/Makefile" and run "make test". Disable
|
||||||
|
# Python and Ruby to avoid trouble with threads (efence is not threadsafe).
|
||||||
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
|
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
|
||||||
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
|
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
|
||||||
# - Do "make menu" to update the runtime/synmenu.vim file.
|
# - Do "make menu" to update the runtime/synmenu.vim file.
|
||||||
@@ -102,10 +114,10 @@ DOSBIN_S = dosbin_s
|
|||||||
# the "check" script).
|
# the "check" script).
|
||||||
# - Check compiling on Amiga, MS-DOS and MS-Windows.
|
# - Check compiling on Amiga, MS-DOS and MS-Windows.
|
||||||
# - Delete all *~, *.sw?, *.orig, *.rej files
|
# - Delete all *~, *.sw?, *.orig, *.rej files
|
||||||
# - "make unixall", "make extra", "make lang", "make html"
|
# - "make unixall", "make html"
|
||||||
# - Make diff files against the previous release: "makediff7 7.1 7.2"
|
# - Make diff files against the previous release: "makediff7 7.1 7.2"
|
||||||
#
|
#
|
||||||
# Amiga:
|
# Amiga: (OBSOLETE, Amiga files are no longer distributed)
|
||||||
# - "make amisrc", move the archive to the Amiga and compile:
|
# - "make amisrc", move the archive to the Amiga and compile:
|
||||||
# "make -f Make_manx.mak" (will use "big" features by default).
|
# "make -f Make_manx.mak" (will use "big" features by default).
|
||||||
# - Run the tests: "make -f Make_manx.mak test"
|
# - Run the tests: "make -f Make_manx.mak test"
|
||||||
@@ -114,23 +126,29 @@ DOSBIN_S = dosbin_s
|
|||||||
# - "make amirt", "make amibin".
|
# - "make amirt", "make amibin".
|
||||||
#
|
#
|
||||||
# PC:
|
# PC:
|
||||||
|
# - Run make on Unix to update the ".mo" files.
|
||||||
# - "make dossrc" and "make dosrt". Unpack the archives on a PC.
|
# - "make dossrc" and "make dosrt". Unpack the archives on a PC.
|
||||||
# 16 bit DOS version:
|
# 16 bit DOS version: (OBSOLETE, 16 bit version doesn't build)
|
||||||
# - Set environment for compiling with Borland C++ 3.1.
|
# - Set environment for compiling with Borland C++ 3.1.
|
||||||
# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
|
# - "bmake -f Make_bc3.mak BOR=E:\borlandc" (compiling xxd might fail, in that
|
||||||
# case set environment for compiling with Borland C++ 4.0 and do
|
# case set environment for compiling with Borland C++ 4.0 and do
|
||||||
# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
|
# "make -f make_bc3.mak BOR=E:\BC4 xxd/xxd.exe").
|
||||||
|
# NOTE: this currently fails because Vim is too big.
|
||||||
# - "make test" and check the output.
|
# - "make test" and check the output.
|
||||||
# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
|
# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
|
||||||
# "uninstald16.exe".
|
# "uninstald16.exe".
|
||||||
# 32 bit DOS version:
|
# 32 bit DOS version:
|
||||||
# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
|
# - Set environment for compiling with DJGPP; "gmake -f Make_djg.mak".
|
||||||
# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output.
|
# - "rm testdir/*.out", "gmake -f Make_djg.mak test" and check the output for
|
||||||
|
# "ALL DONE".
|
||||||
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
|
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
|
||||||
# "uninstald32.exe".
|
# "uninstald32.exe".
|
||||||
# Win32 console version:
|
# Win32 console version:
|
||||||
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
|
# - Set environment for Visual C++ 2008, e.g.:
|
||||||
# paths when necessary).
|
# "E:\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat". Or, when using the
|
||||||
|
# Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths when necessary).
|
||||||
|
# For Windows 98/ME the 2003 version is required, but then it won't work on
|
||||||
|
# Windows 7 and 64 bit.
|
||||||
# - "nmake -f Make_mvc.mak"
|
# - "nmake -f Make_mvc.mak"
|
||||||
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
|
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
|
||||||
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
|
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
|
||||||
@@ -151,8 +169,8 @@ DOSBIN_S = dosbin_s
|
|||||||
# - Delete install.exe and uninstal.exe.
|
# - Delete install.exe and uninstal.exe.
|
||||||
# - If building the Win32s version delete vimrun.exe.
|
# - If building the Win32s version delete vimrun.exe.
|
||||||
# Win32s GUI version:
|
# Win32s GUI version:
|
||||||
# - Set environment for Visual C++ 4.1 (requires a new console window)
|
# - Set environment for Visual C++ 4.1 (requires a new console window):
|
||||||
# - "vcvars32" (use the path for VC 4.1 e:\msdev\bin)
|
# "vcvars32.bat" (use the path for VC 4.1 e:\msdev\bin)
|
||||||
# - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1)
|
# - "nmake -f Make_mvc.mak GUI=yes INTL=no clean" (use the path for VC 4.1)
|
||||||
# - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1)
|
# - "nmake -f Make_mvc.mak GUI=yes INTL=no" (use the path for VC 4.1)
|
||||||
# - Rename "gvim.exe" to "gvim_w32s.exe".
|
# - Rename "gvim.exe" to "gvim_w32s.exe".
|
||||||
@@ -163,21 +181,23 @@ DOSBIN_S = dosbin_s
|
|||||||
# - Copy all the "*.exe" files to where this Makefile is.
|
# - Copy all the "*.exe" files to where this Makefile is.
|
||||||
# - Copy all the "*.pdb" files to where this Makefile is.
|
# - Copy all the "*.pdb" files to where this Makefile is.
|
||||||
# - "make dosbin".
|
# - "make dosbin".
|
||||||
# - Run make on Unix to update the ".mo" files.
|
|
||||||
# - "make doslang".
|
|
||||||
# NSIS self installing exe:
|
# NSIS self installing exe:
|
||||||
# - Unpack the doslang archive on the PC.
|
# - To get NSIS see http://nsis.sourceforge.net
|
||||||
# - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe,
|
# - Make sure gvim_ole.exe, vimd32.exe, vimw32.exe, installw32.exe,
|
||||||
# uninstalw32.exe and xxdw32.exe have been build as mentioned above.
|
# uninstalw32.exe and xxdw32.exe have been build as mentioned above.
|
||||||
# - put gvimext.dll in src/GvimExt and VisVim.dll in src/VisVim (get them
|
# - copy these files (get them from a binary archive or build them):
|
||||||
# from a binary archive or build them)
|
# gvimext.dll in src/GvimExt
|
||||||
|
# gvimext64.dll in src/GvimExt
|
||||||
|
# VisVim.dll in src/VisVim
|
||||||
# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
|
# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
|
||||||
|
# gvimext64.dll can be obtained from http://code.google.com/p/vim-win3264/
|
||||||
|
# It is part of vim72.zip as vim72/gvimext.dll.
|
||||||
# - make sure there is a diff.exe two levels up
|
# - make sure there is a diff.exe two levels up
|
||||||
# - go to ../nsis and do "makensis gvim.nsi".
|
# - go to ../nsis and do "makensis gvim.nsi" (takes a few minutes).
|
||||||
# - Copy gvim##.exe to the dist directory.
|
# - Copy gvim##.exe to the dist directory.
|
||||||
#
|
#
|
||||||
# OS/2:
|
# OS/2: (OBSOLETE, OS/2 version is no longer distributed)
|
||||||
# - Unpack the Unix "src", "extra" and "rt" archives.
|
# - Unpack the Unix archive.
|
||||||
# - "make -f Make_os2.mak".
|
# - "make -f Make_os2.mak".
|
||||||
# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
|
# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
|
||||||
# them to here.
|
# them to here.
|
||||||
@@ -212,8 +232,6 @@ dist/comment:
|
|||||||
mkdir dist/comment
|
mkdir dist/comment
|
||||||
|
|
||||||
COMMENT_RT = comment/$(VERSION)-rt
|
COMMENT_RT = comment/$(VERSION)-rt
|
||||||
COMMENT_RT1 = comment/$(VERSION)-rt1
|
|
||||||
COMMENT_RT2 = comment/$(VERSION)-rt2
|
|
||||||
COMMENT_D16 = comment/$(VERSION)-bin-d16
|
COMMENT_D16 = comment/$(VERSION)-bin-d16
|
||||||
COMMENT_D32 = comment/$(VERSION)-bin-d32
|
COMMENT_D32 = comment/$(VERSION)-bin-d32
|
||||||
COMMENT_W32 = comment/$(VERSION)-bin-w32
|
COMMENT_W32 = comment/$(VERSION)-bin-w32
|
||||||
@@ -224,17 +242,10 @@ COMMENT_SRC = comment/$(VERSION)-src
|
|||||||
COMMENT_OS2 = comment/$(VERSION)-bin-os2
|
COMMENT_OS2 = comment/$(VERSION)-bin-os2
|
||||||
COMMENT_HTML = comment/$(VERSION)-html
|
COMMENT_HTML = comment/$(VERSION)-html
|
||||||
COMMENT_FARSI = comment/$(VERSION)-farsi
|
COMMENT_FARSI = comment/$(VERSION)-farsi
|
||||||
COMMENT_LANG = comment/$(VERSION)-lang
|
|
||||||
|
|
||||||
dist/$(COMMENT_RT): dist/comment
|
dist/$(COMMENT_RT): dist/comment
|
||||||
echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
|
echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
|
||||||
|
|
||||||
dist/$(COMMENT_RT1): dist/comment
|
|
||||||
echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 1) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT1)
|
|
||||||
|
|
||||||
dist/$(COMMENT_RT2): dist/comment
|
|
||||||
echo "Vim - Vi IMproved - v$(VDOT) runtime files (PART 2) for MS-DOS and MS-Windows" > dist/$(COMMENT_RT2)
|
|
||||||
|
|
||||||
dist/$(COMMENT_D16): dist/comment
|
dist/$(COMMENT_D16): dist/comment
|
||||||
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
|
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
|
||||||
|
|
||||||
@@ -265,9 +276,6 @@ dist/$(COMMENT_HTML): dist/comment
|
|||||||
dist/$(COMMENT_FARSI): dist/comment
|
dist/$(COMMENT_FARSI): dist/comment
|
||||||
echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
|
echo "Vim - Vi IMproved - v$(VDOT) Farsi language files" > dist/$(COMMENT_FARSI)
|
||||||
|
|
||||||
dist/$(COMMENT_LANG): dist/comment
|
|
||||||
echo "Vim - Vi IMproved - v$(VDOT) MS-Windows language files" > dist/$(COMMENT_LANG)
|
|
||||||
|
|
||||||
unixall: dist prepare
|
unixall: dist prepare
|
||||||
-rm -f dist/$(VIMVER).tar.bz2
|
-rm -f dist/$(VIMVER).tar.bz2
|
||||||
-rm -rf dist/$(VIMRTDIR)
|
-rm -rf dist/$(VIMRTDIR)
|
||||||
@@ -283,6 +291,8 @@ unixall: dist prepare
|
|||||||
$(SRC_ALL) \
|
$(SRC_ALL) \
|
||||||
$(SRC_UNIX) \
|
$(SRC_UNIX) \
|
||||||
$(SRC_DOS_UNIX) \
|
$(SRC_DOS_UNIX) \
|
||||||
|
$(EXTRA) \
|
||||||
|
$(LANG_SRC) \
|
||||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
| (cd dist/$(VIMRTDIR); tar xf -)
|
||||||
# Need to use a "distclean" config.mk file
|
# Need to use a "distclean" config.mk file
|
||||||
cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
|
cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
|
||||||
@@ -290,26 +300,6 @@ unixall: dist prepare
|
|||||||
touch dist/$(VIMRTDIR)/src/auto/config.h
|
touch dist/$(VIMRTDIR)/src/auto/config.h
|
||||||
# Make sure configure is newer than config.mk to force it to be generated
|
# Make sure configure is newer than config.mk to force it to be generated
|
||||||
touch dist/$(VIMRTDIR)/src/configure
|
touch dist/$(VIMRTDIR)/src/configure
|
||||||
cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
|
|
||||||
bzip2 dist/$(VIMVER).tar
|
|
||||||
|
|
||||||
extra: dist prepare
|
|
||||||
-rm -f dist/$(VIMVER)-extra.tar.gz
|
|
||||||
-rm -rf dist/$(VIMRTDIR)
|
|
||||||
mkdir dist/$(VIMRTDIR)
|
|
||||||
tar cf - \
|
|
||||||
$(EXTRA) \
|
|
||||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
|
||||||
cd dist && tar cf $(VIMVER)-extra.tar $(VIMRTDIR)
|
|
||||||
gzip -9 dist/$(VIMVER)-extra.tar
|
|
||||||
|
|
||||||
lang: dist prepare
|
|
||||||
-rm -f dist/$(VIMVER)-lang.tar.gz
|
|
||||||
-rm -rf dist/$(VIMRTDIR)
|
|
||||||
mkdir dist/$(VIMRTDIR)
|
|
||||||
tar cf - \
|
|
||||||
$(LANG_SRC) \
|
|
||||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
|
||||||
# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
|
# Make sure ja.sjis.po is newer than ja.po to avoid it being regenerated.
|
||||||
# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
|
# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
|
||||||
touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
|
touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
|
||||||
@@ -319,9 +309,11 @@ lang: dist prepare
|
|||||||
touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
|
touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
|
||||||
touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
|
touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
|
||||||
touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
|
touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
|
||||||
cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
|
# Create the archive.
|
||||||
gzip -9 dist/$(VIMVER)-lang.tar
|
cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
|
||||||
|
bzip2 dist/$(VIMVER).tar
|
||||||
|
|
||||||
|
# Amiga runtime - OBSOLETE
|
||||||
amirt: dist prepare
|
amirt: dist prepare
|
||||||
-rm -f dist/vim$(VERSION)rt.tar.gz
|
-rm -f dist/vim$(VERSION)rt.tar.gz
|
||||||
-rm -rf dist/Vim
|
-rm -rf dist/Vim
|
||||||
@@ -344,6 +336,7 @@ amirt: dist prepare
|
|||||||
gzip -9 dist/vim$(VERSION)rt.tar
|
gzip -9 dist/vim$(VERSION)rt.tar
|
||||||
mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
|
mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
|
||||||
|
|
||||||
|
# Amiga binaries - OBSOLETE
|
||||||
amibin: dist prepare
|
amibin: dist prepare
|
||||||
-rm -f dist/vim$(VERSION)bin.tar.gz
|
-rm -f dist/vim$(VERSION)bin.tar.gz
|
||||||
-rm -rf dist/Vim
|
-rm -rf dist/Vim
|
||||||
@@ -361,6 +354,7 @@ amibin: dist prepare
|
|||||||
gzip -9 dist/vim$(VERSION)bin.tar
|
gzip -9 dist/vim$(VERSION)bin.tar
|
||||||
mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
|
mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
|
||||||
|
|
||||||
|
# Amiga sources - OBSOLETE
|
||||||
amisrc: dist prepare
|
amisrc: dist prepare
|
||||||
-rm -f dist/vim$(VERSION)src.tar.gz
|
-rm -f dist/vim$(VERSION)src.tar.gz
|
||||||
-rm -rf dist/Vim
|
-rm -rf dist/Vim
|
||||||
@@ -381,15 +375,41 @@ amisrc: dist prepare
|
|||||||
no_title.vim: Makefile
|
no_title.vim: Makefile
|
||||||
echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
|
echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
|
||||||
|
|
||||||
|
# MS-DOS sources
|
||||||
|
dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
|
||||||
|
-rm -rf dist/vim$(VERSION)src.zip
|
||||||
|
-rm -rf dist/vim
|
||||||
|
mkdir dist/vim
|
||||||
|
mkdir dist/vim/$(VIMRTDIR)
|
||||||
|
tar cf - \
|
||||||
|
$(SRC_ALL) \
|
||||||
|
$(SRC_DOS) \
|
||||||
|
$(SRC_AMI_DOS) \
|
||||||
|
$(SRC_DOS_UNIX) \
|
||||||
|
runtime/doc/uganda.nsis.txt \
|
||||||
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
|
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
|
||||||
|
rmdir dist/vim/$(VIMRTDIR)/runtime
|
||||||
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
|
tar cf - \
|
||||||
|
$(SRC_DOS_BIN) \
|
||||||
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
|
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
|
||||||
|
|
||||||
|
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
|
||||||
|
cd runtime/doc && $(MAKE) uganda.nsis.txt
|
||||||
|
|
||||||
dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
|
dosrt: dist dist/$(COMMENT_RT) dosrt_unix2dos
|
||||||
-rm -rf dist/vim$(VERSION)rt.zip
|
-rm -rf dist/vim$(VERSION)rt.zip
|
||||||
cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
|
cd dist && zip -9 -rD -z vim$(VERSION)rt.zip vim <$(COMMENT_RT)
|
||||||
|
|
||||||
# Split in two parts to avoid a "argument list too long" error.
|
# Split in two parts to avoid an "argument list too long" error.
|
||||||
dosrt_unix2dos: dist prepare no_title.vim
|
dosrt_unix2dos: dist prepare no_title.vim
|
||||||
-rm -rf dist/vim
|
-rm -rf dist/vim
|
||||||
mkdir dist/vim
|
mkdir dist/vim
|
||||||
mkdir dist/vim/$(VIMRTDIR)
|
mkdir dist/vim/$(VIMRTDIR)
|
||||||
|
mkdir dist/vim/$(VIMRTDIR)/lang
|
||||||
|
cd src && MAKEMO=yes $(MAKE) languages
|
||||||
tar cf - \
|
tar cf - \
|
||||||
$(RT_ALL) \
|
$(RT_ALL) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
@@ -400,7 +420,7 @@ dosrt_unix2dos: dist prepare no_title.vim
|
|||||||
$(RT_AMI_DOS) \
|
$(RT_AMI_DOS) \
|
||||||
$(LANG_GEN) \
|
$(LANG_GEN) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
tar cf - \
|
tar cf - \
|
||||||
$(RT_UNIX_DOS_BIN) \
|
$(RT_UNIX_DOS_BIN) \
|
||||||
$(RT_ALL_BIN) \
|
$(RT_ALL_BIN) \
|
||||||
@@ -409,6 +429,18 @@ dosrt_unix2dos: dist prepare no_title.vim
|
|||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
|
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
|
||||||
rmdir dist/vim/$(VIMRTDIR)/runtime
|
rmdir dist/vim/$(VIMRTDIR)/runtime
|
||||||
|
# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
|
||||||
|
# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
|
||||||
|
# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
|
||||||
|
for i in $(LANG_DOS); do \
|
||||||
|
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo" -a "$$i" != "src/po/uk.mo"; then \
|
||||||
|
n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
|
||||||
|
mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
|
||||||
|
mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
|
||||||
|
cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
|
||||||
|
fi \
|
||||||
|
done
|
||||||
|
cp libintl.dll dist/vim/$(VIMRTDIR)/
|
||||||
|
|
||||||
|
|
||||||
# Convert runtime files from Unix fileformat to dos fileformat.
|
# Convert runtime files from Unix fileformat to dos fileformat.
|
||||||
@@ -418,7 +450,7 @@ runtime_unix2dos: dosrt_unix2dos
|
|||||||
cd dist/vim/$(VIMRTDIR); tar cf - * \
|
cd dist/vim/$(VIMRTDIR); tar cf - * \
|
||||||
| (cd ../../../runtime/dos; tar xf -)
|
| (cd ../../../runtime/dos; tar xf -)
|
||||||
|
|
||||||
dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_d16 dosbin_ole $(DOSBIN_S)
|
dosbin: prepare dosbin_gvim dosbin_w32 dosbin_d32 dosbin_ole $(DOSBIN_S) $(DOSBIN_D16)
|
||||||
|
|
||||||
# make Win32 gvim
|
# make Win32 gvim
|
||||||
dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
||||||
@@ -429,7 +461,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_DOS) \
|
$(BIN_DOS) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
|
cp gvim.exe dist/vim/$(VIMRTDIR)/gvim.exe
|
||||||
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
|
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
|
||||||
@@ -448,7 +480,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_DOS) \
|
$(BIN_DOS) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
|
cp vimw32.exe dist/vim/$(VIMRTDIR)/vim.exe
|
||||||
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
|
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||||
@@ -465,7 +497,7 @@ dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_DOS) \
|
$(BIN_DOS) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp vimd32.exe dist/vim/$(VIMRTDIR)/vim.exe
|
cp vimd32.exe dist/vim/$(VIMRTDIR)/vim.exe
|
||||||
cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
|
cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||||
@@ -482,7 +514,7 @@ dosbin_d16: dist no_title.vim dist/$(COMMENT_D16)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_DOS) \
|
$(BIN_DOS) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp vimd16.exe dist/vim/$(VIMRTDIR)/vim.exe
|
cp vimd16.exe dist/vim/$(VIMRTDIR)/vim.exe
|
||||||
cp xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
|
cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||||
@@ -498,7 +530,7 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_DOS) \
|
$(BIN_DOS) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
|
cp gvim_ole.exe dist/vim/$(VIMRTDIR)/gvim.exe
|
||||||
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
|
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
|
||||||
@@ -520,7 +552,7 @@ dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_DOS) \
|
$(BIN_DOS) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp gvim_w32s.exe dist/vim/$(VIMRTDIR)/gvim.exe
|
cp gvim_w32s.exe dist/vim/$(VIMRTDIR)/gvim.exe
|
||||||
cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp README_w32s.txt dist/vim/$(VIMRTDIR)
|
cp README_w32s.txt dist/vim/$(VIMRTDIR)
|
||||||
@@ -528,53 +560,6 @@ dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
|
|||||||
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
|
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
|
||||||
cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
|
cd dist && zip -9 -rD -z gvim$(VERSION)_s.zip vim <$(COMMENT_W32S)
|
||||||
|
|
||||||
# make Win32 lang archive
|
|
||||||
doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
|
|
||||||
-rm -rf dist/vim$(VERSION)lang.zip
|
|
||||||
-rm -rf dist/vim
|
|
||||||
mkdir dist/vim
|
|
||||||
mkdir dist/vim/$(VIMRTDIR)
|
|
||||||
mkdir dist/vim/$(VIMRTDIR)/lang
|
|
||||||
cd src && MAKEMO=yes $(MAKE) languages
|
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
|
||||||
# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
|
|
||||||
# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
|
|
||||||
# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
|
|
||||||
for i in $(LANG_DOS); do \
|
|
||||||
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo" -a "$$i" != "src/po/uk.mo"; then \
|
|
||||||
n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
|
|
||||||
mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
|
|
||||||
mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \
|
|
||||||
cp $$i dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES/vim.mo; \
|
|
||||||
fi \
|
|
||||||
done
|
|
||||||
cp libintl.dll dist/vim/$(VIMRTDIR)/
|
|
||||||
cd dist && zip -9 -rD -z vim$(VERSION)lang.zip vim <$(COMMENT_LANG)
|
|
||||||
|
|
||||||
# MS-DOS sources
|
|
||||||
dossrc: dist no_title.vim dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt
|
|
||||||
-rm -rf dist/vim$(VERSION)src.zip
|
|
||||||
-rm -rf dist/vim
|
|
||||||
mkdir dist/vim
|
|
||||||
mkdir dist/vim/$(VIMRTDIR)
|
|
||||||
tar cf - \
|
|
||||||
$(SRC_ALL) \
|
|
||||||
$(SRC_DOS) \
|
|
||||||
$(SRC_AMI_DOS) \
|
|
||||||
$(SRC_DOS_UNIX) \
|
|
||||||
runtime/doc/uganda.nsis.txt \
|
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
|
||||||
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
|
|
||||||
rmdir dist/vim/$(VIMRTDIR)/runtime
|
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
|
||||||
tar cf - \
|
|
||||||
$(SRC_DOS_BIN) \
|
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
|
||||||
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
|
|
||||||
|
|
||||||
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
|
|
||||||
cd runtime/doc && $(MAKE) uganda.nsis.txt
|
|
||||||
|
|
||||||
os2bin: dist no_title.vim dist/$(COMMENT_OS2)
|
os2bin: dist no_title.vim dist/$(COMMENT_OS2)
|
||||||
-rm -rf dist/vim$(VERSION)os2.zip
|
-rm -rf dist/vim$(VERSION)os2.zip
|
||||||
-rm -rf dist/vim
|
-rm -rf dist/vim
|
||||||
@@ -583,7 +568,7 @@ os2bin: dist no_title.vim dist/$(COMMENT_OS2)
|
|||||||
tar cf - \
|
tar cf - \
|
||||||
$(BIN_OS2) \
|
$(BIN_OS2) \
|
||||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||||
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
|
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -X -u no_title.vim -c ":set tx|wq" {} \;
|
||||||
cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
|
cp vimos2.exe dist/vim/$(VIMRTDIR)/vim.exe
|
||||||
cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
cp xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||||
cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
|
cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
|
||||||
|
|||||||
58
README.txt
58
README.txt
@@ -1,4 +1,4 @@
|
|||||||
README.txt for version 7.1 of Vim: Vi IMproved.
|
README.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
|
|
||||||
WHAT IS VIM
|
WHAT IS VIM
|
||||||
@@ -9,13 +9,13 @@ on-line help, spell checking, filename completion, block operations, etc.
|
|||||||
There is also a Graphical User Interface (GUI) available. See
|
There is also a Graphical User Interface (GUI) available. See
|
||||||
"runtime/doc/vi_diff.txt" for differences with Vi.
|
"runtime/doc/vi_diff.txt" for differences with Vi.
|
||||||
|
|
||||||
This editor is very useful for editing programs and other plain ASCII files.
|
This editor is very useful for editing programs and other plain text files.
|
||||||
All commands are given with normal keyboard characters, so those who can type
|
All commands are given with normal keyboard characters, so those who can type
|
||||||
with ten fingers can work very fast. Additionally, function keys can be
|
with ten fingers can work very fast. Additionally, function keys can be
|
||||||
defined by the user, and the mouse can be used.
|
defined by the user, and the mouse can be used.
|
||||||
|
|
||||||
Vim currently runs under Amiga DOS, MS-DOS, MS-Windows 95/98/Me/NT/2000/XP,
|
Vim runs under Amiga DOS, MS-DOS, MS-Windows (95, 98, Me, NT, 2000, XP, Vista,
|
||||||
Atari MiNT, Macintosh, BeOS, VMS, RISC OS, OS/2 and almost all flavours of
|
7), Atari MiNT, Macintosh, BeOS, VMS, RISC OS, OS/2 and almost all flavours of
|
||||||
UNIX. Porting to other systems should not be very difficult.
|
UNIX. Porting to other systems should not be very difficult.
|
||||||
|
|
||||||
|
|
||||||
@@ -32,19 +32,19 @@ an overview of currently available distributions.
|
|||||||
|
|
||||||
DOCUMENTATION
|
DOCUMENTATION
|
||||||
|
|
||||||
|
The vim tutor is a one hour training course for beginners. Mostly it can be
|
||||||
|
started as "vimtutor". See ":help tutor" for more information.
|
||||||
|
|
||||||
The best is to use ":help" in Vim. If you don't have an executable yet, read
|
The best is to use ":help" in Vim. If you don't have an executable yet, read
|
||||||
"runtime/doc/help.txt". It contains pointers to the other documentation
|
"runtime/doc/help.txt". It contains pointers to the other documentation
|
||||||
files. The User Manual reads like a book and is recommended to learn to use
|
files. The User Manual reads like a book and is recommended to learn to use
|
||||||
Vim. See ":help user-manual".
|
Vim. See ":help user-manual".
|
||||||
|
|
||||||
The vim tutor is a one hour training course for beginners. Mostly it can be
|
|
||||||
started as "vimtutor". See ":help tutor" for more information.
|
|
||||||
|
|
||||||
|
|
||||||
COPYING
|
COPYING
|
||||||
|
|
||||||
Vim is Charityware. You can use and copy it as much as you like, but you are
|
Vim is Charityware. You can use and copy it as much as you like, but you are
|
||||||
encouraged to make a donation to orphans in Uganda. Please read the file
|
encouraged to make a donation to help orphans in Uganda. Please read the file
|
||||||
"runtime/doc/uganda.txt" for details (do ":help uganda" inside Vim).
|
"runtime/doc/uganda.txt" for details (do ":help uganda" inside Vim).
|
||||||
|
|
||||||
Summary of the license: There are no restrictions on using or distributing an
|
Summary of the license: There are no restrictions on using or distributing an
|
||||||
@@ -86,6 +86,8 @@ README_os2.txt OS/2
|
|||||||
README_mac.txt Macintosh
|
README_mac.txt Macintosh
|
||||||
README_vms.txt VMS
|
README_vms.txt VMS
|
||||||
|
|
||||||
|
There are more README_*.txt files, depending on the distribution you used.
|
||||||
|
|
||||||
|
|
||||||
INFORMATION
|
INFORMATION
|
||||||
|
|
||||||
@@ -98,44 +100,14 @@ If you have problems, have a look at the Vim FAQ:
|
|||||||
Send bug reports to:
|
Send bug reports to:
|
||||||
Bram Moolenaar <Bram@vim.org>
|
Bram Moolenaar <Bram@vim.org>
|
||||||
|
|
||||||
There are five mailing lists for Vim:
|
There are several mailing lists for Vim, see http://www.vim.org/maillist.php.
|
||||||
<vim@vim.org>
|
|
||||||
For discussions about using existing versions of Vim: Useful mappings,
|
|
||||||
questions, answers, where to get a specific version, etc.
|
|
||||||
<vim-dev@vim.org>
|
|
||||||
For discussions about changing Vim: New features, porting, beta-test
|
|
||||||
versions, etc.
|
|
||||||
<vim-announce@vim.org>
|
|
||||||
Announcements about new versions of Vim; also beta-test versions and
|
|
||||||
ports to different systems.
|
|
||||||
<vim-multibyte@vim.org>
|
|
||||||
For discussions about using and improving the multi-byte aspects of
|
|
||||||
Vim: XIM, Hangul, fontset, etc.
|
|
||||||
<vim-mac@vim.org>
|
|
||||||
For discussions about using and improving Vim on the Macintosh.
|
|
||||||
|
|
||||||
For more info and URLs of the archives see "http://www.vim.org/maillist.php".
|
|
||||||
|
|
||||||
NOTE:
|
|
||||||
- You can only send messages to these lists if you have subscribed!
|
|
||||||
- You need to send the messages from the same location as where you subscribed
|
|
||||||
from (to avoid spam mail).
|
|
||||||
- Maximum message size is 40000 characters.
|
|
||||||
|
|
||||||
If you want to join a maillist, send a message to
|
|
||||||
<vim-help@vim.org>
|
|
||||||
Make sure that your "From:" address is correct. Then the list server will
|
|
||||||
send you a help message.
|
|
||||||
|
|
||||||
|
|
||||||
MAIN AUTHOR
|
MAIN AUTHOR
|
||||||
|
|
||||||
Send any other comments, patches, pizza and suggestions to:
|
Send any other comments, patches, flowers and suggestions to:
|
||||||
|
|
||||||
Bram Moolenaar E-mail: Bram@vim.org
|
Bram Moolenaar E-mail: Bram@vim.org
|
||||||
Molenstraat 2
|
Finsterruetihof 1
|
||||||
2161 HP Lisse
|
8134 Adliswil
|
||||||
The Netherlands
|
Switzerland
|
||||||
|
|
||||||
This is the address of my parents, they will forward mail and eat the pizza.
|
|
||||||
My actual address will change a couple of times in 2006.
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_ami.txt for version 7.1 of Vim: Vi IMproved.
|
README_ami.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This file explains the installation of Vim on Amiga systems.
|
This file explains the installation of Vim on Amiga systems.
|
||||||
See README.txt for general information about Vim.
|
See README.txt for general information about Vim.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_amibin.txt for version 7.1 of Vim: Vi IMproved.
|
README_amibin.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
See "README_ami.txt" for installation instructions for the Amiga.
|
See "README_ami.txt" for installation instructions for the Amiga.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_amisrc.txt for version 7.1 of Vim: Vi IMproved.
|
README_amisrc.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
See "README_ami.txt" for installation instructions for the Amiga.
|
See "README_ami.txt" for installation instructions for the Amiga.
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
README_bindos.txt for version 7.1 of Vim: Vi IMproved.
|
README_bindos.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
||||||
These files are in the runtime archive (vim70rt.zip).
|
These files are in the runtime archive (vim73rt.zip).
|
||||||
|
|
||||||
|
|
||||||
There are several binary distributions of Vim for the PC. You would normally
|
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.
|
pick only one of them, but it's also possible to install several.
|
||||||
These ones are available (the version number may differ):
|
These ones are available (the version number may differ):
|
||||||
vim70d16.zip 16 bit DOS version
|
vim73d16.zip 16 bit DOS version
|
||||||
vim70d32.zip 32 bit DOS version
|
vim73d32.zip 32 bit DOS version
|
||||||
vim70w32.zip Windows 95/98/NT/etc. console version
|
vim73w32.zip Windows 95/98/NT/etc. console version
|
||||||
gvim70.zip Windows 95/98/NT/etc. GUI version
|
gvim73.zip Windows 95/98/NT/etc. GUI version
|
||||||
gvim70ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
gvim73ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||||
gvim70_s.zip Windows 3.1 GUI version
|
gvim73_s.zip Windows 3.1 GUI version
|
||||||
|
|
||||||
You MUST also get the runtime archive (vim70rt.zip).
|
You MUST also get the runtime archive (vim73rt.zip).
|
||||||
The sources are also available (vim70src.zip).
|
The sources are also available (vim73src.zip).
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_dos.txt for version 7.1 of Vim: Vi IMproved.
|
README_dos.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
|
This file explains the installation of Vim on MS-DOS and MS-Windows systems.
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
@@ -47,13 +47,13 @@ These are the normal steps to install Vim from the .zip archives:
|
|||||||
Binary and runtime Vim archives are normally unpacked in the same location,
|
Binary and runtime Vim archives are normally unpacked in the same location,
|
||||||
on top of each other.
|
on top of each other.
|
||||||
|
|
||||||
2. Unpack the zip archives. This will create a new directory "vim\vim70",
|
2. Unpack the zip archives. This will create a new directory "vim\vim73",
|
||||||
in which all the distributed Vim files are placed. Since the directory
|
in which all the distributed Vim files are placed. Since the directory
|
||||||
name includes the version number, it is unlikely that you overwrite
|
name includes the version number, it is unlikely that you overwrite
|
||||||
existing files.
|
existing files.
|
||||||
Examples:
|
Examples:
|
||||||
pkunzip -d gvim70.zip
|
pkunzip -d gvim73.zip
|
||||||
unzip vim70w32.zip
|
unzip vim73w32.zip
|
||||||
|
|
||||||
You need to unpack the runtime archive and at least one of the binary
|
You need to unpack the runtime archive and at least one of the binary
|
||||||
archives. When using more than one binary version, be careful not to
|
archives. When using more than one binary version, be careful not to
|
||||||
@@ -69,7 +69,7 @@ These are the normal steps to install Vim from the .zip archives:
|
|||||||
archive and follow the instructions in the documentation.
|
archive and follow the instructions in the documentation.
|
||||||
|
|
||||||
3. Change to the new directory:
|
3. Change to the new directory:
|
||||||
cd vim\vim70
|
cd vim\vim73
|
||||||
Run the "install.exe" program. It will ask you a number of questions about
|
Run the "install.exe" program. It will ask you a number of questions about
|
||||||
how you would like to have your Vim setup. Among these are:
|
how you would like to have your Vim setup. Among these are:
|
||||||
- You can tell it to write a "_vimrc" file with your preferences in the
|
- You can tell it to write a "_vimrc" file with your preferences in the
|
||||||
@@ -80,8 +80,8 @@ These are the normal steps to install Vim from the .zip archives:
|
|||||||
console or in a shell. You can select one of the directories in your
|
console or in a shell. You can select one of the directories in your
|
||||||
$PATH. If you skip this, you can add Vim to the search path manually:
|
$PATH. If you skip this, you can add Vim to the search path manually:
|
||||||
The simplest is to add a line to your autoexec.bat. Examples:
|
The simplest is to add a line to your autoexec.bat. Examples:
|
||||||
set path=%path%;C:\vim\vim70
|
set path=%path%;C:\vim\vim73
|
||||||
set path=%path%;D:\editors\vim\vim70
|
set path=%path%;D:\editors\vim\vim73
|
||||||
- Create entries for Vim on the desktop and in the Start menu.
|
- Create entries for Vim on the desktop and in the Start menu.
|
||||||
|
|
||||||
That's it!
|
That's it!
|
||||||
@@ -93,8 +93,8 @@ Remarks:
|
|||||||
won't show a menubar. Then you need to set the $VIM environment variable to
|
won't show a menubar. Then you need to set the $VIM environment variable to
|
||||||
point to the top directory of your Vim files. Example:
|
point to the top directory of your Vim files. Example:
|
||||||
set VIM=C:\editors\vim
|
set VIM=C:\editors\vim
|
||||||
Vim version 6.0 will look for your vimrc file in $VIM, and for the runtime
|
Vim version 7.3 will look for your vimrc file in $VIM, and for the runtime
|
||||||
files in $VIM/vim70. See ":help $VIM" for more information.
|
files in $VIM/vim73. See ":help $VIM" for more information.
|
||||||
|
|
||||||
- To avoid confusion between distributed files of different versions and your
|
- To avoid confusion between distributed files of different versions and your
|
||||||
own modified vim scripts, it is recommended to use this directory layout:
|
own modified vim scripts, it is recommended to use this directory layout:
|
||||||
@@ -105,14 +105,14 @@ Remarks:
|
|||||||
C:\vim\vimfiles\ftplugin\*.vim Filetype plugins
|
C:\vim\vimfiles\ftplugin\*.vim Filetype plugins
|
||||||
C:\vim\... Other files you made.
|
C:\vim\... Other files you made.
|
||||||
Distributed files:
|
Distributed files:
|
||||||
C:\vim\vim70\vim.exe The Vim version 6.0 executable.
|
C:\vim\vim73\vim.exe The Vim version 7.3 executable.
|
||||||
C:\vim\vim70\doc\*.txt The version 6.0 documentation files.
|
C:\vim\vim73\doc\*.txt The version 7.3 documentation files.
|
||||||
C:\vim\vim70\bugreport.vim A Vim version 6.0 script.
|
C:\vim\vim73\bugreport.vim A Vim version 7.3 script.
|
||||||
C:\vim\vim70\... Other version 6.0 distributed files.
|
C:\vim\vim73\... Other version 7.3 distributed files.
|
||||||
In this case the $VIM environment variable would be set like this:
|
In this case the $VIM environment variable would be set like this:
|
||||||
set VIM=C:\vim
|
set VIM=C:\vim
|
||||||
Then $VIMRUNTIME will automatically be set to "$VIM\vim70". Don't add
|
Then $VIMRUNTIME will automatically be set to "$VIM\vim73". Don't add
|
||||||
"vim70" to $VIM, that won't work.
|
"vim73" to $VIM, that won't work.
|
||||||
|
|
||||||
- You can put your Vim executable anywhere else. If the executable is not
|
- You can put your Vim executable anywhere else. If the executable is not
|
||||||
with the other Vim files, you should set $VIM. The simplest is to add a line
|
with the other Vim files, you should set $VIM. The simplest is to add a line
|
||||||
@@ -136,8 +136,8 @@ Remarks:
|
|||||||
Select Properties.
|
Select Properties.
|
||||||
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
|
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
|
||||||
Vim executable. Examples:
|
Vim executable. Examples:
|
||||||
C:\command.com /c C:\vim\vim70\vim.exe
|
C:\command.com /c C:\vim\vim73\vim.exe
|
||||||
C:\command.com /c D:\editors\vim\vim70\vim.exe
|
C:\command.com /c D:\editors\vim\vim73\vim.exe
|
||||||
6. Select the font, window size, etc. that you like. If this isn't
|
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
|
possible, select "Advanced" in the Program tab, and deselect "MS-DOS
|
||||||
mode".
|
mode".
|
||||||
|
|||||||
@@ -1,61 +1,54 @@
|
|||||||
README_extra.txt for version 7.1 of Vim: Vi IMproved.
|
README_extra.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
The extra archive of Vim is to be used in combination with the source archive
|
These extra files of Vim are for special purposes. This README explains what
|
||||||
(vim-7.0-src.tar.gz). The extra archive is useless without it.
|
the files are for. For general information about Vim, see the "README.txt"
|
||||||
|
file.
|
||||||
For more information, see the "README.txt" file that comes with the runtime
|
|
||||||
archive (vim-7.0-rt.tar.gz). To be able to run Vim you MUST get the runtime
|
|
||||||
archive too!
|
|
||||||
|
|
||||||
The extra archive plus the source and runtime achives make up the complete
|
|
||||||
sources of Vim for all systems.
|
|
||||||
|
|
||||||
|
|
||||||
Some of the things that the extra archive contains:
|
farsi/* Files for the Farsi (persian) language. If you don't
|
||||||
|
know what Farsi is, this is not for you.
|
||||||
|
|
||||||
Farsi Files for the Farsi (persian) language. If you don't know
|
src/if_sniff.* Interface to SNiFF. If you don't know what SNiFF is,
|
||||||
what Farsi is, this is not for you.
|
this is not for you.
|
||||||
|
|
||||||
if_sniff Interface to SNiFF. If you don't know what SNiFF is, this is
|
src/os_amiga.* Files for the Amiga port.
|
||||||
not for you.
|
|
||||||
|
|
||||||
os_amiga Files for the Amiga port.
|
src/gui_riscos.*
|
||||||
|
src/os_riscos.* Files for the RISC OS port.
|
||||||
|
|
||||||
gui_riscos
|
src/gui_beos.*
|
||||||
os_riscos Files for the RISC OS port.
|
src/os_beos.* Files for the BeOS port.
|
||||||
|
|
||||||
gui_beos
|
src/os_msdos.*
|
||||||
os_beos Files for the BeOS port.
|
src/os_dos.* Files for the MS-DOS port.
|
||||||
|
|
||||||
os_msdos
|
src/gui_mac.*
|
||||||
os_dos Files for the MS-DOS port.
|
src/os_mac.* Files for the Mac port.
|
||||||
|
|
||||||
gui_mac
|
src/os_mint.8 Files for the Atari Mint port.
|
||||||
os_mac Files for the Mac port.
|
|
||||||
|
|
||||||
os_mint Files for the Atari Mint port.
|
src/os_os2* Files for the OS/2 port.
|
||||||
|
src/tee/* Extra program for OS/2.
|
||||||
|
|
||||||
os_os2 Files for the OS/2 port.
|
src/os_vms* Files for the VMS port.
|
||||||
tee Extra program for OS/2.
|
|
||||||
|
|
||||||
os_vms Files for the VMS port.
|
src/os_w32*
|
||||||
|
src/os_win32.* Files for the Win32 port.
|
||||||
|
|
||||||
os_w32
|
src/gui_w32.* Files for the Win32 GUI.
|
||||||
os_win32 Files for the Win32 port.
|
src/gui_w48.* Files for the Win32 and Win16 GUI.
|
||||||
|
src/Make_mvc.mak MS Visual C++ makefile for the Win32 GUI.
|
||||||
|
runtime/rgb.txt File with color definitions for the Win32 GUI.
|
||||||
|
|
||||||
gui_w32 Files for the Win32 GUI.
|
src/if_ole.* OLE automation interface, for MS Windows 95 and NT.
|
||||||
gui_w48 Files for the Win32 and Win16 GUI.
|
|
||||||
Make_mvc.mak MS Visual C++ makefile for the Win32 GUI.
|
|
||||||
rgb.txt File with color definitions for the Win32 GUI.
|
|
||||||
|
|
||||||
if_ole OLE automation interface, for MS Windows 95 and NT.
|
src/VisVim/* Integration of Win32 GUI with MS Visual Developer
|
||||||
|
Studio.
|
||||||
|
|
||||||
VisVim Integration of Win32 GUI with MS Visual Developer Studio.
|
src/GvimExt/* DLL for the "Edit with Vim" context menu entry
|
||||||
|
|
||||||
GvimExt DLL for the "Edit with Vim" context menu entry
|
nsis/* NSIS script to build the self-installing MS-Windows exe
|
||||||
|
|
||||||
nsis NSIS script to build the self-installing MS-Windows exe
|
runtime/doc/*.man Preprocessed manual pages.
|
||||||
|
|
||||||
*.man Preprocessed manual pages.
|
runtime/macros/file_select.vim Vim script to browse directories (Unix only).
|
||||||
|
|
||||||
file_select.vim Vim script to browse directories (Unix only).
|
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
README_lang.txt for version 7.1 of Vim: Vi IMproved.
|
|
||||||
|
|
||||||
This file contains files for non-English languages:
|
|
||||||
- Translated messages.
|
|
||||||
- Translated menus.
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
README_mac.txt for version 7.1 of Vim: Vi IMproved.
|
README_mac.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This file explains the installation of Vim on Macintosh systems.
|
This file explains the installation of Vim on Macintosh systems.
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_ole.txt for version 7.1 of Vim: Vi IMproved.
|
README_ole.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This archive contains gvim.exe with OLE interface and VisVim.
|
This archive contains gvim.exe with OLE interface and VisVim.
|
||||||
This version of gvim.exe can also load a number of interface dynamically (you
|
This version of gvim.exe can also load a number of interface dynamically (you
|
||||||
@@ -16,5 +16,5 @@ Win32 with OLE - "MS-Windows 32 bit GUI version with OLE support"
|
|||||||
For further information, type this inside Vim:
|
For further information, type this inside Vim:
|
||||||
:help if_ole
|
:help if_ole
|
||||||
|
|
||||||
Futhermore, this archive contains VISVIM.DLL. It can be used to integrate
|
Furthermore, this archive contains VISVIM.DLL. It can be used to integrate
|
||||||
the OLE gvim with Microsoft Visual Developer Studio. See VisVim/README.txt.
|
the OLE gvim with Microsoft Visual Developer Studio. See VisVim/README.txt.
|
||||||
|
|||||||
@@ -1,32 +1,32 @@
|
|||||||
README_os2.txt for version 7.1 of Vim: Vi IMproved.
|
README_os2.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This file explains the installation of Vim on OS/2 systems.
|
This file explains the installation of Vim on OS/2 systems.
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
|
|
||||||
|
|
||||||
NOTE: You will need two archives:
|
NOTE: You will need two archives:
|
||||||
vim71rt.zip contains the runtime files (same as for the PC version)
|
vim73rt.zip contains the runtime files (same as for the PC version)
|
||||||
vim71os2.zip contains the OS/2 executables
|
vim73os2.zip contains the OS/2 executables
|
||||||
|
|
||||||
1. Go to the directory where you want to put the Vim files. Examples:
|
1. Go to the directory where you want to put the Vim files. Examples:
|
||||||
cd C:\
|
cd C:\
|
||||||
cd D:\editors
|
cd D:\editors
|
||||||
|
|
||||||
2. Unpack the zip archives. This will create a new directory "vim/vim71",
|
2. Unpack the zip archives. This will create a new directory "vim/vim73",
|
||||||
in which all the distributed Vim files are placed. Since the directory
|
in which all the distributed Vim files are placed. Since the directory
|
||||||
name includes the version number, it is unlikely that you overwrite
|
name includes the version number, it is unlikely that you overwrite
|
||||||
existing files.
|
existing files.
|
||||||
Examples:
|
Examples:
|
||||||
pkunzip -d vim71os2.zip
|
pkunzip -d vim73os2.zip
|
||||||
unzip vim71os2.zip
|
unzip vim73os2.zip
|
||||||
|
|
||||||
After you unpacked the files, you can still move the whole directory tree
|
After you unpacked the files, you can still move the whole directory tree
|
||||||
to another location.
|
to another location.
|
||||||
|
|
||||||
3. Add the directory where vim.exe is to your path. The simplest is to add a
|
3. Add the directory where vim.exe is to your path. The simplest is to add a
|
||||||
line to your autoexec.bat. Examples:
|
line to your autoexec.bat. Examples:
|
||||||
set path=%path%;C:\vim\vim71
|
set path=%path%;C:\vim\vim73
|
||||||
set path=%path%;D:\editors\vim\vim71
|
set path=%path%;D:\editors\vim\vim73
|
||||||
|
|
||||||
That's it!
|
That's it!
|
||||||
|
|
||||||
@@ -41,10 +41,10 @@ Extra remarks:
|
|||||||
C:\vim\_viminfo Dynamic info for 'viminfo'.
|
C:\vim\_viminfo Dynamic info for 'viminfo'.
|
||||||
C:\vim\... Other files you made.
|
C:\vim\... Other files you made.
|
||||||
Distributed files:
|
Distributed files:
|
||||||
C:\vim\vim71\vim.exe The Vim version 7.1 executable.
|
C:\vim\vim73\vim.exe The Vim version 7.3 executable.
|
||||||
C:\vim\vim71\doc\*.txt The version 7.1 documentation files.
|
C:\vim\vim73\doc\*.txt The version 7.3 documentation files.
|
||||||
C:\vim\vim71\bugreport.vim A Vim version 7.1 script.
|
C:\vim\vim73\bugreport.vim A Vim version 7.3 script.
|
||||||
C:\vim\vim71\... Other version 7.1 distributed files.
|
C:\vim\vim73\... Other version 7.3 distributed files.
|
||||||
In this case the $VIM environment variable would be set like this:
|
In this case the $VIM environment variable would be set like this:
|
||||||
set VIM=C:\vim
|
set VIM=C:\vim
|
||||||
|
|
||||||
|
|||||||
123
README_os390.txt
123
README_os390.txt
@@ -1,51 +1,84 @@
|
|||||||
README_os_390.txt for version 7.1 of Vim: Vi IMproved.
|
README_zOS.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
Welcome to the OS/390 Unix port of VIM.
|
This readme explains how to build Vim on z/OS. Formerly called OS/390.
|
||||||
|
See "README.txt" for general information about Vim.
|
||||||
|
|
||||||
ATTENTION: THIS IS AN _ALPHA_ VERSION!!!
|
Most likely there are not many users out there using Vim on z/OS. So chances
|
||||||
I expect you to know how to handle alpha software!
|
are good, that some bugs are still undiscovered.
|
||||||
|
|
||||||
This port was done by Ralf Schandl <schandl@de.ibm.com>.
|
Getting the source to z/OS:
|
||||||
This port is not maintained or supported by IBM!!
|
==========================
|
||||||
|
|
||||||
|
First get the source code in one big tar file and ftp it a binary to z/OS. If
|
||||||
|
the tar file is initially compressed with gzip (tar.gz) or bzip2 (tar.bz2)
|
||||||
|
uncompress it on your PC, as this tools are (most likely) not available on the
|
||||||
|
mainframe.
|
||||||
|
|
||||||
For the list of changes see runtime/doc/os_390.txt.
|
To reduce the size of the tar file you might compress it into a zip file. On
|
||||||
|
z/OS Unix you might have the command "jar" from java to uncompress a zip. Use:
|
||||||
|
jar xvf <zip file name>
|
||||||
|
|
||||||
|
Unpack the tar file on z/OS with
|
||||||
|
pax -o from=ISO8859-1,to=IBM-1047 -rf vim.tar
|
||||||
|
|
||||||
|
Note: The Vim source contains a few bitmaps etc which will be destroyed by
|
||||||
|
this command, but these files are not needed on zOS (at least not for the
|
||||||
|
console version).
|
||||||
|
|
||||||
|
|
||||||
Compiling:
|
Compiling:
|
||||||
----------
|
==========
|
||||||
|
|
||||||
Note: After the file configure was created via autoconf, it had been
|
Vim can be compiled with or without GUI support. For 7.3 only the compilation
|
||||||
handedited, to make the test for ICEConnectionNumber work.
|
without GUI was tested. Below is a section about compiling with X11 but this
|
||||||
DO NOT run autoconf again!
|
is from an earlier version of Vim.
|
||||||
|
|
||||||
Without X11:
|
Console only:
|
||||||
|
-------------
|
||||||
|
|
||||||
If you build VIM without X11 support, compiling and building is nearly
|
If you build VIM without X11 support, compiling and building is nearly
|
||||||
straightforward. The only restriction is, that you can't call make from the
|
straightforward.
|
||||||
VIM toplevel directory. Change to the src directory first and call make from
|
|
||||||
there. Here is a what to do:
|
Change to the vim directory and do:
|
||||||
|
|
||||||
# Don't use c89!
|
# Don't use c89!
|
||||||
# Make additional symbols visible.
|
|
||||||
# Allow intermixing of compiler options and files.
|
# Allow intermixing of compiler options and files.
|
||||||
|
|
||||||
$ export CC=cc
|
$ export CC=cc
|
||||||
$ export CFLAGS=-D_ALL_SOURCE
|
|
||||||
$ export _CC_CCMODE=1
|
$ export _CC_CCMODE=1
|
||||||
$./configure --enable-max-features --without-x --enable-gui=no
|
$./configure --with-features=big --without-x --enable-gui=no
|
||||||
$ cd src
|
$ cd src
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
|
There may be warnings:
|
||||||
|
- include files not found (libc, sys/param.h, ...)
|
||||||
|
- Redeclaration of ... differs from ...
|
||||||
|
-- just ignore them.
|
||||||
|
|
||||||
$ make test
|
$ make test
|
||||||
|
|
||||||
Note: Test 28 will be reported as failed. This is because diff can't
|
This will produce lots of garbage on your screen (including error
|
||||||
compare files containing '\0' characters. Test 11 will fail if you
|
messages). Don't worry.
|
||||||
don't have gzip.
|
|
||||||
|
If the test stops at one point in vim (might happen in test 11), just
|
||||||
|
press :q!
|
||||||
|
|
||||||
|
Expected test failures:
|
||||||
|
11: If you don't have gzip installed
|
||||||
|
24: test of backslash sequences in regexp are ASCII dependent
|
||||||
|
42: Multibyte is not supported on z/OS
|
||||||
|
55: ASCII<->EBCDIC sorting
|
||||||
|
57: ASCII<->EBCDIC sorting
|
||||||
|
58: Spell checking is not supported with EBCDIC
|
||||||
|
71: Blowfish encryption doesn't work
|
||||||
|
|
||||||
$ make install
|
$ make install
|
||||||
|
|
||||||
|
|
||||||
With X11:
|
With X11:
|
||||||
|
---------
|
||||||
|
|
||||||
|
WARNING: This instruction was not tested with Vim 7.3.
|
||||||
|
|
||||||
There are two ways for building VIM with X11 support. The first way is simple
|
There are two ways for building VIM with X11 support. The first way is simple
|
||||||
and results in a big executable (~13 Mb), the second needs a few additional
|
and results in a big executable (~13 Mb), the second needs a few additional
|
||||||
@@ -54,8 +87,6 @@ you want Motif.
|
|||||||
|
|
||||||
The easy way:
|
The easy way:
|
||||||
$ export CC=cc
|
$ export CC=cc
|
||||||
$ export CFLAGS="-D_ALL_SOURCE -W c,dll"
|
|
||||||
$ export LDFLAGS="-W l,dll"
|
|
||||||
$ export _CC_CCMODE=1
|
$ export _CC_CCMODE=1
|
||||||
$ ./configure --enable-max-features --enable-gui=motif
|
$ ./configure --enable-max-features --enable-gui=motif
|
||||||
$ cd src
|
$ cd src
|
||||||
@@ -65,7 +96,7 @@ you want Motif.
|
|||||||
|
|
||||||
The smarter way:
|
The smarter way:
|
||||||
Make VIM as described above. Then create a file named 'link.sed' with the
|
Make VIM as described above. Then create a file named 'link.sed' with the
|
||||||
following contense:
|
following content (see src/link.390):
|
||||||
|
|
||||||
s/-lXext *//g
|
s/-lXext *//g
|
||||||
s/-lXmu *//g
|
s/-lXmu *//g
|
||||||
@@ -84,47 +115,3 @@ you want Motif.
|
|||||||
See the Makefile and the file link.sh on how link.sed is used.
|
See the Makefile and the file link.sh on how link.sed is used.
|
||||||
|
|
||||||
|
|
||||||
Hint:
|
|
||||||
-----
|
|
||||||
Use the online help! (See weaknesses below.)
|
|
||||||
|
|
||||||
Example:
|
|
||||||
Enter ':help syntax' and then press <TAB> several times, you will switch
|
|
||||||
through all help items containing 'syntax'. Press <ENTER> on the one you are
|
|
||||||
interested at. Or press <Ctrl-D> and you will get a list of all items printed
|
|
||||||
that contain 'syntax'.
|
|
||||||
|
|
||||||
The helpfiles contains cross-references. Links are between '|'. Position the
|
|
||||||
cursor on them and press <Ctrl-]> to follow this link. Use <Ctrl-T> to jump
|
|
||||||
back.
|
|
||||||
|
|
||||||
Known weaknesses:
|
|
||||||
-----------------
|
|
||||||
|
|
||||||
- You can't call make from the toplevel directory, you have to do a 'cd src'
|
|
||||||
first. If you do it, make will call configure again. I don't know why and
|
|
||||||
didn't investigate it, there were more important things to do. If you can
|
|
||||||
make it work drop me a note.
|
|
||||||
|
|
||||||
- The documentation was not updated for this alpha release. It contains lot of
|
|
||||||
ASCII dependencies, especially in examples.
|
|
||||||
|
|
||||||
- Digraphs are dependent on code page 1047. Digraphs are used to enter
|
|
||||||
characters that normally cannot be entered by an ordinary keyboard.
|
|
||||||
See ":help digraphs".
|
|
||||||
|
|
||||||
- Using 'ga' to show the code of the character under the cursor shows the
|
|
||||||
correct dec/hex/oct values, but the other informations might be missing or
|
|
||||||
wrong.
|
|
||||||
|
|
||||||
- The sed syntax file doesn't work, it is ASCII dependent.
|
|
||||||
|
|
||||||
Bugs:
|
|
||||||
-----
|
|
||||||
If you find a bug please inform me (schandl@de.ibm.com), don't disturb Bram
|
|
||||||
Moolenaar. It's most likely a bug I introduced during porting or some ASCII
|
|
||||||
dependency I didn't notice.
|
|
||||||
|
|
||||||
Feedback:
|
|
||||||
---------
|
|
||||||
Feedback welcome! Just drop me a note.
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
README_src.txt for version 7.1 of Vim: Vi IMproved.
|
README_src.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
The source archive contains the files needed to compile Vim on Unix systems.
|
The source archive contains the files needed to compile Vim on Unix systems.
|
||||||
It is packed for Unix systems (NL line separator). It is also used for other
|
It is packed for Unix systems (NL line separator). It is also used for other
|
||||||
systems in combination with the extra archive (vim-7.0-extra.tar.gz, in the
|
systems in combination with the extra archive (vim-7.3-extra.tar.gz, in the
|
||||||
"extra" directory of ftp.vim.org).
|
"extra" directory of ftp.vim.org).
|
||||||
|
|
||||||
For more information, see the README.txt file that comes with the runtime
|
For more information, see the README.txt file that comes with the runtime
|
||||||
archive (vim-7.0-rt.tar.gz). To be able to run Vim you MUST get the runtime
|
archive (vim-7.3-rt.tar.gz). To be able to run Vim you MUST get the runtime
|
||||||
archive too!
|
archive too!
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
README_srcdos.txt for version 7.1 of Vim: Vi IMproved.
|
README_srcdos.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
|
||||||
These files are in the runtime archive (vim70rt.zip).
|
These files are in the runtime archive (vim73rt.zip).
|
||||||
|
|
||||||
|
|
||||||
The DOS source archive contains the files needed to compile Vim on MS-DOS or
|
The DOS source archive contains the files needed to compile Vim on MS-DOS or
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_unix.txt for version 7.1 of Vim: Vi IMproved.
|
README_unix.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This file explains the installation of Vim on Unix systems.
|
This file explains the installation of Vim on Unix systems.
|
||||||
See "README.txt" for general information about Vim.
|
See "README.txt" for general information about Vim.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_vms.txt for version 7.1 of Vim: Vi IMproved.
|
README_vms.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This file explains the installation of Vim on VMS systems.
|
This file explains the installation of Vim on VMS systems.
|
||||||
See "README.txt" in the runtime archive for information about Vim.
|
See "README.txt" in the runtime archive for information about Vim.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
README_w32s.txt for version 7.1 of Vim: Vi IMproved.
|
README_w32s.txt for version 7.3 of Vim: Vi IMproved.
|
||||||
|
|
||||||
This archive contains the gvim.exe that was specifically compiled for use in
|
This archive contains the gvim.exe that was specifically compiled for use in
|
||||||
the Win32s subsystem in MS-Windows 3.1 and 3.11.
|
the Win32s subsystem in MS-Windows 3.1 and 3.11.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# NSIS file to create a self-installing exe for Vim.
|
# NSIS file to create a self-installing exe for Vim.
|
||||||
# It requires NSIS version 2.0 or later.
|
# It requires NSIS version 2.0 or later.
|
||||||
# Last change: 2004 May 02
|
# Last Change: 2010 Jul 30
|
||||||
|
|
||||||
# WARNING: if you make changes to this script, look out for $0 to be valid,
|
# WARNING: if you make changes to this script, look out for $0 to be valid,
|
||||||
# because uninstall deletes most files in $0.
|
# because uninstall deletes most files in $0.
|
||||||
@@ -22,17 +22,20 @@
|
|||||||
!define HAVE_NLS
|
!define HAVE_NLS
|
||||||
|
|
||||||
!define VER_MAJOR 7
|
!define VER_MAJOR 7
|
||||||
!define VER_MINOR 1
|
!define VER_MINOR 3
|
||||||
|
|
||||||
# ----------- No configurable settings below this line -----------
|
# ----------- No configurable settings below this line -----------
|
||||||
|
|
||||||
!include UpgradeDLL.nsh # for VisVim.dll
|
!include UpgradeDLL.nsh # for VisVim.dll
|
||||||
|
!include LogicLib.nsh
|
||||||
|
!include x64.nsh
|
||||||
|
|
||||||
Name "Vim ${VER_MAJOR}.${VER_MINOR}"
|
Name "Vim ${VER_MAJOR}.${VER_MINOR}"
|
||||||
OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
|
OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
|
||||||
CRCCheck force
|
CRCCheck force
|
||||||
SetCompressor lzma
|
SetCompressor lzma
|
||||||
SetDatablockOptimize on
|
SetDatablockOptimize on
|
||||||
|
RequestExecutionLevel highest
|
||||||
|
|
||||||
ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
|
ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
|
||||||
DirText "Choose a directory to install Vim (must end in 'vim')"
|
DirText "Choose a directory to install Vim (must end in 'vim')"
|
||||||
@@ -139,7 +142,7 @@ FunctionEnd
|
|||||||
Function .onInstSuccess
|
Function .onInstSuccess
|
||||||
WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
|
WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
|
||||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||||
"The installation process has been successfull. Happy Vimming! \
|
"The installation process has been successful. Happy Vimming! \
|
||||||
$\n$\n Do you want to see the README file now?" IDNO NoReadme
|
$\n$\n Do you want to see the README file now?" IDNO NoReadme
|
||||||
Exec '$0\gvim.exe -R "$0\README.txt"'
|
Exec '$0\gvim.exe -R "$0\README.txt"'
|
||||||
NoReadme:
|
NoReadme:
|
||||||
@@ -290,13 +293,21 @@ Section "Add an Edit-with-Vim context menu entry"
|
|||||||
SetOutPath $0
|
SetOutPath $0
|
||||||
ClearErrors
|
ClearErrors
|
||||||
SetOverwrite try
|
SetOverwrite try
|
||||||
File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll
|
${If} ${RunningX64}
|
||||||
|
File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext64.dll
|
||||||
|
${Else}
|
||||||
|
File /oname=gvimext.dll ${VIMSRC}\GvimExt\gvimext.dll
|
||||||
|
${EndIf}
|
||||||
IfErrors 0 GvimExtDone
|
IfErrors 0 GvimExtDone
|
||||||
|
|
||||||
# Can't copy gvimext.dll, create it under another name and rename it on
|
# Can't copy gvimext.dll, create it under another name and rename it on
|
||||||
# next reboot.
|
# next reboot.
|
||||||
GetTempFileName $3 $0
|
GetTempFileName $3 $0
|
||||||
File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll
|
${If} ${RunningX64}
|
||||||
|
File /oname=$3 ${VIMSRC}\GvimExt\gvimext64.dll
|
||||||
|
${Else}
|
||||||
|
File /oname=$3 ${VIMSRC}\GvimExt\gvimext.dll
|
||||||
|
${EndIf}
|
||||||
Rename /REBOOTOK $3 $0\gvimext.dll
|
Rename /REBOOTOK $3 $0\gvimext.dll
|
||||||
|
|
||||||
GvimExtDone:
|
GvimExtDone:
|
||||||
@@ -438,8 +449,8 @@ Section Uninstall
|
|||||||
|
|
||||||
AskRemove:
|
AskRemove:
|
||||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||||
"Remove all files in your $1\vimfiles directory? \
|
"Remove all files in your $1\vimfiles directory?$\n \
|
||||||
$\nIf you have created something there that you want to keep, click No" IDNO Fin
|
$\nCAREFUL: If you have created something there that you want to keep, click No" IDNO Fin
|
||||||
RMDir /r $1\vimfiles
|
RMDir /r $1\vimfiles
|
||||||
NoRemove:
|
NoRemove:
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Perform Ada specific completion & tagging.
|
" Description: Perform Ada specific completion & tagging.
|
||||||
" Language: Ada (2005)
|
" Language: Ada (2005)
|
||||||
" $Id$
|
" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||||
" Maintainer: Martin Krischik
|
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||||
|
" Taylor Venable <taylor@metasyntax.net>
|
||||||
" Neil Bird <neil@fnxweb.com>
|
" Neil Bird <neil@fnxweb.com>
|
||||||
" $Author$
|
" Ned Okie <nokie@radford.edu>
|
||||||
" $Date$
|
" $Author: krischik $
|
||||||
" Version: 4.2
|
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||||
" $Revision$
|
" Version: 4.6
|
||||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
|
" $Revision: 887 $
|
||||||
|
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
|
||||||
" History: 24.05.2006 MK Unified Headers
|
" History: 24.05.2006 MK Unified Headers
|
||||||
" 26.05.2006 MK ' should not be in iskeyword.
|
" 26.05.2006 MK ' should not be in iskeyword.
|
||||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||||
@@ -17,6 +19,10 @@
|
|||||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||||
" autoload
|
" autoload
|
||||||
" 05.11.2006 MK Bram suggested to save on spaces
|
" 05.11.2006 MK Bram suggested to save on spaces
|
||||||
|
" 08.07.2007 TV fix mapleader problems.
|
||||||
|
" 09.05.2007 MK Session just won't work no matter how much
|
||||||
|
" tweaking is done
|
||||||
|
" 19.09.2007 NO still some mapleader problems
|
||||||
" Help Page: ft-ada-functions
|
" Help Page: ft-ada-functions
|
||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -425,30 +431,49 @@ function ada#Create_Tags (option)
|
|||||||
execute '!ctags --excmd=number ' . l:Filename
|
execute '!ctags --excmd=number ' . l:Filename
|
||||||
endfunction ada#Create_Tags
|
endfunction ada#Create_Tags
|
||||||
|
|
||||||
function ada#Switch_Session (New_Session) "{{{1
|
" Section: ada#Switch_Session {{{1
|
||||||
if a:New_Session != v:this_session
|
"
|
||||||
"
|
function ada#Switch_Session (New_Session)
|
||||||
" We actualy got a new session - otherwise there
|
"
|
||||||
" is nothing to do.
|
" you should not save to much date into the seession since they will
|
||||||
"
|
" be sourced
|
||||||
if strlen (v:this_session) > 0
|
"
|
||||||
execute 'mksession! ' . v:this_session
|
let l:sessionoptions=&sessionoptions
|
||||||
|
|
||||||
|
try
|
||||||
|
set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize
|
||||||
|
|
||||||
|
if a:New_Session != v:this_session
|
||||||
|
"
|
||||||
|
" We actualy got a new session - otherwise there
|
||||||
|
" is nothing to do.
|
||||||
|
"
|
||||||
|
if strlen (v:this_session) > 0
|
||||||
|
execute 'mksession! ' . v:this_session
|
||||||
|
endif
|
||||||
|
|
||||||
|
let v:this_session = a:New_Session
|
||||||
|
|
||||||
|
"if filereadable (v:this_session)
|
||||||
|
"execute 'source ' . v:this_session
|
||||||
|
"endif
|
||||||
|
|
||||||
|
augroup ada_session
|
||||||
|
autocmd!
|
||||||
|
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
"if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open
|
||||||
|
"TlistOpen
|
||||||
|
"endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
finally
|
||||||
let v:this_session = a:New_Session
|
let &sessionoptions=l:sessionoptions
|
||||||
|
endtry
|
||||||
if filereadable (v:this_session)
|
|
||||||
execute 'source ' . v:this_session
|
|
||||||
endif
|
|
||||||
|
|
||||||
augroup ada_session
|
|
||||||
autocmd!
|
|
||||||
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
|
|
||||||
augroup END
|
|
||||||
endif
|
|
||||||
|
|
||||||
return
|
return
|
||||||
endfunction ada#Switch_Session "}}}1
|
endfunction ada#Switch_Session
|
||||||
|
|
||||||
" Section: GNAT Pretty Printer folding {{{1
|
" Section: GNAT Pretty Printer folding {{{1
|
||||||
"
|
"
|
||||||
@@ -546,18 +571,23 @@ function ada#Map_Menu (Text, Keys, Command)
|
|||||||
\ a:Keys .
|
\ a:Keys .
|
||||||
\" <C-O>:" . a:Command . "<CR>"
|
\" <C-O>:" . a:Command . "<CR>"
|
||||||
else
|
else
|
||||||
|
if exists("g:mapleader")
|
||||||
|
let l:leader = g:mapleader
|
||||||
|
else
|
||||||
|
let l:leader = '\'
|
||||||
|
endif
|
||||||
execute
|
execute
|
||||||
\ "50amenu " .
|
\ "50amenu " .
|
||||||
\ "Ada." . escape(a:Text, ' ') .
|
\ "Ada." . escape(a:Text, ' ') .
|
||||||
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
|
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
|
||||||
\ " :" . a:Command . "<CR>"
|
\ " :" . a:Command . "<CR>"
|
||||||
execute
|
execute
|
||||||
\ "nnoremap <buffer>" .
|
\ "nnoremap <buffer>" .
|
||||||
\ escape(g:mapleader . "a" . a:Keys , '\') .
|
\ escape(l:leader . "a" . a:Keys , '\') .
|
||||||
\" :" . a:Command
|
\" :" . a:Command
|
||||||
execute
|
execute
|
||||||
\ "inoremap <buffer>" .
|
\ "inoremap <buffer>" .
|
||||||
\ escape(g:mapleader . "a" . a:Keys , '\') .
|
\ escape(l:leader . "a" . a:Keys , '\') .
|
||||||
\" <C-O>:" . a:Command
|
\" <C-O>:" . a:Command
|
||||||
endif
|
endif
|
||||||
return
|
return
|
||||||
@@ -566,10 +596,15 @@ endfunction
|
|||||||
" Section: ada#Map_Popup {{{2
|
" Section: ada#Map_Popup {{{2
|
||||||
"
|
"
|
||||||
function ada#Map_Popup (Text, Keys, Command)
|
function ada#Map_Popup (Text, Keys, Command)
|
||||||
|
if exists("g:mapleader")
|
||||||
|
let l:leader = g:mapleader
|
||||||
|
else
|
||||||
|
let l:leader = '\'
|
||||||
|
endif
|
||||||
execute
|
execute
|
||||||
\ "50amenu " .
|
\ "50amenu " .
|
||||||
\ "PopUp." . escape(a:Text, ' ') .
|
\ "PopUp." . escape(a:Text, ' ') .
|
||||||
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
|
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
|
||||||
\ " :" . a:Command . "<CR>"
|
\ " :" . a:Command . "<CR>"
|
||||||
|
|
||||||
call ada#Map_Menu (a:Text, a:Keys, a:Command)
|
call ada#Map_Menu (a:Text, a:Keys, a:Command)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Vim Ada omnicompletion file
|
" Description: Vim Ada omnicompletion file
|
||||||
" Language: Ada (2005)
|
" Language: Ada (2005)
|
||||||
" $Id$
|
" $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $
|
||||||
" Maintainer: Martin Krischik
|
" Maintainer: Martin Krischik
|
||||||
" $Author$
|
" $Author: krischik $
|
||||||
" $Date$
|
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||||
" Version: 4.2
|
" Version: 4.6
|
||||||
" $Revision$
|
" $Revision: 887 $
|
||||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
|
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
|
||||||
" History: 24.05.2006 MK Unified Headers
|
" History: 24.05.2006 MK Unified Headers
|
||||||
" 26.05.2006 MK improved search for begin of word.
|
" 26.05.2006 MK improved search for begin of word.
|
||||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: C
|
" Language: C
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2006 May 08
|
" Last Change: 2010 Mar 23
|
||||||
|
|
||||||
|
|
||||||
" This function is used for the 'omnifunc' option.
|
" This function is used for the 'omnifunc' option.
|
||||||
@@ -119,6 +119,27 @@ function! ccomplete#Complete(findstart, base)
|
|||||||
" TODO: join previous line if it makes sense
|
" TODO: join previous line if it makes sense
|
||||||
let line = getline('.')
|
let line = getline('.')
|
||||||
let col = col('.')
|
let col = col('.')
|
||||||
|
if stridx(strpart(line, 0, col), ';') != -1
|
||||||
|
" Handle multiple declarations on the same line.
|
||||||
|
let col2 = col - 1
|
||||||
|
while line[col2] != ';'
|
||||||
|
let col2 -= 1
|
||||||
|
endwhile
|
||||||
|
let line = strpart(line, col2 + 1)
|
||||||
|
let col -= col2
|
||||||
|
endif
|
||||||
|
if stridx(strpart(line, 0, col), ',') != -1
|
||||||
|
" Handle multiple declarations on the same line in a function
|
||||||
|
" declaration.
|
||||||
|
let col2 = col - 1
|
||||||
|
while line[col2] != ','
|
||||||
|
let col2 -= 1
|
||||||
|
endwhile
|
||||||
|
if strpart(line, col2 + 1, col - col2 - 1) =~ ' *[^ ][^ ]* *[^ ]'
|
||||||
|
let line = strpart(line, col2 + 1)
|
||||||
|
let col -= col2
|
||||||
|
endif
|
||||||
|
endif
|
||||||
if len(items) == 1
|
if len(items) == 1
|
||||||
" Completing one word and it's a local variable: May add '[', '.' or
|
" Completing one word and it's a local variable: May add '[', '.' or
|
||||||
" '->'.
|
" '->'.
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Vim Ada/Dec Ada compiler file
|
" Description: Vim Ada/Dec Ada compiler file
|
||||||
" Language: Ada (Dec Ada)
|
" Language: Ada (Dec Ada)
|
||||||
" $Id$
|
" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||||
" Maintainer: Martin Krischik
|
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||||
" $Author$
|
" $Author: krischik $
|
||||||
" $Date$
|
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||||
" Version: 4.2
|
" Version: 4.6
|
||||||
" $Revision$
|
" $Revision: 887 $
|
||||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
|
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
|
||||||
" History: 21.07.2006 MK New Dec Ada
|
" History: 21.07.2006 MK New Dec Ada
|
||||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||||
@@ -45,7 +45,7 @@ function decada#Set_Session (...) dict " {{{1
|
|||||||
call ada#Switch_Session (a:1)
|
call ada#Switch_Session (a:1)
|
||||||
elseif argc() == 0 && strlen (v:servername) > 0
|
elseif argc() == 0 && strlen (v:servername) > 0
|
||||||
call ada#Switch_Session (
|
call ada#Switch_Session (
|
||||||
\ expand('~')[0:-2] . ".vimfiles.session]" .
|
\ expand('~')[0:-2] . ".vimfiles.session]decada_" .
|
||||||
\ v:servername . ".vim")
|
\ v:servername . ".vim")
|
||||||
endif
|
endif
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" getscript.vim
|
" getscript.vim
|
||||||
" Author: Charles E. Campbell, Jr.
|
" Author: Charles E. Campbell, Jr.
|
||||||
" Date: May 11, 2007
|
" Date: Dec 28, 2009
|
||||||
" Version: 27
|
" Version: 32
|
||||||
" Installing: :help glvs-install
|
" Installing: :help glvs-install
|
||||||
" Usage: :help glvs
|
" Usage: :help glvs
|
||||||
"
|
"
|
||||||
@@ -11,23 +11,42 @@
|
|||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Initialization: {{{1
|
" Initialization: {{{1
|
||||||
" if you're sourcing this file, surely you can't be
|
" if you're sourcing this file, surely you can't be
|
||||||
" expecting vim to be in its vi-compatible mode
|
" expecting vim to be in its vi-compatible mode!
|
||||||
|
if exists("g:loaded_getscript")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let g:loaded_getscript= "v32"
|
||||||
if &cp
|
if &cp
|
||||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
if v:version < 702
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "***warning*** this version of getscript needs vim 7.2"
|
||||||
|
echohl Normal
|
||||||
|
finish
|
||||||
|
endif
|
||||||
let s:keepcpo = &cpo
|
let s:keepcpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
"DechoTabOn
|
"DechoTabOn
|
||||||
|
|
||||||
if exists("g:loaded_getscript")
|
" ---------------------------
|
||||||
finish
|
" Global Variables: {{{1
|
||||||
|
" ---------------------------
|
||||||
|
" Cygwin Detection ------- {{{2
|
||||||
|
if !exists("g:getscript_cygwin")
|
||||||
|
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
|
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||||
|
let g:getscript_cygwin= 1
|
||||||
|
else
|
||||||
|
let g:getscript_cygwin= 0
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let g:getscript_cygwin= 0
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
let g:loaded_getscript= "v27"
|
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" wget vs curl {{{2
|
||||||
" Global Variables: {{{1
|
|
||||||
" allow user to change the command for obtaining scripts (does fetch work?)
|
|
||||||
if !exists("g:GetLatestVimScripts_wget")
|
if !exists("g:GetLatestVimScripts_wget")
|
||||||
if executable("wget")
|
if executable("wget")
|
||||||
let g:GetLatestVimScripts_wget= "wget"
|
let g:GetLatestVimScripts_wget= "wget"
|
||||||
@@ -79,7 +98,9 @@ if g:GetLatestVimScripts_allowautoinstall
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
|
if exists("g:GetLatestVimScripts_autoinstalldir") && isdirectory(g:GetLatestVimScripts_autoinstalldir)
|
||||||
|
let s:autoinstall= g:GetLatestVimScripts_autoinstalldir"
|
||||||
|
elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
|
||||||
let s:autoinstall= $HOME."/".s:dotvim
|
let s:autoinstall= $HOME."/".s:dotvim
|
||||||
endif
|
endif
|
||||||
" call Decho("s:autoinstall<".s:autoinstall.">")
|
" call Decho("s:autoinstall<".s:autoinstall.">")
|
||||||
@@ -93,262 +114,6 @@ com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
|
|||||||
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
|
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
|
||||||
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
|
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
" 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.sf.net.
|
|
||||||
fun! s:GetOneScript(...)
|
|
||||||
" call Dfunc("GetOneScript()")
|
|
||||||
|
|
||||||
" set options to allow progress to be shown on screen
|
|
||||||
let t_ti= &t_ti
|
|
||||||
let t_te= &t_te
|
|
||||||
let rs = &rs
|
|
||||||
set t_ti= t_te= nors
|
|
||||||
|
|
||||||
" put current line on top-of-screen and interpret it into
|
|
||||||
" a script identifer : used to obtain webpage
|
|
||||||
" source identifier : used to identify current version
|
|
||||||
" and an associated comment: used to report on what's being considered
|
|
||||||
if a:0 >= 3
|
|
||||||
let scriptid = a:1
|
|
||||||
let srcid = a:2
|
|
||||||
let fname = a:3
|
|
||||||
let cmmnt = ""
|
|
||||||
" call Decho("scriptid<".scriptid.">")
|
|
||||||
" call Decho("srcid <".srcid.">")
|
|
||||||
" call Decho("fname <".fname.">")
|
|
||||||
else
|
|
||||||
let curline = getline(".")
|
|
||||||
if curline =~ '^\s*#'
|
|
||||||
" call Dret("GetOneScript : skipping a pure comment line")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
|
|
||||||
try
|
|
||||||
let scriptid = substitute(curline,parsepat,'\1','e')
|
|
||||||
catch /^Vim\%((\a\+)\)\=:E486/
|
|
||||||
let scriptid= 0
|
|
||||||
endtry
|
|
||||||
try
|
|
||||||
let srcid = substitute(curline,parsepat,'\2','e')
|
|
||||||
catch /^Vim\%((\a\+)\)\=:E486/
|
|
||||||
let srcid= 0
|
|
||||||
endtry
|
|
||||||
try
|
|
||||||
let fname= substitute(curline,parsepat,'\3','e')
|
|
||||||
catch /^Vim\%((\a\+)\)\=:E486/
|
|
||||||
let fname= ""
|
|
||||||
endtry
|
|
||||||
try
|
|
||||||
let cmmnt= substitute(curline,parsepat,'\4','e')
|
|
||||||
catch /^Vim\%((\a\+)\)\=:E486/
|
|
||||||
let cmmnt= ""
|
|
||||||
endtry
|
|
||||||
" call Decho("curline <".curline.">")
|
|
||||||
" call Decho("parsepat<".parsepat.">")
|
|
||||||
" call Decho("scriptid<".scriptid.">")
|
|
||||||
" call Decho("srcid <".srcid.">")
|
|
||||||
" call Decho("fname <".fname.">")
|
|
||||||
endif
|
|
||||||
|
|
||||||
if scriptid == 0 || srcid == 0
|
|
||||||
" When looking for :AutoInstall: lines, skip scripts that
|
|
||||||
" have 0 0 scriptname
|
|
||||||
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
|
|
||||||
let doautoinstall= 0
|
|
||||||
if fname =~ ":AutoInstall:"
|
|
||||||
" call Decho("fname<".fname."> has :AutoInstall:...")
|
|
||||||
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
|
|
||||||
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
|
|
||||||
if s:autoinstall != ""
|
|
||||||
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let aicmmnt= fname
|
|
||||||
endif
|
|
||||||
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
|
|
||||||
|
|
||||||
exe "norm z\<CR>"
|
|
||||||
redraw!
|
|
||||||
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
|
|
||||||
echomsg 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
|
|
||||||
|
|
||||||
" grab a copy of the plugin's vim.sf.net webpage
|
|
||||||
let scriptaddr = 'http://vim.sf.net/script.php?script_id='.scriptid
|
|
||||||
let tmpfile = tempname()
|
|
||||||
let v:errmsg = ""
|
|
||||||
|
|
||||||
" make up to three tries at downloading the description
|
|
||||||
let itry= 1
|
|
||||||
while itry <= 3
|
|
||||||
" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
|
|
||||||
if has("win32") || has("win16") || has("win95")
|
|
||||||
" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"')
|
|
||||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile.' "'.scriptaddr.'"'
|
|
||||||
else
|
|
||||||
" call Decho("silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'")
|
|
||||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".tmpfile." '".scriptaddr."'"
|
|
||||||
endif
|
|
||||||
if itry == 1
|
|
||||||
exe "silent vsplit ".tmpfile
|
|
||||||
else
|
|
||||||
silent! e %
|
|
||||||
endif
|
|
||||||
|
|
||||||
" find the latest source-id in the plugin's webpage
|
|
||||||
silent! 1
|
|
||||||
let findpkg= search('Click on the package to download','W')
|
|
||||||
if findpkg > 0
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let itry= itry + 1
|
|
||||||
endwhile
|
|
||||||
" call Decho(" --- end downloading tries while loop --- itry=".itry)
|
|
||||||
|
|
||||||
" testing: did finding "Click on the package..." fail?
|
|
||||||
if findpkg == 0 || itry >= 4
|
|
||||||
silent q!
|
|
||||||
call delete(tmpfile)
|
|
||||||
" restore options
|
|
||||||
let &t_ti = t_ti
|
|
||||||
let &t_te = t_te
|
|
||||||
let &rs = rs
|
|
||||||
let s:downerrors = s:downerrors + 1
|
|
||||||
" 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")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
" call Decho('found "Click on the package to download"')
|
|
||||||
|
|
||||||
let findsrcid= search('src_id=','W')
|
|
||||||
if findsrcid == 0
|
|
||||||
silent q!
|
|
||||||
call delete(tmpfile)
|
|
||||||
" restore options
|
|
||||||
let &t_ti = t_ti
|
|
||||||
let &t_te = t_te
|
|
||||||
let &rs = rs
|
|
||||||
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.">"
|
|
||||||
" call Dret("GetOneScript : srch for /src_id/ failed")
|
|
||||||
return
|
|
||||||
endif
|
|
||||||
" call Decho('found "src_id=" in description page')
|
|
||||||
|
|
||||||
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
|
|
||||||
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
|
|
||||||
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
|
|
||||||
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
|
|
||||||
silent q!
|
|
||||||
call delete(tmpfile)
|
|
||||||
|
|
||||||
" convert the strings-of-numbers into numbers
|
|
||||||
let srcid = srcid + 0
|
|
||||||
let latestsrcid = latestsrcid + 0
|
|
||||||
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
|
|
||||||
|
|
||||||
" has the plugin's most-recent srcid increased, which indicates
|
|
||||||
" that it has been updated
|
|
||||||
if latestsrcid > srcid
|
|
||||||
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
|
|
||||||
|
|
||||||
let s:downloads= s:downloads + 1
|
|
||||||
if sname == bufname("%")
|
|
||||||
" GetLatestVimScript has to be careful about downloading itself
|
|
||||||
let sname= "NEW_".sname
|
|
||||||
endif
|
|
||||||
|
|
||||||
" the plugin has been updated since we last obtained it, so download a new copy
|
|
||||||
" call Decho("...downloading new <".sname.">")
|
|
||||||
echomsg "...downloading new <".sname.">"
|
|
||||||
if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
|
|
||||||
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
|
|
||||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
|
|
||||||
else
|
|
||||||
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
|
|
||||||
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
|
|
||||||
endif
|
|
||||||
|
|
||||||
" AutoInstall: only if doautoinstall is so indicating
|
|
||||||
if doautoinstall
|
|
||||||
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
|
|
||||||
if filereadable(sname)
|
|
||||||
" call Decho("move <".sname."> to ".s:autoinstall)
|
|
||||||
exe "silent !".g:GetLatestVimScripts_mv." ".sname." ".s:autoinstall
|
|
||||||
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
|
||||||
" call Decho("exe cd ".s:autoinstall)
|
|
||||||
exe "cd ".s:autoinstall
|
|
||||||
|
|
||||||
" decompress
|
|
||||||
if sname =~ '\.bz2$'
|
|
||||||
" call Decho("decompress: attempt to bunzip2 ".sname)
|
|
||||||
exe "silent !bunzip2 ".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 "silent !gunzip ".sname
|
|
||||||
let sname= substitute(sname,'\.gz$','','')
|
|
||||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
|
||||||
endif
|
|
||||||
|
|
||||||
" distribute archive(.zip, .tar, .vba) contents
|
|
||||||
if sname =~ '\.zip$'
|
|
||||||
" call Decho("dearchive: attempt to unzip ".sname)
|
|
||||||
exe "silent !unzip -o ".sname
|
|
||||||
elseif sname =~ '\.tar$'
|
|
||||||
" call Decho("dearchive: attempt to untar ".sname)
|
|
||||||
exe "silent !tar -xvf ".sname
|
|
||||||
elseif sname =~ '\.vba$'
|
|
||||||
" call Decho("dearchive: attempt to handle a vimball: ".sname)
|
|
||||||
silent 1split
|
|
||||||
exe "silent e ".sname
|
|
||||||
silent so %
|
|
||||||
silent q
|
|
||||||
endif
|
|
||||||
|
|
||||||
if sname =~ '.vim$'
|
|
||||||
" call Decho("dearchive: attempt to simply move ".sname." to plugin")
|
|
||||||
exe "silent !".g:GetLatestVimScripts_mv." ".sname." plugin"
|
|
||||||
endif
|
|
||||||
|
|
||||||
" helptags step
|
|
||||||
let docdir= substitute(&rtp,',.*','','e')."/doc"
|
|
||||||
" call Decho("helptags: docdir<".docdir.">")
|
|
||||||
exe "helptags ".docdir
|
|
||||||
exe "cd ".curdir
|
|
||||||
endif
|
|
||||||
if fname !~ ':AutoInstall:'
|
|
||||||
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
|
|
||||||
else
|
|
||||||
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
|
||||||
endif
|
|
||||||
|
|
||||||
" update the data in the <GetLatestVimScripts.dat> file
|
|
||||||
call setline(line("."),modline)
|
|
||||||
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
|
|
||||||
" else " Decho
|
|
||||||
" 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
|
|
||||||
|
|
||||||
" call Dret("GetOneScript")
|
|
||||||
endfun
|
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" GetLatestVimScripts: this function gets the latest versions of {{{1
|
" GetLatestVimScripts: this function gets the latest versions of {{{1
|
||||||
" scripts based on the list in
|
" scripts based on the list in
|
||||||
@@ -363,6 +128,12 @@ fun! getscript#GetLatestVimScripts()
|
|||||||
return
|
return
|
||||||
endif
|
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
|
" Find the .../GetLatest subdirectory under the runtimepath
|
||||||
for datadir in split(&rtp,',') + ['']
|
for datadir in split(&rtp,',') + ['']
|
||||||
if isdirectory(datadir."/GetLatest")
|
if isdirectory(datadir."/GetLatest")
|
||||||
@@ -382,7 +153,6 @@ fun! getscript#GetLatestVimScripts()
|
|||||||
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
|
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if filewritable(datadir) != 2
|
if filewritable(datadir) != 2
|
||||||
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
|
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
|
||||||
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
|
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
|
||||||
@@ -399,19 +169,30 @@ fun! getscript#GetLatestVimScripts()
|
|||||||
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
|
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
" --------------------
|
||||||
|
" Passed sanity checks
|
||||||
|
" --------------------
|
||||||
|
|
||||||
" call Decho("datadir <".datadir.">")
|
" call Decho("datadir <".datadir.">")
|
||||||
" call Decho("datafile <".datafile.">")
|
" call Decho("datafile <".datafile.">")
|
||||||
|
|
||||||
" don't let any events interfere (like winmanager's, taglist's, etc)
|
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
|
||||||
let eikeep= &ei
|
let eikeep = &ei
|
||||||
set ei=all
|
let hlskeep = &hls
|
||||||
|
let acdkeep = &acd
|
||||||
|
set ei=all hls&vim noacd
|
||||||
|
|
||||||
" record current directory, change to datadir, open split window with
|
" Edit the datafile (ie. GetLatestVimScripts.dat):
|
||||||
" datafile
|
" 1. record current directory (origdir),
|
||||||
|
" 2. change directory to datadir,
|
||||||
|
" 3. split window
|
||||||
|
" 4. edit datafile
|
||||||
let origdir= getcwd()
|
let origdir= getcwd()
|
||||||
exe "cd ".escape(substitute(datadir,'\','/','ge'),"|[]*'\" #")
|
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
|
||||||
|
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
|
||||||
split
|
split
|
||||||
exe "e ".escape(substitute(datafile,'\','/','ge'),"|[]*'\" #")
|
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
|
||||||
|
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
|
||||||
res 1000
|
res 1000
|
||||||
let s:downloads = 0
|
let s:downloads = 0
|
||||||
let s:downerrors= 0
|
let s:downerrors= 0
|
||||||
@@ -421,78 +202,85 @@ fun! getscript#GetLatestVimScripts()
|
|||||||
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
||||||
let lastline = line("$")
|
let lastline = line("$")
|
||||||
" call Decho("lastline#".lastline)
|
" call Decho("lastline#".lastline)
|
||||||
let plugins = split(globpath(&rtp,"plugin/*.vim"))
|
let firstdir = substitute(&rtp,',.*$','','')
|
||||||
|
let plugins = split(globpath(firstdir,"plugin/*.vim"),'\n')
|
||||||
|
let plugins = plugins + split(globpath(firstdir,"AsNeeded/*.vim"),'\n')
|
||||||
let foundscript = 0
|
let foundscript = 0
|
||||||
let firstdir= ""
|
|
||||||
|
|
||||||
|
" this loop updates the GetLatestVimScripts.dat file
|
||||||
|
" with dependencies explicitly mentioned in the plugins
|
||||||
|
" via GetLatestVimScripts: ... lines
|
||||||
|
" It reads the plugin script at the end of the GetLatestVimScripts.dat
|
||||||
|
" file, examines it, and then removes it.
|
||||||
for plugin in plugins
|
for plugin in plugins
|
||||||
|
" call Decho(" ")
|
||||||
" don't process plugins in system directories
|
" call Decho("plugin<".plugin.">")
|
||||||
if firstdir == ""
|
|
||||||
let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
|
|
||||||
" call Decho("firstdir<".firstdir.">")
|
|
||||||
else
|
|
||||||
let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
|
|
||||||
" call Decho("curdir<".curdir.">")
|
|
||||||
if curdir != firstdir
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" read plugin in
|
" read plugin in
|
||||||
|
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
|
||||||
$
|
$
|
||||||
" call Decho(" ")
|
|
||||||
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
|
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
|
||||||
exe "silent r ".plugin
|
" call Decho("..exe silent r ".fnameescape(plugin))
|
||||||
|
exe "silent r ".fnameescape(plugin)
|
||||||
|
exe "silent bwipe ".bufnr("#")
|
||||||
|
|
||||||
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
|
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
|
||||||
let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
|
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
|
||||||
let llp1 = lastline+1
|
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
|
||||||
" call Decho("..newscript<".newscript.">")
|
let llp1 = lastline+1
|
||||||
|
" call Decho("..depscript<".depscript.">")
|
||||||
|
|
||||||
" don't process ""GetLatestVimScripts lines
|
" found a "GetLatestVimScripts: # #" line in the script;
|
||||||
if newscript !~ '^"'
|
" check if its already in the datafile by searching backwards from llp1,
|
||||||
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
|
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
|
||||||
let curline = line(".")
|
" for the script-id with no wrapping allowed.
|
||||||
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
|
let curline = line(".")
|
||||||
exe llp1
|
let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e')
|
||||||
let srchline = search('\<'.noai_script.'\>','bW')
|
exe llp1
|
||||||
" call Decho("..noai_script<".noai_script."> srch=".srchline."curline#".line(".")." lastline#".lastline)
|
let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW')
|
||||||
|
if srchline == 0
|
||||||
if srchline == 0
|
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
|
||||||
" found a new script to permanently include in the datafile
|
let srchline= search('\<'.noai_script.'\>','bW')
|
||||||
let keep_rega = @a
|
|
||||||
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
|
|
||||||
exe lastline."put a"
|
|
||||||
echomsg "Appending <".@a."> to ".datafile." for ".newscript
|
|
||||||
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
|
|
||||||
let @a = keep_rega
|
|
||||||
let lastline = llp1
|
|
||||||
let curline = curline + 1
|
|
||||||
let foundscript = foundscript + 1
|
|
||||||
" else " Decho
|
|
||||||
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
|
|
||||||
endif
|
|
||||||
|
|
||||||
let curline = curline + 1
|
|
||||||
exe curline
|
|
||||||
endif
|
endif
|
||||||
|
" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
|
||||||
|
|
||||||
|
if srchline == 0
|
||||||
|
" found a new script to permanently include in the datafile
|
||||||
|
let keep_rega = @a
|
||||||
|
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
|
||||||
|
echomsg "Appending <".@a."> to ".datafile." for ".depscript
|
||||||
|
" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
|
||||||
|
exe lastline."put a"
|
||||||
|
let @a = keep_rega
|
||||||
|
let lastline = llp1
|
||||||
|
let curline = curline + 1
|
||||||
|
let foundscript = foundscript + 1
|
||||||
|
" else " Decho
|
||||||
|
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
|
||||||
|
endif
|
||||||
|
|
||||||
|
let curline = curline + 1
|
||||||
|
exe curline
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
|
" llp1: last line plus one
|
||||||
let llp1= lastline + 1
|
let llp1= lastline + 1
|
||||||
" call Decho(".deleting lines: ".llp1.",$d")
|
" call Decho(".deleting lines: ".llp1.",$d")
|
||||||
exe "silent! ".llp1.",$d"
|
exe "silent! ".llp1.",$d"
|
||||||
endfor
|
endfor
|
||||||
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
|
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
|
||||||
" call Decho(" ")
|
" call Decho(" ")
|
||||||
|
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
|
||||||
|
|
||||||
if foundscript == 0
|
if foundscript == 0
|
||||||
set nomod
|
setlocal nomod
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" --------------------------------------------------------------------
|
||||||
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
|
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
|
||||||
|
" --------------------------------------------------------------------
|
||||||
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
|
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
|
||||||
set lz
|
setlocal lz
|
||||||
1
|
1
|
||||||
" /^-----/,$g/^\s*\d/call Decho(getline("."))
|
" /^-----/,$g/^\s*\d/call Decho(getline("."))
|
||||||
1
|
1
|
||||||
@@ -529,14 +317,328 @@ fun! getscript#GetLatestVimScripts()
|
|||||||
q
|
q
|
||||||
|
|
||||||
" restore events and current directory
|
" restore events and current directory
|
||||||
exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
|
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
|
||||||
let &ei= eikeep
|
let &ei = eikeep
|
||||||
set nolz
|
let &hls = hlskeep
|
||||||
|
let &acd = acdkeep
|
||||||
|
setlocal nolz
|
||||||
|
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
|
||||||
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
|
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
|
||||||
endfun
|
endfun
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
" 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.
|
||||||
|
fun! s:GetOneScript(...)
|
||||||
|
" call Dfunc("GetOneScript()")
|
||||||
|
|
||||||
|
" set options to allow progress to be shown on screen
|
||||||
|
let rega= @a
|
||||||
|
let t_ti= &t_ti
|
||||||
|
let t_te= &t_te
|
||||||
|
let rs = &rs
|
||||||
|
set t_ti= t_te= nors
|
||||||
|
|
||||||
|
" put current line on top-of-screen and interpret it into
|
||||||
|
" a script identifer : used to obtain webpage
|
||||||
|
" source identifier : used to identify current version
|
||||||
|
" and an associated comment: used to report on what's being considered
|
||||||
|
if a:0 >= 3
|
||||||
|
let scriptid = a:1
|
||||||
|
let srcid = a:2
|
||||||
|
let fname = a:3
|
||||||
|
let cmmnt = ""
|
||||||
|
" call Decho("scriptid<".scriptid.">")
|
||||||
|
" call Decho("srcid <".srcid.">")
|
||||||
|
" call Decho("fname <".fname.">")
|
||||||
|
else
|
||||||
|
let curline = getline(".")
|
||||||
|
if curline =~ '^\s*#'
|
||||||
|
let @a= rega
|
||||||
|
" call Dret("GetOneScript : skipping a pure comment line")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
|
||||||
|
try
|
||||||
|
let scriptid = substitute(curline,parsepat,'\1','e')
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E486/
|
||||||
|
let scriptid= 0
|
||||||
|
endtry
|
||||||
|
try
|
||||||
|
let srcid = substitute(curline,parsepat,'\2','e')
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E486/
|
||||||
|
let srcid= 0
|
||||||
|
endtry
|
||||||
|
try
|
||||||
|
let fname= substitute(curline,parsepat,'\3','e')
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E486/
|
||||||
|
let fname= ""
|
||||||
|
endtry
|
||||||
|
try
|
||||||
|
let cmmnt= substitute(curline,parsepat,'\4','e')
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E486/
|
||||||
|
let cmmnt= ""
|
||||||
|
endtry
|
||||||
|
" call Decho("curline <".curline.">")
|
||||||
|
" call Decho("parsepat<".parsepat.">")
|
||||||
|
" call Decho("scriptid<".scriptid.">")
|
||||||
|
" call Decho("srcid <".srcid.">")
|
||||||
|
" call Decho("fname <".fname.">")
|
||||||
|
endif
|
||||||
|
|
||||||
|
" 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
|
||||||
|
|
||||||
|
let doautoinstall= 0
|
||||||
|
if fname =~ ":AutoInstall:"
|
||||||
|
" call Decho("case AutoInstall: fname<".fname.">")
|
||||||
|
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
|
||||||
|
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
|
||||||
|
if s:autoinstall != ""
|
||||||
|
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let aicmmnt= fname
|
||||||
|
endif
|
||||||
|
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
|
||||||
|
|
||||||
|
exe "norm z\<CR>"
|
||||||
|
redraw!
|
||||||
|
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
|
||||||
|
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
|
||||||
|
|
||||||
|
" grab a copy of the plugin's vim.sourceforge.net webpage
|
||||||
|
let scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='.scriptid
|
||||||
|
let tmpfile = tempname()
|
||||||
|
let v:errmsg = ""
|
||||||
|
|
||||||
|
" make up to three tries at downloading the description
|
||||||
|
let itry= 1
|
||||||
|
while itry <= 3
|
||||||
|
" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
|
||||||
|
if has("win32") || has("win16") || has("win95")
|
||||||
|
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
|
||||||
|
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
|
||||||
|
else
|
||||||
|
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
|
||||||
|
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
|
||||||
|
endif
|
||||||
|
if itry == 1
|
||||||
|
exe "silent vsplit ".fnameescape(tmpfile)
|
||||||
|
else
|
||||||
|
silent! e %
|
||||||
|
endif
|
||||||
|
setlocal bh=wipe
|
||||||
|
|
||||||
|
" find the latest source-id in the plugin's webpage
|
||||||
|
silent! 1
|
||||||
|
let findpkg= search('Click on the package to download','W')
|
||||||
|
if findpkg > 0
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let itry= itry + 1
|
||||||
|
endwhile
|
||||||
|
" call Decho(" --- end downloading tries while loop --- itry=".itry)
|
||||||
|
|
||||||
|
" testing: did finding "Click on the package..." fail?
|
||||||
|
if findpkg == 0 || itry >= 4
|
||||||
|
silent q!
|
||||||
|
call delete(tmpfile)
|
||||||
|
" restore options
|
||||||
|
let &t_ti = t_ti
|
||||||
|
let &t_te = t_te
|
||||||
|
let &rs = rs
|
||||||
|
let s:downerrors = s:downerrors + 1
|
||||||
|
" 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"')
|
||||||
|
|
||||||
|
let findsrcid= search('src_id=','W')
|
||||||
|
if findsrcid == 0
|
||||||
|
silent q!
|
||||||
|
call delete(tmpfile)
|
||||||
|
" restore options
|
||||||
|
let &t_ti = t_ti
|
||||||
|
let &t_te = t_te
|
||||||
|
let &rs = rs
|
||||||
|
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
|
||||||
|
" call Decho('found "src_id=" in description page')
|
||||||
|
|
||||||
|
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
|
||||||
|
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
|
||||||
|
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
|
||||||
|
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
|
||||||
|
silent q!
|
||||||
|
call delete(tmpfile)
|
||||||
|
|
||||||
|
" convert the strings-of-numbers into numbers
|
||||||
|
let srcid = srcid + 0
|
||||||
|
let latestsrcid = latestsrcid + 0
|
||||||
|
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
|
||||||
|
|
||||||
|
" has the plugin's most-recent srcid increased, which indicates that it has been updated
|
||||||
|
if latestsrcid > srcid
|
||||||
|
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
|
||||||
|
|
||||||
|
let s:downloads= s:downloads + 1
|
||||||
|
if sname == bufname("%")
|
||||||
|
" GetLatestVimScript has to be careful about downloading itself
|
||||||
|
let sname= "NEW_".sname
|
||||||
|
endif
|
||||||
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" the plugin has been updated since we last obtained it, so download a new copy
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" 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('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
|
||||||
|
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
|
||||||
|
else
|
||||||
|
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
|
||||||
|
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
|
||||||
|
endif
|
||||||
|
|
||||||
|
" --------------------------------------------------------------------------
|
||||||
|
" AutoInstall: only if doautoinstall has been requested by the plugin itself
|
||||||
|
" --------------------------------------------------------------------------
|
||||||
|
if doautoinstall
|
||||||
|
" call Decho(" ")
|
||||||
|
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
|
||||||
|
if filereadable(sname)
|
||||||
|
" call Decho("<".sname."> is readable")
|
||||||
|
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
|
||||||
|
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
|
||||||
|
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
||||||
|
let installdir= curdir."/Installed"
|
||||||
|
if !isdirectory(installdir)
|
||||||
|
call mkdir(installdir)
|
||||||
|
endif
|
||||||
|
" call Decho("curdir<".curdir."> installdir<".installdir.">")
|
||||||
|
" call Decho("exe cd ".fnameescape(s:autoinstall))
|
||||||
|
exe "cd ".fnameescape(s:autoinstall)
|
||||||
|
|
||||||
|
" determine target directory for moves
|
||||||
|
let firstdir= substitute(&rtp,',.*$','','')
|
||||||
|
let pname = substitute(sname,'\..*','.vim','')
|
||||||
|
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
|
||||||
|
if filereadable(firstdir.'/AsNeeded/'.pname)
|
||||||
|
let tgtdir= "AsNeeded"
|
||||||
|
else
|
||||||
|
let tgtdir= "plugin"
|
||||||
|
endif
|
||||||
|
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
|
||||||
|
|
||||||
|
" decompress
|
||||||
|
if sname =~ '\.bz2$'
|
||||||
|
" call Decho("decompress: attempt to bunzip2 ".sname)
|
||||||
|
exe "silent !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 "silent !gunzip ".shellescape(sname)
|
||||||
|
let sname= substitute(sname,'\.gz$','','')
|
||||||
|
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||||
|
else
|
||||||
|
" call Decho("no decompression needed")
|
||||||
|
endif
|
||||||
|
|
||||||
|
" distribute archive(.zip, .tar, .vba) contents
|
||||||
|
if sname =~ '\.zip$'
|
||||||
|
" call Decho("dearchive: attempt to unzip ".sname)
|
||||||
|
exe "silent !unzip -o ".shellescape(sname)
|
||||||
|
elseif sname =~ '\.tar$'
|
||||||
|
" call Decho("dearchive: attempt to untar ".sname)
|
||||||
|
exe "silent !tar -xvf ".shellescape(sname)
|
||||||
|
elseif sname =~ '\.vba$'
|
||||||
|
" call Decho("dearchive: attempt to handle a vimball: ".sname)
|
||||||
|
silent 1split
|
||||||
|
if exists("g:vimball_home")
|
||||||
|
let oldvimballhome= g:vimball_home
|
||||||
|
endif
|
||||||
|
let g:vimball_home= s:autoinstall
|
||||||
|
exe "silent e ".fnameescape(sname)
|
||||||
|
silent so %
|
||||||
|
silent q
|
||||||
|
if exists("oldvimballhome")
|
||||||
|
let g:vimball_home= oldvimballhome
|
||||||
|
else
|
||||||
|
unlet g:vimball_home
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" call Decho("no dearchiving needed")
|
||||||
|
endif
|
||||||
|
|
||||||
|
" ---------------------------------------------
|
||||||
|
" move plugin to plugin/ or AsNeeded/ directory
|
||||||
|
" ---------------------------------------------
|
||||||
|
if sname =~ '.vim$'
|
||||||
|
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
|
||||||
|
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
|
||||||
|
else
|
||||||
|
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
|
||||||
|
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
|
||||||
|
endif
|
||||||
|
|
||||||
|
" helptags step
|
||||||
|
let docdir= substitute(&rtp,',.*','','e')."/doc"
|
||||||
|
" call Decho("helptags: docdir<".docdir.">")
|
||||||
|
exe "helptags ".fnameescape(docdir)
|
||||||
|
exe "cd ".fnameescape(curdir)
|
||||||
|
endif
|
||||||
|
if fname !~ ':AutoInstall:'
|
||||||
|
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
|
||||||
|
else
|
||||||
|
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
|
||||||
|
endif
|
||||||
|
|
||||||
|
" update the data in the <GetLatestVimScripts.dat> file
|
||||||
|
call setline(line("."),modline)
|
||||||
|
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
|
||||||
|
" else " Decho
|
||||||
|
" 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
|
||||||
|
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
" Restore Options: {{{1
|
" Restore Options: {{{1
|
||||||
let &cpo= s:keepcpo
|
let &cpo= s:keepcpo
|
||||||
|
unlet s:keepcpo
|
||||||
|
|
||||||
|
" ---------------------------------------------------------------------
|
||||||
|
" Modelines: {{{1
|
||||||
" vim: ts=8 sts=2 fdm=marker nowrap
|
" vim: ts=8 sts=2 fdm=marker nowrap
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Vim Ada/GNAT compiler file
|
" Description: Vim Ada/GNAT compiler file
|
||||||
" Language: Ada (GNAT)
|
" Language: Ada (GNAT)
|
||||||
" $Id$
|
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
|
||||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||||
" Maintainer: Martin Krischik
|
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
|
||||||
" $Author$
|
" Ned Okie <nokie@radford.edu>
|
||||||
" $Date$
|
" $Author: krischik $
|
||||||
" Version: 4.2
|
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||||
" $Revision$
|
" Version: 4.6
|
||||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
|
" $Revision: 887 $
|
||||||
|
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
|
||||||
" History: 24.05.2006 MK Unified Headers
|
" History: 24.05.2006 MK Unified Headers
|
||||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||||
" 05.08.2006 MK Add session support
|
" 05.08.2006 MK Add session support
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||||
" autoload
|
" autoload
|
||||||
" 05.11.2006 MK Bram suggested to save on spaces
|
" 05.11.2006 MK Bram suggested to save on spaces
|
||||||
|
" 19.09.2007 NO use project file only when there is a project
|
||||||
" Help Page: compiler-gnat
|
" Help Page: compiler-gnat
|
||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -71,13 +73,19 @@ function gnat#Set_Project_File (...) dict " {{{1
|
|||||||
execute 'mksession! ' . v:this_session
|
execute 'mksession! ' . v:this_session
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if strlen (self.Project_File) > 0
|
"if strlen (self.Project_File) > 0
|
||||||
call ada#Switch_Session (
|
"if has("vms")
|
||||||
\ expand('~') . "/vimfiles/session/" .
|
"call ada#Switch_Session (
|
||||||
\ fnamemodify (self.Project_File, ":t:r") . ".vim")
|
"\ expand('~')[0:-2] . ".vimfiles.session]gnat_" .
|
||||||
else
|
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
|
||||||
call ada#Switch_Session ('')
|
"else
|
||||||
endif
|
"call ada#Switch_Session (
|
||||||
|
"\ expand('~') . "/vimfiles/session/gnat_" .
|
||||||
|
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
|
||||||
|
"endif
|
||||||
|
"else
|
||||||
|
"call ada#Switch_Session ('')
|
||||||
|
"endif
|
||||||
|
|
||||||
return
|
return
|
||||||
endfunction gnat#Set_Project_File " }}}1
|
endfunction gnat#Set_Project_File " }}}1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
" Vim autoload file for editing compressed files.
|
" Vim autoload file for editing compressed files.
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2007 May 10
|
" Last Change: 2008 Jul 04
|
||||||
|
|
||||||
" These functions are used by the gzip plugin.
|
" These functions are used by the gzip plugin.
|
||||||
|
|
||||||
@@ -73,8 +73,15 @@ fun gzip#read(cmd)
|
|||||||
let empty = line("'[") == 1 && line("']") == line("$")
|
let empty = line("'[") == 1 && line("']") == line("$")
|
||||||
let tmp = tempname()
|
let tmp = tempname()
|
||||||
let tmpe = tmp . "." . expand("<afile>:e")
|
let tmpe = tmp . "." . expand("<afile>:e")
|
||||||
|
if exists('*fnameescape')
|
||||||
|
let tmp_esc = fnameescape(tmp)
|
||||||
|
let tmpe_esc = fnameescape(tmpe)
|
||||||
|
else
|
||||||
|
let tmp_esc = escape(tmp, ' ')
|
||||||
|
let tmpe_esc = escape(tmpe, ' ')
|
||||||
|
endif
|
||||||
" write the just read lines to a temp file "'[,']w tmp.gz"
|
" write the just read lines to a temp file "'[,']w tmp.gz"
|
||||||
execute "silent '[,']w " . escape(tmpe, ' ')
|
execute "silent '[,']w " . tmpe_esc
|
||||||
" uncompress the temp file: call system("gzip -dn tmp.gz")
|
" uncompress the temp file: call system("gzip -dn tmp.gz")
|
||||||
call system(a:cmd . " " . s:escape(tmpe))
|
call system(a:cmd . " " . s:escape(tmpe))
|
||||||
if !filereadable(tmp)
|
if !filereadable(tmp)
|
||||||
@@ -95,12 +102,12 @@ fun gzip#read(cmd)
|
|||||||
setlocal nobin
|
setlocal nobin
|
||||||
if exists(":lockmarks")
|
if exists(":lockmarks")
|
||||||
if empty
|
if empty
|
||||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
|
||||||
else
|
else
|
||||||
execute "silent lockmarks " . l . "r " . tmp
|
execute "silent lockmarks " . l . "r " . tmp_esc
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
execute "silent " . l . "r " . tmp
|
execute "silent " . l . "r " . tmp_esc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" if buffer became empty, delete trailing blank line
|
" if buffer became empty, delete trailing blank line
|
||||||
@@ -110,8 +117,8 @@ fun gzip#read(cmd)
|
|||||||
endif
|
endif
|
||||||
" delete the temp file and the used buffers
|
" delete the temp file and the used buffers
|
||||||
call delete(tmp)
|
call delete(tmp)
|
||||||
silent! exe "bwipe " . tmp
|
silent! exe "bwipe " . tmp_esc
|
||||||
silent! exe "bwipe " . tmpe
|
silent! exe "bwipe " . tmpe_esc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Restore saved option values.
|
" Restore saved option values.
|
||||||
@@ -124,10 +131,15 @@ fun gzip#read(cmd)
|
|||||||
|
|
||||||
" When uncompressed the whole buffer, do autocommands
|
" When uncompressed the whole buffer, do autocommands
|
||||||
if ok && empty
|
if ok && empty
|
||||||
if &verbose >= 8
|
if exists('*fnameescape')
|
||||||
execute "doau BufReadPost " . expand("%:r")
|
let fname = fnameescape(expand("%:r"))
|
||||||
else
|
else
|
||||||
execute "silent! doau BufReadPost " . expand("%:r")
|
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
|
||||||
|
endif
|
||||||
|
if &verbose >= 8
|
||||||
|
execute "doau BufReadPost " . fname
|
||||||
|
else
|
||||||
|
execute "silent! doau BufReadPost " . fname
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endfun
|
endfun
|
||||||
@@ -141,9 +153,9 @@ fun gzip#write(cmd)
|
|||||||
let nmt = s:tempname(nm)
|
let nmt = s:tempname(nm)
|
||||||
if rename(nm, nmt) == 0
|
if rename(nm, nmt) == 0
|
||||||
if exists("b:gzip_comp_arg")
|
if exists("b:gzip_comp_arg")
|
||||||
call system(a:cmd . " " . b:gzip_comp_arg . " " . s:escape(nmt))
|
call system(a:cmd . " " . b:gzip_comp_arg . " -- " . s:escape(nmt))
|
||||||
else
|
else
|
||||||
call system(a:cmd . " " . s:escape(nmt))
|
call system(a:cmd . " -- " . s:escape(nmt))
|
||||||
endif
|
endif
|
||||||
call rename(nmt . "." . expand("<afile>:e"), nm)
|
call rename(nmt . "." . expand("<afile>:e"), nm)
|
||||||
endif
|
endif
|
||||||
@@ -168,10 +180,10 @@ fun gzip#appre(cmd)
|
|||||||
if rename(nm, nmte) == 0
|
if rename(nm, nmte) == 0
|
||||||
if &patchmode != "" && getfsize(nm . &patchmode) == -1
|
if &patchmode != "" && getfsize(nm . &patchmode) == -1
|
||||||
" Create patchmode file by creating the decompressed file new
|
" Create patchmode file by creating the decompressed file new
|
||||||
call system(a:cmd . " -c " . s:escape(nmte) . " > " . s:escape(nmt))
|
call system(a:cmd . " -c -- " . s:escape(nmte) . " > " . s:escape(nmt))
|
||||||
call rename(nmte, nm . &patchmode)
|
call rename(nmte, nm . &patchmode)
|
||||||
else
|
else
|
||||||
call system(a:cmd . " " . s:escape(nmte))
|
call system(a:cmd . " -- " . s:escape(nmte))
|
||||||
endif
|
endif
|
||||||
call rename(nmt, nm)
|
call rename(nmt, nm)
|
||||||
endif
|
endif
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
" netrwFileHandlers: contains various extension-based file handlers for
|
" netrwFileHandlers: contains various extension-based file handlers for
|
||||||
" netrw's browsers' x command ("eXecute launcher")
|
" netrw's browsers' x command ("eXecute launcher")
|
||||||
" Author: Charles E. Campbell, Jr.
|
" Author: Charles E. Campbell, Jr.
|
||||||
" Date: May 30, 2006
|
" Date: Sep 30, 2008
|
||||||
" Version: 9
|
" Version: 10
|
||||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
" Copyright: Copyright (C) 1999-2008 Charles E. Campbell, Jr. {{{1
|
||||||
" Permission is hereby granted to use and distribute this code,
|
" Permission is hereby granted to use and distribute this code,
|
||||||
" with or without modifications, provided that this copyright
|
" with or without modifications, provided that this copyright
|
||||||
" notice is copied with it. Like anything else that's free,
|
" notice is copied with it. Like anything else that's free,
|
||||||
@@ -20,9 +20,15 @@
|
|||||||
if exists("g:loaded_netrwFileHandlers") || &cp
|
if exists("g:loaded_netrwFileHandlers") || &cp
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
let g:loaded_netrwFileHandlers= "v10"
|
||||||
|
if v:version < 702
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
|
||||||
|
echohl Normal
|
||||||
|
finish
|
||||||
|
endif
|
||||||
let s:keepcpo= &cpo
|
let s:keepcpo= &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
let g:loaded_netrwFileHandlers= "v9"
|
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" netrwFileHandlers#Invoke: {{{1
|
" netrwFileHandlers#Invoke: {{{1
|
||||||
@@ -73,10 +79,10 @@ fun! s:NFH_html(pagefile)
|
|||||||
|
|
||||||
if executable("mozilla")
|
if executable("mozilla")
|
||||||
" call Decho("executing !mozilla ".page)
|
" call Decho("executing !mozilla ".page)
|
||||||
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
|
exe "!mozilla ".shellescape(page,1)
|
||||||
elseif executable("netscape")
|
elseif executable("netscape")
|
||||||
" call Decho("executing !netscape ".page)
|
" call Decho("executing !netscape ".page)
|
||||||
exe "!netscape ".g:netrw_shq..page.g:netrw_shq
|
exe "!netscape ".shellescape(page,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_html 0")
|
" call Dret("s:NFH_html 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -96,10 +102,10 @@ fun! s:NFH_htm(pagefile)
|
|||||||
|
|
||||||
if executable("mozilla")
|
if executable("mozilla")
|
||||||
" call Decho("executing !mozilla ".page)
|
" call Decho("executing !mozilla ".page)
|
||||||
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
|
exe "!mozilla ".shellescape(page,1)
|
||||||
elseif executable("netscape")
|
elseif executable("netscape")
|
||||||
" call Decho("executing !netscape ".page)
|
" call Decho("executing !netscape ".page)
|
||||||
exe "!netscape ".g:netrw_shq.page.g:netrw_shq
|
exe "!netscape ".shellescape(page,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_htm 0")
|
" call Dret("s:NFH_htm 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -115,10 +121,10 @@ fun! s:NFH_jpg(jpgfile)
|
|||||||
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
|
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
|
||||||
|
|
||||||
if executable("gimp")
|
if executable("gimp")
|
||||||
exe "silent! !gimp -s ".g:netrw_shq.a:jpgfile.g:netrw_shq
|
exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
|
||||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||||
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
|
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
|
||||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:jpgfile.g:netrw_shq
|
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_jpg 0")
|
" call Dret("s:NFH_jpg 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -134,9 +140,9 @@ fun! s:NFH_gif(giffile)
|
|||||||
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
|
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
|
||||||
|
|
||||||
if executable("gimp")
|
if executable("gimp")
|
||||||
exe "silent! !gimp -s ".g:netrw_shq.a:giffile.g:netrw_shq
|
exe "silent! !gimp -s ".shellescape(a:giffile,1)
|
||||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:giffile.g:netrw_shq
|
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_gif 0")
|
" call Dret("s:NFH_gif 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -152,9 +158,9 @@ fun! s:NFH_png(pngfile)
|
|||||||
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
|
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
|
||||||
|
|
||||||
if executable("gimp")
|
if executable("gimp")
|
||||||
exe "silent! !gimp -s ".g:netrw_shq.a:pngfile.g:netrw_shq
|
exe "silent! !gimp -s ".shellescape(a:pngfile,1)
|
||||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pngfile.g:netrw_shq
|
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_png 0")
|
" call Dret("s:NFH_png 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -170,9 +176,9 @@ fun! s:NFH_pnm(pnmfile)
|
|||||||
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
|
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
|
||||||
|
|
||||||
if executable("gimp")
|
if executable("gimp")
|
||||||
exe "silent! !gimp -s ".g:netrw_shq.a:pnmfile.g:netrw_shq
|
exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
|
||||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pnmfile.g:netrw_shq
|
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_pnm 0")
|
" call Dret("s:NFH_pnm 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -190,7 +196,7 @@ fun! s:NFH_bmp(bmpfile)
|
|||||||
if executable("gimp")
|
if executable("gimp")
|
||||||
exe "silent! !gimp -s ".a:bmpfile
|
exe "silent! !gimp -s ".a:bmpfile
|
||||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:bmpfile.g:netrw_shq
|
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_bmp 0")
|
" call Dret("s:NFH_bmp 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -205,9 +211,9 @@ endfun
|
|||||||
fun! s:NFH_pdf(pdf)
|
fun! s:NFH_pdf(pdf)
|
||||||
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
|
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
|
||||||
if executable("gs")
|
if executable("gs")
|
||||||
exe 'silent! !gs '.g:netrw_shq.a:pdf.g:netrw_shq
|
exe 'silent! !gs '.shellescape(a:pdf,1)
|
||||||
elseif executable("pdftotext")
|
elseif executable("pdftotext")
|
||||||
exe 'silent! pdftotext -nopgbrk '.g:netrw_shq.a:pdf.g:netrw_shq
|
exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_pdf 0")
|
" call Dret("s:NFH_pdf 0")
|
||||||
return 0
|
return 0
|
||||||
@@ -223,7 +229,7 @@ fun! s:NFH_doc(doc)
|
|||||||
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
|
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
|
||||||
|
|
||||||
if executable("oowriter")
|
if executable("oowriter")
|
||||||
exe 'silent! !oowriter '.g:netrw_shq.a:doc.g:netrw_shq
|
exe 'silent! !oowriter '.shellescape(a:doc,1)
|
||||||
redraw!
|
redraw!
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_doc 0")
|
" call Dret("s:NFH_doc 0")
|
||||||
@@ -240,7 +246,7 @@ fun! s:NFH_sxw(sxw)
|
|||||||
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
|
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
|
||||||
|
|
||||||
if executable("oowriter")
|
if executable("oowriter")
|
||||||
exe 'silent! !oowriter '.g:netrw_shq.a:sxw.g:netrw_shq
|
exe 'silent! !oowriter '.shellescape(a:sxw,1)
|
||||||
redraw!
|
redraw!
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_sxw 0")
|
" call Dret("s:NFH_sxw 0")
|
||||||
@@ -257,7 +263,7 @@ fun! s:NFH_xls(xls)
|
|||||||
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
|
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
|
||||||
|
|
||||||
if executable("oocalc")
|
if executable("oocalc")
|
||||||
exe 'silent! !oocalc '.g:netrw_shq.a:xls.g:netrw_shq
|
exe 'silent! !oocalc '.shellescape(a:xls,1)
|
||||||
redraw!
|
redraw!
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_xls 0")
|
" call Dret("s:NFH_xls 0")
|
||||||
@@ -274,15 +280,15 @@ fun! s:NFH_ps(ps)
|
|||||||
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
|
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
|
||||||
if executable("gs")
|
if executable("gs")
|
||||||
" call Decho("exe silent! !gs ".a:ps)
|
" call Decho("exe silent! !gs ".a:ps)
|
||||||
exe "silent! !gs ".g:netrw_shq.a:ps.g:netrw_shq
|
exe "silent! !gs ".shellescape(a:ps,1)
|
||||||
redraw!
|
redraw!
|
||||||
elseif executable("ghostscript")
|
elseif executable("ghostscript")
|
||||||
" call Decho("exe silent! !ghostscript ".a:ps)
|
" call Decho("exe silent! !ghostscript ".a:ps)
|
||||||
exe "silent! !ghostscript ".g:netrw_shq.a:ps.g:netrw_shq
|
exe "silent! !ghostscript ".shellescape(a:ps,1)
|
||||||
redraw!
|
redraw!
|
||||||
elseif executable("gswin32")
|
elseif executable("gswin32")
|
||||||
" call Decho("exe silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq)
|
" call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
|
||||||
exe "silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq
|
exe "silent! !gswin32 ".shellescape(a:ps,1)
|
||||||
redraw!
|
redraw!
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_ps 0")
|
" call Dret("s:NFH_ps 0")
|
||||||
@@ -298,16 +304,16 @@ endfun
|
|||||||
fun! s:NFH_eps(eps)
|
fun! s:NFH_eps(eps)
|
||||||
" call Dfunc("s:NFH_eps()")
|
" call Dfunc("s:NFH_eps()")
|
||||||
if executable("gs")
|
if executable("gs")
|
||||||
exe "silent! !gs ".g:netrw_shq.a:eps.g:netrw_shq
|
exe "silent! !gs ".shellescape(a:eps,1)
|
||||||
redraw!
|
redraw!
|
||||||
elseif executable("ghostscript")
|
elseif executable("ghostscript")
|
||||||
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
|
exe "silent! !ghostscript ".shellescape(a:eps,1)
|
||||||
redraw!
|
redraw!
|
||||||
elseif executable("ghostscript")
|
elseif executable("ghostscript")
|
||||||
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
|
exe "silent! !ghostscript ".shellescape(a:eps,1)
|
||||||
redraw!
|
redraw!
|
||||||
elseif executable("gswin32")
|
elseif executable("gswin32")
|
||||||
exe "silent! !gswin32 ".g:netrw_shq.a:eps.g:netrw_shq
|
exe "silent! !gswin32 ".shellescape(a:eps,1)
|
||||||
redraw!
|
redraw!
|
||||||
else
|
else
|
||||||
" call Dret("s:NFH_eps 0")
|
" call Dret("s:NFH_eps 0")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" netrwSettings.vim: makes netrw settings simpler
|
" netrwSettings.vim: makes netrw settings simpler
|
||||||
" Date: Mar 26, 2007
|
" Date: Sep 03, 2008
|
||||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||||
" Version: 9
|
" Version: 13
|
||||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
|
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
|
||||||
" Permission is hereby granted to use and distribute this code,
|
" Permission is hereby granted to use and distribute this code,
|
||||||
" with or without modifications, provided that this copyright
|
" with or without modifications, provided that this copyright
|
||||||
@@ -19,13 +19,19 @@
|
|||||||
if exists("g:loaded_netrwSettings") || &cp
|
if exists("g:loaded_netrwSettings") || &cp
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_netrwSettings = "v9"
|
let g:loaded_netrwSettings = "v13"
|
||||||
|
if v:version < 700
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "***warning*** this version of netrwSettings needs vim 7.0"
|
||||||
|
echohl Normal
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" NetrwSettings: {{{1
|
" NetrwSettings: {{{1
|
||||||
fun! netrwSettings#NetrwSettings()
|
fun! netrwSettings#NetrwSettings()
|
||||||
" this call is here largely just to insure that netrw has been loaded
|
" this call is here largely just to insure that netrw has been loaded
|
||||||
call netrw#NetSavePosn()
|
call netrw#NetrwSavePosn()
|
||||||
if !exists("g:loaded_netrw")
|
if !exists("g:loaded_netrw")
|
||||||
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
|
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
|
||||||
return
|
return
|
||||||
@@ -82,8 +88,6 @@ fun! netrwSettings#NetrwSettings()
|
|||||||
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
|
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
|
||||||
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
|
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
|
||||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||||
let shqline= line("$")
|
|
||||||
put = 'let g:netrw_shq...'
|
|
||||||
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
|
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
|
||||||
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
|
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
|
||||||
let s:netrw_xfer_stop= line(".")
|
let s:netrw_xfer_stop= line(".")
|
||||||
@@ -101,35 +105,53 @@ fun! netrwSettings#NetrwSettings()
|
|||||||
else
|
else
|
||||||
put = 'let g:netrw_browsex_viewer = (not defined)'
|
put = 'let g:netrw_browsex_viewer = (not defined)'
|
||||||
endif
|
endif
|
||||||
|
put = 'let g:netrw_compress = '.g:netrw_compress
|
||||||
|
put = 'let g:netrw_cursorline = '.g:netrw_cursorline
|
||||||
|
let decompressline= line("$")
|
||||||
|
put ='let g:netrw_decompress...'
|
||||||
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
|
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
|
||||||
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
|
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
|
||||||
|
let fnameescline= line("$")
|
||||||
|
put = 'let g:netrw_fname_escape...'
|
||||||
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
|
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
|
||||||
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
|
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
|
||||||
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
|
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
|
||||||
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
|
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
|
||||||
|
let globescline= line("$")
|
||||||
|
put ='let g:netrw_glob_escape...'
|
||||||
put = 'let g:netrw_hide = '.g:netrw_hide
|
put = 'let g:netrw_hide = '.g:netrw_hide
|
||||||
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
|
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
|
||||||
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
|
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
|
||||||
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
|
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
|
||||||
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
|
|
||||||
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
|
|
||||||
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
|
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
|
||||||
|
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
|
||||||
|
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
|
||||||
|
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
|
||||||
|
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
|
||||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||||
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
|
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
|
||||||
|
put = 'let g:netrw_preview = '.g:netrw_preview
|
||||||
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
|
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
|
||||||
|
put = 'let g:netrw_retmap = '.g:netrw_retmap
|
||||||
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
|
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
|
||||||
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
|
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
|
||||||
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
|
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
|
||||||
put = 'let g:netrw_silent = '.g:netrw_silent
|
put = 'let g:netrw_silent = '.g:netrw_silent
|
||||||
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
|
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
|
||||||
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
|
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
|
||||||
|
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
|
||||||
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
|
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
|
||||||
|
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
|
||||||
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
|
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
|
||||||
put = 'let g:netrw_scpport = '.g:netrw_scpport
|
put = 'let g:netrw_scpport = '.g:netrw_scpport
|
||||||
|
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
|
||||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||||
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
|
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
|
||||||
|
let tmpfileescline= line("$")
|
||||||
|
put ='let g:netrw_tmpfile_escape...'
|
||||||
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
|
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
|
||||||
|
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
|
||||||
put = 'let g:netrw_winsize = '.g:netrw_winsize
|
put = 'let g:netrw_winsize = '.g:netrw_winsize
|
||||||
|
|
||||||
put =''
|
put =''
|
||||||
@@ -142,13 +164,10 @@ fun! netrwSettings#NetrwSettings()
|
|||||||
silent %s/= $/= ''/e
|
silent %s/= $/= ''/e
|
||||||
1
|
1
|
||||||
|
|
||||||
" Put in shq setting.
|
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
|
||||||
" (deferred so as to avoid the quote manipulation just preceding)
|
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
|
||||||
if g:netrw_shq == "'"
|
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
|
||||||
call setline(shqline,'let g:netrw_shq = "'.g:netrw_shq.'"')
|
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
|
||||||
else
|
|
||||||
call setline(shqline,"let g:netrw_shq = '".g:netrw_shq."'")
|
|
||||||
endif
|
|
||||||
|
|
||||||
set nomod
|
set nomod
|
||||||
|
|
||||||
|
|||||||
606
runtime/autoload/python3complete.vim
Normal file
606
runtime/autoload/python3complete.vim
Normal file
@@ -0,0 +1,606 @@
|
|||||||
|
"python3complete.vim - Omni Completion for python
|
||||||
|
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||||
|
" Version: 0.9
|
||||||
|
" Last Updated: 18 Jun 2009
|
||||||
|
"
|
||||||
|
" Roland Puntaier: this file contains adaptations for python3 and is parallel to pythoncomplete.vim
|
||||||
|
"
|
||||||
|
" Changes
|
||||||
|
" TODO:
|
||||||
|
" 'info' item output can use some formatting work
|
||||||
|
" Add an "unsafe eval" mode, to allow for return type evaluation
|
||||||
|
" Complete basic syntax along with import statements
|
||||||
|
" i.e. "import url<c-x,c-o>"
|
||||||
|
" Continue parsing on invalid line??
|
||||||
|
"
|
||||||
|
" v 0.9
|
||||||
|
" * Fixed docstring parsing for classes and functions
|
||||||
|
" * Fixed parsing of *args and **kwargs type arguments
|
||||||
|
" * Better function param parsing to handle things like tuples and
|
||||||
|
" lambda defaults args
|
||||||
|
"
|
||||||
|
" v 0.8
|
||||||
|
" * Fixed an issue where the FIRST assignment was always used instead of
|
||||||
|
" using a subsequent assignment for a variable
|
||||||
|
" * Fixed a scoping issue when working inside a parameterless function
|
||||||
|
"
|
||||||
|
"
|
||||||
|
" v 0.7
|
||||||
|
" * Fixed function list sorting (_ and __ at the bottom)
|
||||||
|
" * Removed newline removal from docs. It appears vim handles these better in
|
||||||
|
" recent patches
|
||||||
|
"
|
||||||
|
" v 0.6:
|
||||||
|
" * Fixed argument completion
|
||||||
|
" * Removed the 'kind' completions, as they are better indicated
|
||||||
|
" with real syntax
|
||||||
|
" * Added tuple assignment parsing (whoops, that was forgotten)
|
||||||
|
" * Fixed import handling when flattening scope
|
||||||
|
"
|
||||||
|
" v 0.5:
|
||||||
|
" Yeah, I skipped a version number - 0.4 was never public.
|
||||||
|
" It was a bugfix version on top of 0.3. This is a complete
|
||||||
|
" rewrite.
|
||||||
|
"
|
||||||
|
|
||||||
|
if !has('python3')
|
||||||
|
echo "Error: Required vim compiled with +python3"
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! python3complete#Complete(findstart, base)
|
||||||
|
"findstart = 1 when we need to get the text length
|
||||||
|
if a:findstart == 1
|
||||||
|
let line = getline('.')
|
||||||
|
let idx = col('.')
|
||||||
|
while idx > 0
|
||||||
|
let idx -= 1
|
||||||
|
let c = line[idx]
|
||||||
|
if c =~ '\w'
|
||||||
|
continue
|
||||||
|
elseif ! c =~ '\.'
|
||||||
|
let idx = -1
|
||||||
|
break
|
||||||
|
else
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
return idx
|
||||||
|
"findstart = 0 when we need to return the list of completions
|
||||||
|
else
|
||||||
|
"vim no longer moves the cursor upon completion... fix that
|
||||||
|
let line = getline('.')
|
||||||
|
let idx = col('.')
|
||||||
|
let cword = ''
|
||||||
|
while idx > 0
|
||||||
|
let idx -= 1
|
||||||
|
let c = line[idx]
|
||||||
|
if c =~ '\w' || c =~ '\.'
|
||||||
|
let cword = c . cword
|
||||||
|
continue
|
||||||
|
elseif strlen(cword) > 0 || idx == 0
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endwhile
|
||||||
|
execute "py3 vimpy3complete('" . cword . "', '" . a:base . "')"
|
||||||
|
return g:python3complete_completions
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:DefPython()
|
||||||
|
py3 << PYTHONEOF
|
||||||
|
import sys, tokenize, io, types
|
||||||
|
from token import NAME, DEDENT, NEWLINE, STRING
|
||||||
|
|
||||||
|
debugstmts=[]
|
||||||
|
def dbg(s): debugstmts.append(s)
|
||||||
|
def showdbg():
|
||||||
|
for d in debugstmts: print("DBG: %s " % d)
|
||||||
|
|
||||||
|
def vimpy3complete(context,match):
|
||||||
|
global debugstmts
|
||||||
|
debugstmts = []
|
||||||
|
try:
|
||||||
|
import vim
|
||||||
|
cmpl = Completer()
|
||||||
|
cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
|
||||||
|
all = cmpl.get_completions(context,match)
|
||||||
|
all.sort(key=lambda x:x['abbr'].replace('_','z'))
|
||||||
|
dictstr = '['
|
||||||
|
# have to do this for double quoting
|
||||||
|
for cmpl in all:
|
||||||
|
dictstr += '{'
|
||||||
|
for x in cmpl: dictstr += '"%s":"%s",' % (x,cmpl[x])
|
||||||
|
dictstr += '"icase":0},'
|
||||||
|
if dictstr[-1] == ',': dictstr = dictstr[:-1]
|
||||||
|
dictstr += ']'
|
||||||
|
#dbg("dict: %s" % dictstr)
|
||||||
|
vim.command("silent let g:python3complete_completions = %s" % dictstr)
|
||||||
|
#dbg("Completion dict:\n%s" % all)
|
||||||
|
except vim.error:
|
||||||
|
dbg("VIM Error: %s" % vim.error)
|
||||||
|
|
||||||
|
class Completer(object):
|
||||||
|
def __init__(self):
|
||||||
|
self.compldict = {}
|
||||||
|
self.parser = PyParser()
|
||||||
|
|
||||||
|
def evalsource(self,text,line=0):
|
||||||
|
sc = self.parser.parse(text,line)
|
||||||
|
src = sc.get_code()
|
||||||
|
dbg("source: %s" % src)
|
||||||
|
try: exec(src,self.compldict)
|
||||||
|
except: dbg("parser: %s, %s" % (sys.exc_info()[0],sys.exc_info()[1]))
|
||||||
|
for l in sc.locals:
|
||||||
|
try: exec(l,self.compldict)
|
||||||
|
except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
|
||||||
|
|
||||||
|
def _cleanstr(self,doc):
|
||||||
|
return doc.replace('"',' ').replace("'",' ')
|
||||||
|
|
||||||
|
def get_arguments(self,func_obj):
|
||||||
|
def _ctor(class_ob):
|
||||||
|
try: return class_ob.__init__
|
||||||
|
except AttributeError:
|
||||||
|
for base in class_ob.__bases__:
|
||||||
|
rc = _ctor(base)
|
||||||
|
if rc is not None: return rc
|
||||||
|
return None
|
||||||
|
|
||||||
|
arg_offset = 1
|
||||||
|
if type(func_obj) == type: func_obj = _ctor(func_obj)
|
||||||
|
elif type(func_obj) == types.MethodType: arg_offset = 1
|
||||||
|
else: arg_offset = 0
|
||||||
|
|
||||||
|
arg_text=''
|
||||||
|
if type(func_obj) in [types.FunctionType, types.LambdaType,types.MethodType]:
|
||||||
|
try:
|
||||||
|
cd = func_obj.__code__
|
||||||
|
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
|
||||||
|
defaults = func_obj.__defaults__ or []
|
||||||
|
defaults = ["=%s" % name for name in defaults]
|
||||||
|
defaults = [""] * (len(real_args)-len(defaults)) + defaults
|
||||||
|
items = [a+d for a,d in zip(real_args,defaults)]
|
||||||
|
if func_obj.__code__.co_flags & 0x4:
|
||||||
|
items.append("...")
|
||||||
|
if func_obj.__code__.co_flags & 0x8:
|
||||||
|
items.append("***")
|
||||||
|
arg_text = (','.join(items)) + ')'
|
||||||
|
except:
|
||||||
|
dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1]))
|
||||||
|
pass
|
||||||
|
if len(arg_text) == 0:
|
||||||
|
# The doc string sometimes contains the function signature
|
||||||
|
# this works for alot of C modules that are part of the
|
||||||
|
# standard library
|
||||||
|
doc = func_obj.__doc__
|
||||||
|
if doc:
|
||||||
|
doc = doc.lstrip()
|
||||||
|
pos = doc.find('\n')
|
||||||
|
if pos > 0:
|
||||||
|
sigline = doc[:pos]
|
||||||
|
lidx = sigline.find('(')
|
||||||
|
ridx = sigline.find(')')
|
||||||
|
if lidx > 0 and ridx > 0:
|
||||||
|
arg_text = sigline[lidx+1:ridx] + ')'
|
||||||
|
if len(arg_text) == 0: arg_text = ')'
|
||||||
|
return arg_text
|
||||||
|
|
||||||
|
def get_completions(self,context,match):
|
||||||
|
#dbg("get_completions('%s','%s')" % (context,match))
|
||||||
|
stmt = ''
|
||||||
|
if context: stmt += str(context)
|
||||||
|
if match: stmt += str(match)
|
||||||
|
try:
|
||||||
|
result = None
|
||||||
|
all = {}
|
||||||
|
ridx = stmt.rfind('.')
|
||||||
|
if len(stmt) > 0 and stmt[-1] == '(':
|
||||||
|
result = eval(_sanitize(stmt[:-1]), self.compldict)
|
||||||
|
doc = result.__doc__
|
||||||
|
if doc is None: doc = ''
|
||||||
|
args = self.get_arguments(result)
|
||||||
|
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
|
||||||
|
elif ridx == -1:
|
||||||
|
match = stmt
|
||||||
|
all = self.compldict
|
||||||
|
else:
|
||||||
|
match = stmt[ridx+1:]
|
||||||
|
stmt = _sanitize(stmt[:ridx])
|
||||||
|
result = eval(stmt, self.compldict)
|
||||||
|
all = dir(result)
|
||||||
|
|
||||||
|
dbg("completing: stmt:%s" % stmt)
|
||||||
|
completions = []
|
||||||
|
|
||||||
|
try: maindoc = result.__doc__
|
||||||
|
except: maindoc = ' '
|
||||||
|
if maindoc is None: maindoc = ' '
|
||||||
|
for m in all:
|
||||||
|
if m == "_PyCmplNoType": continue #this is internal
|
||||||
|
try:
|
||||||
|
dbg('possible completion: %s' % m)
|
||||||
|
if m.find(match) == 0:
|
||||||
|
if result is None: inst = all[m]
|
||||||
|
else: inst = getattr(result,m)
|
||||||
|
try: doc = inst.__doc__
|
||||||
|
except: doc = maindoc
|
||||||
|
typestr = str(inst)
|
||||||
|
if doc is None or doc == '': doc = maindoc
|
||||||
|
|
||||||
|
wrd = m[len(match):]
|
||||||
|
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
|
||||||
|
if "function" in typestr:
|
||||||
|
c['word'] += '('
|
||||||
|
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||||
|
elif "method" in typestr:
|
||||||
|
c['word'] += '('
|
||||||
|
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||||
|
elif "module" in typestr:
|
||||||
|
c['word'] += '.'
|
||||||
|
elif "type" in typestr:
|
||||||
|
c['word'] += '('
|
||||||
|
c['abbr'] += '('
|
||||||
|
completions.append(c)
|
||||||
|
except:
|
||||||
|
i = sys.exc_info()
|
||||||
|
dbg("inner completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
|
||||||
|
return completions
|
||||||
|
except:
|
||||||
|
i = sys.exc_info()
|
||||||
|
dbg("completion: %s,%s [stmt='%s']" % (i[0],i[1],stmt))
|
||||||
|
return []
|
||||||
|
|
||||||
|
class Scope(object):
|
||||||
|
def __init__(self,name,indent,docstr=''):
|
||||||
|
self.subscopes = []
|
||||||
|
self.docstr = docstr
|
||||||
|
self.locals = []
|
||||||
|
self.parent = None
|
||||||
|
self.name = name
|
||||||
|
self.indent = indent
|
||||||
|
|
||||||
|
def add(self,sub):
|
||||||
|
#print('push scope: [%s@%s]' % (sub.name,sub.indent))
|
||||||
|
sub.parent = self
|
||||||
|
self.subscopes.append(sub)
|
||||||
|
return sub
|
||||||
|
|
||||||
|
def doc(self,str):
|
||||||
|
""" Clean up a docstring """
|
||||||
|
d = str.replace('\n',' ')
|
||||||
|
d = d.replace('\t',' ')
|
||||||
|
while d.find(' ') > -1: d = d.replace(' ',' ')
|
||||||
|
while d[0] in '"\'\t ': d = d[1:]
|
||||||
|
while d[-1] in '"\'\t ': d = d[:-1]
|
||||||
|
dbg("Scope(%s)::docstr = %s" % (self,d))
|
||||||
|
self.docstr = d
|
||||||
|
|
||||||
|
def local(self,loc):
|
||||||
|
self._checkexisting(loc)
|
||||||
|
self.locals.append(loc)
|
||||||
|
|
||||||
|
def copy_decl(self,indent=0):
|
||||||
|
""" Copy a scope's declaration only, at the specified indent level - not local variables """
|
||||||
|
return Scope(self.name,indent,self.docstr)
|
||||||
|
|
||||||
|
def _checkexisting(self,test):
|
||||||
|
"Convienance function... keep out duplicates"
|
||||||
|
if test.find('=') > -1:
|
||||||
|
var = test.split('=')[0].strip()
|
||||||
|
for l in self.locals:
|
||||||
|
if l.find('=') > -1 and var == l.split('=')[0].strip():
|
||||||
|
self.locals.remove(l)
|
||||||
|
|
||||||
|
def get_code(self):
|
||||||
|
str = ""
|
||||||
|
if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n'
|
||||||
|
for l in self.locals:
|
||||||
|
if l.startswith('import'): str += l+'\n'
|
||||||
|
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
|
||||||
|
for sub in self.subscopes:
|
||||||
|
str += sub.get_code()
|
||||||
|
for l in self.locals:
|
||||||
|
if not l.startswith('import'): str += l+'\n'
|
||||||
|
|
||||||
|
return str
|
||||||
|
|
||||||
|
def pop(self,indent):
|
||||||
|
#print('pop scope: [%s] to [%s]' % (self.indent,indent))
|
||||||
|
outer = self
|
||||||
|
while outer.parent != None and outer.indent >= indent:
|
||||||
|
outer = outer.parent
|
||||||
|
return outer
|
||||||
|
|
||||||
|
def currentindent(self):
|
||||||
|
#print('parse current indent: %s' % self.indent)
|
||||||
|
return ' '*self.indent
|
||||||
|
|
||||||
|
def childindent(self):
|
||||||
|
#print('parse child indent: [%s]' % (self.indent+1))
|
||||||
|
return ' '*(self.indent+1)
|
||||||
|
|
||||||
|
class Class(Scope):
|
||||||
|
def __init__(self, name, supers, indent, docstr=''):
|
||||||
|
Scope.__init__(self,name,indent, docstr)
|
||||||
|
self.supers = supers
|
||||||
|
def copy_decl(self,indent=0):
|
||||||
|
c = Class(self.name,self.supers,indent, self.docstr)
|
||||||
|
for s in self.subscopes:
|
||||||
|
c.add(s.copy_decl(indent+1))
|
||||||
|
return c
|
||||||
|
def get_code(self):
|
||||||
|
str = '%sclass %s' % (self.currentindent(),self.name)
|
||||||
|
if len(self.supers) > 0: str += '(%s)' % ','.join(self.supers)
|
||||||
|
str += ':\n'
|
||||||
|
if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
|
||||||
|
if len(self.subscopes) > 0:
|
||||||
|
for s in self.subscopes: str += s.get_code()
|
||||||
|
else:
|
||||||
|
str += '%spass\n' % self.childindent()
|
||||||
|
return str
|
||||||
|
|
||||||
|
|
||||||
|
class Function(Scope):
|
||||||
|
def __init__(self, name, params, indent, docstr=''):
|
||||||
|
Scope.__init__(self,name,indent, docstr)
|
||||||
|
self.params = params
|
||||||
|
def copy_decl(self,indent=0):
|
||||||
|
return Function(self.name,self.params,indent, self.docstr)
|
||||||
|
def get_code(self):
|
||||||
|
str = "%sdef %s(%s):\n" % \
|
||||||
|
(self.currentindent(),self.name,','.join(self.params))
|
||||||
|
if len(self.docstr) > 0: str += self.childindent()+'"""'+self.docstr+'"""\n'
|
||||||
|
str += "%spass\n" % self.childindent()
|
||||||
|
return str
|
||||||
|
|
||||||
|
class PyParser:
|
||||||
|
def __init__(self):
|
||||||
|
self.top = Scope('global',0)
|
||||||
|
self.scope = self.top
|
||||||
|
|
||||||
|
def _parsedotname(self,pre=None):
|
||||||
|
#returns (dottedname, nexttoken)
|
||||||
|
name = []
|
||||||
|
if pre is None:
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if tokentype != NAME and token != '*':
|
||||||
|
return ('', token)
|
||||||
|
else: token = pre
|
||||||
|
name.append(token)
|
||||||
|
while True:
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if token != '.': break
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if tokentype != NAME: break
|
||||||
|
name.append(token)
|
||||||
|
return (".".join(name), token)
|
||||||
|
|
||||||
|
def _parseimportlist(self):
|
||||||
|
imports = []
|
||||||
|
while True:
|
||||||
|
name, token = self._parsedotname()
|
||||||
|
if not name: break
|
||||||
|
name2 = ''
|
||||||
|
if token == 'as': name2, token = self._parsedotname()
|
||||||
|
imports.append((name, name2))
|
||||||
|
while token != "," and "\n" not in token:
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if token != ",": break
|
||||||
|
return imports
|
||||||
|
|
||||||
|
def _parenparse(self):
|
||||||
|
name = ''
|
||||||
|
names = []
|
||||||
|
level = 1
|
||||||
|
while True:
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if token in (')', ',') and level == 1:
|
||||||
|
if '=' not in name: name = name.replace(' ', '')
|
||||||
|
names.append(name.strip())
|
||||||
|
name = ''
|
||||||
|
if token == '(':
|
||||||
|
level += 1
|
||||||
|
name += "("
|
||||||
|
elif token == ')':
|
||||||
|
level -= 1
|
||||||
|
if level == 0: break
|
||||||
|
else: name += ")"
|
||||||
|
elif token == ',' and level == 1:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
name += "%s " % str(token)
|
||||||
|
return names
|
||||||
|
|
||||||
|
def _parsefunction(self,indent):
|
||||||
|
self.scope=self.scope.pop(indent)
|
||||||
|
tokentype, fname, ind = self.donext()
|
||||||
|
if tokentype != NAME: return None
|
||||||
|
|
||||||
|
tokentype, open, ind = self.donext()
|
||||||
|
if open != '(': return None
|
||||||
|
params=self._parenparse()
|
||||||
|
|
||||||
|
tokentype, colon, ind = self.donext()
|
||||||
|
if colon != ':': return None
|
||||||
|
|
||||||
|
return Function(fname,params,indent)
|
||||||
|
|
||||||
|
def _parseclass(self,indent):
|
||||||
|
self.scope=self.scope.pop(indent)
|
||||||
|
tokentype, cname, ind = self.donext()
|
||||||
|
if tokentype != NAME: return None
|
||||||
|
|
||||||
|
super = []
|
||||||
|
tokentype, thenext, ind = self.donext()
|
||||||
|
if thenext == '(':
|
||||||
|
super=self._parenparse()
|
||||||
|
elif thenext != ':': return None
|
||||||
|
|
||||||
|
return Class(cname,super,indent)
|
||||||
|
|
||||||
|
def _parseassignment(self):
|
||||||
|
assign=''
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if tokentype == tokenize.STRING or token == 'str':
|
||||||
|
return '""'
|
||||||
|
elif token == '(' or token == 'tuple':
|
||||||
|
return '()'
|
||||||
|
elif token == '[' or token == 'list':
|
||||||
|
return '[]'
|
||||||
|
elif token == '{' or token == 'dict':
|
||||||
|
return '{}'
|
||||||
|
elif tokentype == tokenize.NUMBER:
|
||||||
|
return '0'
|
||||||
|
elif token == 'open' or token == 'file':
|
||||||
|
return 'file'
|
||||||
|
elif token == 'None':
|
||||||
|
return '_PyCmplNoType()'
|
||||||
|
elif token == 'type':
|
||||||
|
return 'type(_PyCmplNoType)' #only for method resolution
|
||||||
|
else:
|
||||||
|
assign += token
|
||||||
|
level = 0
|
||||||
|
while True:
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
if token in ('(','{','['):
|
||||||
|
level += 1
|
||||||
|
elif token in (']','}',')'):
|
||||||
|
level -= 1
|
||||||
|
if level == 0: break
|
||||||
|
elif level == 0:
|
||||||
|
if token in (';','\n'): break
|
||||||
|
assign += token
|
||||||
|
return "%s" % assign
|
||||||
|
|
||||||
|
def donext(self):
|
||||||
|
type, token, (lineno, indent), end, self.parserline = next(self.gen)
|
||||||
|
if lineno == self.curline:
|
||||||
|
#print('line found [%s] scope=%s' % (line.replace('\n',''),self.scope.name))
|
||||||
|
self.currentscope = self.scope
|
||||||
|
return (type, token, indent)
|
||||||
|
|
||||||
|
def _adjustvisibility(self):
|
||||||
|
newscope = Scope('result',0)
|
||||||
|
scp = self.currentscope
|
||||||
|
while scp != None:
|
||||||
|
if type(scp) == Function:
|
||||||
|
slice = 0
|
||||||
|
#Handle 'self' params
|
||||||
|
if scp.parent != None and type(scp.parent) == Class:
|
||||||
|
slice = 1
|
||||||
|
newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
|
||||||
|
for p in scp.params[slice:]:
|
||||||
|
i = p.find('=')
|
||||||
|
if len(p) == 0: continue
|
||||||
|
pvar = ''
|
||||||
|
ptype = ''
|
||||||
|
if i == -1:
|
||||||
|
pvar = p
|
||||||
|
ptype = '_PyCmplNoType()'
|
||||||
|
else:
|
||||||
|
pvar = p[:i]
|
||||||
|
ptype = _sanitize(p[i+1:])
|
||||||
|
if pvar.startswith('**'):
|
||||||
|
pvar = pvar[2:]
|
||||||
|
ptype = '{}'
|
||||||
|
elif pvar.startswith('*'):
|
||||||
|
pvar = pvar[1:]
|
||||||
|
ptype = '[]'
|
||||||
|
|
||||||
|
newscope.local('%s = %s' % (pvar,ptype))
|
||||||
|
|
||||||
|
for s in scp.subscopes:
|
||||||
|
ns = s.copy_decl(0)
|
||||||
|
newscope.add(ns)
|
||||||
|
for l in scp.locals: newscope.local(l)
|
||||||
|
scp = scp.parent
|
||||||
|
|
||||||
|
self.currentscope = newscope
|
||||||
|
return self.currentscope
|
||||||
|
|
||||||
|
#p.parse(vim.current.buffer[:],vim.eval("line('.')"))
|
||||||
|
def parse(self,text,curline=0):
|
||||||
|
self.curline = int(curline)
|
||||||
|
buf = io.StringIO(''.join(text) + '\n')
|
||||||
|
self.gen = tokenize.generate_tokens(buf.readline)
|
||||||
|
self.currentscope = self.scope
|
||||||
|
|
||||||
|
try:
|
||||||
|
freshscope=True
|
||||||
|
while True:
|
||||||
|
tokentype, token, indent = self.donext()
|
||||||
|
#dbg( 'main: token=[%s] indent=[%s]' % (token,indent))
|
||||||
|
|
||||||
|
if tokentype == DEDENT or token == "pass":
|
||||||
|
self.scope = self.scope.pop(indent)
|
||||||
|
elif token == 'def':
|
||||||
|
func = self._parsefunction(indent)
|
||||||
|
if func is None:
|
||||||
|
print("function: syntax error...")
|
||||||
|
continue
|
||||||
|
dbg("new scope: function")
|
||||||
|
freshscope = True
|
||||||
|
self.scope = self.scope.add(func)
|
||||||
|
elif token == 'class':
|
||||||
|
cls = self._parseclass(indent)
|
||||||
|
if cls is None:
|
||||||
|
print("class: syntax error...")
|
||||||
|
continue
|
||||||
|
freshscope = True
|
||||||
|
dbg("new scope: class")
|
||||||
|
self.scope = self.scope.add(cls)
|
||||||
|
|
||||||
|
elif token == 'import':
|
||||||
|
imports = self._parseimportlist()
|
||||||
|
for mod, alias in imports:
|
||||||
|
loc = "import %s" % mod
|
||||||
|
if len(alias) > 0: loc += " as %s" % alias
|
||||||
|
self.scope.local(loc)
|
||||||
|
freshscope = False
|
||||||
|
elif token == 'from':
|
||||||
|
mod, token = self._parsedotname()
|
||||||
|
if not mod or token != "import":
|
||||||
|
print("from: syntax error...")
|
||||||
|
continue
|
||||||
|
names = self._parseimportlist()
|
||||||
|
for name, alias in names:
|
||||||
|
loc = "from %s import %s" % (mod,name)
|
||||||
|
if len(alias) > 0: loc += " as %s" % alias
|
||||||
|
self.scope.local(loc)
|
||||||
|
freshscope = False
|
||||||
|
elif tokentype == STRING:
|
||||||
|
if freshscope: self.scope.doc(token)
|
||||||
|
elif tokentype == NAME:
|
||||||
|
name,token = self._parsedotname(token)
|
||||||
|
if token == '=':
|
||||||
|
stmt = self._parseassignment()
|
||||||
|
dbg("parseassignment: %s = %s" % (name, stmt))
|
||||||
|
if stmt != None:
|
||||||
|
self.scope.local("%s = %s" % (name,stmt))
|
||||||
|
freshscope = False
|
||||||
|
except StopIteration: #thrown on EOF
|
||||||
|
pass
|
||||||
|
except:
|
||||||
|
dbg("parse error: %s, %s @ %s" %
|
||||||
|
(sys.exc_info()[0], sys.exc_info()[1], self.parserline))
|
||||||
|
return self._adjustvisibility()
|
||||||
|
|
||||||
|
def _sanitize(str):
|
||||||
|
val = ''
|
||||||
|
level = 0
|
||||||
|
for c in str:
|
||||||
|
if c in ('(','{','['):
|
||||||
|
level += 1
|
||||||
|
elif c in (']','}',')'):
|
||||||
|
level -= 1
|
||||||
|
elif level == 0:
|
||||||
|
val += c
|
||||||
|
return val
|
||||||
|
|
||||||
|
sys.path.extend(['.','..'])
|
||||||
|
PYTHONEOF
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call s:DefPython()
|
||||||
@@ -1,17 +1,28 @@
|
|||||||
"pythoncomplete.vim - Omni Completion for python
|
"pythoncomplete.vim - Omni Completion for python
|
||||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||||
" Version: 0.7
|
" Version: 0.9
|
||||||
" Last Updated: 19 Oct 2006
|
" Last Updated: 18 Jun 2009
|
||||||
"
|
"
|
||||||
" Changes
|
" Changes
|
||||||
" TODO:
|
" TODO:
|
||||||
" User defined docstrings aren't handled right...
|
|
||||||
" 'info' item output can use some formatting work
|
" 'info' item output can use some formatting work
|
||||||
" Add an "unsafe eval" mode, to allow for return type evaluation
|
" Add an "unsafe eval" mode, to allow for return type evaluation
|
||||||
" Complete basic syntax along with import statements
|
" Complete basic syntax along with import statements
|
||||||
" i.e. "import url<c-x,c-o>"
|
" i.e. "import url<c-x,c-o>"
|
||||||
" Continue parsing on invalid line??
|
" Continue parsing on invalid line??
|
||||||
"
|
"
|
||||||
|
" v 0.9
|
||||||
|
" * Fixed docstring parsing for classes and functions
|
||||||
|
" * Fixed parsing of *args and **kwargs type arguments
|
||||||
|
" * Better function param parsing to handle things like tuples and
|
||||||
|
" lambda defaults args
|
||||||
|
"
|
||||||
|
" v 0.8
|
||||||
|
" * Fixed an issue where the FIRST assignment was always used instead of
|
||||||
|
" using a subsequent assignment for a variable
|
||||||
|
" * Fixed a scoping issue when working inside a parameterless function
|
||||||
|
"
|
||||||
|
"
|
||||||
" v 0.7
|
" v 0.7
|
||||||
" * Fixed function list sorting (_ and __ at the bottom)
|
" * Fixed function list sorting (_ and __ at the bottom)
|
||||||
" * Removed newline removal from docs. It appears vim handles these better in
|
" * Removed newline removal from docs. It appears vim handles these better in
|
||||||
@@ -63,7 +74,7 @@ function! pythoncomplete#Complete(findstart, base)
|
|||||||
while idx > 0
|
while idx > 0
|
||||||
let idx -= 1
|
let idx -= 1
|
||||||
let c = line[idx]
|
let c = line[idx]
|
||||||
if c =~ '\w' || c =~ '\.' || c == '('
|
if c =~ '\w' || c =~ '\.'
|
||||||
let cword = c . cword
|
let cword = c . cword
|
||||||
continue
|
continue
|
||||||
elseif strlen(cword) > 0 || idx == 0
|
elseif strlen(cword) > 0 || idx == 0
|
||||||
@@ -206,7 +217,7 @@ class Completer(object):
|
|||||||
if len(stmt) > 0 and stmt[-1] == '(':
|
if len(stmt) > 0 and stmt[-1] == '(':
|
||||||
result = eval(_sanitize(stmt[:-1]), self.compldict)
|
result = eval(_sanitize(stmt[:-1]), self.compldict)
|
||||||
doc = result.__doc__
|
doc = result.__doc__
|
||||||
if doc == None: doc = ''
|
if doc is None: doc = ''
|
||||||
args = self.get_arguments(result)
|
args = self.get_arguments(result)
|
||||||
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
|
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
|
||||||
elif ridx == -1:
|
elif ridx == -1:
|
||||||
@@ -223,18 +234,18 @@ class Completer(object):
|
|||||||
|
|
||||||
try: maindoc = result.__doc__
|
try: maindoc = result.__doc__
|
||||||
except: maindoc = ' '
|
except: maindoc = ' '
|
||||||
if maindoc == None: maindoc = ' '
|
if maindoc is None: maindoc = ' '
|
||||||
for m in all:
|
for m in all:
|
||||||
if m == "_PyCmplNoType": continue #this is internal
|
if m == "_PyCmplNoType": continue #this is internal
|
||||||
try:
|
try:
|
||||||
dbg('possible completion: %s' % m)
|
dbg('possible completion: %s' % m)
|
||||||
if m.find(match) == 0:
|
if m.find(match) == 0:
|
||||||
if result == None: inst = all[m]
|
if result is None: inst = all[m]
|
||||||
else: inst = getattr(result,m)
|
else: inst = getattr(result,m)
|
||||||
try: doc = inst.__doc__
|
try: doc = inst.__doc__
|
||||||
except: doc = maindoc
|
except: doc = maindoc
|
||||||
typestr = str(inst)
|
typestr = str(inst)
|
||||||
if doc == None or doc == '': doc = maindoc
|
if doc is None or doc == '': doc = maindoc
|
||||||
|
|
||||||
wrd = m[len(match):]
|
wrd = m[len(match):]
|
||||||
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
|
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
|
||||||
@@ -260,9 +271,9 @@ class Completer(object):
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
class Scope(object):
|
class Scope(object):
|
||||||
def __init__(self,name,indent):
|
def __init__(self,name,indent,docstr=''):
|
||||||
self.subscopes = []
|
self.subscopes = []
|
||||||
self.docstr = ''
|
self.docstr = docstr
|
||||||
self.locals = []
|
self.locals = []
|
||||||
self.parent = None
|
self.parent = None
|
||||||
self.name = name
|
self.name = name
|
||||||
@@ -281,29 +292,28 @@ class Scope(object):
|
|||||||
while d.find(' ') > -1: d = d.replace(' ',' ')
|
while d.find(' ') > -1: d = d.replace(' ',' ')
|
||||||
while d[0] in '"\'\t ': d = d[1:]
|
while d[0] in '"\'\t ': d = d[1:]
|
||||||
while d[-1] in '"\'\t ': d = d[:-1]
|
while d[-1] in '"\'\t ': d = d[:-1]
|
||||||
|
dbg("Scope(%s)::docstr = %s" % (self,d))
|
||||||
self.docstr = d
|
self.docstr = d
|
||||||
|
|
||||||
def local(self,loc):
|
def local(self,loc):
|
||||||
if not self._hasvaralready(loc):
|
self._checkexisting(loc)
|
||||||
self.locals.append(loc)
|
self.locals.append(loc)
|
||||||
|
|
||||||
def copy_decl(self,indent=0):
|
def copy_decl(self,indent=0):
|
||||||
""" Copy a scope's declaration only, at the specified indent level - not local variables """
|
""" Copy a scope's declaration only, at the specified indent level - not local variables """
|
||||||
return Scope(self.name,indent)
|
return Scope(self.name,indent,self.docstr)
|
||||||
|
|
||||||
def _hasvaralready(self,test):
|
def _checkexisting(self,test):
|
||||||
"Convienance function... keep out duplicates"
|
"Convienance function... keep out duplicates"
|
||||||
if test.find('=') > -1:
|
if test.find('=') > -1:
|
||||||
var = test.split('=')[0].strip()
|
var = test.split('=')[0].strip()
|
||||||
for l in self.locals:
|
for l in self.locals:
|
||||||
if l.find('=') > -1 and var == l.split('=')[0].strip():
|
if l.find('=') > -1 and var == l.split('=')[0].strip():
|
||||||
return True
|
self.locals.remove(l)
|
||||||
return False
|
|
||||||
|
|
||||||
def get_code(self):
|
def get_code(self):
|
||||||
# we need to start with this, to fix up broken completions
|
str = ""
|
||||||
# hopefully this name is unique enough...
|
if len(self.docstr) > 0: str += '"""'+self.docstr+'"""\n'
|
||||||
str = '"""'+self.docstr+'"""\n'
|
|
||||||
for l in self.locals:
|
for l in self.locals:
|
||||||
if l.startswith('import'): str += l+'\n'
|
if l.startswith('import'): str += l+'\n'
|
||||||
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
|
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
|
||||||
@@ -330,11 +340,11 @@ class Scope(object):
|
|||||||
return ' '*(self.indent+1)
|
return ' '*(self.indent+1)
|
||||||
|
|
||||||
class Class(Scope):
|
class Class(Scope):
|
||||||
def __init__(self, name, supers, indent):
|
def __init__(self, name, supers, indent, docstr=''):
|
||||||
Scope.__init__(self,name,indent)
|
Scope.__init__(self,name,indent, docstr)
|
||||||
self.supers = supers
|
self.supers = supers
|
||||||
def copy_decl(self,indent=0):
|
def copy_decl(self,indent=0):
|
||||||
c = Class(self.name,self.supers,indent)
|
c = Class(self.name,self.supers,indent, self.docstr)
|
||||||
for s in self.subscopes:
|
for s in self.subscopes:
|
||||||
c.add(s.copy_decl(indent+1))
|
c.add(s.copy_decl(indent+1))
|
||||||
return c
|
return c
|
||||||
@@ -351,11 +361,11 @@ class Class(Scope):
|
|||||||
|
|
||||||
|
|
||||||
class Function(Scope):
|
class Function(Scope):
|
||||||
def __init__(self, name, params, indent):
|
def __init__(self, name, params, indent, docstr=''):
|
||||||
Scope.__init__(self,name,indent)
|
Scope.__init__(self,name,indent, docstr)
|
||||||
self.params = params
|
self.params = params
|
||||||
def copy_decl(self,indent=0):
|
def copy_decl(self,indent=0):
|
||||||
return Function(self.name,self.params,indent)
|
return Function(self.name,self.params,indent, self.docstr)
|
||||||
def get_code(self):
|
def get_code(self):
|
||||||
str = "%sdef %s(%s):\n" % \
|
str = "%sdef %s(%s):\n" % \
|
||||||
(self.currentindent(),self.name,','.join(self.params))
|
(self.currentindent(),self.name,','.join(self.params))
|
||||||
@@ -371,7 +381,7 @@ class PyParser:
|
|||||||
def _parsedotname(self,pre=None):
|
def _parsedotname(self,pre=None):
|
||||||
#returns (dottedname, nexttoken)
|
#returns (dottedname, nexttoken)
|
||||||
name = []
|
name = []
|
||||||
if pre == None:
|
if pre is None:
|
||||||
tokentype, token, indent = self.next()
|
tokentype, token, indent = self.next()
|
||||||
if tokentype != NAME and token != '*':
|
if tokentype != NAME and token != '*':
|
||||||
return ('', token)
|
return ('', token)
|
||||||
@@ -405,17 +415,20 @@ class PyParser:
|
|||||||
while True:
|
while True:
|
||||||
tokentype, token, indent = self.next()
|
tokentype, token, indent = self.next()
|
||||||
if token in (')', ',') and level == 1:
|
if token in (')', ',') and level == 1:
|
||||||
names.append(name)
|
if '=' not in name: name = name.replace(' ', '')
|
||||||
|
names.append(name.strip())
|
||||||
name = ''
|
name = ''
|
||||||
if token == '(':
|
if token == '(':
|
||||||
level += 1
|
level += 1
|
||||||
|
name += "("
|
||||||
elif token == ')':
|
elif token == ')':
|
||||||
level -= 1
|
level -= 1
|
||||||
if level == 0: break
|
if level == 0: break
|
||||||
|
else: name += ")"
|
||||||
elif token == ',' and level == 1:
|
elif token == ',' and level == 1:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
name += str(token)
|
name += "%s " % str(token)
|
||||||
return names
|
return names
|
||||||
|
|
||||||
def _parsefunction(self,indent):
|
def _parsefunction(self,indent):
|
||||||
@@ -495,16 +508,26 @@ class PyParser:
|
|||||||
#Handle 'self' params
|
#Handle 'self' params
|
||||||
if scp.parent != None and type(scp.parent) == Class:
|
if scp.parent != None and type(scp.parent) == Class:
|
||||||
slice = 1
|
slice = 1
|
||||||
p = scp.params[0]
|
|
||||||
i = p.find('=')
|
|
||||||
if i != -1: p = p[:i]
|
|
||||||
newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
|
newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
|
||||||
for p in scp.params[slice:]:
|
for p in scp.params[slice:]:
|
||||||
i = p.find('=')
|
i = p.find('=')
|
||||||
|
if len(p) == 0: continue
|
||||||
|
pvar = ''
|
||||||
|
ptype = ''
|
||||||
if i == -1:
|
if i == -1:
|
||||||
newscope.local('%s = _PyCmplNoType()' % p)
|
pvar = p
|
||||||
|
ptype = '_PyCmplNoType()'
|
||||||
else:
|
else:
|
||||||
newscope.local('%s = %s' % (p[:i],_sanitize(p[i+1])))
|
pvar = p[:i]
|
||||||
|
ptype = _sanitize(p[i+1:])
|
||||||
|
if pvar.startswith('**'):
|
||||||
|
pvar = pvar[2:]
|
||||||
|
ptype = '{}'
|
||||||
|
elif pvar.startswith('*'):
|
||||||
|
pvar = pvar[1:]
|
||||||
|
ptype = '[]'
|
||||||
|
|
||||||
|
newscope.local('%s = %s' % (pvar,ptype))
|
||||||
|
|
||||||
for s in scp.subscopes:
|
for s in scp.subscopes:
|
||||||
ns = s.copy_decl(0)
|
ns = s.copy_decl(0)
|
||||||
@@ -532,17 +555,19 @@ class PyParser:
|
|||||||
self.scope = self.scope.pop(indent)
|
self.scope = self.scope.pop(indent)
|
||||||
elif token == 'def':
|
elif token == 'def':
|
||||||
func = self._parsefunction(indent)
|
func = self._parsefunction(indent)
|
||||||
if func == None:
|
if func is None:
|
||||||
print "function: syntax error..."
|
print "function: syntax error..."
|
||||||
continue
|
continue
|
||||||
|
dbg("new scope: function")
|
||||||
freshscope = True
|
freshscope = True
|
||||||
self.scope = self.scope.add(func)
|
self.scope = self.scope.add(func)
|
||||||
elif token == 'class':
|
elif token == 'class':
|
||||||
cls = self._parseclass(indent)
|
cls = self._parseclass(indent)
|
||||||
if cls == None:
|
if cls is None:
|
||||||
print "class: syntax error..."
|
print "class: syntax error..."
|
||||||
continue
|
continue
|
||||||
freshscope = True
|
freshscope = True
|
||||||
|
dbg("new scope: class")
|
||||||
self.scope = self.scope.add(cls)
|
self.scope = self.scope.add(cls)
|
||||||
|
|
||||||
elif token == 'import':
|
elif token == 'import':
|
||||||
@@ -569,6 +594,7 @@ class PyParser:
|
|||||||
name,token = self._parsedotname(token)
|
name,token = self._parsedotname(token)
|
||||||
if token == '=':
|
if token == '=':
|
||||||
stmt = self._parseassignment()
|
stmt = self._parseassignment()
|
||||||
|
dbg("parseassignment: %s = %s" % (name, stmt))
|
||||||
if stmt != None:
|
if stmt != None:
|
||||||
self.scope.local("%s = %s" % (name,stmt))
|
self.scope.local("%s = %s" % (name,stmt))
|
||||||
freshscope = False
|
freshscope = False
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: Ruby
|
" Language: Ruby
|
||||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||||
" Info: $Id$
|
" Last Change: 2009 Sep 28
|
||||||
" URL: http://vim-ruby.rubyforge.org
|
" URL: http://vim-ruby.rubyforge.org
|
||||||
" Anon CVS: See above site
|
" Anon CVS: See above site
|
||||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Maintainer Version: 0.8
|
" Maintainer Version: 0.8.1
|
||||||
" ----------------------------------------------------------------------------
|
" ----------------------------------------------------------------------------
|
||||||
"
|
"
|
||||||
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||||
@@ -36,7 +36,7 @@ if !exists("g:rubycomplete_classes_in_global")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("g:rubycomplete_buffer_loading")
|
if !exists("g:rubycomplete_buffer_loading")
|
||||||
let g:rubycomplete_classes_in_global = 0
|
let g:rubycomplete_buffer_loading = 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("g:rubycomplete_include_object")
|
if !exists("g:rubycomplete_include_object")
|
||||||
@@ -301,7 +301,7 @@ class VimRubyCompletion
|
|||||||
|
|
||||||
def get_buffer_entity(name, vimfun)
|
def get_buffer_entity(name, vimfun)
|
||||||
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
|
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
|
||||||
return nil if loading_allowed != '1'
|
return nil if loading_allowed.to_i.zero?
|
||||||
return nil if /(\"|\')+/.match( name )
|
return nil if /(\"|\')+/.match( name )
|
||||||
buf = VIM::Buffer.current
|
buf = VIM::Buffer.current
|
||||||
nums = eval( VIM::evaluate( vimfun % name ) )
|
nums = eval( VIM::evaluate( vimfun % name ) )
|
||||||
@@ -325,7 +325,7 @@ class VimRubyCompletion
|
|||||||
ln = buf[x]
|
ln = buf[x]
|
||||||
if /^\s*(module|class|def|include)\s+/.match(ln)
|
if /^\s*(module|class|def|include)\s+/.match(ln)
|
||||||
clscnt += 1 if $1 == "class"
|
clscnt += 1 if $1 == "class"
|
||||||
#dprint "\$1: %s" % $1
|
#dprint "\$1$1
|
||||||
classdef += "%s\n" % ln
|
classdef += "%s\n" % ln
|
||||||
classdef += "end\n" if /def\s+/.match(ln)
|
classdef += "end\n" if /def\s+/.match(ln)
|
||||||
dprint ln
|
dprint ln
|
||||||
@@ -368,7 +368,7 @@ class VimRubyCompletion
|
|||||||
# this will be a little expensive.
|
# this will be a little expensive.
|
||||||
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
|
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
|
||||||
allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global")
|
allow_aggressive_load = VIM::evaluate("exists('g:rubycomplete_classes_in_global') && g:rubycomplete_classes_in_global")
|
||||||
return [] if allow_aggressive_load != '1' || loading_allowed != '1'
|
return [] if allow_aggressive_load.to_i.zero? || loading_allowed.to_i.zero?
|
||||||
|
|
||||||
buf = VIM::Buffer.current
|
buf = VIM::Buffer.current
|
||||||
eob = buf.length
|
eob = buf.length
|
||||||
@@ -401,7 +401,7 @@ class VimRubyCompletion
|
|||||||
|
|
||||||
def load_rails
|
def load_rails
|
||||||
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
||||||
return if allow_rails != '1'
|
return if allow_rails.to_i.zero?
|
||||||
|
|
||||||
buf_path = VIM::evaluate('expand("%:p")')
|
buf_path = VIM::evaluate('expand("%:p")')
|
||||||
file_name = VIM::evaluate('expand("%:t")')
|
file_name = VIM::evaluate('expand("%:t")')
|
||||||
@@ -461,7 +461,7 @@ class VimRubyCompletion
|
|||||||
def get_rails_helpers
|
def get_rails_helpers
|
||||||
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
||||||
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
|
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
|
||||||
return [] if allow_rails != '1' || rails_loaded != '1'
|
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
|
||||||
|
|
||||||
buf_path = VIM::evaluate('expand("%:p")')
|
buf_path = VIM::evaluate('expand("%:p")')
|
||||||
buf_path.gsub!( /\\/, "/" )
|
buf_path.gsub!( /\\/, "/" )
|
||||||
@@ -511,7 +511,7 @@ class VimRubyCompletion
|
|||||||
def add_rails_columns( cls )
|
def add_rails_columns( cls )
|
||||||
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
||||||
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
|
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
|
||||||
return [] if allow_rails != '1' || rails_loaded != '1'
|
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
eval( "#{cls}.establish_connection" )
|
eval( "#{cls}.establish_connection" )
|
||||||
@@ -534,7 +534,7 @@ class VimRubyCompletion
|
|||||||
def get_rails_view_methods
|
def get_rails_view_methods
|
||||||
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
allow_rails = VIM::evaluate("exists('g:rubycomplete_rails') && g:rubycomplete_rails")
|
||||||
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
|
rails_loaded = VIM::evaluate('s:rubycomplete_rails_loaded')
|
||||||
return [] if allow_rails != '1' || rails_loaded != '1'
|
return [] if allow_rails.to_i.zero? || rails_loaded.to_i.zero?
|
||||||
|
|
||||||
buf_path = VIM::evaluate('expand("%:p")')
|
buf_path = VIM::evaluate('expand("%:p")')
|
||||||
buf_path.gsub!( /\\/, "/" )
|
buf_path.gsub!( /\\/, "/" )
|
||||||
@@ -580,7 +580,7 @@ class VimRubyCompletion
|
|||||||
|
|
||||||
def get_completions(base)
|
def get_completions(base)
|
||||||
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
|
loading_allowed = VIM::evaluate("exists('g:rubycomplete_buffer_loading') && g:rubycomplete_buffer_loading")
|
||||||
if loading_allowed == '1'
|
if loading_allowed.to_i == 1
|
||||||
load_requires
|
load_requires
|
||||||
load_rails
|
load_rails
|
||||||
end
|
end
|
||||||
@@ -632,7 +632,7 @@ class VimRubyCompletion
|
|||||||
methods = Object.constants
|
methods = Object.constants
|
||||||
methods.grep(/^#{receiver}/).collect{|e| "::" + e}
|
methods.grep(/^#{receiver}/).collect{|e| "::" + e}
|
||||||
|
|
||||||
when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # Constant or class methods
|
when /^(((::)?[A-Z][^:.\(]*)+?)::?([^:.]*)$/ # Constant or class methods
|
||||||
receiver = $1
|
receiver = $1
|
||||||
message = Regexp.quote($4)
|
message = Regexp.quote($4)
|
||||||
dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ]
|
dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ]
|
||||||
@@ -666,7 +666,7 @@ class VimRubyCompletion
|
|||||||
dprint "global"
|
dprint "global"
|
||||||
methods = global_variables.grep(Regexp.new(Regexp.quote($1)))
|
methods = global_variables.grep(Regexp.new(Regexp.quote($1)))
|
||||||
|
|
||||||
when /^((\.?[^.]+)+)\.([^.]*)$/ # variable
|
when /^((\.?[^.]+)+?)\.([^.]*)$/ # variable
|
||||||
dprint "variable"
|
dprint "variable"
|
||||||
receiver = $1
|
receiver = $1
|
||||||
message = Regexp.quote($3)
|
message = Regexp.quote($3)
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
" Vim script to download a missing spell file
|
" Vim script to download a missing spell file
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2007 May 08
|
" Last Change: 2008 Nov 29
|
||||||
|
|
||||||
if !exists('g:spellfile_URL')
|
if !exists('g:spellfile_URL')
|
||||||
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
|
" Prefer using http:// when netrw should be able to use it, since
|
||||||
|
" more firewalls let this through.
|
||||||
|
if executable("curl") || executable("wget") || executable("fetch")
|
||||||
|
let g:spellfile_URL = 'http://ftp.vim.org/pub/vim/runtime/spell'
|
||||||
|
else
|
||||||
|
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
|
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
|
||||||
|
|
||||||
@@ -33,19 +39,22 @@ function! spellfile#LoadFile(lang)
|
|||||||
let s:donedict[a:lang . &enc] = 1
|
let s:donedict[a:lang . &enc] = 1
|
||||||
|
|
||||||
" Find spell directories we can write in.
|
" Find spell directories we can write in.
|
||||||
let dirlist = []
|
let [dirlist, dirchoices] = spellfile#GetDirChoices()
|
||||||
let dirchoices = '&Cancel'
|
|
||||||
for dir in split(globpath(&rtp, 'spell'), "\n")
|
|
||||||
if filewritable(dir) == 2
|
|
||||||
call add(dirlist, dir)
|
|
||||||
let dirchoices .= "\n&" . len(dirlist)
|
|
||||||
endif
|
|
||||||
endfor
|
|
||||||
if len(dirlist) == 0
|
if len(dirlist) == 0
|
||||||
if &verbose
|
let dir_to_create = spellfile#WritableSpellDir()
|
||||||
|
if &verbose || dir_to_create != ''
|
||||||
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
|
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
|
||||||
endif
|
endif
|
||||||
return
|
if dir_to_create != ''
|
||||||
|
if confirm("Shall I create " . dir_to_create, "&Yes\n&No", 2) == 1
|
||||||
|
" After creating the directory it should show up in the list.
|
||||||
|
call mkdir(dir_to_create, "p")
|
||||||
|
let [dirlist, dirchoices] = spellfile#GetDirChoices()
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if len(dirlist) == 0
|
||||||
|
return
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
|
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
|
||||||
@@ -106,7 +115,12 @@ function! spellfile#LoadFile(lang)
|
|||||||
endfor
|
endfor
|
||||||
let dirchoice = confirm(msg, dirchoices) - 2
|
let dirchoice = confirm(msg, dirchoices) - 2
|
||||||
if dirchoice >= 0
|
if dirchoice >= 0
|
||||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
if exists('*fnameescape')
|
||||||
|
let dirname = fnameescape(dirlist[dirchoice])
|
||||||
|
else
|
||||||
|
let dirname = escape(dirlist[dirchoice], ' ')
|
||||||
|
endif
|
||||||
|
exe "write " . dirname . '/' . fname
|
||||||
|
|
||||||
" Also download the .sug file, if the user wants to.
|
" Also download the .sug file, if the user wants to.
|
||||||
let msg = "Do you want me to try getting the .sug file?\n"
|
let msg = "Do you want me to try getting the .sug file?\n"
|
||||||
@@ -119,7 +133,7 @@ function! spellfile#LoadFile(lang)
|
|||||||
call spellfile#Nread(fname)
|
call spellfile#Nread(fname)
|
||||||
if getline(2) =~ 'VIMsug'
|
if getline(2) =~ 'VIMsug'
|
||||||
1d
|
1d
|
||||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
exe "write " . dirname . '/' . fname
|
||||||
set nomod
|
set nomod
|
||||||
else
|
else
|
||||||
echo 'Sorry, downloading failed'
|
echo 'Sorry, downloading failed'
|
||||||
@@ -166,3 +180,29 @@ function! spellfile#Nread(fname)
|
|||||||
unlet g:netrw_use_errorwindow
|
unlet g:netrw_use_errorwindow
|
||||||
endif
|
endif
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Get a list of writable spell directories and choices for confirm().
|
||||||
|
function! spellfile#GetDirChoices()
|
||||||
|
let dirlist = []
|
||||||
|
let dirchoices = '&Cancel'
|
||||||
|
for dir in split(globpath(&rtp, 'spell'), "\n")
|
||||||
|
if filewritable(dir) == 2
|
||||||
|
call add(dirlist, dir)
|
||||||
|
let dirchoices .= "\n&" . len(dirlist)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return [dirlist, dirchoices]
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
function! spellfile#WritableSpellDir()
|
||||||
|
if has("unix")
|
||||||
|
" For Unix always use the $HOME/.vim directory
|
||||||
|
return $HOME . "/.vim/spell"
|
||||||
|
endif
|
||||||
|
for dir in split(&rtp, ',')
|
||||||
|
if filewritable(dir) == 2
|
||||||
|
return dir . "/spell"
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return ''
|
||||||
|
endfunction
|
||||||
|
|||||||
@@ -1,13 +1,47 @@
|
|||||||
" Vim OMNI completion script for SQL
|
" Vim OMNI completion script for SQL
|
||||||
" Language: SQL
|
" Language: SQL
|
||||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||||
" Version: 5.0
|
" Version: 10.0
|
||||||
" Last Change: Mon Jun 05 2006 3:30:04 PM
|
" Last Change: 2010 Jun 11
|
||||||
" Usage: For detailed help
|
" Usage: For detailed help
|
||||||
" ":help sql.txt"
|
" ":help sql.txt"
|
||||||
" or ":help ft-sql-omni"
|
" or ":help ft-sql-omni"
|
||||||
" or read $VIMRUNTIME/doc/sql.txt
|
" or read $VIMRUNTIME/doc/sql.txt
|
||||||
|
|
||||||
|
" History
|
||||||
|
" Version 10.0
|
||||||
|
" Updated PreCacheSyntax()
|
||||||
|
" - Now returns a List of the syntax items it finds.
|
||||||
|
" This allows other plugins / scripts to use this list for their own
|
||||||
|
" purposes. In this case XPTemplate can use them for a Choose list.
|
||||||
|
" - Verifies the parameters are the correct type and displays a
|
||||||
|
" warning if not.
|
||||||
|
" - Verifies the parameters are the correct type and displays a
|
||||||
|
" warning if not.
|
||||||
|
" Updated SQLCWarningMsg()
|
||||||
|
" - Prepends warning message with SQLComplete so you know who issued
|
||||||
|
" the warning.
|
||||||
|
" Updated SQLCErrorMsg()
|
||||||
|
" - Prepends error message with SQLComplete so you know who issued
|
||||||
|
" the error.
|
||||||
|
"
|
||||||
|
" Version 9.0
|
||||||
|
" This change removes some of the support for tables with spaces in their
|
||||||
|
" names in order to simplify the regexes used to pull out query table
|
||||||
|
" aliases for more robust table name and column name code completion.
|
||||||
|
" Full support for "table names with spaces" can be added in again
|
||||||
|
" after 7.3.
|
||||||
|
"
|
||||||
|
" Version 8.0
|
||||||
|
" Incorrectly re-executed the g:ftplugin_sql_omni_key_right and g:ftplugin_sql_omni_key_left
|
||||||
|
" when drilling in and out of a column list for a table.
|
||||||
|
"
|
||||||
|
" Version 7.0
|
||||||
|
" Better handling of object names
|
||||||
|
"
|
||||||
|
" Version 6.0
|
||||||
|
" Supports object names with spaces "my table name"
|
||||||
|
"
|
||||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||||
" This check is in place in case this script is
|
" This check is in place in case this script is
|
||||||
" sourced directly instead of using the autoload feature.
|
" sourced directly instead of using the autoload feature.
|
||||||
@@ -22,7 +56,7 @@ endif
|
|||||||
if exists('g:loaded_sql_completion')
|
if exists('g:loaded_sql_completion')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_sql_completion = 50
|
let g:loaded_sql_completion = 100
|
||||||
|
|
||||||
" Maintains filename of dictionary
|
" Maintains filename of dictionary
|
||||||
let s:sql_file_table = ""
|
let s:sql_file_table = ""
|
||||||
@@ -106,10 +140,23 @@ function! sqlcomplete#Complete(findstart, base)
|
|||||||
let begindot = 1
|
let begindot = 1
|
||||||
endif
|
endif
|
||||||
while start > 0
|
while start > 0
|
||||||
if line[start - 1] =~ '\w'
|
" Additional code was required to handle objects which
|
||||||
|
" can contain spaces like "my table name".
|
||||||
|
if line[start - 1] !~ '\(\w\|\.\)'
|
||||||
|
" If the previous character is not a period or word character
|
||||||
|
break
|
||||||
|
" elseif line[start - 1] =~ '\(\w\|\s\+\)'
|
||||||
|
" let start -= 1
|
||||||
|
elseif line[start - 1] =~ '\w'
|
||||||
|
" If the previous character is word character continue back
|
||||||
let start -= 1
|
let start -= 1
|
||||||
elseif line[start - 1] =~ '\.' &&
|
elseif line[start - 1] =~ '\.' &&
|
||||||
\ compl_type =~ 'column\|table\|view\|procedure'
|
\ compl_type =~ 'column\|table\|view\|procedure'
|
||||||
|
" If the previous character is a period and we are completing
|
||||||
|
" an object which can be specified with a period like this:
|
||||||
|
" table_name.column_name
|
||||||
|
" owner_name.table_name
|
||||||
|
|
||||||
" If lastword has already been set for column completion
|
" If lastword has already been set for column completion
|
||||||
" break from the loop, since we do not also want to pickup
|
" break from the loop, since we do not also want to pickup
|
||||||
" a table name if it was also supplied.
|
" a table name if it was also supplied.
|
||||||
@@ -178,32 +225,26 @@ function! sqlcomplete#Complete(findstart, base)
|
|||||||
|
|
||||||
" Allow the user to override the dbext plugin to specify whether
|
" Allow the user to override the dbext plugin to specify whether
|
||||||
" the owner/creator should be included in the list
|
" the owner/creator should be included in the list
|
||||||
let saved_dbext_show_owner = 1
|
if g:loaded_dbext >= 300
|
||||||
if exists('g:dbext_default_dict_show_owner')
|
let saveSetting = DB_listOption('dict_show_owner')
|
||||||
let saved_dbext_show_owner = g:dbext_default_dict_show_owner
|
exec 'DBSetOption dict_show_owner='.(g:omni_sql_include_owner==1?'1':'0')
|
||||||
endif
|
endif
|
||||||
let g:dbext_default_dict_show_owner = g:omni_sql_include_owner
|
|
||||||
|
|
||||||
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
|
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
|
||||||
if s:sql_file_{compl_type} == ""
|
" Same call below, no need to do it twice
|
||||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
" if s:sql_file_{compl_type} == ""
|
||||||
endif
|
" let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
||||||
|
" endif
|
||||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
||||||
if s:sql_file_{compl_type} != ""
|
if s:sql_file_{compl_type} != ""
|
||||||
if filereadable(s:sql_file_{compl_type})
|
if filereadable(s:sql_file_{compl_type})
|
||||||
let compl_list = readfile(s:sql_file_{compl_type})
|
let compl_list = readfile(s:sql_file_{compl_type})
|
||||||
" let dic_list = readfile(s:sql_file_{compl_type})
|
|
||||||
" if !empty(dic_list)
|
|
||||||
" for elem in dic_list
|
|
||||||
" let kind = (compl_type=='table'?'m':(compl_type=='procedure'?'f':'v'))
|
|
||||||
" let item = {'word':elem, 'menu':elem, 'kind':kind, 'info':compl_type}
|
|
||||||
" let compl_list += [item]
|
|
||||||
" endfor
|
|
||||||
" endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let g:dbext_default_dict_show_owner = saved_dbext_show_owner
|
if g:loaded_dbext > 300
|
||||||
|
exec 'DBSetOption dict_show_owner='.saveSetting
|
||||||
|
endif
|
||||||
elseif compl_type =~? 'column'
|
elseif compl_type =~? 'column'
|
||||||
|
|
||||||
" This type of completion relies upon the dbext.vim plugin
|
" This type of completion relies upon the dbext.vim plugin
|
||||||
@@ -237,7 +278,7 @@ function! sqlcomplete#Complete(findstart, base)
|
|||||||
" 1. Check if the dbext plugin has the option turned
|
" 1. Check if the dbext plugin has the option turned
|
||||||
" on to even allow owners
|
" on to even allow owners
|
||||||
" 2. Based on 1, if the user is showing a table list
|
" 2. Based on 1, if the user is showing a table list
|
||||||
" and the DrillIntoTable (using <C-Right>) then
|
" and the DrillIntoTable (using <Right>) then
|
||||||
" this will be owner.table. In this case, we can
|
" this will be owner.table. In this case, we can
|
||||||
" check to see the table.column exists in the
|
" check to see the table.column exists in the
|
||||||
" cached table list. If it does, then we have
|
" cached table list. If it does, then we have
|
||||||
@@ -319,9 +360,16 @@ function! sqlcomplete#Complete(findstart, base)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if base != ''
|
if base != ''
|
||||||
" Filter the list based on the first few characters the user
|
" Filter the list based on the first few characters the user entered.
|
||||||
" entered
|
" Check if the text matches at the beginning
|
||||||
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
|
" or
|
||||||
|
" Match to a owner.table or alias.column type match
|
||||||
|
" or
|
||||||
|
" Handle names with spaces "my table name"
|
||||||
|
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
|
||||||
|
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\)"'
|
||||||
|
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\(\\.\\)\\?'.base.'\\)"'
|
||||||
|
" let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
|
||||||
let compl_list = filter(deepcopy(compl_list), expr)
|
let compl_list = filter(deepcopy(compl_list), expr)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -334,7 +382,13 @@ endfunc
|
|||||||
|
|
||||||
function! sqlcomplete#PreCacheSyntax(...)
|
function! sqlcomplete#PreCacheSyntax(...)
|
||||||
let syn_group_arr = []
|
let syn_group_arr = []
|
||||||
|
let syn_items = []
|
||||||
|
|
||||||
if a:0 > 0
|
if a:0 > 0
|
||||||
|
if type(a:1) != 3
|
||||||
|
call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']")
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
let syn_group_arr = a:1
|
let syn_group_arr = a:1
|
||||||
else
|
else
|
||||||
let syn_group_arr = g:omni_sql_precache_syntax_groups
|
let syn_group_arr = g:omni_sql_precache_syntax_groups
|
||||||
@@ -343,7 +397,36 @@ function! sqlcomplete#PreCacheSyntax(...)
|
|||||||
" the sytnax items.
|
" the sytnax items.
|
||||||
if !empty(syn_group_arr)
|
if !empty(syn_group_arr)
|
||||||
for group_name in syn_group_arr
|
for group_name in syn_group_arr
|
||||||
call s:SQLCGetSyntaxList(group_name)
|
let syn_items = extend( syn_items, s:SQLCGetSyntaxList(group_name) )
|
||||||
|
endfor
|
||||||
|
endif
|
||||||
|
|
||||||
|
return syn_items
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! sqlcomplete#ResetCacheSyntax(...)
|
||||||
|
let syn_group_arr = []
|
||||||
|
|
||||||
|
if a:0 > 0
|
||||||
|
if type(a:1) != 3
|
||||||
|
call s:SQLCWarningMsg("Parameter is not a list. Example:['syntaxGroup1', 'syntaxGroup2']")
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
let syn_group_arr = a:1
|
||||||
|
else
|
||||||
|
let syn_group_arr = g:omni_sql_precache_syntax_groups
|
||||||
|
endif
|
||||||
|
" For each group specified in the list, precache all
|
||||||
|
" the sytnax items.
|
||||||
|
if !empty(syn_group_arr)
|
||||||
|
for group_name in syn_group_arr
|
||||||
|
let list_idx = index(s:syn_list, group_name, 0, &ignorecase)
|
||||||
|
if list_idx > -1
|
||||||
|
" Remove from list of groups
|
||||||
|
call remove( s:syn_list, list_idx )
|
||||||
|
" Remove from list of keywords
|
||||||
|
call remove( s:syn_value, list_idx )
|
||||||
|
endif
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
@@ -370,13 +453,14 @@ function! sqlcomplete#DrillIntoTable()
|
|||||||
call sqlcomplete#Map('column')
|
call sqlcomplete#Map('column')
|
||||||
" C-Y, makes the currently highlighted entry active
|
" C-Y, makes the currently highlighted entry active
|
||||||
" and trigger the omni popup to be redisplayed
|
" and trigger the omni popup to be redisplayed
|
||||||
call feedkeys("\<C-Y>\<C-X>\<C-O>")
|
call feedkeys("\<C-Y>\<C-X>\<C-O>", 'n')
|
||||||
else
|
else
|
||||||
if has('win32')
|
" If the popup is not visible, simple perform the normal
|
||||||
" If the popup is not visible, simple perform the normal
|
" key behaviour.
|
||||||
" <C-Right> behaviour
|
" Must use exec since they key must be preceeded by "\"
|
||||||
exec "normal! \<C-Right>"
|
" or feedkeys will simply push each character of the string
|
||||||
endif
|
" rather than the "key press".
|
||||||
|
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")'
|
||||||
endif
|
endif
|
||||||
return ""
|
return ""
|
||||||
endfunction
|
endfunction
|
||||||
@@ -388,24 +472,25 @@ function! sqlcomplete#DrillOutOfColumns()
|
|||||||
" Trigger the omni popup to be redisplayed
|
" Trigger the omni popup to be redisplayed
|
||||||
call feedkeys("\<C-X>\<C-O>")
|
call feedkeys("\<C-X>\<C-O>")
|
||||||
else
|
else
|
||||||
if has('win32')
|
" If the popup is not visible, simple perform the normal
|
||||||
" If the popup is not visible, simple perform the normal
|
" key behaviour.
|
||||||
" <C-Left> behaviour
|
" Must use exec since they key must be preceeded by "\"
|
||||||
exec "normal! \<C-Left>"
|
" or feedkeys will simply push each character of the string
|
||||||
endif
|
" rather than the "key press".
|
||||||
|
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")'
|
||||||
endif
|
endif
|
||||||
return ""
|
return ""
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:SQLCWarningMsg(msg)
|
function! s:SQLCWarningMsg(msg)
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
echomsg a:msg
|
echomsg 'SQLComplete:'.a:msg
|
||||||
echohl None
|
echohl None
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:SQLCErrorMsg(msg)
|
function! s:SQLCErrorMsg(msg)
|
||||||
echohl ErrorMsg
|
echohl ErrorMsg
|
||||||
echomsg a:msg
|
echomsg 'SQLComplete:'.a:msg
|
||||||
echohl None
|
echohl None
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@@ -431,7 +516,7 @@ function! s:SQLCGetSyntaxList(syn_group)
|
|||||||
let g:omni_syntax_group_include_sql = syn_group
|
let g:omni_syntax_group_include_sql = syn_group
|
||||||
endif
|
endif
|
||||||
let g:omni_syntax_group_exclude_sql = ''
|
let g:omni_syntax_group_exclude_sql = ''
|
||||||
let syn_value = OmniSyntaxList()
|
let syn_value = syntaxcomplete#OmniSyntaxList()
|
||||||
let g:omni_syntax_group_include_sql = s:save_inc
|
let g:omni_syntax_group_include_sql = s:save_inc
|
||||||
let g:omni_syntax_group_exclude_sql = s:save_exc
|
let g:omni_syntax_group_exclude_sql = s:save_exc
|
||||||
" Cache these values for later use
|
" Cache these values for later use
|
||||||
@@ -450,8 +535,8 @@ function! s:SQLCCheck4dbext()
|
|||||||
" Leave time for the user to read the error message
|
" Leave time for the user to read the error message
|
||||||
:sleep 2
|
:sleep 2
|
||||||
return -1
|
return -1
|
||||||
elseif g:loaded_dbext < 300
|
elseif g:loaded_dbext < 600
|
||||||
let msg = "The dbext plugin must be at least version 3.00 " .
|
let msg = "The dbext plugin must be at least version 5.30 " .
|
||||||
\ " for dynamic SQL completion"
|
\ " for dynamic SQL completion"
|
||||||
call s:SQLCErrorMsg(msg)
|
call s:SQLCErrorMsg(msg)
|
||||||
" Leave time for the user to read the error message
|
" Leave time for the user to read the error message
|
||||||
@@ -514,34 +599,42 @@ endfunction
|
|||||||
function! s:SQLCGetObjectOwner(object)
|
function! s:SQLCGetObjectOwner(object)
|
||||||
" The owner regex matches a word at the start of the string which is
|
" The owner regex matches a word at the start of the string which is
|
||||||
" followed by a dot, but doesn't include the dot in the result.
|
" followed by a dot, but doesn't include the dot in the result.
|
||||||
" ^ - from beginning of line
|
" ^ - from beginning of line
|
||||||
" "\? - ignore any quotes
|
" \("\|\[\)\? - ignore any quotes
|
||||||
" \zs - start the match now
|
" \zs - start the match now
|
||||||
" \w\+ - get owner name
|
" .\{-} - get owner name
|
||||||
" \ze - end the match
|
" \ze - end the match
|
||||||
" "\? - ignore any quotes
|
" \("\|\[\)\? - ignore any quotes
|
||||||
" \. - must by followed by a .
|
" \. - must by followed by a .
|
||||||
let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' )
|
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
|
||||||
|
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
|
||||||
return owner
|
return owner
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:SQLCGetColumns(table_name, list_type)
|
function! s:SQLCGetColumns(table_name, list_type)
|
||||||
" Check if the table name was provided as part of the column name
|
" Check if the table name was provided as part of the column name
|
||||||
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?')
|
let table_name = matchstr(a:table_name, '^["\[\]a-zA-Z0-9_ ]\+\ze\.\?')
|
||||||
let table_cols = []
|
let table_cols = []
|
||||||
let table_alias = ''
|
let table_alias = ''
|
||||||
let move_to_top = 1
|
let move_to_top = 1
|
||||||
|
|
||||||
|
let table_name = substitute(table_name, '\s*\(.\{-}\)\s*$', '\1', 'g')
|
||||||
|
|
||||||
|
" If the table name was given as:
|
||||||
|
" where c.
|
||||||
|
let table_name = substitute(table_name, '^\c\(WHERE\|AND\|OR\)\s\+', '', '')
|
||||||
if g:loaded_dbext >= 300
|
if g:loaded_dbext >= 300
|
||||||
let saveSettingAlias = DB_listOption('use_tbl_alias')
|
let saveSettingAlias = DB_listOption('use_tbl_alias')
|
||||||
exec 'DBSetOption use_tbl_alias=n'
|
exec 'DBSetOption use_tbl_alias=n'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
let table_name_stripped = substitute(table_name, '["\[\]]*', '', 'g')
|
||||||
|
|
||||||
" Check if we have already cached the column list for this table
|
" Check if we have already cached the column list for this table
|
||||||
" by its name
|
" by its name
|
||||||
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
|
let list_idx = index(s:tbl_name, table_name_stripped, 0, &ignorecase)
|
||||||
if list_idx > -1
|
if list_idx > -1
|
||||||
let table_cols = split(s:tbl_cols[list_idx])
|
let table_cols = split(s:tbl_cols[list_idx], '\n')
|
||||||
else
|
else
|
||||||
" Check if we have already cached the column list for this table
|
" Check if we have already cached the column list for this table
|
||||||
" by its alias, assuming the table_name provided was actually
|
" by its alias, assuming the table_name provided was actually
|
||||||
@@ -549,11 +642,11 @@ function! s:SQLCGetColumns(table_name, list_type)
|
|||||||
" select *
|
" select *
|
||||||
" from area a
|
" from area a
|
||||||
" where a.
|
" where a.
|
||||||
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
|
let list_idx = index(s:tbl_alias, table_name_stripped, 0, &ignorecase)
|
||||||
if list_idx > -1
|
if list_idx > -1
|
||||||
let table_alias = table_name
|
let table_alias = table_name_stripped
|
||||||
let table_name = s:tbl_name[list_idx]
|
let table_name = s:tbl_name[list_idx]
|
||||||
let table_cols = split(s:tbl_cols[list_idx])
|
let table_cols = split(s:tbl_cols[list_idx], '\n')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -581,7 +674,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
|||||||
" Search backwards to the beginning of the statement
|
" Search backwards to the beginning of the statement
|
||||||
" and do NOT wrap
|
" and do NOT wrap
|
||||||
" exec 'silent! normal! v?\<\(select\|update\|delete\|;\)\>'."\n".'"yy'
|
" exec 'silent! normal! v?\<\(select\|update\|delete\|;\)\>'."\n".'"yy'
|
||||||
exec 'silent! normal! ?\<\(select\|update\|delete\|;\)\>'."\n"
|
exec 'silent! normal! ?\<\c\(select\|update\|delete\|;\)\>'."\n"
|
||||||
|
|
||||||
" Start characterwise visual mode
|
" Start characterwise visual mode
|
||||||
" Advance right one character
|
" Advance right one character
|
||||||
@@ -590,27 +683,38 @@ function! s:SQLCGetColumns(table_name, list_type)
|
|||||||
" 2. A ; at the end of a line (the delimiter)
|
" 2. A ; at the end of a line (the delimiter)
|
||||||
" 3. The end of the file (incase no delimiter)
|
" 3. The end of the file (incase no delimiter)
|
||||||
" Yank the visually selected text into the "y register.
|
" Yank the visually selected text into the "y register.
|
||||||
exec 'silent! normal! vl/\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'
|
exec 'silent! normal! vl/\c\(\<select\>\|\<update\>\|\<delete\>\|;\s*$\|\%$\)'."\n".'"yy'
|
||||||
|
|
||||||
let query = @y
|
let query = @y
|
||||||
let query = substitute(query, "\n", ' ', 'g')
|
let query = substitute(query, "\n", ' ', 'g')
|
||||||
let found = 0
|
let found = 0
|
||||||
|
|
||||||
" if query =~? '^\(select\|update\|delete\)'
|
" if query =~? '^\c\(select\)'
|
||||||
if query =~? '^\(select\)'
|
if query =~? '^\(select\|update\|delete\)'
|
||||||
let found = 1
|
let found = 1
|
||||||
" \(\(\<\w\+\>\)\.\)\? -
|
" \(\(\<\w\+\>\)\.\)\? -
|
||||||
" 'from.\{-}' - Starting at the from clause
|
" '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive)
|
||||||
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
|
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
|
||||||
" '\<\w\+\>\ze' - Get the table name
|
" '\<\w\+\>\ze' - Get the table name
|
||||||
" '\s\+\<'.table_name.'\>' - Followed by the alias
|
" '\s\+\<'.table_name.'\>' - Followed by the alias
|
||||||
" '\s*\.\@!.*' - Cannot be followed by a .
|
" '\s*\.\@!.*' - Cannot be followed by a .
|
||||||
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
|
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
|
||||||
" '.*' - Exclude the rest of the line in the match
|
" '.*' - Exclude the rest of the line in the match
|
||||||
|
" let table_name_new = matchstr(@y,
|
||||||
|
" \ '\c\(from\|join\|,\).\{-}'.
|
||||||
|
" \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
|
||||||
|
" \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'.
|
||||||
|
" \ '\s\+\%(as\s\+\)\?\<'.
|
||||||
|
" \ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||||
|
" \ '\>'.
|
||||||
|
" \ '\s*\.\@!.*'.
|
||||||
|
" \ '\(\<where\>\|$\)'.
|
||||||
|
" \ '.*'
|
||||||
|
" \ )
|
||||||
let table_name_new = matchstr(@y,
|
let table_name_new = matchstr(@y,
|
||||||
\ 'from.\{-}'.
|
\ '\c\(\<from\>\|\<join\>\|,\)\s*'.
|
||||||
\ '\zs\(\(\<\w\+\>\)\.\)\?'.
|
\ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'.
|
||||||
\ '\<\w\+\>\ze'.
|
\ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'.
|
||||||
\ '\s\+\%(as\s\+\)\?\<'.
|
\ '\s\+\%(as\s\+\)\?\<'.
|
||||||
\ matchstr(table_name, '.\{-}\ze\.\?$').
|
\ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||||
\ '\>'.
|
\ '\>'.
|
||||||
@@ -618,9 +722,10 @@ function! s:SQLCGetColumns(table_name, list_type)
|
|||||||
\ '\(\<where\>\|$\)'.
|
\ '\(\<where\>\|$\)'.
|
||||||
\ '.*'
|
\ '.*'
|
||||||
\ )
|
\ )
|
||||||
|
|
||||||
if table_name_new != ''
|
if table_name_new != ''
|
||||||
let table_alias = table_name
|
let table_alias = table_name
|
||||||
let table_name = table_name_new
|
let table_name = matchstr( table_name_new, '^\(.*\.\)\?\zs.*\ze' )
|
||||||
|
|
||||||
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
|
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
|
||||||
if list_idx > -1
|
if list_idx > -1
|
||||||
@@ -668,7 +773,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
|||||||
let s:tbl_name = add( s:tbl_name, table_name )
|
let s:tbl_name = add( s:tbl_name, table_name )
|
||||||
let s:tbl_alias = add( s:tbl_alias, table_alias )
|
let s:tbl_alias = add( s:tbl_alias, table_alias )
|
||||||
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
|
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
|
||||||
let table_cols = split(table_cols_str)
|
let table_cols = split(table_cols_str, '\n')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@@ -688,4 +793,3 @@ function! s:SQLCGetColumns(table_name, list_type)
|
|||||||
|
|
||||||
return table_cols
|
return table_cols
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,35 @@
|
|||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: All languages, uses existing syntax highlighting rules
|
" Language: All languages, uses existing syntax highlighting rules
|
||||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||||
" Version: 3.0
|
" Version: 7.0
|
||||||
" Last Change: Wed Nov 08 2006 10:46:46 AM
|
" Last Change: 2010 Jul 29
|
||||||
" Usage: For detailed help, ":help ft-syntax-omni"
|
" Usage: For detailed help, ":help ft-syntax-omni"
|
||||||
|
|
||||||
|
" History
|
||||||
|
"
|
||||||
|
" Version 7.0
|
||||||
|
" Updated syntaxcomplete#OmniSyntaxList()
|
||||||
|
" - Looking up the syntax groups defined from a syntax file
|
||||||
|
" looked for only 1 format of {filetype}GroupName, but some
|
||||||
|
" syntax writers use this format as well:
|
||||||
|
" {b:current_syntax}GroupName
|
||||||
|
" OmniSyntaxList() will now check for both if the first
|
||||||
|
" method does not find a match.
|
||||||
|
"
|
||||||
|
" Version 6.0
|
||||||
|
" Added syntaxcomplete#OmniSyntaxList()
|
||||||
|
" - Allows other plugins to use this for their own
|
||||||
|
" purposes.
|
||||||
|
" - It will return a List of all syntax items for the
|
||||||
|
" syntax group name passed in.
|
||||||
|
" - XPTemplate for SQL will use this function via the
|
||||||
|
" sqlcomplete plugin to populate a Choose box.
|
||||||
|
"
|
||||||
|
" Version 5.0
|
||||||
|
" Updated SyntaxCSyntaxGroupItems()
|
||||||
|
" - When processing a list of syntax groups, the final group
|
||||||
|
" was missed in function SyntaxCSyntaxGroupItems.
|
||||||
|
"
|
||||||
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
" Set completion with CTRL-X CTRL-O to autoloaded function.
|
||||||
" This check is in place in case this script is
|
" This check is in place in case this script is
|
||||||
" sourced directly instead of using the autoload feature.
|
" sourced directly instead of using the autoload feature.
|
||||||
@@ -19,7 +44,7 @@ endif
|
|||||||
if exists('g:loaded_syntax_completion')
|
if exists('g:loaded_syntax_completion')
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_syntax_completion = 30
|
let g:loaded_syntax_completion = 70
|
||||||
|
|
||||||
" Set ignorecase to the ftplugin standard
|
" Set ignorecase to the ftplugin standard
|
||||||
" This is the default setting, but if you define a buffer local
|
" This is the default setting, but if you define a buffer local
|
||||||
@@ -123,7 +148,30 @@ function! syntaxcomplete#Complete(findstart, base)
|
|||||||
return compl_list
|
return compl_list
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
function! OmniSyntaxList()
|
function! syntaxcomplete#OmniSyntaxList(...)
|
||||||
|
if a:0 > 0
|
||||||
|
let parms = []
|
||||||
|
if 3 == type(a:1)
|
||||||
|
let parms = a:1
|
||||||
|
elseif 1 == type(a:1)
|
||||||
|
let parms = split(a:1, ',')
|
||||||
|
endif
|
||||||
|
return OmniSyntaxList( parms )
|
||||||
|
else
|
||||||
|
return OmniSyntaxList()
|
||||||
|
endif
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
function! OmniSyntaxList(...)
|
||||||
|
let list_parms = []
|
||||||
|
if a:0 > 0
|
||||||
|
if 3 == type(a:1)
|
||||||
|
let list_parms = a:1
|
||||||
|
elseif 1 == type(a:1)
|
||||||
|
let list_parms = split(a:1, ',')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
" Default to returning a dictionary, if use_dictionary is set to 0
|
" Default to returning a dictionary, if use_dictionary is set to 0
|
||||||
" a list will be returned.
|
" a list will be returned.
|
||||||
" let use_dictionary = 1
|
" let use_dictionary = 1
|
||||||
@@ -152,16 +200,40 @@ function! OmniSyntaxList()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
let saveL = @l
|
let saveL = @l
|
||||||
|
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||||
|
|
||||||
|
if empty(list_parms)
|
||||||
|
" Default the include group to include the requested syntax group
|
||||||
|
let syntax_group_include_{filetype} = ''
|
||||||
|
" Check if there are any overrides specified for this filetype
|
||||||
|
if exists('g:omni_syntax_group_include_'.filetype)
|
||||||
|
let syntax_group_include_{filetype} =
|
||||||
|
\ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g')
|
||||||
|
let list_parms = split(g:omni_syntax_group_include_{filetype}, ',')
|
||||||
|
if syntax_group_include_{filetype} =~ '\w'
|
||||||
|
let syntax_group_include_{filetype} =
|
||||||
|
\ substitute( syntax_group_include_{filetype},
|
||||||
|
\ '\s*,\s*', '\\|', 'g'
|
||||||
|
\ )
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" A specific list was provided, use it
|
||||||
|
endif
|
||||||
|
|
||||||
" Loop through all the syntax groupnames, and build a
|
" Loop through all the syntax groupnames, and build a
|
||||||
" syntax file which contains these names. This can
|
" syntax file which contains these names. This can
|
||||||
" work generically for any filetype that does not already
|
" work generically for any filetype that does not already
|
||||||
" have a plugin defined.
|
" have a plugin defined.
|
||||||
" This ASSUMES the syntax groupname BEGINS with the name
|
" This ASSUMES the syntax groupname BEGINS with the name
|
||||||
" of the filetype. From my casual viewing of the vim7\syntax
|
" of the filetype. From my casual viewing of the vim7\syntax
|
||||||
" directory.
|
" directory this is true for almost all syntax definitions.
|
||||||
|
" As an example, the SQL syntax groups have this pattern:
|
||||||
|
" sqlType
|
||||||
|
" sqlOperators
|
||||||
|
" sqlKeyword ...
|
||||||
redir @l
|
redir @l
|
||||||
silent! exec 'syntax list '
|
silent! exec 'syntax list '.join(list_parms)
|
||||||
redir END
|
redir END
|
||||||
|
|
||||||
let syntax_full = "\n".@l
|
let syntax_full = "\n".@l
|
||||||
@@ -176,31 +248,23 @@ function! OmniSyntaxList()
|
|||||||
|
|
||||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||||
|
|
||||||
" Default the include group to include the requested syntax group
|
let list_exclude_groups = []
|
||||||
let syntax_group_include_{filetype} = ''
|
if a:0 > 0
|
||||||
" Check if there are any overrides specified for this filetype
|
" Do nothing since we have specific a specific list of groups
|
||||||
if exists('g:omni_syntax_group_include_'.filetype)
|
else
|
||||||
let syntax_group_include_{filetype} =
|
" Default the exclude group to nothing
|
||||||
\ substitute( g:omni_syntax_group_include_{filetype},'\s\+','','g')
|
let syntax_group_exclude_{filetype} = ''
|
||||||
if syntax_group_include_{filetype} =~ '\w'
|
" Check if there are any overrides specified for this filetype
|
||||||
let syntax_group_include_{filetype} =
|
if exists('g:omni_syntax_group_exclude_'.filetype)
|
||||||
\ substitute( syntax_group_include_{filetype},
|
let syntax_group_exclude_{filetype} =
|
||||||
\ '\s*,\s*', '\\|', 'g'
|
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
|
||||||
\ )
|
let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',')
|
||||||
endif
|
if syntax_group_exclude_{filetype} =~ '\w'
|
||||||
endif
|
let syntax_group_exclude_{filetype} =
|
||||||
|
\ substitute( syntax_group_exclude_{filetype},
|
||||||
" Default the exclude group to nothing
|
\ '\s*,\s*', '\\|', 'g'
|
||||||
let syntax_group_exclude_{filetype} = ''
|
\ )
|
||||||
" Check if there are any overrides specified for this filetype
|
endif
|
||||||
if exists('g:omni_syntax_group_exclude_'.filetype)
|
|
||||||
let syntax_group_exclude_{filetype} =
|
|
||||||
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
|
|
||||||
if syntax_group_exclude_{filetype} =~ '\w'
|
|
||||||
let syntax_group_exclude_{filetype} =
|
|
||||||
\ substitute( syntax_group_exclude_{filetype},
|
|
||||||
\ '\s*,\s*', '\\|', 'g'
|
|
||||||
\ )
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -225,47 +289,51 @@ function! OmniSyntaxList()
|
|||||||
let index = 0
|
let index = 0
|
||||||
let index = match(syntax_full, next_group_regex, index)
|
let index = match(syntax_full, next_group_regex, index)
|
||||||
|
|
||||||
|
if index == -1 && exists('b:current_syntax') && ft_part_name != b:current_syntax
|
||||||
|
" There appears to be two standards when writing syntax files.
|
||||||
|
" Either items begin as:
|
||||||
|
" syn keyword {filetype}Keyword values ...
|
||||||
|
" let b:current_syntax = "sql"
|
||||||
|
" let b:current_syntax = "sqlanywhere"
|
||||||
|
" Or
|
||||||
|
" syn keyword {syntax_filename}Keyword values ...
|
||||||
|
" let b:current_syntax = "mysql"
|
||||||
|
" So, we will make the format of finding the syntax group names
|
||||||
|
" a bit more flexible and look for both if the first fails to
|
||||||
|
" find a match.
|
||||||
|
let next_group_regex = '\n' .
|
||||||
|
\ '\zs'.b:current_syntax.'\w\+\ze'.
|
||||||
|
\ '\s\+xxx\s\+'
|
||||||
|
let index = 0
|
||||||
|
let index = match(syntax_full, next_group_regex, index)
|
||||||
|
endif
|
||||||
|
|
||||||
while index > -1
|
while index > -1
|
||||||
let group_name = matchstr( syntax_full, '\w\+', index )
|
let group_name = matchstr( syntax_full, '\w\+', index )
|
||||||
|
|
||||||
let get_syn_list = 1
|
let get_syn_list = 1
|
||||||
" if syntax_group_include_{&filetype} == ''
|
for exclude_group_name in list_exclude_groups
|
||||||
" if syntax_group_exclude_{&filetype} != ''
|
if '\<'.exclude_group_name.'\>' =~ '\<'.group_name.'\>'
|
||||||
" if '\<'.syntax_group_exclude_{&filetype}.'\>' =~ '\<'.group_name.'\>'
|
let get_syn_list = 0
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
|
" This code is no longer needed in version 6.0 since we have
|
||||||
|
" augmented the syntax list command to only retrieve the syntax
|
||||||
|
" groups we are interested in.
|
||||||
|
"
|
||||||
|
" if get_syn_list == 1
|
||||||
|
" if syntax_group_include_{filetype} != ''
|
||||||
|
" if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
|
||||||
" let get_syn_list = 0
|
" let get_syn_list = 0
|
||||||
" endif
|
" endif
|
||||||
" endif
|
" endif
|
||||||
" else
|
|
||||||
" if '\<'.syntax_group_include_{&filetype}.'\>' !~ '\<'.group_name.'\>'
|
|
||||||
" let get_syn_list = 0
|
|
||||||
" endif
|
|
||||||
" endif
|
" endif
|
||||||
if syntax_group_exclude_{filetype} != ''
|
|
||||||
if '\<'.syntax_group_exclude_{filetype}.'\>' =~ '\<'.group_name.'\>'
|
|
||||||
let get_syn_list = 0
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if get_syn_list == 1
|
|
||||||
if syntax_group_include_{filetype} != ''
|
|
||||||
if '\<'.syntax_group_include_{filetype}.'\>' !~ '\<'.group_name.'\>'
|
|
||||||
let get_syn_list = 0
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
if get_syn_list == 1
|
if get_syn_list == 1
|
||||||
" Pass in the full syntax listing, plus the group name we
|
" Pass in the full syntax listing, plus the group name we
|
||||||
" are interested in.
|
" are interested in.
|
||||||
let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
|
let extra_syn_list = s:SyntaxCSyntaxGroupItems(group_name, syntax_full)
|
||||||
|
|
||||||
" if !empty(extra_syn_list)
|
|
||||||
" for elem in extra_syn_list
|
|
||||||
" let item = {'word':elem, 'kind':'t', 'info':group_name}
|
|
||||||
" let compl_list += [item]
|
|
||||||
" endfor
|
|
||||||
" endif
|
|
||||||
|
|
||||||
let syn_list = syn_list . extra_syn_list . "\n"
|
let syn_list = syn_list . extra_syn_list . "\n"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -312,9 +380,13 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
|||||||
" \zs - start the match
|
" \zs - start the match
|
||||||
" .\{-} - everything ...
|
" .\{-} - everything ...
|
||||||
" \ze - end the match
|
" \ze - end the match
|
||||||
|
" \( - start a group or 2 potential matches
|
||||||
" \n\w - at the first newline starting with a character
|
" \n\w - at the first newline starting with a character
|
||||||
|
" \| - 2nd potential match
|
||||||
|
" \%$ - matches end of the file or string
|
||||||
|
" \) - end a group
|
||||||
let syntax_group = matchstr(a:syntax_full,
|
let syntax_group = matchstr(a:syntax_full,
|
||||||
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze'."\n".'\w'
|
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze\(\n\w\|\%$\)'
|
||||||
\ )
|
\ )
|
||||||
|
|
||||||
if syntax_group != ""
|
if syntax_group != ""
|
||||||
@@ -353,9 +425,11 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
|||||||
else
|
else
|
||||||
let accept_chars = ','.&iskeyword.','
|
let accept_chars = ','.&iskeyword.','
|
||||||
" Remove all character ranges
|
" Remove all character ranges
|
||||||
let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
|
" let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
|
||||||
|
let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
|
||||||
" Remove all numeric specifications
|
" Remove all numeric specifications
|
||||||
let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
|
" let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
|
||||||
|
let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
|
||||||
" Remove all commas
|
" Remove all commas
|
||||||
let accept_chars = substitute(accept_chars, ',', '', 'g')
|
let accept_chars = substitute(accept_chars, ',', '', 'g')
|
||||||
" Escape special regex characters
|
" Escape special regex characters
|
||||||
|
|||||||
@@ -1,30 +1,36 @@
|
|||||||
" tar.vim: Handles browsing tarfiles
|
" tar.vim: Handles browsing tarfiles
|
||||||
" AUTOLOAD PORTION
|
" AUTOLOAD PORTION
|
||||||
" Date: Sep 29, 2006
|
" Date: Aug 09, 2010
|
||||||
" Version: 11
|
" Version: 26
|
||||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||||
" License: Vim License (see vim's :help license)
|
" License: Vim License (see vim's :help license)
|
||||||
"
|
"
|
||||||
" Contains many ideas from Michael Toren's <tar.vim>
|
" Contains many ideas from Michael Toren's <tar.vim>
|
||||||
"
|
"
|
||||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
" Copyright: Copyright (C) 2005-2009 Charles E. Campbell, Jr. {{{1
|
||||||
" Permission is hereby granted to use and distribute this code,
|
" Permission is hereby granted to use and distribute this code,
|
||||||
" with or without modifications, provided that this copyright
|
" with or without modifications, provided that this copyright
|
||||||
" notice is copied with it. Like anything else that's free,
|
" notice is copied with it. Like anything else that's free,
|
||||||
" tarPlugin.vim is provided *as is* and comes with no warranty
|
" tar.vim and tarPlugin.vim are provided *as is* and comes
|
||||||
" of any kind, either expressed or implied. By using this
|
" with no warranty of any kind, either expressed or implied.
|
||||||
" plugin, you agree that in no event will the copyright
|
" By using this plugin, you agree that in no event will the
|
||||||
" holder be liable for any damages resulting from the use
|
" copyright holder be liable for any damages resulting from
|
||||||
" of this software.
|
" the use of this software.
|
||||||
|
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Load Once: {{{1
|
" Load Once: {{{1
|
||||||
let s:keepcpo= &cpo
|
if &cp || exists("g:loaded_tar")
|
||||||
set cpo&vim
|
|
||||||
if &cp || exists("g:loaded_tar") || v:version < 700
|
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let g:loaded_tar= "v11"
|
let g:loaded_tar= "v26"
|
||||||
|
if v:version < 702
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "***warning*** this version of tar needs vim 7.2"
|
||||||
|
echohl Normal
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let s:keepcpo= &cpo
|
||||||
|
set cpo&vim
|
||||||
"call Decho("loading autoload/tar.vim")
|
"call Decho("loading autoload/tar.vim")
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
@@ -41,12 +47,51 @@ endif
|
|||||||
if !exists("g:tar_writeoptions")
|
if !exists("g:tar_writeoptions")
|
||||||
let g:tar_writeoptions= "uf"
|
let g:tar_writeoptions= "uf"
|
||||||
endif
|
endif
|
||||||
if !exists("g:tar_shq")
|
if !exists("g:tar_copycmd")
|
||||||
if has("unix")
|
if !exists("g:netrw_localcopycmd")
|
||||||
let g:tar_shq= "'"
|
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
else
|
if g:netrw_cygwin
|
||||||
let g:tar_shq= '"'
|
let g:netrw_localcopycmd= "cp"
|
||||||
|
else
|
||||||
|
let g:netrw_localcopycmd= "copy"
|
||||||
|
endif
|
||||||
|
elseif has("unix") || has("macunix")
|
||||||
|
let g:netrw_localcopycmd= "cp"
|
||||||
|
else
|
||||||
|
let g:netrw_localcopycmd= ""
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
let g:tar_copycmd= g:netrw_localcopycmd
|
||||||
|
endif
|
||||||
|
if !exists("g:netrw_cygwin")
|
||||||
|
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
|
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||||
|
let g:netrw_cygwin= 1
|
||||||
|
else
|
||||||
|
let g:netrw_cygwin= 0
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let g:netrw_cygwin= 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if !exists("g:tar_extractcmd")
|
||||||
|
let g:tar_extractcmd= "tar -xf"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" set up shell quoting character
|
||||||
|
if !exists("g:tar_shq")
|
||||||
|
if exists("&shq") && &shq != ""
|
||||||
|
let g:tar_shq= &shq
|
||||||
|
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
|
if exists("g:netrw_cygwin") && g:netrw_cygwin
|
||||||
|
let g:tar_shq= "'"
|
||||||
|
else
|
||||||
|
let g:tar_shq= '"'
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let g:tar_shq= "'"
|
||||||
|
endif
|
||||||
|
" call Decho("g:tar_shq<".g:tar_shq.">")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" ----------------
|
" ----------------
|
||||||
@@ -64,7 +109,6 @@ fun! tar#Browse(tarfile)
|
|||||||
if !executable(g:tar_cmd)
|
if !executable(g:tar_cmd)
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Browse")
|
" call Dret("tar#Browse")
|
||||||
return
|
return
|
||||||
@@ -75,7 +119,6 @@ fun! tar#Browse(tarfile)
|
|||||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
endif
|
endif
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
|
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
|
||||||
@@ -84,7 +127,7 @@ fun! tar#Browse(tarfile)
|
|||||||
if &ma != 1
|
if &ma != 1
|
||||||
set ma
|
set ma
|
||||||
endif
|
endif
|
||||||
let w:tarfile= a:tarfile
|
let b:tarfile= a:tarfile
|
||||||
|
|
||||||
setlocal noswapfile
|
setlocal noswapfile
|
||||||
setlocal buftype=nofile
|
setlocal buftype=nofile
|
||||||
@@ -95,43 +138,56 @@ fun! tar#Browse(tarfile)
|
|||||||
|
|
||||||
" give header
|
" give header
|
||||||
" call Decho("printing header")
|
" call Decho("printing header")
|
||||||
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
|
let lastline= line("$")
|
||||||
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
|
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
|
||||||
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
|
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
|
||||||
|
call setline(lastline+3,'" Select a file with cursor and press ENTER')
|
||||||
|
$put =''
|
||||||
0d
|
0d
|
||||||
$
|
$
|
||||||
|
|
||||||
let tarfile= a:tarfile
|
let tarfile= a:tarfile
|
||||||
if has("win32") && executable("cygpath")
|
if has("win32") && executable("cygpath")
|
||||||
" assuming cygwin
|
" assuming cygwin
|
||||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||||
endif
|
endif
|
||||||
let curlast= line("$")
|
let curlast= line("$")
|
||||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||||
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||||
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
|
exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||||
|
elseif tarfile =~# '\.lrp'
|
||||||
|
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||||
|
exe "silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||||
elseif tarfile =~# '\.bz2$'
|
elseif tarfile =~# '\.bz2$'
|
||||||
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||||
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
|
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||||
|
elseif tarfile =~# '\.lzma$'
|
||||||
|
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||||
|
exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||||
|
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||||
|
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||||
|
exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||||
else
|
else
|
||||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq)
|
if tarfile =~ '^\s*-'
|
||||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq
|
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||||
|
let tarfile = substitute(tarfile, '-', './-', '')
|
||||||
|
endif
|
||||||
|
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
|
||||||
|
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||||
endif
|
endif
|
||||||
if v:shell_error != 0
|
if v:shell_error != 0
|
||||||
redraw!
|
redraw!
|
||||||
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
|
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
|
||||||
redraw!
|
redraw!
|
||||||
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
|
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
silent %d
|
silent %d
|
||||||
let eikeep= &ei
|
let eikeep= &ei
|
||||||
set ei=BufReadCmd,FileReadCmd
|
set ei=BufReadCmd,FileReadCmd
|
||||||
exe "r ".a:tarfile
|
exe "r ".fnameescape(a:tarfile)
|
||||||
let &ei= eikeep
|
let &ei= eikeep
|
||||||
1d
|
1d
|
||||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||||
@@ -142,18 +198,25 @@ fun! tar#Browse(tarfile)
|
|||||||
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
|
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
|
||||||
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Browse : w:tarfile<".w:tarfile.">")
|
" call Dret("tar#Browse : b:tarfile<".b:tarfile.">")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" TarBrowseSelect: {{{2
|
" TarBrowseSelect: {{{2
|
||||||
fun! s:TarBrowseSelect()
|
fun! s:TarBrowseSelect()
|
||||||
" call Dfunc("TarBrowseSelect() w:tarfile<".w:tarfile."> curfile<".expand("%").">")
|
" call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">")
|
||||||
let repkeep= &report
|
let repkeep= &report
|
||||||
set report=10
|
set report=10
|
||||||
let fname= getline(".")
|
let fname= getline(".")
|
||||||
" call Decho("fname<".fname.">")
|
" call Decho("fname<".fname.">")
|
||||||
|
|
||||||
|
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
|
||||||
|
redraw!
|
||||||
|
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
|
||||||
|
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
" sanity check
|
" sanity check
|
||||||
if fname =~ '^"'
|
if fname =~ '^"'
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
@@ -161,18 +224,20 @@ fun! s:TarBrowseSelect()
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" about to make a new window, need to use w:tarfile
|
" about to make a new window, need to use b:tarfile
|
||||||
let tarfile= w:tarfile
|
let tarfile= b:tarfile
|
||||||
let curfile= expand("%")
|
let curfile= expand("%")
|
||||||
if has("win32") && executable("cygpath")
|
if has("win32") && executable("cygpath")
|
||||||
" assuming cygwin
|
" assuming cygwin
|
||||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
new
|
new
|
||||||
wincmd _
|
if !exists("g:tar_nomax") || g:tar_nomax == 0
|
||||||
|
wincmd _
|
||||||
|
endif
|
||||||
let s:tblfile_{winnr()}= curfile
|
let s:tblfile_{winnr()}= curfile
|
||||||
call tar#Read("tarfile:".tarfile.':'.fname,1)
|
call tar#Read("tarfile:".tarfile.'::'.fname,1)
|
||||||
filetype detect
|
filetype detect
|
||||||
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
@@ -185,48 +250,98 @@ fun! tar#Read(fname,mode)
|
|||||||
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
|
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
|
||||||
let repkeep= &report
|
let repkeep= &report
|
||||||
set report=10
|
set report=10
|
||||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
|
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||||
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
|
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||||
if has("win32") && executable("cygpath")
|
if has("win32") && executable("cygpath")
|
||||||
" assuming cygwin
|
" assuming cygwin
|
||||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||||
endif
|
endif
|
||||||
" call Decho("tarfile<".tarfile.">")
|
" call Decho("tarfile<".tarfile.">")
|
||||||
" call Decho("fname<".fname.">")
|
" call Decho("fname<".fname.">")
|
||||||
|
|
||||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
if fname =~ '\.bz2$' && executable("bzcat")
|
||||||
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -OPxf - '".fname."'")
|
let decmp= "|bzcat"
|
||||||
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
|
let doro = 1
|
||||||
elseif tarfile =~# '\.bz2$'
|
elseif fname =~ '\.gz$' && executable("zcat")
|
||||||
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'")
|
let decmp= "|zcat"
|
||||||
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
|
let doro = 1
|
||||||
|
elseif fname =~ '\.lzma$' && executable("lzcat")
|
||||||
|
let decmp= "|lzcat"
|
||||||
|
let doro = 1
|
||||||
|
elseif fname =~ '\.xz$' && executable("xzcat")
|
||||||
|
let decmp= "|xzcat"
|
||||||
|
let doro = 1
|
||||||
else
|
else
|
||||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq)
|
let decmp=""
|
||||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq
|
let doro = 0
|
||||||
|
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
|
||||||
|
setlocal bin
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
let w:tarfile= a:fname
|
|
||||||
exe "file tarfile:".fname
|
if exists("g:tar_secure")
|
||||||
|
let tar_secure= " -- "
|
||||||
|
else
|
||||||
|
let tar_secure= " "
|
||||||
|
endif
|
||||||
|
if tarfile =~# '\.bz2$'
|
||||||
|
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||||
|
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||||
|
elseif tarfile =~# '\.\(gz\|tgz\)$'
|
||||||
|
" call Decho("5: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd.' -'.g:tar_readoptions.' - '.tar_secure.shellescape(fname,1))
|
||||||
|
exe "silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||||
|
elseif tarfile =~# '\.lrp$'
|
||||||
|
" call Decho("6: exe silent r! cat ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||||
|
exe "silent r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||||
|
elseif tarfile =~# '\.lzma$'
|
||||||
|
" call Decho("7: exe silent r! lzma -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||||
|
exe "silent r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||||
|
elseif tarfile =~# '\.\(xz\|txz\)$'
|
||||||
|
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||||
|
exe "silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||||
|
else
|
||||||
|
if tarfile =~ '^\s*-'
|
||||||
|
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
|
||||||
|
let tarfile = substitute(tarfile, '-', './-', '')
|
||||||
|
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
|
||||||
|
endif
|
||||||
|
|
||||||
|
if doro
|
||||||
|
" because the reverse process of compressing changed files back into the tarball is not currently supported
|
||||||
|
setlocal ro
|
||||||
|
endif
|
||||||
|
|
||||||
|
let b:tarfile= a:fname
|
||||||
|
exe "file tarfile::".fnameescape(fname)
|
||||||
|
|
||||||
" cleanup
|
" cleanup
|
||||||
0d
|
0d
|
||||||
set nomod
|
set nomod
|
||||||
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Read : w:tarfile<".w:tarfile.">")
|
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" tar#Write: {{{2
|
" tar#Write: {{{2
|
||||||
fun! tar#Write(fname)
|
fun! tar#Write(fname)
|
||||||
" call Dfunc("tar#Write(fname<".a:fname.">) w:tarfile<".w:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
|
" call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
|
||||||
let repkeep= &report
|
let repkeep= &report
|
||||||
set report=10
|
set report=10
|
||||||
|
|
||||||
|
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
|
||||||
|
redraw!
|
||||||
|
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
|
||||||
|
" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
" sanity checks
|
" sanity checks
|
||||||
if !executable(g:tar_cmd)
|
if !executable(g:tar_cmd)
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Write")
|
" call Dret("tar#Write")
|
||||||
return
|
return
|
||||||
@@ -234,7 +349,6 @@ fun! tar#Write(fname)
|
|||||||
if !exists("*mkdir")
|
if !exists("*mkdir")
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Write")
|
" call Dret("tar#Write")
|
||||||
return
|
return
|
||||||
@@ -251,11 +365,10 @@ fun! tar#Write(fname)
|
|||||||
|
|
||||||
" attempt to change to the indicated directory
|
" attempt to change to the indicated directory
|
||||||
try
|
try
|
||||||
exe "cd ".escape(tmpdir,' \')
|
exe "cd ".fnameescape(tmpdir)
|
||||||
catch /^Vim\%((\a\+)\)\=:E344/
|
catch /^Vim\%((\a\+)\)\=:E344/
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
|
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
" call Dret("tar#Write")
|
" call Dret("tar#Write")
|
||||||
return
|
return
|
||||||
@@ -270,29 +383,42 @@ fun! tar#Write(fname)
|
|||||||
cd _ZIPVIM_
|
cd _ZIPVIM_
|
||||||
" call Decho("current directory now: ".getcwd())
|
" call Decho("current directory now: ".getcwd())
|
||||||
|
|
||||||
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','')
|
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||||
let fname = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','')
|
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||||
|
|
||||||
" handle compressed archives
|
" handle compressed archives
|
||||||
if tarfile =~# '\.gz'
|
if tarfile =~# '\.bz2'
|
||||||
call system("gzip -d ".tarfile)
|
call system("bzip2 -d -- ".shellescape(tarfile,0))
|
||||||
let tarfile = substitute(tarfile,'\.gz','','e')
|
|
||||||
let compress= "gzip '".tarfile."'"
|
|
||||||
elseif tarfile =~# '\.tgz'
|
|
||||||
call system("gzip -d ".tarfile)
|
|
||||||
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
|
|
||||||
let compress= "gzip '".tarfile."'"
|
|
||||||
let tgz = 1
|
|
||||||
elseif tarfile =~# '\.bz2'
|
|
||||||
call system("bzip2 -d ".tarfile)
|
|
||||||
let tarfile = substitute(tarfile,'\.bz2','','e')
|
let tarfile = substitute(tarfile,'\.bz2','','e')
|
||||||
let compress= "bzip2 '".tarfile."'"
|
let compress= "bzip2 -- ".shellescape(tarfile,0)
|
||||||
|
" call Decho("compress<".compress.">")
|
||||||
|
elseif tarfile =~# '\.gz'
|
||||||
|
call system("gzip -d -- ".shellescape(tarfile,0))
|
||||||
|
let tarfile = substitute(tarfile,'\.gz','','e')
|
||||||
|
let compress= "gzip -- ".shellescape(tarfile,0)
|
||||||
|
" call Decho("compress<".compress.">")
|
||||||
|
elseif tarfile =~# '\.tgz'
|
||||||
|
call system("gzip -d -- ".shellescape(tarfile,0))
|
||||||
|
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
|
||||||
|
let compress= "gzip -- ".shellescape(tarfile,0)
|
||||||
|
let tgz = 1
|
||||||
|
" call Decho("compress<".compress.">")
|
||||||
|
elseif tarfile =~# '\.xz'
|
||||||
|
call system("xz -d -- ".shellescape(tarfile,0))
|
||||||
|
let tarfile = substitute(tarfile,'\.xz','','e')
|
||||||
|
let compress= "xz -- ".shellescape(tarfile,0)
|
||||||
|
" call Decho("compress<".compress.">")
|
||||||
|
elseif tarfile =~# '\.lzma'
|
||||||
|
call system("lzma -d -- ".shellescape(tarfile,0))
|
||||||
|
let tarfile = substitute(tarfile,'\.lzma','','e')
|
||||||
|
let compress= "lzma -- ".shellescape(tarfile,0)
|
||||||
|
" call Decho("compress<".compress.">")
|
||||||
endif
|
endif
|
||||||
|
" call Decho("tarfile<".tarfile.">")
|
||||||
|
|
||||||
if v:shell_error != 0
|
if v:shell_error != 0
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
else
|
else
|
||||||
|
|
||||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||||
@@ -300,36 +426,43 @@ fun! tar#Write(fname)
|
|||||||
if fname =~ '/'
|
if fname =~ '/'
|
||||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||||
if executable("cygpath")
|
if executable("cygpath")
|
||||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
let dirpath = substitute(system("cygpath ".shellescape(dirpath, 0)),'\n','','e')
|
||||||
endif
|
endif
|
||||||
call mkdir(dirpath,"p")
|
call mkdir(dirpath,"p")
|
||||||
endif
|
endif
|
||||||
if tarfile !~ '/'
|
if tarfile !~ '/'
|
||||||
let tarfile= curdir.'/'.tarfile
|
let tarfile= curdir.'/'.tarfile
|
||||||
endif
|
endif
|
||||||
|
if tarfile =~ '^\s*-'
|
||||||
|
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
|
||||||
|
let tarfile = substitute(tarfile, '-', './-', '')
|
||||||
|
endif
|
||||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||||
|
|
||||||
exe "w! ".fname
|
if exists("g:tar_secure")
|
||||||
|
let tar_secure= " -- "
|
||||||
|
else
|
||||||
|
let tar_secure= " "
|
||||||
|
endif
|
||||||
|
exe "w! ".fnameescape(fname)
|
||||||
if executable("cygpath")
|
if executable("cygpath")
|
||||||
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
|
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" delete old file from tarfile
|
" delete old file from tarfile
|
||||||
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
|
" call Decho("system(".g:tar_cmd." --delete -f ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
|
||||||
call system("tar --delete -f '".tarfile."' '".fname."'")
|
call system(g:tar_cmd." --delete -f ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||||
if v:shell_error != 0
|
if v:shell_error != 0
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
else
|
else
|
||||||
|
|
||||||
" update tarfile with new file
|
" update tarfile with new file
|
||||||
" call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
|
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||||
call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
|
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||||
if v:shell_error != 0
|
if v:shell_error != 0
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
|
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
|
||||||
elseif exists("compress")
|
elseif exists("compress")
|
||||||
" call Decho("call system(".compress.")")
|
" call Decho("call system(".compress.")")
|
||||||
call system(compress)
|
call system(compress)
|
||||||
@@ -345,13 +478,13 @@ fun! tar#Write(fname)
|
|||||||
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
|
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
|
||||||
let tblfile= s:tblfile_{winnr()}
|
let tblfile= s:tblfile_{winnr()}
|
||||||
1split|enew
|
1split|enew
|
||||||
let binkeep= &binary
|
let binkeep= &l:binary
|
||||||
let eikeep = &ei
|
let eikeep = &ei
|
||||||
set binary ei=all
|
set binary ei=all
|
||||||
exe "e! ".tarfile
|
exe "e! ".fnameescape(tarfile)
|
||||||
call netrw#NetWrite(tblfile)
|
call netrw#NetWrite(tblfile)
|
||||||
let &ei = eikeep
|
let &ei = eikeep
|
||||||
let &binary = binkeep
|
let &l:binary = binkeep
|
||||||
q!
|
q!
|
||||||
unlet s:tblfile_{winnr()}
|
unlet s:tblfile_{winnr()}
|
||||||
endif
|
endif
|
||||||
@@ -360,7 +493,7 @@ fun! tar#Write(fname)
|
|||||||
" cleanup and restore current directory
|
" cleanup and restore current directory
|
||||||
cd ..
|
cd ..
|
||||||
call s:Rmdir("_ZIPVIM_")
|
call s:Rmdir("_ZIPVIM_")
|
||||||
exe "cd ".escape(curdir,' \')
|
exe "cd ".fnameescape(curdir)
|
||||||
setlocal nomod
|
setlocal nomod
|
||||||
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
@@ -368,23 +501,99 @@ fun! tar#Write(fname)
|
|||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Rmdir: {{{2
|
" s:Rmdir: {{{2
|
||||||
fun! s:Rmdir(fname)
|
fun! s:Rmdir(fname)
|
||||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||||
if has("unix")
|
if has("unix")
|
||||||
call system("/bin/rm -rf ".a:fname)
|
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
|
||||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
if &shell =~? "sh$"
|
if &shell =~? "sh$"
|
||||||
call system("/bin/rm -rf ".a:fname)
|
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
|
||||||
else
|
else
|
||||||
call system("del /S ".a:fname)
|
call system("del /S ".shellescape(a:fname,0))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" call Dret("Rmdir")
|
" call Dret("Rmdir")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ------------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
|
" tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2
|
||||||
|
fun! tar#Vimuntar(...)
|
||||||
|
" call Dfunc("tar#Vimuntar() a:0=".a:0." a:1<".(exists("a:1")? a:1 : "-n/a-").">")
|
||||||
|
let tarball = expand("%")
|
||||||
|
" call Decho("tarball<".tarball.">")
|
||||||
|
let tarbase = substitute(tarball,'\..*$','','')
|
||||||
|
" call Decho("tarbase<".tarbase.">")
|
||||||
|
let tarhome = expand("%:p")
|
||||||
|
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
|
let tarhome= substitute(tarhome,'\\','/','g')
|
||||||
|
endif
|
||||||
|
let tarhome= substitute(tarhome,'/[^/]*$','','')
|
||||||
|
" call Decho("tarhome<".tarhome.">")
|
||||||
|
let tartail = expand("%:t")
|
||||||
|
" call Decho("tartail<".tartail.">")
|
||||||
|
let curdir = getcwd()
|
||||||
|
" call Decho("curdir <".curdir.">")
|
||||||
|
" set up vimhome
|
||||||
|
if a:0 > 0 && a:1 != ""
|
||||||
|
let vimhome= a:1
|
||||||
|
else
|
||||||
|
let vimhome= vimball#VimballHome()
|
||||||
|
endif
|
||||||
|
" call Decho("vimhome<".vimhome.">")
|
||||||
|
|
||||||
|
" call Decho("curdir<".curdir."> vimhome<".vimhome.">")
|
||||||
|
if simplify(curdir) != simplify(vimhome)
|
||||||
|
" copy (possibly compressed) tarball to .vim/vimfiles
|
||||||
|
" call Decho(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
|
||||||
|
call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
|
||||||
|
" call Decho("exe cd ".fnameescape(vimhome))
|
||||||
|
exe "cd ".fnameescape(vimhome)
|
||||||
|
endif
|
||||||
|
" call Decho("getcwd<".getcwd().">")
|
||||||
|
|
||||||
|
" if necessary, decompress the tarball; then, extract it
|
||||||
|
if tartail =~ '\.tgz'
|
||||||
|
if executable("gunzip")
|
||||||
|
silent exe "!gunzip ".shellescape(tartail)
|
||||||
|
elseif executable("gzip")
|
||||||
|
silent exe "!gzip -d ".shellescape(tartail)
|
||||||
|
else
|
||||||
|
echoerr "unable to decompress<".tartail."> on this sytem"
|
||||||
|
if simplify(curdir) != simplify(tarhome)
|
||||||
|
" remove decompressed tarball, restore directory
|
||||||
|
" call Decho("delete(".tartail.".tar)")
|
||||||
|
call delete(tartail.".tar")
|
||||||
|
" call Decho("exe cd ".fnameescape(curdir))
|
||||||
|
exe "cd ".fnameescape(curdir)
|
||||||
|
endif
|
||||||
|
" call Dret("tar#Vimuntar")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
call vimball#Decompress(tartail,0)
|
||||||
|
endif
|
||||||
|
let extractcmd= netrw#WinPath(g:tar_extractcmd)
|
||||||
|
" call Decho("system(".extractcmd." ".shellescape(tarbase.".tar").")")
|
||||||
|
call system(extractcmd." ".shellescape(tarbase.".tar"))
|
||||||
|
|
||||||
|
" set up help
|
||||||
|
if filereadable("doc/".tarbase.".txt")
|
||||||
|
" call Decho("exe helptags ".getcwd()."/doc")
|
||||||
|
exe "helptags ".getcwd()."/doc"
|
||||||
|
endif
|
||||||
|
|
||||||
|
if simplify(tarhome) != simplify(vimhome)
|
||||||
|
" remove decompressed tarball, restore directory
|
||||||
|
call delete(vimhome."/".tarbase.".tar")
|
||||||
|
exe "cd ".fnameescape(curdir)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" call Dret("tar#Vimuntar")
|
||||||
|
endfun
|
||||||
|
|
||||||
|
" =====================================================================
|
||||||
" Modelines And Restoration: {{{1
|
" Modelines And Restoration: {{{1
|
||||||
let &cpo= s:keepcpo
|
let &cpo= s:keepcpo
|
||||||
unlet s:keepcpo
|
unlet s:keepcpo
|
||||||
" vim:ts=8 fdm=marker
|
" vim:ts=8 fdm=marker
|
||||||
|
|||||||
743
runtime/autoload/tohtml.vim
Normal file
743
runtime/autoload/tohtml.vim
Normal file
@@ -0,0 +1,743 @@
|
|||||||
|
" Vim autoload file for the tohtml plugin.
|
||||||
|
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||||
|
" Last Change: 2011 Jan 05
|
||||||
|
"
|
||||||
|
" Additional contributors:
|
||||||
|
"
|
||||||
|
" Original by Bram Moolenaar <Bram@vim.org>
|
||||||
|
" Diff2HTML() added by Christian Brabandt <cb@256bit.org>
|
||||||
|
"
|
||||||
|
" See Mercurial change logs for more!
|
||||||
|
|
||||||
|
" this file uses line continuations
|
||||||
|
let s:cpo_sav = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
" Automatically find charsets from all encodings supported natively by Vim. With
|
||||||
|
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
|
||||||
|
" this. Let the user specify these however since they won't be supported on
|
||||||
|
" every system. TODO: how? g:html_charsets and g:html_encodings?
|
||||||
|
"
|
||||||
|
" Note, not all of Vim's supported encodings have a charset to use.
|
||||||
|
"
|
||||||
|
" Names in this list are from:
|
||||||
|
" http://www.iana.org/assignments/character-sets
|
||||||
|
" g:tohtml#encoding_to_charset: {{{
|
||||||
|
let g:tohtml#encoding_to_charset = {
|
||||||
|
\ 'latin1' : 'ISO-8859-1',
|
||||||
|
\ 'iso-8859-2' : 'ISO-8859-2',
|
||||||
|
\ 'iso-8859-3' : 'ISO-8859-3',
|
||||||
|
\ 'iso-8859-4' : 'ISO-8859-4',
|
||||||
|
\ 'iso-8859-5' : 'ISO-8859-5',
|
||||||
|
\ 'iso-8859-6' : 'ISO-8859-6',
|
||||||
|
\ 'iso-8859-7' : 'ISO-8859-7',
|
||||||
|
\ 'iso-8859-8' : 'ISO-8859-8',
|
||||||
|
\ 'iso-8859-9' : 'ISO-8859-9',
|
||||||
|
\ 'iso-8859-10' : '',
|
||||||
|
\ 'iso-8859-13' : 'ISO-8859-13',
|
||||||
|
\ 'iso-8859-14' : '',
|
||||||
|
\ 'iso-8859-15' : 'ISO-8859-15',
|
||||||
|
\ 'koi8-r' : 'KOI8-R',
|
||||||
|
\ 'koi8-u' : 'KOI8-U',
|
||||||
|
\ 'macroman' : 'macintosh',
|
||||||
|
\ 'cp437' : '',
|
||||||
|
\ 'cp775' : '',
|
||||||
|
\ 'cp850' : '',
|
||||||
|
\ 'cp852' : '',
|
||||||
|
\ 'cp855' : '',
|
||||||
|
\ 'cp857' : '',
|
||||||
|
\ 'cp860' : '',
|
||||||
|
\ 'cp861' : '',
|
||||||
|
\ 'cp862' : '',
|
||||||
|
\ 'cp863' : '',
|
||||||
|
\ 'cp865' : '',
|
||||||
|
\ 'cp866' : 'IBM866',
|
||||||
|
\ 'cp869' : '',
|
||||||
|
\ 'cp874' : '',
|
||||||
|
\ 'cp1250' : 'windows-1250',
|
||||||
|
\ 'cp1251' : 'windows-1251',
|
||||||
|
\ 'cp1253' : 'windows-1253',
|
||||||
|
\ 'cp1254' : 'windows-1254',
|
||||||
|
\ 'cp1255' : 'windows-1255',
|
||||||
|
\ 'cp1256' : 'windows-1256',
|
||||||
|
\ 'cp1257' : 'windows-1257',
|
||||||
|
\ 'cp1258' : 'windows-1258',
|
||||||
|
\ 'euc-jp' : 'EUC-JP',
|
||||||
|
\ 'sjis' : 'Shift_JIS',
|
||||||
|
\ 'cp932' : 'Shift_JIS',
|
||||||
|
\ 'cp949' : '',
|
||||||
|
\ 'euc-kr' : 'EUC-KR',
|
||||||
|
\ 'cp936' : 'GBK',
|
||||||
|
\ 'euc-cn' : 'GB2312',
|
||||||
|
\ 'big5' : 'Big5',
|
||||||
|
\ 'cp950' : 'Big5',
|
||||||
|
\ 'utf-8' : 'UTF-8',
|
||||||
|
\ 'ucs-2' : 'UTF-8',
|
||||||
|
\ 'ucs-2le' : 'UTF-8',
|
||||||
|
\ 'utf-16' : 'UTF-8',
|
||||||
|
\ 'utf-16le' : 'UTF-8',
|
||||||
|
\ 'ucs-4' : 'UTF-8',
|
||||||
|
\ 'ucs-4le' : 'UTF-8',
|
||||||
|
\ }
|
||||||
|
lockvar g:tohtml#encoding_to_charset
|
||||||
|
" Notes:
|
||||||
|
" 1. All UCS/UTF are converted to UTF-8 because it is much better supported
|
||||||
|
" 2. Any blank spaces are there because Vim supports it but at least one major
|
||||||
|
" web browser does not according to http://wiki.whatwg.org/wiki/Web_Encodings.
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
" Only automatically find encodings supported natively by Vim, let the user
|
||||||
|
" specify the encoding if it's not natively supported. This function is only
|
||||||
|
" used when the user specifies the charset, they better know what they are
|
||||||
|
" doing!
|
||||||
|
"
|
||||||
|
" Names in this list are from:
|
||||||
|
" http://www.iana.org/assignments/character-sets
|
||||||
|
" g:tohtml#charset_to_encoding: {{{
|
||||||
|
let g:tohtml#charset_to_encoding = {
|
||||||
|
\ 'iso_8859-1:1987' : 'latin1',
|
||||||
|
\ 'iso-ir-100' : 'latin1',
|
||||||
|
\ 'iso_8859-1' : 'latin1',
|
||||||
|
\ 'iso-8859-1' : 'latin1',
|
||||||
|
\ 'latin1' : 'latin1',
|
||||||
|
\ 'l1' : 'latin1',
|
||||||
|
\ 'ibm819' : 'latin1',
|
||||||
|
\ 'cp819' : 'latin1',
|
||||||
|
\ 'csisolatin1' : 'latin1',
|
||||||
|
\ 'iso_8859-2:1987' : 'iso-8859-2',
|
||||||
|
\ 'iso-ir-101' : 'iso-8859-2',
|
||||||
|
\ 'iso_8859-2' : 'iso-8859-2',
|
||||||
|
\ 'iso-8859-2' : 'iso-8859-2',
|
||||||
|
\ 'latin2' : 'iso-8859-2',
|
||||||
|
\ 'l2' : 'iso-8859-2',
|
||||||
|
\ 'csisolatin2' : 'iso-8859-2',
|
||||||
|
\ 'iso_8859-3:1988' : 'iso-8859-3',
|
||||||
|
\ 'iso-ir-109' : 'iso-8859-3',
|
||||||
|
\ 'iso_8859-3' : 'iso-8859-3',
|
||||||
|
\ 'iso-8859-3' : 'iso-8859-3',
|
||||||
|
\ 'latin3' : 'iso-8859-3',
|
||||||
|
\ 'l3' : 'iso-8859-3',
|
||||||
|
\ 'csisolatin3' : 'iso-8859-3',
|
||||||
|
\ 'iso_8859-4:1988' : 'iso-8859-4',
|
||||||
|
\ 'iso-ir-110' : 'iso-8859-4',
|
||||||
|
\ 'iso_8859-4' : 'iso-8859-4',
|
||||||
|
\ 'iso-8859-4' : 'iso-8859-4',
|
||||||
|
\ 'latin4' : 'iso-8859-4',
|
||||||
|
\ 'l4' : 'iso-8859-4',
|
||||||
|
\ 'csisolatin4' : 'iso-8859-4',
|
||||||
|
\ 'iso_8859-5:1988' : 'iso-8859-5',
|
||||||
|
\ 'iso-ir-144' : 'iso-8859-5',
|
||||||
|
\ 'iso_8859-5' : 'iso-8859-5',
|
||||||
|
\ 'iso-8859-5' : 'iso-8859-5',
|
||||||
|
\ 'cyrillic' : 'iso-8859-5',
|
||||||
|
\ 'csisolatincyrillic' : 'iso-8859-5',
|
||||||
|
\ 'iso_8859-6:1987' : 'iso-8859-6',
|
||||||
|
\ 'iso-ir-127' : 'iso-8859-6',
|
||||||
|
\ 'iso_8859-6' : 'iso-8859-6',
|
||||||
|
\ 'iso-8859-6' : 'iso-8859-6',
|
||||||
|
\ 'ecma-114' : 'iso-8859-6',
|
||||||
|
\ 'asmo-708' : 'iso-8859-6',
|
||||||
|
\ 'arabic' : 'iso-8859-6',
|
||||||
|
\ 'csisolatinarabic' : 'iso-8859-6',
|
||||||
|
\ 'iso_8859-7:1987' : 'iso-8859-7',
|
||||||
|
\ 'iso-ir-126' : 'iso-8859-7',
|
||||||
|
\ 'iso_8859-7' : 'iso-8859-7',
|
||||||
|
\ 'iso-8859-7' : 'iso-8859-7',
|
||||||
|
\ 'elot_928' : 'iso-8859-7',
|
||||||
|
\ 'ecma-118' : 'iso-8859-7',
|
||||||
|
\ 'greek' : 'iso-8859-7',
|
||||||
|
\ 'greek8' : 'iso-8859-7',
|
||||||
|
\ 'csisolatingreek' : 'iso-8859-7',
|
||||||
|
\ 'iso_8859-8:1988' : 'iso-8859-8',
|
||||||
|
\ 'iso-ir-138' : 'iso-8859-8',
|
||||||
|
\ 'iso_8859-8' : 'iso-8859-8',
|
||||||
|
\ 'iso-8859-8' : 'iso-8859-8',
|
||||||
|
\ 'hebrew' : 'iso-8859-8',
|
||||||
|
\ 'csisolatinhebrew' : 'iso-8859-8',
|
||||||
|
\ 'iso_8859-9:1989' : 'iso-8859-9',
|
||||||
|
\ 'iso-ir-148' : 'iso-8859-9',
|
||||||
|
\ 'iso_8859-9' : 'iso-8859-9',
|
||||||
|
\ 'iso-8859-9' : 'iso-8859-9',
|
||||||
|
\ 'latin5' : 'iso-8859-9',
|
||||||
|
\ 'l5' : 'iso-8859-9',
|
||||||
|
\ 'csisolatin5' : 'iso-8859-9',
|
||||||
|
\ 'iso-8859-10' : 'iso-8859-10',
|
||||||
|
\ 'iso-ir-157' : 'iso-8859-10',
|
||||||
|
\ 'l6' : 'iso-8859-10',
|
||||||
|
\ 'iso_8859-10:1992' : 'iso-8859-10',
|
||||||
|
\ 'csisolatin6' : 'iso-8859-10',
|
||||||
|
\ 'latin6' : 'iso-8859-10',
|
||||||
|
\ 'iso-8859-13' : 'iso-8859-13',
|
||||||
|
\ 'iso-8859-14' : 'iso-8859-14',
|
||||||
|
\ 'iso-ir-199' : 'iso-8859-14',
|
||||||
|
\ 'iso_8859-14:1998' : 'iso-8859-14',
|
||||||
|
\ 'iso_8859-14' : 'iso-8859-14',
|
||||||
|
\ 'latin8' : 'iso-8859-14',
|
||||||
|
\ 'iso-celtic' : 'iso-8859-14',
|
||||||
|
\ 'l8' : 'iso-8859-14',
|
||||||
|
\ 'iso-8859-15' : 'iso-8859-15',
|
||||||
|
\ 'iso_8859-15' : 'iso-8859-15',
|
||||||
|
\ 'latin-9' : 'iso-8859-15',
|
||||||
|
\ 'koi8-r' : 'koi8-r',
|
||||||
|
\ 'cskoi8r' : 'koi8-r',
|
||||||
|
\ 'koi8-u' : 'koi8-u',
|
||||||
|
\ 'macintosh' : 'macroman',
|
||||||
|
\ 'mac' : 'macroman',
|
||||||
|
\ 'csmacintosh' : 'macroman',
|
||||||
|
\ 'ibm437' : 'cp437',
|
||||||
|
\ 'cp437' : 'cp437',
|
||||||
|
\ '437' : 'cp437',
|
||||||
|
\ 'cspc8codepage437' : 'cp437',
|
||||||
|
\ 'ibm775' : 'cp775',
|
||||||
|
\ 'cp775' : 'cp775',
|
||||||
|
\ 'cspc775baltic' : 'cp775',
|
||||||
|
\ 'ibm850' : 'cp850',
|
||||||
|
\ 'cp850' : 'cp850',
|
||||||
|
\ '850' : 'cp850',
|
||||||
|
\ 'cspc850multilingual' : 'cp850',
|
||||||
|
\ 'ibm852' : 'cp852',
|
||||||
|
\ 'cp852' : 'cp852',
|
||||||
|
\ '852' : 'cp852',
|
||||||
|
\ 'cspcp852' : 'cp852',
|
||||||
|
\ 'ibm855' : 'cp855',
|
||||||
|
\ 'cp855' : 'cp855',
|
||||||
|
\ '855' : 'cp855',
|
||||||
|
\ 'csibm855' : 'cp855',
|
||||||
|
\ 'ibm857' : 'cp857',
|
||||||
|
\ 'cp857' : 'cp857',
|
||||||
|
\ '857' : 'cp857',
|
||||||
|
\ 'csibm857' : 'cp857',
|
||||||
|
\ 'ibm860' : 'cp860',
|
||||||
|
\ 'cp860' : 'cp860',
|
||||||
|
\ '860' : 'cp860',
|
||||||
|
\ 'csibm860' : 'cp860',
|
||||||
|
\ 'ibm861' : 'cp861',
|
||||||
|
\ 'cp861' : 'cp861',
|
||||||
|
\ '861' : 'cp861',
|
||||||
|
\ 'cp-is' : 'cp861',
|
||||||
|
\ 'csibm861' : 'cp861',
|
||||||
|
\ 'ibm862' : 'cp862',
|
||||||
|
\ 'cp862' : 'cp862',
|
||||||
|
\ '862' : 'cp862',
|
||||||
|
\ 'cspc862latinhebrew' : 'cp862',
|
||||||
|
\ 'ibm863' : 'cp863',
|
||||||
|
\ 'cp863' : 'cp863',
|
||||||
|
\ '863' : 'cp863',
|
||||||
|
\ 'csibm863' : 'cp863',
|
||||||
|
\ 'ibm865' : 'cp865',
|
||||||
|
\ 'cp865' : 'cp865',
|
||||||
|
\ '865' : 'cp865',
|
||||||
|
\ 'csibm865' : 'cp865',
|
||||||
|
\ 'ibm866' : 'cp866',
|
||||||
|
\ 'cp866' : 'cp866',
|
||||||
|
\ '866' : 'cp866',
|
||||||
|
\ 'csibm866' : 'cp866',
|
||||||
|
\ 'ibm869' : 'cp869',
|
||||||
|
\ 'cp869' : 'cp869',
|
||||||
|
\ '869' : 'cp869',
|
||||||
|
\ 'cp-gr' : 'cp869',
|
||||||
|
\ 'csibm869' : 'cp869',
|
||||||
|
\ 'windows-1250' : 'cp1250',
|
||||||
|
\ 'windows-1251' : 'cp1251',
|
||||||
|
\ 'windows-1253' : 'cp1253',
|
||||||
|
\ 'windows-1254' : 'cp1254',
|
||||||
|
\ 'windows-1255' : 'cp1255',
|
||||||
|
\ 'windows-1256' : 'cp1256',
|
||||||
|
\ 'windows-1257' : 'cp1257',
|
||||||
|
\ 'windows-1258' : 'cp1258',
|
||||||
|
\ 'extended_unix_code_packed_format_for_japanese' : 'euc-jp',
|
||||||
|
\ 'cseucpkdfmtjapanese' : 'euc-jp',
|
||||||
|
\ 'euc-jp' : 'euc-jp',
|
||||||
|
\ 'shift_jis' : 'sjis',
|
||||||
|
\ 'ms_kanji' : 'sjis',
|
||||||
|
\ 'sjis' : 'sjis',
|
||||||
|
\ 'csshiftjis' : 'sjis',
|
||||||
|
\ 'ibm-thai' : 'cp874',
|
||||||
|
\ 'csibmthai' : 'cp874',
|
||||||
|
\ 'ks_c_5601-1987' : 'cp949',
|
||||||
|
\ 'iso-ir-149' : 'cp949',
|
||||||
|
\ 'ks_c_5601-1989' : 'cp949',
|
||||||
|
\ 'ksc_5601' : 'cp949',
|
||||||
|
\ 'korean' : 'cp949',
|
||||||
|
\ 'csksc56011987' : 'cp949',
|
||||||
|
\ 'euc-kr' : 'euc-kr',
|
||||||
|
\ 'cseuckr' : 'euc-kr',
|
||||||
|
\ 'gbk' : 'cp936',
|
||||||
|
\ 'cp936' : 'cp936',
|
||||||
|
\ 'ms936' : 'cp936',
|
||||||
|
\ 'windows-936' : 'cp936',
|
||||||
|
\ 'gb_2312-80' : 'euc-cn',
|
||||||
|
\ 'iso-ir-58' : 'euc-cn',
|
||||||
|
\ 'chinese' : 'euc-cn',
|
||||||
|
\ 'csiso58gb231280' : 'euc-cn',
|
||||||
|
\ 'big5' : 'big5',
|
||||||
|
\ 'csbig5' : 'big5',
|
||||||
|
\ 'utf-8' : 'utf-8',
|
||||||
|
\ 'iso-10646-ucs-2' : 'ucs-2',
|
||||||
|
\ 'csunicode' : 'ucs-2',
|
||||||
|
\ 'utf-16' : 'utf-16',
|
||||||
|
\ 'utf-16be' : 'utf-16',
|
||||||
|
\ 'utf-16le' : 'utf-16le',
|
||||||
|
\ 'utf-32' : 'ucs-4',
|
||||||
|
\ 'utf-32be' : 'ucs-4',
|
||||||
|
\ 'utf-32le' : 'ucs-4le',
|
||||||
|
\ 'iso-10646-ucs-4' : 'ucs-4',
|
||||||
|
\ 'csucs4' : 'ucs-4'
|
||||||
|
\ }
|
||||||
|
lockvar g:tohtml#charset_to_encoding
|
||||||
|
"}}}
|
||||||
|
|
||||||
|
func! tohtml#Convert2HTML(line1, line2) "{{{
|
||||||
|
let s:settings = tohtml#GetUserSettings()
|
||||||
|
|
||||||
|
if !&diff || s:settings.diff_one_file "{{{
|
||||||
|
if a:line2 >= a:line1
|
||||||
|
let g:html_start_line = a:line1
|
||||||
|
let g:html_end_line = a:line2
|
||||||
|
else
|
||||||
|
let g:html_start_line = a:line2
|
||||||
|
let g:html_end_line = a:line1
|
||||||
|
endif
|
||||||
|
runtime syntax/2html.vim "}}}
|
||||||
|
else "{{{
|
||||||
|
let win_list = []
|
||||||
|
let buf_list = []
|
||||||
|
windo | if &diff | call add(win_list, winbufnr(0)) | endif
|
||||||
|
let s:settings.whole_filler = 1
|
||||||
|
let g:html_diff_win_num = 0
|
||||||
|
for window in win_list
|
||||||
|
" switch to the next buffer to convert
|
||||||
|
exe ":" . bufwinnr(window) . "wincmd w"
|
||||||
|
|
||||||
|
" figure out whether current charset and encoding will work, if not
|
||||||
|
" default to UTF-8
|
||||||
|
if !exists('g:html_use_encoding') &&
|
||||||
|
\ (&l:fileencoding!='' && &l:fileencoding!=s:settings.vim_encoding ||
|
||||||
|
\ &l:fileencoding=='' && &encoding!=s:settings.vim_encoding)
|
||||||
|
echohl WarningMsg
|
||||||
|
echomsg "TOhtml: mismatched file encodings in Diff buffers, using UTF-8"
|
||||||
|
echohl None
|
||||||
|
let s:settings.vim_encoding = 'utf-8'
|
||||||
|
let s:settings.encoding = 'UTF-8'
|
||||||
|
endif
|
||||||
|
|
||||||
|
" set up for diff-mode conversion
|
||||||
|
let g:html_start_line = 1
|
||||||
|
let g:html_end_line = line('$')
|
||||||
|
let g:html_diff_win_num += 1
|
||||||
|
|
||||||
|
" convert this file
|
||||||
|
runtime syntax/2html.vim
|
||||||
|
|
||||||
|
" remember the HTML buffer for later combination
|
||||||
|
call add(buf_list, bufnr('%'))
|
||||||
|
endfor
|
||||||
|
unlet g:html_diff_win_num
|
||||||
|
call tohtml#Diff2HTML(win_list, buf_list)
|
||||||
|
endif "}}}
|
||||||
|
|
||||||
|
unlet g:html_start_line
|
||||||
|
unlet g:html_end_line
|
||||||
|
unlet s:settings
|
||||||
|
endfunc "}}}
|
||||||
|
|
||||||
|
func! tohtml#Diff2HTML(win_list, buf_list) "{{{
|
||||||
|
let xml_line = ""
|
||||||
|
let tag_close = '>'
|
||||||
|
|
||||||
|
let s:old_paste = &paste
|
||||||
|
set paste
|
||||||
|
let s:old_magic = &magic
|
||||||
|
set magic
|
||||||
|
|
||||||
|
if s:settings.use_xhtml
|
||||||
|
if s:settings.encoding != ""
|
||||||
|
let xml_line = "<?xml version=\"1.0\" encoding=\"" . s:settings.encoding . "\"?>"
|
||||||
|
else
|
||||||
|
let xml_line = "<?xml version=\"1.0\"?>"
|
||||||
|
endif
|
||||||
|
let tag_close = ' />'
|
||||||
|
endif
|
||||||
|
|
||||||
|
let style = [s:settings.use_xhtml ? "" : '-->']
|
||||||
|
let body_line = ''
|
||||||
|
|
||||||
|
let html = []
|
||||||
|
if s:settings.use_xhtml
|
||||||
|
call add(html, xml_line)
|
||||||
|
endif
|
||||||
|
if s:settings.use_xhtml
|
||||||
|
call add(html, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">")
|
||||||
|
call add(html, '<html xmlns="http://www.w3.org/1999/xhtml">')
|
||||||
|
elseif s:settings.use_css && !s:settings.no_pre
|
||||||
|
call add(html, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">")
|
||||||
|
call add(html, '<html>')
|
||||||
|
else
|
||||||
|
call add(html, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"')
|
||||||
|
call add(html, ' "http://www.w3.org/TR/html4/loose.dtd">')
|
||||||
|
call add(html, '<html>')
|
||||||
|
endif
|
||||||
|
call add(html, '<head>')
|
||||||
|
|
||||||
|
" include encoding as close to the top as possible, but only if not already
|
||||||
|
" contained in XML information
|
||||||
|
if s:settings.encoding != "" && !s:settings.use_xhtml
|
||||||
|
call add(html, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . tag_close)
|
||||||
|
endif
|
||||||
|
|
||||||
|
call add(html, '<title>diff</title>')
|
||||||
|
call add(html, '<meta name="Generator" content="Vim/'.v:version/100.'.'.v:version%100.'"'.tag_close)
|
||||||
|
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
|
||||||
|
call add(html, '<meta name="settings" content="'.
|
||||||
|
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
|
||||||
|
\ '"'.tag_close)
|
||||||
|
|
||||||
|
call add(html, '</head>')
|
||||||
|
let body_line_num = len(html)
|
||||||
|
call add(html, '<body>')
|
||||||
|
call add(html, '<table border="1" width="100%">')
|
||||||
|
|
||||||
|
call add(html, '<tr>')
|
||||||
|
for buf in a:win_list
|
||||||
|
call add(html, '<th>'.bufname(buf).'</th>')
|
||||||
|
endfor
|
||||||
|
call add(html, '</tr><tr>')
|
||||||
|
|
||||||
|
let diff_style_start = 0
|
||||||
|
let insert_index = 0
|
||||||
|
|
||||||
|
for buf in a:buf_list
|
||||||
|
let temp = []
|
||||||
|
exe bufwinnr(buf) . 'wincmd w'
|
||||||
|
|
||||||
|
" If text is folded because of user foldmethod settings, etc. we don't want
|
||||||
|
" to act on everything in a fold by mistake.
|
||||||
|
setlocal nofoldenable
|
||||||
|
|
||||||
|
" When not using CSS or when using xhtml, the <body> line can be important.
|
||||||
|
" Assume it will be the same for all buffers and grab it from the first
|
||||||
|
" buffer. Similarly, need to grab the body end line as well.
|
||||||
|
if body_line == ''
|
||||||
|
1
|
||||||
|
call search('<body')
|
||||||
|
let body_line = getline('.')
|
||||||
|
$
|
||||||
|
call search('</body>', 'b')
|
||||||
|
let s:body_end_line = getline('.')
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Grab the style information. Some of this will be duplicated so only insert
|
||||||
|
" it if it's not already there. {{{
|
||||||
|
1
|
||||||
|
let style_start = search('^<style type="text/css">')
|
||||||
|
1
|
||||||
|
let style_end = search('^</style>')
|
||||||
|
if style_start > 0 && style_end > 0
|
||||||
|
let buf_styles = getline(style_start + 1, style_end - 1)
|
||||||
|
for a_style in buf_styles
|
||||||
|
if index(style, a_style) == -1
|
||||||
|
if diff_style_start == 0
|
||||||
|
if a_style =~ '\<Diff\(Change\|Text\|Add\|Delete\)'
|
||||||
|
let diff_style_start = len(style)-1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
call insert(style, a_style, insert_index)
|
||||||
|
let insert_index += 1
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endif " }}}
|
||||||
|
|
||||||
|
" everything new will get added before the diff styles so diff highlight
|
||||||
|
" properly overrides normal highlight
|
||||||
|
if diff_style_start != 0
|
||||||
|
let insert_index = diff_style_start
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Delete those parts that are not needed so
|
||||||
|
" we can include the rest into the resulting table
|
||||||
|
1,/^<body/d_
|
||||||
|
$
|
||||||
|
?</body>?,$d_
|
||||||
|
let temp = getline(1,'$')
|
||||||
|
" undo deletion of start and end part
|
||||||
|
" so we can later save the file as valid html
|
||||||
|
" TODO: restore using grabbed lines if undolevel is 1?
|
||||||
|
normal 2u
|
||||||
|
if s:settings.use_css
|
||||||
|
call add(html, '<td valign="top"><div>')
|
||||||
|
elseif s:settings.use_xhtml
|
||||||
|
call add(html, '<td nowrap="nowrap" valign="top"><div>')
|
||||||
|
else
|
||||||
|
call add(html, '<td nowrap valign="top"><div>')
|
||||||
|
endif
|
||||||
|
let html += temp
|
||||||
|
call add(html, '</div></td>')
|
||||||
|
|
||||||
|
" Close this buffer
|
||||||
|
" TODO: the comment above says we're going to allow saving the file
|
||||||
|
" later...but here we discard it?
|
||||||
|
quit!
|
||||||
|
endfor
|
||||||
|
|
||||||
|
let html[body_line_num] = body_line
|
||||||
|
|
||||||
|
call add(html, '</tr>')
|
||||||
|
call add(html, '</table>')
|
||||||
|
call add(html, s:body_end_line)
|
||||||
|
call add(html, '</html>')
|
||||||
|
|
||||||
|
let i = 1
|
||||||
|
let name = "Diff" . (s:settings.use_xhtml ? ".xhtml" : ".html")
|
||||||
|
" Find an unused file name if current file name is already in use
|
||||||
|
while filereadable(name)
|
||||||
|
let name = substitute(name, '\d*\.x\?html$', '', '') . i . '.' . fnamemodify(copy(name), ":t:e")
|
||||||
|
let i += 1
|
||||||
|
endwhile
|
||||||
|
exe "topleft new " . name
|
||||||
|
setlocal modifiable
|
||||||
|
|
||||||
|
" just in case some user autocmd creates content in the new buffer, make sure
|
||||||
|
" it is empty before proceeding
|
||||||
|
%d
|
||||||
|
|
||||||
|
" set the fileencoding to match the charset we'll be using
|
||||||
|
let &l:fileencoding=s:settings.vim_encoding
|
||||||
|
|
||||||
|
" According to http://www.w3.org/TR/html4/charset.html#doc-char-set, the byte
|
||||||
|
" order mark is highly recommend on the web when using multibyte encodings. But,
|
||||||
|
" it is not a good idea to include it on UTF-8 files. Otherwise, let Vim
|
||||||
|
" determine when it is actually inserted.
|
||||||
|
if s:settings.vim_encoding == 'utf-8'
|
||||||
|
setlocal nobomb
|
||||||
|
else
|
||||||
|
setlocal bomb
|
||||||
|
endif
|
||||||
|
|
||||||
|
call append(0, html)
|
||||||
|
|
||||||
|
if len(style) > 0
|
||||||
|
1
|
||||||
|
let style_start = search('^</head>')-1
|
||||||
|
|
||||||
|
" Insert javascript to toggle matching folds open and closed in all windows,
|
||||||
|
" if dynamic folding is active. {{{
|
||||||
|
if s:settings.dynamic_folds
|
||||||
|
call append(style_start, [
|
||||||
|
\ "<script type='text/javascript'>",
|
||||||
|
\ s:settings.use_xhtml ? '//<![CDATA[' : " <!--",
|
||||||
|
\ " function toggleFold(objID)",
|
||||||
|
\ " {",
|
||||||
|
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
|
||||||
|
\ " {",
|
||||||
|
\ " var fold;",
|
||||||
|
\ ' fold = document.getElementById("win"+win_num+objID);',
|
||||||
|
\ " if(fold.className == 'closed-fold')",
|
||||||
|
\ " {",
|
||||||
|
\ " fold.className = 'open-fold';",
|
||||||
|
\ " }",
|
||||||
|
\ " else if (fold.className == 'open-fold')",
|
||||||
|
\ " {",
|
||||||
|
\ " fold.className = 'closed-fold';",
|
||||||
|
\ " }",
|
||||||
|
\ " }",
|
||||||
|
\ " }",
|
||||||
|
\ s:settings.use_xhtml ? '//]]>' : " -->",
|
||||||
|
\ "</script>"
|
||||||
|
\ ])
|
||||||
|
endif "}}}
|
||||||
|
|
||||||
|
" Insert styles from all the generated html documents and additional styles
|
||||||
|
" for the table-based layout of the side-by-side diff. The diff should take
|
||||||
|
" up the full browser window (but not more), and be static in size,
|
||||||
|
" horizontally scrollable when the lines are too long. Otherwise, the diff
|
||||||
|
" is pretty useless for really long lines. {{{
|
||||||
|
if s:settings.use_css
|
||||||
|
call append(style_start,
|
||||||
|
\ ['<style type="text/css">']+
|
||||||
|
\ style+
|
||||||
|
\ [ s:settings.use_xhtml ? '' : '<!--',
|
||||||
|
\ 'table { table-layout: fixed; }',
|
||||||
|
\ 'html, body, table, tbody { width: 100%; margin: 0; padding: 0; }',
|
||||||
|
\ 'th, td { width: '.printf("%.1f",100.0/len(a:win_list)).'%; }',
|
||||||
|
\ 'td div { overflow: auto; }',
|
||||||
|
\ s:settings.use_xhtml ? '' : '-->',
|
||||||
|
\ '</style>'
|
||||||
|
\])
|
||||||
|
endif "}}}
|
||||||
|
endif
|
||||||
|
|
||||||
|
let &paste = s:old_paste
|
||||||
|
let &magic = s:old_magic
|
||||||
|
endfunc "}}}
|
||||||
|
|
||||||
|
" Gets a single user option and sets it in the passed-in Dict, or gives it the
|
||||||
|
" default value if the option doesn't actually exist.
|
||||||
|
func! tohtml#GetOption(settings, option, default) "{{{
|
||||||
|
if exists('g:html_'.a:option)
|
||||||
|
let a:settings[a:option] = g:html_{a:option}
|
||||||
|
else
|
||||||
|
let a:settings[a:option] = a:default
|
||||||
|
endif
|
||||||
|
endfunc "}}}
|
||||||
|
|
||||||
|
" returns a Dict containing the values of all user options for 2html, including
|
||||||
|
" default values for those not given an explicit value by the user. Discards the
|
||||||
|
" html_ prefix of the option for nicer looking code.
|
||||||
|
func! tohtml#GetUserSettings() "{{{
|
||||||
|
if exists('s:settings')
|
||||||
|
" just restore the known options if we've already retrieved them
|
||||||
|
return s:settings
|
||||||
|
else
|
||||||
|
" otherwise figure out which options are set
|
||||||
|
let user_settings = {}
|
||||||
|
|
||||||
|
" Define the correct option if the old option name exists and we haven't
|
||||||
|
" already defined the correct one. Maybe I'll put out a warnig message about
|
||||||
|
" this sometime and remove the old option entirely at some even later time,
|
||||||
|
" but for now just silently accept the old option.
|
||||||
|
if exists('g:use_xhtml') && !exists("g:html_use_xhtml")
|
||||||
|
let g:html_use_xhtml = g:use_xhtml
|
||||||
|
endif
|
||||||
|
|
||||||
|
" get current option settings with appropriate defaults {{{
|
||||||
|
call tohtml#GetOption(user_settings, 'no_progress', !has("statusline") )
|
||||||
|
call tohtml#GetOption(user_settings, 'diff_one_file', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'number_lines', &number )
|
||||||
|
call tohtml#GetOption(user_settings, 'use_css', 1 )
|
||||||
|
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'no_pre', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
|
||||||
|
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
" override those settings that need it {{{
|
||||||
|
|
||||||
|
" hover opening implies dynamic folding
|
||||||
|
if user_settings.hover_unfold
|
||||||
|
let user_settings.dynamic_folds = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" ignore folding overrides dynamic folding
|
||||||
|
if user_settings.ignore_folding && user_settings.dynamic_folds
|
||||||
|
let user_settings.dynamic_folds = 0
|
||||||
|
let user_settings.hover_unfold = 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
" dynamic folding with no foldcolumn implies hover opens
|
||||||
|
if user_settings.dynamic_folds && user_settings.no_foldcolumn
|
||||||
|
let user_settings.hover_unfold = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" dynamic folding implies css
|
||||||
|
if user_settings.dynamic_folds
|
||||||
|
let user_settings.use_css = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
" if we're not using CSS we cannot use a pre section because <font> tags
|
||||||
|
" aren't allowed inside a <pre> block
|
||||||
|
if !user_settings.use_css
|
||||||
|
let user_settings.no_pre = 1
|
||||||
|
endif "}}}
|
||||||
|
|
||||||
|
" set up expand_tabs option after all the overrides so we know the
|
||||||
|
" appropriate defaults {{{
|
||||||
|
if user_settings.no_pre == 0
|
||||||
|
call tohtml#GetOption(user_settings,
|
||||||
|
\ 'expand_tabs',
|
||||||
|
\ &expandtab || &ts != 8 || user_settings.number_lines ||
|
||||||
|
\ (user_settings.dynamic_folds && !user_settings.no_foldcolumn))
|
||||||
|
else
|
||||||
|
let user_settings.expand_tabs = 1
|
||||||
|
endif
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
if exists("g:html_use_encoding") "{{{
|
||||||
|
" user specified the desired MIME charset, figure out proper
|
||||||
|
" 'fileencoding' from it or warn the user if we cannot
|
||||||
|
let user_settings.encoding = g:html_use_encoding
|
||||||
|
let user_settings.vim_encoding = tohtml#EncodingFromCharset(g:html_use_encoding)
|
||||||
|
if user_settings.vim_encoding == ''
|
||||||
|
echohl WarningMsg
|
||||||
|
echomsg "TOhtml: file encoding for"
|
||||||
|
\ g:html_use_encoding
|
||||||
|
\ "unknown, please set 'fileencoding'"
|
||||||
|
echohl None
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" Figure out proper MIME charset from 'fileencoding' if possible
|
||||||
|
if &l:fileencoding != ''
|
||||||
|
let user_settings.vim_encoding = &l:fileencoding
|
||||||
|
call tohtml#CharsetFromEncoding(user_settings)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" else from 'encoding' if possible
|
||||||
|
if &l:fileencoding == '' || user_settings.encoding == ''
|
||||||
|
let user_settings.vim_encoding = &encoding
|
||||||
|
call tohtml#CharsetFromEncoding(user_settings)
|
||||||
|
endif
|
||||||
|
|
||||||
|
" else default to UTF-8 and warn user
|
||||||
|
if user_settings.encoding == ''
|
||||||
|
let user_settings.vim_encoding = 'utf-8'
|
||||||
|
let user_settings.encoding = 'UTF-8'
|
||||||
|
echohl WarningMsg
|
||||||
|
echomsg "TOhtml: couldn't determine MIME charset, using UTF-8"
|
||||||
|
echohl None
|
||||||
|
endif
|
||||||
|
endif "}}}
|
||||||
|
|
||||||
|
" TODO: font
|
||||||
|
|
||||||
|
return user_settings
|
||||||
|
endif
|
||||||
|
endfunc "}}}
|
||||||
|
|
||||||
|
" get the proper HTML charset name from a Vim encoding option.
|
||||||
|
function! tohtml#CharsetFromEncoding(settings) "{{{
|
||||||
|
let l:vim_encoding = a:settings.vim_encoding
|
||||||
|
if exists('g:html_charset_override') && has_key(g:html_charset_override, l:vim_encoding)
|
||||||
|
let a:settings.encoding = g:html_charset_override[l:vim_encoding]
|
||||||
|
else
|
||||||
|
if l:vim_encoding =~ '^8bit\|^2byte'
|
||||||
|
" 8bit- and 2byte- prefixes are to indicate encodings available on the
|
||||||
|
" system that Vim will convert with iconv(), look up just the encoding name,
|
||||||
|
" not Vim's prefix.
|
||||||
|
let l:vim_encoding = substitute(l:vim_encoding, '^8bit-\|^2byte-', '', '')
|
||||||
|
endif
|
||||||
|
if has_key(g:tohtml#encoding_to_charset, l:vim_encoding)
|
||||||
|
let a:settings.encoding = g:tohtml#encoding_to_charset[l:vim_encoding]
|
||||||
|
else
|
||||||
|
let a:settings.encoding = ""
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if a:settings.encoding != ""
|
||||||
|
let l:vim_encoding = tohtml#EncodingFromCharset(a:settings.encoding)
|
||||||
|
if l:vim_encoding != ""
|
||||||
|
" if the Vim encoding to HTML encoding conversion is set up (by default or
|
||||||
|
" by the user) to convert to a different encoding, we need to also change
|
||||||
|
" the Vim encoding of the new buffer
|
||||||
|
let a:settings.vim_encoding = l:vim_encoding
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfun "}}}
|
||||||
|
|
||||||
|
" Get the proper Vim encoding option setting from an HTML charset name.
|
||||||
|
function! tohtml#EncodingFromCharset(encoding) "{{{
|
||||||
|
if exists('g:html_encoding_override') && has_key(g:html_encoding_override, a:encoding)
|
||||||
|
return g:html_encoding_override[a:encoding]
|
||||||
|
elseif has_key(g:tohtml#charset_to_encoding, tolower(a:encoding))
|
||||||
|
return g:tohtml#charset_to_encoding[tolower(a:encoding)]
|
||||||
|
else
|
||||||
|
return ""
|
||||||
|
endif
|
||||||
|
endfun "}}}
|
||||||
|
|
||||||
|
let &cpo = s:cpo_sav
|
||||||
|
unlet s:cpo_sav
|
||||||
|
|
||||||
|
" Make sure any patches will probably use consistent indent
|
||||||
|
" vim: ts=8 sw=2 sts=2 noet fdm=marker
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
" vimball.vim : construct a file containing both paths and files
|
" vimball.vim : construct a file containing both paths and files
|
||||||
" Author: Charles E. Campbell, Jr.
|
" Author: Charles E. Campbell, Jr.
|
||||||
" Date: May 07, 2007
|
" Date: Apr 12, 2010
|
||||||
" Version: 22
|
" Version: 31
|
||||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||||
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
|
" Copyright: (c) 2004-2009 by Charles E. Campbell, Jr.
|
||||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||||
" (see |copyright|) except use "Vimball" instead of "Vim".
|
" (see |copyright|) except use "Vimball" instead of "Vim".
|
||||||
" No warranty, express or implied.
|
" No warranty, express or implied.
|
||||||
@@ -11,12 +11,19 @@
|
|||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Load Once: {{{1
|
" Load Once: {{{1
|
||||||
if &cp || exists("g:loaded_vimball") || v:version < 700
|
if &cp || exists("g:loaded_vimball")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let s:keepcpo = &cpo
|
let g:loaded_vimball = "v31"
|
||||||
let g:loaded_vimball = "v22"
|
if v:version < 702
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "***warning*** this version of vimball needs vim 7.2"
|
||||||
|
echohl Normal
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let s:keepcpo= &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
"DechoTabOn
|
||||||
|
|
||||||
" =====================================================================
|
" =====================================================================
|
||||||
" Constants: {{{1
|
" Constants: {{{1
|
||||||
@@ -24,6 +31,33 @@ if !exists("s:USAGE")
|
|||||||
let s:USAGE = 0
|
let s:USAGE = 0
|
||||||
let s:WARNING = 1
|
let s:WARNING = 1
|
||||||
let s:ERROR = 2
|
let s:ERROR = 2
|
||||||
|
|
||||||
|
" determine if cygwin is in use or not
|
||||||
|
if !exists("g:netrw_cygwin")
|
||||||
|
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||||
|
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||||
|
let g:netrw_cygwin= 1
|
||||||
|
else
|
||||||
|
let g:netrw_cygwin= 0
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let g:netrw_cygwin= 0
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
" set up g:vimball_mkdir if the mkdir() call isn't defined
|
||||||
|
if !exists("*mkdir")
|
||||||
|
if exists("g:netrw_local_mkdir")
|
||||||
|
let g:vimball_mkdir= g:netrw_local_mkdir
|
||||||
|
elseif executable("mkdir")
|
||||||
|
let g:vimball_mkdir= "mkdir"
|
||||||
|
elseif executable("makedir")
|
||||||
|
let g:vimball_mkdir= "makedir"
|
||||||
|
endif
|
||||||
|
if !exists(g:vimball_mkdir)
|
||||||
|
call vimball#ShowMesg(s:WARNING,"(vimball) g:vimball_mkdir undefined")
|
||||||
|
endif
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" =====================================================================
|
" =====================================================================
|
||||||
@@ -31,7 +65,12 @@ endif
|
|||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
|
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
|
||||||
" Vimball Format:
|
" Input:
|
||||||
|
" line1,line2: a range of lines containing paths to files to be included in the vimball
|
||||||
|
" writelevel : if true, force a write to filename.vba, even if it exists
|
||||||
|
" (usually accomplished with :MkVimball! ...
|
||||||
|
" filename : base name of file to be created (ie. filename.vba)
|
||||||
|
" Output: a filename.vba using vimball format:
|
||||||
" path
|
" path
|
||||||
" filesize
|
" filesize
|
||||||
" [file]
|
" [file]
|
||||||
@@ -40,7 +79,7 @@ endif
|
|||||||
" [file]
|
" [file]
|
||||||
fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
|
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
|
||||||
if a:1 =~ '.vim' || a:1 =~ '.txt'
|
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
|
||||||
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
|
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
|
||||||
else
|
else
|
||||||
let vbname= a:1
|
let vbname= a:1
|
||||||
@@ -49,8 +88,8 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
|||||||
let vbname= vbname.'.vba'
|
let vbname= vbname.'.vba'
|
||||||
endif
|
endif
|
||||||
" call Decho("vbname<".vbname.">")
|
" call Decho("vbname<".vbname.">")
|
||||||
if a:1 =~ '[\/]'
|
if !a:writelevel && a:1 =~ '[\/]'
|
||||||
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes")
|
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes; use ! to insist")
|
||||||
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
|
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@@ -61,14 +100,14 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" user option bypass
|
" user option bypass
|
||||||
call s:SaveSettings()
|
call vimball#SaveSettings()
|
||||||
|
|
||||||
if a:0 >= 2
|
if a:0 >= 2
|
||||||
" allow user to specify where to get the files
|
" allow user to specify where to get the files
|
||||||
let home= expand(a:2)
|
let home= expand(a:2)
|
||||||
else
|
else
|
||||||
" use first existing directory from rtp
|
" use first existing directory from rtp
|
||||||
let home= s:VimballHome()
|
let home= vimball#VimballHome()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" save current directory
|
" save current directory
|
||||||
@@ -87,7 +126,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
|||||||
if !filereadable(svfile)
|
if !filereadable(svfile)
|
||||||
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
|
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
|
||||||
call s:ChgDir(curdir)
|
call s:ChgDir(curdir)
|
||||||
call s:RestoreSettings()
|
call vimball#RestoreSettings()
|
||||||
" call Dret("MkVimball")
|
" call Dret("MkVimball")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
@@ -112,9 +151,8 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
|||||||
call setline(lastline+1,0)
|
call setline(lastline+1,0)
|
||||||
|
|
||||||
" write the file from the tab
|
" write the file from the tab
|
||||||
let svfilepath= s:Path(svfile,'')
|
" call Decho("exe $r ".fnameescape(svfile))
|
||||||
" call Decho("exe $r ".svfilepath)
|
exe "$r ".fnameescape(svfile)
|
||||||
exe "$r ".svfilepath
|
|
||||||
|
|
||||||
call setline(lastline+1,line("$") - lastline - 1)
|
call setline(lastline+1,line("$") - lastline - 1)
|
||||||
" call Decho("lastline=".lastline." line$=".line("$"))
|
" call Decho("lastline=".lastline." line$=".line("$"))
|
||||||
@@ -127,14 +165,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
|||||||
" write the vimball
|
" write the vimball
|
||||||
exe "tabn ".vbtabnr
|
exe "tabn ".vbtabnr
|
||||||
call s:ChgDir(curdir)
|
call s:ChgDir(curdir)
|
||||||
|
setlocal ff=unix
|
||||||
if a:writelevel
|
if a:writelevel
|
||||||
let vbnamepath= s:Path(vbname,'')
|
" call Decho("exe w! ".fnameescape(vbname))
|
||||||
" call Decho("exe w! ".vbnamepath)
|
exe "w! ".fnameescape(vbname)
|
||||||
exe "w! ".vbnamepath
|
|
||||||
else
|
else
|
||||||
let vbnamepath= s:Path(vbname,'')
|
" call Decho("exe w ".fnameescape(vbname))
|
||||||
" call Decho("exe w ".vbnamepath)
|
exe "w ".fnameescape(vbname)
|
||||||
exe "w ".vbnamepath
|
|
||||||
endif
|
endif
|
||||||
" call Decho("Vimball<".vbname."> created")
|
" call Decho("Vimball<".vbname."> created")
|
||||||
echo "Vimball<".vbname."> created"
|
echo "Vimball<".vbname."> created"
|
||||||
@@ -145,25 +182,34 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
|||||||
exe "tabc ".vbtabnr
|
exe "tabc ".vbtabnr
|
||||||
|
|
||||||
" restore options
|
" restore options
|
||||||
call s:RestoreSettings()
|
call vimball#RestoreSettings()
|
||||||
|
|
||||||
" call Dret("MkVimball")
|
" call Dret("MkVimball")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" vimball#Vimball: extract and distribute contents from a vimball {{{2
|
" vimball#Vimball: extract and distribute contents from a vimball {{{2
|
||||||
|
" (invoked the the UseVimball command embedded in
|
||||||
|
" vimballs' prologue)
|
||||||
fun! vimball#Vimball(really,...)
|
fun! vimball#Vimball(really,...)
|
||||||
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
||||||
|
|
||||||
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
|
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
|
||||||
|
echoerr "your vim is missing the fnameescape() function"
|
||||||
|
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
if getline(1) !~ '^" Vimball Archiver'
|
||||||
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
||||||
" call Dret("vimball#Vimball")
|
" call Dret("vimball#Vimball")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" set up standard settings
|
" set up standard settings
|
||||||
call s:SaveSettings()
|
call vimball#SaveSettings()
|
||||||
let curtabnr = tabpagenr()
|
let curtabnr = tabpagenr()
|
||||||
|
let vimballfile = expand("%:tr")
|
||||||
|
|
||||||
" set up vimball tab
|
" set up vimball tab
|
||||||
" call Decho("setting up vimball tab")
|
" call Decho("setting up vimball tab")
|
||||||
@@ -176,7 +222,7 @@ fun! vimball#Vimball(really,...)
|
|||||||
if a:0 > 0
|
if a:0 > 0
|
||||||
let home= expand(a:1)
|
let home= expand(a:1)
|
||||||
else
|
else
|
||||||
let home= s:VimballHome()
|
let home= vimball#VimballHome()
|
||||||
endif
|
endif
|
||||||
" call Decho("home<".home.">")
|
" call Decho("home<".home.">")
|
||||||
|
|
||||||
@@ -186,16 +232,18 @@ fun! vimball#Vimball(really,...)
|
|||||||
" call Decho("curdir<".curdir.">")
|
" call Decho("curdir<".curdir.">")
|
||||||
|
|
||||||
call s:ChgDir(home)
|
call s:ChgDir(home)
|
||||||
call vimball#RmVimball()
|
let s:ok_unablefind= 1
|
||||||
|
call vimball#RmVimball(vimballfile)
|
||||||
|
unlet s:ok_unablefind
|
||||||
|
|
||||||
let linenr = 4
|
let linenr = 4
|
||||||
let filecnt = 0
|
let filecnt = 0
|
||||||
|
|
||||||
" give title to listing of (extracted) files from Vimball Archive
|
" give title to listing of (extracted) files from Vimball Archive
|
||||||
if a:really
|
if a:really
|
||||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||||
else
|
else
|
||||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||||
echohl Statement | echomsg "files would be placed under: ".home | echohl None
|
echohl Statement | echomsg "files would be placed under: ".home | echohl None
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -206,7 +254,9 @@ fun! vimball#Vimball(really,...)
|
|||||||
while 1 < linenr && linenr < line("$")
|
while 1 < linenr && linenr < line("$")
|
||||||
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
||||||
let fname = substitute(fname,'\\','/','g')
|
let fname = substitute(fname,'\\','/','g')
|
||||||
let fsize = getline(linenr+1)
|
" let fsize = getline(linenr+1)+0
|
||||||
|
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
|
||||||
|
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\+\)$','\1','')
|
||||||
let filecnt = filecnt + 1
|
let filecnt = filecnt + 1
|
||||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
|
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
|
||||||
|
|
||||||
@@ -219,10 +269,10 @@ fun! vimball#Vimball(really,...)
|
|||||||
" call Decho("using L#".(linenr+1).": fsize=".fsize)
|
" call Decho("using L#".(linenr+1).": fsize=".fsize)
|
||||||
|
|
||||||
" Allow AsNeeded/ directory to take place of plugin/ directory
|
" Allow AsNeeded/ directory to take place of plugin/ directory
|
||||||
" when AsNeeded/filename is filereadable
|
" when AsNeeded/filename is filereadable or was present in VimballRecord
|
||||||
if fname =~ '\<plugin/'
|
if fname =~ '\<plugin/'
|
||||||
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
||||||
if filereadable(anfname)
|
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
|
||||||
" call Decho("using anfname<".anfname."> instead of <".fname.">")
|
" call Decho("using anfname<".anfname."> instead of <".fname.">")
|
||||||
let fname= anfname
|
let fname= anfname
|
||||||
endif
|
endif
|
||||||
@@ -240,7 +290,11 @@ fun! vimball#Vimball(really,...)
|
|||||||
" call Decho("dirname<".dirname.">")
|
" call Decho("dirname<".dirname.">")
|
||||||
if !isdirectory(dirname)
|
if !isdirectory(dirname)
|
||||||
" call Decho("making <".dirname.">")
|
" call Decho("making <".dirname.">")
|
||||||
call mkdir(dirname)
|
if exists("g:vimball_mkdir")
|
||||||
|
call system(g:vimball_mkdir." ".shellescape(dirname))
|
||||||
|
else
|
||||||
|
call mkdir(dirname)
|
||||||
|
endif
|
||||||
call s:RecordInVar(home,"rmdir('".dirname."')")
|
call s:RecordInVar(home,"rmdir('".dirname."')")
|
||||||
endif
|
endif
|
||||||
endwhile
|
endwhile
|
||||||
@@ -257,6 +311,7 @@ fun! vimball#Vimball(really,...)
|
|||||||
" copy "a" buffer into tab
|
" copy "a" buffer into tab
|
||||||
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
||||||
exe "tabn ".vbtabnr
|
exe "tabn ".vbtabnr
|
||||||
|
setlocal ma
|
||||||
silent! %d
|
silent! %d
|
||||||
silent put a
|
silent put a
|
||||||
1
|
1
|
||||||
@@ -264,10 +319,14 @@ fun! vimball#Vimball(really,...)
|
|||||||
|
|
||||||
" write tab to file
|
" write tab to file
|
||||||
if a:really
|
if a:really
|
||||||
let fnamepath= s:Path(home."/".fname,'')
|
let fnamepath= home."/".fname
|
||||||
" call Decho("exe w! ".fnamepath)
|
" call Decho("exe w! ".fnameescape(fnamepath))
|
||||||
exe "silent w! ".fnamepath
|
if fenc != ""
|
||||||
echo "wrote ".fnamepath
|
exe "silent w! ++enc=".fnameescape(fenc)." ".fnameescape(fnamepath)
|
||||||
|
else
|
||||||
|
exe "silent w! ".fnameescape(fnamepath)
|
||||||
|
endif
|
||||||
|
echo "wrote ".fnameescape(fnamepath)
|
||||||
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -277,23 +336,22 @@ fun! vimball#Vimball(really,...)
|
|||||||
|
|
||||||
" set up help if its a doc/*.txt file
|
" set up help if its a doc/*.txt file
|
||||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
|
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
|
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||||
" call Decho("didhelp<".didhelp.">")
|
" call Decho("didhelp<".didhelp.">")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" update for next file
|
" update for next file
|
||||||
" let oldlinenr = linenr " Decho
|
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
|
||||||
let linenr = linenr + fsize
|
let linenr= linenr + fsize
|
||||||
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] = ".linenr)
|
|
||||||
endwhile
|
endwhile
|
||||||
|
|
||||||
" set up help
|
" set up help
|
||||||
" call Decho("about to set up help: didhelp<".didhelp.">")
|
" call Decho("about to set up help: didhelp<".didhelp.">")
|
||||||
if didhelp != ""
|
if didhelp != ""
|
||||||
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
|
let htpath= home."/".didhelp
|
||||||
" call Decho("exe helptags ".htpath)
|
" call Decho("exe helptags ".htpath)
|
||||||
exe "helptags ".htpath
|
exe "helptags ".fnameescape(htpath)
|
||||||
echo "did helptags"
|
echo "did helptags"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -311,7 +369,7 @@ fun! vimball#Vimball(really,...)
|
|||||||
setlocal nomod bh=wipe
|
setlocal nomod bh=wipe
|
||||||
exe "tabn ".curtabnr
|
exe "tabn ".curtabnr
|
||||||
exe "tabc ".vbtabnr
|
exe "tabc ".vbtabnr
|
||||||
call s:RestoreSettings()
|
call vimball#RestoreSettings()
|
||||||
call s:ChgDir(curdir)
|
call s:ChgDir(curdir)
|
||||||
|
|
||||||
" call Dret("vimball#Vimball")
|
" call Dret("vimball#Vimball")
|
||||||
@@ -329,12 +387,10 @@ fun! vimball#RmVimball(...)
|
|||||||
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
|
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let eikeep= &ei
|
|
||||||
set ei=all
|
|
||||||
" call Decho("turned off all events")
|
|
||||||
|
|
||||||
if a:0 == 0
|
if a:0 == 0
|
||||||
let curfile= '^'.expand("%:tr")
|
let curfile= expand("%:tr")
|
||||||
|
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
|
||||||
else
|
else
|
||||||
if a:1 =~ '[\/]'
|
if a:1 =~ '[\/]'
|
||||||
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
|
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
|
||||||
@@ -342,16 +398,15 @@ fun! vimball#RmVimball(...)
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
let curfile= a:1
|
let curfile= a:1
|
||||||
|
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
|
||||||
endif
|
endif
|
||||||
if curfile !~ '.vba$'
|
if curfile =~ '\.vba$'
|
||||||
let curfile= curfile.".vba: "
|
let curfile= substitute(curfile,'\.vba','','')
|
||||||
else
|
|
||||||
let curfile= curfile.": "
|
|
||||||
endif
|
endif
|
||||||
if a:0 >= 2
|
if a:0 >= 2
|
||||||
let home= expand(a:2)
|
let home= expand(a:2)
|
||||||
else
|
else
|
||||||
let home= s:VimballHome()
|
let home= vimball#VimballHome()
|
||||||
endif
|
endif
|
||||||
let curdir = getcwd()
|
let curdir = getcwd()
|
||||||
" call Decho("home <".home.">")
|
" call Decho("home <".home.">")
|
||||||
@@ -365,13 +420,35 @@ fun! vimball#RmVimball(...)
|
|||||||
keepalt keepjumps 1split
|
keepalt keepjumps 1split
|
||||||
silent! keepalt keepjumps e .VimballRecord
|
silent! keepalt keepjumps e .VimballRecord
|
||||||
let keepsrch= @/
|
let keepsrch= @/
|
||||||
if search(curfile,'cw')
|
" call Decho('search for ^\M'.curfile.'.\m: ')
|
||||||
let exestring= substitute(getline("."),curfile,'','')
|
" call Decho('search for ^\M'.curfile.'.\mvba: ')
|
||||||
|
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.vba: ')
|
||||||
|
if search('^\M'.curfile."\m: ".'cw')
|
||||||
|
let foundit= 1
|
||||||
|
elseif search('^\M'.curfile.".\mvba: ",'cw')
|
||||||
|
let foundit= 1
|
||||||
|
elseif search('^\M'.curfile.'\m[-0-9.]*\.vba: ','cw')
|
||||||
|
let foundit= 1
|
||||||
|
else
|
||||||
|
let foundit = 0
|
||||||
|
endif
|
||||||
|
if foundit
|
||||||
|
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||||
|
let s:VBRstring= substitute(exestring,'call delete(','','g')
|
||||||
|
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
|
||||||
" call Decho("exe ".exestring)
|
" call Decho("exe ".exestring)
|
||||||
silent! keepalt keepjumps exe exestring
|
silent! keepalt keepjumps exe exestring
|
||||||
silent! keepalt keepjumps d
|
silent! keepalt keepjumps d
|
||||||
|
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
|
||||||
|
" call Decho("exestring<".exestring.">")
|
||||||
|
echomsg "removed ".exestring." files"
|
||||||
else
|
else
|
||||||
" call Decho("unable to find <".curfile."> in .VimballRecord")
|
let s:VBRstring= ''
|
||||||
|
let curfile = substitute(curfile,'\.vba','','')
|
||||||
|
" call Decho("unable to find <".curfile."> in .VimballRecord")
|
||||||
|
if !exists("s:ok_unablefind")
|
||||||
|
call vimball#ShowMesg(s:WARNING,"(RmVimball) unable to find <".curfile."> in .VimballRecord")
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
silent! keepalt keepjumps g/^\s*$/d
|
silent! keepalt keepjumps g/^\s*$/d
|
||||||
silent! keepalt keepjumps wq!
|
silent! keepalt keepjumps wq!
|
||||||
@@ -379,36 +456,67 @@ fun! vimball#RmVimball(...)
|
|||||||
endif
|
endif
|
||||||
call s:ChgDir(curdir)
|
call s:ChgDir(curdir)
|
||||||
|
|
||||||
" restoring events
|
|
||||||
" call Decho("restoring events")
|
|
||||||
let &ei= eikeep
|
|
||||||
|
|
||||||
" call Dret("vimball#RmVimball")
|
" call Dret("vimball#RmVimball")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" vimball#Decompress: attempts to automatically decompress vimballs {{{2
|
" vimball#Decompress: attempts to automatically decompress vimballs {{{2
|
||||||
fun! vimball#Decompress(fname)
|
fun! vimball#Decompress(fname,...)
|
||||||
" call Dfunc("Decompress(fname<".a:fname.">)")
|
" call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0)
|
||||||
|
|
||||||
" decompression:
|
" decompression:
|
||||||
if expand("%") =~ '.*\.gz' && executable("gunzip")
|
if expand("%") =~ '.*\.gz' && executable("gunzip")
|
||||||
exe "!gunzip ".a:fname
|
" handle *.gz with gunzip
|
||||||
|
silent exe "!gunzip ".shellescape(a:fname)
|
||||||
|
if v:shell_error != 0
|
||||||
|
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) gunzip may have failed with <".a:fname.">")
|
||||||
|
endif
|
||||||
let fname= substitute(a:fname,'\.gz$','','')
|
let fname= substitute(a:fname,'\.gz$','','')
|
||||||
exe "e ".escape(fname,' \')
|
exe "e ".escape(fname,' \')
|
||||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||||
|
|
||||||
|
elseif expand("%") =~ '.*\.gz' && executable("gzip")
|
||||||
|
" handle *.gz with gzip -d
|
||||||
|
silent exe "!gzip -d ".shellescape(a:fname)
|
||||||
|
if v:shell_error != 0
|
||||||
|
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "gzip -d" may have failed with <'.a:fname.">")
|
||||||
|
endif
|
||||||
|
let fname= substitute(a:fname,'\.gz$','','')
|
||||||
|
exe "e ".escape(fname,' \')
|
||||||
|
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||||
|
|
||||||
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
|
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
|
||||||
exe "!bunzip2 ".a:fname
|
" handle *.bz2 with bunzip2
|
||||||
|
silent exe "!bunzip2 ".shellescape(a:fname)
|
||||||
|
if v:shell_error != 0
|
||||||
|
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip2 may have failed with <".a:fname.">")
|
||||||
|
endif
|
||||||
let fname= substitute(a:fname,'\.bz2$','','')
|
let fname= substitute(a:fname,'\.bz2$','','')
|
||||||
exe "e ".escape(fname,' \')
|
exe "e ".escape(fname,' \')
|
||||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||||
|
|
||||||
|
elseif expand("%") =~ '.*\.bz2' && executable("bzip2")
|
||||||
|
" handle *.bz2 with bzip2 -d
|
||||||
|
silent exe "!bzip2 -d ".shellescape(a:fname)
|
||||||
|
if v:shell_error != 0
|
||||||
|
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip2 -d" may have failed with <'.a:fname.">")
|
||||||
|
endif
|
||||||
|
let fname= substitute(a:fname,'\.bz2$','','')
|
||||||
|
exe "e ".escape(fname,' \')
|
||||||
|
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||||
|
|
||||||
elseif expand("%") =~ '.*\.zip' && executable("unzip")
|
elseif expand("%") =~ '.*\.zip' && executable("unzip")
|
||||||
exe "!unzip ".a:fname
|
" handle *.zip with unzip
|
||||||
|
silent exe "!unzip ".shellescape(a:fname)
|
||||||
|
if v:shell_error != 0
|
||||||
|
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) unzip may have failed with <".a:fname.">")
|
||||||
|
endif
|
||||||
let fname= substitute(a:fname,'\.zip$','','')
|
let fname= substitute(a:fname,'\.zip$','','')
|
||||||
exe "e ".escape(fname,' \')
|
exe "e ".escape(fname,' \')
|
||||||
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
|
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
|
||||||
endif
|
endif
|
||||||
set noma bt=nofile fmr=[[[,]]] fdm=marker
|
|
||||||
|
if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif
|
||||||
|
|
||||||
" call Dret("Decompress")
|
" call Dret("Decompress")
|
||||||
endfun
|
endfun
|
||||||
@@ -417,20 +525,21 @@ endfun
|
|||||||
" vimball#ShowMesg: {{{2
|
" vimball#ShowMesg: {{{2
|
||||||
fun! vimball#ShowMesg(level,msg)
|
fun! vimball#ShowMesg(level,msg)
|
||||||
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
|
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
|
||||||
|
|
||||||
let rulerkeep = &ruler
|
let rulerkeep = &ruler
|
||||||
let showcmdkeep = &showcmd
|
let showcmdkeep = &showcmd
|
||||||
set noruler noshowcmd
|
set noruler noshowcmd
|
||||||
redraw!
|
redraw!
|
||||||
|
|
||||||
if &fo =~ '[ta]'
|
if &fo =~ '[ta]'
|
||||||
echomsg "***vimball*** " a:msg
|
echomsg "***vimball*** ".a:msg
|
||||||
else
|
else
|
||||||
if a:level == s:WARNING || a:level == s:USAGE
|
if a:level == s:WARNING || a:level == s:USAGE
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
elseif a:level == s:ERROR
|
elseif a:level == s:ERROR
|
||||||
echohl Error
|
echohl Error
|
||||||
endif
|
endif
|
||||||
echomsg "***vimball*** " a:msg
|
echomsg "***vimball*** ".a:msg
|
||||||
echohl None
|
echohl None
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -443,36 +552,16 @@ fun! vimball#ShowMesg(level,msg)
|
|||||||
|
|
||||||
" call Dret("vimball#ShowMesg")
|
" call Dret("vimball#ShowMesg")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
let &cpo= s:keepcpo
|
|
||||||
unlet s:keepcpo
|
|
||||||
" =====================================================================
|
" =====================================================================
|
||||||
" s:ChgDir: change directory (in spite of Windoze) {{{2
|
" s:ChgDir: change directory (in spite of Windoze) {{{2
|
||||||
fun! s:ChgDir(newdir)
|
fun! s:ChgDir(newdir)
|
||||||
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
||||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||||
exe 'silent cd '.escape(substitute(a:newdir,'/','\\','g'),' ')
|
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
|
||||||
else
|
else
|
||||||
exe 'silent cd '.escape(a:newdir,' ')
|
exe 'silent cd '.fnameescape(a:newdir)
|
||||||
endif
|
endif
|
||||||
" call Dret("ChgDir")
|
" call Dret("ChgDir : curdir<".getcwd().">")
|
||||||
endfun
|
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
" s:Path: prepend and append quotes, do escaping, as necessary {{{2
|
|
||||||
fun! s:Path(cmd,quote)
|
|
||||||
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
|
|
||||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
|
||||||
let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
|
|
||||||
else
|
|
||||||
let cmdpath= a:quote.a:cmd.a:quote
|
|
||||||
endif
|
|
||||||
if a:quote == ""
|
|
||||||
let cmdpath= escape(cmdpath,' ')
|
|
||||||
endif
|
|
||||||
" call Dret("Path <".cmdpath.">")
|
|
||||||
return cmdpath
|
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
@@ -485,23 +574,20 @@ fun! s:RecordInVar(home,cmd)
|
|||||||
" else
|
" else
|
||||||
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||||
" endif
|
" endif
|
||||||
" call Decho("recorddir=".s:recorddir)
|
|
||||||
elseif !exists("s:recordfile")
|
elseif !exists("s:recordfile")
|
||||||
let s:recordfile= a:cmd
|
let s:recordfile= a:cmd
|
||||||
" call Decho("recordfile=".s:recordfile)
|
|
||||||
else
|
else
|
||||||
let s:recordfile= s:recordfile."|".a:cmd
|
let s:recordfile= s:recordfile."|".a:cmd
|
||||||
" call Decho("recordfile=".s:recordfile)
|
|
||||||
endif
|
endif
|
||||||
" call Dret("RecordInVar")
|
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" s:RecordInFile: {{{2
|
" s:RecordInFile: {{{2
|
||||||
fun! s:RecordInFile(home)
|
fun! s:RecordInFile(home)
|
||||||
" call Dfunc("RecordInFile()")
|
" call Dfunc("s:RecordInFile()")
|
||||||
if exists("g:vimball_norecord")
|
if exists("g:vimball_norecord")
|
||||||
" call Dret("RecordInFile : (g:vimball_norecord)")
|
" call Dret("s:RecordInFile : g:vimball_norecord")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -509,8 +595,12 @@ fun! s:RecordInFile(home)
|
|||||||
let curdir= getcwd()
|
let curdir= getcwd()
|
||||||
call s:ChgDir(a:home)
|
call s:ChgDir(a:home)
|
||||||
keepalt keepjumps 1split
|
keepalt keepjumps 1split
|
||||||
|
|
||||||
let cmd= expand("%:tr").": "
|
let cmd= expand("%:tr").": "
|
||||||
|
" call Decho("cmd<".cmd.">")
|
||||||
|
|
||||||
silent! keepalt keepjumps e .VimballRecord
|
silent! keepalt keepjumps e .VimballRecord
|
||||||
|
setlocal ma
|
||||||
$
|
$
|
||||||
if exists("s:recordfile") && exists("s:recorddir")
|
if exists("s:recordfile") && exists("s:recorddir")
|
||||||
let cmd= cmd.s:recordfile."|".s:recorddir
|
let cmd= cmd.s:recordfile."|".s:recorddir
|
||||||
@@ -519,44 +609,47 @@ fun! s:RecordInFile(home)
|
|||||||
elseif exists("s:recordfile")
|
elseif exists("s:recordfile")
|
||||||
let cmd= cmd.s:recordfile
|
let cmd= cmd.s:recordfile
|
||||||
else
|
else
|
||||||
" call Dret("RecordInFile")
|
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
" call Decho("cmd<".cmd.">")
|
||||||
|
|
||||||
|
" put command into buffer, write .VimballRecord `file
|
||||||
keepalt keepjumps put=cmd
|
keepalt keepjumps put=cmd
|
||||||
silent! keepalt keepjumps g/^\s*$/d
|
silent! keepalt keepjumps g/^\s*$/d
|
||||||
silent! keepalt keepjumps wq!
|
silent! keepalt keepjumps wq!
|
||||||
call s:ChgDir(curdir)
|
call s:ChgDir(curdir)
|
||||||
if exists("s:recorddir") |unlet s:recorddir |endif
|
|
||||||
if exists("s:recordfile")|unlet s:recordfile|endif
|
if exists("s:recorddir")
|
||||||
|
" call Decho("unlet s:recorddir<".s:recorddir.">")
|
||||||
|
unlet s:recorddir
|
||||||
|
endif
|
||||||
|
if exists("s:recordfile")
|
||||||
|
" call Decho("unlet s:recordfile<".s:recordfile.">")
|
||||||
|
unlet s:recordfile
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
" call Decho("s:record[file|dir] doesn't exist")
|
" call Decho("s:record[file|dir] doesn't exist")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" call Dret("RecordInFile")
|
" call Dret("s:RecordInFile")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" s:Rmdir: {{{2
|
" vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2
|
||||||
"fun! s:Rmdir(dirname)
|
fun! vimball#VimballHome()
|
||||||
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
|
" call Dfunc("vimball#VimballHome()")
|
||||||
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
|
||||||
" call system("del ".a:dirname)
|
|
||||||
" else
|
|
||||||
" call system("rmdir ".a:dirname)
|
|
||||||
" endif
|
|
||||||
"" call Dret("s:Rmdir")
|
|
||||||
"endfun
|
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
|
||||||
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
|
|
||||||
fun! s:VimballHome()
|
|
||||||
" call Dfunc("VimballHome()")
|
|
||||||
if exists("g:vimball_home")
|
if exists("g:vimball_home")
|
||||||
let home= g:vimball_home
|
let home= g:vimball_home
|
||||||
else
|
else
|
||||||
" go to vim plugin home
|
" go to vim plugin home
|
||||||
for home in split(&rtp,',') + ['']
|
for home in split(&rtp,',') + ['']
|
||||||
if isdirectory(home) && filewritable(home) | break | endif
|
if isdirectory(home) && filewritable(home) | break | endif
|
||||||
|
let basehome= substitute(home,'[/\\]\.vim$','','')
|
||||||
|
if isdirectory(basehome) && filewritable(basehome)
|
||||||
|
let home= basehome."/.vim"
|
||||||
|
break
|
||||||
|
endif
|
||||||
endfor
|
endfor
|
||||||
if home == ""
|
if home == ""
|
||||||
" just pick the first directory
|
" just pick the first directory
|
||||||
@@ -566,13 +659,25 @@ fun! s:VimballHome()
|
|||||||
let home= substitute(home,'/','\\','g')
|
let home= substitute(home,'/','\\','g')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
" call Dret("VimballHome <".home.">")
|
" insure that the home directory exists
|
||||||
|
" call Decho("picked home<".home.">")
|
||||||
|
if !isdirectory(home)
|
||||||
|
if exists("g:vimball_mkdir")
|
||||||
|
" call Decho("home<".home."> isn't a directory -- making it now with g:vimball_mkdir<".g:vimball_mkdir.">")
|
||||||
|
" call Decho("system(".g:vimball_mkdir." ".shellescape(home).")")
|
||||||
|
call system(g:vimball_mkdir." ".shellescape(home))
|
||||||
|
else
|
||||||
|
" call Decho("home<".home."> isn't a directory -- making it now with mkdir()")
|
||||||
|
call mkdir(home)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
" call Dret("vimball#VimballHome <".home.">")
|
||||||
return home
|
return home
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" s:SaveSettings: {{{2
|
" vimball#SaveSettings: {{{2
|
||||||
fun! s:SaveSettings()
|
fun! vimball#SaveSettings()
|
||||||
" call Dfunc("SaveSettings()")
|
" call Dfunc("SaveSettings()")
|
||||||
let s:makeep = getpos("'a")
|
let s:makeep = getpos("'a")
|
||||||
let s:regakeep= @a
|
let s:regakeep= @a
|
||||||
@@ -580,30 +685,33 @@ fun! s:SaveSettings()
|
|||||||
let s:acdkeep = &acd
|
let s:acdkeep = &acd
|
||||||
endif
|
endif
|
||||||
let s:eikeep = &ei
|
let s:eikeep = &ei
|
||||||
let s:fenkeep = &fen
|
let s:fenkeep = &l:fen
|
||||||
let s:hidkeep = &hidden
|
let s:hidkeep = &hidden
|
||||||
let s:ickeep = &ic
|
let s:ickeep = &ic
|
||||||
let s:lzkeep = &lz
|
let s:lzkeep = &lz
|
||||||
let s:pmkeep = &pm
|
let s:pmkeep = &pm
|
||||||
let s:repkeep = &report
|
let s:repkeep = &report
|
||||||
let s:vekeep = &ve
|
let s:vekeep = &ve
|
||||||
|
let s:ffkeep = &l:ff
|
||||||
if exists("&acd")
|
if exists("&acd")
|
||||||
set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
|
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||||
else
|
else
|
||||||
set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
|
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||||
endif
|
endif
|
||||||
|
" vimballs should be in unix format
|
||||||
|
setlocal ff=unix
|
||||||
" call Dret("SaveSettings")
|
" call Dret("SaveSettings")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" s:RestoreSettings: {{{2
|
" vimball#RestoreSettings: {{{2
|
||||||
fun! s:RestoreSettings()
|
fun! vimball#RestoreSettings()
|
||||||
" call Dfunc("RestoreSettings()")
|
" call Dfunc("RestoreSettings()")
|
||||||
let @a = s:regakeep
|
let @a = s:regakeep
|
||||||
if exists("&acd")
|
if exists("&acd")
|
||||||
let &acd = s:acdkeep
|
let &acd = s:acdkeep
|
||||||
endif
|
endif
|
||||||
let &fen = s:fenkeep
|
let &l:fen = s:fenkeep
|
||||||
let &hidden = s:hidkeep
|
let &hidden = s:hidkeep
|
||||||
let &ic = s:ickeep
|
let &ic = s:ickeep
|
||||||
let &lz = s:lzkeep
|
let &lz = s:lzkeep
|
||||||
@@ -611,17 +719,16 @@ fun! s:RestoreSettings()
|
|||||||
let &report = s:repkeep
|
let &report = s:repkeep
|
||||||
let &ve = s:vekeep
|
let &ve = s:vekeep
|
||||||
let &ei = s:eikeep
|
let &ei = s:eikeep
|
||||||
|
let &l:ff = s:ffkeep
|
||||||
if s:makeep[0] != 0
|
if s:makeep[0] != 0
|
||||||
" restore mark a
|
" restore mark a
|
||||||
" call Decho("restore mark-a: makeep=".string(makeep))
|
" call Decho("restore mark-a: makeep=".string(makeep))
|
||||||
call setpos("'a",s:makeep)
|
call setpos("'a",s:makeep)
|
||||||
endif
|
endif
|
||||||
if exists("&acd")
|
if exists("&acd")
|
||||||
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
|
unlet s:acdkeep
|
||||||
else
|
|
||||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
|
|
||||||
endif
|
endif
|
||||||
set bt=nofile noma
|
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep s:ffkeep
|
||||||
" call Dret("RestoreSettings")
|
" call Dret("RestoreSettings")
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
|
|||||||
@@ -381,4 +381,3 @@ let g:xmldata_html32 = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -466,4 +466,3 @@ let g:xmldata_html401t = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -408,4 +408,3 @@ let g:xmldata_html401s = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -458,4 +458,3 @@ let g:xmldata_html401t = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -466,4 +466,3 @@ let g:xmldata_html40t = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -408,4 +408,3 @@ let g:xmldata_html40s = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -458,4 +458,3 @@ let g:xmldata_html40t = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -467,4 +467,3 @@ let g:xmldata_xhtml10f = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -408,4 +408,3 @@ let g:xmldata_xhtml10s = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -458,4 +458,3 @@ let g:xmldata_xhtml10t = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -432,4 +432,3 @@ let g:xmldata_xhtml11 = {
|
|||||||
\ 'param': ['/>', ''],
|
\ 'param': ['/>', ''],
|
||||||
\ }
|
\ }
|
||||||
\ }
|
\ }
|
||||||
" vim:ft=vim:ff=unix
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
" Vim completion script
|
" Vim completion script
|
||||||
" Language: XML
|
" Language: XML
|
||||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||||
" Last Change: 2006 Jul 18
|
" Last Change: 2006 Aug 15
|
||||||
" Version: 1.8
|
" Version: 1.9
|
||||||
"
|
"
|
||||||
" Changelog:
|
" Changelog:
|
||||||
|
" 1.9 - 2007 Aug 15
|
||||||
|
" - fix closing of namespaced tags (Johannes Weiss)
|
||||||
" 1.8 - 2006 Jul 18
|
" 1.8 - 2006 Jul 18
|
||||||
" - allow for closing of xml tags even when data file isn't available
|
" - allow for closing of xml tags even when data file isn't available
|
||||||
|
|
||||||
@@ -413,12 +415,12 @@ function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
|
|||||||
|
|
||||||
if exists("b:xml_namespace")
|
if exists("b:xml_namespace")
|
||||||
if b:xml_namespace == 'DEFAULT'
|
if b:xml_namespace == 'DEFAULT'
|
||||||
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
|
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
|
||||||
else
|
else
|
||||||
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
|
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
|
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
|
||||||
endif
|
endif
|
||||||
while (linenum>0)
|
while (linenum>0)
|
||||||
let line=getline(linenum)
|
let line=getline(linenum)
|
||||||
|
|||||||
@@ -1,28 +1,34 @@
|
|||||||
" zip.vim: Handles browsing zipfiles
|
" zip.vim: Handles browsing zipfiles
|
||||||
" AUTOLOAD PORTION
|
" AUTOLOAD PORTION
|
||||||
" Date: May 08, 2007
|
" Date: Apr 12, 2010
|
||||||
" Version: 14
|
" Version: 23
|
||||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||||
" License: Vim License (see vim's :help license)
|
" License: Vim License (see vim's :help license)
|
||||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
" Copyright: Copyright (C) 2005-2008 Charles E. Campbell, Jr. {{{1
|
||||||
" Permission is hereby granted to use and distribute this code,
|
" Permission is hereby granted to use and distribute this code,
|
||||||
" with or without modifications, provided that this copyright
|
" with or without modifications, provided that this copyright
|
||||||
" notice is copied with it. Like anything else that's free,
|
" notice is copied with it. Like anything else that's free,
|
||||||
" zipPlugin.vim is provided *as is* and comes with no warranty
|
" zip.vim and zipPlugin.vim are provided *as is* and comes with
|
||||||
" of any kind, either expressed or implied. By using this
|
" no warranty of any kind, either expressed or implied. By using
|
||||||
" plugin, you agree that in no event will the copyright
|
" this plugin, you agree that in no event will the copyright
|
||||||
" holder be liable for any damages resulting from the use
|
" holder be liable for any damages resulting from the use
|
||||||
" of this software.
|
" of this software.
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Load Once: {{{1
|
" Load Once: {{{1
|
||||||
let s:keepcpo= &cpo
|
if &cp || exists("g:loaded_zip")
|
||||||
set cpo&vim
|
|
||||||
if &cp || exists("g:loaded_zip") || v:version < 700
|
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
let g:loaded_zip= "v23"
|
||||||
|
if v:version < 702
|
||||||
|
echohl WarningMsg
|
||||||
|
echo "***warning*** this version of zip needs vim 7.2"
|
||||||
|
echohl Normal
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let s:keepcpo= &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
let g:loaded_zip = "v14"
|
|
||||||
let s:zipfile_escape = ' ?&;\'
|
let s:zipfile_escape = ' ?&;\'
|
||||||
let s:ERROR = 2
|
let s:ERROR = 2
|
||||||
let s:WARNING = 1
|
let s:WARNING = 1
|
||||||
@@ -31,7 +37,9 @@ let s:NOTE = 0
|
|||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Global Values: {{{1
|
" Global Values: {{{1
|
||||||
if !exists("g:zip_shq")
|
if !exists("g:zip_shq")
|
||||||
if has("unix")
|
if &shq != ""
|
||||||
|
let g:zip_shq= &shq
|
||||||
|
elseif has("unix")
|
||||||
let g:zip_shq= "'"
|
let g:zip_shq= "'"
|
||||||
else
|
else
|
||||||
let g:zip_shq= '"'
|
let g:zip_shq= '"'
|
||||||
@@ -56,6 +64,12 @@ fun! zip#Browse(zipfile)
|
|||||||
set report=10
|
set report=10
|
||||||
|
|
||||||
" sanity checks
|
" sanity checks
|
||||||
|
if !exists("*fnameescape")
|
||||||
|
if &verbose > 1
|
||||||
|
echoerr "the zip plugin is not available (your vim doens't support fnameescape())"
|
||||||
|
endif
|
||||||
|
return
|
||||||
|
endif
|
||||||
if !executable(g:zip_unzipcmd)
|
if !executable(g:zip_unzipcmd)
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
|
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
|
||||||
@@ -89,23 +103,24 @@ fun! zip#Browse(zipfile)
|
|||||||
set ft=tar
|
set ft=tar
|
||||||
|
|
||||||
" give header
|
" give header
|
||||||
exe "$put ='".'\"'." zip.vim version ".g:loaded_zip."'"
|
let lastline= line("$")
|
||||||
exe "$put ='".'\"'." Browsing zipfile ".a:zipfile."'"
|
call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
|
||||||
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
|
call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
|
||||||
|
call setline(lastline+3,'" Select a file with cursor and press ENTER')
|
||||||
$put =''
|
$put =''
|
||||||
0d
|
0d
|
||||||
$
|
$
|
||||||
|
|
||||||
" call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile))
|
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
|
||||||
exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)
|
exe "silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1)
|
||||||
if v:shell_error != 0
|
if v:shell_error != 0
|
||||||
redraw!
|
redraw!
|
||||||
echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
|
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
|
||||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||||
silent %d
|
silent %d
|
||||||
let eikeep= &ei
|
let eikeep= &ei
|
||||||
set ei=BufReadCmd,FileReadCmd
|
set ei=BufReadCmd,FileReadCmd
|
||||||
exe "r ".a:zipfile
|
exe "r ".fnameescape(a:zipfile)
|
||||||
let &ei= eikeep
|
let &ei= eikeep
|
||||||
1d
|
1d
|
||||||
" call Dret("zip#Browse")
|
" call Dret("zip#Browse")
|
||||||
@@ -160,10 +175,12 @@ fun! s:ZipBrowseSelect()
|
|||||||
" call Decho("curfile<".curfile.">")
|
" call Decho("curfile<".curfile.">")
|
||||||
|
|
||||||
new
|
new
|
||||||
wincmd _
|
if !exists("g:zip_nomax") || g:zip_nomax == 0
|
||||||
|
wincmd _
|
||||||
|
endif
|
||||||
let s:zipfile_{winnr()}= curfile
|
let s:zipfile_{winnr()}= curfile
|
||||||
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape))
|
" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
|
||||||
exe "e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape)
|
exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
|
||||||
filetype detect
|
filetype detect
|
||||||
|
|
||||||
let &report= repkeep
|
let &report= repkeep
|
||||||
@@ -188,8 +205,8 @@ fun! zip#Read(fname,mode)
|
|||||||
" call Decho("zipfile<".zipfile.">")
|
" call Decho("zipfile<".zipfile.">")
|
||||||
" call Decho("fname <".fname.">")
|
" call Decho("fname <".fname.">")
|
||||||
|
|
||||||
" call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
|
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1))
|
||||||
exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
|
exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
|
||||||
|
|
||||||
" cleanup
|
" cleanup
|
||||||
0d
|
0d
|
||||||
@@ -262,7 +279,7 @@ fun! zip#Write(fname)
|
|||||||
if fname =~ '/'
|
if fname =~ '/'
|
||||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||||
if executable("cygpath")
|
if executable("cygpath")
|
||||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
|
||||||
endif
|
endif
|
||||||
" call Decho("mkdir(dirpath<".dirpath.">,p)")
|
" call Decho("mkdir(dirpath<".dirpath.">,p)")
|
||||||
call mkdir(dirpath,"p")
|
call mkdir(dirpath,"p")
|
||||||
@@ -272,17 +289,17 @@ fun! zip#Write(fname)
|
|||||||
endif
|
endif
|
||||||
" call Decho("zipfile<".zipfile."> fname<".fname.">")
|
" call Decho("zipfile<".zipfile."> fname<".fname.">")
|
||||||
|
|
||||||
exe "w! ".escape(fname,s:zipfile_escape)
|
exe "w! ".fnameescape(fname)
|
||||||
if executable("cygpath")
|
if executable("cygpath")
|
||||||
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
|
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||||
let fname = substitute(fname, '[', '[[]', 'g')
|
let fname = substitute(fname, '[', '[[]', 'g')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
|
" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
|
||||||
call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
|
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
|
||||||
if v:shell_error != 0
|
if v:shell_error != 0
|
||||||
redraw!
|
redraw!
|
||||||
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
|
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
|
||||||
@@ -296,7 +313,7 @@ fun! zip#Write(fname)
|
|||||||
let binkeep= &binary
|
let binkeep= &binary
|
||||||
let eikeep = &ei
|
let eikeep = &ei
|
||||||
set binary ei=all
|
set binary ei=all
|
||||||
exe "e! ".zipfile
|
exe "e! ".fnameescape(zipfile)
|
||||||
call netrw#NetWrite(netzipfile)
|
call netrw#NetWrite(netzipfile)
|
||||||
let &ei = eikeep
|
let &ei = eikeep
|
||||||
let &binary = binkeep
|
let &binary = binkeep
|
||||||
@@ -316,11 +333,20 @@ fun! zip#Write(fname)
|
|||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" QuoteFileDir: {{{2
|
" s:Escape: {{{2
|
||||||
fun! s:QuoteFileDir(fname)
|
fun! s:Escape(fname,isfilt)
|
||||||
" call Dfunc("QuoteFileDir(fname<".a:fname.">)")
|
" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
|
||||||
" call Dret("QuoteFileDir")
|
if exists("*shellescape")
|
||||||
return g:zip_shq.a:fname.g:zip_shq
|
if a:isfilt
|
||||||
|
let qnameq= shellescape(a:fname,1)
|
||||||
|
else
|
||||||
|
let qnameq= shellescape(a:fname)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
|
||||||
|
endif
|
||||||
|
" call Dret("QuoteFileDir <".qnameq.">")
|
||||||
|
return qnameq
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
@@ -328,14 +354,8 @@ endfun
|
|||||||
fun! s:ChgDir(newdir,errlvl,errmsg)
|
fun! s:ChgDir(newdir,errlvl,errmsg)
|
||||||
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
|
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
|
||||||
|
|
||||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
|
||||||
let newdir= escape(a:newdir,' ')
|
|
||||||
else
|
|
||||||
let newdir= escape(a:newdir,'\ ')
|
|
||||||
endif
|
|
||||||
|
|
||||||
try
|
try
|
||||||
exe "cd ".newdir
|
exe "cd ".fnameescape(a:newdir)
|
||||||
catch /^Vim\%((\a\+)\)\=:E344/
|
catch /^Vim\%((\a\+)\)\=:E344/
|
||||||
redraw!
|
redraw!
|
||||||
if a:errlvl == s:NOTE
|
if a:errlvl == s:NOTE
|
||||||
@@ -355,13 +375,13 @@ fun! s:ChgDir(newdir,errlvl,errmsg)
|
|||||||
endfun
|
endfun
|
||||||
|
|
||||||
" ---------------------------------------------------------------------
|
" ---------------------------------------------------------------------
|
||||||
" Rmdir: {{{2
|
" s:Rmdir: {{{2
|
||||||
fun! s:Rmdir(fname)
|
fun! s:Rmdir(fname)
|
||||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||||
call system("rmdir /S/Q ".s:QuoteFileDir(a:fname))
|
call system("rmdir /S/Q ".s:Escape(a:fname,0))
|
||||||
else
|
else
|
||||||
call system("/bin/rm -rf ".s:QuoteFileDir(a:fname))
|
call system("/bin/rm -rf ".s:Escape(a:fname,0))
|
||||||
endif
|
endif
|
||||||
" call Dret("Rmdir")
|
" call Dret("Rmdir")
|
||||||
endfun
|
endfun
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ If you think you have a color scheme that is good enough to be used by others,
|
|||||||
please check the following items:
|
please check the following items:
|
||||||
|
|
||||||
- Does it work in a color terminal as well as in the GUI?
|
- Does it work in a color terminal as well as in the GUI?
|
||||||
|
- Is "g:colors_name" set to a meaningful value? In case of doubt you can do
|
||||||
|
it this way:
|
||||||
|
let g:colors_name = expand('<sfile>:t:r')
|
||||||
- Is 'background' either used or appropriately set to "light" or "dark"?
|
- Is 'background' either used or appropriately set to "light" or "dark"?
|
||||||
- Try setting 'hlsearch' and searching for a pattern, is the match easy to
|
- Try setting 'hlsearch' and searching for a pattern, is the match easy to
|
||||||
spot?
|
spot?
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
" Vim color file
|
" Vim color file
|
||||||
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua>
|
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua>
|
||||||
" Last Change: 2006 Apr 30
|
" Last Change: 2008 Jul 18
|
||||||
|
|
||||||
" darkblue -- for those who prefer dark background
|
" darkblue -- for those who prefer dark background
|
||||||
" [note: looks bit uglier with come terminal palettes,
|
" [note: looks bit uglier with come terminal palettes,
|
||||||
@@ -58,3 +58,9 @@ hi PreProc ctermfg=magenta guifg=#ff80ff gui=none cterm=none
|
|||||||
hi type ctermfg=green guifg=#60ff60 gui=none cterm=none
|
hi type ctermfg=green guifg=#60ff60 gui=none cterm=none
|
||||||
hi Underlined cterm=underline term=underline
|
hi Underlined cterm=underline term=underline
|
||||||
hi Ignore guifg=bg ctermfg=bg
|
hi Ignore guifg=bg ctermfg=bg
|
||||||
|
|
||||||
|
" suggested by tigmoid, 2008 Jul 18
|
||||||
|
hi Pmenu guifg=#c0c0c0 guibg=#404080
|
||||||
|
hi PmenuSel guifg=#c0c0c0 guibg=#2050d0
|
||||||
|
hi PmenuSbar guifg=blue guibg=darkgray
|
||||||
|
hi PmenuThumb guifg=#c0c0c0
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
" Vim color file
|
" Vim color file
|
||||||
" Maintainer: Hans Fugal <hans@fugal.net>
|
" Maintainer: Hans Fugal <hans@fugal.net>
|
||||||
" Last Change: $Date$
|
" Last Change: $Date: 2004/06/13 19:30:30 $
|
||||||
" Last Change: $Date$
|
" Last Change: $Date: 2004/06/13 19:30:30 $
|
||||||
" URL: http://hans.fugal.net/vim/colors/desert.vim
|
" URL: http://hans.fugal.net/vim/colors/desert.vim
|
||||||
" Version: $Id$
|
" Version: $Id: desert.vim,v 1.1 2004/06/13 19:30:30 vimboss Exp $
|
||||||
|
|
||||||
" cool help screens
|
" cool help screens
|
||||||
" :he group-name
|
" :he group-name
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ if version > 580
|
|||||||
syntax reset
|
syntax reset
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
let colors_name = "slate"
|
||||||
:hi Normal guifg=White guibg=grey15
|
:hi Normal guifg=White guibg=grey15
|
||||||
:hi Cursor guibg=khaki guifg=slategrey
|
:hi Cursor guibg=khaki guifg=slategrey
|
||||||
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
|
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
|
||||||
|
|||||||
29
runtime/compiler/cucumber.vim
Normal file
29
runtime/compiler/cucumber.vim
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Compiler: Cucumber
|
||||||
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
|
" Last Change: 2010 Aug 09
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "cucumber"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
CompilerSet makeprg=cucumber
|
||||||
|
|
||||||
|
CompilerSet errorformat=
|
||||||
|
\%W%m\ (Cucumber::Undefined),
|
||||||
|
\%E%m\ (%.%#),
|
||||||
|
\%Z%f:%l,
|
||||||
|
\%Z%f:%l:%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim:set sw=2 sts=2:
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Vim Ada/Dec Ada compiler file
|
" Description: Vim Ada/Dec Ada compiler file
|
||||||
" Language: Ada (Dec Ada)
|
" Language: Ada (Dec Ada)
|
||||||
" $Id$
|
" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||||
" Maintainer: Martin Krischik
|
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||||
" $Author$
|
" $Author: krischik $
|
||||||
" $Date$
|
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||||
" Version: 4.2
|
" Version: 4.6
|
||||||
" $Revision$
|
" $Revision: 887 $
|
||||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
|
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
|
||||||
" History: 21.07.2006 MK New Dec Ada
|
" History: 21.07.2006 MK New Dec Ada
|
||||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||||
|
" 08.09.2006 MK Correct double load protection.
|
||||||
" Help Page: compiler-decada
|
" Help Page: compiler-decada
|
||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -24,6 +25,13 @@ let current_compiler = "decada"
|
|||||||
|
|
||||||
if !exists("g:decada")
|
if !exists("g:decada")
|
||||||
let g:decada = decada#New ()
|
let g:decada = decada#New ()
|
||||||
|
|
||||||
|
call ada#Map_Menu (
|
||||||
|
\'Dec Ada.Build',
|
||||||
|
\'<F7>',
|
||||||
|
\'call decada.Make ()')
|
||||||
|
|
||||||
|
call g:decada.Set_Session ()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists(":CompilerSet") != 2
|
if exists(":CompilerSet") != 2
|
||||||
@@ -33,16 +41,9 @@ if exists(":CompilerSet") != 2
|
|||||||
command -nargs=* CompilerSet setlocal <args>
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call g:decada.Set_Session ()
|
|
||||||
|
|
||||||
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
|
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
|
||||||
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
|
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
|
||||||
|
|
||||||
call ada#Map_Menu (
|
|
||||||
\'Dec Ada.Build',
|
|
||||||
\'<F7>',
|
|
||||||
\'call decada.Make ()')
|
|
||||||
|
|
||||||
finish " 1}}}
|
finish " 1}}}
|
||||||
|
|
||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Language: eRuby
|
" Language: eRuby
|
||||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Info: $Id$
|
" Last Change: 2008 Aug 1
|
||||||
" URL: http://vim-ruby.rubyforge.org
|
" URL: http://vim-ruby.rubyforge.org
|
||||||
" Anon CVS: See above site
|
" Anon CVS: See above site
|
||||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||||
@@ -38,4 +38,4 @@ CompilerSet errorformat=
|
|||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
|
" vim: nowrap sw=2 sts=2 ts=8:
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Compiler: g77 (GNU Fortran)
|
" Compiler: g77 (GNU Fortran)
|
||||||
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
" Last Change: $Date$
|
" Last Change: $Date: 2004/06/13 18:17:36 $
|
||||||
" $Revision$
|
" $Revision: 1.1 $
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
|
|||||||
23
runtime/compiler/g95.vim
Normal file
23
runtime/compiler/g95.vim
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
" Compiler: G95
|
||||||
|
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||||
|
" Version: 0.1.3
|
||||||
|
" Last Change: 2011 Apr 01
|
||||||
|
" Homepage: http://www.vim.org/scripts/script.php?script_id=3492
|
||||||
|
" https://bitbucket.org/xuhdev/compiler-g95.vim
|
||||||
|
" License: Same as Vim
|
||||||
|
|
||||||
|
if exists('current_compiler')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = 'g95'
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
CompilerSet errorformat=
|
||||||
|
\%AIn\ file\ %f:%l,
|
||||||
|
\%-C%p1,
|
||||||
|
\%-Z%trror:\ %m,
|
||||||
|
\%-Z%tarning\ (%n):\ %m,
|
||||||
|
\%-C%.%#
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Compiler: GNU C Compiler
|
" Compiler: GNU C Compiler
|
||||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||||
" Latest Revision: 2006-12-20
|
" Latest Revision: 2010-10-14
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
@@ -11,11 +11,18 @@ let current_compiler = "gcc"
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo-=C
|
set cpo-=C
|
||||||
|
|
||||||
setlocal errorformat=
|
CompilerSet errorformat=
|
||||||
|
\%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
|
||||||
\%*[^\"]\"%f\"%*\\D%l:\ %m,
|
\%*[^\"]\"%f\"%*\\D%l:\ %m,
|
||||||
|
\\"%f\"%*\\D%l:%c:\ %m,
|
||||||
\\"%f\"%*\\D%l:\ %m,
|
\\"%f\"%*\\D%l:\ %m,
|
||||||
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
||||||
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
|
\%-G%f:%l:\ %trror:\ for\ each\ function\ it\ appears\ in.),
|
||||||
|
\%f:%l:%c:\ %trror:\ %m,
|
||||||
|
\%f:%l:%c:\ %tarning:\ %m,
|
||||||
|
\%f:%l:%c:\ %m,
|
||||||
|
\%f:%l:\ %trror:\ %m,
|
||||||
|
\%f:%l:\ %tarning:\ %m,
|
||||||
\%f:%l:\ %m,
|
\%f:%l:\ %m,
|
||||||
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
||||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
||||||
@@ -25,7 +32,7 @@ setlocal errorformat=
|
|||||||
\%DMaking\ %*\\a\ in\ %f
|
\%DMaking\ %*\\a\ in\ %f
|
||||||
|
|
||||||
if exists('g:compiler_gcc_ignore_unmatched_lines')
|
if exists('g:compiler_gcc_ignore_unmatched_lines')
|
||||||
let &errorformat .= ',%-G%.%#'
|
CompilerSet errorformat+=%-G%.%#
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
|
|||||||
22
runtime/compiler/gfortran.vim
Normal file
22
runtime/compiler/gfortran.vim
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
" Compiler: GNU Fortran Compiler
|
||||||
|
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||||
|
" Version: 0.1.3
|
||||||
|
" Last Change: 19 March 2011
|
||||||
|
" Homepage: http://www.vim.org/scripts/script.php?script_id=3496
|
||||||
|
" https://bitbucket.org/xuhdev/compiler-gfortran.vim
|
||||||
|
" License: Same as Vim
|
||||||
|
|
||||||
|
if exists('current_compiler')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = 'gfortran'
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
CompilerSet errorformat=
|
||||||
|
\%A%f:%l.%c:,
|
||||||
|
\%-Z%trror:\ %m,
|
||||||
|
\%-Z%tarning:\ %m,
|
||||||
|
\%-C%.%#
|
||||||
@@ -1,17 +1,19 @@
|
|||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
" Description: Vim Ada/GNAT compiler file
|
" Description: Vim Ada/GNAT compiler file
|
||||||
" Language: Ada (GNAT)
|
" Language: Ada (GNAT)
|
||||||
" $Id$
|
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
|
||||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||||
" Maintainer: Martin Krischik
|
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
|
||||||
" $Author$
|
" Ned Okie <nokie@radford.edu>
|
||||||
" $Date$
|
" $Author: krischik $
|
||||||
" Version: 4.2
|
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||||
" $Revision$
|
" Version: 4.6
|
||||||
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
|
" $Revision: 887 $
|
||||||
|
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
|
||||||
" History: 24.05.2006 MK Unified Headers
|
" History: 24.05.2006 MK Unified Headers
|
||||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||||
|
" 19.09.2007 NO use project file only when there is a project
|
||||||
" Help Page: compiler-gnat
|
" Help Page: compiler-gnat
|
||||||
"------------------------------------------------------------------------------
|
"------------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -46,6 +48,8 @@ if !exists("g:gnat")
|
|||||||
\ 'GNAT.Set Projectfile\.\.\.',
|
\ 'GNAT.Set Projectfile\.\.\.',
|
||||||
\ ':SetProject',
|
\ ':SetProject',
|
||||||
\ 'call gnat.Set_Project_File ()')
|
\ 'call gnat.Set_Project_File ()')
|
||||||
|
|
||||||
|
call g:gnat.Set_Session ()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if exists(":CompilerSet") != 2
|
if exists(":CompilerSet") != 2
|
||||||
@@ -55,8 +59,6 @@ if exists(":CompilerSet") != 2
|
|||||||
command -nargs=* CompilerSet setlocal <args>
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call g:gnat.Set_Session ()
|
|
||||||
|
|
||||||
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
|
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
|
||||||
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
|
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
|
||||||
|
|
||||||
|
|||||||
22
runtime/compiler/ifort.vim
Normal file
22
runtime/compiler/ifort.vim
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
" Compiler: Intel Fortran Compiler
|
||||||
|
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||||
|
" Version: 0.1.1
|
||||||
|
" Last Change: 19 March 2011
|
||||||
|
" Homepage: http://www.vim.org/scripts/script.php?script_id=3497
|
||||||
|
" https://bitbucket.org/xuhdev/compiler-ifort.vim
|
||||||
|
" License: Same as Vim
|
||||||
|
|
||||||
|
if exists('current_compiler')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = 'ifort'
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
CompilerSet errorformat=
|
||||||
|
\%A%f(%l):\ %trror\ \#%n:\ %m,
|
||||||
|
\%A%f(%l):\ %tarning\ \#%n:\ %m,
|
||||||
|
\%-Z%p^,
|
||||||
|
\%-G%.%#
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
" Vim Compiler File
|
" Vim Compiler File
|
||||||
" Compiler: Jikes
|
" Compiler: Jikes
|
||||||
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
|
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
|
||||||
" Last Change: 2004 Mar 27
|
" Last Change: 20 Jan 2009
|
||||||
" URL: http://mywebpage.netscape.com/sharppeople/vim/compiler
|
" URL: http://dwsharp.users.sourceforge.net/vim/compiler
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" Vim Compiler File
|
" Vim Compiler File
|
||||||
" Compiler: Perl syntax checks (perl -Wc)
|
" Compiler: Perl syntax checks (perl -Wc)
|
||||||
" Maintainer: Christian J. Robinson <infynity@onewest.net>
|
" Maintainer: Christian J. Robinson <heptite@gmail.com>
|
||||||
" Last Change: 2004 Mar 27
|
" Last Change: 2006 Aug 13
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
@@ -15,12 +15,20 @@ endif
|
|||||||
let s:savecpo = &cpo
|
let s:savecpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
if getline(1) =~# '-[^ ]*T'
|
if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
|
||||||
CompilerSet makeprg=perl\ -WTc\ %
|
let s:warnopt = 'w'
|
||||||
else
|
else
|
||||||
CompilerSet makeprg=perl\ -Wc\ %
|
let s:warnopt = 'W'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if getline(1) =~# '-[^ ]*T'
|
||||||
|
let s:taintopt = 'T'
|
||||||
|
else
|
||||||
|
let s:taintopt = ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %'
|
||||||
|
|
||||||
CompilerSet errorformat=
|
CompilerSet errorformat=
|
||||||
\%-G%.%#had\ compilation\ errors.,
|
\%-G%.%#had\ compilation\ errors.,
|
||||||
\%-G%.%#syntax\ OK,
|
\%-G%.%#syntax\ OK,
|
||||||
|
|||||||
41
runtime/compiler/rspec.vim
Normal file
41
runtime/compiler/rspec.vim
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
" Vim compiler file
|
||||||
|
" Language: RSpec
|
||||||
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
|
" Last Change: 2009 Dec 22
|
||||||
|
" URL: http://vim-ruby.rubyforge.org
|
||||||
|
" Anon CVS: See above site
|
||||||
|
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||||
|
|
||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let current_compiler = "rspec"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo-=C
|
||||||
|
|
||||||
|
CompilerSet makeprg=spec
|
||||||
|
|
||||||
|
CompilerSet errorformat=
|
||||||
|
\%+W'%.%#'\ FAILED,
|
||||||
|
\%+I'%.%#'\ FIXED,
|
||||||
|
\%-Cexpected:%.%#,
|
||||||
|
\%-C\ \ \ \ \ got:%.%#,
|
||||||
|
\%E%.%#:in\ `load':\ %f:%l:%m,
|
||||||
|
\%C%f:%l:,
|
||||||
|
\%W%f:%l:\ warning:\ %m,
|
||||||
|
\%E%f:%l:in\ %*[^:]:\ %m,
|
||||||
|
\%E%f:%l:\ %m,
|
||||||
|
\%-Z%\tfrom\ %f:%l,
|
||||||
|
\%-Z%p^%.%#,
|
||||||
|
\%-C%.%#,
|
||||||
|
\%-G%.%#
|
||||||
|
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: nowrap sw=2 sts=2 ts=8:
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
" Language: Ruby
|
" Language: Ruby
|
||||||
" Function: Syntax check and/or error reporting
|
" Function: Syntax check and/or error reporting
|
||||||
" Maintainer: Tim Hammerquist <timh at rubyforge.org>
|
" Maintainer: Tim Hammerquist <timh at rubyforge.org>
|
||||||
" Info: $Id$
|
" Last Change: 2008 Aug 1
|
||||||
" URL: http://vim-ruby.rubyforge.org
|
" URL: http://vim-ruby.rubyforge.org
|
||||||
" Anon CVS: See above site
|
" Anon CVS: See above site
|
||||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||||
@@ -65,4 +65,4 @@ CompilerSet errorformat=
|
|||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
|
" vim: nowrap sw=2 sts=2 ts=8:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Language: Test::Unit - Ruby Unit Testing Framework
|
" Language: Test::Unit - Ruby Unit Testing Framework
|
||||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Info: $Id$
|
" Last Change: 2008 Aug 1
|
||||||
" URL: http://vim-ruby.rubyforge.org
|
" URL: http://vim-ruby.rubyforge.org
|
||||||
" Anon CVS: See above site
|
" Anon CVS: See above site
|
||||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||||
@@ -32,4 +32,4 @@ CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
|
|||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
unlet s:cpo_save
|
unlet s:cpo_save
|
||||||
|
|
||||||
" vim: nowrap sw=2 sts=2 ts=8 ff=unix:
|
" vim: nowrap sw=2 sts=2 ts=8:
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
" Splint Home: http://www.splint.org/
|
" Splint Home: http://www.splint.org/
|
||||||
" Last Change: 2005 Apr 21
|
" Last Change: 2005 Apr 21
|
||||||
" $Revision$
|
" $Revision: 1.3 $
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
|
|||||||
@@ -14,13 +14,12 @@ VIMEXE = vim
|
|||||||
include ../../src/auto/config.mk
|
include ../../src/auto/config.mk
|
||||||
|
|
||||||
DOCS = \
|
DOCS = \
|
||||||
ada.txt \
|
|
||||||
arabic.txt \
|
arabic.txt \
|
||||||
autocmd.txt \
|
autocmd.txt \
|
||||||
change.txt \
|
change.txt \
|
||||||
cmdline.txt \
|
cmdline.txt \
|
||||||
debugger.txt \
|
|
||||||
debug.txt \
|
debug.txt \
|
||||||
|
debugger.txt \
|
||||||
develop.txt \
|
develop.txt \
|
||||||
diff.txt \
|
diff.txt \
|
||||||
digraph.txt \
|
digraph.txt \
|
||||||
@@ -29,6 +28,8 @@ DOCS = \
|
|||||||
farsi.txt \
|
farsi.txt \
|
||||||
filetype.txt \
|
filetype.txt \
|
||||||
fold.txt \
|
fold.txt \
|
||||||
|
ft_ada.txt \
|
||||||
|
ft_sql.txt \
|
||||||
gui.txt \
|
gui.txt \
|
||||||
gui_w16.txt \
|
gui_w16.txt \
|
||||||
gui_w32.txt \
|
gui_w32.txt \
|
||||||
@@ -36,8 +37,10 @@ DOCS = \
|
|||||||
hangulin.txt \
|
hangulin.txt \
|
||||||
hebrew.txt \
|
hebrew.txt \
|
||||||
help.txt \
|
help.txt \
|
||||||
|
helphelp.txt \
|
||||||
howto.txt \
|
howto.txt \
|
||||||
if_cscop.txt \
|
if_cscop.txt \
|
||||||
|
if_lua.txt \
|
||||||
if_mzsch.txt \
|
if_mzsch.txt \
|
||||||
if_ole.txt \
|
if_ole.txt \
|
||||||
if_perl.txt \
|
if_perl.txt \
|
||||||
@@ -50,10 +53,10 @@ DOCS = \
|
|||||||
insert.txt \
|
insert.txt \
|
||||||
intro.txt \
|
intro.txt \
|
||||||
map.txt \
|
map.txt \
|
||||||
message.txt \
|
|
||||||
motion.txt \
|
|
||||||
mbyte.txt \
|
mbyte.txt \
|
||||||
|
message.txt \
|
||||||
mlang.txt \
|
mlang.txt \
|
||||||
|
motion.txt \
|
||||||
netbeans.txt \
|
netbeans.txt \
|
||||||
options.txt \
|
options.txt \
|
||||||
os_390.txt \
|
os_390.txt \
|
||||||
@@ -89,10 +92,9 @@ DOCS = \
|
|||||||
russian.txt \
|
russian.txt \
|
||||||
scroll.txt \
|
scroll.txt \
|
||||||
sign.txt \
|
sign.txt \
|
||||||
|
spell.txt \
|
||||||
sponsor.txt \
|
sponsor.txt \
|
||||||
starting.txt \
|
starting.txt \
|
||||||
spell.txt \
|
|
||||||
sql.txt \
|
|
||||||
syntax.txt \
|
syntax.txt \
|
||||||
tabpage.txt \
|
tabpage.txt \
|
||||||
tagsrch.txt \
|
tagsrch.txt \
|
||||||
@@ -145,7 +147,6 @@ DOCS = \
|
|||||||
workshop.txt
|
workshop.txt
|
||||||
|
|
||||||
HTMLS = \
|
HTMLS = \
|
||||||
ada.html \
|
|
||||||
arabic.html \
|
arabic.html \
|
||||||
autocmd.html \
|
autocmd.html \
|
||||||
change.html \
|
change.html \
|
||||||
@@ -160,14 +161,18 @@ HTMLS = \
|
|||||||
farsi.html \
|
farsi.html \
|
||||||
filetype.html \
|
filetype.html \
|
||||||
fold.html \
|
fold.html \
|
||||||
|
ft_ada.html \
|
||||||
|
ft_sql.html \
|
||||||
gui.html \
|
gui.html \
|
||||||
gui_w16.html \
|
gui_w16.html \
|
||||||
gui_w32.html \
|
gui_w32.html \
|
||||||
gui_x11.html \
|
gui_x11.html \
|
||||||
hangulin.html \
|
hangulin.html \
|
||||||
hebrew.html \
|
hebrew.html \
|
||||||
|
helphelp.html \
|
||||||
howto.html \
|
howto.html \
|
||||||
if_cscop.html \
|
if_cscop.html \
|
||||||
|
if_lua.html \
|
||||||
if_mzsch.html \
|
if_mzsch.html \
|
||||||
if_ole.html \
|
if_ole.html \
|
||||||
if_perl.html \
|
if_perl.html \
|
||||||
@@ -177,14 +182,13 @@ HTMLS = \
|
|||||||
if_tcl.html \
|
if_tcl.html \
|
||||||
indent.html \
|
indent.html \
|
||||||
index.html \
|
index.html \
|
||||||
vimindex.html \
|
|
||||||
insert.html \
|
insert.html \
|
||||||
intro.html \
|
intro.html \
|
||||||
map.html \
|
map.html \
|
||||||
message.html \
|
|
||||||
motion.html \
|
|
||||||
mbyte.html \
|
mbyte.html \
|
||||||
|
message.html \
|
||||||
mlang.html \
|
mlang.html \
|
||||||
|
motion.html \
|
||||||
netbeans.html \
|
netbeans.html \
|
||||||
options.html \
|
options.html \
|
||||||
os_390.html \
|
os_390.html \
|
||||||
@@ -220,10 +224,9 @@ HTMLS = \
|
|||||||
russian.html \
|
russian.html \
|
||||||
scroll.html \
|
scroll.html \
|
||||||
sign.html \
|
sign.html \
|
||||||
|
spell.html \
|
||||||
sponsor.html \
|
sponsor.html \
|
||||||
starting.html \
|
starting.html \
|
||||||
spell.html \
|
|
||||||
sql.html \
|
|
||||||
syntax.html \
|
syntax.html \
|
||||||
tabpage.html \
|
tabpage.html \
|
||||||
tags.html \
|
tags.html \
|
||||||
@@ -272,6 +275,7 @@ HTMLS = \
|
|||||||
version6.html \
|
version6.html \
|
||||||
version7.html \
|
version7.html \
|
||||||
vi_diff.html \
|
vi_diff.html \
|
||||||
|
vimindex.html \
|
||||||
visual.html \
|
visual.html \
|
||||||
windows.html \
|
windows.html \
|
||||||
workshop.html
|
workshop.html
|
||||||
@@ -287,21 +291,26 @@ CONVERTED = \
|
|||||||
vimdiff-it.UTF-8.1 \
|
vimdiff-it.UTF-8.1 \
|
||||||
vimtutor-it.UTF-8.1 \
|
vimtutor-it.UTF-8.1 \
|
||||||
xxd-it.UTF-8.1 \
|
xxd-it.UTF-8.1 \
|
||||||
|
vim-pl.UTF-8.1 \
|
||||||
|
evim-pl.UTF-8.1 \
|
||||||
|
vimdiff-pl.UTF-8.1 \
|
||||||
|
vimtutor-pl.UTF-8.1 \
|
||||||
|
xxd-pl.UTF-8.1 \
|
||||||
vim-ru.UTF-8.1 \
|
vim-ru.UTF-8.1 \
|
||||||
evim-ru.UTF-8.1 \
|
evim-ru.UTF-8.1 \
|
||||||
vimdiff-ru.UTF-8.1 \
|
vimdiff-ru.UTF-8.1 \
|
||||||
vimtutor-ru.UTF-8.1 \
|
vimtutor-ru.UTF-8.1 \
|
||||||
xxd-ru.UTF-8.1 \
|
xxd-ru.UTF-8.1
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .o .txt .html
|
.SUFFIXES: .c .o .txt .html
|
||||||
|
|
||||||
all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
|
all: tags vim.man evim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
|
||||||
|
|
||||||
# Use Vim to generate the tags file. Can only be used when Vim has been
|
# Use Vim to generate the tags file. Can only be used when Vim has been
|
||||||
# compiled and installed. Supports multiple languages.
|
# compiled and installed. Supports multiple languages.
|
||||||
vimtags: $(DOCS)
|
vimtags: $(DOCS)
|
||||||
$(VIMEXE) -u NONE -esX -c "helptags ." -c quit
|
$(VIMEXE) -u NONE -esX -c "helptags ++t ." -c quit
|
||||||
|
|
||||||
# Use "doctags" to generate the tags file. Only works for English!
|
# Use "doctags" to generate the tags file. Only works for English!
|
||||||
tags: doctags $(DOCS)
|
tags: doctags $(DOCS)
|
||||||
@@ -314,6 +323,9 @@ doctags: doctags.c
|
|||||||
vim.man: vim.1
|
vim.man: vim.1
|
||||||
nroff -man vim.1 | sed -e s/.//g > vim.man
|
nroff -man vim.1 | sed -e s/.//g > vim.man
|
||||||
|
|
||||||
|
evim.man: evim.1
|
||||||
|
nroff -man evim.1 | sed -e s/.//g > evim.man
|
||||||
|
|
||||||
vimdiff.man: vimdiff.1
|
vimdiff.man: vimdiff.1
|
||||||
nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man
|
nroff -man vimdiff.1 | sed -e s/.//g > vimdiff.man
|
||||||
|
|
||||||
@@ -328,12 +340,14 @@ uganda.nsis.txt: uganda.txt
|
|||||||
uganda.txt | uniq >uganda.nsis.txt
|
uganda.txt | uniq >uganda.nsis.txt
|
||||||
|
|
||||||
# Awk version of .txt to .html conversion.
|
# Awk version of .txt to .html conversion.
|
||||||
html: noerrors tags tags.ref $(HTMLS)
|
html: noerrors tags $(HTMLS)
|
||||||
@if test -f errors.log; then more errors.log; fi
|
@if test -f errors.log; then more errors.log; fi
|
||||||
|
|
||||||
noerrors:
|
noerrors:
|
||||||
-rm -f errors.log
|
-rm -f errors.log
|
||||||
|
|
||||||
|
$(HTMLS): tags.ref
|
||||||
|
|
||||||
.txt.html:
|
.txt.html:
|
||||||
$(AWK) -f makehtml.awk $< >$@
|
$(AWK) -f makehtml.awk $< >$@
|
||||||
|
|
||||||
@@ -445,6 +459,21 @@ vimtutor-it.UTF-8.1: vimtutor-it.1
|
|||||||
xxd-it.UTF-8.1: xxd-it.1
|
xxd-it.UTF-8.1: xxd-it.1
|
||||||
iconv -f latin1 -t utf-8 $< >$@
|
iconv -f latin1 -t utf-8 $< >$@
|
||||||
|
|
||||||
|
vim-pl.UTF-8.1: vim-pl.1
|
||||||
|
iconv -f latin2 -t utf-8 $< >$@
|
||||||
|
|
||||||
|
evim-pl.UTF-8.1: evim-pl.1
|
||||||
|
iconv -f latin2 -t utf-8 $< >$@
|
||||||
|
|
||||||
|
vimdiff-pl.UTF-8.1: vimdiff-pl.1
|
||||||
|
iconv -f latin2 -t utf-8 $< >$@
|
||||||
|
|
||||||
|
vimtutor-pl.UTF-8.1: vimtutor-pl.1
|
||||||
|
iconv -f latin2 -t utf-8 $< >$@
|
||||||
|
|
||||||
|
xxd-pl.UTF-8.1: xxd-pl.1
|
||||||
|
iconv -f latin2 -t utf-8 $< >$@
|
||||||
|
|
||||||
vim-ru.UTF-8.1: vim-ru.1
|
vim-ru.UTF-8.1: vim-ru.1
|
||||||
iconv -f KOI8-R -t utf-8 $< >$@
|
iconv -f KOI8-R -t utf-8 $< >$@
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*arabic.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
*arabic.txt* For Vim version 7.3. Last change: 2010 Nov 13
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||||
@@ -146,7 +146,7 @@ o Enable Arabic settings [short-cut]
|
|||||||
:set arabic
|
:set arabic
|
||||||
<
|
<
|
||||||
The two above noted possible invocations are the preferred manner
|
The two above noted possible invocations are the preferred manner
|
||||||
in which users are instructed to proceed. Baring an enabled 'termbidi'
|
in which users are instructed to proceed. Barring an enabled 'termbidi'
|
||||||
setting, both command options:
|
setting, both command options:
|
||||||
|
|
||||||
1. set the appropriate keymap
|
1. set the appropriate keymap
|
||||||
@@ -275,7 +275,7 @@ o Keyboard
|
|||||||
+ CTRL-^ in insert/replace mode toggles between Arabic/Latin mode
|
+ CTRL-^ in insert/replace mode toggles between Arabic/Latin mode
|
||||||
|
|
||||||
+ Keyboard mapping is based on the Microsoft's Arabic keymap (the
|
+ Keyboard mapping is based on the Microsoft's Arabic keymap (the
|
||||||
defacto standard in the Arab world):
|
de facto standard in the Arab world):
|
||||||
|
|
||||||
+---------------------------------------------------------------------+
|
+---------------------------------------------------------------------+
|
||||||
|! |@ |# |$ |% |^ |& |* |( |) |_ |+ || |~ ّ |
|
|! |@ |# |$ |% |^ |& |* |( |) |_ |+ || |~ ّ |
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*autocmd.txt* For Vim version 7.1. Last change: 2007 Mar 27
|
*autocmd.txt* For Vim version 7.3. Last change: 2010 Jul 22
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -59,10 +59,10 @@ Note: The ":autocmd" command cannot be followed by another command, since any
|
|||||||
:au[tocmd] [group] {event} {pat} [nested] {cmd}
|
:au[tocmd] [group] {event} {pat} [nested] {cmd}
|
||||||
Add {cmd} to the list of commands that Vim will
|
Add {cmd} to the list of commands that Vim will
|
||||||
execute automatically on {event} for a file matching
|
execute automatically on {event} for a file matching
|
||||||
{pat}. Vim always adds the {cmd} after existing
|
{pat} |autocmd-patterns|.
|
||||||
autocommands, so that the autocommands execute in the
|
Vim always adds the {cmd} after existing autocommands,
|
||||||
order in which they were given. See |autocmd-nested|
|
so that the autocommands execute in the order in which
|
||||||
for [nested].
|
they were given. See |autocmd-nested| for [nested].
|
||||||
|
|
||||||
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
|
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
|
||||||
See |autocmd-buflocal|.
|
See |autocmd-buflocal|.
|
||||||
@@ -104,7 +104,7 @@ local to the script and use mappings local to the script. When the event is
|
|||||||
triggered and the command executed, it will run in the context of the script
|
triggered and the command executed, it will run in the context of the script
|
||||||
it was defined in. This matters if |<SID>| is used in a command.
|
it was defined in. This matters if |<SID>| is used in a command.
|
||||||
|
|
||||||
When executing the commands, the messages from one command overwrites a
|
When executing the commands, the message from one command overwrites a
|
||||||
previous message. This is different from when executing the commands
|
previous message. This is different from when executing the commands
|
||||||
manually. Mostly the screen will not scroll up, thus there is no hit-enter
|
manually. Mostly the screen will not scroll up, thus there is no hit-enter
|
||||||
prompt. When one command outputs two messages this can happen anyway.
|
prompt. When one command outputs two messages this can happen anyway.
|
||||||
@@ -334,7 +334,9 @@ BufDelete Before deleting a buffer from the buffer list.
|
|||||||
list is renamed.
|
list is renamed.
|
||||||
NOTE: When this autocommand is executed, the
|
NOTE: When this autocommand is executed, the
|
||||||
current buffer "%" may be different from the
|
current buffer "%" may be different from the
|
||||||
buffer being deleted "<afile>".
|
buffer being deleted "<afile>" and "<abuf>".
|
||||||
|
Don't change to another buffer, it will cause
|
||||||
|
problems.
|
||||||
*BufEnter*
|
*BufEnter*
|
||||||
BufEnter After entering a buffer. Useful for setting
|
BufEnter After entering a buffer. Useful for setting
|
||||||
options for a file type. Also executed when
|
options for a file type. Also executed when
|
||||||
@@ -397,13 +399,23 @@ BufUnload Before unloading a buffer. This is when the
|
|||||||
NOTE: When this autocommand is executed, the
|
NOTE: When this autocommand is executed, the
|
||||||
current buffer "%" may be different from the
|
current buffer "%" may be different from the
|
||||||
buffer being unloaded "<afile>".
|
buffer being unloaded "<afile>".
|
||||||
|
Don't change to another buffer, it will cause
|
||||||
|
problems.
|
||||||
|
When exiting and v:dying is 2 or more this
|
||||||
|
event is not triggered.
|
||||||
*BufWinEnter*
|
*BufWinEnter*
|
||||||
BufWinEnter After a buffer is displayed in a window. This
|
BufWinEnter After a buffer is displayed in a window. This
|
||||||
can be when the buffer is loaded (after
|
can be when the buffer is loaded (after
|
||||||
processing the modelines), when a hidden
|
processing the modelines) or when a hidden
|
||||||
buffer is displayed in a window (and is no
|
buffer is displayed in a window (and is no
|
||||||
longer hidden) or a buffer already visible in
|
longer hidden).
|
||||||
a window is also displayed in another window.
|
Does not happen for |:split| without
|
||||||
|
arguments, since you keep editing the same
|
||||||
|
buffer, or ":split" with a file that's already
|
||||||
|
open in a window, because it re-uses an
|
||||||
|
existing buffer. But it does happen for a
|
||||||
|
":split" with the name of the current buffer,
|
||||||
|
since it reloads that buffer.
|
||||||
*BufWinLeave*
|
*BufWinLeave*
|
||||||
BufWinLeave Before a buffer is removed from a window.
|
BufWinLeave Before a buffer is removed from a window.
|
||||||
Not when it's still visible in another window.
|
Not when it's still visible in another window.
|
||||||
@@ -412,6 +424,8 @@ BufWinLeave Before a buffer is removed from a window.
|
|||||||
NOTE: When this autocommand is executed, the
|
NOTE: When this autocommand is executed, the
|
||||||
current buffer "%" may be different from the
|
current buffer "%" may be different from the
|
||||||
buffer being unloaded "<afile>".
|
buffer being unloaded "<afile>".
|
||||||
|
When exiting and v:dying is 2 or more this
|
||||||
|
event is not triggered.
|
||||||
*BufWipeout*
|
*BufWipeout*
|
||||||
BufWipeout Before completely deleting a buffer. The
|
BufWipeout Before completely deleting a buffer. The
|
||||||
BufUnload and BufDelete events may be called
|
BufUnload and BufDelete events may be called
|
||||||
@@ -422,6 +436,8 @@ BufWipeout Before completely deleting a buffer. The
|
|||||||
NOTE: When this autocommand is executed, the
|
NOTE: When this autocommand is executed, the
|
||||||
current buffer "%" may be different from the
|
current buffer "%" may be different from the
|
||||||
buffer being deleted "<afile>".
|
buffer being deleted "<afile>".
|
||||||
|
Don't change to another buffer, it will cause
|
||||||
|
problems.
|
||||||
*BufWrite* *BufWritePre*
|
*BufWrite* *BufWritePre*
|
||||||
BufWrite or BufWritePre Before writing the whole buffer to a file.
|
BufWrite or BufWritePre Before writing the whole buffer to a file.
|
||||||
*BufWriteCmd*
|
*BufWriteCmd*
|
||||||
@@ -539,7 +555,7 @@ FileChangedShell When Vim notices that the modification time of
|
|||||||
buffer that was changed "<afile>".
|
buffer that was changed "<afile>".
|
||||||
NOTE: The commands must not change the current
|
NOTE: The commands must not change the current
|
||||||
buffer, jump to another buffer or delete a
|
buffer, jump to another buffer or delete a
|
||||||
buffer. *E246*
|
buffer. *E246* *E811*
|
||||||
NOTE: This event never nests, to avoid an
|
NOTE: This event never nests, to avoid an
|
||||||
endless loop. This means that while executing
|
endless loop. This means that while executing
|
||||||
commands for the FileChangedShell event no
|
commands for the FileChangedShell event no
|
||||||
@@ -666,10 +682,10 @@ MenuPopup Just before showing the popup menu (under the
|
|||||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||||
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
||||||
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|
||||||
|:vimgrepadd|, |:lvimgrepadd|). The pattern is
|
|:vimgrepadd|, |:lvimgrepadd|, |:cscope|).
|
||||||
matched against the command being run. When
|
The pattern is matched against the command
|
||||||
|:grep| is used but 'grepprg' is set to
|
being run. When |:grep| is used but 'grepprg'
|
||||||
"internal" it still matches "grep".
|
is set to "internal" it still matches "grep".
|
||||||
This command cannot be used to set the
|
This command cannot be used to set the
|
||||||
'makeprg' and 'grepprg' variables.
|
'makeprg' and 'grepprg' variables.
|
||||||
If this command causes an error, the quickfix
|
If this command causes an error, the quickfix
|
||||||
@@ -677,7 +693,7 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
|
|||||||
*QuickFixCmdPost*
|
*QuickFixCmdPost*
|
||||||
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||||
command is run, before jumping to the first
|
command is run, before jumping to the first
|
||||||
location.
|
location. See |QuickFixCmdPost-example|.
|
||||||
*RemoteReply*
|
*RemoteReply*
|
||||||
RemoteReply When a reply from a Vim that functions as
|
RemoteReply When a reply from a Vim that functions as
|
||||||
server was received |server2client()|. The
|
server was received |server2client()|. The
|
||||||
@@ -742,8 +758,10 @@ SwapExists Detected an existing swap file when starting
|
|||||||
'a' abort, like hitting CTRL-C
|
'a' abort, like hitting CTRL-C
|
||||||
When set to an empty string the user will be
|
When set to an empty string the user will be
|
||||||
asked, as if there was no SwapExists autocmd.
|
asked, as if there was no SwapExists autocmd.
|
||||||
Note: Do not try to change the buffer, the
|
*E812*
|
||||||
results are unpredictable.
|
It is not allowed to change to another buffer,
|
||||||
|
change a buffer name or change directory
|
||||||
|
here.
|
||||||
*Syntax*
|
*Syntax*
|
||||||
Syntax When the 'syntax' option has been set. The
|
Syntax When the 'syntax' option has been set. The
|
||||||
pattern is matched against the syntax name.
|
pattern is matched against the syntax name.
|
||||||
@@ -785,6 +803,8 @@ VimLeave Before exiting Vim, just after writing the
|
|||||||
.viminfo file. Executed only once, like
|
.viminfo file. Executed only once, like
|
||||||
VimLeavePre.
|
VimLeavePre.
|
||||||
To detect an abnormal exit use |v:dying|.
|
To detect an abnormal exit use |v:dying|.
|
||||||
|
When v:dying is 2 or more this event is not
|
||||||
|
triggered.
|
||||||
*VimLeavePre*
|
*VimLeavePre*
|
||||||
VimLeavePre Before exiting Vim, just before writing the
|
VimLeavePre Before exiting Vim, just before writing the
|
||||||
.viminfo file. This is executed only once,
|
.viminfo file. This is executed only once,
|
||||||
@@ -793,6 +813,8 @@ VimLeavePre Before exiting Vim, just before writing the
|
|||||||
Mostly useful with a "*" pattern. >
|
Mostly useful with a "*" pattern. >
|
||||||
:autocmd VimLeavePre * call CleanupStuff()
|
:autocmd VimLeavePre * call CleanupStuff()
|
||||||
< To detect an abnormal exit use |v:dying|.
|
< To detect an abnormal exit use |v:dying|.
|
||||||
|
When v:dying is 2 or more this event is not
|
||||||
|
triggered.
|
||||||
*VimResized*
|
*VimResized*
|
||||||
VimResized After the Vim window was resized, thus 'lines'
|
VimResized After the Vim window was resized, thus 'lines'
|
||||||
and/or 'columns' changed. Not when starting
|
and/or 'columns' changed. Not when starting
|
||||||
@@ -821,9 +843,9 @@ The file pattern {pat} is tested for a match against the file name in one of
|
|||||||
two ways:
|
two ways:
|
||||||
1. When there is no '/' in the pattern, Vim checks for a match against only
|
1. When there is no '/' in the pattern, Vim checks for a match against only
|
||||||
the tail part of the file name (without its leading directory path).
|
the tail part of the file name (without its leading directory path).
|
||||||
2. When there is a '/' in the pattern, Vim checks for a match against the
|
2. When there is a '/' in the pattern, Vim checks for a match against both the
|
||||||
both short file name (as you typed it) and the full file name (after
|
short file name (as you typed it) and the full file name (after expanding
|
||||||
expanding it to a full path and resolving symbolic links).
|
it to a full path and resolving symbolic links).
|
||||||
|
|
||||||
The special pattern <buffer> or <buffer=N> is used for buffer-local
|
The special pattern <buffer> or <buffer=N> is used for buffer-local
|
||||||
autocommands |autocmd-buflocal|. This pattern is not matched against the name
|
autocommands |autocmd-buflocal|. This pattern is not matched against the name
|
||||||
@@ -848,7 +870,7 @@ This autocommand will for example be executed for "/tmp/doc/xx.txt" and
|
|||||||
|
|
||||||
|
|
||||||
The file name that the pattern is matched against is after expanding
|
The file name that the pattern is matched against is after expanding
|
||||||
wildcards. Thus is you issue this command: >
|
wildcards. Thus if you issue this command: >
|
||||||
:e $ROOTDIR/main.$EXT
|
:e $ROOTDIR/main.$EXT
|
||||||
The argument is first expanded to: >
|
The argument is first expanded to: >
|
||||||
/usr/root/main.py
|
/usr/root/main.py
|
||||||
@@ -927,7 +949,7 @@ simply use the special string instead of the pattern. Examples: >
|
|||||||
" current buffer
|
" current buffer
|
||||||
:au! * <buffer=33> " remove buffer-local autocommands for
|
:au! * <buffer=33> " remove buffer-local autocommands for
|
||||||
" buffer #33
|
" buffer #33
|
||||||
:dobuf :au! CursorHold <buffer> " remove autocmd for given event for all
|
:bufdo :au! CursorHold <buffer> " remove autocmd for given event for all
|
||||||
" buffers
|
" buffers
|
||||||
:au * <buffer> " list buffer-local autocommands for
|
:au * <buffer> " list buffer-local autocommands for
|
||||||
" current buffer
|
" current buffer
|
||||||
@@ -1031,13 +1053,14 @@ option will not cause any commands to be executed.
|
|||||||
undefined group name, Vim gives you an error message.
|
undefined group name, Vim gives you an error message.
|
||||||
|
|
||||||
After applying the autocommands the modelines are
|
After applying the autocommands the modelines are
|
||||||
processed, so that their overrule the settings from
|
processed, so that their settings overrule the
|
||||||
autocommands, like what happens when editing a file.
|
settings from autocommands, like what happens when
|
||||||
|
editing a file.
|
||||||
|
|
||||||
*:doautoa* *:doautoall*
|
*:doautoa* *:doautoall*
|
||||||
:doautoa[ll] [group] {event} [fname]
|
:doautoa[ll] [group] {event} [fname]
|
||||||
Like ":doautocmd", but apply the autocommands to each
|
Like ":doautocmd", but apply the autocommands to each
|
||||||
loaded buffer. Note that {fname} is used to select
|
loaded buffer. Note that [fname] is used to select
|
||||||
the autocommands, not the buffers to which they are
|
the autocommands, not the buffers to which they are
|
||||||
applied.
|
applied.
|
||||||
Careful: Don't use this for autocommands that delete a
|
Careful: Don't use this for autocommands that delete a
|
||||||
@@ -1257,7 +1280,7 @@ and "++ff=" argument that are effective. These should be used for the command
|
|||||||
that reads/writes the file. The |v:cmdbang| variable is one when "!" was
|
that reads/writes the file. The |v:cmdbang| variable is one when "!" was
|
||||||
used, zero otherwise.
|
used, zero otherwise.
|
||||||
|
|
||||||
See the $VIMRUNTIME/plugin/netrw.vim for examples.
|
See the $VIMRUNTIME/plugin/netrwPlugin.vim for examples.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
11. Disabling autocommands *autocmd-disable*
|
11. Disabling autocommands *autocmd-disable*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*change.txt* For Vim version 7.1. Last change: 2007 Jan 07
|
*change.txt* For Vim version 7.3. Last change: 2011 Feb 25
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -159,7 +159,7 @@ gR Enter Virtual Replace mode: Each character you type
|
|||||||
<Tab> may replace several characters at once.
|
<Tab> may replace several characters at once.
|
||||||
Repeat the entered text [count]-1 times. See
|
Repeat the entered text [count]-1 times. See
|
||||||
|Virtual-Replace-mode| for more details.
|
|Virtual-Replace-mode| for more details.
|
||||||
{not available when compiled without the +vreplace
|
{not available when compiled without the |+vreplace|
|
||||||
feature}
|
feature}
|
||||||
|
|
||||||
*c*
|
*c*
|
||||||
@@ -229,16 +229,18 @@ key restores the original text (if there was any). (See section "Insert and
|
|||||||
Replace mode" |mode-ins-repl|).
|
Replace mode" |mode-ins-repl|).
|
||||||
|
|
||||||
*cw* *cW*
|
*cw* *cW*
|
||||||
Special case: "cw" and "cW" work the same as "ce" and "cE" if the cursor is
|
Special case: When the cursor is in a word, "cw" and "cW" do not include the
|
||||||
on a non-blank. This is because Vim interprets "cw" as change-word, and a
|
white space after a word, they only change up to the end of the word. This is
|
||||||
word does not include the following white space. {Vi: "cw" when on a blank
|
because Vim interprets "cw" as change-word, and a word does not include the
|
||||||
followed by other blanks changes only the first blank; this is probably a
|
following white space.
|
||||||
bug, because "dw" deletes all the blanks; use the 'w' flag in 'cpoptions' to
|
{Vi: "cw" when on a blank followed by other blanks changes only the first
|
||||||
make it work like Vi anyway}
|
blank; this is probably a bug, because "dw" deletes all the blanks; use the
|
||||||
|
'w' flag in 'cpoptions' to make it work like Vi anyway}
|
||||||
|
|
||||||
If you prefer "cw" to include the space after a word, use this mapping: >
|
If you prefer "cw" to include the space after a word, use this mapping: >
|
||||||
:map cw dwi
|
:map cw dwi
|
||||||
<
|
Or use "caw" (see |aw|).
|
||||||
|
|
||||||
*:c* *:ch* *:change*
|
*:c* *:ch* *:change*
|
||||||
:{range}c[hange][!] Replace lines of text with some different text.
|
:{range}c[hange][!] Replace lines of text with some different text.
|
||||||
Type a line containing only "." to stop replacing.
|
Type a line containing only "." to stop replacing.
|
||||||
@@ -277,7 +279,7 @@ gr{char} Replace the virtual characters under the cursor with
|
|||||||
space. See |gR| and |Virtual-Replace-mode| for more
|
space. See |gR| and |Virtual-Replace-mode| for more
|
||||||
details. As with |r| a count may be given.
|
details. As with |r| a count may be given.
|
||||||
{char} can be entered like with |r|.
|
{char} can be entered like with |r|.
|
||||||
{not available when compiled without the +vreplace
|
{not available when compiled without the |+vreplace|
|
||||||
feature}
|
feature}
|
||||||
|
|
||||||
*digraph-arg*
|
*digraph-arg*
|
||||||
@@ -345,6 +347,10 @@ g?{motion} Rot13 encode {motion} text. {not in Vi}
|
|||||||
g?g? *g?g?* *g??*
|
g?g? *g?g?* *g??*
|
||||||
g?? Rot13 encode current line. {not in Vi}.
|
g?? Rot13 encode current line. {not in Vi}.
|
||||||
|
|
||||||
|
To turn one line into title caps, make every first letter of a word
|
||||||
|
uppercase: >
|
||||||
|
:s/\v<(.)(\w*)/\u\1\L\2/g
|
||||||
|
|
||||||
|
|
||||||
Adding and subtracting ~
|
Adding and subtracting ~
|
||||||
*CTRL-A*
|
*CTRL-A*
|
||||||
@@ -474,7 +480,7 @@ For example: >
|
|||||||
|
|
||||||
A filter is a program that accepts text at standard input, changes it in some
|
A filter is a program that accepts text at standard input, changes it in some
|
||||||
way, and sends it to standard output. You can use the commands below to send
|
way, and sends it to standard output. You can use the commands below to send
|
||||||
some text through a filter, so that it is replace by the filter output.
|
some text through a filter, so that it is replaced by the filter output.
|
||||||
Examples of filters are "sort", which sorts lines alphabetically, and
|
Examples of filters are "sort", which sorts lines alphabetically, and
|
||||||
"indent", which formats C program files (you need a version of indent that
|
"indent", which formats C program files (you need a version of indent that
|
||||||
works like a filter; not all versions do). The 'shell' option specifies the
|
works like a filter; not all versions do). The 'shell' option specifies the
|
||||||
@@ -500,9 +506,9 @@ comment (starting with '"') after the ":!" command.
|
|||||||
{filter}. Vim replaces the optional bangs with the
|
{filter}. Vim replaces the optional bangs with the
|
||||||
latest given command and appends the optional [arg].
|
latest given command and appends the optional [arg].
|
||||||
Vim saves the output of the filter command in a
|
Vim saves the output of the filter command in a
|
||||||
temporary file and then reads the file into the
|
temporary file and then reads the file into the buffer
|
||||||
buffer. Vim uses the 'shellredir' option to redirect
|
|tempfile|. Vim uses the 'shellredir' option to
|
||||||
the filter output to the temporary file.
|
redirect the filter output to the temporary file.
|
||||||
However, if the 'shelltemp' option is off then pipes
|
However, if the 'shelltemp' option is off then pipes
|
||||||
are used when possible (on Unix).
|
are used when possible (on Unix).
|
||||||
When the 'R' flag is included in 'cpoptions' marks in
|
When the 'R' flag is included in 'cpoptions' marks in
|
||||||
@@ -518,7 +524,9 @@ comment (starting with '"') after the ":!" command.
|
|||||||
option is empty (this is the default), use the
|
option is empty (this is the default), use the
|
||||||
internal formatting function |C-indenting|. But when
|
internal formatting function |C-indenting|. But when
|
||||||
'indentexpr' is not empty, it will be used instead
|
'indentexpr' is not empty, it will be used instead
|
||||||
|indent-expression|.
|
|indent-expression|. When Vim was compiled without
|
||||||
|
internal formatting then the "indent" program is used
|
||||||
|
as a last resort.
|
||||||
|
|
||||||
*==*
|
*==*
|
||||||
== Filter [count] lines like with ={motion}.
|
== Filter [count] lines like with ={motion}.
|
||||||
@@ -528,6 +536,22 @@ comment (starting with '"') after the ":!" command.
|
|||||||
{not in Vi}
|
{not in Vi}
|
||||||
|
|
||||||
|
|
||||||
|
*tempfile* *setuid*
|
||||||
|
Vim uses temporary files for filtering, generating diffs and also for
|
||||||
|
tempname(). For Unix, the file will be in a private directory (only
|
||||||
|
accessible by the current user) to avoid security problems (e.g., a symlink
|
||||||
|
attack or other people reading your file). When Vim exits the directory and
|
||||||
|
all files in it are deleted. When Vim has the setuid bit set this may cause
|
||||||
|
problems, the temp file is owned by the setuid user but the filter command
|
||||||
|
probably runs as the original user.
|
||||||
|
On MS-DOS and OS/2 the first of these directories that works is used: $TMP,
|
||||||
|
$TEMP, c:\TMP, c:\TEMP.
|
||||||
|
For Unix the list of directories is: $TMPDIR, /tmp, current-dir, $HOME.
|
||||||
|
For MS-Windows the GetTempFileName() system function is used.
|
||||||
|
For other systems the tmpnam() library function is used.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
4.2 Substitute *:substitute*
|
4.2 Substitute *:substitute*
|
||||||
*:s* *:su*
|
*:s* *:su*
|
||||||
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
|
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
|
||||||
@@ -561,7 +585,7 @@ comment (starting with '"') after the ":!" command.
|
|||||||
":&r". See |:s_flags| for [flags].
|
":&r". See |:s_flags| for [flags].
|
||||||
|
|
||||||
*&*
|
*&*
|
||||||
& Synonym for ":s//~/" (repeat last substitute). Note
|
& Synonym for ":s" (repeat last substitute). Note
|
||||||
that the flags are not remembered, thus it might
|
that the flags are not remembered, thus it might
|
||||||
actually work differently. You can use ":&&" to keep
|
actually work differently. You can use ":&&" to keep
|
||||||
the flags.
|
the flags.
|
||||||
@@ -598,9 +622,9 @@ The flags that you can use for the substitute commands:
|
|||||||
'a' to substitute this and all remaining matches {not in Vi}
|
'a' to substitute this and all remaining matches {not in Vi}
|
||||||
'q' to quit substituting {not in Vi}
|
'q' to quit substituting {not in Vi}
|
||||||
CTRL-E to scroll the screen up {not in Vi, not available when
|
CTRL-E to scroll the screen up {not in Vi, not available when
|
||||||
compiled without the +insert_expand feature}
|
compiled without the |+insert_expand| feature}
|
||||||
CTRL-Y to scroll the screen down {not in Vi, not available when
|
CTRL-Y to scroll the screen down {not in Vi, not available when
|
||||||
compiled without the +insert_expand feature}
|
compiled without the |+insert_expand| feature}
|
||||||
If the 'edcompatible' option is on, Vim remembers the [c] flag and
|
If the 'edcompatible' option is on, Vim remembers the [c] flag and
|
||||||
toggles it each time you use it, but resets it when you give a new
|
toggles it each time you use it, but resets it when you give a new
|
||||||
search pattern.
|
search pattern.
|
||||||
@@ -661,12 +685,13 @@ The flags that you can use for the substitute commands:
|
|||||||
{not in Vi}
|
{not in Vi}
|
||||||
|
|
||||||
Note that there is no flag to change the "magicness" of the pattern. A
|
Note that there is no flag to change the "magicness" of the pattern. A
|
||||||
different command is used instead. The reason is that the flags can only be
|
different command is used instead, or you can use |/\v| and friends. The
|
||||||
found by skipping the pattern, and in order to skip the pattern the
|
reason is that the flags can only be found by skipping the pattern, and in
|
||||||
"magicness" must be known. Catch 22!
|
order to skip the pattern the "magicness" must be known. Catch 22!
|
||||||
|
|
||||||
If the {pattern} for the substitute command is empty, the command uses the
|
If the {pattern} for the substitute command is empty, the command uses the
|
||||||
pattern from the last substitute or ":global" command. With the [r] flag, the
|
pattern from the last substitute or ":global" command. If there is none, but
|
||||||
|
there is a previous search pattern, that one is used. With the [r] flag, the
|
||||||
command uses the pattern from the last substitute, ":global", or search
|
command uses the pattern from the last substitute, ":global", or search
|
||||||
command.
|
command.
|
||||||
|
|
||||||
@@ -686,7 +711,9 @@ can use any other single-byte character, but not an alphanumeric character,
|
|||||||
pattern or replacement string. Example: >
|
pattern or replacement string. Example: >
|
||||||
:s+/+//+
|
:s+/+//+
|
||||||
|
|
||||||
For the definition of a pattern, see |pattern|.
|
For the definition of a pattern, see |pattern|. In Visual block mode, use
|
||||||
|
|/\%V| in the pattern to have the substitute work in the block only.
|
||||||
|
Otherwise it works on whole lines anyway.
|
||||||
|
|
||||||
*sub-replace-special* *:s\=*
|
*sub-replace-special* *:s\=*
|
||||||
When the {string} starts with "\=" it is evaluated as an expression, see
|
When the {string} starts with "\=" it is evaluated as an expression, see
|
||||||
@@ -764,9 +791,9 @@ expression. This does not work recursively: a substitute() function inside
|
|||||||
the expression cannot use "\=" for the substitute string.
|
the expression cannot use "\=" for the substitute string.
|
||||||
|
|
||||||
The special meaning for characters as mentioned at |sub-replace-special| does
|
The special meaning for characters as mentioned at |sub-replace-special| does
|
||||||
not apply except "<CR>", "\<CR>" and "\\". Thus in the result of the
|
not apply except for "<CR>", "\<CR>" and "\\". Thus in the result of the
|
||||||
expression you need to use two backslashes get one, put a backslash before a
|
expression you need to use two backslashes to get one, put a backslash before a
|
||||||
<CR> you want to insert and use a <CR> without a backslash where you want to
|
<CR> you want to insert, and use a <CR> without a backslash where you want to
|
||||||
break the line.
|
break the line.
|
||||||
|
|
||||||
For convenience a <NL> character is also used as a line break. Prepend a
|
For convenience a <NL> character is also used as a line break. Prepend a
|
||||||
@@ -789,7 +816,7 @@ Examples: >
|
|||||||
This replaces an end-of-line with a new line containing the value of $HOME. >
|
This replaces an end-of-line with a new line containing the value of $HOME. >
|
||||||
|
|
||||||
s/E/\="\<Char-0x20ac>"/g
|
s/E/\="\<Char-0x20ac>"/g
|
||||||
This replaces 'E' characters with an euro sign. Read more in |<Char->|.
|
This replaces each 'E' character with a euro sign. Read more in |<Char->|.
|
||||||
|
|
||||||
|
|
||||||
4.3 Search and replace *search-replace*
|
4.3 Search and replace *search-replace*
|
||||||
@@ -853,7 +880,10 @@ inside of strings can change! Also see 'softtabstop' option. >
|
|||||||
|
|
||||||
*:reg* *:registers*
|
*:reg* *:registers*
|
||||||
:reg[isters] Display the contents of all numbered and named
|
:reg[isters] Display the contents of all numbered and named
|
||||||
registers. {not in Vi}
|
registers. If a register is written to for |:redir|
|
||||||
|
it will not be listed.
|
||||||
|
{not in Vi}
|
||||||
|
|
||||||
|
|
||||||
:reg[isters] {arg} Display the contents of the numbered and named
|
:reg[isters] {arg} Display the contents of the numbered and named
|
||||||
registers that are mentioned in {arg}. For example: >
|
registers that are mentioned in {arg}. For example: >
|
||||||
@@ -986,6 +1016,11 @@ register. With blockwise selection it also depends on the size of the block
|
|||||||
and whether the corners are on an existing character. (Implementation detail:
|
and whether the corners are on an existing character. (Implementation detail:
|
||||||
it actually works by first putting the register after the selection and then
|
it actually works by first putting the register after the selection and then
|
||||||
deleting the selection.)
|
deleting the selection.)
|
||||||
|
The previously selected text is put in the unnamed register. If you want to
|
||||||
|
put the same text into a Visual selection several times you need to use
|
||||||
|
another register. E.g., yank the text to copy, Visually select the text to
|
||||||
|
replace and use "0p . You can repeat this as many times as you like, the
|
||||||
|
unnamed register will be changed each time.
|
||||||
|
|
||||||
*blockwise-register*
|
*blockwise-register*
|
||||||
If you use a blockwise Visual mode command to get the text into the register,
|
If you use a blockwise Visual mode command to get the text into the register,
|
||||||
@@ -1023,8 +1058,10 @@ There are nine types of registers: *registers* *E354*
|
|||||||
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
|
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
|
||||||
or copied with the yank "y" command, regardless of whether or not a specific
|
or copied with the yank "y" command, regardless of whether or not a specific
|
||||||
register was used (e.g. "xdd). This is like the unnamed register is pointing
|
register was used (e.g. "xdd). This is like the unnamed register is pointing
|
||||||
to the last used register. An exception is the '_' register: "_dd does not
|
to the last used register. Thus when appending using an uppercase register
|
||||||
store the deleted text in any register.
|
name, the unnamed register contains the same text as the named register.
|
||||||
|
An exception is the '_' register: "_dd does not store the deleted text in any
|
||||||
|
register.
|
||||||
Vim uses the contents of the unnamed register for any put command (p or P)
|
Vim uses the contents of the unnamed register for any put command (p or P)
|
||||||
which does not specify a register. Additionally you can access it with the
|
which does not specify a register. Additionally you can access it with the
|
||||||
name '"'. This means you have to type two double quotes. Writing to the ""
|
name '"'. This means you have to type two double quotes. Writing to the ""
|
||||||
@@ -1090,15 +1127,20 @@ normal command-line editing commands are available, including a special
|
|||||||
history for expressions. When you end the command-line by typing <CR>, Vim
|
history for expressions. When you end the command-line by typing <CR>, Vim
|
||||||
computes the result of the expression. If you end it with <Esc>, Vim abandons
|
computes the result of the expression. If you end it with <Esc>, Vim abandons
|
||||||
the expression. If you do not enter an expression, Vim uses the previous
|
the expression. If you do not enter an expression, Vim uses the previous
|
||||||
expression (like with the "/" command). The expression must evaluate to a
|
expression (like with the "/" command).
|
||||||
string. If the result is a number it's turned into a string. A List,
|
|
||||||
Dictionary or FuncRef results in an error message (use string() to convert).
|
The expression must evaluate to a String. A Number is always automatically
|
||||||
If the "= register is used for the "p" command, the string is split up at <NL>
|
converted to a String. For the "p" and ":put" command, if the result is a
|
||||||
characters. If the string ends in a <NL>, it is regarded as a linewise
|
Float it's converted into a String. If the result is a List each element is
|
||||||
|
turned into a String and used as a line. A Dictionary or FuncRef results in
|
||||||
|
an error message (use string() to convert).
|
||||||
|
|
||||||
|
If the "= register is used for the "p" command, the String is split up at <NL>
|
||||||
|
characters. If the String ends in a <NL>, it is regarded as a linewise
|
||||||
register. {not in Vi}
|
register. {not in Vi}
|
||||||
|
|
||||||
7. Selection and drop registers "*, "+ and "~
|
7. Selection and drop registers "*, "+ and "~
|
||||||
Use these register for storing and retrieving the selected text for the GUI.
|
Use these registers for storing and retrieving the selected text for the GUI.
|
||||||
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
||||||
working, the unnamed register is used instead. For Unix systems the clipboard
|
working, the unnamed register is used instead. For Unix systems the clipboard
|
||||||
is only available when the |+xterm_clipboard| feature is present. {not in Vi}
|
is only available when the |+xterm_clipboard| feature is present. {not in Vi}
|
||||||
@@ -1128,7 +1170,10 @@ nothing is returned. {not in Vi}
|
|||||||
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
Contains the most recent search-pattern. This is used for "n" and 'hlsearch'.
|
||||||
It is writable with ":let", you can change it to have 'hlsearch' highlight
|
It is writable with ":let", you can change it to have 'hlsearch' highlight
|
||||||
other matches without actually searching. You can't yank or delete into this
|
other matches without actually searching. You can't yank or delete into this
|
||||||
register. {not in Vi}
|
register. The search direction is available in |v:searchforward|.
|
||||||
|
Note that the valued is restored when returning from a function
|
||||||
|
|function-search-undo|.
|
||||||
|
{not in Vi}
|
||||||
|
|
||||||
*@/*
|
*@/*
|
||||||
You can write to a register with a ":let" command |:let-@|. Example: >
|
You can write to a register with a ":let" command |:let-@|. Example: >
|
||||||
@@ -1201,7 +1246,8 @@ gq{motion} Format the lines that {motion} moves over.
|
|||||||
:nnoremap Q gq
|
:nnoremap Q gq
|
||||||
|
|
||||||
gqgq *gqgq* *gqq*
|
gqgq *gqgq* *gqq*
|
||||||
gqq Format the current line. {not in Vi}
|
gqq Format the current line. With a count format that
|
||||||
|
many lines. {not in Vi}
|
||||||
|
|
||||||
*v_gq*
|
*v_gq*
|
||||||
{Visual}gq Format the highlighted text. (for {Visual} see
|
{Visual}gq Format the highlighted text. (for {Visual} see
|
||||||
@@ -1253,9 +1299,11 @@ an external command, like "par" (e.g.: "!}par" to format until the end of the
|
|||||||
paragraph) or set 'formatprg' to "par".
|
paragraph) or set 'formatprg' to "par".
|
||||||
|
|
||||||
*format-comments*
|
*format-comments*
|
||||||
Vim can format comments in a special way. Vim recognizes a comment by a
|
An overview of comment formatting is in section |30.6| of the user manual.
|
||||||
specific string at the start of the line (ignoring white space). Three types
|
|
||||||
of comments can be used:
|
Vim can automatically insert and format comments in a special way. Vim
|
||||||
|
recognizes a comment by a specific string at the start of the line (ignoring
|
||||||
|
white space). Three types of comments can be used:
|
||||||
|
|
||||||
- A comment string that repeats at the start of each line. An example is the
|
- A comment string that repeats at the start of each line. An example is the
|
||||||
type of comment used in shell scripts, starting with "#".
|
type of comment used in shell scripts, starting with "#".
|
||||||
@@ -1263,7 +1311,7 @@ of comments can be used:
|
|||||||
lines. An example is this list with dashes.
|
lines. An example is this list with dashes.
|
||||||
- Three-piece comments that have a start string, an end string, and optional
|
- Three-piece comments that have a start string, an end string, and optional
|
||||||
lines in between. The strings for the start, middle and end are different.
|
lines in between. The strings for the start, middle and end are different.
|
||||||
An example is the C-style comment:
|
An example is the C style comment:
|
||||||
/*
|
/*
|
||||||
* this is a C comment
|
* this is a C comment
|
||||||
*/
|
*/
|
||||||
@@ -1289,23 +1337,24 @@ type of comment string. A part consists of:
|
|||||||
|
|
||||||
e End of a three-piece comment
|
e End of a three-piece comment
|
||||||
|
|
||||||
l Left adjust middle with start or end (default). Only recognized when
|
l Left align. Used together with 's' or 'e', the leftmost character of
|
||||||
used together with 's' or 'e'.
|
start or end will line up with the leftmost character from the middle.
|
||||||
|
This is the default and can be omitted. See below for more details.
|
||||||
|
|
||||||
r Right adjust middle with start or end. Only recognized when used
|
r Right align. Same as above but rightmost instead of leftmost. See
|
||||||
together with 's' or 'e'.
|
below for more details.
|
||||||
|
|
||||||
O Don't use this one for the "O" command.
|
O Don't consider this comment for the "O" command.
|
||||||
|
|
||||||
x Allows three-piece comments to be ended by just typing the last
|
x Allows three-piece comments to be ended by just typing the last
|
||||||
character of the end-comment string as the first character on a new
|
character of the end-comment string as the first action on a new
|
||||||
line, when the middle-comment string has already been inserted
|
line when the middle-comment string has been inserted automatically.
|
||||||
automatically. See below for more details.
|
See below for more details.
|
||||||
|
|
||||||
{digits}
|
{digits}
|
||||||
When together with 's' or 'e': add extra indent for the middle part.
|
When together with 's' or 'e': add {digit} amount of offset to an
|
||||||
This can be used to left-align the middle part with the start or end
|
automatically inserted middle or end comment leader. The offset begins
|
||||||
and then add an offset.
|
from a left alignment. See below for more details.
|
||||||
|
|
||||||
-{digits}
|
-{digits}
|
||||||
Like {digits} but reduce the indent. This only works when there is
|
Like {digits} but reduce the indent. This only works when there is
|
||||||
@@ -1334,12 +1383,42 @@ have a middle string because otherwise Vim can't recognize the middle lines.
|
|||||||
|
|
||||||
Notice the use of the "x" flag in the above three-piece comment definition.
|
Notice the use of the "x" flag in the above three-piece comment definition.
|
||||||
When you hit Return in a C-comment, Vim will insert the middle comment leader
|
When you hit Return in a C-comment, Vim will insert the middle comment leader
|
||||||
for the new line, e.g. " * ". To close this comment you just have to type "/"
|
for the new line: " * ". To close this comment you just have to type "/"
|
||||||
before typing anything else on the new line. This will replace the
|
before typing anything else on the new line. This will replace the
|
||||||
middle-comment leader with the end-comment leader, leaving just " */". There
|
middle-comment leader with the end-comment leader and apply any specified
|
||||||
is no need to hit BackSpace first.
|
alignment, leaving just " */". There is no need to hit BackSpace first.
|
||||||
|
|
||||||
Examples: >
|
|
||||||
|
Here is an example of alignment flags at work to make a comment stand out
|
||||||
|
(kind of looks like a 1 too). Consider comment string >
|
||||||
|
sr:/***,m:**,ex2:******/
|
||||||
|
|
||||||
|
/***
|
||||||
|
**<--right aligned from "r" flag
|
||||||
|
**
|
||||||
|
offset 2 spaces from the "2" flag--->**
|
||||||
|
******/
|
||||||
|
In this case, the first comment was typed, then return was pressed 4 times,
|
||||||
|
then "/" was pressed to end the comment.
|
||||||
|
|
||||||
|
Here are some finer points of three part comments. There are three times when
|
||||||
|
alignment and offset flags are taken into consideration: opening a new line
|
||||||
|
after a start-comment, opening a new line before an end-comment, and
|
||||||
|
automatically ending a three-piece comment. The end alignment flag has a
|
||||||
|
backwards perspective; the result is that the same alignment flag used with
|
||||||
|
"s" and "e" will result in the same indent for the starting and ending pieces.
|
||||||
|
Only one alignment per comment part is meant to be used, but an offset number
|
||||||
|
will override the "r" and "l" flag.
|
||||||
|
|
||||||
|
Enabling 'cindent' will override the alignment flags in many cases.
|
||||||
|
Reindenting using a different method like |gq| or |=| will not consult
|
||||||
|
alignment flags either. The same behaviour can be defined in those other
|
||||||
|
formatting options. One consideration is that 'cindent' has additional options
|
||||||
|
for context based indenting of comments but cannot replicate many three piece
|
||||||
|
indent alignments. However, 'indentexpr' is has the ability to work better
|
||||||
|
with three piece comments.
|
||||||
|
|
||||||
|
Other examples: >
|
||||||
"b:*" Includes lines starting with "*", but not if the "*" is
|
"b:*" Includes lines starting with "*", but not if the "*" is
|
||||||
followed by a non-blank. This avoids a pointer dereference
|
followed by a non-blank. This avoids a pointer dereference
|
||||||
like "*str" to be recognized as a comment.
|
like "*str" to be recognized as a comment.
|
||||||
@@ -1350,17 +1429,6 @@ By default, "b:#" is included. This means that a line that starts with
|
|||||||
"#include" is not recognized as a comment line. But a line that starts with
|
"#include" is not recognized as a comment line. But a line that starts with
|
||||||
"# define" is recognized. This is a compromise.
|
"# define" is recognized. This is a compromise.
|
||||||
|
|
||||||
Often the alignment can be changed from right alignment to a left alignment
|
|
||||||
with an additional space. For example, for Javadoc comments, this can be
|
|
||||||
used (insert a backslash before the space when using ":set"): >
|
|
||||||
s1:/*,mb:*,ex:*/
|
|
||||||
Note that an offset is included with start, so that the middle part is left
|
|
||||||
aligned with the start and then an offset of one character added. This makes
|
|
||||||
it possible to left align the start and middle for this construction: >
|
|
||||||
/**
|
|
||||||
* comment
|
|
||||||
*/
|
|
||||||
|
|
||||||
{not available when compiled without the |+comments| feature}
|
{not available when compiled without the |+comments| feature}
|
||||||
|
|
||||||
*fo-table*
|
*fo-table*
|
||||||
@@ -1391,7 +1459,7 @@ a Automatic formatting of paragraphs. Every time text is inserted or
|
|||||||
n When formatting text, recognize numbered lists. This actually uses
|
n When formatting text, recognize numbered lists. This actually uses
|
||||||
the 'formatlistpat' option, thus any kind of list can be used. The
|
the 'formatlistpat' option, thus any kind of list can be used. The
|
||||||
indent of the text after the number is used for the next line. The
|
indent of the text after the number is used for the next line. The
|
||||||
default is to find a number, optionally be followed by '.', ':', ')',
|
default is to find a number, optionally followed by '.', ':', ')',
|
||||||
']' or '}'. Note that 'autoindent' must be set too. Doesn't work
|
']' or '}'. Note that 'autoindent' must be set too. Doesn't work
|
||||||
well together with "2".
|
well together with "2".
|
||||||
Example: >
|
Example: >
|
||||||
@@ -1528,10 +1596,12 @@ found here: |sort()|.
|
|||||||
|
|
||||||
With [n] sorting is done on the first decimal number
|
With [n] sorting is done on the first decimal number
|
||||||
in the line (after or inside a {pattern} match).
|
in the line (after or inside a {pattern} match).
|
||||||
|
One leading '-' is included in the number.
|
||||||
|
|
||||||
With [x] sorting is done on the first hexadecimal
|
With [x] sorting is done on the first hexadecimal
|
||||||
number in the line (after or inside a {pattern}
|
number in the line (after or inside a {pattern}
|
||||||
match). A leading "0x" or "0X" is ignored.
|
match). A leading "0x" or "0X" is ignored.
|
||||||
|
One leading '-' is included in the number.
|
||||||
|
|
||||||
With [o] sorting is done on the first octal number in
|
With [o] sorting is done on the first octal number in
|
||||||
the line (after or inside a {pattern} match).
|
the line (after or inside a {pattern} match).
|
||||||
@@ -1555,9 +1625,10 @@ found here: |sort()|.
|
|||||||
:sort /.*\%10v/
|
:sort /.*\%10v/
|
||||||
< To sort on the first number in the line, no matter
|
< To sort on the first number in the line, no matter
|
||||||
what is in front of it: >
|
what is in front of it: >
|
||||||
:sort /.*\ze\d/
|
:sort /.\{-}\ze\d/
|
||||||
|
< (Explanation: ".\{-}" matches any text, "\ze" sets the
|
||||||
< With [r] sorting is done on the matching {pattern}
|
end of the match and \d matches a digit.)
|
||||||
|
With [r] sorting is done on the matching {pattern}
|
||||||
instead of skipping past it as described above.
|
instead of skipping past it as described above.
|
||||||
For example, to sort on only the first three letters
|
For example, to sort on only the first three letters
|
||||||
of each line: >
|
of each line: >
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*cmdline.txt* For Vim version 7.1. Last change: 2006 Jul 18
|
*cmdline.txt* For Vim version 7.3. Last change: 2011 Mar 27
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -62,7 +62,7 @@ Notes:
|
|||||||
old one is removed (to avoid repeated commands moving older commands out of
|
old one is removed (to avoid repeated commands moving older commands out of
|
||||||
the history).
|
the history).
|
||||||
- Only commands that are typed are remembered. Ones that completely come from
|
- Only commands that are typed are remembered. Ones that completely come from
|
||||||
mappings are not put in the history
|
mappings are not put in the history.
|
||||||
- All searches are put in the search history, including the ones that come
|
- All searches are put in the search history, including the ones that come
|
||||||
from commands like "*" and "#". But for a mapping, only the last search is
|
from commands like "*" and "#". But for a mapping, only the last search is
|
||||||
remembered (to avoid that long mappings trash the history).
|
remembered (to avoid that long mappings trash the history).
|
||||||
@@ -83,9 +83,9 @@ CTRL-V Insert next non-digit literally. Up to three digits form the
|
|||||||
CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
||||||
control flow, it doesn't work then.
|
control flow, it doesn't work then.
|
||||||
|
|
||||||
*c_<Left>*
|
*c_<Left>* *c_Left*
|
||||||
<Left> cursor left
|
<Left> cursor left
|
||||||
*c_<Right>*
|
*c_<Right>* *c_Right*
|
||||||
<Right> cursor right
|
<Right> cursor right
|
||||||
*c_<S-Left>*
|
*c_<S-Left>*
|
||||||
<S-Left> or <C-Left> *c_<C-Left>*
|
<S-Left> or <C-Left> *c_<C-Left>*
|
||||||
@@ -93,33 +93,32 @@ CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
|||||||
*c_<S-Right>*
|
*c_<S-Right>*
|
||||||
<S-Right> or <C-Right> *c_<C-Right>*
|
<S-Right> or <C-Right> *c_<C-Right>*
|
||||||
cursor one WORD right
|
cursor one WORD right
|
||||||
CTRL-B or <Home> *c_CTRL-B* *c_<Home>*
|
CTRL-B or <Home> *c_CTRL-B* *c_<Home>* *c_Home*
|
||||||
cursor to beginning of command-line
|
cursor to beginning of command-line
|
||||||
CTRL-E or <End> *c_CTRL-E* *c_<End>*
|
CTRL-E or <End> *c_CTRL-E* *c_<End>* *c_End*
|
||||||
cursor to end of command-line
|
cursor to end of command-line
|
||||||
|
|
||||||
*c_<LeftMouse>*
|
*c_<LeftMouse>*
|
||||||
<LeftMouse> cursor to position of mouse click.
|
<LeftMouse> Move the cursor to the position of the mouse click.
|
||||||
|
|
||||||
CTRL-H *c_<BS>* *c_CTRL-H*
|
CTRL-H *c_<BS>* *c_CTRL-H* *c_BS*
|
||||||
<BS> delete the character in front of the cursor (see |:fixdel| if
|
<BS> Delete the character in front of the cursor (see |:fixdel| if
|
||||||
your <BS> key does not do what you want).
|
your <BS> key does not do what you want).
|
||||||
*c_<Del>*
|
*c_<Del>* *c_Del*
|
||||||
<Del> delete the character under the cursor (at end of line:
|
<Del> Delete the character under the cursor (at end of line:
|
||||||
character before the cursor) (see |:fixdel| if your <Del>
|
character before the cursor) (see |:fixdel| if your <Del>
|
||||||
key does not do what you want).
|
key does not do what you want).
|
||||||
*c_CTRL-W*
|
*c_CTRL-W*
|
||||||
CTRL-W delete the word before the cursor
|
CTRL-W Delete the |word| before the cursor. This depends on the
|
||||||
|
'iskeyword' option.
|
||||||
*c_CTRL-U*
|
*c_CTRL-U*
|
||||||
CTRL-U remove all characters between the cursor position and
|
CTRL-U Remove all characters between the cursor position and
|
||||||
the beginning of the line. Previous versions of vim
|
the beginning of the line. Previous versions of vim
|
||||||
deleted all characters on the line. If that is the
|
deleted all characters on the line. If that is the
|
||||||
preferred behavior, add the following to your .vimrc: >
|
preferred behavior, add the following to your .vimrc: >
|
||||||
:cnoremap <C-U> <C-E><C-U>
|
:cnoremap <C-U> <C-E><C-U>
|
||||||
<
|
<
|
||||||
Note: if the command-line becomes empty with one of the
|
*c_<Insert>* *c_Insert*
|
||||||
delete commands, Command-line mode is quit.
|
|
||||||
*c_<Insert>*
|
|
||||||
<Insert> Toggle between insert and overstrike. {not in Vi}
|
<Insert> Toggle between insert and overstrike. {not in Vi}
|
||||||
|
|
||||||
{char1} <BS> {char2} or *c_digraph*
|
{char1} <BS> {char2} or *c_digraph*
|
||||||
@@ -156,6 +155,11 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
|
|||||||
(doesn't work at the expression prompt; some
|
(doesn't work at the expression prompt; some
|
||||||
things such as changing the buffer or current
|
things such as changing the buffer or current
|
||||||
window are not allowed to avoid side effects)
|
window are not allowed to avoid side effects)
|
||||||
|
When the result is a |List| the items are used
|
||||||
|
as lines. They can have line breaks inside
|
||||||
|
too.
|
||||||
|
When the result is a Float it's automatically
|
||||||
|
converted to a String.
|
||||||
See |registers| about registers. {not in Vi}
|
See |registers| about registers. {not in Vi}
|
||||||
Implementation detail: When using the |expression| register
|
Implementation detail: When using the |expression| register
|
||||||
and invoking setcmdpos(), this sets the position before
|
and invoking setcmdpos(), this sets the position before
|
||||||
@@ -178,7 +182,7 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
|
|||||||
the word that was already typed is not inserted again.
|
the word that was already typed is not inserted again.
|
||||||
|
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
CTRL-F and CTRL-P: {only when +file_in_path feature is
|
CTRL-F and CTRL-P: {only when |+file_in_path| feature is
|
||||||
included}
|
included}
|
||||||
|
|
||||||
*c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
|
*c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
|
||||||
@@ -220,21 +224,23 @@ CTRL-Y When there is a modeless selection, copy the selection into
|
|||||||
the clipboard. |modeless-selection|
|
the clipboard. |modeless-selection|
|
||||||
If there is no selection CTRL-Y is inserted as a character.
|
If there is no selection CTRL-Y is inserted as a character.
|
||||||
|
|
||||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
|
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||||
<CR> or <NL> start entered command
|
<CR> or <NL> start entered command
|
||||||
*c_<Esc>*
|
*c_<Esc>* *c_Esc*
|
||||||
<Esc> When typed and 'x' not present in 'cpoptions', quit
|
<Esc> When typed and 'x' not present in 'cpoptions', quit
|
||||||
Command-line mode without executing. In macros or when 'x'
|
Command-line mode without executing. In macros or when 'x'
|
||||||
present in 'cpoptions', start entered command.
|
present in 'cpoptions', start entered command.
|
||||||
|
Note: If your <Esc> key is hard to hit on your keyboard, train
|
||||||
|
yourself to use CTRL-[.
|
||||||
*c_CTRL-C*
|
*c_CTRL-C*
|
||||||
CTRL-C quit command-line without executing
|
CTRL-C quit command-line without executing
|
||||||
|
|
||||||
*c_<Up>*
|
*c_<Up>* *c_Up*
|
||||||
<Up> recall older command-line from history, whose beginning
|
<Up> recall older command-line from history, whose beginning
|
||||||
matches the current command-line (see below).
|
matches the current command-line (see below).
|
||||||
{not available when compiled without the |+cmdline_hist|
|
{not available when compiled without the |+cmdline_hist|
|
||||||
feature}
|
feature}
|
||||||
*c_<Down>*
|
*c_<Down>* *c_Down*
|
||||||
<Down> recall more recent command-line from history, whose beginning
|
<Down> recall more recent command-line from history, whose beginning
|
||||||
matches the current command-line (see below).
|
matches the current command-line (see below).
|
||||||
{not available when compiled without the |+cmdline_hist|
|
{not available when compiled without the |+cmdline_hist|
|
||||||
@@ -316,7 +322,7 @@ The same could be done by typing <S-Up> a number of times until the desired
|
|||||||
command-line is shown. (Note: the shifted arrow keys do not work on all
|
command-line is shown. (Note: the shifted arrow keys do not work on all
|
||||||
terminals)
|
terminals)
|
||||||
|
|
||||||
*his* *:history*
|
*:his* *:history*
|
||||||
:his[tory] Print the history of last entered commands.
|
:his[tory] Print the history of last entered commands.
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
{not available when compiled without the |+cmdline_hist|
|
{not available when compiled without the |+cmdline_hist|
|
||||||
@@ -366,8 +372,10 @@ word before the cursor. This is available for:
|
|||||||
- Mappings: Only after a ":map" or similar command.
|
- Mappings: Only after a ":map" or similar command.
|
||||||
- Variable and function names: Only after a ":if", ":call" or similar command.
|
- Variable and function names: Only after a ":if", ":call" or similar command.
|
||||||
|
|
||||||
When Vim was compiled with the |+cmdline_compl| feature disabled, only file
|
When Vim was compiled without the |+cmdline_compl| feature only file names,
|
||||||
names, directories and help items can be completed.
|
directories and help items can be completed. The number of help item matches
|
||||||
|
is limited (currently to 300) to avoid a long delay when there are very many
|
||||||
|
matches.
|
||||||
|
|
||||||
These are the commands that can be used:
|
These are the commands that can be used:
|
||||||
|
|
||||||
@@ -408,11 +416,15 @@ CTRL-L A match is done on the pattern in front of the cursor. If
|
|||||||
than the pattern, no completion is done.
|
than the pattern, no completion is done.
|
||||||
When 'incsearch' is set, entering a search pattern for "/" or
|
When 'incsearch' is set, entering a search pattern for "/" or
|
||||||
"?" and the current match is displayed then CTRL-L will add
|
"?" and the current match is displayed then CTRL-L will add
|
||||||
one character from the end of the current match.
|
one character from the end of the current match. If
|
||||||
|
'ignorecase' and 'smartcase' are set and the command line has
|
||||||
|
no uppercase characters, the added character is converted to
|
||||||
|
lowercase.
|
||||||
|
|
||||||
The 'wildchar' option defaults to <Tab> (CTRL-E when in Vi compatible mode; in
|
The 'wildchar' option defaults to <Tab> (CTRL-E when in Vi compatible mode; in
|
||||||
a previous version <Esc> was used). In the pattern standard wildcards '*' and
|
a previous version <Esc> was used). In the pattern standard wildcards '*' and
|
||||||
'?' are accepted. '*' matches any string, '?' matches exactly one character.
|
'?' are accepted when matching file names. '*' matches any string, '?'
|
||||||
|
matches exactly one character.
|
||||||
|
|
||||||
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>
|
:cnoremap X <C-L><C-D>
|
||||||
@@ -431,13 +443,20 @@ between files with almost the same name. If there are multiple matches,
|
|||||||
those files with an extension that is in the 'suffixes' option are ignored.
|
those files with an extension that is in the 'suffixes' option are ignored.
|
||||||
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
|
The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
|
||||||
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
|
in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
|
||||||
It is impossible to ignore suffixes with two dots. Examples:
|
|
||||||
|
An empty entry, two consecutive commas, match a file name that does not
|
||||||
|
contain a ".", thus has no suffix. This is useful to ignore "prog" and prefer
|
||||||
|
"prog.c".
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
pattern: files: match: ~
|
pattern: files: match: ~
|
||||||
test* test.c test.h test.o test.c
|
test* test.c test.h test.o test.c
|
||||||
test* test.h test.o test.h and test.o
|
test* test.h test.o test.h and test.o
|
||||||
test* test.i test.h test.c test.i and test.c
|
test* test.i test.h test.c test.i and test.c
|
||||||
|
|
||||||
|
It is impossible to ignore suffixes with two dots.
|
||||||
|
|
||||||
If there is more than one matching file (after ignoring the ones matching
|
If there is more than one matching file (after ignoring the ones matching
|
||||||
the 'suffixes' option) the first file name is inserted. You can see that
|
the 'suffixes' option) the first file name is inserted. You can see that
|
||||||
there is only one match when you type 'wildchar' twice and the completed
|
there is only one match when you type 'wildchar' twice and the completed
|
||||||
@@ -447,6 +466,11 @@ extensions matching the 'suffixes' option.
|
|||||||
|
|
||||||
To completely ignore files with some extension use 'wildignore'.
|
To completely ignore files with some extension use 'wildignore'.
|
||||||
|
|
||||||
|
To match only files that end at the end of the typed text append a "$". For
|
||||||
|
example, to match only files that end in ".c": >
|
||||||
|
:e *.c$
|
||||||
|
This will not match a file ending in ".cpp". Without the "$" it does match.
|
||||||
|
|
||||||
The old value of an option can be obtained by hitting 'wildchar' just after
|
The old value of an option can be obtained by hitting 'wildchar' just after
|
||||||
the '='. For example, typing 'wildchar' after ":set dir=" will insert the
|
the '='. For example, typing 'wildchar' after ":set dir=" will insert the
|
||||||
current value of 'dir'. This overrules file name completion for the options
|
current value of 'dir'. This overrules file name completion for the options
|
||||||
@@ -463,21 +487,21 @@ And this in your .vimrc: >
|
|||||||
|
|
||||||
The Ex commands have a few specialties:
|
The Ex commands have a few specialties:
|
||||||
|
|
||||||
*:quote*
|
*:quote* *:comment*
|
||||||
'"' at the start of a line causes the whole line to be ignored. '"'
|
'"' at the start of a line causes the whole line to be ignored. '"'
|
||||||
after a command causes the rest of the line to be ignored. This can be used
|
after a command causes the rest of the line to be ignored. This can be used
|
||||||
to add comments. Example: >
|
to add comments. Example: >
|
||||||
:set ai "set 'autoindent' option
|
:set ai "set 'autoindent' option
|
||||||
It is not possible to add a comment to a shell command ":!cmd" or to the
|
It is not possible to add a comment to a shell command ":!cmd" or to the
|
||||||
":map" command and friends, because they see the '"' as part of their
|
":map" command and a few others, because they see the '"' as part of their
|
||||||
argument.
|
argument. This is mentioned where the command is explained.
|
||||||
|
|
||||||
*:bar* *:\bar*
|
*:bar* *:\bar*
|
||||||
'|' can be used to separate commands, so you can give multiple commands in one
|
'|' can be used to separate commands, so you can give multiple commands in one
|
||||||
line. If you want to use '|' in an argument, precede it with '\'.
|
line. If you want to use '|' in an argument, precede it with '\'.
|
||||||
|
|
||||||
These commands see the '|' as their argument, and can therefore not be
|
These commands see the '|' as their argument, and can therefore not be
|
||||||
followed by another command:
|
followed by another Vim command:
|
||||||
:argdo
|
:argdo
|
||||||
:autocmd
|
:autocmd
|
||||||
:bufdo
|
:bufdo
|
||||||
@@ -502,6 +526,7 @@ followed by another command:
|
|||||||
:registers
|
:registers
|
||||||
:read !
|
:read !
|
||||||
:scscope
|
:scscope
|
||||||
|
:sign
|
||||||
:tcl
|
:tcl
|
||||||
:tcldo
|
:tcldo
|
||||||
:tclfile
|
:tclfile
|
||||||
@@ -713,23 +738,36 @@ to insert special things while typing you can use the CTRL-R command. For
|
|||||||
example, "%" stands for the current file name, while CTRL-R % inserts the
|
example, "%" stands for the current file name, while CTRL-R % inserts the
|
||||||
current file name right away. See |c_CTRL-R|.
|
current file name right away. See |c_CTRL-R|.
|
||||||
|
|
||||||
|
Note: If you want to avoid the special characters in a Vim script you may want
|
||||||
|
to use |fnameescape()|.
|
||||||
|
|
||||||
|
|
||||||
In Ex commands, at places where a file name can be used, the following
|
In Ex commands, at places where a file name can be used, the following
|
||||||
characters have a special meaning. These can also be used in the expression
|
characters have a special meaning. These can also be used in the expression
|
||||||
function expand() |expand()|.
|
function expand() |expand()|.
|
||||||
% is replaced with the current file name *:_%*
|
% Is replaced with the current file name. *:_%* *c_%*
|
||||||
# is replaced with the alternate file name *:_#*
|
# Is replaced with the alternate file name. *:_#* *c_#*
|
||||||
#n (where n is a number) is replaced with the file name of
|
#n (where n is a number) is replaced with *:_#0* *:_#n*
|
||||||
buffer n. "#0" is the same as "#"
|
the file name of buffer n. "#0" is the same as "#". *c_#n*
|
||||||
## is replaced with all names in the argument list *:_##*
|
## Is replaced with all names in the argument list *:_##* *c_##*
|
||||||
concatenated, separated by spaces. Each space in a name
|
concatenated, separated by spaces. Each space in a name
|
||||||
is preceded with a backslash.
|
is preceded with a backslash.
|
||||||
Note that these give the file name as it was typed. If an absolute path is
|
#<n (where n is a number > 0) is replaced with old *:_#<* *c_#<*
|
||||||
needed (when using the file name from a different directory), you need to add
|
file name n. See |:oldfiles| or |v:oldfiles| to get the
|
||||||
":p". See |filename-modifiers|.
|
number. *E809*
|
||||||
|
{only when compiled with the |+eval| and |+viminfo| features}
|
||||||
|
|
||||||
|
Note that these, except "#<n", give the file name as it was typed. If an
|
||||||
|
absolute path is needed (when using the file name from a different directory),
|
||||||
|
you need to add ":p". See |filename-modifiers|.
|
||||||
|
|
||||||
|
The "#<n" item returns an absolute path, but it will start with "~/" for files
|
||||||
|
below your home directory.
|
||||||
|
|
||||||
Note that backslashes are inserted before spaces, so that the command will
|
Note that backslashes are inserted before spaces, so that the command will
|
||||||
correctly interpret the file name. But this doesn't happen for shell
|
correctly interpret the file name. But this doesn't happen for shell
|
||||||
commands. For those you probably have to use quotes: >
|
commands. For those you probably have to use quotes (this fails for files
|
||||||
|
that contain a quote and wildcards): >
|
||||||
:!ls "%"
|
:!ls "%"
|
||||||
:r !spell "%"
|
:r !spell "%"
|
||||||
|
|
||||||
@@ -744,33 +782,38 @@ it, no matter how many backslashes.
|
|||||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||||
*E495* *E496* *E497* *E498* *E499* *E500*
|
*<slnum>* *E495* *E496* *E497* *E499* *E500*
|
||||||
Note: these are typed literally, they are not special keys!
|
Note: these are typed literally, they are not special keys!
|
||||||
<cword> is replaced with the word under the cursor (like |star|)
|
<cword> is replaced with the word under the cursor (like |star|)
|
||||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||||
<cfile> is replaced with the path name under the cursor (like what
|
<cfile> is replaced with the path name under the cursor (like what
|
||||||
|gf| uses)
|
|gf| uses)
|
||||||
<afile> when executing autocommands, is replaced with the file name
|
<afile> When executing autocommands, is replaced with the file name
|
||||||
for a file read or write
|
for a file read or write.
|
||||||
<abuf> when executing autocommands, is replaced with the currently
|
<abuf> When executing autocommands, is replaced with the currently
|
||||||
effective buffer number (for ":r file" and ":so file" it is
|
effective buffer number (for ":r file" and ":so file" it is
|
||||||
the current buffer, the file being read/sourced is not in a
|
the current buffer, the file being read/sourced is not in a
|
||||||
buffer).
|
buffer).
|
||||||
<amatch> when executing autocommands, is replaced with the match for
|
<amatch> When executing autocommands, is replaced with the match for
|
||||||
which this autocommand was executed. It differs from
|
which this autocommand was executed. It differs from
|
||||||
<afile> only when the file name isn't used to match with
|
<afile> only when the file name isn't used to match with
|
||||||
(for FileType, Syntax and SpellFileMissing events).
|
(for FileType, Syntax and SpellFileMissing events).
|
||||||
<sfile> when executing a ":source" command, is replaced with the
|
<sfile> When executing a ":source" command, is replaced with the
|
||||||
file name of the sourced file;
|
file name of the sourced file. *E498*
|
||||||
when executing a function, is replaced with
|
When executing a function, is replaced with
|
||||||
"function {function-name}"; function call nesting is
|
"function {function-name}"; function call nesting is
|
||||||
indicated like this:
|
indicated like this:
|
||||||
"function {function-name1}..{function-name2}". Note that
|
"function {function-name1}..{function-name2}". Note that
|
||||||
filename-modifiers are useless when <sfile> is used inside
|
filename-modifiers are useless when <sfile> is used inside
|
||||||
a function.
|
a function.
|
||||||
|
<slnum> When executing a ":source" command, is replaced with the
|
||||||
|
line number. *E842*
|
||||||
|
When executing a function it's the line number relative to
|
||||||
|
the start of the function.
|
||||||
|
|
||||||
*filename-modifiers*
|
*filename-modifiers*
|
||||||
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
|
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
|
||||||
|
*%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs*
|
||||||
The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
|
The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
|
||||||
"<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
|
"<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
|
||||||
These are not available when Vim has been compiled without the |+modify_fname|
|
These are not available when Vim has been compiled without the |+modify_fname|
|
||||||
@@ -822,7 +865,7 @@ These modifiers can be given, in this order:
|
|||||||
After this, the previous modifiers can be used again. For
|
After this, the previous modifiers can be used again. For
|
||||||
example ":p", to make a full path after the substitution.
|
example ":p", to make a full path after the substitution.
|
||||||
:gs?pat?sub?
|
:gs?pat?sub?
|
||||||
Substitute all occurrences of "path" with "sub". Otherwise
|
Substitute all occurrences of "pat" with "sub". Otherwise
|
||||||
this works like ":s".
|
this works like ":s".
|
||||||
|
|
||||||
Examples, when the file name is "src/version.c", current dir
|
Examples, when the file name is "src/version.c", current dir
|
||||||
@@ -888,10 +931,10 @@ Examples: (alternate file name is "?readme?")
|
|||||||
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
|
:cd <cfile>* :cd {file name under cursor plus "*" and then expanded}
|
||||||
|
|
||||||
When the expanded argument contains a "!" and it is used for a shell command
|
When the expanded argument contains a "!" and it is used for a shell command
|
||||||
(":!cmd", ":r !cmd" or ":w !cmd"), it is escaped with a backslash to avoid it
|
(":!cmd", ":r !cmd" or ":w !cmd"), the "!" is escaped with a backslash to
|
||||||
being expanded into a previously used command. When the 'shell' option
|
avoid it being expanded into a previously used command. When the 'shell'
|
||||||
contains "sh", this is done twice, to avoid the shell trying to expand the
|
option contains "sh", this is done twice, to avoid the shell trying to expand
|
||||||
"!".
|
the "!".
|
||||||
|
|
||||||
*filename-backslash*
|
*filename-backslash*
|
||||||
For filesystems that use a backslash as directory separator (MS-DOS, Windows,
|
For filesystems that use a backslash as directory separator (MS-DOS, Windows,
|
||||||
@@ -914,7 +957,7 @@ for the file "$home" in the root directory. A few examples:
|
|||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
6. Command-line window *cmdline-window* *cmdwin*
|
6. Command-line window *cmdline-window* *cmdwin*
|
||||||
|
*command-line-window*
|
||||||
In the command-line window the command line can be edited just like editing
|
In the command-line window the command line can be edited just like editing
|
||||||
text in any window. It is a special kind of window, because you cannot leave
|
text in any window. It is a special kind of window, because you cannot leave
|
||||||
it in a normal way.
|
it in a normal way.
|
||||||
@@ -922,12 +965,12 @@ it in a normal way.
|
|||||||
feature}
|
feature}
|
||||||
|
|
||||||
|
|
||||||
OPEN
|
OPEN *c_CTRL-F* *q:* *q/* *q?*
|
||||||
|
|
||||||
There are two ways to open the command-line window:
|
There are two ways to open the command-line window:
|
||||||
1. From Command-line mode, use the key specified with the 'cedit' option.
|
1. From Command-line mode, use the key specified with the 'cedit' option.
|
||||||
The default is CTRL-F when 'compatible' is not set.
|
The default is CTRL-F when 'compatible' is not set.
|
||||||
2. From Normal mode, use the "q:", "q/" or "q?" command. *q:* *q/* *q?*
|
2. From Normal mode, use the "q:", "q/" or "q?" command.
|
||||||
This starts editing an Ex command-line ("q:") or search string ("q/" or
|
This starts editing an Ex command-line ("q:") or search string ("q/" or
|
||||||
"q?"). Note that this is not possible while recording is in progress (the
|
"q?"). Note that this is not possible while recording is in progress (the
|
||||||
"q" stops recording then).
|
"q" stops recording then).
|
||||||
@@ -957,7 +1000,8 @@ nesting.
|
|||||||
The command-line window is not a normal window. It is not possible to move to
|
The command-line window is not a normal window. It is not possible to move to
|
||||||
another window or edit another buffer. All commands that would do this are
|
another window or edit another buffer. All commands that would do this are
|
||||||
disabled in the command-line window. Of course it _is_ possible to execute
|
disabled in the command-line window. Of course it _is_ possible to execute
|
||||||
any command that you entered in the command-line window.
|
any command that you entered in the command-line window. Other text edits are
|
||||||
|
discarded when closing the window.
|
||||||
|
|
||||||
|
|
||||||
CLOSE *E199*
|
CLOSE *E199*
|
||||||
@@ -985,15 +1029,15 @@ other than the one that is executed with <CR> are lost.
|
|||||||
If you would like to execute the command under the cursor and then have the
|
If you would like to execute the command under the cursor and then have the
|
||||||
command-line window open again, you may find this mapping useful: >
|
command-line window open again, you may find this mapping useful: >
|
||||||
|
|
||||||
:map <F5> <CR>q:
|
:autocmd CmdwinEnter * map <buffer> <F5> <CR>q:
|
||||||
|
|
||||||
|
|
||||||
VARIOUS
|
VARIOUS
|
||||||
|
|
||||||
The command-line window cannot be used:
|
The command-line window cannot be used:
|
||||||
- when there already is a command-line window (no nesting)
|
- when there already is a command-line window (no nesting)
|
||||||
- for entering a encryption key or when using inputsecret()
|
- for entering an encryption key or when using inputsecret()
|
||||||
- when Vim was not compiled with the +vertsplit feature
|
- when Vim was not compiled with the |+vertsplit| feature
|
||||||
|
|
||||||
Some options are set when the command-line window is opened:
|
Some options are set when the command-line window is opened:
|
||||||
'filetype' "vim", when editing an Ex command-line; this starts Vim syntax
|
'filetype' "vim", when editing an Ex command-line; this starts Vim syntax
|
||||||
@@ -1032,9 +1076,9 @@ events are not triggered. You can use the Cmdwin events to do settings
|
|||||||
specifically for the command-line window. Be careful not to cause side
|
specifically for the command-line window. Be careful not to cause side
|
||||||
effects!
|
effects!
|
||||||
Example: >
|
Example: >
|
||||||
:au CmdwinEnter : let b:cpt_save = &cpt | set cpt=v
|
:au CmdwinEnter : let b:cpt_save = &cpt | set cpt=.
|
||||||
:au CmdwinLeave : let &cpt = b:cpt_save
|
:au CmdwinLeave : let &cpt = b:cpt_save
|
||||||
This sets 'complete' to use command-line completion in Insert mode for CTRL-N.
|
This sets 'complete' to use completion in the current window for |i_CTRL-N|.
|
||||||
Another example: >
|
Another example: >
|
||||||
:au CmdwinEnter [/?] startinsert
|
:au CmdwinEnter [/?] startinsert
|
||||||
This will make Vim start in Insert mode in the command-line window.
|
This will make Vim start in Insert mode in the command-line window.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*debug.txt* For Vim version 7.1. Last change: 2006 May 01
|
*debug.txt* For Vim version 7.3. Last change: 2010 Dec 22
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -10,7 +10,8 @@ This is for debugging Vim itself, when it doesn't work properly.
|
|||||||
For debugging Vim scripts, functions, etc. see |debug-scripts|
|
For debugging Vim scripts, functions, etc. see |debug-scripts|
|
||||||
|
|
||||||
1. Location of a crash, using gcc and gdb |debug-gcc|
|
1. Location of a crash, using gcc and gdb |debug-gcc|
|
||||||
2. Windows Bug Reporting |debug-win32|
|
2. Locating memory leaks |debug-leaks|
|
||||||
|
3. Windows Bug Reporting |debug-win32|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
@@ -20,8 +21,9 @@ When Vim crashes in one of the test files, and you are using gcc for
|
|||||||
compilation, here is what you can do to find out exactly where Vim crashes.
|
compilation, here is what you can do to find out exactly where Vim crashes.
|
||||||
This also applies when using the MingW tools.
|
This also applies when using the MingW tools.
|
||||||
|
|
||||||
1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
|
1. Compile Vim with the "-g" option (there is a line in the src/Makefile for
|
||||||
which you can uncomment).
|
this, which you can uncomment). Also make sure "strip" is disabled (do not
|
||||||
|
install it, or use the line "STRIP = /bin/true").
|
||||||
|
|
||||||
2. Execute these commands (replace "11" with the test that fails): >
|
2. Execute these commands (replace "11" with the test that fails): >
|
||||||
cd testdir
|
cd testdir
|
||||||
@@ -38,13 +40,35 @@ This also applies when using the MingW tools.
|
|||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
2. Windows Bug Reporting *debug-win32*
|
2. Locating memory leaks *debug-leaks* *valgrind*
|
||||||
|
|
||||||
|
If you suspect Vim is leaking memory and you are using Linux, the valgrind
|
||||||
|
tool is very useful to pinpoint memory leaks.
|
||||||
|
|
||||||
|
First of all, build Vim with EXITFREE defined. Search for this in MAKEFILE
|
||||||
|
and uncomment the line.
|
||||||
|
|
||||||
|
Use this command to start Vim:
|
||||||
|
>
|
||||||
|
valgrind --log-file=valgrind.log --leak-check=full ./vim
|
||||||
|
|
||||||
|
Note: Vim will run much slower. If your .vimrc is big or you have several
|
||||||
|
plugins you need to be patient for startup, or run with the "-u NONE"
|
||||||
|
argument.
|
||||||
|
|
||||||
|
There are often a few leaks from libraries, such as getpwuid() and
|
||||||
|
XtVaAppCreateShell(). Those are unavoidable. The number of bytes should be
|
||||||
|
very small a Kbyte or less.
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
|
||||||
|
3. Windows Bug Reporting *debug-win32*
|
||||||
|
|
||||||
If the Windows version of Vim crashes in a reproducible manner, you can take
|
If the Windows version of Vim crashes in a reproducible manner, you can take
|
||||||
some steps to provide a useful bug report.
|
some steps to provide a useful bug report.
|
||||||
|
|
||||||
|
|
||||||
GENERIC ~
|
3.1 GENERIC ~
|
||||||
|
|
||||||
You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb
|
You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb
|
||||||
for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the
|
for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the
|
||||||
@@ -66,7 +90,7 @@ a Vim executable compiled with the Borland compiler; gdb (see above
|
|||||||
|
|
||||||
|
|
||||||
*debug-vs2005*
|
*debug-vs2005*
|
||||||
2.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~
|
3.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~
|
||||||
|
|
||||||
First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't
|
First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't
|
||||||
have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a
|
have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a
|
||||||
@@ -100,7 +124,7 @@ installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you
|
|||||||
need to save minidumps or you want a just-in-time (postmortem) debugger.
|
need to save minidumps or you want a just-in-time (postmortem) debugger.
|
||||||
|
|
||||||
*debug-windbg*
|
*debug-windbg*
|
||||||
2.3 Debugging Vim crashes with WinDbg ~
|
3.3 Debugging Vim crashes with WinDbg ~
|
||||||
|
|
||||||
See |get-ms-debuggers| to obtain a copy of WinDbg.
|
See |get-ms-debuggers| to obtain a copy of WinDbg.
|
||||||
|
|
||||||
@@ -126,7 +150,7 @@ To save a minidump, type the following at the WinDbg command line: >
|
|||||||
.dump vim.dmp
|
.dump vim.dmp
|
||||||
<
|
<
|
||||||
*debug-minidump*
|
*debug-minidump*
|
||||||
2.4 Opening a Minidump ~
|
3.4 Opening a Minidump ~
|
||||||
|
|
||||||
If you have a minidump file, you can open it in Visual Studio or in WinDbg.
|
If you have a minidump file, you can open it in Visual Studio or in WinDbg.
|
||||||
|
|
||||||
@@ -138,7 +162,7 @@ In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in
|
|||||||
|debug-windbg| to set the Symbol File Path.
|
|debug-windbg| to set the Symbol File Path.
|
||||||
|
|
||||||
*get-ms-debuggers*
|
*get-ms-debuggers*
|
||||||
2.5 Obtaining Microsoft Debugging Tools ~
|
3.5 Obtaining Microsoft Debugging Tools ~
|
||||||
|
|
||||||
The Debugging Tools for Windows (including WinDbg) can be downloaded from
|
The Debugging Tools for Windows (including WinDbg) can be downloaded from
|
||||||
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
|
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*debugger.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
*debugger.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Gordon Prieur
|
VIM REFERENCE MANUAL by Gordon Prieur
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*develop.txt* For Vim version 7.1. Last change: 2007 May 11
|
*develop.txt* For Vim version 7.3. Last change: 2008 Dec 17
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -64,7 +64,7 @@ completely different editor. Extensions are done with a "Vi spirit".
|
|||||||
hard time finding and remembering them. Keep in mind that more commands and
|
hard time finding and remembering them. Keep in mind that more commands and
|
||||||
options will be added later.
|
options will be added later.
|
||||||
- A feature that people do not know about is a useless feature. Don't add
|
- A feature that people do not know about is a useless feature. Don't add
|
||||||
obscure features, or at least add hints in documentation that they exists.
|
obscure features, or at least add hints in documentation that they exist.
|
||||||
- Minimize using CTRL and other modifiers, they are more difficult to type.
|
- Minimize using CTRL and other modifiers, they are more difficult to type.
|
||||||
- There are many first-time and inexperienced Vim users. Make it easy for
|
- There are many first-time and inexperienced Vim users. Make it easy for
|
||||||
them to start using Vim and learn more over time.
|
them to start using Vim and learn more over time.
|
||||||
@@ -323,7 +323,7 @@ Wrong: var=a*5;
|
|||||||
OK: var = a * 5;
|
OK: var = a * 5;
|
||||||
|
|
||||||
In general: Use empty lines to group lines of code together. Put a comment
|
In general: Use empty lines to group lines of code together. Put a comment
|
||||||
just above the group of lines. This makes it more easy to quickly see what is
|
just above the group of lines. This makes it easier to quickly see what is
|
||||||
being done.
|
being done.
|
||||||
|
|
||||||
OK: /* Prepare for building the table. */
|
OK: /* Prepare for building the table. */
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
*diff.txt* For Vim version 7.1. Last change: 2006 Oct 02
|
*diff.txt* For Vim version 7.3. Last change: 2010 Dec 08
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
|
||||||
|
|
||||||
*diff* *vimdiff* *gvimdiff* *diff-mode*
|
*diff* *vimdiff* *gvimdiff* *diff-mode*
|
||||||
This file describes the +diff feature: Showing differences between two or
|
This file describes the |+diff| feature: Showing differences between two,
|
||||||
three versions of the same file.
|
three or four versions of the same file.
|
||||||
|
|
||||||
The basics are explained in section |08.7| of the user manual.
|
The basics are explained in section |08.7| of the user manual.
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ What happens is that Vim opens a window for each of the files. This is like
|
|||||||
using the |-O| argument. This uses vertical splits. If you prefer horizontal
|
using the |-O| argument. This uses vertical splits. If you prefer horizontal
|
||||||
splits add the |-o| argument: >
|
splits add the |-o| argument: >
|
||||||
|
|
||||||
vimdiff -o file1 file2 [file3]
|
vimdiff -o file1 file2 [file3 [file4]]
|
||||||
|
|
||||||
If you always prefer horizontal splits include "horizontal" in 'diffopt'.
|
If you always prefer horizontal splits include "horizontal" in 'diffopt'.
|
||||||
|
|
||||||
@@ -57,6 +57,7 @@ In each of the edited files these options are set:
|
|||||||
|
|
||||||
'diff' on
|
'diff' on
|
||||||
'scrollbind' on
|
'scrollbind' on
|
||||||
|
'cursorbind' on
|
||||||
'scrollopt' includes "hor"
|
'scrollopt' includes "hor"
|
||||||
'wrap' off
|
'wrap' off
|
||||||
'foldmethod' "diff"
|
'foldmethod' "diff"
|
||||||
@@ -64,6 +65,9 @@ In each of the edited files these options are set:
|
|||||||
|
|
||||||
These options are set local to the window. When editing another file they are
|
These options are set local to the window. When editing another file they are
|
||||||
reset to the global value.
|
reset to the global value.
|
||||||
|
The options can still be overruled from a modeline when re-editing the file.
|
||||||
|
However, 'foldmethod' and 'wrap' won't be set from a modeline when 'diff' is
|
||||||
|
set.
|
||||||
|
|
||||||
The differences shown are actually the differences in the buffer. Thus if you
|
The differences shown are actually the differences in the buffer. Thus if you
|
||||||
make changes after loading a file, these will be included in the displayed
|
make changes after loading a file, these will be included in the displayed
|
||||||
@@ -91,7 +95,7 @@ While already in Vim you can start diff mode in three ways.
|
|||||||
:diffthis Make the current window part of the diff windows. This sets
|
:diffthis Make the current window part of the diff windows. This sets
|
||||||
the options like for "vimdiff".
|
the options like for "vimdiff".
|
||||||
|
|
||||||
:diffpatch {patchfile} *:diffp* *:diffpatch*
|
:diffpatch {patchfile} *E816* *:diffp* *:diffpatch*
|
||||||
Use the current buffer, patch it with the diff found in
|
Use the current buffer, patch it with the diff found in
|
||||||
{patchfile} and open a buffer on the result. The options are
|
{patchfile} and open a buffer on the result. The options are
|
||||||
set as for "vimdiff".
|
set as for "vimdiff".
|
||||||
@@ -121,7 +125,8 @@ file for a moment and come back to the same file and be in diff mode again.
|
|||||||
*:diffo* *:diffoff*
|
*:diffo* *:diffoff*
|
||||||
:diffoff Switch off diff mode for the current window.
|
:diffoff Switch off diff mode for the current window.
|
||||||
|
|
||||||
:diffoff! Switch off diff mode for all windows in the current tab page.
|
:diffoff! Switch off diff mode for the current window and in all windows
|
||||||
|
in the current tab page where 'diff' is set.
|
||||||
|
|
||||||
The ":diffoff" command resets the relevant options to their default value.
|
The ":diffoff" command resets the relevant options to their default value.
|
||||||
This may be different from what the values were before diff mode was started,
|
This may be different from what the values were before diff mode was started,
|
||||||
@@ -129,6 +134,7 @@ the old values are not remembered.
|
|||||||
|
|
||||||
'diff' off
|
'diff' off
|
||||||
'scrollbind' off
|
'scrollbind' off
|
||||||
|
'cursorbind' off
|
||||||
'scrollopt' without "hor"
|
'scrollopt' without "hor"
|
||||||
'wrap' on
|
'wrap' on
|
||||||
'foldmethod' "manual"
|
'foldmethod' "manual"
|
||||||
@@ -237,7 +243,8 @@ that the buffers will be equal within the specified range.
|
|||||||
*:diffg* *:diffget*
|
*:diffg* *:diffget*
|
||||||
:[range]diffg[et] [bufspec]
|
:[range]diffg[et] [bufspec]
|
||||||
Modify the current buffer to undo difference with another
|
Modify the current buffer to undo difference with another
|
||||||
buffer. If [bufspec] is given, that buffer is used.
|
buffer. If [bufspec] is given, that buffer is used. If
|
||||||
|
[bufspec] refers to the current buffer then nothing happens.
|
||||||
Otherwise this only works if there is one other buffer in diff
|
Otherwise this only works if there is one other buffer in diff
|
||||||
mode.
|
mode.
|
||||||
See below for [range].
|
See below for [range].
|
||||||
@@ -254,10 +261,12 @@ that the buffers will be equal within the specified range.
|
|||||||
*do*
|
*do*
|
||||||
do Same as ":diffget" without argument or range. The "o" stands
|
do Same as ":diffget" without argument or range. The "o" stands
|
||||||
for "obtain" ("dg" can't be used, it could be the start of
|
for "obtain" ("dg" can't be used, it could be the start of
|
||||||
"dgg"!).
|
"dgg"!). Note: this doesn't work in Visual mode.
|
||||||
|
|
||||||
*dp*
|
*dp*
|
||||||
dp Same as ":diffput" without argument or range.
|
dp Same as ":diffput" without argument or range.
|
||||||
|
Note: this doesn't work in Visual mode.
|
||||||
|
|
||||||
|
|
||||||
When no [range] is given, the diff at the cursor position or just above it is
|
When no [range] is given, the diff at the cursor position or just above it is
|
||||||
affected. When [range] is used, Vim tries to only put or get the specified
|
affected. When [range] is used, Vim tries to only put or get the specified
|
||||||
@@ -323,7 +332,7 @@ The "1a2" item appends the line "bbb".
|
|||||||
The "4d4" item deletes the line "111".
|
The "4d4" item deletes the line "111".
|
||||||
The '7c7" item replaces the line "GGG" with "ggg".
|
The '7c7" item replaces the line "GGG" with "ggg".
|
||||||
|
|
||||||
When 'diffexpr' is not empty, Vim evaluates to obtain a diff file in the
|
When 'diffexpr' is not empty, Vim evaluates it to obtain a diff file in the
|
||||||
format mentioned. These variables are set to the file names used:
|
format mentioned. These variables are set to the file names used:
|
||||||
|
|
||||||
v:fname_in original file
|
v:fname_in original file
|
||||||
@@ -353,7 +362,7 @@ The "-a" argument is used to force comparing the files as text, comparing as
|
|||||||
binaries isn't useful. The "--binary" argument makes the files read in binary
|
binaries isn't useful. The "--binary" argument makes the files read in binary
|
||||||
mode, so that a CTRL-Z doesn't end the text on DOS.
|
mode, so that a CTRL-Z doesn't end the text on DOS.
|
||||||
|
|
||||||
*E97*
|
*E810* *E97*
|
||||||
Vim will do a test if the diff output looks alright. If it doesn't, you will
|
Vim will do a test if the diff output looks alright. If it doesn't, you will
|
||||||
get an error message. Possible causes:
|
get an error message. Possible causes:
|
||||||
- The "diff" program cannot be executed.
|
- The "diff" program cannot be executed.
|
||||||
@@ -364,9 +373,9 @@ get an error message. Possible causes:
|
|||||||
If it's not clear what the problem is set the 'verbose' option to one or more
|
If it's not clear what the problem is set the 'verbose' option to one or more
|
||||||
to see more messages.
|
to see more messages.
|
||||||
|
|
||||||
The self-installing Vim includes a diff program. If you don't have it you
|
The self-installing Vim for MS-Windows includes a diff program. If you don't
|
||||||
might want to download a diff.exe. For example from
|
have it you might want to download a diff.exe. For example from
|
||||||
http://jlb.twu.net/code/unixkit.php.
|
http://gnuwin32.sourceforge.net/packages/diffutils.htm.
|
||||||
|
|
||||||
|
|
||||||
USING PATCHES *diff-patchexpr*
|
USING PATCHES *diff-patchexpr*
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
*editing.txt* For Vim version 7.1. Last change: 2007 May 11
|
*editing.txt* For Vim version 7.3. Last change: 2011 Feb 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -270,16 +270,17 @@ If you want to keep the changed buffer without saving it, switch on the
|
|||||||
Normal mode. Otherwise same as |:edit|.
|
Normal mode. Otherwise same as |:edit|.
|
||||||
|
|
||||||
*:vie* *:view*
|
*:vie* *:view*
|
||||||
:vie[w] [++opt] [+cmd] file
|
:vie[w][!] [++opt] [+cmd] file
|
||||||
When used in Ex mode: Leave |Ex mode|, go back to
|
When used in Ex mode: Leave |Ex mode|, go back to
|
||||||
Normal mode. Otherwise same as |:edit|, but set
|
Normal mode. Otherwise same as |:edit|, but set
|
||||||
'readonly' option for this buffer. {not in Vi}
|
'readonly' option for this buffer. {not in Vi}
|
||||||
|
|
||||||
*CTRL-^* *CTRL-6*
|
*CTRL-^* *CTRL-6*
|
||||||
CTRL-^ Edit the alternate file (equivalent to ":e #").
|
CTRL-^ Edit the alternate file. Mostly the alternate file is
|
||||||
Mostly the alternate file is the previously edited
|
the previously edited file. This is a quick way to
|
||||||
file. This is a quick way to toggle between two
|
toggle between two files. It is equivalent to ":e #",
|
||||||
files.
|
except that it also works when there is no file name.
|
||||||
|
|
||||||
If the 'autowrite' or 'autowriteall' option is on and
|
If the 'autowrite' or 'autowriteall' option is on and
|
||||||
the buffer was changed, write it.
|
the buffer was changed, write it.
|
||||||
Mostly the ^ character is positioned on the 6 key,
|
Mostly the ^ character is positioned on the 6 key,
|
||||||
@@ -302,9 +303,9 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
|
|||||||
Uses the 'isfname' option to find out which characters
|
Uses the 'isfname' option to find out which characters
|
||||||
are supposed to be in a file name. Trailing
|
are supposed to be in a file name. Trailing
|
||||||
punctuation characters ".,:;!" are ignored.
|
punctuation characters ".,:;!" are ignored.
|
||||||
Uses the 'path' option as a list of directory names
|
Uses the 'path' option as a list of directory names to
|
||||||
to look for the file. Also looks for the file
|
look for the file. See the 'path' option for details
|
||||||
relative to the current file.
|
about relative directories and wildcards.
|
||||||
Uses the 'suffixesadd' option to check for file names
|
Uses the 'suffixesadd' option to check for file names
|
||||||
with a suffix added.
|
with a suffix added.
|
||||||
If the file can't be found, 'includeexpr' is used to
|
If the file can't be found, 'includeexpr' is used to
|
||||||
@@ -364,13 +365,16 @@ all over again. The ":e" command is only useful if you have changed the
|
|||||||
current file name.
|
current file name.
|
||||||
|
|
||||||
*:filename* *{file}*
|
*:filename* *{file}*
|
||||||
Note for systems other than Unix and MS-DOS: When using a command that
|
Besides the things mentioned here, more special items for where a filename is
|
||||||
accepts a single file name (like ":edit file") spaces in the file name are
|
expected are mentioned at |cmdline-special|.
|
||||||
allowed, but trailing spaces are ignored. This is useful on systems that
|
|
||||||
allow file names with embedded spaces (like MS-Windows and the Amiga).
|
Note for systems other than Unix: When using a command that accepts a single
|
||||||
Example: The command ":e Long File Name " will edit the file "Long File
|
file name (like ":edit file") spaces in the file name are allowed, but
|
||||||
Name". When using a command that accepts more than one file name (like ":next
|
trailing spaces are ignored. This is useful on systems that regularly embed
|
||||||
file1 file2") embedded spaces must be escaped with a backslash.
|
spaces in file names (like MS-Windows and the Amiga). Example: The command
|
||||||
|
":e Long File Name " will edit the file "Long File Name". When using a
|
||||||
|
command that accepts more than one file name (like ":next file1 file2")
|
||||||
|
embedded spaces must be escaped with a backslash.
|
||||||
|
|
||||||
*wildcard* *wildcards*
|
*wildcard* *wildcards*
|
||||||
Wildcards in {file} are expanded. Which wildcards are supported depends on
|
Wildcards in {file} are expanded. Which wildcards are supported depends on
|
||||||
@@ -388,6 +392,8 @@ is to use "path\[[]abc]". Then the file "path[abc]" literally.
|
|||||||
*starstar-wildcard*
|
*starstar-wildcard*
|
||||||
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
|
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
|
||||||
This allows searching a directory tree. This goes up to 100 directories deep.
|
This allows searching a directory tree. This goes up to 100 directories deep.
|
||||||
|
Note there are some commands where this works slightly different, see
|
||||||
|
|file-searching|.
|
||||||
Example: >
|
Example: >
|
||||||
:n **/*.txt
|
:n **/*.txt
|
||||||
Finds files:
|
Finds files:
|
||||||
@@ -457,7 +463,10 @@ converted and illegal bytes. It can be one of three things:
|
|||||||
++bad=drop Remove the bad characters.
|
++bad=drop Remove the bad characters.
|
||||||
|
|
||||||
The default is like "++bad=?": Replace each bad character with a question
|
The default is like "++bad=?": Replace each bad character with a question
|
||||||
mark.
|
mark. In some places an inverted question mark is used (0xBF).
|
||||||
|
|
||||||
|
Note that not all commands use the ++bad argument, even though they do not
|
||||||
|
give an error when you add it. E.g. |:write|.
|
||||||
|
|
||||||
Note that when reading, the 'fileformat' and 'fileencoding' options will be
|
Note that when reading, the 'fileformat' and 'fileencoding' options will be
|
||||||
set to the used format. When writing this doesn't happen, thus a next write
|
set to the used format. When writing this doesn't happen, thus a next write
|
||||||
@@ -714,23 +723,23 @@ list of the current window.
|
|||||||
and |+cmd|. {not in Vi}
|
and |+cmd|. {not in Vi}
|
||||||
|
|
||||||
*:wn* *:wnext*
|
*:wn* *:wnext*
|
||||||
:[count]wn[ext] [++opt] [+cmd]
|
:[count]wn[ext] [++opt]
|
||||||
Write current file and start editing the [count]
|
Write current file and start editing the [count]
|
||||||
next file. Also see |++opt| and |+cmd|. {not in Vi}
|
next file. Also see |++opt| and |+cmd|. {not in Vi}
|
||||||
|
|
||||||
:[count]wn[ext] [++opt] [+cmd] {file}
|
:[count]wn[ext] [++opt] {file}
|
||||||
Write current file to {file} and start editing the
|
Write current file to {file} and start editing the
|
||||||
[count] next file, unless {file} already exists and
|
[count] next file, unless {file} already exists and
|
||||||
the 'writeany' option is off. Also see |++opt| and
|
the 'writeany' option is off. Also see |++opt| and
|
||||||
|+cmd|. {not in Vi}
|
|+cmd|. {not in Vi}
|
||||||
|
|
||||||
:[count]wn[ext]! [++opt] [+cmd] {file}
|
:[count]wn[ext]! [++opt] {file}
|
||||||
Write current file to {file} and start editing the
|
Write current file to {file} and start editing the
|
||||||
[count] next file. Also see |++opt| and |+cmd|. {not
|
[count] next file. Also see |++opt| and |+cmd|. {not
|
||||||
in Vi}
|
in Vi}
|
||||||
|
|
||||||
:[count]wN[ext][!] [++opt] [+cmd] [file] *:wN* *:wNext*
|
:[count]wN[ext][!] [++opt] [file] *:wN* *:wNext*
|
||||||
:[count]wp[revious][!] [++opt] [+cmd] [file] *:wp* *:wprevious*
|
:[count]wp[revious][!] [++opt] [file] *:wp* *:wprevious*
|
||||||
Same as :wnext, but go to previous file instead of
|
Same as :wnext, but go to previous file instead of
|
||||||
next. {not in Vi}
|
next. {not in Vi}
|
||||||
|
|
||||||
@@ -774,7 +783,7 @@ fourth file in the argument list. This happens when you do ":e file".
|
|||||||
LOCAL ARGUMENT LIST
|
LOCAL ARGUMENT LIST
|
||||||
|
|
||||||
{not in Vi}
|
{not in Vi}
|
||||||
{not available when compiled without the |+windows| or |+listcmds| feature}
|
{not available when compiled without the |+windows| or |+listcmds| features}
|
||||||
|
|
||||||
*:arglocal*
|
*:arglocal*
|
||||||
:argl[ocal] Make a local copy of the global argument list.
|
:argl[ocal] Make a local copy of the global argument list.
|
||||||
@@ -832,7 +841,7 @@ USING THE ARGUMENT LIST
|
|||||||
Example: >
|
Example: >
|
||||||
:args *.c
|
:args *.c
|
||||||
:argdo set ff=unix | update
|
:argdo set ff=unix | update
|
||||||
This sets the 'fileformat' option to "unix" and writes the file if is now
|
This sets the 'fileformat' option to "unix" and writes the file if it is now
|
||||||
changed. This is done for all *.c files.
|
changed. This is done for all *.c files.
|
||||||
|
|
||||||
Example: >
|
Example: >
|
||||||
@@ -850,46 +859,55 @@ Note: When the 'write' option is off, you are not able to write any file.
|
|||||||
*:w* *:write*
|
*:w* *:write*
|
||||||
*E502* *E503* *E504* *E505*
|
*E502* *E503* *E504* *E505*
|
||||||
*E512* *E514* *E667* *E796*
|
*E512* *E514* *E667* *E796*
|
||||||
:w[rite] Write the whole buffer to the current file. This is
|
:w[rite] [++opt] Write the whole buffer to the current file. This is
|
||||||
the normal way to save changes to a file. It fails
|
the normal way to save changes to a file. It fails
|
||||||
when the 'readonly' option is set or when there is
|
when the 'readonly' option is set or when there is
|
||||||
another reason why the file can't be written.
|
another reason why the file can't be written.
|
||||||
|
For ++opt see |++opt|, but only ++bin, ++nobin, ++ff
|
||||||
|
and ++enc are effective.
|
||||||
|
|
||||||
:w[rite]! Like ":write", but forcefully write when 'readonly' is
|
:w[rite]! [++opt] Like ":write", but forcefully write when 'readonly' is
|
||||||
set or there is another reason why writing was
|
set or there is another reason why writing was
|
||||||
refused.
|
refused.
|
||||||
Note: This may change the permission and ownership of
|
Note: This may change the permission and ownership of
|
||||||
the file and break (symbolic) links. Add the 'W' flag
|
the file and break (symbolic) links. Add the 'W' flag
|
||||||
to 'cpoptions' to avoid this.
|
to 'cpoptions' to avoid this.
|
||||||
|
|
||||||
:[range]w[rite][!] Write the specified lines to the current file. This
|
:[range]w[rite][!] [++opt]
|
||||||
|
Write the specified lines to the current file. This
|
||||||
is unusual, because the file will not contain all
|
is unusual, because the file will not contain all
|
||||||
lines in the buffer.
|
lines in the buffer.
|
||||||
|
|
||||||
*:w_f* *:write_f*
|
*:w_f* *:write_f*
|
||||||
:[range]w[rite] {file} Write the specified lines to {file}, unless it
|
:[range]w[rite] [++opt] {file}
|
||||||
|
Write the specified lines to {file}, unless it
|
||||||
already exists and the 'writeany' option is off.
|
already exists and the 'writeany' option is off.
|
||||||
|
|
||||||
*:w!*
|
*:w!*
|
||||||
:[range]w[rite]! {file} Write the specified lines to {file}. Overwrite an
|
:[range]w[rite]! [++opt] {file}
|
||||||
|
Write the specified lines to {file}. Overwrite an
|
||||||
existing file.
|
existing file.
|
||||||
|
|
||||||
*:w_a* *:write_a* *E494*
|
*:w_a* *:write_a* *E494*
|
||||||
:[range]w[rite][!] >> Append the specified lines to the current file.
|
:[range]w[rite][!] [++opt] >>
|
||||||
|
Append the specified lines to the current file.
|
||||||
|
|
||||||
:[range]w[rite][!] >> {file}
|
:[range]w[rite][!] [++opt] >> {file}
|
||||||
Append the specified lines to {file}. '!' forces the
|
Append the specified lines to {file}. '!' forces the
|
||||||
write even if file does not exist.
|
write even if file does not exist.
|
||||||
|
|
||||||
*:w_c* *:write_c*
|
*:w_c* *:write_c*
|
||||||
:[range]w[rite] !{cmd} Execute {cmd} with [range] lines as standard input
|
:[range]w[rite] [++opt] !{cmd}
|
||||||
|
Execute {cmd} with [range] lines as standard input
|
||||||
(note the space in front of the '!'). {cmd} is
|
(note the space in front of the '!'). {cmd} is
|
||||||
executed like with ":!{cmd}", any '!' is replaced with
|
executed like with ":!{cmd}", any '!' is replaced with
|
||||||
the previous command |:!|.
|
the previous command |:!|.
|
||||||
|
|
||||||
The default [range] for the ":w" command is the whole buffer (1,$). If you
|
The default [range] for the ":w" command is the whole buffer (1,$). If you
|
||||||
write the whole buffer, it is no longer considered changed. Also when you
|
write the whole buffer, it is no longer considered changed. When you
|
||||||
write it to a different file with ":w somefile"!
|
write it to a different file with ":w somefile" it depends on the "+" flag in
|
||||||
|
'cpoptions'. When included, the write command will reset the 'modified' flag,
|
||||||
|
even though the buffer itself may still be different from its file.
|
||||||
|
|
||||||
If a file name is given with ":w" it becomes the alternate file. This can be
|
If a file name is given with ":w" it becomes the alternate file. This can be
|
||||||
used, for example, when the write fails and you want to try again later with
|
used, for example, when the write fails and you want to try again later with
|
||||||
@@ -897,7 +915,8 @@ used, for example, when the write fails and you want to try again later with
|
|||||||
'cpoptions' option.
|
'cpoptions' option.
|
||||||
|
|
||||||
*:sav* *:saveas*
|
*:sav* *:saveas*
|
||||||
:sav[eas][!] {file} Save the current buffer under the name {file} and set
|
:sav[eas][!] [++opt] {file}
|
||||||
|
Save the current buffer under the name {file} and set
|
||||||
the filename of the current buffer to {file}. The
|
the filename of the current buffer to {file}. The
|
||||||
previous name is used for the alternate file name.
|
previous name is used for the alternate file name.
|
||||||
The [!] is needed to overwrite an existing file.
|
The [!] is needed to overwrite an existing file.
|
||||||
@@ -907,7 +926,7 @@ used, for example, when the write fails and you want to try again later with
|
|||||||
{not in Vi}
|
{not in Vi}
|
||||||
|
|
||||||
*:up* *:update*
|
*:up* *:update*
|
||||||
:[range]up[date][!] [>>] [file]
|
:[range]up[date][!] [++opt] [>>] [file]
|
||||||
Like ":write", but only write when the buffer has been
|
Like ":write", but only write when the buffer has been
|
||||||
modified. {not in Vi}
|
modified. {not in Vi}
|
||||||
|
|
||||||
@@ -966,6 +985,11 @@ 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
|
If the creation of a backup file fails, the write is not done. If you want
|
||||||
to write anyway add a '!' to the command.
|
to write anyway add a '!' to the command.
|
||||||
|
|
||||||
|
*write-permissions*
|
||||||
|
When writing a new file the permissions are read-write. For unix the mask is
|
||||||
|
0666 with additionally umask applied. When writing a file that was read Vim
|
||||||
|
will preserve the permissions, but clear the s-bit.
|
||||||
|
|
||||||
*write-readonly*
|
*write-readonly*
|
||||||
When the 'cpoptions' option contains 'W', Vim will refuse to overwrite a
|
When the 'cpoptions' option contains 'W', Vim will refuse to overwrite a
|
||||||
readonly file. When 'W' is not present, ":w!" will overwrite a readonly file,
|
readonly file. When 'W' is not present, ":w!" will overwrite a readonly file,
|
||||||
@@ -1056,30 +1080,31 @@ The names can be in upper- or lowercase.
|
|||||||
|quickfix|). {not in Vi}
|
|quickfix|). {not in Vi}
|
||||||
|
|
||||||
*:wq*
|
*:wq*
|
||||||
:wq Write the current file and quit. Writing fails when
|
:wq [++opt] Write the current file and quit. Writing fails when
|
||||||
the file is read-only or the buffer does not have a
|
the file is read-only or the buffer does not have a
|
||||||
name. Quitting fails when the last file in the
|
name. Quitting fails when the last file in the
|
||||||
argument list has not been edited.
|
argument list has not been edited.
|
||||||
|
|
||||||
:wq! Write the current file and quit. Writing fails when
|
:wq! [++opt] Write the current file and quit. Writing fails when
|
||||||
the current buffer does not have a name.
|
the current buffer does not have a name.
|
||||||
|
|
||||||
:wq {file} Write to {file} and quit. Quitting fails when the
|
:wq [++opt] {file} Write to {file} and quit. Quitting fails when the
|
||||||
last file in the argument list has not been edited.
|
last file in the argument list has not been edited.
|
||||||
|
|
||||||
:wq! {file} Write to {file} and quit.
|
:wq! [++opt] {file} Write to {file} and quit.
|
||||||
|
|
||||||
:[range]wq[!] [file] Same as above, but only write the lines in [range].
|
:[range]wq[!] [++opt] [file]
|
||||||
|
Same as above, but only write the lines in [range].
|
||||||
|
|
||||||
*:x* *:xit*
|
*:x* *:xit*
|
||||||
:[range]x[it][!] [file]
|
:[range]x[it][!] [++opt] [file]
|
||||||
Like ":wq", but write only when changes have been
|
Like ":wq", but write only when changes have been
|
||||||
made.
|
made.
|
||||||
When 'hidden' is set and there are more windows, the
|
When 'hidden' is set and there are more windows, the
|
||||||
current buffer becomes hidden, after writing the file.
|
current buffer becomes hidden, after writing the file.
|
||||||
|
|
||||||
*:exi* *:exit*
|
*:exi* *:exit*
|
||||||
:[range]exi[t][!] [file]
|
:[range]exi[t][!] [++opt] [file]
|
||||||
Same as :xit.
|
Same as :xit.
|
||||||
|
|
||||||
*ZZ*
|
*ZZ*
|
||||||
@@ -1105,22 +1130,24 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
|
|||||||
changed. See |:confirm|. {not in Vi}
|
changed. See |:confirm|. {not in Vi}
|
||||||
|
|
||||||
:qa[ll]! Exit Vim. Any changes to buffers are lost. {not in Vi}
|
:qa[ll]! Exit Vim. Any changes to buffers are lost. {not in Vi}
|
||||||
|
Also see |:cquit|, it does the same but exits with a non-zero
|
||||||
|
value.
|
||||||
|
|
||||||
*:quita* *:quitall*
|
*:quita* *:quitall*
|
||||||
:quita[ll][!] Same as ":qall". {not in Vi}
|
:quita[ll][!] Same as ":qall". {not in Vi}
|
||||||
|
|
||||||
:wqa[ll] *:wqa* *:wqall* *:xa* *:xall*
|
:wqa[ll] [++opt] *:wqa* *:wqall* *:xa* *:xall*
|
||||||
:xa[ll] Write all changed buffers and exit Vim. If there are buffers
|
:xa[ll] Write all changed buffers and exit Vim. If there are buffers
|
||||||
without a file name, which are readonly or which cannot be
|
without a file name, which are readonly or which cannot be
|
||||||
written for another reason, Vim will not quit. {not in Vi}
|
written for another reason, Vim will not quit. {not in Vi}
|
||||||
|
|
||||||
:conf[irm] wqa[ll]
|
:conf[irm] wqa[ll] [++opt]
|
||||||
:conf[irm] xa[ll]
|
:conf[irm] xa[ll]
|
||||||
Write all changed buffers and exit Vim. Bring up a prompt
|
Write all changed buffers and exit Vim. Bring up a prompt
|
||||||
when some buffers are readonly or cannot be written for
|
when some buffers are readonly or cannot be written for
|
||||||
another reason. See |:confirm|. {not in Vi}
|
another reason. See |:confirm|. {not in Vi}
|
||||||
|
|
||||||
:wqa[ll]!
|
:wqa[ll]! [++opt]
|
||||||
:xa[ll]! Write all changed buffers, even the ones that are readonly,
|
:xa[ll]! Write all changed buffers, even the ones that are readonly,
|
||||||
and exit Vim. If there are buffers without a file name or
|
and exit Vim. If there are buffers without a file name or
|
||||||
which cannot be written for another reason, Vim will not quit.
|
which cannot be written for another reason, Vim will not quit.
|
||||||
@@ -1150,14 +1177,21 @@ If you want to always use ":confirm", set the 'confirm' option.
|
|||||||
*:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
|
*:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
|
||||||
:bro[wse] {command} Open a file selection dialog for an argument to
|
:bro[wse] {command} Open a file selection dialog for an argument to
|
||||||
{command}. At present this works for |:e|, |:w|,
|
{command}. At present this works for |:e|, |:w|,
|
||||||
|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|,
|
|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
|
||||||
|:mksession|, |:split|, |:vsplit|, and |:tabe|.
|
|:view|, |:sview|, |:r|, |:saveas|, |:sp|, |:mkexrc|,
|
||||||
|
|:mkvimrc|, |:mksession|, |:mkview|, |:split|,
|
||||||
|
|:vsplit|, |:tabe|, |:tabnew|, |:cfile|, |:cgetfile|,
|
||||||
|
|:caddfile|, |:lfile|, |:lgetfile|, |:laddfile|,
|
||||||
|
|:diffsplit|, |:diffpatch|, |:open|, |:pedit|,
|
||||||
|
|:redir|, |:source|, |:update|, |:visual|, |:vsplit|,
|
||||||
|
and |:qall| if 'confirm' is set.
|
||||||
{only in Win32, Athena, Motif, GTK and Mac GUI}
|
{only in Win32, Athena, Motif, GTK and Mac GUI}
|
||||||
When ":browse" is not possible you get an error
|
When ":browse" is not possible you get an error
|
||||||
message. If the |+browse| feature is missing or the
|
message. If the |+browse| feature is missing or the
|
||||||
{command} doesn't support browsing, the {command} is
|
{command} doesn't support browsing, the {command} is
|
||||||
executed without a dialog.
|
executed without a dialog.
|
||||||
":browse set" works like |:options|.
|
":browse set" works like |:options|.
|
||||||
|
See also |:oldfiles| for ":browse oldfiles".
|
||||||
|
|
||||||
The syntax is best shown via some examples: >
|
The syntax is best shown via some examples: >
|
||||||
:browse e $vim/foo
|
:browse e $vim/foo
|
||||||
@@ -1310,11 +1344,14 @@ There are a few things to remember when editing binary files:
|
|||||||
|
|
||||||
Vim is able to write files encrypted, and read them back. The encrypted text
|
Vim is able to write files encrypted, and read them back. The encrypted text
|
||||||
cannot be read without the right key.
|
cannot be read without the right key.
|
||||||
|
{only available when compiled with the |+cryptv| feature} *E833*
|
||||||
|
|
||||||
Note: The swapfile and text in memory is not encrypted. A system
|
The text in the swap file and the undo file is also encrypted. *E843*
|
||||||
administrator will be able to see your text while you are editing it.
|
|
||||||
When filtering text with ":!filter" or using ":w !command" the text is not
|
Note: The text in memory is not encrypted. A system administrator may be able
|
||||||
encrypted, this may reveal it to others.
|
to see your text while you are editing it. When filtering text with
|
||||||
|
":!filter" or using ":w !command" the text is not encrypted, this may reveal
|
||||||
|
it to others. The 'viminfo' file is not encrypted.
|
||||||
|
|
||||||
WARNING: If you make a typo when entering the key and then write the file and
|
WARNING: If you make a typo when entering the key and then write the file and
|
||||||
exit, the text will be lost!
|
exit, the text will be lost!
|
||||||
@@ -1340,10 +1377,38 @@ the file is encrypted.
|
|||||||
To disable the encryption, reset the 'key' option to an empty value: >
|
To disable the encryption, reset the 'key' option to an empty value: >
|
||||||
:set key=
|
:set key=
|
||||||
|
|
||||||
When reading a file that has been encrypted and this option is not empty, it
|
You can use the 'cryptmethod' option to select the type of encryption, use one
|
||||||
will be used for decryption. If the value is empty, you will be prompted to
|
of these two: >
|
||||||
enter the key. If you don't enter a key, the file is edited without being
|
:setlocal cm=zip " weak method, backwards compatible
|
||||||
decrypted.
|
:setlocal cm=blowfish " strong method
|
||||||
|
Do this before writing the file. When reading an encrypted file it will be
|
||||||
|
set automatically to the method used when that file was written. You can
|
||||||
|
change 'cryptmethod' before writing that file to change the method.
|
||||||
|
To set the default method, used for new files, use one of these in your
|
||||||
|
|vimrc| file: >
|
||||||
|
set cm=zip
|
||||||
|
set cm=blowfish
|
||||||
|
The message given for reading and writing a file will show "[crypted]" when
|
||||||
|
using zip, "[blowfish]" when using blowfish.
|
||||||
|
|
||||||
|
When writing an undo file, the same key and method will be used for the text
|
||||||
|
in the undo file. |persistent-undo|.
|
||||||
|
|
||||||
|
*E817* *E818* *E819* *E820*
|
||||||
|
When encryption does not work properly, you would be able to write your text
|
||||||
|
to a file and never be able to read it back. Therefore a test is performed to
|
||||||
|
check if the encryption works as expected. If you get one of these errors
|
||||||
|
don't write the file encrypted! You need to rebuild the Vim binary to fix
|
||||||
|
this.
|
||||||
|
|
||||||
|
*E831* This is an internal error, "cannot happen". If you can reproduce it,
|
||||||
|
please report to the developers.
|
||||||
|
|
||||||
|
When reading a file that has been encrypted and the 'key' option is not empty,
|
||||||
|
it will be used for decryption. If the value is empty, you will be prompted
|
||||||
|
to enter the key. If you don't enter a key, or you enter the wrong key, the
|
||||||
|
file is edited without being decrypted. There is no warning about using the
|
||||||
|
wrong key (this makes brute force methods to find the key more difficult).
|
||||||
|
|
||||||
If want to start reading a file that uses a different key, set the 'key'
|
If want to start reading a file that uses a different key, set the 'key'
|
||||||
option to an empty string, so that Vim will prompt for a new one. Don't use
|
option to an empty string, so that Vim will prompt for a new one. Don't use
|
||||||
@@ -1353,10 +1418,13 @@ your shoulder.
|
|||||||
Since the value of the 'key' option is supposed to be a secret, its value can
|
Since the value of the 'key' option is supposed to be a secret, its value can
|
||||||
never be viewed. You should not set this option in a vimrc file.
|
never be viewed. You should not set this option in a vimrc file.
|
||||||
|
|
||||||
An encrypted file can be recognized by the "file" command, if you add this
|
An encrypted file can be recognized by the "file" command, if you add these
|
||||||
line to "/etc/magic", "/usr/share/misc/magic" or wherever your system has the
|
lines to "/etc/magic", "/usr/share/misc/magic" or wherever your system has the
|
||||||
"magic" file: >
|
"magic" file: >
|
||||||
0 string VimCrypt~ Vim encrypted file
|
0 string VimCrypt~ Vim encrypted file
|
||||||
|
>9 string 01 - "zip" cryptmethod
|
||||||
|
>9 string 02 - "blowfish" cryptmethod
|
||||||
|
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
- Encryption is not possible when doing conversion with 'charconvert'.
|
- Encryption is not possible when doing conversion with 'charconvert'.
|
||||||
@@ -1371,13 +1439,15 @@ Notes:
|
|||||||
history, showing the 'key' value in a viminfo file.
|
history, showing the 'key' value in a viminfo file.
|
||||||
- There is never 100% safety. The encryption in Vim has not been tested for
|
- There is never 100% safety. The encryption in Vim has not been tested for
|
||||||
robustness.
|
robustness.
|
||||||
- The algorithm used is breakable. A 4 character key in about one hour, a 6
|
- The algorithm used for 'cryptmethod' "zip" is breakable. A 4 character key
|
||||||
character key in one day (on a Pentium 133 PC). This requires that you know
|
in about one hour, a 6 character key in one day (on a Pentium 133 PC). This
|
||||||
some text that must appear in the file. An expert can break it for any key.
|
requires that you know some text that must appear in the file. An expert
|
||||||
When the text has been decrypted, this also means that the key can be
|
can break it for any key. When the text has been decrypted, this also means
|
||||||
revealed, and other files encrypted with the same key can be decrypted.
|
that the key can be revealed, and other files encrypted with the same key
|
||||||
- Pkzip uses the same encryption, and US Govt has no objection to its export.
|
can be decrypted.
|
||||||
Pkzip's public file APPNOTE.TXT describes this algorithm in detail.
|
- Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
|
||||||
|
objection to its export. Pkzip's public file APPNOTE.TXT describes this
|
||||||
|
algorithm in detail.
|
||||||
- Vim originates from the Netherlands. That is where the sources come from.
|
- Vim originates from the Netherlands. That is where the sources come from.
|
||||||
Thus the encryption code is not exported from the USA.
|
Thus the encryption code is not exported from the USA.
|
||||||
|
|
||||||
@@ -1438,6 +1508,17 @@ If you don't get warned often enough you can use the following command.
|
|||||||
may be specified by name, number or with a pattern.
|
may be specified by name, number or with a pattern.
|
||||||
|
|
||||||
|
|
||||||
|
*E813* *E814*
|
||||||
|
Vim will reload the buffer if you chose to. If a window is visible that
|
||||||
|
contains this buffer, the reloading will happen in the context of this window.
|
||||||
|
Otherwise a special window is used, so that most autocommands will work. You
|
||||||
|
can't close this window. A few other restrictions apply. Best is to make
|
||||||
|
sure nothing happens outside of the current buffer. E.g., setting
|
||||||
|
window-local options may end up in the wrong window. Splitting the window,
|
||||||
|
doing something there and closing it should be OK (if there are no side
|
||||||
|
effects from other autocommands). Closing unrelated windows and buffers will
|
||||||
|
get you into trouble.
|
||||||
|
|
||||||
Before writing a file the timestamp is checked. If it has changed, Vim will
|
Before writing a file the timestamp is checked. If it has changed, Vim will
|
||||||
ask if you really want to overwrite the file:
|
ask if you really want to overwrite the file:
|
||||||
|
|
||||||
@@ -1469,21 +1550,25 @@ problem goes away the next day.
|
|||||||
{not available when compiled without the |+path_extra| feature}
|
{not available when compiled without the |+path_extra| feature}
|
||||||
|
|
||||||
The file searching is currently used for the 'path', 'cdpath' and 'tags'
|
The file searching is currently used for the 'path', 'cdpath' and 'tags'
|
||||||
options, for |finddir()| and |findfile()|.
|
options, for |finddir()| and |findfile()|. Other commands use |wildcards|
|
||||||
|
which is slightly different.
|
||||||
|
|
||||||
There are three different types of searching:
|
There are three different types of searching:
|
||||||
|
|
||||||
1) Downward search: *starstar*
|
1) Downward search: *starstar*
|
||||||
Downward search uses the wildcards '*', '**' and possibly others
|
Downward search uses the wildcards '*', '**' and possibly others
|
||||||
supported by your operating system. '*' and '**' are handled inside Vim, so
|
supported by your operating system. '*' and '**' are handled inside Vim,
|
||||||
they work on all operating systems.
|
so they work on all operating systems. Note that "**" only acts as a
|
||||||
|
special wildcard when it is at the start of a name.
|
||||||
|
|
||||||
The usage of '*' is quite simple: It matches 0 or more characters.
|
The usage of '*' is quite simple: It matches 0 or more characters. In a
|
||||||
|
search pattern this would be ".*". Note that the "." is not used for file
|
||||||
|
searching.
|
||||||
|
|
||||||
'**' is more sophisticated:
|
'**' is more sophisticated:
|
||||||
- It ONLY matches directories.
|
- It ONLY matches directories.
|
||||||
- It matches up to 30 directories deep, so you can use it to search an
|
- It matches up to 30 directories deep by default, so you can use it to
|
||||||
entire directory tree
|
search an entire directory tree
|
||||||
- The maximum number of levels matched can be given by appending a number
|
- The maximum number of levels matched can be given by appending a number
|
||||||
to '**'.
|
to '**'.
|
||||||
Thus '/usr/**2' can match: >
|
Thus '/usr/**2' can match: >
|
||||||
@@ -1496,15 +1581,16 @@ There are three different types of searching:
|
|||||||
....
|
....
|
||||||
< It does NOT match '/usr/include/g++/std' as this would be three
|
< It does NOT match '/usr/include/g++/std' as this would be three
|
||||||
levels.
|
levels.
|
||||||
The allowed number range is 0 ('**0' is removed) to 255.
|
The allowed number range is 0 ('**0' is removed) to 100
|
||||||
If the given number is smaller than 0 it defaults to 30, if it's
|
If the given number is smaller than 0 it defaults to 30, if it's
|
||||||
bigger than 255 it defaults to 255.
|
bigger than 100 then 100 is used. The system also has a limit on the
|
||||||
|
path length, usually 256 or 1024 bytes.
|
||||||
- '**' can only be at the end of the path or be followed by a path
|
- '**' can only be at the end of the path or be followed by a path
|
||||||
separator or by a number and a path separator.
|
separator or by a number and a path separator.
|
||||||
|
|
||||||
You can combine '*' and '**' in any order: >
|
You can combine '*' and '**' in any order: >
|
||||||
/usr/**/sys/*
|
/usr/**/sys/*
|
||||||
/usr/*/sys/**
|
/usr/*tory/sys/**
|
||||||
/usr/**2/sys/*
|
/usr/**2/sys/*
|
||||||
|
|
||||||
2) Upward search:
|
2) Upward search:
|
||||||
@@ -1546,10 +1632,13 @@ There are three different types of searching:
|
|||||||
|
|
||||||
In the above example you might want to set path to: >
|
In the above example you might want to set path to: >
|
||||||
:set path=**,/u/user_x/**
|
:set path=**,/u/user_x/**
|
||||||
< This searches: >
|
< This searches:
|
||||||
/u/user_x/work/release/**
|
/u/user_x/work/release/** ~
|
||||||
/u/user_x/**
|
/u/user_x/** ~
|
||||||
< This searches the same directories, but in a different order.
|
This searches the same directories, but in a different order.
|
||||||
|
|
||||||
|
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
|
||||||
|
currently work with 'path' items that contain a url or use the double star
|
||||||
|
(/usr/**2) or upward search (;) notations. >
|
||||||
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
|||||||
1687
runtime/doc/eval.txt
1687
runtime/doc/eval.txt
File diff suppressed because it is too large
Load Diff
@@ -17,10 +17,10 @@ e imposta le opzioni per farlo comportare come un editore "modeless".
|
|||||||
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
|
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
|
||||||
Simile all'uso di Notepad in MS-Windows.
|
Simile all'uso di Notepad in MS-Windows.
|
||||||
.B evim
|
.B evim
|
||||||
richiede la presenza della GUI, per avere a disposizione menu e barra
|
richiede la presenza della GUI, per avere a disposizione men<EFBFBD> e barra
|
||||||
strumenti.
|
strumenti.
|
||||||
.PP
|
.PP
|
||||||
Da usarsi solo da parte di chi non <20> in grado di lavorare con Vim nella
|
Da usarsi soltanto se non si <EFBFBD> in grado di lavorare con Vim nella
|
||||||
maniera usuale.
|
maniera usuale.
|
||||||
La modifica file sar<61> molto meno efficiente.
|
La modifica file sar<61> molto meno efficiente.
|
||||||
.PP
|
.PP
|
||||||
@@ -34,7 +34,7 @@ L'opzione 'insertmode'
|
|||||||
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
|
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
|
||||||
familiari tasti usati sotto MS-Windows.
|
familiari tasti usati sotto MS-Windows.
|
||||||
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
|
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
|
||||||
Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
|
Usate CTRL-Q per ottenere quello che si otterrebbe con CTRL-V in Vim nativo.
|
||||||
.SH OPZIONI
|
.SH OPZIONI
|
||||||
Vedere vim(1).
|
Vedere vim(1).
|
||||||
.SH FILE
|
.SH FILE
|
||||||
@@ -51,4 +51,4 @@ vim(1)
|
|||||||
Buona parte di
|
Buona parte di
|
||||||
.B Vim
|
.B Vim
|
||||||
<EFBFBD> stato scritto da Bram Moolenaar, con molto aiuto da altri.
|
<EFBFBD> stato scritto da Bram Moolenaar, con molto aiuto da altri.
|
||||||
Vedere il Menu "Aiuto/Crediti".
|
Vedere il men<EFBFBD> "Aiuto/Crediti".
|
||||||
|
|||||||
@@ -17,10 +17,10 @@ e imposta le opzioni per farlo comportare come un editore "modeless".
|
|||||||
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
|
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
|
||||||
Simile all'uso di Notepad in MS-Windows.
|
Simile all'uso di Notepad in MS-Windows.
|
||||||
.B evim
|
.B evim
|
||||||
richiede la presenza della GUI, per avere a disposizione menu e barra
|
richiede la presenza della GUI, per avere a disposizione menù e barra
|
||||||
strumenti.
|
strumenti.
|
||||||
.PP
|
.PP
|
||||||
Da usarsi solo da parte di chi non è in grado di lavorare con Vim nella
|
Da usarsi soltanto se non si è in grado di lavorare con Vim nella
|
||||||
maniera usuale.
|
maniera usuale.
|
||||||
La modifica file sarà molto meno efficiente.
|
La modifica file sarà molto meno efficiente.
|
||||||
.PP
|
.PP
|
||||||
@@ -34,7 +34,7 @@ L'opzione 'insertmode' è impostata per poter immettere del testo direttamente.
|
|||||||
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
|
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
|
||||||
familiari tasti usati sotto MS-Windows.
|
familiari tasti usati sotto MS-Windows.
|
||||||
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
|
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
|
||||||
Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
|
Usate CTRL-Q per ottenere quello che si otterrebbe con CTRL-V in Vim nativo.
|
||||||
.SH OPZIONI
|
.SH OPZIONI
|
||||||
Vedere vim(1).
|
Vedere vim(1).
|
||||||
.SH FILE
|
.SH FILE
|
||||||
@@ -51,4 +51,4 @@ vim(1)
|
|||||||
Buona parte di
|
Buona parte di
|
||||||
.B Vim
|
.B Vim
|
||||||
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
|
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
|
||||||
Vedere il Menu "Aiuto/Crediti".
|
Vedere il menù "Aiuto/Crediti".
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ uruchamia
|
|||||||
.B Vima
|
.B Vima
|
||||||
i ustawia opcje tak by zachowywa<77> si<73> jak edytor bez tryb<79>w.
|
i ustawia opcje tak by zachowywa<77> si<73> jak edytor bez tryb<79>w.
|
||||||
To jest ca<63>y czas Vim ale u<>ywany jako edytor wska<6B>-i-kliknij.
|
To jest ca<63>y czas Vim ale u<>ywany jako edytor wska<6B>-i-kliknij.
|
||||||
Zachowanie w stlu Notepada dla MS-Windows.
|
Zachowanie w stylu Notepada dla MS-Windows.
|
||||||
.B eVim
|
.B eVim
|
||||||
b<EFBFBD>dzie zawsze uruchomiony w GUI by w<><77>czy<7A> menu i pasek narz<72>dzi.
|
b<EFBFBD>dzie zawsze uruchomiony w GUI by w<><77>czy<7A> menu i pasek narz<72>dzi.
|
||||||
.PP
|
.PP
|
||||||
Przeznaczony tylko dla ludzi, kt<6B>rzy naprawd<77> nie potrafi<EFBFBD> pracowa<77>
|
Przeznaczony tylko dla ludzi, kt<6B>rzy naprawd<77> nie mog<EFBFBD> pracowa<77>
|
||||||
z Vimem w normalny spos<6F>b. Edycja b<>dzie o wiele mniej efektywna.
|
z Vimem w normalny spos<6F>b. Edycja b<>dzie o wiele mniej efektywna.
|
||||||
.PP
|
.PP
|
||||||
.B eview
|
.B eview
|
||||||
@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by mo
|
|||||||
tekst.
|
tekst.
|
||||||
.br
|
.br
|
||||||
Mapowania s<> ustawione tak by Kopiowanie i Wklejanie dzia<69>a<EFBFBD>o
|
Mapowania s<> ustawione tak by Kopiowanie i Wklejanie dzia<69>a<EFBFBD>o
|
||||||
z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje
|
z klawiszami MS-Windows. CTRL-X wycina, CTRL-C kopiuje a CTRL-V
|
||||||
a CTRL-V wkleja. U<>yj CTRL-Q by uzyska<6B> oryginalne znaczenie
|
wkleja tekst. U<>yj CTRL-Q by uzyska<6B> oryginalne przeznaczenie
|
||||||
CTRL-V.
|
CTRL-V.
|
||||||
.SH OPCJE
|
.SH OPCJE
|
||||||
Zobacz vim(1).
|
Zobacz vim(1).
|
||||||
@@ -42,7 +42,7 @@ Zobacz vim(1).
|
|||||||
Skrypt uruchamiania dla eVima.
|
Skrypt uruchamiania dla eVima.
|
||||||
.SH ZNANY JAKO
|
.SH ZNANY JAKO
|
||||||
Znany jako "Vim dla frajer<65>w".
|
Znany jako "Vim dla frajer<65>w".
|
||||||
Je<EFBFBD>li u<>ywasz evima oczekuje si<73>, <20>e wyjmiesz chusteczk<7A> do nosa,
|
Je<EFBFBD>li u<>ywasz eVima oczekuje si<73>, <20>e wyjmiesz chusteczk<7A> do nosa,
|
||||||
zrobisz w<>z<EFBFBD><7A> w ka<6B>dym rogu i b<>dziesz to nosi<73> na g<>owie.
|
zrobisz w<>z<EFBFBD><7A> w ka<6B>dym rogu i b<>dziesz to nosi<73> na g<>owie.
|
||||||
.SH ZOBACZ TAK<EFBFBD>E
|
.SH ZOBACZ TAK<EFBFBD>E
|
||||||
vim(1)
|
vim(1)
|
||||||
|
|||||||
@@ -14,11 +14,11 @@ uruchamia
|
|||||||
.B Vima
|
.B Vima
|
||||||
i ustawia opcje tak by zachowywał się jak edytor bez trybów.
|
i ustawia opcje tak by zachowywał się jak edytor bez trybów.
|
||||||
To jest cały czas Vim ale używany jako edytor wskaż-i-kliknij.
|
To jest cały czas Vim ale używany jako edytor wskaż-i-kliknij.
|
||||||
Zachowanie w stlu Notepada dla MS-Windows.
|
Zachowanie w stylu Notepada dla MS-Windows.
|
||||||
.B eVim
|
.B eVim
|
||||||
będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi.
|
będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi.
|
||||||
.PP
|
.PP
|
||||||
Przeznaczony tylko dla ludzi, którzy naprawdę nie potrafią pracować
|
Przeznaczony tylko dla ludzi, którzy naprawdę nie mogą pracować
|
||||||
z Vimem w normalny sposób. Edycja będzie o wiele mniej efektywna.
|
z Vimem w normalny sposób. Edycja będzie o wiele mniej efektywna.
|
||||||
.PP
|
.PP
|
||||||
.B eview
|
.B eview
|
||||||
@@ -31,8 +31,8 @@ Opcja 'insertmode' jest ustawiona by można było od razu wpisywać
|
|||||||
tekst.
|
tekst.
|
||||||
.br
|
.br
|
||||||
Mapowania są ustawione tak by Kopiowanie i Wklejanie działało
|
Mapowania są ustawione tak by Kopiowanie i Wklejanie działało
|
||||||
z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje
|
z klawiszami MS-Windows. CTRL-X wycina, CTRL-C kopiuje a CTRL-V
|
||||||
a CTRL-V wkleja. Użyj CTRL-Q by uzyskać oryginalne znaczenie
|
wkleja tekst. Użyj CTRL-Q by uzyskać oryginalne przeznaczenie
|
||||||
CTRL-V.
|
CTRL-V.
|
||||||
.SH OPCJE
|
.SH OPCJE
|
||||||
Zobacz vim(1).
|
Zobacz vim(1).
|
||||||
@@ -42,7 +42,7 @@ Zobacz vim(1).
|
|||||||
Skrypt uruchamiania dla eVima.
|
Skrypt uruchamiania dla eVima.
|
||||||
.SH ZNANY JAKO
|
.SH ZNANY JAKO
|
||||||
Znany jako "Vim dla frajerów".
|
Znany jako "Vim dla frajerów".
|
||||||
Jeśli używasz evima oczekuje się, że wyjmiesz chusteczkę do nosa,
|
Jeśli używasz eVima oczekuje się, że wyjmiesz chusteczkę do nosa,
|
||||||
zrobisz węzęł w każdym rogu i będziesz to nosił na głowie.
|
zrobisz węzęł w każdym rogu i będziesz to nosił na głowie.
|
||||||
.SH ZOBACZ TAKŻE
|
.SH ZOBACZ TAKŻE
|
||||||
vim(1)
|
vim(1)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*farsi.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
*farsi.txt* For Vim version 7.3. Last change: 2010 Aug 07
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
|
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
|
||||||
@@ -62,8 +62,8 @@ o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9
|
|||||||
Farsi Fonts *farsi fonts*
|
Farsi Fonts *farsi fonts*
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
If the "extra" archive has been unpacked, the following files are found in the
|
The following files are found in the subdirectories of the '$VIM/farsi/fonts'
|
||||||
subdirectories of the '$VIM/farsi' directory:
|
directory:
|
||||||
|
|
||||||
+ far-a01.pcf X Windows fonts for Unix including Linux systems
|
+ far-a01.pcf X Windows fonts for Unix including Linux systems
|
||||||
+ far-a01.bf X Windows fonts for SunOS
|
+ far-a01.bf X Windows fonts for SunOS
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*filetype.txt* For Vim version 7.1. Last change: 2007 May 10
|
*filetype.txt* For Vim version 7.3. Last change: 2008 Jul 15
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -55,7 +55,7 @@ filetype prepend "ft-" and optionally append "-syntax", "-indent" or
|
|||||||
|
|
||||||
If the file type is not detected automatically, or it finds the wrong type,
|
If the file type is not detected automatically, or it finds the wrong type,
|
||||||
you can either set the 'filetype' option manually, or add a modeline to your
|
you can either set the 'filetype' option manually, or add a modeline to your
|
||||||
file. Example, for in an IDL file use the command: >
|
file. Example, for an IDL file use the command: >
|
||||||
:set filetype=idl
|
:set filetype=idl
|
||||||
|
|
||||||
or add this |modeline| to the file:
|
or add this |modeline| to the file:
|
||||||
@@ -122,7 +122,7 @@ The file types are also used for syntax highlighting. If the ":syntax on"
|
|||||||
command is used, the file type detection is installed too. There is no need
|
command is used, the file type detection is installed too. There is no need
|
||||||
to do ":filetype on" after ":syntax on".
|
to do ":filetype on" after ":syntax on".
|
||||||
|
|
||||||
To disable one of the file types, add a line in the your filetype file, see
|
To disable one of the file types, add a line in your filetype file, see
|
||||||
|remove-filetype|.
|
|remove-filetype|.
|
||||||
|
|
||||||
*filetype-detect*
|
*filetype-detect*
|
||||||
@@ -284,8 +284,8 @@ match in angle brackets in place of a pattern, like this: >
|
|||||||
|
|
||||||
This will match:
|
This will match:
|
||||||
|
|
||||||
- Any file whose name ends in `.html'
|
- Any file whose name ends in ".html"
|
||||||
- Any file whose type is `&faf' or 'HTML', where the meaning of these types
|
- Any file whose type is "&faf" or "HTML", where the meaning of these types
|
||||||
depends on which version of Vim you are using.
|
depends on which version of Vim you are using.
|
||||||
Unknown types are considered NOT to match.
|
Unknown types are considered NOT to match.
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ must both match): >
|
|||||||
|
|
||||||
:au BufRead <&fff>diff*
|
:au BufRead <&fff>diff*
|
||||||
|
|
||||||
This will match files of type `&fff' whose names start with `diff'.
|
This will match files of type "&fff" whose names start with "diff".
|
||||||
|
|
||||||
Note that osfiletype checking is skipped if Vim is compiled without the
|
Note that osfiletype checking is skipped if Vim is compiled without the
|
||||||
|+osfiletype| feature.
|
|+osfiletype| feature.
|
||||||
@@ -482,6 +482,29 @@ g:changelog_date_end_entry_search
|
|||||||
The default is '^\s*$' which finds lines that contain
|
The default is '^\s*$' which finds lines that contain
|
||||||
only whitespace or are completely empty.
|
only whitespace or are completely empty.
|
||||||
|
|
||||||
|
b:changelog_name *b:changelog_name*
|
||||||
|
Name of the ChangeLog file to look for.
|
||||||
|
The default is 'ChangeLog'.
|
||||||
|
|
||||||
|
b:changelog_path
|
||||||
|
Path of the ChangeLog to use for the current buffer.
|
||||||
|
The default is empty, thus looking for a file named
|
||||||
|
|b:changelog_name| in the same directory as the
|
||||||
|
current buffer. If not found, the parent directory of
|
||||||
|
the current buffer is searched. This continues
|
||||||
|
recursively until a file is found or there are no more
|
||||||
|
parent directories to search.
|
||||||
|
|
||||||
|
b:changelog_entry_prefix
|
||||||
|
Name of a function to call to generate a prefix to a
|
||||||
|
new entry. This function takes no arguments and
|
||||||
|
should return a string containing the prefix.
|
||||||
|
Returning an empty prefix is fine.
|
||||||
|
The default generates the shortest path between the
|
||||||
|
ChangeLog's pathname and the current buffers pathname.
|
||||||
|
In the future, it will also be possible to use other
|
||||||
|
variable contexts for this variable, for example, g:.
|
||||||
|
|
||||||
The Changelog entries are inserted where they add the least amount of text.
|
The Changelog entries are inserted where they add the least amount of text.
|
||||||
After figuring out the current date and user, the file is searched for an
|
After figuring out the current date and user, the file is searched for an
|
||||||
entry beginning with the current date and user and if found adds another item
|
entry beginning with the current date and user and if found adds another item
|
||||||
@@ -502,6 +525,13 @@ For further discussion of fortran_have_tabs and the method used for the
|
|||||||
detection of source format see |ft-fortran-syntax|.
|
detection of source format see |ft-fortran-syntax|.
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
any arguments given to the command.
|
||||||
|
|
||||||
|
|
||||||
MAIL *ft-mail-plugin*
|
MAIL *ft-mail-plugin*
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
@@ -546,6 +576,20 @@ CTRL-] Jump to the manual page for the word under the cursor.
|
|||||||
CTRL-T Jump back to the previous manual page.
|
CTRL-T Jump back to the previous manual page.
|
||||||
|
|
||||||
|
|
||||||
|
PDF *ft-pdf-plugin*
|
||||||
|
|
||||||
|
Two maps, <C-]> and <C-T>, are provided to simulate a tag stack for navigating
|
||||||
|
the PDF. The following are treated as tags:
|
||||||
|
|
||||||
|
- The byte offset after "startxref" to the xref table
|
||||||
|
- The byte offset after the /Prev key in the trailer to an earlier xref table
|
||||||
|
- A line of the form "0123456789 00000 n" in the xref table
|
||||||
|
- An object reference like "1 0 R" anywhere in the PDF
|
||||||
|
|
||||||
|
These maps can be disabled with >
|
||||||
|
:let g:no_pdf_maps = 1
|
||||||
|
<
|
||||||
|
|
||||||
RPM SPEC *ft-spec-plugin*
|
RPM SPEC *ft-spec-plugin*
|
||||||
|
|
||||||
Since the text for this plugin is rather long it has been put in a separate
|
Since the text for this plugin is rather long it has been put in a separate
|
||||||
@@ -555,7 +599,7 @@ file: |pi_spec.txt|.
|
|||||||
SQL *ft-sql*
|
SQL *ft-sql*
|
||||||
|
|
||||||
Since the text for this plugin is rather long it has been put in a separate
|
Since the text for this plugin is rather long it has been put in a separate
|
||||||
file: |sql.txt|.
|
file: |ft_sql.txt|.
|
||||||
|
|
||||||
|
|
||||||
TEX *ft-tex-plugin*
|
TEX *ft-tex-plugin*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
*fold.txt* For Vim version 7.1. Last change: 2007 May 11
|
*fold.txt* For Vim version 7.3. Last change: 2010 May 13
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
|
||||||
|
|
||||||
Folding *Folding* *folding*
|
Folding *Folding* *folding* *folds*
|
||||||
|
|
||||||
You can find an introduction on folding in chapter 28 of the user manual.
|
You can find an introduction on folding in chapter 28 of the user manual.
|
||||||
|usr_28.txt|
|
|usr_28.txt|
|
||||||
@@ -15,7 +15,7 @@ You can find an introduction on folding in chapter 28 of the user manual.
|
|||||||
4. Behavior of folds |fold-behavior|
|
4. Behavior of folds |fold-behavior|
|
||||||
|
|
||||||
{Vi has no Folding}
|
{Vi has no Folding}
|
||||||
{not available when compiled without the +folding feature}
|
{not available when compiled without the |+folding| feature}
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
1. Fold methods *fold-methods*
|
1. Fold methods *fold-methods*
|
||||||
@@ -127,6 +127,9 @@ fold level. But note that foldlevel() may return -1 if the level is not known
|
|||||||
yet. And it returns the level at the start of the line, while a fold might
|
yet. And it returns the level at the start of the line, while a fold might
|
||||||
end in that line.
|
end in that line.
|
||||||
|
|
||||||
|
It may happened that folds are not updated properly. You can use |zx| or |zX|
|
||||||
|
to force updating folds.
|
||||||
|
|
||||||
|
|
||||||
SYNTAX *fold-syntax*
|
SYNTAX *fold-syntax*
|
||||||
|
|
||||||
@@ -274,7 +277,7 @@ zf{motion} or
|
|||||||
Also see |fold-create-marker|.
|
Also see |fold-create-marker|.
|
||||||
|
|
||||||
*zF*
|
*zF*
|
||||||
zF Create a fold for N lines. Works like "zf".
|
zF Create a fold for [count] lines. Works like "zf".
|
||||||
|
|
||||||
:{range}fo[ld] *:fold* *:fo*
|
:{range}fo[ld] *:fold* *:fo*
|
||||||
Create a fold for the lines in {range}. Works like "zf".
|
Create a fold for the lines in {range}. Works like "zf".
|
||||||
@@ -352,9 +355,13 @@ zv View cursor line: Open just enough folds to make the line in
|
|||||||
*zx*
|
*zx*
|
||||||
zx Update folds: Undo manually opened and closed folds: re-apply
|
zx Update folds: Undo manually opened and closed folds: re-apply
|
||||||
'foldlevel', then do "zv": View cursor line.
|
'foldlevel', then do "zv": View cursor line.
|
||||||
|
Also forces recomputing folds. This is useful when using
|
||||||
|
'foldexpr' and the buffer is changed in a way that results in
|
||||||
|
folds not to be updated properly.
|
||||||
|
|
||||||
*zX*
|
*zX*
|
||||||
zX Undo manually opened and closed folds: re-apply 'foldlevel'.
|
zX Undo manually opened and closed folds: re-apply 'foldlevel'.
|
||||||
|
Also forces recomputing folds, like |zx|.
|
||||||
|
|
||||||
*zm*
|
*zm*
|
||||||
zm Fold more: Subtract one from 'foldlevel'. If 'foldlevel' was
|
zm Fold more: Subtract one from 'foldlevel'. If 'foldlevel' was
|
||||||
@@ -399,24 +406,24 @@ MOVING OVER FOLDS ~
|
|||||||
[z Move to the start of the current open fold. If already at the
|
[z Move to the start of the current open fold. If already at the
|
||||||
start, move to the start of the fold that contains it. If
|
start, move to the start of the fold that contains it. If
|
||||||
there is no containing fold, the command fails.
|
there is no containing fold, the command fails.
|
||||||
When a count is used, repeats the command N times.
|
When a count is used, repeats the command [count] times.
|
||||||
|
|
||||||
*]z*
|
*]z*
|
||||||
]z Move to the end of the current open fold. If already at the
|
]z Move to the end of the current open fold. If already at the
|
||||||
end, move to the end of the fold that contains it. If there
|
end, move to the end of the fold that contains it. If there
|
||||||
is no containing fold, the command fails.
|
is no containing fold, the command fails.
|
||||||
When a count is used, repeats the command N times.
|
When a count is used, repeats the command [count] times.
|
||||||
|
|
||||||
*zj*
|
*zj*
|
||||||
zj Move downwards to the start of the next fold. A closed fold
|
zj Move downwards to the start of the next fold. A closed fold
|
||||||
is counted as one fold.
|
is counted as one fold.
|
||||||
When a count is used, repeats the command N times.
|
When a count is used, repeats the command [count] times.
|
||||||
This command can be used after an |operator|.
|
This command can be used after an |operator|.
|
||||||
|
|
||||||
*zk*
|
*zk*
|
||||||
zk Move upwards to the end of the previous fold. A closed fold
|
zk Move upwards to the end of the previous fold. A closed fold
|
||||||
is counted as one fold.
|
is counted as one fold.
|
||||||
When a count is used, repeats the command N times.
|
When a count is used, repeats the command [count] times.
|
||||||
This command can be used after an |operator|.
|
This command can be used after an |operator|.
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*ada.txt* For Vim version 7.1. Last change: 2007 May 08
|
*ft_ada.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||||
|
|
||||||
|
|
||||||
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
|
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
|
||||||
@@ -6,20 +6,20 @@
|
|||||||
ADA *ada.vim*
|
ADA *ada.vim*
|
||||||
|
|
||||||
1. Syntax Highlighting |ft-ada-syntax|
|
1. Syntax Highlighting |ft-ada-syntax|
|
||||||
2. Plug-in |ft-ada-plugin|
|
2. File type Plug-in |ft-ada-plugin|
|
||||||
3. Omni Completion |ft-ada-omni|
|
3. Omni Completion |ft-ada-omni|
|
||||||
3.1 Omni Completion with "gnat xref" |gnat-xref|
|
3.1 Omni Completion with "gnat xref" |gnat-xref|
|
||||||
3.2 Omni Completion with "ctags" |ada-ctags|
|
3.2 Omni Completion with "ctags" |ada-ctags|
|
||||||
4. Compiler Support |ada-compiler|
|
4. Compiler Support |ada-compiler|
|
||||||
4.1 GNAT |compiler-gnat|
|
4.1 GNAT |compiler-gnat|
|
||||||
4.1 Dec Ada |compiler-decada|
|
4.2 Dec Ada |compiler-decada|
|
||||||
5. References |ada-reference|
|
5. References |ada-reference|
|
||||||
5.1 Options |ft-ada-options|
|
5.1 Options |ft-ada-options|
|
||||||
5.2 Functions |ft-ada-functions|
|
5.2 Commands |ft-ada-commands|
|
||||||
5.3 Commands |ft-ada-commands|
|
5.3 Variables |ft-ada-variables|
|
||||||
5.4 Variables |ft-ada-variables|
|
5.4 Constants |ft-ada-constants|
|
||||||
5.5 Constants |ft-ada-constants|
|
5.5 Functions |ft-ada-functions|
|
||||||
8. Extra Plug-ins |ada-extra-plugins|
|
6. Extra Plug-ins |ada-extra-plugins|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
1. Syntax Highlighting ~
|
1. Syntax Highlighting ~
|
||||||
@@ -45,7 +45,7 @@ to change how loops are displayed, enter the command ":hi Repeat" followed by
|
|||||||
the colour specification; on simple terminals the colour specification
|
the colour specification; on simple terminals the colour specification
|
||||||
ctermfg=White often shows well).
|
ctermfg=White often shows well).
|
||||||
|
|
||||||
There are several options you can select in this Ada mode. See|ft-ada-options|
|
There are several options you can select in this Ada mode. See |ft-ada-options|
|
||||||
for a complete list.
|
for a complete list.
|
||||||
|
|
||||||
To enable them, assign a value to the option. For example, to turn one on:
|
To enable them, assign a value to the option. For example, to turn one on:
|
||||||
@@ -82,7 +82,7 @@ The Ada plug-in provides support for:
|
|||||||
- comment handling (|'comments'|, |'commentstring'|)
|
- comment handling (|'comments'|, |'commentstring'|)
|
||||||
|
|
||||||
The plug-in only activates the features of the Ada mode whenever an Ada
|
The plug-in only activates the features of the Ada mode whenever an Ada
|
||||||
files is opened and add adds Ada related entries to the main and pop-up menu.
|
file is opened and adds Ada related entries to the main and pop-up menu.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
3. Omni Completion ~
|
3. Omni Completion ~
|
||||||
@@ -97,10 +97,10 @@ tags file.
|
|||||||
3.1 Omni Completion with "gnat xref" ~
|
3.1 Omni Completion with "gnat xref" ~
|
||||||
*gnat-xref*
|
*gnat-xref*
|
||||||
|
|
||||||
GNAT XREF uses the compiler internal informations (ali-files) to produce the
|
GNAT XREF uses the compiler internal information (ali-files) to produce the
|
||||||
tags file. This has the advantage to be 100% correct and the option of deep
|
tags file. This has the advantage to be 100% correct and the option of deep
|
||||||
nested analysis. However the code must compile, the generator is quite
|
nested analysis. However the code must compile, the generator is quite
|
||||||
slow and the created tags file contains only the basic Ctags informations for
|
slow and the created tags file contains only the basic Ctags information for
|
||||||
each entry - not enough for some of the more advanced Vim code browser
|
each entry - not enough for some of the more advanced Vim code browser
|
||||||
plug-ins.
|
plug-ins.
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
|
|||||||
*ada-ctags*
|
*ada-ctags*
|
||||||
|
|
||||||
Exuberant Ctags uses its own multi-language code parser. The parser is quite
|
Exuberant Ctags uses its own multi-language code parser. The parser is quite
|
||||||
fast, produces a lot of extra informations (hence the name "Exuberant Ctags")
|
fast, produces a lot of extra information (hence the name "Exuberant Ctags")
|
||||||
and can run on files which currently do not compile.
|
and can run on files which currently do not compile.
|
||||||
|
|
||||||
There are also lots of other Vim-tools which use exuberant Ctags.
|
There are also lots of other Vim-tools which use exuberant Ctags.
|
||||||
@@ -139,11 +139,11 @@ The Ada parser for Exuberant Ctags is fairly new - don't expect complete
|
|||||||
support yet.
|
support yet.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
4. Compiler Support ~
|
4. Compiler Support ~
|
||||||
*ada-compiler*
|
*ada-compiler*
|
||||||
|
|
||||||
The Ada mode supports more then one Ada compiler and will automatically load the
|
The Ada mode supports more than one Ada compiler and will automatically load the
|
||||||
compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
|
compiler set in |g:ada_default_compiler| whenever an Ada source is opened. The
|
||||||
provided compiler plug-ins are split into the actual compiler plug-in and a
|
provided compiler plug-ins are split into the actual compiler plug-in and a
|
||||||
collection of support functions and variables. This allows the easy
|
collection of support functions and variables. This allows the easy
|
||||||
development of specialized compiler plug-ins fine tuned to your development
|
development of specialized compiler plug-ins fine tuned to your development
|
||||||
@@ -154,7 +154,7 @@ environment.
|
|||||||
*compiler-gnat*
|
*compiler-gnat*
|
||||||
|
|
||||||
GNAT is the only free (beer and speech) Ada compiler available. There are
|
GNAT is the only free (beer and speech) Ada compiler available. There are
|
||||||
several version available which differentiate in the licence terms used.
|
several versions available which differ in the licence terms used.
|
||||||
|
|
||||||
The GNAT compiler plug-in will perform a compile on pressing <F7> and then
|
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
|
immediately shows the result. You can set the project file to be used by
|
||||||
@@ -163,7 +163,7 @@ setting:
|
|||||||
> call g:gnat.Set_Project_File ('my_project.gpr')
|
> call g:gnat.Set_Project_File ('my_project.gpr')
|
||||||
|
|
||||||
Setting a project file will also create a Vim session (|views-sessions|) so -
|
Setting a project file will also create a Vim session (|views-sessions|) so -
|
||||||
like with the GPS - opened files, window positions etc. will remembered
|
like with the GPS - opened files, window positions etc. will be remembered
|
||||||
separately for all projects.
|
separately for all projects.
|
||||||
|
|
||||||
*gnat_members*
|
*gnat_members*
|
||||||
@@ -171,20 +171,20 @@ GNAT OBJECT ~
|
|||||||
|
|
||||||
*g:gnat.Make()*
|
*g:gnat.Make()*
|
||||||
g:gnat.Make()
|
g:gnat.Make()
|
||||||
Calls|g:gnat.Make_Command|and displays the result inside a
|
Calls |g:gnat.Make_Command| and displays the result inside a
|
||||||
|quickfix| window.
|
|quickfix| window.
|
||||||
|
|
||||||
*g:gnat.Pretty()*
|
*g:gnat.Pretty()*
|
||||||
g:gnat.Pretty()
|
g:gnat.Pretty()
|
||||||
Calls|g:gnat.Pretty_Command|
|
Calls |g:gnat.Pretty_Program|
|
||||||
|
|
||||||
*g:gnat.Find()*
|
*g:gnat.Find()*
|
||||||
g:gnat.Find()
|
g:gnat.Find()
|
||||||
Calls|g:gnat.Find_Command|
|
Calls |g:gnat.Find_Program|
|
||||||
|
|
||||||
*g:gnat.Tags()*
|
*g:gnat.Tags()*
|
||||||
g:gnat.Tags()
|
g:gnat.Tags()
|
||||||
Calls|g:gnat.Tags_Command|
|
Calls |g:gnat.Tags_Command|
|
||||||
|
|
||||||
*g:gnat.Set_Project_File()*
|
*g:gnat.Set_Project_File()*
|
||||||
g:gnat.Set_Project_File([{file}])
|
g:gnat.Set_Project_File([{file}])
|
||||||
@@ -200,19 +200,19 @@ g:gnat.Project_File string
|
|||||||
|
|
||||||
*g:gnat.Make_Command*
|
*g:gnat.Make_Command*
|
||||||
g:gnat.Make_Command string
|
g:gnat.Make_Command string
|
||||||
External command used for|g:gnat.Make()| (|'makeprg'|).
|
External command used for |g:gnat.Make()| (|'makeprg'|).
|
||||||
|
|
||||||
*g:gnat.Pretty_Program*
|
*g:gnat.Pretty_Program*
|
||||||
g:gnat.Pretty_Program string
|
g:gnat.Pretty_Program string
|
||||||
External command used for|g:gnat.Pretty()|
|
External command used for |g:gnat.Pretty()|
|
||||||
|
|
||||||
*g:gnat.Find_Program*
|
*g:gnat.Find_Program*
|
||||||
g:gnat.Find_Program string
|
g:gnat.Find_Program string
|
||||||
External command used for|g:gnat.Find()|
|
External command used for |g:gnat.Find()|
|
||||||
|
|
||||||
*g:gnat.Tags_Command*
|
*g:gnat.Tags_Command*
|
||||||
g:gnat.Tags_Command string
|
g:gnat.Tags_Command string
|
||||||
External command used for|g:gnat.Tags()|
|
External command used for |g:gnat.Tags()|
|
||||||
|
|
||||||
*g:gnat.Error_Format*
|
*g:gnat.Error_Format*
|
||||||
g:gnat.Error_Format string
|
g:gnat.Error_Format string
|
||||||
@@ -228,17 +228,17 @@ and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
|
|||||||
compile the current unit.
|
compile the current unit.
|
||||||
|
|
||||||
The Dec Ada compiler expects the package name and not the file name to be
|
The Dec Ada compiler expects the package name and not the file name to be
|
||||||
passed a parameter. The compiler plug-in supports the usual file name
|
passed as a parameter. The compiler plug-in supports the usual file name
|
||||||
convention to convert the file into a unit name. For separates both '-' and
|
convention to convert the file into a unit name. Both '-' and '__' are allowed
|
||||||
'__' are allowed.
|
as separators.
|
||||||
|
|
||||||
*decada_members*
|
*decada_members*
|
||||||
DEC ADA OBJECT ~
|
DEC ADA OBJECT ~
|
||||||
|
|
||||||
*g:decada.Make()*
|
*g:decada.Make()*
|
||||||
g:decada.Make() function
|
g:decada.Make() function
|
||||||
Calls|g:decada.Make_Command|and displays the result inside a
|
Calls |g:decada.Make_Command| and displays the result inside a
|
||||||
|quickfix| window.
|
|quickfix| window.
|
||||||
|
|
||||||
*g:decada.Unit_Name()*
|
*g:decada.Unit_Name()*
|
||||||
g:decada.Unit_Name() function
|
g:decada.Unit_Name() function
|
||||||
@@ -246,7 +246,7 @@ g:decada.Unit_Name() function
|
|||||||
|
|
||||||
*g:decada.Make_Command*
|
*g:decada.Make_Command*
|
||||||
g:decada.Make_Command string
|
g:decada.Make_Command string
|
||||||
External command used for|g:decadat.Make()| (|'makeprg'|).
|
External command used for |g:decada.Make()| (|'makeprg'|).
|
||||||
|
|
||||||
*g:decada.Error_Format*
|
*g:decada.Error_Format*
|
||||||
g:decada.Error_Format| string
|
g:decada.Error_Format| string
|
||||||
@@ -262,7 +262,7 @@ g:decada.Error_Format| string
|
|||||||
|
|
||||||
*g:ada_standard_types*
|
*g:ada_standard_types*
|
||||||
g:ada_standard_types bool (true when exists)
|
g:ada_standard_types bool (true when exists)
|
||||||
Highlight types in package Standard (e.g., "Float")
|
Highlight types in package Standard (e.g., "Float").
|
||||||
|
|
||||||
*g:ada_space_errors*
|
*g:ada_space_errors*
|
||||||
*g:ada_no_trail_space_error*
|
*g:ada_no_trail_space_error*
|
||||||
@@ -279,13 +279,13 @@ g:ada_space_errors bool (true when exists)
|
|||||||
|
|
||||||
*g:ada_line_errors*
|
*g:ada_line_errors*
|
||||||
g:ada_line_errors bool (true when exists)
|
g:ada_line_errors bool (true when exists)
|
||||||
Highlight lines which are to long. Note: This highlighting
|
Highlight lines which are too long. Note: This highlighting
|
||||||
option is quite CPU intensive.
|
option is quite CPU intensive.
|
||||||
|
|
||||||
*g:ada_rainbow_color*
|
*g:ada_rainbow_color*
|
||||||
g:ada_rainbow_color bool (true when exists)
|
g:ada_rainbow_color bool (true when exists)
|
||||||
Use rainbow colours for '(' and ')'. You need the
|
Use rainbow colours for '(' and ')'. You need the
|
||||||
rainbow_parenthesis for this to work
|
rainbow_parenthesis for this to work.
|
||||||
|
|
||||||
*g:ada_folding*
|
*g:ada_folding*
|
||||||
g:ada_folding set ('sigpft')
|
g:ada_folding set ('sigpft')
|
||||||
@@ -313,7 +313,7 @@ g:ada_folding set ('sigpft')
|
|||||||
|
|
||||||
*g:ada_abbrev*
|
*g:ada_abbrev*
|
||||||
g:ada_abbrev bool (true when exists)
|
g:ada_abbrev bool (true when exists)
|
||||||
Add some abbreviations. This feature more or less superseded
|
Add some abbreviations. This feature is more or less superseded
|
||||||
by the various completion methods.
|
by the various completion methods.
|
||||||
|
|
||||||
*g:ada_withuse_ordinary*
|
*g:ada_withuse_ordinary*
|
||||||
@@ -359,23 +359,23 @@ g:ada_with_gnat_project_files bool (true when exists)
|
|||||||
|
|
||||||
*g:ada_default_compiler*
|
*g:ada_default_compiler*
|
||||||
g:ada_default_compiler string
|
g:ada_default_compiler string
|
||||||
set default compiler. Currently supported is 'gnat' and
|
set default compiler. Currently supported are 'gnat' and
|
||||||
'decada'.
|
'decada'.
|
||||||
|
|
||||||
An "exists" type is a boolean is considered true when the variable is defined
|
An "exists" type is a boolean considered true when the variable is defined and
|
||||||
and false when the variable is undefined. The value which the variable is
|
false when the variable is undefined. The value to which the variable is set
|
||||||
set makes no difference.
|
makes no difference.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
5.3 Commands ~
|
5.2 Commands ~
|
||||||
*ft-ada-commands*
|
*ft-ada-commands*
|
||||||
|
|
||||||
:AdaRainbow *:AdaRainbow*
|
:AdaRainbow *:AdaRainbow*
|
||||||
Toggles rainbow colour (|g:ada_rainbow_color|) mode for
|
Toggles rainbow colour (|g:ada_rainbow_color|) mode for
|
||||||
'(' and ')'
|
'(' and ')'.
|
||||||
|
|
||||||
:AdaLines *:AdaLines*
|
:AdaLines *:AdaLines*
|
||||||
Toggles line error (|g:ada_line_errors|) display
|
Toggles line error (|g:ada_line_errors|) display.
|
||||||
|
|
||||||
:AdaSpaces *:AdaSpaces*
|
:AdaSpaces *:AdaSpaces*
|
||||||
Toggles space error (|g:ada_space_errors|) display.
|
Toggles space error (|g:ada_space_errors|) display.
|
||||||
@@ -406,15 +406,15 @@ set makes no difference.
|
|||||||
g:gnat object
|
g:gnat object
|
||||||
Control object which manages GNAT compiles. The object
|
Control object which manages GNAT compiles. The object
|
||||||
is created when the first Ada source code is loaded provided
|
is created when the first Ada source code is loaded provided
|
||||||
that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
|
that |g:ada_default_compiler| is set to 'gnat'. See
|
||||||
for details.
|
|gnat_members| for details.
|
||||||
|
|
||||||
*g:decada*
|
*g:decada*
|
||||||
g:decada object
|
g:decada object
|
||||||
Control object which manages Dec Ada compiles. The object
|
Control object which manages Dec Ada compiles. The object
|
||||||
is created when the first Ada source code is loaded provided
|
is created when the first Ada source code is loaded provided
|
||||||
that |g:ada_default_compiler|is set to 'decada'. See
|
that |g:ada_default_compiler| is set to 'decada'. See
|
||||||
|decada_members|for details.
|
|decada_members| for details.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
5.4 Constants ~
|
5.4 Constants ~
|
||||||
@@ -424,7 +424,7 @@ All constants are locked. See |:lockvar| for details.
|
|||||||
|
|
||||||
*g:ada#WordRegex*
|
*g:ada#WordRegex*
|
||||||
g:ada#WordRegex string
|
g:ada#WordRegex string
|
||||||
Regular expression to search for Ada words
|
Regular expression to search for Ada words.
|
||||||
|
|
||||||
*g:ada#DotWordRegex*
|
*g:ada#DotWordRegex*
|
||||||
g:ada#DotWordRegex string
|
g:ada#DotWordRegex string
|
||||||
@@ -432,7 +432,7 @@ g:ada#DotWordRegex string
|
|||||||
|
|
||||||
*g:ada#Comment*
|
*g:ada#Comment*
|
||||||
g:ada#Comment string
|
g:ada#Comment string
|
||||||
Regular expression to search for Ada comments
|
Regular expression to search for Ada comments.
|
||||||
|
|
||||||
*g:ada#Keywords*
|
*g:ada#Keywords*
|
||||||
g:ada#Keywords list of dictionaries
|
g:ada#Keywords list of dictionaries
|
||||||
@@ -445,7 +445,7 @@ g:ada#Ctags_Kinds dictionary of lists
|
|||||||
for Ctags generates.
|
for Ctags generates.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
5.2 Functions ~
|
5.5 Functions ~
|
||||||
*ft-ada-functions*
|
*ft-ada-functions*
|
||||||
|
|
||||||
ada#Word([{line}, {col}]) *ada#Word()*
|
ada#Word([{line}, {col}]) *ada#Word()*
|
||||||
@@ -454,7 +454,7 @@ ada#Word([{line}, {col}]) *ada#Word()*
|
|||||||
|
|
||||||
ada#List_Tag([{line}, {col}]) *ada#Listtags()*
|
ada#List_Tag([{line}, {col}]) *ada#Listtags()*
|
||||||
List all occurrences of the Ada entity under the cursor (or at
|
List all occurrences of the Ada entity under the cursor (or at
|
||||||
given line/column) inside the quick-fix window
|
given line/column) inside the quick-fix window.
|
||||||
|
|
||||||
ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
|
ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
|
||||||
List all occurrences of the Ada entity under the cursor (or at
|
List all occurrences of the Ada entity under the cursor (or at
|
||||||
@@ -467,7 +467,7 @@ ada#Create_Tags ({option}) *ada#Create_Tags()*
|
|||||||
file or a file name.
|
file or a file name.
|
||||||
|
|
||||||
gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
|
gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
|
||||||
Adds the tag file header (!_TAG_) informations to the current
|
Adds the tag file header (!_TAG_) information to the current
|
||||||
file which are missing from the GNAT XREF output.
|
file which are missing from the GNAT XREF output.
|
||||||
|
|
||||||
ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
|
ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
|
||||||
@@ -479,11 +479,11 @@ gnat#New ()
|
|||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
8. Extra Plugins ~
|
6. Extra Plugins ~
|
||||||
*ada-extra-plugins*
|
*ada-extra-plugins*
|
||||||
|
|
||||||
You can optionally install the following extra plug-in. They work well with Ada
|
You can optionally install the following extra plug-ins. They work well with
|
||||||
and enhance the ability of the Ada mode.:
|
Ada and enhance the ability of the Ada mode:
|
||||||
|
|
||||||
backup.vim
|
backup.vim
|
||||||
http://www.vim.org/scripts/script.php?script_id=1537
|
http://www.vim.org/scripts/script.php?script_id=1537
|
||||||
@@ -501,7 +501,7 @@ nerd_comments.vim
|
|||||||
matchit.vim
|
matchit.vim
|
||||||
http://www.vim.org/scripts/script.php?script_id=39
|
http://www.vim.org/scripts/script.php?script_id=39
|
||||||
'%' jumping for any language. The normal '%' jump only works for '{}'
|
'%' jumping for any language. The normal '%' jump only works for '{}'
|
||||||
style languages. The Ada mode will set the needed search patters.
|
style languages. The Ada mode will set the needed search patterns.
|
||||||
|
|
||||||
taglist.vim
|
taglist.vim
|
||||||
http://www.vim.org/scripts/script.php?script_id=273
|
http://www.vim.org/scripts/script.php?script_id=273
|
||||||
@@ -512,4 +512,4 @@ contains all of the above.
|
|||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
|
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
|
||||||
vim: filetype=help encoding=latin1
|
vim: filetype=help
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
*sql.txt* For Vim version 7.1. Last change: Wed Apr 26 2006 3:05:33 PM
|
*ft_sql.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||||
|
|
||||||
by David Fishburn
|
by David Fishburn
|
||||||
|
|
||||||
@@ -15,7 +15,8 @@ features for navigation, indentation and syntax highlighting.
|
|||||||
1.4 Macros |sql-macros|
|
1.4 Macros |sql-macros|
|
||||||
2. SQL Dialects |sql-dialects|
|
2. SQL Dialects |sql-dialects|
|
||||||
2.1 SQLSetType |SQLSetType|
|
2.1 SQLSetType |SQLSetType|
|
||||||
2.2 SQL Dialect Default |sql-type-default|
|
2.2 SQLGetType |SQLGetType|
|
||||||
|
2.3 SQL Dialect Default |sql-type-default|
|
||||||
3. Adding new SQL Dialects |sql-adding-dialects|
|
3. Adding new SQL Dialects |sql-adding-dialects|
|
||||||
4. OMNI SQL Completion |sql-completion|
|
4. OMNI SQL Completion |sql-completion|
|
||||||
4.1 Static mode |sql-completion-static|
|
4.1 Static mode |sql-completion-static|
|
||||||
@@ -204,7 +205,7 @@ Press any of the following keys: >
|
|||||||
*sqlanywhere*
|
*sqlanywhere*
|
||||||
*oracle* *plsql* *sqlj*
|
*oracle* *plsql* *sqlj*
|
||||||
*sqlserver*
|
*sqlserver*
|
||||||
*mysql* *postgres* *psql*
|
*mysql* *postgresql* *psql*
|
||||||
*informix*
|
*informix*
|
||||||
|
|
||||||
All relational databases support SQL. There is a portion of SQL that is
|
All relational databases support SQL. There is a portion of SQL that is
|
||||||
@@ -231,7 +232,7 @@ be nice to specify a default in your |vimrc|.
|
|||||||
|
|
||||||
2.1 SQLSetType *sqlsettype* *SQLSetType*
|
2.1 SQLSetType *sqlsettype* *SQLSetType*
|
||||||
--------------
|
--------------
|
||||||
For the people that work with many different databases, it would be nice to be
|
For the people that work with many different databases, it is nice to be
|
||||||
able to flip between the various vendors rules (indent, syntax) on a per
|
able to flip between the various vendors rules (indent, syntax) on a per
|
||||||
buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
|
buffer basis, at any time. The ftplugin/sql.vim file defines this function: >
|
||||||
SQLSetType
|
SQLSetType
|
||||||
@@ -259,7 +260,17 @@ of available Vim script names: >
|
|||||||
:SQL<Tab><space><Tab>
|
:SQL<Tab><space><Tab>
|
||||||
|
|
||||||
|
|
||||||
2.2 SQL Dialect Default *sql-type-default*
|
2.2 SQLGetType *sqlgettype* *SQLGetType*
|
||||||
|
--------------
|
||||||
|
At anytime you can determine which SQL dialect you are using by calling the
|
||||||
|
SQLGetType command. The ftplugin/sql.vim file defines this function: >
|
||||||
|
SQLGetType
|
||||||
|
|
||||||
|
This will echo: >
|
||||||
|
Current SQL dialect in use:sqlanywhere
|
||||||
|
|
||||||
|
|
||||||
|
2.3 SQL Dialect Default *sql-type-default*
|
||||||
-----------------------
|
-----------------------
|
||||||
As mentioned earlier, the default syntax rules for Vim is based on Oracle
|
As mentioned earlier, the default syntax rules for Vim is based on Oracle
|
||||||
(PL/SQL). You can override this default by placing one of the following in
|
(PL/SQL). You can override this default by placing one of the following in
|
||||||
@@ -331,6 +342,10 @@ The defaults static maps are: >
|
|||||||
imap <buffer> <C-C>T <C-\><C-O>:call sqlcomplete#Map('sqlType')<CR><C-X><C-O>
|
imap <buffer> <C-C>T <C-\><C-O>:call sqlcomplete#Map('sqlType')<CR><C-X><C-O>
|
||||||
imap <buffer> <C-C>s <C-\><C-O>:call sqlcomplete#Map('sqlStatement')<CR><C-X><C-O>
|
imap <buffer> <C-C>s <C-\><C-O>:call sqlcomplete#Map('sqlStatement')<CR><C-X><C-O>
|
||||||
|
|
||||||
|
The use of "<C-C>" can be user chosen by using the following in your |.vimrc| as it
|
||||||
|
may not work properly on all platforms: >
|
||||||
|
let g:ftplugin_sql_omni_key = '<C-C>'
|
||||||
|
>
|
||||||
The static maps (which are based on the syntax highlight groups) follow this
|
The static maps (which are based on the syntax highlight groups) follow this
|
||||||
format: >
|
format: >
|
||||||
imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
|
imap <buffer> <C-C>k <C-\><C-O>:call sqlcomplete#Map('sqlKeyword')<CR><C-X><C-O>
|
||||||
@@ -406,21 +421,25 @@ to display a list of tables, procedures, views and columns. >
|
|||||||
To enable the popup, while in INSERT mode, use the following key combinations
|
To enable the popup, while in INSERT mode, use the following key combinations
|
||||||
for each group (where <C-C> means hold the CTRL key down while pressing
|
for each group (where <C-C> means hold the CTRL key down while pressing
|
||||||
the space bar):
|
the space bar):
|
||||||
Table List - <C-C>t
|
Table List - <C-C>t
|
||||||
- <C-X><C-O> (the default map assumes tables)
|
- <C-X><C-O> (the default map assumes tables)
|
||||||
Stored Procedure List - <C-C>p
|
Stored Procedure List - <C-C>p
|
||||||
View List - <C-C>v
|
View List - <C-C>v
|
||||||
Column List - <C-C>c
|
Column List - <C-C>c
|
||||||
|
|
||||||
Windows platform only - When viewing a popup window displaying the list
|
Drilling In / Out - When viewing a popup window displaying the list
|
||||||
of tables, you can press <C-Right>, this will
|
of tables, you can press <Right>, this will
|
||||||
replace the table currently highlighted with
|
replace the table currently highlighted with
|
||||||
the column list for that table.
|
the column list for that table.
|
||||||
- When viewing a popup window displaying the list
|
- When viewing a popup window displaying the list
|
||||||
of columns, you can press <C-Left>, this will
|
of columns, you can press <Left>, this will
|
||||||
replace the column list with the list of tables.
|
replace the column list with the list of tables.
|
||||||
- This allows you to quickly drill down into a
|
- This allows you to quickly drill down into a
|
||||||
table to view it's columns and back again.
|
table to view it's columns and back again.
|
||||||
|
- <Right> and <Left> can be also be chosen via
|
||||||
|
your |.vimrc| >
|
||||||
|
let g:ftplugin_sql_omni_key_right = '<Right>'
|
||||||
|
let g:ftplugin_sql_omni_key_left = '<Left>'
|
||||||
|
|
||||||
The SQL completion plugin caches various lists that are displayed in
|
The SQL completion plugin caches various lists that are displayed in
|
||||||
the popup window. This makes the re-displaying of these lists very
|
the popup window. This makes the re-displaying of these lists very
|
||||||
@@ -498,38 +517,32 @@ beginning with those characters. >
|
|||||||
The SQL completion plugin can also display a list of columns for particular
|
The SQL completion plugin can also display a list of columns for particular
|
||||||
tables. The column completion is trigger via <C-C>c.
|
tables. The column completion is trigger via <C-C>c.
|
||||||
|
|
||||||
NOTE: The following example uses <C-Right> to trigger a column list while
|
NOTE: The following example uses <Right> to trigger a column list while
|
||||||
the popup window is active. This map is only available on the Windows
|
the popup window is active.
|
||||||
platforms since *nix does not recognize CTRL and the right arrow held down
|
|
||||||
together. If you wish to enable this functionality on a *nix platform choose
|
|
||||||
a key and create one of these mappings (see |sql-completion-maps| for further
|
|
||||||
details on where to create this imap): >
|
|
||||||
imap <buffer> <your_keystroke> <C-R>=sqlcomplete#DrillIntoTable()<CR>
|
|
||||||
imap <buffer> <your_keystroke> <C-Y><C-\><C-O>:call sqlcomplete#Map('column')<CR><C-X><C-O>
|
|
||||||
|
|
||||||
Example of using column completion:
|
Example of using column completion:
|
||||||
- Press <C-C>t again to display the list of tables.
|
- Press <C-C>t again to display the list of tables.
|
||||||
- When the list is displayed in the completion window, press <C-Right>,
|
- When the list is displayed in the completion window, press <Right>,
|
||||||
this will replace the list of tables, with a list of columns for the
|
this will replace the list of tables, with a list of columns for the
|
||||||
table highlighted (after the same short delay).
|
table highlighted (after the same short delay).
|
||||||
- If you press <C-Left>, this will again replace the column list with the
|
- If you press <Left>, this will again replace the column list with the
|
||||||
list of tables. This allows you to drill into tables and column lists
|
list of tables. This allows you to drill into tables and column lists
|
||||||
very quickly.
|
very quickly.
|
||||||
- Press <C-Right> again while the same table is highlighted. You will
|
- Press <Right> again while the same table is highlighted. You will
|
||||||
notice there is no delay since the column list has been cached. If you
|
notice there is no delay since the column list has been cached. If you
|
||||||
change the schema of a cached table you can press <C-C>R, which
|
change the schema of a cached table you can press <C-C>R, which
|
||||||
clears the SQL completion cache.
|
clears the SQL completion cache.
|
||||||
- NOTE: <C-Right> and <C-Left> have been designed to work while the
|
- NOTE: <Right> and <Left> have been designed to work while the
|
||||||
completion window is active. If the completion popup window is
|
completion window is active. If the completion popup window is
|
||||||
not active, a normal <C-Right> or <C-Left> will be executed.
|
not active, a normal <Right> or <Left> will be executed.
|
||||||
|
|
||||||
Lets look how we can build a SQL statement dynamically. A select statement
|
Let's look at how we can build a SQL statement dynamically. A select statement
|
||||||
requires a list of columns. There are two ways to build a column list using
|
requires a list of columns. There are two ways to build a column list using
|
||||||
the SQL completion plugin. >
|
the SQL completion plugin. >
|
||||||
One column at a time:
|
One column at a time:
|
||||||
< 1. After typing SELECT press <C-C>t to display a list of tables.
|
< 1. After typing SELECT press <C-C>t to display a list of tables.
|
||||||
2. Choose a table from the list.
|
2. Choose a table from the list.
|
||||||
3. Press <C-Right> to display a list of columns.
|
3. Press <Right> to display a list of columns.
|
||||||
4. Choose the column from the list and press enter.
|
4. Choose the column from the list and press enter.
|
||||||
5. Enter a "," and press <C-C>c. Generating a column list
|
5. Enter a "," and press <C-C>c. Generating a column list
|
||||||
generally requires having the cursor on a table name. The plugin
|
generally requires having the cursor on a table name. The plugin
|
||||||
@@ -619,7 +632,7 @@ your |vimrc|: >
|
|||||||
MYTABLENAME --> M
|
MYTABLENAME --> M
|
||||||
|
|
||||||
omni_sql_ignorecase
|
omni_sql_ignorecase
|
||||||
< - Default: Current setting for|ignorecase|
|
< - Default: Current setting for 'ignorecase'
|
||||||
- Valid settings are 0 or 1.
|
- Valid settings are 0 or 1.
|
||||||
- When entering a few letters before initiating completion, the list
|
- When entering a few letters before initiating completion, the list
|
||||||
will be filtered to display only the entries which begin with the
|
will be filtered to display only the entries which begin with the
|
||||||
@@ -632,7 +645,7 @@ your |vimrc|: >
|
|||||||
- When completing tables, procedure or views and using dbext.vim 3.00
|
- When completing tables, procedure or views and using dbext.vim 3.00
|
||||||
or higher the list of objects will also include the owner name.
|
or higher the list of objects will also include the owner name.
|
||||||
When completing these objects and omni_sql_include_owner is enabled
|
When completing these objects and omni_sql_include_owner is enabled
|
||||||
the owner name will be replaced. >
|
the owner name will be be replaced. >
|
||||||
|
|
||||||
omni_sql_precache_syntax_groups
|
omni_sql_precache_syntax_groups
|
||||||
< - Default:
|
< - Default:
|
||||||
@@ -684,15 +697,15 @@ plugin. >
|
|||||||
<C-C>L
|
<C-C>L
|
||||||
< - Displays a comma separated list of columns for a specific table.
|
< - Displays a comma separated list of columns for a specific table.
|
||||||
This should only be used when the completion window is active. >
|
This should only be used when the completion window is active. >
|
||||||
<C-Right>
|
<Right>
|
||||||
< - Displays a list of columns for the table currently highlighted in
|
< - Displays a list of columns for the table currently highlighted in
|
||||||
the completion window. <C-Right> is not recognized on most Unix
|
the completion window. <Right> is not recognized on most Unix
|
||||||
systems, so this maps is only created on the Windows platform.
|
systems, so this maps is only created on the Windows platform.
|
||||||
If you would like the same feature on Unix, choose a different key
|
If you would like the same feature on Unix, choose a different key
|
||||||
and make the same map in your vimrc. >
|
and make the same map in your vimrc. >
|
||||||
<C-Left>
|
<Left>
|
||||||
< - Displays the list of tables.
|
< - Displays the list of tables.
|
||||||
<C-Left> is not recognized on most Unix systems, so this maps is
|
<Left> is not recognized on most Unix systems, so this maps is
|
||||||
only created on the Windows platform. If you would like the same
|
only created on the Windows platform. If you would like the same
|
||||||
feature on Unix, choose a different key and make the same map in
|
feature on Unix, choose a different key and make the same map in
|
||||||
your vimrc. >
|
your vimrc. >
|
||||||
@@ -725,8 +738,8 @@ platform you can also use <C-Space> or ALT keys.
|
|||||||
|
|
||||||
Many times SQL can be used with different filetypes. For example Perl, Java,
|
Many times SQL can be used with different filetypes. For example Perl, Java,
|
||||||
PHP, Javascript can all interact with a database. Often you need both the SQL
|
PHP, Javascript can all interact with a database. Often you need both the SQL
|
||||||
completion as well as the completion capabilities for the current language you
|
completion and the completion capabilities for the current language you are
|
||||||
are editing.
|
editing.
|
||||||
|
|
||||||
This can be enabled easily with the following steps (assuming a Perl file): >
|
This can be enabled easily with the following steps (assuming a Perl file): >
|
||||||
1. :e test.pl
|
1. :e test.pl
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
*gui.txt* For Vim version 7.1. Last change: 2007 May 11
|
*gui.txt* For Vim version 7.3. Last change: 2010 Nov 03
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -35,13 +35,13 @@ GUI version of Vim with:
|
|||||||
The X11 version of Vim can run both in GUI and in non-GUI mode. See
|
The X11 version of Vim can run both in GUI and in non-GUI mode. See
|
||||||
|gui-x11-start|.
|
|gui-x11-start|.
|
||||||
|
|
||||||
*gui-init* *gvimrc* *.gvimrc* *_gvimrc*
|
*gui-init* *gvimrc* *.gvimrc* *_gvimrc* *$MYGVIMRC*
|
||||||
The gvimrc file is where GUI-specific startup commands should be placed. It
|
The gvimrc file is where GUI-specific startup commands should be placed. It
|
||||||
is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
|
is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
|
||||||
environment variable has its name.
|
environment variable has its name.
|
||||||
|
|
||||||
When the GUI starts up initializations are carried out, in this order:
|
When the GUI starts up initializations are carried out, in this order:
|
||||||
- The 'term' option is set to "builgin_gui" and terminal options are reset to
|
- The 'term' option is set to "builtin_gui" and terminal options are reset to
|
||||||
their default value for the GUI |terminal-options|.
|
their default value for the GUI |terminal-options|.
|
||||||
- If the system menu file exists, it is sourced. The name of this file is
|
- If the system menu file exists, it is sourced. The name of this file is
|
||||||
normally "$VIMRUNTIME/menu.vim". You can check this with ":version". Also
|
normally "$VIMRUNTIME/menu.vim". You can check this with ":version". Also
|
||||||
@@ -156,26 +156,26 @@ configure which ones appear with the 'guioptions' option.
|
|||||||
|
|
||||||
The interface looks like this (with ":set guioptions=mlrb"):
|
The interface looks like this (with ":set guioptions=mlrb"):
|
||||||
|
|
||||||
+------------------------------+
|
+------------------------------+ `
|
||||||
| File Edit Help | <- Menu bar (m)
|
| File Edit Help | <- Menu bar (m) `
|
||||||
+-+--------------------------+-+
|
+-+--------------------------+-+ `
|
||||||
|^| |^|
|
|^| |^| `
|
||||||
|#| Text area. |#|
|
|#| Text area. |#| `
|
||||||
| | | |
|
| | | | `
|
||||||
|v|__________________________|v|
|
|v|__________________________|v| `
|
||||||
Normal status line -> |-+ File.c 5,2 +-|
|
Normal status line -> |-+ File.c 5,2 +-| `
|
||||||
between Vim windows |^|""""""""""""""""""""""""""|^|
|
between Vim windows |^|""""""""""""""""""""""""""|^| `
|
||||||
| | | |
|
| | | | `
|
||||||
| | Another file buffer. | |
|
| | Another file buffer. | | `
|
||||||
| | | |
|
| | | | `
|
||||||
|#| |#|
|
|#| |#| `
|
||||||
Left scrollbar (l) -> |#| |#| <- Right
|
Left scrollbar (l) -> |#| |#| <- Right `
|
||||||
|#| |#| scrollbar (r)
|
|#| |#| scrollbar (r) `
|
||||||
| | | |
|
| | | | `
|
||||||
|v| |v|
|
|v| |v| `
|
||||||
+-+--------------------------+-+
|
+-+--------------------------+-+ `
|
||||||
| |< #### >| | <- Bottom
|
| |< #### >| | <- Bottom `
|
||||||
+-+--------------------------+-+ scrollbar (b)
|
+-+--------------------------+-+ scrollbar (b) `
|
||||||
|
|
||||||
Any of the scrollbar or menu components may be turned off by not putting the
|
Any of the scrollbar or menu components may be turned off by not putting the
|
||||||
appropriate letter in the 'guioptions' string. The bottom scrollbar is
|
appropriate letter in the 'guioptions' string. The bottom scrollbar is
|
||||||
@@ -325,16 +325,22 @@ A different kind of selection is used when:
|
|||||||
- at the |hit-enter| prompt
|
- at the |hit-enter| prompt
|
||||||
- whenever the current mode is not in the 'mouse' option
|
- whenever the current mode is not in the 'mouse' option
|
||||||
- when holding the CTRL and SHIFT keys in the GUI
|
- when holding the CTRL and SHIFT keys in the GUI
|
||||||
|
|
||||||
Since Vim continues like the selection isn't there, and there is no mode
|
Since Vim continues like the selection isn't there, and there is no mode
|
||||||
associated with the selection, this is called modeless selection. Any text in
|
associated with the selection, this is called modeless selection. Any text in
|
||||||
the Vim window can be selected. Select the text by pressing the left mouse
|
the Vim window can be selected. Select the text by pressing the left mouse
|
||||||
button at the start, drag to the end and release. To extend the selection,
|
button at the start, drag to the end and release. To extend the selection,
|
||||||
use the right mouse button when 'mousemodel' is "extend", or the left mouse
|
use the right mouse button when 'mousemodel' is "extend", or the left mouse
|
||||||
button with the shift key pressed when 'mousemodel' is "popup".
|
button with the shift key pressed when 'mousemodel' is "popup".
|
||||||
The middle mouse button pastes the text.
|
|
||||||
The selection is removed when the selected text is scrolled or changed.
|
The selection is removed when the selected text is scrolled or changed.
|
||||||
|
|
||||||
On the command line CTRL-Y can be used to copy the selection into the
|
On the command line CTRL-Y can be used to copy the selection into the
|
||||||
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>.
|
clipboard. To do this from Insert mode, use CTRL-O : CTRL-Y <CR>. When
|
||||||
|
'guioptions' contains a or A (default on X11), the selection is automatically
|
||||||
|
copied to the "* register.
|
||||||
|
|
||||||
|
The middle mouse button can then paste the text. On non-X11 systems, you can
|
||||||
|
use CTRL-R +.
|
||||||
|
|
||||||
|
|
||||||
3.4 Using Mouse on Status Lines *gui-mouse-status*
|
3.4 Using Mouse on Status Lines *gui-mouse-status*
|
||||||
@@ -467,9 +473,11 @@ this line to your .vimrc file (NOT your .gvimrc file!): >
|
|||||||
:let did_install_default_menus = 1
|
:let did_install_default_menus = 1
|
||||||
If you also want to avoid the Syntax menu: >
|
If you also want to avoid the Syntax menu: >
|
||||||
:let did_install_syntax_menu = 1
|
:let did_install_syntax_menu = 1
|
||||||
If you do want the Syntax menu but not all the entries for each available
|
The first item in the Syntax menu can be used to show all available filetypes
|
||||||
syntax file (which take quite a bit of time to load): >
|
in the menu (which can take a bit of time to load). If you want to have all
|
||||||
:let skip_syntax_sel_menu = 1
|
filetypes already present at startup, add: >
|
||||||
|
:let do_syntax_sel_menu = 1
|
||||||
|
|
||||||
<
|
<
|
||||||
*console-menus*
|
*console-menus*
|
||||||
Although this documentation is in the GUI section, you can actually use menus
|
Although this documentation is in the GUI section, you can actually use menus
|
||||||
@@ -548,7 +556,7 @@ some modes:
|
|||||||
mode inserted appended ~
|
mode inserted appended ~
|
||||||
Normal nothing nothing
|
Normal nothing nothing
|
||||||
Visual <C-C> <C-\><C-G>
|
Visual <C-C> <C-\><C-G>
|
||||||
Insert <C-O>
|
Insert <C-\><C-O>
|
||||||
Cmdline <C-C> <C-\><C-G>
|
Cmdline <C-C> <C-\><C-G>
|
||||||
Op-pending <C-C> <C-\><C-G>
|
Op-pending <C-C> <C-\><C-G>
|
||||||
|
|
||||||
@@ -563,7 +571,7 @@ is equal to: >
|
|||||||
|
|
||||||
:nmenu File.Next :next^M
|
:nmenu File.Next :next^M
|
||||||
:vmenu File.Next ^C:next^M^\^G
|
:vmenu File.Next ^C:next^M^\^G
|
||||||
:imenu File.Next ^O:next^M
|
:imenu File.Next ^\^O:next^M
|
||||||
:cmenu File.Next ^C:next^M^\^G
|
:cmenu File.Next ^C:next^M^\^G
|
||||||
:omenu File.Next ^C:next^M^\^G
|
:omenu File.Next ^C:next^M^\^G
|
||||||
|
|
||||||
@@ -670,7 +678,7 @@ and Photon GUI. It should turn up in other GUIs in due course. The
|
|||||||
default toolbar is setup in menu.vim.
|
default toolbar is setup in menu.vim.
|
||||||
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
|
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
|
||||||
can thus have menu & toolbar together, or either on its own, or neither.
|
can thus have menu & toolbar together, or either on its own, or neither.
|
||||||
The appearance is controlled by the 'toolbar' option. You can chose between
|
The appearance is controlled by the 'toolbar' option. You can choose between
|
||||||
an image, text or both.
|
an image, text or both.
|
||||||
|
|
||||||
*toolbar-icon*
|
*toolbar-icon*
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*gui_w16.txt* For Vim version 7.1. Last change: 2005 Mar 29
|
*gui_w16.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
|
*gui_w32.txt* For Vim version 7.3. Last change: 2010 Dec 19
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -129,7 +129,7 @@ the makefile by double clicking it and use the "Edit with Vim" entry to edit
|
|||||||
the makefile.
|
the makefile.
|
||||||
|
|
||||||
You can select any files and right-click to see a menu option called "Edit
|
You can select any files and right-click to see a menu option called "Edit
|
||||||
with gvim". Chosing this menu option will invoke gvim with the file you have
|
with gvim". Choosing this menu option will invoke gvim with the file you have
|
||||||
selected. If you select multiple files, you will find two gvim-related menu
|
selected. If you select multiple files, you will find two gvim-related menu
|
||||||
options:
|
options:
|
||||||
"Edit with multiple gvims" -- one gvim for each file in the selection
|
"Edit with multiple gvims" -- one gvim for each file in the selection
|
||||||
@@ -293,7 +293,9 @@ Normally, Vim waits for a command to complete before continuing (this makes
|
|||||||
sense for most shell commands which produce output for Vim to use). If you
|
sense for most shell commands which produce output for Vim to use). If you
|
||||||
want Vim to start a program and return immediately, you can use the following
|
want Vim to start a program and return immediately, you can use the following
|
||||||
syntax on W95 & NT: >
|
syntax on W95 & NT: >
|
||||||
:!start {command}
|
:!start [/min] {command}
|
||||||
|
The optional "/min" causes the window to be minimized.
|
||||||
|
|
||||||
On Win32s, you will have to go to another window instead. Don't forget that
|
On Win32s, you will have to go to another window instead. Don't forget that
|
||||||
you must tell Windows 3.1x to keep executing a DOS command in the background
|
you must tell Windows 3.1x to keep executing a DOS command in the background
|
||||||
while you switch back to Vim.
|
while you switch back to Vim.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*gui_x11.txt* For Vim version 7.1. Last change: 2006 Jul 12
|
*gui_x11.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -426,7 +426,7 @@ means in detail:
|
|||||||
- The session file is stored to a separate directory (usually $HOME/.gnome2).
|
- The session file is stored to a separate directory (usually $HOME/.gnome2).
|
||||||
- 'sessionoptions' is ignored, and a hardcoded set of appropriate flags is
|
- 'sessionoptions' is ignored, and a hardcoded set of appropriate flags is
|
||||||
used instead: >
|
used instead: >
|
||||||
blank,curdir,folds,globals,help,options,winsize
|
blank,curdir,folds,globals,help,options,tabpages,winsize
|
||||||
- The internal variable |v:this_session| is not changed when storing the
|
- The internal variable |v:this_session| is not changed when storing the
|
||||||
session. Also, it is restored to its old value when logging in again.
|
session. Also, it is restored to its old value when logging in again.
|
||||||
|
|
||||||
@@ -453,14 +453,12 @@ searched for. If all three fail, the GUI will be disabled.
|
|||||||
For GTK+, Vim's configuration process requires that GTK+ be properly
|
For GTK+, Vim's configuration process requires that GTK+ be properly
|
||||||
installed. That is, the shell script 'gtk-config' must be in your PATH, and
|
installed. That is, the shell script 'gtk-config' must be in your PATH, and
|
||||||
you can already successful compile, build, and execute a GTK+ program. The
|
you can already successful compile, build, and execute a GTK+ program. The
|
||||||
reason for this is because the compiler flags (CFLAGS) and link flags
|
reason for this is that the compiler flags (CFLAGS) and link flags (LDFLAGS)
|
||||||
(LDFLAGS) are obtained through the 'gtk-config' shell script.
|
are obtained through the 'gtk-config' shell script.
|
||||||
|
|
||||||
If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument
|
If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument
|
||||||
to ./configure. Optionally, support for GNOME 2 will be compiled if the
|
to ./configure. Optionally, support for GNOME 2 will be compiled if the
|
||||||
--enable-gnome-check option is also given. Note that the support for GTK+ 2
|
--enable-gnome-check option is also given.
|
||||||
is still experimental. However, many people have reported that it works just
|
|
||||||
fine for them.
|
|
||||||
|
|
||||||
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
|
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
|
||||||
files in a directory where configure doesn't look, edit the Makefile to enter
|
files in a directory where configure doesn't look, edit the Makefile to enter
|
||||||
@@ -468,15 +466,12 @@ the names of the directories. Search for "GUI_INC_LOC" for an example to set
|
|||||||
the Motif directories, "CONF_OPT_X" for Athena.
|
the Motif directories, "CONF_OPT_X" for Athena.
|
||||||
|
|
||||||
*gui-x11-gtk*
|
*gui-x11-gtk*
|
||||||
At the time of this writing, you may use either GTK+ version 1.0.6 or 1.2. It
|
At the time of this writing, GTK+ version 1.0.6 and 1.2 are outdated. It
|
||||||
is suggested that you use v1.2 since not all of Vim's GUI features are present
|
is suggested that you use GTK 2. The GTK 1 support will most likely be
|
||||||
if using v1.0.6. For instance, there are no tearoff menus present in v1.0.6.
|
dropped soon.
|
||||||
Using a version from GTK+'s CVS tree may or may not work, and is therefore not
|
|
||||||
supported and not recommended.
|
|
||||||
|
|
||||||
For the experimental GTK+ 2 GUI, using the latest release of the GTK+ 2.0 or
|
For the GTK+ 2 GUI, using the latest release of the GTK+ 2.0 or GTK+ 2.2
|
||||||
GTK+ 2.2 series is recommended. CVS HEAD seems to work fine most of time as
|
series is recommended.
|
||||||
well.
|
|
||||||
|
|
||||||
Lastly, although GTK+ has supposedly been ported to the Win32 platform, this
|
Lastly, although GTK+ has supposedly been ported to the Win32 platform, this
|
||||||
has not been tested with Vim and is also unsupported. Also, it's unlikely to
|
has not been tested with Vim and is also unsupported. Also, it's unlikely to
|
||||||
@@ -540,13 +535,16 @@ Of these three, Vim uses PRIMARY when reading and writing the "* register
|
|||||||
register. Vim does not access the SECONDARY selection.
|
register. Vim does not access the SECONDARY selection.
|
||||||
|
|
||||||
Examples: (assuming the default option values)
|
Examples: (assuming the default option values)
|
||||||
- Select an URL in Visual mode in Vim. Go to a text field in Netscape and
|
- Select an URL in Visual mode in Vim. Go to your browser and click the
|
||||||
click the middle mouse button. The selected text will be inserted
|
middle mouse button in the URL text field. The selected text will be
|
||||||
(hopefully!).
|
inserted (hopefully!). Note: in Firefox you can set the
|
||||||
- Select some text in Netscape by dragging with the mouse. Go to Vim and
|
middlemouse.contentLoadURL preference to true in about:config, then the
|
||||||
|
selected URL will be used when pressing middle mouse button in most places
|
||||||
|
in the window.
|
||||||
|
- Select some text in your browser by dragging with the mouse. Go to Vim and
|
||||||
press the middle mouse button: The selected text is inserted.
|
press the middle mouse button: The selected text is inserted.
|
||||||
- Select some text in Vim and do "+y. Go to Netscape, select some text in a
|
- Select some text in Vim and do "+y. Go to your browser, select some text in
|
||||||
textfield by dragging with the mouse. Now use the right mouse button and
|
a textfield by dragging with the mouse. Now use the right mouse button and
|
||||||
select "Paste" from the popup menu. The selected text is overwritten by the
|
select "Paste" from the popup menu. The selected text is overwritten by the
|
||||||
text from Vim.
|
text from Vim.
|
||||||
Note that the text in the "+ register remains available when making a Visual
|
Note that the text in the "+ register remains available when making a Visual
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
*hangulin.txt* For Vim version 7.1. Last change: 2006 Apr 02
|
*hangulin.txt* For Vim version 7.3. Last change: 2009 Jun 24
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
||||||
|
|
||||||
|
NOTE: The |+hangul_input| feature is scheduled to be removed. If you want to
|
||||||
|
keep it, please send a message to the Vim user maillist.
|
||||||
|
|
||||||
|
|
||||||
Introduction *hangul*
|
Introduction *hangul*
|
||||||
------------
|
------------
|
||||||
It is to input hangul, the Korean language, with VIM GUI version.
|
It is to input hangul, the Korean language, with VIM GUI version.
|
||||||
@@ -96,6 +100,6 @@ Bug or Comment
|
|||||||
Send comments, patches and suggestions to:
|
Send comments, patches and suggestions to:
|
||||||
|
|
||||||
Chi-Deok Hwang <hwang@mizi.co.kr>
|
Chi-Deok Hwang <hwang@mizi.co.kr>
|
||||||
Nam SungHyun <namsh@kldp.org>
|
SungHyun Nam <goweol@gmail.com>
|
||||||
|
|
||||||
vim:tw=78:ts=8:ft=help:norl:
|
vim:tw=78:ts=8:ft=help:norl:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*hebrew.txt* For Vim version 7.1. Last change: 2003 May 11
|
*hebrew.txt* For Vim version 7.3. Last change: 2007 Jun 14
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
|
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
|
||||||
@@ -7,11 +7,8 @@
|
|||||||
Hebrew Language support (options & mapping) for Vim *hebrew*
|
Hebrew Language support (options & mapping) for Vim *hebrew*
|
||||||
|
|
||||||
The supporting 'rightleft' functionality was originally created by Avner
|
The supporting 'rightleft' functionality was originally created by Avner
|
||||||
Lottem:
|
Lottem. <alottem at gmail dot com> Ron Aaron <ron at ronware dot org> is
|
||||||
E-mail: alottem@iil.intel.com
|
currently helping support these features.
|
||||||
Phone: +972-4-8307322
|
|
||||||
|
|
||||||
Ron Aaron <ron@ronware.org> is currently helping support these features.
|
|
||||||
|
|
||||||
{Vi does not have any of these commands}
|
{Vi does not have any of these commands}
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user