mirror of
https://github.com/zoriya/vim.git
synced 2025-12-06 07:16:15 +00:00
Compare commits
2154 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0306ac33a5 | ||
|
|
bef4790c23 | ||
|
|
756287da38 | ||
|
|
e25865a7f3 | ||
|
|
95b557b1dc | ||
|
|
5967abb97f | ||
|
|
221d6872c4 | ||
|
|
e721122b79 | ||
|
|
49346f4155 | ||
|
|
cc3e85f169 | ||
|
|
3cd3e7ab17 | ||
|
|
2afa3238a1 | ||
|
|
f27839c1a9 | ||
|
|
11b73d668f | ||
|
|
96b7ca5142 | ||
|
|
89f940fcac | ||
|
|
e79abddb2f | ||
|
|
88b1ba151a | ||
|
|
a53c60d33c | ||
|
|
f6a2b08c54 | ||
|
|
8f5c6f003a | ||
|
|
db91395312 | ||
|
|
a7014df975 | ||
|
|
002850940e | ||
|
|
22189a4bd6 | ||
|
|
3943156034 | ||
|
|
d12f811816 | ||
|
|
50a12b4078 | ||
|
|
38bdbd6c6f | ||
|
|
5e1a0a9a65 | ||
|
|
ed46560bf0 | ||
|
|
9158f9e423 | ||
|
|
dc7e85ee5d | ||
|
|
9e931224db | ||
|
|
36105782d2 | ||
|
|
77c193579b | ||
|
|
795ec43112 | ||
|
|
5641f38d41 | ||
|
|
bfe3bf806a | ||
|
|
a8596c4772 | ||
|
|
e04a48f204 | ||
|
|
48d279215f | ||
|
|
27ba088549 | ||
|
|
802053f14a | ||
|
|
3b393a0b53 | ||
|
|
362ce48048 | ||
|
|
3b53dfb3b0 | ||
|
|
ab984db296 | ||
|
|
08bc274e88 | ||
|
|
8134039744 | ||
|
|
bc256d91ea | ||
|
|
64fdf5ceae | ||
|
|
c873442b15 | ||
|
|
f13de07e49 | ||
|
|
24ee83b0a0 | ||
|
|
88178de99f | ||
|
|
9a920d8c31 | ||
|
|
704984ac87 | ||
|
|
d2aed44c77 | ||
|
|
112f318551 | ||
|
|
ae084bb97c | ||
|
|
6a3c1b44e5 | ||
|
|
6057b9c658 | ||
|
|
bef1c36ab6 | ||
|
|
936347b6bf | ||
|
|
0c50a6ba59 | ||
|
|
17bd9dc2bd | ||
|
|
1763969e5c | ||
|
|
8e52a59376 | ||
|
|
bd1d560895 | ||
|
|
455981e69b | ||
|
|
f9de140e7f | ||
|
|
2969570036 | ||
|
|
8a4c136a90 | ||
|
|
a0149c7401 | ||
|
|
1aeaf8c0e0 | ||
|
|
dbb4a42cdc | ||
|
|
18e00d2c86 | ||
|
|
2fc8802fcc | ||
|
|
8071607aa5 | ||
|
|
2d0b92f8f9 | ||
|
|
5ae636b9bb | ||
|
|
8320da42bc | ||
|
|
b41d9689f1 | ||
|
|
7da9c37a17 | ||
|
|
9a7224b5a0 | ||
|
|
e8938e507e | ||
|
|
ddbb5550b4 | ||
|
|
d38b055ab8 | ||
|
|
7f51a82c1b | ||
|
|
b429cdeb6e | ||
|
|
8218f60b61 | ||
|
|
68fb5dcd13 | ||
|
|
68a33fc704 | ||
|
|
720ce53af0 | ||
|
|
6217cdcec3 | ||
|
|
e436528e04 | ||
|
|
35df7d2d99 | ||
|
|
a6cdc99152 | ||
|
|
6be120e7f5 | ||
|
|
84298db3a4 | ||
|
|
b830f0c7df | ||
|
|
53bfca22f1 | ||
|
|
09210ac93c | ||
|
|
b345d49e06 | ||
|
|
bd2f3c3ec6 | ||
|
|
b0d7a15d3a | ||
|
|
5b435d671e | ||
|
|
3675fa09a7 | ||
|
|
98411e57ab | ||
|
|
1dced5727f | ||
|
|
e0ebfd7507 | ||
|
|
3dbde6226d | ||
|
|
61d35bd020 | ||
|
|
913077c37c | ||
|
|
ca628610c0 | ||
|
|
da5a4970a9 | ||
|
|
f99bc6d002 | ||
|
|
6df5e5ae42 | ||
|
|
524780d69f | ||
|
|
61d281a4c0 | ||
|
|
970a1b82ec | ||
|
|
06ca513e2c | ||
|
|
507cc8acf1 | ||
|
|
12b0290d42 | ||
|
|
5e4b9e9ff8 | ||
|
|
5d3a8038b6 | ||
|
|
dfba6b6449 | ||
|
|
1ea69b7077 | ||
|
|
5ad15df9ce | ||
|
|
1c0b03e857 | ||
|
|
84f7235bdb | ||
|
|
7c578d3c3f | ||
|
|
5fbe699390 | ||
|
|
8ec1f8523b | ||
|
|
917ba89f7f | ||
|
|
9e98edfe8f | ||
|
|
146e9c3886 | ||
|
|
552ac13d55 | ||
|
|
0faaeb826e | ||
|
|
d25ad65a97 | ||
|
|
f5876f147a | ||
|
|
91856270df | ||
|
|
4336cdf318 | ||
|
|
7f29f7a2f4 | ||
|
|
011a34d77d | ||
|
|
52379eadfb | ||
|
|
b549a731fb | ||
|
|
7282bc3e7e | ||
|
|
58437e0409 | ||
|
|
5f1e3e4473 | ||
|
|
db7207e6e5 | ||
|
|
84a4c334e1 | ||
|
|
ee7d100091 | ||
|
|
42ec656524 | ||
|
|
fb7df7be2f | ||
|
|
6b707b4b82 | ||
|
|
f66b3fcf6c | ||
|
|
034b115568 | ||
|
|
5dc6252d33 | ||
|
|
61c3519b78 | ||
|
|
a64ba220f0 | ||
|
|
60542ac9fd | ||
|
|
bbc98db7c4 | ||
|
|
efcb54b78c | ||
|
|
be74734429 | ||
|
|
a61d5fbf7a | ||
|
|
28f2908d95 | ||
|
|
68ba0dd633 | ||
|
|
c047b9a49f | ||
|
|
3fe37d62d1 | ||
|
|
b3a6bbc7b6 | ||
|
|
8d462f9666 | ||
|
|
a8c8a688ac | ||
|
|
73b2470896 | ||
|
|
be094a1579 | ||
|
|
e37c611012 | ||
|
|
a489e1d9d6 | ||
|
|
76b9b3696c | ||
|
|
d87fbc2b1c | ||
|
|
fbe323d854 | ||
|
|
b8ff1fb5eb | ||
|
|
7f85d297dc | ||
|
|
3c70f33440 | ||
|
|
16c31fe1b7 | ||
|
|
7d550fbde5 | ||
|
|
6110a006d5 | ||
|
|
8e808d2b4d | ||
|
|
975261e8a0 | ||
|
|
f44cfb88f6 | ||
|
|
abe838b099 | ||
|
|
06af60244e | ||
|
|
38f5f9529a | ||
|
|
2b04b19455 | ||
|
|
53748fcb7b | ||
|
|
33c1b198c6 | ||
|
|
7474c7c3d6 | ||
|
|
6be7f8733f | ||
|
|
90b280059f | ||
|
|
f31b764c23 | ||
|
|
3ef7cdf0fd | ||
|
|
5af7d71276 | ||
|
|
6d6cec8375 | ||
|
|
73633f84d6 | ||
|
|
8f55d103db | ||
|
|
309cbc3840 | ||
|
|
70b2a56d5a | ||
|
|
1f5965b3c4 | ||
|
|
a0f299b4e8 | ||
|
|
10b7b39b3d | ||
|
|
6ee8d89cf9 | ||
|
|
64a72303f8 | ||
|
|
66accae339 | ||
|
|
738f8fc8ed | ||
|
|
6ef47c223e | ||
|
|
374d32d70f | ||
|
|
79a2a49c5a | ||
|
|
fc57380c3f | ||
|
|
5d6f75e17e | ||
|
|
83bac4c31a | ||
|
|
b6b046b281 | ||
|
|
deaf7b7397 | ||
|
|
ff0a4809e3 | ||
|
|
637606413f | ||
|
|
bbd9fd7353 | ||
|
|
265116a99a | ||
|
|
213ae48854 | ||
|
|
f1568eca24 | ||
|
|
f788a06103 | ||
|
|
c367faad99 | ||
|
|
a528565cf1 | ||
|
|
323cb95120 | ||
|
|
d6e256c31a | ||
|
|
2787ab91b0 | ||
|
|
68dfcdf725 | ||
|
|
b38e9ab4af | ||
|
|
08fc756582 | ||
|
|
96a8964564 | ||
|
|
b9ba403542 | ||
|
|
fa263a517b | ||
|
|
f4120a8964 | ||
|
|
aeabe0545d | ||
|
|
ae7ba984ee | ||
|
|
0a11f8ce4e | ||
|
|
f0b6b0cc3b | ||
|
|
2bbafdbcee | ||
|
|
3388bb4847 | ||
|
|
0612ec8d53 | ||
|
|
89c7122c05 | ||
|
|
8000baffa7 | ||
|
|
195ea0ff6c | ||
|
|
b491c03ee7 | ||
|
|
26fdd7da96 | ||
|
|
6d8f9c6f59 | ||
|
|
49e4ec6eee | ||
|
|
4e5ccfa5c7 | ||
|
|
1dff76bcb8 | ||
|
|
db710ed999 | ||
|
|
a27ad5aea1 | ||
|
|
50bfb3278e | ||
|
|
f541c36a8c | ||
|
|
79739e163b | ||
|
|
b931d74b06 | ||
|
|
1514667a24 | ||
|
|
e3cc6d4223 | ||
|
|
6cc00c75c1 | ||
|
|
cd6fe97e6b | ||
|
|
c842748302 | ||
|
|
62dbdc4a5a | ||
|
|
667b4d2db9 | ||
|
|
f34dc6537d | ||
|
|
a4594f6b82 | ||
|
|
b3479bd229 | ||
|
|
2e7b1df8fa | ||
|
|
e06461a821 | ||
|
|
725a962194 | ||
|
|
08c51aabc4 | ||
|
|
ca0c9fcda0 | ||
|
|
e79d1535cf | ||
|
|
aa0e80471f | ||
|
|
7701c24e36 | ||
|
|
946c1eeafc | ||
|
|
250912918e | ||
|
|
73dc59aad8 | ||
|
|
8f535582ad | ||
|
|
2369e35b39 | ||
|
|
acd6a049f6 | ||
|
|
a627c96182 | ||
|
|
98a22f4a63 | ||
|
|
9f733d1ffd | ||
|
|
447038a127 | ||
|
|
d960d76d5e | ||
|
|
a6f4d61af7 | ||
|
|
62951b1e0d | ||
|
|
a554a1933c | ||
|
|
38e2b0636b | ||
|
|
50f834dfb2 | ||
|
|
7f78bd73d6 | ||
|
|
52f8317926 | ||
|
|
314ed4b21a | ||
|
|
5302d9ebc1 | ||
|
|
ddab33232a | ||
|
|
821390843b | ||
|
|
15d6319b9d | ||
|
|
9e8edf6ee6 | ||
|
|
b5b5b895f7 | ||
|
|
ba4897e6e5 | ||
|
|
a971b82b16 | ||
|
|
52af96527c | ||
|
|
612af43cb6 | ||
|
|
9f1188152f | ||
|
|
868272f58e | ||
|
|
c42e7ed777 | ||
|
|
275648066d | ||
|
|
0d55ff1594 | ||
|
|
092e3c874f | ||
|
|
6dfff547a7 | ||
|
|
205b886a41 | ||
|
|
493c7a8541 | ||
|
|
01a78342e0 | ||
|
|
d3184b57d2 | ||
|
|
6c167c6451 | ||
|
|
6fabcbe260 | ||
|
|
39fc42ef9d | ||
|
|
03aa60826e | ||
|
|
9dc93ae43e | ||
|
|
2eba18255e | ||
|
|
c9927c136f | ||
|
|
792826c0c7 | ||
|
|
b8bf541f89 | ||
|
|
f6f4a01ab1 | ||
|
|
1db1f77d4a | ||
|
|
dc93555c0f | ||
|
|
c95e32635c | ||
|
|
12bc1b5c9f | ||
|
|
17fb0e891a | ||
|
|
8c85fa3b26 | ||
|
|
cf83973211 | ||
|
|
e78c206856 | ||
|
|
8a20b0f25e | ||
|
|
836082d398 | ||
|
|
213b10a57e | ||
|
|
d0988c50f3 | ||
|
|
1cb7e0976d | ||
|
|
ea35ef6888 | ||
|
|
e70172e1fc | ||
|
|
3f5f795f76 | ||
|
|
673214bb7d | ||
|
|
4c40223649 | ||
|
|
0b573a58e6 | ||
|
|
a171162356 | ||
|
|
d2221131cf | ||
|
|
d0c7ba57b1 | ||
|
|
0533443638 | ||
|
|
522f9aebff | ||
|
|
ce35c88ade | ||
|
|
e9edd7fbdd | ||
|
|
76f7fd3df3 | ||
|
|
b560983d2f | ||
|
|
9729301aa0 | ||
|
|
0acc5618f6 | ||
|
|
35ee452de0 | ||
|
|
01b2a23b95 | ||
|
|
44286ca3c4 | ||
|
|
3d64a3176c | ||
|
|
50f42cadb1 | ||
|
|
734d99804b | ||
|
|
37a02ca1c2 | ||
|
|
19fd09a78f | ||
|
|
54ee2b8741 | ||
|
|
4da95d377f | ||
|
|
f56a6de10b | ||
|
|
b5ce04dd28 | ||
|
|
80ae7b2287 | ||
|
|
4b9669f1dc | ||
|
|
03a807aaf4 | ||
|
|
5cfe2d760d | ||
|
|
0c7437a5d2 | ||
|
|
0baa7f1cd0 | ||
|
|
8b3e0330ba | ||
|
|
20892c1e68 | ||
|
|
d58ea07227 | ||
|
|
91805fc0db | ||
|
|
6e948a652d | ||
|
|
f9b4815918 | ||
|
|
67d441ba36 | ||
|
|
914968e66d | ||
|
|
54b08a5e78 | ||
|
|
251e191271 | ||
|
|
d6761c3cdf | ||
|
|
978287b8f8 | ||
|
|
5f8949656a | ||
|
|
c16756d829 | ||
|
|
26f3c637fc | ||
|
|
d44347f1e7 | ||
|
|
19e6094378 | ||
|
|
f85dae3c34 | ||
|
|
9a4d7fd214 | ||
|
|
015de43f70 | ||
|
|
12bde494a5 | ||
|
|
986a0039cb | ||
|
|
f7befa9f1d | ||
|
|
d9758e37ee | ||
|
|
6ec154b57d | ||
|
|
456f2bb24f | ||
|
|
03227eeb79 | ||
|
|
2f982e4fab | ||
|
|
536d95f617 | ||
|
|
d8644bd646 | ||
|
|
3ed16dc6b7 | ||
|
|
7154b326d0 | ||
|
|
6fa46363ad | ||
|
|
9b83c2f979 | ||
|
|
bd8608d979 | ||
|
|
ed38b0ac41 | ||
|
|
334adf0ae5 | ||
|
|
a660dc8f30 | ||
|
|
72952de239 | ||
|
|
9b486ca391 | ||
|
|
efa8e80c0b | ||
|
|
e659c95b01 | ||
|
|
496f9517cb | ||
|
|
1385c3ee7f | ||
|
|
9bd1a7ea28 | ||
|
|
0df1102698 | ||
|
|
2d5204ff88 | ||
|
|
b07269a548 | ||
|
|
20f90cf99a | ||
|
|
3a7d8c3adb | ||
|
|
e2bdce3f5c | ||
|
|
1bfb61e80b | ||
|
|
446beb48d9 | ||
|
|
1c2b2c12bb | ||
|
|
e60acc180b | ||
|
|
536681be5d | ||
|
|
bb99322ef9 | ||
|
|
18e0bfb07c | ||
|
|
5897e0c470 | ||
|
|
05da428462 | ||
|
|
9c520cb544 | ||
|
|
a4271d598b | ||
|
|
aede6ceba3 | ||
|
|
4ae06c1fa5 | ||
|
|
3c9c99cb2c | ||
|
|
948733a874 | ||
|
|
1701e4069b | ||
|
|
8f4ba6942d | ||
|
|
d236ac0d49 | ||
|
|
1c32dff7d6 | ||
|
|
85de20665f | ||
|
|
72bb0d6455 | ||
|
|
8e5af3e531 | ||
|
|
b453a53b59 | ||
|
|
877b97b953 | ||
|
|
d88e02def5 | ||
|
|
f844147747 | ||
|
|
cca92ec8cf | ||
|
|
8d2d71d4bb | ||
|
|
f1fda2d6e5 | ||
|
|
e962388eac | ||
|
|
d9462e394a | ||
|
|
ef9d6aa70d | ||
|
|
0d35e91abf | ||
|
|
4aa97427be | ||
|
|
367bec852e | ||
|
|
639304ddb1 | ||
|
|
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 | ||
|
|
f998c04691 | ||
|
|
81870894a7 | ||
|
|
07d0677855 | ||
|
|
33741a0f37 | ||
|
|
6f1924547b | ||
|
|
a443af88a4 | ||
|
|
e40e57c514 | ||
|
|
cdfd3e424a | ||
|
|
9b25ffbb2b | ||
|
|
e74455a447 | ||
|
|
9642664800 | ||
|
|
b52e260d23 | ||
|
|
711d5b5c94 | ||
|
|
60a44dcb28 | ||
|
|
d4b96bc637 | ||
|
|
c188b88040 | ||
|
|
2dd8b521bb | ||
|
|
f13249a717 | ||
|
|
fa6d5afd84 | ||
|
|
aa8494a13e | ||
|
|
af92ee8e89 | ||
|
|
51f78b2a4c | ||
|
|
9b9422097c | ||
|
|
f22129b5c5 | ||
|
|
d4cacdf91e | ||
|
|
e65f732db3 | ||
|
|
893de92ede | ||
|
|
fecb660578 | ||
|
|
41a0903523 | ||
|
|
61bfb9febe | ||
|
|
ecf4de5d69 | ||
|
|
d089d9b33a | ||
|
|
78ab331e0d | ||
|
|
51b8436f09 | ||
|
|
9f0545d6de | ||
|
|
dfc7aa2ccd | ||
|
|
5461cfe289 | ||
|
|
9d2c8c1a66 | ||
|
|
719939c888 | ||
|
|
b8dc4d4cdf | ||
|
|
7b18862920 | ||
|
|
1193636b45 | ||
|
|
ad6c2274e8 | ||
|
|
b91d177ecc | ||
|
|
b4066a10e0 | ||
|
|
ce85c5619e | ||
|
|
1042fa3857 | ||
|
|
3b9b13e564 | ||
|
|
073545473f | ||
|
|
5365c4d590 | ||
|
|
53241daeba | ||
|
|
5c2e0f27c5 | ||
|
|
037cc64f8f | ||
|
|
61abfd1171 | ||
|
|
a84b10685c | ||
|
|
700d1d7036 | ||
|
|
9539934ee2 | ||
|
|
02b063139b | ||
|
|
7fd1602e56 | ||
|
|
33e1a80f84 | ||
|
|
177d8c60ee | ||
|
|
c27c8d5c59 | ||
|
|
9c8791fde0 | ||
|
|
102e3a6164 | ||
|
|
367329ba08 | ||
|
|
ec8317364b | ||
|
|
78e1762c48 | ||
|
|
1a3d086c84 | ||
|
|
7d61a92145 | ||
|
|
14d0e7976d | ||
|
|
d2ac984a1e | ||
|
|
3a36cf7bca | ||
|
|
eb1b679067 | ||
|
|
dd87969c8b | ||
|
|
fa2e044471 | ||
|
|
6529c101c3 | ||
|
|
7baa45dbbf | ||
|
|
deefb63bfb | ||
|
|
70c2a63474 | ||
|
|
349955a205 | ||
|
|
b0db569905 | ||
|
|
3185918f8c | ||
|
|
92c5aba92a | ||
|
|
4d64b7891b | ||
|
|
9c03978012 | ||
|
|
4d2fffc833 | ||
|
|
2b80e65818 | ||
|
|
d2c765e688 | ||
|
|
67f7131efa | ||
|
|
a2993e1340 | ||
|
|
83eb885d54 | ||
|
|
8c69d536ad | ||
|
|
708f62c380 | ||
|
|
52d36c8bb7 | ||
|
|
cc00b955cd | ||
|
|
a245a5bb06 | ||
|
|
48cc5fe8b6 | ||
|
|
225d32b910 | ||
|
|
abc9773580 | ||
|
|
c2f5abcf15 | ||
|
|
1b0b07f29e | ||
|
|
452a81b413 | ||
|
|
a064ac8501 | ||
|
|
57b7fe808f | ||
|
|
0963cd95f5 | ||
|
|
3dcfbf7c4d | ||
|
|
e7c5686944 | ||
|
|
179af2c90b | ||
|
|
ef04586d9f | ||
|
|
150cc27040 | ||
|
|
9225efbc96 | ||
|
|
943fae459d | ||
|
|
0cbac5bf6a | ||
|
|
7662423e10 | ||
|
|
2240aeb4cb | ||
|
|
bf96fb4234 | ||
|
|
6ee10162b2 | ||
|
|
f621048b53 | ||
|
|
5002c296f0 | ||
|
|
3afaae44a9 | ||
|
|
4f68858766 | ||
|
|
fe40d1a0b0 | ||
|
|
5fdec47ab0 | ||
|
|
9cffde9627 | ||
|
|
5f2c5dbd86 | ||
|
|
477933cdc3 | ||
|
|
1315349f0e | ||
|
|
7bb755519e | ||
|
|
1256e720f5 | ||
|
|
fe1c56d6ae | ||
|
|
78f6f7eb95 | ||
|
|
7a42fa3cb7 | ||
|
|
aec1179e5e | ||
|
|
9a149791fc | ||
|
|
bf44417987 | ||
|
|
e2a49d8e5e | ||
|
|
6a51606966 | ||
|
|
3ebc1e5112 | ||
|
|
e649ef0fdd | ||
|
|
5386a123f5 | ||
|
|
7f51474324 | ||
|
|
f15f943e0c | ||
|
|
3011815c8a | ||
|
|
786b1dc2a4 | ||
|
|
96bb621f25 | ||
|
|
1ad2f13b37 | ||
|
|
dc3213d855 | ||
|
|
4b80a5179a | ||
|
|
884aa898d4 | ||
|
|
d827ada01c | ||
|
|
e02d7b2a21 | ||
|
|
512e6b838a | ||
|
|
1864a4e0fd | ||
|
|
b1269f1184 | ||
|
|
2d8ab99d10 | ||
|
|
1042527371 | ||
|
|
a2dd900999 | ||
|
|
29c34723d5 | ||
|
|
049377ee0f | ||
|
|
6446f25b44 | ||
|
|
4b4dc64876 | ||
|
|
994cd1237f | ||
|
|
b2a460d564 | ||
|
|
1b826e540c | ||
|
|
d38c6c9aae | ||
|
|
54143f4031 | ||
|
|
dd2a0d8ad1 | ||
|
|
784287abf4 | ||
|
|
1887debd2c | ||
|
|
f5fcea70bd | ||
|
|
69c2f17e98 | ||
|
|
00333faa4d | ||
|
|
4e32e4bc5e | ||
|
|
0168560264 | ||
|
|
d46bbc7203 | ||
|
|
d427d1e381 | ||
|
|
9048f94031 | ||
|
|
ebcbd022e6 | ||
|
|
e24138beaf | ||
|
|
e0d7b3c052 | ||
|
|
52cda2b83e | ||
|
|
29055eedf4 | ||
|
|
f17897d288 | ||
|
|
c1c566fb6c | ||
|
|
381ffaefa2 | ||
|
|
666771a83c | ||
|
|
8c406603ae | ||
|
|
33fa75c86e | ||
|
|
8b57e2efc0 | ||
|
|
5f29c338d7 | ||
|
|
9fe9d16c38 | ||
|
|
5c3e56a2f7 | ||
|
|
03d42258db | ||
|
|
8f6d679581 | ||
|
|
f313d68274 | ||
|
|
376b899ac0 | ||
|
|
833dc52378 | ||
|
|
9e368dba9d | ||
|
|
5a91e34372 | ||
|
|
a9d52b81cd | ||
|
|
032b3cf620 | ||
|
|
341621425b | ||
|
|
b5ba002aab | ||
|
|
895f2609de | ||
|
|
cb635362cc | ||
|
|
b4b6a567a3 | ||
|
|
5cdd0df5a9 | ||
|
|
fe265ff56f | ||
|
|
060f1f08b3 | ||
|
|
bae0c16cc4 | ||
|
|
45667517ba | ||
|
|
49325942f5 | ||
|
|
5f52cff1b3 | ||
|
|
25394022f2 | ||
|
|
3ad16f3fe6 | ||
|
|
b8017e7a03 | ||
|
|
cf0dfa2f18 | ||
|
|
e590119ea7 | ||
|
|
34e0bfaa80 | ||
|
|
b15c833222 | ||
|
|
10c56952d8 | ||
|
|
335437bb24 | ||
|
|
79166c430b | ||
|
|
ccc18222dd | ||
|
|
2c7a763832 | ||
|
|
720c710091 | ||
|
|
25bc63d168 | ||
|
|
035db9f0e1 | ||
|
|
7aa9f6a03a | ||
|
|
2b64440353 | ||
|
|
933eb39d67 | ||
|
|
a38edcde16 | ||
|
|
29466f2b4f | ||
|
|
3d27a45f9a | ||
|
|
044b68f42a | ||
|
|
7263a77b99 | ||
|
|
2bb8df23dc | ||
|
|
ff1d0d4cf5 | ||
|
|
4868726a3f | ||
|
|
82038d7312 | ||
|
|
e34bd1f502 | ||
|
|
ad5fd673c7 | ||
|
|
e531ce2c84 | ||
|
|
0c4b5bd38f | ||
|
|
80ec845282 | ||
|
|
8acbe168a8 | ||
|
|
c1762ccb6f | ||
|
|
f1dc4965b5 | ||
|
|
f711faf099 | ||
|
|
b6799acd2d | ||
|
|
143c38cd31 | ||
|
|
706cdebcf8 | ||
|
|
a022bb3567 | ||
|
|
2d0ed69d58 | ||
|
|
89cf6cf04c | ||
|
|
edfe968e1a | ||
|
|
ad44decbac | ||
|
|
fee049ad25 | ||
|
|
8da4467eb3 | ||
|
|
7b85141b84 | ||
|
|
b317167494 | ||
|
|
1f8ae7a083 | ||
|
|
b57bf7277b | ||
|
|
7ec09eeb83 | ||
|
|
15aa18172b | ||
|
|
24652c0005 | ||
|
|
d955be3f20 | ||
|
|
6b803a739f | ||
|
|
17e79197d5 | ||
|
|
8cfdc0df95 | ||
|
|
da65f156f3 | ||
|
|
8d1ab51e8f | ||
|
|
6519ac87d8 | ||
|
|
d55de224a0 | ||
|
|
ef2f6569ce | ||
|
|
c3739303b0 | ||
|
|
d7afed3753 | ||
|
|
9fc8c24ef8 | ||
|
|
024678745b | ||
|
|
ff4a37e325 | ||
|
|
ea430ea7d5 | ||
|
|
e9400a45da | ||
|
|
24b231793e | ||
|
|
9e1d2839c6 | ||
|
|
a9af0e6a0a | ||
|
|
1f5c517296 | ||
|
|
36f5ac0859 | ||
|
|
623fe606ae | ||
|
|
7bff313a94 | ||
|
|
7528dd68a7 | ||
|
|
b5dd424dc3 | ||
|
|
8bc7847e20 | ||
|
|
82de0d760b | ||
|
|
5c5b0941ca | ||
|
|
c980de3382 | ||
|
|
4e86cbab27 | ||
|
|
044defef06 | ||
|
|
be860d34dd | ||
|
|
7b98ce07ce | ||
|
|
83e138c606 | ||
|
|
c81e5e79a0 | ||
|
|
9aae141a6b | ||
|
|
756ec0f3c9 | ||
|
|
313b7237ad | ||
|
|
9964e468c0 | ||
|
|
d5ab34bd5e | ||
|
|
0630b8d96d | ||
|
|
dd2a3cda55 | ||
|
|
3ed4447ed7 | ||
|
|
aea02fa475 | ||
|
|
4142324d25 | ||
|
|
ee79cbc7af | ||
|
|
eeefcc7723 | ||
|
|
0ddf0a7df0 | ||
|
|
8243a7928b | ||
|
|
914572aba4 | ||
|
|
d9fe7c4bb8 | ||
|
|
3d43a6658c | ||
|
|
bbe8c3f735 | ||
|
|
79ee315b72 | ||
|
|
1c53628518 | ||
|
|
d267b9c167 | ||
|
|
4076b79afd | ||
|
|
a24424370c | ||
|
|
053b9fa9c2 | ||
|
|
97006f1ce8 | ||
|
|
87c1996491 | ||
|
|
63b9254b8e | ||
|
|
7cc36e9402 | ||
|
|
39353fdbec | ||
|
|
5b6b1cae34 | ||
|
|
4940e3f2c3 | ||
|
|
867a4b7630 | ||
|
|
49104e4038 | ||
|
|
c432b50937 | ||
|
|
d326ce83d5 | ||
|
|
48c2c9a19a | ||
|
|
552f8a1140 | ||
|
|
6417da604d | ||
|
|
c8da3119cf | ||
|
|
9248e6e12e | ||
|
|
6cbce9d0db | ||
|
|
454ec05a47 | ||
|
|
38323e4f4a | ||
|
|
81b85876ad | ||
|
|
733f0a286e | ||
|
|
33c4fb68bf | ||
|
|
f2a4e33ffb | ||
|
|
7f6ca07606 | ||
|
|
311d982b6f | ||
|
|
602eb74de6 | ||
|
|
fa3491a0e0 | ||
|
|
09a16b5f09 | ||
|
|
77f66d6c8d | ||
|
|
85c79d30ff | ||
|
|
0396ab0156 | ||
|
|
373154b00c | ||
|
|
ad40f02cd9 | ||
|
|
b01a8b749b | ||
|
|
47b8b15b5f | ||
|
|
48b66fb5a7 | ||
|
|
86ea76404e | ||
|
|
0739a1e671 | ||
|
|
8c471fa0b3 | ||
|
|
8dd1aa58ad | ||
|
|
fb7c90c0fa | ||
|
|
56da797e6d | ||
|
|
84c4d79ad4 | ||
|
|
863b53b72e | ||
|
|
89ed3dfd87 | ||
|
|
9460b9d215 | ||
|
|
d675e2c513 | ||
|
|
df88dda91c | ||
|
|
201863f75d | ||
|
|
cf8e7d14aa | ||
|
|
9c4b4ab3a6 | ||
|
|
61b974b9ee | ||
|
|
3b1b6c6259 | ||
|
|
f278987c97 | ||
|
|
4632d298ad | ||
|
|
3d20ca1ad1 | ||
|
|
85f868c3ae | ||
|
|
b0c9a85bc8 | ||
|
|
9334c3447a | ||
|
|
b42dc236e9 | ||
|
|
508b9e895d | ||
|
|
93db975fa4 | ||
|
|
9a51c6e35d | ||
|
|
c65c491295 | ||
|
|
84212825ed | ||
|
|
908d53a230 | ||
|
|
d333d1e086 | ||
|
|
3f2d9814e5 | ||
|
|
6ae133b915 | ||
|
|
e9da72e482 | ||
|
|
5a6404cff4 |
52
.gitignore
vendored
Normal file
52
.gitignore
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# 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/lua.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
|
||||
help, rectangular cut/paste, etc., etc., etc...
|
||||
|
||||
Version 7.0. Also runs under UNIX, MSDOS and other systems.
|
||||
vim70rt.tgz contains the documentation and syntax files.
|
||||
vim70bin.tgz contains the binaries.
|
||||
vim70src.tgz contains the sources.
|
||||
Version 7.3. Also runs under UNIX, MSDOS and other systems.
|
||||
vim73rt.tgz contains the documentation and syntax files.
|
||||
vim73bin.tgz contains the binaries.
|
||||
vim73src.tgz contains the sources.
|
||||
Author: Bram Moolenaar et al.
|
||||
|
||||
|
||||
|
||||
54
Filelist
54
Filelist
@@ -7,6 +7,7 @@ SRC_ALL = \
|
||||
src/arabic.c \
|
||||
src/arabic.h \
|
||||
src/ascii.h \
|
||||
src/blowfish.c \
|
||||
src/buffer.c \
|
||||
src/charset.c \
|
||||
src/diff.c \
|
||||
@@ -38,6 +39,7 @@ SRC_ALL = \
|
||||
src/mark.c \
|
||||
src/mbyte.c \
|
||||
src/memfile.c \
|
||||
src/memfile_test.c \
|
||||
src/memline.c \
|
||||
src/menu.c \
|
||||
src/message.c \
|
||||
@@ -58,6 +60,7 @@ SRC_ALL = \
|
||||
src/regexp.h \
|
||||
src/screen.c \
|
||||
src/search.c \
|
||||
src/sha256.c \
|
||||
src/structs.h \
|
||||
src/spell.c \
|
||||
src/syntax.c \
|
||||
@@ -78,7 +81,9 @@ SRC_ALL = \
|
||||
src/testdir/test[0-9]*.ok \
|
||||
src/testdir/test49.vim \
|
||||
src/testdir/test60.vim \
|
||||
src/testdir/test83-tags? \
|
||||
src/proto.h \
|
||||
src/proto/blowfish.pro \
|
||||
src/proto/buffer.pro \
|
||||
src/proto/charset.pro \
|
||||
src/proto/diff.pro \
|
||||
@@ -116,6 +121,7 @@ SRC_ALL = \
|
||||
src/proto/regexp.pro \
|
||||
src/proto/screen.pro \
|
||||
src/proto/search.pro \
|
||||
src/proto/sha256.pro \
|
||||
src/proto/spell.pro \
|
||||
src/proto/syntax.pro \
|
||||
src/proto/tag.pro \
|
||||
@@ -137,6 +143,7 @@ SRC_UNIX = \
|
||||
pixmaps/gen-inline-pixbufs.sh \
|
||||
pixmaps/stock_icons.h \
|
||||
src/INSTALL \
|
||||
src/INSTALLx.txt \
|
||||
src/Makefile \
|
||||
src/auto/configure \
|
||||
src/config.aap.in \
|
||||
@@ -193,6 +200,7 @@ SRC_UNIX = \
|
||||
src/vim_icon.xbm \
|
||||
src/vim_mask.xbm \
|
||||
src/vimtutor \
|
||||
src/gvimtutor \
|
||||
src/which.sh \
|
||||
src/workshop.c \
|
||||
src/workshop.h \
|
||||
@@ -204,19 +212,24 @@ SRC_UNIX = \
|
||||
SRC_DOS_UNIX = \
|
||||
src/if_cscope.c \
|
||||
src/if_cscope.h \
|
||||
src/if_lua.c \
|
||||
src/if_mzsch.c \
|
||||
src/if_mzsch.h \
|
||||
src/if_perl.xs \
|
||||
src/if_perlsfio.c \
|
||||
src/if_python.c \
|
||||
src/if_python3.c \
|
||||
src/if_py_both.h \
|
||||
src/if_ruby.c \
|
||||
src/if_sniff.h \
|
||||
src/if_tcl.c \
|
||||
src/proto/if_cscope.pro \
|
||||
src/proto/if_lua.pro \
|
||||
src/proto/if_mzsch.pro \
|
||||
src/proto/if_perl.pro \
|
||||
src/proto/if_perlsfio.pro \
|
||||
src/proto/if_python.pro \
|
||||
src/proto/if_python3.pro \
|
||||
src/proto/if_ruby.pro \
|
||||
src/proto/if_tcl.pro \
|
||||
src/typemap \
|
||||
@@ -249,6 +262,8 @@ SRC_DOS = \
|
||||
src/Make_w16.mak \
|
||||
src/bigvim.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/msvc2008.bat \
|
||||
src/msvc2010.bat \
|
||||
src/dimm.idl \
|
||||
src/dlldata.c \
|
||||
src/dosinst.c \
|
||||
@@ -282,6 +297,7 @@ SRC_DOS = \
|
||||
src/proto/os_win32.pro \
|
||||
src/proto/os_mswin.pro \
|
||||
src/testdir/Make_dos.mak \
|
||||
src/testdir/Make_ming.mak \
|
||||
src/testdir/dos.vim \
|
||||
src/uninstal.c \
|
||||
src/vim.def \
|
||||
@@ -298,6 +314,7 @@ SRC_DOS = \
|
||||
src/xxd/Make_bc5.mak \
|
||||
src/xxd/Make_cyg.mak \
|
||||
src/xxd/Make_djg.mak \
|
||||
src/xxd/Make_ming.mak \
|
||||
src/xxd/Make_mvc.mak \
|
||||
nsis/gvim.nsi \
|
||||
nsis/README.txt \
|
||||
@@ -365,7 +382,7 @@ SRC_MAC = \
|
||||
src/os_mac.h \
|
||||
src/os_mac.rsr.hqx \
|
||||
src/os_mac_conv.c \
|
||||
src/os_macosx.c \
|
||||
src/os_macosx.m \
|
||||
src/proto/gui_mac.pro \
|
||||
src/proto/os_mac_conv.pro \
|
||||
|
||||
@@ -413,9 +430,6 @@ SRC_EXTRA = \
|
||||
$(SRC_VMS) \
|
||||
README_os390.txt \
|
||||
src/Make_mint.mak \
|
||||
src/Make_ro.mak \
|
||||
src/gui_riscos.c \
|
||||
src/gui_riscos.h \
|
||||
src/if_sniff.c \
|
||||
src/infplist.xml \
|
||||
src/link.390 \
|
||||
@@ -423,10 +437,6 @@ SRC_EXTRA = \
|
||||
src/os_beos.h \
|
||||
src/os_beos.rsrc \
|
||||
src/os_mint.h \
|
||||
src/os_riscos.c \
|
||||
src/os_riscos.h \
|
||||
src/proto/gui_riscos.pro \
|
||||
src/proto/os_riscos.pro \
|
||||
src/os_vms_fix.com \
|
||||
src/toolbar.phi \
|
||||
|
||||
@@ -513,6 +523,7 @@ RT_SCRIPTS = \
|
||||
runtime/indent/*.vim \
|
||||
runtime/indent/README.txt \
|
||||
runtime/ftplugin/*.vim \
|
||||
runtime/ftplugin/logtalk.dict \
|
||||
runtime/ftplugin/README.txt \
|
||||
runtime/plugin/*.vim \
|
||||
runtime/plugin/README.txt \
|
||||
@@ -568,7 +579,8 @@ RT_AMI = \
|
||||
libs/arp.library \
|
||||
runtime/doc.info \
|
||||
runtime/doc/*.info \
|
||||
runtime/icons \
|
||||
runtime/icons/README.txt \
|
||||
runtime/icons/*.info \
|
||||
runtime/icons.info \
|
||||
runtime/macros.info \
|
||||
runtime/macros/*.info \
|
||||
@@ -644,16 +656,16 @@ EXTRA = \
|
||||
$(SRC_EXTRA) \
|
||||
README_extra.txt \
|
||||
src/VisVim/VisVim.dll \
|
||||
farsi \
|
||||
farsi/README.txt \
|
||||
farsi/fonts/*/far-* \
|
||||
runtime/vimlogo.xpm \
|
||||
src/swis.s \
|
||||
src/tee/Makefile* \
|
||||
src/tee/Makefile \
|
||||
src/tee/tee.c \
|
||||
csdpmi4b.zip \
|
||||
|
||||
# generic language files
|
||||
LANG_GEN = \
|
||||
README_lang.txt \
|
||||
runtime/doc/*-fr.1 \
|
||||
runtime/doc/*-fr.UTF-8.1 \
|
||||
runtime/doc/*-it.1 \
|
||||
@@ -668,22 +680,22 @@ LANG_GEN = \
|
||||
runtime/keymap/*.vim \
|
||||
runtime/tutor/README.*.txt \
|
||||
runtime/tutor/Makefile \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.gr.* \
|
||||
runtime/tutor/tutor.ja.* \
|
||||
runtime/tutor/tutor.ko.* \
|
||||
runtime/tutor/tutor.pl.* \
|
||||
runtime/tutor/tutor.ru.* \
|
||||
runtime/tutor/tutor.sk.* \
|
||||
runtime/tutor/tutor.zh.* \
|
||||
runtime/tutor/tutor.??.* \
|
||||
runtime/tutor/tutor.bar \
|
||||
runtime/tutor/tutor.bar.* \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
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/main.aap \
|
||||
runtime/spell/cleanadd.vim \
|
||||
runtime/spell/*.vim \
|
||||
runtime/spell/fixdup \
|
||||
|
||||
# generic language files, binary
|
||||
LANG_GEN_BIN = \
|
||||
|
||||
255
Makefile
255
Makefile
@@ -3,8 +3,10 @@
|
||||
# 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.
|
||||
#
|
||||
# NOTE: If this doesn't work properly, first change directory to "src" and use
|
||||
@@ -21,32 +23,32 @@
|
||||
# has run can result in compiling with $(CC) empty.
|
||||
|
||||
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 "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
# Some make programs use the last target for the $@ default; put the other
|
||||
# targets separately to always let $@ expand to "first" by default.
|
||||
all install uninstall tools config configure 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 "If there are problems, cd to the src directory and run make there"
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
|
||||
# 2. Create the various distributions:
|
||||
#########################################################################
|
||||
# 2. Creating the various distribution files.
|
||||
#
|
||||
# TARGET PRODUCES CONTAINS
|
||||
# unixall vim-#.#.tar.bz2 Runtime files and Sources for Unix
|
||||
#
|
||||
# extra vim-#.#-extra.tar.gz Extra source and runtime files
|
||||
# lang vim-#.#-lang.tar.gz multi-language files
|
||||
# unixall vim-#.#.tar.bz2 All runtime files and sources, for Unix
|
||||
#
|
||||
# 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
|
||||
# dosrt vim##rt.zip runtime for MS-DOS
|
||||
# dosbin vim##d16.zip binary for MS-DOS 16 bits
|
||||
@@ -55,7 +57,11 @@ all install uninstall tools config configure proto depend lint tags types test t
|
||||
# gvim##.zip binary for GUI Win32
|
||||
# gvim##ole.zip OLE exe for Win32 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
|
||||
# (use RT from dosrt)
|
||||
@@ -64,47 +70,54 @@ all install uninstall tools config configure proto depend lint tags types test t
|
||||
#
|
||||
# All output files are created in the "dist" directory. Existing files are
|
||||
# overwritten!
|
||||
# To do all this you need the unix, extra and lang archives, and
|
||||
# compiled binaries.
|
||||
# To do all this you need the Unix archive and compiled binaries.
|
||||
# Before creating an archive first delete all backup files, *.orig, etc.
|
||||
|
||||
MAJOR = 7
|
||||
MINOR = 0
|
||||
MINOR = 3
|
||||
|
||||
# Uncomment this line if the Win32s version is to be included.
|
||||
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:
|
||||
#
|
||||
# - Update Vim version number. For a test version in: src/version.h, Contents,
|
||||
# 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
|
||||
# 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.
|
||||
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme, Cscope and "huge"
|
||||
# features. Exclude workshop and SNiFF.
|
||||
# - Compile Vim with GTK, Perl, Python, Python3, TCL, Ruby, MZscheme, Lua (if
|
||||
# you can make it all work), Cscope and "huge" features. Exclude workshop
|
||||
# and SNiFF.
|
||||
# - With these features: "make proto" (requires cproto and Motif installed;
|
||||
# ignore warnings for missing include files, fix problems for syntax errors).
|
||||
# - With these features: "make depend" (works best with gcc).
|
||||
# - "make lint" and check the output (ignore GTK warnings).
|
||||
# - Enable the efence library in "src/Makefile" and run "make test". May
|
||||
# require disabling Python to avoid trouble with threads.
|
||||
# - If you have a lint program: "make lint" and check the output (ignore GTK
|
||||
# warnings).
|
||||
# - 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 options in runtime/optwin.vim et al. (with check.vim).
|
||||
# - Do "make menu" to update the runtime/synmenu.vim file.
|
||||
# - Add remarks for changes to runtime/doc/version7.txt.
|
||||
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
|
||||
# ADDITIONS".
|
||||
# - In runtime/doc run "make" and "make html" to check for errors.
|
||||
# - Check if src/Makefile and src/feature.h don't contain any personal
|
||||
# preferences or the GTK, Perl, etc. mentioned above.
|
||||
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
|
||||
# ADDITIONS".
|
||||
# - Check file protections to be "644" for text and "755" for executables (run
|
||||
# the "check" script).
|
||||
# - Check compiling on Amiga, MS-DOS and MS-Windows.
|
||||
# - 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"
|
||||
#
|
||||
# Amiga:
|
||||
# Amiga: (OBSOLETE, Amiga files are no longer distributed)
|
||||
# - "make amisrc", move the archive to the Amiga and compile:
|
||||
# "make -f Make_manx.mak" (will use "big" features by default).
|
||||
# - Run the tests: "make -f Make_manx.mak test"
|
||||
@@ -113,44 +126,51 @@ DOSBIN_S = dosbin_s
|
||||
# - "make amirt", "make amibin".
|
||||
#
|
||||
# PC:
|
||||
# - Run make on Unix to update the ".mo" files.
|
||||
# - "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.
|
||||
# - "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
|
||||
# "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.
|
||||
# - Rename the executables to "vimd16.exe", "xxdd16.exe", "installd16.exe" and
|
||||
# "uninstald16.exe".
|
||||
# 32 bit DOS version:
|
||||
# - 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
|
||||
# "uninstald32.exe".
|
||||
# Win32 console version:
|
||||
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
|
||||
# - Set environment for Visual C++ 2008, e.g.:
|
||||
# "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"
|
||||
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
|
||||
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
|
||||
# - Rename ObjC/vim.pdb to vimw32.pdb.
|
||||
# - Rename vim.pdb to vimw32.pdb.
|
||||
# - When building the Win32s version later, delete vimrun.exe, install.exe and
|
||||
# uninstal.exe. Otherwise rename executables to installw32.exe and
|
||||
# uninstalw32.exe.
|
||||
# Win32 GUI version:
|
||||
# - "nmake -f Make_mvc.mak GUI=yes.
|
||||
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
|
||||
# - Move ObjG/gvim.pdb to here.
|
||||
# - Delete vimrun.exe, install.exe and uninstall.exe.
|
||||
# - Move gvim.pdb to here.
|
||||
# - Delete vimrun.exe, install.exe and uninstal.exe.
|
||||
# - Copy "GvimExt/gvimext.dll" to here.
|
||||
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
|
||||
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
|
||||
# - Rename "gvim.exe" to "gvim_ole.exe".
|
||||
# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb".
|
||||
# - Delete install.exe and uninstall.exe.
|
||||
# - Rename gvim.pdb to "gvim_ole.pdb".
|
||||
# - Delete install.exe and uninstal.exe.
|
||||
# - If building the Win32s version delete vimrun.exe.
|
||||
# Win32s GUI version:
|
||||
# - Set environment for Visual C++ 4.1 (requires a new console window)
|
||||
# - "vcvars32" (use the path for VC 4.1 e:\msdev\bin)
|
||||
# - Set environment for Visual C++ 4.1 (requires a new console window):
|
||||
# "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" (use the path for VC 4.1)
|
||||
# - Rename "gvim.exe" to "gvim_w32s.exe".
|
||||
@@ -161,21 +181,23 @@ DOSBIN_S = dosbin_s
|
||||
# - Copy all the "*.exe" files to where this Makefile is.
|
||||
# - Copy all the "*.pdb" files to where this Makefile is.
|
||||
# - "make dosbin".
|
||||
# - Run make on Unix to update the ".mo" files.
|
||||
# - "make doslang".
|
||||
# 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,
|
||||
# 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
|
||||
# from a binary archive or build them)
|
||||
# - copy these files (get 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.
|
||||
# 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
|
||||
# - 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.
|
||||
#
|
||||
# OS/2:
|
||||
# - Unpack the Unix "src", "extra" and "rt" archives.
|
||||
# OS/2: (OBSOLETE, OS/2 version is no longer distributed)
|
||||
# - Unpack the Unix archive.
|
||||
# - "make -f Make_os2.mak".
|
||||
# - Rename the executables to vimos2.exe, xxdos2.exe and teeos2.exe and copy
|
||||
# them to here.
|
||||
@@ -210,8 +232,6 @@ dist/comment:
|
||||
mkdir dist/comment
|
||||
|
||||
COMMENT_RT = comment/$(VERSION)-rt
|
||||
COMMENT_RT1 = comment/$(VERSION)-rt1
|
||||
COMMENT_RT2 = comment/$(VERSION)-rt2
|
||||
COMMENT_D16 = comment/$(VERSION)-bin-d16
|
||||
COMMENT_D32 = comment/$(VERSION)-bin-d32
|
||||
COMMENT_W32 = comment/$(VERSION)-bin-w32
|
||||
@@ -222,17 +242,10 @@ COMMENT_SRC = comment/$(VERSION)-src
|
||||
COMMENT_OS2 = comment/$(VERSION)-bin-os2
|
||||
COMMENT_HTML = comment/$(VERSION)-html
|
||||
COMMENT_FARSI = comment/$(VERSION)-farsi
|
||||
COMMENT_LANG = comment/$(VERSION)-lang
|
||||
|
||||
dist/$(COMMENT_RT): dist/comment
|
||||
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
|
||||
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-DOS 16 bit real mode" > dist/$(COMMENT_D16)
|
||||
|
||||
@@ -263,9 +276,6 @@ dist/$(COMMENT_HTML): dist/comment
|
||||
dist/$(COMMENT_FARSI): dist/comment
|
||||
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
|
||||
-rm -f dist/$(VIMVER).tar.bz2
|
||||
-rm -rf dist/$(VIMRTDIR)
|
||||
@@ -281,6 +291,8 @@ unixall: dist prepare
|
||||
$(SRC_ALL) \
|
||||
$(SRC_UNIX) \
|
||||
$(SRC_DOS_UNIX) \
|
||||
$(EXTRA) \
|
||||
$(LANG_SRC) \
|
||||
| (cd dist/$(VIMRTDIR); tar xf -)
|
||||
# Need to use a "distclean" config.mk file
|
||||
cp -f src/config.mk.dist dist/$(VIMRTDIR)/src/auto/config.mk
|
||||
@@ -288,26 +300,6 @@ unixall: dist prepare
|
||||
touch dist/$(VIMRTDIR)/src/auto/config.h
|
||||
# Make sure configure is newer than config.mk to force it to be generated
|
||||
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.
|
||||
# Same for cs.cp1250.po, pl.cp1250.po and sk.cp1250.po.
|
||||
touch dist/$(VIMRTDIR)/src/po/ja.sjis.po
|
||||
@@ -317,9 +309,11 @@ lang: dist prepare
|
||||
touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
|
||||
touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
|
||||
touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
|
||||
cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
|
||||
gzip -9 dist/$(VIMVER)-lang.tar
|
||||
# Create the archive.
|
||||
cd dist && tar cf $(VIMVER).tar $(VIMRTDIR)
|
||||
bzip2 dist/$(VIMVER).tar
|
||||
|
||||
# Amiga runtime - OBSOLETE
|
||||
amirt: dist prepare
|
||||
-rm -f dist/vim$(VERSION)rt.tar.gz
|
||||
-rm -rf dist/Vim
|
||||
@@ -342,6 +336,7 @@ amirt: dist prepare
|
||||
gzip -9 dist/vim$(VERSION)rt.tar
|
||||
mv dist/vim$(VERSION)rt.tar.gz dist/vim$(VERSION)rt.tgz
|
||||
|
||||
# Amiga binaries - OBSOLETE
|
||||
amibin: dist prepare
|
||||
-rm -f dist/vim$(VERSION)bin.tar.gz
|
||||
-rm -rf dist/Vim
|
||||
@@ -359,6 +354,7 @@ amibin: dist prepare
|
||||
gzip -9 dist/vim$(VERSION)bin.tar
|
||||
mv dist/vim$(VERSION)bin.tar.gz dist/vim$(VERSION)bin.tgz
|
||||
|
||||
# Amiga sources - OBSOLETE
|
||||
amisrc: dist prepare
|
||||
-rm -f dist/vim$(VERSION)src.tar.gz
|
||||
-rm -rf dist/Vim
|
||||
@@ -379,15 +375,41 @@ amisrc: dist prepare
|
||||
no_title.vim: Makefile
|
||||
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
|
||||
-rm -rf dist/vim$(VERSION)rt.zip
|
||||
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
|
||||
-rm -rf dist/vim
|
||||
mkdir dist/vim
|
||||
mkdir dist/vim/$(VIMRTDIR)
|
||||
mkdir dist/vim/$(VIMRTDIR)/lang
|
||||
cd src && MAKEMO=yes $(MAKE) languages
|
||||
tar cf - \
|
||||
$(RT_ALL) \
|
||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||
@@ -398,7 +420,7 @@ dosrt_unix2dos: dist prepare no_title.vim
|
||||
$(RT_AMI_DOS) \
|
||||
$(LANG_GEN) \
|
||||
| (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 - \
|
||||
$(RT_UNIX_DOS_BIN) \
|
||||
$(RT_ALL_BIN) \
|
||||
@@ -407,6 +429,18 @@ dosrt_unix2dos: dist prepare no_title.vim
|
||||
| (cd dist/vim/$(VIMRTDIR); tar xf -)
|
||||
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
|
||||
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.
|
||||
@@ -416,7 +450,7 @@ runtime_unix2dos: dosrt_unix2dos
|
||||
cd dist/vim/$(VIMRTDIR); tar cf - * \
|
||||
| (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
|
||||
dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
||||
@@ -427,7 +461,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
|
||||
tar cf - \
|
||||
$(BIN_DOS) \
|
||||
| (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 xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
|
||||
@@ -446,7 +480,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
|
||||
tar cf - \
|
||||
$(BIN_DOS) \
|
||||
| (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 xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||
@@ -463,7 +497,7 @@ dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
|
||||
tar cf - \
|
||||
$(BIN_DOS) \
|
||||
| (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 xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp installd32.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||
@@ -480,7 +514,7 @@ dosbin_d16: dist no_title.vim dist/$(COMMENT_D16)
|
||||
tar cf - \
|
||||
$(BIN_DOS) \
|
||||
| (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 xxdd16.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp installd16.exe dist/vim/$(VIMRTDIR)/install.exe
|
||||
@@ -496,7 +530,7 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
|
||||
tar cf - \
|
||||
$(BIN_DOS) \
|
||||
| (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 xxdw32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp vimrun.exe dist/vim/$(VIMRTDIR)/vimrun.exe
|
||||
@@ -518,7 +552,7 @@ dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
|
||||
tar cf - \
|
||||
$(BIN_DOS) \
|
||||
| (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 xxdd32.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp README_w32s.txt dist/vim/$(VIMRTDIR)
|
||||
@@ -526,53 +560,6 @@ dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)
|
||||
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
|
||||
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)
|
||||
-rm -rf dist/vim$(VERSION)os2.zip
|
||||
-rm -rf dist/vim
|
||||
@@ -581,7 +568,7 @@ os2bin: dist no_title.vim dist/$(COMMENT_OS2)
|
||||
tar cf - \
|
||||
$(BIN_OS2) \
|
||||
| (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 xxdos2.exe dist/vim/$(VIMRTDIR)/xxd.exe
|
||||
cp teeos2.exe dist/vim/$(VIMRTDIR)/tee.exe
|
||||
|
||||
58
README.txt
58
README.txt
@@ -1,4 +1,4 @@
|
||||
README.txt for version 7.0 of Vim: Vi IMproved.
|
||||
README.txt for version 7.3 of Vim: Vi IMproved.
|
||||
|
||||
|
||||
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
|
||||
"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
|
||||
with ten fingers can work very fast. Additionally, function keys can be
|
||||
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,
|
||||
Atari MiNT, Macintosh, BeOS, VMS, RISC OS, OS/2 and almost all flavours of
|
||||
Vim runs under Amiga DOS, MS-DOS, MS-Windows (95, 98, Me, NT, 2000, XP, Vista,
|
||||
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.
|
||||
|
||||
|
||||
@@ -32,19 +32,19 @@ an overview of currently available distributions.
|
||||
|
||||
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
|
||||
"runtime/doc/help.txt". It contains pointers to the other documentation
|
||||
files. The User Manual reads like a book and is recommended to learn to use
|
||||
Vim. See ":help user-manual".
|
||||
|
||||
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
|
||||
|
||||
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).
|
||||
|
||||
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_vms.txt VMS
|
||||
|
||||
There are more README_*.txt files, depending on the distribution you used.
|
||||
|
||||
|
||||
INFORMATION
|
||||
|
||||
@@ -98,44 +100,14 @@ If you have problems, have a look at the Vim FAQ:
|
||||
Send bug reports to:
|
||||
Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
There are five mailing lists for Vim:
|
||||
<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.
|
||||
There are several mailing lists for Vim, see http://www.vim.org/maillist.php.
|
||||
|
||||
|
||||
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
|
||||
Molenstraat 2
|
||||
2161 HP Lisse
|
||||
The Netherlands
|
||||
|
||||
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.
|
||||
Finsterruetihof 1
|
||||
8134 Adliswil
|
||||
Switzerland
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ami.txt for version 7.0 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.
|
||||
See README.txt for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_amibin.txt for version 7.0 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_ami.txt" for installation instructions for the Amiga.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_amisrc.txt for version 7.0 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_ami.txt" for installation instructions for the Amiga.
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
README_bindos.txt for version 7.0 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_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
|
||||
pick only one of them, but it's also possible to install several.
|
||||
These ones are available (the version number may differ):
|
||||
vim70d16.zip 16 bit DOS version
|
||||
vim70d32.zip 32 bit DOS version
|
||||
vim70w32.zip Windows 95/98/NT/etc. console version
|
||||
gvim70.zip Windows 95/98/NT/etc. GUI version
|
||||
gvim70ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||
gvim70_s.zip Windows 3.1 GUI version
|
||||
vim73d16.zip 16 bit DOS version
|
||||
vim73d32.zip 32 bit DOS version
|
||||
vim73w32.zip Windows 95/98/NT/etc. console version
|
||||
gvim73.zip Windows 95/98/NT/etc. GUI version
|
||||
gvim73ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||
gvim73_s.zip Windows 3.1 GUI version
|
||||
|
||||
You MUST also get the runtime archive (vim70rt.zip).
|
||||
The sources are also available (vim70src.zip).
|
||||
You MUST also get the runtime archive (vim73rt.zip).
|
||||
The sources are also available (vim73src.zip).
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_dos.txt for version 7.0 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.
|
||||
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,
|
||||
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
|
||||
name includes the version number, it is unlikely that you overwrite
|
||||
existing files.
|
||||
Examples:
|
||||
pkunzip -d gvim70.zip
|
||||
unzip vim70w32.zip
|
||||
pkunzip -d gvim73.zip
|
||||
unzip vim73w32.zip
|
||||
|
||||
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
|
||||
@@ -69,7 +69,7 @@ These are the normal steps to install Vim from the .zip archives:
|
||||
archive and follow the instructions in the documentation.
|
||||
|
||||
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
|
||||
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
|
||||
@@ -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
|
||||
$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:
|
||||
set path=%path%;C:\vim\vim70
|
||||
set path=%path%;D:\editors\vim\vim70
|
||||
set path=%path%;C:\vim\vim73
|
||||
set path=%path%;D:\editors\vim\vim73
|
||||
- Create entries for Vim on the desktop and in the Start menu.
|
||||
|
||||
That's it!
|
||||
@@ -93,8 +93,8 @@ Remarks:
|
||||
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:
|
||||
set VIM=C:\editors\vim
|
||||
Vim version 6.0 will look for your vimrc file in $VIM, and for the runtime
|
||||
files in $VIM/vim70. See ":help $VIM" for more information.
|
||||
Vim version 7.3 will look for your vimrc file in $VIM, and for the runtime
|
||||
files in $VIM/vim73. See ":help $VIM" for more information.
|
||||
|
||||
- To avoid confusion between distributed files of different versions and your
|
||||
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\... Other files you made.
|
||||
Distributed files:
|
||||
C:\vim\vim70\vim.exe The Vim version 6.0 executable.
|
||||
C:\vim\vim70\doc\*.txt The version 6.0 documentation files.
|
||||
C:\vim\vim70\bugreport.vim A Vim version 6.0 script.
|
||||
C:\vim\vim70\... Other version 6.0 distributed files.
|
||||
C:\vim\vim73\vim.exe The Vim version 7.3 executable.
|
||||
C:\vim\vim73\doc\*.txt The version 7.3 documentation files.
|
||||
C:\vim\vim73\bugreport.vim A Vim version 7.3 script.
|
||||
C:\vim\vim73\... Other version 7.3 distributed files.
|
||||
In this case the $VIM environment variable would be set like this:
|
||||
set VIM=C:\vim
|
||||
Then $VIMRUNTIME will automatically be set to "$VIM\vim70". Don't add
|
||||
"vim70" to $VIM, that won't work.
|
||||
Then $VIMRUNTIME will automatically be set to "$VIM\vim73". Don't add
|
||||
"vim73" to $VIM, that won't work.
|
||||
|
||||
- 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
|
||||
@@ -136,8 +136,8 @@ Remarks:
|
||||
Select Properties.
|
||||
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
|
||||
Vim executable. Examples:
|
||||
C:\command.com /c C:\vim\vim70\vim.exe
|
||||
C:\command.com /c D:\editors\vim\vim70\vim.exe
|
||||
C:\command.com /c C:\vim\vim73\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
|
||||
possible, select "Advanced" in the Program tab, and deselect "MS-DOS
|
||||
mode".
|
||||
|
||||
@@ -1,61 +1,51 @@
|
||||
README_extra.txt for version 7.0 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
|
||||
(vim-7.0-src.tar.gz). The extra archive is useless without it.
|
||||
|
||||
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.
|
||||
These extra files of Vim are for special purposes. This README explains what
|
||||
the files are for. For general information about Vim, see the "README.txt"
|
||||
file.
|
||||
|
||||
|
||||
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
|
||||
what Farsi is, this is not for you.
|
||||
src/if_sniff.* Interface to SNiFF. If you don't know what SNiFF is,
|
||||
this is not for you.
|
||||
|
||||
if_sniff Interface to SNiFF. If you don't know what SNiFF is, this is
|
||||
not for you.
|
||||
src/os_amiga.* Files for the Amiga port.
|
||||
|
||||
os_amiga Files for the Amiga port.
|
||||
src/gui_beos.*
|
||||
src/os_beos.* Files for the BeOS port.
|
||||
|
||||
gui_riscos
|
||||
os_riscos Files for the RISC OS port.
|
||||
src/os_msdos.*
|
||||
src/os_dos.* Files for the MS-DOS port.
|
||||
|
||||
gui_beos
|
||||
os_beos Files for the BeOS port.
|
||||
src/gui_mac.*
|
||||
src/os_mac.* Files for the Mac port.
|
||||
|
||||
os_msdos
|
||||
os_dos Files for the MS-DOS port.
|
||||
src/os_mint.8 Files for the Atari Mint port.
|
||||
|
||||
gui_mac
|
||||
os_mac Files for the Mac port.
|
||||
src/os_os2* Files for the OS/2 port.
|
||||
src/tee/* Extra program for OS/2.
|
||||
|
||||
os_mint Files for the Atari Mint port.
|
||||
src/os_vms* Files for the VMS port.
|
||||
|
||||
os_os2 Files for the OS/2 port.
|
||||
tee Extra program for OS/2.
|
||||
src/os_w32*
|
||||
src/os_win32.* Files for the Win32 port.
|
||||
|
||||
os_vms Files for the VMS port.
|
||||
src/gui_w32.* Files for the Win32 GUI.
|
||||
src/gui_w48.* Files for the Win32 and Win16 GUI.
|
||||
src/Make_mvc.mak MS Visual C++ makefile for the Win32 GUI.
|
||||
runtime/rgb.txt File with color definitions for the Win32 GUI.
|
||||
|
||||
os_w32
|
||||
os_win32 Files for the Win32 port.
|
||||
src/if_ole.* OLE automation interface, for MS Windows 95 and NT.
|
||||
|
||||
gui_w32 Files for the Win32 GUI.
|
||||
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.
|
||||
src/VisVim/* Integration of Win32 GUI with MS Visual Developer
|
||||
Studio.
|
||||
|
||||
if_ole OLE automation interface, for MS Windows 95 and NT.
|
||||
src/GvimExt/* DLL for the "Edit with Vim" context menu entry
|
||||
|
||||
VisVim Integration of Win32 GUI with MS Visual Developer Studio.
|
||||
nsis/* NSIS script to build the self-installing MS-Windows exe
|
||||
|
||||
GvimExt DLL for the "Edit with Vim" context menu entry
|
||||
runtime/doc/*.man Preprocessed manual pages.
|
||||
|
||||
nsis NSIS script to build the self-installing MS-Windows exe
|
||||
|
||||
*.man Preprocessed manual pages.
|
||||
|
||||
file_select.vim Vim script to browse directories (Unix only).
|
||||
runtime/macros/file_select.vim Vim script to browse directories (Unix only).
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
README_lang.txt for version 7.0 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.0 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.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ole.txt for version 7.0 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 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:
|
||||
: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.
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
README_os2.txt for version 7.0 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.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
|
||||
NOTE: You will need two archives:
|
||||
vim70rt.zip contains the runtime files (same as for the PC version)
|
||||
vim70os2.zip contains the OS/2 executables
|
||||
vim73rt.zip contains the runtime files (same as for the PC version)
|
||||
vim73os2.zip contains the OS/2 executables
|
||||
|
||||
1. Go to the directory where you want to put the Vim files. Examples:
|
||||
cd C:\
|
||||
cd D:\editors
|
||||
|
||||
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
|
||||
name includes the version number, it is unlikely that you overwrite
|
||||
existing files.
|
||||
Examples:
|
||||
pkunzip -d vim70os2.zip
|
||||
unzip vim70os2.zip
|
||||
pkunzip -d vim73os2.zip
|
||||
unzip vim73os2.zip
|
||||
|
||||
After you unpacked the files, you can still move the whole directory tree
|
||||
to another location.
|
||||
|
||||
3. Add the directory where vim.exe is to your path. The simplest is to add a
|
||||
line to your autoexec.bat. Examples:
|
||||
set path=%path%;C:\vim\vim70
|
||||
set path=%path%;D:\editors\vim\vim70
|
||||
set path=%path%;C:\vim\vim73
|
||||
set path=%path%;D:\editors\vim\vim73
|
||||
|
||||
That's it!
|
||||
|
||||
@@ -41,10 +41,10 @@ Extra remarks:
|
||||
C:\vim\_viminfo Dynamic info for 'viminfo'.
|
||||
C:\vim\... Other files you made.
|
||||
Distributed files:
|
||||
C:\vim\vim70\vim.exe The Vim version 7.0 executable.
|
||||
C:\vim\vim70\doc\*.txt The version 7.0 documentation files.
|
||||
C:\vim\vim70\bugreport.vim A Vim version 7.0 script.
|
||||
C:\vim\vim70\... Other version 7.0 distributed files.
|
||||
C:\vim\vim73\vim.exe The Vim version 7.3 executable.
|
||||
C:\vim\vim73\doc\*.txt The version 7.3 documentation files.
|
||||
C:\vim\vim73\bugreport.vim A Vim version 7.3 script.
|
||||
C:\vim\vim73\... Other version 7.3 distributed files.
|
||||
In this case the $VIM environment variable would be set like this:
|
||||
set VIM=C:\vim
|
||||
|
||||
|
||||
123
README_os390.txt
123
README_os390.txt
@@ -1,51 +1,84 @@
|
||||
README_os_390.txt for version 7.0 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!!!
|
||||
I expect you to know how to handle alpha software!
|
||||
Most likely there are not many users out there using Vim on z/OS. So chances
|
||||
are good, that some bugs are still undiscovered.
|
||||
|
||||
This port was done by Ralf Schandl <schandl@de.ibm.com>.
|
||||
This port is not maintained or supported by IBM!!
|
||||
Getting the source to z/OS:
|
||||
==========================
|
||||
|
||||
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:
|
||||
----------
|
||||
==========
|
||||
|
||||
Note: After the file configure was created via autoconf, it had been
|
||||
handedited, to make the test for ICEConnectionNumber work.
|
||||
DO NOT run autoconf again!
|
||||
Vim can be compiled with or without GUI support. For 7.3 only the compilation
|
||||
without GUI was tested. Below is a section about compiling with X11 but this
|
||||
is from an earlier version of Vim.
|
||||
|
||||
Without X11:
|
||||
Console only:
|
||||
-------------
|
||||
|
||||
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
|
||||
VIM toplevel directory. Change to the src directory first and call make from
|
||||
there. Here is a what to do:
|
||||
straightforward.
|
||||
|
||||
Change to the vim directory and do:
|
||||
|
||||
# Don't use c89!
|
||||
# Make additional symbols visible.
|
||||
# Allow intermixing of compiler options and files.
|
||||
|
||||
$ export CC=cc
|
||||
$ export CFLAGS=-D_ALL_SOURCE
|
||||
$ export _CC_CCMODE=1
|
||||
$./configure --enable-max-features --without-x --enable-gui=no
|
||||
$./configure --with-features=big --without-x --enable-gui=no
|
||||
$ cd src
|
||||
$ make
|
||||
|
||||
There may be warnings:
|
||||
- include files not found (libc, sys/param.h, ...)
|
||||
- Redeclaration of ... differs from ...
|
||||
-- just ignore them.
|
||||
|
||||
$ make test
|
||||
|
||||
Note: Test 28 will be reported as failed. This is because diff can't
|
||||
compare files containing '\0' characters. Test 11 will fail if you
|
||||
don't have gzip.
|
||||
This will produce lots of garbage on your screen (including error
|
||||
messages). Don't worry.
|
||||
|
||||
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
|
||||
|
||||
|
||||
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
|
||||
and results in a big executable (~13 Mb), the second needs a few additional
|
||||
@@ -54,8 +87,6 @@ you want Motif.
|
||||
|
||||
The easy way:
|
||||
$ export CC=cc
|
||||
$ export CFLAGS="-D_ALL_SOURCE -W c,dll"
|
||||
$ export LDFLAGS="-W l,dll"
|
||||
$ export _CC_CCMODE=1
|
||||
$ ./configure --enable-max-features --enable-gui=motif
|
||||
$ cd src
|
||||
@@ -65,7 +96,7 @@ you want Motif.
|
||||
|
||||
The smarter way:
|
||||
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/-lXmu *//g
|
||||
@@ -84,47 +115,3 @@ you want Motif.
|
||||
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.0 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.
|
||||
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).
|
||||
|
||||
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!
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
README_srcdos.txt for version 7.0 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_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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_unix.txt for version 7.0 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.
|
||||
See "README.txt" for general information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_vms.txt for version 7.0 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.
|
||||
See "README.txt" in the runtime archive for information about Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_w32s.txt for version 7.0 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
|
||||
the Win32s subsystem in MS-Windows 3.1 and 3.11.
|
||||
|
||||
2
farsi/README.txt
Normal file
2
farsi/README.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
For information about installation of Farsi fonts and Vim usage in Farsi mode,
|
||||
refer to the Farsi help file by typing ":help farsi" in Vim.
|
||||
BIN
farsi/fonts/DOS/far-a01.com
Executable file
BIN
farsi/fonts/DOS/far-a01.com
Executable file
Binary file not shown.
BIN
farsi/fonts/SunOs/far-a01.fb
Normal file
BIN
farsi/fonts/SunOs/far-a01.fb
Normal file
Binary file not shown.
BIN
farsi/fonts/UNIXs/far-a01.f16
Normal file
BIN
farsi/fonts/UNIXs/far-a01.f16
Normal file
Binary file not shown.
BIN
farsi/fonts/UNIXs/far-a01.pcf.Z
Normal file
BIN
farsi/fonts/UNIXs/far-a01.pcf.Z
Normal file
Binary file not shown.
BIN
farsi/fonts/UNIXs/far-a01.pcf.gz
Normal file
BIN
farsi/fonts/UNIXs/far-a01.pcf.gz
Normal file
Binary file not shown.
BIN
farsi/fonts/WINDOWS/far-a01.fon
Normal file
BIN
farsi/fonts/WINDOWS/far-a01.fon
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
# NSIS file to create a self-installing exe for Vim.
|
||||
# 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,
|
||||
# because uninstall deletes most files in $0.
|
||||
@@ -22,17 +22,20 @@
|
||||
!define HAVE_NLS
|
||||
|
||||
!define VER_MAJOR 7
|
||||
!define VER_MINOR 0
|
||||
!define VER_MINOR 3
|
||||
|
||||
# ----------- No configurable settings below this line -----------
|
||||
|
||||
!include UpgradeDLL.nsh # for VisVim.dll
|
||||
!include LogicLib.nsh
|
||||
!include x64.nsh
|
||||
|
||||
Name "Vim ${VER_MAJOR}.${VER_MINOR}"
|
||||
OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
|
||||
CRCCheck force
|
||||
SetCompressor lzma
|
||||
SetDatablockOptimize on
|
||||
RequestExecutionLevel highest
|
||||
|
||||
ComponentText "This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer."
|
||||
DirText "Choose a directory to install Vim (must end in 'vim')"
|
||||
@@ -139,7 +142,7 @@ FunctionEnd
|
||||
Function .onInstSuccess
|
||||
WriteUninstaller vim${VER_MAJOR}${VER_MINOR}\uninstall-gui.exe
|
||||
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
|
||||
Exec '$0\gvim.exe -R "$0\README.txt"'
|
||||
NoReadme:
|
||||
@@ -290,13 +293,21 @@ Section "Add an Edit-with-Vim context menu entry"
|
||||
SetOutPath $0
|
||||
ClearErrors
|
||||
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
|
||||
|
||||
# Can't copy gvimext.dll, create it under another name and rename it on
|
||||
# next reboot.
|
||||
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
|
||||
|
||||
GvimExtDone:
|
||||
@@ -438,8 +449,8 @@ Section Uninstall
|
||||
|
||||
AskRemove:
|
||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||
"Remove all files in your $1\vimfiles directory? \
|
||||
$\nIf you have created something there that you want to keep, click No" IDNO Fin
|
||||
"Remove all files in your $1\vimfiles directory?$\n \
|
||||
$\nCAREFUL: If you have created something there that you want to keep, click No" IDNO Fin
|
||||
RMDir /r $1\vimfiles
|
||||
NoRemove:
|
||||
|
||||
|
||||
635
runtime/autoload/ada.vim
Normal file
635
runtime/autoload/ada.vim
Normal file
@@ -0,0 +1,635 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Perform Ada specific completion & tagging.
|
||||
" Language: Ada (2005)
|
||||
" $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" Taylor Venable <taylor@metasyntax.net>
|
||||
" Neil Bird <neil@fnxweb.com>
|
||||
" Ned Okie <nokie@radford.edu>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
" Version: 4.6
|
||||
" $Revision: 887 $
|
||||
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 26.05.2006 MK ' should not be in iskeyword.
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 02.10.2006 MK Better folding.
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 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
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
" Section: Constants {{{1
|
||||
"
|
||||
let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*'
|
||||
let g:ada#WordRegex = '\a\w*'
|
||||
let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*"
|
||||
let g:ada#Keywords = []
|
||||
|
||||
" Section: g:ada#Keywords {{{1
|
||||
"
|
||||
" Section: add Ada keywords {{{2
|
||||
"
|
||||
for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'keyword',
|
||||
\ 'info': 'Ada keyword.',
|
||||
\ 'kind': 'k',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: GNAT Project Files {{{3
|
||||
"
|
||||
if exists ('g:ada_with_gnat_project_files')
|
||||
for Item in ['project']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'keyword',
|
||||
\ 'info': 'GNAT projectfile keyword.',
|
||||
\ 'kind': 'k',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add standart exception {{{2
|
||||
"
|
||||
for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'exception',
|
||||
\ 'info': 'Ada standart exception.',
|
||||
\ 'kind': 'x',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT exception {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['Assert_Failure']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'exception',
|
||||
\ 'info': 'GNAT exception.',
|
||||
\ 'kind': 'x',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add Ada buildin types {{{2
|
||||
"
|
||||
for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'type',
|
||||
\ 'info': 'Ada buildin type.',
|
||||
\ 'kind': 't',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT buildin types {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'type',
|
||||
\ 'info': 'GNAT buildin type.',
|
||||
\ 'kind': 't',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add Ada Attributes {{{2
|
||||
"
|
||||
for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'attribute',
|
||||
\ 'info': 'Ada attribute.',
|
||||
\ 'kind': 'a',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT Attributes {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'attribute',
|
||||
\ 'info': 'GNAT attribute.',
|
||||
\ 'kind': 'a',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
|
||||
" Section: add Ada Pragmas {{{2
|
||||
"
|
||||
for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'pragma',
|
||||
\ 'info': 'Ada pragma.',
|
||||
\ 'kind': 'p',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
|
||||
" Section: add GNAT Pragmas {{{3
|
||||
"
|
||||
if exists ('g:ada_gnat_extensions')
|
||||
for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External']
|
||||
let g:ada#Keywords += [{
|
||||
\ 'word': Item,
|
||||
\ 'menu': 'pragma',
|
||||
\ 'info': 'GNAT pragma.',
|
||||
\ 'kind': 'p',
|
||||
\ 'icase': 1}]
|
||||
endfor
|
||||
endif
|
||||
" 1}}}
|
||||
|
||||
" Section: g:ada#Ctags_Kinds {{{1
|
||||
"
|
||||
let g:ada#Ctags_Kinds = {
|
||||
\ 'P': ["packspec", "package specifications"],
|
||||
\ 'p': ["package", "packages"],
|
||||
\ 'T': ["typespec", "type specifications"],
|
||||
\ 't': ["type", "types"],
|
||||
\ 'U': ["subspec", "subtype specifications"],
|
||||
\ 'u': ["subtype", "subtypes"],
|
||||
\ 'c': ["component", "record type components"],
|
||||
\ 'l': ["literal", "enum type literals"],
|
||||
\ 'V': ["varspec", "variable specifications"],
|
||||
\ 'v': ["variable", "variables"],
|
||||
\ 'f': ["formal", "generic formal parameters"],
|
||||
\ 'n': ["constant", "constants"],
|
||||
\ 'x': ["exception", "user defined exceptions"],
|
||||
\ 'R': ["subprogspec", "subprogram specifications"],
|
||||
\ 'r': ["subprogram", "subprograms"],
|
||||
\ 'K': ["taskspec", "task specifications"],
|
||||
\ 'k': ["task", "tasks"],
|
||||
\ 'O': ["protectspec", "protected data specifications"],
|
||||
\ 'o': ["protected", "protected data"],
|
||||
\ 'E': ["entryspec", "task/protected data entry specifications"],
|
||||
\ 'e': ["entry", "task/protected data entries"],
|
||||
\ 'b': ["label", "labels"],
|
||||
\ 'i': ["identifier", "loop/declare identifiers"],
|
||||
\ 'a': ["autovar", "automatic variables"],
|
||||
\ 'y': ["annon", "loops and blocks with no identifier"]}
|
||||
|
||||
" Section: ada#Word (...) {{{1
|
||||
"
|
||||
" Extract current Ada word across multiple lines
|
||||
" AdaWord ([line, column])\
|
||||
"
|
||||
function ada#Word (...)
|
||||
if a:0 > 1
|
||||
let l:Line_Nr = a:1
|
||||
let l:Column_Nr = a:2 - 1
|
||||
else
|
||||
let l:Line_Nr = line('.')
|
||||
let l:Column_Nr = col('.') - 1
|
||||
endif
|
||||
|
||||
let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
|
||||
|
||||
" Cope with tag searching for items in comments; if we are, don't loop
|
||||
" backards looking for previous lines
|
||||
if l:Column_Nr > strlen(l:Line)
|
||||
" We were in a comment
|
||||
let l:Line = getline(l:Line_Nr)
|
||||
let l:Search_Prev_Lines = 0
|
||||
else
|
||||
let l:Search_Prev_Lines = 1
|
||||
endif
|
||||
|
||||
" Go backwards until we find a match (Ada ID) that *doesn't* include our
|
||||
" location - i.e., the previous ID. This is because the current 'correct'
|
||||
" match will toggle matching/not matching as we traverse characters
|
||||
" backwards. Thus, we have to find the previous unrelated match, exclude
|
||||
" it, then use the next full match (ours).
|
||||
" Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)]
|
||||
" ... but start, here, one after the required char.
|
||||
let l:New_Column = l:Column_Nr + 1
|
||||
while 1
|
||||
let l:New_Column = l:New_Column - 1
|
||||
if l:New_Column < 0
|
||||
" Have to include previous l:Line from file
|
||||
let l:Line_Nr = l:Line_Nr - 1
|
||||
if l:Line_Nr < 1 || !l:Search_Prev_Lines
|
||||
" Start of file or matching in a comment
|
||||
let l:Line_Nr = 1
|
||||
let l:New_Column = 0
|
||||
let l:Our_Match = match (l:Line, g:ada#WordRegex )
|
||||
break
|
||||
endif
|
||||
" Get previous l:Line, and prepend it to our search string
|
||||
let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
|
||||
let l:New_Column = strlen (l:New_Line) - 1
|
||||
let l:Column_Nr = l:Column_Nr + l:New_Column
|
||||
let l:Line = l:New_Line . l:Line
|
||||
endif
|
||||
" Check to see if this is a match excluding 'us'
|
||||
let l:Match_End = l:New_Column +
|
||||
\ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1
|
||||
if l:Match_End >= l:New_Column &&
|
||||
\ l:Match_End < l:Column_Nr
|
||||
" Yes
|
||||
let l:Our_Match = l:Match_End+1 +
|
||||
\ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex )
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Got anything?
|
||||
if l:Our_Match < 0
|
||||
return ''
|
||||
else
|
||||
let l:Line = strpart (l:Line, l:Our_Match)
|
||||
endif
|
||||
|
||||
" Now simply add further lines until the match gets no bigger
|
||||
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
|
||||
let l:Last_Line = line ('$')
|
||||
let l:Line_Nr = line ('.') + 1
|
||||
while l:Line_Nr <= l:Last_Line
|
||||
let l:Last_Match = l:Match_String
|
||||
let l:Line = l:Line .
|
||||
\ substitute (getline (l:Line_Nr), g:ada#Comment, '', '')
|
||||
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
|
||||
if l:Match_String == l:Last_Match
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Strip whitespace & return
|
||||
return substitute (l:Match_String, '\s\+', '', 'g')
|
||||
endfunction ada#Word
|
||||
|
||||
" Section: ada#List_Tag (...) {{{1
|
||||
"
|
||||
" List tags in quickfix window
|
||||
"
|
||||
function ada#List_Tag (...)
|
||||
if a:0 > 1
|
||||
let l:Tag_Word = ada#Word (a:1, a:2)
|
||||
elseif a:0 > 0
|
||||
let l:Tag_Word = a:1
|
||||
else
|
||||
let l:Tag_Word = ada#Word ()
|
||||
endif
|
||||
|
||||
echo "Searching for" l:Tag_Word
|
||||
|
||||
let l:Pattern = '^' . l:Tag_Word . '$'
|
||||
let l:Tag_List = taglist (l:Pattern)
|
||||
let l:Error_List = []
|
||||
"
|
||||
" add symbols
|
||||
"
|
||||
for Tag_Item in l:Tag_List
|
||||
if l:Tag_Item['kind'] == ''
|
||||
let l:Tag_Item['kind'] = 's'
|
||||
endif
|
||||
|
||||
let l:Error_List += [
|
||||
\ l:Tag_Item['filename'] . '|' .
|
||||
\ l:Tag_Item['cmd'] . '|' .
|
||||
\ l:Tag_Item['kind'] . "\t" .
|
||||
\ l:Tag_Item['name'] ]
|
||||
endfor
|
||||
set errorformat=%f\|%l\|%m
|
||||
cexpr l:Error_List
|
||||
cwindow
|
||||
endfunction ada#List_Tag
|
||||
|
||||
" Section: ada#Jump_Tag (Word, Mode) {{{1
|
||||
"
|
||||
" Word tag - include '.' and if Ada make uppercase
|
||||
"
|
||||
function ada#Jump_Tag (Word, Mode)
|
||||
if a:Word == ''
|
||||
" Get current word
|
||||
let l:Word = ada#Word()
|
||||
if l:Word == ''
|
||||
throw "NOT_FOUND: no identifier found."
|
||||
endif
|
||||
else
|
||||
let l:Word = a:Word
|
||||
endif
|
||||
|
||||
echo "Searching for " . l:Word
|
||||
|
||||
try
|
||||
execute a:Mode l:Word
|
||||
catch /.*:E426:.*/
|
||||
let ignorecase = &ignorecase
|
||||
set ignorecase
|
||||
execute a:Mode l:Word
|
||||
let &ignorecase = ignorecase
|
||||
endtry
|
||||
|
||||
return
|
||||
endfunction ada#Jump_Tag
|
||||
|
||||
" Section: ada#Insert_Backspace () {{{1
|
||||
"
|
||||
" Backspace at end of line after auto-inserted commentstring '-- ' wipes it
|
||||
"
|
||||
function ada#Insert_Backspace ()
|
||||
let l:Line = getline ('.')
|
||||
if col ('.') > strlen (l:Line) &&
|
||||
\ match (l:Line, '-- $') != -1 &&
|
||||
\ match (&comments,'--') != -1
|
||||
return "\<bs>\<bs>\<bs>"
|
||||
else
|
||||
return "\<bs>"
|
||||
endif
|
||||
|
||||
return
|
||||
endfunction ada#InsertBackspace
|
||||
|
||||
" Section: Insert Completions {{{1
|
||||
"
|
||||
" Section: ada#User_Complete(findstart, base) {{{2
|
||||
"
|
||||
" This function is used for the 'complete' option.
|
||||
"
|
||||
function! ada#User_Complete(findstart, base)
|
||||
if a:findstart == 1
|
||||
"
|
||||
" locate the start of the word
|
||||
"
|
||||
let line = getline ('.')
|
||||
let start = col ('.') - 1
|
||||
while start > 0 && line[start - 1] =~ '\i\|'''
|
||||
let start -= 1
|
||||
endwhile
|
||||
return start
|
||||
else
|
||||
"
|
||||
" look up matches
|
||||
"
|
||||
let l:Pattern = '^' . a:base . '.*$'
|
||||
"
|
||||
" add keywords
|
||||
"
|
||||
for Tag_Item in g:ada#Keywords
|
||||
if l:Tag_Item['word'] =~? l:Pattern
|
||||
if complete_add (l:Tag_Item) == 0
|
||||
return []
|
||||
endif
|
||||
if complete_check ()
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfunction ada#User_Complete
|
||||
|
||||
" Section: ada#Completion (cmd) {{{2
|
||||
"
|
||||
" Word completion (^N/^R/^X^]) - force '.' inclusion
|
||||
function ada#Completion (cmd)
|
||||
set iskeyword+=46
|
||||
return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>"
|
||||
endfunction ada#Completion
|
||||
|
||||
" Section: ada#Completion_End () {{{2
|
||||
"
|
||||
function ada#Completion_End ()
|
||||
set iskeyword-=46
|
||||
return ''
|
||||
endfunction ada#Completion_End
|
||||
|
||||
" Section: ada#Create_Tags {{{1
|
||||
"
|
||||
function ada#Create_Tags (option)
|
||||
if a:option == 'file'
|
||||
let l:Filename = fnamemodify (bufname ('%'), ':p')
|
||||
elseif a:option == 'dir'
|
||||
let l:Filename =
|
||||
\ fnamemodify (bufname ('%'), ':p:h') . "*.ada " .
|
||||
\ fnamemodify (bufname ('%'), ':p:h') . "*.adb " .
|
||||
\ fnamemodify (bufname ('%'), ':p:h') . "*.ads"
|
||||
else
|
||||
let l:Filename = a:option
|
||||
endif
|
||||
execute '!ctags --excmd=number ' . l:Filename
|
||||
endfunction ada#Create_Tags
|
||||
|
||||
" Section: ada#Switch_Session {{{1
|
||||
"
|
||||
function ada#Switch_Session (New_Session)
|
||||
"
|
||||
" you should not save to much date into the seession since they will
|
||||
" be sourced
|
||||
"
|
||||
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
|
||||
finally
|
||||
let &sessionoptions=l:sessionoptions
|
||||
endtry
|
||||
|
||||
return
|
||||
endfunction ada#Switch_Session
|
||||
|
||||
" Section: GNAT Pretty Printer folding {{{1
|
||||
"
|
||||
if exists('g:ada_folding') && g:ada_folding[0] == 'g'
|
||||
"
|
||||
" Lines consisting only of ')' ';' are due to a gnat pretty bug and
|
||||
" have the same level as the line above (can't happen in the first
|
||||
" line).
|
||||
"
|
||||
let s:Fold_Collate = '^\([;)]*$\|'
|
||||
|
||||
"
|
||||
" some lone statements are folded with the line above
|
||||
"
|
||||
if stridx (g:ada_folding, 'i') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<is\>$\|'
|
||||
endif
|
||||
if stridx (g:ada_folding, 'b') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<begin\>$\|'
|
||||
endif
|
||||
if stridx (g:ada_folding, 'p') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<private\>$\|'
|
||||
endif
|
||||
if stridx (g:ada_folding, 'x') >= 0
|
||||
let s:Fold_Collate .= '\s\+\<exception\>$\|'
|
||||
endif
|
||||
|
||||
" We also handle empty lines and
|
||||
" comments here.
|
||||
let s:Fold_Collate .= '--\)'
|
||||
|
||||
function ada#Pretty_Print_Folding (Line) " {{{2
|
||||
let l:Text = getline (a:Line)
|
||||
|
||||
if l:Text =~ s:Fold_Collate
|
||||
"
|
||||
" fold with line above
|
||||
"
|
||||
let l:Level = "="
|
||||
elseif l:Text =~ '^\s\+('
|
||||
"
|
||||
" gnat outdents a line which stards with a ( by one characters so
|
||||
" that parameters which follow are aligned.
|
||||
"
|
||||
let l:Level = (indent (a:Line) + 1) / &shiftwidth
|
||||
else
|
||||
let l:Level = indent (a:Line) / &shiftwidth
|
||||
endif
|
||||
|
||||
return l:Level
|
||||
endfunction ada#Pretty_Print_Folding " }}}2
|
||||
endif
|
||||
|
||||
" Section: Options and Menus {{{1
|
||||
"
|
||||
" Section: ada#Switch_Syntax_Options {{{2
|
||||
"
|
||||
function ada#Switch_Syntax_Option (option)
|
||||
syntax off
|
||||
if exists ('g:ada_' . a:option)
|
||||
unlet g:ada_{a:option}
|
||||
echo a:option . 'now off'
|
||||
else
|
||||
let g:ada_{a:option}=1
|
||||
echo a:option . 'now on'
|
||||
endif
|
||||
syntax on
|
||||
endfunction ada#Switch_Syntax_Option
|
||||
|
||||
" Section: ada#Map_Menu {{{2
|
||||
"
|
||||
function ada#Map_Menu (Text, Keys, Command)
|
||||
if a:Keys[0] == ':'
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "Ada." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . a:Keys .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "command -buffer " .
|
||||
\ a:Keys[1:] .
|
||||
\" :" . a:Command . "<CR>"
|
||||
elseif a:Keys[0] == '<'
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "Ada." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . a:Keys .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "nnoremap <buffer> " .
|
||||
\ a:Keys .
|
||||
\" :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "inoremap <buffer> " .
|
||||
\ a:Keys .
|
||||
\" <C-O>:" . a:Command . "<CR>"
|
||||
else
|
||||
if exists("g:mapleader")
|
||||
let l:leader = g:mapleader
|
||||
else
|
||||
let l:leader = '\'
|
||||
endif
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "Ada." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
execute
|
||||
\ "nnoremap <buffer>" .
|
||||
\ escape(l:leader . "a" . a:Keys , '\') .
|
||||
\" :" . a:Command
|
||||
execute
|
||||
\ "inoremap <buffer>" .
|
||||
\ escape(l:leader . "a" . a:Keys , '\') .
|
||||
\" <C-O>:" . a:Command
|
||||
endif
|
||||
return
|
||||
endfunction
|
||||
|
||||
" Section: ada#Map_Popup {{{2
|
||||
"
|
||||
function ada#Map_Popup (Text, Keys, Command)
|
||||
if exists("g:mapleader")
|
||||
let l:leader = g:mapleader
|
||||
else
|
||||
let l:leader = '\'
|
||||
endif
|
||||
execute
|
||||
\ "50amenu " .
|
||||
\ "PopUp." . escape(a:Text, ' ') .
|
||||
\ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
|
||||
\ " :" . a:Command . "<CR>"
|
||||
|
||||
call ada#Map_Menu (a:Text, a:Keys, a:Command)
|
||||
return
|
||||
endfunction ada#Map_Popup
|
||||
|
||||
" }}}1
|
||||
|
||||
lockvar g:ada#WordRegex
|
||||
lockvar g:ada#DotWordRegex
|
||||
lockvar g:ada#Comment
|
||||
lockvar! g:ada#Keywords
|
||||
lockvar! g:ada#Ctags_Kinds
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
109
runtime/autoload/adacomplete.vim
Normal file
109
runtime/autoload/adacomplete.vim
Normal file
@@ -0,0 +1,109 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada omnicompletion file
|
||||
" Language: Ada (2005)
|
||||
" $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Maintainer: Martin Krischik
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
" Version: 4.6
|
||||
" $Revision: 887 $
|
||||
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 26.05.2006 MK improved search for begin of word.
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: ft-ada-omni
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
" Section: adacomplete#Complete () {{{1
|
||||
"
|
||||
" This function is used for the 'omnifunc' option.
|
||||
"
|
||||
function! adacomplete#Complete (findstart, base)
|
||||
if a:findstart == 1
|
||||
return ada#User_Complete (a:findstart, a:base)
|
||||
else
|
||||
"
|
||||
" look up matches
|
||||
"
|
||||
if exists ("g:ada_omni_with_keywords")
|
||||
call ada#User_Complete (a:findstart, a:base)
|
||||
endif
|
||||
"
|
||||
" search tag file for matches
|
||||
"
|
||||
let l:Pattern = '^' . a:base . '.*$'
|
||||
let l:Tag_List = taglist (l:Pattern)
|
||||
"
|
||||
" add symbols
|
||||
"
|
||||
for Tag_Item in l:Tag_List
|
||||
if l:Tag_Item['kind'] == ''
|
||||
"
|
||||
" Tag created by gnat xref
|
||||
"
|
||||
let l:Match_Item = {
|
||||
\ 'word': l:Tag_Item['name'],
|
||||
\ 'menu': l:Tag_Item['filename'],
|
||||
\ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'],
|
||||
\ 'kind': 's',
|
||||
\ 'icase': 1}
|
||||
else
|
||||
"
|
||||
" Tag created by ctags
|
||||
"
|
||||
let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n"
|
||||
let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n"
|
||||
let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n"
|
||||
|
||||
if has_key( l:Tag_Item, 'package')
|
||||
let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n"
|
||||
let l:Menu = l:Tag_Item['package']
|
||||
elseif has_key( l:Tag_Item, 'separate')
|
||||
let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n"
|
||||
let l:Menu = l:Tag_Item['separate']
|
||||
elseif has_key( l:Tag_Item, 'packspec')
|
||||
let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n"
|
||||
let l:Menu = l:Tag_Item['packspec']
|
||||
elseif has_key( l:Tag_Item, 'type')
|
||||
let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n"
|
||||
let l:Menu = l:Tag_Item['type']
|
||||
else
|
||||
let l:Menu = l:Tag_Item['filename']
|
||||
endif
|
||||
|
||||
let l:Match_Item = {
|
||||
\ 'word': l:Tag_Item['name'],
|
||||
\ 'menu': l:Menu,
|
||||
\ 'info': l:Info,
|
||||
\ 'kind': l:Tag_Item['kind'],
|
||||
\ 'icase': 1}
|
||||
endif
|
||||
if complete_add (l:Match_Item) == 0
|
||||
return []
|
||||
endif
|
||||
if complete_check ()
|
||||
return []
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
endif
|
||||
endfunction adacomplete#Complete
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -1,8 +1,10 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 May 08
|
||||
" Last Change: 2011 Dec 30
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! ccomplete#Complete(findstart, base)
|
||||
@@ -119,6 +121,27 @@ function! ccomplete#Complete(findstart, base)
|
||||
" TODO: join previous line if it makes sense
|
||||
let line = getline('.')
|
||||
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
|
||||
" Completing one word and it's a local variable: May add '[', '.' or
|
||||
" '->'.
|
||||
@@ -582,3 +605,6 @@ function! s:SearchMembers(matches, items, all)
|
||||
endfor
|
||||
return res
|
||||
endfunc
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,430 +1,429 @@
|
||||
" Vim completion script
|
||||
" Language: CSS 2.1
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2007 May 5
|
||||
|
||||
let s:values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index")
|
||||
|
||||
function! csscomplete#CompleteCSS(findstart, base)
|
||||
|
||||
if a:findstart
|
||||
" We need whole line to proper checking
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let compl_begin = col('.') - 2
|
||||
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
|
||||
while start >= 0 && line[start - 1] =~ '\%(\k\|-\)'
|
||||
let start -= 1
|
||||
endwhile
|
||||
let b:compl_context = getline('.')[0:compl_begin]
|
||||
let b:compl_context = line[0:compl_begin]
|
||||
return start
|
||||
endif
|
||||
|
||||
" There are few chars important for context:
|
||||
" ^ ; : { } /* */
|
||||
" Where ^ is start of line and /* */ are comment borders
|
||||
" Depending on their relative position to cursor we will know what should
|
||||
" be completed.
|
||||
" 1. if nearest are ^ or { or ; current word is property
|
||||
" 2. if : it is value (with exception of pseudo things)
|
||||
" 3. if } we are outside of css definitions
|
||||
" 4. for comments ignoring is be the easiest but assume they are the same
|
||||
" as 1.
|
||||
" 5. if @ complete at-rule
|
||||
" 6. if ! complete important
|
||||
if exists("b:compl_context")
|
||||
let line = b:compl_context
|
||||
unlet! b:compl_context
|
||||
else
|
||||
" There are few chars important for context:
|
||||
" ^ ; : { } /* */
|
||||
" Where ^ is start of line and /* */ are comment borders
|
||||
" Depending on their relative position to cursor we will now what should
|
||||
" be completed.
|
||||
" 1. if nearest are ^ or { or ; current word is property
|
||||
" 2. if : it is value (with exception of pseudo things)
|
||||
" 3. if } we are outside of css definitions
|
||||
" 4. for comments ignoring is be the easiest but assume they are the same
|
||||
" as 1.
|
||||
" 5. if @ complete at-rule
|
||||
" 6. if ! complete important
|
||||
if exists("b:compl_context")
|
||||
let line = b:compl_context
|
||||
unlet! b:compl_context
|
||||
else
|
||||
let line = a:base
|
||||
endif
|
||||
let line = a:base
|
||||
endif
|
||||
|
||||
let res = []
|
||||
let res2 = []
|
||||
let borders = {}
|
||||
let res = []
|
||||
let res2 = []
|
||||
let borders = {}
|
||||
|
||||
" We need the last occurrence of char so reverse line
|
||||
let revline = join(reverse(split(line, '.\zs')), '')
|
||||
" Check last occurrence of sequence
|
||||
|
||||
let openbrace = stridx(revline, '{')
|
||||
let closebrace = stridx(revline, '}')
|
||||
let colon = stridx(revline, ':')
|
||||
let semicolon = stridx(revline, ';')
|
||||
let opencomm = stridx(revline, '*/') " Line was reversed
|
||||
let closecomm = stridx(revline, '/*') " Line was reversed
|
||||
let style = stridx(revline, '=\s*elyts') " Line was reversed
|
||||
let atrule = stridx(revline, '@')
|
||||
let exclam = stridx(revline, '!')
|
||||
let openbrace = strridx(line, '{')
|
||||
let closebrace = strridx(line, '}')
|
||||
let colon = strridx(line, ':')
|
||||
let semicolon = strridx(line, ';')
|
||||
let opencomm = strridx(line, '/*')
|
||||
let closecomm = strridx(line, '*/')
|
||||
let style = strridx(line, 'style\s*=')
|
||||
let atrule = strridx(line, '@')
|
||||
let exclam = strridx(line, '!')
|
||||
|
||||
if openbrace > -1
|
||||
let borders[openbrace] = "openbrace"
|
||||
endif
|
||||
if closebrace > -1
|
||||
let borders[closebrace] = "closebrace"
|
||||
endif
|
||||
if colon > -1
|
||||
let borders[colon] = "colon"
|
||||
endif
|
||||
if semicolon > -1
|
||||
let borders[semicolon] = "semicolon"
|
||||
endif
|
||||
if opencomm > -1
|
||||
let borders[opencomm] = "opencomm"
|
||||
endif
|
||||
if closecomm > -1
|
||||
let borders[closecomm] = "closecomm"
|
||||
endif
|
||||
if style > -1
|
||||
let borders[style] = "style"
|
||||
endif
|
||||
if atrule > -1
|
||||
let borders[atrule] = "atrule"
|
||||
endif
|
||||
if exclam > -1
|
||||
let borders[exclam] = "exclam"
|
||||
endif
|
||||
if openbrace > -1
|
||||
let borders[openbrace] = "openbrace"
|
||||
endif
|
||||
if closebrace > -1
|
||||
let borders[closebrace] = "closebrace"
|
||||
endif
|
||||
if colon > -1
|
||||
let borders[colon] = "colon"
|
||||
endif
|
||||
if semicolon > -1
|
||||
let borders[semicolon] = "semicolon"
|
||||
endif
|
||||
if opencomm > -1
|
||||
let borders[opencomm] = "opencomm"
|
||||
endif
|
||||
if closecomm > -1
|
||||
let borders[closecomm] = "closecomm"
|
||||
endif
|
||||
if style > -1
|
||||
let borders[style] = "style"
|
||||
endif
|
||||
if atrule > -1
|
||||
let borders[atrule] = "atrule"
|
||||
endif
|
||||
if exclam > -1
|
||||
let borders[exclam] = "exclam"
|
||||
endif
|
||||
|
||||
|
||||
if len(borders) == 0 || borders[min(keys(borders))] =~ '^\(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
|
||||
" Complete properties
|
||||
if len(borders) == 0 || borders[max(keys(borders))] =~ '^\%(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
|
||||
" Complete properties
|
||||
|
||||
let values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index")
|
||||
|
||||
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
|
||||
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_property
|
||||
call add(res, m . ':')
|
||||
elseif m =~? entered_property
|
||||
call add(res2, m . ':')
|
||||
endif
|
||||
endfor
|
||||
for m in s:values
|
||||
if m =~? '^'.entered_property
|
||||
call add(res, m . ':')
|
||||
elseif m =~? entered_property
|
||||
call add(res2, m . ':')
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
return res + res2
|
||||
|
||||
elseif borders[min(keys(borders))] == 'colon'
|
||||
" Get name of property
|
||||
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
|
||||
elseif borders[max(keys(borders))] == 'colon'
|
||||
" Get name of property
|
||||
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
|
||||
|
||||
if prop == 'azimuth'
|
||||
let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"]
|
||||
elseif prop == 'background-attachment'
|
||||
let values = ["scroll", "fixed"]
|
||||
elseif prop == 'background-color'
|
||||
let values = ["transparent", "rgb(", "#"]
|
||||
elseif prop == 'background-image'
|
||||
let values = ["url(", "none"]
|
||||
elseif prop == 'background-position'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\([a-zA-Z]\+\)\?$'
|
||||
let values = ["top", "center", "bottom"]
|
||||
elseif vals =~ '^[a-zA-Z]\+\s\+\([a-zA-Z]\+\)\?$'
|
||||
let values = ["left", "center", "right"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop == 'background-repeat'
|
||||
let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"]
|
||||
elseif prop == 'background'
|
||||
let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"]
|
||||
elseif prop == 'border-collapse'
|
||||
let values = ["collapse", "separate"]
|
||||
elseif prop == 'border-color'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
elseif prop == 'border-spacing'
|
||||
return []
|
||||
elseif prop == 'border-style'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif prop =~ 'border-\(top\|right\|bottom\|left\)$'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\([a-zA-Z0-9.]\+\)\?$'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-color'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-style'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-width'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif prop == 'border-width'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif prop == 'border'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\([a-zA-Z0-9.]\+\)\?$'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop == 'bottom'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'caption-side'
|
||||
let values = ["top", "bottom"]
|
||||
elseif prop == 'clear'
|
||||
let values = ["none", "left", "right", "both"]
|
||||
elseif prop == 'clip'
|
||||
let values = ["auto", "rect("]
|
||||
elseif prop == 'color'
|
||||
let values = ["rgb(", "#"]
|
||||
elseif prop == 'content'
|
||||
let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"]
|
||||
elseif prop =~ 'counter-\(increment\|reset\)$'
|
||||
let values = ["none"]
|
||||
elseif prop =~ '^\(cue-after\|cue-before\|cue\)$'
|
||||
let values = ["url(", "none"]
|
||||
elseif prop == 'cursor'
|
||||
let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"]
|
||||
elseif prop == 'direction'
|
||||
let values = ["ltr", "rtl"]
|
||||
elseif prop == 'display'
|
||||
let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"]
|
||||
elseif prop == 'elevation'
|
||||
let values = ["below", "level", "above", "higher", "lower"]
|
||||
elseif prop == 'empty-cells'
|
||||
let values = ["show", "hide"]
|
||||
elseif prop == 'float'
|
||||
let values = ["left", "right", "none"]
|
||||
elseif prop == 'font-family'
|
||||
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
|
||||
elseif prop == 'font-size'
|
||||
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
|
||||
elseif prop == 'font-style'
|
||||
let values = ["normal", "italic", "oblique"]
|
||||
elseif prop == 'font-variant'
|
||||
let values = ["normal", "small-caps"]
|
||||
elseif prop == 'font-weight'
|
||||
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
|
||||
elseif prop == 'font'
|
||||
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
|
||||
elseif prop =~ '^\(height\|width\)$'
|
||||
let values = ["auto"]
|
||||
elseif prop =~ '^\(left\|rigth\)$'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'letter-spacing'
|
||||
let values = ["normal"]
|
||||
elseif prop == 'line-height'
|
||||
let values = ["normal"]
|
||||
elseif prop == 'list-style-image'
|
||||
let values = ["url(", "none"]
|
||||
elseif prop == 'list-style-position'
|
||||
let values = ["inside", "outside"]
|
||||
elseif prop == 'list-style-type'
|
||||
let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"]
|
||||
elseif prop == 'list-style'
|
||||
return []
|
||||
elseif prop == 'margin'
|
||||
let values = ["auto"]
|
||||
elseif prop =~ 'margin-\(right\|left\|top\|bottom\)$'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'max-height'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'max-width'
|
||||
let values = ["none"]
|
||||
elseif prop == 'min-height'
|
||||
let values = ["none"]
|
||||
elseif prop == 'min-width'
|
||||
let values = ["none"]
|
||||
elseif prop == 'orphans'
|
||||
return []
|
||||
elseif prop == 'outline-color'
|
||||
let values = ["rgb(", "#"]
|
||||
elseif prop == 'outline-style'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif prop == 'outline-width'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif prop == 'outline'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\([a-zA-Z0-9,()#]\+\)\?$'
|
||||
let values = ["rgb(", "#"]
|
||||
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\([a-zA-Z]\+\)\?$'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop == 'overflow'
|
||||
let values = ["visible", "hidden", "scroll", "auto"]
|
||||
elseif prop == 'padding'
|
||||
return []
|
||||
elseif prop =~ 'padding-\(top\|right\|bottom\|left\)$'
|
||||
return []
|
||||
elseif prop =~ 'page-break-\(after\|before\)$'
|
||||
let values = ["auto", "always", "avoid", "left", "right"]
|
||||
elseif prop == 'page-break-inside'
|
||||
let values = ["auto", "avoid"]
|
||||
elseif prop =~ 'pause-\(after\|before\)$'
|
||||
return []
|
||||
elseif prop == 'pause'
|
||||
return []
|
||||
elseif prop == 'pitch-range'
|
||||
return []
|
||||
elseif prop == 'pitch'
|
||||
let values = ["x-low", "low", "medium", "high", "x-high"]
|
||||
elseif prop == 'play-during'
|
||||
let values = ["url(", "mix", "repeat", "auto", "none"]
|
||||
elseif prop == 'position'
|
||||
let values = ["static", "relative", "absolute", "fixed"]
|
||||
elseif prop == 'quotes'
|
||||
let values = ["none"]
|
||||
elseif prop == 'richness'
|
||||
return []
|
||||
elseif prop == 'speak-header'
|
||||
let values = ["once", "always"]
|
||||
elseif prop == 'speak-numeral'
|
||||
let values = ["digits", "continuous"]
|
||||
elseif prop == 'speak-punctuation'
|
||||
let values = ["code", "none"]
|
||||
elseif prop == 'speak'
|
||||
let values = ["normal", "none", "spell-out"]
|
||||
elseif prop == 'speech-rate'
|
||||
let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"]
|
||||
elseif prop == 'stress'
|
||||
return []
|
||||
elseif prop == 'table-layout'
|
||||
let values = ["auto", "fixed"]
|
||||
elseif prop == 'text-align'
|
||||
let values = ["left", "right", "center", "justify"]
|
||||
elseif prop == 'text-decoration'
|
||||
let values = ["none", "underline", "overline", "line-through", "blink"]
|
||||
elseif prop == 'text-indent'
|
||||
return []
|
||||
elseif prop == 'text-transform'
|
||||
let values = ["capitalize", "uppercase", "lowercase", "none"]
|
||||
elseif prop == 'top'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'unicode-bidi'
|
||||
let values = ["normal", "embed", "bidi-override"]
|
||||
elseif prop == 'vertical-align'
|
||||
let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"]
|
||||
elseif prop == 'visibility'
|
||||
let values = ["visible", "hidden", "collapse"]
|
||||
elseif prop == 'voice-family'
|
||||
return []
|
||||
elseif prop == 'volume'
|
||||
let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
|
||||
elseif prop == 'white-space'
|
||||
let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
|
||||
elseif prop == 'widows'
|
||||
return []
|
||||
elseif prop == 'word-spacing'
|
||||
let values = ["normal"]
|
||||
elseif prop == 'z-index'
|
||||
let values = ["auto"]
|
||||
if prop == 'azimuth'
|
||||
let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"]
|
||||
elseif prop == 'background-attachment'
|
||||
let values = ["scroll", "fixed"]
|
||||
elseif prop == 'background-color'
|
||||
let values = ["transparent", "rgb(", "#"]
|
||||
elseif prop == 'background-image'
|
||||
let values = ["url(", "none"]
|
||||
elseif prop == 'background-position'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\%([a-zA-Z]\+\)\?$'
|
||||
let values = ["top", "center", "bottom"]
|
||||
elseif vals =~ '^[a-zA-Z]\+\s\+\%([a-zA-Z]\+\)\?$'
|
||||
let values = ["left", "center", "right"]
|
||||
else
|
||||
" If no property match it is possible we are outside of {} and
|
||||
" trying to complete pseudo-(class|element)
|
||||
let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$'))
|
||||
if ",a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var," =~ ','.element.','
|
||||
let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"]
|
||||
return []
|
||||
endif
|
||||
elseif prop == 'background-repeat'
|
||||
let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"]
|
||||
elseif prop == 'background'
|
||||
let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"]
|
||||
elseif prop == 'border-collapse'
|
||||
let values = ["collapse", "separate"]
|
||||
elseif prop == 'border-color'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
elseif prop == 'border-spacing'
|
||||
return []
|
||||
elseif prop == 'border-style'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)$'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-color'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-style'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-width'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif prop == 'border-width'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif prop == 'border'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
|
||||
let values = ["rgb(", "#", "transparent"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop == 'bottom'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'caption-side'
|
||||
let values = ["top", "bottom"]
|
||||
elseif prop == 'clear'
|
||||
let values = ["none", "left", "right", "both"]
|
||||
elseif prop == 'clip'
|
||||
let values = ["auto", "rect("]
|
||||
elseif prop == 'color'
|
||||
let values = ["rgb(", "#"]
|
||||
elseif prop == 'content'
|
||||
let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"]
|
||||
elseif prop =~ 'counter-\%(increment\|reset\)$'
|
||||
let values = ["none"]
|
||||
elseif prop =~ '^\%(cue-after\|cue-before\|cue\)$'
|
||||
let values = ["url(", "none"]
|
||||
elseif prop == 'cursor'
|
||||
let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"]
|
||||
elseif prop == 'direction'
|
||||
let values = ["ltr", "rtl"]
|
||||
elseif prop == 'display'
|
||||
let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"]
|
||||
elseif prop == 'elevation'
|
||||
let values = ["below", "level", "above", "higher", "lower"]
|
||||
elseif prop == 'empty-cells'
|
||||
let values = ["show", "hide"]
|
||||
elseif prop == 'float'
|
||||
let values = ["left", "right", "none"]
|
||||
elseif prop == 'font-family'
|
||||
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
|
||||
elseif prop == 'font-size'
|
||||
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
|
||||
elseif prop == 'font-style'
|
||||
let values = ["normal", "italic", "oblique"]
|
||||
elseif prop == 'font-variant'
|
||||
let values = ["normal", "small-caps"]
|
||||
elseif prop == 'font-weight'
|
||||
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
|
||||
elseif prop == 'font'
|
||||
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
|
||||
elseif prop =~ '^\%(height\|width\)$'
|
||||
let values = ["auto"]
|
||||
elseif prop =~ '^\%(left\|rigth\)$'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'letter-spacing'
|
||||
let values = ["normal"]
|
||||
elseif prop == 'line-height'
|
||||
let values = ["normal"]
|
||||
elseif prop == 'list-style-image'
|
||||
let values = ["url(", "none"]
|
||||
elseif prop == 'list-style-position'
|
||||
let values = ["inside", "outside"]
|
||||
elseif prop == 'list-style-type'
|
||||
let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"]
|
||||
elseif prop == 'list-style'
|
||||
return []
|
||||
elseif prop == 'margin'
|
||||
let values = ["auto"]
|
||||
elseif prop =~ 'margin-\%(right\|left\|top\|bottom\)$'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'max-height'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'max-width'
|
||||
let values = ["none"]
|
||||
elseif prop == 'min-height'
|
||||
let values = ["none"]
|
||||
elseif prop == 'min-width'
|
||||
let values = ["none"]
|
||||
elseif prop == 'orphans'
|
||||
return []
|
||||
elseif prop == 'outline-color'
|
||||
let values = ["rgb(", "#"]
|
||||
elseif prop == 'outline-style'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif prop == 'outline-width'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
elseif prop == 'outline'
|
||||
let vals = matchstr(line, '.*:\s*\zs.*')
|
||||
if vals =~ '^\%([a-zA-Z0-9,()#]\+\)\?$'
|
||||
let values = ["rgb(", "#"]
|
||||
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\%([a-zA-Z]\+\)\?$'
|
||||
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
|
||||
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
|
||||
let values = ["thin", "thick", "medium"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
elseif prop == 'overflow'
|
||||
let values = ["visible", "hidden", "scroll", "auto"]
|
||||
elseif prop == 'padding'
|
||||
return []
|
||||
elseif prop =~ 'padding-\%(top\|right\|bottom\|left\)$'
|
||||
return []
|
||||
elseif prop =~ 'page-break-\%(after\|before\)$'
|
||||
let values = ["auto", "always", "avoid", "left", "right"]
|
||||
elseif prop == 'page-break-inside'
|
||||
let values = ["auto", "avoid"]
|
||||
elseif prop =~ 'pause-\%(after\|before\)$'
|
||||
return []
|
||||
elseif prop == 'pause'
|
||||
return []
|
||||
elseif prop == 'pitch-range'
|
||||
return []
|
||||
elseif prop == 'pitch'
|
||||
let values = ["x-low", "low", "medium", "high", "x-high"]
|
||||
elseif prop == 'play-during'
|
||||
let values = ["url(", "mix", "repeat", "auto", "none"]
|
||||
elseif prop == 'position'
|
||||
let values = ["static", "relative", "absolute", "fixed"]
|
||||
elseif prop == 'quotes'
|
||||
let values = ["none"]
|
||||
elseif prop == 'richness'
|
||||
return []
|
||||
elseif prop == 'speak-header'
|
||||
let values = ["once", "always"]
|
||||
elseif prop == 'speak-numeral'
|
||||
let values = ["digits", "continuous"]
|
||||
elseif prop == 'speak-punctuation'
|
||||
let values = ["code", "none"]
|
||||
elseif prop == 'speak'
|
||||
let values = ["normal", "none", "spell-out"]
|
||||
elseif prop == 'speech-rate'
|
||||
let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"]
|
||||
elseif prop == 'stress'
|
||||
return []
|
||||
elseif prop == 'table-layout'
|
||||
let values = ["auto", "fixed"]
|
||||
elseif prop == 'text-align'
|
||||
let values = ["left", "right", "center", "justify"]
|
||||
elseif prop == 'text-decoration'
|
||||
let values = ["none", "underline", "overline", "line-through", "blink"]
|
||||
elseif prop == 'text-indent'
|
||||
return []
|
||||
elseif prop == 'text-transform'
|
||||
let values = ["capitalize", "uppercase", "lowercase", "none"]
|
||||
elseif prop == 'top'
|
||||
let values = ["auto"]
|
||||
elseif prop == 'unicode-bidi'
|
||||
let values = ["normal", "embed", "bidi-override"]
|
||||
elseif prop == 'vertical-align'
|
||||
let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"]
|
||||
elseif prop == 'visibility'
|
||||
let values = ["visible", "hidden", "collapse"]
|
||||
elseif prop == 'voice-family'
|
||||
return []
|
||||
elseif prop == 'volume'
|
||||
let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
|
||||
elseif prop == 'white-space'
|
||||
let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
|
||||
elseif prop == 'widows'
|
||||
return []
|
||||
elseif prop == 'word-spacing'
|
||||
let values = ["normal"]
|
||||
elseif prop == 'z-index'
|
||||
let values = ["auto"]
|
||||
else
|
||||
" If no property match it is possible we are outside of {} and
|
||||
" trying to complete pseudo-(class|element)
|
||||
let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$'))
|
||||
if stridx(',a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var,', ','.element.',') > -1
|
||||
let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
|
||||
" Complete values
|
||||
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_value
|
||||
call add(res, m)
|
||||
elseif m =~? entered_value
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
|
||||
elseif borders[max(keys(borders))] == 'closebrace'
|
||||
|
||||
return []
|
||||
|
||||
elseif borders[max(keys(borders))] == 'exclam'
|
||||
|
||||
" Complete values
|
||||
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
|
||||
|
||||
let values = ["important"]
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_imp
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res
|
||||
|
||||
elseif borders[max(keys(borders))] == 'atrule'
|
||||
|
||||
let afterat = matchstr(line, '.*@\zs.*')
|
||||
|
||||
if afterat =~ '\s'
|
||||
|
||||
let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze')
|
||||
|
||||
if atrulename == 'media'
|
||||
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
|
||||
|
||||
let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
|
||||
|
||||
elseif atrulename == 'import'
|
||||
let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$')
|
||||
|
||||
if entered_atruleafter =~ "^[\"']"
|
||||
let filestart = matchstr(entered_atruleafter, '^.\zs.*')
|
||||
let files = split(glob(filestart.'*'), '\n')
|
||||
let values = map(copy(files), '"\"".v:val')
|
||||
|
||||
elseif entered_atruleafter =~ "^url("
|
||||
let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*")
|
||||
let files = split(glob(filestart.'*'), '\n')
|
||||
let values = map(copy(files), '"url(".v:val')
|
||||
|
||||
else
|
||||
return []
|
||||
let values = ['"', 'url(']
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
return []
|
||||
|
||||
endif
|
||||
|
||||
" Complete values
|
||||
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_value
|
||||
if m =~? '^'.entered_atruleafter
|
||||
call add(res, m)
|
||||
elseif m =~? entered_value
|
||||
elseif m =~? entered_atruleafter
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
|
||||
elseif borders[min(keys(borders))] == 'closebrace'
|
||||
endif
|
||||
|
||||
return []
|
||||
let values = ["charset", "page", "media", "import", "font-face"]
|
||||
|
||||
elseif borders[min(keys(borders))] == 'exclam'
|
||||
|
||||
" Complete values
|
||||
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
|
||||
|
||||
let values = ["important"]
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_imp
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res
|
||||
|
||||
elseif borders[min(keys(borders))] == 'atrule'
|
||||
|
||||
let afterat = matchstr(line, '.*@\zs.*')
|
||||
|
||||
if afterat =~ '\s'
|
||||
|
||||
let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze')
|
||||
|
||||
if atrulename == 'media'
|
||||
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
|
||||
|
||||
let atruleafterbase = matchstr(line, '.*@media\s\+\ze.*$')
|
||||
let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
|
||||
|
||||
elseif atrulename == 'import'
|
||||
let atruleafterbase = matchstr(line, '.*@import\s\+\ze.*$')
|
||||
let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$')
|
||||
|
||||
if entered_atruleafter =~ "^[\"']"
|
||||
let filestart = matchstr(entered_atruleafter, '^.\zs.*')
|
||||
let files = split(glob(filestart.'*'), '\n')
|
||||
let values = map(copy(files), '"\"".v:val')
|
||||
|
||||
elseif entered_atruleafter =~ "^url("
|
||||
let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*")
|
||||
let files = split(glob(filestart.'*'), '\n')
|
||||
let values = map(copy(files), '"url(".v:val')
|
||||
|
||||
else
|
||||
let values = ['"', 'url(']
|
||||
|
||||
endif
|
||||
|
||||
else
|
||||
return []
|
||||
|
||||
endif
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_atruleafter
|
||||
call add(res, m)
|
||||
elseif m =~? entered_atruleafter
|
||||
call add(res2, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res + res2
|
||||
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_atrule
|
||||
call add(res, m .' ')
|
||||
elseif m =~? entered_atrule
|
||||
call add(res2, m .' ')
|
||||
endif
|
||||
endfor
|
||||
|
||||
let values = ["charset", "page", "media", "import", "font-face"]
|
||||
return res + res2
|
||||
|
||||
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
|
||||
endif
|
||||
|
||||
for m in values
|
||||
if m =~? '^'.entered_atrule
|
||||
call add(res, m .' ')
|
||||
elseif m =~? entered_atrule
|
||||
call add(res2, m .' ')
|
||||
endif
|
||||
endfor
|
||||
return []
|
||||
|
||||
return res + res2
|
||||
|
||||
endif
|
||||
|
||||
return []
|
||||
|
||||
endif
|
||||
endfunction
|
||||
|
||||
75
runtime/autoload/decada.vim
Normal file
75
runtime/autoload/decada.vim
Normal file
@@ -0,0 +1,75 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/Dec Ada compiler file
|
||||
" Language: Ada (Dec Ada)
|
||||
" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
" Version: 4.6
|
||||
" $Revision: 887 $
|
||||
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
|
||||
" History: 21.07.2006 MK New Dec Ada
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 05.11.2006 MK Bram suggested to save on spaces
|
||||
" Help Page: compiler-decada
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
function decada#Unit_Name () dict " {{{1
|
||||
" Convert filename into acs unit:
|
||||
" 1: remove the file extenstion.
|
||||
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
|
||||
" 3: remove a trailing '_' (wich denotes a specification)
|
||||
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
|
||||
endfunction decada#Unit_Name " }}}1
|
||||
|
||||
function decada#Make () dict " {{{1
|
||||
let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
|
||||
let &errorformat = g:self.Error_Format
|
||||
let &makeprg = l:make_prg
|
||||
wall
|
||||
make
|
||||
copen
|
||||
set wrap
|
||||
wincmd W
|
||||
endfunction decada#Build " }}}1
|
||||
|
||||
function decada#Set_Session (...) dict " {{{1
|
||||
if a:0 > 0
|
||||
call ada#Switch_Session (a:1)
|
||||
elseif argc() == 0 && strlen (v:servername) > 0
|
||||
call ada#Switch_Session (
|
||||
\ expand('~')[0:-2] . ".vimfiles.session]decada_" .
|
||||
\ v:servername . ".vim")
|
||||
endif
|
||||
return
|
||||
endfunction decada#Set_Session " }}}1
|
||||
|
||||
function decada#New () " }}}1
|
||||
let Retval = {
|
||||
\ 'Make' : function ('decada#Make'),
|
||||
\ 'Unit_Name' : function ('decada#Unit_Name'),
|
||||
\ 'Set_Session' : function ('decada#Set_Session'),
|
||||
\ 'Project_Dir' : '',
|
||||
\ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
|
||||
\ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
|
||||
\ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
|
||||
|
||||
return Retval
|
||||
endfunction decada#New " }}}1
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
662
runtime/autoload/getscript.vim
Normal file
662
runtime/autoload/getscript.vim
Normal file
@@ -0,0 +1,662 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" getscript.vim
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Jan 17, 2012
|
||||
" Version: 34
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
"
|
||||
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
|
||||
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
" if you're sourcing this file, surely you can't be
|
||||
" expecting vim to be in its vi-compatible mode!
|
||||
if exists("g:loaded_getscript")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscript= "v34"
|
||||
if &cp
|
||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
finish
|
||||
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
|
||||
set cpo&vim
|
||||
"DechoTabOn
|
||||
|
||||
" ---------------------------
|
||||
" 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
|
||||
|
||||
" wget vs curl {{{2
|
||||
if !exists("g:GetLatestVimScripts_wget")
|
||||
if executable("wget")
|
||||
let g:GetLatestVimScripts_wget= "wget"
|
||||
elseif executable("curl")
|
||||
let g:GetLatestVimScripts_wget= "curl"
|
||||
else
|
||||
let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"'
|
||||
let g:GetLatestVimScripts_options = ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" options that wget and curl require:
|
||||
if !exists("g:GetLatestVimScripts_options")
|
||||
if g:GetLatestVimScripts_wget == "wget"
|
||||
let g:GetLatestVimScripts_options= "-q -O"
|
||||
elseif g:GetLatestVimScripts_wget == "curl"
|
||||
let g:GetLatestVimScripts_options= "-s -O"
|
||||
else
|
||||
let g:GetLatestVimScripts_options= ""
|
||||
endif
|
||||
endif
|
||||
|
||||
" by default, allow autoinstall lines to work
|
||||
if !exists("g:GetLatestVimScripts_allowautoinstall")
|
||||
let g:GetLatestVimScripts_allowautoinstall= 1
|
||||
endif
|
||||
|
||||
"" For debugging:
|
||||
"let g:GetLatestVimScripts_wget = "echo"
|
||||
"let g:GetLatestVimScripts_options = "options"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Check If AutoInstall Capable: {{{1
|
||||
let s:autoinstall= ""
|
||||
if g:GetLatestVimScripts_allowautoinstall
|
||||
|
||||
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
|
||||
" windows (but not cygwin/bash)
|
||||
let s:dotvim= "vimfiles"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "ren"
|
||||
endif
|
||||
|
||||
else
|
||||
" unix
|
||||
let s:dotvim= ".vim"
|
||||
if !exists("g:GetLatestVimScripts_mv")
|
||||
let g:GetLatestVimScripts_mv= "mv"
|
||||
endif
|
||||
endif
|
||||
|
||||
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
|
||||
endif
|
||||
" call Decho("s:autoinstall<".s:autoinstall.">")
|
||||
"else "Decho
|
||||
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
|
||||
endif
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Public Interface: {{{1
|
||||
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
|
||||
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
|
||||
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" GetLatestVimScripts: this function gets the latest versions of {{{1
|
||||
" scripts based on the list in
|
||||
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
|
||||
fun! getscript#GetLatestVimScripts()
|
||||
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
|
||||
|
||||
" insure that wget is executable
|
||||
if executable(g:GetLatestVimScripts_wget) != 1
|
||||
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
|
||||
" call Dret("GetLatestVimScripts : wget not executable/availble")
|
||||
return
|
||||
endif
|
||||
|
||||
" insure that fnameescape() is available
|
||||
if !exists("*fnameescape")
|
||||
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
|
||||
return
|
||||
endif
|
||||
|
||||
" Find the .../GetLatest subdirectory under the runtimepath
|
||||
for datadir in split(&rtp,',') + ['']
|
||||
if isdirectory(datadir."/GetLatest")
|
||||
" call Decho("found directory<".datadir.">")
|
||||
let datadir= datadir . "/GetLatest"
|
||||
break
|
||||
endif
|
||||
if filereadable(datadir."GetLatestVimScripts.dat")
|
||||
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Sanity checks: readability and writability
|
||||
if datadir == ""
|
||||
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
|
||||
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
|
||||
return
|
||||
endif
|
||||
if filewritable(datadir) != 2
|
||||
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
|
||||
return
|
||||
endif
|
||||
let datafile= datadir."/GetLatestVimScripts.dat"
|
||||
if !filereadable(datafile)
|
||||
echoerr "Your data file<".datafile."> isn't readable"
|
||||
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
|
||||
return
|
||||
endif
|
||||
if !filewritable(datafile)
|
||||
echoerr "Your data file<".datafile."> isn't writable"
|
||||
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
|
||||
return
|
||||
endif
|
||||
" --------------------
|
||||
" Passed sanity checks
|
||||
" --------------------
|
||||
|
||||
" call Decho("datadir <".datadir.">")
|
||||
" call Decho("datafile <".datafile.">")
|
||||
|
||||
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
|
||||
let eikeep = &ei
|
||||
let hlskeep = &hls
|
||||
let acdkeep = &acd
|
||||
set ei=all hls&vim noacd
|
||||
|
||||
" Edit the datafile (ie. GetLatestVimScripts.dat):
|
||||
" 1. record current directory (origdir),
|
||||
" 2. change directory to datadir,
|
||||
" 3. split window
|
||||
" 4. edit datafile
|
||||
let origdir= getcwd()
|
||||
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
|
||||
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
|
||||
split
|
||||
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
|
||||
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
|
||||
res 1000
|
||||
let s:downloads = 0
|
||||
let s:downerrors= 0
|
||||
|
||||
" Check on dependencies mentioned in plugins
|
||||
" call Decho(" ")
|
||||
" call Decho("searching plugins for GetLatestVimScripts dependencies")
|
||||
let lastline = line("$")
|
||||
" call Decho("lastline#".lastline)
|
||||
let firstdir = substitute(&rtp,',.*$','','')
|
||||
let plugins = split(globpath(firstdir,"plugin/*.vim"),'\n')
|
||||
let plugins = plugins + split(globpath(firstdir,"AsNeeded/*.vim"),'\n')
|
||||
let foundscript = 0
|
||||
|
||||
" 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
|
||||
" call Decho(" ")
|
||||
" call Decho("plugin<".plugin.">")
|
||||
|
||||
" read plugin in
|
||||
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
|
||||
$
|
||||
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
|
||||
" 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
|
||||
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
|
||||
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
|
||||
let llp1 = lastline+1
|
||||
" call Decho("..depscript<".depscript.">")
|
||||
|
||||
" found a "GetLatestVimScripts: # #" line in the script;
|
||||
" check if its already in the datafile by searching backwards from llp1,
|
||||
" the (prior to reading in the plugin script) last line plus one of the GetLatestVimScripts.dat file,
|
||||
" for the script-id with no wrapping allowed.
|
||||
let curline = line(".")
|
||||
let noai_script = substitute(depscript,'\s*:AutoInstall:\s*','','e')
|
||||
exe llp1
|
||||
let srchline = search('^\s*'.depscriptid.'\s\+\d\+\s\+.*$','bW')
|
||||
if srchline == 0
|
||||
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
|
||||
let srchline= search('\<'.noai_script.'\>','bW')
|
||||
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
|
||||
|
||||
" llp1: last line plus one
|
||||
let llp1= lastline + 1
|
||||
" call Decho(".deleting lines: ".llp1.",$d")
|
||||
exe "silent! ".llp1.",$d"
|
||||
endfor
|
||||
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
|
||||
" call Decho(" ")
|
||||
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
|
||||
|
||||
if foundscript == 0
|
||||
setlocal nomod
|
||||
endif
|
||||
|
||||
" --------------------------------------------------------------------
|
||||
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
|
||||
" --------------------------------------------------------------------
|
||||
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
|
||||
setlocal lz
|
||||
1
|
||||
" /^-----/,$g/^\s*\d/call Decho(getline("."))
|
||||
1
|
||||
/^-----/,$g/^\s*\d/call s:GetOneScript()
|
||||
" call Decho("--- end out-of-date checking --- ")
|
||||
|
||||
" Final report (an echomsg)
|
||||
try
|
||||
silent! ?^-------?
|
||||
catch /^Vim\%((\a\+)\)\=:E114/
|
||||
" call Dret("GetLatestVimScripts : nothing done!")
|
||||
return
|
||||
endtry
|
||||
exe "norm! kz\<CR>"
|
||||
redraw!
|
||||
let s:msg = ""
|
||||
if s:downloads == 1
|
||||
let s:msg = "Downloaded one updated script to <".datadir.">"
|
||||
elseif s:downloads == 2
|
||||
let s:msg= "Downloaded two updated scripts to <".datadir.">"
|
||||
elseif s:downloads > 1
|
||||
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
|
||||
else
|
||||
let s:msg= "Everything was already current"
|
||||
endif
|
||||
if s:downerrors > 0
|
||||
let s:msg= s:msg." (".s:downerrors." downloading errors)"
|
||||
endif
|
||||
echomsg s:msg
|
||||
" save the file
|
||||
if &mod
|
||||
silent! w!
|
||||
endif
|
||||
q
|
||||
|
||||
" restore events and current directory
|
||||
exe "cd ".fnameescape(substitute(origdir,'\','/','ge'))
|
||||
let &ei = eikeep
|
||||
let &hls = hlskeep
|
||||
let &acd = acdkeep
|
||||
setlocal nolz
|
||||
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
|
||||
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
|
||||
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
|
||||
" --------------------------------------------------------------------------
|
||||
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
|
||||
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 = fnameescape(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 "sil !bunzip2 ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.bz2$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after bunzip2")
|
||||
elseif sname =~ '\.gz$'
|
||||
" call Decho("decompress: attempt to gunzip ".sname)
|
||||
exe "sil !gunzip ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.gz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after gunzip")
|
||||
elseif sname =~ '\.xz$'
|
||||
" call Decho("decompress: attempt to unxz ".sname)
|
||||
exe "sil !unxz ".shellescape(sname)
|
||||
let sname= substitute(sname,'\.xz$','','')
|
||||
" call Decho("decompress: new sname<".sname."> after unxz")
|
||||
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 =~ '\.tgz$'
|
||||
" call Decho("dearchive: attempt to untar+gunzip ".sname)
|
||||
exe "silent !tar -zxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.taz$'
|
||||
" call Decho("dearchive: attempt to untar+uncompress ".sname)
|
||||
exe "silent !tar -Zxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.tbz$'
|
||||
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
|
||||
exe "silent !tar -jxvf ".shellescape(sname)
|
||||
elseif sname =~ '\.txz$'
|
||||
" call Decho("dearchive: attempt to untar+xz ".sname)
|
||||
exe "silent !tar -Jxvf ".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
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: ts=8 sts=2 fdm=marker nowrap
|
||||
147
runtime/autoload/gnat.vim
Normal file
147
runtime/autoload/gnat.vim
Normal file
@@ -0,0 +1,147 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/GNAT compiler file
|
||||
" Language: Ada (GNAT)
|
||||
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
|
||||
" Ned Okie <nokie@radford.edu>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
" Version: 4.6
|
||||
" $Revision: 887 $
|
||||
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 05.08.2006 MK Add session support
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 05.11.2006 MK Bram suggested not to use include protection for
|
||||
" autoload
|
||||
" 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
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if version < 700
|
||||
finish
|
||||
endif
|
||||
|
||||
function gnat#Make () dict " {{{1
|
||||
let &l:makeprg = self.Get_Command('Make')
|
||||
let &l:errorformat = self.Error_Format
|
||||
wall
|
||||
make
|
||||
copen
|
||||
set wrap
|
||||
wincmd W
|
||||
endfunction gnat#Make " }}}1
|
||||
|
||||
function gnat#Pretty () dict " {{{1
|
||||
execute "!" . self.Get_Command('Pretty')
|
||||
endfunction gnat#Make " }}}1
|
||||
|
||||
function gnat#Find () dict " {{{1
|
||||
execute "!" . self.Get_Command('Find')
|
||||
endfunction gnat#Find " }}}1
|
||||
|
||||
function gnat#Tags () dict " {{{1
|
||||
execute "!" . self.Get_Command('Tags')
|
||||
edit tags
|
||||
call gnat#Insert_Tags_Header ()
|
||||
update
|
||||
quit
|
||||
endfunction gnat#Tags " }}}1
|
||||
|
||||
function gnat#Set_Project_File (...) dict " {{{1
|
||||
if a:0 > 0
|
||||
let self.Project_File = a:1
|
||||
|
||||
if ! filereadable (self.Project_File)
|
||||
let self.Project_File = findfile (
|
||||
\ fnamemodify (self.Project_File, ':r'),
|
||||
\ $ADA_PROJECT_PATH,
|
||||
\ 1)
|
||||
endif
|
||||
elseif strlen (self.Project_File) > 0
|
||||
let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File)
|
||||
elseif expand ("%:e") == 'gpr'
|
||||
let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e"))
|
||||
else
|
||||
let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr')
|
||||
endif
|
||||
|
||||
if strlen (v:this_session) > 0
|
||||
execute 'mksession! ' . v:this_session
|
||||
endif
|
||||
|
||||
"if strlen (self.Project_File) > 0
|
||||
"if has("vms")
|
||||
"call ada#Switch_Session (
|
||||
"\ expand('~')[0:-2] . ".vimfiles.session]gnat_" .
|
||||
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
|
||||
"else
|
||||
"call ada#Switch_Session (
|
||||
"\ expand('~') . "/vimfiles/session/gnat_" .
|
||||
"\ fnamemodify (self.Project_File, ":t:r") . ".vim")
|
||||
"endif
|
||||
"else
|
||||
"call ada#Switch_Session ('')
|
||||
"endif
|
||||
|
||||
return
|
||||
endfunction gnat#Set_Project_File " }}}1
|
||||
|
||||
function gnat#Get_Command (Command) dict " {{{1
|
||||
let l:Command = eval ('self.' . a:Command . '_Command')
|
||||
return eval (l:Command)
|
||||
endfunction gnat#Get_Command " }}}1
|
||||
|
||||
function gnat#Set_Session (...) dict " {{{1
|
||||
if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr'
|
||||
call self.Set_Project_File (argv(0))
|
||||
elseif strlen (v:servername) > 0
|
||||
call self.Set_Project_File (v:servername . '.gpr')
|
||||
endif
|
||||
endfunction gnat#Set_Session " }}}1
|
||||
|
||||
function gnat#New () " {{{1
|
||||
let l:Retval = {
|
||||
\ 'Make' : function ('gnat#Make'),
|
||||
\ 'Pretty' : function ('gnat#Pretty'),
|
||||
\ 'Find' : function ('gnat#Find'),
|
||||
\ 'Tags' : function ('gnat#Tags'),
|
||||
\ 'Set_Project_File' : function ('gnat#Set_Project_File'),
|
||||
\ 'Set_Session' : function ('gnat#Set_Session'),
|
||||
\ 'Get_Command' : function ('gnat#Get_Command'),
|
||||
\ 'Project_File' : '',
|
||||
\ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "',
|
||||
\ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "',
|
||||
\ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "',
|
||||
\ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"',
|
||||
\ 'Error_Format' : '%f:%l:%c: %trror: %m,' .
|
||||
\ '%f:%l:%c: %tarning: %m,' .
|
||||
\ '%f:%l:%c: (%ttyle) %m'}
|
||||
|
||||
return l:Retval
|
||||
endfunction gnat#New " }}}1
|
||||
|
||||
function gnat#Insert_Tags_Header () " {{{1
|
||||
1insert
|
||||
!_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/
|
||||
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
|
||||
!_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/
|
||||
!_TAG_PROGRAM_NAME gnatxref //
|
||||
!_TAG_PROGRAM_URL http://www.adacore.com /official site/
|
||||
!_TAG_PROGRAM_VERSION 5.05w //
|
||||
.
|
||||
return
|
||||
endfunction gnat#Insert_Tags_Header " }}}1
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim autoload file for editing compressed files.
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Oct 03
|
||||
" Last Change: 2008 Jul 04
|
||||
|
||||
" These functions are used by the gzip plugin.
|
||||
|
||||
@@ -63,57 +63,83 @@ fun gzip#read(cmd)
|
||||
" set 'modifiable'
|
||||
let ma_save = &ma
|
||||
setlocal ma
|
||||
" Reset 'foldenable', otherwise line numbers get adjusted.
|
||||
if has("folding")
|
||||
let fen_save = &fen
|
||||
setlocal nofen
|
||||
endif
|
||||
|
||||
" when filtering the whole buffer, it will become empty
|
||||
let empty = line("'[") == 1 && line("']") == line("$")
|
||||
let tmp = tempname()
|
||||
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"
|
||||
execute "silent '[,']w " . escape(tmpe, ' ')
|
||||
execute "silent '[,']w " . tmpe_esc
|
||||
" uncompress the temp file: call system("gzip -dn tmp.gz")
|
||||
call system(a:cmd . " " . s:escape(tmpe))
|
||||
if !filereadable(tmp)
|
||||
" uncompress didn't work! Keep the compressed file then.
|
||||
echoerr "Error: Could not read uncompressed file"
|
||||
return
|
||||
endif
|
||||
" delete the compressed lines; remember the line number
|
||||
let l = line("'[") - 1
|
||||
if exists(":lockmarks")
|
||||
lockmarks '[,']d _
|
||||
let ok = 0
|
||||
else
|
||||
'[,']d _
|
||||
endif
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp
|
||||
let ok = 1
|
||||
" delete the compressed lines; remember the line number
|
||||
let l = line("'[") - 1
|
||||
if exists(":lockmarks")
|
||||
lockmarks '[,']d _
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp
|
||||
'[,']d _
|
||||
endif
|
||||
else
|
||||
execute "silent " . l . "r " . tmp
|
||||
" read in the uncompressed lines "'[-1r tmp"
|
||||
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
|
||||
setlocal nobin
|
||||
if exists(":lockmarks")
|
||||
if empty
|
||||
execute "silent lockmarks " . l . "r ++edit " . tmp_esc
|
||||
else
|
||||
execute "silent lockmarks " . l . "r " . tmp_esc
|
||||
endif
|
||||
else
|
||||
execute "silent " . l . "r " . tmp_esc
|
||||
endif
|
||||
|
||||
" if buffer became empty, delete trailing blank line
|
||||
if empty
|
||||
silent $delete _
|
||||
1
|
||||
endif
|
||||
" delete the temp file and the used buffers
|
||||
call delete(tmp)
|
||||
silent! exe "bwipe " . tmp_esc
|
||||
silent! exe "bwipe " . tmpe_esc
|
||||
endif
|
||||
|
||||
" if buffer became empty, delete trailing blank line
|
||||
if empty
|
||||
silent $delete _
|
||||
1
|
||||
endif
|
||||
" delete the temp file and the used buffers
|
||||
call delete(tmp)
|
||||
silent! exe "bwipe " . tmp
|
||||
silent! exe "bwipe " . tmpe
|
||||
" Restore saved option values.
|
||||
let &pm = pm_save
|
||||
let &cpo = cpo_save
|
||||
let &l:ma = ma_save
|
||||
if has("folding")
|
||||
let &l:fen = fen_save
|
||||
endif
|
||||
|
||||
" When uncompressed the whole buffer, do autocommands
|
||||
if empty
|
||||
if &verbose >= 8
|
||||
execute "doau BufReadPost " . expand("%:r")
|
||||
if ok && empty
|
||||
if exists('*fnameescape')
|
||||
let fname = fnameescape(expand("%:r"))
|
||||
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
|
||||
endfun
|
||||
@@ -127,9 +153,9 @@ fun gzip#write(cmd)
|
||||
let nmt = s:tempname(nm)
|
||||
if rename(nm, nmt) == 0
|
||||
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
|
||||
call system(a:cmd . " " . s:escape(nmt))
|
||||
call system(a:cmd . " -- " . s:escape(nmt))
|
||||
endif
|
||||
call rename(nmt . "." . expand("<afile>:e"), nm)
|
||||
endif
|
||||
@@ -154,10 +180,10 @@ fun gzip#appre(cmd)
|
||||
if rename(nm, nmte) == 0
|
||||
if &patchmode != "" && getfsize(nm . &patchmode) == -1
|
||||
" 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)
|
||||
else
|
||||
call system(a:cmd . " " . s:escape(nmte))
|
||||
call system(a:cmd . " -- " . s:escape(nmte))
|
||||
endif
|
||||
call rename(nmt, nm)
|
||||
endif
|
||||
@@ -177,7 +203,7 @@ endfun
|
||||
|
||||
fun s:escape(name)
|
||||
" shellescape() was added by patch 7.0.111
|
||||
if v:version > 700 || (v:version == 700 && has('patch111'))
|
||||
if exists("*shellescape")
|
||||
return shellescape(a:name)
|
||||
endif
|
||||
return "'" . a:name . "'"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: HTML and XHTML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2011 Apr 28
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
@@ -84,7 +84,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let context_line = getline(curline-i)
|
||||
if context_line =~ '<[^>]*$'
|
||||
" Yep, this is this line
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$' || i == curline
|
||||
@@ -285,6 +285,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let cssfiles = styletable + secimportfiles
|
||||
let classes = []
|
||||
for file in cssfiles
|
||||
let classlines = []
|
||||
if filereadable(file)
|
||||
let stylesheet = readfile(file)
|
||||
let stylefile = join(stylesheet, ' ')
|
||||
@@ -448,6 +449,15 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
let attrname = matchstr(attr, '.*\ze\s*=')
|
||||
let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
|
||||
let values = []
|
||||
" Load data {{{
|
||||
if !exists("b:html_doctype")
|
||||
call htmlcomplete#CheckDoctype()
|
||||
endif
|
||||
if !exists("b:html_omni")
|
||||
"runtime! autoload/xml/xhtml10s.vim
|
||||
call htmlcomplete#LoadData()
|
||||
endif
|
||||
" }}}
|
||||
if attrname == 'href'
|
||||
" Now we are looking for local anchors defined by name or id
|
||||
if entered_value =~ '^#'
|
||||
@@ -604,21 +614,20 @@ function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if exists("uppercase_tag") && uppercase_tag == 1
|
||||
let context = tolower(context)
|
||||
endif
|
||||
" Handle XML keywords: DOCTYPE and CDATA.
|
||||
" Handle XML keywords: DOCTYPE
|
||||
if opentag == ''
|
||||
let tags += [
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">',
|
||||
\ '!CDATA'
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
||||
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">'
|
||||
\ ]
|
||||
endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
" netrwFileHandlers: contains various extension-based file handlers for
|
||||
" netrw's browsers' x command ("eXecute launcher")
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 01, 2006
|
||||
" Version: 8
|
||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
||||
" Date: Mar 14, 2012
|
||||
" Version: 11a
|
||||
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
@@ -20,20 +20,51 @@
|
||||
if exists("g:loaded_netrwFileHandlers") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwFileHandlers= "v11a"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
|
||||
echohl Normal
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
let g:loaded_netrwFileHandlers= "v8"
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" netrwFileHandlers#Invoke: {{{1
|
||||
fun! netrwFileHandlers#Invoke(exten,fname)
|
||||
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
|
||||
|
||||
if a:exten != "" && exists("*s:NFH_".a:exten)
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.a:fname.'")')
|
||||
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
|
||||
let fname= a:fname
|
||||
" list of supported special characters. Consider rcs,v --- that can be
|
||||
" supported with a NFH_rcsCOMMAv() handler
|
||||
if a:fname =~ '[@:,$!=\-+%?;~]'
|
||||
let specials= {
|
||||
\ '@' : 'AT',
|
||||
\ ':' : 'COLON',
|
||||
\ ',' : 'COMMA',
|
||||
\ '$' : 'DOLLAR',
|
||||
\ '!' : 'EXCLAMATION',
|
||||
\ '=' : 'EQUAL',
|
||||
\ '-' : 'MINUS',
|
||||
\ '+' : 'PLUS',
|
||||
\ '%' : 'PERCENT',
|
||||
\ '?' : 'QUESTION',
|
||||
\ ';' : 'SEMICOLON',
|
||||
\ '~' : 'TILDE'}
|
||||
let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
|
||||
" call Decho('fname<'.fname.'> done with dictionary')
|
||||
endif
|
||||
|
||||
|
||||
if a:exten != "" && exists("*NFH_".a:exten)
|
||||
" support user NFH_*() functions
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
|
||||
exe "let ret= NFH_".a:exten.'("'.fname.'")'
|
||||
elseif a:exten != "" && exists("*s:NFH_".a:exten)
|
||||
" use builtin-NFH_*() functions
|
||||
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
|
||||
exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
|
||||
endif
|
||||
|
||||
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
|
||||
return 0
|
||||
endfun
|
||||
@@ -48,10 +79,10 @@ fun! s:NFH_html(pagefile)
|
||||
|
||||
if executable("mozilla")
|
||||
" call Decho("executing !mozilla ".page)
|
||||
exe "!mozilla \"".page.'"'
|
||||
exe "!mozilla ".shellescape(page,1)
|
||||
elseif executable("netscape")
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape \"".page.'"'
|
||||
exe "!netscape ".shellescape(page,1)
|
||||
else
|
||||
" call Dret("s:NFH_html 0")
|
||||
return 0
|
||||
@@ -71,10 +102,10 @@ fun! s:NFH_htm(pagefile)
|
||||
|
||||
if executable("mozilla")
|
||||
" call Decho("executing !mozilla ".page)
|
||||
exe "!mozilla \"".page.'"'
|
||||
exe "!mozilla ".shellescape(page,1)
|
||||
elseif executable("netscape")
|
||||
" call Decho("executing !netscape ".page)
|
||||
exe "!netscape \"".page.'"'
|
||||
exe "!netscape ".shellescape(page,1)
|
||||
else
|
||||
" call Dret("s:NFH_htm 0")
|
||||
return 0
|
||||
@@ -90,10 +121,10 @@ fun! s:NFH_jpg(jpgfile)
|
||||
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:jpgfile
|
||||
exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
|
||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
|
||||
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_jpg 0")
|
||||
return 0
|
||||
@@ -109,9 +140,9 @@ fun! s:NFH_gif(giffile)
|
||||
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:giffile
|
||||
exe "silent! !gimp -s ".shellescape(a:giffile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
|
||||
else
|
||||
" call Dret("s:NFH_gif 0")
|
||||
return 0
|
||||
@@ -127,9 +158,9 @@ fun! s:NFH_png(pngfile)
|
||||
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:pngfile
|
||||
exe "silent! !gimp -s ".shellescape(a:pngfile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_png 0")
|
||||
return 0
|
||||
@@ -145,9 +176,9 @@ fun! s:NFH_pnm(pnmfile)
|
||||
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
|
||||
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:pnmfile
|
||||
exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_pnm 0")
|
||||
return 0
|
||||
@@ -165,7 +196,7 @@ fun! s:NFH_bmp(bmpfile)
|
||||
if executable("gimp")
|
||||
exe "silent! !gimp -s ".a:bmpfile
|
||||
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
|
||||
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
|
||||
else
|
||||
" call Dret("s:NFH_bmp 0")
|
||||
return 0
|
||||
@@ -180,7 +211,9 @@ endfun
|
||||
fun! s:NFH_pdf(pdf)
|
||||
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
|
||||
if executable("gs")
|
||||
exe 'silent! !gs "'.a:pdf.'"'
|
||||
exe 'silent! !gs '.shellescape(a:pdf,1)
|
||||
elseif executable("pdftotext")
|
||||
exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
|
||||
else
|
||||
" call Dret("s:NFH_pdf 0")
|
||||
return 0
|
||||
@@ -196,7 +229,7 @@ fun! s:NFH_doc(doc)
|
||||
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter "'.a:doc.'"'
|
||||
exe 'silent! !oowriter '.shellescape(a:doc,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_doc 0")
|
||||
@@ -213,7 +246,7 @@ fun! s:NFH_sxw(sxw)
|
||||
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
|
||||
|
||||
if executable("oowriter")
|
||||
exe 'silent! !oowriter "'.a:sxw.'"'
|
||||
exe 'silent! !oowriter '.shellescape(a:sxw,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_sxw 0")
|
||||
@@ -230,7 +263,7 @@ fun! s:NFH_xls(xls)
|
||||
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
|
||||
|
||||
if executable("oocalc")
|
||||
exe 'silent! !oocalc "'.a:xls.'"'
|
||||
exe 'silent! !oocalc '.shellescape(a:xls,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_xls 0")
|
||||
@@ -247,15 +280,15 @@ fun! s:NFH_ps(ps)
|
||||
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
|
||||
if executable("gs")
|
||||
" call Decho("exe silent! !gs ".a:ps)
|
||||
exe "silent! !gs ".a:ps
|
||||
exe "silent! !gs ".shellescape(a:ps,1)
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
" call Decho("exe silent! !ghostscript ".a:ps)
|
||||
exe "silent! !ghostscript ".a:ps
|
||||
exe "silent! !ghostscript ".shellescape(a:ps,1)
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
" call Decho("exe silent! !gswin32 \"".a:ps.'"')
|
||||
exe "silent! !gswin32 \"".a:ps.'"'
|
||||
" call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
|
||||
exe "silent! !gswin32 ".shellescape(a:ps,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_ps 0")
|
||||
@@ -271,16 +304,16 @@ endfun
|
||||
fun! s:NFH_eps(eps)
|
||||
" call Dfunc("s:NFH_eps()")
|
||||
if executable("gs")
|
||||
exe "silent! !gs ".a:eps
|
||||
exe "silent! !gs ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".a:eps
|
||||
exe "silent! !ghostscript ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
elseif executable("ghostscript")
|
||||
exe "silent! !ghostscript ".a:eps
|
||||
exe "silent! !ghostscript ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
elseif executable("gswin32")
|
||||
exe "silent! !gswin32 \"".a:eps.'"'
|
||||
exe "silent! !gswin32 ".shellescape(a:eps,1)
|
||||
redraw!
|
||||
else
|
||||
" call Dret("s:NFH_eps 0")
|
||||
@@ -323,6 +356,7 @@ fun! s:NFH_obj(obj)
|
||||
endfun
|
||||
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: ts=4 fdm=marker
|
||||
" vim: fdm=marker
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" netrwSettings.vim: makes netrw settings simpler
|
||||
" Date: Mar 22, 2006
|
||||
" Date: Sep 03, 2008
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Version: 6
|
||||
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
|
||||
" Version: 13
|
||||
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
@@ -19,13 +19,19 @@
|
||||
if exists("g:loaded_netrwSettings") || &cp
|
||||
finish
|
||||
endif
|
||||
let g:loaded_netrwSettings = "v6"
|
||||
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
|
||||
fun! netrwSettings#NetrwSettings()
|
||||
" this call is here largely just to insure that netrw has been loaded
|
||||
call netrw#NetSavePosn()
|
||||
call netrw#NetrwSavePosn()
|
||||
if !exists("g:loaded_netrw")
|
||||
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
|
||||
return
|
||||
@@ -39,8 +45,8 @@ fun! netrwSettings#NetrwSettings()
|
||||
|
||||
" these variables have the following default effects when they don't
|
||||
" exist (ie. have not been set by the user in his/her .vimrc)
|
||||
if !exists("g:netrw_longlist")
|
||||
let g:netrw_longlist= 0
|
||||
if !exists("g:netrw_liststyle")
|
||||
let g:netrw_liststyle= 0
|
||||
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
|
||||
endif
|
||||
if !exists("g:netrw_silent")
|
||||
@@ -81,9 +87,13 @@ fun! netrwSettings#NetrwSettings()
|
||||
put = 'let g:netrw_ftp = '.g:netrw_ftp
|
||||
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
|
||||
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
|
||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
|
||||
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
|
||||
let s:netrw_xfer_stop= line(".")
|
||||
put =''
|
||||
put ='+ Netrw Messages'
|
||||
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
|
||||
|
||||
put = ''
|
||||
put ='+ Netrw Browser Control'
|
||||
@@ -95,33 +105,57 @@ fun! netrwSettings#NetrwSettings()
|
||||
else
|
||||
put = 'let g:netrw_browsex_viewer = (not defined)'
|
||||
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_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_list_cmd = '.g:netrw_ftp_list_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
|
||||
let globescline= line("$")
|
||||
put ='let g:netrw_glob_escape...'
|
||||
put = 'let g:netrw_hide = '.g:netrw_hide
|
||||
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
|
||||
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
|
||||
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
|
||||
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_longlist = '.g:netrw_longlist
|
||||
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
|
||||
put = 'let g:netrw_menu = '.g:netrw_menu
|
||||
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_retmap = '.g:netrw_retmap
|
||||
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_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_silent = '.g:netrw_silent
|
||||
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_options = '.g:netrw_sort_options
|
||||
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_scpport = '.g:netrw_scpport
|
||||
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
|
||||
put = 'let g:netrw_sshport = '.g:netrw_sshport
|
||||
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_xstrlen = '.g:netrw_xstrlen
|
||||
put = 'let g:netrw_winsize = '.g:netrw_winsize
|
||||
|
||||
put =''
|
||||
put ='+ For help, place cursor on line and press ?'
|
||||
put ='+ For help, place cursor on line and press <F1>'
|
||||
|
||||
1d
|
||||
silent %s/^+/"/e
|
||||
@@ -130,9 +164,15 @@ fun! netrwSettings#NetrwSettings()
|
||||
silent %s/= $/= ''/e
|
||||
1
|
||||
|
||||
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
|
||||
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
|
||||
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
|
||||
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
|
||||
|
||||
set nomod
|
||||
|
||||
map <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
|
||||
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
|
||||
nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
|
||||
let tmpfile= tempname()
|
||||
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
|
||||
endfun
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: PHP
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2011 Dec 08
|
||||
"
|
||||
" TODO:
|
||||
" - Class aware completion:
|
||||
@@ -74,7 +74,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let file = getline(1, '$')
|
||||
call filter(file,
|
||||
\ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let jfile = join(file, ' ')
|
||||
let int_values = split(jfile, 'class\s\+')
|
||||
let int_classes = {}
|
||||
@@ -85,33 +85,43 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Prepare list of functions from tags file
|
||||
" Prepare list of classes from tags file
|
||||
let ext_classes = {}
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
" [:space:] thing: we don't have to be so strict when
|
||||
" dealing with tags files - entries there were already
|
||||
" checked by ctags.
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_classes[item] = ''
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
" [:space:] thing: we don't have to be so strict when
|
||||
" dealing with tags files - entries there were already
|
||||
" checked by ctags.
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_classes[item] = ''
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" Prepare list of built in classes from g:php_builtin_functions
|
||||
if !exists("g:php_omni_bi_classes")
|
||||
let g:php_omni_bi_classes = {}
|
||||
for i in keys(g:php_builtin_object_functions)
|
||||
let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
|
||||
endfor
|
||||
endif
|
||||
|
||||
call extend(int_classes, ext_classes)
|
||||
let classes = sort(keys(int_classes))
|
||||
let classes += sort(keys(ext_classes))
|
||||
let classes += sort(keys(g:php_omni_bi_classes))
|
||||
|
||||
for m in sort(keys(int_classes))
|
||||
for m in classes
|
||||
if m =~ '^'.a:base
|
||||
call add(res, m)
|
||||
endif
|
||||
endfor
|
||||
|
||||
let int_list = res
|
||||
|
||||
let final_menu = []
|
||||
for i in int_list
|
||||
for i in res
|
||||
let final_menu += [{'word':i, 'kind':'c'}]
|
||||
endfor
|
||||
|
||||
@@ -138,6 +148,19 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let classlocation = ''
|
||||
endif
|
||||
|
||||
if classlocation == 'VIMPHP_BUILTINOBJECT'
|
||||
|
||||
for object in keys(g:php_builtin_object_functions)
|
||||
if object =~ '^'.classname
|
||||
let res += [{'word':substitute(object, '.*::', '', ''),
|
||||
\ 'info': g:php_builtin_object_functions[object]}]
|
||||
endif
|
||||
endfor
|
||||
|
||||
return res
|
||||
|
||||
endif
|
||||
|
||||
if filereadable(classlocation)
|
||||
let classfile = readfile(classlocation)
|
||||
let classcontent = ''
|
||||
@@ -154,7 +177,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
" Functions declared with public keyword or without any
|
||||
" keyword are public
|
||||
let functions = filter(deepcopy(sccontent),
|
||||
\ 'v:val =~ "^\\s*\\(public\\s\\*\\)\\?function"')
|
||||
\ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"')
|
||||
let jfuncs = join(functions, ' ')
|
||||
let sfuncs = split(jfuncs, 'function\s\+')
|
||||
let c_functions = {}
|
||||
@@ -185,7 +208,6 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let all_values = {}
|
||||
call extend(all_values, c_functions)
|
||||
call extend(all_values, c_variables)
|
||||
call extend(all_values, g:php_builtin_object_functions)
|
||||
|
||||
for m in sort(keys(all_values))
|
||||
if m =~ '^'.a:base && m !~ '::'
|
||||
@@ -244,23 +266,25 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
|
||||
" ctags has good support for PHP, use tags file for external
|
||||
" variables
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let ext_vars = {}
|
||||
if fnames != ''
|
||||
let sbase = substitute(a:base, '^\$', '', '')
|
||||
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
" Add -> if it is possible object declaration
|
||||
let classname = ''
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let classname = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[adddollar.item] = classname
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
" Add -> if it is possible object declaration
|
||||
let classname = ''
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let classname = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[adddollar.item] = classname
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" Now we have all variables in int_vars dictionary
|
||||
@@ -270,7 +294,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let file = getline(1, '$')
|
||||
call filter(file,
|
||||
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let jfile = join(file, ' ')
|
||||
let int_values = split(jfile, 'function\s\+')
|
||||
let int_functions = {}
|
||||
@@ -287,14 +311,16 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
let all_values = {}
|
||||
@@ -375,23 +401,25 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
call extend(int_vars,g:php_builtin_vars)
|
||||
|
||||
" ctags has support for PHP, use tags file for external variables
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let ext_vars = {}
|
||||
if fnames != ''
|
||||
let sbase = substitute(a:base, '^\$', '', '')
|
||||
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let m_menu = ''
|
||||
" Add -> if it is possible object declaration
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let m_menu = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[item] = m_menu
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let m_menu = ''
|
||||
" Add -> if it is possible object declaration
|
||||
if field['text'] =~ item.'\s*=\s*new\s\+'
|
||||
let item = item.'->'
|
||||
let m_menu = matchstr(field['text'],
|
||||
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
|
||||
endif
|
||||
let ext_vars[item] = m_menu
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
call extend(int_vars, ext_vars)
|
||||
@@ -433,7 +461,7 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
let file = getline(1, '$')
|
||||
call filter(file,
|
||||
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let jfile = join(file, ' ')
|
||||
let int_values = split(jfile, 'function\s\+')
|
||||
let int_functions = {}
|
||||
@@ -450,14 +478,16 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
" File name
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
|
||||
let prototype = matchstr(field['text'],
|
||||
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
|
||||
let ext_functions[item.'('] = prototype.') - '.fname
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" All functions
|
||||
@@ -480,15 +510,17 @@ function! phpcomplete#CompletePHP(findstart, base)
|
||||
endfor
|
||||
|
||||
" Prepare list of constants from tags file
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
let ext_constants = {}
|
||||
if fnames != ''
|
||||
exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_constants[item] = ''
|
||||
endfor
|
||||
if len(qflist) > 0
|
||||
for field in qflist
|
||||
let item = matchstr(field['text'], '^[^[:space:]]\+')
|
||||
let ext_constants[item] = ''
|
||||
endfor
|
||||
endif
|
||||
endif
|
||||
|
||||
" All constants
|
||||
@@ -558,7 +590,7 @@ function! phpcomplete#GetClassName(scontext) " {{{
|
||||
endwhile
|
||||
|
||||
" OK, first way failed, now check tags file(s)
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
|
||||
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
|
||||
exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames
|
||||
let qflist = getqflist()
|
||||
if len(qflist) == 0
|
||||
@@ -573,6 +605,17 @@ function! phpcomplete#GetClassName(scontext) " {{{
|
||||
endfunction
|
||||
" }}}
|
||||
function! phpcomplete#GetClassLocation(classname) " {{{
|
||||
" Check classname may be name of built in object
|
||||
if !exists("g:php_omni_bi_classes")
|
||||
let g:php_omni_bi_classes = {}
|
||||
for i in keys(g:php_builtin_object_functions)
|
||||
let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
|
||||
endfor
|
||||
endif
|
||||
if has_key(g:php_omni_bi_classes, a:classname)
|
||||
return 'VIMPHP_BUILTINOBJECT'
|
||||
endif
|
||||
|
||||
" Get class location
|
||||
for fname in tagfiles()
|
||||
let fhead = fnamemodify(fname, ":h")
|
||||
@@ -583,8 +626,12 @@ function! phpcomplete#GetClassLocation(classname) " {{{
|
||||
let fname = escape(fname, " \\")
|
||||
exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname
|
||||
let qflist = getqflist()
|
||||
" As in GetClassName we can manage only one element
|
||||
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
|
||||
" As in GetClassName we can manage only one element if it exists
|
||||
if len(qflist) > 0
|
||||
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
|
||||
else
|
||||
return ''
|
||||
endif
|
||||
" And only one class location
|
||||
if classlocation != ''
|
||||
let classlocation = fhead.classlocation
|
||||
@@ -603,6 +650,7 @@ function! phpcomplete#GetClassContents(file, name) " {{{
|
||||
" this is the most efficient way. The other way
|
||||
" is to go through the looong string looking for
|
||||
" matching {}
|
||||
let original_window = winnr()
|
||||
below 1new
|
||||
0put =cfile
|
||||
call search('class\s\+'.a:name)
|
||||
@@ -614,11 +662,15 @@ function! phpcomplete#GetClassContents(file, name) " {{{
|
||||
else
|
||||
let extends_class = ''
|
||||
endif
|
||||
call search('{')
|
||||
normal! %
|
||||
let classc = getline(cfline, ".")
|
||||
let classcontent = join(classc, "\n")
|
||||
|
||||
bw! %
|
||||
" go back to where we started
|
||||
exe original_window.'wincmd w'
|
||||
|
||||
if extends_class != ''
|
||||
let classlocation = phpcomplete#GetClassLocation(extends_class)
|
||||
if filereadable(classlocation)
|
||||
|
||||
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,16 +1,45 @@
|
||||
"pythoncomplete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.5
|
||||
" Last Updated: 19 April 2006
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009
|
||||
"
|
||||
" 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.
|
||||
"
|
||||
" TODO:
|
||||
" User defined docstrings aren't handled right...
|
||||
" 'info' item output can use some formatting work
|
||||
" Add an "unsafe eval" mode, to allow for return type evaluation
|
||||
|
||||
if !has('python')
|
||||
echo "Error: Required vim compiled with +python"
|
||||
@@ -28,7 +57,7 @@ function! pythoncomplete#Complete(findstart, base)
|
||||
if c =~ '\w'
|
||||
continue
|
||||
elseif ! c =~ '\.'
|
||||
idx = -1
|
||||
let idx = -1
|
||||
break
|
||||
else
|
||||
break
|
||||
@@ -73,7 +102,24 @@ def vimcomplete(context,match):
|
||||
try:
|
||||
import vim
|
||||
def complsort(x,y):
|
||||
return x['abbr'] > y['abbr']
|
||||
try:
|
||||
xa = x['abbr']
|
||||
ya = y['abbr']
|
||||
if xa[0] == '_':
|
||||
if xa[1] == '_' and ya[0:2] == '__':
|
||||
return xa > ya
|
||||
elif ya[0:2] == '__':
|
||||
return -1
|
||||
elif y[0] == '_':
|
||||
return xa > ya
|
||||
else:
|
||||
return 1
|
||||
elif ya[0] == '_':
|
||||
return -1
|
||||
else:
|
||||
return xa > ya
|
||||
except:
|
||||
return 0
|
||||
cmpl = Completer()
|
||||
cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
|
||||
all = cmpl.get_completions(context,match)
|
||||
@@ -86,7 +132,7 @@ def vimcomplete(context,match):
|
||||
dictstr += '"icase":0},'
|
||||
if dictstr[-1] == ',': dictstr = dictstr[:-1]
|
||||
dictstr += ']'
|
||||
dbg("dict: %s" % dictstr)
|
||||
#dbg("dict: %s" % dictstr)
|
||||
vim.command("silent let g:pythoncomplete_completions = %s" % dictstr)
|
||||
#dbg("Completion dict:\n%s" % all)
|
||||
except vim.error:
|
||||
@@ -108,11 +154,7 @@ class Completer(object):
|
||||
except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
|
||||
|
||||
def _cleanstr(self,doc):
|
||||
return doc.replace('"',' ')\
|
||||
.replace("'",' ')\
|
||||
.replace('\n',' ')\
|
||||
.replace('\r',' ')\
|
||||
.replace('
|
||||
return doc.replace('"',' ').replace("'",' ')
|
||||
|
||||
def get_arguments(self,func_obj):
|
||||
def _ctor(obj):
|
||||
@@ -128,23 +170,23 @@ class Completer(object):
|
||||
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
|
||||
else: arg_offset = 0
|
||||
|
||||
|
||||
arg_text=''
|
||||
if type(func_obj) in [types.FunctionType, types.LambdaType]:
|
||||
try:
|
||||
cd = func_obj.func_code
|
||||
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
|
||||
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
|
||||
defaults = func_obj.func_defaults or []
|
||||
defaults = func_obj.func_defaults or ''
|
||||
defaults = map(lambda name: "=%s" % name, defaults)
|
||||
defaults = [""] * (len(real_args)-len(defaults)) + defaults
|
||||
items = map(lambda a,d: a+d, real_args, defaults)
|
||||
if func_obj.func_code.co_flags & 0x4:
|
||||
items.append("...")
|
||||
if func_obj.func_code.co_flags & 0x8:
|
||||
items.append("***")
|
||||
items.append("***")
|
||||
arg_text = (','.join(items)) + ')'
|
||||
|
||||
except:
|
||||
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
|
||||
@@ -160,6 +202,7 @@ class Completer(object):
|
||||
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):
|
||||
@@ -172,12 +215,11 @@ class Completer(object):
|
||||
all = {}
|
||||
ridx = stmt.rfind('.')
|
||||
if len(stmt) > 0 and stmt[-1] == '(':
|
||||
if len(stmt) > 0 and stmt[-1] == '(':
|
||||
result = eval(_sanitize(stmt[:-1]), self.compldict)
|
||||
doc = result.__doc__
|
||||
doc = result.__doc__
|
||||
if doc == None: doc = ''
|
||||
args = self.get_arguments(res)
|
||||
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
|
||||
@@ -192,36 +234,32 @@ class Completer(object):
|
||||
|
||||
try: maindoc = result.__doc__
|
||||
except: maindoc = ' '
|
||||
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 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)
|
||||
typestr = str(inst)
|
||||
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)}
|
||||
if "function" in typestr:
|
||||
c['word'] += '('
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
elif "method" in typestr:
|
||||
c['word'] += '('
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
|
||||
elif "module" in typestr:
|
||||
c['word'] += '.'
|
||||
c['word'] += '.'
|
||||
elif "class" in typestr:
|
||||
c['word'] += '('
|
||||
c['abbr'] += '('
|
||||
c['abbr'] += '('
|
||||
completions.append(c)
|
||||
except:
|
||||
i = sys.exc_info()
|
||||
@@ -233,9 +271,9 @@ class Completer(object):
|
||||
return []
|
||||
|
||||
class Scope(object):
|
||||
class Scope(object):
|
||||
def __init__(self,name,indent,docstr=''):
|
||||
self.subscopes = []
|
||||
self.subscopes = []
|
||||
self.docstr = docstr
|
||||
self.locals = []
|
||||
self.parent = None
|
||||
self.name = name
|
||||
@@ -254,33 +292,35 @@ class Scope(object):
|
||||
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):
|
||||
def local(self,loc):
|
||||
if not self._hasvaralready(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 """
|
||||
""" 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():
|
||||
if l.find('=') > -1 and var == l.split('=')[0].strip():
|
||||
return True
|
||||
self.locals.remove(l)
|
||||
|
||||
def get_code(self):
|
||||
def get_code(self):
|
||||
# we need to start with this, to fix up broken completions
|
||||
# hopefully this name is unique enough...
|
||||
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()
|
||||
str += sub.get_code()
|
||||
for l in self.locals:
|
||||
if not l.startswith('import'): str += l+'\n'
|
||||
|
||||
return str
|
||||
|
||||
@@ -300,11 +340,11 @@ class Scope(object):
|
||||
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, docstr)
|
||||
self.supers = supers
|
||||
def copy_decl(self,indent=0):
|
||||
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
|
||||
@@ -321,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, docstr)
|
||||
self.params = params
|
||||
def copy_decl(self,indent=0):
|
||||
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))
|
||||
@@ -341,7 +381,7 @@ class PyParser:
|
||||
def _parsedotname(self,pre=None):
|
||||
#returns (dottedname, nexttoken)
|
||||
name = []
|
||||
name = []
|
||||
if pre is None:
|
||||
tokentype, token, indent = self.next()
|
||||
if tokentype != NAME and token != '*':
|
||||
return ('', token)
|
||||
@@ -375,17 +415,20 @@ class PyParser:
|
||||
while True:
|
||||
tokentype, token, indent = self.next()
|
||||
if token in (')', ',') and level == 1:
|
||||
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:
|
||||
else:
|
||||
name += "%s " % str(token)
|
||||
return names
|
||||
|
||||
def _parsefunction(self,indent):
|
||||
@@ -420,6 +463,8 @@ class PyParser:
|
||||
tokentype, token, indent = self.next()
|
||||
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':
|
||||
@@ -463,16 +508,26 @@ class PyParser:
|
||||
#Handle 'self' params
|
||||
if scp.parent != None and type(scp.parent) == Class:
|
||||
slice = 1
|
||||
slice = 1
|
||||
p = scp.params[0]
|
||||
i = p.find('=')
|
||||
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:
|
||||
if i == -1:
|
||||
pvar = p
|
||||
ptype = '_PyCmplNoType()'
|
||||
else:
|
||||
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)
|
||||
@@ -494,23 +549,25 @@ class PyParser:
|
||||
freshscope=True
|
||||
while True:
|
||||
tokentype, token, indent = self.next()
|
||||
tokentype, token, indent = self.next()
|
||||
#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)
|
||||
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)
|
||||
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':
|
||||
@@ -537,6 +594,7 @@ class PyParser:
|
||||
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
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,15 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2006 Aug 29
|
||||
" Last Change: 2012 Jan 08
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
" Find spell directories we can write in.
|
||||
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
|
||||
let [dirlist, dirchoices] = spellfile#GetDirChoices()
|
||||
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.'
|
||||
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
|
||||
|
||||
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
|
||||
@@ -58,19 +67,40 @@ function! spellfile#LoadFile(lang)
|
||||
let fname = a:lang . '.' . enc . '.spl'
|
||||
|
||||
" Split the window, read the file into a new buffer.
|
||||
" Remember the buffer number, we check it below.
|
||||
new
|
||||
setlocal bin
|
||||
let newbufnr = winbufnr(0)
|
||||
setlocal bin fenc=
|
||||
echo 'Downloading ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMspell'
|
||||
" Didn't work, perhaps there is an ASCII one.
|
||||
g/^/d
|
||||
" Careful: Nread() may have opened a new window for the error message,
|
||||
" we need to go back to our own buffer and window.
|
||||
if newbufnr != winbufnr(0)
|
||||
let winnr = bufwinnr(newbufnr)
|
||||
if winnr == -1
|
||||
" Our buffer has vanished!? Open a new window.
|
||||
echomsg "download buffer disappeared, opening a new one"
|
||||
new
|
||||
setlocal bin fenc=
|
||||
else
|
||||
exe winnr . "wincmd w"
|
||||
endif
|
||||
endif
|
||||
if newbufnr == winbufnr(0)
|
||||
" We are back the old buffer, remove any (half-finished) download.
|
||||
g/^/d
|
||||
else
|
||||
let newbufnr = winbufnr(0)
|
||||
endif
|
||||
|
||||
let fname = a:lang . '.ascii.spl'
|
||||
echo 'Could not find it, trying ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMspell'
|
||||
echo 'Sorry, downloading failed'
|
||||
bwipe!
|
||||
exe newbufnr . "bwipe!"
|
||||
return
|
||||
endif
|
||||
endif
|
||||
@@ -85,7 +115,13 @@ function! spellfile#LoadFile(lang)
|
||||
endfor
|
||||
let dirchoice = confirm(msg, dirchoices) - 2
|
||||
if dirchoice >= 0
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
if exists('*fnameescape')
|
||||
let dirname = fnameescape(dirlist[dirchoice])
|
||||
else
|
||||
let dirname = escape(dirlist[dirchoice], ' ')
|
||||
endif
|
||||
setlocal fenc=
|
||||
exe "write " . dirname . '/' . fname
|
||||
|
||||
" Also download the .sug file, if the user wants to.
|
||||
let msg = "Do you want me to try getting the .sug file?\n"
|
||||
@@ -96,22 +132,40 @@ function! spellfile#LoadFile(lang)
|
||||
let fname = substitute(fname, '\.spl$', '.sug', '')
|
||||
echo 'Downloading ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMsug'
|
||||
echo 'Sorry, downloading failed'
|
||||
else
|
||||
if getline(2) =~ 'VIMsug'
|
||||
1d
|
||||
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
|
||||
exe "write " . dirname . '/' . fname
|
||||
set nomod
|
||||
else
|
||||
echo 'Sorry, downloading failed'
|
||||
" Go back to our own buffer/window, Nread() may have taken us to
|
||||
" another window.
|
||||
if newbufnr != winbufnr(0)
|
||||
let winnr = bufwinnr(newbufnr)
|
||||
if winnr != -1
|
||||
exe winnr . "wincmd w"
|
||||
endif
|
||||
endif
|
||||
if newbufnr == winbufnr(0)
|
||||
set nomod
|
||||
endif
|
||||
endif
|
||||
set nomod
|
||||
endif
|
||||
endif
|
||||
|
||||
bwipe
|
||||
" Wipe out the buffer we used.
|
||||
exe newbufnr . "bwipe"
|
||||
endif
|
||||
endfunc
|
||||
|
||||
" Read "fname" from the server.
|
||||
function! spellfile#Nread(fname)
|
||||
" We do our own error handling, don't want a window for it.
|
||||
if exists("g:netrw_use_errorwindow")
|
||||
let save_ew = g:netrw_use_errorwindow
|
||||
endif
|
||||
let g:netrw_use_errorwindow=0
|
||||
|
||||
if g:spellfile_URL =~ '^ftp://'
|
||||
" for an ftp server use a default login and password to avoid a prompt
|
||||
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
|
||||
@@ -120,4 +174,36 @@ function! spellfile#Nread(fname)
|
||||
else
|
||||
exe 'Nread ' g:spellfile_URL . '/' . a:fname
|
||||
endif
|
||||
|
||||
if exists("save_ew")
|
||||
let g:netrw_use_errorwindow = save_ew
|
||||
else
|
||||
unlet g:netrw_use_errorwindow
|
||||
endif
|
||||
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,16 +1,65 @@
|
||||
" Vim OMNI completion script for SQL
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 4.0
|
||||
" Last Change: Wed Apr 26 2006 3:00:06 PM
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 12.0
|
||||
" Last Change: 2012 Feb 08
|
||||
" Usage: For detailed help
|
||||
" ":help sql.txt"
|
||||
" or ":help ft-sql-omni"
|
||||
" ":help sql.txt"
|
||||
" or ":help ft-sql-omni"
|
||||
" or read $VIMRUNTIME/doc/sql.txt
|
||||
|
||||
" History
|
||||
" Version 12.0
|
||||
" - Partial column name completion did not work when a table
|
||||
" name or table alias was provided (Jonas Enberg).
|
||||
" - Improved the handling of column completion. First we match any
|
||||
" columns from a previous completion. If not matches are found, we
|
||||
" consider the partial name to be a table or table alias for the
|
||||
" query and attempt to match on it.
|
||||
"
|
||||
" Version 11.0
|
||||
" Added g:omni_sql_default_compl_type variable
|
||||
" - You can specify which type of completion to default to
|
||||
" when pressing <C-X><C-O>. The entire list of available
|
||||
" choices can be found in the calls to sqlcomplete#Map in:
|
||||
" ftplugin/sql.vim
|
||||
"
|
||||
" 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.
|
||||
" 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.
|
||||
if exists('&omnifunc')
|
||||
" Do not set the option if already set since this
|
||||
" results in an E117 warning.
|
||||
@@ -20,9 +69,9 @@ if exists('&omnifunc')
|
||||
endif
|
||||
|
||||
if exists('g:loaded_sql_completion')
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
let g:loaded_sql_completion = 40
|
||||
let g:loaded_sql_completion = 120
|
||||
|
||||
" Maintains filename of dictionary
|
||||
let s:sql_file_table = ""
|
||||
@@ -35,7 +84,7 @@ let s:tbl_alias = []
|
||||
let s:tbl_cols = []
|
||||
let s:syn_list = []
|
||||
let s:syn_value = []
|
||||
|
||||
|
||||
" Used in conjunction with the syntaxcomplete plugin
|
||||
let s:save_inc = ""
|
||||
let s:save_exc = ""
|
||||
@@ -45,7 +94,7 @@ endif
|
||||
if exists('g:omni_syntax_group_exclude_sql')
|
||||
let s:save_exc = g:omni_syntax_group_exclude_sql
|
||||
endif
|
||||
|
||||
|
||||
" Used with the column list
|
||||
let s:save_prev_table = ""
|
||||
|
||||
@@ -76,12 +125,16 @@ if !exists('g:omni_sql_include_owner')
|
||||
if g:loaded_dbext >= 300
|
||||
" New to dbext 3.00, by default the table lists include the owner
|
||||
" name of the table. This is used when determining how much of
|
||||
" whatever has been typed should be replaced as part of the
|
||||
" whatever has been typed should be replaced as part of the
|
||||
" code replacement.
|
||||
let g:omni_sql_include_owner = 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
" Default type of completion used when <C-X><C-O> is pressed
|
||||
if !exists('g:omni_sql_default_compl_type')
|
||||
let g:omni_sql_default_compl_type = 'table'
|
||||
endif
|
||||
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! sqlcomplete#Complete(findstart, base)
|
||||
@@ -106,10 +159,23 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
let begindot = 1
|
||||
endif
|
||||
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
|
||||
elseif line[start - 1] =~ '\.' &&
|
||||
elseif line[start - 1] =~ '\.' &&
|
||||
\ 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
|
||||
" break from the loop, since we do not also want to pickup
|
||||
" a table name if it was also supplied.
|
||||
@@ -124,8 +190,8 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
endif
|
||||
" If omni_sql_include_owner = 0, do not include the table
|
||||
" name as part of the substitution, so break here
|
||||
if lastword == -1 &&
|
||||
\ compl_type =~ 'table\|view\|procedure\column_csv' &&
|
||||
if lastword == -1 &&
|
||||
\ compl_type =~ 'table\|view\|procedure\column_csv' &&
|
||||
\ g:omni_sql_include_owner == 0
|
||||
let lastword = start
|
||||
break
|
||||
@@ -155,7 +221,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
let compl_list = []
|
||||
|
||||
" Default to table name completion
|
||||
let compl_type = 'table'
|
||||
let compl_type = g:omni_sql_default_compl_type
|
||||
" Allow maps to specify what type of object completion they want
|
||||
if exists('b:sql_compl_type')
|
||||
let compl_type = b:sql_compl_type
|
||||
@@ -169,32 +235,36 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
|
||||
if compl_type == 'table' ||
|
||||
\ compl_type == 'procedure' ||
|
||||
\ compl_type == 'view'
|
||||
\ compl_type == 'view'
|
||||
|
||||
" This type of completion relies upon the dbext.vim plugin
|
||||
if s:SQLCCheck4dbext() == -1
|
||||
return []
|
||||
endif
|
||||
|
||||
if s:sql_file_{compl_type} == ""
|
||||
let compl_type = substitute(compl_type, '\w\+', '\u&', '')
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
|
||||
" Allow the user to override the dbext plugin to specify whether
|
||||
" the owner/creator should be included in the list
|
||||
if g:loaded_dbext >= 300
|
||||
let saveSetting = DB_listOption('dict_show_owner')
|
||||
exec 'DBSetOption dict_show_owner='.(g:omni_sql_include_owner==1?'1':'0')
|
||||
endif
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
|
||||
|
||||
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
|
||||
" Same call below, no need to do it twice
|
||||
" if s:sql_file_{compl_type} == ""
|
||||
" let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
||||
" endif
|
||||
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
|
||||
if s:sql_file_{compl_type} != ""
|
||||
if filereadable(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
|
||||
elseif compl_type == 'column'
|
||||
|
||||
if g:loaded_dbext > 300
|
||||
exec 'DBSetOption dict_show_owner='.saveSetting
|
||||
endif
|
||||
elseif compl_type =~? 'column'
|
||||
|
||||
" This type of completion relies upon the dbext.vim plugin
|
||||
if s:SQLCCheck4dbext() == -1
|
||||
@@ -203,39 +273,123 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
|
||||
if base == ""
|
||||
" The last time we displayed a column list we stored
|
||||
" the table name. If the user selects a column list
|
||||
" the table name. If the user selects a column list
|
||||
" without a table name of alias present, assume they want
|
||||
" the previous column list displayed.
|
||||
let base = s:save_prev_table
|
||||
endif
|
||||
|
||||
if base != ""
|
||||
let compl_list = s:SQLCGetColumns(base, '')
|
||||
let owner = ''
|
||||
let column = ''
|
||||
|
||||
if base =~ '\.'
|
||||
" Check if the owner/creator has been specified
|
||||
let owner = matchstr( base, '^\zs.*\ze\..*\..*' )
|
||||
let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' )
|
||||
let column = matchstr( base, '.*\.\zs.*' )
|
||||
|
||||
" It is pretty well impossible to determine if the user
|
||||
" has entered:
|
||||
" owner.table
|
||||
" table.column_prefix
|
||||
" So there are a couple of things we can do to mitigate
|
||||
" this issue.
|
||||
" 1. Check if the dbext plugin has the option turned
|
||||
" on to even allow owners
|
||||
" 2. Based on 1, if the user is showing a table list
|
||||
" and the DrillIntoTable (using <Right>) then
|
||||
" this will be owner.table. In this case, we can
|
||||
" check to see the table.column exists in the
|
||||
" cached table list. If it does, then we have
|
||||
" determined the user has actually chosen
|
||||
" owner.table, not table.column_prefix.
|
||||
let found = -1
|
||||
if g:omni_sql_include_owner == 1 && owner == ''
|
||||
if filereadable(s:sql_file_table)
|
||||
let tbl_list = readfile(s:sql_file_table)
|
||||
let found = index( tbl_list, ((table != '')?(table.'.'):'').column)
|
||||
endif
|
||||
endif
|
||||
" If the table.column was found in the table list, we can safely assume
|
||||
" the owner was not provided and shift the items appropriately.
|
||||
" OR
|
||||
" If the user has indicated not to use table owners at all and
|
||||
" the base ends in a '.' we know they are not providing a column
|
||||
" name, so we can shift the items appropriately.
|
||||
" if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
|
||||
" let owner = table
|
||||
" let table = column
|
||||
" let column = ''
|
||||
" endif
|
||||
else
|
||||
" If no "." was provided and the user asked for
|
||||
" column level completion, first attempt the match
|
||||
" on any previous column lists. If the user asked
|
||||
" for a list of columns comma separated, continue as usual.
|
||||
if compl_type == 'column' && s:save_prev_table != ''
|
||||
" The last time we displayed a column list we stored
|
||||
" the table name. If the user selects a column list
|
||||
" without a table name of alias present, assume they want
|
||||
" the previous column list displayed.
|
||||
let table = s:save_prev_table
|
||||
let list_type = ''
|
||||
|
||||
let compl_list = s:SQLCGetColumns(table, list_type)
|
||||
if ! empty(compl_list)
|
||||
" If no column prefix has been provided and the table
|
||||
" name was provided, append it to each of the items
|
||||
" returned.
|
||||
let compl_list = filter(deepcopy(compl_list), 'v:val=~"^'.base.'"' )
|
||||
|
||||
" If not empty, we have a match on columns
|
||||
" return the list
|
||||
if ! empty(compl_list)
|
||||
return compl_list
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
" Since no columns were found to match the base supplied
|
||||
" assume the user is trying to complete the column list
|
||||
" for a table (and or an alias to a table).
|
||||
let table = base
|
||||
endif
|
||||
|
||||
" Get anything after the . and consider this the table name
|
||||
" If an owner has been specified, then we must consider the
|
||||
" base to be a partial column name
|
||||
" let base = matchstr( base, '^\(.*\.\)\?\zs.*' )
|
||||
|
||||
if table != ""
|
||||
let s:save_prev_table = base
|
||||
let base = ''
|
||||
endif
|
||||
elseif compl_type == 'column_csv'
|
||||
let list_type = ''
|
||||
|
||||
" This type of completion relies upon the dbext.vim plugin
|
||||
if s:SQLCCheck4dbext() == -1
|
||||
return []
|
||||
endif
|
||||
if compl_type == 'column_csv'
|
||||
" Return one array element, with a comma separated
|
||||
" list of values instead of multiple array entries
|
||||
" for each column in the table.
|
||||
let list_type = 'csv'
|
||||
endif
|
||||
|
||||
if base == ""
|
||||
" The last time we displayed a column list we stored
|
||||
" the table name. If the user selects a column list
|
||||
" without a table name of alias present, assume they want
|
||||
" the previous column list displayed.
|
||||
let base = s:save_prev_table
|
||||
endif
|
||||
let compl_list = s:SQLCGetColumns(table, list_type)
|
||||
if column != ''
|
||||
" If no column prefix has been provided and the table
|
||||
" name was provided, append it to each of the items
|
||||
" returned.
|
||||
let compl_list = map(compl_list, 'table.".".v:val')
|
||||
if owner != ''
|
||||
" If an owner has been provided append it to each of the
|
||||
" items returned.
|
||||
let compl_list = map(compl_list, 'owner.".".v:val')
|
||||
endif
|
||||
else
|
||||
let base = ''
|
||||
endif
|
||||
|
||||
if base != ""
|
||||
let compl_list = s:SQLCGetColumns(base, 'csv')
|
||||
let s:save_prev_table = base
|
||||
" Join the column array into 1 single element array
|
||||
" but make the columns column separated
|
||||
let compl_list = [join(compl_list, ', ')]
|
||||
let base = ''
|
||||
if compl_type == 'column_csv'
|
||||
" Join the column array into 1 single element array
|
||||
" but make the columns column separated
|
||||
let compl_list = [join(compl_list, ', ')]
|
||||
endif
|
||||
endif
|
||||
elseif compl_type == 'resetCache'
|
||||
" Reset all cached items
|
||||
@@ -254,9 +408,20 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
endif
|
||||
|
||||
if base != ''
|
||||
" Filter the list based on the first few characters the user
|
||||
" entered
|
||||
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "^'.base.'"'
|
||||
" Filter the list based on the first few characters the user entered.
|
||||
" Check if the text matches at the beginning
|
||||
" \\(^.base.'\\)
|
||||
" or
|
||||
" Match to a owner.table or alias.column type match
|
||||
" ^\\(\\w\\+\\.\\)\\?'.base.'\\)
|
||||
" or
|
||||
" Handle names with spaces "my table name"
|
||||
" "\\(^'.base.'\\|^\\(\\w\\+\\.\\)\\?'.base.'\\)"'
|
||||
"
|
||||
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)
|
||||
endif
|
||||
|
||||
@@ -269,14 +434,51 @@ endfunc
|
||||
|
||||
function! sqlcomplete#PreCacheSyntax(...)
|
||||
let syn_group_arr = []
|
||||
if a:0 > 0
|
||||
let syn_items = []
|
||||
|
||||
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
|
||||
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
|
||||
endif
|
||||
endfunction
|
||||
@@ -303,13 +505,14 @@ function! sqlcomplete#DrillIntoTable()
|
||||
call sqlcomplete#Map('column')
|
||||
" C-Y, makes the currently highlighted entry active
|
||||
" 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
|
||||
if has('win32')
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" <C-Right> behaviour
|
||||
exec "normal! \<C-Right>"
|
||||
endif
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" key behaviour.
|
||||
" Must use exec since they key must be preceeded by "\"
|
||||
" or feedkeys will simply push each character of the string
|
||||
" rather than the "key press".
|
||||
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_right.'", "n")'
|
||||
endif
|
||||
return ""
|
||||
endfunction
|
||||
@@ -321,27 +524,28 @@ function! sqlcomplete#DrillOutOfColumns()
|
||||
" Trigger the omni popup to be redisplayed
|
||||
call feedkeys("\<C-X>\<C-O>")
|
||||
else
|
||||
if has('win32')
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" <C-Left> behaviour
|
||||
exec "normal! \<C-Left>"
|
||||
endif
|
||||
" If the popup is not visible, simple perform the normal
|
||||
" key behaviour.
|
||||
" Must use exec since they key must be preceeded by "\"
|
||||
" or feedkeys will simply push each character of the string
|
||||
" rather than the "key press".
|
||||
exec 'call feedkeys("\'.g:ftplugin_sql_omni_key_left.'", "n")'
|
||||
endif
|
||||
return ""
|
||||
endfunction
|
||||
|
||||
function! s:SQLCWarningMsg(msg)
|
||||
echohl WarningMsg
|
||||
echomsg a:msg
|
||||
echomsg 'SQLComplete:'.a:msg
|
||||
echohl None
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:SQLCErrorMsg(msg)
|
||||
echohl ErrorMsg
|
||||
echomsg a:msg
|
||||
echomsg 'SQLComplete:'.a:msg
|
||||
echohl None
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:SQLCGetSyntaxList(syn_group)
|
||||
let syn_group = a:syn_group
|
||||
let compl_list = []
|
||||
@@ -352,7 +556,7 @@ function! s:SQLCGetSyntaxList(syn_group)
|
||||
" Return previously cached value
|
||||
let compl_list = s:syn_value[list_idx]
|
||||
else
|
||||
" Request the syntax list items from the
|
||||
" Request the syntax list items from the
|
||||
" syntax completion plugin
|
||||
if syn_group == 'syntax'
|
||||
" Handle this special case. This allows the user
|
||||
@@ -364,7 +568,7 @@ function! s:SQLCGetSyntaxList(syn_group)
|
||||
let g:omni_syntax_group_include_sql = syn_group
|
||||
endif
|
||||
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_exclude_sql = s:save_exc
|
||||
" Cache these values for later use
|
||||
@@ -383,8 +587,8 @@ function! s:SQLCCheck4dbext()
|
||||
" Leave time for the user to read the error message
|
||||
:sleep 2
|
||||
return -1
|
||||
elseif g:loaded_dbext < 300
|
||||
let msg = "The dbext plugin must be at least version 3.00 " .
|
||||
elseif g:loaded_dbext < 600
|
||||
let msg = "The dbext plugin must be at least version 5.30 " .
|
||||
\ " for dynamic SQL completion"
|
||||
call s:SQLCErrorMsg(msg)
|
||||
" Leave time for the user to read the error message
|
||||
@@ -400,7 +604,7 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
|
||||
let table_alias = a:table_alias
|
||||
let cols = a:cols
|
||||
|
||||
if g:omni_sql_use_tbl_alias != 'n'
|
||||
if g:omni_sql_use_tbl_alias != 'n'
|
||||
if table_alias == ''
|
||||
if 'da' =~? g:omni_sql_use_tbl_alias
|
||||
if table_name =~ '_'
|
||||
@@ -410,13 +614,13 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
|
||||
setlocal iskeyword-=_
|
||||
|
||||
" Get the first letter of each word
|
||||
" [[:alpha:]] is used instead of \w
|
||||
" [[:alpha:]] is used instead of \w
|
||||
" to catch extended accented characters
|
||||
"
|
||||
let table_alias = substitute(
|
||||
\ table_name,
|
||||
\ '\<[[:alpha:]]\+\>_\?',
|
||||
\ '\=strpart(submatch(0), 0, 1)',
|
||||
let table_alias = substitute(
|
||||
\ table_name,
|
||||
\ '\<[[:alpha:]]\+\>_\?',
|
||||
\ '\=strpart(submatch(0), 0, 1)',
|
||||
\ 'g'
|
||||
\ )
|
||||
" Restore original value
|
||||
@@ -444,35 +648,57 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
|
||||
return cols
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetObjectOwner(object)
|
||||
" 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.
|
||||
" ^ - from beginning of line
|
||||
" \("\|\[\)\? - ignore any quotes
|
||||
" \zs - start the match now
|
||||
" .\{-} - get owner name
|
||||
" \ze - end the match
|
||||
" \("\|\[\)\? - ignore any quotes
|
||||
" \. - must by followed by a .
|
||||
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
|
||||
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
|
||||
return owner
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetColumns(table_name, list_type)
|
||||
let table_name = matchstr(a:table_name, '^\w\+')
|
||||
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_.]\+')
|
||||
" 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_cols = []
|
||||
let table_alias = ''
|
||||
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
|
||||
let saveSettingAlias = DB_listOption('use_tbl_alias')
|
||||
exec 'DBSetOption use_tbl_alias=n'
|
||||
endif
|
||||
|
||||
let table_name_stripped = substitute(table_name, '["\[\]]*', '', 'g')
|
||||
|
||||
" Check if we have already cached the column list for this table
|
||||
" 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
|
||||
let table_cols = split(s:tbl_cols[list_idx])
|
||||
let table_cols = split(s:tbl_cols[list_idx], '\n')
|
||||
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
|
||||
" the alias for the table instead
|
||||
" select *
|
||||
" from area 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
|
||||
let table_alias = table_name
|
||||
let table_alias = table_name_stripped
|
||||
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
|
||||
|
||||
@@ -480,7 +706,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" And the table ends in a "." or we are looking for a column list
|
||||
" if list_idx == -1 && (a:table_name =~ '\.' || b:sql_compl_type =~ 'column')
|
||||
" if list_idx == -1 && (a:table_name =~ '\.' || a:list_type =~ 'csv')
|
||||
if list_idx == -1
|
||||
if list_idx == -1
|
||||
let saveY = @y
|
||||
let saveSearch = @/
|
||||
let saveWScan = &wrapscan
|
||||
@@ -491,7 +717,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
setlocal nowrapscan
|
||||
" If . was entered, look at the word just before the .
|
||||
" We are looking for something like this:
|
||||
" select *
|
||||
" select *
|
||||
" from customer c
|
||||
" where c.
|
||||
" So when . is pressed, we need to find 'c'
|
||||
@@ -500,7 +726,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" Search backwards to the beginning of the statement
|
||||
" and do NOT wrap
|
||||
" 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
|
||||
" Advance right one character
|
||||
@@ -509,27 +735,47 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" 2. A ; at the end of a line (the delimiter)
|
||||
" 3. The end of the file (incase no delimiter)
|
||||
" 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 = substitute(query, "\n", ' ', 'g')
|
||||
let found = 0
|
||||
|
||||
" if query =~? '^\(select\|update\|delete\)'
|
||||
if query =~? '^\(select\)'
|
||||
" if query =~? '^\c\(select\)'
|
||||
if query =~? '^\(select\|update\|delete\)'
|
||||
let found = 1
|
||||
" \(\(\<\w\+\>\)\.\)\? -
|
||||
" 'from.\{-}' - Starting at the from clause
|
||||
" \(\(\<\w\+\>\)\.\)\? -
|
||||
" '\c\(from\|join\|,\).\{-}' - Starting at the from clause (case insensitive)
|
||||
" '\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*\.\@!.*' - Cannot be followed by a .
|
||||
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
|
||||
" '.*' - Exclude the rest of the line in the match
|
||||
let table_name_new = matchstr(@y,
|
||||
\ 'from.\{-}'.
|
||||
\ '\zs\(\(\<\w\+\>\)\.\)\?'.
|
||||
\ '\<\w\+\>\ze'.
|
||||
" let table_name_new = matchstr(@y,
|
||||
" \ '\c\(from\|join\|,\).\{-}'.
|
||||
" \ '\zs\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
|
||||
" \ '\("\|\[\)\?.\{-}\("\|\]\)\?\ze'.
|
||||
" \ '\s\+\%(as\s\+\)\?\<'.
|
||||
" \ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||
" \ '\>'.
|
||||
" \ '\s*\.\@!.*'.
|
||||
" \ '\(\<where\>\|$\)'.
|
||||
" \ '.*'
|
||||
" \ )
|
||||
"
|
||||
"
|
||||
" ''\c\(\<from\>\|\<join\>\|,\)\s*' - Starting at the from clause (case insensitive)
|
||||
" '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?' - Get the owner name (optional)
|
||||
" '\("\|\[\)\?\w\+\("\|\]\)\?\ze' - Get the table name
|
||||
" '\s\+\%(as\s\+\)\?\<'.matchstr(table_name, '.\{-}\ze\.\?$').'\>' - Followed by the alias
|
||||
" '\s*\.\@!.*' - Cannot be followed by a .
|
||||
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
|
||||
" '.*' - Exclude the rest of the line in the match
|
||||
let table_name_new = matchstr(@y,
|
||||
\ '\c\(\<from\>\|\<join\>\|,\)\s*'.
|
||||
\ '\zs\(\("\|\[\)\?\w\+\("\|\]\)\?\.\)\?'.
|
||||
\ '\("\|\[\)\?\w\+\("\|\]\)\?\ze'.
|
||||
\ '\s\+\%(as\s\+\)\?\<'.
|
||||
\ matchstr(table_name, '.\{-}\ze\.\?$').
|
||||
\ '\>'.
|
||||
@@ -537,9 +783,10 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
\ '\(\<where\>\|$\)'.
|
||||
\ '.*'
|
||||
\ )
|
||||
|
||||
if table_name_new != ''
|
||||
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)
|
||||
if list_idx > -1
|
||||
@@ -567,7 +814,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
|
||||
" Return to previous location
|
||||
call cursor(curline, curcol)
|
||||
|
||||
|
||||
if found == 0
|
||||
if g:loaded_dbext > 300
|
||||
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
|
||||
@@ -576,7 +823,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
" Not a SQL statement, do not display a list
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
if empty(table_cols)
|
||||
" Specify silent mode, no messages to the user (tbl, 1)
|
||||
@@ -587,7 +834,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
let s:tbl_name = add( s:tbl_name, table_name )
|
||||
let s:tbl_alias = add( s:tbl_alias, table_alias )
|
||||
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
|
||||
@@ -607,4 +854,3 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
|
||||
return table_cols
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,10 +1,41 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <fishburn@ianywhere.com>
|
||||
" Version: 2.0
|
||||
" Last Change: Fri May 05 2006 10:34:57 PM
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 8.0
|
||||
" Last Change: 2011 Nov 02
|
||||
" Usage: For detailed help, ":help ft-syntax-omni"
|
||||
|
||||
" History
|
||||
"
|
||||
" Version 8.0
|
||||
" Updated SyntaxCSyntaxGroupItems()
|
||||
" - Some additional syntax items were also allowed
|
||||
" on nextgroup= lines which were ignored by default.
|
||||
" Now these lines are processed independently.
|
||||
"
|
||||
" 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.
|
||||
" This check is in place in case this script is
|
||||
" sourced directly instead of using the autoload feature.
|
||||
@@ -19,17 +50,36 @@ endif
|
||||
if exists('g:loaded_syntax_completion')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntax_completion = 20
|
||||
let g:loaded_syntax_completion = 80
|
||||
|
||||
" Set ignorecase to the ftplugin standard
|
||||
" This is the default setting, but if you define a buffer local
|
||||
" variable you can override this on a per filetype.
|
||||
if !exists('g:omni_syntax_ignorecase')
|
||||
let g:omni_syntax_ignorecase = &ignorecase
|
||||
endif
|
||||
|
||||
" Indicates whether we should use the iskeyword option to determine
|
||||
" how to split words.
|
||||
" This is the default setting, but if you define a buffer local
|
||||
" variable you can override this on a per filetype.
|
||||
if !exists('g:omni_syntax_use_iskeyword')
|
||||
let g:omni_syntax_use_iskeyword = 1
|
||||
endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length.
|
||||
" This is the default setting, but if you define a buffer local
|
||||
" variable you can override this on a per filetype.
|
||||
if !exists('g:omni_syntax_minimum_length')
|
||||
let g:omni_syntax_minimum_length = 0
|
||||
endif
|
||||
|
||||
" This script will build a completion list based on the syntax
|
||||
" elements defined by the files in $VIMRUNTIME/syntax.
|
||||
let s:syn_remove_words = 'match,matchgroup=,contains,'.
|
||||
\ 'links to,start=,end=,nextgroup='
|
||||
\ 'links to,start=,end='
|
||||
" \ 'links to,start=,end=,nextgroup='
|
||||
|
||||
let s:cache_name = []
|
||||
let s:cache_list = []
|
||||
@@ -38,21 +88,28 @@ let s:prepended = ''
|
||||
" This function is used for the 'omnifunc' option.
|
||||
function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_ignorecase')
|
||||
if exists('g:omni_syntax_ignorecase')
|
||||
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
|
||||
else
|
||||
let b:omni_syntax_ignorecase = &ignorecase
|
||||
endif
|
||||
endif
|
||||
|
||||
if a:findstart
|
||||
" Locate the start of the item, including "."
|
||||
let line = getline('.')
|
||||
let start = col('.') - 1
|
||||
let lastword = -1
|
||||
while start > 0
|
||||
if line[start - 1] =~ '\w'
|
||||
" if line[start - 1] =~ '\S'
|
||||
" let start -= 1
|
||||
" elseif line[start - 1] =~ '\.'
|
||||
if line[start - 1] =~ '\k'
|
||||
let start -= 1
|
||||
elseif line[start - 1] =~ '\.'
|
||||
" The user must be specifying a column name
|
||||
if lastword == -1
|
||||
let lastword = start
|
||||
endif
|
||||
let start -= 1
|
||||
let b:sql_compl_type = 'column'
|
||||
let lastword = a:findstart
|
||||
else
|
||||
break
|
||||
endif
|
||||
@@ -64,11 +121,12 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
let s:prepended = ''
|
||||
return start
|
||||
endif
|
||||
let s:prepended = strpart(line, start, lastword - start)
|
||||
return lastword
|
||||
let s:prepended = strpart(line, start, (col('.') - 1) - start)
|
||||
return start
|
||||
endif
|
||||
|
||||
let base = s:prepended . a:base
|
||||
" let base = s:prepended . a:base
|
||||
let base = s:prepended
|
||||
|
||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
|
||||
@@ -82,17 +140,45 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
|
||||
" Return list of matches.
|
||||
|
||||
if base =~ '\w'
|
||||
let compstr = join(compl_list, ' ')
|
||||
let expr = (g:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
|
||||
let compstr = substitute(compstr, expr, '', 'g')
|
||||
let compl_list = split(compstr, '\s\+')
|
||||
if base != ''
|
||||
" let compstr = join(compl_list, ' ')
|
||||
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
|
||||
" let compstr = substitute(compstr, expr, '', 'g')
|
||||
" let compl_list = split(compstr, '\s\+')
|
||||
|
||||
" Filter the list based on the first few characters the user
|
||||
" entered
|
||||
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
|
||||
let compl_list = filter(deepcopy(compl_list), expr)
|
||||
endif
|
||||
|
||||
return compl_list
|
||||
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
|
||||
" a list will be returned.
|
||||
" let use_dictionary = 1
|
||||
@@ -100,17 +186,61 @@ function! OmniSyntaxList()
|
||||
" let use_dictionary = a:1
|
||||
" endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_use_iskeyword')
|
||||
if exists('g:omni_syntax_use_iskeyword')
|
||||
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
|
||||
else
|
||||
let b:omni_syntax_use_iskeyword = 1
|
||||
endif
|
||||
endif
|
||||
|
||||
" Only display items in the completion window that are at least
|
||||
" this many characters in length
|
||||
if !exists('b:omni_syntax_minimum_length')
|
||||
if exists('g:omni_syntax_minimum_length')
|
||||
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
|
||||
else
|
||||
let b:omni_syntax_minimum_length = 0
|
||||
endif
|
||||
endif
|
||||
|
||||
let saveL = @l
|
||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||
|
||||
if empty(list_parms)
|
||||
" 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
|
||||
" syntax file which contains these names. This can
|
||||
" work generically for any filetype that does not already
|
||||
" have a plugin defined.
|
||||
" This ASSUMES the syntax groupname BEGINS with the name
|
||||
" 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
|
||||
silent! exec 'syntax list '
|
||||
silent! exec 'syntax list '.join(list_parms)
|
||||
redir END
|
||||
|
||||
let syntax_full = "\n".@l
|
||||
@@ -125,31 +255,23 @@ function! OmniSyntaxList()
|
||||
|
||||
let filetype = substitute(&filetype, '\.', '_', 'g')
|
||||
|
||||
" 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')
|
||||
if syntax_group_include_{filetype} =~ '\w'
|
||||
let syntax_group_include_{filetype} =
|
||||
\ substitute( syntax_group_include_{filetype},
|
||||
\ '\s*,\s*', '\\|', 'g'
|
||||
\ )
|
||||
endif
|
||||
endif
|
||||
|
||||
" Default the exclude group to nothing
|
||||
let syntax_group_exclude_{filetype} = ''
|
||||
" Check if there are any overrides specified for this filetype
|
||||
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'
|
||||
\ )
|
||||
let list_exclude_groups = []
|
||||
if a:0 > 0
|
||||
" Do nothing since we have specific a specific list of groups
|
||||
else
|
||||
" Default the exclude group to nothing
|
||||
let syntax_group_exclude_{filetype} = ''
|
||||
" Check if there are any overrides specified for this filetype
|
||||
if exists('g:omni_syntax_group_exclude_'.filetype)
|
||||
let syntax_group_exclude_{filetype} =
|
||||
\ substitute( g:omni_syntax_group_exclude_{filetype},'\s\+','','g')
|
||||
let list_exclude_groups = split(g:omni_syntax_group_exclude_{filetype}, ',')
|
||||
if syntax_group_exclude_{filetype} =~ '\w'
|
||||
let syntax_group_exclude_{filetype} =
|
||||
\ substitute( syntax_group_exclude_{filetype},
|
||||
\ '\s*,\s*', '\\|', 'g'
|
||||
\ )
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -174,47 +296,51 @@ function! OmniSyntaxList()
|
||||
let index = 0
|
||||
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
|
||||
let group_name = matchstr( syntax_full, '\w\+', index )
|
||||
|
||||
let get_syn_list = 1
|
||||
" if syntax_group_include_{&filetype} == ''
|
||||
" if syntax_group_exclude_{&filetype} != ''
|
||||
" if '\<'.syntax_group_exclude_{&filetype}.'\>' =~ '\<'.group_name.'\>'
|
||||
for exclude_group_name in list_exclude_groups
|
||||
if '\<'.exclude_group_name.'\>' =~ '\<'.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
|
||||
" endif
|
||||
" endif
|
||||
" else
|
||||
" if '\<'.syntax_group_include_{&filetype}.'\>' !~ '\<'.group_name.'\>'
|
||||
" let get_syn_list = 0
|
||||
" 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
|
||||
" Pass in the full syntax listing, plus the group name we
|
||||
" are interested in.
|
||||
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"
|
||||
endif
|
||||
|
||||
@@ -261,9 +387,13 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
" \zs - start the match
|
||||
" .\{-} - everything ...
|
||||
" \ze - end the match
|
||||
" \( - start a group or 2 potential matches
|
||||
" \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,
|
||||
\ "\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 != ""
|
||||
@@ -288,20 +418,56 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
|
||||
\ , "\n", 'g'
|
||||
\ )
|
||||
|
||||
" Now strip off the newline + blank space + contained
|
||||
" Now strip off the newline + blank space + contained.
|
||||
" Also include lines with nextgroup=@someName skip_key_words syntax_element
|
||||
let syn_list = substitute(
|
||||
\ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\)'
|
||||
\ syn_list, '\%(^\|\n\)\@<=\s*\<\(contained\|nextgroup=\)'
|
||||
\ , "", 'g'
|
||||
\ )
|
||||
|
||||
" There are a number of items which have non-word characters in
|
||||
" them, *'T_F1'*. vim.vim is one such file.
|
||||
" This will replace non-word characters with spaces.
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
|
||||
" This can leave lines like this
|
||||
" =@vimMenuList skipwhite onoremenu
|
||||
" Strip the special option keywords first
|
||||
" :h :syn-skipwhite*
|
||||
let syn_list = substitute(
|
||||
\ syn_list, '\<\(skipwhite\|skipnl\|skipempty\)\>'
|
||||
\ , "", 'g'
|
||||
\ )
|
||||
|
||||
" Now remove the remainder of the nextgroup=@someName lines
|
||||
let syn_list = substitute(
|
||||
\ syn_list, '\%(^\|\n\)\@<=\s*\(@\w\+\)'
|
||||
\ , "", 'g'
|
||||
\ )
|
||||
|
||||
if b:omni_syntax_use_iskeyword == 0
|
||||
" There are a number of items which have non-word characters in
|
||||
" them, *'T_F1'*. vim.vim is one such file.
|
||||
" This will replace non-word characters with spaces.
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
|
||||
else
|
||||
let accept_chars = ','.&iskeyword.','
|
||||
" Remove all character ranges
|
||||
" let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
|
||||
let accept_chars = substitute(accept_chars, ',\@<=[^,]\+-[^,]\+,', '', 'g')
|
||||
" Remove all numeric specifications
|
||||
" let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
|
||||
let accept_chars = substitute(accept_chars, ',\@<=\d\{-},', '', 'g')
|
||||
" Remove all commas
|
||||
let accept_chars = substitute(accept_chars, ',', '', 'g')
|
||||
" Escape special regex characters
|
||||
let accept_chars = escape(accept_chars, '\\/.*$^~[]' )
|
||||
" Remove all characters that are not acceptable
|
||||
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' )
|
||||
endif
|
||||
|
||||
if b:omni_syntax_minimum_length > 0
|
||||
" If the user specified a minimum length, enforce it
|
||||
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
|
||||
endif
|
||||
else
|
||||
let syn_list = ''
|
||||
endif
|
||||
|
||||
return syn_list
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,30 +1,36 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: May 02, 2006
|
||||
" Version: 9
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" Date: Jan 17, 2012
|
||||
" Version: 28
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
"
|
||||
" Contains many ideas from Michael Toren's <tar.vim>
|
||||
"
|
||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
||||
" Copyright: Copyright (C) 2005-2011 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
" tarPlugin.vim is provided *as is* and comes with no warranty
|
||||
" of any kind, either expressed or implied. By using this
|
||||
" plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
|
||||
" tar.vim and tarPlugin.vim are provided *as is* and comes
|
||||
" with no warranty of any kind, either expressed or implied.
|
||||
" By using this plugin, you agree that in no event will the
|
||||
" copyright holder be liable for any damages resulting from
|
||||
" the use of this software.
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if exists("g:loaded_tar")
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("g:loaded_tar")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v9"
|
||||
let g:loaded_tar= "v28"
|
||||
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")
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
@@ -41,6 +47,52 @@ endif
|
||||
if !exists("g:tar_writeoptions")
|
||||
let g:tar_writeoptions= "uf"
|
||||
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_copycmd")
|
||||
if !exists("g:netrw_localcopycmd")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if g:netrw_cygwin
|
||||
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
|
||||
let g:tar_copycmd= g:netrw_localcopycmd
|
||||
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
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -55,8 +107,8 @@ fun! tar#Browse(tarfile)
|
||||
|
||||
" sanity checks
|
||||
if !executable(g:tar_cmd)
|
||||
redraw!
|
||||
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
|
||||
" call Dret("tar#Browse")
|
||||
return
|
||||
@@ -65,8 +117,8 @@ fun! tar#Browse(tarfile)
|
||||
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
|
||||
if a:tarfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
|
||||
@@ -75,7 +127,7 @@ fun! tar#Browse(tarfile)
|
||||
if &ma != 1
|
||||
set ma
|
||||
endif
|
||||
let w:tarfile= a:tarfile
|
||||
let b:tarfile= a:tarfile
|
||||
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nofile
|
||||
@@ -86,49 +138,58 @@ fun! tar#Browse(tarfile)
|
||||
|
||||
" give header
|
||||
" call Decho("printing header")
|
||||
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
|
||||
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
|
||||
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
|
||||
0d
|
||||
$
|
||||
let lastline= line("$")
|
||||
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
|
||||
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
|
||||
call setline(lastline+3,'" Select a file with cursor and press ENTER')
|
||||
keepj $put =''
|
||||
keepj sil! 0d
|
||||
keepj $
|
||||
|
||||
let tarfile= a:tarfile
|
||||
if has("win32") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
||||
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||
endif
|
||||
let curlast= line("$")
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
|
||||
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
|
||||
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
|
||||
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.lrp'
|
||||
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
|
||||
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.\(lzma\|tlz\)$'
|
||||
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
exe "sil! 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 "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
else
|
||||
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'")
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'"
|
||||
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("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
|
||||
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
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.">")
|
||||
silent %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".a:tarfile
|
||||
let &ei= eikeep
|
||||
1d
|
||||
return
|
||||
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!
|
||||
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
|
||||
keepj sil! %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".a:tarfile
|
||||
exe "r ".fnameescape(a:tarfile)
|
||||
let &ei= eikeep
|
||||
1d
|
||||
keepj sil! 1d
|
||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||
return
|
||||
endif
|
||||
@@ -137,18 +198,25 @@ fun! tar#Browse(tarfile)
|
||||
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Browse : w:tarfile<".w:tarfile.">")
|
||||
" call Dret("tar#Browse : b:tarfile<".b:tarfile.">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" TarBrowseSelect: {{{2
|
||||
fun! s:TarBrowseSelect()
|
||||
" call Dfunc("TarBrowseSelect() w:tarfile<".w:tarfile."> curfile<".expand("%").">")
|
||||
" call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
" 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
|
||||
if fname =~ '^"'
|
||||
let &report= repkeep
|
||||
@@ -156,18 +224,20 @@ fun! s:TarBrowseSelect()
|
||||
return
|
||||
endif
|
||||
|
||||
" about to make a new window, need to use w:tarfile
|
||||
let tarfile= w:tarfile
|
||||
" about to make a new window, need to use b:tarfile
|
||||
let tarfile= b:tarfile
|
||||
let curfile= expand("%")
|
||||
if has("win32") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
||||
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||
endif
|
||||
|
||||
new
|
||||
wincmd _
|
||||
if !exists("g:tar_nomax") || g:tar_nomax == 0
|
||||
wincmd _
|
||||
endif
|
||||
let s:tblfile_{winnr()}= curfile
|
||||
call tar#Read("tarfile:".tarfile.':'.fname,1)
|
||||
call tar#Read("tarfile:".tarfile.'::'.fname,1)
|
||||
filetype detect
|
||||
|
||||
let &report= repkeep
|
||||
@@ -180,54 +250,105 @@ fun! tar#Read(fname,mode)
|
||||
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
|
||||
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
|
||||
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
if has("win32") && executable("cygpath")
|
||||
" assuming cygwin
|
||||
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
|
||||
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
|
||||
endif
|
||||
" call Decho("tarfile<".tarfile.">")
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -OPxf - '".fname."'")
|
||||
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'")
|
||||
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
|
||||
if fname =~ '\.bz2$' && executable("bzcat")
|
||||
let decmp= "|bzcat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.gz$' && executable("zcat")
|
||||
let decmp= "|zcat"
|
||||
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
|
||||
" call Decho("exe silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'")
|
||||
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." '".tarfile."' '".fname."'"
|
||||
let decmp=""
|
||||
let doro = 0
|
||||
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
|
||||
setlocal bin
|
||||
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 "sil! 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 "sil! 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 "sil! 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 "sil! 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 "sil! 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
|
||||
0d
|
||||
keepj sil! 0d
|
||||
set nomod
|
||||
|
||||
let &report= repkeep
|
||||
" call Dret("tar#Read : w:tarfile<".w:tarfile.">")
|
||||
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" tar#Write: {{{2
|
||||
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
|
||||
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
|
||||
if !executable(g:tar_cmd)
|
||||
redraw!
|
||||
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
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
endif
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
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
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
@@ -244,10 +365,10 @@ fun! tar#Write(fname)
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
try
|
||||
exe "cd ".escape(tmpdir,' \')
|
||||
exe "cd ".fnameescape(tmpdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
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
|
||||
" call Dret("tar#Write")
|
||||
return
|
||||
@@ -262,28 +383,42 @@ fun! tar#Write(fname)
|
||||
cd _ZIPVIM_
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
let tarfile = substitute(w:tarfile,'tarfile:\(.\{-}\):.*$','\1','')
|
||||
let fname = substitute(w:tarfile,'tarfile:.\{-}:\(.*\)$','\1','')
|
||||
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
|
||||
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
|
||||
|
||||
" handle compressed archives
|
||||
if tarfile =~# '\.gz'
|
||||
call system("gzip -d ".tarfile)
|
||||
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)
|
||||
if tarfile =~# '\.bz2'
|
||||
call system("bzip2 -d -- ".shellescape(tarfile,0))
|
||||
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
|
||||
" call Decho("tarfile<".tarfile.">")
|
||||
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
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
|
||||
|
||||
" call Decho("tarfile<".tarfile."> fname<".fname.">")
|
||||
@@ -291,34 +426,43 @@ fun! tar#Write(fname)
|
||||
if fname =~ '/'
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
||||
let dirpath = substitute(system("cygpath ".shellescape(dirpath, 0)),'\n','','e')
|
||||
endif
|
||||
call mkdir(dirpath,"p")
|
||||
endif
|
||||
if tarfile !~ '/'
|
||||
let tarfile= curdir.'/'.tarfile
|
||||
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.">")
|
||||
|
||||
exe "w! ".fname
|
||||
if exists("g:tar_secure")
|
||||
let tar_secure= " -- "
|
||||
else
|
||||
let tar_secure= " "
|
||||
endif
|
||||
exe "w! ".fnameescape(fname)
|
||||
if executable("cygpath")
|
||||
let tarfile = substitute(system("cygpath ".tarfile),'\n','','e')
|
||||
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
|
||||
endif
|
||||
|
||||
" delete old file from tarfile
|
||||
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
|
||||
call system("tar --delete -f '".tarfile."' '".fname."'")
|
||||
" call Decho("system(".g:tar_cmd." --delete -f ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
|
||||
call system(g:tar_cmd." --delete -f ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||
if v:shell_error != 0
|
||||
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()
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||
else
|
||||
|
||||
" update tarfile with new file
|
||||
" call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
|
||||
call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
|
||||
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
|
||||
if v:shell_error != 0
|
||||
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()
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
|
||||
elseif exists("compress")
|
||||
" call Decho("call system(".compress.")")
|
||||
call system(compress)
|
||||
@@ -334,13 +478,13 @@ fun! tar#Write(fname)
|
||||
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
|
||||
let tblfile= s:tblfile_{winnr()}
|
||||
1split|enew
|
||||
let binkeep= &binary
|
||||
let binkeep= &l:binary
|
||||
let eikeep = &ei
|
||||
set binary ei=all
|
||||
exe "e! ".tarfile
|
||||
exe "e! ".fnameescape(tarfile)
|
||||
call netrw#NetWrite(tblfile)
|
||||
let &ei = eikeep
|
||||
let &binary = binkeep
|
||||
let &ei = eikeep
|
||||
let &l:binary = binkeep
|
||||
q!
|
||||
unlet s:tblfile_{winnr()}
|
||||
endif
|
||||
@@ -349,7 +493,7 @@ fun! tar#Write(fname)
|
||||
" cleanup and restore current directory
|
||||
cd ..
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
exe "cd ".escape(curdir,' \')
|
||||
exe "cd ".fnameescape(curdir)
|
||||
setlocal nomod
|
||||
|
||||
let &report= repkeep
|
||||
@@ -357,22 +501,98 @@ fun! tar#Write(fname)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Rmdir: {{{2
|
||||
" s:Rmdir: {{{2
|
||||
fun! s:Rmdir(fname)
|
||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||
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")
|
||||
if &shell =~? "sh$"
|
||||
call system("/bin/rm -rf ".a:fname)
|
||||
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
|
||||
else
|
||||
call system("del /S ".a:fname)
|
||||
call system("del /S ".shellescape(a:fname,0))
|
||||
endif
|
||||
endif
|
||||
" call Dret("Rmdir")
|
||||
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
|
||||
let &cpo= s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
758
runtime/autoload/tohtml.vim
Normal file
758
runtime/autoload/tohtml.vim
Normal file
@@ -0,0 +1,758 @@
|
||||
" Vim autoload file for the tohtml plugin.
|
||||
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
|
||||
" Last Change: 2011 Apr 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.
|
||||
"
|
||||
" 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:buftype!='' && &l:buftype!=?'help'))
|
||||
\ && &encoding!=?s:settings.vim_encoding)
|
||||
\ || &l:fileencoding!='' && &l:fileencoding!=?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, 'pre_wrap', &wrap )
|
||||
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
|
||||
|
||||
" pre_wrap doesn't do anything if not using pre or not using CSS
|
||||
if user_settings.no_pre || !user_settings.use_css
|
||||
let user_settings.pre_wrap=0
|
||||
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 != ''
|
||||
" If the buffer is not a "normal" type, the 'fileencoding' value may not
|
||||
" be trusted; since the buffer should not be written the fileencoding is
|
||||
" not intended to be used.
|
||||
if &l:buftype=='' || &l:buftype==?'help'
|
||||
let user_settings.vim_encoding = &l:fileencoding
|
||||
call tohtml#CharsetFromEncoding(user_settings)
|
||||
else
|
||||
let user_settings.encoding = '' " trigger detection using &encoding
|
||||
endif
|
||||
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 : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: May 01, 2006
|
||||
" Version: 13
|
||||
" vimball.vim : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Jan 17, 2012
|
||||
" Version: 35
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
|
||||
" Copyright: (c) 2004-2011 by Charles E. Campbell, Jr.
|
||||
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
|
||||
" (see |copyright|) except use "Vimball" instead of "Vim".
|
||||
" No warranty, express or implied.
|
||||
@@ -14,45 +14,101 @@
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo = &cpo
|
||||
let g:loaded_vimball = "v13"
|
||||
let g:loaded_vimball = "v35"
|
||||
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
|
||||
"DechoTabOn
|
||||
|
||||
" =====================================================================
|
||||
" Constants: {{{1
|
||||
if !exists("s:USAGE")
|
||||
let s:USAGE = 0
|
||||
let s:WARNING = 1
|
||||
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
|
||||
|
||||
" =====================================================================
|
||||
" Functions: {{{1
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" Vimball Format:
|
||||
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
|
||||
" 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.vmb, even if it exists
|
||||
" (usually accomplished with :MkVimball! ...
|
||||
" filename : base name of file to be created (ie. filename.vmb)
|
||||
" Output: a filename.vmb using vimball format:
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
|
||||
let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
|
||||
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)
|
||||
if a:1 =~ '\.vim$' || a:1 =~ '\.txt$'
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
|
||||
else
|
||||
let vbname= a:1
|
||||
endif
|
||||
if vbname !~ '\.vmb$'
|
||||
let vbname= vbname.'.vmb'
|
||||
endif
|
||||
" call Decho("vbname<".vbname.">")
|
||||
if !a:writelevel && a:1 =~ '[\/]'
|
||||
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")
|
||||
return
|
||||
endif
|
||||
if !a:writelevel && filereadable(vbname)
|
||||
echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
|
||||
call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
|
||||
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
|
||||
return
|
||||
endif
|
||||
|
||||
" user option bypass
|
||||
call s:SaveSettings()
|
||||
call vimball#SaveSettings()
|
||||
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) | break | endif
|
||||
endfor
|
||||
if home == ""
|
||||
let home= substitute(&rtp,',.*$','','')
|
||||
if a:0 >= 2
|
||||
" allow user to specify where to get the files
|
||||
let home= expand(a:2)
|
||||
else
|
||||
" use first existing directory from rtp
|
||||
let home= vimball#VimballHome()
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let home= substitute(home,'/','\\','ge')
|
||||
endif
|
||||
" call Decho("home<".home.">")
|
||||
|
||||
" save current directory
|
||||
let curdir = getcwd()
|
||||
@@ -68,9 +124,9 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" call Decho("svfile<".svfile.">")
|
||||
|
||||
if !filereadable(svfile)
|
||||
echohl Error | echo "unable to read file<".svfile.">" | echohl None
|
||||
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
|
||||
call s:ChgDir(curdir)
|
||||
call s:RestoreSettings()
|
||||
call vimball#RestoreSettings()
|
||||
" call Dret("MkVimball")
|
||||
return
|
||||
endif
|
||||
@@ -78,7 +134,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" create/switch to mkvimball tab
|
||||
if !exists("vbtabnr")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
sil! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
else
|
||||
exe "tabn ".vbtabnr
|
||||
@@ -89,15 +145,14 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
|
||||
call setline(2,'UseVimball')
|
||||
call setline(3,'finish')
|
||||
let lastline= 4
|
||||
let lastline= line("$") + 1
|
||||
endif
|
||||
call setline(lastline ,svfile)
|
||||
call setline(lastline ,substitute(svfile,'$',' [[[1',''))
|
||||
call setline(lastline+1,0)
|
||||
|
||||
" write the file from the tab
|
||||
let svfilepath= s:Path(svfile,'')
|
||||
" call Decho("exe $r ".svfilepath)
|
||||
exe "$r ".svfilepath
|
||||
" call Decho("exe $r ".fnameescape(svfile))
|
||||
exe "$r ".fnameescape(svfile)
|
||||
|
||||
call setline(lastline+1,line("$") - lastline - 1)
|
||||
" call Decho("lastline=".lastline." line$=".line("$"))
|
||||
@@ -110,14 +165,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
" write the vimball
|
||||
exe "tabn ".vbtabnr
|
||||
call s:ChgDir(curdir)
|
||||
setlocal ff=unix
|
||||
if a:writelevel
|
||||
let vbnamepath= s:Path(vbname,'')
|
||||
" call Decho("exe w! ".vbnamepath)
|
||||
exe "w! ".vbnamepath
|
||||
" call Decho("exe w! ".fnameescape(vbname))
|
||||
exe "w! ".fnameescape(vbname)
|
||||
else
|
||||
let vbnamepath= s:Path(vbname,'')
|
||||
" call Decho("exe w ".vbnamepath)
|
||||
exe "w ".vbnamepath
|
||||
" call Decho("exe w ".fnameescape(vbname))
|
||||
exe "w ".fnameescape(vbname)
|
||||
endif
|
||||
" call Decho("Vimball<".vbname."> created")
|
||||
echo "Vimball<".vbname."> created"
|
||||
@@ -128,56 +182,77 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
|
||||
exe "tabc ".vbtabnr
|
||||
|
||||
" restore options
|
||||
call s:RestoreSettings()
|
||||
call vimball#RestoreSettings()
|
||||
|
||||
" call Dret("MkVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Vimball: {{{2
|
||||
fun! vimball#Vimball(really)
|
||||
" call Dfunc("Vimball(really=".a:really.")")
|
||||
" vimball#Vimball: extract and distribute contents from a vimball {{{2
|
||||
" (invoked the the UseVimball command embedded in
|
||||
" vimballs' prologue)
|
||||
fun! vimball#Vimball(really,...)
|
||||
" 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 (pls upgrade to vim 7.2 or later)"
|
||||
" call Dret("vimball#Vimball : needs 7.1 with patch 299 or later")
|
||||
return
|
||||
endif
|
||||
|
||||
if getline(1) !~ '^" Vimball Archiver'
|
||||
echoerr "(Vimball) The current file does not appear to be a Vimball!"
|
||||
" call Dret("Vimball")
|
||||
" call Dret("vimball#Vimball")
|
||||
return
|
||||
endif
|
||||
|
||||
" set up standard settings
|
||||
call s:SaveSettings()
|
||||
let curtabnr = tabpagenr()
|
||||
call vimball#SaveSettings()
|
||||
let curtabnr = tabpagenr()
|
||||
let vimballfile = expand("%:tr")
|
||||
|
||||
" set up vimball tab
|
||||
" call Decho("setting up vimball tab")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
sil! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
let didhelp= ""
|
||||
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) | break | endif
|
||||
endfor
|
||||
if home == ""
|
||||
let home= substitute(&rtp,',.*$','','')
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let home= substitute(home,'/','\\','ge')
|
||||
if a:0 > 0
|
||||
" let user specify the directory where the vimball is to be unpacked.
|
||||
" If, however, the user did not specify a full path, set the home to be below the current directory
|
||||
let home= expand(a:1)
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if home !~ '^\a:[/\\]'
|
||||
let home= getcwd().'/'.a:1
|
||||
endif
|
||||
elseif home !~ '^/'
|
||||
let home= getcwd().'/'.a:1
|
||||
endif
|
||||
else
|
||||
let home= vimball#VimballHome()
|
||||
endif
|
||||
" call Decho("home<".home.">")
|
||||
|
||||
" save current directory
|
||||
" save current directory and remove older same-named vimball, if any
|
||||
let curdir = getcwd()
|
||||
" call Decho("home<".home.">")
|
||||
" call Decho("curdir<".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
let s:ok_unablefind= 1
|
||||
call vimball#RmVimball(vimballfile)
|
||||
unlet s:ok_unablefind
|
||||
|
||||
let linenr = 4
|
||||
let filecnt = 0
|
||||
|
||||
" give title to listing of (extracted) files from Vimball Archive
|
||||
if a:really
|
||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||
else
|
||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||
echohl Title | echomsg "Vimball Archive" | echohl None
|
||||
else
|
||||
echohl Title | echomsg "Vimball Archive Listing" | echohl None
|
||||
echohl Statement | echomsg "files would be placed under: ".home | echohl None
|
||||
endif
|
||||
|
||||
@@ -186,9 +261,13 @@ fun! vimball#Vimball(really)
|
||||
exe "tabn ".curtabnr
|
||||
" call Decho("linenr=".linenr." line$=".line("$"))
|
||||
while 1 < linenr && linenr < line("$")
|
||||
let fname = getline(linenr)
|
||||
let fsize = getline(linenr+1)
|
||||
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
||||
let fname = substitute(fname,'\\','/','g')
|
||||
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
|
||||
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
|
||||
let filecnt = filecnt + 1
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
|
||||
|
||||
if a:really
|
||||
echomsg "extracted <".fname.">: ".fsize." lines"
|
||||
else
|
||||
@@ -197,16 +276,37 @@ fun! vimball#Vimball(really)
|
||||
" call Decho("using L#".linenr.": will extract file<".fname.">")
|
||||
" call Decho("using L#".(linenr+1).": fsize=".fsize)
|
||||
|
||||
" Allow AsNeeded/ directory to take place of plugin/ directory
|
||||
" when AsNeeded/filename is filereadable or was present in VimballRecord
|
||||
if fname =~ '\<plugin/'
|
||||
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
|
||||
if filereadable(anfname) || (exists("s:VBRstring") && s:VBRstring =~ anfname)
|
||||
" call Decho("using anfname<".anfname."> instead of <".fname.">")
|
||||
let fname= anfname
|
||||
endif
|
||||
endif
|
||||
|
||||
" make directories if they don't exist yet
|
||||
" call Decho("making directories if they don't exist yet")
|
||||
if a:really
|
||||
let fnamebuf= fname
|
||||
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
|
||||
let fnamebuf= substitute(fname,'\\','/','g')
|
||||
let dirpath = substitute(home,'\\','/','g')
|
||||
" call Decho("init: fnamebuf<".fnamebuf.">")
|
||||
" call Decho("init: dirpath <".dirpath.">")
|
||||
while fnamebuf =~ '/'
|
||||
let dirname = home."/".substitute(fnamebuf,'/.*$','','e')
|
||||
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
|
||||
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
|
||||
let dirpath = dirname
|
||||
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
|
||||
" call Decho("dirname<".dirname.">")
|
||||
" call Decho("dirpath<".dirpath.">")
|
||||
if !isdirectory(dirname)
|
||||
" call Decho("making <".dirname.">")
|
||||
call mkdir(dirname)
|
||||
" call Decho("making <".dirname.">")
|
||||
if exists("g:vimball_mkdir")
|
||||
call system(g:vimball_mkdir." ".shellescape(dirname))
|
||||
else
|
||||
call mkdir(dirname)
|
||||
endif
|
||||
call s:RecordInVar(home,"rmdir('".dirname."')")
|
||||
endif
|
||||
endwhile
|
||||
endif
|
||||
@@ -217,47 +317,55 @@ fun! vimball#Vimball(really)
|
||||
let linenr = linenr + 2
|
||||
let lastline = linenr + fsize - 1
|
||||
" call Decho("exe ".linenr.",".lastline."yank a")
|
||||
exe "silent ".linenr.",".lastline."yank a"
|
||||
" no point in handling a zero-length file
|
||||
if lastline >= linenr
|
||||
exe "silent ".linenr.",".lastline."yank a"
|
||||
|
||||
" copy "a" buffer into tab
|
||||
" copy "a" buffer into tab
|
||||
" call Decho('copy "a buffer into tab#'.vbtabnr)
|
||||
exe "tabn ".vbtabnr
|
||||
silent! %d
|
||||
silent put a
|
||||
1
|
||||
silent d
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal ma
|
||||
sil! %d
|
||||
silent put a
|
||||
1
|
||||
sil! d
|
||||
|
||||
" write tab to file
|
||||
if a:really
|
||||
let fnamepath= s:Path(home."/".fname,'')
|
||||
" call Decho("exe w! ".fnamepath)
|
||||
exe "silent w! ".fnamepath
|
||||
echo "wrote ".fnamepath
|
||||
endif
|
||||
" write tab to file
|
||||
if a:really
|
||||
let fnamepath= home."/".fname
|
||||
" call Decho("exe w! ".fnameescape(fnamepath))
|
||||
if fenc != ""
|
||||
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."')")
|
||||
endif
|
||||
|
||||
" return to tab with vimball
|
||||
" return to tab with vimball
|
||||
" call Decho("exe tabn ".curtabnr)
|
||||
exe "tabn ".curtabnr
|
||||
exe "tabn ".curtabnr
|
||||
|
||||
" set up help if its a doc/*.txt file
|
||||
" set up help if its a doc/*.txt file
|
||||
" call Decho("didhelp<".didhelp."> fname<".fname.">")
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
|
||||
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.\(txt\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
" call Decho("didhelp<".didhelp.">")
|
||||
endif
|
||||
endif
|
||||
|
||||
" update for next file
|
||||
" let oldlinenr = linenr " Decho
|
||||
let linenr = linenr + fsize
|
||||
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] = ".linenr)
|
||||
" call Decho("update linenr= [linenr=".linenr."] + [fsize=".fsize."] = ".(linenr+fsize))
|
||||
let linenr= linenr + fsize
|
||||
endwhile
|
||||
|
||||
" set up help
|
||||
" call Decho("about to set up help: didhelp<".didhelp.">")
|
||||
if didhelp != ""
|
||||
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','ge'),' ')
|
||||
let htpath= home."/".didhelp
|
||||
" call Decho("exe helptags ".htpath)
|
||||
exe "helptags ".htpath
|
||||
exe "helptags ".fnameescape(htpath)
|
||||
echo "did helptags"
|
||||
endif
|
||||
|
||||
@@ -267,87 +375,343 @@ fun! vimball#Vimball(really)
|
||||
let filecnt= filecnt + 1
|
||||
endwhile
|
||||
|
||||
" record actions in <.VimballRecord>
|
||||
call s:RecordInFile(home)
|
||||
|
||||
" restore events, delete tab and buffer
|
||||
exe "tabn ".vbtabnr
|
||||
setlocal nomod bh=wipe
|
||||
exe "tabn ".curtabnr
|
||||
exe "tabc ".vbtabnr
|
||||
call s:RestoreSettings()
|
||||
call vimball#RestoreSettings()
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" call Dret("Vimball")
|
||||
" call Dret("vimball#Vimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#RmVimball: remove any files, remove any directories made by any {{{2
|
||||
" previous vimball extraction based on a file of the current
|
||||
" name.
|
||||
" Usage: RmVimball (assume current file is a vimball; remove)
|
||||
" RmVimball vimballname
|
||||
fun! vimball#RmVimball(...)
|
||||
" call Dfunc("vimball#RmVimball() a:0=".a:0)
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
|
||||
return
|
||||
endif
|
||||
|
||||
if a:0 == 0
|
||||
let curfile= expand("%:tr")
|
||||
" call Decho("case a:0=0: curfile<".curfile."> (used expand(%:tr))")
|
||||
else
|
||||
if a:1 =~ '[\/]'
|
||||
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
|
||||
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
|
||||
return
|
||||
endif
|
||||
let curfile= a:1
|
||||
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
|
||||
endif
|
||||
if curfile =~ '\.vmb$'
|
||||
let curfile= substitute(curfile,'\.vmb','','')
|
||||
elseif curfile =~ '\.vba$'
|
||||
let curfile= substitute(curfile,'\.vba','','')
|
||||
endif
|
||||
if a:0 >= 2
|
||||
let home= expand(a:2)
|
||||
else
|
||||
let home= vimball#VimballHome()
|
||||
endif
|
||||
let curdir = getcwd()
|
||||
" call Decho("home <".home.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
" call Decho("curdir <".curdir.">")
|
||||
|
||||
call s:ChgDir(home)
|
||||
if filereadable(".VimballRecord")
|
||||
" call Decho(".VimballRecord is readable")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
keepalt keepjumps 1split
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
let keepsrch= @/
|
||||
" call Decho('search for ^\M'.curfile.'.\m: ')
|
||||
" call Decho('search for ^\M'.curfile.'.\m{vba|vmb}: ')
|
||||
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.{vba|vmb}: ')
|
||||
if search('^\M'.curfile."\m: ".'cw')
|
||||
let foundit= 1
|
||||
elseif search('^\M'.curfile.".\mvmb: ",'cw')
|
||||
let foundit= 2
|
||||
elseif search('^\M'.curfile.'\m[-0-9.]*\.vmb: ','cw')
|
||||
let foundit= 2
|
||||
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
|
||||
if foundit == 1
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||
else
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vmb: ','','')
|
||||
endif
|
||||
let s:VBRstring= substitute(exestring,'call delete(','','g')
|
||||
let s:VBRstring= substitute(s:VBRstring,"[')]",'','g')
|
||||
" call Decho("exe ".exestring)
|
||||
sil! keepalt keepjumps exe exestring
|
||||
sil! keepalt keepjumps d
|
||||
let exestring= strlen(substitute(exestring,'call delete(.\{-})|\=',"D","g"))
|
||||
" call Decho("exestring<".exestring.">")
|
||||
echomsg "removed ".exestring." files"
|
||||
else
|
||||
let s:VBRstring= ''
|
||||
let curfile = substitute(curfile,'\.vmb','','')
|
||||
" 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
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
let @/= keepsrch
|
||||
endif
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
" call Dret("vimball#RmVimball")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#Decompress: attempts to automatically decompress vimballs {{{2
|
||||
fun! vimball#Decompress(fname)
|
||||
" call Dfunc("Decompress(fname<".a:fname.">)")
|
||||
fun! vimball#Decompress(fname,...)
|
||||
" call Dfunc("Decompress(fname<".a:fname.">) a:0=".a:0)
|
||||
|
||||
" decompression:
|
||||
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$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg("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")
|
||||
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$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg("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")
|
||||
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$','','')
|
||||
exe "e ".escape(fname,' \')
|
||||
call vimball#ShowMesg("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
|
||||
|
||||
if a:0 == 0| setlocal noma bt=nofile fmr=[[[,]]] fdm=marker | endif
|
||||
|
||||
" call Dret("Decompress")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" ChgDir: change directory (in spite of Windoze) {{{2
|
||||
" vimball#ShowMesg: {{{2
|
||||
fun! vimball#ShowMesg(level,msg)
|
||||
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
|
||||
|
||||
let rulerkeep = &ruler
|
||||
let showcmdkeep = &showcmd
|
||||
set noruler noshowcmd
|
||||
redraw!
|
||||
|
||||
if &fo =~ '[ta]'
|
||||
echomsg "***vimball*** ".a:msg
|
||||
else
|
||||
if a:level == s:WARNING || a:level == s:USAGE
|
||||
echohl WarningMsg
|
||||
elseif a:level == s:ERROR
|
||||
echohl Error
|
||||
endif
|
||||
echomsg "***vimball*** ".a:msg
|
||||
echohl None
|
||||
endif
|
||||
|
||||
if a:level != s:USAGE
|
||||
call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
|
||||
let &ruler = rulerkeep
|
||||
let &showcmd = showcmdkeep
|
||||
|
||||
" call Dret("vimball#ShowMesg")
|
||||
endfun
|
||||
" =====================================================================
|
||||
" s:ChgDir: change directory (in spite of Windoze) {{{2
|
||||
fun! s:ChgDir(newdir)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
exe 'silent cd '.escape(substitute(a:newdir,'/','\\','g'),' ')
|
||||
try
|
||||
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
|
||||
catch /^Vim\%((\a\+)\)\=:E/
|
||||
call mkdir(fnameescape(substitute(a:newdir,'/','\\','g')))
|
||||
exe 'silent cd '.fnameescape(substitute(a:newdir,'/','\\','g'))
|
||||
endtry
|
||||
else
|
||||
exe 'silent cd '.escape(a:newdir,' ')
|
||||
try
|
||||
exe 'silent cd '.fnameescape(a:newdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E/
|
||||
call mkdir(fnameescape(a:newdir))
|
||||
exe 'silent cd '.fnameescape(a:newdir)
|
||||
endtry
|
||||
endif
|
||||
" call Dret("ChgDir")
|
||||
" call Dret("ChgDir : curdir<".getcwd().">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Path: {{{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,'/','\\','ge').a:quote
|
||||
" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
|
||||
fun! s:RecordInVar(home,cmd)
|
||||
" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
|
||||
if a:cmd =~ '^rmdir'
|
||||
" if !exists("s:recorddir")
|
||||
" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" else
|
||||
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
|
||||
" endif
|
||||
elseif !exists("s:recordfile")
|
||||
let s:recordfile= a:cmd
|
||||
else
|
||||
let cmdpath= a:quote.a:cmd.a:quote
|
||||
let s:recordfile= s:recordfile."|".a:cmd
|
||||
endif
|
||||
if a:quote == ""
|
||||
let cmdpath= escape(cmdpath,' ')
|
||||
endif
|
||||
" call Dret("Path <".cmdpath.">")
|
||||
return cmdpath
|
||||
" call Dret("RecordInVar : s:recordfile<".(exists("s:recordfile")? s:recordfile : "")."> s:recorddir<".(exists("s:recorddir")? s:recorddir : "").">")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#ShowMesg: {{{2
|
||||
fun! vimball#ShowMesg(msg)
|
||||
" call Dfunc("vimball#ShowMesg(msg<".a:msg.">)")
|
||||
let ich= 1
|
||||
echohl WarningMsg | echo a:msg | echohl None
|
||||
while ich < &ch
|
||||
echo " "
|
||||
let ich= ich + 1
|
||||
endwhile
|
||||
" call Dret("vimball#ShowMesg")
|
||||
" s:RecordInFile: {{{2
|
||||
fun! s:RecordInFile(home)
|
||||
" call Dfunc("s:RecordInFile()")
|
||||
if exists("g:vimball_norecord")
|
||||
" call Dret("s:RecordInFile : g:vimball_norecord")
|
||||
return
|
||||
endif
|
||||
|
||||
if exists("s:recordfile") || exists("s:recorddir")
|
||||
let curdir= getcwd()
|
||||
call s:ChgDir(a:home)
|
||||
keepalt keepjumps 1split
|
||||
|
||||
let cmd= expand("%:tr").": "
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
setlocal ma
|
||||
$
|
||||
if exists("s:recordfile") && exists("s:recorddir")
|
||||
let cmd= cmd.s:recordfile."|".s:recorddir
|
||||
elseif exists("s:recorddir")
|
||||
let cmd= cmd.s:recorddir
|
||||
elseif exists("s:recordfile")
|
||||
let cmd= cmd.s:recordfile
|
||||
else
|
||||
" call Dret("s:RecordInFile : neither recordfile nor recorddir exist")
|
||||
return
|
||||
endif
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
" put command into buffer, write .VimballRecord `file
|
||||
keepalt keepjumps put=cmd
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
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
|
||||
" call Decho("s:record[file|dir] doesn't exist")
|
||||
endif
|
||||
|
||||
" call Dret("s:RecordInFile")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:SaveSettings: {{{2
|
||||
fun! s:SaveSettings()
|
||||
" vimball#VimballHome: determine/get home directory path (usually from rtp) {{{2
|
||||
fun! vimball#VimballHome()
|
||||
" call Dfunc("vimball#VimballHome()")
|
||||
if exists("g:vimball_home")
|
||||
let home= g:vimball_home
|
||||
else
|
||||
" go to vim plugin home
|
||||
for home in split(&rtp,',') + ['']
|
||||
if isdirectory(home) && filewritable(home) | break | endif
|
||||
let basehome= substitute(home,'[/\\]\.vim$','','')
|
||||
if isdirectory(basehome) && filewritable(basehome)
|
||||
let home= basehome."/.vim"
|
||||
break
|
||||
endif
|
||||
endfor
|
||||
if home == ""
|
||||
" just pick the first directory
|
||||
let home= substitute(&rtp,',.*$','','')
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
let home= substitute(home,'/','\\','g')
|
||||
endif
|
||||
endif
|
||||
" 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
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" vimball#SaveSettings: {{{2
|
||||
fun! vimball#SaveSettings()
|
||||
" call Dfunc("SaveSettings()")
|
||||
let s:makeep = getpos("'a")
|
||||
let s:regakeep= @a
|
||||
@@ -355,49 +719,57 @@ fun! s:SaveSettings()
|
||||
let s:acdkeep = &acd
|
||||
endif
|
||||
let s:eikeep = &ei
|
||||
let s:fenkeep = &fen
|
||||
let s:fenkeep = &l:fen
|
||||
let s:hidkeep = &hidden
|
||||
let s:ickeep = &ic
|
||||
let s:lzkeep = &lz
|
||||
let s:pmkeep = &pm
|
||||
let s:repkeep = &report
|
||||
let s:vekeep = &ve
|
||||
let s:ffkeep = &l:ff
|
||||
let s:swfkeep = &l:swf
|
||||
if exists("&acd")
|
||||
set ei=all ve=all noacd nofen noic report=999 nohid
|
||||
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
|
||||
else
|
||||
set ei=all ve=all nofen noic report=999 nohid
|
||||
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
|
||||
endif
|
||||
" vimballs should be in unix format
|
||||
setlocal ff=unix
|
||||
" call Dret("SaveSettings")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:RestoreSettings: {{{2
|
||||
fun! s:RestoreSettings()
|
||||
" vimball#RestoreSettings: {{{2
|
||||
fun! vimball#RestoreSettings()
|
||||
" call Dfunc("RestoreSettings()")
|
||||
let @a = s:regakeep
|
||||
if exists("&acd")
|
||||
let &acd = s:acdkeep
|
||||
endif
|
||||
let &ei = s:eikeep
|
||||
let &fen = s:fenkeep
|
||||
let &l:fen = s:fenkeep
|
||||
let &hidden = s:hidkeep
|
||||
let &ic = s:ickeep
|
||||
let &lz = s:lzkeep
|
||||
let &pm = s:pmkeep
|
||||
let &report = s:repkeep
|
||||
let &ve = s:vekeep
|
||||
let &ei = s:eikeep
|
||||
let &l:ff = s:ffkeep
|
||||
if s:makeep[0] != 0
|
||||
" restore mark a
|
||||
" call Decho("restore mark-a: makeep=".string(makeep))
|
||||
call setpos("'a",s:makeep)
|
||||
endif
|
||||
if exists("&acd")
|
||||
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
|
||||
else
|
||||
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
|
||||
unlet s:acdkeep
|
||||
endif
|
||||
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")
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
let &cpo= s:keepcpo
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
" =====================================================================
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
|
||||
@@ -381,4 +381,3 @@ let g:xmldata_html32 = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -466,4 +466,3 @@ let g:xmldata_html401t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -408,4 +408,3 @@ let g:xmldata_html401s = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -458,4 +458,3 @@ let g:xmldata_html401t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -466,4 +466,3 @@ let g:xmldata_html40t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -408,4 +408,3 @@ let g:xmldata_html40s = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -458,4 +458,3 @@ let g:xmldata_html40t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -467,4 +467,3 @@ let g:xmldata_xhtml10f = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -408,4 +408,3 @@ let g:xmldata_xhtml10s = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -458,4 +458,3 @@ let g:xmldata_xhtml10t = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
@@ -432,4 +432,3 @@ let g:xmldata_xhtml11 = {
|
||||
\ 'param': ['/>', ''],
|
||||
\ }
|
||||
\ }
|
||||
" vim:ft=vim:ff=unix
|
||||
|
||||
130
runtime/autoload/xml/xsd.vim
Normal file
130
runtime/autoload/xml/xsd.vim
Normal file
@@ -0,0 +1,130 @@
|
||||
" Author: Thomas Barthel
|
||||
" Last change: 2007 May 8
|
||||
let g:xmldata_xsd = {
|
||||
\ 'schema': [
|
||||
\ [ 'include', 'import', 'redefine', 'annotation', 'simpleType', 'complexType', 'element', 'attribute', 'attributeGroup', 'group', 'notation', 'annotation'],
|
||||
\ { 'targetNamespace' : [], 'version' : [], 'xmlns' : [], 'finalDefault' : [], 'blockDefault' : [], 'id' : [], 'elementFormDefault' : [], 'attributeFormDefault' : [], 'xml:lang' : [] }],
|
||||
\ 'redefine' : [
|
||||
\ ['annotation', 'simpleType', 'complexType', 'attributeGroup', 'group'],
|
||||
\ {'schemaLocation' : [], 'id' : []} ],
|
||||
\ 'include' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'id' : []} ],
|
||||
\ 'import' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'schemaLocation' : [], 'id' : []} ],
|
||||
\ 'complexType' : [
|
||||
\ ['annotation', 'simpleContent', 'complexContent', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
|
||||
\ {'name' : [], 'id' : [], 'abstract' : [], 'final' : [], 'block' : [], 'mixed' : []} ],
|
||||
\ 'complexContent' : [
|
||||
\ ['annotation', 'restriction', 'extension'],
|
||||
\ {'mixed' : [], 'id' : [] } ],
|
||||
\ 'simpleType' : [
|
||||
\ ['annotation', 'restriction', 'list', 'union'],
|
||||
\ {'name' : [], 'final' : [], 'id' : []} ],
|
||||
\ 'simpleContent' : [
|
||||
\ ['annotation', 'restriction', 'extension'],
|
||||
\ {'id' : []} ],
|
||||
\ 'element' : [
|
||||
\ ['annotation', 'complexType', 'simpleType', 'unique', 'key', 'keyref'],
|
||||
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'minOccurs' : [], 'maxOccurs' : [], 'nillable' : [], 'substitutionGroup' : [], 'abstract' : [], 'final' : [], 'block' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
|
||||
\ 'attribute' : [
|
||||
\ ['annotation', 'simpleType'],
|
||||
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'use' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
|
||||
\ 'group' : [
|
||||
\ ['annotation', 'all', 'choice', 'sequence'],
|
||||
\ {'name' : [], 'ref' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'choice' : [
|
||||
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
|
||||
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'sequence' : [
|
||||
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
|
||||
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'all' : [
|
||||
\ ['annotation', 'element'],
|
||||
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'any' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'processContents' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
|
||||
\ 'unique' : [
|
||||
\ ['annotation', 'selector', 'field'],
|
||||
\ {'name' : [], 'id' : []} ],
|
||||
\ 'key' : [
|
||||
\ ['annotation', 'selector', 'field'],
|
||||
\ {'name' : [], 'id' : []} ],
|
||||
\ 'keyref' : [
|
||||
\ ['annotation', 'selector', 'field'],
|
||||
\ {'name' : [], 'refer' : [], 'id' : []} ],
|
||||
\ 'selector' : [
|
||||
\ ['annotation'],
|
||||
\ {'xpath' : [], 'id' : []} ],
|
||||
\ 'field' : [
|
||||
\ ['annotation'],
|
||||
\ {'xpath' : [], 'id' : []} ],
|
||||
\ 'restriction' : [
|
||||
\ ['annotation', 'simpleType', 'minExclusive', 'maxExclusive', 'minInclusive', 'maxInclusive', 'totalDigits', 'fractionDigits', 'length', 'minLength', 'maxLength', 'enumeration', 'whiteSpace', 'pattern'],
|
||||
\ {'base' : [], 'id' : []} ],
|
||||
\ 'minExclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'maxExclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'minInclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'maxInclusive' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'totalDigits' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'fractionDigits' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'length' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'minLength' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'maxLength' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'enumeration' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : []}],
|
||||
\ 'whiteSpace' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : [], 'fixed' : []}],
|
||||
\ 'pattern' : [
|
||||
\ ['annotation'],
|
||||
\ {'value' : [], 'id' : []}],
|
||||
\ 'extension' : [
|
||||
\ ['annotation', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
|
||||
\ {'base' : [], 'id' : []} ],
|
||||
\ 'attributeGroup' : [
|
||||
\ ['annotation', 'attribute', 'attributeGroup', 'anyAttribute'],
|
||||
\ {'name' : [], 'id' : [], 'ref' : []} ],
|
||||
\ 'anyAttribute' : [
|
||||
\ ['annotation'],
|
||||
\ {'namespace' : [], 'processContents' : [], 'id' : []} ],
|
||||
\ 'list' : [
|
||||
\ ['annotation', 'simpleType'],
|
||||
\ {'itemType' : [], 'id' : []} ],
|
||||
\ 'union' : [
|
||||
\ ['annotation', 'simpleType'],
|
||||
\ {'id' : [], 'memberTypes' : []} ],
|
||||
\ 'notation' : [
|
||||
\ ['annotation'],
|
||||
\ {'name' : [], 'id' : [], 'public' : [], 'system' : []} ],
|
||||
\ 'annotation' : [
|
||||
\ ['appinfo', 'documentation'],
|
||||
\ {} ],
|
||||
\ 'appinfo' : [
|
||||
\ [],
|
||||
\ {'source' : [], 'id' : []} ],
|
||||
\ 'documentation' : [
|
||||
\ [],
|
||||
\ {'source' : [], 'id' : [], 'xml' : []} ]
|
||||
\ }
|
||||
@@ -1,7 +1,9 @@
|
||||
" Author: Mikolaj Machowski, Thomas Bartel
|
||||
" Last change: 2007 May 8
|
||||
let g:xmldata_xsl = {
|
||||
\ 'apply-imports' : [[], {}],
|
||||
\ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}],
|
||||
\ 'attribute' : [[], {'name' : [], 'namespace' : []}],
|
||||
\ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}],
|
||||
\ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}],
|
||||
\ 'call-template' : [['with-param'], {'name' : []}],
|
||||
\ 'choose' : [['when', 'otherwise'], {}],
|
||||
@@ -9,10 +11,10 @@ let g:xmldata_xsl = {
|
||||
\ 'copy' : [[], {'use-attribute-sets' : []}],
|
||||
\ 'copy-of' : [[], {'select' : []}],
|
||||
\ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}],
|
||||
\ 'element' : [[], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
|
||||
\ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
|
||||
\ 'fallback' : [[], {}],
|
||||
\ 'for-each' : [['sort'], {'select' : []}],
|
||||
\ 'if' : [[], {'test' : []}],
|
||||
\ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}],
|
||||
\ 'import' : [[], {'href' : []}],
|
||||
\ 'include' : [[], {'href' : []}],
|
||||
\ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}],
|
||||
@@ -21,17 +23,16 @@ let g:xmldata_xsl = {
|
||||
\ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}],
|
||||
\ 'otherwise' : [[], {}],
|
||||
\ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}],
|
||||
\ 'param' : [[], {'name' : [], 'select' : []}],
|
||||
\ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
|
||||
\ 'preserve-space' : [[], {'elements' : []}],
|
||||
\ 'processing-instruction' : [[], {'name' : []}],
|
||||
\ 'processing-instructionruction' : [[], {'name' : []}],
|
||||
\ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}],
|
||||
\ 'strip-space' : [[], {'elements' : []}],
|
||||
\ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}],
|
||||
\ 'template' : [['param'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
|
||||
\ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
|
||||
\ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}],
|
||||
\ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}],
|
||||
\ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}],
|
||||
\ 'variable' : [[], {'name' : [], 'select' : []}],
|
||||
\ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
|
||||
\ 'when' : [[], {'test' : []}],
|
||||
\ 'with-param' : [[], {'name' : [], 'select' : []}]}
|
||||
|
||||
\ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]}
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
" Vim completion script
|
||||
" Language: XML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2006 Aug 15
|
||||
" Version: 1.9
|
||||
"
|
||||
" Changelog:
|
||||
" 1.9 - 2007 Aug 15
|
||||
" - fix closing of namespaced tags (Johannes Weiss)
|
||||
" 1.8 - 2006 Jul 18
|
||||
" - allow for closing of xml tags even when data file isn't available
|
||||
|
||||
" This function will create Dictionary with users namespace strings and values
|
||||
" canonical (system) names of data files. Names should be lowercase,
|
||||
@@ -80,7 +87,7 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
let context_line = getline(curline-i)
|
||||
if context_line =~ '<[^>]*$'
|
||||
" Yep, this is this line
|
||||
let context_lines = getline(curline-i, curline)
|
||||
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
|
||||
let b:compl_context = join(context_lines, ' ')
|
||||
break
|
||||
elseif context_line =~ '>[^<]*$' || i == curline
|
||||
@@ -106,10 +113,6 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
return start
|
||||
|
||||
else
|
||||
" There is no connection of namespace and data file. Abandon action
|
||||
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
|
||||
return []
|
||||
endif
|
||||
" Initialize base return lists
|
||||
let res = []
|
||||
let res2 = []
|
||||
@@ -119,6 +122,17 @@ function! xmlcomplete#CompleteTags(findstart, base)
|
||||
endif
|
||||
let context = matchstr(b:compl_context, '^<\zs.*')
|
||||
unlet! b:compl_context
|
||||
" There is no connection of namespace and data file.
|
||||
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
|
||||
" There is still possibility we may do something - eg. close tag
|
||||
let b:unaryTagsStack = "base meta link hr br param img area input col"
|
||||
if context =~ '^\/'
|
||||
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
|
||||
return [opentag.">"]
|
||||
else
|
||||
return []
|
||||
endif
|
||||
endif
|
||||
|
||||
" Make entities completion
|
||||
if exists("b:entitiescompl")
|
||||
@@ -401,12 +415,12 @@ function! xmlcomplete#GetLastOpenTag(unaryTagsStack)
|
||||
|
||||
if exists("b:xml_namespace")
|
||||
if b:xml_namespace == 'DEFAULT'
|
||||
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
|
||||
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
|
||||
else
|
||||
let tagpat='</\='.b:xml_namespace.':\(\k\|[.-]\)\+\|/>'
|
||||
endif
|
||||
else
|
||||
let tagpat='</\=\(\k\|[.-]\)\+\|/>'
|
||||
let tagpat='</\=\(\k\|[.:-]\)\+\|/>'
|
||||
endif
|
||||
while (linenum>0)
|
||||
let line=getline(linenum)
|
||||
|
||||
@@ -1,29 +1,56 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: May 01, 2006
|
||||
" Version: 9
|
||||
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
|
||||
" Date: Jan 17, 2012
|
||||
" Version: 25
|
||||
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
|
||||
" License: Vim License (see vim's :help license)
|
||||
" Copyright: Copyright (C) 2005-2012 Charles E. Campbell, Jr. {{{1
|
||||
" Permission is hereby granted to use and distribute this code,
|
||||
" with or without modifications, provided that this copyright
|
||||
" notice is copied with it. Like anything else that's free,
|
||||
" zipPlugin.vim is provided *as is* and comes with no warranty
|
||||
" of any kind, either expressed or implied. By using this
|
||||
" plugin, you agree that in no event will the copyright
|
||||
" zip.vim and zipPlugin.vim are provided *as is* and comes with
|
||||
" no warranty of any kind, either expressed or implied. By using
|
||||
" this plugin, you agree that in no event will the copyright
|
||||
" holder be liable for any damages resulting from the use
|
||||
" of this software.
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Initialization: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if exists("g:loaded_zip")
|
||||
" Load Once: {{{1
|
||||
if &cp || exists("g:loaded_zip")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_zip= "v25"
|
||||
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 = "v9"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
let s:ERROR = 2
|
||||
let s:WARNING = 1
|
||||
let s:NOTE = 0
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Global Values: {{{1
|
||||
if !exists("g:zip_shq")
|
||||
if &shq != ""
|
||||
let g:zip_shq= &shq
|
||||
elseif has("unix")
|
||||
let g:zip_shq= "'"
|
||||
else
|
||||
let g:zip_shq= '"'
|
||||
endif
|
||||
endif
|
||||
if !exists("g:zip_zipcmd")
|
||||
let g:zip_zipcmd= "zip"
|
||||
endif
|
||||
if !exists("g:zip_unzipcmd")
|
||||
let g:zip_unzipcmd= "unzip"
|
||||
endif
|
||||
|
||||
" ----------------
|
||||
" Functions: {{{1
|
||||
@@ -37,9 +64,16 @@ fun! zip#Browse(zipfile)
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable("unzip")
|
||||
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)
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse")
|
||||
return
|
||||
@@ -47,8 +81,9 @@ fun! zip#Browse(zipfile)
|
||||
if !filereadable(a:zipfile)
|
||||
if a:zipfile !~# '^\a\+://'
|
||||
" if its an url, don't complain, let url-handlers such as vim do its thing
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
endif
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
|
||||
@@ -58,7 +93,7 @@ fun! zip#Browse(zipfile)
|
||||
if &ma != 1
|
||||
set ma
|
||||
endif
|
||||
let w:zipfile= a:zipfile
|
||||
let b:zipfile= a:zipfile
|
||||
|
||||
setlocal noswapfile
|
||||
setlocal buftype=nofile
|
||||
@@ -68,36 +103,26 @@ fun! zip#Browse(zipfile)
|
||||
set ft=tar
|
||||
|
||||
" give header
|
||||
exe "$put ='".'\"'." zip.vim version ".g:loaded_zip."'"
|
||||
exe "$put ='".'\"'." Browsing zipfile ".a:zipfile."'"
|
||||
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
|
||||
$put =''
|
||||
0d
|
||||
$
|
||||
call append(0, ['" zip.vim version '.g:loaded_zip,
|
||||
\ '" Browsing zipfile '.a:zipfile,
|
||||
\ '" Select a file with cursor and press ENTER'])
|
||||
keepj $
|
||||
|
||||
" call Decho("exe silent r! unzip -l '".a:zipfile."'")
|
||||
exe "silent r! unzip -l '".a:zipfile."'"
|
||||
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
|
||||
exe "keepj sil! r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
|
||||
if v:shell_error != 0
|
||||
echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
silent %d
|
||||
redraw!
|
||||
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()
|
||||
keepj sil! %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".a:zipfile
|
||||
exe "keepj r ".fnameescape(a:zipfile)
|
||||
let &ei= eikeep
|
||||
1d
|
||||
keepj 1d
|
||||
" call Dret("zip#Browse")
|
||||
return
|
||||
endif
|
||||
" call Decho("line 6: ".getline(6))
|
||||
let namecol= stridx(getline(6),'Name') + 1
|
||||
" call Decho("namecol=".namecol)
|
||||
4,$g/^\s*----/d
|
||||
4,$g/^\s*\a/d
|
||||
$d
|
||||
if namecol > 0
|
||||
exe 'silent 4,$s/^.*\%'.namecol.'c//'
|
||||
endif
|
||||
|
||||
setlocal noma nomod ro
|
||||
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
|
||||
@@ -109,7 +134,7 @@ endfun
|
||||
" ---------------------------------------------------------------------
|
||||
" ZipBrowseSelect: {{{2
|
||||
fun! s:ZipBrowseSelect()
|
||||
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
|
||||
" call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
|
||||
let repkeep= &report
|
||||
set report=10
|
||||
let fname= getline(".")
|
||||
@@ -121,8 +146,9 @@ fun! s:ZipBrowseSelect()
|
||||
return
|
||||
endif
|
||||
if fname =~ '/$'
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("ZipBrowseSelect")
|
||||
return
|
||||
@@ -131,16 +157,18 @@ fun! s:ZipBrowseSelect()
|
||||
" call Decho("fname<".fname.">")
|
||||
|
||||
" get zipfile to the new-window
|
||||
let zipfile= substitute(w:zipfile,'.zip$','','e')
|
||||
let zipfile = b:zipfile
|
||||
let curfile= expand("%")
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
|
||||
new
|
||||
wincmd _
|
||||
if !exists("g:zip_nomax") || g:zip_nomax == 0
|
||||
wincmd _
|
||||
endif
|
||||
let s:zipfile_{winnr()}= curfile
|
||||
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape))
|
||||
exe "e zipfile:".escape(zipfile,s:zipfile_escape).'::'.escape(fname,s:zipfile_escape)
|
||||
" call Decho("exe e ".fnameescape("zipfile:".zipfile.'::'.fname))
|
||||
exe "e ".fnameescape("zipfile:".zipfile.'::'.fname)
|
||||
filetype detect
|
||||
|
||||
let &report= repkeep
|
||||
@@ -160,15 +188,17 @@ fun! zip#Read(fname,mode)
|
||||
else
|
||||
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
|
||||
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
|
||||
let fname = substitute(fname, '[', '[[]', 'g')
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
|
||||
" call Decho("exe r! unzip -p '".zipfile."' '".fname."'")
|
||||
exe "silent r! unzip -p '".zipfile."' '".fname."'"
|
||||
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1))
|
||||
exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
|
||||
filetype detect
|
||||
|
||||
" cleanup
|
||||
0d
|
||||
keepj 0d
|
||||
set nomod
|
||||
|
||||
let &report= repkeep
|
||||
@@ -183,16 +213,18 @@ fun! zip#Write(fname)
|
||||
set report=10
|
||||
|
||||
" sanity checks
|
||||
if !executable("zip")
|
||||
if !executable(g:zip_zipcmd)
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endif
|
||||
if !exists("*mkdir")
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
@@ -208,15 +240,11 @@ fun! zip#Write(fname)
|
||||
call mkdir(tmpdir,"p")
|
||||
|
||||
" attempt to change to the indicated directory
|
||||
try
|
||||
exe "cd ".escape(tmpdir,' \')
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
|
||||
let &report= repkeep
|
||||
" call Dret("zip#Write")
|
||||
return
|
||||
endtry
|
||||
endif
|
||||
" call Decho("current directory now: ".getcwd())
|
||||
|
||||
" place temporary files under .../_ZIPVIM_/
|
||||
@@ -240,7 +268,7 @@ fun! zip#Write(fname)
|
||||
if fname =~ '/'
|
||||
let dirpath = substitute(fname,'/[^/]\+$','','e')
|
||||
if executable("cygpath")
|
||||
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
|
||||
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
|
||||
endif
|
||||
" call Decho("mkdir(dirpath<".dirpath.">,p)")
|
||||
call mkdir(dirpath,"p")
|
||||
@@ -250,26 +278,31 @@ fun! zip#Write(fname)
|
||||
endif
|
||||
" call Decho("zipfile<".zipfile."> fname<".fname.">")
|
||||
|
||||
exe "w! ".escape(fname,s:zipfile_escape)
|
||||
exe "w! ".fnameescape(fname)
|
||||
if executable("cygpath")
|
||||
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
|
||||
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
|
||||
endif
|
||||
|
||||
" call Decho("zip -u '".zipfile.".zip' '".fname."'")
|
||||
call system("zip -u '".zipfile.".zip' '".fname."'")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
let fname = substitute(fname, '[', '[[]', 'g')
|
||||
endif
|
||||
|
||||
" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
|
||||
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
|
||||
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
|
||||
elseif s:zipfile_{winnr()} =~ '^\a\+://'
|
||||
" support writing zipfiles across a network
|
||||
let netzipfile= s:zipfile_{winnr()}
|
||||
" call Decho("handle writing <".zipfile.".zip> across network as <".netzipfile.">")
|
||||
" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
|
||||
1split|enew
|
||||
let binkeep= &binary
|
||||
let eikeep = &ei
|
||||
set binary ei=all
|
||||
exe "e! ".zipfile.".zip"
|
||||
exe "e! ".fnameescape(zipfile)
|
||||
call netrw#NetWrite(netzipfile)
|
||||
let &ei = eikeep
|
||||
let &binary = binkeep
|
||||
@@ -280,7 +313,8 @@ fun! zip#Write(fname)
|
||||
" cleanup and restore current directory
|
||||
cd ..
|
||||
call s:Rmdir("_ZIPVIM_")
|
||||
exe "cd ".escape(curdir,' \')
|
||||
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
|
||||
call s:Rmdir(tmpdir)
|
||||
setlocal nomod
|
||||
|
||||
let &report= repkeep
|
||||
@@ -288,17 +322,55 @@ fun! zip#Write(fname)
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Rmdir: {{{2
|
||||
" s:Escape: {{{2
|
||||
fun! s:Escape(fname,isfilt)
|
||||
" call Dfunc("QuoteFileDir(fname<".a:fname."> isfilt=".a:isfilt.")")
|
||||
if exists("*shellescape")
|
||||
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
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" ChgDir: {{{2
|
||||
fun! s:ChgDir(newdir,errlvl,errmsg)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
|
||||
|
||||
try
|
||||
exe "cd ".fnameescape(a:newdir)
|
||||
catch /^Vim\%((\a\+)\)\=:E344/
|
||||
redraw!
|
||||
if a:errlvl == s:NOTE
|
||||
echo "***note*** ".a:errmsg
|
||||
elseif a:errlvl == s:WARNING
|
||||
echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
|
||||
elseif a:errlvl == s:ERROR
|
||||
echohl Error | echo "***error*** ".a:errmsg | echohl NONE
|
||||
endif
|
||||
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
|
||||
" call Dret("ChgDir 1")
|
||||
return 1
|
||||
endtry
|
||||
|
||||
" call Dret("ChgDir 0")
|
||||
return 0
|
||||
endfun
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" s:Rmdir: {{{2
|
||||
fun! s:Rmdir(fname)
|
||||
" call Dfunc("Rmdir(fname<".a:fname.">)")
|
||||
if has("unix")
|
||||
call system("/bin/rm -rf ".a:fname)
|
||||
elseif has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell =~? "sh$"
|
||||
call system("/bin/rm -rf ".a:fname)
|
||||
else
|
||||
call system("del /S ".a:fname)
|
||||
endif
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
|
||||
call system("rmdir /S/Q ".s:Escape(a:fname,0))
|
||||
else
|
||||
call system("/bin/rm -rf ".s:Escape(a:fname,0))
|
||||
endif
|
||||
" call Dret("Rmdir")
|
||||
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:
|
||||
|
||||
- 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"?
|
||||
- Try setting 'hlsearch' and searching for a pattern, is the match easy to
|
||||
spot?
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
" vim: tw=0 ts=4 sw=4
|
||||
" Vim color file
|
||||
" Maintainer: Steven Vertigan <steven@vertigan.wattle.id.au>
|
||||
" Last Change: 2003 May 11
|
||||
" Revision #4: Support for new "Underline" group. Removed superfluous html
|
||||
" formatting.
|
||||
" Last Change: 2006 Sep 23
|
||||
" Revision #5: Switch main text from white to yellow for easier contrast,
|
||||
" fixed some problems with terminal backgrounds.
|
||||
|
||||
set background=dark
|
||||
hi clear
|
||||
@@ -12,66 +12,44 @@ if exists("syntax_on")
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name = "blue"
|
||||
hi Normal guifg=white guibg=darkBlue
|
||||
hi Normal ctermfg=white ctermbg=darkBlue
|
||||
hi Normal guifg=yellow guibg=darkBlue ctermfg=yellow ctermbg=darkBlue
|
||||
hi NonText guifg=magenta ctermfg=lightMagenta
|
||||
hi comment guifg=gray gui=bold
|
||||
hi comment ctermfg=gray
|
||||
hi comment guifg=gray ctermfg=gray ctermbg=darkBlue gui=bold
|
||||
hi constant guifg=cyan ctermfg=cyan
|
||||
hi identifier guifg=gray ctermfg=gray
|
||||
hi statement guifg=yellow gui=none ctermfg=yellow
|
||||
hi identifier guifg=gray ctermfg=red
|
||||
hi statement guifg=white ctermfg=white ctermbg=darkBlue gui=none
|
||||
hi preproc guifg=green ctermfg=green
|
||||
hi type guifg=orange ctermfg=darkYellow
|
||||
hi special guifg=magenta ctermfg=lightMagenta
|
||||
hi Underlined guifg=cyan ctermfg=cyan
|
||||
hi Underlined gui=underline cterm=underline
|
||||
hi type guifg=orange ctermfg=lightRed ctermbg=darkBlue
|
||||
hi special guifg=magenta ctermfg=lightMagenta ctermbg=darkBlue
|
||||
hi Underlined guifg=cyan ctermfg=cyan gui=underline cterm=underline
|
||||
hi label guifg=yellow ctermfg=yellow
|
||||
hi operator guifg=orange gui=bold ctermfg=lightRed ctermbg=darkBlue
|
||||
|
||||
hi ErrorMsg guifg=orange guibg=darkBlue
|
||||
hi ErrorMsg ctermfg=lightRed
|
||||
hi WarningMsg guifg=cyan guibg=darkBlue gui=bold
|
||||
hi WarningMsg ctermfg=cyan
|
||||
hi ModeMsg guifg=yellow gui=NONE
|
||||
hi ModeMsg ctermfg=yellow
|
||||
hi MoreMsg guifg=yellow gui=NONE
|
||||
hi MoreMsg ctermfg=yellow
|
||||
hi Error guifg=red guibg=darkBlue gui=underline
|
||||
hi Error ctermfg=red
|
||||
hi ErrorMsg guifg=orange guibg=darkBlue ctermfg=lightRed
|
||||
hi WarningMsg guifg=cyan guibg=darkBlue ctermfg=cyan gui=bold
|
||||
hi ModeMsg guifg=yellow gui=NONE ctermfg=yellow
|
||||
hi MoreMsg guifg=yellow gui=NONE ctermfg=yellow
|
||||
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red
|
||||
|
||||
hi Todo guifg=black guibg=orange
|
||||
hi Todo ctermfg=black ctermbg=darkYellow
|
||||
hi Cursor guifg=black guibg=white
|
||||
hi Cursor ctermfg=black ctermbg=white
|
||||
hi Search guifg=black guibg=orange
|
||||
hi Search ctermfg=black ctermbg=darkYellow
|
||||
hi IncSearch guifg=black guibg=yellow
|
||||
hi IncSearch ctermfg=black ctermbg=darkYellow
|
||||
hi LineNr guifg=pink ctermfg=lightMagenta
|
||||
hi Todo guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
|
||||
hi Cursor guifg=black guibg=white ctermfg=black ctermbg=white
|
||||
hi Search guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
|
||||
hi IncSearch guifg=black guibg=yellow ctermfg=black ctermbg=darkYellow
|
||||
hi LineNr guifg=cyan ctermfg=cyan
|
||||
hi title guifg=white gui=bold cterm=bold
|
||||
|
||||
hi StatusLineNC gui=NONE guifg=black guibg=blue
|
||||
hi StatusLineNC ctermfg=black ctermbg=blue
|
||||
hi StatusLine gui=bold guifg=cyan guibg=blue
|
||||
hi StatusLine ctermfg=cyan ctermbg=blue
|
||||
hi StatusLineNC gui=NONE guifg=black guibg=blue ctermfg=black ctermbg=blue
|
||||
hi StatusLine gui=bold guifg=cyan guibg=blue ctermfg=cyan ctermbg=blue
|
||||
hi VertSplit gui=none guifg=blue guibg=blue ctermfg=blue ctermbg=blue
|
||||
|
||||
hi label guifg=yellow ctermfg=yellow
|
||||
hi operator guifg=orange gui=bold ctermfg=darkYellow
|
||||
hi clear Visual
|
||||
hi Visual term=reverse
|
||||
hi Visual ctermfg=black ctermbg=darkCyan
|
||||
hi Visual guifg=black guibg=darkCyan
|
||||
hi Visual term=reverse ctermfg=black ctermbg=darkCyan guifg=black guibg=darkCyan
|
||||
|
||||
hi DiffChange guibg=darkGreen guifg=black
|
||||
hi DiffChange ctermbg=darkGreen ctermfg=black
|
||||
hi DiffText guibg=olivedrab guifg=black
|
||||
hi DiffText ctermbg=lightGreen ctermfg=black
|
||||
hi DiffAdd guibg=slateblue guifg=black
|
||||
hi DiffAdd ctermbg=blue ctermfg=black
|
||||
hi DiffDelete guibg=coral guifg=black
|
||||
hi DiffDelete ctermbg=cyan ctermfg=black
|
||||
hi DiffChange guibg=darkGreen guifg=black ctermbg=darkGreen ctermfg=black
|
||||
hi DiffText guibg=olivedrab guifg=black ctermbg=lightGreen ctermfg=black
|
||||
hi DiffAdd guibg=slateblue guifg=black ctermbg=blue ctermfg=black
|
||||
hi DiffDelete guibg=coral guifg=black ctermbg=cyan ctermfg=black
|
||||
|
||||
hi Folded guibg=orange guifg=black
|
||||
hi Folded ctermbg=yellow ctermfg=black
|
||||
hi FoldColumn guibg=gray30 guifg=black
|
||||
hi FoldColumn ctermbg=gray ctermfg=black
|
||||
hi Folded guibg=orange guifg=black ctermbg=yellow ctermfg=black
|
||||
hi FoldColumn guibg=gray30 guifg=black ctermbg=gray ctermfg=black
|
||||
hi cIf0 guifg=gray ctermfg=gray
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim color file
|
||||
" Maintainer: Bohdan Vlasyuk <bohdan@vstu.edu.ua>
|
||||
" Last Change: 2006 Apr 30
|
||||
" Last Change: 2008 Jul 18
|
||||
|
||||
" darkblue -- for those who prefer dark background
|
||||
" [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 Underlined cterm=underline term=underline
|
||||
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
|
||||
" Maintainer: Hans Fugal <hans@fugal.net>
|
||||
" Last Change: $Date$
|
||||
" Last Change: $Date$
|
||||
" Last Change: $Date: 2004/06/13 19:30:30 $
|
||||
" Last Change: $Date: 2004/06/13 19:30:30 $
|
||||
" 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
|
||||
" :he group-name
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" vim: tw=0 ts=4 sw=4
|
||||
" Vim color file
|
||||
" Maintainer: Ron Aaron <ron@ronware.org>
|
||||
" Last Change: 2006 Mar 26
|
||||
" Last Change: 2006 Dec 10
|
||||
|
||||
hi clear
|
||||
set background=dark
|
||||
@@ -13,11 +13,11 @@ let g:colors_name = "koehler"
|
||||
hi Normal guifg=white guibg=black
|
||||
hi Scrollbar guifg=darkcyan guibg=cyan
|
||||
hi Menu guifg=black guibg=cyan
|
||||
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=Blue
|
||||
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=Blue
|
||||
hi Directory term=bold cterm=bold ctermfg=brown guifg=Blue
|
||||
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=blue guifg=White guibg=Red
|
||||
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
|
||||
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=#cc0000
|
||||
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=#cc0000
|
||||
hi Directory term=bold cterm=bold ctermfg=brown guifg=#cc8000
|
||||
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=red guifg=White guibg=Red
|
||||
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
|
||||
hi MoreMsg term=bold cterm=bold ctermfg=darkgreen gui=bold guifg=SeaGreen
|
||||
hi ModeMsg term=bold cterm=bold gui=bold guifg=White guibg=Blue
|
||||
hi LineNr term=underline cterm=bold ctermfg=darkcyan guifg=Yellow
|
||||
@@ -26,20 +26,20 @@ hi StatusLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gu
|
||||
hi StatusLineNC term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
|
||||
hi Title term=bold cterm=bold ctermfg=darkmagenta gui=bold guifg=Magenta
|
||||
hi Visual term=reverse cterm=reverse gui=reverse
|
||||
hi WarningMsg term=standout cterm=bold ctermfg=darkblue guifg=Red
|
||||
hi WarningMsg term=standout cterm=bold ctermfg=darkred guifg=Red
|
||||
hi Cursor guifg=bg guibg=Green
|
||||
hi Comment term=bold cterm=bold ctermfg=cyan guifg=#80a0ff
|
||||
hi Constant term=underline cterm=bold ctermfg=magenta guifg=#ffa0a0
|
||||
hi Special term=bold cterm=bold ctermfg=red guifg=Orange
|
||||
hi Identifier term=underline ctermfg=brown guifg=#40ffff
|
||||
hi Statement term=bold cterm=bold ctermfg=yellow gui=bold guifg=#ffff60
|
||||
hi PreProc term=underline ctermfg=darkblue guifg=#ff80ff
|
||||
hi PreProc term=underline ctermfg=darkmagenta guifg=#ff80ff
|
||||
hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#60ff60
|
||||
hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black
|
||||
hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow
|
||||
hi CursorLine term=underline guibg=#555555
|
||||
hi CursorColumn term=underline guibg=#555555
|
||||
hi MatchParen term=reverse guibg=Blue
|
||||
hi CursorLine term=underline guibg=#555555 cterm=underline
|
||||
hi CursorColumn term=underline guibg=#555555 cterm=underline
|
||||
hi MatchParen term=reverse ctermfg=blue guibg=Blue
|
||||
hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
|
||||
hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
|
||||
hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
|
||||
|
||||
@@ -9,6 +9,7 @@ if version > 580
|
||||
syntax reset
|
||||
endif
|
||||
endif
|
||||
let colors_name = "slate"
|
||||
:hi Normal guifg=White guibg=grey15
|
||||
:hi Cursor guibg=khaki guifg=slategrey
|
||||
:hi VertSplit guibg=#c2bfa5 guifg=grey40 gui=none cterm=reverse
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim color file
|
||||
" Maintainer: Thorsten Maerz <info@netztorte.de>
|
||||
" Last Change: 2001 Jul 23
|
||||
" Last Change: 2006 Dec 07
|
||||
" grey on black
|
||||
" optimized for TFT panels
|
||||
|
||||
@@ -18,7 +18,7 @@ let g:colors_name = "torte"
|
||||
" GUI
|
||||
highlight Normal guifg=Grey80 guibg=Black
|
||||
highlight Search guifg=Black guibg=Red gui=bold
|
||||
highlight Visual guifg=Grey25 gui=bold
|
||||
highlight Visual guifg=#404040 gui=bold
|
||||
highlight Cursor guifg=Black guibg=Green gui=bold
|
||||
highlight Special guifg=Orange
|
||||
highlight Comment guifg=#80a0ff
|
||||
@@ -42,7 +42,7 @@ if has("unix")
|
||||
if v:version<600
|
||||
highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE
|
||||
highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold
|
||||
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold
|
||||
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold
|
||||
highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE
|
||||
highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE
|
||||
endif
|
||||
|
||||
@@ -1,19 +1,26 @@
|
||||
" Vim compiler file
|
||||
" Compiler: ms C#
|
||||
" Maintainer: Joseph H. Yao (hyao@sina.com)
|
||||
" Last Change: 2004 Mar 27
|
||||
" Compiler: Microsoft Visual Studio C#
|
||||
" Maintainer: Zhou YiChao (broken.zhou@gmail.com)
|
||||
" Previous Maintainer: Joseph H. Yao (hyao@sina.com)
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "cs"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
" default errorformat
|
||||
CompilerSet errorformat&
|
||||
CompilerSet errorformat+=%f(%l\\,%v):\ %t%*[^:]:\ %m,
|
||||
\%trror%*[^:]:\ %m,
|
||||
\%tarning%*[^:]:\ %m
|
||||
|
||||
" default make
|
||||
CompilerSet makeprg=csc\ %
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
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:
|
||||
58
runtime/compiler/decada.vim
Normal file
58
runtime/compiler/decada.vim
Normal file
@@ -0,0 +1,58 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/Dec Ada compiler file
|
||||
" Language: Ada (Dec Ada)
|
||||
" $Id: decada.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischik <krischik@users.sourceforge.net>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
" Version: 4.6
|
||||
" $Revision: 887 $
|
||||
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
|
||||
" History: 21.07.2006 MK New Dec Ada
|
||||
" 15.10.2006 MK Bram's suggestion for runtime integration
|
||||
" 08.09.2006 MK Correct double load protection.
|
||||
" Help Page: compiler-decada
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if (exists("current_compiler") && current_compiler == "decada") || version < 700
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
let current_compiler = "decada"
|
||||
|
||||
if !exists("g:decada")
|
||||
let g:decada = decada#New ()
|
||||
|
||||
call ada#Map_Menu (
|
||||
\'Dec Ada.Build',
|
||||
\'<F7>',
|
||||
\'call decada.Make ()')
|
||||
|
||||
call g:decada.Set_Session ()
|
||||
endif
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
"
|
||||
" plugin loaded by other means then the "compiler" command
|
||||
"
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
|
||||
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
13
runtime/compiler/erlang.vim
Normal file
13
runtime/compiler/erlang.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Erlang
|
||||
" Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
|
||||
" Last Change: 2012-02-13
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "erlang"
|
||||
|
||||
CompilerSet makeprg=erlc\ -Wall\ %
|
||||
|
||||
CompilerSet errorformat=%f:%l:\ %m
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Language: eRuby
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Info: $Id$
|
||||
" Last Change: 2008 Aug 1
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
@@ -38,4 +38,4 @@ CompilerSet errorformat=
|
||||
let &cpo = 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
|
||||
" Compiler: g77 (GNU Fortran)
|
||||
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
" Last Change: $Date$
|
||||
" $Revision$
|
||||
" Last Change: $Date: 2004/06/13 18:17:36 $
|
||||
" $Revision: 1.1 $
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
|
||||
28
runtime/compiler/g95.vim
Normal file
28
runtime/compiler/g95.vim
Normal file
@@ -0,0 +1,28 @@
|
||||
" Compiler: G95
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.3
|
||||
" Last Change: 2012 Apr 30
|
||||
" 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'
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
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%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GNU C Compiler
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2006-04-19
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -9,18 +9,31 @@ endif
|
||||
let current_compiler = "gcc"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
set cpo&vim
|
||||
|
||||
setlocal errorformat=
|
||||
CompilerSet errorformat=
|
||||
\%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
|
||||
\%*[^\"]\"%f\"%*\\D%l:\ %m,
|
||||
\\"%f\"%*\\D%l:%c:\ %m,
|
||||
\\"%f\"%*\\D%l:\ %m,
|
||||
\%-G%f:%l:\ %trror:\ (Each\ undeclared\ identifier\ is\ reported\ only\ once,
|
||||
\%-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\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
|
||||
\%D%*\\a:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a:\ Leaving\ directory\ `%f',
|
||||
\%DMaking\ %*\\a\ in\ %f
|
||||
|
||||
if exists('g:compiler_gcc_ignore_unmatched_lines')
|
||||
CompilerSet errorformat+=%-G%.%#
|
||||
endif
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
27
runtime/compiler/gfortran.vim
Normal file
27
runtime/compiler/gfortran.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Compiler: GNU Fortran Compiler
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.3
|
||||
" Last Change: 2012 Apr 30
|
||||
" 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'
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
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%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
76
runtime/compiler/gnat.vim
Normal file
76
runtime/compiler/gnat.vim
Normal file
@@ -0,0 +1,76 @@
|
||||
"------------------------------------------------------------------------------
|
||||
" Description: Vim Ada/GNAT compiler file
|
||||
" Language: Ada (GNAT)
|
||||
" $Id: gnat.vim 887 2008-07-08 14:29:01Z krischik $
|
||||
" Copyright: Copyright (C) 2006 Martin Krischik
|
||||
" Maintainer: Martin Krischi <krischik@users.sourceforge.net>k
|
||||
" Ned Okie <nokie@radford.edu>
|
||||
" $Author: krischik $
|
||||
" $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
|
||||
" Version: 4.6
|
||||
" $Revision: 887 $
|
||||
" $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
|
||||
" History: 24.05.2006 MK Unified Headers
|
||||
" 16.07.2006 MK Ada-Mode as vim-ball
|
||||
" 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
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
if (exists("current_compiler")&& current_compiler == "gnat") || version < 700
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
let current_compiler = "gnat"
|
||||
|
||||
if !exists("g:gnat")
|
||||
let g:gnat = gnat#New ()
|
||||
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Build',
|
||||
\ '<F7>',
|
||||
\ 'call gnat.Make ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Pretty Print',
|
||||
\ ':GnatPretty',
|
||||
\ 'call gnat.Pretty ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Tags',
|
||||
\ ':GnatTags',
|
||||
\ 'call gnat.Tags ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Find',
|
||||
\ ':GnatFind',
|
||||
\ 'call gnat.Find ()')
|
||||
call ada#Map_Menu (
|
||||
\ 'GNAT.Set Projectfile\.\.\.',
|
||||
\ ':SetProject',
|
||||
\ 'call gnat.Set_Project_File ()')
|
||||
|
||||
call g:gnat.Set_Session ()
|
||||
endif
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
"
|
||||
" plugin loaded by other means then the "compiler" command
|
||||
"
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
|
||||
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
finish " 1}}}
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
" Copyright (C) 2006 Martin Krischik
|
||||
"
|
||||
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
|
||||
"------------------------------------------------------------------------------
|
||||
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
|
||||
" vim: foldmethod=marker
|
||||
@@ -2,7 +2,7 @@
|
||||
" Compiler: HP aCC
|
||||
" Maintainer: Matthias Ulrich <matthias-ulrich@web.de>
|
||||
" URL: http://www.subhome.de/vim/hp_acc.vim
|
||||
" Last Change: 2005 Nov 19
|
||||
" Last Change: 2012 Apr 30
|
||||
"
|
||||
" aCC --version says: "HP ANSI C++ B3910B A.03.13"
|
||||
" This compiler has been tested on:
|
||||
@@ -19,6 +19,8 @@ if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "hp_acc"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -30,4 +32,7 @@ CompilerSet errorformat=%A%trror\ %n\:\ \"%f\"\\,\ line\ %l\ \#\ %m,
|
||||
\%Z\ \ \ \ %p^%.%#,
|
||||
\%-C%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim:ts=8:sw=4:cindent
|
||||
|
||||
27
runtime/compiler/ifort.vim
Normal file
27
runtime/compiler/ifort.vim
Normal file
@@ -0,0 +1,27 @@
|
||||
" Compiler: Intel Fortran Compiler
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.1
|
||||
" Last Change: 2012 Apr 30
|
||||
" 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'
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
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%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Intel C++ 7.1
|
||||
" Maintainer: David Harrison <david_jr@users.sourceforge.net>
|
||||
" Last Change: 2004 May 16
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "intel"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -19,3 +21,6 @@ CompilerSet errorformat=%E%f(%l):\ error:\ %m,
|
||||
\%-Z\ \ %p^,
|
||||
\%-G\\s%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim compiler file
|
||||
" Compiler: SGI IRIX 5.3 cc
|
||||
" Maintainer: David Harrison <david_jr@users.sourceforge.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "irix5_c"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -19,3 +21,6 @@ CompilerSet errorformat=\%Ecfe:\ Error:\ %f\\,\ line\ %l:\ %m,
|
||||
\%-Z\ %p^,
|
||||
\-G\\s%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim compiler file
|
||||
" Compiler: SGI IRIX 5.3 CC or NCC
|
||||
" Maintainer: David Harrison <david_jr@users.sourceforge.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "irix5_cpp"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -19,3 +21,6 @@ CompilerSet errorformat=%E\"%f\"\\,\ line\ %l:\ error(%n):\ ,
|
||||
\%-Z\ \ %p%^,
|
||||
\%+C\ %\\{10}%.%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: Jikes
|
||||
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
|
||||
" Last Change: 2004 Mar 27
|
||||
" URL: http://mywebpage.netscape.com/sharppeople/vim/compiler
|
||||
" Last Change: 20 Jan 2009
|
||||
" URL: http://dwsharp.users.sourceforge.net/vim/compiler
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
|
||||
24
runtime/compiler/mcs.vim
Normal file
24
runtime/compiler/mcs.vim
Normal file
@@ -0,0 +1,24 @@
|
||||
" Vim compiler file
|
||||
" Compiler: Mono C# Compiler
|
||||
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
|
||||
" Latest Revision: 2006-06-18
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "mcs"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
setlocal errorformat=
|
||||
\%E%f(%l\\,%c):\ error\ CS%n:%m,
|
||||
\%W%f(%l\\,%c):\ warning\ CS%n:%m,
|
||||
\%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m,
|
||||
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
|
||||
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
|
||||
\%DMaking\ %*\\a\ in\ %f,
|
||||
\%G-%.%#
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim compiler file
|
||||
" Compiler: SGI IRIX 6.5 MIPS C (cc)
|
||||
" Maintainer: David Harrison <david_jr@users.sourceforge.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "mips_c"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -19,3 +21,6 @@ CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l,
|
||||
\%-Z\ \ %p^,
|
||||
\%-G\\s%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim compiler file
|
||||
" Compiler: SGI IRIX 6.5 MIPSPro C (c89)
|
||||
" Maintainer: David Harrison <david_jr@users.sourceforge.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "mipspro_c89"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -20,3 +22,6 @@ CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l,
|
||||
\%+C\ \ %m,
|
||||
\%-G\\s%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
" Vim compiler file
|
||||
" Compiler: SGI IRIX 6.5 MIPSPro C++ (CC)
|
||||
" Maintainer: David Harrison <david_jr@users.sourceforge.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "mipspro_cpp"
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -19,3 +21,6 @@ CompilerSet errorformat=%Ecc\-%n\ %.%#:\ ERROR\ File\ =\ %f\%\\,\ Line\ =\ %l,
|
||||
\%-Z\ \ %p^,
|
||||
\%-G\\s%#,
|
||||
\%-G%.%#
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: Perl syntax checks (perl -Wc)
|
||||
" Maintainer: Christian J. Robinson <infynity@onewest.net>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Maintainer: Christian J. Robinson <heptite@gmail.com>
|
||||
" Last Change: 2006 Aug 13
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -15,12 +15,20 @@ endif
|
||||
let s:savecpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if getline(1) =~# '-[^ ]*T'
|
||||
CompilerSet makeprg=perl\ -WTc\ %
|
||||
if exists('g:perl_compiler_force_warnings') && g:perl_compiler_force_warnings == 0
|
||||
let s:warnopt = 'w'
|
||||
else
|
||||
CompilerSet makeprg=perl\ -Wc\ %
|
||||
let s:warnopt = 'W'
|
||||
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=
|
||||
\%-G%.%#had\ compilation\ errors.,
|
||||
\%-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:
|
||||
@@ -9,7 +9,7 @@ endif
|
||||
let current_compiler = "rst"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
set cpo&vim
|
||||
|
||||
setlocal errorformat=
|
||||
\%f:%l:\ (%tEBUG/0)\ %m,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
" Language: Ruby
|
||||
" Function: Syntax check and/or error reporting
|
||||
" Maintainer: Tim Hammerquist <timh at rubyforge.org>
|
||||
" Info: $Id$
|
||||
" Last Change: 2008 Aug 1
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
@@ -65,4 +65,4 @@ CompilerSet errorformat=
|
||||
let &cpo = 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
|
||||
" Language: Test::Unit - Ruby Unit Testing Framework
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Info: $Id$
|
||||
" Last Change: 2008 Aug 1
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
@@ -32,4 +32,4 @@ CompilerSet errorformat=\%W\ %\\+%\\d%\\+)\ Failure:,
|
||||
let &cpo = 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>
|
||||
" Splint Home: http://www.splint.org/
|
||||
" Last Change: 2005 Apr 21
|
||||
" $Revision$
|
||||
" $Revision: 1.3 $
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
" Vim compiler file
|
||||
" Compiler: TeX
|
||||
" Maintainer: Artem Chuprina <ran@ran.pp.ru>
|
||||
" Last Change: 2004 Mar 27
|
||||
" Last Change: 2012 Apr 30
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
@@ -30,9 +32,6 @@ else
|
||||
let current_compiler = 'make'
|
||||
endif
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
|
||||
" Value errorformat are taken from vim help, see :help errorformat-LaTeX, with
|
||||
" addition from Srinath Avadhanula <srinath@fastmail.fm>
|
||||
CompilerSet errorformat=%E!\ LaTeX\ %trror:\ %m,
|
||||
@@ -64,5 +63,5 @@ CompilerSet errorformat=%E!\ LaTeX\ %trror:\ %m,
|
||||
\%+Q%*[^()])%r,
|
||||
\%+Q[%\\d%*[^()])%r
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user