Compare commits

...

196 Commits

Author SHA1 Message Date
Bram Moolenaar
7b89edc62d updated for version 7.0c11 2006-04-06 20:21:51 +00:00
Bram Moolenaar
8dff818edf updated for version 7.0c11 2006-04-06 20:18:50 +00:00
Bram Moolenaar
910f66f90c updated for version 7.0c10 2006-04-05 20:41:53 +00:00
Bram Moolenaar
e2f98b95c8 updated for version 7.0c03 2006-03-29 21:18:24 +00:00
Bram Moolenaar
86ca6e3b8c updated for version 7.0c03 2006-03-29 21:06:37 +00:00
Bram Moolenaar
d2cec5b043 updated for version 7.0c02 2006-03-28 21:08:56 +00:00
Bram Moolenaar
607a95ed81 updated for version 7.0c02 2006-03-28 20:57:42 +00:00
Bram Moolenaar
04a9d4555a updated for version 7.0c01 2006-03-27 21:03:26 +00:00
Bram Moolenaar
3964b7ea08 updated for version 7.0c01 2006-03-27 20:59:33 +00:00
Bram Moolenaar
afa24990b3 updated for version 7.0c01 2006-03-27 20:58:26 +00:00
Bram Moolenaar
2e2a2815e5 updated for version 7.0c01 2006-03-27 20:55:21 +00:00
Bram Moolenaar
3991dab8e0 updated for version 7.0c 2006-03-27 17:01:56 +00:00
Bram Moolenaar
899dddf888 updated for version 7.0b02 2006-03-26 21:06:50 +00:00
Bram Moolenaar
5c6a2d5323 updated for version 7.0b01 2006-03-25 22:06:54 +00:00
Bram Moolenaar
bd404149f7 updated for version 7.0b01 2006-03-25 22:05:04 +00:00
Bram Moolenaar
42bbef4a49 updated for version 7.0b01 2006-03-25 22:02:07 +00:00
Bram Moolenaar
fa1d140a2c updated for version 7.0b01 2006-03-25 21:59:56 +00:00
Bram Moolenaar
2217cae0c0 updated for version 7.0b01 2006-03-25 21:55:52 +00:00
Bram Moolenaar
1a14c2ccd1 updated for version 7.0b01 2006-03-25 21:52:34 +00:00
Bram Moolenaar
c17ef8ef36 updated for version 7.0b01 2006-03-25 21:48:58 +00:00
Bram Moolenaar
7fcab2a02c updated for version 7.0b01 2006-03-25 21:46:12 +00:00
Bram Moolenaar
76b92b2830 updated for version 7.0b 2006-03-24 22:46:53 +00:00
Bram Moolenaar
c01140a1a0 updated for version 7.0b 2006-03-24 22:21:52 +00:00
Bram Moolenaar
db552d60ec updated for version 7.0232 2006-03-23 22:59:57 +00:00
Bram Moolenaar
7b5f8325ee updated for version 7.0232 2006-03-23 22:47:08 +00:00
Bram Moolenaar
8ab561d31e updated for version 7.0232 2006-03-23 22:44:10 +00:00
Bram Moolenaar
e580b0c34d updated for version 7.0231 2006-03-21 21:33:03 +00:00
Bram Moolenaar
433f7c88d5 updated for version 7.0231 2006-03-21 21:29:36 +00:00
Bram Moolenaar
76916e60ed updated for version 7.0231 2006-03-21 21:23:25 +00:00
Bram Moolenaar
eee697b748 updated for version 7.0231 2006-03-21 21:20:39 +00:00
Bram Moolenaar
b3656edcb9 updated for version 7.0230 2006-03-20 21:59:49 +00:00
Bram Moolenaar
9b2200acd6 updated for version 7.0230 2006-03-20 21:55:45 +00:00
Bram Moolenaar
0126585dbb updated for version 7.0230 2006-03-20 21:50:15 +00:00
Bram Moolenaar
371d5403d0 updated for version 7.0230 2006-03-20 21:47:49 +00:00
Bram Moolenaar
ceaf7b8b66 updated for version 7.0229 2006-03-19 22:18:55 +00:00
Bram Moolenaar
39f05630ad updated for version 7.0229 2006-03-19 22:15:26 +00:00
Bram Moolenaar
c15ef30c08 updated for version 7.0229 2006-03-19 22:11:16 +00:00
Bram Moolenaar
e0fa560e6f updated for version 7.0229 2006-03-19 22:08:37 +00:00
Bram Moolenaar
2c93230f48 updated for version 7.0228 2006-03-18 21:42:09 +00:00
Bram Moolenaar
97b2ad3542 updated for version 7.0228 2006-03-18 21:40:56 +00:00
Bram Moolenaar
658b74a736 updated for version 7.0228 2006-03-18 21:33:02 +00:00
Bram Moolenaar
8d6ea5eb4f updated for version 7.0228 2006-03-18 21:31:46 +00:00
Bram Moolenaar
be4d506b5f updated for version 7.0228 2006-03-18 21:30:13 +00:00
Bram Moolenaar
f0acfce534 updated for version 7.0227 2006-03-17 23:21:19 +00:00
Bram Moolenaar
ca003e1e4f updated for version 7.0227 2006-03-17 23:19:38 +00:00
Bram Moolenaar
68f1a48647 updated for version 7.0227 2006-03-17 23:12:21 +00:00
Bram Moolenaar
a83c3e0ebd updated for version 7.0227 2006-03-17 23:10:44 +00:00
Bram Moolenaar
ea0cd36bdd updated for version 7.0226 2006-03-16 21:46:52 +00:00
Bram Moolenaar
2eb25daffd updated for version 7.0226 2006-03-16 21:43:34 +00:00
Bram Moolenaar
efd2bf158a updated for version 7.0226 2006-03-16 21:41:35 +00:00
Bram Moolenaar
d3667a2e29 updated for version 7.0226 2006-03-16 21:35:52 +00:00
Bram Moolenaar
cf03447964 updated for version 7.0225 2006-03-15 23:07:59 +00:00
Bram Moolenaar
27dc19509b updated for version 7.0225 2006-03-15 23:06:44 +00:00
Bram Moolenaar
95e9b49537 updated for version 7.0225 2006-03-15 23:04:43 +00:00
Bram Moolenaar
9d47f1707b updated for version 7.0225 2006-03-15 23:03:01 +00:00
Bram Moolenaar
7d47b6eed7 updated for version 7.0225 2006-03-15 22:59:18 +00:00
Bram Moolenaar
5671873089 updated for version 7.0225 2006-03-15 22:53:57 +00:00
Bram Moolenaar
c4675a193d updated for version 7.0225 2006-03-15 22:50:30 +00:00
Bram Moolenaar
db00351723 updated for version 7.0225 2006-03-15 22:48:35 +00:00
Bram Moolenaar
114216c417 updated for version 7.0224 2006-03-14 23:08:30 +00:00
Bram Moolenaar
34e9e2f13d updated for version 7.0224 2006-03-14 23:07:19 +00:00
Bram Moolenaar
a9a568ca77 updated for version 7.0224 2006-03-14 23:04:27 +00:00
Bram Moolenaar
2092d32231 updated for version 7.0224 2006-03-14 23:02:02 +00:00
Bram Moolenaar
1f4d4de1ba updated for version 7.0224 2006-03-14 23:00:46 +00:00
Bram Moolenaar
3b1ddfed51 updated for version 7.0224 2006-03-14 22:55:34 +00:00
Bram Moolenaar
c7d893589e updated for version 7.0224 2006-03-14 22:53:34 +00:00
Bram Moolenaar
af48b0924f updated for version 7.0224 2006-03-14 22:51:38 +00:00
Bram Moolenaar
0ce29937aa updated for version 7.0223 2006-03-13 22:18:45 +00:00
Bram Moolenaar
1e60789f9b updated for version 7.0223 2006-03-13 22:15:53 +00:00
Bram Moolenaar
019ff6825b updated for version 7.0223 2006-03-13 22:10:45 +00:00
Bram Moolenaar
346d743df2 updated for version 7.0223 2006-03-13 22:08:57 +00:00
Bram Moolenaar
35a2e197cf updated for version 7.0223 2006-03-13 22:07:11 +00:00
Bram Moolenaar
3c56a964af updated for version 7.0222 2006-03-12 22:19:04 +00:00
Bram Moolenaar
a1956f6b07 updated for version 7.0222 2006-03-12 22:18:00 +00:00
Bram Moolenaar
17be7e614e updated for version 7.0222 2006-03-12 22:13:45 +00:00
Bram Moolenaar
5316eee835 updated for version 7.0222 2006-03-12 22:11:10 +00:00
Bram Moolenaar
1c8f93ff02 updated for version 7.0222 2006-03-12 22:10:07 +00:00
Bram Moolenaar
b9a02fc557 updated for version 7.0222 2006-03-12 22:08:12 +00:00
Bram Moolenaar
600dddcf66 updated for version 7.0222 2006-03-12 22:05:10 +00:00
Bram Moolenaar
1fc0046932 updated for version 7.0222 2006-03-12 22:00:48 +00:00
Bram Moolenaar
c4956c8d1d updated for version 7.0222 2006-03-12 21:58:43 +00:00
Bram Moolenaar
2b48ad5cd7 updated for version 7.0222 2006-03-12 21:56:11 +00:00
Bram Moolenaar
5baddf0285 updated for version 7.0222 2006-03-12 21:53:56 +00:00
Bram Moolenaar
60f8377e42 updated for version 7.0222 2006-03-12 21:52:47 +00:00
Bram Moolenaar
f71a3db47e updated for version 7.0222 2006-03-12 21:50:18 +00:00
Bram Moolenaar
e48ec1fa6b updated for version 7.0221 2006-03-11 21:38:31 +00:00
Bram Moolenaar
a5b6ad13ef updated for version 7.0221 2006-03-11 21:36:59 +00:00
Bram Moolenaar
eb94e559e0 updated for version 7.0221 2006-03-11 21:35:11 +00:00
Bram Moolenaar
038221bcd0 updated for version 7.0221 2006-03-11 21:32:59 +00:00
Bram Moolenaar
d289f1315f updated for version 7.0221 2006-03-11 21:30:53 +00:00
Bram Moolenaar
c270d806f8 updated for version 7.0221 2006-03-11 21:29:41 +00:00
Bram Moolenaar
96d2c5b5be updated for version 7.0221 2006-03-11 21:27:59 +00:00
Bram Moolenaar
838bb71992 updated for version 7.0221 2006-03-11 21:24:08 +00:00
Bram Moolenaar
0b598c2fda updated for version 7.0221 2006-03-11 21:22:53 +00:00
Bram Moolenaar
d996771378 updated for version 7.0221 2006-03-11 21:18:15 +00:00
Bram Moolenaar
8ee8926785 updated for version 7.0221 2006-03-11 21:16:47 +00:00
Bram Moolenaar
ade0083d3a updated for version 7.0220 2006-03-10 21:46:58 +00:00
Bram Moolenaar
a94bc430e8 updated for version 7.0220 2006-03-10 21:42:59 +00:00
Bram Moolenaar
5c4bab0fe7 updated for version 7.0220 2006-03-10 21:37:46 +00:00
Bram Moolenaar
eca1575717 updated for version 7.0220 2006-03-10 21:35:45 +00:00
Bram Moolenaar
4e42719355 updated for version 7.0220 2006-03-10 21:34:27 +00:00
Bram Moolenaar
1056d98844 updated for version 7.0219 2006-03-09 22:37:52 +00:00
Bram Moolenaar
4ea8fe1d06 updated for version 7.0219 2006-03-09 22:32:39 +00:00
Bram Moolenaar
0fd9289de3 updated for version 7.0219 2006-03-09 22:27:48 +00:00
Bram Moolenaar
a3227e2b15 updated for version 7.0218 2006-03-08 21:32:40 +00:00
Bram Moolenaar
1f35bf9cab updated for version 7.0217 2006-03-07 22:38:47 +00:00
Bram Moolenaar
a203182302 updated for version 7.0217 2006-03-07 22:29:51 +00:00
Bram Moolenaar
362e1a30c6 updated for version 7.0216 2006-03-06 23:29:24 +00:00
Bram Moolenaar
768b8c4dbc updated for version 7.0214 2006-03-04 21:58:33 +00:00
Bram Moolenaar
87b5ca5172 updated for version 7.0214 2006-03-04 21:55:31 +00:00
Bram Moolenaar
36fc535cb1 updated for version 7.0214 2006-03-04 21:49:37 +00:00
Bram Moolenaar
d0131a8bd2 updated for version 7.0214 2006-03-04 21:46:13 +00:00
Bram Moolenaar
0e34f6269e updated for version 7.0213 2006-03-03 23:00:03 +00:00
Bram Moolenaar
3517bb1ece updated for version 7.0213 2006-03-03 22:58:45 +00:00
Bram Moolenaar
65c923adf3 updated for version 7.0213 2006-03-03 22:56:30 +00:00
Bram Moolenaar
bfb2d40b6e updated for version 7.0213 2006-03-03 22:50:42 +00:00
Bram Moolenaar
a55252087b updated for version 7.0212 2006-03-02 22:52:09 +00:00
Bram Moolenaar
8fd89f0fe7 updated for version 7.0212 2006-03-02 22:51:05 +00:00
Bram Moolenaar
0b23879827 updated for version 7.0212 2006-03-02 22:49:12 +00:00
Bram Moolenaar
c06ac34092 updated for version 7.0212 2006-03-02 22:43:39 +00:00
Bram Moolenaar
b475fb917b updated for version 7.0212 2006-03-02 22:40:52 +00:00
Bram Moolenaar
261bfeab3e updated for version 7.0211 2006-03-01 22:12:31 +00:00
Bram Moolenaar
fd2ac767eb updated for version 7.0211 2006-03-01 22:09:21 +00:00
Bram Moolenaar
e1438bb8d0 updated for version 7.0211 2006-03-01 22:01:55 +00:00
Bram Moolenaar
e224ffa156 updated for version 7.0210 2006-03-01 00:01:28 +00:00
Bram Moolenaar
03f4855fc2 updated for version 7.0210 2006-02-28 23:52:23 +00:00
Bram Moolenaar
b388adb188 updated for version 7.0210 2006-02-28 23:50:17 +00:00
Bram Moolenaar
5e3cb7e869 updated for version 7.0209 2006-02-27 23:58:35 +00:00
Bram Moolenaar
eddf53b02e updated for version 7.0208 2006-02-27 00:11:10 +00:00
Bram Moolenaar
a23ccb8ac6 updated for version 7.0208 2006-02-27 00:08:02 +00:00
Bram Moolenaar
1cad292503 updated for version 7.0208 2006-02-27 00:00:52 +00:00
Bram Moolenaar
a226a6dd9f updated for version 7.0208 2006-02-26 23:59:20 +00:00
Bram Moolenaar
a562149de3 updated for version 7.0207 2006-02-25 21:55:24 +00:00
Bram Moolenaar
5c8837f9d7 updated for version 7.0207 2006-02-25 21:52:33 +00:00
Bram Moolenaar
c542aef58d updated for version 7.0207 2006-02-25 21:47:41 +00:00
Bram Moolenaar
ba6c05240f updated for version 7.0207 2006-02-25 21:45:02 +00:00
Bram Moolenaar
32466aa2e9 updated for version 7.0206 2006-02-24 23:53:04 +00:00
Bram Moolenaar
2a3f7eeebf updated for version 7.0205 2006-02-23 21:34:44 +00:00
Bram Moolenaar
df1bdc92c2 updated for version 7.0205 2006-02-23 21:32:16 +00:00
Bram Moolenaar
80a94a582c updated for version 7.0205 2006-02-23 21:26:58 +00:00
Bram Moolenaar
d1f56e68f1 updated for version 7.0204 2006-02-22 21:25:37 +00:00
Bram Moolenaar
238a564935 updated for version 7.0203 2006-02-21 22:12:05 +00:00
Bram Moolenaar
8f7fd65b24 updated for version 7.0203 2006-02-21 22:04:51 +00:00
Bram Moolenaar
030f0dfad5 updated for version 7.0203 2006-02-21 22:02:53 +00:00
Bram Moolenaar
faa959a870 updated for version 7.0202 2006-02-20 21:37:40 +00:00
Bram Moolenaar
70836c8ba8 updated for version 7.0202 2006-02-20 21:28:49 +00:00
Bram Moolenaar
2a0449d129 updated for version 7.0202 2006-02-20 21:27:21 +00:00
Bram Moolenaar
7e8fd63682 updated for version 7.0201 2006-02-18 22:14:51 +00:00
Bram Moolenaar
997fb4ba69 updated for version 7.0200 2006-02-17 21:53:23 +00:00
Bram Moolenaar
49d7bf13e0 updated for version 7.0200 2006-02-17 21:45:41 +00:00
Bram Moolenaar
f740b29ae2 updated for version 7.0199 2006-02-16 22:11:02 +00:00
Bram Moolenaar
4c7ed462cb updated for version 7.0198 2006-02-15 22:18:42 +00:00
Bram Moolenaar
e45828b593 updated for version 7.0198 2006-02-15 22:12:56 +00:00
Bram Moolenaar
98ea5defcf updated for version 7.0198 2006-02-15 22:11:25 +00:00
Bram Moolenaar
1d2ba7fa85 updated for version 7.0197 2006-02-14 22:29:30 +00:00
Bram Moolenaar
f52c725c47 updated for version 7.0196 2006-02-10 23:23:57 +00:00
Bram Moolenaar
c7453f52d4 updated for version 7.0196 2006-02-10 23:20:28 +00:00
Bram Moolenaar
110bc6bc91 updated for version 7.0196 2006-02-10 23:13:40 +00:00
Bram Moolenaar
06b5db9397 updated for version 7.0196 2006-02-10 23:11:56 +00:00
Bram Moolenaar
3d0a603fa9 updated for version 7.0195 2006-02-09 23:54:54 +00:00
Bram Moolenaar
754b56089f updated for version 7.0195 2006-02-09 23:53:20 +00:00
Bram Moolenaar
cf0c554e3f updated for version 7.0195 2006-02-09 23:48:02 +00:00
Bram Moolenaar
8b6144bdfe updated for version 7.0194 2006-02-08 09:20:24 +00:00
Bram Moolenaar
9f2c6e1deb updated for version 7.0193 2006-02-04 22:45:44 +00:00
Bram Moolenaar
a65576059f updated for version 7.0193 2006-02-04 22:43:20 +00:00
Bram Moolenaar
41cabdadc2 updated for version 7.0193 2006-02-04 22:38:56 +00:00
Bram Moolenaar
a37420f46f updated for version 7.0193 2006-02-04 22:37:47 +00:00
Bram Moolenaar
0e5bd96f84 updated for version 7.0192 2006-02-04 00:59:56 +00:00
Bram Moolenaar
986920760e updated for version 7.0192 2006-02-04 00:57:42 +00:00
Bram Moolenaar
49315f65c9 updated for version 7.0192 2006-02-04 00:54:59 +00:00
Bram Moolenaar
1ef15e30a0 updated for version 7.0191 2006-02-01 21:56:25 +00:00
Bram Moolenaar
afeb4fa8a7 updated for version 7.0191 2006-02-01 21:51:12 +00:00
Bram Moolenaar
b8a7b560b1 updated for version 7.0191 2006-02-01 21:47:16 +00:00
Bram Moolenaar
280f126ef0 updated for version 7.0189 2006-01-30 00:14:18 +00:00
Bram Moolenaar
17c7c01170 updated for version 7.0188 2006-01-26 22:25:15 +00:00
Bram Moolenaar
51156d5a87 updated for version 7.0188 2006-01-26 22:17:47 +00:00
Bram Moolenaar
6ab5b84db4 updated for version 7.0188 2006-01-26 22:16:34 +00:00
Bram Moolenaar
d12f5c17be updated for version 7.0187 2006-01-25 22:10:52 +00:00
Bram Moolenaar
28c258fd24 updated for version 7.0187 2006-01-25 22:02:51 +00:00
Bram Moolenaar
7df351eb8a updated for version 7.0186 2006-01-23 22:30:28 +00:00
Bram Moolenaar
09df3127f4 updated for version 7.0186 2006-01-23 22:23:09 +00:00
Bram Moolenaar
33aec765bd updated for version 7.0185 2006-01-22 23:30:12 +00:00
Bram Moolenaar
71fe80dddd updated for version 7.0185 2006-01-22 23:25:56 +00:00
Bram Moolenaar
66fa271a25 updated for version 7.0185 2006-01-22 23:22:22 +00:00
Bram Moolenaar
0ac9379acf updated for version 7.0184 2006-01-21 22:16:51 +00:00
Bram Moolenaar
c716c306e9 updated for version 7.0184 2006-01-21 22:12:51 +00:00
Bram Moolenaar
b1b715d1fb updated for version 7.0184 2006-01-21 22:09:43 +00:00
Bram Moolenaar
b71eaaeaa8 updated for version 7.0183 2006-01-20 23:10:18 +00:00
Bram Moolenaar
2d3f489e09 updated for version 7.0183 2006-01-20 23:02:51 +00:00
Bram Moolenaar
8ada17c4d9 updated for version 7.0182 2006-01-19 22:16:24 +00:00
Bram Moolenaar
05a7bb363b updated for version 7.0182 2006-01-19 22:09:32 +00:00
Bram Moolenaar
c32840f267 updated for version 7.0181 2006-01-14 21:23:38 +00:00
Bram Moolenaar
04dbce064e updated for version 7.0181 2006-01-14 21:20:41 +00:00
Bram Moolenaar
316059c019 updated for version 7.0181 2006-01-14 21:18:42 +00:00
Bram Moolenaar
ea8bd73212 updated for version 7.0181 2006-01-14 21:15:59 +00:00
Bram Moolenaar
a40ceaf88a updated for version 7.0180 2006-01-13 22:35:40 +00:00
558 changed files with 63597 additions and 16670 deletions

View File

@@ -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.0aa. Also runs under UNIX, MSDOS and other systems.
vim70aart.tgz contains the documentation and syntax files.
vim70aabin.tgz contains the binaries.
vim70aasrc.tgz contains the sources.
Version 7.0c. Also runs under UNIX, MSDOS and other systems.
vim70crt.tgz contains the documentation and syntax files.
vim70cbin.tgz contains the binaries.
vim70csrc.tgz contains the sources.
Author: Bram Moolenaar et al.

View File

@@ -31,7 +31,7 @@ SRC_ALL = \
src/gui_beval.c \
src/gui_beval.h \
src/hardcopy.c \
src/hashtable.c \
src/hashtab.c \
src/keymap.h \
src/macros.h \
src/main.c \
@@ -52,7 +52,7 @@ SRC_ALL = \
src/ops.c \
src/option.c \
src/option.h \
src/popupmenu.c \
src/popupmnu.c \
src/quickfix.c \
src/regexp.c \
src/regexp.h \
@@ -96,7 +96,7 @@ SRC_ALL = \
src/proto/gui.pro \
src/proto/gui_beval.pro \
src/proto/hardcopy.pro \
src/proto/hashtable.pro \
src/proto/hashtab.pro \
src/proto/main.pro \
src/proto/mark.pro \
src/proto/mbyte.pro \
@@ -111,7 +111,7 @@ SRC_ALL = \
src/proto/normal.pro \
src/proto/ops.pro \
src/proto/option.pro \
src/proto/popupmenu.pro \
src/proto/popupmnu.pro \
src/proto/quickfix.pro \
src/proto/regexp.pro \
src/proto/screen.pro \
@@ -248,6 +248,7 @@ SRC_DOS = \
src/Make_mvc.mak \
src/Make_w16.mak \
src/bigvim.bat \
src/msvcsetup.bat \
src/dimm.idl \
src/dlldata.c \
src/dosinst.c \
@@ -285,6 +286,7 @@ SRC_DOS = \
src/uninstal.c \
src/vim.def \
src/vim.rc \
src/vimio.h \
src/gvim.exe.mnf \
src/vim16.def \
src/vim16.rc \
@@ -331,7 +333,8 @@ SRC_DOS_BIN = \
src/vim.tlb \
src/vimtbar.lib \
src/vimtbar.dll \
nsis/icons \
nsis/icons/*.bmp \
nsis/icons/*.ico \
# source files for Amiga, DOS, etc. (also in the extra archive)
SRC_AMI_DOS = \
@@ -358,7 +361,7 @@ SRC_MAC = \
src/INSTALLmac.txt \
src/dehqx.py \
src/gui_mac.c \
src/gui_mac.icns \
src/os_mac_rsrc/*.icns \
src/os_mac.h \
src/os_mac.rsr.hqx \
src/os_mac_conv.c \
@@ -496,6 +499,7 @@ RT_SCRIPTS = \
runtime/filetype.vim \
runtime/scripts.vim \
runtime/menu.vim \
runtime/macmap.vim \
runtime/delmenu.vim \
runtime/synmenu.vim \
runtime/makemenu.vim \
@@ -517,7 +521,6 @@ RT_SCRIPTS = \
# Unix runtime
RT_UNIX = \
README_unix.txt \
runtime/KVim.desktop \
runtime/hi16-action-make.png \
runtime/hi22-action-make.png \
runtime/vim16x16.png \
@@ -654,6 +657,8 @@ LANG_GEN = \
runtime/doc/*-fr.UTF-8.1 \
runtime/doc/*-it.1 \
runtime/doc/*-it.UTF-8.1 \
runtime/doc/*-pl.1 \
runtime/doc/*-pl.UTF-8.1 \
runtime/doc/*-ru.1 \
runtime/doc/*-ru.UTF-8.1 \
runtime/lang/README.txt \
@@ -675,6 +680,7 @@ LANG_GEN = \
runtime/spell/??/main.aap \
runtime/spell/yi/README.txt \
runtime/spell/main.aap \
runtime/spell/cleanadd.vim \
runtime/spell/*.vim \
runtime/spell/fixdup \

View File

@@ -69,15 +69,15 @@ all install uninstall tools config configure proto depend lint tags types test t
# Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 7
MINOR = 0aa
MINOR = 0c
# Uncomment this line if the Win32s version is to be included.
#DOSBIN_S = dosbin_s
DOSBIN_S = dosbin_s
# CHECKLIST for creating a new version:
#
# - Update Vim version number. For a test version in: src/version.h, Contents,
# MAJOR/MINOR above, VIMRTDIR and VERSION in src/Makefile, README*.txt,
# MAJOR/MINOR above, VIMMAJOR and VIMMINOR in src/Makefile, README*.txt,
# runtime/doc/*.txt and nsis/gvim.nsi. Other things in README_os2.txt. For a
# minor/major version: src/GvimExt/GvimExt.reg, src/vim.def, src/vim16.def.
# - Correct included_patches[] in src/version.c.
@@ -92,7 +92,7 @@ MINOR = 0aa
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
# - Do "make menu" to update the runtime/synmenu.vim file.
# - Add remarks for changes to runtime/doc/version6.txt.
# - Add remarks for changes to runtime/doc/version7.txt.
# - In runtime/doc run "make" and "make html" to check for errors.
# - Check if src/Makefile and src/feature.h don't contain any personal
# preferences or the GTK, Perl, etc. mentioned above.
@@ -128,21 +128,24 @@ MINOR = 0aa
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe".
# Win32 console version:
# - Set environment for Visual C++ 5.0: "vcvars32"
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
# - Rename ObjC/vim.pdb to vimw32.pdb.
# - When building the Win32s version later, delete vimrun.exe, install.exe and
# uninstal.exe. Otherwise rename executables to installw32.exe and
# uninstalw32.exe.
# Win32 GUI version:
# - "nmake -f Make_mvc.mak GUI=yes.
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move ObjG/gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstall.exe.
# - Copy "GvimExt/gvimext.dll" to here.
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
# - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstall.exe.
# - If building the Win32s version delete vimrun.exe.
# Win32s GUI version:
@@ -165,6 +168,7 @@ MINOR = 0aa
# 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)
# Note: VisVim needs to be build with MSVC 5, newer versions don't work.
# - make sure there is a diff.exe two levels up
# - go to ../nsis and do "makensis gvim.nsi".
# - Copy gvim##.exe to the dist directory.
@@ -430,6 +434,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cp gvimext.dll dist/vim/$(VIMRTDIR)/gvimext.dll
cd dist && zip -9 -rD -z gvim$(VERSION).zip vim <$(COMMENT_GVIM)
cp gvim.pdb dist/gvim$(VERSION).pdb
# make Win32 console
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
@@ -446,6 +451,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
cp installw32.exe dist/vim/$(VIMRTDIR)/install.exe
cp uninstalw32.exe dist/vim/$(VIMRTDIR)/uninstal.exe
cd dist && zip -9 -rD -z vim$(VERSION)w32.zip vim <$(COMMENT_W32)
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
# make 32bit DOS
dosbin_d32: dist no_title.vim dist/$(COMMENT_D32)
@@ -500,6 +506,7 @@ dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
cp src/VisVim/VisVim.dll dist/vim/$(VIMRTDIR)/VisVim.dll
cp src/VisVim/README_VisVim.txt dist/vim/$(VIMRTDIR)
cd dist && zip -9 -rD -z gvim$(VERSION)ole.zip vim <$(COMMENT_OLE)
cp gvim_ole.pdb dist/gvim$(VERSION)ole.pdb
# make Win32s gvim
dosbin_s: dist no_title.vim dist/$(COMMENT_W32S)

View File

@@ -1,4 +1,4 @@
README.txt for version 7.0aa of Vim: Vi IMproved.
README.txt for version 7.0c of Vim: Vi IMproved.
WHAT IS VIM

View File

@@ -1,4 +1,4 @@
README_ami.txt for version 7.0aa of Vim: Vi IMproved.
README_ami.txt for version 7.0c of Vim: Vi IMproved.
This file explains the installation of Vim on Amiga systems.
See README.txt for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_amibin.txt for version 7.0aa of Vim: Vi IMproved.
README_amibin.txt for version 7.0c of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.

View File

@@ -1,4 +1,4 @@
README_amisrc.txt for version 7.0aa of Vim: Vi IMproved.
README_amisrc.txt for version 7.0c of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.

View File

@@ -1,4 +1,4 @@
README_bindos.txt for version 7.0aa of Vim: Vi IMproved.
README_bindos.txt for version 7.0c 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.

View File

@@ -1,4 +1,4 @@
README_dos.txt for version 7.0aa of Vim: Vi IMproved.
README_dos.txt for version 7.0c 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.

View File

@@ -1,4 +1,4 @@
README_extra.txt for version 7.0aa of Vim: Vi IMproved.
README_extra.txt for version 7.0c of Vim: Vi IMproved.
The extra archive of Vim is to be used in combination with the source archive
(vim-6.0-src.tar.gz). The extra archive is useless without it.

View File

@@ -1,4 +1,4 @@
README_lang.txt for version 7.0aa of Vim: Vi IMproved.
README_lang.txt for version 7.0c of Vim: Vi IMproved.
This file contains files for non-English languages:
- Translated messages.

View File

@@ -1,4 +1,4 @@
README_mac.txt for version 7.0aa of Vim: Vi IMproved.
README_mac.txt for version 7.0c of Vim: Vi IMproved.
This file explains the installation of Vim on Macintosh systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_ole.txt for version 7.0aa of Vim: Vi IMproved.
README_ole.txt for version 7.0c 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

View File

@@ -1,4 +1,4 @@
README_os2.txt for version 7.0aa of Vim: Vi IMproved.
README_os2.txt for version 7.0c of Vim: Vi IMproved.
This file explains the installation of Vim on OS/2 systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_os_390.txt for version 7.0aa of Vim: Vi IMproved.
README_os_390.txt for version 7.0c of Vim: Vi IMproved.
Welcome to the OS/390 Unix port of VIM.

View File

@@ -1,4 +1,4 @@
README_src.txt for version 7.0aa of Vim: Vi IMproved.
README_src.txt for version 7.0c 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

View File

@@ -1,4 +1,4 @@
README_srcdos.txt for version 7.0aa of Vim: Vi IMproved.
README_srcdos.txt for version 7.0c 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.

View File

@@ -1,4 +1,4 @@
README_unix.txt for version 7.0aa of Vim: Vi IMproved.
README_unix.txt for version 7.0c of Vim: Vi IMproved.
This file explains the installation of Vim on Unix systems.
See "README.txt" for general information about Vim.

View File

@@ -1,4 +1,4 @@
README_vms.txt for version 7.0aa of Vim: Vi IMproved.
README_vms.txt for version 7.0c 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.

View File

@@ -1,4 +1,4 @@
README_w32s.txt for version 7.0aa of Vim: Vi IMproved.
README_w32s.txt for version 7.0c 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.

View File

@@ -22,7 +22,7 @@
!define HAVE_NLS
!define VER_MAJOR 7
!define VER_MINOR 0aa
!define VER_MINOR 0c
# ----------- No configurable settings below this line -----------
@@ -116,7 +116,7 @@ Function .onInit
# $2 - holds the names to create batch files for
StrCpy $0 "$INSTDIR\vim${VER_MAJOR}${VER_MINOR}"
StrCpy $1 "-register-OLE"
StrCpy $2 "gvim evim gview gvimdiff"
StrCpy $2 "gvim evim gview gvimdiff vimtutor"
FunctionEnd
@@ -214,9 +214,18 @@ Section "Vim executables and runtime files"
SetOutPath $0\plugin
File ${VIMRT}\plugin\*.*
SetOutPath $0\autoload
File ${VIMRT}\autoload\*.*
SetOutPath $0\syntax
File ${VIMRT}\syntax\*.*
SetOutPath $0\spell
File ${VIMRT}\spell\*.txt
File ${VIMRT}\spell\*.vim
File ${VIMRT}\spell\*.spl
File ${VIMRT}\spell\*.sug
SetOutPath $0\tools
File ${VIMRT}\tools\*.*

BIN
nsis/icons/disabled.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

BIN
nsis/icons/enabled.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

BIN
nsis/icons/vim_16c.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

View File

@@ -1,44 +0,0 @@
# KDE Config File
[Desktop Entry]
Type=Application
Exec=kvim -f %F
Icon=kvim
MiniIcon=kvim
DocPath=kvim/index.html
Comment=
Comment[xx]=xx
Terminal=0
Name=KVim
Name[eo]=VIM-fasado
Name[sv]=Kvim
Name[xx]=xx
Comment=Text Editor
Comment[ar]=محرر نصوص
Comment[bg]=Текст Редактор
Comment[de]=Texteditor
Comment[el]=Διορθωτής Κειμένου
Comment[eo]=Tekstredaktilo
Comment[et]=Tekstiredaktor
Comment[eu]=Testu Editorea
Comment[fi]=Tekstieditori
Comment[he]=עורך טקסט
Comment[is]=Textaritill
Comment[ja]=テキストエディタ
Comment[lt]=Teksto redaktorius
Comment[mt]=Editur tat-test
Comment[pt_BR]=Editor de Texto
Comment[ro]=Editor de text
Comment[ru]=редактор
Comment[sk]=Textový editor
Comment[sl]=Urejevalnik besedil
Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
Comment[tr]=Metin Düzenleyici
Comment[uk]=Редактор текстів
Comment[vi]=Trình soạn văn bản
Comment[xx]=xx
Comment[zh_CN]=文本编辑器
Comment[zh_TW]=文字編輯器
MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt
X-KDE-StartupNotify=true
X-KDE-AuthorizeAction=shell access

View File

@@ -4,12 +4,18 @@ These are functions used by plugins and for general use. They will be loaded
automatically when the function is invoked. See ":help autoload".
gzip.vim for editing compressed files
netrw.vim browsing (remote) directories and editing remote files
netrw*.vim browsing (remote) directories and editing remote files
tar.vim browsing tar files
zip.vim browsing zip files
paste.vim common code for mswin.vim, menu.vim and macmap.vim
spellfile.vim downloading of a missing spell file
Occult completion files:
Omni completion files:
ccomplete.vim C
csscomplete.vim HTML / CSS
htmlcomplete.vim HTML
javascriptcomplete.vim Javascript
phpcomplete.vim PHP
pycomplete.vim Python
syntaxcomplete.vim from syntax highlighting
xmlcomplete.vim XML (uses files in the xml directory)

View File

@@ -1,13 +1,13 @@
" Vim completion script
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Dec 18
" Last Change: 2006 Mar 24
" This function is used for the 'omnifunc' option.
function! ccomplete#Complete(findstart, base)
if a:findstart
" Locate the start of the item, including "." and "->".
" Locate the start of the item, including ".", "->" and "[...]".
let line = getline('.')
let start = col('.') - 1
let lastword = -1
@@ -24,6 +24,21 @@ function! ccomplete#Complete(findstart, base)
let lastword = start
endif
let start -= 2
elseif line[start - 1] == ']'
" Skip over [...].
let n = 0
let start -= 1
while start > 0
let start -= 1
if line[start] == '['
if n == 0
break
endif
let n -= 1
elseif line[start] == ']' " nested []
let n += 1
endif
endwhile
else
break
endif
@@ -43,20 +58,56 @@ function! ccomplete#Complete(findstart, base)
let base = s:prepended . a:base
" Don't do anything for an empty base, would result in all the tags in the
" tags file.
if base == ''
return []
endif
" init cache for vimgrep to empty
let s:grepCache = {}
" Split item in words, keep empty word after "." or "->".
" "aa" -> ['aa'], "aa." -> ['aa', ''], "aa.bb" -> ['aa', 'bb'], etc.
let items = split(base, '\.\|->', 1)
if len(items) <= 1
" Don't do anything for an empty base, would result in all the tags in the
" tags file.
if base == ''
return []
" We can't use split, because we need to skip nested [...].
let items = []
let s = 0
while 1
let e = match(base, '\.\|->\|\[', s)
if e < 0
if s == 0 || base[s - 1] != ']'
call add(items, strpart(base, s))
endif
break
endif
" Only one part, no "." or "->": complete from tags file.
" When local completion is wanted CTRL-N would have been used.
return map(taglist('^' . base), 'v:val["name"]')
endif
if s == 0 || base[s - 1] != ']'
call add(items, strpart(base, s, e - s))
endif
if base[e] == '.'
let s = e + 1 " skip over '.'
elseif base[e] == '-'
let s = e + 2 " skip over '->'
else
" Skip over [...].
let n = 0
let s = e
let e += 1
while e < len(base)
if base[e] == ']'
if n == 0
break
endif
let n -= 1
elseif base[e] == '[' " nested [...]
let n += 1
endif
let e += 1
endwhile
let e += 1
call add(items, strpart(base, s, e - s))
let s = e
endif
endwhile
" Find the variable items[0].
" 1. in current function (like with "gd")
@@ -68,18 +119,58 @@ function! ccomplete#Complete(findstart, base)
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:])
if len(items) == 1
" Completing one word and it's a local variable: May add '[', '.' or
" '->'.
let match = items[0]
let kind = 'v'
if match(line, '\<' . match . '\s*\[') > 0
let match .= '['
else
let res = s:Nextitem(strpart(line, 0, col), [''], 0, 1)
if len(res) > 0
" There are members, thus add "." or "->".
if match(line, '\*[ \t(]*' . match . '\>') > 0
let match .= '->'
else
let match .= '.'
endif
endif
endif
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)
endif
endif
if len(items) == 1
" Only one part, no "." or "->": complete from tags file.
let tags = taglist('^' . base)
" Remove members, these can't appear without something in front.
call filter(tags, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
" Remove static matches in other files.
call filter(tags, '!has_key(v:val, "static") || !v:val["static"] || bufnr("%") == bufnr(v:val["filename"])')
call extend(res, map(tags, 's:Tag2item(v:val)'))
endif
if len(res) == 0
" Find the variable in the tags file(s)
let diclist = taglist('^' . items[0] . '$')
" Remove members, these can't appear without something in front.
call filter(diclist, 'has_key(v:val, "kind") ? v:val["kind"] != "m" : 1')
let res = []
for i in range(len(diclist))
" New ctags has the "typename" field.
" New ctags has the "typeref" field. Patched version has "typename".
if has_key(diclist[i], 'typename')
call extend(res, s:StructMembers(diclist[i]['typename'], items[1:]))
call extend(res, s:StructMembers(diclist[i]['typename'], items[1:], 1))
elseif has_key(diclist[i], 'typeref')
call extend(res, s:StructMembers(diclist[i]['typeref'], items[1:], 1))
endif
" For a variable use the command, which must be a search pattern that
@@ -88,7 +179,7 @@ function! ccomplete#Complete(findstart, base)
let line = diclist[i]['cmd']
if line[0] == '/' && line[1] == '^'
let col = match(line, '\<' . items[0] . '\>')
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:]))
call extend(res, s:Nextitem(strpart(line, 2, col - 2), items[1:], 0, 1))
endif
endif
endfor
@@ -99,27 +190,181 @@ function! ccomplete#Complete(findstart, base)
" TODO: join previous line if it makes sense
let line = getline('.')
let col = col('.')
let res = s:Nextitem(strpart(line, 0, col), items[1:])
let res = s:Nextitem(strpart(line, 0, col), items[1:], 0, 1)
endif
" If the one and only match was what's already there and it is a composite
" type, add a "." or "->".
if len(res) == 1 && res[0]['match'] == items[-1] && len(s:SearchMembers(res, [''])) > 0
" If the last item(s) are [...] they need to be added to the matches.
let last = len(items) - 1
let brackets = ''
while last >= 0
if items[last][0] != '['
break
endif
let brackets = items[last] . brackets
let last -= 1
endwhile
return map(res, 's:Tagline2item(v:val, brackets)')
endfunc
function! s:GetAddition(line, match, memarg, bracket)
" Guess if the item is an array.
if a:bracket && match(a:line, a:match . '\s*\[') > 0
return '['
endif
" Check if the item has members.
if len(s:SearchMembers(a:memarg, [''], 0)) > 0
" If there is a '*' before the name use "->".
if match(res[0]['tagline'], '\*\s*' . res[0]['match']) > 0
let res[0]['match'] .= '->'
if match(a:line, '\*[ \t(]*' . a:match . '\>') > 0
return '->'
else
let res[0]['match'] .= '.'
return '.'
endif
endif
return ''
endfunction
" Turn the tag info "val" into an item for completion.
" "val" is is an item in the list returned by taglist().
" If it is a variable we may add "." or "->". Don't do it for other types,
" such as a typedef, by not including the info that s:GetAddition() uses.
function! s:Tag2item(val)
let res = {'match': a:val['name']}
let res['extra'] = s:Tagcmd2extra(a:val['cmd'], a:val['name'], a:val['filename'])
let s = s:Dict2info(a:val)
if s != ''
let res['info'] = s
endif
let res['tagline'] = ''
if has_key(a:val, "kind")
let kind = a:val['kind']
let res['kind'] = kind
if kind == 'v'
let res['tagline'] = "\t" . a:val['cmd']
let res['dict'] = a:val
elseif kind == 'f'
let res['match'] = a:val['name'] . '('
endif
endif
return map(res, 'v:val["match"]')
return res
endfunction
" Use all the items in dictionary for the "info" entry.
function! s:Dict2info(dict)
let info = ''
for k in sort(keys(a:dict))
let info .= k . repeat(' ', 10 - len(k))
if k == 'cmd'
let info .= substitute(matchstr(a:dict['cmd'], '/^\s*\zs.*\ze$/'), '\\\(.\)', '\1', 'g')
else
let info .= a:dict[k]
endif
let info .= "\n"
endfor
return info
endfunc
" Parse a tag line and return a dictionary with items like taglist()
function! s:ParseTagline(line)
let l = split(a:line, "\t")
let d = {}
if len(l) >= 3
let d['name'] = l[0]
let d['filename'] = l[1]
let d['cmd'] = l[2]
let n = 2
if l[2] =~ '^/'
" Find end of cmd, it may contain Tabs.
while n < len(l) && l[n] !~ '/;"$'
let n += 1
let d['cmd'] .= " " . l[n]
endwhile
endif
for i in range(n + 1, len(l) - 1)
if l[i] == 'file:'
let d['static'] = 1
elseif l[i] !~ ':'
let d['kind'] = l[i]
else
let d[matchstr(l[i], '[^:]*')] = matchstr(l[i], ':\zs.*')
endif
endfor
endif
return d
endfunction
" Turn a match item "val" into an item for completion.
" "val['match']" is the matching item.
" "val['tagline']" is the tagline in which the last part was found.
function! s:Tagline2item(val, brackets)
let line = a:val['tagline']
let add = s:GetAddition(line, a:val['match'], [a:val], a:brackets == '')
let res = {'word': a:val['match'] . a:brackets . add }
if has_key(a:val, 'info')
" Use info from Tag2item().
let res['info'] = a:val['info']
else
" Parse the tag line and add each part to the "info" entry.
let s = s:Dict2info(s:ParseTagline(line))
if s != ''
let res['info'] = s
endif
endif
if has_key(a:val, 'kind')
let res['kind'] = a:val['kind']
elseif add == '('
let res['kind'] = 'f'
else
let s = matchstr(line, '\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
if s != ''
let res['kind'] = s
endif
endif
if has_key(a:val, 'extra')
let res['menu'] = a:val['extra']
return res
endif
" Isolate the command after the tag and filename.
let s = matchstr(line, '[^\t]*\t[^\t]*\t\zs\(/^.*$/\|[^\t]*\)\ze\(;"\t\|\t\|$\)')
if s != ''
let res['menu'] = s:Tagcmd2extra(s, a:val['match'], matchstr(line, '[^\t]*\t\zs[^\t]*\ze\t'))
endif
return res
endfunction
" Turn a command from a tag line to something that is useful in the menu
function! s:Tagcmd2extra(cmd, name, fname)
if a:cmd =~ '^/^'
" The command is a search command, useful to see what it is.
let x = matchstr(a:cmd, '^/^\s*\zs.*\ze$/')
let x = substitute(x, '\<' . a:name . '\>', '@@', '')
let x = substitute(x, '\\\(.\)', '\1', 'g')
let x = x . ' - ' . a:fname
elseif a:cmd =~ '^\d*$'
" The command is a line number, the file name is more useful.
let x = a:fname . ' - ' . a:cmd
else
" Not recognized, use command and file name.
let x = a:cmd . ' - ' . a:fname
endif
return x
endfunction
" Find composing type in "lead" and match items[0] with it.
" Repeat this recursively for items[1], if it's there.
" When resolving typedefs "depth" is used to avoid infinite recursion.
" Return the list of matches.
function! s:Nextitem(lead, items)
function! s:Nextitem(lead, items, depth, all)
" Use the text up to the variable name and split it in tokens.
let tokens = split(a:lead, '\s\+\|\<')
@@ -128,34 +373,50 @@ function! s:Nextitem(lead, items)
let res = []
for tidx in range(len(tokens))
" Skip tokens starting with a non-ID character.
if tokens[tidx] !~ '^\h'
continue
endif
" Recognize "struct foobar" and "union foobar".
if (tokens[tidx] == 'struct' || tokens[tidx] == 'union') && tidx + 1 < len(tokens)
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items)
let res = s:StructMembers(tokens[tidx] . ':' . tokens[tidx + 1], a:items, a:all)
break
endif
" TODO: add more reserved words
if index(['int', 'float', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0
if index(['int', 'short', 'char', 'float', 'double', 'static', 'unsigned', 'extern'], tokens[tidx]) >= 0
continue
endif
" Use the tags file to find out if this is a typedef.
let diclist = taglist('^' . tokens[tidx] . '$')
for tagidx in range(len(diclist))
" New ctags has the "typename" field.
if has_key(diclist[tagidx], 'typename')
call extend(res, s:StructMembers(diclist[tagidx]['typename'], a:items))
let item = diclist[tagidx]
" New ctags has the "typeref" field. Patched version has "typename".
if has_key(item, 'typeref')
call extend(res, s:StructMembers(item['typeref'], a:items, a:all))
continue
endif
if has_key(item, 'typename')
call extend(res, s:StructMembers(item['typename'], a:items, a:all))
continue
endif
" Only handle typedefs here.
if diclist[tagidx]['kind'] != 't'
if item['kind'] != 't'
continue
endif
" Skip matches local to another file.
if has_key(item, 'static') && item['static'] && bufnr('%') != bufnr(item['filename'])
continue
endif
" For old ctags we recognize "typedef struct aaa" and
" "typedef union bbb" in the tags file command.
let cmd = diclist[tagidx]['cmd']
let cmd = item['cmd']
let ei = matchend(cmd, 'typedef\s\+')
if ei > 1
let cmdtokens = split(strpart(cmd, ei), '\s\+\|\<')
@@ -170,11 +431,11 @@ function! s:Nextitem(lead, items)
endif
endfor
if name != ''
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items))
call extend(res, s:StructMembers(cmdtokens[0] . ':' . name, a:items, a:all))
endif
else
elseif a:depth < 10
" Could be "typedef other_T some_T".
call extend(res, s:Nextitem(cmdtokens[0], a:items))
call extend(res, s:Nextitem(cmdtokens[0], a:items, a:depth + 1, a:all))
endif
endif
endif
@@ -188,9 +449,12 @@ function! s:Nextitem(lead, items)
endfunction
" Search for members of structure "typename" in tags files.
" Return a list with resulting matches.
" Each match is a dictionary with "match" and "tagline" entries.
function! s:StructMembers(typename, items)
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
function! s:StructMembers(typename, items, all)
" Todo: What about local structures?
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
if fnames == ''
@@ -199,33 +463,73 @@ function! s:StructMembers(typename, items)
let typename = a:typename
let qflist = []
while 1
exe 'silent! vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
let qflist = getqflist()
if len(qflist) > 0 || match(typename, "::") < 0
break
let cached = 0
if a:all == 0
let n = '1' " stop at first found match
if has_key(s:grepCache, a:typename)
let qflist = s:grepCache[a:typename]
let cached = 1
endif
" No match for "struct:context::name", remove "context::" and try again.
let typename = substitute(typename, ':[^:]*::', ':', '')
endwhile
else
let n = ''
endif
if !cached
while 1
exe 'silent! ' . n . 'vimgrep /\t' . typename . '\(\t\|$\)/j ' . fnames
let qflist = getqflist()
if len(qflist) > 0 || match(typename, "::") < 0
break
endif
" No match for "struct:context::name", remove "context::" and try again.
let typename = substitute(typename, ':[^:]*::', ':', '')
endwhile
if a:all == 0
" Store the result to be able to use it again later.
let s:grepCache[a:typename] = qflist
endif
endif
" Put matching members in matches[].
let matches = []
for l in qflist
let memb = matchstr(l['text'], '[^\t]*')
if memb =~ '^' . a:items[0]
call add(matches, {'match': memb, 'tagline': l['text']})
" Skip matches local to another file.
if match(l['text'], "\tfile:") < 0 || bufnr('%') == bufnr(matchstr(l['text'], '\t\zs[^\t]*'))
let item = {'match': memb, 'tagline': l['text']}
" Add the kind of item.
let s = matchstr(l['text'], '\t\(kind:\)\=\zs\S\ze\(\t\|$\)')
if s != ''
let item['kind'] = s
if s == 'f'
let item['match'] = memb . '('
endif
endif
call add(matches, item)
endif
endif
endfor
if len(matches) > 0
" No further items, return the result.
if len(a:items) == 1
return matches
endif
" Skip over [...] items
let idx = 1
while 1
if idx >= len(a:items)
return matches " No further items, return the result.
endif
if a:items[idx][0] != '['
break
endif
let idx += 1
endwhile
" More items following. For each of the possible members find the
" matching following members.
return s:SearchMembers(matches, a:items[1:])
return s:SearchMembers(matches, a:items[idx :], a:all)
endif
" Failed to find anything.
@@ -233,25 +537,46 @@ function! s:StructMembers(typename, items)
endfunction
" For matching members, find matches for following items.
function! s:SearchMembers(matches, items)
" When "all" is non-zero find all, otherwise just return 1 if there is any
" member.
function! s:SearchMembers(matches, items, all)
let res = []
for i in range(len(a:matches))
let line = a:matches[i]['tagline']
let e = matchend(line, '\ttypename:')
if e > 0
" Use typename field
let name = matchstr(line, '[^\t]*', e)
call extend(res, s:StructMembers(name, a:items))
let typename = ''
if has_key(a:matches[i], 'dict')
if has_key(a:matches[i].dict, 'typename')
let typename = a:matches[i].dict['typename']
elseif has_key(a:matches[i].dict, 'typeref')
let typename = a:matches[i].dict['typeref']
endif
let line = "\t" . a:matches[i].dict['cmd']
else
let line = a:matches[i]['tagline']
let e = matchend(line, '\ttypename:')
if e < 0
let e = matchend(line, '\ttyperef:')
endif
if e > 0
" Use typename field
let typename = matchstr(line, '[^\t]*', e)
endif
endif
if typename != ''
call extend(res, s:StructMembers(typename, a:items, a:all))
else
" Use the search command (the declaration itself).
let s = match(line, '\t\zs/^')
if s > 0
let e = match(line, a:matches[i]['match'], s)
let e = match(line, '\<' . a:matches[i]['match'] . '\>', s)
if e > 0
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items))
call extend(res, s:Nextitem(strpart(line, s, e - s), a:items, 0, a:all))
endif
endif
endif
if a:all == 0 && len(res) > 0
break
endif
endfor
return res
endfunc

View File

@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2005 Jul 26
" Last Change: 2006 Mar 31
" These functions are used by the gzip plugin.
@@ -84,9 +84,14 @@ fun gzip#read(cmd)
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
execute "silent lockmarks " . l . "r " . tmp
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
else
execute "silent lockmarks " . l . "r " . tmp
endif
else
execute "silent " . l . "r " . tmp
endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,625 @@
" Vim completion script
" Language: Java Script
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Feb 6
function! javascriptcomplete#CompleteJS(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
" Bit risky but JS is rather limited language and local chars shouldn't
" fint way into names
while start >= 0 && line[start - 1] =~ '\k'
let start -= 1
endwhile
let b:compl_context = getline('.')[0:compl_begin]
return start
else
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
" Shortcontext is context without a:base, useful for checking if we are
" looking for objects and for what objects we are looking for
let context = b:compl_context
let shortcontext = substitute(context, a:base.'$', '', '')
unlet! b:compl_context
if exists("b:jsrange")
let file = getline(b:jsrange[0],b:jsrange[1])
unlet! b:jsrange
if len(b:js_extfiles) > 0
let file = b:js_extfiles + file
endif
else
let file = getline(1, '$')
endif
" Completion of properties, methods, etc. {{{
if shortcontext =~ '\.$'
" Complete methods and properties for objects
" DOM separate
let doms = ['style.']
" Arrays
let arrayprop = ['constructor', 'index', 'input', 'length', 'prototype']
let arraymeth = ['concat', 'join', 'pop', 'push', 'reverse', 'shift',
\ 'splice', 'sort', 'toSource', 'toString', 'unshift', 'valueOf',
\ 'watch', 'unwatch']
call map(arraymeth, 'v:val."("')
let arrays = arrayprop + arraymeth
" Boolean - complete subset of array values
" properties - constructor, prototype
" methods - toSource, toString, valueOf
" Date
" properties - constructor, prototype
let datemeth = ['getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds',
\ 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset',
\ 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds',
\ 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds',
\ 'getYear', 'parse', 'parse',
\ 'setDate', 'setDay', 'setFullYear', 'setHours', 'setMilliseconds',
\ 'setMinutes', 'setMonth', 'setSeconds',
\ 'setUTCDate', 'setUTCDay', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds',
\ 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'setTime',
\ 'toGMTString', 'toLocaleString', 'toLocaleDateString', 'toLocaleTimeString',
\ 'toSource', 'toString', 'toUTCString', 'UTC', 'valueOf', 'watch', 'unwatch']
call map(datemeth, 'v:val."("')
let dates = datemeth
" Function
let funcprop = ['arguments', 'arguments.callee', 'arguments.caller', 'arguments.length',
\ 'arity', 'constructor', 'length', 'prototype']
let funcmeth = ['apply', 'call', 'toSource', 'toString', 'valueOf']
call map(funcmeth, 'v:val."("')
let funcs = funcprop + funcmeth
" Math
let mathprop = ['E', 'LN2', 'LN10', 'LOG2E', 'LOG10E', 'PI', 'SQRT1_2', 'SQRT']
let mathmeth = ['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor',
\ 'log', 'max', 'min', 'pow', 'random', 'round', 'sin', 'sqrt', 'tan',
\ 'watch', 'unwatch']
call map(mathmeth, 'v:val."("')
let maths = mathprop + mathmeth
" Number
let numbprop = ['MAX_VALUE', 'MIN_VALUE', 'NaN', 'NEGATIVE_INFINITY', 'POSITIVE_INFINITY',
\ 'constructor', 'prototype']
let numbmeth = ['toExponential', 'toFixed', 'toPrecision', 'toSource', 'toString', 'valueOf',
\ 'watch', 'unwatch']
call map(numbmeth, 'v:val."("')
let numbs = numbprop + numbmeth
" Object
let objeprop = ['constructor', 'prototype']
let objemeth = ['eval', 'toSource', 'toString', 'unwatch', 'watch', 'valueOf']
call map(objemeth, 'v:val."("')
let objes = objeprop + objemeth
" RegExp
let regeprop = ['constructor', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'prototype']
let regemeth = ['exec', 'test', 'toSource', 'toString', 'watch', 'unwatch']
call map(regemeth, 'v:val."("')
let reges = regeprop + regemeth
" String
let striprop = ['constructor', 'length', 'prototype']
let strimeth = ['anchor', 'big', 'blink', 'bold', 'charAt', 'charCodeAt', 'concat',
\ 'fixed', 'fontcolor', 'fontsize', 'fromCharCode', 'indexOf', 'italics',
\ 'lastIndexOf', 'link', 'match', 'replace', 'search', 'slice', 'small',
\ 'split', 'strike', 'sub', 'substr', 'substring', 'sup', 'toLowerCase',
\ 'toSource', 'toString', 'toUpperCase', 'watch', 'unwatch']
call map(strimeth, 'v:val."("')
let stris = striprop + strimeth
" User created properties
let user_props1 = filter(copy(file), 'v:val =~ "this\\.\\k"')
let juser_props1 = join(user_props1, ' ')
let user_props1 = split(juser_props1, '\zethis\.')
unlet! juser_props1
call map(user_props1, 'matchstr(v:val, "this\\.\\zs\\k\\+\\ze")')
let user_props2 = filter(copy(file), 'v:val =~ "\\.prototype\\.\\k"')
let juser_props2 = join(user_props2, ' ')
let user_props2 = split(juser_props2, '\zeprototype\.')
unlet! juser_props2
call map(user_props2, 'matchstr(v:val, "prototype\\.\\zs\\k\\+\\ze")')
let user_props = user_props1 + user_props2
" HTML DOM properties
" Anchors - anchor.
let anchprop = ['accessKey', 'charset', 'coords', 'href', 'hreflang', 'id', 'innerHTML',
\ 'name', 'rel', 'rev', 'shape', 'tabIndex', 'target', 'type', 'onBlur', 'onFocus']
let anchmeth = ['blur', 'focus']
call map(anchmeth, 'v:val."("')
let anths = anchprop + anchmeth
" Area - area.
let areaprop = ['accessKey', 'alt', 'coords', 'hash', 'host', 'hostname', 'href', 'id',
\ 'noHref', 'pathname', 'port', 'protocol', 'search', 'shape', 'tabIndex', 'target']
let areameth = ['onClick', 'onDblClick', 'onMouseOut', 'onMouseOver']
call map(areameth, 'v:val."("')
let areas = areaprop + areameth
" Base - base.
let baseprop = ['href', 'id', 'target']
let bases = baseprop
" Body - body.
let bodyprop = ['aLink', 'background', 'gbColor', 'id', 'link', 'scrollLeft', 'scrollTop',
\ 'text', 'vLink']
let bodys = bodyprop
" Document - document.
let docuprop = ['anchors', 'applets', 'childNodes', 'embeds', 'forms', 'images', 'links', 'stylesheets',
\ 'body', 'cookie', 'documentElement', 'domain', 'lastModified', 'referrer', 'title', 'URL']
let documeth = ['close', 'createAttribute', 'createElement', 'createTextNode', 'focus', 'getElementById',
\ 'getElementsByName', 'getElementsByTagName', 'open', 'write', 'writeln',
\ 'onClick', 'onDblClick', 'onFocus', 'onKeyDown', 'onKeyPress', 'onKeyUp',
\ 'onMouseDown', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'onResize']
call map(documeth, 'v:val."("')
let docuxprop = ['attributes', 'childNodes', 'doctype', 'documentElement', 'firstChild',
\ 'implementation', 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType',
\ 'nodeValue', 'ownerDocument', 'parentNode', 'previousSibling']
let docuxmeth = ['createAttribute', 'createCDATASection',
\ 'createComment', 'createDocument', 'createDocumentFragment',
\ 'createElement', 'createEntityReference', 'createProcessingInstruction',
\ 'createTextNode']
call map(docuxmeth, 'v:val."("')
let docus = docuprop + docuxprop + documeth + docuxmeth
" Form - form.
let formprop = ['elements', 'acceptCharset', 'action', 'encoding', 'enctype', 'id', 'length',
\ 'method', 'name', 'tabIndex', 'target']
let formmeth = ['reset', 'submit', 'onReset', 'onSubmit']
call map(formmeth, 'v:val."("')
let forms = formprop + formmeth
" Frame - frame.
let framprop = ['contentDocument', 'frameBorder', 'id', 'longDesc', 'marginHeight', 'marginWidth',
\ 'name', 'noResize', 'scrolling', 'src']
let frammeth = ['blur', 'focus']
call map(frammeth, 'v:val."("')
let frams = framprop + frammeth
" Frameset - frameset.
let fsetprop = ['cols', 'id', 'rows']
let fsetmeth = ['blur', 'focus']
call map(fsetmeth, 'v:val."("')
let fsets = fsetprop + fsetmeth
" History - history.
let histprop = ['length']
let histmeth = ['back', 'forward', 'go']
call map(histmeth, 'v:val."("')
let hists = histprop + histmeth
" Iframe - iframe.
let ifraprop = ['align', 'frameBorder', 'height', 'id', 'longDesc', 'marginHeight', 'marginWidth',
\ 'name', 'scrolling', 'src', 'width']
let ifras = ifraprop
" Image - image.
let imagprop = ['align', 'alt', 'border', 'complete', 'height', 'hspace', 'id', 'isMap', 'longDesc',
\ 'lowSrc', 'name', 'src', 'useMap', 'vspace', 'width']
let imagmeth = ['onAbort', 'onError', 'onLoad']
call map(imagmeth, 'v:val."("')
let imags = histprop + imagmeth
" Button - accessible only by other properties
let buttprop = ['accessKey', 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let buttmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(buttmeth, 'v:val."("')
let butts = buttprop + buttmeth
" Checkbox - accessible only by other properties
let checprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let checmeth = ['blur', 'click', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(checmeth, 'v:val."("')
let checs = checprop + checmeth
" File upload - accessible only by other properties
let fileprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let filemeth = ['blur', 'focus', 'onBlur', 'onClick', 'onFocus', 'onMouseDown', 'onMouseUp']
call map(filemeth, 'v:val."("')
let files = fileprop + filemeth
" Hidden - accessible only by other properties
let hiddprop = ['defaultValue', 'form', 'id', 'name', 'type', 'value']
let hidds = hiddprop
" Password - accessible only by other properties
let passprop = ['accept', 'accessKey', 'defaultValue',
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly', 'size', 'tabIndex',
\ 'type', 'value']
let passmeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus', 'onKeyDown',
\ 'onKeyPress', 'onKeyUp']
call map(passmeth, 'v:val."("')
let passs = passprop + passmeth
" Radio - accessible only by other properties
let radiprop = ['accept', 'accessKey', 'align', 'alt', 'checked', 'defaultChecked',
\ 'disabled', 'form', 'id', 'name', 'tabIndex', 'type', 'value']
let radimeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
call map(radimeth, 'v:val."("')
let radis = radiprop + radimeth
" Reset - accessible only by other properties
let reseprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
let resemeth = ['blur', 'click', 'focus', 'select', 'onBlur', 'onFocus']
call map(resemeth, 'v:val."("')
let reses = reseprop + resemeth
" Submit - accessible only by other properties
let submprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'size', 'tabIndex', 'type', 'value']
let submmeth = ['blur', 'click', 'focus', 'select', 'onClick', 'onSelectStart']
call map(submmeth, 'v:val."("')
let subms = submprop + submmeth
" Text - accessible only by other properties
let textprop = ['accept', 'accessKey', 'align', 'alt', 'defaultValue',
\ 'disabled', 'form', 'id', 'maxLength', 'name', 'readOnly',
\ 'size', 'tabIndex', 'type', 'value']
let textmeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus', 'onKeyDown',
\ 'onKeyPress', 'onKeyUp', 'onSelect']
call map(textmeth, 'v:val."("')
let texts = textprop + textmeth
" Link - link.
let linkprop = ['charset', 'disabled', 'href', 'hreflang', 'id', 'media',
\ 'rel', 'rev', 'target', 'type']
let linkmeth = ['onLoad']
call map(linkmeth, 'v:val."("')
let links = linkprop + linkmeth
" Location - location.
let locaprop = ['href', 'hash', 'host', 'hostname', 'pathname', 'port', 'protocol',
\ 'search']
let locameth = ['assign', 'reload', 'replace']
call map(locameth, 'v:val."("')
let locas = locaprop + locameth
" Meta - meta.
let metaprop = ['charset', 'content', 'disabled', 'httpEquiv', 'name', 'scheme']
let metas = metaprop
" Navigator - navigator.
let naviprop = ['plugins', 'appCodeName', 'appName', 'appVersion', 'cookieEnabled',
\ 'platform', 'userAgent']
let navimeth = ['javaEnabled', 'taintEnabled']
call map(navimeth, 'v:val."("')
let navis = naviprop + navimeth
" Object - object.
let objeprop = ['align', 'archive', 'border', 'code', 'codeBase', 'codeType', 'data',
\ 'declare', 'form', 'height', 'hspace', 'id', 'name', 'standby', 'tabIndex',
\ 'type', 'useMap', 'vspace', 'width']
let objes = objeprop
" Option - accessible only by other properties
let optiprop = ['defaultSelected',
\ 'disabled', 'form', 'id', 'index', 'label', 'selected', 'text', 'value']
let optis = optiprop
" Screen - screen.
let screprop = ['availHeight', 'availWidth', 'colorDepth', 'height', 'width']
let scres = screprop
" Select - accessible only by other properties
let seleprop = ['options', 'disabled', 'form', 'id', 'length', 'multiple', 'name',
\ 'selectedIndex', 'size', 'tabIndex', 'type', 'value']
let selemeth = ['blur', 'focus', 'remove', 'onBlur', 'onChange', 'onFocus']
call map(selemeth, 'v:val."("')
let seles = seleprop + selemeth
" Style - style.
let stylprop = ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage',
\ 'backgroundPosition', 'backgroundRepeat',
\ 'border', 'borderBottom', 'borderLeft', 'borderRight', 'borderTop',
\ 'borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor',
\ 'borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle',
\ 'borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth',
\ 'borderColor', 'borderStyle', 'borderWidth', 'margin', 'marginBottom',
\ 'marginLeft', 'marginRight', 'marginTop', 'outline', 'outlineStyle', 'outlineWidth',
\ 'outlineColor', 'outlineStyle', 'outlineWidth', 'padding', 'paddingBottom',
\ 'paddingLeft', 'paddingRight', 'paddingTop',
\ 'clear', 'clip', 'clipBottom', 'clipLeft', 'clipRight', 'clipTop', 'content',
\ 'counterIncrement', 'counterReset', 'cssFloat', 'cursor', 'direction',
\ 'display', 'markerOffset', 'marks', 'maxHeight', 'maxWidth', 'minHeight',
\ 'minWidth', 'overflow', 'overflowX', 'overflowY', 'verticalAlign', 'visibility',
\ 'width',
\ 'listStyle', 'listStyleImage', 'listStylePosition', 'listStyleType',
\ 'cssText', 'bottom', 'height', 'left', 'position', 'right', 'top', 'width', 'zindex',
\ 'orphans', 'widows', 'page', 'pageBreakAfter', 'pageBreakBefore', 'pageBreakInside',
\ 'borderCollapse', 'borderSpacing', 'captionSide', 'emptyCells', 'tableLayout',
\ 'color', 'font', 'fontFamily', 'fontSize', 'fontSizeAdjust', 'fontStretch',
\ 'fontStyle', 'fontVariant', 'fontWeight', 'letterSpacing', 'lineHeight', 'quotes',
\ 'textAlign', 'textIndent', 'textShadow', 'textTransform', 'textUnderlinePosition',
\ 'unicodeBidi', 'whiteSpace', 'wordSpacing']
let styls = stylprop
" Table - table.
let tablprop = ['rows', 'tBodies', 'align', 'bgColor', 'border', 'caption', 'cellPadding',
\ 'cellSpacing', 'frame', 'height', 'rules', 'summary', 'tFoot', 'tHead', 'width']
let tablmeth = ['createCaption', 'createTFoot', 'createTHead', 'deleteCaption', 'deleteRow',
\ 'deleteTFoot', 'deleteTHead', 'insertRow']
call map(tablmeth, 'v:val."("')
let tabls = tablprop + tablmeth
" Table data - TableData.
let tdatprop = ['abbr', 'align', 'axis', 'bgColor', 'cellIndex', 'ch', 'chOff',
\ 'colSpan', 'headers', 'noWrap', 'rowSpan', 'scope', 'vAlign', 'width']
let tdats = tdatprop
" Table row - TableRow.
let trowprop = ['cells', 'align', 'bgColor', 'ch', 'chOff', 'rowIndex', 'sectionRowIndex',
\ 'vAlign']
let trowmeth = ['deleteCell', 'insertCell']
call map(trowmeth, 'v:val."("')
let trows = trowprop + trowmeth
" Textarea - accessible only by other properties
let tareprop = ['accessKey', 'cols', 'defaultValue',
\ 'disabled', 'form', 'id', 'name', 'readOnly', 'rows',
\ 'tabIndex', 'type', 'value', 'selectionStart', 'selectionEnd']
let taremeth = ['blur', 'focus', 'select', 'onBlur', 'onChange', 'onFocus']
call map(taremeth, 'v:val."("')
let tares = tareprop + taremeth
" Window - window.
let windprop = ['frames', 'closed', 'defaultStatus', 'encodeURI', 'event', 'history',
\ 'length', 'location', 'name', 'onload', 'opener', 'parent', 'screen', 'self',
\ 'status', 'top', 'XMLHttpRequest', 'ActiveXObject']
let windmeth = ['alert', 'blur', 'clearInterval', 'clearTimeout', 'close', 'confirm', 'focus',
\ 'moveBy', 'moveTo', 'open', 'print', 'prompt', 'scrollBy', 'scrollTo', 'setInterval',
\ 'setTimeout']
call map(windmeth, 'v:val."("')
let winds = windprop + windmeth
" XMLHttpRequest - access by new xxx()
let xmlhprop = ['onreadystatechange', 'readyState', 'responseText', 'responseXML',
\ 'status', 'statusText', 'parseError']
let xmlhmeth = ['abort', 'getAllResponseHeaders', 'getResponseHeaders', 'open',
\ 'send', 'setRequestHeader']
call map(xmlhmeth, 'v:val."("')
let xmlhs = xmlhprop + xmlhmeth
" XML DOM
" Attributes - element.attributes[x].
let xdomattrprop = ['name', 'specified', 'value']
" Element - anyelement.
let xdomelemprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling', 'tagName']
let xdomelemmeth = ['appendChild', 'cloneNode', 'getAttribute', 'getAttributeNode',
\ 'getElementsByTagName', 'hasChildNodes', 'insertBefore', 'normalize',
\ 'removeAttribute', 'removeAttributeNode', 'removeChild', 'replaceChild',
\ 'setAttribute', 'setAttributeNode']
call map(xdomelemmeth, 'v:val."("')
let xdomelems = xdomelemprop + xdomelemmeth
" Node - anynode.
let xdomnodeprop = ['attributes', 'childNodes', 'firstChild', 'lastChild',
\ 'namespaceURI', 'nextSibling', 'nodeName', 'nodeType', 'nodeValue',
\ 'ownerDocument', 'parentNode', 'prefix', 'previousSibling']
let xdomnodemeth = ['appendChild', 'cloneNode',
\ 'hasChildNodes', 'insertBefore', 'removeChild', 'replaceChild']
call map(xdomnodemeth, 'v:val."("')
let xdomnodes = xdomnodeprop + xdomnodemeth
" NodeList
let xdomnliss = ['length', 'item(']
" Error - parseError.
let xdomerror = ['errorCode', 'reason', 'line', 'linepos', 'srcText', 'url', 'filepos']
" Find object type declaration to reduce number of suggestions. {{{
" 1. Get object name
" 2. Find object declaration line
" 3. General declaration follows "= new Type" syntax, additional else
" for regexp "= /re/"
" 4. Make correction for Microsoft.XMLHTTP ActiveXObject
" 5. Repeat for external files
let object = matchstr(shortcontext, '\zs\k\+\ze\(\[.\{-}\]\)\?\.$')
if len(object) > 0
let decl_line = search(object.'.\{-}=\s*new\s*', 'bn')
if decl_line > 0
let object_type = matchstr(getline(decl_line), object.'.\{-}=\s*new\s*\zs\k\+\ze')
if object_type == 'ActiveXObject' && matchstr(getline(decl_line), object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != ''
let object_type = 'XMLHttpRequest'
endif
else
let decl_line = search('var\s*'.object.'\s*=\s*\/', 'bn')
if decl_line > 0
let object_type = 'RegExp'
endif
endif
" We didn't find var declaration in current file but we may have
" something in external files.
if decl_line == 0 && exists("b:js_extfiles")
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "'.object.'.\\{-}=\\s*new\\s*"')
if len(dext_line) > 0
let object_type = matchstr(dext_line[-1], object.'.\{-}=\s*new\s*\zs\k\+\ze')
if object_type == 'ActiveXObject' && matchstr(dext_line[-1], object.'.\{-}=\s*new\s*ActiveXObject\s*(.Microsoft\.XMLHTTP.)') != ''
let object_type = 'XMLHttpRequest'
endif
else
let dext_line = filter(copy(b:js_extfiles), 'v:val =~ "var\s*'.object.'\\s*=\\s*\\/"')
if len(dext_line) > 0
let object_type = 'RegExp'
endif
endif
endif
endif
" }}}
if !exists('object_type')
let object_type = ''
endif
if object_type == 'Date'
let values = dates
elseif object_type == 'Image'
let values = imags
elseif object_type == 'Array'
let values = arrays
elseif object_type == 'Boolean'
" TODO: a bit more than real boolean
let values = arrays
elseif object_type == 'XMLHttpRequest'
let values = xmlhs
elseif object_type == 'String'
let values = stris
elseif object_type == 'RegExp'
let values = reges
elseif object_type == 'Math'
let values = maths
endif
if !exists('values')
" List of properties
if shortcontext =~ 'Math\.$'
let values = maths
elseif shortcontext =~ 'anchors\(\[.\{-}\]\)\?\.$'
let values = anths
elseif shortcontext =~ 'area\.$'
let values = areas
elseif shortcontext =~ 'base\.$'
let values = bases
elseif shortcontext =~ 'body\.$'
let values = bodys
elseif shortcontext =~ 'document\.$'
let values = docus
elseif shortcontext =~ 'forms\(\[.\{-}\]\)\?\.$'
let values = forms
elseif shortcontext =~ 'frameset\.$'
let values = fsets
elseif shortcontext =~ 'history\.$'
let values = hists
elseif shortcontext =~ 'iframe\.$'
let values = ifras
elseif shortcontext =~ 'images\(\[.\{-}\]\)\?\.$'
let values = imags
elseif shortcontext =~ 'links\(\[.\{-}\]\)\?\.$'
let values = links
elseif shortcontext =~ 'location\.$'
let values = locas
elseif shortcontext =~ 'meta\.$'
let values = metas
elseif shortcontext =~ 'navigator\.$'
let values = navis
elseif shortcontext =~ 'object\.$'
let values = objes
elseif shortcontext =~ 'screen\.$'
let values = scres
elseif shortcontext =~ 'style\.$'
let values = styls
elseif shortcontext =~ 'table\.$'
let values = tabls
elseif shortcontext =~ 'TableData\.$'
let values = tdats
elseif shortcontext =~ 'TableRow\.$'
let values = trows
elseif shortcontext =~ 'window\.$'
let values = winds
elseif shortcontext =~ 'parseError\.$'
let values = xdomerror
elseif shortcontext =~ 'attributes\[\d\+\]\.$'
let values = xdomattrprop
else
let values = user_props + arrays + dates + funcs + maths + numbs + objes + reges + stris
let values += doms + anths + areas + bases + bodys + docus + forms + frams + fsets + hists
let values += ifras + imags + links + locas + metas + navis + objes + scres
let values += tabls + trows + tares + winds
let values += xdomnodes + xdomnliss + xdomelems
endif
endif
for m in values
if m =~? '^'.a:base
call add(res, m)
elseif m =~? a:base
call add(res2, m)
endif
endfor
unlet! values
return res + res2
endif
" }}}
" Get variables data.
let variables = filter(copy(file), 'v:val =~ "var\\s"')
call map(variables, 'matchstr(v:val, ".\\{-}var\\s\\+\\zs.*\\ze")')
call map(variables, 'substitute(v:val, ";\\|$", ",", "g")')
let vars = []
" This loop (and next one) is necessary to get variable names from
" constructs like: var var1, var2, var3 = "something";
for i in range(len(variables))
let comma_separated = split(variables[i], ',\s*')
call map(comma_separated, 'matchstr(v:val, "\\k\\+")')
let vars += comma_separated
endfor
let variables = sort(vars)
unlet! vars
" Add "no var" variables.
let undeclared_variables = filter(copy(file), 'v:val =~ "^\\s*\\k\\+\\s*="')
let u_vars = []
for i in range(len(undeclared_variables))
let split_equal = split(undeclared_variables[i], '\s*=')
call map(split_equal, 'matchstr(v:val, "\\k\\+$")')
let u_vars += split_equal
endfor
let variables += sort(u_vars)
unlet! u_vars
" Get functions
let functions = filter(copy(file), 'v:val =~ "^\\s*function\\s"')
let arguments = copy(functions)
call map(functions, 'matchstr(v:val, "^\\s*function\\s\\+\\zs\\k\\+")')
call map(functions, 'v:val."("')
let functions = sort(functions)
" Create table to keep arguments for additional 'menu' info
let b:js_menuinfo = {}
for i in arguments
let g:ia = i
let f_elements = matchlist(i, 'function\s\+\(\k\+\)\s*(\(.\{-}\))')
if len(f_elements) == 3
let b:js_menuinfo[f_elements[1].'('] = f_elements[2]
endif
endfor
" Get functions arguments
call map(arguments, 'matchstr(v:val, "function.\\{-}(\\zs.\\{-}\\ze)")')
let jargs = join(arguments, ',')
let jargs = substitute(jargs, '\s', '', 'g')
let arguments = split(jargs, ',')
let arguments = sort(arguments)
" Built-in functions
let builtin = ['alert(', 'confirm(']
" Top-level HTML DOM objects
let htmldom = ['document', 'anchor', 'area', 'base', 'body', 'document', 'event', 'form', 'frame', 'frameset', 'history', 'iframe', 'image', 'input', 'link', 'location', 'meta', 'navigator', 'object', 'option', 'screen', 'select', 'table', 'tableData', 'tableHeader', 'tableRow', 'textarea', 'window']
call map(htmldom, 'v:val."."')
" Top-level properties
let properties = ['decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent',
\ 'eval', 'Infinity', 'isFinite', 'isNaN', 'NaN', 'Number', 'parseFloat',
\ 'parseInt', 'String', 'undefined', 'escape', 'unescape']
" Keywords
let keywords = ["Array", "Boolean", "Date", "Function", "Math", "Number", "Object", "RegExp", "String", "XMLHttpRequest", "ActiveXObject", "abstract", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double ", "else", "enum", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in ", "instanceof", "int", "interface", "long", "native", "new", "null", "package", "private", "protected", "public", "return", "short", "static", "super ", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with"]
let values = variables + functions + htmldom + arguments + builtin + properties + keywords
for m in values
if m =~? '^'.a:base
call add(res, m)
elseif m =~? a:base
call add(res2, m)
endif
endfor
let menu = res + res2
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if item =~ '($'
let kind = 'f'
if has_key(b:js_menuinfo, item)
let m_info = b:js_menuinfo[item]
else
let m_info = ''
endif
else
let kind = 'v'
let m_info = ''
endif
let final_menu += [{'word':item, 'menu':m_info, 'kind':kind}]
endfor
let g:fm = final_menu
return final_menu
endfunction
" vim:set foldmethod=marker:

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,8 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell, Jr.
" Date: Oct 12, 2005
" Version: 7
" Date: Mar 22, 2006
" Version: 8
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -22,22 +22,27 @@ if exists("g:loaded_netrwFileHandlers") || &cp
endif
let s:keepcpo= &cpo
set cpo&vim
let g:loaded_netrwFileHandlers= "v7"
let g:loaded_netrwFileHandlers= "v8"
" ---------------------------------------------------------------------
" netrwFileHandlers#Init: {{{1
" This functions is here to allow a call to this function to autoload
" the netrwFileHandlers.vim file
fun! netrwFileHandlers#Init()
" call Dfunc("netrwFileHandlers#Init()")
" call Dret("netrwFileHandlers#Init")
" netrwFileHandlers#Invoke: {{{2
fun! netrwFileHandlers#Invoke(exten,fname)
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
if a:exten != "" && exists("*s:NFH_".a:exten)
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.a:fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
endif
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
return 0
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_html: handles html when the user hits "x" when the {{{1
" s:NFH_html: handles html when the user hits "x" when the {{{1
" cursor is atop a *.html file
fun! netrwFileHandlers#NFH_html(pagefile)
" call Dfunc("netrwFileHandlers#NFH_html(".a:pagefile.")")
fun! s:NFH_html(pagefile)
" call Dfunc("s:NFH_html(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
@@ -48,19 +53,19 @@ fun! netrwFileHandlers#NFH_html(pagefile)
" call Decho("executing !netscape ".page)
exe "!netscape \"".page.'"'
else
" call Dret("netrwFileHandlers#NFH_html 0")
" call Dret("s:NFH_html 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_html 1")
" call Dret("s:NFH_html 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_htm: handles html when the user hits "x" when the {{{1
" s:NFH_htm: handles html when the user hits "x" when the {{{1
" cursor is atop a *.htm file
fun! netrwFileHandlers#NFH_htm(pagefile)
" call Dfunc("netrwFileHandlers#NFH_htm(".a:pagefile.")")
fun! s:NFH_htm(pagefile)
" call Dfunc("s:NFH_htm(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
@@ -71,18 +76,18 @@ fun! netrwFileHandlers#NFH_htm(pagefile)
" call Decho("executing !netscape ".page)
exe "!netscape \"".page.'"'
else
" call Dret("netrwFileHandlers#NFH_htm 0")
" call Dret("s:NFH_htm 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_htm 1")
" call Dret("s:NFH_htm 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_jpg: {{{1
fun! netrwFileHandlers#NFH_jpg(jpgfile)
" call Dfunc("netrwFileHandlers#NFH_jpg(jpgfile<".a:jpgfile.">)")
" s:NFH_jpg: {{{1
fun! s:NFH_jpg(jpgfile)
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:jpgfile
@@ -90,181 +95,181 @@ fun! netrwFileHandlers#NFH_jpg(jpgfile)
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
else
" call Dret("netrwFileHandlers#NFH_jpg 0")
" call Dret("s:NFH_jpg 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_jpg 1")
" call Dret("s:NFH_jpg 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_gif: {{{1
fun! netrwFileHandlers#NFH_gif(giffile)
" call Dfunc("netrwFileHandlers#NFH_gif(giffile<".a:giffile.">)")
" s:NFH_gif: {{{1
fun! s:NFH_gif(giffile)
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:giffile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
else
" call Dret("netrwFileHandlers#NFH_gif 0")
" call Dret("s:NFH_gif 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_gif 1")
" call Dret("s:NFH_gif 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_png: {{{1
fun! netrwFileHandlers#NFH_png(pngfile)
" call Dfunc("netrwFileHandlers#NFH_png(pngfile<".a:pngfile.">)")
" s:NFH_png: {{{1
fun! s:NFH_png(pngfile)
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:pngfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
else
" call Dret("netrwFileHandlers#NFH_png 0")
" call Dret("s:NFH_png 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_png 1")
" call Dret("s:NFH_png 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_pnm: {{{1
fun! netrwFileHandlers#NFH_pnm(pnmfile)
" call Dfunc("netrwFileHandlers#NFH_pnm(pnmfile<".a:pnmfile.">)")
" s:NFH_pnm: {{{1
fun! s:NFH_pnm(pnmfile)
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:pnmfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
else
" call Dret("netrwFileHandlers#NFH_pnm 0")
" call Dret("s:NFH_pnm 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_pnm 1")
" call Dret("s:NFH_pnm 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_bmp: visualize bmp files {{{1
fun! netrwFileHandlers#NFH_bmp(bmpfile)
" call Dfunc("netrwFileHandlers#NFH_bmp(bmpfile<".a:bmpfile.">)")
" s:NFH_bmp: visualize bmp files {{{1
fun! s:NFH_bmp(bmpfile)
" call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
else
" call Dret("netrwFileHandlers#NFH_bmp 0")
" call Dret("s:NFH_bmp 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_bmp 1")
" call Dret("s:NFH_bmp 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_pdf: visualize pdf files {{{1
fun! netrwFileHandlers#NFH_pdf(pdf)
" " call Dfunc("netrwFileHandlers#NFH_pdf(pdf<".a:pdf.">)")
" s:NFH_pdf: visualize pdf files {{{1
fun! s:NFH_pdf(pdf)
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe 'silent! !gs "'.a:pdf.'"'
else
" " call Dret("netrwFileHandlers#NFH_pdf 0")
" call Dret("s:NFH_pdf 0")
return 0
endif
" " call Dret("netrwFileHandlers#NFH_pdf 1")
" call Dret("s:NFH_pdf 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_doc: visualize doc files {{{1
fun! netrwFileHandlers#NFH_doc(doc)
" " call Dfunc("netrwFileHandlers#NFH_doc(doc<".a:doc.">)")
" s:NFH_doc: visualize doc files {{{1
fun! s:NFH_doc(doc)
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
if executable("oowriter")
exe 'silent! !oowriter "'.a:doc.'"'
redraw!
else
" " call Dret("netrwFileHandlers#NFH_doc 0")
" call Dret("s:NFH_doc 0")
return 0
endif
" " call Dret("netrwFileHandlers#NFH_doc 1")
" call Dret("s:NFH_doc 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_sxw: visualize sxw files {{{1
fun! netrwFileHandlers#NFH_sxw(sxw)
" " call Dfunc("netrwFileHandlers#NFH_sxw(sxw<".a:sxw.">)")
" s:NFH_sxw: visualize sxw files {{{1
fun! s:NFH_sxw(sxw)
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe 'silent! !oowriter "'.a:sxw.'"'
redraw!
else
" " call Dret("netrwFileHandlers#NFH_sxw 0")
" call Dret("s:NFH_sxw 0")
return 0
endif
" " call Dret("netrwFileHandlers#NFH_sxw 1")
" call Dret("s:NFH_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_xls: visualize xls files {{{1
fun! netrwFileHandlers#NFH_xls(xls)
" " call Dfunc("netrwFileHandlers#NFH_xls(xls<".a:xls.">)")
" s:NFH_xls: visualize xls files {{{1
fun! s:NFH_xls(xls)
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
if executable("oocalc")
exe 'silent! !oocalc "'.a:xls.'"'
redraw!
else
" " call Dret("netrwFileHandlers#NFH_xls 0")
" call Dret("s:NFH_xls 0")
return 0
endif
" " call Dret("netrwFileHandlers#NFH_xls 1")
" call Dret("s:NFH_xls 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_ps: handles PostScript files {{{1
fun! netrwFileHandlers#NFH_ps(ps)
" call Dfunc("netrwFileHandlers#NFH_ps()")
" s:NFH_ps: handles PostScript files {{{1
fun! s:NFH_ps(ps)
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
if executable("gs")
" call Decho("exe silent! !gs ".a:ps)
exe "silent! !gs ".a:ps
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".a:ps
redraw!
elseif executable("ghostscript")
" call Decho("exe silent! !ghostscript ".a:ps)
exe "silent! !ghostscript ".a:ps
redraw!
elseif executable("gswin32")
" call Decho("exe silent! !gswin32 \"".a:ps.'"')
exe "silent! !gswin32 \"".a:ps.'"'
redraw!
else
" call Dret("netrwFileHandlers#NFH_ps 0")
" call Dret("s:NFH_ps 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_ps 1")
" call Dret("s:NFH_ps 1")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_eps: handles encapsulated PostScript files {{{1
fun! netrwFileHandlers#NFH_eps(eps)
" call Dfunc("netrwFileHandlers#NFH_ps()")
" s:NFH_eps: handles encapsulated PostScript files {{{1
fun! s:NFH_eps(eps)
" call Dfunc("s:NFH_eps()")
if executable("gs")
exe "silent! !gs ".a:eps
redraw!
@@ -278,40 +283,42 @@ fun! netrwFileHandlers#NFH_eps(eps)
exe "silent! !gswin32 \"".a:eps.'"'
redraw!
else
" call Dret("netrwFileHandlers#NFH_ps 0")
" call Dret("s:NFH_eps 0")
return 0
endif
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_fig: handles xfig files {{{1
fun! netrwFileHandlers#NFH_fig(fig)
" call Dfunc("netrwFileHandlers#NFH_fig()")
if executable("xfig")
exe "silent! !xfig ".a:fig
redraw!
else
" call Dret("netrwFileHandlers#NFH_fig 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_fig 1")
" call Dret("s:NFH_eps 0")
return 1
endfun
" ---------------------------------------------------------------------
" netrwFileHandlers#NFH_obj: handles tgif's obj files {{{1
fun! netrwFileHandlers#NFH_obj(obj)
" call Dfunc("netrwFileHandlers#NFH_obj()")
" s:NFH_fig: handles xfig files {{{1
fun! s:NFH_fig(fig)
" call Dfunc("s:NFH_fig()")
if executable("xfig")
exe "silent! !xfig ".a:fig
redraw!
else
" call Dret("s:NFH_fig 0")
return 0
endif
" call Dret("s:NFH_fig 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_obj: handles tgif's obj files {{{1
fun! s:NFH_obj(obj)
" call Dfunc("s:NFH_obj()")
if has("unix") && executable("tgif")
exe "silent! !tgif ".a:obj
redraw!
else
" call Dret("netrwFileHandlers#NFH_obj 0")
" call Dret("s:NFH_obj 0")
return 0
endif
" call Dret("netrwFileHandlers#NFH_obj 1")
" call Dret("s:NFH_obj 1")
return 1
endfun

View File

@@ -1,7 +1,7 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Oct 12, 2005
" Date: Mar 22, 2006
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 4
" Version: 6
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@@ -19,7 +19,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v4"
let g:loaded_netrwSettings = "v6"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
@@ -57,8 +57,8 @@ fun! netrwSettings#NetrwSettings()
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: (by Charles E. Campbell, Jr.)'
put ='+ Press ? with cursor atop any line for help '
put ='+ NetrwSettings: by Charles E. Campbell, Jr.'
put ='+ Press <F1> with cursor atop any line for help'
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
@@ -89,7 +89,14 @@ fun! netrwSettings#NetrwSettings()
put ='+ Netrw Browser Control'
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = 'let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_hide = '.g:netrw_hide
@@ -125,7 +132,7 @@ fun! netrwSettings#NetrwSettings()
set nomod
map <buffer> <silent> ? :call NetrwSettingHelp()<cr>
map <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun

View File

@@ -0,0 +1,39 @@
" Vim support file to help with paste mappings and menus
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Mar 09
" Define the string to use for items that are present both in Edit, Popup and
" Toolbar menu. Also used in mswin.vim and macmap.vim.
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
" were characterwise instead. Add to that some tricks to leave the cursor in
" the right position, also for "gi".
if has("virtualedit")
let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"}
let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n']
let paste#paste_cmd['i'] = '<Esc>' . paste#paste_cmd['n'] . 'gi'
func! paste#Paste()
let ove = &ve
set ve=all
normal! `^
if @+ != ''
normal! "+gP
endif
let c = col(".")
normal! i
if col(".") < c " compensate for i<ESC> moving the cursor left
normal! l
endif
let &ve = ove
endfunc
else
let paste#paste_cmd = {'n': "\"=@+.'xy'<CR>gPFx\"_2x"}
let paste#paste_cmd['v'] = '"-c<Esc>gix<Esc>' . paste#paste_cmd['n'] . '"_x'
let paste#paste_cmd['i'] = 'x<Esc>' . paste#paste_cmd['n'] . '"_s'
endif
if has("virtualedit")
else
endif

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,351 @@
"pycomplete.vim - Omni Completion for python
" Maintainer: Aaron Griffin
" Version: 0.3
" Last Updated: 23 January 2006
"
" v0.3 Changes:
" added top level def parsing
" for safety, call returns are not evaluated
" handful of parsing changes
" trailing ( and . characters
" argument completion on open parens
" stop parsing at current line - ++performance, local var resolution
"
" TODO
" RExec subclass
" Code cleanup + make class
" use internal dict, not globals()
if !has('python')
echo "Error: Required vim compiled with +python"
finish
endif
function! pycomplete#Complete(findstart, base)
"findstart = 1 when we need to get the text length
if a:findstart
let line = getline('.')
let idx = col('.')
while idx > 0
let idx -= 1
let c = line[idx-1]
if c =~ '\w'
continue
elseif ! c =~ '\.'
idx = -1
break
else
break
endif
endwhile
return idx
"findstart = 0 when we need to return the list of completions
else
execute "python get_completions('" . a:base . "')"
return g:pycomplete_completions
endif
endfunction
function! s:DefPython()
python << PYTHONEOF
import vim, sys, types
import __builtin__
import tokenize, keyword, cStringIO
LOCALDEFS = \
['LOCALDEFS', 'clean_up','eval_source_code', \
'get_completions', '__builtin__', '__builtins__', \
'dbg', '__name__', 'vim', 'sys', 'parse_to_end', \
'parse_statement', 'tokenize', 'keyword', 'cStringIO', \
'debug_level', 'safe_eval', '_ctor', 'get_arguments', \
'strip_calls', 'types', 'parse_block']
def dbg(level,msg):
debug_level = 1
try:
debug_level = vim.eval("g:pycomplete_debug_level")
except:
pass
if level <= debug_level: print(msg)
def strip_calls(stmt):
parsed=''
level = 0
for c in stmt:
if c in ['[','(']:
level += 1
elif c in [')',']']:
level -= 1
elif level == 0:
parsed += c
##dbg(10,"stripped: %s" % parsed)
return parsed
def get_completions(base):
stmt = vim.eval('expand("<cWORD>")')
#dbg(1,"statement: %s - %s" % (stmt, base))
stmt = stmt+base
eval_source_code()
try:
ridx = stmt.rfind('.')
if stmt[-1] == '(':
match = ""
stmt = strip_calls(stmt[:len(stmt)-1])
all = get_arguments(eval(stmt))
elif ridx == -1:
match = stmt
all = globals() + __builtin__.__dict__
else:
match = stmt[ridx+1:]
stmt = strip_calls(stmt[:ridx])
all = eval(stmt).__dict__
#dbg(15,"completions for: %s, match=%s" % (stmt,match))
completions = []
if type(all) == types.DictType:
for m in all:
if m.find('_') != 0 and m.find(match) == 0 and \
m not in LOCALDEFS:
#dbg(25,"matched... %s, %s" % (m, m.find(match)))
typestr = str(all[m])
if "function" in typestr: m += '('
elif "method" in typestr: m += '('
elif "module" in typestr: m += '.'
elif "class" in typestr: m += '('
completions.append(m)
completions.sort()
else:
completions.append(all)
#dbg(10,"all completions: %s" % completions)
vim.command("let g:pycomplete_completions = %s" % completions)
except:
vim.command("let g:pycomplete_completions = []")
#dbg(1,"exception: %s" % sys.exc_info()[1])
clean_up()
def get_arguments(func_obj):
def _ctor(obj):
try:
return class_ob.__init__.im_func
except AttributeError:
for base in class_ob.__bases__:
rc = _find_constructor(base)
if rc is not None: return rc
return None
arg_offset = 1
if type(func_obj) == types.ClassType: func_obj = _ctor(func_obj)
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
else: arg_offset = 0
#dbg(20,"%s, offset=%s" % (str(func_obj), arg_offset))
arg_text = ''
if type(func_obj) in [types.FunctionType, types.LambdaType]:
try:
cd = func_obj.func_code
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
defaults = func_obj.func_defaults or []
defaults = list(map(lambda name: "=%s" % name, defaults))
defaults = [""] * (len(real_args)-len(defaults)) + defaults
items = map(lambda a,d: a+d, real_args, defaults)
if func_obj.func_code.co_flags & 0x4:
items.append("...")
if func_obj.func_code.co_flags & 0x8:
items.append("***")
arg_text = ", ".join(items) + ')'
except:
#dbg(1,"exception: %s" % 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 = getattr(func_obj, '__doc__', '')
if doc:
doc = doc.lstrip()
pos = doc.find('\n')
if pos > 0:
sigline = doc[:pos]
lidx = sigline.find('(')
ridx = sigline.find(')')
retidx = sigline.find('->')
ret = sigline[retidx+2:].strip()
if lidx > 0 and ridx > 0:
arg_text = sigline[lidx+1:ridx] + ')'
if len(ret) > 0: arg_text += ' #returns %s' % ret
#dbg(15,"argument completion: %s" % arg_text)
return arg_text
def parse_to_end(gen):
stmt=''
level = 0
for type, str, begin, end, line in gen:
if line == vim.eval('getline(\'.\')'): break
elif str == '\\': continue
elif str == ';':
break
elif type == tokenize.NEWLINE and level == 0:
break
elif str in ['[','(']:
level += 1
elif str in [')',']']:
level -= 1
elif level == 0:
stmt += str
#dbg(10,"current statement: %s" % stmt)
return stmt
def parse_block(gen):
lines = []
level = 0
for type, str, begin, end, line in gen:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif type == tokenize.INDENT:
level += 1
elif type == tokenize.DEDENT:
level -= 1
if level == 0: break;
else:
stmt = parse_statement(gen,str)
if len(stmt) > 0: lines.append(stmt)
return lines
def parse_statement(gen,curstr=''):
var = curstr
type, str, begin, end, line = gen.next()
if str == '=':
type, str, begin, end, line = gen.next()
if type == tokenize.NEWLINE:
return ''
elif type == tokenize.STRING or str == 'str':
return '%s = str' % var
elif str == '[' or str == 'list':
return '%s= list' % var
elif str == '{' or str == 'dict':
return '%s = dict' % var
elif type == tokenize.NUMBER:
return '%s = 0' % var
elif str == 'Set':
return '%s = Set' % var
elif str == 'open' or str == 'file':
return '%s = file' % var
else:
inst = str + parse_to_end(gen)
if len(inst) > 0:
#dbg(5,"found [%s = %s]" % (var, inst))
return '%s = %s' % (var, inst)
return ''
def eval_source_code():
LINE=vim.eval('getline(\'.\')')
s = cStringIO.StringIO('\n'.join(vim.current.buffer[:]) + '\n')
g = tokenize.generate_tokens(s.readline)
stmts = []
lineNo = 0
try:
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif begin[0] == lineNo: continue
#junk
elif type == tokenize.INDENT or \
type == tokenize.DEDENT or \
type == tokenize.ERRORTOKEN or \
type == tokenize.ENDMARKER or \
type == tokenize.NEWLINE or \
type == tokenize.COMMENT:
continue
#import statement
elif str == 'import':
import_stmt=parse_to_end(g)
if len(import_stmt) > 0:
#dbg(5,"found [import %s]" % import_stmt)
stmts.append("import %s" % import_stmt)
#import from statement
elif str == 'from':
type, str, begin, end, line = g.next()
mod = str
type, str, begin, end, line = g.next()
if str != "import": break
from_stmt=parse_to_end(g)
if len(from_stmt) > 0:
#dbg(5,"found [from %s import %s]" % (mod, from_stmt))
stmts.append("from %s import %s" % (mod, from_stmt))
#def statement
elif str == 'def':
funcstr = ''
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif str == ':':
stmts += parse_block(g)
break
funcstr += str
if len(funcstr) > 0:
#dbg(5,"found [def %s]" % funcstr)
stmts.append("def %s:\n pass" % funcstr)
#class declaration
elif str == 'class':
type, str, begin, end, line = g.next()
classname = str
#dbg(5,"found [class %s]" % classname)
level = 0
members = []
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif type == tokenize.INDENT:
level += 1
elif type == tokenize.DEDENT:
level -= 1
if level == 0: break;
elif str == 'def':
memberstr = ''
for type, str, begin, end, line in g:
if line.replace('\n','') == vim.eval('getline(\'.\')'): break
elif str == ':':
stmts += parse_block(g)
break
memberstr += str
#dbg(5," member [%s]" % memberstr)
members.append(memberstr)
classstr = 'class %s:' % classname
for m in members:
classstr += ("\n def %s:\n pass" % m)
stmts.append("%s\n" % classstr)
elif keyword.iskeyword(str) or str in globals():
#dbg(5,"keyword = %s" % str)
lineNo = begin[0]
else:
assign = parse_statement(g,str)
if len(assign) > 0: stmts.append(assign)
for s in stmts:
try:
#dbg(15,"evaluating: %s\n" % s)
exec(s) in globals()
except:
#dbg(1,"exception: %s" % sys.exc_info()[1])
pass
except:
#dbg(1,"exception: %s" % sys.exc_info()[1])
pass
def clean_up():
for o in globals().keys():
if o not in LOCALDEFS:
try:
exec('del %s' % o) in globals()
except: pass
sys.path.extend(['.','..'])
PYTHONEOF
endfunction
let g:pycomplete_debug_level = 0
call s:DefPython()
" vim: set et ts=4:

View File

@@ -0,0 +1,111 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Feb 01
if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/unstable/runtime/spell'
endif
let s:spellfile_URL = '' " Start with nothing so that s:donedict is reset.
" This function is used for the spellfile plugin.
function! spellfile#LoadFile(lang)
" If the netrw plugin isn't loaded we silently skip everything.
if !exists(":Nread")
if &verbose
echomsg 'spellfile#LoadFile(): Nread command is not available.'
endif
return
endif
" If the URL changes we try all files again.
if s:spellfile_URL != g:spellfile_URL
let s:donedict = {}
let s:spellfile_URL = g:spellfile_URL
endif
" I will say this only once!
if has_key(s:donedict, a:lang . &enc)
if &verbose
echomsg 'spellfile#LoadFile(): Tried this language/encoding before.'
endif
return
endif
let s:donedict[a:lang . &enc] = 1
" Find spell directories we can write in.
let dirlist = []
let dirchoices = '&Cancel'
for dir in split(globpath(&rtp, 'spell'), "\n")
if filewritable(dir) == 2
call add(dirlist, dir)
let dirchoices .= "\n&" . len(dirlist)
endif
endfor
if len(dirlist) == 0
if &verbose
echomsg 'spellfile#LoadFile(): There is no writable spell directory.'
endif
return
endif
let msg = 'Cannot find spell file for "' . a:lang . '" in ' . &enc
let msg .= "\nDo you want me to try downloading it?"
if confirm(msg, "&Yes\n&No", 2) == 1
let enc = &encoding
if enc == 'iso-8859-15'
let enc = 'latin1'
endif
let fname = a:lang . '.' . enc . '.spl'
" Split the window, read the file into a new buffer.
new
setlocal bin
echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
if getline(2) !~ 'VIMspell'
" Didn't work, perhaps there is an ASCII one.
g/^/d
let fname = a:lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
if getline(2) !~ 'VIMspell'
echo 'Sorry, downloading failed'
bwipe!
return
endif
endif
" Delete the empty first line and mark the file unmodified.
1d
set nomod
let msg = "In which directory do you want to write the file:"
for i in range(len(dirlist))
let msg .= "\n" . (i + 1) . '. ' . dirlist[i]
endfor
let dirchoice = confirm(msg, dirchoices) - 2
if dirchoice >= 0
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
" Also download the .sug file, if the user wants to.
let msg = "Do you want me to try getting the .sug file?\n"
let msg .= "This will improve making suggestions for spelling mistakes,\n"
let msg .= "but it uses quite a bit of memory."
if confirm(msg, "&No\n&Yes") == 2
g/^/d
let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...'
exe 'Nread ' g:spellfile_URL . '/' . fname
if getline(2) !~ 'VIMsug'
echo 'Sorry, downloading failed'
else
1d
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
endif
set nomod
endif
endif
bwipe
endif
endfunc

View File

@@ -0,0 +1,517 @@
" Vim completion script
" Language: SQL
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 2.0
" Last Change: Mon Apr 03 2006 10:21:36 PM
" 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.
if exists('&omnifunc')
" Do not set the option if already set since this
" results in an E117 warning.
if &omnifunc == ""
setlocal omnifunc=sqlcomplete#Complete
endif
endif
if exists('g:loaded_sql_completion')
finish
endif
let g:loaded_sql_completion = 1
" Maintains filename of dictionary
let s:sql_file_table = ""
let s:sql_file_procedure = ""
let s:sql_file_view = ""
" Define various arrays to be used for caching
let s:tbl_name = []
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 = ""
if exists('g:omni_syntax_group_include_sql')
let s:save_inc = g:omni_syntax_group_include_sql
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 = ""
" Default the option to verify table alias
if !exists('g:omni_sql_use_tbl_alias')
let g:omni_sql_use_tbl_alias = 'a'
endif
" Default syntax items to precache
if !exists('g:omni_sql_precache_syntax_groups')
let g:omni_sql_precache_syntax_groups = [
\ 'syntax',
\ 'sqlKeyword',
\ 'sqlFunction',
\ 'sqlOption',
\ 'sqlType',
\ 'sqlStatement'
\ ]
endif
" This function is used for the 'omnifunc' option.
function! sqlcomplete#Complete(findstart, base)
" Default to table name completion
let compl_type = 'table'
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
endif
" First pass through this function determines how much of the line should
" be replaced by whatever is chosen from the completion list
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
if line[start - 1] =~ '\w'
let start -= 1
elseif line[start - 1] =~ '\.' && compl_type =~ 'column'
" If the completion type is column then assume we are looking
" for column completion column_type can be either
" 'column' or 'column_csv'
if lastword == -1 && compl_type == 'column'
" Do not replace the table name prefix or alias
" if completing only a single column name
let lastword = start
endif
let start -= 1
else
break
endif
endwhile
" Return the column of the last word, which is going to be changed.
" Remember the text that comes before it in s:prepended.
if lastword == -1
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, lastword - start)
return lastword
endif
" Second pass through this function will determine what data to put inside
" of the completion list
" s:prepended is set by the first pass
let base = s:prepended . a:base
" Default the completion list to an empty list
let compl_list = []
" Default to table name completion
let compl_type = 'table'
" Allow maps to specify what type of object completion they want
if exists('b:sql_compl_type')
let compl_type = b:sql_compl_type
unlet b:sql_compl_type
endif
if compl_type == 'tableReset'
let compl_type = 'table'
let base = ''
endif
if compl_type == 'table' ||
\ compl_type == 'procedure' ||
\ compl_type == 'view'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if s:sql_file_{compl_type} == ""
let compl_type = substitute(compl_type, '\w\+', '\u&', '')
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
endif
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
if s:sql_file_{compl_type} != ""
if filereadable(s:sql_file_{compl_type})
let compl_list = readfile(s:sql_file_{compl_type})
endif
endif
elseif compl_type == 'column'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
endif
if base != ""
let compl_list = s:SQLCGetColumns(base, '')
let s:save_prev_table = base
let base = ''
endif
elseif compl_type == 'column_csv'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
endif
if base != ""
let compl_list = s:SQLCGetColumns(base, 'csv')
let s:save_prev_table = base
" Join the column array into 1 single element array
" but make the columns column separated
let compl_list = [join(compl_list, ', ')]
let base = ''
endif
elseif compl_type == 'resetCache'
" Reset all cached items
let s:tbl_name = []
let s:tbl_alias = []
let s:tbl_cols = []
let s:syn_list = []
let s:syn_value = []
else
let compl_list = s:SQLCGetSyntaxList(compl_type)
endif
if base != ''
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val =~ "^'.base.'"'
let compl_list = filter(copy(compl_list), expr)
endif
if exists('b:sql_compl_savefunc') && b:sql_compl_savefunc != ""
let &omnifunc = b:sql_compl_savefunc
endif
return compl_list
endfunc
function! s:SQLCWarningMsg(msg)
echohl WarningMsg
echomsg a:msg
echohl None
endfunction
function! s:SQLCErrorMsg(msg)
echohl ErrorMsg
echomsg a:msg
echohl None
endfunction
function! sqlcomplete#PreCacheSyntax(...)
let syn_group_arr = []
if a:0 > 0
let syn_group_arr = a:1
else
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
if !empty(syn_group_arr)
for group_name in syn_group_arr
call s:SQLCGetSyntaxList(group_name)
endfor
endif
endfunction
function! sqlcomplete#Map(type)
" Tell the SQL plugin what you want to complete
let b:sql_compl_type=a:type
" Record previous omnifunc, if the SQL completion
" is being used in conjunction with other filetype
" completion plugins
if &omnifunc != "" && &omnifunc != 'sqlcomplete#Complete'
" Record the previous omnifunc, the plugin
" will automatically set this back so that it
" does not interfere with other ftplugins settings
let b:sql_compl_savefunc=&omnifunc
endif
" Set the OMNI func for the SQL completion plugin
let &omnifunc='sqlcomplete#Complete'
endfunction
function! s:SQLCGetSyntaxList(syn_group)
let syn_group = a:syn_group
let compl_list = []
" Check if we have already cached the syntax list
let list_idx = index(s:syn_list, syn_group, 0, &ignorecase)
if list_idx > -1
" Return previously cached value
let compl_list = s:syn_value[list_idx]
else
" Request the syntax list items from the
" syntax completion plugin
if syn_group == 'syntax'
" Handle this special case. This allows the user
" to indicate they want all the syntax items available,
" so do not specify a specific include list.
let g:omni_syntax_group_include_sql = ''
else
" The user has specified a specific syntax group
let g:omni_syntax_group_include_sql = syn_group
endif
let g:omni_syntax_group_exclude_sql = ''
let syn_value = 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
let s:syn_list = add( s:syn_list, syn_group )
let s:syn_value = add( s:syn_value, syn_value )
let compl_list = syn_value
endif
return compl_list
endfunction
function! s:SQLCCheck4dbext()
if !exists('g:loaded_dbext')
let msg = "The dbext plugin must be loaded for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
:sleep 2
return -1
elseif g:loaded_dbext < 210
let msg = "The dbext plugin must be at least version 2.10 " .
\ " for dynamic SQL completion"
call s:SQLCErrorMsg(msg)
" Leave time for the user to read the error message
:sleep 2
return -1
endif
return 1
endfunction
function! s:SQLCAddAlias(table_name, table_alias, cols)
let table_name = a:table_name
let table_alias = a:table_alias
let cols = a:cols
if g:omni_sql_use_tbl_alias != 'n'
if table_alias == ''
if 'da' =~? g:omni_sql_use_tbl_alias
if table_name =~ '_'
" Treat _ as separators since people often use these
" for word separators
let save_keyword = &iskeyword
setlocal iskeyword-=_
" Get the first letter of each word
" [[:alpha:]] is used instead of \w
" to catch extended accented characters
"
let table_alias = substitute(
\ table_name,
\ '\<[[:alpha:]]\+\>_\?',
\ '\=strpart(submatch(0), 0, 1)',
\ 'g'
\ )
" Restore original value
let &iskeyword = save_keyword
elseif table_name =~ '\u\U'
let initials = substitute(
\ table_name, '\(\u\)\U*', '\1', 'g')
else
let table_alias = strpart(table_name, 0, 1)
endif
endif
endif
if table_alias != ''
" Following a word character, make sure there is a . and no spaces
let table_alias = substitute(table_alias, '\w\zs\.\?\s*$', '.', '')
if 'a' =~? g:omni_sql_use_tbl_alias && a:table_alias == ''
let table_alias = inputdialog("Enter table alias:", table_alias)
endif
endif
if table_alias != ''
let cols = substitute(cols, '\<\w', table_alias.'&', 'g')
endif
endif
return cols
endfunction
function! s:SQLCGetColumns(table_name, list_type)
let table_name = matchstr(a:table_name, '^\w\+')
let table_cols = []
let table_alias = ''
let move_to_top = 1
if g:loaded_dbext >= 210
let saveSettingAlias = DB_listOption('use_tbl_alias')
exec 'DBSetOption use_tbl_alias=n'
endif
" Check if we have already cached the column list for this table
" by its name
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
else
" Check if we have already cached the column list for this table
" by its alias, assuming the table_name provided was actually
" the alias for the table instead
" select *
" from area a
" where a.
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
if list_idx > -1
let table_alias = table_name
let table_name = s:tbl_name[list_idx]
let table_cols = split(s:tbl_cols[list_idx])
endif
endif
" If we have not found a cached copy of the table
" 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
let saveY = @y
let saveSearch = @/
let saveWScan = &wrapscan
let curline = line(".")
let curcol = col(".")
" Do not let searchs wrap
setlocal nowrapscan
" If . was entered, look at the word just before the .
" We are looking for something like this:
" select *
" from customer c
" where c.
" So when . is pressed, we need to find 'c'
"
" 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"
" Start characterwise visual mode
" Advance right one character
" Search foward until one of the following:
" 1. Another select/update/delete statement
" 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'
let query = @y
let query = substitute(query, "\n", ' ', 'g')
let found = 0
" if query =~? '^\(select\|update\|delete\)'
if query =~? '^\(select\)'
let found = 1
" \(\(\<\w\+\>\)\.\)\? -
" 'from.\{-}' - Starting at the from clause
" '\zs\(\(\<\w\+\>\)\.\)\?' - Get the owner name (optional)
" '\<\w\+\>\ze' - Get the table name
" '\s\+\<'.table_name.'\>' - Followed by the alias
" '\s*\.\@!.*' - Cannot be followed by a .
" '\(\<where\>\|$\)' - Must be followed by a WHERE clause
" '.*' - Exclude the rest of the line in the match
let table_name_new = matchstr(@y,
\ 'from.\{-}'.
\ '\zs\(\(\<\w\+\>\)\.\)\?'.
\ '\<\w\+\>\ze'.
\ '\s\+\%(as\s\+\)\?\<'.table_name.'\>'.
\ '\s*\.\@!.*'.
\ '\(\<where\>\|$\)'.
\ '.*'
\ )
if table_name_new != ''
let table_alias = table_name
let table_name = table_name_new
let list_idx = index(s:tbl_name, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let s:tbl_name[list_idx] = table_name
let s:tbl_alias[list_idx] = table_alias
else
let list_idx = index(s:tbl_alias, table_name, 0, &ignorecase)
if list_idx > -1
let table_cols = split(s:tbl_cols[list_idx])
let s:tbl_name[list_idx] = table_name
let s:tbl_alias[list_idx] = table_alias
endif
endif
endif
else
" Simply assume it is a table name provided with a . on the end
let found = 1
endif
let @y = saveY
let @/ = saveSearch
let &wrapscan = saveWScan
" Return to previous location
call cursor(curline, curcol)
if found == 0
if g:loaded_dbext > 201
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
endif
" Not a SQL statement, do not display a list
return []
endif
endif
if empty(table_cols)
" Specify silent mode, no messages to the user (tbl, 1)
" Specify do not comma separate (tbl, 1, 1)
let table_cols_str = DB_getListColumn(table_name, 1, 1)
if table_cols_str != ""
let s:tbl_name = add( s:tbl_name, table_name )
let s:tbl_alias = add( s:tbl_alias, table_alias )
let s:tbl_cols = add( s:tbl_cols, table_cols_str )
let table_cols = split(table_cols_str)
endif
endif
if g:loaded_dbext > 201
exec 'DBSetOption use_tbl_alias='.saveSettingAlias
endif
if a:list_type == 'csv' && !empty(table_cols)
let cols = join(table_cols, ', ')
let cols = s:SQLCAddAlias(table_name, table_alias, cols)
let table_cols = [cols]
endif
return table_cols
endfunction

View File

@@ -1,12 +1,18 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 1.0
" Last Change: Sun Jan 08 2006 10:17:51 PM
" Version: 1.3
" Last Change: Mon Mar 27 2006 9:29:35 PM
" Set completion with CTRL-X CTRL-O to autoloaded function.
if exists('&ofu')
setlocal ofu=syntaxcomplete#Complete
" This check is in place in case this script is
" 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.
if &omnifunc == ""
setlocal omnifunc=syntaxcomplete#Complete
endif
endif
if exists('g:loaded_syntax_completion')
@@ -22,6 +28,7 @@ let s:syn_remove_words = 'match,matchgroup=,contains,'.
let s:cache_name = []
let s:cache_list = []
let s:prepended = ''
" This function is used for the 'omnifunc' option.
function! syntaxcomplete#Complete(findstart, base)
@@ -62,7 +69,7 @@ function! syntaxcomplete#Complete(findstart, base)
if list_idx > -1
let compl_list = s:cache_list[list_idx]
else
let compl_list = s:SyntaxList()
let compl_list = OmniSyntaxList()
let s:cache_name = add( s:cache_name, &filetype )
let s:cache_list = add( s:cache_list, compl_list )
endif
@@ -78,7 +85,7 @@ function! syntaxcomplete#Complete(findstart, base)
return compl_list
endfunc
function! s:SyntaxList()
function! OmniSyntaxList()
let saveL = @l
" Loop through all the syntax groupnames, and build a
@@ -86,63 +93,146 @@ function! s:SyntaxList()
" 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\sytax
" of the filetype. From my casual viewing of the vim7\syntax
" directory.
redir @l
silent! exec 'syntax list '
redir END
let syntax_groups = @l
let syntax_full = "\n".@l
let @l = saveL
if syntax_groups =~ 'E28'
\ || syntax_groups =~ 'E411'
\ || syntax_groups =~ 'E415'
\ || syntax_groups =~ 'No sytax items'
return -1
if syntax_full =~ 'E28'
\ || syntax_full =~ 'E411'
\ || syntax_full =~ 'E415'
\ || syntax_full =~ 'No Syntax items'
return []
endif
" Abort names - match, links to, matchgroup=, start=, contains=, contained,
" cluster=, nextgroup=, end=
" 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'
\ )
endif
endif
" Syntax rules can contain items for more than just the current
" filetype. They can contain additional items added by the user
" via autocmds or their vimrc.
" Some syntax files can be combined (html, php, jsp).
" We want only items that begin with the filetype we are interested in.
let next_group_regex = '\n' .
\ '\zs'.&filetype.'\w\+\ze'.
\ '\s\+xxx\s\+'.
\ '\<\('.
\ substitute(s:syn_remove_words, ',', '\\|', 'g').
\ '\)\@!'
\ '\s\+xxx\s\+'
let syn_list = ''
let index = 0
let index = match(syntax_groups, next_group_regex, index)
let index = match(syntax_full, next_group_regex, index)
while index > 0
let group_name = matchstr( syntax_groups, '\w\+', index )
let group_name = matchstr( syntax_full, '\w\+', index )
let extra_syn_list = s:SyntaxGroupItems(group_name)
let get_syn_list = 1
" if syntax_group_include_{&filetype} == ''
" if syntax_group_exclude_{&filetype} != ''
" if '\<'.syntax_group_exclude_{&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
let syn_list = syn_list . extra_syn_list . "\n"
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)
let syn_list = syn_list . extra_syn_list . "\n"
endif
let index = index + strlen(group_name)
let index = match(syntax_groups, next_group_regex, index)
let index = match(syntax_full, next_group_regex, index)
endwhile
return sort(split(syn_list))
" Convert the string to a List and sort it.
let compl_list = sort(split(syn_list))
if &filetype == 'vim'
let short_compl_list = []
for i in range(len(compl_list))
if i == len(compl_list)-1
let next = i
else
let next = i + 1
endif
if compl_list[next] !~ '^'.compl_list[i].'.$'
let short_compl_list += [compl_list[i]]
endif
endfor
return short_compl_list
else
return compl_list
endif
endfunction
function! s:SyntaxGroupItems( group_name )
let saveL = @l
" Generate (based on the syntax highlight rules) a list of
" the Statements, functions, keywords and so on available
" If this needs updating, the syntax\sql.vim file should be
" updated
redir @l
silent! exec 'syntax list ' . a:group_name
redir END
function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
if @l !~ 'E28'
let syn_list = ""
" From the full syntax listing, strip out the portion for the
" request group.
" Query:
" \n - must begin with a newline
" a:group_name - the group name we are interested in
" \s\+xxx\s\+ - group names are always followed by xxx
" \zs - start the match
" .\{-} - everything ...
" \ze - end the match
" \n\w - at the first newline starting with a character
let syntax_group = matchstr(a:syntax_full,
\ "\n".a:group_name.'\s\+xxx\s\+\zs.\{-}\ze'."\n".'\w'
\)
if syntax_group != ""
" let syn_list = substitute( @l, '^.*xxx\s*\%(contained\s*\)\?', "", '' )
let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" let syn_list = substitute( @l, '^.*xxx\s*', "", '' )
" We only want the words for the lines begining with
" containedin, but there could be other items.
@@ -152,7 +242,7 @@ function! s:SyntaxGroupItems( group_name )
" contained nextgroup=...
" So this will strip off the ending of lines with known
" keywords.
let syn_list = substitute( syn_list, '\<\('.
let syn_list = substitute( syntax_group, '\<\('.
\ substitute(
\ escape( s:syn_remove_words, '\\/.*$^~[]')
\ , ',', '\\|', 'g').
@@ -172,8 +262,6 @@ function! s:SyntaxGroupItems( group_name )
let syn_list = ''
endif
let @l = saveL
return syn_list
endfunction

View File

@@ -1,6 +1,6 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Dec 24, 2005
" Date: Mar 27, 2006
" Version: 7
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
@@ -25,6 +25,7 @@ if exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v7"
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
" Default Settings: {{{1
@@ -34,6 +35,9 @@ endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "OPxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
@@ -50,14 +54,15 @@ fun! tar#Browse(tarfile)
set report=10
" sanity checks
if !executable("tar")
echohl Error | echo '***error*** (tar#Browse) "tar" not available on your system'
if !executable(g:tar_cmd)
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Browse")
return
endif
if !filereadable(a:tarfile)
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
if a:tarfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
@@ -80,20 +85,33 @@ fun! tar#Browse(tarfile)
set ft=tar
" give header
" call Decho("printing header")
exe "$put ='".'\"'." tar.vim version ".g:loaded_tar."'"
exe "$put ='".'\"'." Browsing tarfile ".a:tarfile."'"
exe "$put ='".'\"'." Select a file with cursor and press ENTER"."'"
0d
$
if a:tarfile =~# '\.\(gz\|tgz\)$'
exe "silent r! gzip -d -c '".a:tarfile."'| tar -".g:tar_browseoptions." - "
elseif a:tarfile =~# '\.bz2$'
exe "silent r! bzip2 -d -c '".a:tarfile."'| tar -".g:tar_browseoptions." - "
else
exe "silent r! tar -".g:tar_browseoptions." '".a:tarfile."'"
let tarfile= a:tarfile
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
endif
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
else
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'")
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'"
endif
if v:shell_error != 0
echohl Error | echo '***error*** (tar#Browse) while browsing; check your g:tar_browseoptions<".g:tar_browseoptions.">"
" call Dret("tar#Browse : w:tarfile<".w:tarfile.">")
return
endif
silent %g@/$@d
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>TarBrowseSelect()<cr>
@@ -121,12 +139,21 @@ fun! s:TarBrowseSelect()
" about to make a new window, need to use w:tarfile
let tarfile= w:tarfile
let curfile= expand("%")
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
endif
new
wincmd _
let s:tblfile_{winnr()}= curfile
" call Decho("exe e tarfile:".tarfile.':'.fname)
exe "e tarfile:".tarfile.':'.fname
" if has("unix")
"" call Decho("exe e tarfile:".tarfile.':'.fname)
" exe "e tarfile:".tarfile.':'.fname
" elseif has("win32")
" call tar#Read("tarfile:".tarfile.':'.fname,1)
" endif
call tar#Read("tarfile:".tarfile.':'.fname,1)
filetype detect
let &report= repkeep
@@ -141,7 +168,12 @@ fun! tar#Read(fname,mode)
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}:\(.*\)$','\1','')
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if has("win32") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".tarfile),'\n$','','e')
endif
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -OPxf - '".fname."'")
@@ -151,7 +183,7 @@ fun! tar#Read(fname,mode)
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
else
" call Decho("exe silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'")
exe "silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'"
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." '".tarfile."' '".fname."'"
endif
let w:tarfile= a:fname
exe "file tarfile:".fname
@@ -172,8 +204,8 @@ fun! tar#Write(fname)
set report=10
" sanity checks
if !executable("tar")
echohl Error | echo '***error*** (tar#Browse) "tar" not available on your system'
if !executable(g:tar_cmd)
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")

View File

@@ -0,0 +1,254 @@
" vimball : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: Mar 31, 2006
" Version: 6
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Copyright: (c) 2004-2006 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.
" *** *** Use At-Your-Own-Risk! *** ***
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_vimball")
finish
endif
let s:keepcpo = &cpo
let g:loaded_vimball = "v6"
set cpo&vim
" =====================================================================
" Functions: {{{1
" ---------------------------------------------------------------------
" MkVimball: creates a vimball given a list of paths to files {{{2
" Vimball Format:
" path
" filesize
" [file]
" path
" filesize
" [file]
fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
if !a:writelevel && filereadable(vbname)
echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
return
endif
" user option bypass
let eikeep= &ei
set ei=all
let home = substitute(&rtp,',.*$','','')
let curdir = getcwd()
exe "cd ".home
" record current tab, initialize while loop index
let curtabnr = tabpagenr()
let linenr = a:line1
" call Decho("curtabnr=".curtabnr)
while linenr <= a:line2
let svfile = getline(linenr)
" call Decho("svfile<".svfile.">")
if !filereadable(svfile)
echohl Error | echo "unable to read file<".svfile.">" | echohl None
let &ei= eikeep
exe "cd ".curdir
" call Dret("MkVimball")
return
endif
" create/switch to mkvimball tab
if !exists("vbtabnr")
tabnew
silent! file Vimball
let vbtabnr= tabpagenr()
else
exe "tabn ".vbtabnr
endif
let lastline= line("$") + 1
if lastline == 2 && getline("$") == ""
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
call setline(2,'UseVimball')
call setline(3,'finish')
let lastline= 4
endif
call setline(lastline ,svfile)
call setline(lastline+1,0)
exe "$r ".svfile
call setline(lastline+1,line("$") - lastline - 1)
" call Decho("lastline=".lastline." line$=".line("$"))
" restore to normal tab
exe "tabn ".curtabnr
let linenr= linenr + 1
endwhile
" write the vimball
exe "tabn ".vbtabnr
exe "cd ".curdir
if a:writelevel
exe "w! ".vbname
else
exe "w ".vbname
endif
" call Decho("Vimball<".vbname."> created")
echo "Vimball<".vbname."> created"
" remove the evidence
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
" restore options
let &ei= eikeep
" call Dret("MkVimball")
endfun
" ---------------------------------------------------------------------
" Vimball: {{{2
fun! vimball#Vimball(really)
" call Dfunc("Vimball(really=".a:really.")")
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("Vimball")
return
endif
" initialize
let regakeep = @a
let eikeep = &ei
let vekeep = &ve
let makeep = getpos("'a")
let curtabnr = tabpagenr()
set ei=all ve=all
" set up vimball tab
tabnew
silent! file Vimball
let vbtabnr= tabpagenr()
let didhelp= ""
" go to vim plugin home
let home = substitute(&rtp,',.*$','','')
let curdir = getcwd()
" call Decho("exe cd ".home)
exe "cd ".home
let linenr = 4
let filecnt = 0
" give title to listing of (extracted) files from Vimball Archive
if a:really
echohl Title | echomsg "Vimball Archive" | echohl None
else
echohl Title | echomsg "Vimball Archive Listing" | echohl None
endif
" apportion vimball contents to various files
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
" call Decho("linenr=".linenr." line$=".line("$"))
while 1 < linenr && linenr < line("$")
let fname = getline(linenr)
let fsize = getline(linenr+1)
let filecnt = filecnt + 1
if a:really
echomsg "extracted <".fname.">: ".fsize." lines"
else
echomsg "would extract <".fname.">: ".fsize." lines"
endif
" call Decho(linenr.": will extract file<".fname.">")
" call Decho((linenr+1).": fsize=".fsize)
" make directories if they don't exist yet
let fnamebuf= fname
while fnamebuf =~ '/'
let dirname = substitute(fnamebuf,'/.*$','','e')
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
call mkdir(dirname)
endif
exe "cd ".dirname
endwhile
exe "cd ".home
" grab specified qty of lines and place into "a" buffer
exe linenr
norm! jjma
exe (linenr + fsize + 1)
silent norm! "ay'a
" call Decho("yanked ".fsize." lines into register-a")
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
" call Decho("didhelp<".didhelp.">")
endif
" copy "a" buffer into tab
" call Decho('copy "a buffer into tab#'.vbtabnr)
exe "tabn ".vbtabnr
silent! %d
silent norm! "aPGdd1G
" call Decho("rega<".@a.">")
" write tab to file
if a:really
" call Decho("exe w! ".fname)
exe "silent w! ".fname
endif
" call Decho("exe tabn ".curtabnr)
exe "tabn ".curtabnr
" let oldlinenr = linenr " Decho
let linenr = linenr + fsize + 2
" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] + 2 = ".linenr)
endwhile
" set up help
" call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != ""
" call Decho("exe helptags ".home."/".didhelp)
exe "helptags ".home."/".didhelp
echomsg "did helptags"
endif
" make sure a "Press ENTER..." prompt appears to keep the messages showing!
while filecnt <= &ch
echomsg " "
let filecnt= filecnt + 1
endwhile
" restore events, delete tab and buffer
exe "tabn ".vbtabnr
setlocal nomod bh=wipe
exe "tabn ".curtabnr
exe "tabc ".vbtabnr
let &ei= eikeep
let @a = regakeep
if makeep[0] != 0
" restore mark a
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",makeep)
ka
endif
exe "cd ".curdir
" call Dret("Vimball")
endfun
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" Modelines: {{{1
" vim: fdm=marker

View File

@@ -1,13 +1,13 @@
" Vim completion script
" Language: XHTML 1.0 Strict
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2005 Nov 22
" Last Change: 2006 Mar 31
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
" descriptive to avoid any future conflicts. For example 'xhtml10s' should be
" name for data of XHTML 1.0 Strict and 'xhtml10t' for XHTML 1.0 Transitional
" User interface will be provided by XMLns command defined ...
" User interface will be provided by XMLns command defined in ftplugin/xml.vim
" Currently supported canonicals are:
" xhtml10s - XHTML 1.0 Strict
" xsl - XSL
@@ -54,6 +54,7 @@ endfunction
function! xmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let curline = line('.')
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
@@ -69,11 +70,33 @@ function! xmlcomplete#CompleteTags(findstart, base)
endif
let b:compl_context = getline('.')[0:(compl_begin)]
let b:compl_context = matchstr(b:compl_context, '.*<\zs.*')
if b:compl_context !~ '<[^>]*$'
" Look like we may have broken tag. Check previous lines. Up to
" 10?
let i = 1
while 1
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline)
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$' || i == curline
" Normal tag line, no need for completion at all
" OR reached first line without tag at all
let b:compl_context = ''
break
endif
let i += 1
endwhile
" Make sure we don't have counter
unlet! i
endif
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
" Make sure we will have only current namespace
unlet! b:xml_namespace
let b:xml_namespace = matchstr(b:compl_context, '^\k*\ze:')
let b:xml_namespace = matchstr(b:compl_context, '^<\zs\k*\ze:')
if b:xml_namespace == ''
let b:xml_namespace = 'DEFAULT'
endif
@@ -89,7 +112,10 @@ function! xmlcomplete#CompleteTags(findstart, base)
let res = []
let res2 = []
" a:base is very short - we need context
let context = b:compl_context
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
endif
let context = matchstr(b:compl_context, '^<\zs.*')
unlet! b:compl_context
" Make entities completion
@@ -111,13 +137,24 @@ function! xmlcomplete#CompleteTags(findstart, base)
let values = intent + values
endif
for m in values
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
if len(a:base) == 1
for m in values
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
else
for m in values
if m =~? '^'.a:base
call add(res, m.';')
elseif m =~? a:base
call add(res2, m.';')
endif
endfor
return res
return res + res2
endif
endif
if context =~ '>'
@@ -187,32 +224,54 @@ function! xmlcomplete#CompleteTags(findstart, base)
let attrs = ['encoding', 'version="1.0"', 'version']
elseif tag =~ '^!'
" Don't make completion at all
"
return []
else
if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag)
" Abandon when data file isn't complete
return []
endif
let attrs = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1])
endif
for m in sort(attrs)
if m =~ '^'.attr
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m][0] =~ '^BOOL$'
call add(res, m)
elseif m =~ '='
call add(res, m)
else
call add(res, m.'="')
endif
call add(res, m)
elseif m =~ attr
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][m][0] =~ '^BOOL$'
call add(res, m)
elseif m =~ '='
call add(res, m)
else
call add(res2, m.'="')
endif
call add(res2, m)
endif
endfor
return res + res2
let menu = res + res2
let final_menu = []
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmlattrinfo')
for i in range(len(menu))
let item = menu[i]
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'], item)
let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][0]
let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmlattrinfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
else
let item .= '="'
endif
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
endfor
else
for i in range(len(menu))
let item = menu[i]
if tag !~ '^[?!]' && len(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item]) > 0 && g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
else
let item .= '="'
endif
let final_menu += [item]
endfor
endif
return final_menu
endif
" Close tag
@@ -265,25 +324,50 @@ function! xmlcomplete#CompleteTags(findstart, base)
" Deal with tag completion.
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
let opentag = substitute(opentag, '^\k*:', '', '')
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
let context = substitute(context, '^\k*:', '', '')
if b:xml_namespace == 'DEFAULT'
let b:xml_namespace = ''
if opentag == ''
"return []
let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]})
call filter(tags, 'v:val !~ "^vimxml"')
else
let b:xml_namespace .= ':'
if !has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, tag)
" Abandon when data file isn't complete
return []
endif
let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
endif
let context = substitute(context, '^\k*:', '', '')
for m in tags
if m =~ '^'.context
call add(res, b:xml_namespace.m)
call add(res, m)
elseif m =~ context
call add(res2, b:xml_namespace.m)
call add(res2, m)
endif
endfor
return res + res2
let menu = res + res2
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}, 'vimxmltaginfo')
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if has_key(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'], item)
let m_menu = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][0]
let m_info = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}['vimxmltaginfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if b:xml_namespace == 'DEFAULT'
let xml_namespace = ''
else
let xml_namespace = b:xml_namespace.':'
endif
let final_menu += [{'word':xml_namespace.item, 'menu':m_menu, 'info':m_info}]
endfor
else
let final_menu = menu
endif
return final_menu
endif
endfunction
@@ -357,11 +441,11 @@ return ''
endfunction
function! s:InComment()
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment'
return synIDattr(synID(line('.'), col('.'), 0), 'name') =~ 'Comment\|String'
endfunction
function! s:InCommentAt(line, col)
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment'
return synIDattr(synID(a:line, a:col, 0), 'name') =~ 'Comment\|String'
endfunction
function! s:SetKeywords()

View File

@@ -1,7 +1,7 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Dec 21, 2005
" Version: 6
" Date: Mar 22, 2006
" Version: 7
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
@@ -22,7 +22,8 @@ if exists("g:loaded_zip")
finish
endif
let g:loaded_zip= "v6"
let g:loaded_zip = "v7"
let s:zipfile_escape = ' ?&;\'
" ----------------
" Functions: {{{1
@@ -53,6 +54,7 @@ fun! zip#Browse(zipfile)
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
return
endif
" call Decho("passed sanity checks")
if &ma != 1
set ma
endif
@@ -73,10 +75,15 @@ fun! zip#Browse(zipfile)
0d
$
exe "silent r! unzip -l ".a:zipfile
" call Decho("exe silent r! unzip -l '".a:zipfile."'")
exe "silent r! unzip -l '".a:zipfile."'"
" 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
silent 4,$v/^\s\+\d\+\s\{0,5}\d/d
silent 4,$s/^\%(.*\)\s\+\(\S\)/\1/
exe 'silent 4,$s/^.*\%'.namecol.'c//'
setlocal noma nomod ro
noremap <silent> <buffer> <cr> :call <SID>ZipBrowseSelect()<cr>
@@ -112,11 +119,14 @@ fun! s:ZipBrowseSelect()
" get zipfile to the new-window
let zipfile= substitute(w:zipfile,'.zip$','','e')
let curfile= expand("%")
" call Decho("zipfile<".zipfile.">")
" call Decho("curfile<".curfile.">")
new
wincmd _
let s:zipfile_{winnr()}= curfile
exe "e zipfile:".zipfile.':'.fname
" call Decho("exe e zipfile:".escape(zipfile,s:zipfile_escape).':'.escape(fname,s:zipfile_escape))
exe "e zipfile:".escape(zipfile,s:zipfile_escape).':'.escape(fname,s:zipfile_escape)
filetype detect
let &report= repkeep
@@ -130,11 +140,12 @@ fun! zip#Read(fname,mode)
let repkeep= &report
set report=10
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):.*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\(.*\)$','\1','')
let zipfile = substitute(a:fname,'zipfile:\(.\{-}\):[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile:.\{-}:\([^\\].*\)$','\1','')
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "r! unzip -p ".zipfile." ".fname
" call Decho("exe r! unzip -p '".zipfile."' '".fname."'")
exe "silent r! unzip -p '".zipfile."' '".fname."'"
" cleanup
0d
@@ -147,7 +158,7 @@ endfun
" ---------------------------------------------------------------------
" zip#Write: {{{2
fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.") zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
" call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
@@ -204,6 +215,7 @@ fun! zip#Write(fname)
if executable("cygpath")
let dirpath = substitute(system("cygpath ".dirpath),'\n','','e')
endif
" call Decho("mkdir(dirpath<".dirpath.">,p)")
call mkdir(dirpath,"p")
endif
if zipfile !~ '/'
@@ -211,13 +223,13 @@ fun! zip#Write(fname)
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "w! ".fname
exe "w! ".escape(fname,s:zipfile_escape)
if executable("cygpath")
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
endif
" call Decho("zip -u ".zipfile.".zip ".fname)
call system("zip -u ".zipfile.".zip ".fname)
" call Decho("zip -u '".zipfile.".zip' '".fname."'")
call system("zip -u '".zipfile.".zip' '".fname."'")
if v:shell_error != 0
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()

View File

@@ -2,7 +2,7 @@
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2003 May 02
" Last Change: 2006 Mar 26
hi clear
set background=dark
@@ -37,6 +37,12 @@ hi PreProc term=underline ctermfg=darkblue guifg=#ff80ff
hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#60ff60
hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black
hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow
hi CursorLine term=underline guibg=#555555
hi CursorColumn term=underline guibg=#555555
hi MatchParen term=reverse guibg=Blue
hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
hi link IncSearch Visual
hi link String Constant
hi link Character Constant

View File

@@ -28,6 +28,7 @@ DOCS = \
farsi.txt \
filetype.txt \
fold.txt \
getscript.txt \
gui.txt \
gui_w16.txt \
gui_w32.txt \
@@ -71,6 +72,7 @@ DOCS = \
pattern.txt \
pi_gzip.txt \
pi_netrw.txt \
pi_paren.txt \
pi_spec.txt \
pi_tar.txt \
pi_zip.txt \
@@ -88,7 +90,9 @@ DOCS = \
sponsor.txt \
starting.txt \
spell.txt \
sql.txt \
syntax.txt \
tabpage.txt \
tagsrch.txt \
term.txt \
tips.txt \
@@ -119,6 +123,7 @@ DOCS = \
usr_29.txt \
usr_30.txt \
usr_31.txt \
usr_32.txt \
usr_40.txt \
usr_41.txt \
usr_42.txt \
@@ -133,6 +138,7 @@ DOCS = \
version6.txt \
version7.txt \
vi_diff.txt \
vimball.txt \
visual.txt \
windows.txt \
workshop.txt
@@ -152,13 +158,13 @@ HTMLS = \
farsi.html \
filetype.html \
fold.html \
getscript.html \
gui.html \
gui_w16.html \
gui_w32.html \
gui_x11.html \
hangulin.html \
hebrew.html \
help.html \
howto.html \
if_cscop.html \
if_mzsch.html \
@@ -170,6 +176,7 @@ HTMLS = \
if_tcl.html \
indent.html \
index.html \
vimindex.html \
insert.html \
intro.html \
map.html \
@@ -195,6 +202,7 @@ HTMLS = \
pattern.html \
pi_gzip.html \
pi_netrw.html \
pi_paren.html \
pi_spec.html \
print.html \
quickfix.html \
@@ -210,7 +218,9 @@ HTMLS = \
sponsor.html \
starting.html \
spell.html \
sql.html \
syntax.html \
tabpage.html \
tagsrch.html \
tags.html \
term.html \
@@ -242,6 +252,7 @@ HTMLS = \
usr_29.html \
usr_30.html \
usr_31.html \
usr_32.html \
usr_40.html \
usr_41.html \
usr_42.html \
@@ -256,6 +267,7 @@ HTMLS = \
version6.html \
version7.html \
vi_diff.html \
vimball.txt \
visual.html \
windows.html \
workshop.html
@@ -321,6 +333,14 @@ noerrors:
.txt.html:
$(AWK) -f makehtml.awk $< >$@
# index.html is the starting point for HTML, but for the help files it is
# help.txt. Therefore use vimindex.html for index.txt.
index.html: help.txt
$(AWK) -f makehtml.awk help.txt >index.html
vimindex.html: index.txt
$(AWK) -f makehtml.awk index.txt >vimindex.html
tags.ref tags.html: tags
$(AWK) -f maketags.awk tags >tags.html
@@ -389,6 +409,8 @@ os_risc.txt:
os_win32.txt:
touch os_win32.txt
# Note that $< works with GNU make while $> works for BSD make.
# Is there a solution that works for both??
vim-fr.UTF-8.1: vim-fr.1
iconv -f latin1 -t utf-8 $< >$@

View File

@@ -1,4 +1,4 @@
*arabic.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*arabic.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Nadim Shaikli

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
*autocmd.txt* For Vim version 7.0c. Last change: 2006 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -270,16 +270,28 @@ Name triggered by ~
Various
|FileChangedShell| Vim notices that a file changed since editing started
|FileChangedShellPost| After handling a file changed since editing started
|FileChangedRO| before making the first change to a read-only file
|FuncUndefined| a user function is used but it isn't defined
|ShellCmdPost| after executing a shell command
|ShellFilterPost| after filtering with a shell command
|FuncUndefined| a user function is used but it isn't defined
|SpellFileMissing| a spell file is used but it can't be found
|SourcePre| before sourcing a Vim script
|VimResized| after the Vim window size changed
|FocusGained| Vim got input focus
|FocusLost| Vim lost input focus
|CursorHold| the user doesn't press a key for a while
|CursorHoldI| the user doesn't press a key for a while in Insert mode
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
|WinEnter| after entering another window
|WinLeave| before leaving a window
|TabEnter| after entering another tab page
|TabLeave| before leaving a tab page
|CmdwinEnter| after entering the command-line window
|CmdwinLeave| before leaving the command-line window
@@ -439,6 +451,7 @@ CmdwinLeave Before leaving the command-line window.
|cmdwin-char|
*ColorScheme*
ColorScheme After loading a color scheme. |:colorscheme|
*CursorHold*
CursorHold When the user doesn't press a key for the time
specified with 'updatetime'. Not re-triggered
@@ -459,6 +472,21 @@ CursorHold When the user doesn't press a key for the time
:let &ro = &ro
< {only on Amiga, Unix, Win32, MSDOS and all GUI
versions}
*CursorHoldI*
CursorHoldI Just like CursorHold, but in Insert mode.
*CursorMoved*
CursorMoved After the cursor was moved in Normal mode.
Also when the text of the cursor line has been
changed, e.g., with "x", "rx" or "p".
Not triggered when there is typeahead or when
an operator is pending.
For an example see |match-parens|.
Careful: Don't do anything that the user does
not expect or that is slow.
*CursorMovedI*
CursorMovedI After the cursor was moved in Insert mode.
Otherwise the same as CursorMoved.
*EncodingChanged*
EncodingChanged Fires off after the 'encoding' option has been
changed. Useful to set up fonts, for example.
@@ -482,6 +510,10 @@ FileChangedRO Before making the first change to a read-only
just before the change is applied to the text.
WARNING: If the autocommand moves the cursor
the effect of the change is undefined.
*E788*
It is not allowed to change to another buffer
here. You can reload the buffer but not edit
another one.
*FileChangedShell*
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.
@@ -511,6 +543,9 @@ FileChangedShell When Vim notices that the modification time of
commands for the FileChangedShell event no
other FileChangedShell event will be
triggered.
*FileChangedShellPost*
FileChangedShellPost After handling a file that was changed outside
of Vim. Can be used to update the statusline.
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
to |EncodingChanged|.
@@ -619,11 +654,12 @@ MenuPopup Just before showing the popup menu (under the
c Commmand line
*QuickFixCmdPre*
QuickFixCmdPre Before a quickfix command is run (|:make|,
|:grep|, |:grepadd|, |:vimgrep|,
|:vimgrepadd|). The pattern is matched against
the command being run. When |:grep| is used
but 'grepprg' is set to "internal" it still
matches "grep".
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|:vimgrepadd|, |:vimgrepadd|). 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
@@ -643,6 +679,21 @@ RemoteReply When a reply from a Vim that functions as
*SessionLoadPost*
SessionLoadPost After loading the session file created using
the |:mksession| command.
*ShellCmdPost*
ShellCmdPost After executing a shell command with |:!cmd|,
|:shell|, |:make| and |:grep|. Can be used to
check for any changed files.
*ShellFilterPost*
ShellFilterPost After executing a shell command with
":{range}!cmd", ":w !cmd" or ":r !cmd".
Can be used to check for any changed files.
*SourcePre*
SourcePre Before sourcing a Vim script. |:source|
*SpellFileMissing*
SpellFileMissing When trying to load a spell checking file and
it can't be found. <amatch> is the language,
'encoding' also matters. See
|spell-SpellFileMissing|.
*StdinReadPost*
StdinReadPost After reading from the stdin into the buffer,
before executing the modelines. Only used
@@ -680,6 +731,14 @@ Syntax When the 'syntax' option has been set.
where this option was set, and <amatch> for
the new value of 'syntax'.
See |:syn-on|.
*TabEnter*
TabEnter Just after entering a tab page. |tab-page|
Before triggering the WinEnter and BufEnter
events.
*TabLeave*
TabLeave Just before leaving a tab page. |tab-page|
A WinLeave event will have been triggered
first.
*TermChanged*
TermChanged After the value of 'term' has changed. Useful
for re-loading the syntax file to update the
@@ -714,6 +773,10 @@ 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|.
*VimResized*
VimResized After the Vim window was resized, thus 'lines'
and/or 'columns' changed. Not when starting
up though.
*WinEnter*
WinEnter After entering another window. Not done for
the first window, when Vim has just started.

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2005 Dec 16
*change.txt* For Vim version 7.0c. Last change: 2006 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -728,6 +728,7 @@ Examples: >
:s/\([abc]\)\([efg]\)/\2\1/g modifies "af fa bg" to "fa fa gb"
:s/abcde/abc^Mde/ modifies "abcde" to "abc", "de" (two lines)
:s/$/\^M/ modifies "abcde" to "abcde^M"
:s/\w\+/\u\0/g modifies "bla bla" to "Bla Bla"
Note: In previous versions CTRL-V was handled in a special way. Since this is
not Vi compatible, this was removed. Use a backslash instead.
@@ -765,6 +766,10 @@ break the line.
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).
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
breaks themselves.
The whole matched text can be accessed with "submatch(0)". The text matched
with the first pair of () with "submatch(1)". Likewise for further
sub-matches in ().
@@ -1168,12 +1173,18 @@ The next three commands always work on whole lines.
*gq*
gq{motion} Format the lines that {motion} moves over.
If 'formatprg' is empty formatting is done internally
and the 'textwidth' option controls the length of each
formatted line (see below).
Formatting is done with one of three methods:
1. If 'formatexpr' is not empty the expression is
evaluated. This can differ for each buffer.
2. If 'formatprg' is not empty an external program
is used.
3. Otherise formatting is done internally.
In the third case the 'textwidth' option controls the
length of each formatted line (see below).
If the 'textwidth' option is 0, the formatted line
length is the screen width (with a maximum width of
79). {not in Vi}
79).
The 'formatoptions' option controls the type of
formatting |fo-table|.
The cursor is left on the first non-blank of the last
@@ -1193,8 +1204,8 @@ gqq Format the current line. {not in Vi}
*gw*
gw{motion} Format the lines that {motion} moves over. Similar to
|gq| but puts the cursor back at the same position in
the text. However, 'formatprg' is not used.
{not in Vi}
the text. However, 'formatprg' and 'formatexpr' are
not used. {not in Vi}
gwgw *gwgw* *gww*
gww Format the current line as with "gw". {not in Vi}
@@ -1225,9 +1236,10 @@ white space!).
The 'joinspaces' option is used when lines are joined together.
You can set the 'formatprg' option to the name of an external program for Vim
to use for text formatting. The 'textwidth' and other options have no effect
on formatting by an external program.
You can set the 'formatexpr' option to an expression or the 'formatprg' option
to the name of an external program for Vim to use for text formatting. The
'textwidth' and other options have no effect on formatting by an external
program.
*right-justify*
There is no command in Vim to right justify text. You can do it with

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Dec 30
*cmdline.txt* For Vim version 7.0c. Last change: 2006 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,8 +153,9 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
*c_CTRL-R_=*
'=' the expression register: you are prompted to
enter an expression (see |expression|)
(doesn't work at the expression prompt; uses
the |sandbox| to avoid side effects)
(doesn't work at the expression prompt; some
things such as changing the buffer or current
window are not allowed to avoid side effects)
See |registers| about registers. {not in Vi}
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
@@ -171,8 +172,11 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
'path' as in |gf|
CTRL-W the Word under the cursor
CTRL-A the WORD under the cursor; see |WORD|
When 'incsearch' is set the cursor position of the currently
displayed match is used.
When 'incsearch' is set the cursor position at the end of the
currently displayed match is used. With CTRL-W the part of
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
included}
@@ -353,6 +357,7 @@ word before the cursor. This is available for:
- File names: Only after a command that accepts a file name or a setting for
an option that can be set to a file name. This is called file name
completion.
- Shell command names: After ":!cmd", ":r !cmd" and ":w !cmd". $PATH is used.
- Options: Only after the ":set" command.
- Mappings: Only after a ":map" or similar command.
- Variable and function names: Only after a ":if", ":call" or similar command.
@@ -397,6 +402,9 @@ CTRL-L A match is done on the pattern in front of the cursor. If
If there are multiple matches the longest common part is
inserted in place of the pattern. If the result is shorter
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.
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
@@ -478,6 +486,7 @@ followed by another command:
:global
:help
:helpfind
:lcscope
:make
:normal
:perl
@@ -740,12 +749,13 @@ Note: these are typed literally, they are not special keys!
<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" it is the current
buffer, the file being read is not in a buffer).
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
which this autocommand was executed. It differs from
<afile> only when the file name isn't used to match with
(for FileType and Syntax events).
(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
@@ -968,6 +978,11 @@ that there will be an extra screen redraw.
The buffer used for the command-line window is deleted. Any changes to lines
other than the one that is executed with <CR> are lost.
If you would like to execute the command under the cursor and then have the
command-line window open again, you may find this mapping useful: >
:map <F5> <CR>q:
VARIOUS

View File

@@ -1,4 +1,4 @@
*debug.txt* For Vim version 7.0aa. Last change: 2005 Dec 17
*debug.txt* For Vim version 7.0c. Last change: 2005 Dec 17
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*debugger.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*debugger.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Gordon Prieur

View File

@@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.0aa. Last change: 2006 Jan 12
*develop.txt* For Vim version 7.0c. Last change: 2006 Mar 09
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -149,6 +149,7 @@ VIM IS... NOT *design-not*
A satirical way to say this: "Unlike Emacs, Vim does not attempt to include
everything but the kitchen sink, but some people say that you can clean one
with it. ;-)"
To use Vim with gdb see: http://www.agide.org and http://clewn.sf.net.
- Vim is not a fancy GUI editor that tries to look nice at the cost of
being less consistent over all platforms. But functional GUI features are
welcomed.
@@ -187,8 +188,8 @@ strchr() vim_strchr() Accepts special characters
strrchr() vim_strrchr() Accepts special characters
isspace() vim_isspace() Can handle characters > 128
iswhite() vim_iswhite() Only TRUE for Tab and space
memcpy() vim_memmove() Handles overlapped copies
bcopy() vim_memmove() Handles overlapped copies
memcpy() mch_memmove() Handles overlapped copies
bcopy() mch_memmove() Handles overlapped copies
memset() vim_memset() Uniform for all systems

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0aa. Last change: 2005 Sep 21
*diff.txt* For Vim version 7.0c. Last change: 2006 Apr 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41,12 +41,18 @@ the file.
This only works when a standard "diff" command is available. See 'diffexpr'.
Diffs are local to the current tab page |tab-page|. You can't see diffs with
a window in another tab page. This does make it possible to have several
diffs at the same time, each in their own tab page.
What happens is that Vim opens a window for each of the files. This is like
using the |-O| argument. This uses vertical splits. If you prefer horizontal
splits add the |-o| argument: >
vimdiff -o file1 file2 [file3]
If you always prefer horizontal splits include "horizontal" in 'diffopt'.
In each of the edited files these options are set:
'diff' on
@@ -54,7 +60,7 @@ In each of the edited files these options are set:
'scrollopt' includes "hor"
'wrap' off
'foldmethod' "diff"
'foldcolumn' 2
'foldcolumn' value from 'diffopt', default is 2
These options are set local to the window. When editing another file they are
reset to the global value.
@@ -103,7 +109,9 @@ To make these commands use a vertical split, prepend |:vertical|. Examples: >
:vert diffsplit main.c~
:vert diffpatch /tmp/diff
<
If you always prefer a vertical split include "vertical" in 'diffopt'.
*E96*
There can be up to four buffers with 'diff' set.
@@ -113,7 +121,7 @@ file for a moment and come back to the same file and be in diff mode again.
*:diffo* *:diffoff*
:diffoff Switch off diff mode for the current window.
:diffoff! Switch off diff mode for all windows.
:diffoff! Switch off diff mode for all windows in the current tab page.
The ":diffoff" command resets the relevant options to their default value.
This may be different from what the values were before diff mode was started,
@@ -264,6 +272,10 @@ buffer: >
Note that deleted lines are displayed, but not counted as text lines. You
can't move the cursor into them. To fill the deleted lines with the lines
from another buffer use ":diffget" on the line below them.
*E787*
When the buffer that is about to be modified is read-only and the autocommand
that is triggered by |FileChangedRO| changes buffers the command will fail.
The autocommand must not change buffers.
The [bufspec] argument above can be a buffer number, a pattern for a buffer
name or a part of a buffer name. Examples:
@@ -345,8 +357,8 @@ get an error message. Possible causes:
- The 'shell' and associated options are not set correctly. Try if filtering
works with a command like ":!sort".
- You are using 'diffexpr' and it doesn't work.
If it's not clear what the problem is set the 'verbose' option to see more
messages.
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
@@ -374,8 +386,8 @@ will have the same effect. These variables are set to the file names used:
Example (this does the same as 'patchexpr' being empty): >
let patchexpr=MyPatch
function MyPatch
set patchexpr=MyPatch()
function MyPatch()
:call system("patch -o " . v:fname_out . " " . v:fname_in .
\ " < " . v:fname_diff)
endfunction

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.0aa. Last change: 2005 Sep 11
*digraph.txt* For Vim version 7.0c. Last change: 2005 Sep 11
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2005 Dec 13
*editing.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -155,11 +155,14 @@ Technical: On the Amiga you can use 30 characters for a file name. But on an
When you started editing without giving a file name, "No File" is displayed in
messages. If the ":write" command is used with a file name argument, the file
name for the current file is set to that file name. This only happens when
the 'F' flag is included in 'cpoptions' (by default it is included). This is
useful when entering text in an empty buffer and then writing it to a file.
If 'cpoptions' contains the 'f' flag (by default it is NOT included) the file
name is set for the ":read file" command. This is useful when starting Vim
without an argument and then doing ":read file" to start editing a file.
the 'F' flag is included in 'cpoptions' (by default it is included) |cpo-F|.
This is useful when entering text in an empty buffer and then writing it to a
file. If 'cpoptions' contains the 'f' flag (by default it is NOT included)
|cpo-f| the file name is set for the ":read file" command. This is useful
when starting Vim without an argument and then doing ":read file" to start
editing a file.
When the file name was set and 'filetype' is empty the filetype detection
autocommands will be triggered.
*not-edited*
Because the file name was set without really starting to edit that file, you
are protected from overwriting that file. This is done by setting the
@@ -310,6 +313,8 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
in the 'path' is edited.
This command fails if Vim refuses to |abandon| the
current file.
If you want to edit the file in a new window use
|CTRL-W_CTRL-F|.
If you do want to edit a new file, use: >
:e <cfile>
< To make gf always work like that: >
@@ -331,6 +336,22 @@ CTRL-^ Edit the alternate file (equivalent to ":e #").
(For {Visual} see |Visual-mode|.)
{not in VI}
*gF*
[count]gF Same as "gf", except if a number follows the file
name, then the cursor is positioned on that line in
the file. The file name and the number must be
separated by a non-filename (see 'isfname') and
non-numeric character. White space between the
filename, the separator and the number are ignored.
Examples: >
eval.c:10
eval.c @ 20
eval.c (30)
eval.c 40
<
*v_gF*
{Visual}[count]gF Same as "v_gf".
These commands are used to start editing a single file. This means that the
file is read into the buffer and the current file name is set. The file that
is opened depends on the current directory, see |:cd|.
@@ -395,20 +416,26 @@ You can have the backticks expanded as a Vim expression, instead of an
external command, by using the syntax `={expr}` e.g.: >
:e `=tempname()`
The expression can contain just about anything, thus this can also be used to
avoid the special meaning of '"', '|', '%' and '#'.
avoid the special meaning of '"', '|', '%' and '#'. Names are to be separated
with line breaks. When the result is a |List| then each item is used as a
name. Line breaks also separate names.
*++opt* *[++opt]*
The [++opt] argument can be used to force the value of 'fileformat',
'fileencoding' or 'binary' to a value for one command, and to specify the
behavior for bad characters. The form is: >
++{optname}
Or: >
++{optname}={value}
Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin*
Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin* *++edit*
ff or fileformat overrides 'fileformat'
enc or encoding overrides 'fileencoding'
bin or binary sets 'binary'
nobin or nobinary resets 'binary'
bad specifies behavior for bad characters
edit for |:read| only: keep option values as if editing
a file
{value} cannot contain white space. It can be any valid value for these
options. Examples: >
@@ -800,7 +827,7 @@ USING THE ARGUMENT LIST
each file.
{not in Vi} {not available when compiled without the
|+listcmds| feature}
Also see |:windo| and |:bufdo|.
Also see |:windo|, |:tabdo| and |:bufdo|.
Example: >
:args *.c
@@ -874,6 +901,9 @@ used, for example, when the write fails and you want to try again later with
the filename of the current buffer to {file}. The
previous name is used for the alternate file name.
The [!] is needed to overwrite an existing file.
When 'filetype' is empty filetype detection is done
with the new name, before the file is written.
When the write was successful 'readonly' is reset.
{not in Vi}
*:up* *:update*
@@ -1009,6 +1039,9 @@ The names can be in upper- or lowercase.
Vim refuses to |abandon| the current buffer, and when
the last file in the argument list has not been
edited.
If there are other tab pages and quitting the last
window in the current tab page the current tab page is
closed |tab-page|.
:conf[irm] q[uit] Quit, but give prompt when changes have been made, or
the last file in the argument list has not been

File diff suppressed because it is too large Load Diff

53
runtime/doc/evim-pl.1 Normal file
View File

@@ -0,0 +1,53 @@
.TH EVIM 1 "2002 Lut 16"
.SH NAZWA
evim \- <20>atwy Vim, edytuj plik w Vimie z ustawieniami dla edycji bez
tryb<EFBFBD>w
.SH SYNOPSIS
.br
.B evim
[opcje] [plik ...]
.br
.B eview
.SH OPIS
.B eVim
uruchamia
.B Vima
i ustawia opcje tak by zachowywa<77> si<73> jak edytor bez tryb<79>w.
To jest ca<63>y czas Vim ale u<>ywany jako edytor wska<6B>-i-kliknij.
Zachowanie w stlu Notepada dla MS-Windows.
.B eVim
b<EFBFBD>dzie zawsze uruchomiony w GUI by w<><77>czy<7A> menu i pasek narz<72>dzi.
.PP
Przeznaczony tylko dla ludzi, kt<6B>rzy naprawd<77> nie potrafi<66> pracowa<77>
z Vimem w normalny spos<6F>b. Edycja b<>dzie o wiele mniej efektywna.
.PP
.B eview
dzia<EFBFBD>a tak samo, ale zaczyna w trybie tylko do odczytu. Dzia<69>a tak
samo jak evim \-R.
.PP
Zobacz vim(1) by pozna<6E> wi<77>cej szczeg<65><67><EFBFBD>w o Vimie, opcjach, itd.
.PP
Opcja 'insertmode' jest ustawiona by mo<6D>na by<62>o od razu wpisywa<77>
tekst.
.br
Mapowania s<> ustawione tak by Kopiowanie i Wklejanie dzia<69>a<EFBFBD>o
z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje
a CTRL-V wkleja. U<>yj CTRL-Q by uzyska<6B> oryginalne znaczenie
CTRL-V.
.SH OPCJE
Zobacz vim(1).
.SH PLIKI
.TP 15
/usr/local/lib/vim/evim.vim
Skrypt uruchamiania dla eVima.
.SH ZNANY JAKO
Znany jako "Vim dla frajer<65>w".
Je<EFBFBD>li u<>ywasz evima oczekuje si<73>, <20>e wyjmiesz chusteczk<7A> do nosa,
zrobisz w<>z<EFBFBD><7A> w ka<6B>dym rogu i b<>dziesz to nosi<73> na g<>owie.
.SH ZOBACZ TAK<EFBFBD>E
vim(1)
.SH AUTOR
Wi<EFBFBD>kszo<EFBFBD><EFBFBD>
.B Vima
zosta<EFBFBD>a napisana przez Brama Moolenaara z du<64><75> pomoc<6F> innych os<6F>b.
Zobacz menu Help/Credits.

View File

@@ -0,0 +1,53 @@
.TH EVIM 1 "2002 Lut 16"
.SH NAZWA
evim \- łatwy Vim, edytuj plik w Vimie z ustawieniami dla edycji bez
trybów
.SH SYNOPSIS
.br
.B evim
[opcje] [plik ...]
.br
.B eview
.SH OPIS
.B eVim
uruchamia
.B Vima
i ustawia opcje tak by zachowywał się jak edytor bez trybów.
To jest cały czas Vim ale używany jako edytor wskaż-i-kliknij.
Zachowanie w stlu Notepada dla MS-Windows.
.B eVim
będzie zawsze uruchomiony w GUI by włączyć menu i pasek narzędzi.
.PP
Przeznaczony tylko dla ludzi, którzy naprawdę nie potrafią pracować
z Vimem w normalny sposób. Edycja będzie o wiele mniej efektywna.
.PP
.B eview
działa tak samo, ale zaczyna w trybie tylko do odczytu. Działa tak
samo jak evim \-R.
.PP
Zobacz vim(1) by poznać więcej szczegółów o Vimie, opcjach, itd.
.PP
Opcja 'insertmode' jest ustawiona by można było od razu wpisywać
tekst.
.br
Mapowania są ustawione tak by Kopiowanie i Wklejanie działało
z klawiszami MS-Windows. CTRL-X wycina tekst, CTRL-C kopiuje
a CTRL-V wkleja. Użyj CTRL-Q by uzyskać oryginalne znaczenie
CTRL-V.
.SH OPCJE
Zobacz vim(1).
.SH PLIKI
.TP 15
/usr/local/lib/vim/evim.vim
Skrypt uruchamiania dla eVima.
.SH ZNANY JAKO
Znany jako "Vim dla frajerów".
Jeśli używasz evima oczekuje się, że wyjmiesz chusteczkę do nosa,
zrobisz węzęł w każdym rogu i będziesz to nosił na głowie.
.SH ZOBACZ TAKŻE
vim(1)
.SH AUTOR
Większość
.B Vima
została napisana przez Brama Moolenaara z dużą pomocą innych osób.
Zobacz menu Help/Credits.

View File

@@ -1,4 +1,4 @@
*farsi.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*farsi.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Mortaza Ghassab Shiran

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.0aa. Last change: 2005 Sep 16
*filetype.txt* For Vim version 7.0c. Last change: 2006 Mar 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -148,6 +148,7 @@ can be used to overrule the filetype used for certain extensions:
*.i g:filetype_i |ft-progress-syntax|
*.p g:filetype_p |ft-pascal-syntax|
*.sh g:bash_is_sh |ft-sh-syntax|
*.tex g:tex_flavor |ft-tex-plugin|
*filetype-ignore*
To avoid that certain files are being inspected, the g:ft_ignore_pat variable
@@ -536,4 +537,22 @@ Since the text for this plugin is rather long it has been put in a separate
file: |pi_spec.txt|.
SQL *ft-sql*
Since the text for this plugin is rather long it has been put in a separate
file: |sql.txt|.
TEX *ft-tex-plugin*
If the first line of a *.tex file has the form >
%&<format>
then this determined the file type: plaintex (for plain TeX), context (for
ConTeXt), or tex (for LaTeX). Otherwise, the file is searched for keywords to
choose context or tex. If no keywords are found, it defaults to plaintex.
You can change the default by defining the variable g:tex_flavor to the format
(not the file type) you use most: plain or context or latex. (Currently no
other formats are recognized.)
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.0aa. Last change: 2005 Sep 10
*fold.txt* For Vim version 7.0c. Last change: 2006 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -109,6 +109,7 @@ level of the previous line.
There must be no side effects from the expression. The text in the buffer,
cursor position, the search patterns, options etc. must not be changed.
You can change and restore them if you are careful.
If there is some error in the expression, or the resulting value isn't
recognized, there is no error message and the fold level will be zero.

303
runtime/doc/getscript.txt Normal file
View File

@@ -0,0 +1,303 @@
*getscript.txt* For Vim version 7.0c. Last change: 2006 Mar 24
Get the Latest VimScripts
Authors: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamilyA.Mbiz>
(remove NOSPAM from the email address)
*GetLatestVimScripts-copyright*
Copyright: (c) 2004-2005 by Charles E. Campbell, Jr.
The VIM LICENSE applies to GetLatestVimScripts.vim and
GetLatestVimScripts.txt (see |copyright|) except use
"GetLatestVimScripts" instead of "Vim".
No warranty, express or implied. Use At-Your-Own-Risk.
==============================================================================
1. Contents *glvs-contents*
1. Contents.......................................: |glvs-contents|
2. GetLatestVimScripts Usage......................: |glvs|
3. GetLatestVimScripts Data File..................: |glvs-data|
4. GetLatestVimScripts Plugins....................: |glvs-plugins|
5. GetLatestVimScripts AutoInstall................: |glvs-autoinstall|
6. GetLatestVimScripts Algorithm..................: |glvs-alg|
7. GetLatestVimScripts History....................: |glvs-hist|
==============================================================================
2. GetLatestVimScripts Usage *getlatestvimscripts* *getscript* *glvs*
While in vim, type
>
:GetLatestVimScripts
<
Unless its been defined elsewhere,
>
:GLVS
<
will also work.
The script will attempt to update and, if so directed, automatically
install scripts from http://vim.sourceforge.net/. To do so it will
peruse a file, [.vim|vimfiles]/GetLatest/GetLatestVimScripts.dat
(see |glvs-data|), and examine plugins in your [.vim|vimfiles]/plugin
directory (see |glvs-plugins|).
Scripts which have been downloaded will appear in the .../GetLatest
subdirectory.
The <GetLatestVimScripts.dat> file will be automatically be updated to
reflect the latest version of script(s) so downloaded.
==============================================================================
3. GetLatestVimScripts Data File *getlatestvimscripts-data* *glvs-data*
The Data file has a header which should appear as:
>
ScriptID SourceID Filename
--------------------------
<
Below that are three columns; the first two are numeric followed by a
text column.
The first number on each line gives the script's ScriptID. When
you're about to use a web browser to look at scripts on
http://vim.sf.net/, just before you click on the script's link, you'll
see a line resembling
http://vim.sourceforge.net/scripts/script.php?script_id=40
The "40" happens to be a ScriptID that GetLatestVimScripts needs to
download the associated page.
The second number on each line gives the script's SourceID. The
SourceID records the count of uploaded scripts as determined by
vim.sf.net; hence it serves to indicate "when" a script was uploaded.
Setting the SourceID to 1 insures that GetLatestVimScripts will assume
that the script it has is out-of-date.
The SourceID is extracted by GetLatestVimScripts from the script's
page on vim.sf.net; whenever its greater than the one stored in the
GetLatestVimScripts.dat file, the script will be downloaded.
If your script's author has included a special comment line in his/her
plugin, the plugin itself will be used by GetLatestVimScripts to build
your <GetLatestVimScripts.dat> file, including any dependencies on
other scripts it may have.
If your comment field begins with :AutoInstall:, GetLatestVimScripts
will attempt to automatically install the script. Thus,
GetLatestVimScripts thus provides a comprehensive ability to keep your
plugins up-to-date!
==============================================================================
4. GetLatestVimScripts Plugins *getlatestvimscripts-plugins* *glvs-plugins*
If a plugin author includes the following comment anywhere in their
plugin, GetLatestVimScripts will find it and use it to build user's
GetLatestVimScripts.dat files:
>
src_id
v
" GetLatestVimScripts: ### ### yourscriptname
^
scriptid
<
As an author, you should include such a line in to refer to your own
script plus any additional lines describing any plugin dependencies it
may have. Same format, of course!
If your command is auto-installable (see |glvs-autoinstall|), and most
scripts are, then you may include :AutoInstall: at the start of
"yourscriptname".
GetLatestVimScript commands for those scripts are then appended, if
not already present, to the user's GetLatest/GetLatestVimScripts.dat
file. Its a relatively painless way to automate the acquisition of
any scripts your plugins depend upon.
Now, as an author, you probably don't want GetLatestVimScripts to
download your own scripts for you yourself, thereby overwriting your
not-yet-released hard work. GetLatestVimScripts provides a solution
for this: put
>
0 0 yourscriptname
<
into your <GetLatestVimScripts.dat> file and GetLatestVimScripts will
skip examining the "yourscriptname" scripts for those
GetLatestVimScript comment lines. As a result, those lines won't be
inadvertently installed into your <GetLatestVimScripts.dat> file and
subsequently used to download your own scripts. This is especially
important to do if you've included the :AutoInstall: option.
Be certain to use the same "yourscriptname" in the "0 0
yourscriptname" line as you've used in your GetLatestVimScript
comment!
==============================================================================
5. GetLatestVimScripts AutoInstall *getlatestvimscripts-autoinstall*
*glvs-autoinstall*
GetLatestVimScripts now supports "AutoInstall". Not all scripts are
supportive of auto-install, as they may have special things you need
to do to install them (please refer to the script's "install"
directions). On the other hand, most scripts will be
auto-installable.
To let GetLatestVimScripts do an autoinstall, the data file's comment
field should begin with (surrounding blanks are ignored):
:AutoInstall:
Both colons are needed, and it should begin the comment
(yourscriptname) field.
One may prevent any autoinstalling by putting the following line
in your <.vimrc>:
>
let g:GetLatestVimScripts_allowautoinstall= 0
<
With :AutoInstall: enabled, as it is by default, files which end with
---.tar.bz2 : decompressed and untarred in [.vim|vimfiles] directory
---.tar.gz : decompressed and untarred in [.vim|vimfiles] directory
---.vim.bz2 : decompressed and moved to the .vim/plugin directory
---.vim.gz : decompressed and moved to the .vim/plugin directory
---.zip : unzipped in [.vim|vimfiles] directory
---.vim : moved to [.vim|vimfiles]/plugin directory
and which merely need to have their components placed by the
untar/gunzip or move-to-plugin-directory process should be
auto-installable.
When is a script not auto-installable? Let me give an example:
>
[.vim|vimfiles]/after/syntax/blockhl.vim
<
The <blockhl.vim> script provides block highlighting for C/C++
programs; it is available at:
>
http://vim.sourceforge.net/scripts/script.php?script_id=104
<
Currently, vim's after/syntax only supports by-filetype scripts (in
blockhl.vim's case, that's after/syntax/c.vim). Hence, auto-install
would possibly overwrite the current user's after/syntax/c.vim file.
In my own case, I use <aftersyntax.vim> (renamed to
after/syntax/c.vim) to allow a after/syntax/c/ directory:
>
http://vim.sourceforge.net/scripts/script.php?script_id=1023
<
The script allows multiple syntax files to exist separately in the
after/syntax/c subdirectory. I can't bundle aftersyntax.vim in and
build an appropriate tarball for auto-install because of the potential
for the after/syntax/c.vim contained in it to overwrite a user's
c.vim.
==============================================================================
6. GetLatestVimScripts Algorithm *getlatestvimscripts-algorithm*
*glvs-alg*
The Vim sourceforge page dynamically creates a page by keying off of
the so-called script-id. Within the webpage of
http://vim.sourceforge.net/scripts/script.php?script_id=40
is a line specifying the latest source-id (src_id). The source
identifier numbers are always increasing, hence if the src_id is
greater than the one recorded for the script in GetLatestVimScripts
then its time to download a newer copy of that script.
GetLatestVimScripts will then download the script and update its
internal database of script ids, source ids, and scriptnames.
The AutoInstall process will:
Move the file from GetLatest/ to the following directory
Unix : $HOME/.vim
Windows: $HOME\vimfiles
if the downloaded file ends with ".bz2"
bunzip2 it
else if the downloaded file ends with ".gz"
gunzip it
if the resulting file ends with ".zip"
unzip it
else if the resulting file ends with ".tar"
tar -oxvf it
else if the resulting file ends with ".vim"
move it to the plugin subdirectory
==============================================================================
7. GetLatestVimScripts History *getlatestvimscripts-history* *glvs-hist*
v20 Dec 23, 2005 : * Eric Haarbauer found&fixed a bug with unzip use;
unzip needs the -o flag to overwrite.
v19 Nov 28, 2005 : * v18's GetLatestVimScript line accessed the wrong
script! Fixed.
v18 Mar 21, 2005 : * bugfix to automatic database construction
* bugfix - nowrapscan caused an error
(tnx to David Green for the fix)
Apr 01, 2005 * if shell is bash, "mv" instead of "ren" used in
:AutoInstall:s, even though its o/s is windows
Apr 01, 2005 * when downloading errors occurred, GLVS was
terminating early. It now just goes on to trying
the next script (after trying three times to
download a script description page)
Apr 20, 2005 * bugfix - when a failure to download occurred,
GetLatestVimScripts would stop early and claim that
everything was current. Fixed.
v17 Aug 25, 2004 : * g:GetLatestVimScripts_allowautoinstall, which
defaults to 1, can be used to prevent all
:AutoInstall:
v16 Aug 25, 2004 : * made execution of bunzip2/gunzip/tar/zip silent
* fixed bug with :AutoInstall: use of helptags
v15 Aug 24, 2004 : * bugfix: the "0 0 comment" download prevention wasn't
always preventing downloads (just usually). Fixed.
v14 Aug 24, 2004 : * bugfix -- helptags was using dotvim, rather than
s:dotvim. Fixed.
v13 Aug 23, 2004 : * will skip downloading a file if its scriptid or srcid
is zero. Useful for script authors; that way their
own GetLatestVimScripts activity won't overwrite
their scripts.
v12 Aug 23, 2004 : * bugfix - a "return" got left in the distribution that
was intended only for testing. Removed, now works.
* :AutoInstall: implemented
v11 Aug 20, 2004 : * GetLatestVimScripts is now a plugin:
* :GetLatestVimScripts command
* (runtimepath)/GetLatest/GetLatestVimScripts.dat
now holds scripts that need updating
v10 Apr 19, 2004 : * moved history from script to doc
v9 Jan 23, 2004 : windows (win32/win16/win95) will use
double quotes ("") whereas other systems will use
single quotes ('') around the urls in calls via wget
v8 Dec 01, 2003 : makes three tries at downloading
v7 Sep 02, 2003 : added error messages if "Click on..." or "src_id="
not found in downloaded webpage
Uses t_ti, t_te, and rs to make progress visible
v6 Aug 06, 2003 : final status messages now display summary of work
( "Downloaded someqty scripts" or
"Everything was current")
Now GetLatestVimScripts is careful about downloading
GetLatestVimScripts.vim itself!
(goes to <NEW_GetLatestVimScripts.vim>)
v5 Aug 04, 2003 : missing an endif near bottom
v4 Jun 17, 2003 : redraw! just before each "considering" message
v3 May 27, 2003 : Protects downloaded files from errant shell
expansions with single quotes: '...'
v2 May 14, 2003 : extracts name of item to be obtained from the
script file. Uses it instead of comment field
for output filename; comment is used in the
"considering..." line and is now just a comment!
* Fixed a bug: a string-of-numbers is not the
same as a number, so I added zero to them
and they became numbers. Fixes comparison.
==============================================================================
vim:tw=78:ts=8:ft=help

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.0aa. Last change: 2005 Aug 07
*gui.txt* For Vim version 7.0c. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -24,9 +24,9 @@ Other GUI documentation:
1. Starting the GUI *gui-start* *E229* *E233*
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it should include
"+GUI_Athena", "+GUI_GTK", "+GUI_KDE", "+GUI_Motif" or "MS-Windows ... bit
GUI version".
included. You can check this with the ":version" command, it says "with xxx
GUI", where "xxx" is X11-Motif, X11-Athena, Photon, GTK, GTK2, etc., or
"MS-Windows 32 bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
@@ -36,8 +36,13 @@ The X11 version of Vim can run both in GUI and in non-GUI mode. See
|gui-x11-start|.
*gui-init* *gvimrc* *.gvimrc* *_gvimrc*
The gvimrc file is where GUI-specific startup commands should be placed. It
is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC
environment variable has its name.
When the GUI starts up initializations are carried out, in this order:
- The termcap options are reset to their default value for the GUI.
- The 'term' option is set to "builgin_gui" and terminal options are reset to
their default value for the GUI |terminal-options|.
- If the system menu file exists, it is sourced. The name of this file is
normally "$VIMRUNTIME/menu.vim". You can check this with ":version". Also
see |$VIMRUNTIME|. To skip loading the system menu include 'M' in
@@ -65,6 +70,8 @@ When the GUI starts up initializations are carried out, in this order:
- For Win32, when $HOME is not set, "$VIM\_gvimrc" is used.
- When a "_gvimrc" file is not found, ".gvimrc" is tried too. And vice
versa.
The name of the first file found is stored in $MYGVIMRC, unless it was
already set.
- If the 'exrc' option is set (which is NOT the default) the file ./.gvimrc
is sourced, if it exists and isn't the same file as the system or user
gvimrc file. If this file is not owned by you, some security restrictions
@@ -498,6 +505,8 @@ floating menus that do not appear on the main menu bar.
*:nme* *:nmenu* *:nnoreme* *:nnoremenu*
*:ome* *:omenu* *:onoreme* *:onoremenu*
*:vme* *:vmenu* *:vnoreme* *:vnoremenu*
*:xme* *:xmenu* *:xnoreme* *:xnoremenu*
*:sme* *:smenu* *:snoreme* *:snoremenu*
*:ime* *:imenu* *:inoreme* *:inoremenu*
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
*E330* *E327* *E331* *E336* *E333*
@@ -786,6 +795,8 @@ using the last visual selection.
*:nunme* *:nunmenu*
*:ounme* *:ounmenu*
*:vunme* *:vunmenu*
*:xunme* *:xunmenu*
*:sunme* *:sunmenu*
*:iunme* *:iunmenu*
*:cunme* *:cunmenu*
To delete a menu item or a whole submenu, use the unmenu commands, which are
@@ -954,6 +965,9 @@ This section describes other features which are related to the GUI.
endif
endif
A recommended Japanese font is MS Mincho. You can find info here:
http://www.lexikan.com/mincho.htm
==============================================================================
7. Shell Commands *gui-shell*

View File

@@ -1,4 +1,4 @@
*gui_w16.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*gui_w16.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*gui_w32.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*gui_x11.txt* For Vim version 7.0aa. Last change: 2005 Dec 06
*gui_x11.txt* For Vim version 7.0c. Last change: 2005 Dec 06
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*hangulin.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*hangulin.txt* For Vim version 7.0c. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam
@@ -48,7 +48,7 @@ If both are set, VIM_KEYBOARD has higher priority.
Hangul Fonts
------------
You can set text font using $HOME/.Xdefaults or $HOME/.gvimrc.
You can set text font using $HOME/.Xdefaults or in your gvimrc file.
But to use Hangul, you should set 'guifontset' in your vimrc.
$HOME/.Xdefaults: >

View File

@@ -1,4 +1,4 @@
*hebrew.txt* For Vim version 7.0aa. Last change: 2003 May 11
*hebrew.txt* For Vim version 7.0c. Last change: 2003 May 11
VIM REFERENCE MANUAL by Ron Aaron (and Avner Lottem)

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
*help.txt* For Vim version 7.0c. Last change: 2006 Apr 02
VIM - main help file
k
@@ -71,6 +71,7 @@ Editing Effectively ~
|usr_29.txt| Moving through programs
|usr_30.txt| Editing programs
|usr_31.txt| Exploiting the GUI
|usr_32.txt| The undo tree
Tuning Vim ~
|usr_40.txt| Make new commands
@@ -84,7 +85,7 @@ Making Vim Run ~
|usr_90.txt| Installing Vim
REFERENCE MANUAL: These files explain every detail of Vim.
REFERENCE MANUAL: These files explain every detail of Vim. *reference_toc*
General subjects ~
|intro.txt| general introduction to Vim; notation used in help files
@@ -122,6 +123,7 @@ Advanced editing ~
|tagsrch.txt| tags and special searches
|quickfix.txt| commands for a quick edit-compile-fix cycle
|windows.txt| commands for using multiple windows and buffers
|tabpage.txt| commands for using multiple tab pages
|syntax.txt| syntax highlighting
|spell.txt| spell checking
|diff.txt| working with two or three versions of the same file
@@ -186,13 +188,14 @@ Remarks about specific systems ~
|os_win32.txt| MS-Windows 95/98/NT
*standard-plugin-list*
Standard plugins ~
|pi_netrw.txt| Reading and writing files over a network
|pi_gzip.txt| Reading and writing compressed files
|pi_expl.txt| File explorer
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_tar.txt| Tar file explorer
|pi_zip.txt| Zip archive explorer
LOCAL ADDITIONS: *local-additions*
|cecutil.txt| DrChip's Utilities Jun 11, 2004
|engspchk.txt| English Spelling Checker (v61) Mar 14, 2005
|example.txt| Example for a locally added help file
|matchit.txt| Extended "%" matching
|test.txt| Testing the h<>lp c<>mm<6D>nd n<>w

View File

@@ -1,4 +1,4 @@
*howto.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
*howto.txt* For Vim version 7.0c. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -75,7 +75,7 @@ How to ... *howdoi* *how-do-i* *howto* *how-to*
|auto-setting| set options automatically
|term-dependent-settings| set options depending on terminal name
|save-settings| save settings
|:quote| comment my exrc/vimrc/gvimrc files
|:quote| comment my .vim files
|'helpheight'| change the default help height
|'highlight'| set various highlighting modes
|'title'| set the window title

View File

@@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_cscop.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Andy Kahn
@@ -208,6 +208,11 @@ The available subcommands are:
USAGE :cs show
*:lcscope* *:lcs*
This command is same as the ":cscope" command, except when the
'cscopequickfix' option is set, the location list for the current window is
used instead of the quickfix list to show the cscope results.
*:cstag* *E257* *E562*
If you use cscope as well as ctags, |:cstag| allows you to search one or
the other before making a jump. For example, you can choose to first

View File

@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2006 Jan 05
*if_mzsch.txt* For Vim version 7.0c. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sergey Khorev
@@ -166,7 +166,10 @@ interface.
Common
------
(command {command-string}) Perform the vim ":Ex" style command.
(eval {expr-string}) Evaluate the vim command string.
(eval {expr-string}) Evaluate the vim expression to a string.
A |List| is turned into a string by
joining the items and inserting line
breaks.
NOTE clashes with MzScheme eval
(range-start) Start/End of the range passed with
(range-end) the Scheme command.

View File

@@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_ole.txt* For Vim version 7.0c. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Paul Moore
@@ -77,7 +77,8 @@ Eval(expr) Evaluate an expression.
This method takes a single parameter, which is an expression in Vim's normal
format (see |expression|). It returns a string, which is the result of
evaluating the expression.
evaluating the expression. A |List| is turned into a string by joining the
items and inserting line breaks.
Examples (Visual Basic syntax) >
Line20 = Vim.Eval("getline(20)")

View File

@@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_perl.txt* For Vim version 7.0c. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -181,6 +181,8 @@ VIM::Eval({expr}) Evaluates {expr} and returns (success, val).
value of internal |variables| x, and '$x' is equivalent
to perl's $ENV{x}. All |functions| accessible from
the command-line are valid for {expr}.
A |List| is turned into a string by joining the items
and inserting line breaks.
*perl-SetHeight*
Window->SetHeight({height})

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_pyth.txt* For Vim version 7.0c. Last change: 2006 Jan 20
VIM REFERENCE MANUAL by Paul Moore
@@ -131,14 +131,24 @@ vim.command(str) *python-command*
vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression
evaluator (see |expression|). Returns the expression result as a
string.
evaluator (see |expression|). Returns the expression result as:
- a string if the Vim expression evaluates to a string or number
- a list if the Vim expression evaluates to a Vim list
- a dictionary if the Vim expression evaluates to a Vim dictionary
Dictionaries and lists are recursively expanded.
Examples: >
:py text_width = vim.eval("&tw")
:py str = vim.eval("12+12") # NB result is a string! Use
# string.atoi() to convert to
# a number.
:py tagList = vim.eval('taglist("eval_expr")')
< The latter will return a python list of python dicts, for instance:
[{'cmd': '/^eval_expr(arg, nextcmd)$/', 'static': 0, 'name':
'eval_expr', 'kind': 'f', 'filename': './src/eval.c'}]
Error object of the "vim" module
vim.error *python-error*

View File

@@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_ruby.txt* For Vim version 7.0c. Last change: 2006 Mar 26
VIM REFERENCE MANUAL by Shugo Maeda
@@ -78,23 +78,26 @@ Executing Ruby commands is not possible in the |sandbox|.
Ruby code gets all of its access to vim via the "VIM" module.
Overview >
print "Hello" # displays a message
VIM.command(cmd) # execute an ex command
num = VIM::Window.count # gets the number of windows
w = VIM::Window[n] # gets window "n"
cw = VIM::Window.current # gets the current window
num = VIM::Buffer.count # gets the number of buffers
b = VIM::Buffer[n] # gets buffer "n"
cb = VIM::Buffer.current # gets the current buffer
w.height = lines # sets the window height
w.cursor = [row, col] # sets the window cursor position
pos = w.cursor # gets an array [row, col]
name = b.name # gets the buffer file name
line = b[n] # gets a line from the buffer
num = b.count # gets the number of lines
b[n] = str # sets a line in the buffer
b.delete(n) # deletes a line
b.append(n, str) # appends a line after n
print "Hello" # displays a message
VIM.command(cmd) # execute an ex command
num = VIM::Window.count # gets the number of windows
w = VIM::Window[n] # gets window "n"
cw = VIM::Window.current # gets the current window
num = VIM::Buffer.count # gets the number of buffers
b = VIM::Buffer[n] # gets buffer "n"
cb = VIM::Buffer.current # gets the current buffer
w.height = lines # sets the window height
w.cursor = [row, col] # sets the window cursor position
pos = w.cursor # gets an array [row, col]
name = b.name # gets the buffer file name
line = b[n] # gets a line from the buffer
num = b.count # gets the number of lines
b[n] = str # sets a line in the buffer
b.delete(n) # deletes a line
b.append(n, str) # appends a line after n
line = VIM::Buffer.current.line # gets the current line
num = VIM::Buffer.current.line_number # gets the current line number
VIM::Buffer.current.line = "test" # sets the current line number
<
Module Functions:
@@ -117,6 +120,8 @@ VIM::command({cmd})
VIM::evaluate({expr})
Evaluates {expr} using the vim internal expression evaluator (see
|expression|). Returns the expression result as a string.
A |List| is turned into a string by joining the items and inserting
line breaks.
==============================================================================
3. VIM::Buffer objects *ruby-buffer*
@@ -142,6 +147,11 @@ self[{n}] = {str}
delete({n}) Deletes a line from the buffer. {n} is the line number.
append({n}, {str})
Appends a line after the line {n}.
line Returns the current line of the buffer if the buffer is
active.
line = {str} Sets the current line of the buffer if the buffer is active.
line_number Returns the number of the current line if the buffer is
active.
==============================================================================
4. VIM::Window objects *ruby-window*

View File

@@ -1,4 +1,4 @@
*if_sniff.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*if_sniff.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL

View File

@@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*if_tcl.txt* For Vim version 7.0c. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Ingo Wilken
@@ -133,7 +133,8 @@ Commands:
Evaluates the expression {expr} using vim's internal expression
evaluator (see |expression|). Any expression that queries a buffer
or window property uses the current buffer/current window. Returns
the result as a string.
the result as a string. A |List| is turned into a string by joining
the items and inserting line breaks.
Examples: >
set perl_available [::vim::expr has("perl")]
< See also |tcl-window-expr| and |tcl-buffer-expr|.

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.0aa. Last change: 2005 Aug 30
*indent.txt* For Vim version 7.0c. Last change: 2006 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -68,7 +68,7 @@ as follows:
"e" if you type the second 'e' for an "else" at the start of a
line
Characters that can precede each key:
Characters that can precede each key: *i_CTRL-F*
! When a '!' precedes the key, Vim will not insert the key but will
instead reindent the current line. This allows you to define a
command key for reindenting the current line. CTRL-F is the default

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 11
*index.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -541,11 +541,16 @@ tag command action in Normal mode ~
the cursor
|CTRL-W_f| CTRL-W f split window and edit file name under the
cursor
|CTRL-W_F| CTRL-W F split window and edit file name under the
cursor and jump to the line number
following the file name.
|CTRL-W_g_CTRL-]| CTRL-W g CTRL-] split window and do |:tjump| to tag under
cursor
|CTRL-W_g]| CTRL-W g ] split window and do |:tselect| for tag
under cursor
|CTRL-W_g}| CTRL-W g } do a |:ptjump| to the tag under the cursor
|CTRL-W_gf| CTRL-W g f edit file name under the cursor in a new
tab page
|CTRL-W_h| CTRL-W h go to Nth left window (stop at first window)
|CTRL-W_i| CTRL-W i split window and jump to declaration of
identifier under the cursor
@@ -719,6 +724,9 @@ tag char note action in Normal mode ~
word
|gf| gf start editing the file whose name is under
the cursor
|gF| gF start editing the file whose name is under
the cursor and jump to the line number
following the filename.
|gg| gg 1 cursor to line N, default first line
|gh| gh start Select mode
|gi| gi 2 like "i", but first move to the |'^| mark
@@ -1069,6 +1077,7 @@ The commands are sorted on the non-optional part of their name.
|:cNfile| :cNf[ile] go to last error in previous file
|:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
|:caddbuffer| :caddb[uffer] add errors from buffer
|:caddexpr| :cad[dexpr] add errors from expr
|:caddfile| :caddf[ile] add error message to current quickfix list
|:call| :cal[l] call a function
@@ -1081,6 +1090,8 @@ The commands are sorted on the non-optional part of their name.
|:cexpr| :cex[pr] read errors from expr and jump to first
|:cfile| :cf[ile] read file with error messages and jump to first
|:cfirst| :cfir[st] go to the specified error, default first one
|:cgetbuffer| :cgetb[uffer] get errors from buffer
|:cgetexpr| :cgete[xpr] get errors from expr
|:cgetfile| :cg[etfile] read file with error messages
|:changes| :cha[nges] print the change list
|:chdir| :chd[ir] change directory
@@ -1141,6 +1152,7 @@ The commands are sorted on the non-optional part of their name.
|:dsearch| :ds[earch] list one #define
|:dsplit| :dsp[lit] split window and jump to #define
|:edit| :e[dit] edit a file
|:earlier| :ea[rlier] go to older change, undo
|:echo| :ec[ho] echoes the result of expressions
|:echoerr| :echoe[rr] like :echo, show like an error and use history
|:echohl| :echoh[l] set highlighting for echo commands
@@ -1213,23 +1225,59 @@ The commands are sorted on the non-optional part of their name.
|: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
|: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
|:laddexpr| :lad[dexpr] add locations from expr
|:laddbuffer| :laddb[uffer] add locations from buffer
|:laddfile| :laddf[ile] add locations to current location list
|:last| :la[st] go to the last file in the argument list
|:language| :lan[guage] set the language (locale)
|:later| :lat[er] go to newer change, redo
|:lbuffer| :lb[uffer] parse locations and jump to first location
|:lcd| :lc[d] change directory locally
|:lchdir| :lch[dir] change directory locally
|:lclose| :lcl[ose] close location window
|:lcscope| :lcs[cope] like ":cscope" but uses location list
|:left| :le[ft] left align lines
|:leftabove| :lefta[bove] make split window appear left or above
|:let| :let assign a value to a variable or option
|:lexpr| :lex[pr] read locations from expr and jump to first
|:lfile| :lf[ile] read file with locations and jump to first
|:lfirst| :lfir[st] go to the specified location, default first one
|:lgetbuffer| :lgetb[uffer] get locations from buffer
|:lgetexpr| :lgete[xpr] get locations from expr
|:lgetfile| :lg[etfile] read file with locations
|:lgrep| :lgr[ep] run 'grepprg' and jump to first match
|:lgrepadd| :lgrepa[dd] like :grep, but append to current list
|:lhelpgrep| :lh[elpgrep] like ":helpgrep" but uses location list
|:ll| :ll go to specific location
|:llast| :lla[st] go to the specified location, default last one
|:llist| :lli[st] list all locations
|:lmake| :lmak[e] execute external command 'makeprg' and parse
error messages
|:lmap| :lm[ap] like ":map!" but includes Lang-Arg mode
|:lmapclear| :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode
|:lnext| :lne[xt] go to next location
|:lnewer| :lnew[er] go to newer location list
|:lnfile| :lnf[ile] go to first location in next file
|:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|:loadview| :lo[adview] load view for current window from a file
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|:lockvar| :lockv[ar] lock variables
|:lolder| :lol[der] go to older location list
|:lopen| :lope[n] open location window
|:lprevious| :lp[revious] go to previous location
|:lpfile| :lpf[ile] go to last location in previous file
|:lrewind| :lr[ewind] go to the specified location, default first one
|:ls| :ls list all buffers
|:ltag| :lt[ag] jump to tag and add matching tags to the
location list
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|: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
|:move| :m[ove] move lines
|:mark| :ma[rk] set a mark
|:make| :mak[e] execute external command 'makeprg' and parse
@@ -1271,7 +1319,7 @@ The commands are sorted on the non-optional part of their name.
|:omap| :om[ap] like ":map" but for Operator-pending mode
|:omapclear| :omapc[lear] remove all mappings for Operator-pending mode
|:omenu| :ome[nu] add menu for Operator-pending mode
|:only| :on[ly] close all windows except current one
|:only| :on[ly] close all windows except the current one
|:onoremap| :ono[remap] like ":noremap" but for Operator-pending mode
|:onoremenu| :onoreme[nu] like ":noremenu" but for Operator-pending mode
|:options| :opt[ions] open the options-window
@@ -1371,15 +1419,22 @@ The commands are sorted on the non-optional part of their name.
|:slast| :sla[st] split window and go to last file in the
argument list
|:smagic| :sm[agic] :substitute with 'magic'
|:smap| :sma[p] like ":map" but for Select mode
|:smapclear| :smapc[lear] remove all mappings for Select mode
|:smenu| :sme[nu] add menu for Select mode
|:snext| :sn[ext] split window and go to next file in the
argument list
|:sniff| :sni[ff] send request to sniff
|:snomagic| :sno[magic] :substitute with 'nomagic'
|:snoremap| :snor[emap] like ":noremap" but for Select mode
|:snoremenu| :snoreme[nu] like ":noremenu" but for Select mode
|:sort| :sor[t] sort lines
|:source| :so[urce] read Vim or Ex commands from a file
|:spelldump| :spelld[ump] split window and fill with all correct words
|:spellgood| :spe[llgood] add good word for spelling
|:spellinfo| :spelli[nfo] show info about loaded spell files
|:spellrepall| :spellr[epall] replace all bad words like last |z=|
|:spellundo| :spellu[ndo] remove good or bad word
|:spellwrong| :spellw[rong] add spelling mistake
|:split| :sp[lit] split current window
|:sprevious| :spr[evious] split window and go to previous file in the
@@ -1395,6 +1450,8 @@ The commands are sorted on the non-optional part of their name.
|:stjump| :stj[ump] do ":tjump" and split window
|:stselect| :sts[elect] do ":tselect" and split window
|:sunhide| :sun[hide] same as ":unhide"
|:sunmap| :sunm[ap] like ":unmap" but for Select mode
|:sunmenu| :sunme[nu] remove menu for Select mode
|:suspend| :sus[pend] same as ":stop"
|:sview| :sv[iew] split window and edit file read-only
|:swapname| :sw[apname] show the name of the current swap file
@@ -1402,6 +1459,21 @@ The commands are sorted on the non-optional part of their name.
|:syncbind| :sync[bind] sync scroll binding
|:t| :t same as ":copy"
|:tNext| :tN[ext] jump to previous matching tag
|:tabNext| :tabN[ext] go to previous tab page
|:tabclose| :tabc[lose] close current tab page
|:tabdo| :tabdo execute command in each tab page
|:tabedit| :tabe[dit] edit a file in a new tab page
|:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page
|:tabfirst| :tabfir[st] got to first tab page
|:tablast| :tabl[ast] got to last tab page
|:tabmove| :tabm[ove] move tab page to other position
|:tabnew| :tabnew edit a file in a new tab page
|:tabnext| :tabn[ext] go to next tab page
|:tabonly| :tabo[nly] close all tab pages except the current one
|:tabprevious| :tabp[revious] go to previous tab page
|:tabrewind| :tabr[ewind] got to first tab page
|:tabs| :tabs list the tab pages and what they contain
|:tab| :tab create new tab when opening new window
|:tag| :ta[g] jump to tag
|:tags| :tags show the contents of the tag stack
|:tcl| :tc[l] execute Tcl command
@@ -1422,6 +1494,8 @@ The commands are sorted on the non-optional part of their name.
|:tselect| :ts[elect] list matching tags and select one
|:tunmenu| :tu[nmenu] remove menu tooltip
|:undo| :u[ndo] undo last change(s)
|:undojoin| :undoj[oin] join next change with previous undo block
|:undolist| :undol[ist] list leafs of the undo tree
|:unabbreviate| :una[bbreviate] remove abbreviation
|:unhide| :unh[ide] open a window for each loaded file in the
buffer list
@@ -1439,15 +1513,15 @@ The commands are sorted on the non-optional part of their name.
|:visual| :vi[sual] same as ":edit", but turns off "Ex" mode
|:viusage| :viu[sage] overview of Normal mode commands
|:view| :vie[w] edit a file read-only
|:vmap| :vm[ap] like ":map" but for Visual mode
|:vmapclear| :vmapc[lear] remove all mappings for Visual mode
|:vmenu| :vme[nu] add menu for Visual mode
|:vnoremap| :vn[oremap] like ":noremap" but for Visual mode
|:vmap| :vm[ap] like ":map" but for Visual+Select mode
|:vmapclear| :vmapc[lear] remove all mappings for Visual+Select mode
|:vmenu| :vme[nu] add menu for Visual+Select mode
|:vnew| :vne[w] create a new empty window, vertically split
|:vnoremenu| :vnoreme[nu] like ":noremenu" but for Visual mode
|:vnoremap| :vn[oremap] like ":noremap" but for Visual+Select mode
|:vnoremenu| :vnoreme[nu] like ":noremenu" but for Visual+Select mode
|:vsplit| :vs[plit] split current window vertically
|:vunmap| :vu[nmap] like ":unmap" but for Visual mode
|:vunmenu| :vunme[nu] remove menu for Visual mode
|:vunmap| :vu[nmap] like ":unmap" but for Visual+Select mode
|:vunmenu| :vunme[nu] remove menu for Visual+Select mode
|:windo| :windo execute command in each window
|:write| :w[rite] write to a file
|:wNext| :wN[ext] write to a file and go to previous file in
@@ -1467,8 +1541,16 @@ The commands are sorted on the non-optional part of their name.
|: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"
|:xmapclear| :xmapc[lear] remove all mappings for Visual mode
|:xmap| :xm[ap] like ":map" but for Visual mode
|:xmenu| :xme[nu] add menu for Visual mode
|:xnoremap| :xn[oremap] like ":noremap" but for Visual mode
|:xnoremenu| :xnoreme[nu] like ":noremenu" but for Visual mode
|:xunmap| :xu[nmap] like ":unmap" but for Visual mode
|:xunmenu| :xunme[nu] remove menu for Visual mode
|:yank| :y[ank] yank lines into a register
|:z| :z print some lines
|:~| :~ repeat last ":substitute"
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
*insert.txt* For Vim version 7.0c. Last change: 2006 Apr 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -126,8 +126,13 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
'=' the expression register: you are prompted to
enter an expression (see |expression|)
Note that 0x80 (128 decimal) is used for
special keys, use CTRL-R CTRL-R to insert it
literally.
special keys. E.g., you can use this to move
the cursor up:
CTRL-R ="\<Up>"
Use CTRL-R CTRL-R to insert text literally.
When the result is a |List| the items are used
as lines. They can have line breaks inside
too.
See |registers| about registers. {not in Vi}
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
@@ -299,9 +304,11 @@ insert mode:
*i_CTRL-X_CTRL-E*
CTRL-X CTRL-E scroll window one line up.
When doing completion look here: |complete_CTRL-E|
*i_CTRL-X_CTRL-Y*
CTRL-X CTRL-Y scroll window one line down.
When doing completion look here: |complete_CTRL-Y|
After CTRL-X is pressed, each CTRL-E (CTRL-Y) scrolls the window up (down) by
one line unless that would cause the cursor to move from its current position
@@ -422,7 +429,7 @@ When 'textwidth' and 'wrapmargin' are both set, 'textwidth' is used.
If you don't really want to break the line, but view the line wrapped at a
convenient place, see the 'linebreak' option.
The line is only broken automatically when using insert mode, or when
The line is only broken automatically when using Insert mode, or when
appending to a line. When in replace mode and the line length is not
changed, the line will not be broken.
@@ -438,6 +445,10 @@ characters to the 'formatoptions' option:
current insert command. Only differs from "l" when entering non-white
characters while crossing the 'textwidth' boundary.
Normally an internal function will be used to decide where to break the line.
If you want to do it in a different way set the 'formatexpr' option to an
expression that will take care of the line break.
If you want to format a block of text, you can use the "gq" operator. Type
"gq" and a movement command to move the cursor to the end of the block. In
many cases, the command "gq}" will do what you want (format until the end of
@@ -581,6 +592,16 @@ and CTRL-P (previous).
Also see the 'infercase' option if you want to adjust the case of the match.
*complete_CTRL-E*
When completion is active you can use CTRL-E to stop it and go back to the
orignally typed text. The CTRL-E will not be inserted.
*complete_CTRL-Y*
When the popup menu is displayed you can use CTRL-Y to stop completion and
accept the currently selected entry. The CTRL-Y is not inserted. Typing a
space, Enter, or some other unprintable character will leave completion mode
and insert that typed character.
Note: The keys that are valid in CTRL-X mode are not mapped. This allows for
":map ^F ^X^F" to work (where ^F is CTRL-F and ^X is CTRL-X). The key that
ends CTRL-X mode (any key that is not a valid CTRL-X mode command) is mapped.
@@ -622,8 +643,8 @@ CTRL-X CTRL-L Search backwards for a line that starts with the
the cursor. Indent is ignored. The matching line is
inserted in front of the cursor.
The 'complete' option is used to decide which buffers
are searched for a match. Only loaded buffers are
used.
are searched for a match. Both loaded and unloaded
buffers are used.
CTRL-L or
CTRL-P Search backwards for next matching line. This line
replaces the previous matching line.
@@ -871,8 +892,8 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
User defined completion *compl-function*
Completion is done by a function that can be defined by the user with the
'completefunc' option. See the 'completefunc' help for how the function
is called and an example.
'completefunc' option. See below for how the function is called and an
example |complete-functions|.
*i_CTRL-X_CTRL-U*
CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
@@ -890,7 +911,7 @@ Omni completion *compl-omni*
Completion is done by a function that can be defined by the user with the
'omnifunc' option. This is to be used for filetype-specific completion.
See the 'completefunc' help for how the function is called and an example.
See below for how the function is called and an example |complete-functions|.
For remarks about specific filetypes see |compl-omni-filetypes|.
*i_CTRL-X_CTRL-O*
@@ -952,21 +973,182 @@ CTRL-P Find previous match for words that start with the
other contexts unless a double CTRL-X is used.
FUNCTIONS FOR FINDING COMPLETIONS *complete-functions*
This applies to 'completefunc' and 'omnifunc'.
The function is called in two different ways:
- First the function is called to find the start of the text to be completed.
- Later the function is called to actually find the matches.
On the first invocation the arguments are:
a:findstart 1
a:base empty
The function must return the column where the completion starts. It must be a
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.
On the second invocation the arguments are:
a:findstart 0
a:base the text with which matches should match; the text that was
located in the first call (can be empty)
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.
*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
items:
word the text that will be inserted, mandatory
abbr abbreviation of "word"; when not empty it is used in
the menu instead of "word"
menu extra text for the popup menu, displayed after "word"
or "abbr"
info more information about the item, can be displayed in a
preview window
kind single letter indicating the type of completion
icase when non-zero case is to be ignored; when omitted
the 'ignorecase' option is used
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.
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.
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).
Currently these types can be used:
v variable
f function or method
m member of a struct or class
t typedef
d #define or macro
When searching for matches takes some time call |complete_add()| to add each
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.
An example that completes the names of the months: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
let res = []
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call add(res, m)
endif
endfor
return res
endif
endfun
set completefunc=CompleteMonths
<
The same, but now pretending searching for matches is slow: >
fun! CompleteMonths(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
while start > 0 && line[start - 1] =~ '\a'
let start -= 1
endwhile
return start
else
" find months matching with "a:base"
for m in split("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec")
if m =~ '^' . a:base
call complete_add(m)
endif
sleep 300m " simulate searching for next match
if complete_check()
break
endif
endfor
return []
endif
endfun
set completefunc=CompleteMonths
<
INSERT COMPLETION POPUP MENU *ins-completion-menu*
*popupmenu-completion*
Vim can display the matches in a simplistic popup menu.
The menu is used when:
- The 'completeopt' option contains "menu".
- The 'completeopt' option contains "menu" or "menuone".
- The terminal supports at least 8 colors.
- There are at least two matches.
While the menu is displayed these keys have a special meaning:
<CR> and <Enter>: Accept the currently selected match
<Up>: Select the previous match, as if CTRL-P was used
<Down>: Select the next match, as if CTRL-N was used
<PageUp>: Select a match several entries back
<PageDown>: Select a match several entries further
The 'pumheight' option can be used to set a maximum height. The default is to
use all space available.
There are two states:
1. A complete match has been inserted.
2. Only part of a match has been inserted.
You normally start in the first state, with the first match being inserted.
When "longest" is in 'completeopt' and there is more than one match you start
in the second state.
If you select another match, e.g., with CTRL-N or CTRL-P, you go from the
second to the first state. This doesn't change the list of matches.
When you are back at the original text then you are in the second state. To
get there right away you can use a mapping that uses CTRL-P right after
starting the completion: >
:imap <F7> <C-N><C-P>
<
*popupmenu-keys*
In the first state these keys have a special meaning:
<BS> and CTRL-H Delete one character, find the matches for the word before
the cursor. This reduces the list of matches, often to one
entry, and switches to the second state.
In the second state these keys have a special meaning:
<BS> and CTRL-H Delete one character, find the matches for the shorter word
before the cursor. This may find more matches.
CTRL-L Add one character from the current match, may reduce the
number of matches.
any printable, non-white character:
Add this character and reduce the number of matches.
In both states these can be used:
CTRL-Y Yes: Accept the currently selected match and stop completion.
CTRL-E End completion, go back to what was typed.
<PageUp> Select a match several entries back, but don't insert it.
<PageDown> Select a match several entries further, but don't insert it.
<Up> Select the previous match, as if CTRL-P was used, but don't
insert it.
<Down> Select the next match, as if CTRL-N was used, but don't
insert it.
Any other character:
Stop completion without changing the match and insert the
typed character. Note that typing a space or <Tab> will
work in both states.
The colors of the menu can be changed with these highlight groups:
Pmenu normal item |hl-Pmenu|
@@ -974,8 +1156,28 @@ PmenuSel selected item |hl-PmenuSel|
PmenuSbar scrollbar |hl-PmenuSbar|
PmenuThumb thumb of the scrollbar |hl-PmenuThumb|
There are no special mappings for when the popup menu is visible. However,
you can use an Insert mode mapping that checks the |pumvisible()| function to
do something different. Example: >
:inoremap <Down> <C-R>=pumvisible() ? "\<lt>C-N>" : "\<lt>Down>"<CR>
Filetype-specific remarks for omni completion *compl-omni-filetypes*
You can use of <expr> in mapping to have the popup menu used when typing a
character and some condition is met. For example, for typing a dot: >
inoremap <expr> . MayComplete()
func MayComplete()
if (can complete)
return ".\<C-X>\<C-O>"
endif
return '.'
endfunc
See |:map-<expr>| for more info.
FILETYPE-SPECIFIC REMARKS FOR OMNI COMPLETION *compl-omni-filetypes*
The file used for {filetype} should be autoload/{filetype}complete.vim
in 'runtimepath'. Thus for "java" it is autoload/javacomplete.vim.
C *ft-c-omni*
@@ -984,7 +1186,9 @@ Completion of C code requires a tags file. You should use Exuberant ctags,
because it adds extra information that is needed for completion. You can find
it here: http://ctags.sourceforge.net/
For version 5.5.4 you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
A compiled .exe for MS-Windows can be found at:
http://georgevreilly.com/vim/ctags.html
If you want to complete system functions you can do something like this. Use
ctags to generate a tags file for all the system header files: >
@@ -1013,31 +1217,109 @@ are included.
CSS *ft-css-omni*
Complete properties and their appropriate values according to CSS 2.1
specification.
specification.
(X)HTML *ft-html-omni*
*ft-xhtml-omni*
HTML *ft-html-omni*
XHTML *ft-xhtml-omni*
CTRL-X CTRL-O provides completion of various elements of (X)HTML files.
It is designed to support writing of XHTML 1.0 Strict files but will
also works for other versions of HTML. Features:
CTRL-X CTRL-O provides completion of various elements of (X)HTML files. It is
designed to support writing of XHTML 1.0 Strict files but will also works for
other versions of HTML. Features:
- after "<" complete tag name depending on context (no div suggest
inside of an a tag)
- inside of tag complete proper attributes (no width attribute for an
a tag)
- when attribute has limited number of possible values help to complete
them
- after "<" complete tag name depending on context (no div suggestion inside
of an a tag); '/>' indicates empty tags
- inside of tag complete proper attributes (no width attribute for an a tag);
show also type of attribute; '*' indicates required attributes
- when attribute has limited number of possible values help to complete them
- complete names of entities
- complete values of "class" and "id" attributes with data obtained from
style tag and included CSS files
- when completing "style" attribute or working inside of "style" tag
<style> tag and included CSS files
- when completing value of "style" attribute or working inside of "style" tag
switch to |ft-css-omni| completion
- when completing values of events attributes or working inside of "script"
tag switch to |ft-javascript-omni| completion
- when used after "</" CTRL-X CTRL-O will close the last opened tag
Note: When used first time completion menu will be shown with little delay
- this is time needed for loading of data file.
Note: Completion may fail in badly formatted documents. In such case try to
run |:make| command to detect formatting problems.
JAVASCRIPT *ft-javascript-omni*
Completion of most elements of JavaScript language and DOM elements.
Complete:
- variables
- function name; show function arguments
- function arguments
- properties of variables trying to detect type of variable
- complete DOM objects and properties depending on context
- keywords of language
Completion works in separate JavaScript files (&ft==javascript), inside of
<script> tag of (X)HTML and in values of event attributes (including scanning
of external files.
DOM compatibility
At the moment (beginning of 2006) there are two main browsers - MS Internet
Explorer and Mozilla Firefox. These two applications are covering over 90% of
market. Theoretically standards are created by W3C organisation
(http://www.w3c.org) but they are not always followed/implemented.
IE FF W3C Omni completion ~
+/- +/- + + ~
+ + - + ~
+ - - - ~
- + - - ~
Regardless from state of implementation in browsers but if element is defined
in standards, completion plugin will place element in suggestion list. When
both major engines implemented element, even if this is not in standards it
will be suggested. All other elements are not placed in suggestion list.
PHP *ft-php-omni*
Completion of PHP code requires tags file for completion of data from external
files. You should use Exuberant ctags version 5.5.4 or newer. You can find it
here: http://ctags.sourceforge.net/
Script completes:
- after $ variables name
- if variable was declared as object add "->", if tags file is available show
name of class
- after "->" complete only function and variable names specific for given
class. To find class location and contents tags file is required. Because
PHP isn't strongly typed language user can use @var tag to declare class: >
/* @var $myVar myClass */
$myVar->
<
Still, to find myClass contents tags file is required.
- function names with additonal 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
defined (if it is not current file)
- constants names
- class names after "new" declaration
Note: when doing completion first time Vim will load all necessary data into
memory. It may take several seconds. After next use of completion delay
should not be noticeable.
Script detects if cursor is inside <?php ?> tags. If it is outside it will
automatically switch to HTML/CSS/JavaScript completion. Note: contrary to
original HTML files completion of tags (and only tags) isn't context aware.
SYNTAX *ft-syntax-omni*
@@ -1045,18 +1327,70 @@ SYNTAX *ft-syntax-omni*
This uses the current syntax highlighting for completion. It can be used for
any filetype and provides a minimal language-sensitive completion.
To enable code completion do: >
source $VIMRUNTIME/autoload/syntaxcomplete.vim
To enable syntax code completion you can run: >
setlocal omnifunc=syntaxcomplete#Complete
You can automate this by placing this in your vimrc (after any ":filetype"
command): >
autocmd Filetype *
\ if exists('&ofu') && &ofu == "" |
\ source $VIMRUNTIME/autoload/syntaxcomplete.vim |
\ endif
You can automate this by placing the following in your vimrc (after any
":filetype" command): >
if has("autocmd") && exists("+omnifunc")
autocmd Filetype *
\ if &omnifunc == "" |
\ setlocal omnifunc=syntaxcomplete#Complete |
\ endif
endif
The above will set completion to this script only if a proper one does not
already exist for that filetype.
The above will set completion to this script only if a specific plugin does
not already exist for that filetype.
Each filetype can have a wide range of syntax items. The plugin allows you to
customize which syntax groups to include or exclude from the list. Let's have
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,
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,
phpFunctions.
The PHP language has an enormous number of items which it knows how to syntax
highlight. This means these items will be available within the omni
completion list. Some people may find this list unwieldy or are only
interested in certain items.
There are two ways to prune this list (if necessary). If you find certain
syntax groups you do not wish displayed you can add the following to your
vimrc: >
let g:omni_syntax_group_exclude_php = 'phpCoreConstant,phpConstant'
Add as many syntax groups to this list by comma separating them. The basic
form of this variable is: >
let g:omni_syntax_group_exclude_{filetype} = 'comma,separated,list'
For completeness the opposite is also true. Creating this variable in your
vimrc will only include the items in the phpFunctions and phpMethods syntax
groups: >
let g:omni_syntax_group_include_php = 'phpFunctions,phpMethods'
You can create as many of these variables as you need, varying only the
filetype at the end of the variable name.
SQL *ft-sql-omni*
Completion for the SQL language includes statements, functions, keywords.
It will also dynamically complete tables, procedures, views and column lists
with data pulled directly from within a database. For detailed instructions
and a tutorial see |omni-sql-completion|.
The SQL completion plugin can be used in conjunction with other completion
plugins. For example, the PHP filetype has it's own completion plugin.
Since PHP is often used to generate dynamic website by accessing a database,
the SQL completion plugin can also be enabled. This allows you to complete
PHP code and SQL code at the same time.
XML *ft-xml-omni*
@@ -1079,49 +1413,59 @@ Format of XML data file *xml-omni-datafile*
Vim distribution provides two data files as examples (xhtml10s.vim, xsl.vim)
XML data files are stored in "autoload/xml" directory in 'runtimepath'. They
XML data files are stored in "autoload/xml" directory in 'runtimepath'. They
have meaningful name which will be used in commands. It should be unique name
which will not create conflicts in future. For example name xhtml10s.vim means
it is data file for XHTML 1.0 Strict.
File contains one variable with fixed name: g:xmldata_xhtml10s . It is
compound from two parts:
compound from two parts:
1. "g:xmldata_" general prefix
1. "g:xmldata_" general prefix
2. "xhtml10s" name of file and name of described XML dialect
Part two must be exactly the same as name of file.
Variable is data structure in form of |Dictionary|. Keys are tag names and
values are two element |List|. First element of List is also List with
names of possible children, second element is |Dictionary| with names of
attributes as keys and possible values of attributes as values. Example: >
values are two element |List|. First element of List is also List with names
of possible children, second element is |Dictionary| with names of attributes
as keys and possible values of attributes as values. Example: >
let g:xmldata_crippledhtml = {
\ "html":
\ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"],
\ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}],
\ "script":
\ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [],
\ "html":
\ [ ["body", "head"], {"id": [], "xmlns": ["http://www.w3.org/1999/xhtml"],
\ "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}],
\ "script":
\ [ [], {"id": [], "charset": [], "type": ["text/javascript"], "src": [],
\ "defer": ["BOOL"], "xml:space": ["preserve"]}],
\ "meta":
\ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme":
\ "meta":
\ [ [], {"id": [], "http-equiv": [], "name": [], "content": [], "scheme":
\ [], "lang": [], "xml:lang": [], "dir": ["ltr", "rtl"]}]
\ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]}
\ "vimxmlentities": ["amp", "lt", "gt", "apos", "quot"]},
\ "vimxmltaginfo": {
\ 'meta': ['/>', '']},
\ "vimxmlattrinfo": {
\ 'http-equiv': ['ContentType', '']}
This example should be put in "autoload/xml/crippledhtml.vim" file.
In example are visible two special elements:
In example are visible four special elements:
1. "vimxmlentities" - special key with List containing entities of this XML
dialect.
2. "BOOL" - value of attribute key showing if attribute should be inserted
bare ("defer" vs. 'defer="'). It can be the only element of List of
attribute values.
3. "vimxmltaginfo" - special key with dictionary containing as key tag names,
as value two element List for additional menu info and long description.
4. "vimxmlattrinfo" - special key with dictionary containing as key attribute
names, as value two element List for additional menu info and long
description.
Note: Tag names in data file MUST not contain namespace description. Check
xsl.vim for example.
Commands
:XMLns {name} [{namespace}] *:XMLns*
@@ -1307,11 +1651,15 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
10. Inserting a file *inserting-file*
*:r* *:re* *:read*
:r[ead] [name] Insert the file [name] (default: current file) below
:r[ead] [++opt] [name]
Insert the file [name] (default: current file) below
the cursor.
See |++opt| for the possible values of [++opt].
:{range}r[ead] [name] Insert the file [name] (default: current file) below
:{range}r[ead] [++opt] [name]
Insert the file [name] (default: current file) below
the specified line.
See |++opt| for the possible values of [++opt].
*:r!* *:read!*
:r[ead] !{cmd} Execute {cmd} and insert its standard output below
@@ -1336,6 +1684,14 @@ If a file name is given with ":r", it becomes the alternate file. This can be
used, for example, when you want to edit that file instead: ":e! #". This can
be switched off by removing the 'a' flag from the 'cpoptions' option.
Of the [++opt] arguments one is specifically for ":read", the ++edit argument.
This is useful when the ":read" command is actually used to read a file into
the buffer as if editing that file. Use this command in an empty buffer: >
:read ++edit filename
The effect is that the 'fileformat', 'fileencoding', 'bomb', etc. options are
set to what has been detected for "filename". Note that a single empty line
remains, you may want to delete it.
*file-read*
The 'fileformat' option sets the <EOL> style for a file:
'fileformat' characters name ~

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.0aa. Last change: 2005 Sep 01
*intro.txt* For Vim version 7.0c. Last change: 2005 Sep 01
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -135,7 +135,7 @@ NR == 1 { nf=split(FILENAME,f,".")
print "<H1>Vim documentation: " f[1] "</H1>";
print "<A NAME=\"top\"></A>";
if ( FILENAME != "help.txt" ) {
print "<A HREF=\"help.html\">main help file</A>\n";
print "<A HREF=\"index.html\">main help file</A>\n";
}
print "<HR>";
print "<PRE>";
@@ -244,7 +244,15 @@ npipe > 2 && nstar < 3 {
find_tag1();
}
else {
if ( f[1] == "index" ) {
printf "|<A HREF=\"vimindex.html\">" p[i] "</A>|";
} else {
if ( f[1] == "help" ) {
printf "|<A HREF=\"index.html\">" p[i] "</A>|";
} else {
printf "|<A HREF=\"" f[1] ".html\">" p[i] "</A>|";
}
}
}
}
}
@@ -373,13 +381,12 @@ END {
#
# as main we keep index.txt (by default)
# other candidate, help.txt
#
function topback () {
if ( FILENAME != "tags" ) {
if ( FILENAME != "help.txt" ) {
printf("<A HREF=\"#top\">top</A> - ");
printf("<A HREF=\"help.html\">main help file</A>\n");
printf("<A HREF=\"index.html\">main help file</A>\n");
} else {
printf("<A HREF=\"#top\">top</A>\n");
}
@@ -581,7 +588,7 @@ function find_tag2() {
ntags=split(atag,blata,"[ ]");
if ( ntags > 1 ) { return; }
if ( ( allow_one_char == "no" ) && \
( index("!#$%\&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",atag) !=0 ) ) {
return;
}
if ( skip_word[atag] == "yes" ) { return; }
@@ -610,7 +617,7 @@ function find_tag3() {
ntags=split(btag,blata,"[ ]");
if ( ntags > 1 ) { return; }
if ( ( allow_one_char == "no" ) && \
( index("!#$%\&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
( index("!#$%&'()+,-./0:;=?@ACINX\\[\\]^_`at\\{\\}~",btag) !=0 ) ) {
return;
}
if ( skip_word[btag] == "yes" ) { return; }

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2006 Jan 09
*map.txt* For Vim version 7.0c. Last change: 2006 Mar 20
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -45,42 +45,48 @@ modes.
{lhs} means left-hand-side *{lhs}*
{rhs} means right-hand-side *{rhs}*
:map {lhs} {rhs} *:map*
:nm[ap] {lhs} {rhs} *:nm* *:nmap*
:vm[ap] {lhs} {rhs} *:vm* *:vmap*
:om[ap] {lhs} {rhs} *:om* *:omap*
:map! {lhs} {rhs} *:map!*
:im[ap] {lhs} {rhs} *:im* *:imap*
:lm[ap] {lhs} {rhs} *:lm* *:lmap*
:cm[ap] {lhs} {rhs} *:cm* *:cmap*
:map {lhs} {rhs} |mapmode-nvo| *:map*
:nm[ap] {lhs} {rhs} |mapmode-n| *:nm* *:nmap*
:vm[ap] {lhs} {rhs} |mapmode-v| *:vm* *:vmap*
:xm[ap] {lhs} {rhs} |mapmode-x| *:xm* *:xmap*
:smap {lhs} {rhs} |mapmode-s| *:smap*
:om[ap] {lhs} {rhs} |mapmode-o| *:om* *:omap*
:map! {lhs} {rhs} |mapmode-ic| *:map!*
:im[ap] {lhs} {rhs} |mapmode-i| *:im* *:imap*
:lm[ap] {lhs} {rhs} |mapmode-l| *:lm* *:lmap*
:cm[ap] {lhs} {rhs} |mapmode-c| *:cm* *:cmap*
Map the key sequence {lhs} to {rhs} for the modes
where the map command applies. The result, including
{rhs}, is then further scanned for mappings. This
allows for nested and recursive use of mappings.
:no[remap] {lhs} {rhs} *:no* *:noremap*
:nn[oremap] {lhs} {rhs} *:nn* *:nnoremap*
:vn[oremap] {lhs} {rhs} *:vn* *:vnoremap*
:ono[remap] {lhs} {rhs} *:ono* *:onoremap*
:no[remap]! {lhs} {rhs} *:no!* *:noremap!*
:ino[remap] {lhs} {rhs} *:ino* *:inoremap*
:ln[oremap] {lhs} {rhs} *:ln* *:lnoremap*
:cno[remap] {lhs} {rhs} *:cno* *:cnoremap*
:no[remap] {lhs} {rhs} |mapmode-nvo| *:no* *:noremap*
:nn[oremap] {lhs} {rhs} |mapmode-n| *:nn* *:nnoremap*
:vn[oremap] {lhs} {rhs} |mapmode-v| *:vn* *:vnoremap*
:xn[oremap] {lhs} {rhs} |mapmode-x| *:xn* *:xnoremap*
:snor[emap] {lhs} {rhs} |mapmode-s| *:snor* *:snoremap*
:ono[remap] {lhs} {rhs} |mapmode-o| *:ono* *:onoremap*
:no[remap]! {lhs} {rhs} |mapmode-ic| *:no!* *:noremap!*
:ino[remap] {lhs} {rhs} |mapmode-i| *:ino* *:inoremap*
:ln[oremap] {lhs} {rhs} |mapmode-l| *:ln* *:lnoremap*
:cno[remap] {lhs} {rhs} |mapmode-c| *:cno* *:cnoremap*
Map the key sequence {lhs} to {rhs} for the modes
where the map command applies. Disallow mapping of
{rhs}, to avoid nested and recursive mappings. Often
used to redefine a command. {not in Vi}
:unm[ap] {lhs} *:unm* *:unmap*
:nun[map] {lhs} *:nun* *:nunmap*
:vu[nmap] {lhs} *:vu* *:vunmap*
:ou[nmap] {lhs} *:ou* *:ounmap*
:unm[ap]! {lhs} *:unm!* *:unmap!*
:iu[nmap] {lhs} *:iu* *:iunmap*
:lu[nmap] {lhs} *:lu* *:lunmap*
:cu[nmap] {lhs} *:cu* *:cunmap*
:unm[ap] {lhs} |mapmode-nvo| *:unm* *:unmap*
:nun[map] {lhs} |mapmode-n| *:nun* *:nunmap*
:vu[nmap] {lhs} |mapmode-v| *:vu* *:vunmap*
:xu[nmap] {lhs} |mapmode-x| *:xu* *:xunmap*
:sunm[ap] {lhs} |mapmode-s| *:sunm* *:sunmap*
:ou[nmap] {lhs} |mapmode-o| *:ou* *:ounmap*
:unm[ap]! {lhs} |mapmode-ic| *:unm!* *:unmap!*
:iu[nmap] {lhs} |mapmode-i| *:iu* *:iunmap*
:lu[nmap] {lhs} |mapmode-l| *:lu* *:lunmap*
:cu[nmap] {lhs} |mapmode-c| *:cu* *:cunmap*
Remove the mapping of {lhs} for the modes where the
map command applies. The mapping may remain defined
for other modes where it applies.
@@ -89,38 +95,44 @@ modes.
:map @@ foo
:unmap @@ | print
:mapc[lear] *:mapc* *:mapclear*
:nmapc[lear] *:nmapc* *:nmapclear*
:vmapc[lear] *:vmapc* *:vmapclear*
:omapc[lear] *:omapc* *:omapclear*
:mapc[lear]! *:mapc!* *:mapclear!*
:imapc[lear] *:imapc* *:imapclear*
:lmapc[lear] *:lmapc* *:lmapclear*
:cmapc[lear] *:cmapc* *:cmapclear*
:mapc[lear] |mapmode-nvo| *:mapc* *:mapclear*
:nmapc[lear] |mapmode-n| *:nmapc* *:nmapclear*
:vmapc[lear] |mapmode-v| *:vmapc* *:vmapclear*
:xmapc[lear] |mapmode-x| *:xmapc* *:xmapclear*
:smapc[lear] |mapmode-s| *:smapc* *:smapclear*
:omapc[lear] |mapmode-o| *:omapc* *:omapclear*
:mapc[lear]! |mapmode-ic| *:mapc!* *:mapclear!*
:imapc[lear] |mapmode-i| *:imapc* *:imapclear*
:lmapc[lear] |mapmode-l| *:lmapc* *:lmapclear*
:cmapc[lear] |mapmode-c| *:cmapc* *:cmapclear*
Remove ALL mappings for the modes where the map
command applies. {not in Vi}
Warning: This also removes the default mappings.
:map
:nm[ap]
:vm[ap]
:om[ap]
:map!
:im[ap]
:lm[ap]
:cm[ap]
:map |mapmode-nvo|
:nm[ap] |mapmode-n|
:vm[ap] |mapmode-v|
:xm[ap] |mapmode-x|
:sm[ap] |mapmode-s|
:om[ap] |mapmode-o|
:map! |mapmode-ic|
:im[ap] |mapmode-i|
:lm[ap] |mapmode-l|
:cm[ap] |mapmode-c|
List all key mappings for the modes where the map
command applies. Note that ":map" and ":map!" are
used most often, because they include the other modes.
:map {lhs} *:map_l*
:nm[ap] {lhs} *:nmap_l*
:vm[ap] {lhs} *:vmap_l*
:om[ap] {lhs} *:omap_l*
:map! {lhs} *:map_l!*
:im[ap] {lhs} *:imap_l*
:lm[ap] {lhs} *:lmap_l*
:cm[ap] {lhs} *:cmap_l*
:map {lhs} |mapmode-nvo| *:map_l*
:nm[ap] {lhs} |mapmode-n| *:nmap_l*
:vm[ap] {lhs} |mapmode-v| *:vmap_l*
:xm[ap] {lhs} |mapmode-x| *:xmap_l*
:sm[ap] {lhs} |mapmode-s| *:smap_l*
:om[ap] {lhs} |mapmode-o| *:omap_l*
:map! {lhs} |mapmode-ic| *:map_l!*
:im[ap] {lhs} |mapmode-i| *:imap_l*
:lm[ap] {lhs} |mapmode-l| *:lmap_l*
:cm[ap] {lhs} |mapmode-c| *:cmap_l*
List the key mappings for the key sequences starting
with {lhs} in the modes where the map command applies.
{not in Vi}
@@ -145,6 +157,9 @@ type "a", then "bar" will get inserted.
1.2 SPECIAL ARGUMENTS *:map-arguments*
"<buffer>", "<silent>", "<script>", "<expr>" and "<unique>" can be used in any
order. They must appear right after the command, before any other arguments.
*:map-local* *:map-<buffer>* *E224* *E225*
If the first argument to one of these commands is "<buffer>" it will apply to
mappings locally to the current buffer only. Example: >
@@ -191,9 +206,38 @@ already exists which is equal.
Example of what will fail: >
:map ,w /[#&!]<CR>
:map <buffer> <unique> ,w /[.,;]<CR>
If you want to map a key and then have it do what it was originally mapped to,
have a look at |maparg()|.
"<buffer>", "<silent>", "<script>" and "<unique>" can be used in any order.
They must appear right after the command, before any other arguments.
*:map-<expr>* *:map-expression*
If the first argument to one of these commands is "<expr>" and it is used to
define a new mapping or abbreviation, the argument is an expression. The
expression is evaluated to obtain the {rhs} that is used. Example: >
:inoremap <expr> . InsertDot()
The result of the InsertDot() function will be inserted. It could check the
text before the cursor and start omni completion when some condition is met.
Be very careful about side effects! The expression is evaluated while
obtaining characters, if you change buffer text, move the cursor, edit another
file, etc. you may very well make command disfunctional.
Here is an example that inserts a list number that increases: >
let counter = 0
inoremap <expr> <C-L> ListItem()
inoremap <expr> <C-R> ListReset()
func ListItem()
let g:counter += 1
return g:counter . '. '
endfunc
func ListReset()
let g:counter = 0
return ''
endfunc
CTRL-L inserts the next number, CTRL-R resets the count. CTRL-R returns an
empty string, so that nothing is inserted.
1.3 MAPPING AND MODES *:map-modes*
@@ -206,9 +250,6 @@ There are five sets of mappings
- For Insert mode. These are also used in Replace mode.
- For Command-line mode: When entering a ":" or "/" command.
There are no separate mappings for Select mode. The same as for Visual mode
are used |Select-mode-mapping|.
Special case: While typing a count for a command in Normal mode, mapping zero
is disabled. This makes it possible to map zero without making it impossible
to type a count with a zero.
@@ -216,13 +257,29 @@ to type a count with a zero.
*map-overview* *map-modes*
Overview of which map command works in which mode:
*mapmode-nvo* *mapmode-n* *mapmode-v* *mapmode-o*
commands: modes: ~
Normal Visual Operator-pending ~
:map :noremap :unmap :mapclear yes yes yes
:nmap :nnoremap :nunmap :nmapclear yes - -
:vmap :vnoremap :vunmap :vmapclear - yes -
:omap :onoremap :ounmap :omapclear - - yes
Normal Visual+Select Operator-pending ~
:map :noremap :unmap :mapclear yes yes yes
:nmap :nnoremap :nunmap :nmapclear yes - -
:vmap :vnoremap :vunmap :vmapclear - yes -
:omap :onoremap :ounmap :omapclear - - yes
*mapmode-x* *mapmode-s*
Some commands work both in Visual and Select mode, some in only one. Note
that quite often "Visual" is mentioned where both Visual and Select mode
apply. |Select-mode-mapping|
commands: modes: ~
Visual Select ~
:vmap :vnoremap :vunmap :vmapclear yes yes
:xmap :xnoremap :xunmap :xmapclear yes -
:smap :snoremap :sunmap :smapclear - yes
*mapmode-ic* *mapmode-i* *mapmode-c* *mapmode-l*
Some commands work both in Insert mode and Command-line mode, some not:
commands: modes: ~
Insert Command-line Lang-Arg ~
:map! :noremap! :unmap! :mapclear! yes yes -
:imap :inoremap :iunmap :imapclear yes - -
@@ -639,7 +696,7 @@ you must create mapping that first sets the 'operatorfunc' option and then
invoke the |g@| operator. After the user types the {motion} command the
specified function will be called.
*g@*
*g@* *E774* *E775*
g@{motion} Call the function set by the 'operatorfunc' option.
The '[ mark is positioned at the start of the text
moved over by {motion}, the '] mark on the last
@@ -774,7 +831,7 @@ This does not work if 'cpoptions' includes the '<' flag. |<>|
You can even do more complicated things. For example, to consume the space
typed after an abbreviation: >
func Eatchar(pat)
let c = nr2char(getchar())
let c = nr2char(getchar(0))
return (c =~ a:pat) ? '' : c
endfunc
iabbr <silent> if if ()<Left><C-R>=Eatchar('\s')<CR>
@@ -1085,6 +1142,7 @@ completion can be enabled:
-complete=event autocommand events
-complete=expression Vim expression
-complete=file file and directory names
-complete=shellcmd Shell command
-complete=function function name
-complete=help help subjects
-complete=highlight highlight groups
@@ -1183,8 +1241,9 @@ Replacement text
The replacement text for a user defined command is scanned for special escape
sequences, using <...> notation. Escape sequences are replaced with values
from the entered command line, and all other text is copied unchanged. The
resulting string is executed as an Ex command. If the initial < of an escape
sequence is preceded by a backslash, the sequence is copied unchanged.
resulting string is executed as an Ex command. To avoid the replacement use
<lt> in plade of the initial <. Thus to include "<bang>" literally use
"<lt>bang>".
The valid escape sequences are

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Oct 14
*mbyte.txt* For Vim version 7.0c. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -985,7 +985,7 @@ Cursor color when IME or XIM is on *CursorIM*
This works in the same way when using XIM.
You can select cursor color when status is on by using highlight group
CursorIM. For example, add these lines to your _gvimrc: >
CursorIM. For example, add these lines to your |gvimrc|: >
if has('multi_byte_ime')
highlight Cursor guifg=NONE guibg=Green
@@ -1076,6 +1076,7 @@ also add this line: >
'' '
Since the mapping is defined with |:lnoremap| the resulting quote will not be
used for the start of another character.
The "accents" keymap uses this. *keymap-accents*
Although it's possible to have more than one character in the second column,
this is unusual. But you can use various ways to specify the character: >
@@ -1257,11 +1258,16 @@ Double-width characters are supported. This works best with 'guifontwide' or
normal width and a space to fill the gap. Note that the 'guifontset' option
is no longer relevant in the GTK+ 2 GUI.
Up to two combining characters can be used. The combining character is drawn
on top of the preceding character. When editing text a composing character is
mostly considered part of the preceding character. For example "x" will
delete a character and its following composing characters by default. If the
'delcombine' option is on, then pressing 'x' will delete the combining
*mbyte-combining* *mbyte-composing*
A composing or combining character is used to change the meaning of the
character before it. The combining characters are drawn on top of the
preceding character.
Up to two combining characters can be used by default. This can be changed
with the 'maxcombine' option.
When editing text a composing character is mostly considered part of the
preceding character. For example "x" will delete a character and its
following composing characters by default.
If the 'delcombine' option is on, then pressing 'x' will delete the combining
characters, one at a time, then the base character. But when inserting, you
type the first character and the following composing characters separately,
after which they will be joined. The "r" command will not allow you to type a

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0aa. Last change: 2006 Jan 08
*message.txt* For Vim version 7.0c. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -751,9 +751,12 @@ and the screen is about to be redrawn:
-> Press <Enter> or <Space> to redraw the screen and continue, without that
key being used otherwise.
-> Press ':' or any other Normal mode command character to start that command.
-> Press 'k', 'u', 'b' or 'g' to scroll back in the messages. This works the
same way as at the |more-prompt|. Only works when 'compatible' is off and
'more' is on.
-> Press 'k', <Up>, 'u', 'b' or 'g' to scroll back in the messages. This
works the same way as at the |more-prompt|. Only works when 'compatible'
is off and 'more' is on.
-> Pressing 'j', 'd' or <Down> is ignored when messages scrolled off the top
of the screen, 'compatible' is off and 'more' is on, to avoid that typing
one 'j' too many causes the messages to disappear.
-> Press <C-Y> to copy (yank) a modeless selection to the clipboard register.
-> Use a menu. The characters defined for Cmdline-mode are used.
-> When 'mouse' contains the 'r' flag, clicking the left mouse button works

View File

@@ -1,4 +1,4 @@
*mlang.txt* For Vim version 7.0aa. Last change: 2004 Feb 24
*mlang.txt* For Vim version 7.0c. Last change: 2004 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0aa. Last change: 2006 Jan 02
*motion.txt* For Vim version 7.0c. Last change: 2006 Jan 02
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Apr 04
*netbeans.txt* For Vim version 7.0c. Last change: 2006 Mar 09
VIM REFERENCE MANUAL by Gordon Prieur
@@ -179,6 +179,7 @@ These messages are specific for NetBeans:
Region is guarded, cannot modify
NetBeans defines guarded areas in the text, which you cannot
change.
Also sets the current buffer, if necessary.
*E656*
NetBeans disallows writes of unmodified buffers
@@ -193,7 +194,7 @@ Partial writes disallowed for NetBeans buffers
*E658*
NetBeans connection lost for this buffer
NetBeans has become confused about the state of this file.
Rather than risc data corruption, NetBeans has severed the
Rather than risk data corruption, NetBeans has severed the
connection for this file. Vim will take over responsibility
for saving changes to this file and NetBeans will no longer
know of these changes.
@@ -258,10 +259,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.3. For the differences between 2.2 and 2.3 search for
"2.3" 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.
To see an example implementation look at the gvim tool in Agide. Currently
found here:
http://cvs.sf.net/viewcvs.py/a-a-p/Agide/Tools/GvimTool.py?view=markup
10.1 Kinds of messages |nb-messages|
10.2 Terms |nb-terms|
10.3 Commands |nb-commands|
@@ -485,8 +495,10 @@ setContentType
Not implemented.
setDot off Make the buffer the current buffer and set the cursor at the
specified position. If there are folds they are opened to
make the cursor line visible.
specified position. If the buffer is open in another window
than make that window the current window.
If there are folds they are opened to make the cursor line
visible.
In version 2.1 "lnum/col" can be used instead of "off".
setExitDelay seconds
@@ -566,6 +578,7 @@ stopDocumentListen
unguard off len
Opposite of "guard", remove guarding for a text area.
Also sets the current buffer, if necessary.
version Not implemented.
@@ -608,10 +621,22 @@ getText Return the contents of the buffer as a string.
insert off text
Insert "text" before position "off". "text" is a string
argument, "off" a number.
"off" should have a "\n" (newline) at the end of each line.
Or "\r\n" when 'fileformat' is "dos". When using "insert" in
an empty buffer Vim will set 'fileformat' accordingly.
When "off" points to the start of a line the text is inserted
above this line. Thus when "off" is zero lines are inserted
before the first line.
When "off" points after the start of a line, possibly on the
NUL at the end of a line, the first line of text is appended
to this line. Further lines come below it.
Possible replies:
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
Also sets the current buffer, if necessary.
Does not move the cursor to the changed text.
Resets undo information.
remove off length
Delete "length" bytes of text at position "off". Both
@@ -620,6 +645,7 @@ remove off length
123 no problem
123 !message failed
Note that the message in the reply is not quoted.
Also sets the current buffer, if necessary.
saveAndExit Perform the equivalent of closing Vim: ":confirm qall".
If there are no changed files or the user does not cancel the

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*os_390.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_390.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Ralf Schandl

View File

@@ -1,4 +1,4 @@
*os_amiga.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_amiga.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_beos.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_beos.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_dos.txt* For Vim version 7.0aa. Last change: 2003 Dec 20
*os_dos.txt* For Vim version 7.0c. Last change: 2006 Mar 30
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -77,10 +77,11 @@ is especially useful when using a Unix-like 'shell'.
==============================================================================
3. Standard mappings *dos-standard-mappings*
CTRL-PageUp cursor to first screen line *<C-PageUp>*
CTRL-PageDown cursor to last screen line, last character *<C-PageDown>*
The mappings for CTRL-PageUp and CTRL-PageDown have been removed, they now
jump to the next or previous tab page |<C-PageUp>| |<C-PageDown>|
These mappings accomplish this:
If you want them to move to the first and last screen line you can use these
mappings:
key key code Normal/Visual mode Insert mode ~
CTRL-PageUp <M-N><M-C-D> H <C-O>H
@@ -126,8 +127,8 @@ text. For example, to get grey text on a blue background: >
See |highlight-groups| for other groups that are available.
A DOS console does not support attributes like bold and underlining. You can
set the color used in five modes with nine termcap options. Note that this is
not necessary since you can set the color directly with the ":highlight"
set the color used in five modes with nine terminal options. Note that this
is not necessary since you can set the color directly with the ":highlight"
command; these options are for backward compatibility with older Vim versions.
The |'highlight'| option specifies which of the five modes is used for which
action. >

View File

@@ -1,4 +1,4 @@
*os_mac.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_mac.txt* For Vim version 7.0c. Last change: 2006 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -33,9 +33,10 @@ Indianapolis IN 46220 USA
==============================================================================
1. Filename Convention *mac-filename*
You can use either the unix or mac path separator or a mix of both. In order
to determine if the specified filename is relative to the current folder or
absolute (i.e. relative to the "Desktop"), the following algorithm is used:
Starting with Vim version 7 you can just use the unix path separators with
Vim. In order to determine if the specified filename is relative to the
current folder or absolute (i.e. relative to the "Desktop"), the following
algorithm is used:
If the path start by a "/", the path is absolute
If the path start by a ":", the path is relative
@@ -58,15 +59,23 @@ You can use the |$VIM| and |$VIMRUNTIME| variable. >
==============================================================================
2. .vimrc and .vim files *mac-vimfile*
On the Mac files starting with a dot "." are discouraged, thus the rc files
are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files can be in
any format (mac, dos or unix). Vim can handle any file format when the
|'nocompatible'| option is set, otherwise it will only handle mac format
It is recommended to use Unix style line separators for Vim scripts, thus a
single newline character.
When starting up Vim will load the $VIMRUNTIME/macmap.vim script to define
default command-key mappings.
On older systems files starting with a dot "." are discouraged, thus the rc
files are named "vimrc" or "_vimrc" and "gvimrc" or "_gvimrc". These files
can be in any format (mac, dos or unix). Vim can handle any file format when
the |'nocompatible'| option is set, otherwise it will only handle mac format
files.
==============================================================================
3. Mac FAQ *mac-faq*
On the internet: http://macvim.org/OSX/index.php#FAQ
Q: I can't enter non-ASCII character in Apple Terminal.
A: Under Window Settings, Emulation, make sure that "Escape non-ASCII
characters" is not checked.
@@ -77,17 +86,17 @@ A: Assuming that Vim.app is located in /Applications:
Or:
/Applications/Vim.app/Contents/MacOS/Vim -g {arguments}
Q: How can I set $PATH to something reasonable when I start Vim.app from the
GUI or with open?
A: The following trick works with most shells. Put it in your vimrc file.
This is included in the system vimrc file included with the binaries
distributed at macvim.org . >
let s:path = system("echo echo VIMPATH'${PATH}' | $SHELL -l")
let $PATH = matchstr(s:path, 'VIMPATH\zs.\{-}\ze\n')
==============================================================================
4. Mac Lack *mac-lack*
The filenames containing both ":" and "/" are sometimes misinterpreted. (just
re-execute the command)
Scrollbar are not scrolling live, and when only the arrow or scroll area, a
limit of 32 line or page is scrolled.
Syntax highlighting works on 68k Macs but is _really_ slow.
In a terminal CTRL-^ needs to be entered as Shift-Control-6. CTRL-@ as
Shift-Control-2.

View File

@@ -1,4 +1,4 @@
*os_mint.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_mint.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Jens M. Felderhoff

View File

@@ -1,4 +1,4 @@
*os_msdos.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_msdos.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*os_os2.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_os2.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Paul Slootman

View File

@@ -1,4 +1,4 @@
*os_qnx.txt* For Vim version 7.0aa. Last change: 2005 Mar 29
*os_qnx.txt* For Vim version 7.0c. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Julian Kinraid

Some files were not shown because too many files have changed in this diff Show More