mirror of
https://github.com/zoriya/vim.git
synced 2025-12-24 16:15:21 +00:00
Compare commits
998 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
16
.gitignore
vendored
16
.gitignore
vendored
@@ -2,15 +2,18 @@
|
||||
*.o
|
||||
src/vim
|
||||
src/xxd/xxd
|
||||
src/auto/if_perl.c
|
||||
src/tags
|
||||
|
||||
# We do need src/auto/configure and src/auto/config.mk.
|
||||
src/auto/osdef.h
|
||||
# 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
|
||||
@@ -36,4 +39,13 @@ gvimext.lib
|
||||
*.rej
|
||||
*.orig
|
||||
*.mo
|
||||
*.swp
|
||||
*~
|
||||
|
||||
# Generated by "make test"
|
||||
src/po/*.ck
|
||||
src/testdir/mbyte.vim
|
||||
src/testdir/mzscheme.vim
|
||||
src/testdir/small.vim
|
||||
src/testdir/tiny.vim
|
||||
src/testdir/test*.out
|
||||
|
||||
8
Contents
8
Contents
@@ -9,10 +9,10 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
|
||||
messages, shows current file name in window title, on-line
|
||||
help, rectangular cut/paste, etc., etc., etc...
|
||||
|
||||
Version 7.2. Also runs under UNIX, MSDOS and other systems.
|
||||
vim72rt.tgz contains the documentation and syntax files.
|
||||
vim72bin.tgz contains the binaries.
|
||||
vim72src.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.
|
||||
|
||||
|
||||
|
||||
27
Filelist
27
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 \
|
||||
@@ -206,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 \
|
||||
@@ -252,6 +263,7 @@ SRC_DOS = \
|
||||
src/bigvim.bat \
|
||||
src/msvcsetup.bat \
|
||||
src/msvc2008.bat \
|
||||
src/msvc2010.bat \
|
||||
src/dimm.idl \
|
||||
src/dlldata.c \
|
||||
src/dosinst.c \
|
||||
@@ -302,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 \
|
||||
@@ -369,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 \
|
||||
|
||||
@@ -417,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 \
|
||||
@@ -427,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 \
|
||||
|
||||
@@ -654,13 +660,12 @@ EXTRA = \
|
||||
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 \
|
||||
@@ -678,6 +683,8 @@ LANG_GEN = \
|
||||
runtime/tutor/tutor.utf-8 \
|
||||
runtime/tutor/tutor.?? \
|
||||
runtime/tutor/tutor.??.* \
|
||||
runtime/tutor/tutor.bar \
|
||||
runtime/tutor/tutor.bar.* \
|
||||
runtime/spell/README.txt \
|
||||
runtime/spell/??/*.diff \
|
||||
runtime/spell/??/main.aap \
|
||||
|
||||
216
Makefile
216
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,6 +23,9 @@
|
||||
# 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) $@
|
||||
@@ -28,25 +33,22 @@ first:
|
||||
# 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 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 reconfig proto depend lint tags typ
|
||||
# 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,29 +70,35 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
|
||||
#
|
||||
# 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 = 2
|
||||
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 (if you can make it
|
||||
# work), 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).
|
||||
# - 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).
|
||||
@@ -102,10 +114,10 @@ DOSBIN_S = dosbin_s
|
||||
# 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"
|
||||
@@ -114,8 +126,9 @@ 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
|
||||
@@ -131,9 +144,11 @@ DOSBIN_S = dosbin_s
|
||||
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
|
||||
# "uninstald32.exe".
|
||||
# Win32 console version:
|
||||
# - Set environment for Visual C++ 2008 Express Edition: "msvc2008.bat". Or,
|
||||
# when using the Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the paths
|
||||
# when necessary). For Windows 98 the 2003 version is required.
|
||||
# - 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".
|
||||
@@ -154,8 +169,8 @@ DOSBIN_S = dosbin_s
|
||||
# - 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".
|
||||
@@ -166,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.
|
||||
@@ -215,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
|
||||
@@ -227,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)
|
||||
|
||||
@@ -268,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)
|
||||
@@ -286,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
|
||||
@@ -293,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
|
||||
@@ -322,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
|
||||
@@ -347,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
|
||||
@@ -364,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
|
||||
@@ -384,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 -)
|
||||
@@ -412,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.
|
||||
@@ -421,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)
|
||||
@@ -531,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 -X -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 -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
|
||||
|
||||
os2bin: dist no_title.vim dist/$(COMMENT_OS2)
|
||||
-rm -rf dist/vim$(VERSION)os2.zip
|
||||
-rm -rf dist/vim
|
||||
|
||||
49
README.txt
49
README.txt
@@ -1,4 +1,4 @@
|
||||
README.txt for version 7.2 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,39 +100,12 @@ 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
|
||||
Finsterruetihof 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
README_ami.txt for version 7.2 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.2 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.2 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.2 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 (vim72rt.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):
|
||||
vim72d16.zip 16 bit DOS version
|
||||
vim72d32.zip 32 bit DOS version
|
||||
vim72w32.zip Windows 95/98/NT/etc. console version
|
||||
gvim72.zip Windows 95/98/NT/etc. GUI version
|
||||
gvim72ole.zip Windows 95/98/NT/etc. GUI version with OLE
|
||||
gvim72_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 (vim72rt.zip).
|
||||
The sources are also available (vim72src.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.2 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\vim72",
|
||||
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 gvim72.zip
|
||||
unzip vim72w32.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\vim72
|
||||
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\vim72
|
||||
set path=%path%;D:\editors\vim\vim72
|
||||
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 7.2 will look for your vimrc file in $VIM, and for the runtime
|
||||
files in $VIM/vim72. 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\vim72\vim.exe The Vim version 7.2 executable.
|
||||
C:\vim\vim72\doc\*.txt The version 7.2 documentation files.
|
||||
C:\vim\vim72\bugreport.vim A Vim version 7.2 script.
|
||||
C:\vim\vim72\... Other version 7.2 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\vim72". Don't add
|
||||
"vim72" 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\vim72\vim.exe
|
||||
C:\command.com /c D:\editors\vim\vim72\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.2 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.2-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.2-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.2 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.2 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.2 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.2 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:
|
||||
vim72rt.zip contains the runtime files (same as for the PC version)
|
||||
vim72os2.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/vim72",
|
||||
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 vim72os2.zip
|
||||
unzip vim72os2.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\vim72
|
||||
set path=%path%;D:\editors\vim\vim72
|
||||
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\vim72\vim.exe The Vim version 7.2 executable.
|
||||
C:\vim\vim72\doc\*.txt The version 7.2 documentation files.
|
||||
C:\vim\vim72\bugreport.vim A Vim version 7.2 script.
|
||||
C:\vim\vim72\... Other version 7.2 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.2 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.2 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.2-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.2-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.2 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 (vim72rt.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.2 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.2 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.2 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.
|
||||
|
||||
@@ -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 2
|
||||
!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')"
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
" Vim completion script
|
||||
" Language: C
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2007 Aug 30
|
||||
" 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)
|
||||
@@ -161,7 +163,7 @@ function! ccomplete#Complete(findstart, base)
|
||||
let res = [{'match': match, 'tagline' : '', 'kind' : kind, 'info' : line}]
|
||||
else
|
||||
" Completing "var.", "var.something", etc.
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[-1], 0, 1)
|
||||
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -603,3 +605,6 @@ function! s:SearchMembers(matches, items, all)
|
||||
endfor
|
||||
return res
|
||||
endfunc
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
" ---------------------------------------------------------------------
|
||||
" getscript.vim
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Dec 28, 2009
|
||||
" Version: 32
|
||||
" Date: Jan 17, 2012
|
||||
" Version: 34
|
||||
" Installing: :help glvs-install
|
||||
" Usage: :help glvs
|
||||
"
|
||||
@@ -15,7 +15,7 @@
|
||||
if exists("g:loaded_getscript")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_getscript= "v32"
|
||||
let g:loaded_getscript= "v34"
|
||||
if &cp
|
||||
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
|
||||
finish
|
||||
@@ -519,6 +519,7 @@ fun! s:GetOneScript(...)
|
||||
" --------------------------------------------------------------------------
|
||||
" 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))
|
||||
@@ -526,7 +527,7 @@ fun! s:GetOneScript(...)
|
||||
" call Decho("<".sname."> is readable")
|
||||
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
|
||||
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
|
||||
let curdir = escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
|
||||
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
|
||||
let installdir= curdir."/Installed"
|
||||
if !isdirectory(installdir)
|
||||
call mkdir(installdir)
|
||||
@@ -549,25 +550,42 @@ fun! s:GetOneScript(...)
|
||||
" decompress
|
||||
if sname =~ '\.bz2$'
|
||||
" call Decho("decompress: attempt to bunzip2 ".sname)
|
||||
exe "silent !bunzip2 ".shellescape(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 "silent !gunzip ".shellescape(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
|
||||
" 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: HTML and XHTML
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 Oct 19
|
||||
" Last Change: 2011 Apr 28
|
||||
|
||||
function! htmlcomplete#CompleteTags(findstart, base)
|
||||
if a:findstart
|
||||
@@ -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, ' ')
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
" Vim completion script
|
||||
" Language: PHP
|
||||
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
|
||||
" Last Change: 2006 May 9
|
||||
" Last Change: 2011 Dec 08
|
||||
"
|
||||
" TODO:
|
||||
" - Class aware completion:
|
||||
@@ -650,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)
|
||||
@@ -667,6 +668,9 @@ function! phpcomplete#GetClassContents(file, name) " {{{
|
||||
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,17 +1,28 @@
|
||||
"pythoncomplete.vim - Omni Completion for python
|
||||
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
" Version: 0.7
|
||||
" Last Updated: 19 Oct 2006
|
||||
" Version: 0.9
|
||||
" Last Updated: 18 Jun 2009
|
||||
"
|
||||
" Changes
|
||||
" 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
|
||||
" 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
|
||||
@@ -63,7 +74,7 @@ function! pythoncomplete#Complete(findstart, base)
|
||||
while idx > 0
|
||||
let idx -= 1
|
||||
let c = line[idx]
|
||||
if c =~ '\w' || c =~ '\.' || c == '('
|
||||
if c =~ '\w' || c =~ '\.'
|
||||
let cword = c . cword
|
||||
continue
|
||||
elseif strlen(cword) > 0 || idx == 0
|
||||
@@ -206,7 +217,7 @@ class Completer(object):
|
||||
if len(stmt) > 0 and stmt[-1] == '(':
|
||||
result = eval(_sanitize(stmt[:-1]), self.compldict)
|
||||
doc = result.__doc__
|
||||
if doc == None: doc = ''
|
||||
if doc is None: doc = ''
|
||||
args = self.get_arguments(result)
|
||||
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
|
||||
elif ridx == -1:
|
||||
@@ -223,18 +234,18 @@ class Completer(object):
|
||||
|
||||
try: maindoc = result.__doc__
|
||||
except: maindoc = ' '
|
||||
if maindoc == None: 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 == None: inst = all[m]
|
||||
if result is None: inst = all[m]
|
||||
else: inst = getattr(result,m)
|
||||
try: doc = inst.__doc__
|
||||
except: doc = maindoc
|
||||
typestr = str(inst)
|
||||
if doc == None or doc == '': doc = maindoc
|
||||
if doc is None or doc == '': doc = maindoc
|
||||
|
||||
wrd = m[len(match):]
|
||||
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
|
||||
@@ -260,9 +271,9 @@ class Completer(object):
|
||||
return []
|
||||
|
||||
class Scope(object):
|
||||
def __init__(self,name,indent):
|
||||
def __init__(self,name,indent,docstr=''):
|
||||
self.subscopes = []
|
||||
self.docstr = ''
|
||||
self.docstr = docstr
|
||||
self.locals = []
|
||||
self.parent = None
|
||||
self.name = name
|
||||
@@ -281,29 +292,28 @@ 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):
|
||||
if not self._hasvaralready(loc):
|
||||
self.locals.append(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)
|
||||
return Scope(self.name,indent,self.docstr)
|
||||
|
||||
def _hasvaralready(self,test):
|
||||
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():
|
||||
return True
|
||||
return False
|
||||
self.locals.remove(l)
|
||||
|
||||
def get_code(self):
|
||||
# we need to start with this, to fix up broken completions
|
||||
# hopefully this name is unique enough...
|
||||
str = '"""'+self.docstr+'"""\n'
|
||||
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'
|
||||
@@ -330,11 +340,11 @@ class Scope(object):
|
||||
return ' '*(self.indent+1)
|
||||
|
||||
class Class(Scope):
|
||||
def __init__(self, name, supers, indent):
|
||||
Scope.__init__(self,name,indent)
|
||||
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)
|
||||
c = Class(self.name,self.supers,indent, self.docstr)
|
||||
for s in self.subscopes:
|
||||
c.add(s.copy_decl(indent+1))
|
||||
return c
|
||||
@@ -351,11 +361,11 @@ class Class(Scope):
|
||||
|
||||
|
||||
class Function(Scope):
|
||||
def __init__(self, name, params, indent):
|
||||
Scope.__init__(self,name,indent)
|
||||
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)
|
||||
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))
|
||||
@@ -371,7 +381,7 @@ class PyParser:
|
||||
def _parsedotname(self,pre=None):
|
||||
#returns (dottedname, nexttoken)
|
||||
name = []
|
||||
if pre == None:
|
||||
if pre is None:
|
||||
tokentype, token, indent = self.next()
|
||||
if tokentype != NAME and token != '*':
|
||||
return ('', token)
|
||||
@@ -405,17 +415,20 @@ class PyParser:
|
||||
while True:
|
||||
tokentype, token, indent = self.next()
|
||||
if token in (')', ',') and level == 1:
|
||||
names.append(name)
|
||||
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 += str(token)
|
||||
name += "%s " % str(token)
|
||||
return names
|
||||
|
||||
def _parsefunction(self,indent):
|
||||
@@ -495,16 +508,26 @@ class PyParser:
|
||||
#Handle 'self' params
|
||||
if scp.parent != None and type(scp.parent) == Class:
|
||||
slice = 1
|
||||
p = scp.params[0]
|
||||
i = p.find('=')
|
||||
if i != -1: p = p[:i]
|
||||
newscope.local('%s = %s' % (scp.params[0],scp.parent.name))
|
||||
for p in scp.params[slice:]:
|
||||
i = p.find('=')
|
||||
if len(p) == 0: continue
|
||||
pvar = ''
|
||||
ptype = ''
|
||||
if i == -1:
|
||||
newscope.local('%s = _PyCmplNoType()' % p)
|
||||
pvar = p
|
||||
ptype = '_PyCmplNoType()'
|
||||
else:
|
||||
newscope.local('%s = %s' % (p[:i],_sanitize(p[i+1])))
|
||||
pvar = p[:i]
|
||||
ptype = _sanitize(p[i+1:])
|
||||
if pvar.startswith('**'):
|
||||
pvar = pvar[2:]
|
||||
ptype = '{}'
|
||||
elif pvar.startswith('*'):
|
||||
pvar = pvar[1:]
|
||||
ptype = '[]'
|
||||
|
||||
newscope.local('%s = %s' % (pvar,ptype))
|
||||
|
||||
for s in scp.subscopes:
|
||||
ns = s.copy_decl(0)
|
||||
@@ -532,17 +555,19 @@ class PyParser:
|
||||
self.scope = self.scope.pop(indent)
|
||||
elif token == 'def':
|
||||
func = self._parsefunction(indent)
|
||||
if func == None:
|
||||
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 == None:
|
||||
if cls is None:
|
||||
print "class: syntax error..."
|
||||
continue
|
||||
freshscope = True
|
||||
dbg("new scope: class")
|
||||
self.scope = self.scope.add(cls)
|
||||
|
||||
elif token == 'import':
|
||||
@@ -569,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
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
" Vim completion script
|
||||
" Language: Ruby
|
||||
" Maintainer: Mark Guzman <segfault@hasno.info>
|
||||
" Info: $Id: rubycomplete.vim,v 1.41 2008/06/30 06:50:45 segy Exp $
|
||||
" Last Change: 2009 Sep 28
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
" Maintainer Version: 0.8
|
||||
" Maintainer Version: 0.8.1
|
||||
" ----------------------------------------------------------------------------
|
||||
"
|
||||
" Ruby IRB/Complete author: Keiju ISHITSUKA(keiju@ishitsuka.com)
|
||||
@@ -325,7 +325,7 @@ class VimRubyCompletion
|
||||
ln = buf[x]
|
||||
if /^\s*(module|class|def|include)\s+/.match(ln)
|
||||
clscnt += 1 if $1 == "class"
|
||||
#dprint "\$1: %s" % $1
|
||||
#dprint "\$1$1
|
||||
classdef += "%s\n" % ln
|
||||
classdef += "end\n" if /def\s+/.match(ln)
|
||||
dprint ln
|
||||
@@ -632,7 +632,7 @@ class VimRubyCompletion
|
||||
methods = Object.constants
|
||||
methods.grep(/^#{receiver}/).collect{|e| "::" + e}
|
||||
|
||||
when /^(((::)?[A-Z][^:.\(]*)+)::?([^:.]*)$/ # Constant or class methods
|
||||
when /^(((::)?[A-Z][^:.\(]*)+?)::?([^:.]*)$/ # Constant or class methods
|
||||
receiver = $1
|
||||
message = Regexp.quote($4)
|
||||
dprint "const or cls 2 [recv: \'%s\', msg: \'%s\']" % [ receiver, message ]
|
||||
@@ -666,7 +666,7 @@ class VimRubyCompletion
|
||||
dprint "global"
|
||||
methods = global_variables.grep(Regexp.new(Regexp.quote($1)))
|
||||
|
||||
when /^((\.?[^.]+)+)\.([^.]*)$/ # variable
|
||||
when /^((\.?[^.]+)+?)\.([^.]*)$/ # variable
|
||||
dprint "variable"
|
||||
receiver = $1
|
||||
message = Regexp.quote($3)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim script to download a missing spell file
|
||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
" Last Change: 2008 Nov 29
|
||||
" Last Change: 2012 Jan 08
|
||||
|
||||
if !exists('g:spellfile_URL')
|
||||
" Prefer using http:// when netrw should be able to use it, since
|
||||
@@ -70,7 +70,7 @@ function! spellfile#LoadFile(lang)
|
||||
" Remember the buffer number, we check it below.
|
||||
new
|
||||
let newbufnr = winbufnr(0)
|
||||
setlocal bin
|
||||
setlocal bin fenc=
|
||||
echo 'Downloading ' . fname . '...'
|
||||
call spellfile#Nread(fname)
|
||||
if getline(2) !~ 'VIMspell'
|
||||
@@ -83,7 +83,7 @@ function! spellfile#LoadFile(lang)
|
||||
" Our buffer has vanished!? Open a new window.
|
||||
echomsg "download buffer disappeared, opening a new one"
|
||||
new
|
||||
setlocal bin
|
||||
setlocal bin fenc=
|
||||
else
|
||||
exe winnr . "wincmd w"
|
||||
endif
|
||||
@@ -120,6 +120,7 @@ function! spellfile#LoadFile(lang)
|
||||
else
|
||||
let dirname = escape(dirlist[dirchoice], ' ')
|
||||
endif
|
||||
setlocal fenc=
|
||||
exe "write " . dirname . '/' . fname
|
||||
|
||||
" Also download the .sug file, if the user wants to.
|
||||
|
||||
@@ -1,22 +1,65 @@
|
||||
" Vim OMNI completion script for SQL
|
||||
" Language: SQL
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 7.0
|
||||
" Last Change: 2009 Jan 04
|
||||
" 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.
|
||||
@@ -26,9 +69,9 @@ if exists('&omnifunc')
|
||||
endif
|
||||
|
||||
if exists('g:loaded_sql_completion')
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
let g:loaded_sql_completion = 70
|
||||
let g:loaded_sql_completion = 120
|
||||
|
||||
" Maintains filename of dictionary
|
||||
let s:sql_file_table = ""
|
||||
@@ -41,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 = ""
|
||||
@@ -51,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 = ""
|
||||
|
||||
@@ -82,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)
|
||||
@@ -112,7 +159,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
let begindot = 1
|
||||
endif
|
||||
while start > 0
|
||||
" Additional code was required to handle objects which
|
||||
" 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
|
||||
@@ -122,7 +169,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
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:
|
||||
@@ -132,7 +179,7 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" 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.
|
||||
if lastword != -1 && compl_type == 'column'
|
||||
if lastword != -1 && compl_type == 'column'
|
||||
break
|
||||
endif
|
||||
" If column completion was specified stop at the "." if
|
||||
@@ -143,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
|
||||
@@ -174,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
|
||||
@@ -188,7 +235,7 @@ 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
|
||||
@@ -226,7 +273,7 @@ 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
|
||||
@@ -245,16 +292,16 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" has entered:
|
||||
" owner.table
|
||||
" table.column_prefix
|
||||
" So there are a couple of things we can do to mitigate
|
||||
" 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 <C-Right>) then
|
||||
" 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
|
||||
" check to see the table.column exists in the
|
||||
" cached table list. If it does, then we have
|
||||
" determined the user has actually chosen
|
||||
" determined the user has actually chosen
|
||||
" owner.table, not table.column_prefix.
|
||||
let found = -1
|
||||
if g:omni_sql_include_owner == 1 && owner == ''
|
||||
@@ -269,17 +316,46 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" 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
|
||||
" 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
|
||||
" If an owner has been specified, then we must consider the
|
||||
" base to be a partial column name
|
||||
" let base = matchstr( base, '^\(.*\.\)\?\zs.*' )
|
||||
|
||||
@@ -299,11 +375,11 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
" 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")
|
||||
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")
|
||||
let compl_list = map(compl_list, 'owner.".".v:val')
|
||||
endif
|
||||
else
|
||||
let base = ''
|
||||
@@ -333,11 +409,15 @@ function! sqlcomplete#Complete(findstart, base)
|
||||
|
||||
if base != ''
|
||||
" Filter the list based on the first few characters the user entered.
|
||||
" Check if the text matches at the beginning
|
||||
" or
|
||||
" 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.'\\)"'
|
||||
@@ -354,7 +434,13 @@ 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
|
||||
@@ -363,7 +449,36 @@ function! sqlcomplete#PreCacheSyntax(...)
|
||||
" 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
|
||||
@@ -390,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
|
||||
@@ -408,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 = []
|
||||
@@ -439,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
|
||||
@@ -451,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
|
||||
@@ -487,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 =~ '_'
|
||||
@@ -497,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
|
||||
@@ -531,7 +648,7 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
|
||||
return cols
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetObjectOwner(object)
|
||||
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
|
||||
@@ -544,7 +661,7 @@ function! s:SQLCGetObjectOwner(object)
|
||||
" let owner = matchstr( a:object, '^\s*\zs.*\ze\.' )
|
||||
let owner = matchstr( a:object, '^\("\|\[\)\?\zs\.\{-}\ze\("\|\]\)\?\.' )
|
||||
return owner
|
||||
endfunction
|
||||
endfunction
|
||||
|
||||
function! s:SQLCGetColumns(table_name, list_type)
|
||||
" Check if the table name was provided as part of the column name
|
||||
@@ -571,7 +688,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
if list_idx > -1
|
||||
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 *
|
||||
@@ -589,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
|
||||
@@ -600,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'
|
||||
@@ -609,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
|
||||
@@ -618,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\(\("\|\[\)\?.\{-}\("\|\]\)\.\)\?'.
|
||||
\ '\("\|\[\)\?.\{-}\("\|\]\)\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\.\?$').
|
||||
\ '\>'.
|
||||
@@ -649,7 +786,7 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
|
||||
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
|
||||
@@ -677,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
|
||||
@@ -686,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)
|
||||
@@ -717,4 +854,3 @@ function! s:SQLCGetColumns(table_name, list_type)
|
||||
|
||||
return table_cols
|
||||
endfunction
|
||||
|
||||
|
||||
@@ -1,14 +1,40 @@
|
||||
" Vim completion script
|
||||
" Language: All languages, uses existing syntax highlighting rules
|
||||
" Maintainer: David Fishburn <dfishburn dot vim at gmail dot com>
|
||||
" Version: 5.0
|
||||
" Last Change: 2010 Jan 31
|
||||
" 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
|
||||
" When processing a list of syntax groups, the final group
|
||||
" was missed in function SyntaxCSyntaxGroupItems.
|
||||
" 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
|
||||
@@ -24,7 +50,7 @@ endif
|
||||
if exists('g:loaded_syntax_completion')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntax_completion = 40
|
||||
let g:loaded_syntax_completion = 80
|
||||
|
||||
" Set ignorecase to the ftplugin standard
|
||||
" This is the default setting, but if you define a buffer local
|
||||
@@ -52,7 +78,8 @@ 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 = []
|
||||
@@ -128,7 +155,30 @@ function! syntaxcomplete#Complete(findstart, base)
|
||||
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
|
||||
@@ -157,16 +207,40 @@ function! OmniSyntaxList()
|
||||
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
|
||||
@@ -181,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
|
||||
|
||||
@@ -230,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
|
||||
|
||||
@@ -348,9 +418,25 @@ 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'
|
||||
\ )
|
||||
|
||||
" 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'
|
||||
\ )
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
" tar.vim: Handles browsing tarfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Dec 28, 2009
|
||||
" Version: 24
|
||||
" 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-2009 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,
|
||||
@@ -22,7 +22,7 @@
|
||||
if &cp || exists("g:loaded_tar")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_tar= "v24"
|
||||
let g:loaded_tar= "v28"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of tar needs vim 7.2"
|
||||
@@ -47,6 +47,17 @@ 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")
|
||||
@@ -63,17 +74,6 @@ if !exists("g:tar_copycmd")
|
||||
endif
|
||||
let g:tar_copycmd= g:netrw_localcopycmd
|
||||
endif
|
||||
if !exists("g:netrw_cygwin")
|
||||
if has("win32") || has("win95") || has("win64") || has("win16")
|
||||
if &shell =~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$'
|
||||
let g:netrw_cygwin= 1
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
else
|
||||
let g:netrw_cygwin= 0
|
||||
endif
|
||||
endif
|
||||
if !exists("g:tar_extractcmd")
|
||||
let g:tar_extractcmd= "tar -xf"
|
||||
endif
|
||||
@@ -127,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
|
||||
@@ -142,9 +142,9 @@ fun! tar#Browse(tarfile)
|
||||
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')
|
||||
$put =''
|
||||
0d
|
||||
$
|
||||
keepj $put =''
|
||||
keepj sil! 0d
|
||||
keepj $
|
||||
|
||||
let tarfile= a:tarfile
|
||||
if has("win32") && executable("cygpath")
|
||||
@@ -154,23 +154,26 @@ fun! tar#Browse(tarfile)
|
||||
let curlast= line("$")
|
||||
if tarfile =~# '\.\(gz\|tgz\)$'
|
||||
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
|
||||
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 "silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.bz2$'
|
||||
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 "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
|
||||
elseif tarfile =~# '\.lzma$'
|
||||
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 "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
|
||||
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 "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
|
||||
endif
|
||||
if v:shell_error != 0
|
||||
redraw!
|
||||
@@ -181,12 +184,12 @@ fun! tar#Browse(tarfile)
|
||||
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
|
||||
silent %d
|
||||
keepj sil! %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".fnameescape(a:tarfile)
|
||||
let &ei= eikeep
|
||||
1d
|
||||
keepj sil! 1d
|
||||
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
|
||||
return
|
||||
endif
|
||||
@@ -195,13 +198,13 @@ 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(".")
|
||||
@@ -221,8 +224,8 @@ 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
|
||||
@@ -265,10 +268,13 @@ fun! tar#Read(fname,mode)
|
||||
elseif fname =~ '\.lzma$' && executable("lzcat")
|
||||
let decmp= "|lzcat"
|
||||
let doro = 1
|
||||
elseif fname =~ '\.xz$' && executable("xzcat")
|
||||
let decmp= "|xzcat"
|
||||
let doro = 1
|
||||
else
|
||||
let decmp=""
|
||||
let doro = 0
|
||||
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.zip$\|\.Z$'
|
||||
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
|
||||
setlocal bin
|
||||
endif
|
||||
endif
|
||||
@@ -280,16 +286,19 @@ fun! tar#Read(fname,mode)
|
||||
endif
|
||||
if tarfile =~# '\.bz2$'
|
||||
" call Decho("7: exe silent r! bzip2 -d -c ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp)
|
||||
exe "silent r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
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 "silent r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
|
||||
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 "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 "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.
|
||||
@@ -304,21 +313,21 @@ fun! tar#Read(fname,mode)
|
||||
setlocal ro
|
||||
endif
|
||||
|
||||
let w:tarfile= a:fname
|
||||
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
|
||||
|
||||
@@ -374,8 +383,8 @@ 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 =~# '\.bz2'
|
||||
@@ -387,17 +396,22 @@ fun! tar#Write(fname)
|
||||
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 =~# '\.lzma'
|
||||
call system("lzma -d -- ".shellescape(tarfile,0))
|
||||
let tarfile = substitute(tarfile,'\.lzma','','e')
|
||||
let compress= "lzma -- ".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.">")
|
||||
|
||||
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.vim : construct a file containing both paths and files
|
||||
" Author: Charles E. Campbell, Jr.
|
||||
" Date: Dec 28, 2009
|
||||
" Version: 30
|
||||
" Date: Jan 17, 2012
|
||||
" Version: 35
|
||||
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
|
||||
" Copyright: (c) 2004-2009 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,7 +14,7 @@
|
||||
if &cp || exists("g:loaded_vimball")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_vimball = "v30"
|
||||
let g:loaded_vimball = "v35"
|
||||
if v:version < 702
|
||||
echohl WarningMsg
|
||||
echo "***warning*** this version of vimball needs vim 7.2"
|
||||
@@ -67,10 +67,10 @@ endif
|
||||
" 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.vba, even if it exists
|
||||
" 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.vba)
|
||||
" Output: a filename.vba using vimball format:
|
||||
" filename : base name of file to be created (ie. filename.vmb)
|
||||
" Output: a filename.vmb using vimball format:
|
||||
" path
|
||||
" filesize
|
||||
" [file]
|
||||
@@ -80,12 +80,12 @@ endif
|
||||
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}$','.vba','')
|
||||
let vbname= substitute(a:1,'\.\a\{3}$','.vmb','')
|
||||
else
|
||||
let vbname= a:1
|
||||
endif
|
||||
if vbname !~ '\.vba$'
|
||||
let vbname= vbname.'.vba'
|
||||
if vbname !~ '\.vmb$'
|
||||
let vbname= vbname.'.vmb'
|
||||
endif
|
||||
" call Decho("vbname<".vbname.">")
|
||||
if !a:writelevel && a:1 =~ '[\/]'
|
||||
@@ -134,7 +134,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,...) range
|
||||
" create/switch to mkvimball tab
|
||||
if !exists("vbtabnr")
|
||||
tabnew
|
||||
silent! file Vimball
|
||||
sil! file Vimball
|
||||
let vbtabnr= tabpagenr()
|
||||
else
|
||||
exe "tabn ".vbtabnr
|
||||
@@ -195,8 +195,8 @@ fun! vimball#Vimball(really,...)
|
||||
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
|
||||
|
||||
if v:version < 701 || (v:version == 701 && !exists('*fnameescape'))
|
||||
echoerr "your vim is missing the fnameescape() function"
|
||||
" call Dret("vimball#Vimball : needs 7.1 with patch 299")
|
||||
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
|
||||
|
||||
@@ -214,13 +214,22 @@ fun! vimball#Vimball(really,...)
|
||||
" 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
|
||||
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
|
||||
@@ -254,11 +263,10 @@ fun! vimball#Vimball(really,...)
|
||||
while 1 < linenr && linenr < line("$")
|
||||
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
|
||||
let fname = substitute(fname,'\\','/','g')
|
||||
" let fsize = getline(linenr+1)+0
|
||||
let fsize = substitute(getline(linenr+1),'^\(\d\+\).\{-}$','\1','')+0
|
||||
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\+\)$','\1','')
|
||||
let fenc = substitute(getline(linenr+1),'^\d\+\s*\(\S\{-}\)$','\1','')
|
||||
let filecnt = filecnt + 1
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
|
||||
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt. " fenc=".fenc)
|
||||
|
||||
if a:really
|
||||
echomsg "extracted <".fname.">: ".fsize." lines"
|
||||
@@ -283,11 +291,14 @@ fun! vimball#Vimball(really,...)
|
||||
" 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 = 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.">")
|
||||
if exists("g:vimball_mkdir")
|
||||
@@ -306,20 +317,22 @@ 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
|
||||
setlocal ma
|
||||
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= home."/".fname
|
||||
" 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)
|
||||
@@ -328,17 +341,18 @@ fun! vimball#Vimball(really,...)
|
||||
endif
|
||||
echo "wrote ".fnameescape(fnamepath)
|
||||
call s:RecordInVar(home,"call delete('".fnamepath."')")
|
||||
endif
|
||||
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\|..x\)$'
|
||||
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.\(txt\|..x\)$','\1','')
|
||||
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
|
||||
@@ -400,7 +414,9 @@ fun! vimball#RmVimball(...)
|
||||
let curfile= a:1
|
||||
" call Decho("case a:0=".a:0.": curfile<".curfile.">")
|
||||
endif
|
||||
if curfile =~ '\.vba$'
|
||||
if curfile =~ '\.vmb$'
|
||||
let curfile= substitute(curfile,'\.vmb','','')
|
||||
elseif curfile =~ '\.vba$'
|
||||
let curfile= substitute(curfile,'\.vba','','')
|
||||
endif
|
||||
if a:0 >= 2
|
||||
@@ -418,13 +434,17 @@ fun! vimball#RmVimball(...)
|
||||
" call Decho(".VimballRecord is readable")
|
||||
" call Decho("curfile<".curfile.">")
|
||||
keepalt keepjumps 1split
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
let keepsrch= @/
|
||||
" call Decho('search for ^\M'.curfile.'.\m: ')
|
||||
" call Decho('search for ^\M'.curfile.'.\mvba: ')
|
||||
" call Decho('search for ^\M'.curfile.'\m[-0-9.]*\.vba: ')
|
||||
" 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')
|
||||
@@ -433,25 +453,29 @@ fun! vimball#RmVimball(...)
|
||||
let foundit = 0
|
||||
endif
|
||||
if foundit
|
||||
let exestring = substitute(getline("."),'^\M'.curfile.'\m\S\{-}\.vba: ','','')
|
||||
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)
|
||||
silent! keepalt keepjumps exe exestring
|
||||
silent! keepalt keepjumps d
|
||||
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,'\.vba','','')
|
||||
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
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
let @/= keepsrch
|
||||
endif
|
||||
call s:ChgDir(curdir)
|
||||
@@ -557,9 +581,19 @@ endfun
|
||||
fun! s:ChgDir(newdir)
|
||||
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
|
||||
if (has("win32") || has("win95") || has("win64") || has("win16"))
|
||||
exe 'silent cd '.fnameescape(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 '.fnameescape(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 : curdir<".getcwd().">")
|
||||
endfun
|
||||
@@ -599,7 +633,7 @@ fun! s:RecordInFile(home)
|
||||
let cmd= expand("%:tr").": "
|
||||
" call Decho("cmd<".cmd.">")
|
||||
|
||||
silent! keepalt keepjumps e .VimballRecord
|
||||
sil! keepalt keepjumps e .VimballRecord
|
||||
setlocal ma
|
||||
$
|
||||
if exists("s:recordfile") && exists("s:recorddir")
|
||||
@@ -616,8 +650,8 @@ fun! s:RecordInFile(home)
|
||||
|
||||
" put command into buffer, write .VimballRecord `file
|
||||
keepalt keepjumps put=cmd
|
||||
silent! keepalt keepjumps g/^\s*$/d
|
||||
silent! keepalt keepjumps wq!
|
||||
sil! keepalt keepjumps g/^\s*$/d
|
||||
sil! keepalt keepjumps wq!
|
||||
call s:ChgDir(curdir)
|
||||
|
||||
if exists("s:recorddir")
|
||||
@@ -693,10 +727,11 @@ fun! vimball#SaveSettings()
|
||||
let s:repkeep = &report
|
||||
let s:vekeep = &ve
|
||||
let s:ffkeep = &l:ff
|
||||
let s:swfkeep = &l:swf
|
||||
if exists("&acd")
|
||||
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||
setlocal ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm= ff=unix noswf
|
||||
else
|
||||
setlocal ei=all ve=all nofen noic report=999 nohid bt= ma lz pm= ff=unix
|
||||
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
|
||||
@@ -732,6 +767,9 @@ fun! vimball#RestoreSettings()
|
||||
" call Dret("RestoreSettings")
|
||||
endfun
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Modelines: {{{1
|
||||
" vim: fdm=marker
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
" zip.vim: Handles browsing zipfiles
|
||||
" AUTOLOAD PORTION
|
||||
" Date: Jul 30, 2008
|
||||
" Version: 22
|
||||
" 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-2008 Charles E. Campbell, Jr. {{{1
|
||||
" 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,
|
||||
@@ -16,13 +16,19 @@
|
||||
|
||||
" ---------------------------------------------------------------------
|
||||
" Load Once: {{{1
|
||||
let s:keepcpo= &cpo
|
||||
set cpo&vim
|
||||
if &cp || exists("g:loaded_zip") || v:version < 700
|
||||
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 = "v22"
|
||||
let s:zipfile_escape = ' ?&;\'
|
||||
let s:ERROR = 2
|
||||
let s:WARNING = 1
|
||||
@@ -97,38 +103,26 @@ fun! zip#Browse(zipfile)
|
||||
set ft=tar
|
||||
|
||||
" give header
|
||||
let lastline= line("$")
|
||||
call setline(lastline+1,'" zip.vim version '.g:loaded_zip)
|
||||
call setline(lastline+2,'" Browsing zipfile '.a:zipfile)
|
||||
call setline(lastline+3,'" 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! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
|
||||
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
|
||||
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()
|
||||
silent %d
|
||||
keepj sil! %d
|
||||
let eikeep= &ei
|
||||
set ei=BufReadCmd,FileReadCmd
|
||||
exe "r ".fnameescape(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>
|
||||
@@ -199,11 +193,12 @@ fun! zip#Read(fname,mode)
|
||||
" call Decho("zipfile<".zipfile.">")
|
||||
" call Decho("fname <".fname.">")
|
||||
|
||||
" call Decho("exe r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1))
|
||||
exe "silent r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
|
||||
" 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
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
" 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: 2011 Apr 21
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -12,8 +13,9 @@ 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\ %
|
||||
|
||||
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:
|
||||
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: eruby.vim,v 1.7 2008/06/29 04:18:42 tpope Exp $
|
||||
" Last Change: 2008 Aug 1
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
|
||||
23
runtime/compiler/g95.vim
Normal file
23
runtime/compiler/g95.vim
Normal file
@@ -0,0 +1,23 @@
|
||||
" Compiler: G95
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.3
|
||||
" Last Change: 2011 Apr 01
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3492
|
||||
" https://bitbucket.org/xuhdev/compiler-g95.vim
|
||||
" License: Same as Vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
let current_compiler = 'g95'
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%AIn\ file\ %f:%l,
|
||||
\%-C%p1,
|
||||
\%-Z%trror:\ %m,
|
||||
\%-Z%tarning\ (%n):\ %m,
|
||||
\%-C%.%#
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Compiler: GNU C Compiler
|
||||
" Maintainer: Nikolai Weibull <now@bitwi.se>
|
||||
" Latest Revision: 2009-05-01
|
||||
" Latest Revision: 2010-10-14
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
@@ -9,7 +9,7 @@ endif
|
||||
let current_compiler = "gcc"
|
||||
|
||||
let s:cpo_save = &cpo
|
||||
set cpo-=C
|
||||
set cpo&vim
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%*[^\"]\"%f\"%*\\D%l:%c:\ %m,
|
||||
@@ -18,7 +18,11 @@ CompilerSet errorformat=
|
||||
\\"%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',
|
||||
|
||||
22
runtime/compiler/gfortran.vim
Normal file
22
runtime/compiler/gfortran.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Compiler: GNU Fortran Compiler
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.3
|
||||
" Last Change: 19 March 2011
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3496
|
||||
" https://bitbucket.org/xuhdev/compiler-gfortran.vim
|
||||
" License: Same as Vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
let current_compiler = 'gfortran'
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%A%f:%l.%c:,
|
||||
\%-Z%trror:\ %m,
|
||||
\%-Z%tarning:\ %m,
|
||||
\%-C%.%#
|
||||
22
runtime/compiler/ifort.vim
Normal file
22
runtime/compiler/ifort.vim
Normal file
@@ -0,0 +1,22 @@
|
||||
" Compiler: Intel Fortran Compiler
|
||||
" Maintainer: H Xu <xuhdev@gmail.com>
|
||||
" Version: 0.1.1
|
||||
" Last Change: 19 March 2011
|
||||
" Homepage: http://www.vim.org/scripts/script.php?script_id=3497
|
||||
" https://bitbucket.org/xuhdev/compiler-ifort.vim
|
||||
" License: Same as Vim
|
||||
|
||||
if exists('current_compiler')
|
||||
finish
|
||||
endif
|
||||
let current_compiler = 'ifort'
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%A%f(%l):\ %trror\ \#%n:\ %m,
|
||||
\%A%f(%l):\ %tarning\ \#%n:\ %m,
|
||||
\%-Z%p^,
|
||||
\%-G%.%#
|
||||
@@ -1,6 +1,6 @@
|
||||
" Vim Compiler File
|
||||
" Compiler: Perl syntax checks (perl -Wc)
|
||||
" Maintainer: Christian J. Robinson <infynity@onewest.net>
|
||||
" Maintainer: Christian J. Robinson <heptite@gmail.com>
|
||||
" Last Change: 2006 Aug 13
|
||||
|
||||
if exists("current_compiler")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Language: RSpec
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.info>
|
||||
" Info: $Id: rspec.vim,v 1.2 2008/06/29 04:18:42 tpope Exp $
|
||||
" 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>
|
||||
|
||||
@@ -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: ruby.vim,v 1.13 2008/06/29 04:18:43 tpope Exp $
|
||||
" Last Change: 2008 Aug 1
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
" Vim compiler file
|
||||
" Language: Test::Unit - Ruby Unit Testing Framework
|
||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||
" Info: $Id: rubyunit.vim,v 1.12 2008/06/29 04:18:43 tpope Exp $
|
||||
" Last Change: 2008 Aug 1
|
||||
" URL: http://vim-ruby.rubyforge.org
|
||||
" Anon CVS: See above site
|
||||
" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
|
||||
|
||||
@@ -37,8 +37,10 @@ DOCS = \
|
||||
hangulin.txt \
|
||||
hebrew.txt \
|
||||
help.txt \
|
||||
helphelp.txt \
|
||||
howto.txt \
|
||||
if_cscop.txt \
|
||||
if_lua.txt \
|
||||
if_mzsch.txt \
|
||||
if_ole.txt \
|
||||
if_perl.txt \
|
||||
@@ -167,8 +169,10 @@ HTMLS = \
|
||||
gui_x11.html \
|
||||
hangulin.html \
|
||||
hebrew.html \
|
||||
helphelp.html \
|
||||
howto.html \
|
||||
if_cscop.html \
|
||||
if_lua.html \
|
||||
if_mzsch.html \
|
||||
if_ole.html \
|
||||
if_perl.html \
|
||||
@@ -336,12 +340,14 @@ uganda.nsis.txt: uganda.txt
|
||||
uganda.txt | uniq >uganda.nsis.txt
|
||||
|
||||
# Awk version of .txt to .html conversion.
|
||||
html: noerrors tags tags.ref $(HTMLS)
|
||||
html: noerrors tags $(HTMLS)
|
||||
@if test -f errors.log; then more errors.log; fi
|
||||
|
||||
noerrors:
|
||||
-rm -f errors.log
|
||||
|
||||
$(HTMLS): tags.ref
|
||||
|
||||
.txt.html:
|
||||
$(AWK) -f makehtml.awk $< >$@
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*arabic.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*arabic.txt* For Vim version 7.3. Last change: 2010 Nov 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Nadim Shaikli
|
||||
@@ -146,7 +146,7 @@ o Enable Arabic settings [short-cut]
|
||||
:set arabic
|
||||
<
|
||||
The two above noted possible invocations are the preferred manner
|
||||
in which users are instructed to proceed. Baring an enabled 'termbidi'
|
||||
in which users are instructed to proceed. Barring an enabled 'termbidi'
|
||||
setting, both command options:
|
||||
|
||||
1. set the appropriate keymap
|
||||
@@ -275,7 +275,7 @@ o Keyboard
|
||||
+ CTRL-^ in insert/replace mode toggles between Arabic/Latin mode
|
||||
|
||||
+ Keyboard mapping is based on the Microsoft's Arabic keymap (the
|
||||
defacto standard in the Arab world):
|
||||
de facto standard in the Arab world):
|
||||
|
||||
+---------------------------------------------------------------------+
|
||||
|! |@ |# |$ |% |^ |& |* |( |) |_ |+ || |~ ّ |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*autocmd.txt* For Vim version 7.2. Last change: 2009 Nov 25
|
||||
*autocmd.txt* For Vim version 7.3. Last change: 2012 Feb 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -33,7 +33,7 @@ files matching *.c. You can also use autocommands to implement advanced
|
||||
features, such as editing compressed files (see |gzip-example|). The usual
|
||||
place to put autocommands is in your .vimrc or .exrc file.
|
||||
|
||||
*E203* *E204* *E143*
|
||||
*E203* *E204* *E143* *E855*
|
||||
WARNING: Using autocommands is very powerful, and may lead to unexpected side
|
||||
effects. Be careful not to destroy your text.
|
||||
- It's a good idea to do some testing on an expendable copy of a file first.
|
||||
@@ -299,6 +299,8 @@ Name triggered by ~
|
||||
|InsertEnter| starting Insert mode
|
||||
|InsertChange| when typing <Insert> while in Insert or Replace mode
|
||||
|InsertLeave| when leaving Insert mode
|
||||
|InsertCharPre| when a character was typed in Insert mode, before
|
||||
inserting it
|
||||
|
||||
|ColorScheme| after loading a color scheme
|
||||
|
||||
@@ -401,6 +403,8 @@ BufUnload Before unloading a buffer. This is when the
|
||||
buffer being unloaded "<afile>".
|
||||
Don't change to another buffer, it will cause
|
||||
problems.
|
||||
When exiting and v:dying is 2 or more this
|
||||
event is not triggered.
|
||||
*BufWinEnter*
|
||||
BufWinEnter After a buffer is displayed in a window. This
|
||||
can be when the buffer is loaded (after
|
||||
@@ -422,6 +426,8 @@ BufWinLeave Before a buffer is removed from a window.
|
||||
NOTE: When this autocommand is executed, the
|
||||
current buffer "%" may be different from the
|
||||
buffer being unloaded "<afile>".
|
||||
When exiting and v:dying is 2 or more this
|
||||
event is not triggered.
|
||||
*BufWipeout*
|
||||
BufWipeout Before completely deleting a buffer. The
|
||||
BufUnload and BufDelete events may be called
|
||||
@@ -442,6 +448,9 @@ BufWriteCmd Before writing the whole buffer to a file.
|
||||
'modified' if successful, unless '+' is in
|
||||
'cpo' and writing to another file |cpo-+|.
|
||||
The buffer contents should not be changed.
|
||||
When the command resets 'modified' the undo
|
||||
information is adjusted to mark older undo
|
||||
states as 'modified', like |:write| does.
|
||||
|Cmd-event|
|
||||
*BufWritePost*
|
||||
BufWritePost After writing the whole buffer to a file
|
||||
@@ -502,6 +511,7 @@ CursorMoved After the cursor was moved in Normal mode.
|
||||
not expect or that is slow.
|
||||
*CursorMovedI*
|
||||
CursorMovedI After the cursor was moved in Insert mode.
|
||||
Not triggered when the popup menu is visible.
|
||||
Otherwise the same as CursorMoved.
|
||||
*EncodingChanged*
|
||||
EncodingChanged Fires off after the 'encoding' option has been
|
||||
@@ -653,6 +663,17 @@ InsertChange When typing <Insert> while in Insert or
|
||||
indicates the new mode.
|
||||
Be careful not to move the cursor or do
|
||||
anything else that the user does not expect.
|
||||
*InsertCharPre*
|
||||
InsertCharPre When a character is typed in Insert mode,
|
||||
before inserting the char.
|
||||
The |v:char| variable indicates the char typed
|
||||
and can be changed during the event to insert
|
||||
a different character. When |v:char| is set
|
||||
to more than one character this text is
|
||||
inserted literally.
|
||||
It is not allowed to change the text |textlock|.
|
||||
The event is not triggered when 'paste' is
|
||||
set.
|
||||
*InsertEnter*
|
||||
InsertEnter Just before starting Insert mode. Also for
|
||||
Replace mode and Virtual Replace mode. The
|
||||
@@ -678,10 +699,13 @@ MenuPopup Just before showing the popup menu (under the
|
||||
QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|
||||
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|
||||
|:vimgrepadd|, |:lvimgrepadd|). The pattern is
|
||||
matched against the command being run. When
|
||||
|:grep| is used but 'grepprg' is set to
|
||||
"internal" it still matches "grep".
|
||||
|:vimgrepadd|, |:lvimgrepadd|, |:cscope|,
|
||||
|:cfile|, |:cgetfile|, |:caddfile|, |:lfile|,
|
||||
|:lgetfile|, |:laddfile|, |:helpgrep|,
|
||||
|:lhelpgrep|).
|
||||
The pattern is matched against the command
|
||||
being run. When |:grep| is used but 'grepprg'
|
||||
is set to "internal" it still matches "grep".
|
||||
This command cannot be used to set the
|
||||
'makeprg' and 'grepprg' variables.
|
||||
If this command causes an error, the quickfix
|
||||
@@ -689,7 +713,10 @@ QuickFixCmdPre Before a quickfix command is run (|:make|,
|
||||
*QuickFixCmdPost*
|
||||
QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
|
||||
command is run, before jumping to the first
|
||||
location. See |QuickFixCmdPost-example|.
|
||||
location. For |:cfile| and |:lfile| commands
|
||||
it is run after error file is read and before
|
||||
moving to the first error.
|
||||
See |QuickFixCmdPost-example|.
|
||||
*RemoteReply*
|
||||
RemoteReply When a reply from a Vim that functions as
|
||||
server was received |server2client()|. The
|
||||
@@ -782,7 +809,10 @@ TermChanged After the value of 'term' has changed. Useful
|
||||
TermResponse After the response to |t_RV| is received from
|
||||
the terminal. The value of |v:termresponse|
|
||||
can be used to do things depending on the
|
||||
terminal version.
|
||||
terminal version. Note that this event may be
|
||||
triggered halfway executing another event,
|
||||
especially if file I/O, a shell command or
|
||||
anything else that takes time is involved.
|
||||
*User*
|
||||
User Never executed automatically. To be used for
|
||||
autocommands that are only executed with
|
||||
@@ -799,6 +829,8 @@ VimLeave Before exiting Vim, just after writing the
|
||||
.viminfo file. Executed only once, like
|
||||
VimLeavePre.
|
||||
To detect an abnormal exit use |v:dying|.
|
||||
When v:dying is 2 or more this event is not
|
||||
triggered.
|
||||
*VimLeavePre*
|
||||
VimLeavePre Before exiting Vim, just before writing the
|
||||
.viminfo file. This is executed only once,
|
||||
@@ -807,6 +839,8 @@ VimLeavePre Before exiting Vim, just before writing the
|
||||
Mostly useful with a "*" pattern. >
|
||||
:autocmd VimLeavePre * call CleanupStuff()
|
||||
< To detect an abnormal exit use |v:dying|.
|
||||
When v:dying is 2 or more this event is not
|
||||
triggered.
|
||||
*VimResized*
|
||||
VimResized After the Vim window was resized, thus 'lines'
|
||||
and/or 'columns' changed. Not when starting
|
||||
@@ -1024,7 +1058,7 @@ Note that the 'eventignore' option applies here too. Events listed in this
|
||||
option will not cause any commands to be executed.
|
||||
|
||||
*:do* *:doau* *:doautocmd* *E217*
|
||||
:do[autocmd] [group] {event} [fname]
|
||||
:do[autocmd] [<nomodeline>] [group] {event} [fname]
|
||||
Apply the autocommands matching [fname] (default:
|
||||
current file name) for {event} to the current buffer.
|
||||
You can use this when the current file name does not
|
||||
@@ -1033,8 +1067,8 @@ option will not cause any commands to be executed.
|
||||
It's possible to use this inside an autocommand too,
|
||||
so you can base the autocommands for one extension on
|
||||
another extension. Example: >
|
||||
:au Bufenter *.cpp so ~/.vimrc_cpp
|
||||
:au Bufenter *.cpp doau BufEnter x.c
|
||||
:au BufEnter *.cpp so ~/.vimrc_cpp
|
||||
:au BufEnter *.cpp doau BufEnter x.c
|
||||
< Be careful to avoid endless loops. See
|
||||
|autocmd-nested|.
|
||||
|
||||
@@ -1043,14 +1077,17 @@ option will not cause any commands to be executed.
|
||||
argument is included, Vim executes only the matching
|
||||
autocommands for that group. Note: if you use an
|
||||
undefined group name, Vim gives you an error message.
|
||||
|
||||
*<nomodeline>*
|
||||
After applying the autocommands the modelines are
|
||||
processed, so that their settings overrule the
|
||||
settings from autocommands, like what happens when
|
||||
editing a file.
|
||||
editing a file. This is skipped when the <nomodeline>
|
||||
argument is present. You probably want to use
|
||||
<nomodeline> for events that are not used when loading
|
||||
a buffer, such as |User|.
|
||||
|
||||
*:doautoa* *:doautoall*
|
||||
:doautoa[ll] [group] {event} [fname]
|
||||
:doautoa[ll] [<nomodeline>] [group] {event} [fname]
|
||||
Like ":doautocmd", but apply the autocommands to each
|
||||
loaded buffer. Note that [fname] is used to select
|
||||
the autocommands, not the buffers to which they are
|
||||
@@ -1272,7 +1309,7 @@ and "++ff=" argument that are effective. These should be used for the command
|
||||
that reads/writes the file. The |v:cmdbang| variable is one when "!" was
|
||||
used, zero otherwise.
|
||||
|
||||
See the $VIMRUNTIME/plugin/netrw.vim for examples.
|
||||
See the $VIMRUNTIME/plugin/netrwPlugin.vim for examples.
|
||||
|
||||
==============================================================================
|
||||
11. Disabling autocommands *autocmd-disable*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*change.txt* For Vim version 7.2. Last change: 2009 Nov 11
|
||||
*change.txt* For Vim version 7.3. Last change: 2012 Jan 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -71,7 +71,7 @@ For inserting text see |insert.txt|.
|
||||
"D" deletes the highlighted text plus all text until
|
||||
the end of the line. {not in Vi}
|
||||
|
||||
*:d* *:de* *:del* *:delete*
|
||||
*:d* *:de* *:del* *:delete* *:dl*
|
||||
:[range]d[elete] [x] Delete [range] lines (default: current line) [into
|
||||
register x].
|
||||
|
||||
@@ -88,7 +88,8 @@ An exception for the d{motion} command: If the motion is not linewise, the
|
||||
start and end of the motion are not in the same line, and there are only
|
||||
blanks before the start and after the end of the motion, the delete becomes
|
||||
linewise. This means that the delete also removes the line of blanks that you
|
||||
might expect to remain.
|
||||
might expect to remain. Use the |o_v| operator to force the motion to be
|
||||
characterwise.
|
||||
|
||||
Trying to delete an empty region of text (e.g., "d0" in the first column)
|
||||
is an error when 'cpoptions' includes the 'E' flag.
|
||||
@@ -159,7 +160,7 @@ gR Enter Virtual Replace mode: Each character you type
|
||||
<Tab> may replace several characters at once.
|
||||
Repeat the entered text [count]-1 times. See
|
||||
|Virtual-Replace-mode| for more details.
|
||||
{not available when compiled without the +vreplace
|
||||
{not available when compiled without the |+vreplace|
|
||||
feature}
|
||||
|
||||
*c*
|
||||
@@ -279,7 +280,7 @@ gr{char} Replace the virtual characters under the cursor with
|
||||
space. See |gR| and |Virtual-Replace-mode| for more
|
||||
details. As with |r| a count may be given.
|
||||
{char} can be entered like with |r|.
|
||||
{not available when compiled without the +vreplace
|
||||
{not available when compiled without the |+vreplace|
|
||||
feature}
|
||||
|
||||
*digraph-arg*
|
||||
@@ -522,11 +523,11 @@ comment (starting with '"') after the ":!" command.
|
||||
={motion} Filter {motion} lines through the external program
|
||||
given with the 'equalprg' option. When the 'equalprg'
|
||||
option is empty (this is the default), use the
|
||||
internal formatting function |C-indenting|. But when
|
||||
'indentexpr' is not empty, it will be used instead
|
||||
|indent-expression|. When Vim was compiled without
|
||||
internal formatting then the "indent" program is used
|
||||
as a last resort.
|
||||
internal formatting function |C-indenting| and
|
||||
|'lisp'|. But when 'indentexpr' is not empty, it will
|
||||
be used instead |indent-expression|. When Vim was
|
||||
compiled without internal formatting then the "indent"
|
||||
program is used as a last resort.
|
||||
|
||||
*==*
|
||||
== Filter [count] lines like with ={motion}.
|
||||
@@ -585,7 +586,7 @@ For other systems the tmpnam() library function is used.
|
||||
":&r". See |:s_flags| for [flags].
|
||||
|
||||
*&*
|
||||
& Synonym for ":s//~/" (repeat last substitute). Note
|
||||
& Synonym for ":s" (repeat last substitute). Note
|
||||
that the flags are not remembered, thus it might
|
||||
actually work differently. You can use ":&&" to keep
|
||||
the flags.
|
||||
@@ -622,9 +623,9 @@ The flags that you can use for the substitute commands:
|
||||
'a' to substitute this and all remaining matches {not in Vi}
|
||||
'q' to quit substituting {not in Vi}
|
||||
CTRL-E to scroll the screen up {not in Vi, not available when
|
||||
compiled without the +insert_expand feature}
|
||||
compiled without the |+insert_expand| feature}
|
||||
CTRL-Y to scroll the screen down {not in Vi, not available when
|
||||
compiled without the +insert_expand feature}
|
||||
compiled without the |+insert_expand| feature}
|
||||
If the 'edcompatible' option is on, Vim remembers the [c] flag and
|
||||
toggles it each time you use it, but resets it when you give a new
|
||||
search pattern.
|
||||
@@ -690,7 +691,8 @@ reason is that the flags can only be found by skipping the pattern, and in
|
||||
order to skip the pattern the "magicness" must be known. Catch 22!
|
||||
|
||||
If the {pattern} for the substitute command is empty, the command uses the
|
||||
pattern from the last substitute or ":global" command. With the [r] flag, the
|
||||
pattern from the last substitute or ":global" command. If there is none, but
|
||||
there is a previous search pattern, that one is used. With the [r] flag, the
|
||||
command uses the pattern from the last substitute, ":global", or search
|
||||
command.
|
||||
|
||||
@@ -716,11 +718,13 @@ Otherwise it works on whole lines anyway.
|
||||
|
||||
*sub-replace-special* *:s\=*
|
||||
When the {string} starts with "\=" it is evaluated as an expression, see
|
||||
|sub-replace-expression|. You can use that for any special characters.
|
||||
|sub-replace-expression|. You can use that for complex replacement or special
|
||||
characters.
|
||||
|
||||
Otherwise these characters in {string} have a special meaning:
|
||||
*:s%*
|
||||
When {string} is equal to "%" and '/' is included with the 'cpoptions' option,
|
||||
then the {string} of the previous substitute command is used. |cpo-/|
|
||||
then the {string} of the previous substitute command is used, see |cpo-/|
|
||||
|
||||
magic nomagic action ~
|
||||
& \& replaced with the whole matched pattern *s/\&*
|
||||
@@ -755,6 +759,14 @@ magic nomagic action ~
|
||||
\x where x is any character not mentioned above:
|
||||
Reserved for future expansion
|
||||
|
||||
The special meaning is also used inside the third argument {sub} of
|
||||
the |substitute()| function with the following exceptions:
|
||||
- A % inserts a percent literally without regard to 'cpoptions'.
|
||||
- magic is always set without regard to 'magic'.
|
||||
- A ~ inserts a tilde literally.
|
||||
- <CR> and \r inserts a carriage-return (CTRL-M).
|
||||
- \<CR> does not have a special meaning. it's just one of \x.
|
||||
|
||||
Examples: >
|
||||
:s/a\|b/xxx\0xxx/g modifies "a b" to "xxxaxxx xxxbxxx"
|
||||
:s/\([abc]\)\([efg]\)/\2\1/g modifies "af fa bg" to "fa fa gb"
|
||||
@@ -786,17 +798,19 @@ either the first or second pattern in parentheses did not match, so either
|
||||
Substitute with an expression *sub-replace-expression*
|
||||
*sub-replace-\=*
|
||||
When the substitute string starts with "\=" the remainder is interpreted as an
|
||||
expression. This does not work recursively: a substitute() function inside
|
||||
expression. This does not work recursively: a |substitute()| function inside
|
||||
the expression cannot use "\=" for the substitute string.
|
||||
|
||||
The special meaning for characters as mentioned at |sub-replace-special| does
|
||||
not apply except for "<CR>", "\<CR>" and "\\". Thus in the result of the
|
||||
expression you need to use two backslashes to get one, put a backslash before a
|
||||
<CR> you want to insert, and use a <CR> without a backslash where you want to
|
||||
break the line.
|
||||
not apply except for "<CR>". A <NL> character is used as a line break, you
|
||||
can get one with a double-quote string: "\n". Prepend a backslash to get a
|
||||
real <NL> character (which will be a NUL in the file).
|
||||
|
||||
For convenience a <NL> character is also used as a line break. Prepend a
|
||||
backslash to get a real <NL> character (which will be a NUL in the file).
|
||||
The "\=" notation can also be used inside the third argument {sub} of
|
||||
|substitute()| function. In this case, the special meaning for characters as
|
||||
mentioned at |sub-replace-special| does not apply at all. Especially, <CR> and
|
||||
<NL> are interpreted not as a line break but as a carriage-return and a
|
||||
new-line respectively.
|
||||
|
||||
When the result is a |List| then the items are joined with separating line
|
||||
breaks. Thus each item becomes a line, except that they can contain line
|
||||
@@ -916,8 +930,10 @@ inside of strings can change! Also see 'softtabstop' option. >
|
||||
{Visual}["x]Y Yank the highlighted lines [into register x] (for
|
||||
{Visual} see |Visual-mode|). {not in Vi}
|
||||
|
||||
*:y* *:yank*
|
||||
:[range]y[ank] [x] Yank [range] lines [into register x].
|
||||
*:y* *:yank* *E850*
|
||||
:[range]y[ank] [x] Yank [range] lines [into register x]. Yanking to the
|
||||
"* or "+ registers is possible only when the
|
||||
|+clipboard| feature is included.
|
||||
|
||||
:[range]y[ank] [x] {count}
|
||||
Yank {count} lines, starting with last line number
|
||||
@@ -1139,7 +1155,7 @@ characters. If the String ends in a <NL>, it is regarded as a linewise
|
||||
register. {not in Vi}
|
||||
|
||||
7. Selection and drop registers "*, "+ and "~
|
||||
Use these register for storing and retrieving the selected text for the GUI.
|
||||
Use these registers for storing and retrieving the selected text for the GUI.
|
||||
See |quotestar| and |quoteplus|. When the clipboard is not available or not
|
||||
working, the unnamed register is used instead. For Unix systems the clipboard
|
||||
is only available when the |+xterm_clipboard| feature is present. {not in Vi}
|
||||
@@ -1245,7 +1261,8 @@ gq{motion} Format the lines that {motion} moves over.
|
||||
:nnoremap Q gq
|
||||
|
||||
gqgq *gqgq* *gqq*
|
||||
gqq Format the current line. {not in Vi}
|
||||
gqq Format the current line. With a count format that
|
||||
many lines. {not in Vi}
|
||||
|
||||
*v_gq*
|
||||
{Visual}gq Format the highlighted text. (for {Visual} see
|
||||
@@ -1386,16 +1403,19 @@ before typing anything else on the new line. This will replace the
|
||||
middle-comment leader with the end-comment leader and apply any specified
|
||||
alignment, leaving just " */". There is no need to hit BackSpace first.
|
||||
|
||||
When there is a match with a middle part, but there also is a maching end part
|
||||
which is longer, the end part is used. This makes a C style comment work
|
||||
without requiring the middle part to end with a space.
|
||||
|
||||
Here is an example of alignment flags at work to make a comment stand out
|
||||
(kind of looks like a 1 too). Consider comment string >
|
||||
sr:/***,m:**,ex2:******/
|
||||
|
||||
/***
|
||||
**<--right aligned from "r" flag
|
||||
**
|
||||
offset 2 spaces from the "2" flag--->**
|
||||
******/
|
||||
(kind of looks like a 1 too). Consider comment string: >
|
||||
:set comments=sr:/***,m:**,ex-2:******/
|
||||
<
|
||||
/*** ~
|
||||
**<--right aligned from "r" flag ~
|
||||
** ~
|
||||
offset 2 spaces for the "-2" flag--->** ~
|
||||
******/ ~
|
||||
In this case, the first comment was typed, then return was pressed 4 times,
|
||||
then "/" was pressed to end the comment.
|
||||
|
||||
@@ -1413,8 +1433,8 @@ Reindenting using a different method like |gq| or |=| will not consult
|
||||
alignment flags either. The same behaviour can be defined in those other
|
||||
formatting options. One consideration is that 'cindent' has additional options
|
||||
for context based indenting of comments but cannot replicate many three piece
|
||||
indent alignments. However, 'indentexpr' is has the ability to work better
|
||||
with three piece comments.
|
||||
indent alignments. However, 'indentexpr' has the ability to work better with
|
||||
three piece comments.
|
||||
|
||||
Other examples: >
|
||||
"b:*" Includes lines starting with "*", but not if the "*" is
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*cmdline.txt* For Vim version 7.2. Last change: 2009 Oct 25
|
||||
*cmdline.txt* For Vim version 7.3. Last change: 2012 Feb 05
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -83,9 +83,9 @@ CTRL-V Insert next non-digit literally. Up to three digits form the
|
||||
CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
||||
control flow, it doesn't work then.
|
||||
|
||||
*c_<Left>*
|
||||
*c_<Left>* *c_Left*
|
||||
<Left> cursor left
|
||||
*c_<Right>*
|
||||
*c_<Right>* *c_Right*
|
||||
<Right> cursor right
|
||||
*c_<S-Left>*
|
||||
<S-Left> or <C-Left> *c_<C-Left>*
|
||||
@@ -93,18 +93,18 @@ CTRL-Q Same as CTRL-V. But with some terminals it is used for
|
||||
*c_<S-Right>*
|
||||
<S-Right> or <C-Right> *c_<C-Right>*
|
||||
cursor one WORD right
|
||||
CTRL-B or <Home> *c_CTRL-B* *c_<Home>*
|
||||
CTRL-B or <Home> *c_CTRL-B* *c_<Home>* *c_Home*
|
||||
cursor to beginning of command-line
|
||||
CTRL-E or <End> *c_CTRL-E* *c_<End>*
|
||||
CTRL-E or <End> *c_CTRL-E* *c_<End>* *c_End*
|
||||
cursor to end of command-line
|
||||
|
||||
*c_<LeftMouse>*
|
||||
<LeftMouse> Move the cursor to the position of the mouse click.
|
||||
|
||||
CTRL-H *c_<BS>* *c_CTRL-H*
|
||||
CTRL-H *c_<BS>* *c_CTRL-H* *c_BS*
|
||||
<BS> Delete the character in front of the cursor (see |:fixdel| if
|
||||
your <BS> key does not do what you want).
|
||||
*c_<Del>*
|
||||
*c_<Del>* *c_Del*
|
||||
<Del> Delete the character under the cursor (at end of line:
|
||||
character before the cursor) (see |:fixdel| if your <Del>
|
||||
key does not do what you want).
|
||||
@@ -118,7 +118,7 @@ CTRL-U Remove all characters between the cursor position and
|
||||
preferred behavior, add the following to your .vimrc: >
|
||||
:cnoremap <C-U> <C-E><C-U>
|
||||
<
|
||||
*c_<Insert>*
|
||||
*c_<Insert>* *c_Insert*
|
||||
<Insert> Toggle between insert and overstrike. {not in Vi}
|
||||
|
||||
{char1} <BS> {char2} or *c_digraph*
|
||||
@@ -182,7 +182,7 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
|
||||
the word that was already typed is not inserted again.
|
||||
|
||||
{not in Vi}
|
||||
CTRL-F and CTRL-P: {only when +file_in_path feature is
|
||||
CTRL-F and CTRL-P: {only when |+file_in_path| feature is
|
||||
included}
|
||||
|
||||
*c_CTRL-R_CTRL-R* *c_<C-R>_<C-R>*
|
||||
@@ -224,9 +224,9 @@ CTRL-Y When there is a modeless selection, copy the selection into
|
||||
the clipboard. |modeless-selection|
|
||||
If there is no selection CTRL-Y is inserted as a character.
|
||||
|
||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
|
||||
CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>* *c_CR*
|
||||
<CR> or <NL> start entered command
|
||||
*c_<Esc>*
|
||||
*c_<Esc>* *c_Esc*
|
||||
<Esc> When typed and 'x' not present in 'cpoptions', quit
|
||||
Command-line mode without executing. In macros or when 'x'
|
||||
present in 'cpoptions', start entered command.
|
||||
@@ -235,12 +235,12 @@ CTRL-J *c_CTRL-J* *c_<NL>* *c_<CR>*
|
||||
*c_CTRL-C*
|
||||
CTRL-C quit command-line without executing
|
||||
|
||||
*c_<Up>*
|
||||
*c_<Up>* *c_Up*
|
||||
<Up> recall older command-line from history, whose beginning
|
||||
matches the current command-line (see below).
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
feature}
|
||||
*c_<Down>*
|
||||
*c_<Down>* *c_Down*
|
||||
<Down> recall more recent command-line from history, whose beginning
|
||||
matches the current command-line (see below).
|
||||
{not available when compiled without the |+cmdline_hist|
|
||||
@@ -372,10 +372,10 @@ word before the cursor. This is available for:
|
||||
- Mappings: Only after a ":map" or similar command.
|
||||
- Variable and function names: Only after a ":if", ":call" or similar command.
|
||||
|
||||
When Vim was compiled with the |+cmdline_compl| feature disabled, only file
|
||||
names, directories and help items can be completed. The number of help item
|
||||
matches is limited (currently to 300) to avoid a long delay when there are
|
||||
very many matches.
|
||||
When Vim was compiled without the |+cmdline_compl| feature only file names,
|
||||
directories and help items can be completed. The number of help item matches
|
||||
is limited (currently to 300) to avoid a long delay when there are very many
|
||||
matches.
|
||||
|
||||
These are the commands that can be used:
|
||||
|
||||
@@ -416,11 +416,17 @@ CTRL-L A match is done on the pattern in front of the cursor. If
|
||||
than the pattern, no completion is done.
|
||||
When 'incsearch' is set, entering a search pattern for "/" or
|
||||
"?" and the current match is displayed then CTRL-L will add
|
||||
one character from the end of the current match.
|
||||
one character from the end of the current match. If
|
||||
'ignorecase' and 'smartcase' are set and the command line has
|
||||
no uppercase characters, the added character is converted to
|
||||
lowercase.
|
||||
|
||||
The 'wildchar' option defaults to <Tab> (CTRL-E when in Vi compatible mode; in
|
||||
a previous version <Esc> was used). In the pattern standard wildcards '*' and
|
||||
'?' are accepted. '*' matches any string, '?' matches exactly one character.
|
||||
'?' are accepted when matching file names. '*' matches any string, '?'
|
||||
matches exactly one character.
|
||||
|
||||
The 'wildignorecase' option can be set to ignore case in filenames.
|
||||
|
||||
If you like tcsh's autolist completion, you can use this mapping:
|
||||
:cnoremap X <C-L><C-D>
|
||||
@@ -522,6 +528,7 @@ followed by another Vim command:
|
||||
:registers
|
||||
:read !
|
||||
:scscope
|
||||
:sign
|
||||
:tcl
|
||||
:tcldo
|
||||
:tclfile
|
||||
@@ -750,7 +757,7 @@ function expand() |expand()|.
|
||||
#<n (where n is a number > 0) is replaced with old *:_#<* *c_#<*
|
||||
file name n. See |:oldfiles| or |v:oldfiles| to get the
|
||||
number. *E809*
|
||||
{only when compiled with the +eval and +viminfo features}
|
||||
{only when compiled with the |+eval| and |+viminfo| features}
|
||||
|
||||
Note that these, except "#<n", give the file name as it was typed. If an
|
||||
absolute path is needed (when using the file name from a different directory),
|
||||
@@ -777,33 +784,38 @@ it, no matter how many backslashes.
|
||||
*:<cword>* *:<cWORD>* *:<cfile>* *<cfile>*
|
||||
*:<sfile>* *<sfile>* *:<afile>* *<afile>*
|
||||
*:<abuf>* *<abuf>* *:<amatch>* *<amatch>*
|
||||
*E495* *E496* *E497* *E498* *E499* *E500*
|
||||
*<slnum>* *E495* *E496* *E497* *E499* *E500*
|
||||
Note: these are typed literally, they are not special keys!
|
||||
<cword> is replaced with the word under the cursor (like |star|)
|
||||
<cWORD> is replaced with the WORD under the cursor (see |WORD|)
|
||||
<cfile> is replaced with the path name under the cursor (like what
|
||||
|gf| uses)
|
||||
<afile> when executing autocommands, is replaced with the file name
|
||||
for a file read or write
|
||||
<abuf> when executing autocommands, is replaced with the currently
|
||||
<afile> When executing autocommands, is replaced with the file name
|
||||
for a file read or write.
|
||||
<abuf> When executing autocommands, is replaced with the currently
|
||||
effective buffer number (for ":r file" and ":so file" it is
|
||||
the current buffer, the file being read/sourced is not in a
|
||||
buffer).
|
||||
<amatch> when executing autocommands, is replaced with the match for
|
||||
<amatch> When executing autocommands, is replaced with the match for
|
||||
which this autocommand was executed. It differs from
|
||||
<afile> only when the file name isn't used to match with
|
||||
(for FileType, Syntax and SpellFileMissing events).
|
||||
<sfile> when executing a ":source" command, is replaced with the
|
||||
file name of the sourced file;
|
||||
when executing a function, is replaced with
|
||||
<sfile> When executing a ":source" command, is replaced with the
|
||||
file name of the sourced file. *E498*
|
||||
When executing a function, is replaced with
|
||||
"function {function-name}"; function call nesting is
|
||||
indicated like this:
|
||||
"function {function-name1}..{function-name2}". Note that
|
||||
filename-modifiers are useless when <sfile> is used inside
|
||||
a function.
|
||||
<slnum> When executing a ":source" command, is replaced with the
|
||||
line number. *E842*
|
||||
When executing a function it's the line number relative to
|
||||
the start of the function.
|
||||
|
||||
*filename-modifiers*
|
||||
*:_%:* *::8* *::p* *::.* *::~* *::h* *::t* *::r* *::e* *::s* *::gs*
|
||||
*%:8* *%:p* *%:.* *%:~* *%:h* *%:t* *%:r* *%:e* *%:s* *%:gs*
|
||||
The file name modifiers can be used after "%", "#", "#n", "<cfile>", "<sfile>",
|
||||
"<afile>" or "<abuf>". They are also used with the |fnamemodify()| function.
|
||||
These are not available when Vim has been compiled without the |+modify_fname|
|
||||
@@ -855,7 +867,7 @@ These modifiers can be given, in this order:
|
||||
After this, the previous modifiers can be used again. For
|
||||
example ":p", to make a full path after the substitution.
|
||||
:gs?pat?sub?
|
||||
Substitute all occurrences of "path" with "sub". Otherwise
|
||||
Substitute all occurrences of "pat" with "sub". Otherwise
|
||||
this works like ":s".
|
||||
|
||||
Examples, when the file name is "src/version.c", current dir
|
||||
@@ -1027,7 +1039,7 @@ VARIOUS
|
||||
The command-line window cannot be used:
|
||||
- when there already is a command-line window (no nesting)
|
||||
- for entering an encryption key or when using inputsecret()
|
||||
- when Vim was not compiled with the +vertsplit feature
|
||||
- when Vim was not compiled with the |+vertsplit| feature
|
||||
|
||||
Some options are set when the command-line window is opened:
|
||||
'filetype' "vim", when editing an Ex command-line; this starts Vim syntax
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debug.txt* For Vim version 7.2. Last change: 2009 Jul 22
|
||||
*debug.txt* For Vim version 7.3. Last change: 2012 Feb 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -15,14 +15,15 @@ For debugging Vim scripts, functions, etc. see |debug-scripts|
|
||||
|
||||
==============================================================================
|
||||
|
||||
1. Location of a crash, using gcc and gdb *debug-gcc*
|
||||
1. Location of a crash, using gcc and gdb *debug-gcc* *gdb*
|
||||
|
||||
When Vim crashes in one of the test files, and you are using gcc for
|
||||
compilation, here is what you can do to find out exactly where Vim crashes.
|
||||
This also applies when using the MingW tools.
|
||||
|
||||
1. Compile Vim with the "-g" option (there is a line in the Makefile for this,
|
||||
which you can uncomment).
|
||||
1. Compile Vim with the "-g" option (there is a line in the src/Makefile for
|
||||
this, which you can uncomment). Also make sure "strip" is disabled (do not
|
||||
install it, or use the line "STRIP = /bin/true").
|
||||
|
||||
2. Execute these commands (replace "11" with the test that fails): >
|
||||
cd testdir
|
||||
@@ -39,7 +40,7 @@ This also applies when using the MingW tools.
|
||||
|
||||
==============================================================================
|
||||
|
||||
2. Locating memory leaks *debug-leaks*
|
||||
2. Locating memory leaks *debug-leaks* *valgrind*
|
||||
|
||||
If you suspect Vim is leaking memory and you are using Linux, the valgrind
|
||||
tool is very useful to pinpoint memory leaks.
|
||||
@@ -47,14 +48,18 @@ tool is very useful to pinpoint memory leaks.
|
||||
First of all, build Vim with EXITFREE defined. Search for this in MAKEFILE
|
||||
and uncomment the line.
|
||||
|
||||
Use this command to start Vim: *valgrind*
|
||||
Use this command to start Vim:
|
||||
>
|
||||
valgrind --log-file=valgrind.log ./vim
|
||||
valgrind --log-file=valgrind.log --leak-check=full ./vim
|
||||
|
||||
Note: Vim will run much slower. If your .vimrc is big or you have several
|
||||
plugins you need to be patient for startup, or run with the "-u NONE"
|
||||
argument.
|
||||
|
||||
There are often a few leaks from libraries, such as getpwuid() and
|
||||
XtVaAppCreateShell(). Those are unavoidable. The number of bytes should be
|
||||
very small a Kbyte or less.
|
||||
|
||||
==============================================================================
|
||||
|
||||
3. Windows Bug Reporting *debug-win32*
|
||||
@@ -63,7 +68,7 @@ If the Windows version of Vim crashes in a reproducible manner, you can take
|
||||
some steps to provide a useful bug report.
|
||||
|
||||
|
||||
GENERIC ~
|
||||
3.1 GENERIC ~
|
||||
|
||||
You must obtain the debugger symbols (PDB) file for your executable: gvim.pdb
|
||||
for gvim.exe, or vim.pdb for vim.exe. The PDB should be available from the
|
||||
@@ -85,7 +90,7 @@ a Vim executable compiled with the Borland compiler; gdb (see above
|
||||
|
||||
|
||||
*debug-vs2005*
|
||||
2.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~
|
||||
3.2 Debugging Vim crashes with Visual Studio 2005/Visual C++ 2005 Express ~
|
||||
|
||||
First launch vim.exe or gvim.exe and then launch Visual Studio. (If you don't
|
||||
have Visual Studio, follow the instructions at |get-ms-debuggers| to obtain a
|
||||
@@ -119,7 +124,7 @@ installed as a just-in-time debugger. Use WinDbg, |debug-windbg|, if you
|
||||
need to save minidumps or you want a just-in-time (postmortem) debugger.
|
||||
|
||||
*debug-windbg*
|
||||
2.3 Debugging Vim crashes with WinDbg ~
|
||||
3.3 Debugging Vim crashes with WinDbg ~
|
||||
|
||||
See |get-ms-debuggers| to obtain a copy of WinDbg.
|
||||
|
||||
@@ -145,7 +150,7 @@ To save a minidump, type the following at the WinDbg command line: >
|
||||
.dump vim.dmp
|
||||
<
|
||||
*debug-minidump*
|
||||
2.4 Opening a Minidump ~
|
||||
3.4 Opening a Minidump ~
|
||||
|
||||
If you have a minidump file, you can open it in Visual Studio or in WinDbg.
|
||||
|
||||
@@ -157,7 +162,7 @@ In WinDbg: choose Open Crash Dump on the File menu. Follow the instructions in
|
||||
|debug-windbg| to set the Symbol File Path.
|
||||
|
||||
*get-ms-debuggers*
|
||||
2.5 Obtaining Microsoft Debugging Tools ~
|
||||
3.5 Obtaining Microsoft Debugging Tools ~
|
||||
|
||||
The Debugging Tools for Windows (including WinDbg) can be downloaded from
|
||||
http://www.microsoft.com/whdc/devtools/debugging/default.mspx
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*debugger.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*debugger.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*develop.txt* For Vim version 7.2. Last change: 2008 Dec 17
|
||||
*develop.txt* For Vim version 7.3. Last change: 2012 Jan 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -232,6 +232,17 @@ time shadows global declaration
|
||||
new C++ reserved keyword
|
||||
try Borland C++ doesn't like it to be used as a variable.
|
||||
|
||||
clear Mac curses.h
|
||||
echo Mac curses.h
|
||||
instr Mac curses.h
|
||||
meta Mac curses.h
|
||||
newwin Mac curses.h
|
||||
nl Mac curses.h
|
||||
overwrite Mac curses.h
|
||||
refresh Mac curses.h
|
||||
scroll Mac curses.h
|
||||
typeahead Mac curses.h
|
||||
|
||||
basename() GNU string function
|
||||
dirname() GNU string function
|
||||
get_env_value() Linux system function
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
*diff.txt* For Vim version 7.2. Last change: 2009 Sep 15
|
||||
*diff.txt* For Vim version 7.3. Last change: 2011 Apr 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
*diff* *vimdiff* *gvimdiff* *diff-mode*
|
||||
This file describes the +diff feature: Showing differences between two,
|
||||
This file describes the |+diff| feature: Showing differences between two,
|
||||
three or four versions of the same file.
|
||||
|
||||
The basics are explained in section |08.7| of the user manual.
|
||||
@@ -57,6 +57,7 @@ In each of the edited files these options are set:
|
||||
|
||||
'diff' on
|
||||
'scrollbind' on
|
||||
'cursorbind' on
|
||||
'scrollopt' includes "hor"
|
||||
'wrap' off
|
||||
'foldmethod' "diff"
|
||||
@@ -133,6 +134,7 @@ the old values are not remembered.
|
||||
|
||||
'diff' off
|
||||
'scrollbind' off
|
||||
'cursorbind' off
|
||||
'scrollopt' without "hor"
|
||||
'wrap' on
|
||||
'foldmethod' "manual"
|
||||
@@ -165,8 +167,8 @@ in diff mode in one window and "normal" in another window. It is also
|
||||
possible to view the changes you have made to a buffer since the file was
|
||||
loaded. Since Vim doesn't allow having two buffers for the same file, you
|
||||
need another buffer. This command is useful: >
|
||||
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
|
||||
\ | wincmd p | diffthis
|
||||
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
|
||||
\ | diffthis | wincmd p | diffthis
|
||||
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
|
||||
between the current buffer and the file it was loaded from.
|
||||
|
||||
@@ -259,10 +261,12 @@ that the buffers will be equal within the specified range.
|
||||
*do*
|
||||
do Same as ":diffget" without argument or range. The "o" stands
|
||||
for "obtain" ("dg" can't be used, it could be the start of
|
||||
"dgg"!).
|
||||
"dgg"!). Note: this doesn't work in Visual mode.
|
||||
|
||||
*dp*
|
||||
dp Same as ":diffput" without argument or range.
|
||||
Note: this doesn't work in Visual mode.
|
||||
|
||||
|
||||
When no [range] is given, the diff at the cursor position or just above it is
|
||||
affected. When [range] is used, Vim tries to only put or get the specified
|
||||
@@ -369,9 +373,9 @@ get an error message. Possible causes:
|
||||
If it's not clear what the problem is set the 'verbose' option to one or more
|
||||
to see more messages.
|
||||
|
||||
The self-installing Vim includes a diff program. If you don't have it you
|
||||
might want to download a diff.exe. For example from
|
||||
http://jlb.twu.net/code/unixkit.php.
|
||||
The self-installing Vim for MS-Windows includes a diff program. If you don't
|
||||
have it you might want to download a diff.exe. For example from
|
||||
http://gnuwin32.sourceforge.net/packages/diffutils.htm.
|
||||
|
||||
|
||||
USING PATCHES *diff-patchexpr*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*editing.txt* For Vim version 7.2. Last change: 2009 Jun 10
|
||||
*editing.txt* For Vim version 7.3. Last change: 2011 Feb 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -276,10 +276,11 @@ If you want to keep the changed buffer without saving it, switch on the
|
||||
'readonly' option for this buffer. {not in Vi}
|
||||
|
||||
*CTRL-^* *CTRL-6*
|
||||
CTRL-^ Edit the alternate file (equivalent to ":e #").
|
||||
Mostly the alternate file is the previously edited
|
||||
file. This is a quick way to toggle between two
|
||||
files.
|
||||
CTRL-^ Edit the alternate file. Mostly the alternate file is
|
||||
the previously edited file. This is a quick way to
|
||||
toggle between two files. It is equivalent to ":e #",
|
||||
except that it also works when there is no file name.
|
||||
|
||||
If the 'autowrite' or 'autowriteall' option is on and
|
||||
the buffer was changed, write it.
|
||||
Mostly the ^ character is positioned on the 6 key,
|
||||
@@ -782,7 +783,7 @@ fourth file in the argument list. This happens when you do ":e file".
|
||||
LOCAL ARGUMENT LIST
|
||||
|
||||
{not in Vi}
|
||||
{not available when compiled without the |+windows| or |+listcmds| feature}
|
||||
{not available when compiled without the |+windows| or |+listcmds| features}
|
||||
|
||||
*:arglocal*
|
||||
:argl[ocal] Make a local copy of the global argument list.
|
||||
@@ -984,6 +985,11 @@ explanation of when the copy is made and when the file is renamed.
|
||||
If the creation of a backup file fails, the write is not done. If you want
|
||||
to write anyway add a '!' to the command.
|
||||
|
||||
*write-permissions*
|
||||
When writing a new file the permissions are read-write. For unix the mask is
|
||||
0666 with additionally umask applied. When writing a file that was read Vim
|
||||
will preserve the permissions, but clear the s-bit.
|
||||
|
||||
*write-readonly*
|
||||
When the 'cpoptions' option contains 'W', Vim will refuse to overwrite a
|
||||
readonly file. When 'W' is not present, ":w!" will overwrite a readonly file,
|
||||
@@ -1171,14 +1177,21 @@ If you want to always use ":confirm", set the 'confirm' option.
|
||||
*:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
|
||||
:bro[wse] {command} Open a file selection dialog for an argument to
|
||||
{command}. At present this works for |:e|, |:w|,
|
||||
|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|,
|
||||
|:mksession|, |:split|, |:vsplit|, and |:tabe|.
|
||||
|:wall|, |:wq|, |:wqall|, |:x|, |:xall|, |:exit|,
|
||||
|:view|, |:sview|, |:r|, |:saveas|, |:sp|, |:mkexrc|,
|
||||
|:mkvimrc|, |:mksession|, |:mkview|, |:split|,
|
||||
|:vsplit|, |:tabe|, |:tabnew|, |:cfile|, |:cgetfile|,
|
||||
|:caddfile|, |:lfile|, |:lgetfile|, |:laddfile|,
|
||||
|:diffsplit|, |:diffpatch|, |:open|, |:pedit|,
|
||||
|:redir|, |:source|, |:update|, |:visual|, |:vsplit|,
|
||||
and |:qall| if 'confirm' is set.
|
||||
{only in Win32, Athena, Motif, GTK and Mac GUI}
|
||||
When ":browse" is not possible you get an error
|
||||
message. If the |+browse| feature is missing or the
|
||||
{command} doesn't support browsing, the {command} is
|
||||
executed without a dialog.
|
||||
":browse set" works like |:options|.
|
||||
See also |:oldfiles| for ":browse oldfiles".
|
||||
|
||||
The syntax is best shown via some examples: >
|
||||
:browse e $vim/foo
|
||||
@@ -1331,11 +1344,14 @@ There are a few things to remember when editing binary files:
|
||||
|
||||
Vim is able to write files encrypted, and read them back. The encrypted text
|
||||
cannot be read without the right key.
|
||||
{only available when compiled with the |+cryptv| feature} *E833*
|
||||
|
||||
Note: The swapfile and text in memory is not encrypted. A system
|
||||
administrator will be able to see your text while you are editing it.
|
||||
When filtering text with ":!filter" or using ":w !command" the text is not
|
||||
encrypted, this may reveal it to others.
|
||||
The text in the swap file and the undo file is also encrypted. *E843*
|
||||
|
||||
Note: The text in memory is not encrypted. A system administrator may be able
|
||||
to see your text while you are editing it. When filtering text with
|
||||
":!filter" or using ":w !command" the text is not encrypted, this may reveal
|
||||
it to others. The 'viminfo' file is not encrypted.
|
||||
|
||||
WARNING: If you make a typo when entering the key and then write the file and
|
||||
exit, the text will be lost!
|
||||
@@ -1361,10 +1377,38 @@ the file is encrypted.
|
||||
To disable the encryption, reset the 'key' option to an empty value: >
|
||||
:set key=
|
||||
|
||||
When reading a file that has been encrypted and this option is not empty, it
|
||||
will be used for decryption. If the value is empty, you will be prompted to
|
||||
enter the key. If you don't enter a key, the file is edited without being
|
||||
decrypted.
|
||||
You can use the 'cryptmethod' option to select the type of encryption, use one
|
||||
of these two: >
|
||||
:setlocal cm=zip " weak method, backwards compatible
|
||||
:setlocal cm=blowfish " strong method
|
||||
Do this before writing the file. When reading an encrypted file it will be
|
||||
set automatically to the method used when that file was written. You can
|
||||
change 'cryptmethod' before writing that file to change the method.
|
||||
To set the default method, used for new files, use one of these in your
|
||||
|vimrc| file: >
|
||||
set cm=zip
|
||||
set cm=blowfish
|
||||
The message given for reading and writing a file will show "[crypted]" when
|
||||
using zip, "[blowfish]" when using blowfish.
|
||||
|
||||
When writing an undo file, the same key and method will be used for the text
|
||||
in the undo file. |persistent-undo|.
|
||||
|
||||
*E817* *E818* *E819* *E820*
|
||||
When encryption does not work properly, you would be able to write your text
|
||||
to a file and never be able to read it back. Therefore a test is performed to
|
||||
check if the encryption works as expected. If you get one of these errors
|
||||
don't write the file encrypted! You need to rebuild the Vim binary to fix
|
||||
this.
|
||||
|
||||
*E831* This is an internal error, "cannot happen". If you can reproduce it,
|
||||
please report to the developers.
|
||||
|
||||
When reading a file that has been encrypted and the 'key' option is not empty,
|
||||
it will be used for decryption. If the value is empty, you will be prompted
|
||||
to enter the key. If you don't enter a key, or you enter the wrong key, the
|
||||
file is edited without being decrypted. There is no warning about using the
|
||||
wrong key (this makes brute force methods to find the key more difficult).
|
||||
|
||||
If want to start reading a file that uses a different key, set the 'key'
|
||||
option to an empty string, so that Vim will prompt for a new one. Don't use
|
||||
@@ -1374,10 +1418,13 @@ your shoulder.
|
||||
Since the value of the 'key' option is supposed to be a secret, its value can
|
||||
never be viewed. You should not set this option in a vimrc file.
|
||||
|
||||
An encrypted file can be recognized by the "file" command, if you add this
|
||||
line to "/etc/magic", "/usr/share/misc/magic" or wherever your system has the
|
||||
An encrypted file can be recognized by the "file" command, if you add these
|
||||
lines to "/etc/magic", "/usr/share/misc/magic" or wherever your system has the
|
||||
"magic" file: >
|
||||
0 string VimCrypt~ Vim encrypted file
|
||||
>9 string 01 - "zip" cryptmethod
|
||||
>9 string 02 - "blowfish" cryptmethod
|
||||
|
||||
|
||||
Notes:
|
||||
- Encryption is not possible when doing conversion with 'charconvert'.
|
||||
@@ -1392,13 +1439,15 @@ Notes:
|
||||
history, showing the 'key' value in a viminfo file.
|
||||
- There is never 100% safety. The encryption in Vim has not been tested for
|
||||
robustness.
|
||||
- The algorithm used is breakable. A 4 character key in about one hour, a 6
|
||||
character key in one day (on a Pentium 133 PC). This requires that you know
|
||||
some text that must appear in the file. An expert can break it for any key.
|
||||
When the text has been decrypted, this also means that the key can be
|
||||
revealed, and other files encrypted with the same key can be decrypted.
|
||||
- Pkzip uses the same encryption, and US Govt has no objection to its export.
|
||||
Pkzip's public file APPNOTE.TXT describes this algorithm in detail.
|
||||
- The algorithm used for 'cryptmethod' "zip" is breakable. A 4 character key
|
||||
in about one hour, a 6 character key in one day (on a Pentium 133 PC). This
|
||||
requires that you know some text that must appear in the file. An expert
|
||||
can break it for any key. When the text has been decrypted, this also means
|
||||
that the key can be revealed, and other files encrypted with the same key
|
||||
can be decrypted.
|
||||
- Pkzip uses the same encryption as 'cryptmethod' "zip", and US Govt has no
|
||||
objection to its export. Pkzip's public file APPNOTE.TXT describes this
|
||||
algorithm in detail.
|
||||
- Vim originates from the Netherlands. That is where the sources come from.
|
||||
Thus the encryption code is not exported from the USA.
|
||||
|
||||
@@ -1583,10 +1632,13 @@ There are three different types of searching:
|
||||
|
||||
In the above example you might want to set path to: >
|
||||
:set path=**,/u/user_x/**
|
||||
< This searches: >
|
||||
/u/user_x/work/release/**
|
||||
/u/user_x/**
|
||||
< This searches the same directories, but in a different order.
|
||||
< This searches:
|
||||
/u/user_x/work/release/** ~
|
||||
/u/user_x/** ~
|
||||
This searches the same directories, but in a different order.
|
||||
|
||||
Note that completion for ":find", ":sfind", and ":tabfind" commands do not
|
||||
currently work with 'path' items that contain a url or use the double star
|
||||
(/usr/**2) or upward search (;) notations. >
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,10 +17,10 @@ e imposta le opzioni per farlo comportare come un editore "modeless".
|
||||
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
|
||||
Simile all'uso di Notepad in MS-Windows.
|
||||
.B evim
|
||||
richiede la presenza della GUI, per avere a disposizione menu e barra
|
||||
richiede la presenza della GUI, per avere a disposizione men<EFBFBD> e barra
|
||||
strumenti.
|
||||
.PP
|
||||
Da usarsi solo da parte di chi non <20> in grado di lavorare con Vim nella
|
||||
Da usarsi soltanto se non si <EFBFBD> in grado di lavorare con Vim nella
|
||||
maniera usuale.
|
||||
La modifica file sar<61> molto meno efficiente.
|
||||
.PP
|
||||
@@ -34,7 +34,7 @@ L'opzione 'insertmode'
|
||||
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
|
||||
familiari tasti usati sotto MS-Windows.
|
||||
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
|
||||
Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
|
||||
Usate CTRL-Q per ottenere quello che si otterrebbe con CTRL-V in Vim nativo.
|
||||
.SH OPZIONI
|
||||
Vedere vim(1).
|
||||
.SH FILE
|
||||
@@ -51,4 +51,4 @@ vim(1)
|
||||
Buona parte di
|
||||
.B Vim
|
||||
<EFBFBD> stato scritto da Bram Moolenaar, con molto aiuto da altri.
|
||||
Vedere il Menu "Aiuto/Crediti".
|
||||
Vedere il men<EFBFBD> "Aiuto/Crediti".
|
||||
|
||||
@@ -17,10 +17,10 @@ e imposta le opzioni per farlo comportare come un editore "modeless".
|
||||
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
|
||||
Simile all'uso di Notepad in MS-Windows.
|
||||
.B evim
|
||||
richiede la presenza della GUI, per avere a disposizione menu e barra
|
||||
richiede la presenza della GUI, per avere a disposizione menù e barra
|
||||
strumenti.
|
||||
.PP
|
||||
Da usarsi solo da parte di chi non è in grado di lavorare con Vim nella
|
||||
Da usarsi soltanto se non si è in grado di lavorare con Vim nella
|
||||
maniera usuale.
|
||||
La modifica file sarà molto meno efficiente.
|
||||
.PP
|
||||
@@ -34,7 +34,7 @@ L'opzione 'insertmode' è impostata per poter immettere del testo direttamente.
|
||||
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
|
||||
familiari tasti usati sotto MS-Windows.
|
||||
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
|
||||
Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
|
||||
Usate CTRL-Q per ottenere quello che si otterrebbe con CTRL-V in Vim nativo.
|
||||
.SH OPZIONI
|
||||
Vedere vim(1).
|
||||
.SH FILE
|
||||
@@ -51,4 +51,4 @@ vim(1)
|
||||
Buona parte di
|
||||
.B Vim
|
||||
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
|
||||
Vedere il Menu "Aiuto/Crediti".
|
||||
Vedere il menù "Aiuto/Crediti".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*farsi.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*farsi.txt* For Vim version 7.3. Last change: 2010 Aug 07
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran
|
||||
@@ -62,8 +62,8 @@ o Toggling between Farsi ISIR-3342 standard encoding and Vim Farsi via F9
|
||||
Farsi Fonts *farsi fonts*
|
||||
-----------
|
||||
|
||||
If the "extra" archive has been unpacked, the following files are found in the
|
||||
subdirectories of the '$VIM/farsi' directory:
|
||||
The following files are found in the subdirectories of the '$VIM/farsi/fonts'
|
||||
directory:
|
||||
|
||||
+ far-a01.pcf X Windows fonts for Unix including Linux systems
|
||||
+ far-a01.bf X Windows fonts for SunOS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*filetype.txt* For Vim version 7.2. Last change: 2008 Jul 15
|
||||
*filetype.txt* For Vim version 7.3. Last change: 2011 Jun 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -270,6 +270,9 @@ directories!
|
||||
|
||||
|
||||
*autocmd-osfiletypes*
|
||||
NOTE: this code is currently disabled, as the RISC OS implementation was
|
||||
removed. In the future this will use the 'filetype' option.
|
||||
|
||||
On operating systems which support storing a file type with the file, you can
|
||||
specify that an autocommand should only be executed if the file is of a
|
||||
certain type.
|
||||
@@ -296,8 +299,6 @@ must both match): >
|
||||
|
||||
This will match files of type "&fff" whose names start with "diff".
|
||||
|
||||
Note that osfiletype checking is skipped if Vim is compiled without the
|
||||
|+osfiletype| feature.
|
||||
|
||||
*plugin-details*
|
||||
The "plugin" directory can be in any of the directories in the 'runtimepath'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*fold.txt* For Vim version 7.2. Last change: 2009 Dec 22
|
||||
*fold.txt* For Vim version 7.3. Last change: 2010 May 13
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -15,7 +15,7 @@ You can find an introduction on folding in chapter 28 of the user manual.
|
||||
4. Behavior of folds |fold-behavior|
|
||||
|
||||
{Vi has no Folding}
|
||||
{not available when compiled without the +folding feature}
|
||||
{not available when compiled without the |+folding| feature}
|
||||
|
||||
==============================================================================
|
||||
1. Fold methods *fold-methods*
|
||||
@@ -60,7 +60,7 @@ level form a fold, with the lines with a higher level forming a nested fold.
|
||||
The nesting of folds is limited with 'foldnestmax'.
|
||||
|
||||
Some lines are ignored and get the fold level of the line above or below it,
|
||||
whatever is the lowest. These are empty or white lines and lines starting
|
||||
whichever is lower. These are empty or white lines and lines starting
|
||||
with a character in 'foldignore'. White space is skipped before checking for
|
||||
characters in 'foldignore'. For C use "#" to ignore preprocessor lines.
|
||||
|
||||
@@ -127,6 +127,9 @@ fold level. But note that foldlevel() may return -1 if the level is not known
|
||||
yet. And it returns the level at the start of the line, while a fold might
|
||||
end in that line.
|
||||
|
||||
It may happened that folds are not updated properly. You can use |zx| or |zX|
|
||||
to force updating folds.
|
||||
|
||||
|
||||
SYNTAX *fold-syntax*
|
||||
|
||||
@@ -274,7 +277,7 @@ zf{motion} or
|
||||
Also see |fold-create-marker|.
|
||||
|
||||
*zF*
|
||||
zF Create a fold for N lines. Works like "zf".
|
||||
zF Create a fold for [count] lines. Works like "zf".
|
||||
|
||||
:{range}fo[ld] *:fold* *:fo*
|
||||
Create a fold for the lines in {range}. Works like "zf".
|
||||
@@ -352,9 +355,13 @@ zv View cursor line: Open just enough folds to make the line in
|
||||
*zx*
|
||||
zx Update folds: Undo manually opened and closed folds: re-apply
|
||||
'foldlevel', then do "zv": View cursor line.
|
||||
Also forces recomputing folds. This is useful when using
|
||||
'foldexpr' and the buffer is changed in a way that results in
|
||||
folds not to be updated properly.
|
||||
|
||||
*zX*
|
||||
zX Undo manually opened and closed folds: re-apply 'foldlevel'.
|
||||
Also forces recomputing folds, like |zx|.
|
||||
|
||||
*zm*
|
||||
zm Fold more: Subtract one from 'foldlevel'. If 'foldlevel' was
|
||||
@@ -399,24 +406,24 @@ MOVING OVER FOLDS ~
|
||||
[z Move to the start of the current open fold. If already at the
|
||||
start, move to the start of the fold that contains it. If
|
||||
there is no containing fold, the command fails.
|
||||
When a count is used, repeats the command N times.
|
||||
When a count is used, repeats the command [count] times.
|
||||
|
||||
*]z*
|
||||
]z Move to the end of the current open fold. If already at the
|
||||
end, move to the end of the fold that contains it. If there
|
||||
is no containing fold, the command fails.
|
||||
When a count is used, repeats the command N times.
|
||||
When a count is used, repeats the command [count] times.
|
||||
|
||||
*zj*
|
||||
zj Move downwards to the start of the next fold. A closed fold
|
||||
is counted as one fold.
|
||||
When a count is used, repeats the command N times.
|
||||
When a count is used, repeats the command [count] times.
|
||||
This command can be used after an |operator|.
|
||||
|
||||
*zk*
|
||||
zk Move upwards to the end of the previous fold. A closed fold
|
||||
is counted as one fold.
|
||||
When a count is used, repeats the command N times.
|
||||
When a count is used, repeats the command [count] times.
|
||||
This command can be used after an |operator|.
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*ft_ada.txt* For Vim version 7.2. Last change: 2008 Jun 21
|
||||
*ft_ada.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
|
||||
|
||||
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
|
||||
@@ -6,20 +6,20 @@
|
||||
ADA *ada.vim*
|
||||
|
||||
1. Syntax Highlighting |ft-ada-syntax|
|
||||
2. Plug-in |ft-ada-plugin|
|
||||
2. File type Plug-in |ft-ada-plugin|
|
||||
3. Omni Completion |ft-ada-omni|
|
||||
3.1 Omni Completion with "gnat xref" |gnat-xref|
|
||||
3.2 Omni Completion with "ctags" |ada-ctags|
|
||||
4. Compiler Support |ada-compiler|
|
||||
4.1 GNAT |compiler-gnat|
|
||||
4.1 Dec Ada |compiler-decada|
|
||||
4.2 Dec Ada |compiler-decada|
|
||||
5. References |ada-reference|
|
||||
5.1 Options |ft-ada-options|
|
||||
5.2 Functions |ft-ada-functions|
|
||||
5.3 Commands |ft-ada-commands|
|
||||
5.4 Variables |ft-ada-variables|
|
||||
5.5 Constants |ft-ada-constants|
|
||||
8. Extra Plug-ins |ada-extra-plugins|
|
||||
5.2 Commands |ft-ada-commands|
|
||||
5.3 Variables |ft-ada-variables|
|
||||
5.4 Constants |ft-ada-constants|
|
||||
5.5 Functions |ft-ada-functions|
|
||||
6. Extra Plug-ins |ada-extra-plugins|
|
||||
|
||||
==============================================================================
|
||||
1. Syntax Highlighting ~
|
||||
@@ -45,7 +45,7 @@ to change how loops are displayed, enter the command ":hi Repeat" followed by
|
||||
the colour specification; on simple terminals the colour specification
|
||||
ctermfg=White often shows well).
|
||||
|
||||
There are several options you can select in this Ada mode. See|ft-ada-options|
|
||||
There are several options you can select in this Ada mode. See |ft-ada-options|
|
||||
for a complete list.
|
||||
|
||||
To enable them, assign a value to the option. For example, to turn one on:
|
||||
@@ -139,11 +139,11 @@ The Ada parser for Exuberant Ctags is fairly new - don't expect complete
|
||||
support yet.
|
||||
|
||||
==============================================================================
|
||||
4. Compiler Support ~
|
||||
4. Compiler Support ~
|
||||
*ada-compiler*
|
||||
|
||||
The Ada mode supports more than one Ada compiler and will automatically load the
|
||||
compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
|
||||
compiler set in |g:ada_default_compiler| whenever an Ada source is opened. The
|
||||
provided compiler plug-ins are split into the actual compiler plug-in and a
|
||||
collection of support functions and variables. This allows the easy
|
||||
development of specialized compiler plug-ins fine tuned to your development
|
||||
@@ -171,20 +171,20 @@ GNAT OBJECT ~
|
||||
|
||||
*g:gnat.Make()*
|
||||
g:gnat.Make()
|
||||
Calls|g:gnat.Make_Command|and displays the result inside a
|
||||
Calls |g:gnat.Make_Command| and displays the result inside a
|
||||
|quickfix| window.
|
||||
|
||||
*g:gnat.Pretty()*
|
||||
g:gnat.Pretty()
|
||||
Calls|g:gnat.Pretty_Command|
|
||||
Calls |g:gnat.Pretty_Program|
|
||||
|
||||
*g:gnat.Find()*
|
||||
g:gnat.Find()
|
||||
Calls|g:gnat.Find_Command|
|
||||
Calls |g:gnat.Find_Program|
|
||||
|
||||
*g:gnat.Tags()*
|
||||
g:gnat.Tags()
|
||||
Calls|g:gnat.Tags_Command|
|
||||
Calls |g:gnat.Tags_Command|
|
||||
|
||||
*g:gnat.Set_Project_File()*
|
||||
g:gnat.Set_Project_File([{file}])
|
||||
@@ -200,19 +200,19 @@ g:gnat.Project_File string
|
||||
|
||||
*g:gnat.Make_Command*
|
||||
g:gnat.Make_Command string
|
||||
External command used for|g:gnat.Make()| (|'makeprg'|).
|
||||
External command used for |g:gnat.Make()| (|'makeprg'|).
|
||||
|
||||
*g:gnat.Pretty_Program*
|
||||
g:gnat.Pretty_Program string
|
||||
External command used for|g:gnat.Pretty()|
|
||||
External command used for |g:gnat.Pretty()|
|
||||
|
||||
*g:gnat.Find_Program*
|
||||
g:gnat.Find_Program string
|
||||
External command used for|g:gnat.Find()|
|
||||
External command used for |g:gnat.Find()|
|
||||
|
||||
*g:gnat.Tags_Command*
|
||||
g:gnat.Tags_Command string
|
||||
External command used for|g:gnat.Tags()|
|
||||
External command used for |g:gnat.Tags()|
|
||||
|
||||
*g:gnat.Error_Format*
|
||||
g:gnat.Error_Format string
|
||||
@@ -237,8 +237,8 @@ DEC ADA OBJECT ~
|
||||
|
||||
*g:decada.Make()*
|
||||
g:decada.Make() function
|
||||
Calls|g:decada.Make_Command|and displays the result inside a
|
||||
|quickfix| window.
|
||||
Calls |g:decada.Make_Command| and displays the result inside a
|
||||
|quickfix| window.
|
||||
|
||||
*g:decada.Unit_Name()*
|
||||
g:decada.Unit_Name() function
|
||||
@@ -246,7 +246,7 @@ g:decada.Unit_Name() function
|
||||
|
||||
*g:decada.Make_Command*
|
||||
g:decada.Make_Command string
|
||||
External command used for|g:decadat.Make()| (|'makeprg'|).
|
||||
External command used for |g:decada.Make()| (|'makeprg'|).
|
||||
|
||||
*g:decada.Error_Format*
|
||||
g:decada.Error_Format| string
|
||||
@@ -367,7 +367,7 @@ false when the variable is undefined. The value to which the variable is set
|
||||
makes no difference.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.3 Commands ~
|
||||
5.2 Commands ~
|
||||
*ft-ada-commands*
|
||||
|
||||
:AdaRainbow *:AdaRainbow*
|
||||
@@ -406,15 +406,15 @@ makes no difference.
|
||||
g:gnat object
|
||||
Control object which manages GNAT compiles. The object
|
||||
is created when the first Ada source code is loaded provided
|
||||
that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
|
||||
for details.
|
||||
that |g:ada_default_compiler| is set to 'gnat'. See
|
||||
|gnat_members| for details.
|
||||
|
||||
*g:decada*
|
||||
g:decada object
|
||||
Control object which manages Dec Ada compiles. The object
|
||||
is created when the first Ada source code is loaded provided
|
||||
that |g:ada_default_compiler|is set to 'decada'. See
|
||||
|decada_members|for details.
|
||||
that |g:ada_default_compiler| is set to 'decada'. See
|
||||
|decada_members| for details.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.4 Constants ~
|
||||
@@ -445,7 +445,7 @@ g:ada#Ctags_Kinds dictionary of lists
|
||||
for Ctags generates.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
5.2 Functions ~
|
||||
5.5 Functions ~
|
||||
*ft-ada-functions*
|
||||
|
||||
ada#Word([{line}, {col}]) *ada#Word()*
|
||||
@@ -479,7 +479,7 @@ gnat#New ()
|
||||
|
||||
|
||||
==============================================================================
|
||||
8. Extra Plugins ~
|
||||
6. Extra Plugins ~
|
||||
*ada-extra-plugins*
|
||||
|
||||
You can optionally install the following extra plug-ins. They work well with
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*sql.txt* For Vim version 7.2. Last change: 2009 Nov 03
|
||||
*ft_sql.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
|
||||
by David Fishburn
|
||||
|
||||
@@ -205,7 +205,7 @@ Press any of the following keys: >
|
||||
*sqlanywhere*
|
||||
*oracle* *plsql* *sqlj*
|
||||
*sqlserver*
|
||||
*mysql* *postgress* *psql*
|
||||
*mysql* *postgresql* *psql*
|
||||
*informix*
|
||||
|
||||
All relational databases support SQL. There is a portion of SQL that is
|
||||
@@ -536,7 +536,7 @@ Example of using column completion:
|
||||
completion window is active. If the completion popup window is
|
||||
not active, a normal <Right> or <Left> will be executed.
|
||||
|
||||
Lets look how we can build a SQL statement dynamically. A select statement
|
||||
Let's look at how we can build a SQL statement dynamically. A select statement
|
||||
requires a list of columns. There are two ways to build a column list using
|
||||
the SQL completion plugin. >
|
||||
One column at a time:
|
||||
@@ -632,7 +632,7 @@ your |vimrc|: >
|
||||
MYTABLENAME --> M
|
||||
|
||||
omni_sql_ignorecase
|
||||
< - Default: Current setting for|ignorecase|
|
||||
< - Default: Current setting for 'ignorecase'
|
||||
- Valid settings are 0 or 1.
|
||||
- When entering a few letters before initiating completion, the list
|
||||
will be filtered to display only the entries which begin with the
|
||||
@@ -738,8 +738,8 @@ platform you can also use <C-Space> or ALT keys.
|
||||
|
||||
Many times SQL can be used with different filetypes. For example Perl, Java,
|
||||
PHP, Javascript can all interact with a database. Often you need both the SQL
|
||||
completion as well as the completion capabilities for the current language you
|
||||
are editing.
|
||||
completion and the completion capabilities for the current language you are
|
||||
editing.
|
||||
|
||||
This can be enabled easily with the following steps (assuming a Perl file): >
|
||||
1. :e test.pl
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui.txt* For Vim version 7.2. Last change: 2009 Jan 22
|
||||
*gui.txt* For Vim version 7.3. Last change: 2011 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -147,6 +147,15 @@ task bar with the 'guiheadroom' option.
|
||||
If you are running the X Window System, you can get information about the
|
||||
window Vim is running in with this command: >
|
||||
:!xwininfo -id $WINDOWID
|
||||
<
|
||||
*gui-IME* *iBus*
|
||||
Input methods for international characters in X that rely on the XIM
|
||||
framework, most notably iBus, have been known to produce undesirable results
|
||||
in gVim. These may include an inability to enter spaces, or long delays
|
||||
between typing a character and it being recognized by the application.
|
||||
|
||||
One workaround that has been successful, for unknown reasons, is to prevent
|
||||
gvim from forking into the background by starting it with the |-f| argument.
|
||||
|
||||
==============================================================================
|
||||
2. Scrollbars *gui-scrollbars*
|
||||
@@ -156,26 +165,26 @@ configure which ones appear with the 'guioptions' option.
|
||||
|
||||
The interface looks like this (with ":set guioptions=mlrb"):
|
||||
|
||||
+------------------------------+
|
||||
| File Edit Help | <- Menu bar (m)
|
||||
+-+--------------------------+-+
|
||||
|^| |^|
|
||||
|#| Text area. |#|
|
||||
| | | |
|
||||
|v|__________________________|v|
|
||||
Normal status line -> |-+ File.c 5,2 +-|
|
||||
between Vim windows |^|""""""""""""""""""""""""""|^|
|
||||
| | | |
|
||||
| | Another file buffer. | |
|
||||
| | | |
|
||||
|#| |#|
|
||||
Left scrollbar (l) -> |#| |#| <- Right
|
||||
|#| |#| scrollbar (r)
|
||||
| | | |
|
||||
|v| |v|
|
||||
+-+--------------------------+-+
|
||||
| |< #### >| | <- Bottom
|
||||
+-+--------------------------+-+ scrollbar (b)
|
||||
+------------------------------+ `
|
||||
| File Edit Help | <- Menu bar (m) `
|
||||
+-+--------------------------+-+ `
|
||||
|^| |^| `
|
||||
|#| Text area. |#| `
|
||||
| | | | `
|
||||
|v|__________________________|v| `
|
||||
Normal status line -> |-+ File.c 5,2 +-| `
|
||||
between Vim windows |^|""""""""""""""""""""""""""|^| `
|
||||
| | | | `
|
||||
| | Another file buffer. | | `
|
||||
| | | | `
|
||||
|#| |#| `
|
||||
Left scrollbar (l) -> |#| |#| <- Right `
|
||||
|#| |#| scrollbar (r) `
|
||||
| | | | `
|
||||
|v| |v| `
|
||||
+-+--------------------------+-+ `
|
||||
| |< #### >| | <- Bottom `
|
||||
+-+--------------------------+-+ scrollbar (b) `
|
||||
|
||||
Any of the scrollbar or menu components may be turned off by not putting the
|
||||
appropriate letter in the 'guioptions' string. The bottom scrollbar is
|
||||
@@ -556,7 +565,7 @@ some modes:
|
||||
mode inserted appended ~
|
||||
Normal nothing nothing
|
||||
Visual <C-C> <C-\><C-G>
|
||||
Insert <C-O>
|
||||
Insert <C-\><C-O>
|
||||
Cmdline <C-C> <C-\><C-G>
|
||||
Op-pending <C-C> <C-\><C-G>
|
||||
|
||||
@@ -571,7 +580,7 @@ is equal to: >
|
||||
|
||||
:nmenu File.Next :next^M
|
||||
:vmenu File.Next ^C:next^M^\^G
|
||||
:imenu File.Next ^O:next^M
|
||||
:imenu File.Next ^\^O:next^M
|
||||
:cmenu File.Next ^C:next^M^\^G
|
||||
:omenu File.Next ^C:next^M^\^G
|
||||
|
||||
@@ -678,7 +687,7 @@ and Photon GUI. It should turn up in other GUIs in due course. The
|
||||
default toolbar is setup in menu.vim.
|
||||
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
|
||||
can thus have menu & toolbar together, or either on its own, or neither.
|
||||
The appearance is controlled by the 'toolbar' option. You can chose between
|
||||
The appearance is controlled by the 'toolbar' option. You can choose between
|
||||
an image, text or both.
|
||||
|
||||
*toolbar-icon*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w16.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*gui_w16.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_w32.txt* For Vim version 7.2. Last change: 2007 Aug 30
|
||||
*gui_w32.txt* For Vim version 7.3. Last change: 2011 Jul 23
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -137,6 +137,9 @@ options:
|
||||
And if there already is a gvim running:
|
||||
"Edit with existing gvim" -- edit the file with the running gvim
|
||||
|
||||
The "edit with existing Vim" entries can be disabled by adding an entry in the
|
||||
registry under HKLM\Software\Vim\Gvim, named DisableEditWithExisting, and with
|
||||
any value.
|
||||
*install-registry*
|
||||
You can add the "Edit with Vim" menu entry in an easy way by using the
|
||||
"install.exe" program. It will add several registry entries for you.
|
||||
@@ -293,7 +296,9 @@ Normally, Vim waits for a command to complete before continuing (this makes
|
||||
sense for most shell commands which produce output for Vim to use). If you
|
||||
want Vim to start a program and return immediately, you can use the following
|
||||
syntax on W95 & NT: >
|
||||
:!start {command}
|
||||
:!start [/min] {command}
|
||||
The optional "/min" causes the window to be minimized.
|
||||
|
||||
On Win32s, you will have to go to another window instead. Don't forget that
|
||||
you must tell Windows 3.1x to keep executing a DOS command in the background
|
||||
while you switch back to Vim.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*gui_x11.txt* For Vim version 7.2. Last change: 2009 Oct 28
|
||||
*gui_x11.txt* For Vim version 7.3. Last change: 2011 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -53,6 +53,8 @@ When using "gvim -f" and then ":gui", Vim will run in the foreground. The
|
||||
":gui -b".
|
||||
|
||||
"gvim --nofork" does the same as "gvim -f".
|
||||
*E851* *E852*
|
||||
When starting the GUI fails Vim will try to continue running in the terminal.
|
||||
|
||||
If you want the GUI to run in the foreground always, include the 'f'
|
||||
flag in 'guioptions'. |-f|.
|
||||
@@ -453,14 +455,12 @@ searched for. If all three fail, the GUI will be disabled.
|
||||
For GTK+, Vim's configuration process requires that GTK+ be properly
|
||||
installed. That is, the shell script 'gtk-config' must be in your PATH, and
|
||||
you can already successful compile, build, and execute a GTK+ program. The
|
||||
reason for this is because the compiler flags (CFLAGS) and link flags
|
||||
(LDFLAGS) are obtained through the 'gtk-config' shell script.
|
||||
reason for this is that the compiler flags (CFLAGS) and link flags (LDFLAGS)
|
||||
are obtained through the 'gtk-config' shell script.
|
||||
|
||||
If you want to build with GTK+ 2 support pass the --enable-gtk2-check argument
|
||||
to ./configure. Optionally, support for GNOME 2 will be compiled if the
|
||||
--enable-gnome-check option is also given. Note that the support for GTK+ 2
|
||||
is still experimental. However, many people have reported that it works just
|
||||
fine for them.
|
||||
--enable-gnome-check option is also given.
|
||||
|
||||
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena
|
||||
files in a directory where configure doesn't look, edit the Makefile to enter
|
||||
@@ -468,15 +468,12 @@ the names of the directories. Search for "GUI_INC_LOC" for an example to set
|
||||
the Motif directories, "CONF_OPT_X" for Athena.
|
||||
|
||||
*gui-x11-gtk*
|
||||
At the time of this writing, you may use either GTK+ version 1.0.6 or 1.2. It
|
||||
is suggested that you use v1.2 since not all of Vim's GUI features are present
|
||||
if using v1.0.6. For instance, there are no tearoff menus present in v1.0.6.
|
||||
Using a version from GTK+'s CVS tree may or may not work, and is therefore not
|
||||
supported and not recommended.
|
||||
At the time of this writing, GTK+ version 1.0.6 and 1.2 are outdated. It
|
||||
is suggested that you use GTK 2. The GTK 1 support will most likely be
|
||||
dropped soon.
|
||||
|
||||
For the experimental GTK+ 2 GUI, using the latest release of the GTK+ 2.0 or
|
||||
GTK+ 2.2 series is recommended. CVS HEAD seems to work fine most of time as
|
||||
well.
|
||||
For the GTK+ 2 GUI, using the latest release of the GTK+ 2.0 or GTK+ 2.2
|
||||
series is recommended.
|
||||
|
||||
Lastly, although GTK+ has supposedly been ported to the Win32 platform, this
|
||||
has not been tested with Vim and is also unsupported. Also, it's unlikely to
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*hangulin.txt* For Vim version 7.2. Last change: 2009 Jun 24
|
||||
*hangulin.txt* For Vim version 7.3. Last change: 2009 Jun 24
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*hebrew.txt* For Vim version 7.2. Last change: 2007 Jun 14
|
||||
*hebrew.txt* For Vim version 7.3. Last change: 2007 Jun 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*help.txt* For Vim version 7.2. Last change: 2008 Jul 21
|
||||
*help.txt* For Vim version 7.3. Last change: 2010 Jul 20
|
||||
|
||||
VIM - main help file
|
||||
k
|
||||
@@ -26,6 +26,7 @@ Get specific help: It is possible to go directly to whatever you want help
|
||||
Option ' :help 'textwidth'
|
||||
Search for help: Type ":help word", then hit CTRL-D to see matching
|
||||
help entries for "word".
|
||||
Or use ":helpgrep word". |:helpgrep|
|
||||
|
||||
VIM stands for Vi IMproved. Most of VIM was made by Bram Moolenaar, but only
|
||||
through the help of many others. See |credits|.
|
||||
@@ -90,6 +91,7 @@ REFERENCE MANUAL: These files explain every detail of Vim. *reference_toc*
|
||||
General subjects ~
|
||||
|intro.txt| general introduction to Vim; notation used in help files
|
||||
|help.txt| overview and quick reference (this file)
|
||||
|helphelp.txt| about using the help files
|
||||
|index.txt| alphabetical index of all commands
|
||||
|help-tags| all the tags you can jump to (index of tags)
|
||||
|howto.txt| how to do the most common editing tasks
|
||||
@@ -156,6 +158,7 @@ GUI ~
|
||||
|
||||
Interfaces ~
|
||||
|if_cscop.txt| using Cscope with Vim
|
||||
|if_lua.txt| Lua interface
|
||||
|if_mzsch.txt| MzScheme interface
|
||||
|if_perl.txt| Perl interface
|
||||
|if_pyth.txt| Python interface
|
||||
@@ -208,10 +211,11 @@ Now that you've jumped here with CTRL-] or a double mouse click, you can use
|
||||
CTRL-T, CTRL-O, g<RightMouse>, or <C-RightMouse> to go back to where you were.
|
||||
|
||||
Note that tags are within | characters, but when highlighting is enabled these
|
||||
are hidden. That makes it easier to read a command.
|
||||
characters are hidden. That makes it easier to read a command.
|
||||
|
||||
Anyway, you can use CTRL-] on any word, also when it is not within |, and Vim
|
||||
will try to find help for it.
|
||||
will try to find help for it. Especially for options in single quotes, e.g.
|
||||
'compatible'.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
|
||||
|
||||
349
runtime/doc/helphelp.txt
Normal file
349
runtime/doc/helphelp.txt
Normal file
@@ -0,0 +1,349 @@
|
||||
*helphelp.txt* For Vim version 7.3. Last change: 2010 Sep 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
|
||||
Help on help files *helphelp*
|
||||
|
||||
1. Help commands |online-help|
|
||||
2. Translated help files |help-translated|
|
||||
3. Writing help files |help-writing|
|
||||
|
||||
==============================================================================
|
||||
1. Help commands *online-help*
|
||||
|
||||
*help* *<Help>* *:h* *:help* *<F1>* *i_<F1>* *i_<Help>*
|
||||
<Help> or
|
||||
:h[elp] Open a window and display the help file in read-only
|
||||
mode. If there is a help window open already, use
|
||||
that one. Otherwise, if the current window uses the
|
||||
full width of the screen or is at least 80 characters
|
||||
wide, the help window will appear just above the
|
||||
current window. Otherwise the new window is put at
|
||||
the very top.
|
||||
The 'helplang' option is used to select a language, if
|
||||
the main help file is available in several languages.
|
||||
{not in Vi}
|
||||
|
||||
*{subject}* *E149* *E661*
|
||||
:h[elp] {subject} Like ":help", additionally jump to the tag {subject}.
|
||||
{subject} can include wildcards like "*", "?" and
|
||||
"[a-z]":
|
||||
:help z? jump to help for any "z" command
|
||||
:help z. jump to the help for "z."
|
||||
If there is no full match for the pattern, or there
|
||||
are several matches, the "best" match will be used.
|
||||
A sophisticated algorithm is used to decide which
|
||||
match is better than another one. These items are
|
||||
considered in the computation:
|
||||
- A match with same case is much better than a match
|
||||
with different case.
|
||||
- A match that starts after a non-alphanumeric
|
||||
character is better than a match in the middle of a
|
||||
word.
|
||||
- A match at or near the beginning of the tag is
|
||||
better than a match further on.
|
||||
- The more alphanumeric characters match, the better.
|
||||
- The shorter the length of the match, the better.
|
||||
|
||||
The 'helplang' option is used to select a language, if
|
||||
the {subject} is available in several languages.
|
||||
To find a tag in a specific language, append "@ab",
|
||||
where "ab" is the two-letter language code. See
|
||||
|help-translated|.
|
||||
|
||||
Note that the longer the {subject} you give, the less
|
||||
matches will be found. You can get an idea how this
|
||||
all works by using commandline completion (type CTRL-D
|
||||
after ":help subject" |c_CTRL-D|).
|
||||
If there are several matches, you can have them listed
|
||||
by hitting CTRL-D. Example: >
|
||||
:help cont<Ctrl-D>
|
||||
|
||||
< Instead of typing ":help CTRL-V" to search for help
|
||||
for CTRL-V you can type: >
|
||||
:help ^V
|
||||
< This also works together with other characters, for
|
||||
example to find help for CTRL-V in Insert mode: >
|
||||
:help i^V
|
||||
<
|
||||
To use a regexp |pattern|, first do ":help" and then
|
||||
use ":tag {pattern}" in the help window. The
|
||||
":tnext" command can then be used to jump to other
|
||||
matches, "tselect" to list matches and choose one. >
|
||||
:help index| :tse z.
|
||||
|
||||
< When there is no argument you will see matches for
|
||||
"help", to avoid listing all possible matches (that
|
||||
would be very slow).
|
||||
The number of matches displayed is limited to 300.
|
||||
|
||||
This command can be followed by '|' and another
|
||||
command, but you don't need to escape the '|' inside a
|
||||
help command. So these both work: >
|
||||
:help |
|
||||
:help k| only
|
||||
< Note that a space before the '|' is seen as part of
|
||||
the ":help" argument.
|
||||
You can also use <LF> or <CR> to separate the help
|
||||
command from a following command. You need to type
|
||||
CTRL-V first to insert the <LF> or <CR>. Example: >
|
||||
:help so<C-V><CR>only
|
||||
< {not in Vi}
|
||||
|
||||
:h[elp]! [subject] Like ":help", but in non-English help files prefer to
|
||||
find a tag in a file with the same language as the
|
||||
current file. See |help-translated|.
|
||||
|
||||
*:helpg* *:helpgrep*
|
||||
:helpg[rep] {pattern}[@xx]
|
||||
Search all help text files and make a list of lines
|
||||
in which {pattern} matches. Jumps to the first match.
|
||||
The optional [@xx] specifies that only matches in the
|
||||
"xx" language are to be found.
|
||||
You can navigate through the matches with the
|
||||
|quickfix| commands, e.g., |:cnext| to jump to the
|
||||
next one. Or use |:cwindow| to get the list of
|
||||
matches in the quickfix window.
|
||||
{pattern} is used as a Vim regexp |pattern|.
|
||||
'ignorecase' is not used, add "\c" to ignore case.
|
||||
Example for case sensitive search: >
|
||||
:helpgrep Uganda
|
||||
< Example for case ignoring search: >
|
||||
:helpgrep uganda\c
|
||||
< Example for searching in French help: >
|
||||
:helpgrep backspace@fr
|
||||
< The pattern does not support line breaks, it must
|
||||
match within one line. You can use |:grep| instead,
|
||||
but then you need to get the list of help files in a
|
||||
complicated way.
|
||||
Cannot be followed by another command, everything is
|
||||
used as part of the pattern. But you can use
|
||||
|:execute| when needed.
|
||||
Compressed help files will not be searched (Fedora
|
||||
compresses the help files).
|
||||
{not in Vi}
|
||||
|
||||
*:lh* *:lhelpgrep*
|
||||
:lh[elpgrep] {pattern}[@xx]
|
||||
Same as ":helpgrep", except the location list is used
|
||||
instead of the quickfix list. If the help window is
|
||||
already opened, then the location list for that window
|
||||
is used. Otherwise, a new help window is opened and
|
||||
the location list for that window is set. The
|
||||
location list for the current window is not changed.
|
||||
|
||||
*:exu* *:exusage*
|
||||
:exu[sage] Show help on Ex commands. Added to simulate the Nvi
|
||||
command. {not in Vi}
|
||||
|
||||
*:viu* *:viusage*
|
||||
:viu[sage] Show help on Normal mode commands. Added to simulate
|
||||
the Nvi command. {not in Vi}
|
||||
|
||||
When no argument is given to |:help| the file given with the 'helpfile' option
|
||||
will be opened. Otherwise the specified tag is searched for in all "doc/tags"
|
||||
files in the directories specified in the 'runtimepath' option.
|
||||
|
||||
The initial height of the help window can be set with the 'helpheight' option
|
||||
(default 20).
|
||||
|
||||
Jump to specific subjects by using tags. This can be done in two ways:
|
||||
- Use the "CTRL-]" command while standing on the name of a command or option.
|
||||
This only works when the tag is a keyword. "<C-Leftmouse>" and
|
||||
"g<LeftMouse>" work just like "CTRL-]".
|
||||
- use the ":ta {subject}" command. This also works with non-keyword
|
||||
characters.
|
||||
|
||||
Use CTRL-T or CTRL-O to jump back.
|
||||
Use ":q" to close the help window.
|
||||
|
||||
If there are several matches for an item you are looking for, this is how you
|
||||
can jump to each one of them:
|
||||
1. Open a help window
|
||||
2. Use the ":tag" command with a slash prepended to the tag. E.g.: >
|
||||
:tag /min
|
||||
3. Use ":tnext" to jump to the next matching tag.
|
||||
|
||||
It is possible to add help files for plugins and other items. You don't need
|
||||
to change the distributed help files for that. See |add-local-help|.
|
||||
|
||||
To write a local help file, see |write-local-help|.
|
||||
|
||||
Note that the title lines from the local help files are automagically added to
|
||||
the "LOCAL ADDITIONS" section in the "help.txt" help file |local-additions|.
|
||||
This is done when viewing the file in Vim, the file itself is not changed. It
|
||||
is done by going through all help files and obtaining the first line of each
|
||||
file. The files in $VIMRUNTIME/doc are skipped.
|
||||
|
||||
*help-xterm-window*
|
||||
If you want to have the help in another xterm window, you could use this
|
||||
command: >
|
||||
:!xterm -e vim +help &
|
||||
<
|
||||
|
||||
*:helpfind* *:helpf*
|
||||
:helpf[ind] Like |:help|, but use a dialog to enter the argument.
|
||||
Only for backwards compatibility. It now executes the
|
||||
ToolBar.FindHelp menu entry instead of using a builtin
|
||||
dialog. {only when compiled with |+GUI_GTK|}
|
||||
{not in Vi}
|
||||
|
||||
*:helpt* *:helptags*
|
||||
*E154* *E150* *E151* *E152* *E153* *E670*
|
||||
:helpt[ags] [++t] {dir}
|
||||
Generate the help tags file(s) for directory {dir}.
|
||||
All "*.txt" and "*.??x" files in the directory are
|
||||
scanned for a help tag definition in between stars.
|
||||
The "*.??x" files are for translated docs, they
|
||||
generate the "tags-??" file, see |help-translated|.
|
||||
The generated tags files are sorted.
|
||||
When there are duplicates an error message is given.
|
||||
An existing tags file is silently overwritten.
|
||||
The optional "++t" argument forces adding the
|
||||
"help-tags" tag. This is also done when the {dir} is
|
||||
equal to $VIMRUNTIME/doc.
|
||||
To rebuild the help tags in the runtime directory
|
||||
(requires write permission there): >
|
||||
:helptags $VIMRUNTIME/doc
|
||||
< {not in Vi}
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. Translated help files *help-translated*
|
||||
|
||||
It is possible to add translated help files, next to the original English help
|
||||
files. Vim will search for all help in "doc" directories in 'runtimepath'.
|
||||
This is only available when compiled with the |+multi_lang| feature.
|
||||
|
||||
At this moment translations are available for:
|
||||
Chinese - multiple authors
|
||||
French - translated by David Blanchet
|
||||
Italian - translated by Antonio Colombo
|
||||
Polish - translated by Mikolaj Machowski
|
||||
Russian - translated by Vassily Ragosin
|
||||
See the Vim website to find them: http://www.vim.org/translations.php
|
||||
|
||||
A set of translated help files consists of these files:
|
||||
|
||||
help.abx
|
||||
howto.abx
|
||||
...
|
||||
tags-ab
|
||||
|
||||
"ab" is the two-letter language code. Thus for Italian the names are:
|
||||
|
||||
help.itx
|
||||
howto.itx
|
||||
...
|
||||
tags-it
|
||||
|
||||
The 'helplang' option can be set to the preferred language(s). The default is
|
||||
set according to the environment. Vim will first try to find a matching tag
|
||||
in the preferred language(s). English is used when it cannot be found.
|
||||
|
||||
To find a tag in a specific language, append "@ab" to a tag, where "ab" is the
|
||||
two-letter language code. Example: >
|
||||
:he user-manual@it
|
||||
:he user-manual@en
|
||||
The first one finds the Italian user manual, even when 'helplang' is empty.
|
||||
The second one finds the English user manual, even when 'helplang' is set to
|
||||
"it".
|
||||
|
||||
When using command-line completion for the ":help" command, the "@en"
|
||||
extension is only shown when a tag exists for multiple languages. When the
|
||||
tag only exists for English "@en" is omitted.
|
||||
|
||||
When using |CTRL-]| or ":help!" in a non-English help file Vim will try to
|
||||
find the tag in the same language. If not found then 'helplang' will be used
|
||||
to select a language.
|
||||
|
||||
Help files must use latin1 or utf-8 encoding. Vim assumes the encoding is
|
||||
utf-8 when finding non-ASCII characters in the first line. Thus you must
|
||||
translate the header with "For Vim version".
|
||||
|
||||
The same encoding must be used for the help files of one language in one
|
||||
directory. You can use a different encoding for different languages and use
|
||||
a different encoding for help files of the same language but in a different
|
||||
directory.
|
||||
|
||||
Hints for translators:
|
||||
- Do not translate the tags. This makes it possible to use 'helplang' to
|
||||
specify the preferred language. You may add new tags in your language.
|
||||
- When you do not translate a part of a file, add tags to the English version,
|
||||
using the "tag@en" notation.
|
||||
- Make a package with all the files and the tags file available for download.
|
||||
Users can drop it in one of the "doc" directories and start use it.
|
||||
Report this to Bram, so that he can add a link on www.vim.org.
|
||||
- Use the |:helptags| command to generate the tags files. It will find all
|
||||
languages in the specified directory.
|
||||
|
||||
==============================================================================
|
||||
3. Writing help files *help-writing*
|
||||
|
||||
For ease of use, a Vim help file for a plugin should follow the format of the
|
||||
standard Vim help files. If you are writing a new help file it's best to copy
|
||||
one of the existing files and use it as a template.
|
||||
|
||||
The first line in a help file should have the following format:
|
||||
|
||||
*helpfile_name.txt* For Vim version 7.3 Last change: 2010 June 4
|
||||
|
||||
The first field is a link to the help file name. The second field describes
|
||||
the applicable Vim version. The last field specifies the last modification
|
||||
date of the file. Each field is separated by a tab.
|
||||
|
||||
At the bottom of the help file, place a Vim modeline to set the 'textwidth'
|
||||
and 'tabstop' options and the 'filetype' to 'help'. Never set a global option
|
||||
in such a modeline, that can have consequences undesired by whoever reads that
|
||||
help.
|
||||
|
||||
|
||||
TAGS
|
||||
|
||||
To define a help tag, place the name between asterisks (*tag-name*). The
|
||||
tag-name should be different from all the Vim help tag names and ideally
|
||||
should begin with the name of the Vim plugin. The tag name is usually right
|
||||
aligned on a line.
|
||||
|
||||
When referring to an existing help tag and to create a hot-link, place the
|
||||
name between two bars (|) eg. |help-writing|.
|
||||
|
||||
When referring to a Vim option in the help file, place the option name between
|
||||
two single quotes, eg. 'statusline'
|
||||
|
||||
|
||||
HIGHLIGHTING
|
||||
|
||||
To define a column heading, use a tilde character at the end of the line.
|
||||
This will highlight the column heading in a different color. E.g.
|
||||
|
||||
Column heading~
|
||||
|
||||
To separate sections in a help file, place a series of '=' characters in a
|
||||
line starting from the first column. The section separator line is highlighted
|
||||
differently.
|
||||
|
||||
To quote a block of ex-commands verbatim, place a greater than (>) character
|
||||
at the end of the line before the block and a less than (<) character as the
|
||||
first non-blank on a line following the block. Any line starting in column 1
|
||||
also implicitly stops the block of ex-commands before it. E.g. >
|
||||
function Example_Func()
|
||||
echo "Example"
|
||||
endfunction
|
||||
<
|
||||
|
||||
The following are highlighted differently in a Vim help file:
|
||||
- a special key name expressed either in <> notation as in <PageDown>, or
|
||||
as a Ctrl character as in CTRL-X
|
||||
- anything between {braces}, e.g. {lhs} and {rhs}
|
||||
|
||||
The word "Note", "Notes" and similar automagically receive distinctive
|
||||
highlighting. So do these:
|
||||
*Todo something to do
|
||||
*Error something wrong
|
||||
|
||||
You can find the details in $VIMRUNTIME/syntax/help.vim
|
||||
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -1,4 +1,4 @@
|
||||
*howto.txt* For Vim version 7.2. Last change: 2006 Apr 02
|
||||
*howto.txt* For Vim version 7.3. Last change: 2006 Apr 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_cscop.txt* For Vim version 7.2. Last change: 2009 Mar 18
|
||||
*if_cscop.txt* For Vim version 7.3. Last change: 2011 Jun 12
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Andy Kahn
|
||||
@@ -112,8 +112,7 @@ The available subcommands are:
|
||||
:cscope add /projects/vim/cscope.out /usr/local/vim
|
||||
:cscope add cscope.out /usr/local/vim -C
|
||||
<
|
||||
*cscope-find* *cs-find*
|
||||
*E565* *E567*
|
||||
*cscope-find* *cs-find* *E567*
|
||||
find : Query cscope. All cscope query options are available
|
||||
except option #5 ("Change this grep pattern").
|
||||
|
||||
@@ -198,7 +197,7 @@ The available subcommands are:
|
||||
|
||||
USAGE :cs help
|
||||
|
||||
*E260* *E261*
|
||||
*E261*
|
||||
kill : Kill a cscope connection (or kill all cscope connections).
|
||||
|
||||
USAGE :cs kill {num|partial_name}
|
||||
@@ -265,12 +264,22 @@ seems to be useful: >
|
||||
:set cscopequickfix=s-,c-,d-,i-,t-,e-
|
||||
<
|
||||
*cscopetag* *cst*
|
||||
If 'cscopetag' set, the commands ":tag" and CTRL-] as well as "vim -t" will
|
||||
always use |:cstag| instead of the default :tag behavior. Effectively, by
|
||||
setting 'cst', you will always search your cscope databases as well as your
|
||||
tag files. The default is off. Examples: >
|
||||
If 'cscopetag' is set, the commands ":tag" and CTRL-] as well as "vim -t"
|
||||
will always use |:cstag| instead of the default :tag behavior. Effectively,
|
||||
by setting 'cst', you will always search your cscope databases as well as
|
||||
your tag files. The default is off. Examples: >
|
||||
:set cst
|
||||
:set nocst
|
||||
<
|
||||
*cscoperelative* *csre*
|
||||
If 'cscoperelative' is set, then in absence of a prefix given to cscope
|
||||
(prefix is the argument of -P option of cscope), basename of cscope.out
|
||||
location (usually the project root directory) will be used as the prefix
|
||||
to construct an absolute path. The default is off. Note: This option is
|
||||
only effective when cscope (cscopeprg) is initialized without a prefix
|
||||
path (-P). Examples: >
|
||||
:set csre
|
||||
:set nocsre
|
||||
<
|
||||
*cscopetagorder* *csto*
|
||||
The value of 'csto' determines the order in which |:cstag| performs a search.
|
||||
|
||||
244
runtime/doc/if_lua.txt
Normal file
244
runtime/doc/if_lua.txt
Normal file
@@ -0,0 +1,244 @@
|
||||
*if_lua.txt* For Vim version 7.3. Last change: 2010 Jul 22
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Luis Carvalho
|
||||
|
||||
|
||||
The Lua Interface to Vim *lua* *Lua*
|
||||
|
||||
1. Commands |lua-commands|
|
||||
2. The vim module |lua-vim|
|
||||
3. Buffer userdata |lua-buffer|
|
||||
4. Window userdata |lua-window|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
The Lua interface is available only when Vim was compiled with the
|
||||
|+lua| feature.
|
||||
|
||||
==============================================================================
|
||||
1. Commands *lua-commands*
|
||||
|
||||
*:lua*
|
||||
:[range]lua {chunk}
|
||||
Execute Lua chunk {chunk}. {not in Vi}
|
||||
|
||||
Examples:
|
||||
>
|
||||
:lua print("Hello, Vim!")
|
||||
:lua local curbuf = vim.buffer() curbuf[7] = "line #7"
|
||||
<
|
||||
|
||||
:[range]lua << {endmarker}
|
||||
{script}
|
||||
{endmarker}
|
||||
Execute Lua script {script}. {not in Vi}
|
||||
Note: This command doesn't work when the Lua
|
||||
feature wasn't compiled in. To avoid errors, see
|
||||
|script-here|.
|
||||
|
||||
{endmarker} must NOT be preceded by any white space. If {endmarker} is
|
||||
omitted from after the "<<", a dot '.' must be used after {script}, like
|
||||
for the |:append| and |:insert| commands.
|
||||
This form of the |:lua| command is mainly useful for including Lua code
|
||||
in Vim scripts.
|
||||
|
||||
Example:
|
||||
>
|
||||
function! CurrentLineInfo()
|
||||
lua << EOF
|
||||
local linenr = vim.window().line
|
||||
local curline = vim.buffer()[linenr]
|
||||
print(string.format("Current line [%d] has %d chars",
|
||||
linenr, #curline))
|
||||
EOF
|
||||
endfunction
|
||||
<
|
||||
|
||||
*:luado*
|
||||
:[range]luado {body} Execute Lua function "function (line) {body} end" for
|
||||
each line in the [range], with the function argument
|
||||
being set to the text of each line in turn, without a
|
||||
trailing <EOL>. If the value returned by the function
|
||||
is a string it becomes the text of the line in the
|
||||
current turn. The default for [range] is the whole
|
||||
file: "1,$". {not in Vi}
|
||||
|
||||
Examples:
|
||||
>
|
||||
:luado return string.format("%s\t%d", line:reverse(), #line)
|
||||
|
||||
:lua require"lpeg"
|
||||
:lua -- balanced parenthesis grammar:
|
||||
:lua bp = lpeg.P{ "(" * ((1 - lpeg.S"()") + lpeg.V(1))^0 * ")" }
|
||||
:luado if bp:match(line) then return "-->\t" .. line end
|
||||
<
|
||||
|
||||
*:luafile*
|
||||
:[range]luafile {file}
|
||||
Execute Lua script in {file}. {not in Vi}
|
||||
The whole argument is used as a single file name.
|
||||
|
||||
Examples:
|
||||
>
|
||||
:luafile script.lua
|
||||
:luafile %
|
||||
<
|
||||
|
||||
All these commands execute a Lua chunk from either the command line (:lua and
|
||||
:luado) or a file (:luafile) with the given line [range]. Similarly to the Lua
|
||||
interpreter, each chunk has its own scope and so only global variables are
|
||||
shared between command calls. Lua default libraries "table", "string", "math",
|
||||
and "package" are available, "io" and "debug" are not, and "os" is restricted
|
||||
to functions "date", "clock", "time", "difftime", and "getenv". In addition,
|
||||
Lua "print" function has its output redirected to the Vim message area, with
|
||||
arguments separated by a white space instead of a tab.
|
||||
|
||||
Lua uses the "vim" module (see |lua-vim|) to issue commands to Vim
|
||||
and manage buffers (|lua-buffer|) and windows (|lua-window|). However,
|
||||
procedures that alter buffer content, open new buffers, and change cursor
|
||||
position are restricted when the command is executed in the |sandbox|.
|
||||
|
||||
|
||||
==============================================================================
|
||||
2. The vim module *lua-vim*
|
||||
|
||||
Lua interfaces Vim through the "vim" module. The first and last line of the
|
||||
input range are stored in "vim.firstline" and "vim.lastline" respectively. The
|
||||
module also includes routines for buffer, window, and current line queries,
|
||||
Vim evaluation and command execution, and others.
|
||||
|
||||
vim.isbuffer(value) Returns 'true' (boolean, not string) if
|
||||
"value" is a buffer userdata and 'false'
|
||||
otherwise (see |lua-buffer|).
|
||||
|
||||
vim.buffer([arg]) If "arg" is a number, returns buffer with
|
||||
number "arg" in the buffer list or, if "arg"
|
||||
is a string, returns buffer whose full or short
|
||||
name is "arg". In both cases, returns 'nil'
|
||||
(nil value, not string) if the buffer is not
|
||||
found. Otherwise, if "toboolean(arg)" is
|
||||
'true' returns the first buffer in the buffer
|
||||
list or else the current buffer.
|
||||
|
||||
vim.iswindow(value) Returns 'true' (boolean, not string) if
|
||||
"value" is a window userdata and
|
||||
'false' otherwise (see |lua-window|).
|
||||
|
||||
vim.window([arg]) If "arg" is a number, returns window with
|
||||
number "arg" or 'nil' (nil value, not string)
|
||||
if not found. Otherwise, if "toboolean(arg)"
|
||||
is 'true' returns the first window or else the
|
||||
current window.
|
||||
|
||||
vim.command({cmd}) Executes the vim (ex-mode) command {cmd}.
|
||||
Examples: >
|
||||
:lua vim.command"set tw=60"
|
||||
:lua vim.command"normal ddp"
|
||||
<
|
||||
vim.eval({expr}) Evaluates expression {expr} (see |expression|),
|
||||
converts the result to Lua, and returns it.
|
||||
Vim strings and numbers are directly converted
|
||||
to Lua strings and numbers respectively. Vim
|
||||
lists and dictionaries are converted to Lua
|
||||
tables (lists become integer-keyed tables).
|
||||
Examples: >
|
||||
:lua tw = vim.eval"&tw"
|
||||
:lua print(vim.eval"{'a': 'one'}".a)
|
||||
<
|
||||
vim.line() Returns the current line (without the trailing
|
||||
<EOL>), a Lua string.
|
||||
|
||||
vim.beep() Beeps.
|
||||
|
||||
vim.open({fname}) Opens a new buffer for file {fname} and
|
||||
returns it. Note that the buffer is not set as
|
||||
current.
|
||||
|
||||
|
||||
==============================================================================
|
||||
3. Buffer userdata *lua-buffer*
|
||||
|
||||
Buffer userdata represent vim buffers. A buffer userdata "b" has the following
|
||||
properties and methods:
|
||||
|
||||
Properties
|
||||
----------
|
||||
o "b()" sets "b" as the current buffer.
|
||||
o "#b" is the number of lines in buffer "b".
|
||||
o "b[k]" represents line number k: "b[k] = newline" replaces line k
|
||||
with string "newline" and "b[k] = nil" deletes line k.
|
||||
o "b.name" contains the short name of buffer "b" (read-only).
|
||||
o "b.fname" contains the full name of buffer "b" (read-only).
|
||||
o "b.number" contains the position of buffer "b" in the buffer list
|
||||
(read-only).
|
||||
|
||||
Methods
|
||||
-------
|
||||
o "b:insert(newline[, pos])" inserts string "newline" at (optional)
|
||||
position "pos" in the buffer. The default value for "pos" is
|
||||
"#b + 1". If "pos == 0" then "newline" becomes the first line in
|
||||
the buffer.
|
||||
o "b:next()" returns the buffer next to "b" in the buffer list.
|
||||
o "b:previous()" returns the buffer previous to "b" in the buffer
|
||||
list.
|
||||
o "b:isvalid()" returns 'true' (boolean) if buffer "b" corresponds to
|
||||
a "real" (not freed from memory) Vim buffer.
|
||||
|
||||
Examples:
|
||||
>
|
||||
:lua b = vim.buffer() -- current buffer
|
||||
:lua print(b.name, b.number)
|
||||
:lua b[1] = "first line"
|
||||
:lua b:insert("FIRST!", 0)
|
||||
:lua b[1] = nil -- delete top line
|
||||
:lua for i=1,3 do b:insert(math.random()) end
|
||||
:3,4lua for i=vim.lastline,vim.firstline,-1 do b[i] = nil end
|
||||
:lua vim.open"myfile"() -- open buffer and set it as current
|
||||
|
||||
function! ListBuffers()
|
||||
lua << EOF
|
||||
local b = vim.buffer(true) -- first buffer in list
|
||||
while b ~= nil do
|
||||
print(b.number, b.name, #b)
|
||||
b = b:next()
|
||||
end
|
||||
vim.beep()
|
||||
EOF
|
||||
endfunction
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
4. Window userdata *lua-window*
|
||||
|
||||
Window objects represent vim windows. A window userdata "w" has the following
|
||||
properties and methods:
|
||||
|
||||
Properties
|
||||
----------
|
||||
o "w()" sets "w" as the current window.
|
||||
o "w.buffer" contains the buffer of window "w" (read-only).
|
||||
o "w.line" represents the cursor line position in window "w".
|
||||
o "w.col" represents the cursor column position in window "w".
|
||||
o "w.width" represents the width of window "w".
|
||||
o "w.height" represents the height of window "w".
|
||||
|
||||
Methods
|
||||
-------
|
||||
o "w:next()" returns the window next to "w".
|
||||
o "w:previous()" returns the window previous to "w".
|
||||
o "w:isvalid()" returns 'true' (boolean) if window "w" corresponds to
|
||||
a "real" (not freed from memory) Vim window.
|
||||
|
||||
Examples:
|
||||
>
|
||||
:lua w = vim.window() -- current window
|
||||
:lua print(w.buffer.name, w.line, w.col)
|
||||
:lua w.width = w.width + math.random(10)
|
||||
:lua w.height = 2 * math.random() * w.height
|
||||
:lua n,w = 0,vim.window(true) while w~=nil do n,w = n + 1,w:next() end
|
||||
:lua print("There are " .. n .. " windows")
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_mzsch.txt* For Vim version 7.2. Last change: 2010 Jan 19
|
||||
*if_mzsch.txt* For Vim version 7.3. Last change: 2010 Feb 11
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sergey Khorev
|
||||
@@ -185,8 +185,7 @@ Buffers *mzscheme-buffer*
|
||||
current buffer will be used.
|
||||
(get-buff-line-list {start} {end} [buffer])
|
||||
Get a list of lines in a buffer. {Start}
|
||||
and {end} are 1-based. {Start} is
|
||||
inclusive, {end} - exclusive.
|
||||
and {end} are 1-based and inclusive.
|
||||
(set-buff-line-list {start} {end} {string-list} [buffer])
|
||||
Set a list of lines in a buffer. If
|
||||
string-list is #f or null, the lines get
|
||||
@@ -200,8 +199,8 @@ Buffers *mzscheme-buffer*
|
||||
Insert a list of lines into a buffer after
|
||||
{linenr}. If {linenr} is 0, lines will be
|
||||
inserted at start.
|
||||
(curr-buff) Get the current buffer. Use procedures
|
||||
from "vimcmd" module to change it.
|
||||
(curr-buff) Get the current buffer. Use other MzScheme
|
||||
interface procedures to change it.
|
||||
(buff-count) Get count of total buffers in the editor.
|
||||
(get-next-buff [buffer]) Get next buffer.
|
||||
(get-prev-buff [buffer]) Get previous buffer. Return #f when there
|
||||
@@ -234,7 +233,7 @@ Windows *mzscheme-window*
|
||||
==============================================================================
|
||||
5. mzeval() Vim function *mzscheme-mzeval*
|
||||
|
||||
To facilitate bi-directional interface, you can use |mzeval| function to
|
||||
To facilitate bi-directional interface, you can use |mzeval()| function to
|
||||
evaluate MzScheme expressions and pass their values to VimL.
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ole.txt* For Vim version 7.2. Last change: 2008 Aug 16
|
||||
*if_ole.txt* For Vim version 7.3. Last change: 2008 Aug 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_perl.txt* For Vim version 7.2. Last change: 2006 Mar 06
|
||||
*if_perl.txt* For Vim version 7.3. Last change: 2010 Jul 21
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Sven Verdoolaege
|
||||
@@ -265,18 +265,26 @@ Note that "EOF" must be at the start of the line.
|
||||
==============================================================================
|
||||
4. Dynamic loading *perl-dynamic*
|
||||
|
||||
On MS-Windows the Perl library can be loaded dynamically. The |:version|
|
||||
output then includes |+perl/dyn|.
|
||||
On MS-Windows and Unix the Perl library can be loaded dynamically. The
|
||||
|:version| output then includes |+perl/dyn|.
|
||||
|
||||
This means that Vim will search for the Perl DLL file only when needed. When
|
||||
you don't use the Perl interface you don't need it, thus you can use Vim
|
||||
without this DLL file.
|
||||
This means that Vim will search for the Perl DLL or shared library file only
|
||||
when needed. When you don't use the Perl interface you don't need it, thus
|
||||
you can use Vim without this file.
|
||||
|
||||
To use the Perl interface the Perl DLL must be in your search path. In a
|
||||
console window type "path" to see what directories are used.
|
||||
|
||||
MS-Windows ~
|
||||
|
||||
You can download Perl from http://www.perl.org. The one from ActiveState was
|
||||
used for building Vim.
|
||||
|
||||
To use the Perl interface the Perl DLL must be in your search path.
|
||||
If Vim reports it cannot find the perl512.dll, make sure your $PATH includes
|
||||
the directory where it is located. The Perl installer normally does that.
|
||||
In a console window type "path" to see what directories are used.
|
||||
|
||||
The name of the DLL must match the Perl version Vim was compiled with.
|
||||
Currently the name is "perl58.dll". That is for Perl 5.8. To know for
|
||||
Currently the name is "perl512.dll". That is for Perl 5.12. To know for
|
||||
sure edit "gvim.exe" and search for "perl\d*.dll\c".
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_pyth.txt* For Vim version 7.2. Last change: 2008 Aug 16
|
||||
*if_pyth.txt* For Vim version 7.3. Last change: 2012 Feb 04
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Paul Moore
|
||||
@@ -12,11 +12,14 @@ The Python Interface to Vim *python* *Python*
|
||||
4. Range objects |python-range|
|
||||
5. Window objects |python-window|
|
||||
6. Dynamic loading |python-dynamic|
|
||||
7. Python 3 |python3|
|
||||
|
||||
{Vi does not have any of these commands}
|
||||
|
||||
The Python interface is available only when Vim was compiled with the
|
||||
The Python 2.x interface is available only when Vim was compiled with the
|
||||
|+python| feature.
|
||||
The Python 3 interface is available only when Vim was compiled with the
|
||||
|+python3| feature.
|
||||
|
||||
==============================================================================
|
||||
1. Commands *python-commands*
|
||||
@@ -219,8 +222,9 @@ Buffer objects represent vim buffers. You can obtain them in a number of ways:
|
||||
- from indexing vim.buffers (|python-buffers|)
|
||||
- from the "buffer" attribute of a window (|python-window|)
|
||||
|
||||
Buffer objects have one read-only attribute - name - the full file name for
|
||||
the buffer. They also have three methods (append, mark, and range; see below).
|
||||
Buffer objects have two read-only attributes - name - the full file name for
|
||||
the buffer, and number - the buffer number. They also have three methods
|
||||
(append, mark, and range; see below).
|
||||
|
||||
You can also treat buffer objects as sequence objects. In this context, they
|
||||
act as if they were lists (yes, they are mutable) of strings, with each
|
||||
@@ -237,10 +241,12 @@ with marks (see below) which use vim line numbers.
|
||||
|
||||
The buffer object methods are:
|
||||
b.append(str) Append a line to the buffer
|
||||
b.append(str, nr) Idem, below line "nr"
|
||||
b.append(list) Append a list of lines to the buffer
|
||||
Note that the option of supplying a list of strings to
|
||||
the append method differs from the equivalent method
|
||||
for Python's built-in list objects.
|
||||
b.append(list, nr) Idem, below line "nr"
|
||||
b.mark(name) Return a tuple (row,col) representing the position
|
||||
of the named mark (can also get the []"<> marks)
|
||||
b.range(s,e) Return a range object (see |python-range|) which
|
||||
@@ -282,10 +288,12 @@ The range object attributes are:
|
||||
|
||||
The range object methods are:
|
||||
r.append(str) Append a line to the range
|
||||
r.append(str, nr) Idem, after line "nr"
|
||||
r.append(list) Append a list of lines to the range
|
||||
Note that the option of supplying a list of strings to
|
||||
the append method differs from the equivalent method
|
||||
for Python's built-in list objects.
|
||||
r.append(list, nr) Idem, after line "nr"
|
||||
|
||||
Example (assume r is the current range):
|
||||
# Send all lines in a range to the default printer
|
||||
@@ -327,5 +335,61 @@ The name of the DLL must match the Python version Vim was compiled with.
|
||||
Currently the name is "python24.dll". That is for Python 2.4. To know for
|
||||
sure edit "gvim.exe" and search for "python\d*.dll\c".
|
||||
|
||||
==============================================================================
|
||||
7. Python 3 *python3*
|
||||
|
||||
*:py3* *:python3*
|
||||
The |:py3| and |:python3| commands work similar to |:python|.
|
||||
*:py3file*
|
||||
The |:py3file| command works similar to |:pyfile|.
|
||||
|
||||
Vim can be built in four ways (:version output):
|
||||
1. No Python support (-python, -python3)
|
||||
2. Python 2 support only (+python or +python/dyn, -python3)
|
||||
3. Python 3 support only (-python, +python3 or +python3/dyn)
|
||||
4. Python 2 and 3 support (+python/dyn, +python3/dyn)
|
||||
|
||||
Some more details on the special case 4:
|
||||
|
||||
When Python 2 and Python 3 are both supported they must be loaded dynamically.
|
||||
|
||||
When doing this on Linux/Unix systems and importing global symbols, this leads
|
||||
to a crash when the second Python version is used. So either global symbols
|
||||
are loaded but only one Python version is activated, or no global symbols are
|
||||
loaded. The latter makes Python's "import" fail on libraries that expect the
|
||||
symbols to be provided by Vim.
|
||||
*E836* *E837*
|
||||
Vim's configuration script makes a guess for all libraries based on one
|
||||
standard Python library (termios). If importing this library succeeds for
|
||||
both Python versions, then both will be made available in Vim at the same
|
||||
time. If not, only the version first used in a session will be enabled.
|
||||
When trying to use the other one you will get the E836 or E837 error message.
|
||||
|
||||
Here Vim's behavior depends on the system in which it was configured. In a
|
||||
system where both versions of Python were configured with --enable-shared,
|
||||
both versions of Python will be activated at the same time. There will still
|
||||
be problems with other third party libraries that were not linked to
|
||||
libPython.
|
||||
|
||||
To work around such problems there are these options:
|
||||
1. The problematic library is recompiled to link to the according
|
||||
libpython.so.
|
||||
2. Vim is recompiled for only one Python version.
|
||||
3. You undefine PY_NO_RTLD_GLOBAL in auto/config.h after configuration. This
|
||||
may crash Vim though.
|
||||
|
||||
*has-python*
|
||||
You can test what Python version is available with: >
|
||||
if has('python')
|
||||
echo 'there is Python 2.x'
|
||||
elseif has('python3')
|
||||
echo 'there is Python 3.x'
|
||||
endif
|
||||
|
||||
Note however, that when Python 2 and 3 are both available and loaded
|
||||
dynamically, these has() calls will try to load them. If only one can be
|
||||
loaded at a time, just checking if Python 2 or 3 are available will prevent
|
||||
the other one from being available.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_ruby.txt* For Vim version 7.2. Last change: 2008 Aug 16
|
||||
*if_ruby.txt* For Vim version 7.3. Last change: 2010 Oct 27
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Shugo Maeda
|
||||
@@ -40,6 +40,9 @@ downloading Ruby there.
|
||||
wasn't compiled in. To avoid errors, see
|
||||
|script-here|.
|
||||
|
||||
Command to try it out: >
|
||||
:ruby print "Hello" # this is a comment
|
||||
|
||||
Example Vim script: >
|
||||
|
||||
function! RedGem()
|
||||
@@ -187,19 +190,27 @@ $curbuf The current buffer object.
|
||||
==============================================================================
|
||||
6. Dynamic loading *ruby-dynamic*
|
||||
|
||||
On MS-Windows the Ruby library can be loaded dynamically. The |:version|
|
||||
output then includes |+ruby/dyn|.
|
||||
On MS-Windows and Unix the Ruby library can be loaded dynamically. The
|
||||
|:version| output then includes |+ruby/dyn|.
|
||||
|
||||
This means that Vim will search for the Ruby DLL file only when needed. When
|
||||
you don't use the Ruby interface you don't need it, thus you can use Vim
|
||||
without this DLL file.
|
||||
This means that Vim will search for the Ruby DLL file or shared library only
|
||||
when needed. When you don't use the Ruby interface you don't need it, thus
|
||||
you can use Vim even though this library file is not on your system.
|
||||
|
||||
You need to install the right version of Ruby for this to work. You can find
|
||||
the package to download from:
|
||||
http://www.garbagecollect.jp/ruby/mswin32/en/download/release.html
|
||||
Currently that is ruby-1.9.1-p429-i386-mswin32.zip
|
||||
|
||||
To use the Ruby interface the Ruby DLL must be in your search path. In a
|
||||
console window type "path" to see what directories are used.
|
||||
|
||||
The name of the DLL must match the Ruby version Vim was compiled with.
|
||||
Currently the name is "ruby18.dll". That is for Ruby 1.8. To know for sure
|
||||
edit "gvim.exe" and search for "ruby\d*.dll\c".
|
||||
Currently the name is "msvcrt-ruby191.dll". That is for Ruby 1.9.1. To know
|
||||
for sure edit "gvim.exe" and search for "ruby\d*.dll\c".
|
||||
|
||||
If you want to build Vim with Ruby 1.9.1, you need to edit the config.h file
|
||||
and comment-out the check for _MSC_VER.
|
||||
|
||||
==============================================================================
|
||||
vim:tw=78:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_sniff.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*if_sniff.txt* For Vim version 7.3. Last change: 2005 Mar 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*if_tcl.txt* For Vim version 7.2. Last change: 2008 Aug 16
|
||||
*if_tcl.txt* For Vim version 7.3. Last change: 2008 Aug 16
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ingo Wilken
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*indent.txt* For Vim version 7.2. Last change: 2010 Jan 27
|
||||
*indent.txt* For Vim version 7.3. Last change: 2011 Sep 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -128,13 +128,20 @@ have changed the indent by typing <BS>, <Tab>, or <Space> in the indent or
|
||||
used CTRL-T or CTRL-D.
|
||||
|
||||
*cinoptions-values*
|
||||
The 'cinoptions' option sets how Vim performs indentation. In the list below,
|
||||
The 'cinoptions' option sets how Vim performs indentation. The value after
|
||||
the option character can be one of these (N is any number):
|
||||
N indent N spaces
|
||||
-N indent N spaces to the left
|
||||
Ns N times 'shiftwidth' spaces
|
||||
-Ns N times 'shiftwidth' spaces to the left
|
||||
|
||||
In the list below,
|
||||
"N" represents a number of your choice (the number can be negative). When
|
||||
there is an 's' after the number, Vim multiplies the number by 'shiftwidth':
|
||||
"1s" is 'shiftwidth', "2s" is two times 'shiftwidth', etc. You can use a
|
||||
decimal point, too: "-0.5s" is minus half a 'shiftwidth'. The examples below
|
||||
assume a 'shiftwidth' of 4.
|
||||
|
||||
decimal point, too: "-0.5s" is minus half a 'shiftwidth'.
|
||||
The examples below assume a 'shiftwidth' of 4.
|
||||
*cino->*
|
||||
>N Amount added for "normal" indent. Used after a line that should
|
||||
increase the indent (lines starting with "if", an opening brace,
|
||||
etc.). (default 'shiftwidth').
|
||||
@@ -145,6 +152,7 @@ assume a 'shiftwidth' of 4.
|
||||
foo; foo; foo;
|
||||
} } }
|
||||
<
|
||||
*cino-e*
|
||||
eN Add N to the prevailing indent inside a set of braces if the
|
||||
opening brace at the End of the line (more precise: is not the
|
||||
first character in a line). This is useful if you want a
|
||||
@@ -160,6 +168,7 @@ assume a 'shiftwidth' of 4.
|
||||
bar; bar; bar;
|
||||
} } }
|
||||
<
|
||||
*cino-n*
|
||||
nN Add N to the prevailing indent for a statement after an "if",
|
||||
"while", etc., if it is NOT inside a set of braces. This is
|
||||
useful if you want a different indent when there is no '{'
|
||||
@@ -174,6 +183,7 @@ assume a 'shiftwidth' of 4.
|
||||
bar; bar; bar;
|
||||
} } }
|
||||
<
|
||||
*cino-f*
|
||||
fN Place the first opening brace of a function or other block in
|
||||
column N. This applies only for an opening brace that is not
|
||||
inside other braces and is at the start of the line. What comes
|
||||
@@ -184,6 +194,7 @@ assume a 'shiftwidth' of 4.
|
||||
{ { {
|
||||
int foo; int foo; int foo;
|
||||
<
|
||||
*cino-{*
|
||||
{N Place opening braces N characters from the prevailing indent.
|
||||
This applies only for opening braces that are inside other
|
||||
braces. (default 0).
|
||||
@@ -193,6 +204,7 @@ assume a 'shiftwidth' of 4.
|
||||
{ { {
|
||||
foo; foo; foo;
|
||||
<
|
||||
*cino-}*
|
||||
}N Place closing braces N characters from the matching opening
|
||||
brace. (default 0).
|
||||
|
||||
@@ -202,6 +214,7 @@ assume a 'shiftwidth' of 4.
|
||||
foo; foo; foo;
|
||||
} } }
|
||||
<
|
||||
*cino-^*
|
||||
^N Add N to the prevailing indent inside a set of braces if the
|
||||
opening brace is in column 0. This can specify a different
|
||||
indent for whole of a function (some may like to set it to a
|
||||
@@ -216,6 +229,21 @@ assume a 'shiftwidth' of 4.
|
||||
} } }
|
||||
} } }
|
||||
<
|
||||
*cino-L*
|
||||
LN Controls placement of jump labels. If N is negative, the label
|
||||
will be placed at column 1. If N is non-negative, the indent of
|
||||
the label will be the prevailing indent minus N. (default -1).
|
||||
|
||||
cino= cino=L2 cino=Ls >
|
||||
func() func() func()
|
||||
{ { {
|
||||
{ { {
|
||||
stmt; stmt; stmt;
|
||||
LABEL: LABEL: LABEL:
|
||||
} } }
|
||||
} } }
|
||||
<
|
||||
*cino-:*
|
||||
:N Place case labels N characters from the indent of the switch().
|
||||
(default 'shiftwidth').
|
||||
|
||||
@@ -227,6 +255,7 @@ assume a 'shiftwidth' of 4.
|
||||
default: default:
|
||||
} }
|
||||
<
|
||||
*cino-=*
|
||||
=N Place statements occurring after a case label N characters from
|
||||
the indent of the label. (default 'shiftwidth').
|
||||
|
||||
@@ -234,6 +263,7 @@ assume a 'shiftwidth' of 4.
|
||||
case 11: case 11: a = a + 1;
|
||||
a = a + 1; b = b + 1;
|
||||
<
|
||||
*cino-l*
|
||||
lN If N != 0 Vim will align with a case label instead of the
|
||||
statement after it in the same line.
|
||||
|
||||
@@ -243,8 +273,10 @@ assume a 'shiftwidth' of 4.
|
||||
break; break;
|
||||
} }
|
||||
<
|
||||
*cino-b*
|
||||
bN If N != 0 Vim will align a final "break" with the case label,
|
||||
so that case..break looks like a sort of block. (default: 0).
|
||||
When using 1, consider adding "0=break" to 'cinkeys'.
|
||||
|
||||
cino= cino=b1 >
|
||||
switch (x) switch(x)
|
||||
@@ -258,6 +290,7 @@ assume a 'shiftwidth' of 4.
|
||||
break; break;
|
||||
} }
|
||||
<
|
||||
*cino-g*
|
||||
gN Place C++ scope declarations N characters from the indent of the
|
||||
block they are in. (default 'shiftwidth'). A scope declaration
|
||||
can be "public:", "protected:" or "private:".
|
||||
@@ -269,6 +302,7 @@ assume a 'shiftwidth' of 4.
|
||||
private: private:
|
||||
} }
|
||||
<
|
||||
*cino-h*
|
||||
hN Place statements occurring after a C++ scope declaration N
|
||||
characters from the indent of the label. (default
|
||||
'shiftwidth').
|
||||
@@ -277,6 +311,21 @@ assume a 'shiftwidth' of 4.
|
||||
public: public: a = a + 1;
|
||||
a = a + 1; b = b + 1;
|
||||
<
|
||||
*cino-N*
|
||||
NN Indent inside C++ namespace N characters extra compared to a
|
||||
normal block. (default 0).
|
||||
|
||||
cino= cino=N-s >
|
||||
namespace { namespace {
|
||||
void function(); void function();
|
||||
} }
|
||||
|
||||
namespace my namespace my
|
||||
{ {
|
||||
void function(); void function();
|
||||
} }
|
||||
<
|
||||
*cino-p*
|
||||
pN Parameter declarations for K&R-style function declarations will
|
||||
be indented N characters from the margin. (default
|
||||
'shiftwidth').
|
||||
@@ -286,6 +335,7 @@ assume a 'shiftwidth' of 4.
|
||||
int a; int a; int a;
|
||||
char b; char b; char b;
|
||||
<
|
||||
*cino-t*
|
||||
tN Indent a function return type declaration N characters from the
|
||||
margin. (default 'shiftwidth').
|
||||
|
||||
@@ -293,6 +343,7 @@ assume a 'shiftwidth' of 4.
|
||||
int int int
|
||||
func() func() func()
|
||||
<
|
||||
*cino-i*
|
||||
iN Indent C++ base class declarations and constructor
|
||||
initializations, if they start in a new line (otherwise they
|
||||
are aligned at the right side of the ':').
|
||||
@@ -306,13 +357,18 @@ assume a 'shiftwidth' of 4.
|
||||
BaseClass(3) BaseClass(3)
|
||||
{} {}
|
||||
<
|
||||
+N Indent a continuation line (a line that spills onto the next) N
|
||||
additional characters. (default 'shiftwidth').
|
||||
*cino-+*
|
||||
+N Indent a continuation line (a line that spills onto the next)
|
||||
inside a function N additional characters. (default
|
||||
'shiftwidth').
|
||||
Outside of a function, when the previous line ended in a
|
||||
backslash, the 2 * N is used.
|
||||
|
||||
cino= cino=+10 >
|
||||
a = b + 9 * a = b + 9 *
|
||||
c; c;
|
||||
<
|
||||
*cino-c*
|
||||
cN Indent comment lines after the comment opener, when there is no
|
||||
other text with which to align, N characters from the comment
|
||||
opener. (default 3). See also |format-comments|.
|
||||
@@ -322,6 +378,7 @@ assume a 'shiftwidth' of 4.
|
||||
text. text.
|
||||
*/ */
|
||||
<
|
||||
*cino-C*
|
||||
CN When N is non-zero, indent comment lines by the amount specified
|
||||
with the c flag above even if there is other text behind the
|
||||
comment opener. (default 0).
|
||||
@@ -332,12 +389,14 @@ assume a 'shiftwidth' of 4.
|
||||
********/ ********/
|
||||
< (Example uses ":set comments& comments-=s1:/* comments^=s0:/*")
|
||||
|
||||
*cino-/*
|
||||
/N Indent comment lines N characters extra. (default 0).
|
||||
cino= cino=/4 >
|
||||
a = b; a = b;
|
||||
/* comment */ /* comment */
|
||||
c = d; c = d;
|
||||
<
|
||||
*cino-(*
|
||||
(N When in unclosed parentheses, indent N characters from the line
|
||||
with the unclosed parentheses. Add a 'shiftwidth' for every
|
||||
unclosed parentheses. When N is 0 or the unclosed parentheses
|
||||
@@ -353,6 +412,7 @@ assume a 'shiftwidth' of 4.
|
||||
(c2 || c3)) (c2 || c3))
|
||||
{ {
|
||||
<
|
||||
*cino-u*
|
||||
uN Same as (N, but for one level deeper. (default 'shiftwidth').
|
||||
|
||||
cino= cino=u2 >
|
||||
@@ -360,6 +420,7 @@ assume a 'shiftwidth' of 4.
|
||||
&& (c22345 && (c22345
|
||||
|| c3)) || c3))
|
||||
<
|
||||
*cino-U*
|
||||
UN When N is non-zero, do not ignore the indenting specified by
|
||||
( or u in case that the unclosed parentheses is the first
|
||||
non-white character in its line. (default 0).
|
||||
@@ -371,6 +432,7 @@ assume a 'shiftwidth' of 4.
|
||||
c3 c3
|
||||
) && c4; ) && c4;
|
||||
<
|
||||
*cino-w*
|
||||
wN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively, or using "U0" and the unclosed
|
||||
parentheses is the first non-white character in its line, line
|
||||
@@ -383,6 +445,7 @@ assume a 'shiftwidth' of 4.
|
||||
|| c3)) || c3))
|
||||
foo; foo;
|
||||
<
|
||||
*cino-W*
|
||||
WN When in unclosed parentheses and N is non-zero and either
|
||||
using "(0" or "u0", respectively and the unclosed parentheses is
|
||||
the last non-white character in its line and it is not the
|
||||
@@ -397,6 +460,7 @@ assume a 'shiftwidth' of 4.
|
||||
a_short_line(argument, a_short_line(argument,
|
||||
argument); argument);
|
||||
<
|
||||
*cino-m*
|
||||
mN When N is non-zero, line up a line starting with a closing
|
||||
parentheses with the first character of the line with the
|
||||
matching opening parentheses. (default 0).
|
||||
@@ -411,6 +475,7 @@ assume a 'shiftwidth' of 4.
|
||||
) )
|
||||
foo; foo;
|
||||
<
|
||||
*cino-M*
|
||||
MN When N is non-zero, line up a line starting with a closing
|
||||
parentheses with the first character of the previous line.
|
||||
(default 0).
|
||||
@@ -420,10 +485,11 @@ assume a 'shiftwidth' of 4.
|
||||
cond2 cond2
|
||||
) )
|
||||
<
|
||||
*java-cinoptions* *java-indenting*
|
||||
jN Indent java anonymous classes correctly. The value 'N' is
|
||||
currently unused but must be non-zero (e.g. 'j1'). 'j1' will
|
||||
indent for example the following code snippet correctly: >
|
||||
*java-cinoptions* *java-indenting* *cino-j*
|
||||
jN Indent Java anonymous classes correctly. Also works well for
|
||||
Javascript. The value 'N' is currently unused but must be
|
||||
non-zero (e.g. 'j1'). 'j1' will indent for example the
|
||||
following code snippet correctly: >
|
||||
|
||||
object.add(new ChangeListener() {
|
||||
public void stateChanged(ChangeEvent e) {
|
||||
@@ -431,14 +497,38 @@ assume a 'shiftwidth' of 4.
|
||||
}
|
||||
});
|
||||
<
|
||||
*javascript-cinoptions* *javascript-indenting* *cino-J*
|
||||
JN Indent JavaScript object declarations correctly by not confusing
|
||||
them with labels. The value 'N' is currently unused but must be
|
||||
non-zero (e.g. 'J1'). If you enable this you probably also want
|
||||
to set |cino-j|. >
|
||||
|
||||
var bar = {
|
||||
foo: {
|
||||
that: this,
|
||||
some: ok,
|
||||
},
|
||||
"bar":{
|
||||
a : 2,
|
||||
b: "123abc",
|
||||
x: 4,
|
||||
"y": 5
|
||||
}
|
||||
}
|
||||
<
|
||||
*cino-)*
|
||||
)N Vim searches for unclosed parentheses at most N lines away.
|
||||
This limits the time needed to search for parentheses. (default
|
||||
20 lines).
|
||||
|
||||
*cino-star*
|
||||
*N Vim searches for unclosed comments at most N lines away. This
|
||||
limits the time needed to search for the start of a comment.
|
||||
If your /* */ comments stop indenting afer N lines this is the
|
||||
value you will want to change.
|
||||
(default 70 lines).
|
||||
|
||||
*cino-#*
|
||||
#N When N is non-zero recognize shell/Perl comments, starting with
|
||||
'#'. Default N is zero: don't recognizes '#' comments. Note
|
||||
that lines starting with # will still be seen as preprocessor
|
||||
@@ -446,13 +536,14 @@ assume a 'shiftwidth' of 4.
|
||||
|
||||
|
||||
The defaults, spelled out in full, are:
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,c3,C0,
|
||||
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30,#0
|
||||
cinoptions=>s,e0,n0,f0,{0,}0,^0,L-1,:s,=s,l0,b0,gs,hs,N0,ps,ts,is,+s,
|
||||
c3,C0,/0,(2s,us,U0,w0,W0,m0,j0,J0,)20,*70,#0
|
||||
|
||||
Vim puts a line in column 1 if:
|
||||
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
|
||||
- It starts with a label (a keyword followed by ':', other than "case" and
|
||||
"default").
|
||||
"default") and 'cinoptions' does not contain an 'L' entry with a positive
|
||||
value.
|
||||
- Any combination of indentations causes the line to have less than 0
|
||||
indentation.
|
||||
|
||||
@@ -472,13 +563,15 @@ REMARKS ABOUT SPECIFIC INDENT FILES ~
|
||||
|
||||
FORTRAN *ft-fortran-indent*
|
||||
|
||||
Block if, select case, and where constructs are indented. Comments, labelled
|
||||
statements and continuation lines are indented if the Fortran is in free
|
||||
source form, whereas they are not indented if the Fortran is in fixed source
|
||||
form because of the left margin requirements. Hence manual indent corrections
|
||||
will be necessary for labelled statements and continuation lines when fixed
|
||||
source form is being used. For further discussion of the method used for the
|
||||
detection of source format see |ft-fortran-syntax|.
|
||||
Block if, select case, where, and forall constructs are indented. So are
|
||||
type, interface, associate, block, and enum constructs. The indenting of
|
||||
subroutines, functions, modules, and program blocks is optional. Comments,
|
||||
labelled statements and continuation lines are indented if the Fortran is in
|
||||
free source form, whereas they are not indented if the Fortran is in fixed
|
||||
source form because of the left margin requirements. Hence manual indent
|
||||
corrections will be necessary for labelled statements and continuation lines
|
||||
when fixed source form is being used. For further discussion of the method
|
||||
used for the detection of source format see |ft-fortran-syntax|.
|
||||
|
||||
Do loops ~
|
||||
All do loops are left unindented by default. Do loops can be unstructured in
|
||||
@@ -505,6 +598,20 @@ autocommand such as >
|
||||
to get do loops indented in .f90 files and left alone in Fortran files with
|
||||
other extensions such as .for.
|
||||
|
||||
Program units ~
|
||||
The indenting of program units (subroutines, functions, modules, and program
|
||||
blocks) is enabled by default but can be suppressed if a lighter, screen-width
|
||||
preserving indent style is desired. To suppress the indenting of program
|
||||
units for all fortran files set the global fortran_indent_less variable in
|
||||
your .vimrc as follows >
|
||||
|
||||
let fortran_indent_less=1
|
||||
|
||||
A finer level of suppression can be achieved by setting the corresponding
|
||||
buffer-local variable as follows >
|
||||
|
||||
let b:fortran_indent_less=1
|
||||
|
||||
|
||||
PHP *ft-php-indent* *php-indent* *php-indenting*
|
||||
|
||||
@@ -552,6 +659,10 @@ For example, with N = 1, this will give:
|
||||
(Notice the extra indent between the PHP container markers and the code)
|
||||
-------------
|
||||
|
||||
To indent PHP tags as the surrounding code: >
|
||||
:let g:PHP_outdentphpescape = 0
|
||||
-------------
|
||||
|
||||
To automatically remove '\r' characters when the 'fileformat' is set to Unix: >
|
||||
:let g:PHP_removeCRwhenUnix = 1
|
||||
-------------
|
||||
@@ -577,7 +688,7 @@ NOTE: Indenting will be a bit slower if this option is used because some
|
||||
To indent 'case:' and 'default:' statements in switch() blocks: >
|
||||
:let g:PHP_vintage_case_default_indent = 1
|
||||
|
||||
(By default they are indented at the same level than the 'switch()' to avoid
|
||||
(Since in PHP braces are not required inside 'case/default' blocks, by default they are indented at the same level than the 'switch()' to avoid
|
||||
unnecessary indentation)
|
||||
|
||||
|
||||
@@ -595,6 +706,43 @@ Indent for a continuation line: >
|
||||
let g:pyindent_continue = '&sw * 2'
|
||||
|
||||
|
||||
R *ft-r-indent*
|
||||
|
||||
Function arguments are aligned if they span for multiple lines. If you prefer
|
||||
do not have the arguments of functions aligned, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_align_args = 0
|
||||
<
|
||||
All lines beginning with a comment character, #, get the same indentation
|
||||
level of the normal R code. Users of Emacs/ESS may be used to have lines
|
||||
beginning with a single # indented in the 40th column, ## indented as R code,
|
||||
and ### not indented. If you prefer that lines beginning with comment
|
||||
characters are aligned as they are by Emacs/ESS, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_ess_comments = 1
|
||||
<
|
||||
If you prefer that lines beginning with a single # are aligned at a column
|
||||
different from the 40th one, you should set a new value to the variable
|
||||
r_indent_comment_column, as in the example below:
|
||||
>
|
||||
let r_indent_comment_column = 30
|
||||
<
|
||||
Any code after a line that ends with "<-" is indented. Emacs/ESS does not
|
||||
indent the code if it is a top level function. If you prefer that the
|
||||
Vim-R-plugin behaves like Emacs/ESS in this regard, put in your |vimrc|:
|
||||
>
|
||||
let r_indent_ess_compatible = 1
|
||||
<
|
||||
Below is an example of indentation with and without this option enabled:
|
||||
>
|
||||
### r_indent_ess_compatible = 1 ### r_indent_ess_compatible = 0
|
||||
foo <- foo <-
|
||||
function(x) function(x)
|
||||
{ {
|
||||
paste(x) paste(x)
|
||||
} }
|
||||
<
|
||||
|
||||
SHELL *ft-sh-indent*
|
||||
|
||||
The amount of indent applied under various circumstances in a shell file can
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*index.txt* For Vim version 7.2. Last change: 2009 Jul 01
|
||||
*index.txt* For Vim version 7.3. Last change: 2011 Aug 06
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -29,7 +29,7 @@ For a complete listing of all help items see |help-tags|.
|
||||
==============================================================================
|
||||
1. Insert mode *insert-index*
|
||||
|
||||
tag char action ~
|
||||
tag char action in Insert mode ~
|
||||
-----------------------------------------------------------------------
|
||||
|i_CTRL-@| CTRL-@ insert previously inserted text and stop
|
||||
insert
|
||||
@@ -102,7 +102,7 @@ tag char action ~
|
||||
|i_CTRL-^| CTRL-^ toggle use of |:lmap| mappings
|
||||
|i_CTRL-_| CTRL-_ When 'allowrevins' set: change language
|
||||
(Hebrew, Farsi) {only when compiled with
|
||||
+rightleft feature}
|
||||
the |+rightleft| feature}
|
||||
|
||||
<Space> to '~' not used, except '0' and '^' followed by
|
||||
CTRL-D
|
||||
@@ -136,10 +136,14 @@ tag char action ~
|
||||
|i_<Help>| <Help> stop insert mode and display help window
|
||||
|i_<Insert>| <Insert> toggle Insert/Replace mode
|
||||
|i_<LeftMouse>| <LeftMouse> cursor at mouse click
|
||||
|i_<MouseDown>| <MouseDown> scroll three lines downwards
|
||||
|i_<S-MouseDown>| <S-MouseDown> scroll a full page downwards
|
||||
|i_<MouseUp>| <MouseUp> scroll three lines upwards
|
||||
|i_<S-MouseUp>| <S-MouseUp> scroll a full page upwards
|
||||
|i_<ScrollWheelDown>| <ScrollWheelDown> move window three lines down
|
||||
|i_<S-ScrollWheelDown>| <S-ScrollWheelDown> move window one page down
|
||||
|i_<ScrollWheelUp>| <ScrollWheelUp> move window three lines up
|
||||
|i_<S-ScrollWheelUp>| <S-ScrollWheelUp> move window one page up
|
||||
|i_<ScrollWheelLeft>| <ScrollWheelLeft> move window six columns left
|
||||
|i_<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
|
||||
|i_<ScrollWheelRight>| <ScrollWheelRight> move window six columns right
|
||||
|i_<S-ScrollWheelRight>| <S-ScrollWheelRight> move window one page right
|
||||
|
||||
commands in CTRL-X submode *i_CTRL-X_index*
|
||||
|
||||
@@ -159,7 +163,7 @@ commands in CTRL-X submode *i_CTRL-X_index*
|
||||
|i_CTRL-X_CTRL-V| CTRL-X CTRL-V complete like in : command line
|
||||
|i_CTRL-X_CTRL-]| CTRL-X CTRL-] complete tags
|
||||
|i_CTRL-X_s| CTRL-X s spelling suggestions
|
||||
{not available when compiled without the +insert_expand feature}
|
||||
{not available when compiled without the |+insert_expand| feature}
|
||||
|
||||
==============================================================================
|
||||
2. Normal mode *normal-index*
|
||||
@@ -441,17 +445,21 @@ tag char note action in Normal mode ~
|
||||
|<S-Up>| <S-Up> 1 same as CTRL-B
|
||||
|<Undo>| <Undo> 2 same as "u"
|
||||
|<Up>| <Up> 1 same as "k"
|
||||
|<MouseDown>| <MouseDown> scroll three lines downwards
|
||||
|<S-MouseDown>| <S-MouseDown> scroll a full page downwards
|
||||
|<MouseUp>| <MouseUp> scroll three lines upwards
|
||||
|<S-MouseUp>| <S-MouseUp> scroll a full page upwards
|
||||
|<ScrollWheelDown>| <ScrollWheelDown> move window three lines down
|
||||
|<S-ScrollWheelDown>| <S-ScrollWheelDown> move window one page down
|
||||
|<ScrollWheelUp>| <ScrollWheelUp> move window three lines up
|
||||
|<S-ScrollWheelUp>| <S-ScrollWheelUp> move window one page up
|
||||
|<ScrollWheelLeft>| <ScrollWheelLeft> move window six columns left
|
||||
|<S-ScrollWheelLeft>| <S-ScrollWheelLeft> move window one page left
|
||||
|<ScrollWheelRight>| <ScrollWheelRight> move window six columns right
|
||||
|<S-ScrollWheelRight>| <S-ScrollWheelRight> move window one page right
|
||||
|
||||
==============================================================================
|
||||
2.1 Text objects *objects*
|
||||
|
||||
These can be used after an operator or in Visual mode to select an object.
|
||||
|
||||
tag command action in Normal mode ~
|
||||
tag command action in op-pending and Visual mode ~
|
||||
------------------------------------------------------------------------------
|
||||
|v_aquote| a" double quoted string
|
||||
|v_a'| a' single quoted string
|
||||
@@ -713,6 +721,7 @@ tag char note action in Normal mode ~
|
||||
|gJ| gJ 2 join lines without inserting space
|
||||
|gP| ["x]gP 2 put the text [from register x] before the
|
||||
cursor N times, leave the cursor after it
|
||||
|gQ| gQ switch to "Ex" mode with Vim editing
|
||||
|gR| gR 2 enter Virtual Replace mode
|
||||
|gU| gU{motion} 2 make Nmove text uppercase
|
||||
|gV| gV don't reselect the previous Visual area
|
||||
@@ -943,11 +952,13 @@ Normal characters are inserted at the current cursor position.
|
||||
"Completion" below refers to context-sensitive completion. It will complete
|
||||
file names, tags, commands etc. as appropriate.
|
||||
|
||||
tag command action in Command-line editing mode ~
|
||||
------------------------------------------------------------------------------
|
||||
CTRL-@ not used
|
||||
|c_CTRL-A| CTRL-A do completion on the pattern in front of the
|
||||
cursor and insert all matches
|
||||
|c_CTRL-B| CTRL-B cursor to begin of command-line
|
||||
|c_CTRL-C| CTRL-C same as <ESC>
|
||||
|c_CTRL-C| CTRL-C same as <Esc>
|
||||
|c_CTRL-D| CTRL-D list completions that match the pattern in
|
||||
front of the cursor
|
||||
|c_CTRL-E| CTRL-E cursor to end of command-line
|
||||
@@ -1038,6 +1049,8 @@ This is a brief but complete listing of all the ":" commands, without
|
||||
mentioning any arguments. The optional part of the command name is inside [].
|
||||
The commands are sorted on the non-optional part of their name.
|
||||
|
||||
tag command action ~
|
||||
------------------------------------------------------------------------------
|
||||
|:!| :! filter lines or execute an external command
|
||||
|:!!| :!! repeat last ":!" command
|
||||
|:#| :# same as ":number"
|
||||
@@ -1248,7 +1261,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:k| :k set a mark
|
||||
|:keepalt| :keepa[lt] following command keeps the alternate file
|
||||
|:keepmarks| :kee[pmarks] following command keeps marks where they are
|
||||
|:keepjumps| :keepj[jumps] following command keeps jumplist and marks
|
||||
|:keepjumps| :keepj[umps] following command keeps jumplist and marks
|
||||
|:lNext| :lN[ext] go to previous entry in location list
|
||||
|:lNfile| :lNf[ile] go to last entry in previous file
|
||||
|:list| :l[ist] print lines
|
||||
@@ -1299,6 +1312,9 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:ltag| :lt[ag] jump to tag and add matching tags to the
|
||||
location list
|
||||
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|
||||
|:lua| :lua execute |Lua| command
|
||||
|:luado| :luad[o] execute Lua command for each line
|
||||
|:luafile| :luaf[ile] execute |Lua| script file
|
||||
|:lvimgrep| :lv[imgrep] search for pattern in files
|
||||
|:lvimgrepadd| :lvimgrepa[dd] like :vimgrep, but append to current list
|
||||
|:lwindow| :lw[indow] open or close location window
|
||||
@@ -1321,7 +1337,9 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:mode| :mod[e] show or change the screen mode
|
||||
|:mzscheme| :mz[scheme] execute MzScheme command
|
||||
|:mzfile| :mzf[ile] execute MzScheme script file
|
||||
|:nbclose| :nbc[lose] close the current Netbeans session
|
||||
|:nbkey| :nb[key] pass a key to Netbeans
|
||||
|:nbstart| :nbs[art] start a new Netbeans session
|
||||
|:next| :n[ext] go to next file in the argument list
|
||||
|:new| :new create a new empty window
|
||||
|:nmap| :nm[ap] like ":map" but for Normal mode
|
||||
@@ -1350,6 +1368,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:options| :opt[ions] open the options-window
|
||||
|:ounmap| :ou[nmap] like ":unmap" but for Operator-pending mode
|
||||
|:ounmenu| :ounme[nu] remove menu for Operator-pending mode
|
||||
|:ownsyntax| :ow[nsyntax] set new local syntax highlight for this window
|
||||
|:pclose| :pc[lose] close preview window
|
||||
|:pedit| :ped[it] edit file in the preview window
|
||||
|:perl| :pe[rl] execute Perl command
|
||||
@@ -1376,6 +1395,9 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:ptselect| :pts[elect] |:tselect| and show tag in preview window
|
||||
|:put| :pu[t] insert contents of register in the text
|
||||
|:pwd| :pw[d] print current directory
|
||||
|:py3| :py3 execute Python 3 command
|
||||
|:python3| :python3 same as :py3
|
||||
|:py3file| :py3f[ile] execute Python 3 script file
|
||||
|:python| :py[thon] execute Python command
|
||||
|:pyfile| :pyf[ile] execute Python script file
|
||||
|:quit| :q[uit] quit current window (when one window quit Vim)
|
||||
@@ -1397,6 +1419,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:ruby| :rub[y] execute Ruby command
|
||||
|:rubydo| :rubyd[o] execute Ruby command for each line
|
||||
|:rubyfile| :rubyf[ile] execute Ruby script file
|
||||
|:rundo| :rund[o] read undo information from a file
|
||||
|:runtime| :ru[ntime] source vim scripts in 'runtimepath'
|
||||
|:rviminfo| :rv[iminfo] read from viminfo file
|
||||
|:substitute| :s[ubstitute] find and replace text
|
||||
@@ -1562,6 +1585,7 @@ The commands are sorted on the non-optional part of their name.
|
||||
|:wq| :wq write to a file and quit window or Vim
|
||||
|:wqall| :wqa[ll] write all changed buffers and quit Vim
|
||||
|:wsverb| :ws[verb] pass the verb to workshop over IPC
|
||||
|:wundo| :wu[ndo] write undo information to a file
|
||||
|:wviminfo| :wv[iminfo] write to viminfo file
|
||||
|:xit| :x[it] write if buffer changed and quit window or Vim
|
||||
|:xall| :xa[ll] same as ":wqall"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*insert.txt* For Vim version 7.2. Last change: 2009 Jul 14
|
||||
*insert.txt* For Vim version 7.3. Last change: 2012 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -359,10 +359,14 @@ CTRL-G CTRL-J cursor one line down, insert start column *i_CTRL-G_CTRL-J*
|
||||
<PageUp> move window one page up *i_<PageUp>*
|
||||
<S-Down> move window one page down *i_<S-Down>*
|
||||
<PageDown> move window one page down *i_<PageDown>*
|
||||
<MouseDown> scroll three lines down *i_<MouseDown>*
|
||||
<S-MouseDown> scroll a full page down *i_<S-MouseDown>*
|
||||
<MouseUp> scroll three lines up *i_<MouseUp>*
|
||||
<S-MouseUp> scroll a full page up *i_<S-MouseUp>*
|
||||
<ScrollWheelDown> move window three lines down *i_<ScrollWheelDown>*
|
||||
<S-ScrollWheelDown> move window one page down *i_<S-ScrollWheelDown>*
|
||||
<ScrollWheelUp> move window three lines up *i_<ScrollWheelUp>*
|
||||
<S-ScrollWheelUp> move window one page up *i_<S-ScrollWheelUp>*
|
||||
<ScrollWheelLeft> move window six columns left *i_<ScrollWheelLeft>*
|
||||
<S-ScrollWheelLeft> move window one page left *i_<S-ScrollWheelLeft>*
|
||||
<ScrollWheelRight> move window six columns right *i_<ScrollWheelRight>*
|
||||
<S-ScrollWheelRight> move window one page right *i_<S-ScrollWheelRight>*
|
||||
CTRL-O execute one command, return to Insert mode *i_CTRL-O*
|
||||
CTRL-\ CTRL-O like CTRL-O but don't move the cursor *i_CTRL-\_CTRL-O*
|
||||
CTRL-L when 'insertmode' is set: go to Normal mode *i_CTRL-L*
|
||||
@@ -378,6 +382,10 @@ mappings it's often better to use <Esc> (first put an "x" in the text, <Esc>
|
||||
will then always put the cursor on it). Or use CTRL-\ CTRL-O, but then
|
||||
beware of the cursor possibly being beyond the end of the line.
|
||||
|
||||
The CTRL-O command takes you to Normal mode. If you then use a command enter
|
||||
Insert mode again it doesn't nest. Thus when typing "a<C-O>a" and then <Esc>
|
||||
takes you back to Normal mode, you do not need to type <Esc> twice.
|
||||
|
||||
The shifted cursor keys are not available on all terminals.
|
||||
|
||||
Another side effect is that a count specified before the "i" or "a" command is
|
||||
@@ -523,7 +531,7 @@ last one). {Vi does not have the 'expandtab' option}
|
||||
6. Virtual Replace mode *vreplace-mode* *Virtual-Replace-mode*
|
||||
|
||||
Enter Virtual Replace mode with the "gR" command in normal mode.
|
||||
{not available when compiled without the +vreplace feature}
|
||||
{not available when compiled without the |+vreplace| feature}
|
||||
{Vi does not have Virtual Replace mode}
|
||||
|
||||
Virtual Replace mode is similar to Replace mode, but instead of replacing
|
||||
@@ -551,12 +559,11 @@ CTRL-D, 'expandtab', 'smarttab', 'softtabstop', etc.
|
||||
In 'list' mode, Virtual Replace mode acts as if it was not in 'list' mode,
|
||||
unless "L" is in 'cpoptions'.
|
||||
|
||||
Note that the only times characters beyond the cursor should appear to move
|
||||
are in 'list' mode, and occasionally when 'wrap' is set (and the line changes
|
||||
length to become shorter or wider than the width of the screen), or
|
||||
momentarily when typing over a CTRL character. A CTRL character takes up two
|
||||
screen spaces. When replacing it with two normal characters, the first will
|
||||
be inserted and the second will replace the CTRL character.
|
||||
Note that the only situations for which characters beyond the cursor should
|
||||
appear to move are in List mode |'list'|, and occasionally when 'wrap' is set
|
||||
(and the line changes length to become shorter or wider than the width of the
|
||||
screen). In other cases spaces may be inserted to avoid following characters
|
||||
to move.
|
||||
|
||||
This mode is very useful for editing <Tab> separated columns in tables, for
|
||||
entering new data while keeping all the columns aligned.
|
||||
@@ -639,6 +646,7 @@ completion operation: >
|
||||
return "\<Tab>"
|
||||
else
|
||||
return "\<C-N>"
|
||||
endif
|
||||
endfunction
|
||||
inoremap <Tab> <C-R>=CleverTab()<CR>
|
||||
|
||||
@@ -1002,7 +1010,8 @@ number between zero and the cursor column "col('.')". This involves looking
|
||||
at the characters just before the cursor and including those characters that
|
||||
could be part of the completed item. The text between this column and the
|
||||
cursor column will be replaced with the matches. Return -1 if no completion
|
||||
can be done.
|
||||
can be done, the completion will be cancelled with an error message. Return
|
||||
-2 to cancel silently.
|
||||
|
||||
On the second invocation the arguments are:
|
||||
a:findstart 0
|
||||
@@ -1012,6 +1021,21 @@ On the second invocation the arguments are:
|
||||
The function must return a List with the matching words. These matches
|
||||
usually include the "a:base" text. When there are no matches return an empty
|
||||
List.
|
||||
|
||||
In order to return more information than the matching words, return a Dict
|
||||
that contains the List. The Dict can have these items:
|
||||
words The List of matching words (mandatory).
|
||||
refresh A string to control re-invocation of the function
|
||||
(optional).
|
||||
The only value currently recognized is "always", the
|
||||
effect is that the function is called whenever the
|
||||
leading text is changed.
|
||||
Other items are ignored.
|
||||
|
||||
For example, the function can contain this: >
|
||||
let matches = ... list of words ...
|
||||
return {'words': matches, 'refresh': 'always'}
|
||||
<
|
||||
*complete-items*
|
||||
Each list item can either be a string or a Dictionary. When it is a string it
|
||||
is used as the completion. When it is a Dictionary it can contain these
|
||||
@@ -1029,17 +1053,21 @@ items:
|
||||
items that only differ in case are added
|
||||
dup when non-zero this match will be added even when an
|
||||
item with the same word is already present.
|
||||
empty when non-zero this match will be added even when it is
|
||||
an empty string
|
||||
|
||||
All of these except 'icase' must be a string. If an item does not meet these
|
||||
requirements then an error message is given and further items in the list are
|
||||
not used. You can mix string and Dictionary items in the returned list.
|
||||
All of these except 'icase', 'dup' and 'empty' must be a string. If an item
|
||||
does not meet these requirements then an error message is given and further
|
||||
items in the list are not used. You can mix string and Dictionary items in
|
||||
the returned list.
|
||||
|
||||
The "menu" item is used in the popup menu and may be truncated, thus it should
|
||||
be relatively short. The "info" item can be longer, it will be displayed in
|
||||
the preview window when "preview" appears in 'completeopt'. The "info" item
|
||||
will also remain displayed after the popup menu has been removed. This is
|
||||
useful for function arguments. Use a single space for "info" to remove
|
||||
existing text in the preview window.
|
||||
existing text in the preview window. The size of the preview window is three
|
||||
lines, but 'previewheight' is used when it has a value of 1 or 2.
|
||||
|
||||
The "kind" item uses a single letter to indicate the kind of completion. This
|
||||
may be used to show the completion differently (different color or icon).
|
||||
@@ -1055,9 +1083,9 @@ match to the total list. These matches should then not appear in the returned
|
||||
list! Call |complete_check()| now and then to allow the user to press a key
|
||||
while still searching for matches. Stop searching when it returns non-zero.
|
||||
|
||||
The function is allowed to move the cursor, it is restored afterwards. This
|
||||
option cannot be set from a |modeline| or in the |sandbox|, for security
|
||||
reasons.
|
||||
*E839* *E840*
|
||||
The function is allowed to move the cursor, it is restored afterwards.
|
||||
The function is not allowed to move to another window or delete text.
|
||||
|
||||
An example that completes the names of the months: >
|
||||
fun! CompleteMonths(findstart, base)
|
||||
@@ -1357,7 +1385,7 @@ Script completes:
|
||||
- function names with additional info:
|
||||
- in case of built-in functions list of possible arguments and after | type
|
||||
data returned by function
|
||||
- in case of user function arguments and name of file were function was
|
||||
- in case of user function arguments and name of file where function was
|
||||
defined (if it is not current file)
|
||||
|
||||
- constants names
|
||||
@@ -1445,8 +1473,8 @@ a look at the PHP filetype to see how this works.
|
||||
If you edit a file called, index.php, run the following command: >
|
||||
:syntax list
|
||||
|
||||
First thing you will notice is there are many different syntax groups. The
|
||||
PHP language can include elements from different languages like HTML,
|
||||
The first thing you will notice is that there are many different syntax groups.
|
||||
The PHP language can include elements from different languages like HTML,
|
||||
JavaScript and many more. The syntax plugin will only include syntax groups
|
||||
that begin with the filetype, "php", in this case. For example these syntax
|
||||
groups are included by default with the PHP: phpEnvVar, phpIntVar,
|
||||
@@ -1483,6 +1511,38 @@ on word characters. This can be controlled adding the following to your
|
||||
vimrc: >
|
||||
let g:omni_syntax_use_iskeyword = 0
|
||||
|
||||
For plugin developers, the plugin exposes a public function OmniSyntaxList.
|
||||
This function can be used to request a List of syntax items. When editing a
|
||||
SQL file (:e syntax.sql) you can use the ":syntax list" command to see the
|
||||
various groups and syntax items. For example: >
|
||||
syntax list
|
||||
|
||||
Yields data similar to this: >
|
||||
sqlOperator xxx some prior all like and any escape exists in is not
|
||||
or intersect minus between distinct
|
||||
links to Operator
|
||||
sqlType xxx varbit varchar nvarchar bigint int uniqueidentifier
|
||||
date money long tinyint unsigned xml text smalldate
|
||||
double datetime nchar smallint numeric time bit char
|
||||
varbinary binary smallmoney
|
||||
image float integer timestamp real decimal
|
||||
|
||||
There are two syntax groups listed here: sqlOperator and sqlType. To retrieve
|
||||
a List of syntax items you can call OmniSyntaxList a number of different
|
||||
ways. To retrieve all syntax items regardless of syntax group: >
|
||||
echo OmniSyntaxList( [] )
|
||||
|
||||
To retrieve only the syntax items for the sqlOperator syntax group: >
|
||||
echo OmniSyntaxList( ['sqlOperator'] )
|
||||
|
||||
To retrieve all syntax items for both the sqlOperator and sqlType groups: >
|
||||
echo OmniSyntaxList( ['sqlOperator', 'sqlType'] )
|
||||
|
||||
From within a plugin, you would typically assign the output to a List: >
|
||||
let myKeywords = []
|
||||
let myKeywords = OmniSyntaxList( ['sqlKeyword'] )
|
||||
|
||||
|
||||
|
||||
SQL *ft-sql-omni*
|
||||
|
||||
@@ -1730,6 +1790,11 @@ These two commands will keep on asking for lines, until you type a line
|
||||
containing only a ".". Watch out for lines starting with a backslash, see
|
||||
|line-continuation|.
|
||||
|
||||
When in Ex mode (see |-e|) a backslash at the end of the line can be used to
|
||||
insert a NUL character. To be able to have a line ending in a backslash use
|
||||
two backslashes. This means that the number of backslashes is halved, but
|
||||
only at the end of the line.
|
||||
|
||||
NOTE: These commands cannot be used with |:global| or |:vglobal|.
|
||||
":append" and ":insert" don't work properly in between ":if" and
|
||||
":endif", ":for" and ":endfor", ":while" and ":endwhile".
|
||||
@@ -1744,7 +1809,7 @@ NOTE: These commands cannot be used with |:global| or |:vglobal|.
|
||||
or script is finished.
|
||||
This command does not work from |:normal|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +ex_extra
|
||||
{not available when compiled without the |+ex_extra|
|
||||
feature}
|
||||
|
||||
*:stopi* *:stopinsert*
|
||||
@@ -1763,14 +1828,14 @@ NOTE: These commands cannot be used with |:global| or |:vglobal|.
|
||||
script that the replacement will only start after
|
||||
the function or script is finished.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +ex_extra
|
||||
{not available when compiled without the |+ex_extra|
|
||||
feature}
|
||||
|
||||
*:startgreplace*
|
||||
:startg[replace][!] Just like |:startreplace|, but use Virtual Replace
|
||||
mode, like with |gR|.
|
||||
{not in Vi}
|
||||
{not available when compiled without the +ex_extra
|
||||
{not available when compiled without the |+ex_extra|
|
||||
feature}
|
||||
|
||||
==============================================================================
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*intro.txt* For Vim version 7.2. Last change: 2009 Apr 21
|
||||
*intro.txt* For Vim version 7.3. Last change: 2011 May 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -135,8 +135,10 @@ http://www.vim.org/maillist.php
|
||||
|
||||
Bug reports: *bugs* *bug-reports* *bugreport.vim*
|
||||
|
||||
Send bug reports to: Vim bugs <bugs@vim.org>
|
||||
This is not a maillist but the message is redirected to the Vim maintainer.
|
||||
Send bug reports to: Vim Developers <vim_dev@vim.org>
|
||||
This is a maillist, many people will see the message. If you don't want that,
|
||||
e.g. because it is a security issue, send it to <bugs@vim.org>, this only goes
|
||||
to the Vim maintainer (that's Bram).
|
||||
Please be brief; all the time that is spent on answering mail is subtracted
|
||||
from the time that is spent on improving Vim! Always give a reproducible
|
||||
example and try to find out which settings or other things influence the
|
||||
@@ -194,6 +196,7 @@ patches, suggestions and giving feedback about what is good and bad in Vim.
|
||||
Vim would never have become what it is now, without the help of these people!
|
||||
|
||||
Ron Aaron Win32 GUI changes
|
||||
Mohsin Ahmed encryption
|
||||
Zoltan Arpadffy work on VMS port
|
||||
Tony Andrews Stevie
|
||||
Gert van Antwerpen changes for DJGPP on MS-DOS
|
||||
@@ -226,13 +229,13 @@ Vim would never have become what it is now, without the help of these people!
|
||||
David Leonard Port of Python extensions to Unix
|
||||
Avner Lottem Edit in right-to-left windows
|
||||
Flemming Madsen X11 client-server, various features and patches
|
||||
Microsoft Gave me a copy of DevStudio to compile Vim with
|
||||
Tony Mechelynck answers many user questions
|
||||
Paul Moore Python interface extensions, many patches
|
||||
Katsuhito Nagano Work on multi-byte versions
|
||||
Sung-Hyun Nam Work on multi-byte versions
|
||||
Vince Negri Win32 GUI and generic console enhancements
|
||||
Steve Oualline Author of the first Vim book |frombook|
|
||||
Dominique Pelle figuring out valgrind reports and fixes
|
||||
Dominique Pelle valgrind reports and many fixes
|
||||
A.Politz Many bug reports and some fixes
|
||||
George V. Reilly Win32 port, Win32 GUI start-off
|
||||
Stephen Riehm bug collector
|
||||
@@ -299,7 +302,7 @@ and <> are part of what you type, the context should make this clear.
|
||||
|
||||
[] Characters in square brackets are optional.
|
||||
|
||||
*count* *[count]* *E489*
|
||||
*count* *[count]*
|
||||
[count] An optional number that may precede the command to multiply
|
||||
or iterate the command. If no number is given, a count of one
|
||||
is used, unless otherwise noted. Note that in this manual the
|
||||
@@ -615,7 +618,6 @@ Replace <Esc> -- -- <Insert> -- --
|
||||
Command-line *3 -- -- :start -- --
|
||||
Ex :vi -- -- -- -- --
|
||||
|
||||
- NA
|
||||
-- not possible
|
||||
|
||||
*1 Go from Normal mode to Insert mode by giving the command "i", "I", "a",
|
||||
@@ -702,7 +704,7 @@ Lines longer than the window width will wrap, unless the 'wrap' option is off
|
||||
(see below). The 'linebreak' option can be set to wrap at a blank character.
|
||||
|
||||
If the window has room after the last line of the buffer, Vim will show '~' in
|
||||
the first column of the last lines in the window, like this: >
|
||||
the first column of the last lines in the window, like this:
|
||||
|
||||
+-----------------------+
|
||||
|some line |
|
||||
@@ -714,7 +716,7 @@ the first column of the last lines in the window, like this: >
|
||||
Thus the '~' lines indicate that the end of the buffer was reached.
|
||||
|
||||
If the last line in a window doesn't fit, Vim will indicate this with a '@' in
|
||||
the first column of the last lines in the window, like this: >
|
||||
the first column of the last lines in the window, like this:
|
||||
|
||||
+-----------------------+
|
||||
|first line |
|
||||
@@ -729,7 +731,7 @@ window.
|
||||
When the "lastline" flag is present in the 'display' option, you will not see
|
||||
'@' characters at the left side of window. If the last line doesn't fit
|
||||
completely, only the part that fits is shown, and the last three characters of
|
||||
the last line are replaced with "@@@", like this: >
|
||||
the last line are replaced with "@@@", like this:
|
||||
|
||||
+-----------------------+
|
||||
|first line |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*map.txt* For Vim version 7.2. Last change: 2009 Nov 04
|
||||
*map.txt* For Vim version 7.3. Last change: 2012 Feb 02
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -107,6 +107,8 @@ modes.
|
||||
:cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
|
||||
Remove ALL mappings for the modes where the map
|
||||
command applies. {not in Vi}
|
||||
Use the <buffer> argument to remove buffer-local
|
||||
mappings |:map-<buffer>|
|
||||
Warning: This also removes the default mappings.
|
||||
|
||||
:map |mapmode-nvo|
|
||||
@@ -226,7 +228,7 @@ text before the cursor and start omni completion when some condition is met.
|
||||
|
||||
For abbreviations |v:char| is set to the character that was typed to trigger
|
||||
the abbreviation. You can use this to decide how to expand the {lhs}. You
|
||||
can't change v:char and you should not insert it.
|
||||
should not either insert or change the v:char.
|
||||
|
||||
Be very careful about side effects! The expression is evaluated while
|
||||
obtaining characters, you may very well make the command dysfunctional.
|
||||
@@ -235,11 +237,18 @@ For this reason the following is blocked:
|
||||
- Editing another buffer.
|
||||
- The |:normal| command.
|
||||
- Moving the cursor is allowed, but it is restored afterwards.
|
||||
- You can use getchar(), but the existing typeahead isn't seen and new
|
||||
typeahead is discarded.
|
||||
If you want the mapping to do any of these let the returned characters do
|
||||
that.
|
||||
|
||||
You can use getchar(), it consumes typeahead if there is any. E.g., if you
|
||||
have these mappings: >
|
||||
inoremap <expr> <C-L> nr2char(getchar())
|
||||
inoremap <expr> <C-L>x "foo"
|
||||
If you now type CTRL-L nothing happens yet, Vim needs the next character to
|
||||
decide what mapping to use. If you type 'x' the second mapping is used and
|
||||
"foo" is inserted. If you type any other key the first mapping is used,
|
||||
getchar() gets the typed key and returns it.
|
||||
|
||||
Here is an example that inserts a list number that increases: >
|
||||
let counter = 0
|
||||
inoremap <expr> <C-L> ListItem()
|
||||
@@ -480,9 +489,9 @@ You can create an empty {rhs} by typing nothing after a single CTRL-V (you
|
||||
have to type CTRL-V two times). Unfortunately, you cannot do this in a vimrc
|
||||
file.
|
||||
*<Nop>*
|
||||
A easier way to get a mapping that doesn't produce anything, is to use "<Nop>"
|
||||
for the {rhs}. This only works when the |<>| notation is enabled. For
|
||||
example, to make sure that function key 8 does nothing at all: >
|
||||
An easier way to get a mapping that doesn't produce anything, is to use
|
||||
"<Nop>" for the {rhs}. This only works when the |<>| notation is enabled.
|
||||
For example, to make sure that function key 8 does nothing at all: >
|
||||
:map <F8> <Nop>
|
||||
:map! <F8> <Nop>
|
||||
<
|
||||
@@ -495,7 +504,7 @@ scenario: >
|
||||
:set encoding=utf-8
|
||||
The mapping for <M-C> is defined with the latin1 encoding, resulting in a 0xc3
|
||||
byte. If you type the character <20> (0xe1 <M-a>) in UTF-8 encoding this is the
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then,
|
||||
two bytes 0xc3 0xa1. You don't want the 0xc3 byte to be mapped then or
|
||||
otherwise it would be impossible to type the <20> character.
|
||||
|
||||
*<Leader>* *mapleader*
|
||||
@@ -518,7 +527,7 @@ mappings.
|
||||
<LocalLeader> is just like <Leader>, except that it uses "maplocalleader"
|
||||
instead of "mapleader". <LocalLeader> is to be used for mappings which are
|
||||
local to a buffer. Example: >
|
||||
:map <LocalLeader>q \DoItNow
|
||||
:map <buffer> <LocalLeader>A oanother line<Esc>
|
||||
<
|
||||
In a global plugin <Leader> should be used and in a filetype plugin
|
||||
<LocalLeader>. "mapleader" and "maplocalleader" can be equal. Although, if
|
||||
@@ -542,6 +551,7 @@ construct can be used:
|
||||
<Char-123> character 123
|
||||
<Char-033> character 27
|
||||
<Char-0x7f> character 127
|
||||
<S-Char-114> character 114 ('r') shifted ('R')
|
||||
This is useful to specify a (multi-byte) character in a 'keymap' file.
|
||||
Upper and lowercase differences are ignored.
|
||||
|
||||
@@ -594,7 +604,7 @@ otherwise you would not be able to use those commands anymore. Here are a few
|
||||
suggestions:
|
||||
- Function keys <F2>, <F3>, etc.. Also the shifted function keys <S-F1>,
|
||||
<S-F2>, etc. Note that <F1> is already used for the help command.
|
||||
- Meta-keys (with the ALT key pressed). Depending on your keybord accented
|
||||
- Meta-keys (with the ALT key pressed). Depending on your keyboard accented
|
||||
characters may be used as well. |:map-alt-keys|
|
||||
- Use the '_' or ',' character and then any other character. The "_" and ","
|
||||
commands do exist in Vim (see |_| and |,|), but you probably never use them.
|
||||
@@ -767,10 +777,10 @@ g@{motion} Call the function set by the 'operatorfunc' option.
|
||||
The function is called with one String argument:
|
||||
"line" {motion} was |linewise|
|
||||
"char" {motion} was |characterwise|
|
||||
"block" {motion} was |blockwise-visual||
|
||||
"block" {motion} was |blockwise-visual|
|
||||
Although "block" would rarely appear, since it can
|
||||
only result from Visual mode where "g@" is not useful.
|
||||
{not available when compiled without the +eval
|
||||
{not available when compiled without the |+eval|
|
||||
feature}
|
||||
|
||||
Here is an example that counts the number of spaces with <F4>: >
|
||||
@@ -934,11 +944,12 @@ See |:verbose-cmd| for more information.
|
||||
avoid that a typed {lhs} is expanded, since
|
||||
command-line abbreviations apply here.
|
||||
|
||||
:ab[breviate] [<expr>] {lhs} {rhs}
|
||||
:ab[breviate] [<expr>] [<buffer>] {lhs} {rhs}
|
||||
add abbreviation for {lhs} to {rhs}. If {lhs} already
|
||||
existed it is replaced with the new {rhs}. {rhs} may
|
||||
contain spaces.
|
||||
See |:map-<expr>| for the optional <expr> argument.
|
||||
See |:map-<buffer>| for the optional <buffer> argument.
|
||||
|
||||
*:una* *:unabbreviate*
|
||||
:una[bbreviate] {lhs} Remove abbreviation for {lhs} from the list. If none
|
||||
@@ -948,12 +959,12 @@ See |:verbose-cmd| for more information.
|
||||
expansion insert a CTRL-V (type it twice).
|
||||
|
||||
*:norea* *:noreabbrev*
|
||||
:norea[bbrev] [<expr>] [lhs] [rhs]
|
||||
:norea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but no remapping for this {rhs} {not
|
||||
in Vi}
|
||||
|
||||
*:ca* *:cabbrev*
|
||||
:ca[bbrev] [<expr>] [lhs] [rhs]
|
||||
:ca[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Command-line mode only. {not
|
||||
in Vi}
|
||||
|
||||
@@ -962,12 +973,12 @@ See |:verbose-cmd| for more information.
|
||||
in Vi}
|
||||
|
||||
*:cnorea* *:cnoreabbrev*
|
||||
:cnorea[bbrev] [<expr>] [lhs] [rhs]
|
||||
:cnorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Command-line mode only and no
|
||||
remapping for this {rhs} {not in Vi}
|
||||
|
||||
*:ia* *:iabbrev*
|
||||
:ia[bbrev] [<expr>] [lhs] [rhs]
|
||||
:ia[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Insert mode only. {not in Vi}
|
||||
|
||||
*:iuna* *:iunabbrev*
|
||||
@@ -975,18 +986,18 @@ See |:verbose-cmd| for more information.
|
||||
Vi}
|
||||
|
||||
*:inorea* *:inoreabbrev*
|
||||
:inorea[bbrev] [<expr>] [lhs] [rhs]
|
||||
:inorea[bbrev] [<expr>] [<buffer>] [lhs] [rhs]
|
||||
same as ":ab", but for Insert mode only and no
|
||||
remapping for this {rhs} {not in Vi}
|
||||
|
||||
*:abc* *:abclear*
|
||||
:abc[lear] Remove all abbreviations. {not in Vi}
|
||||
:abc[lear] [<buffer>] Remove all abbreviations. {not in Vi}
|
||||
|
||||
*:iabc* *:iabclear*
|
||||
:iabc[lear] Remove all abbreviations for Insert mode. {not in Vi}
|
||||
:iabc[lear] [<buffer>] Remove all abbreviations for Insert mode. {not in Vi}
|
||||
|
||||
*:cabc* *:cabclear*
|
||||
:cabc[lear] Remove all abbreviations for Command-line mode. {not
|
||||
:cabc[lear] [<buffer>] Remove all abbreviations for Command-line mode. {not
|
||||
in Vi}
|
||||
|
||||
*using_CTRL-V*
|
||||
@@ -1080,7 +1091,7 @@ to find out what they are defined to.
|
||||
The |:scriptnames| command can be used to see which scripts have been sourced
|
||||
and what their <SNR> number is.
|
||||
|
||||
This is all {not in Vi} and {not available when compiled without the +eval
|
||||
This is all {not in Vi} and {not available when compiled without the |+eval|
|
||||
feature}.
|
||||
|
||||
==============================================================================
|
||||
@@ -1093,16 +1104,20 @@ is executed, it is transformed into a normal Ex command and then executed.
|
||||
|
||||
For starters: See section |40.2| in the user manual.
|
||||
|
||||
*E183* *user-cmd-ambiguous*
|
||||
*E183* *E841* *user-cmd-ambiguous*
|
||||
All user defined commands must start with an uppercase letter, to avoid
|
||||
confusion with builtin commands. (There are a few builtin commands, notably
|
||||
:Next, :Print and :X, which do start with an uppercase letter. The builtin
|
||||
will always take precedence in these cases). The other characters of the user
|
||||
command can be uppercase letters, lowercase letters or digits. When using
|
||||
digits, note that other commands that take a numeric argument may become
|
||||
ambiguous. For example, the command ":Cc2" could be the user command ":Cc2"
|
||||
without an argument, or the command ":Cc" with argument "2". It is advised to
|
||||
put a space between the command name and the argument to avoid these problems.
|
||||
confusion with builtin commands. Exceptions are these builtin commands:
|
||||
:Next
|
||||
:X
|
||||
They cannot be used for a user defined command. ":Print" is also an existing
|
||||
command, but it is deprecated and can be overruled.
|
||||
|
||||
The other characters of the user command can be uppercase letters, lowercase
|
||||
letters or digits. When using digits, note that other commands that take a
|
||||
numeric argument may become ambiguous. For example, the command ":Cc2" could
|
||||
be the user command ":Cc2" without an argument, or the command ":Cc" with
|
||||
argument "2". It is advised to put a space between the command name and the
|
||||
argument to avoid these problems.
|
||||
|
||||
When using a user-defined command, the command can be abbreviated. However, if
|
||||
an abbreviation is not unique, an error will be issued. Furthermore, a
|
||||
@@ -1173,13 +1188,15 @@ reported if any are supplied). However, it is possible to specify that the
|
||||
command can take arguments, using the -nargs attribute. Valid cases are:
|
||||
|
||||
-nargs=0 No arguments are allowed (the default)
|
||||
-nargs=1 Exactly one argument is required
|
||||
-nargs=* Any number of arguments are allowed (0, 1, or many)
|
||||
-nargs=1 Exactly one argument is require, it includes spaces
|
||||
-nargs=* Any number of arguments are allowed (0, 1, or many),
|
||||
separated by white space
|
||||
-nargs=? 0 or 1 arguments are allowed
|
||||
-nargs=+ Arguments must be supplied, but any number are allowed
|
||||
|
||||
Arguments are considered to be separated by (unescaped) spaces or tabs in this
|
||||
context.
|
||||
context, except when there is one argument, then the white space is part of
|
||||
the argument.
|
||||
|
||||
Note that arguments are used as text, not as expressions. Specifically,
|
||||
"s:var" will use the script-local variable in the script where the command was
|
||||
@@ -1202,19 +1219,27 @@ completion can be enabled:
|
||||
|
||||
-complete=augroup autocmd groups
|
||||
-complete=buffer buffer names
|
||||
-complete=color color schemes
|
||||
-complete=command Ex command (and arguments)
|
||||
-complete=compiler compilers
|
||||
-complete=cscope |:cscope| suboptions
|
||||
-complete=dir directory names
|
||||
-complete=environment environment variable names
|
||||
-complete=event autocommand events
|
||||
-complete=expression Vim expression
|
||||
-complete=file file and directory names
|
||||
-complete=shellcmd Shell command
|
||||
-complete=file_in_path file and directory names in |'path'|
|
||||
-complete=filetype filetype names |'filetype'|
|
||||
-complete=function function name
|
||||
-complete=help help subjects
|
||||
-complete=highlight highlight groups
|
||||
-complete=locale locale names (as output of locale -a)
|
||||
-complete=mapping mapping name
|
||||
-complete=menu menus
|
||||
-complete=option options
|
||||
-complete=shellcmd Shell command
|
||||
-complete=sign |:sign| suboptions
|
||||
-complete=syntax syntax file names |'syntax'|
|
||||
-complete=tag tags
|
||||
-complete=tag_listfiles tags, file names are shown when CTRL-D is hit
|
||||
-complete=var user variables
|
||||
@@ -1266,6 +1291,8 @@ the 'path' option: >
|
||||
: return split(globpath(&path, a:A), "\n")
|
||||
:endfun
|
||||
<
|
||||
This example does not work for file names with spaces!
|
||||
|
||||
|
||||
Range handling *E177* *E178* *:command-range*
|
||||
*:command-count*
|
||||
@@ -1281,7 +1308,8 @@ Possible attributes are:
|
||||
-range Range allowed, default is current line
|
||||
-range=% Range allowed, default is whole file (1,$)
|
||||
-range=N A count (default N) which is specified in the line
|
||||
number position (like |:split|)
|
||||
number position (like |:split|); allows for zero line
|
||||
number.
|
||||
-count=N A count (default N) which is specified either in the line
|
||||
number position, or as an initial argument (like |:Next|).
|
||||
Specifying -count (without a default) acts like -count=0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mbyte.txt* For Vim version 7.2. Last change: 2009 Nov 17
|
||||
*mbyte.txt* For Vim version 7.3. Last change: 2012 Feb 29
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar et al.
|
||||
@@ -14,7 +14,7 @@ For an introduction to the most common features, see |usr_45.txt| in the user
|
||||
manual.
|
||||
For changing the language of messages and menus see |mlang.txt|.
|
||||
|
||||
{not available when compiled without the +multi_byte feature}
|
||||
{not available when compiled without the |+multi_byte| feature}
|
||||
|
||||
|
||||
1. Getting started |mbyte-first|
|
||||
@@ -280,7 +280,7 @@ Note that all encodings must use ASCII for the characters up to 128 (except
|
||||
when compiled for EBCDIC).
|
||||
|
||||
Supported 'encoding' values are: *encoding-values*
|
||||
1 latin1 8-bit characters (ISO 8859-1)
|
||||
1 latin1 8-bit characters (ISO 8859-1, also used for cp1252)
|
||||
1 iso-8859-n ISO_8859 variant (n = 2 to 15)
|
||||
1 koi8-r Russian
|
||||
1 koi8-u Ukrainian
|
||||
@@ -336,7 +336,11 @@ For MS-Windows "cp{number}" means using codepage {number}.
|
||||
Examples: >
|
||||
:set encoding=8bit-cp1252
|
||||
:set encoding=2byte-cp932
|
||||
<
|
||||
|
||||
The MS-Windows codepage 1252 is very similar to latin1. For practical reasons
|
||||
the same encoding is used and it's called latin1. 'isprint' can be used to
|
||||
display the characters 0x80 - 0xA0 or not.
|
||||
|
||||
Several aliases can be used, they are translated to one of the names above.
|
||||
An incomplete list:
|
||||
|
||||
@@ -753,7 +757,7 @@ Then add a command to your |gvimrc| file to set 'guifont': >
|
||||
|
||||
X INPUT METHOD (XIM) BACKGROUND *XIM* *xim* *x-input-method*
|
||||
|
||||
XIM is an international input module for X. There are two kind of structures,
|
||||
XIM is an international input module for X. There are two kinds of structures,
|
||||
Xlib unit type and |IM-server| (Input-Method server) type. |IM-server| type
|
||||
is suitable for complex input, such as CJK.
|
||||
|
||||
@@ -775,7 +779,7 @@ is suitable for complex input, such as CJK.
|
||||
For Chinese, there's a great XIM server named "xcin", you can input both
|
||||
Traditional and Simplified Chinese characters. And it can accept other
|
||||
locale if you make a correct input table. Xcin can be found at:
|
||||
http://xcin.linux.org.tw/
|
||||
http://cle.linux.org.tw/xcin/
|
||||
Others are scim: http://scim.freedesktop.org/ and fcitx:
|
||||
http://www.fcitx.org/
|
||||
|
||||
@@ -793,8 +797,8 @@ is suitable for complex input, such as CJK.
|
||||
number of Hira-gana characters are 76. So, first, we pre-input text as
|
||||
pronounced in Hira-gana, second, we convert Hira-gana to Kanji or Kata-Kana,
|
||||
if needed. There are some Kana-Kanji conversion server: jserver
|
||||
(distributed with Wnn, see below) and canna. Canna could be found at:
|
||||
ftp://ftp.nec.co.jp/pub/Canna/ (no longer works).
|
||||
(distributed with Wnn, see below) and canna. Canna can be found at:
|
||||
http://canna.sourceforge.jp/
|
||||
|
||||
There is a good input system: Wnn4.2. Wnn 4.2 contains,
|
||||
xwnmo (|IM-server|)
|
||||
@@ -826,7 +830,7 @@ Use the RPM or port for your system.
|
||||
of Preedit Area and Status Area: |OnTheSpot|, |OffTheSpot|, |OverTheSpot|
|
||||
and |Root|.
|
||||
|
||||
Currently, GUI Vim support three style, |OverTheSpot|, |OffTheSpot| and
|
||||
Currently, GUI Vim supports three styles, |OverTheSpot|, |OffTheSpot| and
|
||||
|Root|.
|
||||
|
||||
*. on-the-spot *OnTheSpot*
|
||||
@@ -853,7 +857,7 @@ Use the RPM or port for your system.
|
||||
|
||||
|
||||
USING XIM *multibyte-input* *E284* *E286* *E287* *E288*
|
||||
*E285* *E291* *E292* *E290* *E289*
|
||||
*E285* *E289*
|
||||
|
||||
Note that Display and Input are independent. It is possible to see your
|
||||
language even though you have no input method for it. But when your Display
|
||||
@@ -928,7 +932,7 @@ See 'imactivatekey' for the format.
|
||||
|
||||
{only works Windows GUI and compiled with the |+multi_byte_ime| feature}
|
||||
|
||||
To input multibyte characters on Windows, you have to use Input Method Editor
|
||||
To input multibyte characters on Windows, you can use an Input Method Editor
|
||||
(IME). In process of your editing text, you must switch status (on/off) of
|
||||
IME many many many times. Because IME with status on is hooking all of your
|
||||
key inputs, you cannot input 'j', 'k', or almost all of keys to Vim directly.
|
||||
@@ -947,7 +951,7 @@ the different input methods or disable them temporarily.
|
||||
WHAT IS IME
|
||||
IME is a part of East asian version Windows. That helps you to input
|
||||
multibyte character. English and other language version Windows does not
|
||||
have any IME. (Also there are no need usually.) But there is one that
|
||||
have any IME. (Also there is no need usually.) But there is one that
|
||||
called Microsoft Global IME. Global IME is a part of Internet Explorer
|
||||
4.0 or above. You can get more information about Global IME, at below
|
||||
URL.
|
||||
@@ -963,10 +967,10 @@ WHAT IS GLOBAL IME *global-ime*
|
||||
language version of Global IME at same place.
|
||||
|
||||
- Global IME detailed information.
|
||||
http://www.microsoft.com/windows/ie/features/ime.asp
|
||||
http://search.microsoft.com/results.aspx?q=global+ime
|
||||
|
||||
- Active Input Method Manager (Global IME)
|
||||
http://msdn.microsoft.com/workshop/misc/AIMM/aimm.asp
|
||||
http://msdn.microsoft.com/en-us/library/aa741221(v=VS.85).aspx
|
||||
|
||||
Support for Global IME is an experimental feature.
|
||||
|
||||
@@ -1267,8 +1271,8 @@ is no longer relevant in the GTK+ 2 GUI.
|
||||
When reading a file a BOM (Byte Order Mark) can be used to recognize the
|
||||
Unicode encoding:
|
||||
EF BB BF utf-8
|
||||
FF FE utf-16 big endian
|
||||
FE FF utf-16 little endian
|
||||
FE FF utf-16 big endian
|
||||
FF FE utf-16 little endian
|
||||
00 00 FE FF utf-32 big endian
|
||||
FF FE 00 00 utf-32 little endian
|
||||
|
||||
@@ -1302,8 +1306,8 @@ character. However, search patterns may not match on an overlong sequence.
|
||||
character.) An exception is NUL (zero) which is displayed as "<00>".
|
||||
|
||||
In the file and buffer the full range of Unicode characters can be used (31
|
||||
bits). However, displaying only works for 16 bit characters, and only for the
|
||||
characters present in the selected font.
|
||||
bits). However, displaying only works for the characters present in the
|
||||
selected font.
|
||||
|
||||
Useful commands:
|
||||
- "ga" shows the decimal, hexadecimal and octal value of the character under
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*message.txt* For Vim version 7.2. Last change: 2009 Oct 28
|
||||
*message.txt* For Vim version 7.3. Last change: 2011 May 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -19,7 +19,7 @@ The ":messages" command can be used to view previously given messages. This
|
||||
is especially useful when messages have been overwritten or truncated. This
|
||||
depends on the 'shortmess' option.
|
||||
|
||||
The number of remembered messages is fixed at 20 for the tiny version and 100
|
||||
The number of remembered messages is fixed at 20 for the tiny version and 200
|
||||
for other versions.
|
||||
|
||||
*g<*
|
||||
@@ -27,8 +27,8 @@ The "g<" command can be used to see the last page of previous command output.
|
||||
This is especially useful if you accidentally typed <Space> at the hit-enter
|
||||
prompt. You are then back at the hit-enter prompt and can then scroll further
|
||||
back.
|
||||
Note: when you stopped the output with "q" at the more prompt only up to that
|
||||
point will be displayed.
|
||||
Note: If the output has been stopped with "q" at the more prompt, it will only
|
||||
be displayed up to this point.
|
||||
The previous command output is cleared when another command produces output.
|
||||
|
||||
If you are using translated messages, the first printed line tells who
|
||||
@@ -65,14 +65,14 @@ or view a list of recent messages with: >
|
||||
LIST OF MESSAGES
|
||||
*E222* *E228* *E232* *E256* *E293* *E298* *E304* *E317*
|
||||
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
|
||||
*E323* *E341* *E473* *E570* *E685* >
|
||||
*E323* *E341* *E473* *E570* *E685* >
|
||||
Add to read buffer
|
||||
makemap: Illegal mode
|
||||
Cannot create BalloonEval with both message and callback
|
||||
Hangul automata ERROR
|
||||
block was not locked
|
||||
Didn't get block nr {N}?
|
||||
ml_timestamp: Didn't get block 0??
|
||||
ml_upd_block0(): Didn't get block 0??
|
||||
pointer block id wrong {N}
|
||||
Updated too many blocks?
|
||||
get_varp ERROR
|
||||
@@ -128,7 +128,6 @@ The color name {name} is unknown. See |gui-colors| for a list of colors that
|
||||
are available on most systems.
|
||||
|
||||
*E458* >
|
||||
Cannot allocate colormap entry for "xxxx"
|
||||
Cannot allocate colormap entry, some colors may be incorrect
|
||||
|
||||
This means that there are not enough colors available for Vim. It will still
|
||||
@@ -180,7 +179,7 @@ manually delete the link or the file, or change the permissions so that Vim
|
||||
can overwrite.
|
||||
|
||||
*E46* >
|
||||
Cannot set read-only variable "{name}"
|
||||
Cannot change read-only variable "{name}"
|
||||
|
||||
You are trying to assign a value to an argument of a function |a:var| or a Vim
|
||||
internal variable |v:var| which is read-only.
|
||||
@@ -279,8 +278,8 @@ Writing a file was not completed successfully. The file is probably
|
||||
incomplete.
|
||||
|
||||
*E13* *E189* >
|
||||
File exists (use ! to override)
|
||||
"{filename}" exists (use ! to override)
|
||||
File exists (add ! to override)
|
||||
"{filename}" exists (add ! to override)
|
||||
|
||||
You are protected from accidentally overwriting a file. When you want to
|
||||
write anyway, use the same command, but add a "!" just after the command.
|
||||
@@ -349,7 +348,7 @@ the other way around. It should be used like this: {foo,bar}. This matches
|
||||
"foo" and "bar".
|
||||
|
||||
*E315* >
|
||||
ml_get: invalid lnum:
|
||||
ml_get: invalid lnum: {number}
|
||||
|
||||
This is an internal Vim error. Please try to find out how it can be
|
||||
reproduced, and submit a bug report |bugreport.vim|.
|
||||
@@ -420,8 +419,8 @@ mapping. All variations of this command give the same message: ":cunmap",
|
||||
|:map-<buffer>|
|
||||
|
||||
*E37* *E89* >
|
||||
No write since last change (use ! to override)
|
||||
No write since last change for buffer {N} (use ! to override)
|
||||
No write since last change (add ! to override)
|
||||
No write since last change for buffer {N} (add ! to override)
|
||||
|
||||
You are trying to |abandon| a file that has changes. Vim protects you from
|
||||
losing your work. You can either write the changed file with ":w", or, if you
|
||||
@@ -468,16 +467,27 @@ Oh, oh. You must have been doing something complicated, or some other program
|
||||
is consuming your memory. Be careful! Vim is not completely prepared for an
|
||||
out-of-memory situation. First make sure that any changes are saved. Then
|
||||
try to solve the memory shortage. To stay on the safe side, exit Vim and
|
||||
start again. Also see |msdos-limitations|.
|
||||
start again.
|
||||
|
||||
Buffers are only partly kept in memory, thus editing a very large file is
|
||||
unlikely to cause an out-of-memory situation. Undo information is completely
|
||||
in memory, you can reduce that with these options:
|
||||
- 'undolevels' Set to a low value, or to -1 to disable undo completely. This
|
||||
helps for a change that affects all lines.
|
||||
- 'undoreload' Set to zero to disable.
|
||||
|
||||
Also see |msdos-limitations|.
|
||||
|
||||
*E339* >
|
||||
Pattern too long
|
||||
|
||||
This only happens on systems with 16 bit ints: The compiled regexp pattern is
|
||||
This happens on systems with 16 bit ints: The compiled regexp pattern is
|
||||
longer than about 65000 characters. Try using a shorter pattern.
|
||||
It also happens when the offset of a rule doesn't fit in the space available.
|
||||
Try simplifying the pattern.
|
||||
|
||||
*E45* >
|
||||
'readonly' option is set (use ! to override)
|
||||
'readonly' option is set (add ! to override)
|
||||
|
||||
You are trying to write a file that was marked as read-only. To write the
|
||||
file anyway, either reset the 'readonly' option, or add a '!' character just
|
||||
@@ -539,7 +549,7 @@ Vim (and Vi) expect tags files to be sorted in ASCII order. Binary searching
|
||||
can then be used, which is a lot faster than a linear search. If your tags
|
||||
files are not properly sorted, reset the |'tagbsearch'| option.
|
||||
This message is only given when Vim detects a problem when searching for a
|
||||
tag. Sometimes this message is not given, even thought the tags file is not
|
||||
tag. Sometimes this message is not given, even though the tags file is not
|
||||
properly sorted.
|
||||
|
||||
*E460* >
|
||||
@@ -586,6 +596,7 @@ when using ":w"), therefore Vim requires using a ! after the command, e.g.:
|
||||
Messages like this appear when starting up. This is not a Vim problem, your
|
||||
X11 configuration is wrong. You can find a hint on how to solve this here:
|
||||
http://groups.yahoo.com/group/solarisonintel/message/12179.
|
||||
[this URL is no longer valid]
|
||||
|
||||
*W10* >
|
||||
Warning: Changing a readonly file
|
||||
@@ -641,7 +652,7 @@ bit to be reset. It should be safe to reload the file. Set 'autoread' to
|
||||
automatically reload the file.
|
||||
|
||||
*E211* >
|
||||
Warning: File "{filename}" no longer available
|
||||
File "{filename}" no longer available
|
||||
|
||||
The file which you have started editing has disappeared, or is no longer
|
||||
accessible. Make sure you write the buffer somewhere to avoid losing
|
||||
@@ -688,6 +699,7 @@ no argument has been specified.
|
||||
|
||||
*E474* *E475* >
|
||||
Invalid argument
|
||||
Invalid argument: {arg}
|
||||
|
||||
An Ex command has been executed, but an invalid argument has been specified.
|
||||
|
||||
@@ -715,8 +727,8 @@ A range was specified for an Ex command that doesn't permit one. See
|
||||
Vim cannot create a temporary file.
|
||||
|
||||
*E484* *E485* >
|
||||
Can't open file %s"
|
||||
Can't read file %s"
|
||||
Can't open file {filename}
|
||||
Can't read file {filename}
|
||||
|
||||
Vim cannot read a temporary file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*mlang.txt* For Vim version 7.2. Last change: 2008 Jun 08
|
||||
*mlang.txt* For Vim version 7.3. Last change: 2012 Jan 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -58,15 +58,17 @@ use of "-" and "_".
|
||||
The locale {name} must be a valid locale on your
|
||||
system. Some systems accept aliases like "en" or
|
||||
"en_US", but some only accept the full specification
|
||||
like "en_US.ISO_8859-1".
|
||||
With the "messages" argument the language used for
|
||||
like "en_US.ISO_8859-1". On Unix systems you can use
|
||||
this command to see what locales are supported: >
|
||||
:!locale -a
|
||||
< With the "messages" argument the language used for
|
||||
messages is set. This can be different when you want,
|
||||
for example, English messages while editing Japanese
|
||||
text. This sets $LC_MESSAGES.
|
||||
With the "ctype" argument the language used for
|
||||
character encoding is set. This affects the libraries
|
||||
that Vim was linked with. It's unusual to set this to
|
||||
a different value from 'encoding'. This sets
|
||||
a different value from 'encoding' or "C". This sets
|
||||
$LC_CTYPE.
|
||||
With the "time" argument the language used for time
|
||||
and date messages is set. This affects strftime().
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*motion.txt* For Vim version 7.2. Last change: 2009 Sep 15
|
||||
*motion.txt* For Vim version 7.3. Last change: 2011 Jul 19
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -269,11 +269,11 @@ T{char} Till after [count]'th occurrence of {char} to the
|
||||
{char} can be entered like with the |f| command.
|
||||
|
||||
*;*
|
||||
; Repeat latest f, t, F or T [count] times.
|
||||
; Repeat latest f, t, F or T [count] times. See |cpo-;|
|
||||
|
||||
*,*
|
||||
, Repeat latest f, t, F or T in opposite direction
|
||||
[count] times.
|
||||
[count] times. See also |cpo-;|
|
||||
|
||||
==============================================================================
|
||||
3. Up-down motions *up-down-motions*
|
||||
@@ -315,6 +315,7 @@ _ <underscore> [count] - 1 lines downward, on the first non-blank
|
||||
G Goto line [count], default last line, on the first
|
||||
non-blank character |linewise|. If 'startofline' not
|
||||
set, keep the same column.
|
||||
G is a one of |jump-motions|.
|
||||
|
||||
*<C-End>*
|
||||
<C-End> Goto line [count], default last line, on the last
|
||||
@@ -328,6 +329,8 @@ gg Goto line [count], default first line, on the first
|
||||
:[range] Set the cursor on the last line number in [range].
|
||||
[range] can also be just one line number, e.g., ":1"
|
||||
or ":'m".
|
||||
In contrast with |G| this command does not modify the
|
||||
|jumplist|.
|
||||
*N%*
|
||||
{count}% Go to {count} percentage in the file, on the first
|
||||
non-blank in the line |linewise|. To compute the new
|
||||
@@ -341,6 +344,8 @@ gg Goto line [count], default first line, on the first
|
||||
last number in it used as the byte count. End-of-line
|
||||
characters are counted depending on the current
|
||||
'fileformat' setting.
|
||||
Also see the |line2byte()| function, and the 'o'
|
||||
option in 'statusline'.
|
||||
{not in Vi}
|
||||
{not available when compiled without the
|
||||
|+byte_offset| feature}
|
||||
@@ -1007,43 +1012,41 @@ unless the line containing that position was changed or deleted.
|
||||
*CTRL-O*
|
||||
CTRL-O Go to [count] Older cursor position in jump list
|
||||
(not a motion command). {not in Vi}
|
||||
{not available without the +jumplist feature}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
<Tab> or *CTRL-I* *<Tab>*
|
||||
CTRL-I Go to [count] newer cursor position in jump list
|
||||
(not a motion command).
|
||||
In a |quickfix-window| it takes you to the position of
|
||||
the error under the cursor.
|
||||
{not in Vi}
|
||||
{not available without the +jumplist feature}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
*:ju* *:jumps*
|
||||
:ju[mps] Print the jump list (not a motion command). {not in
|
||||
Vi} {not available without the +jumplist feature}
|
||||
Vi} {not available without the |+jumplist| feature}
|
||||
|
||||
*jumplist*
|
||||
Jumps are remembered in a jump list. With the CTRL-O and CTRL-I command you
|
||||
can go to cursor positions before older jumps, and back again. Thus you can
|
||||
move up and down the list. There is a separate jump list for each window.
|
||||
The maximum number of entries is fixed at 100.
|
||||
{not available without the +jumplist feature}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
For example, after three jump commands you have this jump list:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
3 1 0 some text ~
|
||||
2 70 0 another line ~
|
||||
1 1154 23 end. ~
|
||||
> ~
|
||||
|
||||
The "file/line" column shows the file name, or the text at the jump if it is
|
||||
The "file/text" column shows the file name, or the text at the jump if it is
|
||||
in the current file (an indent is removed and a long line is truncated to fit
|
||||
in the window).
|
||||
|
||||
You are currently in line 1167. If you then use the CTRL-O command, the
|
||||
cursor is put in line 1154. This results in:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
2 1 0 some text ~
|
||||
1 70 0 another line ~
|
||||
> 0 1154 23 end. ~
|
||||
@@ -1073,7 +1076,7 @@ command. You can explicitly add a jump by setting the ' mark.
|
||||
After the CTRL-O command that got you into line 1154 you could give another
|
||||
jump command (e.g., "G"). The jump list would then become:
|
||||
|
||||
jump line col file/line ~
|
||||
jump line col file/text ~
|
||||
4 1 0 some text ~
|
||||
3 70 0 another line ~
|
||||
2 1167 0 foo bar ~
|
||||
@@ -1103,14 +1106,14 @@ g; Go to [count] older position in change list.
|
||||
If there is no older change an error message is given.
|
||||
(not a motion command)
|
||||
{not in Vi}
|
||||
{not available without the +jumplist feature}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
*g,* *E663*
|
||||
g, Go to [count] newer cursor position in change list.
|
||||
Just like |g;| but in the opposite direction.
|
||||
(not a motion command)
|
||||
{not in Vi}
|
||||
{not available without the +jumplist feature}
|
||||
{not available without the |+jumplist| feature}
|
||||
|
||||
When using a count you jump as far back or forward as possible. Thus you can
|
||||
use "999g;" to go to the first change for which the position is still
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*netbeans.txt* For Vim version 7.2. Last change: 2009 Jan 06
|
||||
*netbeans.txt* For Vim version 7.3. Last change: 2012 Jan 26
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Gordon Prieur et al.
|
||||
@@ -14,7 +14,7 @@ Vim NetBeans Protocol: a socket interface for Vim integration into an IDE.
|
||||
4. Error Messages |netbeans-messages|
|
||||
5. Running Vim in NetBeans mode |netbeans-run|
|
||||
6. NetBeans protocol |netbeans-protocol|
|
||||
7. NetBeans key |netbeans-key|
|
||||
7. NetBeans commands |netbeans-commands|
|
||||
8. Known problems |netbeans-problems|
|
||||
9. Debugging NetBeans protocol |netbeans-debugging|
|
||||
10. NetBeans External Editor
|
||||
@@ -48,6 +48,8 @@ Current projects using the NetBeans protocol of Vim are:
|
||||
http://www.a-a-p.org
|
||||
- Clewn, a gdb integration into Vim, written in C:
|
||||
http://clewn.sourceforge.net/
|
||||
- Pyclewn, a gdb integration into Vim, written in Python:
|
||||
http://pyclewn.sourceforge.net/
|
||||
- VimPlugin, integration of Vim inside Eclipse:
|
||||
http://vimplugin.sourceforge.net/wiki/pmwiki.php
|
||||
- PIDA, IDE written in Python integrating Vim:
|
||||
@@ -101,7 +103,8 @@ use the |clientserver| interface.
|
||||
==============================================================================
|
||||
3. Configuring Vim for NetBeans *netbeans-configure*
|
||||
|
||||
For more help installing Vim, please read |usr_90.txt| in the Vim User Manual.
|
||||
For more help about installing Vim, please read |usr_90.txt| in the Vim User
|
||||
Manual.
|
||||
|
||||
|
||||
On Unix:
|
||||
@@ -114,9 +117,9 @@ the required features succeeds.
|
||||
In case you do not want the NetBeans interface you can disable it by
|
||||
uncommenting a line with "--disable-netbeans" in the Makefile.
|
||||
|
||||
Currently, only GVim is supported in this integration as NetBeans does not
|
||||
have means to supply a terminal emulator for the Vim command. Furthermore,
|
||||
there is only GUI support for GTK, GNOME, and Motif.
|
||||
Currently the NetBeans interface is supported by Vim running in a terminal and
|
||||
by GVim when it is run with one of the following GUIs: GTK, GNOME, Windows,
|
||||
Athena and Motif.
|
||||
|
||||
If Motif support is required the user must supply XPM libraries. See
|
||||
|workshop-xpm| for details on obtaining the latest version of XPM.
|
||||
@@ -150,6 +153,12 @@ Region is guarded, cannot modify
|
||||
which you cannot change. Also sets the current buffer, if
|
||||
necessary.
|
||||
|
||||
*E532*
|
||||
The defineAnnoType highlighting color name is too long
|
||||
The maximum length of the "fg" or "bg" color argument in the
|
||||
defineAnnoType command is 32 characters.
|
||||
New in version 2.5.
|
||||
|
||||
*E656*
|
||||
Writes of unmodified buffers forbidden
|
||||
Writes of unmodified buffers that were opened from the
|
||||
@@ -180,25 +189,37 @@ Read-only file
|
||||
==============================================================================
|
||||
5. Running Vim in NetBeans mode *netbeans-run*
|
||||
|
||||
Vim must be started with the |-nb| argument. Three forms can be used, that
|
||||
differ in the way the information for the connection is specified:
|
||||
There are two different ways to run Vim in NetBeans mode:
|
||||
|
||||
+ an IDE may start Vim with the |-nb| command line argument
|
||||
+ NetBeans can be started from within Vim with the |:nbstart| command
|
||||
|
||||
*netbeans-parameters*
|
||||
Three forms can be used to setup the NetBeans connection parameters.
|
||||
When started from the command line, the |-nb| command line argument may be:
|
||||
|
||||
-nb={fname} from a file
|
||||
-nb:{hostname}:{addr}:{password} directly
|
||||
-nb from a file or environment
|
||||
|
||||
When started from within Vim, the |:nbstart| optional argument may be:
|
||||
|
||||
={fname} from a file
|
||||
:{hostname}:{addr}:{password} directly
|
||||
<MISSING ARGUMENT> from a file or environment
|
||||
|
||||
*E660* *E668*
|
||||
For security reasons, the best method is to write the information in a file
|
||||
readable only by the user. The name of the file can be passed with the
|
||||
"-nb={fname}" argument or, when "-nb" is used without a parameter, the
|
||||
environment variable "__NETBEANS_CONINFO". The file must contain these three
|
||||
lines, in any order:
|
||||
When NetBeans is started from the command line, for security reasons, the best
|
||||
method is to write the information in a file readable only by the user. The
|
||||
name of the file can be passed with the "-nb={fname}" argument or, when "-nb"
|
||||
is used without a parameter, the environment variable "__NETBEANS_CONINFO".
|
||||
The file must contain these three lines, in any order:
|
||||
|
||||
host={hostname}
|
||||
port={addr}
|
||||
auth={password}
|
||||
|
||||
Other lines are ignored. The caller of Vim is responsible for deleting the
|
||||
Other lines are ignored. The Vim Controller is responsible for deleting the
|
||||
file afterwards.
|
||||
|
||||
{hostname} is the name of the machine where Vim Controller is running. When
|
||||
@@ -235,13 +256,19 @@ problems and has been fixed in 2.2. To decrease the likelihood of this
|
||||
confusion happening again, netbeans_saved() has been renamed to
|
||||
netbeans_save_buffer().
|
||||
|
||||
We are now at version 2.4. For the differences between 2.3 and 2.4 search for
|
||||
"2.4" below.
|
||||
We are now at version 2.5. For the differences between 2.4 and 2.5 search for
|
||||
"2.5" below.
|
||||
|
||||
The messages are currently sent over a socket. Since the messages are in
|
||||
plain UTF-8 text this protocol could also be used with any other communication
|
||||
mechanism.
|
||||
|
||||
Netbeans messages are processed when Vim is idle, waiting for user input.
|
||||
When Vim is run in non-interactive mode, for example when running an automated
|
||||
test case that sources a Vim script, the idle loop may not be called often
|
||||
enough. In that case, insert |:sleep| commands in the Vim script. The |:sleep|
|
||||
command does invoke Netbeans messages processing.
|
||||
|
||||
6.1 Kinds of messages |nb-messages|
|
||||
6.2 Terms |nb-terms|
|
||||
6.3 Commands |nb-commands|
|
||||
@@ -303,8 +330,11 @@ boolean Argument with two possible values:
|
||||
|
||||
number Argument with a decimal number.
|
||||
|
||||
optnum Argument with either a decimal number or "none" (without the
|
||||
quotes).
|
||||
color Argument with either a decimal number, "none" (without the
|
||||
quotes) or the name of a color (without the quotes) defined
|
||||
both in the color list in |highlight-ctermfg| and in the color
|
||||
list in |gui-colors|.
|
||||
New in version 2.5.
|
||||
|
||||
offset A number argument that indicates a byte position in a buffer.
|
||||
The first byte has offset zero. Line breaks are counted for
|
||||
@@ -365,9 +395,14 @@ defineAnnoType typeNum typeName tooltip glyphFile fg bg
|
||||
typeName string name that identifies this annotation
|
||||
tooltip string not used
|
||||
glyphFile string name of icon file
|
||||
fg optnum foreground color for line highlighting
|
||||
bg optnum background color for line highlighting
|
||||
fg color foreground color for line highlighting
|
||||
bg color background color for line highlighting
|
||||
Vim will define a sign for the annotation.
|
||||
When color is a number, this is the "#rrggbb" Red, Green and
|
||||
Blue values of the color (see |gui-colors|) and the
|
||||
highlighting is only defined for GVim.
|
||||
When color is a name, this color is defined both for Vim
|
||||
running in a color terminal and for GVim.
|
||||
When both "fg" and "bg" are "none" no line highlighting is
|
||||
used (new in version 2.1).
|
||||
When "glyphFile" is empty, no text sign is used (new in
|
||||
@@ -431,6 +466,7 @@ putBufferNumber pathname
|
||||
New in version 2.1.
|
||||
|
||||
raise Bring the editor to the foreground.
|
||||
Only when Vim is run with a GUI.
|
||||
New in version 2.1.
|
||||
|
||||
removeAnno serNum
|
||||
@@ -520,6 +556,7 @@ showBalloon text
|
||||
Show a balloon (popup window) at the mouse pointer position,
|
||||
containing "text", a string argument. The balloon should
|
||||
disappear when the mouse is moved more than a few pixels.
|
||||
Only when Vim is run with a GUI.
|
||||
New in version 2.1.
|
||||
|
||||
specialKeys
|
||||
@@ -653,6 +690,7 @@ balloonText text
|
||||
Used when 'ballooneval' is set and the mouse pointer rests on
|
||||
some text for a moment. "text" is a string, the text under
|
||||
the mouse pointer.
|
||||
Only when Vim is run with a GUI.
|
||||
New in version 2.1.
|
||||
|
||||
buttonRelease button lnum col
|
||||
@@ -786,14 +824,31 @@ These errors occur when a message violates the protocol:
|
||||
|
||||
|
||||
==============================================================================
|
||||
7. NetBeans key *netbeans-key*
|
||||
7. NetBeans commands *netbeans-commands*
|
||||
|
||||
*:nbstart* *E511* *E838*
|
||||
:nbs[tart] {connection} Start a new Netbeans session with {connection} as the
|
||||
socket connection parameters. The format of
|
||||
{connection} is described in |netbeans-parameters|.
|
||||
At any time, one may check if the netbeans socket is
|
||||
connected by running the command:
|
||||
':echo has("netbeans_enabled")'
|
||||
|
||||
*:nbclose*
|
||||
:nbc[lose] Close the current NetBeans session. Remove all placed
|
||||
signs.
|
||||
|
||||
*:nbkey*
|
||||
:nbkey key Pass the key to the Vim Controller for processing
|
||||
|
||||
When a hot-key has been installed with the specialKeys command, this command
|
||||
can be used to generate a hotkey messages to the Vim Controller. The events
|
||||
newDotAndMark, keyCommand and keyAtPos are generated (in this order).
|
||||
:nb[key] {key} Pass the {key} to the Vim Controller for processing.
|
||||
When a hot-key has been installed with the specialKeys
|
||||
command, this command can be used to generate a hotkey
|
||||
message to the Vim Controller.
|
||||
This command can also be used to pass any text to the
|
||||
Vim Controller. It is used by Pyclewn, for example,
|
||||
to build the complete set of gdb commands as Vim user
|
||||
commands.
|
||||
The events newDotAndMark, keyCommand and keyAtPos are
|
||||
generated (in this order).
|
||||
|
||||
|
||||
==============================================================================
|
||||
@@ -802,6 +857,13 @@ newDotAndMark, keyCommand and keyAtPos are generated (in this order).
|
||||
NUL bytes are not possible. For editor -> IDE they will appear as NL
|
||||
characters. For IDE -> editor they cannot be inserted.
|
||||
|
||||
A NetBeans session may be initiated with Vim running in a terminal, and
|
||||
continued later in a GUI environment after running the |:gui| command. In this
|
||||
case, the highlighting defined for the NetBeans annotations may be cleared
|
||||
when the ":gui" command sources .gvimrc and this file loads a colorscheme
|
||||
that runs the command ":highlight clear".
|
||||
New in version 2.5.
|
||||
|
||||
|
||||
==============================================================================
|
||||
9. Debugging NetBeans protocol *netbeans-debugging*
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
*os_390.txt* For Vim version 7.2. Last change: 2008 Dec 17
|
||||
*os_390.txt* For Vim version 7.3. Last change: 2010 May 30
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Ralf Schandl
|
||||
@@ -6,24 +6,12 @@
|
||||
*zOS* *z/OS* *OS390* *os390* *MVS*
|
||||
This file contains the particulars for the z/OS UNIX version of Vim.
|
||||
|
||||
1. Open source on z/OS UNIX |zOS-open-source|
|
||||
2. Your feedback is needed |zOS-feedback|
|
||||
3. Building VIM for z/OS UNIX |zOS-building|
|
||||
4. ASCII/EBCDIC dependent scripts |zOS-has-ebcdic|
|
||||
5. XTerm Problems |zOS-xterm|
|
||||
6. Motif Problems |zOS-Motif|
|
||||
7. Bugs |zOS-Bugs|
|
||||
8. Known weaknesses |zOS-weaknesses|
|
||||
9. Changes |zOS-changes|
|
||||
|
||||
DISCLAIMER: ~
|
||||
We are IBM employees, but IBM is not responsible for this port. This is our
|
||||
private fun, and is provided in the hopes that it may be useful to others.
|
||||
|
||||
Please note that this software has NOT been submitted to any formal IBM
|
||||
testing and is published AS IS. Please do not contact IBM for support for this
|
||||
software, as it is not an official component of any IBM product. IT IS NOT
|
||||
SUPPORTED, GUARANTEED, OR RELATED WHATSOEVER TO IBM.
|
||||
1. ASCII/EBCDIC dependent scripts |zOS-has-ebcdic|
|
||||
2. Putty and Colors |zOS-PuTTY|
|
||||
3. Motif Problems |zOS-Motif|
|
||||
4. Bugs |zOS-Bugs|
|
||||
5. Limitations |zOS-limitations|
|
||||
6. Open source on z/OS UNIX |zOS-open-source|
|
||||
|
||||
Contributors: ~
|
||||
The port to z/OS UNIX was done by Ralf Schandl for the Redbook mentioned
|
||||
@@ -32,128 +20,11 @@ below.
|
||||
Changes, bug-reports, or both by:
|
||||
|
||||
David Moore
|
||||
Anthony Giorgio <agiorgio@fastmail.fm>
|
||||
Anthony Giorgio
|
||||
and others
|
||||
|
||||
This document was written by Ralf Schandl and revised by Anthony Giorgio.
|
||||
|
||||
==============================================================================
|
||||
1. Open source on z/OS UNIX *OS390-open-source* *zOS-open-source*
|
||||
|
||||
If you are interested in other Open Source Software on z/OS UNIX, have a
|
||||
look at the following Redbook:
|
||||
|
||||
Mike MacIsaac et al
|
||||
"Open Source Software for z/OS and OS/390 UNIX"
|
||||
IBM Form Number: SG24-5944-01
|
||||
ISBN: 0738424633
|
||||
|
||||
You can find out more information, order a hard copy, or download a PDF
|
||||
version of these Redbooks at:
|
||||
|
||||
http://www.redbooks.ibm.com
|
||||
|
||||
==============================================================================
|
||||
2. Your feedback is needed *OS390-feedback* *zOS-feedback*
|
||||
|
||||
Vim should compile, link, and run right out of the box on a standard IBM z/OS
|
||||
UNIX mainframe. I've personally run it on z/OS V1R2 and V1R3 machines without
|
||||
problems.
|
||||
|
||||
Many changes had to be done to the code to port Vim to z/OS UNIX. As like
|
||||
most UNIX programs, Vim contained heavy ASCII dependencies. I might have
|
||||
missed an ASCII dependency, or it is possible that a new one has been added
|
||||
with a feature or bug fix. Most programmers are simply not aware of possible
|
||||
ASCII/EBCDIC conversion issues. If you hit a problem that seems related to
|
||||
this, feel free to contact us at the email addresses above.
|
||||
|
||||
One indication of ASCII/EBCDIC conversion problems is screen corruption with
|
||||
"unprintable" characters. For example, at one point the errorbell was broken
|
||||
in Vim. Any time Vim tried to ring the terminal bell an ASCII character 0x07
|
||||
would be printed. This works fine on most terminals, but is broken on an
|
||||
EBCDIC one. The correct solution was to define a different value for the bell
|
||||
character on EBCDIC systems.
|
||||
|
||||
Remember, it's only possible to fix a bug if the community knows about it.
|
||||
Don't rely on someone else to report it! See the section |bug-reports|.
|
||||
|
||||
==============================================================================
|
||||
3. Building VIM for z/OS UNIX *OS390-building* *zOS-building*
|
||||
|
||||
A word on debugging code first: ~
|
||||
|
||||
The normal run of configure adds the flag '-g' to the compiler options,
|
||||
to include debugging information into the executable. This information
|
||||
are normally removed from the executable with the strip command during
|
||||
installation. On z/OS UNIX, it is not possible to remove this from
|
||||
the executable. The strip command exists on z/OS UNIX and is called
|
||||
during the installation, but it does nothing. It is equivalent to the
|
||||
'touch' command. This is due to the way debug symbols are stored in the
|
||||
objects generated by the compiler.
|
||||
|
||||
If you want to build Vim without debugging code, export the environment
|
||||
variable CFLAGS set to an empty string before you call the configure script.
|
||||
>
|
||||
export CFLAGS=""
|
||||
|
||||
|
||||
Building without X11: ~
|
||||
|
||||
Note: Use cc to build Vim. The c89 compiler has stricter syntax checking
|
||||
and will not compile Vim cleanly.
|
||||
|
||||
If you build VIM without X11 support, compiling and building is
|
||||
straightforward. Don't forget to export _CC_CCMODE=1 before calling
|
||||
configure and make.
|
||||
>
|
||||
$ export _CC_CCMODE=1
|
||||
$./configure --with-features=big --without-x --enable-gui=no
|
||||
$ make
|
||||
$ make test
|
||||
<
|
||||
Test notes:
|
||||
Test 11 will fail if you do not have gzip installed.
|
||||
Test 42 will fail, as VIM on z/OS UNIX doesn't support the multibyte
|
||||
feature. (David Moore: "Doesn't work _yet_! :-) I'll see what I
|
||||
can do.")
|
||||
>
|
||||
|
||||
$ make install
|
||||
|
||||
|
||||
Building with X11: ~
|
||||
|
||||
There are two ways for building Vim with X11 support. You can link it
|
||||
statically with the X11 libraries or can bind it with the X11 DLLs. The
|
||||
statically linked version results in a huge executable (~13MB), while the
|
||||
dynamically linked executable is much smaller (~4.5MB).
|
||||
|
||||
Here is what you do, if you want Motif:
|
||||
|
||||
a) Static link >
|
||||
$ configure --with-features=big --enable-gui=motif
|
||||
$ make
|
||||
<
|
||||
VIM is now linked statically with the X11 libraries.
|
||||
|
||||
b) Dynamic link:
|
||||
Make VIM as described for the static link. Then change the contents of
|
||||
the 'auto/link.sed' file by appending: >
|
||||
s%-lXm *%/usr/lib/Xm.x %g
|
||||
s%-lX11 *%/usr/lib/X11.x %g
|
||||
s%-lSM *%/usr/lib/SM.x %g
|
||||
s%-lICE *%/usr/lib/ICE.x %g
|
||||
<
|
||||
Then do: >
|
||||
$ rm vim
|
||||
$ make
|
||||
<
|
||||
Now Vim is linked with the X11-DLLs.
|
||||
|
||||
See the Makefile and the file link.sh on how link.sed is used.
|
||||
|
||||
==============================================================================
|
||||
4. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
|
||||
1. ASCII/EBCDIC dependent scripts *OS390-has-ebcdic* *zOS-has-ebcdic*
|
||||
|
||||
For the internal script language the feature "ebcdic" was added. With this
|
||||
you can fix ASCII dependent scripts like this:
|
||||
@@ -164,24 +35,28 @@ you can fix ASCII dependent scripts like this:
|
||||
let space = 32
|
||||
endif
|
||||
<
|
||||
|
||||
==============================================================================
|
||||
5. XTerm problems *OS390-xterm* *zOS-xterm*
|
||||
2. PuTTY and Colors *OS390-PuTTY* *zOS-PuTTY*
|
||||
|
||||
Note: This problem was resolved in version 6.1b. ~
|
||||
If you see problems with syntax highlighting or screen corruptions when you
|
||||
connect to z/OS using Putty, try the following:
|
||||
|
||||
I saw one problem with XTerm on z/OS UNIX. The terminal code for moving the
|
||||
cursor to the left is wrong in the termlib database. Perhaps not wrong, but
|
||||
it didn't work with VIM syntax highlighting and command line cursor movement.
|
||||
- Configure Putty as "vt220" terminal (Connection->Data)
|
||||
- Add the following 3 lines to your vimrc:
|
||||
|
||||
If the highlighting is messed up while you type, but is okay after you refreshed
|
||||
the screen with <C-L> or if you can't move to the left with the cursor key on
|
||||
the command line, try adding >
|
||||
:set t_le=^H
|
||||
>
|
||||
set t_AB=[4%p1%dm
|
||||
set t_AF=[3%p1%dm
|
||||
set t_CO=8
|
||||
<
|
||||
to your .vimrc. Note: '^H' is one character, hit <C-V><C-H> to get it.
|
||||
|
||||
Note: is one character use <C-V><Esc> to enter it.
|
||||
|
||||
==============================================================================
|
||||
6. Motif Problems *OS390-Motif* *zOS-Motif*
|
||||
3. Motif Problems *OS390-Motif* *zOS-Motif*
|
||||
|
||||
Note: Seen with Vim 6.*, never tested since.
|
||||
|
||||
It seems that in porting the Motif library to z/OS, a translation from EBCDIC
|
||||
to ASCII for the accelerator characters of the pull-down menus was forgotten.
|
||||
@@ -190,17 +65,17 @@ to only work for the opening of menus (like <Alt-F> to open the file menu).
|
||||
They still do not work for the menu items themselves (like <Alt-F>O to open
|
||||
the file browser).
|
||||
|
||||
There is no solution for this as of yet.
|
||||
There is no solution for this yet.
|
||||
|
||||
==============================================================================
|
||||
7. Bugs *OS390-bugs* *zOS-Bugs*
|
||||
4. Bugs *OS390-bugs* *zOS-Bugs*
|
||||
|
||||
- Vim will consistently hang when a large amount of text is selected in
|
||||
visual block mode. This may be due to a memory corruption issue. Note that
|
||||
this occurs in both the terminal and gui versions.
|
||||
|
||||
==============================================================================
|
||||
8. Known weaknesses *OS390-weaknesses* *zOS-weaknesses*
|
||||
5. Limitations *OS390-limitations* *zOS-limitations*
|
||||
|
||||
- No binary search in tag files.
|
||||
The program /bin/sort sorts by ASCII value by default. This program is
|
||||
@@ -208,9 +83,6 @@ There is no solution for this as of yet.
|
||||
ctags out there, that does it right, but we can't be sure. So this seems to
|
||||
be a permanent restriction.
|
||||
|
||||
- Multibyte support (utf-8) doesn't work, it's disabled at compile time.
|
||||
(|multibyte|)
|
||||
|
||||
- The cscope interface (|cscope|) doesn't work for the version of cscope
|
||||
that we use on our mainframe. We have a copy of version 15.0b12, and it
|
||||
causes Vim to hang when using the "cscope add" command. I'm guessing that
|
||||
@@ -221,6 +93,13 @@ There is no solution for this as of yet.
|
||||
|
||||
- No glib/gtk support. I have not been able to successfully compile glib on
|
||||
z/OS UNIX. This means you'll have to live without the pretty gtk toolbar.
|
||||
|
||||
Disabled at compile time:
|
||||
- Multibyte support (|multibyte|)
|
||||
- Right-to-left mode (|rileft|)
|
||||
- Farsi key map (|Farsi|)
|
||||
- Arabic language support (|Arabic|)
|
||||
- Spell checking (|spell|)
|
||||
|
||||
Never tested:
|
||||
- Perl interface (|perl|)
|
||||
@@ -233,108 +112,24 @@ Never tested:
|
||||
- TCL interface (|tcl|)
|
||||
...
|
||||
|
||||
If you try any of these features and they work, drop us a note!
|
||||
|
||||
==============================================================================
|
||||
9. Changes *OS390-changes* *zOS-changes*
|
||||
6. Open source on z/OS UNIX *OS390-open-source* *zOS-open-source*
|
||||
|
||||
This is a small reference of the changes made to the z/OS port of Vim. It is
|
||||
not an exhaustive summary of all the modifications made to the code base.
|
||||
If you are interested in other Open Source Software on z/OS UNIX, have a
|
||||
look at the following Redbook:
|
||||
|
||||
6.1b (beta):
|
||||
Changed KS_LE in term.c to be "\b" instead of "\010" This fixed the
|
||||
screen corruption problems in gVim reported by Anthony Giorgio.
|
||||
Mike MacIsaac et al
|
||||
"Open Source Software for z/OS and OS/390 UNIX"
|
||||
IBM Form Number: SG24-5944-01
|
||||
ISBN: 0738424633
|
||||
http://www-03.ibm.com/systems/resources/servers_eserver_zseries_zos_unix_redbook_sg245944.pdf
|
||||
|
||||
Anthony Giorgio updated this document:
|
||||
- Changed OS/390 to z/OS where appropriate. IBM decided to rename
|
||||
all of its servers and operating systems. z/OS and OS/390
|
||||
are the same product, but the version numbering system was
|
||||
reset for the name change (e.g. OS/390 V2R11 == z/OS V1R1).
|
||||
- Added information about second edition of the Open Source Redbook.
|
||||
- Moved Redbook information to a separate section.
|
||||
- Various tweaks and changes.
|
||||
- Updated testing section.
|
||||
|
||||
6.0au:
|
||||
Changed configure.in
|
||||
Changed documentation.
|
||||
Anthony Giorgio fixed the errorbell.
|
||||
|
||||
David Moore found some problems, which were fixed by Bram and/or David for
|
||||
6.0au.
|
||||
|
||||
6.0q (alpha):
|
||||
Minor changes for nrformats=alpha (see |'nrformats'|).
|
||||
Problem with hard-coded keycode for the English pound sign. Added a define in
|
||||
ascii.h
|
||||
Disabled multibyte for EBCDIC in feature.h
|
||||
|
||||
6.0f (alpha):
|
||||
First compile of Vim 6 on z/OS UNIX. Some minor changes were needed.
|
||||
|
||||
Finally found the reason why make from the top level didn't work (I must have
|
||||
been blind before!). The Makefile contained a list of targets in one target
|
||||
line. On all other UNIX's the macro $@ evaluates to the first target in this
|
||||
list, only on z/OS UNIX it evaluates to the last one :-(.
|
||||
|
||||
5.6-390d:
|
||||
Cleaned up some hacks.
|
||||
|
||||
5.6-390c:
|
||||
I grepped through the source and examined every spot with a character
|
||||
involved in an operation (+-). I hope I now found all EBCDIC/ASCII
|
||||
stuff, but ....
|
||||
|
||||
Fixed:
|
||||
- fixed warning message in do_fixdel()
|
||||
- fixed translation from Ctrl-Char to symbolic name (like ^h to CTRL-H)
|
||||
for :help
|
||||
- fixed yank/delete/... into register
|
||||
- fixed :register command
|
||||
- fixed viminfo register storing
|
||||
- fixed quick-access table in findoptions()
|
||||
- fixed 'g^H' select mode
|
||||
- fixed tgetstr() 'get terminal capability string', ESC and
|
||||
Ctrl chars where wrong. (Not used on OS/390 UNIX)
|
||||
Also look at:
|
||||
http://www.redbooks.ibm.com
|
||||
http://www-03.ibm.com/systems/z/os/zos/features/unix/
|
||||
http://www-03.ibm.com/systems/z/os/zos/features/unix/library/IBM+Redbooks/index.html
|
||||
|
||||
|
||||
ctags:
|
||||
- added trigraphs support (used in prolog of system header files)
|
||||
(get.c)
|
||||
- fixed sorting order with LC_COLLATE=S390 to force EBCDIC sorting.
|
||||
(sort.c)
|
||||
|
||||
5.6-390b:
|
||||
Changed:
|
||||
- configure.in:
|
||||
- added test for OS/390 UNIX
|
||||
- added special compiler and linker options if building with X11
|
||||
- configure:
|
||||
- after created via autoconf hand-edited it to make the test for
|
||||
ICEConnectionNumber work. This is an autoconf problem. OS/390 UNIX
|
||||
needs -lX11 for this.
|
||||
- Makefile
|
||||
- Don't include the lib directories ('-L...') into the variable
|
||||
ALL_LIBS. Use own variable ALL_LIB_DIRS instead. A fully POSIX
|
||||
compliant compiler must not accept objects/libraries and options
|
||||
mixed. Now we can call the linker like this:
|
||||
|
||||
$(CC) $(LDFLAGS) $(ALL_LIB_DIRS) $(OBJ) $(ALL_LIBS)
|
||||
|
||||
Fixed:
|
||||
- Double quote couldn't be entered
|
||||
Missed ASCII dependencies while setting up terminal
|
||||
In ASCII 127 is the delete char, in EBCDIC codepage 1047 the value 127
|
||||
is the double quote.
|
||||
- fixed ':fixdel'
|
||||
|
||||
5.6-390a:
|
||||
first alpha release for OS/390 UNIX.
|
||||
|
||||
Addition:
|
||||
- For the internal script language I added the feature "ebcdic".
|
||||
This can be queried with the has()-function of the internal
|
||||
script language.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
vim:tw=78:fo=tcq2:ts=8:ft=help:norl:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
*os_amiga.txt* For Vim version 7.2. Last change: 2005 Mar 29
|
||||
*os_amiga.txt* For Vim version 7.3. Last change: 2010 Aug 14
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@@ -8,6 +8,8 @@
|
||||
This file contains the particularities for the Amiga version of Vim.
|
||||
There is also a section specifically for |MorphOS| below.
|
||||
|
||||
NOTE: The Amiga code is still included, but has not been maintained or tested.
|
||||
|
||||
Installation on the Amiga:
|
||||
- Assign "VIM:" to the directory where the Vim "doc" directory is. Vim will
|
||||
look for the file "VIM:doc/help.txt" (for the help command).
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user