Compare commits

...

417 Commits

Author SHA1 Message Date
78d4abaa93 updated for version 7.1-178 2008-01-01 14:43:35 +00:00
ee3f7a51c8 updated for version 7.1-177 2008-01-01 13:17:56 +00:00
4f246a9a2a updated for version 7.1-176 2007-12-31 15:42:13 +00:00
f5dcf7c3b5 updated for version 7.1-175 2007-12-09 19:26:44 +00:00
6c964835b1 updated for version 7.1-174 2007-12-09 18:38:35 +00:00
a713933cd1 updated for version 7.1-173 2007-12-09 18:26:22 +00:00
11717bb0a1 updated for version 7.1-172 2007-12-08 21:21:18 +00:00
49feabd5d6 updated for version 7.1-171 2007-12-07 19:28:58 +00:00
c3b730796c updated for version 7.1-170 2007-12-07 16:30:42 +00:00
e6f565a7be updated for version 7.1-169 2007-12-07 16:09:32 +00:00
ea40888076 updated for version 7.1-168 2007-12-03 21:21:03 +00:00
e9c3bcda1d updated for version 7.1-167 2007-12-03 20:32:43 +00:00
0a30746d70 updated for version 7.1-166 2007-12-01 20:13:05 +00:00
c2a27c3dc3 updated for version 7.1-165 2007-12-01 16:19:33 +00:00
8f5c578a5e updated for version 7.1-164 2007-11-29 20:27:21 +00:00
9273c73e36 updated for version 7.1-163 2007-11-29 16:46:44 +00:00
ed53fb9a48 updated for version 7.1-162 2007-11-24 20:50:24 +00:00
e0ca7b2b04 updated for version 7.1-161 2007-11-24 20:28:24 +00:00
9f10875ed0 updated for version 7.1-160 2007-11-24 14:44:58 +00:00
f9ffd188e5 updated for version 7.1-159 2007-11-20 17:04:29 +00:00
85a3e5c7c6 updated for version 7.1-158 2007-11-20 16:22:16 +00:00
f998c04691 updated for version 7.1-157 2007-11-20 11:31:26 +00:00
81870894a7 updated for version 7.1-156 2007-11-11 18:17:28 +00:00
07d0677855 updated for version 7.1-155 2007-11-10 21:51:15 +00:00
33741a0f37 updated for version 7.1-154 2007-11-08 20:24:19 +00:00
6f1924547b updated for version 7.1-153 2007-11-08 19:49:02 +00:00
a443af88a4 updated for version 7.1-152 2007-11-08 13:51:42 +00:00
e40e57c514 updated for version 7.1-151 2007-11-08 12:04:26 +00:00
cdfd3e424a updated for version 7.1-150 2007-11-08 09:35:50 +00:00
9b25ffbb2b updated for version 7.1-149 2007-11-06 21:27:31 +00:00
e74455a447 updated for version 7.1-148 2007-11-04 14:36:18 +00:00
9642664800 updated for version 7.1-147 2007-10-30 16:37:15 +00:00
b52e260d23 updated for version 7.1-146 2007-10-29 21:38:54 +00:00
711d5b5c94 updated for version 7.1-145 2007-10-19 18:40:51 +00:00
60a44dcb28 updated for version 7.1-144 2007-10-19 16:58:12 +00:00
d4b96bc637 updated for version 7.1-143 2007-10-19 15:33:39 +00:00
c188b88040 updated for version 7.1-142 2007-10-19 14:20:54 +00:00
2dd8b521bb updated for version 7.1-141 2007-10-19 12:33:44 +00:00
f13249a717 updated for version 7.1-140 2007-10-14 15:16:27 +00:00
fa6d5afd84 updated for version 7.1-139 2007-10-14 13:33:20 +00:00
aa8494a13e updated for version 7.1-138 2007-10-09 08:47:27 +00:00
af92ee8e89 updated for version 7.1-137 2007-10-07 13:45:08 +00:00
51f78b2a4c updated for version 7.1-136 2007-10-07 13:22:19 +00:00
9b9422097c updated for version 7.1-135 2007-10-03 12:31:33 +00:00
f22129b5c5 updated for version 7.1-134 2007-10-03 11:29:44 +00:00
d4cacdf91e updated for version 7.1-133 2007-10-03 10:50:10 +00:00
e65f732db3 updated for version 7.1-132 2007-10-02 20:08:54 +00:00
893de92ede updated for version 7.1-131 2007-10-02 18:40:57 +00:00
fecb660578 updated for version 7.1-130 2007-10-01 20:54:15 +00:00
41a0903523 updated for version 7.1-129 2007-10-01 18:34:34 +00:00
61bfb9febe updated for version 7.1-128 2007-09-30 20:28:48 +00:00
ecf4de5d69 updated for version 7.1-127 2007-09-30 20:11:26 +00:00
d089d9b33a updated for version 7.1-126 2007-09-30 12:02:55 +00:00
78ab331e0d updated for version 7.1-125 2007-09-29 12:16:41 +00:00
51b8436f09 updated for version 7.1-124 2007-09-29 11:16:17 +00:00
9f0545d6de updated for version 7.1-123 2007-09-26 20:36:32 +00:00
dfc7aa2ccd updated for version 7.1-122 2007-09-25 20:13:54 +00:00
5461cfe289 updated for version 7.1-121 2007-09-25 18:40:14 +00:00
9d2c8c1a66 updated for version 7.1-120 2007-09-25 16:00:00 +00:00
719939c888 updated for version 7.1-119 2007-09-25 12:51:28 +00:00
b8dc4d4cdf updated for version 7.1-118 2007-09-25 12:20:19 +00:00
7b18862920 updated for version 7.1-117 2007-09-25 10:51:12 +00:00
1193636b45 updated for version 7.1-116 2007-09-17 20:39:42 +00:00
ad6c2274e8 updated for version 7.1-115 2007-09-17 20:21:33 +00:00
b91d177ecc updated for version 7.1-114 2007-09-17 19:56:01 +00:00
b4066a10e0 updated for version 7.1-113 2007-09-17 19:38:08 +00:00
ce85c5619e updated for version 7.1-112 2007-09-16 12:21:16 +00:00
1042fa3857 updated for version 7.1-111 2007-09-16 11:27:42 +00:00
3b9b13e564 updated for version 7.1-110 2007-09-15 12:49:35 +00:00
073545473f updated for version 7.1-109 2007-09-15 12:07:46 +00:00
5365c4d590 updated for version 7.1-108 2007-09-14 17:56:59 +00:00
53241daeba updated for version 7.1-107 2007-09-13 20:41:32 +00:00
5c2e0f27c5 updated for version 7.1-106 2007-09-13 20:05:18 +00:00
037cc64f8f updated for version 7.1-105 2007-09-13 18:40:54 +00:00
61abfd1171 updated for version 7.1-104 2007-09-13 16:26:47 +00:00
a84b10685c updated for version 7.1-103 2007-09-13 13:34:02 +00:00
700d1d7036 updated for version 7.1-102 2007-09-13 13:20:16 +00:00
9539934ee2 updated for version 7.1-101 2007-09-13 13:01:18 +00:00
02b063139b updated for version 7.1-100 2007-09-06 15:39:22 +00:00
7fd1602e56 updated for version 7.1-099 2007-09-06 14:35:35 +00:00
33e1a80f84 updated for version 7.1-098 2007-09-06 12:26:44 +00:00
177d8c60ee updated for version 7.1-097 2007-09-06 11:33:37 +00:00
c27c8d5c59 updated for version 7.1-096 2007-09-06 10:54:51 +00:00
9c8791fde0 updated for version 7.1-095 2007-09-05 19:47:23 +00:00
102e3a6164 updated for version 7.1-094 2007-08-30 17:37:40 +00:00
367329ba08 updated for version 7.1-093 2007-08-30 11:53:22 +00:00
ec8317364b updated for version 7.1-092 2007-08-30 10:51:14 +00:00
78e1762c48 updated for version 7.1-091 2007-08-30 10:26:19 +00:00
1a3d086c84 updated for version 7.1-090 2007-08-30 09:47:38 +00:00
7d61a92145 updated for version 7.1-089 2007-08-30 09:12:23 +00:00
14d0e7976d updated for version 7.1-088 2007-08-30 08:35:35 +00:00
d2ac984a1e updated for version 7.1-087 2007-08-21 16:03:51 +00:00
3a36cf7bca updated for version 7.1-086 2007-08-21 15:29:56 +00:00
eb1b679067 updated for version 7.1-085 2007-08-21 13:29:28 +00:00
dd87969c8b updated for version 7.1-084 2007-08-21 13:07:12 +00:00
fa2e044471 updated for version 7.1-082 2007-08-18 16:21:50 +00:00
6529c101c3 updated for version 7.1-081 2007-08-18 15:47:34 +00:00
7baa45dbbf updated for version 7.1-080 2007-08-18 15:00:42 +00:00
deefb63bfb updated for version 7.1-079 2007-08-15 18:41:34 +00:00
70c2a63474 updated for version 7.1-078 2007-08-15 18:08:50 +00:00
349955a205 updated for version 7.1-077 2007-08-14 21:07:36 +00:00
b0db569905 updated for version 7.1-076 2007-08-14 20:54:49 +00:00
3185918f8c updated for version 7.1-075 2007-08-14 20:41:13 +00:00
92c5aba92a updated for version 7.1-074 2007-08-14 20:29:31 +00:00
4d64b7891b updated for version 7.1-073 2007-08-14 20:16:42 +00:00
9c03978012 updated for version 7.1-072 2007-08-14 15:55:42 +00:00
4d2fffc833 updated for version 7.1-071 2007-08-14 15:29:16 +00:00
2b80e65818 updated for version 7.1-070 2007-08-14 14:57:55 +00:00
d2c765e688 updated for version 7.1-069 2007-08-14 13:00:40 +00:00
67f7131efa updated for version 7.1-068 2007-08-12 14:55:56 +00:00
a2993e1340 updated for version 7.1-067 2007-08-12 14:38:46 +00:00
83eb885d54 updated for version 7.1-066 2007-08-12 13:51:26 +00:00
8c69d536ad updated for version 7.1-065 2007-08-12 13:25:01 +00:00
708f62c380 updated for version 7.1-064 2007-08-11 20:24:10 +00:00
52d36c8bb7 updated for version 7.1-063 2007-08-11 14:00:30 +00:00
cc00b955cd updated for version 7.1-062 2007-08-11 12:32:57 +00:00
a245a5bb06 updated for version 7.1-061 2007-08-11 11:58:23 +00:00
48cc5fe8b6 updated for version 7.1-060 2007-08-11 11:39:45 +00:00
225d32b910 updated for version 7.1-059 2007-08-10 19:33:47 +00:00
abc9773580 updated for version 7.1-058 2007-08-08 20:49:37 +00:00
c2f5abcf15 updated for version 7.1-057 2007-08-08 19:42:05 +00:00
1b0b07f29e updated for version 7.1-056 2007-08-07 20:00:31 +00:00
452a81b413 updated for version 7.1-055 2007-08-06 20:28:43 +00:00
a064ac8501 updated for version 7.1-054 2007-08-05 18:10:54 +00:00
57b7fe808f updated for version 7.1-053 2007-08-05 17:20:43 +00:00
0963cd95f5 updated for version 7.1-052 2007-08-05 16:49:43 +00:00
3dcfbf7c4d updated for version 7.1-051 2007-08-05 16:33:12 +00:00
e7c5686944 updated for version 7.1-050 2007-08-04 10:14:52 +00:00
179af2c90b updated for version 7.1-049 2007-08-03 20:02:28 +00:00
ef04586d9f updated for version 7.1-048 2007-08-02 21:00:50 +00:00
150cc27040 updated for version 7.1-047 2007-08-01 13:47:46 +00:00
9225efbc96 updated for version 7.1-046 2007-07-30 20:32:53 +00:00
943fae459d updated for version 7.1-045 2007-07-30 20:00:38 +00:00
0cbac5bf6a updated for version 7.1-044 2007-07-29 13:03:35 +00:00
7662423e10 updated for version 7.1-043 2007-07-28 12:21:47 +00:00
2240aeb4cb updated for version 7.1-042 2007-07-27 19:33:14 +00:00
bf96fb4234 updated for version 7.1-041 2007-07-26 21:11:52 +00:00
6ee10162b2 updated for version 7.1-040 2007-07-26 20:58:42 +00:00
f621048b53 updated for version 7.1-039 2007-07-25 20:56:39 +00:00
5002c296f0 updated for version 7.1-038 2007-07-24 13:26:15 +00:00
3afaae44a9 updated for version 7.1-037 2007-07-24 12:58:01 +00:00
4f68858766 updated for version 7.1-036 2007-07-24 12:34:30 +00:00
fe40d1a0b0 updated for version 7.1-035 2007-07-24 09:16:38 +00:00
5fdec47ab0 updated for version 7.1-034 2007-07-24 08:45:13 +00:00
9cffde9627 updated for version 7.1-033 2007-07-24 07:51:18 +00:00
5f2c5dbd86 updated for version 7.1-032 2007-07-17 16:15:36 +00:00
477933cdc3 updated for version 7.1-031 2007-07-17 14:32:23 +00:00
1315349f0e updated for version 7.1-030 2007-07-17 12:33:46 +00:00
7bb755519e updated for version 7.1-029 2007-07-16 18:39:49 +00:00
1256e720f5 updated for version 7.1-028 2007-07-10 15:26:20 +00:00
fe1c56d6ae updated for version 7.1-027 2007-07-10 15:10:54 +00:00
78f6f7eb95 updated for version 7.1-026 2007-07-10 12:03:33 +00:00
7a42fa3cb7 updated for version 7.1-025 2007-07-10 11:28:55 +00:00
aec1179e5e updated for version 7.1-024 2007-07-10 11:09:36 +00:00
9a149791fc updated for version 7.1-023 2007-07-10 10:38:02 +00:00
bf44417987 updated for version 7.1-022 2007-07-07 11:58:28 +00:00
e2a49d8e5e updated for version 7.1-021 2007-07-06 17:43:08 +00:00
6a51606966 updated for version 7.1-020 2007-07-05 08:11:42 +00:00
3ebc1e5112 updated for version 7.1-019 2007-07-05 07:54:17 +00:00
e649ef0fdd updated for version 7.1-018 2007-06-28 20:18:51 +00:00
5386a123f5 updated for version 7.1-017 2007-06-28 20:02:32 +00:00
7f51474324 updated for version 7.1-016 2007-06-28 19:33:43 +00:00
f15f943e0c updated for version 7.1-015 2007-06-28 11:07:21 +00:00
3011815c8a updated for version 7.1-014 2007-06-28 10:49:22 +00:00
786b1dc2a4 updated for version 7.1-013 2007-06-28 10:03:45 +00:00
96bb621f25 updated for version 7.1-012 2007-06-19 18:52:53 +00:00
1ad2f13b37 updated for version 7.1-011 2007-06-19 18:27:18 +00:00
dc3213d855 updated for version 7.1-010 2007-06-19 16:03:50 +00:00
4b80a5179a updated for version 7.1-009 2007-06-19 15:44:58 +00:00
884aa898d4 updated for version 7.1-008 2007-06-19 15:31:05 +00:00
d827ada01c updated for version 7.1-008 2007-06-19 15:19:55 +00:00
e02d7b2a21 updated for version 7.1-007 2007-06-19 14:29:43 +00:00
512e6b838a updated for version 7.1-006 2007-06-19 13:36:52 +00:00
1864a4e0fd updated for version 7.1-005 2007-06-19 10:56:05 +00:00
b1269f1184 updated for version 7.1-004 2007-06-19 09:51:25 +00:00
2d8ab99d10 updated for version 7.1-003 2007-06-19 08:06:18 +00:00
1042527371 updated for version 7.1-002 2007-05-15 07:12:25 +00:00
a2dd900999 updated for version 7.1-001 2007-05-14 17:38:30 +00:00
29c34723d5 updated for version 7.1 2007-05-12 15:34:06 +00:00
049377ee0f updated for version 7.1 2007-05-12 15:32:12 +00:00
6446f25b44 updated for version 7.1 2007-05-12 15:26:47 +00:00
4b4dc64876 updated for version 7.1 2007-05-12 15:23:40 +00:00
994cd1237f updated for version 7.1 2007-05-12 15:19:41 +00:00
b2a460d564 updated for version 7.1 2007-05-12 15:16:37 +00:00
1b826e540c updated for version 7.1 2007-05-12 15:14:36 +00:00
d38c6c9aae updated for version 7.1 2007-05-12 15:12:15 +00:00
54143f4031 updated for version 7.1 2007-05-12 15:10:39 +00:00
dd2a0d8ad1 updated for version 7.1 2007-05-12 15:07:00 +00:00
784287abf4 updated for version 7.1 2007-05-12 15:05:26 +00:00
1887debd2c updated for version 7.1 2007-05-12 15:04:19 +00:00
f5fcea70bd updated for version 7.1 2007-05-12 15:00:32 +00:00
69c2f17e98 updated for version 7.1 2007-05-12 14:57:31 +00:00
00333faa4d updated for version 7.1 2007-05-12 14:50:38 +00:00
4e32e4bc5e updated for version 7.1 2007-05-12 14:46:25 +00:00
0168560264 updated for version 7.1 2007-05-12 14:42:48 +00:00
d46bbc7203 updated for version 7.1 2007-05-12 14:38:41 +00:00
d427d1e381 updated for version 7.1 2007-05-12 14:34:30 +00:00
9048f94031 updated for version 7.1 2007-05-12 14:32:25 +00:00
ebcbd022e6 updated for version 7.1 2007-05-12 14:28:25 +00:00
e24138beaf updated for version 7.1 2007-05-12 14:24:45 +00:00
e0d7b3c052 updated for version 7.1 2007-05-12 14:23:41 +00:00
52cda2b83e updated for version 7.1 2007-05-12 14:17:21 +00:00
29055eedf4 updated for version 7.1 2007-05-12 14:15:39 +00:00
f17897d288 updated for version 7.1 2007-05-12 14:13:37 +00:00
c1c566fb6c updated for version 7.1 2007-05-12 14:10:12 +00:00
381ffaefa2 updated for version 7.1 2007-05-12 14:06:39 +00:00
666771a83c updated for version 7.1 2007-05-12 14:03:30 +00:00
8c406603ae updated for version 7.1 2007-05-12 13:57:53 +00:00
33fa75c86e updated for version 7.1 2007-05-12 13:55:30 +00:00
8b57e2efc0 updated for version 7.1 2007-05-12 13:52:50 +00:00
5f29c338d7 updated for version 7.1 2007-05-12 13:51:35 +00:00
9fe9d16c38 updated for version 7.1 2007-05-12 13:47:10 +00:00
5c3e56a2f7 updated for version 7.1 2007-05-12 13:43:14 +00:00
03d42258db updated for version 7.1 2007-05-12 13:40:39 +00:00
8f6d679581 updated for version 7.1 2007-05-12 13:38:39 +00:00
f313d68274 updated for version 7.1 2007-05-12 13:36:14 +00:00
376b899ac0 updated for version 7.1 2007-05-12 13:28:48 +00:00
833dc52378 updated for version 7.1 2007-05-12 13:26:40 +00:00
9e368dba9d updated for version 7.1 2007-05-12 13:25:01 +00:00
5a91e34372 updated for version 7.1 2007-05-12 13:20:15 +00:00
a9d52b81cd updated for version 7.1 2007-05-12 13:16:04 +00:00
032b3cf620 updated for version 7.1 2007-05-12 13:13:51 +00:00
341621425b updated for version 7.1 2007-05-12 13:12:19 +00:00
b5ba002aab updated for version 7.1 2007-05-12 13:06:29 +00:00
895f2609de updated for version 7.1 2007-05-12 13:03:54 +00:00
cb635362cc updated for version 7.1 2007-05-12 13:02:42 +00:00
b4b6a567a3 updated for version 7.1 2007-05-12 13:00:40 +00:00
5cdd0df5a9 updated for version 7.1 2007-05-12 12:58:05 +00:00
fe265ff56f updated for version 7.1b-002 2007-05-11 18:15:45 +00:00
060f1f08b3 updated for version 7.1b-001 2007-05-10 20:17:29 +00:00
bae0c16cc4 updated for version 7.1b 2007-05-10 19:30:25 +00:00
45667517ba updated for version 7.1b 2007-05-10 19:24:43 +00:00
49325942f5 updated for version 7.1b 2007-05-10 19:19:59 +00:00
5f52cff1b3 updated for version 7.1b 2007-05-10 19:08:09 +00:00
25394022f2 updated for version 7.1b 2007-05-10 19:06:20 +00:00
3ad16f3fe6 updated for version 7.1b 2007-05-10 19:00:27 +00:00
b8017e7a03 updated for version 7.1b 2007-05-10 18:59:07 +00:00
cf0dfa2f18 updated for version 7.1b 2007-05-10 18:52:16 +00:00
e590119ea7 updated for version 7.1b 2007-05-10 18:46:18 +00:00
34e0bfaa80 updated for version 7.1b 2007-05-10 18:44:18 +00:00
b15c833222 updated for version 7.1b 2007-05-10 18:40:02 +00:00
10c56952d8 updated for version 7.1b 2007-05-10 18:38:52 +00:00
335437bb24 updated for version 7.1b 2007-05-10 18:32:52 +00:00
79166c430b updated for version 7.1b 2007-05-10 18:29:51 +00:00
ccc18222dd updated for version 7.1b 2007-05-10 18:25:20 +00:00
2c7a763832 updated for version 7.1b 2007-05-10 18:19:11 +00:00
720c710091 updated for version 7.1b 2007-05-10 18:07:50 +00:00
25bc63d168 updated for version 7.1b 2007-05-10 18:05:13 +00:00
035db9f0e1 updated for version 7.1b 2007-05-10 18:02:27 +00:00
7aa9f6a03a updated for version 7.1b 2007-05-10 18:00:30 +00:00
2b64440353 updated for version 7.1b 2007-05-10 17:56:19 +00:00
933eb39d67 updated for version 7.1b 2007-05-10 17:52:45 +00:00
a38edcde16 updated for version 7.1b 2007-05-10 17:46:55 +00:00
29466f2b4f updated for version 7.1b 2007-05-10 17:45:37 +00:00
3d27a45f9a updated for version 7.1b 2007-05-10 17:44:18 +00:00
044b68f42a updated for version 7.1b 2007-05-10 17:39:52 +00:00
7263a77b99 updated for version 7.1b 2007-05-10 17:35:54 +00:00
2bb8df23dc updated for version 7.1b 2007-05-10 17:26:28 +00:00
ff1d0d4cf5 updated for version 7.1b 2007-05-10 17:24:16 +00:00
4868726a3f updated for version 7.1b 2007-05-10 17:17:07 +00:00
82038d7312 updated for version 7.1b 2007-05-10 17:15:45 +00:00
e34bd1f502 updated for version 7.1b 2007-05-10 17:06:00 +00:00
ad5fd673c7 updated for version 7.1b 2007-05-10 17:04:44 +00:00
e531ce2c84 updated for version 7.1b 2007-05-10 17:03:39 +00:00
0c4b5bd38f updated for version 7.1b 2007-05-10 17:02:32 +00:00
80ec845282 updated for version 7.1b 2007-05-10 17:00:48 +00:00
8acbe168a8 updated for version 7.1b 2007-05-10 16:58:19 +00:00
c1762ccb6f updated for version 7.1b 2007-05-10 16:56:30 +00:00
f1dc4965b5 updated for version 7.1b 2007-05-10 16:50:23 +00:00
f711faf099 updated for version 7.1b 2007-05-10 16:48:19 +00:00
b6799acd2d updated for version 7.1b 2007-05-10 16:44:05 +00:00
143c38cd31 updated for version 7.1b 2007-05-10 16:41:10 +00:00
706cdebcf8 updated for version 7.1a-001 2007-05-06 21:55:31 +00:00
a022bb3567 updated for version 7.1a 2007-05-06 17:22:46 +00:00
2d0ed69d58 updated for version 7.1a 2007-05-06 17:19:06 +00:00
89cf6cf04c updated for version 7.1a 2007-05-06 16:50:15 +00:00
edfe968e1a updated for version 7.1a 2007-05-06 16:46:03 +00:00
ad44decbac updated for version 7.1a 2007-05-06 16:41:27 +00:00
fee049ad25 updated for version 7.1a 2007-05-06 16:39:48 +00:00
8da4467eb3 updated for version 7.1a 2007-05-06 16:33:11 +00:00
7b85141b84 updated for version 7.1a 2007-05-06 16:28:11 +00:00
b317167494 updated for version 7.1a 2007-05-06 16:19:19 +00:00
1f8ae7a083 updated for version 7.1a 2007-05-06 16:15:07 +00:00
b57bf7277b updated for version 7.1a 2007-05-06 15:48:14 +00:00
7ec09eeb83 updated for version 7.1a 2007-05-06 15:30:35 +00:00
15aa18172b updated for version 7.1a 2007-05-06 15:28:16 +00:00
24652c0005 updated for version 7.1a 2007-05-06 15:11:45 +00:00
d955be3f20 updated for version 7.1a 2007-05-06 14:33:06 +00:00
6b803a739f updated for version 7.1a 2007-05-06 14:25:46 +00:00
17e79197d5 updated for version 7.1a 2007-05-06 14:15:36 +00:00
8cfdc0df95 updated for version 7.1a 2007-05-06 14:12:36 +00:00
da65f156f3 updated for version 7.1a 2007-05-06 13:54:35 +00:00
8d1ab51e8f updated for version 7.1a 2007-05-06 13:49:21 +00:00
6519ac87d8 updated for version 7.1a 2007-05-06 13:45:52 +00:00
d55de224a0 updated for version 7.1a 2007-05-06 13:38:48 +00:00
ef2f6569ce updated for version 7.1a 2007-05-06 13:32:59 +00:00
c3739303b0 updated for version 7.1a 2007-05-06 13:28:50 +00:00
d7afed3753 updated for version 7.1a 2007-05-06 13:26:41 +00:00
9fc8c24ef8 updated for version 7.1a 2007-05-06 13:23:02 +00:00
024678745b updated for version 7.1a 2007-05-06 13:22:01 +00:00
ff4a37e325 updated for version 7.1a 2007-05-06 13:18:29 +00:00
ea430ea7d5 updated for version 7.1a 2007-05-06 13:10:49 +00:00
e9400a45da updated for version 7.1a 2007-05-06 13:04:32 +00:00
24b231793e updated for version 7.1a 2007-05-06 12:54:06 +00:00
9e1d2839c6 updated for version 7.1a 2007-05-06 12:51:41 +00:00
a9af0e6a0a updated for version 7.1a 2007-05-06 12:48:13 +00:00
1f5c517296 updated for version 7.1a 2007-05-06 12:46:22 +00:00
36f5ac0859 updated for version 7.1a 2007-05-06 12:40:34 +00:00
623fe606ae updated for version 7.1a 2007-05-06 12:39:05 +00:00
7bff313a94 updated for version 7.1a 2007-05-06 12:34:30 +00:00
7528dd68a7 updated for version 7.1a 2007-05-06 12:32:12 +00:00
b5dd424dc3 updated for version 7.1a 2007-05-06 12:28:24 +00:00
8bc7847e20 updated for version 7.1a 2007-05-06 12:26:25 +00:00
82de0d760b updated for version 7.1a 2007-05-06 12:18:31 +00:00
5c5b0941ca updated for version 7.1a 2007-05-06 12:07:59 +00:00
c980de3382 updated for version 7.1a 2007-05-06 11:59:04 +00:00
4e86cbab27 updated for version 7.1a 2007-05-06 11:56:32 +00:00
044defef06 updated for version 7.1a 2007-05-06 11:55:00 +00:00
be860d34dd updated for version 7.1a 2007-05-06 11:53:06 +00:00
7b98ce07ce updated for version 7.1a 2007-05-06 11:29:37 +00:00
83e138c606 updated for version 7.1a 2007-05-05 18:27:07 +00:00
c81e5e79a0 updated for version 7.1a 2007-05-05 18:24:42 +00:00
9aae141a6b updated for version 7.1a 2007-05-05 18:01:06 +00:00
756ec0f3c9 updated for version 7.1a 2007-05-05 17:59:48 +00:00
313b7237ad updated for version 7.1a 2007-05-05 17:56:55 +00:00
9964e468c0 updated for version 7.1a 2007-05-05 17:54:07 +00:00
d5ab34bd5e updated for version 7.1a 2007-05-05 17:15:44 +00:00
0630b8d96d updated for version 7.1a 2007-05-05 17:11:56 +00:00
dd2a3cda55 updated for version 7.1a 2007-05-05 17:10:09 +00:00
3ed4447ed7 updated for version 7.0-243 2007-05-05 10:52:16 +00:00
aea02fa475 updated for version 7.0-242 2007-05-04 20:29:09 +00:00
4142324d25 updated for version 7.0-241 2007-05-03 20:11:13 +00:00
ee79cbc7af updated for version 7.0-240 2007-05-02 19:50:14 +00:00
eeefcc7723 updated for version 7.0-239 2007-05-01 21:21:21 +00:00
0ddf0a7df0 updated for version 7.0-238 2007-05-01 20:04:53 +00:00
8243a7928b updated for version 7.0-237 2007-05-01 17:05:03 +00:00
914572aba4 updated for version 7.0-236 2007-05-01 11:37:47 +00:00
d9fe7c4bb8 updated for version 7.0-235 2007-04-29 11:53:56 +00:00
3d43a6658c updated for version 7.0-234 2007-04-27 20:15:55 +00:00
bbe8c3f735 updated for version 7.0-233 2007-04-26 16:40:56 +00:00
79ee315b72 updated for version 7.0-232 2007-04-26 16:20:50 +00:00
1c53628518 updated for version 7.0-231 2007-04-26 15:21:56 +00:00
d267b9c167 updated for version 7.0-230 2007-04-26 15:06:45 +00:00
4076b79afd updated for version 7.0-229 2007-04-26 14:48:01 +00:00
a24424370c updated for version 7.0-228 2007-04-26 14:26:37 +00:00
053b9fa9c2 updated for version 7.0-227 2007-04-26 14:09:42 +00:00
97006f1ce8 updated for version 7.0-226 2007-04-26 09:04:31 +00:00
87c1996491 updated for version 7.0-225 2007-04-26 08:54:21 +00:00
63b9254b8e updated for version 7.0-224 2007-03-27 14:57:09 +00:00
7cc36e9402 updated for version 7.0-223 2007-03-27 10:42:05 +00:00
39353fdbec updated for version 7.0-222 2007-03-27 09:02:11 +00:00
5b6b1cae34 updated for version 7.0-221 2007-03-27 08:19:43 +00:00
4940e3f2c3 updated for version 7.0-220 2007-03-25 15:49:08 +00:00
867a4b7630 updated for version 7.0-219 2007-03-18 20:51:46 +00:00
49104e4038 updated for version 7.0-218 2007-03-15 21:54:01 +00:00
c432b50937 updated for version 7.0-217 2007-03-15 20:38:26 +00:00
d326ce83d5 updated for version 7.0-216 2007-03-11 14:48:29 +00:00
48c2c9a19a updated for version 7.0-215 2007-03-08 19:34:12 +00:00
552f8a1140 updated for version 7.0-214 2007-03-08 17:12:08 +00:00
6417da604d updated for version 7.0-213 2007-03-08 13:49:53 +00:00
c8da3119cf updated for version 7.0-212 2007-03-08 12:36:46 +00:00
9248e6e12e updated for version 7.0-211 2007-03-08 12:10:13 +00:00
6cbce9d0db updated for version 7.0-210 2007-03-08 10:01:03 +00:00
454ec05a47 updated for version 7.0-209 2007-03-08 09:20:28 +00:00
38323e4f4a updated for version 7.0-208 2007-03-06 19:22:53 +00:00
81b85876ad updated for version 7.0-207 2007-03-04 20:22:01 +00:00
733f0a286e updated for version 7.0-206 2007-03-02 18:56:27 +00:00
33c4fb68bf updated for version 7.0-205 2007-02-27 22:03:05 +00:00
f2a4e33ffb updated for version 7.0-204 2007-02-27 17:08:16 +00:00
7f6ca07606 updated for version 7.0-203 2007-02-27 16:21:38 +00:00
311d982b6f updated for version 7.0-202 2007-02-27 15:48:28 +00:00
602eb74de6 updated for version 7.0-201 2007-02-20 03:43:38 +00:00
fa3491a0e0 updated for version 7.0-200 2007-02-20 02:49:19 +00:00
09a16b5f09 updated for version 7.0-199 2007-02-20 02:31:20 +00:00
77f66d6c8d updated for version 7.0-198 2007-02-20 02:16:18 +00:00
85c79d30ff updated for version 7.0-197 2007-02-20 01:59:20 +00:00
0396ab0156 updated for version 7.0-196 2007-02-19 23:14:18 +00:00
373154b00c updated for version 7.0-195 2007-02-13 05:19:30 +00:00
ad40f02cd9 updated for version 7.0-194 2007-02-13 03:01:39 +00:00
b01a8b749b updated for version 7.0-193 2007-02-13 02:47:22 +00:00
47b8b15b5f updated for version 7.0-192 2007-02-07 02:41:57 +00:00
48b66fb5a7 updated for version 7.0-191 2007-02-04 01:58:18 +00:00
86ea76404e updated for version 7.0-190 2007-02-04 01:48:10 +00:00
0739a1e671 updated for version 7.0-189 2007-02-04 01:37:39 +00:00
8c471fa0b3 updated for version 7.0-188 2007-01-16 21:14:45 +00:00
8dd1aa58ad updated for version 7.0-187 2007-01-16 20:33:19 +00:00
fb7c90c0fa updated for version 7.0-186 2007-01-16 15:01:41 +00:00
56da797e6d updated for version 7.0-185 2007-01-16 14:46:32 +00:00
84c4d79ad4 updated for version 7.0-184 2007-01-16 14:18:41 +00:00
863b53b72e updated for version 7.0-183 2007-01-14 14:28:34 +00:00
89ed3dfd87 updated for version 7.0-182 2007-01-09 19:23:12 +00:00
9460b9d215 updated for version 7.0-181 2007-01-09 14:37:01 +00:00
d675e2c513 updated for version 7.0-180 2007-01-09 14:09:25 +00:00
df88dda91c updated for version 7.0-179 2007-01-09 13:34:50 +00:00
201863f75d updated for version 7.0-178 2006-12-05 21:06:46 +00:00
cf8e7d14aa updated for version 7.0-177 2006-12-05 20:43:17 +00:00
9c4b4ab3a6 updated for version 7.0-176 2006-12-05 20:29:56 +00:00
61b974b9ee updated for version 7.0-175 2006-12-05 09:32:29 +00:00
3b1b6c6259 updated for version 7.0-174 2006-11-28 20:40:00 +00:00
f278987c97 updated for version 7.0-173 2006-11-28 19:54:04 +00:00
4632d298ad updated for version 7.0-172 2006-11-28 17:36:37 +00:00
3d20ca1ad1 updated for version 7.0-171 2006-11-28 16:43:58 +00:00
85f868c3ae updated for version 7.0-170 2006-11-28 16:16:58 +00:00
b0c9a85bc8 updated for version 7.0-169 2006-11-28 15:14:56 +00:00
9334c3447a updated for version 7.0-168 2006-11-21 19:57:30 +00:00
b42dc236e9 updated for version 7.0-167 2006-11-21 18:36:05 +00:00
508b9e895d updated for version 7.0-166 2006-11-21 10:43:23 +00:00
93db975fa4 updated for version 7.0-165 2006-11-21 10:29:45 +00:00
9a51c6e35d updated for version 7.0-164 2006-11-14 19:25:02 +00:00
c65c491295 updated for version 7.0-163 2006-11-14 17:29:46 +00:00
84212825ed updated for version 7.0-162 2006-11-07 21:59:47 +00:00
908d53a230 updated for version 7.0-161 2006-11-07 18:05:31 +00:00
d333d1e086 updated for version 7.0-160 2006-11-07 17:43:47 +00:00
3f2d9814e5 updated for version 7.0-159 2006-11-07 17:02:30 +00:00
6ae133b915 updated for version 7.0-158 2006-11-01 20:25:45 +00:00
e9da72e482 updated for version 7.0-157 2006-11-01 17:34:40 +00:00
5a6404cff4 updated for version 7.0-156 2006-11-01 17:12:57 +00:00
637 changed files with 44327 additions and 16061 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.0. Also runs under UNIX, MSDOS and other systems.
vim70rt.tgz contains the documentation and syntax files.
vim70bin.tgz contains the binaries.
vim70src.tgz contains the sources.
Version 7.1. Also runs under UNIX, MSDOS and other systems.
vim71rt.tgz contains the documentation and syntax files.
vim71bin.tgz contains the binaries.
vim71src.tgz contains the sources.
Author: Bram Moolenaar et al.

View File

@ -568,7 +568,8 @@ RT_AMI = \
libs/arp.library \
runtime/doc.info \
runtime/doc/*.info \
runtime/icons \
runtime/icons/README.txt \
runtime/icons/*.info \
runtime/icons.info \
runtime/macros.info \
runtime/macros/*.info \
@ -644,7 +645,8 @@ EXTRA = \
$(SRC_EXTRA) \
README_extra.txt \
src/VisVim/VisVim.dll \
farsi \
farsi/README.txt \
farsi/fonts/*/far-* \
runtime/vimlogo.xpm \
src/swis.s \
src/tee/Makefile* \
@ -669,12 +671,15 @@ LANG_GEN = \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/tutor.?? \
runtime/tutor/tutor.cs.* \
runtime/tutor/tutor.gr.* \
runtime/tutor/tutor.hu.* \
runtime/tutor/tutor.ja.* \
runtime/tutor/tutor.ko.* \
runtime/tutor/tutor.pl.* \
runtime/tutor/tutor.ru.* \
runtime/tutor/tutor.sk.* \
runtime/tutor/tutor.tr.* \
runtime/tutor/tutor.zh.* \
runtime/spell/README.txt \
runtime/spell/??/*.diff \

View File

@ -27,7 +27,7 @@ first:
# Some make programs use the last target for the $@ default; put the other
# targets separately to always let $@ expand to "first" by default.
all install uninstall tools config configure proto depend lint tags types test testclean clean distclean:
all install uninstall tools config configure reconfig proto depend lint tags types test testclean clean distclean:
@echo "Starting make in the src directory."
@echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@
@ -69,7 +69,7 @@ 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 = 0
MINOR = 1
# Uncomment this line if the Win32s version is to be included.
DOSBIN_S = dosbin_s
@ -81,28 +81,29 @@ DOSBIN_S = dosbin_s
# 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.
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme, Cscope and "huge"
# features. Exclude workshop and SNiFF.
# - Compile Vim with GTK, Perl, Python, TCL, Ruby, MZscheme (if you can make it
# work), Cscope and "huge" features. Exclude workshop and SNiFF.
# - With these features: "make proto" (requires cproto and Motif installed;
# ignore warnings for missing include files, fix problems for syntax errors).
# - With these features: "make depend" (works best with gcc).
# - "make lint" and check the output (ignore GTK warnings).
# - Enable the efence library in "src/Makefile" and run "make test". May
# require disabling Python to avoid trouble with threads.
# require disabling Python and Ruby to avoid trouble with threads.
# - Check for missing entries in runtime/makemenu.vim (with checkmenu script).
# - Check for missing options in runtime/optwin.vim et al. (with check.vim).
# - Do "make menu" to update the runtime/synmenu.vim file.
# - Add remarks for changes to runtime/doc/version7.txt.
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
# ADDITIONS".
# - In runtime/doc run "make" and "make html" to check for errors.
# - Check if src/Makefile and src/feature.h don't contain any personal
# preferences or the GTK, Perl, etc. mentioned above.
# - Check that runtime/doc/help.txt doesn't contain entries in "LOCAL
# ADDITIONS".
# - Check file protections to be "644" for text and "755" for executables (run
# the "check" script).
# - Check compiling on Amiga, MS-DOS and MS-Windows.
# - Delete all *~, *.sw?, *.orig, *.rej files
# - "make unixall", "make extra", "make lang", "make html"
# - Make diff files against the previous release: "makediff7 7.1 7.2"
#
# Amiga:
# - "make amisrc", move the archive to the Amiga and compile:
@ -128,25 +129,26 @@ DOSBIN_S = dosbin_s
# - Rename the executables to "vimd32.exe", "xxdd32.exe", "installd32.exe" and
# "uninstald32.exe".
# Win32 console version:
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat"
# - Set environment for Visual C++ Toolkit 2003: "msvcsetup.bat" (adjust the
# paths when necessary).
# - "nmake -f Make_mvc.mak"
# - "rm testdir/*.out", "nmake -f Make_mvc.mak test" and check the output.
# - Rename the executables to "vimw32.exe", "xxdw32.exe".
# - Rename ObjC/vim.pdb to vimw32.pdb.
# - Rename vim.pdb to vimw32.pdb.
# - When building the Win32s version later, delete vimrun.exe, install.exe and
# uninstal.exe. Otherwise rename executables to installw32.exe and
# uninstalw32.exe.
# Win32 GUI version:
# - "nmake -f Make_mvc.mak GUI=yes.
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move ObjG/gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstall.exe.
# - Move gvim.pdb to here.
# - Delete vimrun.exe, install.exe and uninstal.exe.
# - Copy "GvimExt/gvimext.dll" to here.
# Win32 GUI version with OLE, PERL, TCL, PYTHON and dynamic IME:
# - Run src/bigvim.bat ("nmake -f Make_mvc.mak GUI=yes OLE=yes IME=yes ...)
# - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename ObjGOLYTR/gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstall.exe.
# - Rename gvim.pdb to "gvim_ole.pdb".
# - Delete install.exe and uninstal.exe.
# - If building the Win32s version delete vimrun.exe.
# Win32s GUI version:
# - Set environment for Visual C++ 4.1 (requires a new console window)

View File

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

View File

@ -1,4 +1,4 @@
README_ami.txt for version 7.0 of Vim: Vi IMproved.
README_ami.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_amibin.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_amisrc.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_bindos.txt for version 7.1 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.

View File

@ -1,4 +1,4 @@
README_dos.txt for version 7.0 of Vim: Vi IMproved.
README_dos.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_extra.txt for version 7.1 of Vim: Vi IMproved.
The extra archive of Vim is to be used in combination with the source archive
(vim-7.0-src.tar.gz). The extra archive is useless without it.

View File

@ -1,4 +1,4 @@
README_lang.txt for version 7.0 of Vim: Vi IMproved.
README_lang.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_mac.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_ole.txt for version 7.1 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,32 +1,32 @@
README_os2.txt for version 7.0 of Vim: Vi IMproved.
README_os2.txt for version 7.1 of Vim: Vi IMproved.
This file explains the installation of Vim on OS/2 systems.
See "README.txt" for general information about Vim.
NOTE: You will need two archives:
vim70rt.zip contains the runtime files (same as for the PC version)
vim70os2.zip contains the OS/2 executables
vim71rt.zip contains the runtime files (same as for the PC version)
vim71os2.zip contains the OS/2 executables
1. Go to the directory where you want to put the Vim files. Examples:
cd C:\
cd D:\editors
2. Unpack the zip archives. This will create a new directory "vim/vim70",
2. Unpack the zip archives. This will create a new directory "vim/vim71",
in which all the distributed Vim files are placed. Since the directory
name includes the version number, it is unlikely that you overwrite
existing files.
Examples:
pkunzip -d vim70os2.zip
unzip vim70os2.zip
pkunzip -d vim71os2.zip
unzip vim71os2.zip
After you unpacked the files, you can still move the whole directory tree
to another location.
3. Add the directory where vim.exe is to your path. The simplest is to add a
line to your autoexec.bat. Examples:
set path=%path%;C:\vim\vim70
set path=%path%;D:\editors\vim\vim70
set path=%path%;C:\vim\vim71
set path=%path%;D:\editors\vim\vim71
That's it!
@ -41,10 +41,10 @@ Extra remarks:
C:\vim\_viminfo Dynamic info for 'viminfo'.
C:\vim\... Other files you made.
Distributed files:
C:\vim\vim70\vim.exe The Vim version 7.0 executable.
C:\vim\vim70\doc\*.txt The version 7.0 documentation files.
C:\vim\vim70\bugreport.vim A Vim version 7.0 script.
C:\vim\vim70\... Other version 7.0 distributed files.
C:\vim\vim71\vim.exe The Vim version 7.1 executable.
C:\vim\vim71\doc\*.txt The version 7.1 documentation files.
C:\vim\vim71\bugreport.vim A Vim version 7.1 script.
C:\vim\vim71\... Other version 7.1 distributed files.
In this case the $VIM environment variable would be set like this:
set VIM=C:\vim

View File

@ -1,4 +1,4 @@
README_os_390.txt for version 7.0 of Vim: Vi IMproved.
README_os_390.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_src.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_srcdos.txt for version 7.1 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.

View File

@ -1,4 +1,4 @@
README_unix.txt for version 7.0 of Vim: Vi IMproved.
README_unix.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_vms.txt for version 7.1 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.0 of Vim: Vi IMproved.
README_w32s.txt for version 7.1 of Vim: Vi IMproved.
This archive contains the gvim.exe that was specifically compiled for use in
the Win32s subsystem in MS-Windows 3.1 and 3.11.

2
farsi/README.txt Normal file
View File

@ -0,0 +1,2 @@
For information about installation of Farsi fonts and Vim usage in Farsi mode,
refer to the Farsi help file by typing ":help farsi" in Vim.

BIN
farsi/fonts/DOS/far-a01.com Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -22,7 +22,7 @@
!define HAVE_NLS
!define VER_MAJOR 7
!define VER_MINOR 0
!define VER_MINOR 1
# ----------- No configurable settings below this line -----------

595
runtime/autoload/ada.vim Normal file
View File

@ -0,0 +1,595 @@
"------------------------------------------------------------------------------
" Description: Perform Ada specific completion & tagging.
" Language: Ada (2005)
" $Id$
" Maintainer: Martin Krischik
" Neil Bird <neil@fnxweb.com>
" $Author$
" $Date$
" Version: 4.2
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK ' should not be in iskeyword.
" 16.07.2006 MK Ada-Mode as vim-ball
" 02.10.2006 MK Better folding.
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: ft-ada-functions
"------------------------------------------------------------------------------
if version < 700
finish
endif
" Section: Constants {{{1
"
let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*'
let g:ada#WordRegex = '\a\w*'
let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*"
let g:ada#Keywords = []
" Section: g:ada#Keywords {{{1
"
" Section: add Ada keywords {{{2
"
for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'keyword',
\ 'info': 'Ada keyword.',
\ 'kind': 'k',
\ 'icase': 1}]
endfor
" Section: GNAT Project Files {{{3
"
if exists ('g:ada_with_gnat_project_files')
for Item in ['project']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'keyword',
\ 'info': 'GNAT projectfile keyword.',
\ 'kind': 'k',
\ 'icase': 1}]
endfor
endif
" Section: add standart exception {{{2
"
for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'exception',
\ 'info': 'Ada standart exception.',
\ 'kind': 'x',
\ 'icase': 1}]
endfor
" Section: add GNAT exception {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['Assert_Failure']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'exception',
\ 'info': 'GNAT exception.',
\ 'kind': 'x',
\ 'icase': 1}]
endfor
endif
" Section: add Ada buildin types {{{2
"
for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'type',
\ 'info': 'Ada buildin type.',
\ 'kind': 't',
\ 'icase': 1}]
endfor
" Section: add GNAT buildin types {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'type',
\ 'info': 'GNAT buildin type.',
\ 'kind': 't',
\ 'icase': 1}]
endfor
endif
" Section: add Ada Attributes {{{2
"
for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'attribute',
\ 'info': 'Ada attribute.',
\ 'kind': 'a',
\ 'icase': 1}]
endfor
" Section: add GNAT Attributes {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'attribute',
\ 'info': 'GNAT attribute.',
\ 'kind': 'a',
\ 'icase': 1}]
endfor
endif
" Section: add Ada Pragmas {{{2
"
for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'pragma',
\ 'info': 'Ada pragma.',
\ 'kind': 'p',
\ 'icase': 1}]
endfor
" Section: add GNAT Pragmas {{{3
"
if exists ('g:ada_gnat_extensions')
for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External']
let g:ada#Keywords += [{
\ 'word': Item,
\ 'menu': 'pragma',
\ 'info': 'GNAT pragma.',
\ 'kind': 'p',
\ 'icase': 1}]
endfor
endif
" 1}}}
" Section: g:ada#Ctags_Kinds {{{1
"
let g:ada#Ctags_Kinds = {
\ 'P': ["packspec", "package specifications"],
\ 'p': ["package", "packages"],
\ 'T': ["typespec", "type specifications"],
\ 't': ["type", "types"],
\ 'U': ["subspec", "subtype specifications"],
\ 'u': ["subtype", "subtypes"],
\ 'c': ["component", "record type components"],
\ 'l': ["literal", "enum type literals"],
\ 'V': ["varspec", "variable specifications"],
\ 'v': ["variable", "variables"],
\ 'f': ["formal", "generic formal parameters"],
\ 'n': ["constant", "constants"],
\ 'x': ["exception", "user defined exceptions"],
\ 'R': ["subprogspec", "subprogram specifications"],
\ 'r': ["subprogram", "subprograms"],
\ 'K': ["taskspec", "task specifications"],
\ 'k': ["task", "tasks"],
\ 'O': ["protectspec", "protected data specifications"],
\ 'o': ["protected", "protected data"],
\ 'E': ["entryspec", "task/protected data entry specifications"],
\ 'e': ["entry", "task/protected data entries"],
\ 'b': ["label", "labels"],
\ 'i': ["identifier", "loop/declare identifiers"],
\ 'a': ["autovar", "automatic variables"],
\ 'y': ["annon", "loops and blocks with no identifier"]}
" Section: ada#Word (...) {{{1
"
" Extract current Ada word across multiple lines
" AdaWord ([line, column])\
"
function ada#Word (...)
if a:0 > 1
let l:Line_Nr = a:1
let l:Column_Nr = a:2 - 1
else
let l:Line_Nr = line('.')
let l:Column_Nr = col('.') - 1
endif
let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
" Cope with tag searching for items in comments; if we are, don't loop
" backards looking for previous lines
if l:Column_Nr > strlen(l:Line)
" We were in a comment
let l:Line = getline(l:Line_Nr)
let l:Search_Prev_Lines = 0
else
let l:Search_Prev_Lines = 1
endif
" Go backwards until we find a match (Ada ID) that *doesn't* include our
" location - i.e., the previous ID. This is because the current 'correct'
" match will toggle matching/not matching as we traverse characters
" backwards. Thus, we have to find the previous unrelated match, exclude
" it, then use the next full match (ours).
" Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)]
" ... but start, here, one after the required char.
let l:New_Column = l:Column_Nr + 1
while 1
let l:New_Column = l:New_Column - 1
if l:New_Column < 0
" Have to include previous l:Line from file
let l:Line_Nr = l:Line_Nr - 1
if l:Line_Nr < 1 || !l:Search_Prev_Lines
" Start of file or matching in a comment
let l:Line_Nr = 1
let l:New_Column = 0
let l:Our_Match = match (l:Line, g:ada#WordRegex )
break
endif
" Get previous l:Line, and prepend it to our search string
let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
let l:New_Column = strlen (l:New_Line) - 1
let l:Column_Nr = l:Column_Nr + l:New_Column
let l:Line = l:New_Line . l:Line
endif
" Check to see if this is a match excluding 'us'
let l:Match_End = l:New_Column +
\ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1
if l:Match_End >= l:New_Column &&
\ l:Match_End < l:Column_Nr
" Yes
let l:Our_Match = l:Match_End+1 +
\ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex )
break
endif
endwhile
" Got anything?
if l:Our_Match < 0
return ''
else
let l:Line = strpart (l:Line, l:Our_Match)
endif
" Now simply add further lines until the match gets no bigger
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
let l:Last_Line = line ('$')
let l:Line_Nr = line ('.') + 1
while l:Line_Nr <= l:Last_Line
let l:Last_Match = l:Match_String
let l:Line = l:Line .
\ substitute (getline (l:Line_Nr), g:ada#Comment, '', '')
let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
if l:Match_String == l:Last_Match
break
endif
endwhile
" Strip whitespace & return
return substitute (l:Match_String, '\s\+', '', 'g')
endfunction ada#Word
" Section: ada#List_Tag (...) {{{1
"
" List tags in quickfix window
"
function ada#List_Tag (...)
if a:0 > 1
let l:Tag_Word = ada#Word (a:1, a:2)
elseif a:0 > 0
let l:Tag_Word = a:1
else
let l:Tag_Word = ada#Word ()
endif
echo "Searching for" l:Tag_Word
let l:Pattern = '^' . l:Tag_Word . '$'
let l:Tag_List = taglist (l:Pattern)
let l:Error_List = []
"
" add symbols
"
for Tag_Item in l:Tag_List
if l:Tag_Item['kind'] == ''
let l:Tag_Item['kind'] = 's'
endif
let l:Error_List += [
\ l:Tag_Item['filename'] . '|' .
\ l:Tag_Item['cmd'] . '|' .
\ l:Tag_Item['kind'] . "\t" .
\ l:Tag_Item['name'] ]
endfor
set errorformat=%f\|%l\|%m
cexpr l:Error_List
cwindow
endfunction ada#List_Tag
" Section: ada#Jump_Tag (Word, Mode) {{{1
"
" Word tag - include '.' and if Ada make uppercase
"
function ada#Jump_Tag (Word, Mode)
if a:Word == ''
" Get current word
let l:Word = ada#Word()
if l:Word == ''
throw "NOT_FOUND: no identifier found."
endif
else
let l:Word = a:Word
endif
echo "Searching for " . l:Word
try
execute a:Mode l:Word
catch /.*:E426:.*/
let ignorecase = &ignorecase
set ignorecase
execute a:Mode l:Word
let &ignorecase = ignorecase
endtry
return
endfunction ada#Jump_Tag
" Section: ada#Insert_Backspace () {{{1
"
" Backspace at end of line after auto-inserted commentstring '-- ' wipes it
"
function ada#Insert_Backspace ()
let l:Line = getline ('.')
if col ('.') > strlen (l:Line) &&
\ match (l:Line, '-- $') != -1 &&
\ match (&comments,'--') != -1
return "\<bs>\<bs>\<bs>"
else
return "\<bs>"
endif
return
endfunction ada#InsertBackspace
" Section: Insert Completions {{{1
"
" Section: ada#User_Complete(findstart, base) {{{2
"
" This function is used for the 'complete' option.
"
function! ada#User_Complete(findstart, base)
if a:findstart == 1
"
" locate the start of the word
"
let line = getline ('.')
let start = col ('.') - 1
while start > 0 && line[start - 1] =~ '\i\|'''
let start -= 1
endwhile
return start
else
"
" look up matches
"
let l:Pattern = '^' . a:base . '.*$'
"
" add keywords
"
for Tag_Item in g:ada#Keywords
if l:Tag_Item['word'] =~? l:Pattern
if complete_add (l:Tag_Item) == 0
return []
endif
if complete_check ()
return []
endif
endif
endfor
return []
endif
endfunction ada#User_Complete
" Section: ada#Completion (cmd) {{{2
"
" Word completion (^N/^R/^X^]) - force '.' inclusion
function ada#Completion (cmd)
set iskeyword+=46
return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>"
endfunction ada#Completion
" Section: ada#Completion_End () {{{2
"
function ada#Completion_End ()
set iskeyword-=46
return ''
endfunction ada#Completion_End
" Section: ada#Create_Tags {{{1
"
function ada#Create_Tags (option)
if a:option == 'file'
let l:Filename = fnamemodify (bufname ('%'), ':p')
elseif a:option == 'dir'
let l:Filename =
\ fnamemodify (bufname ('%'), ':p:h') . "*.ada " .
\ fnamemodify (bufname ('%'), ':p:h') . "*.adb " .
\ fnamemodify (bufname ('%'), ':p:h') . "*.ads"
else
let l:Filename = a:option
endif
execute '!ctags --excmd=number ' . l:Filename
endfunction ada#Create_Tags
function ada#Switch_Session (New_Session) "{{{1
if a:New_Session != v:this_session
"
" We actualy got a new session - otherwise there
" is nothing to do.
"
if strlen (v:this_session) > 0
execute 'mksession! ' . v:this_session
endif
let v:this_session = a:New_Session
if filereadable (v:this_session)
execute 'source ' . v:this_session
endif
augroup ada_session
autocmd!
autocmd VimLeavePre * execute 'mksession! ' . v:this_session
augroup END
endif
return
endfunction ada#Switch_Session "}}}1
" Section: GNAT Pretty Printer folding {{{1
"
if exists('g:ada_folding') && g:ada_folding[0] == 'g'
"
" Lines consisting only of ')' ';' are due to a gnat pretty bug and
" have the same level as the line above (can't happen in the first
" line).
"
let s:Fold_Collate = '^\([;)]*$\|'
"
" some lone statements are folded with the line above
"
if stridx (g:ada_folding, 'i') >= 0
let s:Fold_Collate .= '\s\+\<is\>$\|'
endif
if stridx (g:ada_folding, 'b') >= 0
let s:Fold_Collate .= '\s\+\<begin\>$\|'
endif
if stridx (g:ada_folding, 'p') >= 0
let s:Fold_Collate .= '\s\+\<private\>$\|'
endif
if stridx (g:ada_folding, 'x') >= 0
let s:Fold_Collate .= '\s\+\<exception\>$\|'
endif
" We also handle empty lines and
" comments here.
let s:Fold_Collate .= '--\)'
function ada#Pretty_Print_Folding (Line) " {{{2
let l:Text = getline (a:Line)
if l:Text =~ s:Fold_Collate
"
" fold with line above
"
let l:Level = "="
elseif l:Text =~ '^\s\+('
"
" gnat outdents a line which stards with a ( by one characters so
" that parameters which follow are aligned.
"
let l:Level = (indent (a:Line) + 1) / &shiftwidth
else
let l:Level = indent (a:Line) / &shiftwidth
endif
return l:Level
endfunction ada#Pretty_Print_Folding " }}}2
endif
" Section: Options and Menus {{{1
"
" Section: ada#Switch_Syntax_Options {{{2
"
function ada#Switch_Syntax_Option (option)
syntax off
if exists ('g:ada_' . a:option)
unlet g:ada_{a:option}
echo a:option . 'now off'
else
let g:ada_{a:option}=1
echo a:option . 'now on'
endif
syntax on
endfunction ada#Switch_Syntax_Option
" Section: ada#Map_Menu {{{2
"
function ada#Map_Menu (Text, Keys, Command)
if a:Keys[0] == ':'
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . a:Keys .
\ " :" . a:Command . "<CR>"
execute
\ "command -buffer " .
\ a:Keys[1:] .
\" :" . a:Command . "<CR>"
elseif a:Keys[0] == '<'
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . a:Keys .
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer> " .
\ a:Keys .
\" :" . a:Command . "<CR>"
execute
\ "inoremap <buffer> " .
\ a:Keys .
\" <C-O>:" . a:Command . "<CR>"
else
execute
\ "50amenu " .
\ "Ada." . escape(a:Text, ' ') .
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
execute
\ "nnoremap <buffer>" .
\ escape(g:mapleader . "a" . a:Keys , '\') .
\" :" . a:Command
execute
\ "inoremap <buffer>" .
\ escape(g:mapleader . "a" . a:Keys , '\') .
\" <C-O>:" . a:Command
endif
return
endfunction
" Section: ada#Map_Popup {{{2
"
function ada#Map_Popup (Text, Keys, Command)
execute
\ "50amenu " .
\ "PopUp." . escape(a:Text, ' ') .
\ "<Tab>" . escape(g:mapleader . "a" . a:Keys , '\') .
\ " :" . a:Command . "<CR>"
call ada#Map_Menu (a:Text, a:Keys, a:Command)
return
endfunction ada#Map_Popup
" }}}1
lockvar g:ada#WordRegex
lockvar g:ada#DotWordRegex
lockvar g:ada#Comment
lockvar! g:ada#Keywords
lockvar! g:ada#Ctags_Kinds
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

View File

@ -0,0 +1,109 @@
"------------------------------------------------------------------------------
" Description: Vim Ada omnicompletion file
" Language: Ada (2005)
" $Id$
" Maintainer: Martin Krischik
" $Author$
" $Date$
" Version: 4.2
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
" History: 24.05.2006 MK Unified Headers
" 26.05.2006 MK improved search for begin of word.
" 16.07.2006 MK Ada-Mode as vim-ball
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested agaist using setlocal omnifunc
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: ft-ada-omni
"------------------------------------------------------------------------------
if version < 700
finish
endif
" Section: adacomplete#Complete () {{{1
"
" This function is used for the 'omnifunc' option.
"
function! adacomplete#Complete (findstart, base)
if a:findstart == 1
return ada#User_Complete (a:findstart, a:base)
else
"
" look up matches
"
if exists ("g:ada_omni_with_keywords")
call ada#User_Complete (a:findstart, a:base)
endif
"
" search tag file for matches
"
let l:Pattern = '^' . a:base . '.*$'
let l:Tag_List = taglist (l:Pattern)
"
" add symbols
"
for Tag_Item in l:Tag_List
if l:Tag_Item['kind'] == ''
"
" Tag created by gnat xref
"
let l:Match_Item = {
\ 'word': l:Tag_Item['name'],
\ 'menu': l:Tag_Item['filename'],
\ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'],
\ 'kind': 's',
\ 'icase': 1}
else
"
" Tag created by ctags
"
let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n"
let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n"
let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n"
if has_key( l:Tag_Item, 'package')
let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n"
let l:Menu = l:Tag_Item['package']
elseif has_key( l:Tag_Item, 'separate')
let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n"
let l:Menu = l:Tag_Item['separate']
elseif has_key( l:Tag_Item, 'packspec')
let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n"
let l:Menu = l:Tag_Item['packspec']
elseif has_key( l:Tag_Item, 'type')
let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n"
let l:Menu = l:Tag_Item['type']
else
let l:Menu = l:Tag_Item['filename']
endif
let l:Match_Item = {
\ 'word': l:Tag_Item['name'],
\ 'menu': l:Menu,
\ 'info': l:Info,
\ 'kind': l:Tag_Item['kind'],
\ 'icase': 1}
endif
if complete_add (l:Match_Item) == 0
return []
endif
if complete_check ()
return []
endif
endfor
return []
endif
endfunction adacomplete#Complete
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

View File

@ -1,430 +1,429 @@
" Vim completion script
" Language: CSS 2.1
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Apr 30
" Last Change: 2007 May 5
let s:values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index")
function! csscomplete#CompleteCSS(findstart, base)
if a:findstart
" We need whole line to proper checking
let line = getline('.')
let start = col('.') - 1
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
while start >= 0 && line[start - 1] =~ '\%(\k\|-\)'
let start -= 1
endwhile
let b:compl_context = getline('.')[0:compl_begin]
let b:compl_context = line[0:compl_begin]
return start
endif
" There are few chars important for context:
" ^ ; : { } /* */
" Where ^ is start of line and /* */ are comment borders
" Depending on their relative position to cursor we will know what should
" be completed.
" 1. if nearest are ^ or { or ; current word is property
" 2. if : it is value (with exception of pseudo things)
" 3. if } we are outside of css definitions
" 4. for comments ignoring is be the easiest but assume they are the same
" as 1.
" 5. if @ complete at-rule
" 6. if ! complete important
if exists("b:compl_context")
let line = b:compl_context
unlet! b:compl_context
else
" There are few chars important for context:
" ^ ; : { } /* */
" Where ^ is start of line and /* */ are comment borders
" Depending on their relative position to cursor we will now what should
" be completed.
" 1. if nearest are ^ or { or ; current word is property
" 2. if : it is value (with exception of pseudo things)
" 3. if } we are outside of css definitions
" 4. for comments ignoring is be the easiest but assume they are the same
" as 1.
" 5. if @ complete at-rule
" 6. if ! complete important
if exists("b:compl_context")
let line = b:compl_context
unlet! b:compl_context
else
let line = a:base
endif
let line = a:base
endif
let res = []
let res2 = []
let borders = {}
let res = []
let res2 = []
let borders = {}
" We need the last occurrence of char so reverse line
let revline = join(reverse(split(line, '.\zs')), '')
" Check last occurrence of sequence
let openbrace = stridx(revline, '{')
let closebrace = stridx(revline, '}')
let colon = stridx(revline, ':')
let semicolon = stridx(revline, ';')
let opencomm = stridx(revline, '*/') " Line was reversed
let closecomm = stridx(revline, '/*') " Line was reversed
let style = stridx(revline, '=\s*elyts') " Line was reversed
let atrule = stridx(revline, '@')
let exclam = stridx(revline, '!')
let openbrace = strridx(line, '{')
let closebrace = strridx(line, '}')
let colon = strridx(line, ':')
let semicolon = strridx(line, ';')
let opencomm = strridx(line, '/*')
let closecomm = strridx(line, '*/')
let style = strridx(line, 'style\s*=')
let atrule = strridx(line, '@')
let exclam = strridx(line, '!')
if openbrace > -1
let borders[openbrace] = "openbrace"
endif
if closebrace > -1
let borders[closebrace] = "closebrace"
endif
if colon > -1
let borders[colon] = "colon"
endif
if semicolon > -1
let borders[semicolon] = "semicolon"
endif
if opencomm > -1
let borders[opencomm] = "opencomm"
endif
if closecomm > -1
let borders[closecomm] = "closecomm"
endif
if style > -1
let borders[style] = "style"
endif
if atrule > -1
let borders[atrule] = "atrule"
endif
if exclam > -1
let borders[exclam] = "exclam"
endif
if openbrace > -1
let borders[openbrace] = "openbrace"
endif
if closebrace > -1
let borders[closebrace] = "closebrace"
endif
if colon > -1
let borders[colon] = "colon"
endif
if semicolon > -1
let borders[semicolon] = "semicolon"
endif
if opencomm > -1
let borders[opencomm] = "opencomm"
endif
if closecomm > -1
let borders[closecomm] = "closecomm"
endif
if style > -1
let borders[style] = "style"
endif
if atrule > -1
let borders[atrule] = "atrule"
endif
if exclam > -1
let borders[exclam] = "exclam"
endif
if len(borders) == 0 || borders[min(keys(borders))] =~ '^\(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
" Complete properties
if len(borders) == 0 || borders[max(keys(borders))] =~ '^\%(openbrace\|semicolon\|opencomm\|closecomm\|style\)$'
" Complete properties
let values = split("azimuth background background-attachment background-color background-image background-position background-repeat border bottom border-collapse border-color border-spacing border-style border-top border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width border-bottom-width border-left-width border-width caption-side clear clip color content counter-increment counter-reset cue cue-after cue-before cursor display direction elevation empty-cells float font font-family font-size font-style font-variant font-weight height left letter-spacing line-height list-style list-style-image list-style-position list-style-type margin margin-right margin-left margin-top margin-bottom max-height max-width min-height min-width orphans outline outline-color outline-style outline-width overflow padding padding-top padding-right padding-bottom padding-left page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position quotes right richness speak speak-header speak-numeral speak-punctuation speech-rate stress table-layout text-align text-decoration text-indent text-transform top unicode-bidi vertical-align visibility voice-family volume white-space width widows word-spacing z-index")
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
let entered_property = matchstr(line, '.\{-}\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_property
call add(res, m . ':')
elseif m =~? entered_property
call add(res2, m . ':')
endif
endfor
for m in s:values
if m =~? '^'.entered_property
call add(res, m . ':')
elseif m =~? entered_property
call add(res2, m . ':')
endif
endfor
return res + res2
return res + res2
elseif borders[min(keys(borders))] == 'colon'
" Get name of property
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
elseif borders[max(keys(borders))] == 'colon'
" Get name of property
let prop = tolower(matchstr(line, '\zs[a-zA-Z-]*\ze\s*:[^:]\{-}$'))
if prop == 'azimuth'
let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"]
elseif prop == 'background-attachment'
let values = ["scroll", "fixed"]
elseif prop == 'background-color'
let values = ["transparent", "rgb(", "#"]
elseif prop == 'background-image'
let values = ["url(", "none"]
elseif prop == 'background-position'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z]\+\)\?$'
let values = ["top", "center", "bottom"]
elseif vals =~ '^[a-zA-Z]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["left", "center", "right"]
else
return []
endif
elseif prop == 'background-repeat'
let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'background'
let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'border-collapse'
let values = ["collapse", "separate"]
elseif prop == 'border-color'
let values = ["rgb(", "#", "transparent"]
elseif prop == 'border-spacing'
return []
elseif prop == 'border-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\(top\|right\|bottom\|left\)$'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-color'
let values = ["rgb(", "#", "transparent"]
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\(top\|right\|bottom\|left\)-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop == 'bottom'
let values = ["auto"]
elseif prop == 'caption-side'
let values = ["top", "bottom"]
elseif prop == 'clear'
let values = ["none", "left", "right", "both"]
elseif prop == 'clip'
let values = ["auto", "rect("]
elseif prop == 'color'
let values = ["rgb(", "#"]
elseif prop == 'content'
let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"]
elseif prop =~ 'counter-\(increment\|reset\)$'
let values = ["none"]
elseif prop =~ '^\(cue-after\|cue-before\|cue\)$'
let values = ["url(", "none"]
elseif prop == 'cursor'
let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"]
elseif prop == 'direction'
let values = ["ltr", "rtl"]
elseif prop == 'display'
let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"]
elseif prop == 'elevation'
let values = ["below", "level", "above", "higher", "lower"]
elseif prop == 'empty-cells'
let values = ["show", "hide"]
elseif prop == 'float'
let values = ["left", "right", "none"]
elseif prop == 'font-family'
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
elseif prop == 'font-size'
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
elseif prop == 'font-style'
let values = ["normal", "italic", "oblique"]
elseif prop == 'font-variant'
let values = ["normal", "small-caps"]
elseif prop == 'font-weight'
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
elseif prop == 'font'
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
elseif prop =~ '^\(height\|width\)$'
let values = ["auto"]
elseif prop =~ '^\(left\|rigth\)$'
let values = ["auto"]
elseif prop == 'letter-spacing'
let values = ["normal"]
elseif prop == 'line-height'
let values = ["normal"]
elseif prop == 'list-style-image'
let values = ["url(", "none"]
elseif prop == 'list-style-position'
let values = ["inside", "outside"]
elseif prop == 'list-style-type'
let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"]
elseif prop == 'list-style'
return []
elseif prop == 'margin'
let values = ["auto"]
elseif prop =~ 'margin-\(right\|left\|top\|bottom\)$'
let values = ["auto"]
elseif prop == 'max-height'
let values = ["auto"]
elseif prop == 'max-width'
let values = ["none"]
elseif prop == 'min-height'
let values = ["none"]
elseif prop == 'min-width'
let values = ["none"]
elseif prop == 'orphans'
return []
elseif prop == 'outline-color'
let values = ["rgb(", "#"]
elseif prop == 'outline-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop == 'outline-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'outline'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\([a-zA-Z0-9,()#]\+\)\?$'
let values = ["rgb(", "#"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\([a-zA-Z(]\+\)\?$'
let values = ["thin", "thick", "medium"]
else
return []
endif
elseif prop == 'overflow'
let values = ["visible", "hidden", "scroll", "auto"]
elseif prop == 'padding'
return []
elseif prop =~ 'padding-\(top\|right\|bottom\|left\)$'
return []
elseif prop =~ 'page-break-\(after\|before\)$'
let values = ["auto", "always", "avoid", "left", "right"]
elseif prop == 'page-break-inside'
let values = ["auto", "avoid"]
elseif prop =~ 'pause-\(after\|before\)$'
return []
elseif prop == 'pause'
return []
elseif prop == 'pitch-range'
return []
elseif prop == 'pitch'
let values = ["x-low", "low", "medium", "high", "x-high"]
elseif prop == 'play-during'
let values = ["url(", "mix", "repeat", "auto", "none"]
elseif prop == 'position'
let values = ["static", "relative", "absolute", "fixed"]
elseif prop == 'quotes'
let values = ["none"]
elseif prop == 'richness'
return []
elseif prop == 'speak-header'
let values = ["once", "always"]
elseif prop == 'speak-numeral'
let values = ["digits", "continuous"]
elseif prop == 'speak-punctuation'
let values = ["code", "none"]
elseif prop == 'speak'
let values = ["normal", "none", "spell-out"]
elseif prop == 'speech-rate'
let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"]
elseif prop == 'stress'
return []
elseif prop == 'table-layout'
let values = ["auto", "fixed"]
elseif prop == 'text-align'
let values = ["left", "right", "center", "justify"]
elseif prop == 'text-decoration'
let values = ["none", "underline", "overline", "line-through", "blink"]
elseif prop == 'text-indent'
return []
elseif prop == 'text-transform'
let values = ["capitalize", "uppercase", "lowercase", "none"]
elseif prop == 'top'
let values = ["auto"]
elseif prop == 'unicode-bidi'
let values = ["normal", "embed", "bidi-override"]
elseif prop == 'vertical-align'
let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"]
elseif prop == 'visibility'
let values = ["visible", "hidden", "collapse"]
elseif prop == 'voice-family'
return []
elseif prop == 'volume'
let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
elseif prop == 'white-space'
let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
elseif prop == 'widows'
return []
elseif prop == 'word-spacing'
let values = ["normal"]
elseif prop == 'z-index'
let values = ["auto"]
if prop == 'azimuth'
let values = ["left-side", "far-left", "left", "center-left", "center", "center-right", "right", "far-right", "right-side", "behind", "leftwards", "rightwards"]
elseif prop == 'background-attachment'
let values = ["scroll", "fixed"]
elseif prop == 'background-color'
let values = ["transparent", "rgb(", "#"]
elseif prop == 'background-image'
let values = ["url(", "none"]
elseif prop == 'background-position'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z]\+\)\?$'
let values = ["top", "center", "bottom"]
elseif vals =~ '^[a-zA-Z]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["left", "center", "right"]
else
" If no property match it is possible we are outside of {} and
" trying to complete pseudo-(class|element)
let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$'))
if ",a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var," =~ ','.element.','
let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"]
return []
endif
elseif prop == 'background-repeat'
let values = ["repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'background'
let values = ["url(", "scroll", "fixed", "transparent", "rgb(", "#", "none", "top", "center", "bottom" , "left", "right", "repeat", "repeat-x", "repeat-y", "no-repeat"]
elseif prop == 'border-collapse'
let values = ["collapse", "separate"]
elseif prop == 'border-color'
let values = ["rgb(", "#", "transparent"]
elseif prop == 'border-spacing'
return []
elseif prop == 'border-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)$'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-color'
let values = ["rgb(", "#", "transparent"]
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop =~ 'border-\%(top\|right\|bottom\|left\)-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'border'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z0-9.]\+\)\?$'
let values = ["thin", "thick", "medium"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9.]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
let values = ["rgb(", "#", "transparent"]
else
return []
endif
elseif prop == 'bottom'
let values = ["auto"]
elseif prop == 'caption-side'
let values = ["top", "bottom"]
elseif prop == 'clear'
let values = ["none", "left", "right", "both"]
elseif prop == 'clip'
let values = ["auto", "rect("]
elseif prop == 'color'
let values = ["rgb(", "#"]
elseif prop == 'content'
let values = ["normal", "attr(", "open-quote", "close-quote", "no-open-quote", "no-close-quote"]
elseif prop =~ 'counter-\%(increment\|reset\)$'
let values = ["none"]
elseif prop =~ '^\%(cue-after\|cue-before\|cue\)$'
let values = ["url(", "none"]
elseif prop == 'cursor'
let values = ["url(", "auto", "crosshair", "default", "pointer", "move", "e-resize", "ne-resize", "nw-resize", "n-resize", "se-resize", "sw-resize", "s-resize", "w-resize", "text", "wait", "help", "progress"]
elseif prop == 'direction'
let values = ["ltr", "rtl"]
elseif prop == 'display'
let values = ["inline", "block", "list-item", "run-in", "inline-block", "table", "inline-table", "table-row-group", "table-header-group", "table-footer-group", "table-row", "table-column-group", "table-column", "table-cell", "table-caption", "none"]
elseif prop == 'elevation'
let values = ["below", "level", "above", "higher", "lower"]
elseif prop == 'empty-cells'
let values = ["show", "hide"]
elseif prop == 'float'
let values = ["left", "right", "none"]
elseif prop == 'font-family'
let values = ["sans-serif", "serif", "monospace", "cursive", "fantasy"]
elseif prop == 'font-size'
let values = ["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller"]
elseif prop == 'font-style'
let values = ["normal", "italic", "oblique"]
elseif prop == 'font-variant'
let values = ["normal", "small-caps"]
elseif prop == 'font-weight'
let values = ["normal", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900"]
elseif prop == 'font'
let values = ["normal", "italic", "oblique", "small-caps", "bold", "bolder", "lighter", "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "larger", "smaller", "sans-serif", "serif", "monospace", "cursive", "fantasy", "caption", "icon", "menu", "message-box", "small-caption", "status-bar"]
elseif prop =~ '^\%(height\|width\)$'
let values = ["auto"]
elseif prop =~ '^\%(left\|rigth\)$'
let values = ["auto"]
elseif prop == 'letter-spacing'
let values = ["normal"]
elseif prop == 'line-height'
let values = ["normal"]
elseif prop == 'list-style-image'
let values = ["url(", "none"]
elseif prop == 'list-style-position'
let values = ["inside", "outside"]
elseif prop == 'list-style-type'
let values = ["disc", "circle", "square", "decimal", "decimal-leading-zero", "lower-roman", "upper-roman", "lower-latin", "upper-latin", "none"]
elseif prop == 'list-style'
return []
elseif prop == 'margin'
let values = ["auto"]
elseif prop =~ 'margin-\%(right\|left\|top\|bottom\)$'
let values = ["auto"]
elseif prop == 'max-height'
let values = ["auto"]
elseif prop == 'max-width'
let values = ["none"]
elseif prop == 'min-height'
let values = ["none"]
elseif prop == 'min-width'
let values = ["none"]
elseif prop == 'orphans'
return []
elseif prop == 'outline-color'
let values = ["rgb(", "#"]
elseif prop == 'outline-style'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif prop == 'outline-width'
let values = ["thin", "thick", "medium"]
elseif prop == 'outline'
let vals = matchstr(line, '.*:\s*\zs.*')
if vals =~ '^\%([a-zA-Z0-9,()#]\+\)\?$'
let values = ["rgb(", "#"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+\%([a-zA-Z]\+\)\?$'
let values = ["none", "hidden", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset"]
elseif vals =~ '^[a-zA-Z0-9,()#]\+\s\+[a-zA-Z]\+\s\+\%([a-zA-Z(]\+\)\?$'
let values = ["thin", "thick", "medium"]
else
return []
endif
elseif prop == 'overflow'
let values = ["visible", "hidden", "scroll", "auto"]
elseif prop == 'padding'
return []
elseif prop =~ 'padding-\%(top\|right\|bottom\|left\)$'
return []
elseif prop =~ 'page-break-\%(after\|before\)$'
let values = ["auto", "always", "avoid", "left", "right"]
elseif prop == 'page-break-inside'
let values = ["auto", "avoid"]
elseif prop =~ 'pause-\%(after\|before\)$'
return []
elseif prop == 'pause'
return []
elseif prop == 'pitch-range'
return []
elseif prop == 'pitch'
let values = ["x-low", "low", "medium", "high", "x-high"]
elseif prop == 'play-during'
let values = ["url(", "mix", "repeat", "auto", "none"]
elseif prop == 'position'
let values = ["static", "relative", "absolute", "fixed"]
elseif prop == 'quotes'
let values = ["none"]
elseif prop == 'richness'
return []
elseif prop == 'speak-header'
let values = ["once", "always"]
elseif prop == 'speak-numeral'
let values = ["digits", "continuous"]
elseif prop == 'speak-punctuation'
let values = ["code", "none"]
elseif prop == 'speak'
let values = ["normal", "none", "spell-out"]
elseif prop == 'speech-rate'
let values = ["x-slow", "slow", "medium", "fast", "x-fast", "faster", "slower"]
elseif prop == 'stress'
return []
elseif prop == 'table-layout'
let values = ["auto", "fixed"]
elseif prop == 'text-align'
let values = ["left", "right", "center", "justify"]
elseif prop == 'text-decoration'
let values = ["none", "underline", "overline", "line-through", "blink"]
elseif prop == 'text-indent'
return []
elseif prop == 'text-transform'
let values = ["capitalize", "uppercase", "lowercase", "none"]
elseif prop == 'top'
let values = ["auto"]
elseif prop == 'unicode-bidi'
let values = ["normal", "embed", "bidi-override"]
elseif prop == 'vertical-align'
let values = ["baseline", "sub", "super", "top", "text-top", "middle", "bottom", "text-bottom"]
elseif prop == 'visibility'
let values = ["visible", "hidden", "collapse"]
elseif prop == 'voice-family'
return []
elseif prop == 'volume'
let values = ["silent", "x-soft", "soft", "medium", "loud", "x-loud"]
elseif prop == 'white-space'
let values = ["normal", "pre", "nowrap", "pre-wrap", "pre-line"]
elseif prop == 'widows'
return []
elseif prop == 'word-spacing'
let values = ["normal"]
elseif prop == 'z-index'
let values = ["auto"]
else
" If no property match it is possible we are outside of {} and
" trying to complete pseudo-(class|element)
let element = tolower(matchstr(line, '\zs[a-zA-Z1-6]*\ze:[^:[:space:]]\{-}$'))
if stridx(',a,abbr,acronym,address,area,b,base,bdo,big,blockquote,body,br,button,caption,cite,code,col,colgroup,dd,del,dfn,div,dl,dt,em,fieldset,form,head,h1,h2,h3,h4,h5,h6,hr,html,i,img,input,ins,kbd,label,legend,li,link,map,meta,noscript,object,ol,optgroup,option,p,param,pre,q,samp,script,select,small,span,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,title,tr,tt,ul,var,', ','.element.',') > -1
let values = ["first-child", "link", "visited", "hover", "active", "focus", "lang", "first-line", "first-letter", "before", "after"]
else
return []
endif
endif
" Complete values
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
for m in values
if m =~? '^'.entered_value
call add(res, m)
elseif m =~? entered_value
call add(res2, m)
endif
endfor
return res + res2
elseif borders[max(keys(borders))] == 'closebrace'
return []
elseif borders[max(keys(borders))] == 'exclam'
" Complete values
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
let values = ["important"]
for m in values
if m =~? '^'.entered_imp
call add(res, m)
endif
endfor
return res
elseif borders[max(keys(borders))] == 'atrule'
let afterat = matchstr(line, '.*@\zs.*')
if afterat =~ '\s'
let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze')
if atrulename == 'media'
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
elseif atrulename == 'import'
let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$')
if entered_atruleafter =~ "^[\"']"
let filestart = matchstr(entered_atruleafter, '^.\zs.*')
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"\"".v:val')
elseif entered_atruleafter =~ "^url("
let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*")
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"url(".v:val')
else
return []
let values = ['"', 'url(']
endif
else
return []
endif
" Complete values
let entered_value = matchstr(line, '.\{-}\zs[a-zA-Z0-9#,.(_-]*$')
for m in values
if m =~? '^'.entered_value
if m =~? '^'.entered_atruleafter
call add(res, m)
elseif m =~? entered_value
elseif m =~? entered_atruleafter
call add(res2, m)
endif
endfor
return res + res2
elseif borders[min(keys(borders))] == 'closebrace'
endif
return []
let values = ["charset", "page", "media", "import", "font-face"]
elseif borders[min(keys(borders))] == 'exclam'
" Complete values
let entered_imp = matchstr(line, '.\{-}!\s*\zs[a-zA-Z ]*$')
let values = ["important"]
for m in values
if m =~? '^'.entered_imp
call add(res, m)
endif
endfor
return res
elseif borders[min(keys(borders))] == 'atrule'
let afterat = matchstr(line, '.*@\zs.*')
if afterat =~ '\s'
let atrulename = matchstr(line, '.*@\zs[a-zA-Z-]\+\ze')
if atrulename == 'media'
let values = ["screen", "tty", "tv", "projection", "handheld", "print", "braille", "aural", "all"]
let atruleafterbase = matchstr(line, '.*@media\s\+\ze.*$')
let entered_atruleafter = matchstr(line, '.*@media\s\+\zs.*$')
elseif atrulename == 'import'
let atruleafterbase = matchstr(line, '.*@import\s\+\ze.*$')
let entered_atruleafter = matchstr(line, '.*@import\s\+\zs.*$')
if entered_atruleafter =~ "^[\"']"
let filestart = matchstr(entered_atruleafter, '^.\zs.*')
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"\"".v:val')
elseif entered_atruleafter =~ "^url("
let filestart = matchstr(entered_atruleafter, "^url([\"']\\?\\zs.*")
let files = split(glob(filestart.'*'), '\n')
let values = map(copy(files), '"url(".v:val')
else
let values = ['"', 'url(']
endif
else
return []
endif
for m in values
if m =~? '^'.entered_atruleafter
call add(res, m)
elseif m =~? entered_atruleafter
call add(res2, m)
endif
endfor
return res + res2
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
for m in values
if m =~? '^'.entered_atrule
call add(res, m .' ')
elseif m =~? entered_atrule
call add(res2, m .' ')
endif
endfor
let values = ["charset", "page", "media", "import", "font-face"]
return res + res2
let entered_atrule = matchstr(line, '.*@\zs[a-zA-Z-]*$')
endif
for m in values
if m =~? '^'.entered_atrule
call add(res, m .' ')
elseif m =~? entered_atrule
call add(res2, m .' ')
endif
endfor
return []
return res + res2
endif
return []
endif
endfunction

View File

@ -0,0 +1,75 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/Dec Ada compiler file
" Language: Ada (Dec Ada)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" $Author$
" $Date$
" Version: 4.2
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: compiler-decada
"------------------------------------------------------------------------------
if version < 700
finish
endif
function decada#Unit_Name () dict " {{{1
" Convert filename into acs unit:
" 1: remove the file extenstion.
" 2: replace all double '_' or '-' with an dot (which denotes a separate)
" 3: remove a trailing '_' (wich denotes a specification)
return substitute (substitute (expand ("%:t:r"), '__\|-', ".", "g"), '_$', "", '')
endfunction decada#Unit_Name " }}}1
function decada#Make () dict " {{{1
let l:make_prg = substitute (g:self.Make_Command, '%<', self.Unit_Name(), '')
let &errorformat = g:self.Error_Format
let &makeprg = l:make_prg
wall
make
copen
set wrap
wincmd W
endfunction decada#Build " }}}1
function decada#Set_Session (...) dict " {{{1
if a:0 > 0
call ada#Switch_Session (a:1)
elseif argc() == 0 && strlen (v:servername) > 0
call ada#Switch_Session (
\ expand('~')[0:-2] . ".vimfiles.session]" .
\ v:servername . ".vim")
endif
return
endfunction decada#Set_Session " }}}1
function decada#New () " }}}1
let Retval = {
\ 'Make' : function ('decada#Make'),
\ 'Unit_Name' : function ('decada#Unit_Name'),
\ 'Set_Session' : function ('decada#Set_Session'),
\ 'Project_Dir' : '',
\ 'Make_Command' : 'ACS COMPILE /Wait /Log /NoPreLoad /Optimize=Development /Debug %<',
\ 'Error_Format' : '%+A%%ADAC-%t-%m,%C %#%m,%Zat line number %l in file %f,' .
\ '%+I%%ada-I-%m,%C %#%m,%Zat line number %l in file %f'}
return Retval
endfunction decada#New " }}}1
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

View File

@ -1,40 +1,56 @@
" ---------------------------------------------------------------------
" GetLatestVimScripts.vim
" Author: Charles E. Campbell, Jr.
" Date: Feb 15, 2006
" Version: 20
" getscript.vim
" Author: Charles E. Campbell, Jr.
" Date: May 11, 2007
" Version: 27
" Installing: :help glvs-install
" Usage: :help glvs
" Usage: :help glvs
"
" GetLatestVimScripts: 642 1 :AutoInstall: GetLatestVimScripts.vim
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Initialization: {{{1
" if you're sourcing this file, surely you can't be
" expecting vim to be in its vi-compatible mode
if &cp
if &verbose
echo "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
endif
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
endif
let s:keepfo = &fo
let s:keepcpo = &cpo
set cpo&vim
"DechoTabOn
if exists("loaded_GetLatestVimScripts")
if exists("g:loaded_getscript")
finish
endif
let g:loaded_GetLatestVimScripts= "v20"
let g:loaded_getscript= "v27"
" ---------------------------------------------------------------------
" Global Variables: {{{1
" allow user to change the command for obtaining scripts (does fetch work?)
if !exists("g:GetLatestVimScripts_wget")
let g:GetLatestVimScripts_wget= "wget"
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl")
let g:GetLatestVimScripts_wget= "curl"
else
let g:GetLatestVimScripts_wget = 'echo "GetLatestVimScripts needs wget or curl"'
let g:GetLatestVimScripts_options = ""
endif
endif
" options that wget and curl require:
if !exists("g:GetLatestVimScripts_options")
let g:GetLatestVimScripts_options= "-q -O"
if g:GetLatestVimScripts_wget == "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget == "curl"
let g:GetLatestVimScripts_options= "-s -O"
else
let g:GetLatestVimScripts_options= ""
endif
endif
" by default, allow autoinstall lines to work
if !exists("g:GetLatestVimScripts_allowautoinstall")
let g:GetLatestVimScripts_allowautoinstall= 1
endif
@ -43,7 +59,8 @@ endif
"let g:GetLatestVimScripts_wget = "echo"
"let g:GetLatestVimScripts_options = "options"
" check if s:autoinstall is possible
" ---------------------------------------------------------------------
" Check If AutoInstall Capable: {{{1
let s:autoinstall= ""
if g:GetLatestVimScripts_allowautoinstall
@ -66,21 +83,22 @@ if g:GetLatestVimScripts_allowautoinstall
let s:autoinstall= $HOME."/".s:dotvim
endif
" call Decho("s:autoinstall<".s:autoinstall.">")
else
"else "Decho
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
endif
" ---------------------------------------------------------------------
" Public Interface: {{{1
com! -nargs=0 GetLatestVimScripts call <SID>GetLatestVimScripts()
silent! com -nargs=0 GLVS call <SID>GetLatestVimScripts()
com! -nargs=0 GetLatestVimScripts call getscript#GetLatestVimScripts()
com! -nargs=0 GetScript call getscript#GetLatestVimScripts()
silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" ---------------------------------------------------------------------
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sf.net.
fun! <SID>GetOneScript(...)
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
@ -96,33 +114,43 @@ fun! <SID>GetOneScript(...)
if a:0 >= 3
let scriptid = a:1
let srcid = a:2
let cmmnt = a:3
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("cmmnt <".cmmnt.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)$'
if curline =~ '^\s*#'
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
try
let scriptid = substitute(curline,parsepat,'\1','e')
catch /^Vim\%((\a\+)\)\=:E486/
let scriptid= 0
let scriptid= 0
endtry
try
let srcid = substitute(curline,parsepat,'\2','e')
catch /^Vim\%((\a\+)\)\=:E486/
let srcid= 0
let srcid= 0
endtry
try
let cmmnt = substitute(curline,parsepat,'\3','e')
let fname= substitute(curline,parsepat,'\3','e')
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
let fname= ""
endtry
try
let cmmnt= substitute(curline,parsepat,'\4','e')
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("cmmnt <".cmmnt.">")
" call Decho("fname <".fname.">")
endif
if scriptid == 0 || srcid == 0
@ -133,15 +161,15 @@ fun! <SID>GetOneScript(...)
endif
let doautoinstall= 0
if cmmnt =~ ":AutoInstall:"
" call Decho("cmmnt<".cmmnt."> has :AutoInstall:...")
let aicmmnt= substitute(cmmnt,'\s\+:AutoInstall:\s\+',' ','')
if fname =~ ":AutoInstall:"
" call Decho("fname<".fname."> has :AutoInstall:...")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= cmmnt
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
@ -155,7 +183,7 @@ fun! <SID>GetOneScript(...)
let tmpfile = tempname()
let v:errmsg = ""
" make three tries at downloading the description
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho("try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
@ -182,19 +210,19 @@ fun! <SID>GetOneScript(...)
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding /Click on the package.../ fail?
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
silent q!
call delete(tmpfile)
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
return
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
return
endif
" call Decho('found "Click on the package to download"')
@ -216,74 +244,101 @@ fun! <SID>GetOneScript(...)
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let fname = substitute(getline("."),srcidpat,'\2','')
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> fname<".fname.">")
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." fname<".fname.">")
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates
" that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if fname == bufname("%")
if sname == bufname("%")
" GetLatestVimScript has to be careful about downloading itself
let fname= "NEW_".fname
let sname= "NEW_".sname
endif
" the plugin has been updated since we last obtained it, so download a new copy
" call Decho("...downloading new <".fname.">")
echomsg "...downloading new <".fname.">"
" call Decho("...downloading new <".sname.">")
echomsg "...downloading new <".sname.">"
if has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
" call Decho("windows: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"')
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname.' "'.'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid.'"'
else
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".fname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
" call Decho("unix: silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'")
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".sname." '".'http://vim.sf.net/scripts/download_script.php?src_id='.latestsrcid."'"
endif
" AutoInstall: only if doautoinstall is so indicating
if doautoinstall
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".fname.")=".filereadable(fname))
if filereadable(fname)
" call Decho("move <".fname."> to ".s:autoinstall)
" call Decho("DISABLED for testing")
exe "silent !"g:GetLatestVimScripts_mv." ".fname." ".s:autoinstall
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
exe "cd ".s:autoinstall
if fname =~ '\.bz2$'
" call Decho("attempt to bunzip2 ".fname)
exe "silent !bunzip2 ".fname
let fname= substitute(fname,'\.bz2$','','')
elseif fname =~ '\.gz$'
" call Decho("attempt to gunzip ".fname)
exe "silent !gunzip ".fname
let fname= substitute(fname,'\.gz$','','')
endif
if fname =~ '\.zip$'
" call Decho("attempt to unzip ".fname)
exe "silent !unzip -o".fname
elseif fname =~ '\.tar$'
" call Decho("attempt to untar ".fname)
exe "silent !tar -oxvf ".fname
endif
if fname =~ '.vim$'
" call Decho("attempt to simply move ".fname." to plugin")
exe "silent !".g:GetLatestVimScripts_mv." ".fname." plugin"
endif
exe "helptags ../".s:dotvim."/doc"
exe "cd ".curdir
endif
" call Decho("attempting to do autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("move <".sname."> to ".s:autoinstall)
exe "silent !".g:GetLatestVimScripts_mv." ".sname." ".s:autoinstall
let curdir= escape(substitute(getcwd(),'\','/','ge'),"|[]*'\" #")
" call Decho("exe cd ".s:autoinstall)
exe "cd ".s:autoinstall
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "silent !bunzip2 ".sname
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "silent !gunzip ".sname
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
endif
" distribute archive(.zip, .tar, .vba) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".sname
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".sname
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
silent 1split
exe "silent e ".sname
silent so %
silent q
endif
if sname =~ '.vim$'
" call Decho("dearchive: attempt to simply move ".sname." to plugin")
exe "silent !".g:GetLatestVimScripts_mv." ".sname." plugin"
endif
" helptags step
let docdir= substitute(&rtp,',.*','','e')."/doc"
" call Decho("helptags: docdir<".docdir.">")
exe "helptags ".docdir
exe "cd ".curdir
endif
if fname !~ ':AutoInstall:'
let modline=scriptid." ".latestsrcid." :AutoInstall: ".fname.cmmnt
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
else
let modline=scriptid." ".latestsrcid." ".fname.cmmnt
endif
" update the data in the <GetLatestVimScripts.dat> file
let modline=scriptid." ".latestsrcid." ".cmmnt
call setline(line("."),modline)
" call Decho("modline<".modline."> (updated GetLatestVimScripts.dat file)")
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
" else " Decho
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif
" restore options
@ -296,10 +351,9 @@ endfun
" ---------------------------------------------------------------------
" GetLatestVimScripts: this function gets the latest versions of {{{1
" scripts based on the list in
"
" scripts based on the list in
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
fun! <SID>GetLatestVimScripts()
fun! getscript#GetLatestVimScripts()
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
" insure that wget is executable
@ -309,30 +363,28 @@ fun! <SID>GetLatestVimScripts()
return
endif
" Find the .../GetLatest sudirectory under the runtimepath
let rtplist= &rtp
while rtplist != ""
let datadir= substitute(rtplist,',.*$','','e')."/GetLatest"
if isdirectory(datadir)
" call Decho("found directory<".datadir.">")
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
" call Decho("found directory<".datadir.">")
let datadir= datadir . "/GetLatest"
break
endif
unlet datadir
if rtplist =~ ','
let rtplist= substitute(rtplist,'^.\{-},','','e')
else
let rtplist= ""
if filereadable(datadir."GetLatestVimScripts.dat")
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
break
endif
endwhile
endfor
" Sanity checks: readability and writability
if !exists("datadir")
echoerr "Unable to find a GetLatest subdirectory on your runtimepath"
if datadir == ""
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
return
endif
if filewritable(datadir) != 2
echoerr "Your ".datadir." isn't writable"
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
return
endif
@ -368,63 +420,84 @@ fun! <SID>GetLatestVimScripts()
" call Decho(" ")
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
let plugins = globpath(&rtp,"plugin/*.vim")
" call Decho("lastline#".lastline)
let plugins = split(globpath(&rtp,"plugin/*.vim"))
let foundscript = 0
let firstdir= ""
" call Decho("plugins<".plugins."> lastline#".lastline)
while plugins != ""
let plugin = substitute(plugins,'\n.*$','','e')
let plugins= (plugins =~ '\n')? substitute(plugins,'^.\{-}\n\(.*\)$','\1','e') : ""
for plugin in plugins
" don't process plugins in system directories
if firstdir == ""
let firstdir= substitute(plugin,'[/\\][^/\\]\+$','','')
" call Decho("firstdir<".firstdir.">")
else
let curdir= substitute(plugin,'[/\\][^/\\]\+$','','')
" call Decho("curdir<".curdir.">")
if curdir != firstdir
break
endif
endif
" read plugin in
$
" call Decho(" ")
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
exe "silent r ".plugin
while search('^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+','W') != 0
let newscript= substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
let llp1 = lastline+1
" call Decho("..newscript<".newscript.">")
if newscript !~ '^"'
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
let curline = line(".")
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
exe llp1
let srchline = search('\<'.noai_script.'\>','bW')
" call Decho("..newscript<".newscript."> noai_script<".noai_script."> srch=".srchline." lastline=".lastline)
" don't process ""GetLatestVimScripts lines
if newscript !~ '^"'
" found a "GetLatestVimScripts: # #" line in the script; check if its already in the datafile
let curline = line(".")
let noai_script = substitute(newscript,'\s*:AutoInstall:\s*','','e')
exe llp1
let srchline = search('\<'.noai_script.'\>','bW')
" call Decho("..noai_script<".noai_script."> srch=".srchline."curline#".line(".")." lastline#".lastline)
if srchline == 0
" found a new script to permanently include in the datafile
let keep_rega = @a
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
exe lastline."put a"
echomsg "Appending <".@a."> to ".datafile." for ".newscript
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
let @a = keep_rega
let lastline = llp1
let curline = curline + 1
let foundscript = foundscript + 1
" else " Decho
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
let curline = curline + 1
exe curline
endif
if srchline == 0
" found a new script to permanently include in the datafile
let keep_rega = @a
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
exe lastline."put a"
echomsg "Appending <".@a."> to ".datafile." for ".newscript
" call Decho("..APPEND (".noai_script.")<".@a."> to GetLatestVimScripts.dat")
let @a = keep_rega
let lastline = llp1
let curline = curline + 1
let foundscript = foundscript + 1
" else " Decho
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
let curline = curline + 1
exe curline
endif
endwhile
let llp1= lastline + 1
" call Decho(".deleting lines: ".llp1.",$d")
exe "silent! ".llp1.",$d"
endwhile
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
if foundscript == 0
set nomod
endif
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
set lz
" call Decho(" --- end of dependency checking loop --- ")
" call Decho("call GetOneScript on lines at end of datafile<".datafile.">")
1
/^-----/,$g/^\s*\d/call <SID>GetOneScript()
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
/^-----/,$g/^\s*\d/call s:GetOneScript()
" call Decho("--- end out-of-date checking --- ")
" Final report (an echomsg)
try
@ -434,6 +507,7 @@ fun! <SID>GetLatestVimScripts()
return
endtry
exe "norm! kz\<CR>"
redraw!
let s:msg = ""
if s:downloads == 1
let s:msg = "Downloaded one updated script to <".datadir.">"
@ -450,10 +524,9 @@ fun! <SID>GetLatestVimScripts()
echomsg s:msg
" save the file
if &mod
wq
else
q
silent! w!
endif
q
" restore events and current directory
exe "cd ".escape(substitute(origdir,'\','/','ge'),"|[]*'\" #")
@ -464,7 +537,6 @@ endfun
" ---------------------------------------------------------------------
" Restore Options: {{{1
let &fo = s:keepfo
let &cpo= s:keepcpo
" vim: ts=8 sts=2 fdm=marker nowrap

139
runtime/autoload/gnat.vim Normal file
View File

@ -0,0 +1,139 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/GNAT compiler file
" Language: Ada (GNAT)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" $Author$
" $Date$
" Version: 4.2
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
" 05.08.2006 MK Add session support
" 15.10.2006 MK Bram's suggestion for runtime integration
" 05.11.2006 MK Bram suggested not to use include protection for
" autoload
" 05.11.2006 MK Bram suggested to save on spaces
" Help Page: compiler-gnat
"------------------------------------------------------------------------------
if version < 700
finish
endif
function gnat#Make () dict " {{{1
let &l:makeprg = self.Get_Command('Make')
let &l:errorformat = self.Error_Format
wall
make
copen
set wrap
wincmd W
endfunction gnat#Make " }}}1
function gnat#Pretty () dict " {{{1
execute "!" . self.Get_Command('Pretty')
endfunction gnat#Make " }}}1
function gnat#Find () dict " {{{1
execute "!" . self.Get_Command('Find')
endfunction gnat#Find " }}}1
function gnat#Tags () dict " {{{1
execute "!" . self.Get_Command('Tags')
edit tags
call gnat#Insert_Tags_Header ()
update
quit
endfunction gnat#Tags " }}}1
function gnat#Set_Project_File (...) dict " {{{1
if a:0 > 0
let self.Project_File = a:1
if ! filereadable (self.Project_File)
let self.Project_File = findfile (
\ fnamemodify (self.Project_File, ':r'),
\ $ADA_PROJECT_PATH,
\ 1)
endif
elseif strlen (self.Project_File) > 0
let self.Project_File = browse (0, 'GNAT Project File?', '', self.Project_File)
elseif expand ("%:e") == 'gpr'
let self.Project_File = browse (0, 'GNAT Project File?', '', expand ("%:e"))
else
let self.Project_File = browse (0, 'GNAT Project File?', '', 'default.gpr')
endif
if strlen (v:this_session) > 0
execute 'mksession! ' . v:this_session
endif
if strlen (self.Project_File) > 0
call ada#Switch_Session (
\ expand('~') . "/vimfiles/session/" .
\ fnamemodify (self.Project_File, ":t:r") . ".vim")
else
call ada#Switch_Session ('')
endif
return
endfunction gnat#Set_Project_File " }}}1
function gnat#Get_Command (Command) dict " {{{1
let l:Command = eval ('self.' . a:Command . '_Command')
return eval (l:Command)
endfunction gnat#Get_Command " }}}1
function gnat#Set_Session (...) dict " {{{1
if argc() == 1 && fnamemodify (argv(0), ':e') == 'gpr'
call self.Set_Project_File (argv(0))
elseif strlen (v:servername) > 0
call self.Set_Project_File (v:servername . '.gpr')
endif
endfunction gnat#Set_Session " }}}1
function gnat#New () " {{{1
let l:Retval = {
\ 'Make' : function ('gnat#Make'),
\ 'Pretty' : function ('gnat#Pretty'),
\ 'Find' : function ('gnat#Find'),
\ 'Tags' : function ('gnat#Tags'),
\ 'Set_Project_File' : function ('gnat#Set_Project_File'),
\ 'Set_Session' : function ('gnat#Set_Session'),
\ 'Get_Command' : function ('gnat#Get_Command'),
\ 'Project_File' : '',
\ 'Make_Command' : '"gnat make -P " . self.Project_File . " -F -gnatef "',
\ 'Pretty_Command' : '"gnat pretty -P " . self.Project_File . " "',
\ 'Find_Program' : '"gnat find -P " . self.Project_File . " -F "',
\ 'Tags_Command' : '"gnat xref -P " . self.Project_File . " -v *.AD*"',
\ 'Error_Format' : '%f:%l:%c: %trror: %m,' .
\ '%f:%l:%c: %tarning: %m,' .
\ '%f:%l:%c: (%ttyle) %m'}
return l:Retval
endfunction gnat#New " }}}1
function gnat#Insert_Tags_Header () " {{{1
1insert
!_TAG_FILE_FORMAT 1 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR AdaCore /info@adacore.com/
!_TAG_PROGRAM_NAME gnatxref //
!_TAG_PROGRAM_URL http://www.adacore.com /official site/
!_TAG_PROGRAM_VERSION 5.05w //
.
return
endfunction gnat#Insert_Tags_Header " }}}1
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

View File

@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Oct 03
" Last Change: 2007 May 10
" These functions are used by the gzip plugin.
@ -63,6 +63,12 @@ fun gzip#read(cmd)
" set 'modifiable'
let ma_save = &ma
setlocal ma
" Reset 'foldenable', otherwise line numbers get adjusted.
if has("folding")
let fen_save = &fen
setlocal nofen
endif
" when filtering the whole buffer, it will become empty
let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname()
@ -74,42 +80,50 @@ fun gzip#read(cmd)
if !filereadable(tmp)
" uncompress didn't work! Keep the compressed file then.
echoerr "Error: Could not read uncompressed file"
return
endif
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
let ok = 0
else
'[,']d _
endif
" read in the uncompressed lines "'[-1r tmp"
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
let ok = 1
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
else
execute "silent lockmarks " . l . "r " . tmp
'[,']d _
endif
else
execute "silent " . l . "r " . tmp
" read in the uncompressed lines "'[-1r tmp"
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
else
execute "silent lockmarks " . l . "r " . tmp
endif
else
execute "silent " . l . "r " . tmp
endif
" if buffer became empty, delete trailing blank line
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
endif
" if buffer became empty, delete trailing blank line
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
" Restore saved option values.
let &pm = pm_save
let &cpo = cpo_save
let &l:ma = ma_save
if has("folding")
let &l:fen = fen_save
endif
" When uncompressed the whole buffer, do autocommands
if empty
if ok && empty
if &verbose >= 8
execute "doau BufReadPost " . expand("%:r")
else
@ -177,7 +191,7 @@ endfun
fun s:escape(name)
" shellescape() was added by patch 7.0.111
if v:version > 700 || (v:version == 700 && has('patch111'))
if exists("*shellescape")
return shellescape(a:name)
endif
return "'" . a:name . "'"

View File

@ -1,7 +1,7 @@
" Vim completion script
" Language: HTML and XHTML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Apr 30
" Last Change: 2006 Oct 19
function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
@ -84,7 +84,7 @@ function! htmlcomplete#CompleteTags(findstart, base)
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline)
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$' || i == curline
@ -448,6 +448,15 @@ function! htmlcomplete#CompleteTags(findstart, base)
let attrname = matchstr(attr, '.*\ze\s*=')
let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
let values = []
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
" }}}
if attrname == 'href'
" Now we are looking for local anchors defined by name or id
if entered_value =~ '^#'
@ -604,21 +613,20 @@ function! htmlcomplete#CompleteTags(findstart, base)
if exists("uppercase_tag") && uppercase_tag == 1
let context = tolower(context)
endif
" Handle XML keywords: DOCTYPE and CDATA.
" Handle XML keywords: DOCTYPE
if opentag == ''
let tags += [
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
\ '!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">',
\ '!CDATA'
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">'
\ ]
endif

File diff suppressed because it is too large Load Diff

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: May 01, 2006
" Version: 8
" Date: May 30, 2006
" Version: 9
" 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,16 +22,41 @@ if exists("g:loaded_netrwFileHandlers") || &cp
endif
let s:keepcpo= &cpo
set cpo&vim
let g:loaded_netrwFileHandlers= "v8"
let g:loaded_netrwFileHandlers= "v9"
" ---------------------------------------------------------------------
" netrwFileHandlers#Invoke: {{{1
fun! netrwFileHandlers#Invoke(exten,fname)
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
let fname= a:fname
" list of supported special characters. Consider rcs,v --- that can be
" supported with a NFH_rcsCOMMAv() handler
if a:fname =~ '[@:,$!=\-+%?;~]'
let specials= {
\ '@' : 'AT',
\ ':' : 'COLON',
\ ',' : 'COMMA',
\ '$' : 'DOLLAR',
\ '!' : 'EXCLAMATION',
\ '=' : 'EQUAL',
\ '-' : 'MINUS',
\ '+' : 'PLUS',
\ '%' : 'PERCENT',
\ '?' : 'QUESTION',
\ ';' : 'SEMICOLON',
\ '~' : 'TILDE'}
let fname= substitute(a:fname,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
" call Decho('fname<'.fname.'> done with dictionary')
endif
if a:exten != "" && exists("*s:NFH_".a:exten)
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.a:fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
if a:exten != "" && exists("*NFH_".a:exten)
" support user NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= NFH_".a:exten.'("'.fname.'")'
elseif a:exten != "" && exists("*s:NFH_".a:exten)
" use builtin-NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.fname.'")'
endif
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
@ -48,10 +73,10 @@ fun! s:NFH_html(pagefile)
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla \"".page.'"'
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape \"".page.'"'
exe "!netscape ".g:netrw_shq..page.g:netrw_shq
else
" call Dret("s:NFH_html 0")
return 0
@ -71,10 +96,10 @@ fun! s:NFH_htm(pagefile)
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla \"".page.'"'
exe "!mozilla ".g:netrw_shq.page.g:netrw_shq
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape \"".page.'"'
exe "!netscape ".g:netrw_shq.page.g:netrw_shq
else
" call Dret("s:NFH_htm 0")
return 0
@ -90,10 +115,10 @@ fun! s:NFH_jpg(jpgfile)
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:jpgfile
exe "silent! !gimp -s ".g:netrw_shq.a:jpgfile.g:netrw_shq
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:jpgfile.'"'
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:jpgfile.g:netrw_shq
else
" call Dret("s:NFH_jpg 0")
return 0
@ -109,9 +134,9 @@ fun! s:NFH_gif(giffile)
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:giffile
exe "silent! !gimp -s ".g:netrw_shq.a:giffile.g:netrw_shq
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:giffile.'"'
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:giffile.g:netrw_shq
else
" call Dret("s:NFH_gif 0")
return 0
@ -127,9 +152,9 @@ fun! s:NFH_png(pngfile)
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:pngfile
exe "silent! !gimp -s ".g:netrw_shq.a:pngfile.g:netrw_shq
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pngfile.'"'
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pngfile.g:netrw_shq
else
" call Dret("s:NFH_png 0")
return 0
@ -145,9 +170,9 @@ fun! s:NFH_pnm(pnmfile)
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:pnmfile
exe "silent! !gimp -s ".g:netrw_shq.a:pnmfile.g:netrw_shq
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:pnmfile.'"'
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:pnmfile.g:netrw_shq
else
" call Dret("s:NFH_pnm 0")
return 0
@ -165,7 +190,7 @@ fun! s:NFH_bmp(bmpfile)
if executable("gimp")
exe "silent! !gimp -s ".a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT \"".a:bmpfile.'"'
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".g:netrw_shq.a:bmpfile.g:netrw_shq
else
" call Dret("s:NFH_bmp 0")
return 0
@ -180,7 +205,9 @@ endfun
fun! s:NFH_pdf(pdf)
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe 'silent! !gs "'.a:pdf.'"'
exe 'silent! !gs '.g:netrw_shq.a:pdf.g:netrw_shq
elseif executable("pdftotext")
exe 'silent! pdftotext -nopgbrk '.g:netrw_shq.a:pdf.g:netrw_shq
else
" call Dret("s:NFH_pdf 0")
return 0
@ -196,7 +223,7 @@ fun! s:NFH_doc(doc)
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
if executable("oowriter")
exe 'silent! !oowriter "'.a:doc.'"'
exe 'silent! !oowriter '.g:netrw_shq.a:doc.g:netrw_shq
redraw!
else
" call Dret("s:NFH_doc 0")
@ -213,7 +240,7 @@ fun! s:NFH_sxw(sxw)
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe 'silent! !oowriter "'.a:sxw.'"'
exe 'silent! !oowriter '.g:netrw_shq.a:sxw.g:netrw_shq
redraw!
else
" call Dret("s:NFH_sxw 0")
@ -230,7 +257,7 @@ fun! s:NFH_xls(xls)
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
if executable("oocalc")
exe 'silent! !oocalc "'.a:xls.'"'
exe 'silent! !oocalc '.g:netrw_shq.a:xls.g:netrw_shq
redraw!
else
" call Dret("s:NFH_xls 0")
@ -247,15 +274,15 @@ fun! s:NFH_ps(ps)
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
if executable("gs")
" call Decho("exe silent! !gs ".a:ps)
exe "silent! !gs ".a:ps
exe "silent! !gs ".g:netrw_shq.a:ps.g:netrw_shq
redraw!
elseif executable("ghostscript")
" call Decho("exe silent! !ghostscript ".a:ps)
exe "silent! !ghostscript ".a:ps
exe "silent! !ghostscript ".g:netrw_shq.a:ps.g:netrw_shq
redraw!
elseif executable("gswin32")
" call Decho("exe silent! !gswin32 \"".a:ps.'"')
exe "silent! !gswin32 \"".a:ps.'"'
" call Decho("exe silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq)
exe "silent! !gswin32 ".g:netrw_shq.a:ps.g:netrw_shq
redraw!
else
" call Dret("s:NFH_ps 0")
@ -271,16 +298,16 @@ endfun
fun! s:NFH_eps(eps)
" call Dfunc("s:NFH_eps()")
if executable("gs")
exe "silent! !gs ".a:eps
exe "silent! !gs ".g:netrw_shq.a:eps.g:netrw_shq
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".a:eps
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".a:eps
exe "silent! !ghostscript ".g:netrw_shq.a:eps.g:netrw_shq
redraw!
elseif executable("gswin32")
exe "silent! !gswin32 \"".a:eps.'"'
exe "silent! !gswin32 ".g:netrw_shq.a:eps.g:netrw_shq
redraw!
else
" call Dret("s:NFH_eps 0")
@ -325,4 +352,4 @@ endfun
let &cpo= s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: ts=4 fdm=marker
" vim: fdm=marker

View File

@ -1,8 +1,8 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Mar 22, 2006
" Date: Mar 26, 2007
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Version: 6
" Copyright: Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
" Version: 9
" Copyright: Copyright (C) 1999-2007 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
@ -19,7 +19,7 @@
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v6"
let g:loaded_netrwSettings = "v9"
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
@ -39,8 +39,8 @@ fun! netrwSettings#NetrwSettings()
" these variables have the following default effects when they don't
" exist (ie. have not been set by the user in his/her .vimrc)
if !exists("g:netrw_longlist")
let g:netrw_longlist= 0
if !exists("g:netrw_liststyle")
let g:netrw_liststyle= 0
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
endif
if !exists("g:netrw_silent")
@ -81,9 +81,15 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_sshport = '.g:netrw_sshport
let shqline= line("$")
put = 'let g:netrw_shq...'
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
put = 'let g:netrw_win95ftp = '.g:netrw_win95ftp
let s:netrw_xfer_stop= line(".")
put =''
put ='+ Netrw Messages'
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
put = ''
put ='+ Netrw Browser Control'
@ -99,14 +105,17 @@ fun! netrwSettings#NetrwSettings()
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_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
put = 'let g:netrw_hide = '.g:netrw_hide
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_local_mkdir = '.g:netrw_local_mkdir
put = 'let g:netrw_local_rmdir = '.g:netrw_local_rmdir
put = 'let g:netrw_longlist = '.g:netrw_longlist
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
@ -117,11 +126,14 @@ fun! netrwSettings#NetrwSettings()
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
put ='+ For help, place cursor on line and press ?'
put ='+ For help, place cursor on line and press <F1>'
1d
silent %s/^+/"/e
@ -130,9 +142,18 @@ fun! netrwSettings#NetrwSettings()
silent %s/= $/= ''/e
1
" Put in shq setting.
" (deferred so as to avoid the quote manipulation just preceding)
if g:netrw_shq == "'"
call setline(shqline,'let g:netrw_shq = "'.g:netrw_shq.'"')
else
call setline(shqline,"let g:netrw_shq = '".g:netrw_shq."'")
endif
set nomod
map <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun

View File

@ -1,7 +1,7 @@
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Apr 30
" Last Change: 2006 May 9
"
" TODO:
" - Class aware completion:
@ -74,7 +74,7 @@ function! phpcomplete#CompletePHP(findstart, base)
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'class\s\+')
let int_classes = {}
@ -85,33 +85,43 @@ function! phpcomplete#CompletePHP(findstart, base)
endif
endfor
" Prepare list of functions from tags file
" Prepare list of classes from tags file
let ext_classes = {}
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tc\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" [:space:] thing: we don't have to be so strict when
" dealing with tags files - entries there were already
" checked by ctags.
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_classes[item] = ''
if len(qflist) > 0
for field in qflist
" [:space:] thing: we don't have to be so strict when
" dealing with tags files - entries there were already
" checked by ctags.
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_classes[item] = ''
endfor
endif
endif
" Prepare list of built in classes from g:php_builtin_functions
if !exists("g:php_omni_bi_classes")
let g:php_omni_bi_classes = {}
for i in keys(g:php_builtin_object_functions)
let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
endfor
endif
call extend(int_classes, ext_classes)
let classes = sort(keys(int_classes))
let classes += sort(keys(ext_classes))
let classes += sort(keys(g:php_omni_bi_classes))
for m in sort(keys(int_classes))
for m in classes
if m =~ '^'.a:base
call add(res, m)
endif
endfor
let int_list = res
let final_menu = []
for i in int_list
for i in res
let final_menu += [{'word':i, 'kind':'c'}]
endfor
@ -138,6 +148,19 @@ function! phpcomplete#CompletePHP(findstart, base)
let classlocation = ''
endif
if classlocation == 'VIMPHP_BUILTINOBJECT'
for object in keys(g:php_builtin_object_functions)
if object =~ '^'.classname
let res += [{'word':substitute(object, '.*::', '', ''),
\ 'info': g:php_builtin_object_functions[object]}]
endif
endfor
return res
endif
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent = ''
@ -154,7 +177,7 @@ function! phpcomplete#CompletePHP(findstart, base)
" Functions declared with public keyword or without any
" keyword are public
let functions = filter(deepcopy(sccontent),
\ 'v:val =~ "^\\s*\\(public\\s\\*\\)\\?function"')
\ 'v:val =~ "^\\s*\\(static\\s\\+\\|public\\s\\+\\)*function"')
let jfuncs = join(functions, ' ')
let sfuncs = split(jfuncs, 'function\s\+')
let c_functions = {}
@ -185,7 +208,6 @@ function! phpcomplete#CompletePHP(findstart, base)
let all_values = {}
call extend(all_values, c_functions)
call extend(all_values, c_variables)
call extend(all_values, g:php_builtin_object_functions)
for m in sort(keys(all_values))
if m =~ '^'.a:base && m !~ '::'
@ -244,23 +266,25 @@ function! phpcomplete#CompletePHP(findstart, base)
" ctags has good support for PHP, use tags file for external
" variables
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
let ext_vars = {}
if fnames != ''
let sbase = substitute(a:base, '^\$', '', '')
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
" Add -> if it is possible object declaration
let classname = ''
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let classname = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[adddollar.item] = classname
endfor
if len(qflist) > 0
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
" Add -> if it is possible object declaration
let classname = ''
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let classname = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[adddollar.item] = classname
endfor
endif
endif
" Now we have all variables in int_vars dictionary
@ -270,7 +294,7 @@ function! phpcomplete#CompletePHP(findstart, base)
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
@ -287,14 +311,16 @@ function! phpcomplete#CompletePHP(findstart, base)
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
if len(qflist) > 0
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
endif
endif
let all_values = {}
@ -375,23 +401,25 @@ function! phpcomplete#CompletePHP(findstart, base)
call extend(int_vars,g:php_builtin_vars)
" ctags has support for PHP, use tags file for external variables
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
let ext_vars = {}
if fnames != ''
let sbase = substitute(a:base, '^\$', '', '')
exe 'silent! vimgrep /^'.sbase.'.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
let m_menu = ''
" Add -> if it is possible object declaration
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let m_menu = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[item] = m_menu
endfor
if len(qflist) > 0
for field in qflist
let item = '$'.matchstr(field['text'], '^[^[:space:]]\+')
let m_menu = ''
" Add -> if it is possible object declaration
if field['text'] =~ item.'\s*=\s*new\s\+'
let item = item.'->'
let m_menu = matchstr(field['text'],
\ '=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars[item] = m_menu
endfor
endif
endif
call extend(int_vars, ext_vars)
@ -433,7 +461,7 @@ function! phpcomplete#CompletePHP(findstart, base)
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
@ -450,14 +478,16 @@ function! phpcomplete#CompletePHP(findstart, base)
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\tf\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
if len(qflist) > 0
for field in qflist
" File name
let item = matchstr(field['text'], '^[^[:space:]]\+')
let fname = matchstr(field['text'], '\t\zs\f\+\ze')
let prototype = matchstr(field['text'],
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
let ext_functions[item.'('] = prototype.') - '.fname
endfor
endif
endif
" All functions
@ -480,15 +510,17 @@ function! phpcomplete#CompletePHP(findstart, base)
endfor
" Prepare list of constants from tags file
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
let ext_constants = {}
if fnames != ''
exe 'silent! vimgrep /^'.a:base.'.*\td\(\t\|$\)/j '.fnames
let qflist = getqflist()
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_constants[item] = ''
endfor
if len(qflist) > 0
for field in qflist
let item = matchstr(field['text'], '^[^[:space:]]\+')
let ext_constants[item] = ''
endfor
endif
endif
" All constants
@ -558,7 +590,7 @@ function! phpcomplete#GetClassName(scontext) " {{{
endwhile
" OK, first way failed, now check tags file(s)
let fnames = join(map(tagfiles(), 'escape(v:val, " \\")'))
let fnames = join(map(tagfiles(), 'escape(v:val, " \\#%")'))
exe 'silent! vimgrep /^'.object.'.*\$'.object.'.*=\s*new\s\+.*\tv\(\t\|$\)/j '.fnames
let qflist = getqflist()
if len(qflist) == 0
@ -573,6 +605,17 @@ function! phpcomplete#GetClassName(scontext) " {{{
endfunction
" }}}
function! phpcomplete#GetClassLocation(classname) " {{{
" Check classname may be name of built in object
if !exists("g:php_omni_bi_classes")
let g:php_omni_bi_classes = {}
for i in keys(g:php_builtin_object_functions)
let g:php_omni_bi_classes[substitute(i, '::.*$', '', '')] = ''
endfor
endif
if has_key(g:php_omni_bi_classes, a:classname)
return 'VIMPHP_BUILTINOBJECT'
endif
" Get class location
for fname in tagfiles()
let fhead = fnamemodify(fname, ":h")
@ -583,8 +626,12 @@ function! phpcomplete#GetClassLocation(classname) " {{{
let fname = escape(fname, " \\")
exe 'silent! vimgrep /^'.a:classname.'.*\tc\(\t\|$\)/j '.fname
let qflist = getqflist()
" As in GetClassName we can manage only one element
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
" As in GetClassName we can manage only one element if it exists
if len(qflist) > 0
let classlocation = matchstr(qflist[0]['text'], '\t\zs\f\+\ze\t')
else
return ''
endif
" And only one class location
if classlocation != ''
let classlocation = fhead.classlocation
@ -614,6 +661,7 @@ function! phpcomplete#GetClassContents(file, name) " {{{
else
let extends_class = ''
endif
call search('{')
normal! %
let classc = getline(cfline, ".")
let classcontent = join(classc, "\n")

View File

@ -1,16 +1,34 @@
"pythoncomplete.vim - Omni Completion for python
" Maintainer: Aaron Griffin <aaronmgriffin@gmail.com>
" Version: 0.5
" Last Updated: 19 April 2006
"
" Yeah, I skipped a version number - 0.4 was never public.
" It was a bugfix version on top of 0.3. This is a complete
" rewrite.
" Version: 0.7
" Last Updated: 19 Oct 2006
"
" Changes
" TODO:
" User defined docstrings aren't handled right...
" 'info' item output can use some formatting work
" Add an "unsafe eval" mode, to allow for return type evaluation
" Complete basic syntax along with import statements
" i.e. "import url<c-x,c-o>"
" Continue parsing on invalid line??
"
" v 0.7
" * Fixed function list sorting (_ and __ at the bottom)
" * Removed newline removal from docs. It appears vim handles these better in
" recent patches
"
" v 0.6:
" * Fixed argument completion
" * Removed the 'kind' completions, as they are better indicated
" with real syntax
" * Added tuple assignment parsing (whoops, that was forgotten)
" * Fixed import handling when flattening scope
"
" v 0.5:
" Yeah, I skipped a version number - 0.4 was never public.
" It was a bugfix version on top of 0.3. This is a complete
" rewrite.
"
if !has('python')
echo "Error: Required vim compiled with +python"
@ -28,7 +46,7 @@ function! pythoncomplete#Complete(findstart, base)
if c =~ '\w'
continue
elseif ! c =~ '\.'
idx = -1
let idx = -1
break
else
break
@ -45,7 +63,7 @@ function! pythoncomplete#Complete(findstart, base)
while idx > 0
let idx -= 1
let c = line[idx]
if c =~ '\w' || c =~ '\.'
if c =~ '\w' || c =~ '\.' || c == '('
let cword = c . cword
continue
elseif strlen(cword) > 0 || idx == 0
@ -73,7 +91,24 @@ def vimcomplete(context,match):
try:
import vim
def complsort(x,y):
return x['abbr'] > y['abbr']
try:
xa = x['abbr']
ya = y['abbr']
if xa[0] == '_':
if xa[1] == '_' and ya[0:2] == '__':
return xa > ya
elif ya[0:2] == '__':
return -1
elif y[0] == '_':
return xa > ya
else:
return 1
elif ya[0] == '_':
return -1
else:
return xa > ya
except:
return 0
cmpl = Completer()
cmpl.evalsource('\n'.join(vim.current.buffer),vim.eval("line('.')"))
all = cmpl.get_completions(context,match)
@ -86,7 +121,7 @@ def vimcomplete(context,match):
dictstr += '"icase":0},'
if dictstr[-1] == ',': dictstr = dictstr[:-1]
dictstr += ']'
dbg("dict: %s" % dictstr)
#dbg("dict: %s" % dictstr)
vim.command("silent let g:pythoncomplete_completions = %s" % dictstr)
#dbg("Completion dict:\n%s" % all)
except vim.error:
@ -108,11 +143,7 @@ class Completer(object):
except: dbg("locals: %s, %s [%s]" % (sys.exc_info()[0],sys.exc_info()[1],l))
def _cleanstr(self,doc):
return doc.replace('"',' ')\
.replace("'",' ')\
.replace('\n',' ')\
.replace('\r',' ')\
.replace('
return doc.replace('"',' ').replace("'",' ')
def get_arguments(self,func_obj):
def _ctor(obj):
@ -128,23 +159,23 @@ class Completer(object):
elif type(func_obj) == types.MethodType: func_obj = func_obj.im_func
else: arg_offset = 0
arg_text=''
if type(func_obj) in [types.FunctionType, types.LambdaType]:
try:
cd = func_obj.func_code
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
real_args = cd.co_varnames[arg_offset:cd.co_argcount]
defaults = func_obj.func_defaults or []
defaults = func_obj.func_defaults or ''
defaults = map(lambda name: "=%s" % name, defaults)
defaults = [""] * (len(real_args)-len(defaults)) + defaults
items = map(lambda a,d: a+d, real_args, defaults)
if func_obj.func_code.co_flags & 0x4:
items.append("...")
if func_obj.func_code.co_flags & 0x8:
items.append("***")
items.append("***")
arg_text = (','.join(items)) + ')'
except:
except:
dbg("arg completion: %s: %s" % (sys.exc_info()[0],sys.exc_info()[1]))
pass
if len(arg_text) == 0:
# The doc string sometimes contains the function signature
@ -160,6 +191,7 @@ class Completer(object):
ridx = sigline.find(')')
if lidx > 0 and ridx > 0:
arg_text = sigline[lidx+1:ridx] + ')'
if len(arg_text) == 0: arg_text = ')'
return arg_text
def get_completions(self,context,match):
@ -172,12 +204,11 @@ class Completer(object):
all = {}
ridx = stmt.rfind('.')
if len(stmt) > 0 and stmt[-1] == '(':
if len(stmt) > 0 and stmt[-1] == '(':
result = eval(_sanitize(stmt[:-1]), self.compldict)
doc = result.__doc__
if doc == None: doc = ''
if doc == None: doc = ''
args = self.get_arguments(res)
args = self.get_arguments(result)
return [{'word':self._cleanstr(args),'info':self._cleanstr(doc)}]
elif ridx == -1:
match = stmt
all = self.compldict
@ -206,22 +237,18 @@ class Completer(object):
if doc == None or doc == '': doc = maindoc
wrd = m[len(match):]
wrd = m[len(match):]
c = {'word':wrd, 'abbr':m, 'info':self._cleanstr(doc)}
if "function" in typestr:
c['word'] += '('
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
elif "method" in typestr:
c['word'] += '('
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
c['abbr'] += '(' + self._cleanstr(self.get_arguments(inst))
elif "module" in typestr:
c['word'] += '.'
c['word'] += '.'
elif "class" in typestr:
c['word'] += '('
c['abbr'] += '('
c['abbr'] += '('
completions.append(c)
except:
i = sys.exc_info()
@ -277,10 +304,13 @@ class Scope(object):
# we need to start with this, to fix up broken completions
# hopefully this name is unique enough...
str = '"""'+self.docstr+'"""\n'
for l in self.locals:
if l.startswith('import'): str += l+'\n'
str += 'class _PyCmplNoType:\n def __getattr__(self,name):\n return None\n'
for sub in self.subscopes:
str += sub.get_code()
str += sub.get_code()
for l in self.locals:
if not l.startswith('import'): str += l+'\n'
return str
@ -420,6 +450,8 @@ class PyParser:
tokentype, token, indent = self.next()
if tokentype == tokenize.STRING or token == 'str':
return '""'
elif token == '(' or token == 'tuple':
return '()'
elif token == '[' or token == 'list':
return '[]'
elif token == '{' or token == 'dict':
@ -494,9 +526,9 @@ class PyParser:
freshscope=True
while True:
tokentype, token, indent = self.next()
tokentype, token, indent = self.next()
#dbg( 'main: token=[%s] indent=[%s]' % (token,indent))
if tokentype == DEDENT or token == "pass":
self.scope = self.scope.pop(indent)
elif token == 'def':
func = self._parsefunction(indent)

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
" Vim script to download a missing spell file
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Aug 29
" Last Change: 2007 May 08
if !exists('g:spellfile_URL')
let g:spellfile_URL = 'ftp://ftp.vim.org/pub/vim/runtime/spell'
@ -58,19 +58,40 @@ function! spellfile#LoadFile(lang)
let fname = a:lang . '.' . enc . '.spl'
" Split the window, read the file into a new buffer.
" Remember the buffer number, we check it below.
new
let newbufnr = winbufnr(0)
setlocal bin
echo 'Downloading ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
" Didn't work, perhaps there is an ASCII one.
g/^/d
" Careful: Nread() may have opened a new window for the error message,
" we need to go back to our own buffer and window.
if newbufnr != winbufnr(0)
let winnr = bufwinnr(newbufnr)
if winnr == -1
" Our buffer has vanished!? Open a new window.
echomsg "download buffer disappeared, opening a new one"
new
setlocal bin
else
exe winnr . "wincmd w"
endif
endif
if newbufnr == winbufnr(0)
" We are back the old buffer, remove any (half-finished) download.
g/^/d
else
let newbufnr = winbufnr(0)
endif
let fname = a:lang . '.ascii.spl'
echo 'Could not find it, trying ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMspell'
echo 'Sorry, downloading failed'
bwipe!
exe newbufnr . "bwipe!"
return
endif
endif
@ -96,22 +117,40 @@ function! spellfile#LoadFile(lang)
let fname = substitute(fname, '\.spl$', '.sug', '')
echo 'Downloading ' . fname . '...'
call spellfile#Nread(fname)
if getline(2) !~ 'VIMsug'
echo 'Sorry, downloading failed'
else
if getline(2) =~ 'VIMsug'
1d
exe "write " . escape(dirlist[dirchoice], ' ') . '/' . fname
set nomod
else
echo 'Sorry, downloading failed'
" Go back to our own buffer/window, Nread() may have taken us to
" another window.
if newbufnr != winbufnr(0)
let winnr = bufwinnr(newbufnr)
if winnr != -1
exe winnr . "wincmd w"
endif
endif
if newbufnr == winbufnr(0)
set nomod
endif
endif
set nomod
endif
endif
bwipe
" Wipe out the buffer we used.
exe newbufnr . "bwipe"
endif
endfunc
" Read "fname" from the server.
function! spellfile#Nread(fname)
" We do our own error handling, don't want a window for it.
if exists("g:netrw_use_errorwindow")
let save_ew = g:netrw_use_errorwindow
endif
let g:netrw_use_errorwindow=0
if g:spellfile_URL =~ '^ftp://'
" for an ftp server use a default login and password to avoid a prompt
let machine = substitute(g:spellfile_URL, 'ftp://\([^/]*\).*', '\1', '')
@ -120,4 +159,10 @@ function! spellfile#Nread(fname)
else
exe 'Nread ' g:spellfile_URL . '/' . a:fname
endif
if exists("save_ew")
let g:netrw_use_errorwindow = save_ew
else
unlet g:netrw_use_errorwindow
endif
endfunc

View File

@ -1,8 +1,8 @@
" Vim OMNI completion script for SQL
" Language: SQL
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 4.0
" Last Change: Wed Apr 26 2006 3:00:06 PM
" Version: 5.0
" Last Change: Mon Jun 05 2006 3:30:04 PM
" Usage: For detailed help
" ":help sql.txt"
" or ":help ft-sql-omni"
@ -22,7 +22,7 @@ endif
if exists('g:loaded_sql_completion')
finish
endif
let g:loaded_sql_completion = 40
let g:loaded_sql_completion = 50
" Maintains filename of dictionary
let s:sql_file_table = ""
@ -113,7 +113,7 @@ function! sqlcomplete#Complete(findstart, base)
" If lastword has already been set for column completion
" break from the loop, since we do not also want to pickup
" a table name if it was also supplied.
if lastword != -1 && compl_type == 'column'
if lastword != -1 && compl_type == 'column'
break
endif
" If column completion was specified stop at the "." if
@ -176,11 +176,19 @@ function! sqlcomplete#Complete(findstart, base)
return []
endif
if s:sql_file_{compl_type} == ""
let compl_type = substitute(compl_type, '\w\+', '\u&', '')
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
" Allow the user to override the dbext plugin to specify whether
" the owner/creator should be included in the list
let saved_dbext_show_owner = 1
if exists('g:dbext_default_dict_show_owner')
let saved_dbext_show_owner = g:dbext_default_dict_show_owner
endif
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type)
let g:dbext_default_dict_show_owner = g:omni_sql_include_owner
let compl_type_uc = substitute(compl_type, '\w\+', '\u&', '')
if s:sql_file_{compl_type} == ""
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
endif
let s:sql_file_{compl_type} = DB_getDictionaryName(compl_type_uc)
if s:sql_file_{compl_type} != ""
if filereadable(s:sql_file_{compl_type})
let compl_list = readfile(s:sql_file_{compl_type})
@ -194,7 +202,9 @@ function! sqlcomplete#Complete(findstart, base)
" endif
endif
endif
elseif compl_type == 'column'
let g:dbext_default_dict_show_owner = saved_dbext_show_owner
elseif compl_type =~? 'column'
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
@ -209,33 +219,88 @@ function! sqlcomplete#Complete(findstart, base)
let base = s:save_prev_table
endif
if base != ""
let compl_list = s:SQLCGetColumns(base, '')
let owner = ''
let column = ''
if base =~ '\.'
" Check if the owner/creator has been specified
let owner = matchstr( base, '^\zs.*\ze\..*\..*' )
let table = matchstr( base, '^\(.*\.\)\?\zs.*\ze\..*' )
let column = matchstr( base, '.*\.\zs.*' )
" It is pretty well impossible to determine if the user
" has entered:
" owner.table
" table.column_prefix
" So there are a couple of things we can do to mitigate
" this issue.
" 1. Check if the dbext plugin has the option turned
" on to even allow owners
" 2. Based on 1, if the user is showing a table list
" and the DrillIntoTable (using <C-Right>) then
" this will be owner.table. In this case, we can
" check to see the table.column exists in the
" cached table list. If it does, then we have
" determined the user has actually chosen
" owner.table, not table.column_prefix.
let found = -1
if g:omni_sql_include_owner == 1 && owner == ''
if filereadable(s:sql_file_table)
let tbl_list = readfile(s:sql_file_table)
let found = index( tbl_list, ((table != '')?(table.'.'):'').column)
endif
endif
" If the table.column was found in the table list, we can safely assume
" the owner was not provided and shift the items appropriately.
" OR
" If the user has indicated not to use table owners at all and
" the base ends in a '.' we know they are not providing a column
" name, so we can shift the items appropriately.
if found != -1 || (g:omni_sql_include_owner == 0 && base !~ '\.$')
let owner = table
let table = column
let column = ''
endif
else
let table = base
endif
" Get anything after the . and consider this the table name
" If an owner has been specified, then we must consider the
" base to be a partial column name
" let base = matchstr( base, '^\(.*\.\)\?\zs.*' )
if table != ""
let s:save_prev_table = base
let base = ''
endif
elseif compl_type == 'column_csv'
let list_type = ''
" This type of completion relies upon the dbext.vim plugin
if s:SQLCCheck4dbext() == -1
return []
endif
if compl_type == 'column_csv'
" Return one array element, with a comma separated
" list of values instead of multiple array entries
" for each column in the table.
let list_type = 'csv'
endif
if base == ""
" The last time we displayed a column list we stored
" the table name. If the user selects a column list
" without a table name of alias present, assume they want
" the previous column list displayed.
let base = s:save_prev_table
endif
let compl_list = s:SQLCGetColumns(table, list_type)
if column != ''
" If no column prefix has been provided and the table
" name was provided, append it to each of the items
" returned.
let compl_list = map(compl_list, "table.'.'.v:val")
if owner != ''
" If an owner has been provided append it to each of the
" items returned.
let compl_list = map(compl_list, "owner.'.'.v:val")
endif
else
let base = ''
endif
if base != ""
let compl_list = s:SQLCGetColumns(base, 'csv')
let s:save_prev_table = base
" Join the column array into 1 single element array
" but make the columns column separated
let compl_list = [join(compl_list, ', ')]
let base = ''
if compl_type == 'column_csv'
" Join the column array into 1 single element array
" but make the columns column separated
let compl_list = [join(compl_list, ', ')]
endif
endif
elseif compl_type == 'resetCache'
" Reset all cached items
@ -256,7 +321,7 @@ function! sqlcomplete#Complete(findstart, base)
if base != ''
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "^'.base.'"'
let expr = 'v:val '.(g:omni_sql_ignorecase==1?'=~?':'=~#').' "\\(^'.base.'\\|\\([^.]*\\)\\?'.base.'\\)"'
let compl_list = filter(deepcopy(compl_list), expr)
endif
@ -274,6 +339,8 @@ function! sqlcomplete#PreCacheSyntax(...)
else
let syn_group_arr = g:omni_sql_precache_syntax_groups
endif
" For each group specified in the list, precache all
" the sytnax items.
if !empty(syn_group_arr)
for group_name in syn_group_arr
call s:SQLCGetSyntaxList(group_name)
@ -444,9 +511,23 @@ function! s:SQLCAddAlias(table_name, table_alias, cols)
return cols
endfunction
function! s:SQLCGetObjectOwner(object)
" The owner regex matches a word at the start of the string which is
" followed by a dot, but doesn't include the dot in the result.
" ^ - from beginning of line
" "\? - ignore any quotes
" \zs - start the match now
" \w\+ - get owner name
" \ze - end the match
" "\? - ignore any quotes
" \. - must by followed by a .
let owner = matchstr( a:object, '^"\?\zs\w\+\ze"\?\.' )
return owner
endfunction
function! s:SQLCGetColumns(table_name, list_type)
let table_name = matchstr(a:table_name, '^\w\+')
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_.]\+')
" Check if the table name was provided as part of the column name
let table_name = matchstr(a:table_name, '^[a-zA-Z0-9_]\+\ze\.\?')
let table_cols = []
let table_alias = ''
let move_to_top = 1

View File

@ -1,8 +1,8 @@
" Vim completion script
" Language: All languages, uses existing syntax highlighting rules
" Maintainer: David Fishburn <fishburn@ianywhere.com>
" Version: 2.0
" Last Change: Fri May 05 2006 10:34:57 PM
" Version: 3.0
" Last Change: Wed Nov 08 2006 10:46:46 AM
" Usage: For detailed help, ":help ft-syntax-omni"
" Set completion with CTRL-X CTRL-O to autoloaded function.
@ -19,13 +19,31 @@ endif
if exists('g:loaded_syntax_completion')
finish
endif
let g:loaded_syntax_completion = 20
let g:loaded_syntax_completion = 30
" Set ignorecase to the ftplugin standard
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_ignorecase')
let g:omni_syntax_ignorecase = &ignorecase
endif
" Indicates whether we should use the iskeyword option to determine
" how to split words.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_use_iskeyword')
let g:omni_syntax_use_iskeyword = 1
endif
" Only display items in the completion window that are at least
" this many characters in length.
" This is the default setting, but if you define a buffer local
" variable you can override this on a per filetype.
if !exists('g:omni_syntax_minimum_length')
let g:omni_syntax_minimum_length = 0
endif
" This script will build a completion list based on the syntax
" elements defined by the files in $VIMRUNTIME/syntax.
let s:syn_remove_words = 'match,matchgroup=,contains,'.
@ -38,21 +56,28 @@ let s:prepended = ''
" This function is used for the 'omnifunc' option.
function! syntaxcomplete#Complete(findstart, base)
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_ignorecase')
if exists('g:omni_syntax_ignorecase')
let b:omni_syntax_ignorecase = g:omni_syntax_ignorecase
else
let b:omni_syntax_ignorecase = &ignorecase
endif
endif
if a:findstart
" Locate the start of the item, including "."
let line = getline('.')
let start = col('.') - 1
let lastword = -1
while start > 0
if line[start - 1] =~ '\w'
" if line[start - 1] =~ '\S'
" let start -= 1
" elseif line[start - 1] =~ '\.'
if line[start - 1] =~ '\k'
let start -= 1
elseif line[start - 1] =~ '\.'
" The user must be specifying a column name
if lastword == -1
let lastword = start
endif
let start -= 1
let b:sql_compl_type = 'column'
let lastword = a:findstart
else
break
endif
@ -64,11 +89,12 @@ function! syntaxcomplete#Complete(findstart, base)
let s:prepended = ''
return start
endif
let s:prepended = strpart(line, start, lastword - start)
return lastword
let s:prepended = strpart(line, start, (col('.') - 1) - start)
return start
endif
let base = s:prepended . a:base
" let base = s:prepended . a:base
let base = s:prepended
let filetype = substitute(&filetype, '\.', '_', 'g')
let list_idx = index(s:cache_name, filetype, 0, &ignorecase)
@ -82,11 +108,16 @@ function! syntaxcomplete#Complete(findstart, base)
" Return list of matches.
if base =~ '\w'
let compstr = join(compl_list, ' ')
let expr = (g:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
let compstr = substitute(compstr, expr, '', 'g')
let compl_list = split(compstr, '\s\+')
if base != ''
" let compstr = join(compl_list, ' ')
" let expr = (b:omni_syntax_ignorecase==0?'\C':'').'\<\%('.base.'\)\@!\w\+\s*'
" let compstr = substitute(compstr, expr, '', 'g')
" let compl_list = split(compstr, '\s\+')
" Filter the list based on the first few characters the user
" entered
let expr = 'v:val '.(g:omni_syntax_ignorecase==1?'=~?':'=~#')." '^".escape(base, '\\/.*$^~[]').".*'"
let compl_list = filter(deepcopy(compl_list), expr)
endif
return compl_list
@ -100,6 +131,26 @@ function! OmniSyntaxList()
" let use_dictionary = a:1
" endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_use_iskeyword')
if exists('g:omni_syntax_use_iskeyword')
let b:omni_syntax_use_iskeyword = g:omni_syntax_use_iskeyword
else
let b:omni_syntax_use_iskeyword = 1
endif
endif
" Only display items in the completion window that are at least
" this many characters in length
if !exists('b:omni_syntax_minimum_length')
if exists('g:omni_syntax_minimum_length')
let b:omni_syntax_minimum_length = g:omni_syntax_minimum_length
else
let b:omni_syntax_minimum_length = 0
endif
endif
let saveL = @l
" Loop through all the syntax groupnames, and build a
@ -294,14 +345,32 @@ function! s:SyntaxCSyntaxGroupItems( group_name, syntax_full )
\ , "", 'g'
\ )
" There are a number of items which have non-word characters in
" them, *'T_F1'*. vim.vim is one such file.
" This will replace non-word characters with spaces.
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
if b:omni_syntax_use_iskeyword == 0
" There are a number of items which have non-word characters in
" them, *'T_F1'*. vim.vim is one such file.
" This will replace non-word characters with spaces.
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ ]', ' ', 'g' )
else
let accept_chars = ','.&iskeyword.','
" Remove all character ranges
let accept_chars = substitute(accept_chars, ',[^,]\+-[^,]\+,', ',', 'g')
" Remove all numeric specifications
let accept_chars = substitute(accept_chars, ',\d\{-},', ',', 'g')
" Remove all commas
let accept_chars = substitute(accept_chars, ',', '', 'g')
" Escape special regex characters
let accept_chars = escape(accept_chars, '\\/.*$^~[]' )
" Remove all characters that are not acceptable
let syn_list = substitute( syn_list, '[^0-9A-Za-z_ '.accept_chars.']', ' ', 'g' )
endif
if b:omni_syntax_minimum_length > 0
" If the user specified a minimum length, enforce it
let syn_list = substitute(' '.syn_list.' ', ' \S\{,'.b:omni_syntax_minimum_length.'}\ze ', ' ', 'g')
endif
else
let syn_list = ''
endif
return syn_list
endfunction

View File

@ -1,8 +1,8 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: May 02, 2006
" Version: 9
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" Date: Sep 29, 2006
" Version: 11
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
"
" Contains many ideas from Michael Toren's <tar.vim>
@ -18,13 +18,13 @@
" of this software.
" ---------------------------------------------------------------------
" Initialization: {{{1
" Load Once: {{{1
let s:keepcpo= &cpo
set cpo&vim
if exists("g:loaded_tar")
if &cp || exists("g:loaded_tar") || v:version < 700
finish
endif
let g:loaded_tar= "v9"
let g:loaded_tar= "v11"
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
@ -41,6 +41,13 @@ endif
if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:tar_shq")
if has("unix")
let g:tar_shq= "'"
else
let g:tar_shq= '"'
endif
endif
" ----------------
" Functions: {{{1
@ -55,8 +62,9 @@ fun! tar#Browse(tarfile)
" sanity checks
if !executable(g:tar_cmd)
redraw!
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Browse")
return
@ -65,8 +73,9 @@ fun! tar#Browse(tarfile)
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
if a:tarfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let &report= repkeep
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
@ -99,30 +108,26 @@ fun! tar#Browse(tarfile)
endif
let curlast= line("$")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_browseoptions." - "
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_browseoptions." - "
else
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'")
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." '".tarfile."'"
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq)
exe "silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".g:tar_shq.tarfile.g:tar_shq
endif
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
silent %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "r ".a:tarfile
let &ei= eikeep
1d
return
endif
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~? '\c\%(warning\|error\|inappropriate\|unrecognized\)')
if line("$") == curlast || ( line("$") == (curlast + 1) && getline("$") =~ '\c\%(warning\|error\|inappropriate\|unrecognized\)')
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
silent %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
@ -190,14 +195,14 @@ fun! tar#Read(fname,mode)
" call Decho("fname<".fname.">")
if tarfile =~# '\.\(gz\|tgz\)$'
" call Decho("exe silent r! gzip -d -c '".tarfile."'| tar -OPxf - '".fname."'")
exe "silent r! gzip -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
" call Decho("exe silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -OPxf - '".fname."'")
exe "silent r! gzip -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
elseif tarfile =~# '\.bz2$'
" call Decho("exe silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'")
exe "silent r! bzip2 -d -c '".tarfile."'| tar -".g:tar_readoptions." - '".fname."'"
" call Decho("exe silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'")
exe "silent r! bzip2 -d -c ".g:tar_shq.tarfile.g:tar_shq."| ".g:tar_cmd." -".g:tar_readoptions." - '".fname."'"
else
" call Decho("exe silent r! tar -".g:tar_readoptions." '".tarfile."' '".fname."'")
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." '".tarfile."' '".fname."'"
" call Decho("exe silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq)
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions." ".g:tar_shq.tarfile.g:tar_shq." ".g:tar_shq.fname.g:tar_shq
endif
let w:tarfile= a:fname
exe "file tarfile:".fname
@ -219,15 +224,17 @@ fun! tar#Write(fname)
" sanity checks
if !executable(g:tar_cmd)
redraw!
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")
return
endif
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")
return
@ -246,8 +253,9 @@ fun! tar#Write(fname)
try
exe "cd ".escape(tmpdir,' \')
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("tar#Write")
return
@ -282,8 +290,9 @@ fun! tar#Write(fname)
endif
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
else
" call Decho("tarfile<".tarfile."> fname<".fname.">")
@ -309,16 +318,18 @@ fun! tar#Write(fname)
" call Decho("tar --delete -f '".tarfile."' '".fname."'")
call system("tar --delete -f '".tarfile."' '".fname."'")
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
else
" update tarfile with new file
" call Decho("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
call system("tar -".g:tar_writeoptions." '".tarfile."' '".fname."'")
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
elseif exists("compress")
" call Decho("call system(".compress.")")
call system(compress)
@ -376,4 +387,4 @@ endfun
" Modelines And Restoration: {{{1
let &cpo= s:keepcpo
unlet s:keepcpo
" vim:ts=8 fdm=marker
" vim:ts=8 fdm=marker

View File

@ -1,7 +1,7 @@
" vimball : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: May 01, 2006
" Version: 13
" vimball.vim : construct a file containing both paths and files
" Author: Charles E. Campbell, Jr.
" Date: May 07, 2007
" Version: 22
" 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
@ -11,18 +11,26 @@
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_vimball")
if &cp || exists("g:loaded_vimball") || v:version < 700
finish
endif
let s:keepcpo = &cpo
let g:loaded_vimball = "v13"
let g:loaded_vimball = "v22"
set cpo&vim
" =====================================================================
" Constants: {{{1
if !exists("s:USAGE")
let s:USAGE = 0
let s:WARNING = 1
let s:ERROR = 2
endif
" =====================================================================
" Functions: {{{1
" ---------------------------------------------------------------------
" MkVimball: creates a vimball given a list of paths to files {{{2
" vimball#MkVimball: creates a vimball given a list of paths to files {{{2
" Vimball Format:
" path
" filesize
@ -30,11 +38,24 @@ set cpo&vim
" path
" filesize
" [file]
fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
fun! vimball#MkVimball(line1,line2,writelevel,...) range
" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:1.">) a:0=".a:0)
if a:1 =~ '.vim' || a:1 =~ '.txt'
let vbname= substitute(a:1,'\.\a\{3}$','.vba','')
else
let vbname= a:1
endif
if vbname !~ '\.vba$'
let vbname= vbname.'.vba'
endif
" call Decho("vbname<".vbname.">")
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:ERROR,"(MkVimball) vimball name<".a:1."> should not include slashes")
" call Dret("MkVimball : vimball name<".a:1."> should not include slashes")
return
endif
if !a:writelevel && filereadable(vbname)
echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
call vimball#ShowMesg(s:ERROR,"(MkVimball) file<".vbname."> exists; use ! to insist")
" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
return
endif
@ -42,17 +63,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
" user option bypass
call s:SaveSettings()
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) | break | endif
endfor
if home == ""
let home= substitute(&rtp,',.*$','','')
if a:0 >= 2
" allow user to specify where to get the files
let home= expand(a:2)
else
" use first existing directory from rtp
let home= s:VimballHome()
endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','ge')
endif
" call Decho("home<".home.">")
" save current directory
let curdir = getcwd()
@ -68,7 +85,7 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
" call Decho("svfile<".svfile.">")
if !filereadable(svfile)
echohl Error | echo "unable to read file<".svfile.">" | echohl None
call vimball#ShowMesg(s:ERROR,"unable to read file<".svfile.">")
call s:ChgDir(curdir)
call s:RestoreSettings()
" call Dret("MkVimball")
@ -89,9 +106,9 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
call setline(2,'UseVimball')
call setline(3,'finish')
let lastline= 4
let lastline= line("$") + 1
endif
call setline(lastline ,svfile)
call setline(lastline ,substitute(svfile,'$',' [[[1',''))
call setline(lastline+1,0)
" write the file from the tab
@ -134,13 +151,13 @@ fun! vimball#MkVimball(line1,line2,writelevel,vimballname) range
endfun
" ---------------------------------------------------------------------
" Vimball: {{{2
fun! vimball#Vimball(really)
" call Dfunc("Vimball(really=".a:really.")")
" vimball#Vimball: extract and distribute contents from a vimball {{{2
fun! vimball#Vimball(really,...)
" call Dfunc("vimball#Vimball(really=".a:really.") a:0=".a:0)
if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
echoerr "(Vimball) The current file does not appear to be a Vimball!"
" call Dret("Vimball")
" call Dret("vimball#Vimball")
return
endif
@ -149,26 +166,27 @@ fun! vimball#Vimball(really)
let curtabnr = tabpagenr()
" set up vimball tab
" call Decho("setting up vimball tab")
tabnew
silent! file Vimball
let vbtabnr= tabpagenr()
let didhelp= ""
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) | break | endif
endfor
if home == ""
let home= substitute(&rtp,',.*$','','')
endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','ge')
if a:0 > 0
let home= expand(a:1)
else
let home= s:VimballHome()
endif
" call Decho("home<".home.">")
" save current directory
" save current directory and remove older same-named vimball, if any
let curdir = getcwd()
" call Decho("home<".home.">")
" call Decho("curdir<".curdir.">")
call s:ChgDir(home)
call vimball#RmVimball()
let linenr = 4
let filecnt = 0
@ -186,9 +204,12 @@ fun! vimball#Vimball(really)
exe "tabn ".curtabnr
" call Decho("linenr=".linenr." line$=".line("$"))
while 1 < linenr && linenr < line("$")
let fname = getline(linenr)
let fname = substitute(getline(linenr),'\t\[\[\[1$','','')
let fname = substitute(fname,'\\','/','g')
let fsize = getline(linenr+1)
let filecnt = filecnt + 1
" call Decho("fname<".fname."> fsize=".fsize." filecnt=".filecnt)
if a:really
echomsg "extracted <".fname.">: ".fsize." lines"
else
@ -197,16 +218,30 @@ fun! vimball#Vimball(really)
" call Decho("using L#".linenr.": will extract file<".fname.">")
" call Decho("using L#".(linenr+1).": fsize=".fsize)
" Allow AsNeeded/ directory to take place of plugin/ directory
" when AsNeeded/filename is filereadable
if fname =~ '\<plugin/'
let anfname= substitute(fname,'\<plugin/','AsNeeded/','')
if filereadable(anfname)
" call Decho("using anfname<".anfname."> instead of <".fname.">")
let fname= anfname
endif
endif
" make directories if they don't exist yet
" call Decho("making directories if they don't exist yet")
if a:really
let fnamebuf= fname
" call Decho("making directories if they don't exist yet (fname<".fname.">)")
let fnamebuf= substitute(fname,'\\','/','g')
let dirpath = substitute(home,'\\','/','g')
while fnamebuf =~ '/'
let dirname = home."/".substitute(fnamebuf,'/.*$','','e')
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
let dirname = dirpath."/".substitute(fnamebuf,'/.*$','','')
let dirpath = dirname
let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','')
" call Decho("dirname<".dirname.">")
if !isdirectory(dirname)
" call Decho("making <".dirname.">")
" call Decho("making <".dirname.">")
call mkdir(dirname)
call s:RecordInVar(home,"rmdir('".dirname."')")
endif
endwhile
endif
@ -233,6 +268,7 @@ fun! vimball#Vimball(really)
" call Decho("exe w! ".fnamepath)
exe "silent w! ".fnamepath
echo "wrote ".fnamepath
call s:RecordInVar(home,"call delete('".fnamepath."')")
endif
" return to tab with vimball
@ -242,7 +278,7 @@ fun! vimball#Vimball(really)
" set up help if its a doc/*.txt file
" call Decho("didhelp<".didhelp."> fname<".fname.">")
if a:really && didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','')
" call Decho("didhelp<".didhelp.">")
endif
@ -255,7 +291,7 @@ fun! vimball#Vimball(really)
" set up help
" call Decho("about to set up help: didhelp<".didhelp.">")
if didhelp != ""
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','ge'),' ')
let htpath= escape(substitute(s:Path(home."/".didhelp,'"'),'"','','g'),' ')
" call Decho("exe helptags ".htpath)
exe "helptags ".htpath
echo "did helptags"
@ -267,6 +303,9 @@ fun! vimball#Vimball(really)
let filecnt= filecnt + 1
endwhile
" record actions in <.VimballRecord>
call s:RecordInFile(home)
" restore events, delete tab and buffer
exe "tabn ".vbtabnr
setlocal nomod bh=wipe
@ -275,7 +314,76 @@ fun! vimball#Vimball(really)
call s:RestoreSettings()
call s:ChgDir(curdir)
" call Dret("Vimball")
" call Dret("vimball#Vimball")
endfun
" ---------------------------------------------------------------------
" vimball#RmVimball: remove any files, remove any directories made by any {{{2
" previous vimball extraction based on a file of the current
" name.
" Usage: RmVimball (assume current file is a vimball; remove)
" RmVimball vimballname
fun! vimball#RmVimball(...)
" call Dfunc("vimball#RmVimball() a:0=".a:0)
if exists("g:vimball_norecord")
" call Dret("vimball#RmVimball : (g:vimball_norecord)")
return
endif
let eikeep= &ei
set ei=all
" call Decho("turned off all events")
if a:0 == 0
let curfile= '^'.expand("%:tr")
else
if a:1 =~ '[\/]'
call vimball#ShowMesg(s:USAGE,"RmVimball vimballname [path]")
" call Dret("vimball#RmVimball : suspect a:1<".a:1.">")
return
endif
let curfile= a:1
endif
if curfile !~ '.vba$'
let curfile= curfile.".vba: "
else
let curfile= curfile.": "
endif
if a:0 >= 2
let home= expand(a:2)
else
let home= s:VimballHome()
endif
let curdir = getcwd()
" call Decho("home <".home.">")
" call Decho("curfile<".curfile.">")
" call Decho("curdir <".curdir.">")
call s:ChgDir(home)
if filereadable(".VimballRecord")
" call Decho(".VimballRecord is readable")
" call Decho("curfile<".curfile.">")
keepalt keepjumps 1split
silent! keepalt keepjumps e .VimballRecord
let keepsrch= @/
if search(curfile,'cw')
let exestring= substitute(getline("."),curfile,'','')
" call Decho("exe ".exestring)
silent! keepalt keepjumps exe exestring
silent! keepalt keepjumps d
else
" call Decho("unable to find <".curfile."> in .VimballRecord")
endif
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
let @/= keepsrch
endif
call s:ChgDir(curdir)
" restoring events
" call Decho("restoring events")
let &ei= eikeep
" call Dret("vimball#RmVimball")
endfun
" ---------------------------------------------------------------------
@ -288,24 +396,59 @@ fun! vimball#Decompress(fname)
exe "!gunzip ".a:fname
let fname= substitute(a:fname,'\.gz$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg("Source this file to extract it! (:so %)")
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.bz2' && executable("bunzip2")
exe "!bunzip2 ".a:fname
let fname= substitute(a:fname,'\.bz2$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg("Source this file to extract it! (:so %)")
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
elseif expand("%") =~ '.*\.zip' && executable("unzip")
exe "!unzip ".a:fname
let fname= substitute(a:fname,'\.zip$','','')
exe "e ".escape(fname,' \')
call vimball#ShowMesg("Source this file to extract it! (:so %)")
call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)")
endif
set noma bt=nofile fmr=[[[,]]] fdm=marker
" call Dret("Decompress")
endfun
" ---------------------------------------------------------------------
" ChgDir: change directory (in spite of Windoze) {{{2
" vimball#ShowMesg: {{{2
fun! vimball#ShowMesg(level,msg)
" call Dfunc("vimball#ShowMesg(level=".a:level." msg<".a:msg.">)")
let rulerkeep = &ruler
let showcmdkeep = &showcmd
set noruler noshowcmd
redraw!
if &fo =~ '[ta]'
echomsg "***vimball*** " a:msg
else
if a:level == s:WARNING || a:level == s:USAGE
echohl WarningMsg
elseif a:level == s:ERROR
echohl Error
endif
echomsg "***vimball*** " a:msg
echohl None
endif
if a:level != s:USAGE
call inputsave()|let ok= input("Press <cr> to continue")|call inputrestore()
endif
let &ruler = rulerkeep
let &showcmd = showcmdkeep
" call Dret("vimball#ShowMesg")
endfun
" ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" s:ChgDir: change directory (in spite of Windoze) {{{2
fun! s:ChgDir(newdir)
" call Dfunc("ChgDir(newdir<".a:newdir.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
@ -317,11 +460,11 @@ fun! s:ChgDir(newdir)
endfun
" ---------------------------------------------------------------------
" Path: {{{2
" s:Path: prepend and append quotes, do escaping, as necessary {{{2
fun! s:Path(cmd,quote)
" call Dfunc("Path(cmd<".a:cmd."> quote<".a:quote.">)")
if (has("win32") || has("win95") || has("win64") || has("win16"))
let cmdpath= a:quote.substitute(a:cmd,'/','\\','ge').a:quote
let cmdpath= a:quote.substitute(a:cmd,'/','\\','g').a:quote
else
let cmdpath= a:quote.a:cmd.a:quote
endif
@ -333,16 +476,98 @@ fun! s:Path(cmd,quote)
endfun
" ---------------------------------------------------------------------
" vimball#ShowMesg: {{{2
fun! vimball#ShowMesg(msg)
" call Dfunc("vimball#ShowMesg(msg<".a:msg.">)")
let ich= 1
echohl WarningMsg | echo a:msg | echohl None
while ich < &ch
echo " "
let ich= ich + 1
endwhile
" call Dret("vimball#ShowMesg")
" s:RecordInVar: record a un-vimball command in the .VimballRecord file {{{2
fun! s:RecordInVar(home,cmd)
" call Dfunc("RecordInVar(home<".a:home."> cmd<".a:cmd.">)")
if a:cmd =~ '^rmdir'
" if !exists("s:recorddir")
" let s:recorddir= substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" else
" let s:recorddir= s:recorddir."|".substitute(a:cmd,'^rmdir',"call s:Rmdir",'')
" endif
" call Decho("recorddir=".s:recorddir)
elseif !exists("s:recordfile")
let s:recordfile= a:cmd
" call Decho("recordfile=".s:recordfile)
else
let s:recordfile= s:recordfile."|".a:cmd
" call Decho("recordfile=".s:recordfile)
endif
" call Dret("RecordInVar")
endfun
" ---------------------------------------------------------------------
" s:RecordInFile: {{{2
fun! s:RecordInFile(home)
" call Dfunc("RecordInFile()")
if exists("g:vimball_norecord")
" call Dret("RecordInFile : (g:vimball_norecord)")
return
endif
if exists("s:recordfile") || exists("s:recorddir")
let curdir= getcwd()
call s:ChgDir(a:home)
keepalt keepjumps 1split
let cmd= expand("%:tr").": "
silent! keepalt keepjumps e .VimballRecord
$
if exists("s:recordfile") && exists("s:recorddir")
let cmd= cmd.s:recordfile."|".s:recorddir
elseif exists("s:recorddir")
let cmd= cmd.s:recorddir
elseif exists("s:recordfile")
let cmd= cmd.s:recordfile
else
" call Dret("RecordInFile")
return
endif
keepalt keepjumps put=cmd
silent! keepalt keepjumps g/^\s*$/d
silent! keepalt keepjumps wq!
call s:ChgDir(curdir)
if exists("s:recorddir") |unlet s:recorddir |endif
if exists("s:recordfile")|unlet s:recordfile|endif
else
" call Decho("s:record[file|dir] doesn't exist")
endif
" call Dret("RecordInFile")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
"fun! s:Rmdir(dirname)
"" call Dfunc("s:Rmdir(dirname<".a:dirname.">)")
" if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
" call system("del ".a:dirname)
" else
" call system("rmdir ".a:dirname)
" endif
"" call Dret("s:Rmdir")
"endfun
" ---------------------------------------------------------------------
" s:VimballHome: determine/get home directory path (usually from rtp) {{{2
fun! s:VimballHome()
" call Dfunc("VimballHome()")
if exists("g:vimball_home")
let home= g:vimball_home
else
" go to vim plugin home
for home in split(&rtp,',') + ['']
if isdirectory(home) && filewritable(home) | break | endif
endfor
if home == ""
" just pick the first directory
let home= substitute(&rtp,',.*$','','')
endif
if (has("win32") || has("win95") || has("win64") || has("win16"))
let home= substitute(home,'/','\\','g')
endif
endif
" call Dret("VimballHome <".home.">")
return home
endfun
" ---------------------------------------------------------------------
@ -358,12 +583,14 @@ fun! s:SaveSettings()
let s:fenkeep = &fen
let s:hidkeep = &hidden
let s:ickeep = &ic
let s:lzkeep = &lz
let s:pmkeep = &pm
let s:repkeep = &report
let s:vekeep = &ve
if exists("&acd")
set ei=all ve=all noacd nofen noic report=999 nohid
set ei=all ve=all noacd nofen noic report=999 nohid bt= ma lz pm=
else
set ei=all ve=all nofen noic report=999 nohid
set ei=all ve=all nofen noic report=999 nohid bt= ma lz pm=
endif
" call Dret("SaveSettings")
endfun
@ -376,28 +603,28 @@ fun! s:RestoreSettings()
if exists("&acd")
let &acd = s:acdkeep
endif
let &ei = s:eikeep
let &fen = s:fenkeep
let &hidden = s:hidkeep
let &ic = s:ickeep
let &lz = s:lzkeep
let &pm = s:pmkeep
let &report = s:repkeep
let &ve = s:vekeep
let &ei = s:eikeep
if s:makeep[0] != 0
" restore mark a
" call Decho("restore mark-a: makeep=".string(makeep))
call setpos("'a",s:makeep)
endif
if exists("&acd")
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
unlet s:regakeep s:acdkeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
else
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep
unlet s:regakeep s:eikeep s:fenkeep s:hidkeep s:ickeep s:repkeep s:vekeep s:makeep s:lzkeep s:pmkeep
endif
set bt=nofile noma
" call Dret("RestoreSettings")
endfun
" ---------------------------------------------------------------------
let &cpo= s:keepcpo
unlet s:keepcpo
" =====================================================================
" Modelines: {{{1
" vim: fdm=marker

View File

@ -0,0 +1,130 @@
" Author: Thomas Barthel
" Last change: 2007 May 8
let g:xmldata_xsd = {
\ 'schema': [
\ [ 'include', 'import', 'redefine', 'annotation', 'simpleType', 'complexType', 'element', 'attribute', 'attributeGroup', 'group', 'notation', 'annotation'],
\ { 'targetNamespace' : [], 'version' : [], 'xmlns' : [], 'finalDefault' : [], 'blockDefault' : [], 'id' : [], 'elementFormDefault' : [], 'attributeFormDefault' : [], 'xml:lang' : [] }],
\ 'redefine' : [
\ ['annotation', 'simpleType', 'complexType', 'attributeGroup', 'group'],
\ {'schemaLocation' : [], 'id' : []} ],
\ 'include' : [
\ ['annotation'],
\ {'namespace' : [], 'id' : []} ],
\ 'import' : [
\ ['annotation'],
\ {'namespace' : [], 'schemaLocation' : [], 'id' : []} ],
\ 'complexType' : [
\ ['annotation', 'simpleContent', 'complexContent', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
\ {'name' : [], 'id' : [], 'abstract' : [], 'final' : [], 'block' : [], 'mixed' : []} ],
\ 'complexContent' : [
\ ['annotation', 'restriction', 'extension'],
\ {'mixed' : [], 'id' : [] } ],
\ 'simpleType' : [
\ ['annotation', 'restriction', 'list', 'union'],
\ {'name' : [], 'final' : [], 'id' : []} ],
\ 'simpleContent' : [
\ ['annotation', 'restriction', 'extension'],
\ {'id' : []} ],
\ 'element' : [
\ ['annotation', 'complexType', 'simpleType', 'unique', 'key', 'keyref'],
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'minOccurs' : [], 'maxOccurs' : [], 'nillable' : [], 'substitutionGroup' : [], 'abstract' : [], 'final' : [], 'block' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
\ 'attribute' : [
\ ['annotation', 'simpleType'],
\ {'name' : [], 'id' : [], 'ref' : [], 'type' : [], 'use' : [], 'default' : [], 'fixed' : [], 'form' : []} ],
\ 'group' : [
\ ['annotation', 'all', 'choice', 'sequence'],
\ {'name' : [], 'ref' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'choice' : [
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'sequence' : [
\ ['annotation', 'element', 'group', 'choice', 'sequence', 'any'],
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'all' : [
\ ['annotation', 'element'],
\ {'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'any' : [
\ ['annotation'],
\ {'namespace' : [], 'processContents' : [], 'minOccurs' : [], 'maxOccurs' : [], 'id' : []} ],
\ 'unique' : [
\ ['annotation', 'selector', 'field'],
\ {'name' : [], 'id' : []} ],
\ 'key' : [
\ ['annotation', 'selector', 'field'],
\ {'name' : [], 'id' : []} ],
\ 'keyref' : [
\ ['annotation', 'selector', 'field'],
\ {'name' : [], 'refer' : [], 'id' : []} ],
\ 'selector' : [
\ ['annotation'],
\ {'xpath' : [], 'id' : []} ],
\ 'field' : [
\ ['annotation'],
\ {'xpath' : [], 'id' : []} ],
\ 'restriction' : [
\ ['annotation', 'simpleType', 'minExclusive', 'maxExclusive', 'minInclusive', 'maxInclusive', 'totalDigits', 'fractionDigits', 'length', 'minLength', 'maxLength', 'enumeration', 'whiteSpace', 'pattern'],
\ {'base' : [], 'id' : []} ],
\ 'minExclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'maxExclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'minInclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'maxInclusive' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'totalDigits' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'fractionDigits' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'length' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'minLength' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'maxLength' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'enumeration' : [
\ ['annotation'],
\ {'value' : [], 'id' : []}],
\ 'whiteSpace' : [
\ ['annotation'],
\ {'value' : [], 'id' : [], 'fixed' : []}],
\ 'pattern' : [
\ ['annotation'],
\ {'value' : [], 'id' : []}],
\ 'extension' : [
\ ['annotation', 'all', 'choice', 'sequence', 'group', 'attribute', 'attributeGroup', 'anyAttribute'],
\ {'base' : [], 'id' : []} ],
\ 'attributeGroup' : [
\ ['annotation', 'attribute', 'attributeGroup', 'anyAttribute'],
\ {'name' : [], 'id' : [], 'ref' : []} ],
\ 'anyAttribute' : [
\ ['annotation'],
\ {'namespace' : [], 'processContents' : [], 'id' : []} ],
\ 'list' : [
\ ['annotation', 'simpleType'],
\ {'itemType' : [], 'id' : []} ],
\ 'union' : [
\ ['annotation', 'simpleType'],
\ {'id' : [], 'memberTypes' : []} ],
\ 'notation' : [
\ ['annotation'],
\ {'name' : [], 'id' : [], 'public' : [], 'system' : []} ],
\ 'annotation' : [
\ ['appinfo', 'documentation'],
\ {} ],
\ 'appinfo' : [
\ [],
\ {'source' : [], 'id' : []} ],
\ 'documentation' : [
\ [],
\ {'source' : [], 'id' : [], 'xml' : []} ]
\ }

View File

@ -1,7 +1,9 @@
" Author: Mikolaj Machowski, Thomas Bartel
" Last change: 2007 May 8
let g:xmldata_xsl = {
\ 'apply-imports' : [[], {}],
\ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}],
\ 'attribute' : [[], {'name' : [], 'namespace' : []}],
\ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}],
\ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}],
\ 'call-template' : [['with-param'], {'name' : []}],
\ 'choose' : [['when', 'otherwise'], {}],
@ -9,10 +11,10 @@ let g:xmldata_xsl = {
\ 'copy' : [[], {'use-attribute-sets' : []}],
\ 'copy-of' : [[], {'select' : []}],
\ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}],
\ 'element' : [[], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
\ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
\ 'fallback' : [[], {}],
\ 'for-each' : [['sort'], {'select' : []}],
\ 'if' : [[], {'test' : []}],
\ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}],
\ 'import' : [[], {'href' : []}],
\ 'include' : [[], {'href' : []}],
\ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}],
@ -21,17 +23,16 @@ let g:xmldata_xsl = {
\ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}],
\ 'otherwise' : [[], {}],
\ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}],
\ 'param' : [[], {'name' : [], 'select' : []}],
\ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
\ 'preserve-space' : [[], {'elements' : []}],
\ 'processing-instruction' : [[], {'name' : []}],
\ 'processing-instructionruction' : [[], {'name' : []}],
\ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}],
\ 'strip-space' : [[], {'elements' : []}],
\ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}],
\ 'template' : [['param'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
\ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
\ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}],
\ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}],
\ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}],
\ 'variable' : [[], {'name' : [], 'select' : []}],
\ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
\ 'when' : [[], {'test' : []}],
\ 'with-param' : [[], {'name' : [], 'select' : []}]}
\ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]}

View File

@ -1,7 +1,12 @@
" Vim completion script
" Language: XML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2006 Apr 30
" Last Change: 2006 Jul 18
" Version: 1.8
"
" Changelog:
" 1.8 - 2006 Jul 18
" - allow for closing of xml tags even when data file isn't available
" This function will create Dictionary with users namespace strings and values
" canonical (system) names of data files. Names should be lowercase,
@ -80,7 +85,7 @@ function! xmlcomplete#CompleteTags(findstart, base)
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline)
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$' || i == curline
@ -106,10 +111,6 @@ function! xmlcomplete#CompleteTags(findstart, base)
return start
else
" There is no connection of namespace and data file. Abandon action
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
return []
endif
" Initialize base return lists
let res = []
let res2 = []
@ -119,6 +120,17 @@ function! xmlcomplete#CompleteTags(findstart, base)
endif
let context = matchstr(b:compl_context, '^<\zs.*')
unlet! b:compl_context
" There is no connection of namespace and data file.
if !exists("g:xmldata_connection") || g:xmldata_connection == {}
" There is still possibility we may do something - eg. close tag
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
else
return []
endif
endif
" Make entities completion
if exists("b:entitiescompl")

View File

@ -1,9 +1,9 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: May 01, 2006
" Version: 9
" Maintainer: Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
" License: Vim License (see vim's :help license)
" Date: May 08, 2007
" Version: 14
" Maintainer: Charles E Campbell, Jr <NdrOchip@ScampbellPfamily.AbizM-NOSPAM>
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005 Charles E. Campbell, Jr. {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
@ -15,15 +15,34 @@
" of this software.
" ---------------------------------------------------------------------
" Initialization: {{{1
" Load Once: {{{1
let s:keepcpo= &cpo
set cpo&vim
if exists("g:loaded_zip")
if &cp || exists("g:loaded_zip") || v:version < 700
finish
endif
let g:loaded_zip = "v9"
let g:loaded_zip = "v14"
let s:zipfile_escape = ' ?&;\'
let s:ERROR = 2
let s:WARNING = 1
let s:NOTE = 0
" ---------------------------------------------------------------------
" Global Values: {{{1
if !exists("g:zip_shq")
if has("unix")
let g:zip_shq= "'"
else
let g:zip_shq= '"'
endif
endif
if !exists("g:zip_zipcmd")
let g:zip_zipcmd= "zip"
endif
if !exists("g:zip_unzipcmd")
let g:zip_unzipcmd= "unzip"
endif
" ----------------
" Functions: {{{1
@ -37,9 +56,10 @@ fun! zip#Browse(zipfile)
set report=10
" sanity checks
if !executable("unzip")
if !executable(g:zip_unzipcmd)
redraw!
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Browse")
return
@ -47,8 +67,9 @@ fun! zip#Browse(zipfile)
if !filereadable(a:zipfile)
if a:zipfile !~# '^\a\+://'
" if its an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
endif
let &report= repkeep
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
@ -58,7 +79,7 @@ fun! zip#Browse(zipfile)
if &ma != 1
set ma
endif
let w:zipfile= a:zipfile
let b:zipfile= a:zipfile
setlocal noswapfile
setlocal buftype=nofile
@ -75,11 +96,12 @@ fun! zip#Browse(zipfile)
0d
$
" call Decho("exe silent r! unzip -l '".a:zipfile."'")
exe "silent r! unzip -l '".a:zipfile."'"
" call Decho("exe silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile))
exe "silent r! ".g:zip_unzipcmd." -l ".s:QuoteFileDir(a:zipfile)
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (zip#Browse) ".a:zipfile." is not a zip file" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
silent %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
@ -109,7 +131,7 @@ endfun
" ---------------------------------------------------------------------
" ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect()
" call Dfunc("ZipBrowseSelect() zipfile<".w:zipfile."> curfile<".expand("%").">")
" call Dfunc("ZipBrowseSelect() zipfile<".b:zipfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
@ -121,8 +143,9 @@ fun! s:ZipBrowseSelect()
return
endif
if fname =~ '/$'
redraw!
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("ZipBrowseSelect")
return
@ -131,7 +154,7 @@ fun! s:ZipBrowseSelect()
" call Decho("fname<".fname.">")
" get zipfile to the new-window
let zipfile= substitute(w:zipfile,'.zip$','','e')
let zipfile = b:zipfile
let curfile= expand("%")
" call Decho("zipfile<".zipfile.">")
" call Decho("curfile<".curfile.">")
@ -160,12 +183,13 @@ fun! zip#Read(fname,mode)
else
let zipfile = substitute(a:fname,'^.\{-}zipfile:\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile:.\{-}::\([^\\].*\)$','\1','')
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
" call Decho("exe r! unzip -p '".zipfile."' '".fname."'")
exe "silent r! unzip -p '".zipfile."' '".fname."'"
" call Decho("exe r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
exe "silent r! ".g:zip_unzipcmd." -p ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname)
" cleanup
0d
@ -183,16 +207,18 @@ fun! zip#Write(fname)
set report=10
" sanity checks
if !executable("zip")
if !executable(g:zip_zipcmd)
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the zip pgm" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endif
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
@ -208,15 +234,11 @@ fun! zip#Write(fname)
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
try
exe "cd ".escape(tmpdir,' \')
catch /^Vim\%((\a\+)\)\=:E344/
echohl Error | echo "***error*** (zip#Write) cannot cd to temporary directory" | Echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
let &report= repkeep
" call Dret("zip#Write")
return
endtry
endif
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
@ -255,21 +277,26 @@ fun! zip#Write(fname)
let zipfile = substitute(system("cygpath ".zipfile),'\n','','e')
endif
" call Decho("zip -u '".zipfile.".zip' '".fname."'")
call system("zip -u '".zipfile.".zip' '".fname."'")
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
call system(g:zip_zipcmd." -u ".s:QuoteFileDir(zipfile)." ".s:QuoteFileDir(fname))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
elseif s:zipfile_{winnr()} =~ '^\a\+://'
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
" call Decho("handle writing <".zipfile.".zip> across network as <".netzipfile.">")
" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "e! ".zipfile.".zip"
exe "e! ".zipfile
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
@ -280,25 +307,61 @@ fun! zip#Write(fname)
" cleanup and restore current directory
cd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".escape(curdir,' \')
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call s:Rmdir(tmpdir)
setlocal nomod
let &report= repkeep
" call Dret("zip#Write")
endfun
" ---------------------------------------------------------------------
" QuoteFileDir: {{{2
fun! s:QuoteFileDir(fname)
" call Dfunc("QuoteFileDir(fname<".a:fname.">)")
" call Dret("QuoteFileDir")
return g:zip_shq.a:fname.g:zip_shq
endfun
" ---------------------------------------------------------------------
" ChgDir: {{{2
fun! s:ChgDir(newdir,errlvl,errmsg)
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let newdir= escape(a:newdir,' ')
else
let newdir= escape(a:newdir,'\ ')
endif
try
exe "cd ".newdir
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
if a:errlvl == s:NOTE
echo "***note*** ".a:errmsg
elseif a:errlvl == s:WARNING
echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
elseif a:errlvl == s:ERROR
echohl Error | echo "***error*** ".a:errmsg | echohl NONE
endif
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("ChgDir 1")
return 1
endtry
" call Dret("ChgDir 0")
return 0
endfun
" ---------------------------------------------------------------------
" Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf ".a:fname)
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf ".a:fname)
else
call system("del /S ".a:fname)
endif
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
call system("rmdir /S/Q ".s:QuoteFileDir(a:fname))
else
call system("/bin/rm -rf ".s:QuoteFileDir(a:fname))
endif
" call Dret("Rmdir")
endfun

View File

@ -2,9 +2,9 @@
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Steven Vertigan <steven@vertigan.wattle.id.au>
" Last Change: 2003 May 11
" Revision #4: Support for new "Underline" group. Removed superfluous html
" formatting.
" Last Change: 2006 Sep 23
" Revision #5: Switch main text from white to yellow for easier contrast,
" fixed some problems with terminal backgrounds.
set background=dark
hi clear
@ -12,66 +12,44 @@ if exists("syntax_on")
syntax reset
endif
let g:colors_name = "blue"
hi Normal guifg=white guibg=darkBlue
hi Normal ctermfg=white ctermbg=darkBlue
hi Normal guifg=yellow guibg=darkBlue ctermfg=yellow ctermbg=darkBlue
hi NonText guifg=magenta ctermfg=lightMagenta
hi comment guifg=gray gui=bold
hi comment ctermfg=gray
hi comment guifg=gray ctermfg=gray ctermbg=darkBlue gui=bold
hi constant guifg=cyan ctermfg=cyan
hi identifier guifg=gray ctermfg=gray
hi statement guifg=yellow gui=none ctermfg=yellow
hi identifier guifg=gray ctermfg=red
hi statement guifg=white ctermfg=white ctermbg=darkBlue gui=none
hi preproc guifg=green ctermfg=green
hi type guifg=orange ctermfg=darkYellow
hi special guifg=magenta ctermfg=lightMagenta
hi Underlined guifg=cyan ctermfg=cyan
hi Underlined gui=underline cterm=underline
hi type guifg=orange ctermfg=lightRed ctermbg=darkBlue
hi special guifg=magenta ctermfg=lightMagenta ctermbg=darkBlue
hi Underlined guifg=cyan ctermfg=cyan gui=underline cterm=underline
hi label guifg=yellow ctermfg=yellow
hi operator guifg=orange gui=bold ctermfg=lightRed ctermbg=darkBlue
hi ErrorMsg guifg=orange guibg=darkBlue
hi ErrorMsg ctermfg=lightRed
hi WarningMsg guifg=cyan guibg=darkBlue gui=bold
hi WarningMsg ctermfg=cyan
hi ModeMsg guifg=yellow gui=NONE
hi ModeMsg ctermfg=yellow
hi MoreMsg guifg=yellow gui=NONE
hi MoreMsg ctermfg=yellow
hi Error guifg=red guibg=darkBlue gui=underline
hi Error ctermfg=red
hi ErrorMsg guifg=orange guibg=darkBlue ctermfg=lightRed
hi WarningMsg guifg=cyan guibg=darkBlue ctermfg=cyan gui=bold
hi ModeMsg guifg=yellow gui=NONE ctermfg=yellow
hi MoreMsg guifg=yellow gui=NONE ctermfg=yellow
hi Error guifg=red guibg=darkBlue gui=underline ctermfg=red
hi Todo guifg=black guibg=orange
hi Todo ctermfg=black ctermbg=darkYellow
hi Cursor guifg=black guibg=white
hi Cursor ctermfg=black ctermbg=white
hi Search guifg=black guibg=orange
hi Search ctermfg=black ctermbg=darkYellow
hi IncSearch guifg=black guibg=yellow
hi IncSearch ctermfg=black ctermbg=darkYellow
hi LineNr guifg=pink ctermfg=lightMagenta
hi Todo guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
hi Cursor guifg=black guibg=white ctermfg=black ctermbg=white
hi Search guifg=black guibg=orange ctermfg=black ctermbg=darkYellow
hi IncSearch guifg=black guibg=yellow ctermfg=black ctermbg=darkYellow
hi LineNr guifg=cyan ctermfg=cyan
hi title guifg=white gui=bold cterm=bold
hi StatusLineNC gui=NONE guifg=black guibg=blue
hi StatusLineNC ctermfg=black ctermbg=blue
hi StatusLine gui=bold guifg=cyan guibg=blue
hi StatusLine ctermfg=cyan ctermbg=blue
hi StatusLineNC gui=NONE guifg=black guibg=blue ctermfg=black ctermbg=blue
hi StatusLine gui=bold guifg=cyan guibg=blue ctermfg=cyan ctermbg=blue
hi VertSplit gui=none guifg=blue guibg=blue ctermfg=blue ctermbg=blue
hi label guifg=yellow ctermfg=yellow
hi operator guifg=orange gui=bold ctermfg=darkYellow
hi clear Visual
hi Visual term=reverse
hi Visual ctermfg=black ctermbg=darkCyan
hi Visual guifg=black guibg=darkCyan
hi Visual term=reverse ctermfg=black ctermbg=darkCyan guifg=black guibg=darkCyan
hi DiffChange guibg=darkGreen guifg=black
hi DiffChange ctermbg=darkGreen ctermfg=black
hi DiffText guibg=olivedrab guifg=black
hi DiffText ctermbg=lightGreen ctermfg=black
hi DiffAdd guibg=slateblue guifg=black
hi DiffAdd ctermbg=blue ctermfg=black
hi DiffDelete guibg=coral guifg=black
hi DiffDelete ctermbg=cyan ctermfg=black
hi DiffChange guibg=darkGreen guifg=black ctermbg=darkGreen ctermfg=black
hi DiffText guibg=olivedrab guifg=black ctermbg=lightGreen ctermfg=black
hi DiffAdd guibg=slateblue guifg=black ctermbg=blue ctermfg=black
hi DiffDelete guibg=coral guifg=black ctermbg=cyan ctermfg=black
hi Folded guibg=orange guifg=black
hi Folded ctermbg=yellow ctermfg=black
hi FoldColumn guibg=gray30 guifg=black
hi FoldColumn ctermbg=gray ctermfg=black
hi Folded guibg=orange guifg=black ctermbg=yellow ctermfg=black
hi FoldColumn guibg=gray30 guifg=black ctermbg=gray ctermfg=black
hi cIf0 guifg=gray ctermfg=gray

View File

@ -2,7 +2,7 @@
" vim: tw=0 ts=4 sw=4
" Vim color file
" Maintainer: Ron Aaron <ron@ronware.org>
" Last Change: 2006 Mar 26
" Last Change: 2006 Dec 10
hi clear
set background=dark
@ -13,11 +13,11 @@ let g:colors_name = "koehler"
hi Normal guifg=white guibg=black
hi Scrollbar guifg=darkcyan guibg=cyan
hi Menu guifg=black guibg=cyan
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=Blue
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=Blue
hi Directory term=bold cterm=bold ctermfg=brown guifg=Blue
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=blue guifg=White guibg=Red
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=#cc0000
hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=#cc0000
hi Directory term=bold cterm=bold ctermfg=brown guifg=#cc8000
hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=red guifg=White guibg=Red
hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red
hi MoreMsg term=bold cterm=bold ctermfg=darkgreen gui=bold guifg=SeaGreen
hi ModeMsg term=bold cterm=bold gui=bold guifg=White guibg=Blue
hi LineNr term=underline cterm=bold ctermfg=darkcyan guifg=Yellow
@ -26,20 +26,20 @@ hi StatusLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gu
hi StatusLineNC term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue
hi Title term=bold cterm=bold ctermfg=darkmagenta gui=bold guifg=Magenta
hi Visual term=reverse cterm=reverse gui=reverse
hi WarningMsg term=standout cterm=bold ctermfg=darkblue guifg=Red
hi WarningMsg term=standout cterm=bold ctermfg=darkred guifg=Red
hi Cursor guifg=bg guibg=Green
hi Comment term=bold cterm=bold ctermfg=cyan guifg=#80a0ff
hi Constant term=underline cterm=bold ctermfg=magenta guifg=#ffa0a0
hi Special term=bold cterm=bold ctermfg=red guifg=Orange
hi Identifier term=underline ctermfg=brown guifg=#40ffff
hi Statement term=bold cterm=bold ctermfg=yellow gui=bold guifg=#ffff60
hi PreProc term=underline ctermfg=darkblue guifg=#ff80ff
hi PreProc term=underline ctermfg=darkmagenta guifg=#ff80ff
hi Type term=underline cterm=bold ctermfg=lightgreen gui=bold guifg=#60ff60
hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black
hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow
hi CursorLine term=underline guibg=#555555
hi CursorColumn term=underline guibg=#555555
hi MatchParen term=reverse guibg=Blue
hi CursorLine term=underline guibg=#555555 cterm=underline
hi CursorColumn term=underline guibg=#555555 cterm=underline
hi MatchParen term=reverse ctermfg=blue guibg=Blue
hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white
hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue

View File

@ -1,6 +1,6 @@
" Vim color file
" Maintainer: Thorsten Maerz <info@netztorte.de>
" Last Change: 2001 Jul 23
" Last Change: 2006 Dec 07
" grey on black
" optimized for TFT panels
@ -18,7 +18,7 @@ let g:colors_name = "torte"
" GUI
highlight Normal guifg=Grey80 guibg=Black
highlight Search guifg=Black guibg=Red gui=bold
highlight Visual guifg=Grey25 gui=bold
highlight Visual guifg=#404040 gui=bold
highlight Cursor guifg=Black guibg=Green gui=bold
highlight Special guifg=Orange
highlight Comment guifg=#80a0ff
@ -42,7 +42,7 @@ if has("unix")
if v:version<600
highlight Normal ctermfg=Grey ctermbg=Black cterm=NONE guifg=Grey80 guibg=Black gui=NONE
highlight Search ctermfg=Black ctermbg=Red cterm=bold guifg=Black guibg=Red gui=bold
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=Grey25 gui=bold
highlight Visual ctermfg=Black ctermbg=yellow cterm=bold guifg=#404040 gui=bold
highlight Special ctermfg=LightBlue cterm=NONE guifg=LightBlue gui=NONE
highlight Comment ctermfg=Cyan cterm=NONE guifg=LightBlue gui=NONE
endif

View File

@ -0,0 +1,54 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/Dec Ada compiler file
" Language: Ada (Dec Ada)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" $Author$
" $Date$
" Version: 4.2
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/decada.vim $
" History: 21.07.2006 MK New Dec Ada
" 15.10.2006 MK Bram's suggestion for runtime integration
" Help Page: compiler-decada
"------------------------------------------------------------------------------
if (exists("current_compiler") &&
\ current_compiler == "decada") ||
\ version < 700
finish
endif
let current_compiler = "decada"
if !exists("g:decada")
let g:decada = decada#New ()
endif
if exists(":CompilerSet") != 2
"
" plugin loaded by other means then the "compiler" command
"
command -nargs=* CompilerSet setlocal <args>
endif
call g:decada.Set_Session ()
execute "CompilerSet makeprg=" . escape (g:decada.Make_Command, ' ')
execute "CompilerSet errorformat=" . escape (g:decada.Error_Format, ' ')
call ada#Map_Menu (
\'Dec Ada.Build',
\'<F7>',
\'call decada.Make ()')
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

View File

@ -1,7 +1,7 @@
" Vim compiler file
" Compiler: GNU C Compiler
" Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2006-04-19
" Latest Revision: 2006-12-20
if exists("current_compiler")
finish
@ -20,7 +20,13 @@ setlocal errorformat=
\\"%f\"\\,\ line\ %l%*\\D%c%*[^\ ]\ %m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%D%*\\a:\ Entering\ directory\ `%f',
\%X%*\\a:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f
if exists('g:compiler_gcc_ignore_unmatched_lines')
let &errorformat .= ',%-G%.%#'
endif
let &cpo = s:cpo_save
unlet s:cpo_save

71
runtime/compiler/gnat.vim Normal file
View File

@ -0,0 +1,71 @@
"------------------------------------------------------------------------------
" Description: Vim Ada/GNAT compiler file
" Language: Ada (GNAT)
" $Id$
" Copyright: Copyright (C) 2006 Martin Krischik
" Maintainer: Martin Krischik
" $Author$
" $Date$
" Version: 4.2
" $Revision$
" $HeadURL: https://svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/compiler/gnat.vim $
" History: 24.05.2006 MK Unified Headers
" 16.07.2006 MK Ada-Mode as vim-ball
" 15.10.2006 MK Bram's suggestion for runtime integration
" Help Page: compiler-gnat
"------------------------------------------------------------------------------
if (exists("current_compiler") &&
\ current_compiler == "gnat") ||
\ version < 700
finish
endif
let current_compiler = "gnat"
if !exists("g:gnat")
let g:gnat = gnat#New ()
call ada#Map_Menu (
\ 'GNAT.Build',
\ '<F7>',
\ 'call gnat.Make ()')
call ada#Map_Menu (
\ 'GNAT.Pretty Print',
\ ':GnatPretty',
\ 'call gnat.Pretty ()')
call ada#Map_Menu (
\ 'GNAT.Tags',
\ ':GnatTags',
\ 'call gnat.Tags ()')
call ada#Map_Menu (
\ 'GNAT.Find',
\ ':GnatFind',
\ 'call gnat.Find ()')
call ada#Map_Menu (
\ 'GNAT.Set Projectfile\.\.\.',
\ ':SetProject',
\ 'call gnat.Set_Project_File ()')
endif
if exists(":CompilerSet") != 2
"
" plugin loaded by other means then the "compiler" command
"
command -nargs=* CompilerSet setlocal <args>
endif
call g:gnat.Set_Session ()
execute "CompilerSet makeprg=" . escape (g:gnat.Get_Command('Make'), ' ')
execute "CompilerSet errorformat=" . escape (g:gnat.Error_Format, ' ')
finish " 1}}}
"------------------------------------------------------------------------------
" Copyright (C) 2006 Martin Krischik
"
" Vim is Charityware - see ":help license" or uganda.txt for licence details.
"------------------------------------------------------------------------------
" vim: textwidth=0 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
" vim: foldmethod=marker

24
runtime/compiler/mcs.vim Normal file
View File

@ -0,0 +1,24 @@
" Vim compiler file
" Compiler: Mono C# Compiler
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
" Latest Revision: 2006-06-18
if exists("current_compiler")
finish
endif
let current_compiler = "mcs"
let s:cpo_save = &cpo
set cpo-=C
setlocal errorformat=
\%E%f(%l\\,%c):\ error\ CS%n:%m,
\%W%f(%l\\,%c):\ warning\ CS%n:%m,
\%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f,
\%G-%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

View File

@ -14,6 +14,7 @@ VIMEXE = vim
include ../../src/auto/config.mk
DOCS = \
ada.txt \
arabic.txt \
autocmd.txt \
change.txt \
@ -28,7 +29,6 @@ DOCS = \
farsi.txt \
filetype.txt \
fold.txt \
getscript.txt \
gui.txt \
gui_w16.txt \
gui_w32.txt \
@ -70,6 +70,7 @@ DOCS = \
os_vms.txt \
os_win32.txt \
pattern.txt \
pi_getscript.txt \
pi_gzip.txt \
pi_netrw.txt \
pi_paren.txt \
@ -144,6 +145,7 @@ DOCS = \
workshop.txt
HTMLS = \
ada.html \
arabic.html \
autocmd.html \
change.html \
@ -158,7 +160,6 @@ HTMLS = \
farsi.html \
filetype.html \
fold.html \
getscript.html \
gui.html \
gui_w16.html \
gui_w32.html \
@ -200,6 +201,7 @@ HTMLS = \
os_vms.html \
os_win32.html \
pattern.html \
pi_getscript.html \
pi_gzip.html \
pi_netrw.html \
pi_paren.html \
@ -224,8 +226,8 @@ HTMLS = \
sql.html \
syntax.html \
tabpage.html \
tagsrch.html \
tags.html \
tagsrch.html \
term.html \
tips.html \
todo.html \

515
runtime/doc/ada.txt Normal file
View File

@ -0,0 +1,515 @@
*ada.txt* For Vim version 7.1. Last change: 2007 May 08
ADA FILE TYPE PLUG-INS REFERENCE MANUAL~
ADA *ada.vim*
1. Syntax Highlighting |ft-ada-syntax|
2. Plug-in |ft-ada-plugin|
3. Omni Completion |ft-ada-omni|
3.1 Omni Completion with "gnat xref" |gnat-xref|
3.2 Omni Completion with "ctags" |ada-ctags|
4. Compiler Support |ada-compiler|
4.1 GNAT |compiler-gnat|
4.1 Dec Ada |compiler-decada|
5. References |ada-reference|
5.1 Options |ft-ada-options|
5.2 Functions |ft-ada-functions|
5.3 Commands |ft-ada-commands|
5.4 Variables |ft-ada-variables|
5.5 Constants |ft-ada-constants|
8. Extra Plug-ins |ada-extra-plugins|
==============================================================================
1. Syntax Highlighting ~
*ft-ada-syntax*
This mode is designed for the 2005 edition of Ada ("Ada 2005"), which includes
support for objected-programming, protected types, and so on. It handles code
written for the original Ada language ("Ada83", "Ada87", "Ada95") as well,
though code which uses Ada 2005-only keywords will be wrongly colored (such
code should be fixed anyway). For more information about Ada, see
http://www.adapower.com.
The Ada mode handles a number of situations cleanly.
For example, it knows that the "-" in "-5" is a number, but the same character
in "A-5" is an operator. Normally, a "with" or "use" clause referencing
another compilation unit is coloured the same way as C's "#include" is coloured.
If you have "Conditional" or "Repeat" groups coloured differently, then "end
if" and "end loop" will be coloured as part of those respective groups.
You can set these to different colours using vim's "highlight" command (e.g.,
to change how loops are displayed, enter the command ":hi Repeat" followed by
the colour specification; on simple terminals the colour specification
ctermfg=White often shows well).
There are several options you can select in this Ada mode. See|ft-ada-options|
for a complete list.
To enable them, assign a value to the option. For example, to turn one on:
>
> let g:ada_standard_types = 1
>
To disable them use ":unlet". Example:
>
> unlet g:ada_standard_types
You can just use ":" and type these into the command line to set these
temporarily before loading an Ada file. You can make these option settings
permanent by adding the "let" command(s), without a colon, to your "~/.vimrc"
file.
Even on a slow (90Mhz) PC this mode works quickly, but if you find the
performance unacceptable, turn on |g:ada_withuse_ordinary|.
Syntax folding instructions (|fold-syntax|) are added when |g:ada_folding| is
set.
==============================================================================
2. File type Plug-in ~
*ft-ada-indent* *ft-ada-plugin*
The Ada plug-in provides support for:
- auto indenting (|indent.txt|)
- insert completion (|i_CTRL-N|)
- user completion (|i_CTRL-X_CTRL-U|)
- tag searches (|tagsrch.txt|)
- Quick Fix (|quickfix.txt|)
- backspace handling (|'backspace'|)
- comment handling (|'comments'|, |'commentstring'|)
The plug-in only activates the features of the Ada mode whenever an Ada
files is opened and add adds Ada related entries to the main and pop-up menu.
==============================================================================
3. Omni Completion ~
*ft-ada-omni*
The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The
complete function will automatically detect which tool was used to create the
tags file.
------------------------------------------------------------------------------
3.1 Omni Completion with "gnat xref" ~
*gnat-xref*
GNAT XREF uses the compiler internal informations (ali-files) to produce the
tags file. This has the advantage to be 100% correct and the option of deep
nested analysis. However the code must compile, the generator is quite
slow and the created tags file contains only the basic Ctags informations for
each entry - not enough for some of the more advanced Vim code browser
plug-ins.
NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
output - If nothing is printed then usually the parameters are wrong.
Here some important tips:
1) You need to compile your code first and use the "-aO" option to point to
your .ali files.
2) "gnat xref -v ../Include/adacl.ads" won't work - use the "gnat xref -v
-aI../Include adacl.ads" instead.
3) "gnat xref -v -aI../Include *.ad?" won't work - use "cd ../Include" and
then "gnat xref -v *.ad?"
4) Project manager support is completely broken - don't even try "gnat xref
-Padacl.gpr".
5) VIM is faster when the tags file is sorted - use "sort --unique
--ignore-case --output=tags tags" .
6) Remember to insert "!_TAG_FILE_SORTED 2 %sort ui" as first line to mark
the file assorted.
------------------------------------------------------------------------------
3.2 Omni Completion with "ctags"~
*ada-ctags*
Exuberant Ctags uses its own multi-language code parser. The parser is quite
fast, produces a lot of extra informations (hence the name "Exuberant Ctags")
and can run on files which currently do not compile.
There are also lots of other Vim-tools which use exuberant Ctags.
You will need to install a version of the Exuberant Ctags which has Ada
support patched in. Such a version is available from the GNU Ada Project
(http://gnuada.sourceforge.net).
The Ada parser for Exuberant Ctags is fairly new - don't expect complete
support yet.
==============================================================================
4. Compiler Support ~
*ada-compiler*
The Ada mode supports more then one Ada compiler and will automatically load the
compiler set in|g:ada_default_compiler|whenever an Ada source is opened. The
provided compiler plug-ins are split into the actual compiler plug-in and a
collection of support functions and variables. This allows the easy
development of specialized compiler plug-ins fine tuned to your development
environment.
------------------------------------------------------------------------------
4.1 GNAT ~
*compiler-gnat*
GNAT is the only free (beer and speech) Ada compiler available. There are
several version available which differentiate in the licence terms used.
The GNAT compiler plug-in will perform a compile on pressing <F7> and then
immediately shows the result. You can set the project file to be used by
setting:
>
> call g:gnat.Set_Project_File ('my_project.gpr')
Setting a project file will also create a Vim session (|views-sessions|) so -
like with the GPS - opened files, window positions etc. will remembered
separately for all projects.
*gnat_members*
GNAT OBJECT ~
*g:gnat.Make()*
g:gnat.Make()
Calls|g:gnat.Make_Command|and displays the result inside a
|quickfix| window.
*g:gnat.Pretty()*
g:gnat.Pretty()
Calls|g:gnat.Pretty_Command|
*g:gnat.Find()*
g:gnat.Find()
Calls|g:gnat.Find_Command|
*g:gnat.Tags()*
g:gnat.Tags()
Calls|g:gnat.Tags_Command|
*g:gnat.Set_Project_File()*
g:gnat.Set_Project_File([{file}])
Set gnat project file and load associated session. An open
project will be closed and the session written. If called
without file name the file selector opens for selection of a
project file. If called with an empty string then the project
and associated session are closed.
*g:gnat.Project_File*
g:gnat.Project_File string
Current project file.
*g:gnat.Make_Command*
g:gnat.Make_Command string
External command used for|g:gnat.Make()| (|'makeprg'|).
*g:gnat.Pretty_Program*
g:gnat.Pretty_Program string
External command used for|g:gnat.Pretty()|
*g:gnat.Find_Program*
g:gnat.Find_Program string
External command used for|g:gnat.Find()|
*g:gnat.Tags_Command*
g:gnat.Tags_Command string
External command used for|g:gnat.Tags()|
*g:gnat.Error_Format*
g:gnat.Error_Format string
Error format (|'errorformat'|)
------------------------------------------------------------------------------
4.2 Dec Ada ~
*compiler-hpada* *compiler-decada*
*compiler-vaxada* *compiler-compaqada*
Dec Ada (also known by - in chronological order - VAX Ada, Dec Ada, Compaq Ada
and HP Ada) is a fairly dated Ada 83 compiler. Support is basic: <F7> will
compile the current unit.
The Dec Ada compiler expects the package name and not the file name to be
passed a parameter. The compiler plug-in supports the usual file name
convention to convert the file into a unit name. For separates both '-' and
'__' are allowed.
*decada_members*
DEC ADA OBJECT ~
*g:decada.Make()*
g:decada.Make() function
Calls|g:decada.Make_Command|and displays the result inside a
|quickfix| window.
*g:decada.Unit_Name()*
g:decada.Unit_Name() function
Get the Unit name for the current file.
*g:decada.Make_Command*
g:decada.Make_Command string
External command used for|g:decadat.Make()| (|'makeprg'|).
*g:decada.Error_Format*
g:decada.Error_Format| string
Error format (|'errorformat'|).
==============================================================================
5. References ~
*ada-reference*
------------------------------------------------------------------------------
5.1 Options ~
*ft-ada-options*
*g:ada_standard_types*
g:ada_standard_types bool (true when exists)
Highlight types in package Standard (e.g., "Float")
*g:ada_space_errors*
*g:ada_no_trail_space_error*
*g:ada_no_tab_space_error*
*g:ada_all_tab_usage*
g:ada_space_errors bool (true when exists)
Highlight extraneous errors in spaces ...
g:ada_no_trail_space_error
- but ignore trailing spaces at the end of a line
g:ada_no_tab_space_error
- but ignore tabs after spaces
g:ada_all_tab_usage
- highlight all tab use
*g:ada_line_errors*
g:ada_line_errors bool (true when exists)
Highlight lines which are to long. Note: This highlighting
option is quite CPU intensive.
*g:ada_rainbow_color*
g:ada_rainbow_color bool (true when exists)
Use rainbow colours for '(' and ')'. You need the
rainbow_parenthesis for this to work
*g:ada_folding*
g:ada_folding set ('sigpft')
Use folding for Ada sources.
's': activate syntax folding on load
'p': fold packages
'f': fold functions and procedures
't': fold types
'c': fold conditionals
'g': activate gnat pretty print folding on load
'i': lone 'is' folded with line above
'b': lone 'begin' folded with line above
'p': lone 'private' folded with line above
'x': lone 'exception' folded with line above
'i': activate indent folding on load
Note: Syntax folding is in an early (unusable) stage and
indent or gnat pretty folding is suggested.
For gnat pretty folding to work the following settings are
suggested: -cl3 -M79 -c2 -c3 -c4 -A1 -A2 -A3 -A4 -A5
For indent folding to work the following settings are
suggested: shiftwidth=3 softtabstop=3
*g:ada_abbrev*
g:ada_abbrev bool (true when exists)
Add some abbreviations. This feature more or less superseded
by the various completion methods.
*g:ada_withuse_ordinary*
g:ada_withuse_ordinary bool (true when exists)
Show "with" and "use" as ordinary keywords (when used to
reference other compilation units they're normally highlighted
specially).
*g:ada_begin_preproc*
g:ada_begin_preproc bool (true when exists)
Show all begin-like keywords using the colouring of C
preprocessor commands.
*g:ada_omni_with_keywords*
g:ada_omni_with_keywords
Add Keywords, Pragmas, Attributes to omni-completions
(|compl-omni|). Note: You can always complete then with user
completion (|i_CTRL-X_CTRL-U|).
*g:ada_extended_tagging*
g:ada_extended_tagging enum ('jump', 'list')
use extended tagging, two options are available
'jump': use tjump to jump.
'list': add tags quick fix list.
Normal tagging does not support function or operator
overloading as these features are not available in C and
tagging was originally developed for C.
*g:ada_extended_completion*
g:ada_extended_completion
Uses extended completion for <C-N> and <C-R> completions
(|i_CTRL-N|). In this mode the '.' is used as part of the
identifier so that 'Object.Method' or 'Package.Procedure' are
completed together.
*g:ada_gnat_extensions*
g:ada_gnat_extensions bool (true when exists)
Support GNAT extensions.
*g:ada_with_gnat_project_files*
g:ada_with_gnat_project_files bool (true when exists)
Add gnat project file keywords and Attributes.
*g:ada_default_compiler*
g:ada_default_compiler string
set default compiler. Currently supported is 'gnat' and
'decada'.
An "exists" type is a boolean is considered true when the variable is defined
and false when the variable is undefined. The value which the variable is
set makes no difference.
------------------------------------------------------------------------------
5.3 Commands ~
*ft-ada-commands*
:AdaRainbow *:AdaRainbow*
Toggles rainbow colour (|g:ada_rainbow_color|) mode for
'(' and ')'
:AdaLines *:AdaLines*
Toggles line error (|g:ada_line_errors|) display
:AdaSpaces *:AdaSpaces*
Toggles space error (|g:ada_space_errors|) display.
:AdaTagDir *:AdaTagDir*
Creates tags file for the directory of the current file.
:AdaTagFile *:AdaTagFile*
Creates tags file for the current file.
:AdaTypes *:AdaTypes*
Toggles standard types (|g:ada_standard_types|) colour.
:GnatFind *:GnatFind*
Calls |g:gnat.Find()|
:GnatPretty *:GnatPretty*
Calls |g:gnat.Pretty()|
:GnatTags *:GnatTags*
Calls |g:gnat.Tags()|
------------------------------------------------------------------------------
5.3 Variables ~
*ft-ada-variables*
*g:gnat*
g:gnat object
Control object which manages GNAT compiles. The object
is created when the first Ada source code is loaded provided
that |g:ada_default_compiler|is set to 'gnat'. See|gnat_members|
for details.
*g:decada*
g:decada object
Control object which manages Dec Ada compiles. The object
is created when the first Ada source code is loaded provided
that |g:ada_default_compiler|is set to 'decada'. See
|decada_members|for details.
------------------------------------------------------------------------------
5.4 Constants ~
*ft-ada-constants*
All constants are locked. See |:lockvar| for details.
*g:ada#WordRegex*
g:ada#WordRegex string
Regular expression to search for Ada words
*g:ada#DotWordRegex*
g:ada#DotWordRegex string
Regular expression to search for Ada words separated by dots.
*g:ada#Comment*
g:ada#Comment string
Regular expression to search for Ada comments
*g:ada#Keywords*
g:ada#Keywords list of dictionaries
List of keywords, attributes etc. pp. in the format used by
omni completion. See |complete-items| for details.
*g:ada#Ctags_Kinds*
g:ada#Ctags_Kinds dictionary of lists
Dictionary of the various kinds of items which the Ada support
for Ctags generates.
------------------------------------------------------------------------------
5.2 Functions ~
*ft-ada-functions*
ada#Word([{line}, {col}]) *ada#Word()*
Return full name of Ada entity under the cursor (or at given
line/column), stripping white space/newlines as necessary.
ada#List_Tag([{line}, {col}]) *ada#Listtags()*
List all occurrences of the Ada entity under the cursor (or at
given line/column) inside the quick-fix window
ada#Jump_Tag ({ident}, {mode}) *ada#Jump_Tag()*
List all occurrences of the Ada entity under the cursor (or at
given line/column) in the tag jump list. Mode can either be
'tjump' or 'stjump'.
ada#Create_Tags ({option}) *ada#Create_Tags()*
Creates tag file using Ctags. The option can either be 'file'
for the current file, 'dir' for the directory of the current
file or a file name.
gnat#Insert_Tags_Header() *gnat#Insert_Tags_Header()*
Adds the tag file header (!_TAG_) informations to the current
file which are missing from the GNAT XREF output.
ada#Switch_Syntax_Option ({option}) *ada#Switch_Syntax_Option()*
Toggles highlighting options on or off. Used for the Ada menu.
*gnat#New()*
gnat#New ()
Create a new gnat object. See |g:gnat| for details.
==============================================================================
8. Extra Plugins ~
*ada-extra-plugins*
You can optionally install the following extra plug-in. They work well with Ada
and enhance the ability of the Ada mode.:
backup.vim
http://www.vim.org/scripts/script.php?script_id=1537
Keeps as many backups as you like so you don't have to.
rainbow_parenthsis.vim
http://www.vim.org/scripts/script.php?script_id=1561
Very helpful since Ada uses only '(' and ')'.
nerd_comments.vim
http://www.vim.org/scripts/script.php?script_id=1218
Excellent commenting and uncommenting support for almost any
programming language.
matchit.vim
http://www.vim.org/scripts/script.php?script_id=39
'%' jumping for any language. The normal '%' jump only works for '{}'
style languages. The Ada mode will set the needed search patters.
taglist.vim
http://www.vim.org/scripts/script.php?script_id=273
Source code explorer sidebar. There is a patch for Ada available.
The GNU Ada Project distribution (http://gnuada.sourceforge.net) of Vim
contains all of the above.
==============================================================================
vim: textwidth=78 nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab
vim: filetype=help encoding=latin1

View File

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

View File

@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0. Last change: 2006 May 06
*autocmd.txt* For Vim version 7.1. Last change: 2007 Mar 27
VIM REFERENCE MANUAL by Bram Moolenaar
@ -263,7 +263,7 @@ Name triggered by ~
Startup and exit
|VimEnter| after doing all the startup stuff
|GUIEnter| after starting the GUI successfully
|TermResponse| after the termainal response to |t_RV| is received
|TermResponse| after the terminal response to |t_RV| is received
|VimLeavePre| before exiting Vim, before writing the viminfo file
|VimLeave| before exiting Vim, after writing the viminfo file
@ -279,6 +279,7 @@ Name triggered by ~
|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
|SourceCmd| before sourcing a Vim script |Cmd-event|
|VimResized| after the Vim window size changed
|FocusGained| Vim got input focus
@ -460,6 +461,9 @@ CursorHold When the user doesn't press a key for the time
make some coffee. :) See |CursorHold-example|
for previewing tags.
This event is only triggered in Normal mode.
It is not triggered when waiting for a command
argument to be typed, or a movement after an
operator.
While recording the CursorHold event is not
triggered. |q|
Note: Interactive commands cannot be used for
@ -527,8 +531,6 @@ FileChangedShell When Vim notices that the modification time of
and the buffer was not changed. If a
FileChangedShell autocommand is present the
warning message and prompt is not given.
This is useful for reloading related buffers
which are affected by a single command.
The |v:fcs_reason| variable is set to indicate
what happened and |v:fcs_choice| can be used
to tell Vim what to do next.
@ -560,7 +562,8 @@ FileReadPost After reading a file with a ":read" command.
*FileReadPre*
FileReadPre Before reading a file with a ":read" command.
*FileType*
FileType When the 'filetype' option has been set.
FileType When the 'filetype' option has been set. The
pattern is matched against the filetype.
<afile> can be used for the name of the file
where this option was set, and <amatch> for
the new value of 'filetype'.
@ -616,8 +619,9 @@ FocusLost When Vim lost input focus. Only for the GUI
*FuncUndefined*
FuncUndefined When a user function is used but it isn't
defined. Useful for defining a function only
when it's used. Both <amatch> and <afile> are
set to the name of the function.
when it's used. The pattern is matched
against the function name. Both <amatch> and
<afile> are set to the name of the function.
See |autoload-functions|.
*GUIEnter*
GUIEnter After starting the GUI successfully, and after
@ -625,6 +629,12 @@ GUIEnter After starting the GUI successfully, and after
VimEnter when using gvim. Can be used to
position the window from a .gvimrc file: >
:autocmd GUIEnter * winpos 100 50
< *GUIFailed*
GUIFailed After starting the GUI failed. Vim may
continue to run in the terminal, if possible
(only on Unix and alikes, when connecting the
X server fails). You may want to quit Vim: >
:autocmd GUIFailed * qall
< *InsertChange*
InsertChange When typing <Insert> while in Insert or
Replace mode. The |v:insertmode| variable
@ -632,8 +642,8 @@ InsertChange When typing <Insert> while in Insert or
Be careful not to move the cursor or do
anything else that the user does not expect.
*InsertEnter*
InsertEnter When starting Insert mode. Also for Replace
mode and Virtual Replace mode. The
InsertEnter Just before starting Insert mode. Also for
Replace mode and Virtual Replace mode. The
|v:insertmode| variable indicates the mode.
Be careful not to move the cursor or do
anything else that the user does not expect.
@ -656,7 +666,7 @@ MenuPopup Just before showing the popup menu (under the
QuickFixCmdPre Before a quickfix command is run (|:make|,
|:lmake|, |:grep|, |:lgrep|, |:grepadd|,
|:lgrepadd|, |:vimgrep|, |:lvimgrep|,
|:vimgrepadd|, |:vimgrepadd|). The pattern is
|:vimgrepadd|, |:lvimgrepadd|). The pattern is
matched against the command being run. When
|:grep| is used but 'grepprg' is set to
"internal" it still matches "grep".
@ -670,7 +680,8 @@ QuickFixCmdPost Like QuickFixCmdPre, but after a quickfix
location.
*RemoteReply*
RemoteReply When a reply from a Vim that functions as
server was received |server2client()|.
server was received |server2client()|. The
pattern is matched against the {serverid}.
<amatch> is equal to the {serverid} from which
the reply was sent, and <afile> is the actual
reply string.
@ -690,10 +701,17 @@ ShellFilterPost After executing a shell command with
Can be used to check for any changed files.
*SourcePre*
SourcePre Before sourcing a Vim script. |:source|
<afile> is the name of the file being sourced.
*SourceCmd*
SourceCmd When sourcing a Vim script. |:source|
<afile> is the name of the file being sourced.
The autocommand must source this file.
|Cmd-event|
*SpellFileMissing*
SpellFileMissing When trying to load a spell checking file and
it can't be found. <amatch> is the language,
'encoding' also matters. See
it can't be found. The pattern is matched
against the language. <amatch> is the
language, 'encoding' also matters. See
|spell-SpellFileMissing|.
*StdinReadPost*
StdinReadPost After reading from the stdin into the buffer,
@ -727,7 +745,8 @@ SwapExists Detected an existing swap file when starting
Note: Do not try to change the buffer, the
results are unpredictable.
*Syntax*
Syntax When the 'syntax' option has been set.
Syntax When the 'syntax' option has been set. The
pattern is matched against the syntax name.
<afile> can be used for the name of the file
where this option was set, and <amatch> for
the new value of 'syntax'.
@ -1219,8 +1238,8 @@ highlighting when starting Vim.
*Cmd-event*
When using one of the "*Cmd" events, the matching autocommands are expected to
do the file reading or writing. This can be used when working with a special
kind of file, for example on a remote system.
do the file reading, writing or sourcing. This can be used when working with
a special kind of file, for example on a remote system.
CAREFUL: If you use these events in a wrong way, it may have the effect of
making it impossible to read or write the matching files! Make sure you test
your autocommands properly. Best is to use a pattern that will never match a
@ -1233,9 +1252,10 @@ possible with a BufReadCmd, use the |:preserve| command to make sure the
original file isn't needed for recovery. You might want to do this only when
you expect the file to be modified.
The |v:cmdarg| variable holds the "++enc=" and "++ff=" argument that are
effective. These should be used for the command that reads/writes the file.
The |v:cmdbang| variable is one when "!" was used, zero otherwise.
For file read and write commands the |v:cmdarg| variable holds the "++enc="
and "++ff=" argument that are effective. These should be used for the command
that reads/writes the file. The |v:cmdbang| variable is one when "!" was
used, zero otherwise.
See the $VIMRUNTIME/plugin/netrw.vim for examples.

View File

@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0. Last change: 2006 May 05
*change.txt* For Vim version 7.1. Last change: 2007 Jan 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -640,7 +640,7 @@ The flags that you can use for the substitute commands:
[#] Like [p] and prepend the line number.
[l] Like [l] but print the text like |:list|.
[l] Like [p] but print the text like |:list|.
[r] Only useful in combination with ":&" or ":s" without arguments. ":&r"
works the same way as ":~": When the search pattern is empty, use the
@ -670,14 +670,20 @@ pattern from the last substitute or ":global" command. With the [r] flag, the
command uses the pattern from the last substitute, ":global", or search
command.
If the {string} is omitted the substitute is done as if it's empty. Thus the
matched pattern is deleted. The separator after {pattern} can also be left
out then. Example: >
:%s/TESTING
This deletes "TESTING" from all lines, but only one per line.
For compatibility with Vi these two exceptions are allowed:
"\/{string}/" and "\?{string}?" do the same as "//{string}/r".
"\&{string}&" does the same as "//{string}/".
*E146*
Instead of the '/' which surrounds the pattern and replacement string, you
can use any other character, but not an alphanumeric character, '\', '"' or
'|'. This is useful if you want to include a '/' in the search pattern or
replacement string. Example: >
can use any other single-byte character, but not an alphanumeric character,
'\', '"' or '|'. This is useful if you want to include a '/' in the search
pattern or replacement string. Example: >
:s+/+//+
For the definition of a pattern, see |pattern|.
@ -1075,7 +1081,7 @@ and ":put" commands and with CTRL-R. {not in Vi}
{not available when compiled without the |+cmdline_hist|
feature}
6. Expression register "= *quote_=* *quote=*
6. Expression register "= *quote_=* *quote=* *@=*
This is not really a register that stores text, but is a way to use an
expression in commands which use a register. The expression register is
read-only; you cannot put text into it. After the '=', the cursor moves to
@ -1365,7 +1371,7 @@ readability.
letter meaning when present in 'formatoptions' ~
t Auto-wrap text using textwidth (does not apply to comments)
t Auto-wrap text using textwidth
c Auto-wrap comments using textwidth, inserting the current comment
leader automatically.
r Automatically insert the current comment leader after hitting
@ -1565,6 +1571,10 @@ found here: |sort()|.
in their original order, right before the sorted
lines.
If {pattern} is empty (e.g. // is specified), the
last search pattern is used. This allows trying out
a pattern first.
Note that using ":sort" with ":global" doesn't sort the matching lines, it's
quite useless.

View File

@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0. Last change: 2006 Apr 30
*cmdline.txt* For Vim version 7.1. Last change: 2006 Jul 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -301,6 +301,10 @@ CTRL-^ Toggle the use of language |:lmap| mappings and/or Input
for the next command or Search pattern.
{not in Vi}
*c_CTRL-]*
CTRL-] Trigger abbreviation, without inserting a character. {not in
Vi}
For Emacs-style editing on the command-line see |emacs-keys|.
The <Up> and <Down> keys take the current command-line as a search string.

View File

@ -1,4 +1,4 @@
*debug.txt* For Vim version 7.0. Last change: 2006 May 01
*debug.txt* For Vim version 7.1. Last change: 2006 May 01
VIM REFERENCE MANUAL by Bram Moolenaar

View File

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

View File

@ -1,4 +1,4 @@
*develop.txt* For Vim version 7.0. Last change: 2006 Mar 09
*develop.txt* For Vim version 7.1. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -187,7 +187,7 @@ strcpy() STRCPY() Includes cast to (char *), for char_u * args
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
iswhite() vim_iswhite() Only TRUE for tab and space
memcpy() mch_memmove() Handles overlapped copies
bcopy() mch_memmove() Handles overlapped copies
memset() vim_memset() Uniform for all systems
@ -224,7 +224,7 @@ __.* POSIX, system
_[A-Z].* POSIX, system
E[A-Z0-9]* POSIX, errno.h
*_t POSIX, for typedefs. Use *_T instead.
.*_t POSIX, for typedefs. Use .*_T instead.
wait don't use as argument to a function, conflicts with types.h
index shadows global declaration
@ -437,7 +437,7 @@ the best method is. Alternatives:
seconds for English, which can be acceptable for interactive use. But for
some languages it takes more than ten seconds (e.g., German, Catalan),
which is unacceptable slow. For batch processing (automatic corrections)
it's to slow for all languages.
it's too slow for all languages.
2. Use a trie for the soundfolded words, so that searching can be done just
like how it works without soundfolding. This requires remembering a list
of good words for each soundfolded word. This makes finding matches very
@ -471,7 +471,7 @@ initialized from words listed in COMMON items in the affix file, so that it
also works when starting a new file.
This isn't ideal, because the longer Vim is running the higher the counts
become. But in practice it is a noticable improvement over not using the word
become. But in practice it is a noticeable improvement over not using the word
count.
==============================================================================

View File

@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0. Last change: 2006 Apr 14
*diff.txt* For Vim version 7.1. Last change: 2006 Oct 02
VIM REFERENCE MANUAL by Bram Moolenaar
@ -155,13 +155,16 @@ All the buffers edited in a window where the 'diff' option is set will join in
the diff. This is also possible for hidden buffers. They must have been
edited in a window first for this to be possible.
*:DiffOrig* *diff-original-file*
Since 'diff' is a window-local option, it's possible to view the same buffer
in diff mode in one window and "normal" in another window. It is also
possible to view the changes you have made to a buffer, but since Vim doesn't
allow having two buffers for the same file, you need to make a copy of the
original file and diff with that. For example: >
:!cp % tempfile
:diffsplit tempfile
possible to view the changes you have made to a buffer since the file was
loaded. Since Vim doesn't allow having two buffers for the same file, you
need another buffer. This command is useful: >
command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis
\ | wincmd p | diffthis
(this is in |vimrc_example.vim|). Use ":DiffOrig" to see the differences
between the current buffer and the file it was loaded from.
A buffer that is unloaded cannot be used for the diff. But it does work for
hidden buffers. You can use ":hide" to close a window without unloading the
@ -239,7 +242,7 @@ that the buffers will be equal within the specified range.
mode.
See below for [range].
*:diffpu* *:diffput*
*:diffpu* *:diffput* *E793*
:[range]diffpu[t] [bufspec]
Modify another buffer to undo difference with the current
buffer. Just like ":diffget" but the other buffer is modified

View File

@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.0. Last change: 2006 Apr 25
*digraph.txt* For Vim version 7.1. Last change: 2006 Jul 18
VIM REFERENCE MANUAL by Bram Moolenaar
@ -107,13 +107,12 @@ If you accidentally typed an 'a' that should be an 'e', you will type 'a' <BS>
this, you will have to type <BS> e again. To avoid this don't set the
'digraph' option and use CTRL-K to enter digraphs.
You may have problems using Vim with characters which have an ASCII value
above 128. For example: You insert ue (u-umlaut) and the editor echoes \334
in Insert mode. After leaving the Insert mode everything is fine. Note that
fmt removes all characters with ASCII codes above 128 from the text being
formatted. On some Unix systems this means you have to define the
environment-variable LC_CTYPE. If you are using csh, then put the following
line in your .cshrc: >
You may have problems using Vim with characters which have a value above 128.
For example: You insert ue (u-umlaut) and the editor echoes \334 in Insert
mode. After leaving the Insert mode everything is fine. Note that fmt
removes all characters with a value above 128 from the text being formatted.
On some Unix systems this means you have to define the environment-variable
LC_CTYPE. If you are using csh, then put the following line in your .cshrc: >
setenv LC_CTYPE iso_8859_1
==============================================================================

View File

@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0. Last change: 2006 Apr 30
*editing.txt* For Vim version 7.1. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -372,7 +372,7 @@ Example: The command ":e Long File Name " will edit the file "Long File
Name". When using a command that accepts more than one file name (like ":next
file1 file2") embedded spaces must be escaped with a backslash.
*wildcard*
*wildcard* *wildcards*
Wildcards in {file} are expanded. Which wildcards are supported depends on
the system. These are the common ones:
? matches one character
@ -749,7 +749,7 @@ Thus you can use the command "vim *.c" to edit all the C files. From within
Vim the command ":n *.c" does the same.
White space is used to separate file names. Put a backslash before a space or
Tab to include it in a file name. E.g., to edit the single file "foo bar": >
tab to include it in a file name. E.g., to edit the single file "foo bar": >
:next foo\ bar
On Unix and a few other systems you can also use backticks, for example: >
@ -849,7 +849,7 @@ Note: When the 'write' option is off, you are not able to write any file.
*:w* *:write*
*E502* *E503* *E504* *E505*
*E512* *E514* *E667*
*E512* *E514* *E667* *E796*
:w[rite] Write the whole buffer to the current file. This is
the normal way to save changes to a file. It fails
when the 'readonly' option is set or when there is
@ -1150,8 +1150,8 @@ If you want to always use ":confirm", set the 'confirm' option.
*:browse* *:bro* *E338* *E614* *E615* *E616* *E578*
:bro[wse] {command} Open a file selection dialog for an argument to
{command}. At present this works for |:e|, |:w|,
|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc| and
|:mksession|.
|:r|, |:saveas|, |:sp|, |:mkexrc|, |:mkvimrc|,
|:mksession|, |:split|, |:vsplit|, and |:tabe|.
{only in Win32, Athena, Motif, GTK and Mac GUI}
When ":browse" is not possible you get an error
message. If the |+browse| feature is missing or the
@ -1469,7 +1469,9 @@ problem goes away the next day.
{not available when compiled without the |+path_extra| feature}
The file searching is currently used for the 'path', 'cdpath' and 'tags'
options. There are three different types of searching:
options, for |finddir()| and |findfile()|.
There are three different types of searching:
1) Downward search: *starstar*
Downward search uses the wildcards '*', '**' and possibly others

View File

@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.0. Last change: 2006 Nov 01
*eval.txt* For Vim version 7.1. Last change: 2007 Sep 25
VIM REFERENCE MANUAL by Bram Moolenaar
@ -192,7 +192,7 @@ separated by a colon in square brackets: >
:let shortlist = mylist[2:-1] " get List [3, "four"]
Omitting the first index is similar to zero. Omitting the last index is
similar to -1.
similar to -1. >
:let endlist = mylist[2:] " from item 2 to the end: [3, "four"]
:let shortlist = mylist[2:2] " List with one item: [3]
:let otherlist = mylist[:] " make a copy of the List
@ -444,8 +444,8 @@ To loop over the values use the |values()| function: >
If you want both the key and the value use the |items()| function. It returns
a List in which each item is a List with two items, the key and the value: >
:for entry in items(mydict)
: echo entry[0] . ': ' . entry[1]
:for [key, value] in items(mydict)
: echo key . ': ' . value
:endfor
@ -486,7 +486,7 @@ expect ":echo adict" to show the items from bdict after the older entries in
adict.
Weeding out entries from a Dictionary can be done with |filter()|: >
:call filter(dict 'v:val =~ "x"')
:call filter(dict, 'v:val =~ "x"')
This removes all entries from "dict" with a value not matching 'x'.
@ -650,6 +650,9 @@ To keep this readable, using |line-continuation| is suggested: >
:\ ? "last"
:\ : lnum
You should always put a space before the ':', otherwise it can be mistaken for
use in a variable such as "a:1".
expr2 and expr3 *expr2* *expr3*
---------------
@ -750,10 +753,12 @@ results in the mathematical difference (comparing byte values), not
necessarily the alphabetical difference in the local language.
When using the operators with a trailing '#", or the short version and
'ignorecase' is off, the comparing is done with strcmp().
'ignorecase' is off, the comparing is done with strcmp(): case matters.
When using the operators with a trailing '?', or the short version and
'ignorecase' is set, the comparing is done with stricmp().
'ignorecase' is set, the comparing is done with stricmp(): case is ignored.
'smartcase' is not used.
The "=~" and "!~" operators match the lefthand argument with the righthand
argument, which is used as a pattern. See |pattern| for what a pattern is.
@ -932,6 +937,10 @@ A string constant accepts these special characters:
\" double quote
\<xxx> Special key named "xxx". e.g. "\<C-W>" for CTRL-W.
Note that "\xff" is stored as the byte 255, which may be invalid in some
encodings. Use "\u00ff" to store character 255 according to the current value
of 'encoding'.
Note that "\000" and "\x00" force the end of the string.
@ -965,7 +974,7 @@ and there is no buffer-local or window-local value, the global value is used
anyway.
register *expr-register*
register *expr-register* *@r*
--------
@r contents of register 'r'
@ -1079,7 +1088,10 @@ place if you like.
*local-variable* *l:var*
Inside functions local variables are accessed without prepending anything.
But you can also prepend "l:" if you like.
But you can also prepend "l:" if you like. However, without prepending "l:"
you may run into reserved variable names. For example "count". By itself it
refers to "v:count". Using "l:count" you can have a local variable with the
same name.
*script-variable* *s:var*
In a Vim script variables starting with "s:" can be used. They cannot be
@ -1097,8 +1109,8 @@ Thus not in:
- mappings
- etc.
script variables can be used to avoid conflicts with global variable names.
Take this example:
Script variables can be used to avoid conflicts with global variable names.
Take this example: >
let s:counter = 0
function MyCounter()
@ -1545,6 +1557,7 @@ call( {func}, {arglist} [, {dict}])
changenr() Number current change number
char2nr( {expr}) Number ASCII value of first char in {expr}
cindent( {lnum}) Number C indent for line {lnum}
clearmatches() None clear all matches
col( {expr}) Number column nr of cursor or mark
complete({startcol}, {matches}) String set Insert mode completion
complete_add( {expr}) Number add completion match
@ -1590,7 +1603,7 @@ foldtext( ) String line displayed for closed fold
foldtextresult( {lnum}) String text for closed fold at {lnum}
foreground( ) Number bring the Vim window to the foreground
function( {name}) Funcref reference to function {name}
garbagecollect() none free memory, breaking cyclic references
garbagecollect( [at_exit]) none free memory, breaking cyclic references
get( {list}, {idx} [, {def}]) any get item {idx} from {list} or {def}
get( {dict}, {key} [, {def}]) any get item {key} from {dict} or {def}
getbufline( {expr}, {lnum} [, {end}])
@ -1610,6 +1623,7 @@ getftype( {fname}) String description of type of file {fname}
getline( {lnum}) String line {lnum} of current buffer
getline( {lnum}, {end}) List lines {lnum} to {end} of current buffer
getloclist({nr}) List list of location list items
getmatches() List list of current matches
getpos( {expr}) List position of cursor, mark, etc.
getqflist() List list of quickfix items
getreg( [{regname} [, 1]]) String contents of register
@ -1623,6 +1637,7 @@ glob( {expr}) String expand file wildcards in {expr}
globpath( {path}, {expr}) String do glob({expr}) for all dirs in {path}
has( {feature}) Number TRUE if feature {feature} supported
has_key( {dict}, {key}) Number TRUE if {dict} has entry {key}
haslocaldir() Number TRUE if current window executed |:lcd|
hasmapto( {what} [, {mode} [, {abbr}]])
Number TRUE if mapping to {what} exists
histadd( {history},{item}) String add an item to a history
@ -1663,7 +1678,10 @@ mapcheck( {name}[, {mode} [, {abbr}]])
String check for mappings matching {name}
match( {expr}, {pat}[, {start}[, {count}]])
Number position where {pat} matches in {expr}
matchadd( {group}, {pattern}[, {priority}[, {id}]])
Number highlight {pattern} with {group}
matcharg( {nr}) List arguments of |:match|
matchdelete( {id}) Number delete match identified by {id}
matchend( {expr}, {pat}[, {start}[, {count}]])
Number position where {pat} ends in {expr}
matchlist( {expr}, {pat}[, {start}[, {count}]])
@ -1671,7 +1689,7 @@ matchlist( {expr}, {pat}[, {start}[, {count}]])
matchstr( {expr}, {pat}[, {start}[, {count}]])
String {count}'th match of {pat} in {expr}
max({list}) Number maximum value of items in {list}
min({list}) Number minumum value of items in {list}
min({list}) Number minimum value of items in {list}
mkdir({name} [, {path} [, {prot}]])
Number create directory {name}
mode() String current editing mode
@ -1718,6 +1736,7 @@ setcmdpos( {pos}) Number set cursor position in command-line
setline( {lnum}, {line}) Number set line {lnum} to {line}
setloclist( {nr}, {list}[, {action}])
Number modify location list using {list}
setmatches( {list}) Number restore a list of matches
setpos( {expr}, {list}) none set the {expr} position to {list}
setqflist( {list}[, {action}]) Number modify quickfix list using {list}
setreg( {n}, {v}[, {opt}]) Number set register to value and type
@ -1888,7 +1907,9 @@ bufname({expr}) *bufname()*
"" or "%" can be used for the current buffer, "#" for the
alternate buffer.
A full match is preferred, otherwise a match at the start, end
or middle of the buffer name is accepted.
or middle of the buffer name is accepted. If you only want a
full match then put "^" at the start and "$" at the end of the
pattern.
Listed buffers are found first. If there is a single match
with a listed buffer, that one is returned. Next unlisted
buffers are searched for.
@ -1933,6 +1954,7 @@ bufwinnr({expr}) *bufwinnr()*
< The number can be used with |CTRL-W_w| and ":wincmd w"
|:wincmd|.
Only deals with the current tab page.
byte2line({byte}) *byte2line()*
@ -1983,8 +2005,8 @@ char2nr({expr}) *char2nr()*
char2nr(" ") returns 32
char2nr("ABC") returns 65
< The current 'encoding' is used. Example for "utf-8": >
char2nr("?") returns 225
char2nr("?"[0]) returns 195
char2nr("<EFBFBD>") returns 225
char2nr("<EFBFBD>"[0]) returns 195
< nr2char() does the opposite.
cindent({lnum}) *cindent()*
@ -1996,6 +2018,10 @@ cindent({lnum}) *cindent()*
feature, -1 is returned.
See |C-indenting|.
clearmatches() *clearmatches()*
Clears all matches previously defined by |matchadd()| and the
|:match| commands.
*col()*
col({expr}) The result is a Number, which is the byte index of the column
position given with {expr}. The accepted positions are:
@ -2004,7 +2030,11 @@ col({expr}) The result is a Number, which is the byte index of the column
number of characters in the cursor line plus one)
'x position of mark x (if the mark is not set, 0 is
returned)
To get the line number use |col()|. To get both use
Additionally {expr} can be [lnum, col]: a |List| with the line
and column number. Most useful when the column is "$", to get
the las column of a specific line. When "lnum" or "col" is
out of range then col() returns zero.
To get the line number use |line()|. To get both use
|getpos()|.
For the screen column position use |virtcol()|.
Note that only marks in the current file can be used.
@ -2014,6 +2044,8 @@ col({expr}) The result is a Number, which is the byte index of the column
col("'t") column of mark t
col("'" . markname) column of mark markname
< The first column is 1. 0 is returned for an error.
For an uppercase mark the column may actually be in another
buffer.
For the cursor position, when 'virtualedit' is active, the
column is one higher if the cursor is after the end of the
line. This can be used to obtain the column in Insert mode: >
@ -2026,8 +2058,8 @@ col({expr}) The result is a Number, which is the byte index of the column
complete({startcol}, {matches}) *complete()* *E785*
Set the matches for Insert mode completion.
Can only be used in Insert mode. You need to use a mapping
with an expression argument |:map-<expr>| or CTRL-R =
|i_CTRL-R|. It does not work after CTRL-O.
with CTRL-R = |i_CTRL-R|. It does not work after CTRL-O or
with an expression mapping.
{startcol} is the byte offset in the line where the completed
text start. The text up to the cursor is the original text
that will be replaced by the matches. Use col('.') for an
@ -2041,7 +2073,7 @@ complete({startcol}, {matches}) *complete()* *E785*
Insert mode completion. The popup menu will appear if
specified, see |ins-completion-menu|.
Example: >
inoremap <expr> <F5> ListMonths()
inoremap <F5> <C-R>=ListMonths()<CR>
func! ListMonths()
call complete(col('.'), ['January', 'February', 'March',
@ -2178,8 +2210,8 @@ cscope_connection([{num} , {dbpath} [, {prepend}]])
<
cursor({lnum}, {col} [, {off}]) *cursor()*
cursor({list})
Positions the cursor at the column {col} in the line {lnum}.
The first column is one.
Positions the cursor at the column (byte count) {col} in the
line {lnum}. The first column is one.
When there is one argument {list} this is used as a |List|
with two or three items {lnum}, {col} and {off}. This is like
the return value of |getpos()|, but without the first item.
@ -2193,7 +2225,7 @@ cursor({list})
If {col} is zero, the cursor will stay in the current column.
When 'virtualedit' is used {off} specifies the offset in
screen columns from the start of the character. E.g., a
position within a Tab or after the last character.
position within a <Tab> or after the last character.
deepcopy({expr}[, {noref}]) *deepcopy()* *E698*
@ -2486,14 +2518,14 @@ extend({expr1}, {expr2} [, {expr3}]) *extend()*
feedkeys({string} [, {mode}]) *feedkeys()*
Characters in {string} are queued for processing as if they
come from a mapping or were typed by user. They are added to
the end of the typeahead buffer, thus if a mapping is still
come from a mapping or were typed by the user. They are added
to the end of the typeahead buffer, thus if a mapping is still
being executed these characters come after them.
The function does not wait for processing of keys contained in
{string}.
To include special keys into {string}, use double-quotes
and "\..." notation |expr-quote|. For example,
feedkeys("\<CR>") simulates pressing of the Enter key. But
feedkeys("\<CR>") simulates pressing of the <Enter> key. But
feedkeys('\<CR>') pushes 5 characters.
If {mode} is absent, keys are remapped.
{mode} is a String, which can contain these character flags:
@ -2509,10 +2541,19 @@ filereadable({file}) *filereadable()*
name {file} exists, and can be read. If {file} doesn't exist,
or is a directory, the result is FALSE. {file} is any
expression, which is used as a String.
If you don't care about the file being readable you can use
|glob()|.
*file_readable()*
Obsolete name: file_readable().
filewritable({file}) *filewritable()*
The result is a Number, which is 1 when a file with the
name {file} exists, and can be written. If {file} doesn't
exist, or is not writable, the result is 0. If (file) is a
directory, and we can write to it, the result is 2.
filter({expr}, {string}) *filter()*
{expr} must be a |List| or a |Dictionary|.
For each item in {expr} evaluate {string} and when the result
@ -2541,10 +2582,12 @@ filter({expr}, {string}) *filter()*
finddir({name}[, {path}[, {count}]]) *finddir()*
Find directory {name} in {path}. Returns the path of the
first found match. When the found directory is below the
current directory a relative path is returned. Otherwise a
full path is returned.
Find directory {name} in {path}. Supports both downwards and
upwards recursive directory searches. See |file-searching|
for the syntax of {path}.
Returns the path of the first found match. When the found
directory is below the current directory a relative path is
returned. Otherwise a full path is returned.
If {path} is omitted or empty then 'path' is used.
If the optional {count} is given, find {count}'s occurrence of
{name} in {path} instead of the first one.
@ -2557,14 +2600,8 @@ findfile({name}[, {path}[, {count}]]) *findfile()*
Uses 'suffixesadd'.
Example: >
:echo findfile("tags.vim", ".;")
< Searches from the current directory upwards until it finds
the file "tags.vim".
filewritable({file}) *filewritable()*
The result is a Number, which is 1 when a file with the
name {file} exists, and can be written. If {file} doesn't
exist, or is not writable, the result is 0. If (file) is a
directory, and we can write to it, the result is 2.
< Searches from the directory of the current file upwards until
it finds the file "tags.vim".
fnamemodify({fname}, {mods}) *fnamemodify()*
Modify file name {fname} according to {mods}. {mods} is a
@ -2636,7 +2673,7 @@ function({name}) *function()* *E700*
{name} can be a user defined function or an internal function.
garbagecollect() *garbagecollect()*
garbagecollect([at_exit]) *garbagecollect()*
Cleanup unused |Lists| and |Dictionaries| that have circular
references. There is hardly ever a need to invoke this
function, as it is automatically done when Vim runs out of
@ -2646,6 +2683,9 @@ garbagecollect() *garbagecollect()*
This is useful if you have deleted a very big |List| and/or
|Dictionary| with circular references in a script that runs
for a long time.
When the optional "at_exit" argument is one, garbage
collection will also be done when exiting Vim, if it wasn't
done before. This is useful when checking for memory leaks.
get({list}, {idx} [, {default}]) *get()*
Get item {idx} from |List| {list}. When this item is not
@ -2801,6 +2841,8 @@ getfsize({fname}) *getfsize()*
given file {fname}.
If {fname} is a directory, 0 is returned.
If the file {fname} can't be found, -1 is returned.
If the size of {fname} is too big to fit in a Number then -2
is returned.
getfontname([{name}]) *getfontname()*
Without an argument returns the name of the normal font being
@ -2880,6 +2922,8 @@ getline({lnum} [, {end}])
:let end = search("^$") - 1
:let lines = getline(start, end)
< To get lines from another buffer see |getbufline()|
getloclist({nr}) *getloclist()*
Returns a list with all the entries in the location list for
window {nr}. When {nr} is zero the current window is used.
@ -2887,6 +2931,28 @@ getloclist({nr}) *getloclist()*
returned. For an invalid window number {nr}, an empty list is
returned. Otherwise, same as getqflist().
getmatches() *getmatches()*
Returns a |List| with all matches previously defined by
|matchadd()| and the |:match| commands. |getmatches()| is
useful in combination with |setmatches()|, as |setmatches()|
can restore a list of matches saved by |getmatches()|.
Example: >
:echo getmatches()
< [{'group': 'MyGroup1', 'pattern': 'TODO',
'priority': 10, 'id': 1}, {'group': 'MyGroup2',
'pattern': 'FIXME', 'priority': 10, 'id': 2}] >
:let m = getmatches()
:call clearmatches()
:echo getmatches()
< [] >
:call setmatches(m)
:echo getmatches()
< [{'group': 'MyGroup1', 'pattern': 'TODO',
'priority': 10, 'id': 1}, {'group': 'MyGroup2',
'pattern': 'FIXME', 'priority': 10, 'id': 2}] >
:unlet m
<
getqflist() *getqflist()*
Returns a list with all the current quickfix errors. Each
list item is a dictionary with these entries:
@ -2897,12 +2963,14 @@ getqflist() *getqflist()*
vcol non-zero: "col" is visual column
zero: "col" is byte index
nr error number
pattern search pattern used to locate the error
text description of the error
type type of the error, 'E', '1', etc.
valid non-zero: recognized error message
When there is no error list or it's empty an empty list is
returned.
returned. Quickfix list entries with non-existing buffer
number are returned with "bufnr" set to zero.
Useful application: Find pattern matches in multiple files and
do something with them: >
@ -2935,19 +3003,23 @@ getregtype([{regname}]) *getregtype()*
If {regname} is not specified, |v:register| is used.
gettabwinvar({tabnr}, {winnr}, {varname}) *gettabwinvar()*
Get the value of an option or local window variable {varname}
in window {winnr} in tab page {tabnr}.
Get the value of window-local variable {varname} in window
{winnr} in tab page {tabnr}.
When {varname} starts with "&" get the value of a window-local
option.
Tabs are numbered starting with one. For the current tabpage
use |getwinvar()|.
When {winnr} is zero the current window is used.
This also works for a global option, buffer-local option and
window-local option, but it doesn't work for a global variable
or buffer-local variable.
Note that the name without "w:" must be used.
When {varname} is empty a dictionary with all window-local
variables is returned.
Note that {varname} must be the name without "w:".
Examples: >
:let list_is_on = gettabwinvar(1, 2, '&list')
:echo "myvar = " . gettabwinvar(3, 1, 'myvar')
<
*getwinposx()*
getwinposx() The result is a Number, which is the X coordinate in pixels of
the left hand side of the GUI Vim window. The result will be
@ -2965,7 +3037,9 @@ getwinvar({winnr}, {varname}) *getwinvar()*
:echo "myvar = " . getwinvar(1, 'myvar')
<
*glob()*
glob({expr}) Expand the file wildcards in {expr}. The result is a String.
glob({expr}) Expand the file wildcards in {expr}. See |wildcards| for the
use of special characters.
The result is a String.
When there are several matches, they are separated by <NL>
characters.
If the expansion fails, the result is an empty string.
@ -3012,6 +3086,9 @@ has_key({dict}, {key}) *has_key()*
The result is a Number, which is 1 if |Dictionary| {dict} has
an entry with key {key}. Zero otherwise.
haslocaldir() *haslocaldir()*
The result is a Number, which is 1 when the current
window has set a local path via |:lcd|, and 0 otherwise.
hasmapto({what} [, {mode} [, {abbr}]]) *hasmapto()*
The result is a Number, which is 1 if there is a mapping that
@ -3246,7 +3323,8 @@ inputlist({textlist}) *inputlist()*
is returned.
Make sure {textlist} has less then 'lines' entries, otherwise
it won't work. It's a good idea to put the entry number at
the start of the string. Example: >
the start of the string. And put a prompt in the first item.
Example: >
let color = inputlist(['Select color:', '1. red',
\ '2. green', '3. blue'])
@ -3406,7 +3484,8 @@ line({expr}) The result is a Number, which is the line number of the file
returned)
w0 first line visible in current window
w$ last line visible in current window
Note that a mark in another file can be used.
Note that a mark in another file can be used. The line number
then applies to another buffer.
To get the column number use |col()|. To get both use
|getpos()|.
Examples: >
@ -3578,6 +3657,44 @@ match({expr}, {pat}[, {start}[, {count}]]) *match()*
the pattern. 'smartcase' is NOT used. The matching is always
done like 'magic' is set and 'cpoptions' is empty.
*matchadd()* *E798* *E799* *E801*
matchadd({group}, {pattern}[, {priority}[, {id}]])
Defines a pattern to be highlighted in the current window (a
"match"). It will be highlighted with {group}. Returns an
identification number (ID), which can be used to delete the
match using |matchdelete()|.
The optional {priority} argument assigns a priority to the
match. A match with a high priority will have its
highlighting overrule that of a match with a lower priority.
A priority is specified as an integer (negative numbers are no
exception). If the {priority} argument is not specified, the
default priority is 10. The priority of 'hlsearch' is zero,
hence all matches with a priority greater than zero will
overrule it. Syntax highlighting (see 'syntax') is a separate
mechanism, and regardless of the chosen priority a match will
always overrule syntax highlighting.
The optional {id} argument allows the request for a specific
match ID. If a specified ID is already taken, an error
message will appear and the match will not be added. An ID
is specified as a positive integer (zero excluded). IDs 1, 2
and 3 are reserved for |:match|, |:2match| and |:3match|,
respectively. If the {id} argument is not specified,
|matchadd()| automatically chooses a free ID.
The number of matches is not limited, as it is the case with
the |:match| commands.
Example: >
:highlight MyGroup ctermbg=green guibg=green
:let m = matchadd("MyGroup", "TODO")
< Deletion of the pattern: >
:call matchdelete(m)
< A list of matches defined by |matchadd()| and |:match| are
available from |getmatches()|. All matches can be deleted in
one operation by |clearmatches()|.
matcharg({nr}) *matcharg()*
Selects the {nr} match item, as set with a |:match|,
@ -3587,8 +3704,15 @@ matcharg({nr}) *matcharg()*
The pattern used.
When {nr} is not 1, 2 or 3 returns an empty |List|.
When there is no match item set returns ['', ''].
This is usef to save and restore a |:match|.
This is useful to save and restore a |:match|.
Highlighting matches using the |:match| commands are limited
to three matches. |matchadd()| does not have this limitation.
matchdelete({id}) *matchdelete()* *E802* *E803*
Deletes a match with ID {id} previously defined by |matchadd()|
or one of the |:match| commands. Returns 0 if succesfull,
otherwise -1. See example for |matchadd()|. All matches can
be deleted in one operation by |clearmatches()|.
matchend({expr}, {pat}[, {start}[, {count}]]) *matchend()*
Same as match(), but return the index of first character after
@ -3639,7 +3763,7 @@ max({list}) Return the maximum value of all items in {list}.
An empty |List| results in zero.
*min()*
min({list}) Return the minumum value of all items in {list}.
min({list}) Return the minimum value of all items in {list}.
If {list} is not a list or one of the items in {list} cannot
be used as a Number this results in an error.
An empty |List| results in zero.
@ -3704,7 +3828,7 @@ getpos({expr}) Get the position for {expr}. For possible values of {expr}
column is 1.
The "off" number is zero, unless 'virtualedit' is used. Then
it is the offset in screen columns from the start of the
character. E.g., a position within a Tab or after the last
character. E.g., a position within a <Tab> or after the last
character.
This can be used to save and restore the cursor position: >
let save_cursor = getpos(".")
@ -3934,7 +4058,10 @@ reltimestr({time}) *reltimestr()*
echo reltimestr(reltime(start))
< Note that overhead for the commands will be added to the time.
The accuracy depends on the system.
Also see |profiling|.
Leading spaces are used to make the string align nicely. You
can use split() to remove it. >
echo split(reltimestr(reltime(start)))[0]
< Also see |profiling|.
{only available when compiled with the +reltime feature}
*remote_expr()* *E449*
@ -4090,6 +4217,8 @@ search({pattern} [, {flags} [, {stopline}]]) *search()*
cursor is moved. The 's' flag cannot be combined with the 'n'
flag.
'ignorecase', 'smartcase' and 'magic' are used.
When the {stopline} argument is given then the search stops
after searching this line. This is useful to restrict the
search to a range of lines. Examples: >
@ -4336,7 +4465,13 @@ setloclist({nr}, {list} [, {action}]) *setloclist()*
When {nr} is zero the current window is used. For a location
list window, the displayed location list is modified. For an
invalid window number {nr}, -1 is returned.
Otherwise, same as setqflist().
Otherwise, same as |setqflist()|.
Also see |location-list|.
setmatches({list}) *setmatches()*
Restores a list of matches saved by |getmatches()|. Returns 0
if succesfull, otherwise -1. All current matches are cleared
before the list is restored. See example for |getmatches()|.
*setpos()*
setpos({expr}, {list})
@ -4359,11 +4494,14 @@ setpos({expr}, {list})
The "off" number is only used when 'virtualedit' is set. Then
it is the offset in screen columns from the start of the
character. E.g., a position within a Tab or after the last
character. E.g., a position within a <Tab> or after the last
character.
Also see |getpos()|
This does not restore the preferred column for moving
vertically. See |winrestview()| for that.
setqflist({list} [, {action}]) *setqflist()*
Create or replace or add to the quickfix list using the items
@ -4371,7 +4509,10 @@ setqflist({list} [, {action}]) *setqflist()*
Non-dictionary items in {list} are ignored. Each dictionary
item can contain the following entries:
filename name of a file
bufnr buffer number; must be the number of a valid
buffer
filename name of a file; only used when "bufnr" is not
present or it is invalid.
lnum line number in the file
pattern search pattern used to locate the error
col column number
@ -4384,11 +4525,13 @@ setqflist({list} [, {action}]) *setqflist()*
The "col", "vcol", "nr", "type" and "text" entries are
optional. Either "lnum" or "pattern" entry can be used to
locate a matching error line.
If the "filename" entry is not present or neither the "lnum"
or "pattern" entries are present, then the item will not be
handled as an error line.
If the "filename" and "bufnr" entries are not present or
neither the "lnum" or "pattern" entries are present, then the
item will not be handled as an error line.
If both "pattern" and "lnum" are present then "pattern" will
be used.
Note that the list is not exactly the same as what
|getqflist()| returns.
If {action} is set to 'a', then the items from {list} are
added to the existing quickfix list. If there is no existing
@ -4416,7 +4559,7 @@ setreg({regname}, {value} [,{options}])
If a number immediately follows "b" or "<CTRL-V>" then this is
used as the width of the selection - if it is not specified
then the width of the block is set to the number of characters
in the longest line (counting a <TAB> as 1 character).
in the longest line (counting a <Tab> as 1 character).
If {options} contains no register settings, then the default
is to use character mode unless {value} ends in a <NL>.
@ -4653,6 +4796,7 @@ string({expr}) Return {expr} converted to a String. If {expr} is a Number,
List [item, item]
Dictionary {key: value, key: value}
Note that in String values the ' character is doubled.
Also see |strtrans()|.
*strlen()*
strlen({expr}) The result is a Number, which is the length of the String
@ -4722,7 +4866,7 @@ substitute({expr}, {pat}, {sub}, {flags}) *substitute()*
like the ":substitute" command (without any flags). But the
matching with {pat} is always done like the 'magic' option is
set and 'cpoptions' is empty (to make scripts portable).
'ignorecase' is still relevant.
'ignorecase' is still relevant. 'smartcase' is not used.
See |string-match| for how {pat} is used.
And a "~" in {sub} is not replaced with the previous {sub}.
Note that some codes in {sub} have a special meaning
@ -4875,22 +5019,23 @@ taglist({expr}) *taglist()*
entries:
name Name of the tag.
filename Name of the file where the tag is
defined.
defined. It is either relative to the
current directory or a full path.
cmd Ex command used to locate the tag in
the file.
kind Type of the tag. The value for this
entry depends on the language specific
kind values generated by the ctags
tool.
kind values. Only available when
using a tags file generated by
Exuberant ctags or hdrtag.
static A file specific tag. Refer to
|static-tag| for more information.
The "kind" entry is only available when using Exuberant ctags
generated tags file. More entries may be present, depending
on the content of the tags file: access, implementation,
inherits and signature. Refer to the ctags documentation for
information about these fields. For C code the fields
"struct", "class" and "enum" may appear, they give the name of
the entity the tag is contained in.
More entries may be present, depending on the content of the
tags file: access, implementation, inherits and signature.
Refer to the ctags documentation for information about these
fields. For C code the fields "struct", "class" and "enum"
may appear, they give the name of the entity the tag is
contained in.
The ex-command 'cmd' can be either an ex search pattern, a
line number or a line number followed by a byte number.
@ -4969,14 +5114,12 @@ virtcol({expr}) *virtcol()*
position, the returned Number will be the column at the end of
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
set to 8, it returns 8.
For the use of {expr} see |col()|. Additionally you can use
[lnum, col]: a |List| with the line and column number. When
"lnum" or "col" is out of range then virtcol() returns zero.
When 'virtualedit' is used it can be [lnum, col, off], where
"off" is the offset in screen columns from the start of the
character. E.g., a position within a Tab or after the last
character.
For the byte position use |col()|.
For the use of {expr} see |col()|.
When 'virtualedit' is used {expr} can be [lnum, col, off], where
"off" is the offset in screen columns from the start of the
character. E.g., a position within a <Tab> or after the last
character.
When Virtual editing is active in the current mode, a position
beyond the end of the line can be returned. |'virtualedit'|
The accepted positions are:
@ -4992,6 +5135,10 @@ virtcol({expr}) *virtcol()*
virtcol("$") with text "foo^Lbar", returns 9
virtcol("'t") with text " there", with 't at 'h', returns 6
< The first column is 1. 0 is returned for an error.
A more advanced example that echoes the maximum length of
all lines: >
echo max(map(range(1, line('$')), "virtcol([v:val, '$'])"))
visualmode([expr]) *visualmode()*
The result is a String, which describes the last Visual mode
@ -5046,9 +5193,11 @@ winnr([{arg}]) The result is a Number, which is the number of the current
last window is returned (the window count).
When the optional argument is "#", the number of the last
accessed window is returned (where |CTRL-W_p| goes to).
If there is no previous window 0 is returned.
If there is no previous window or it is in another tab page 0
is returned.
The number can be used with |CTRL-W_w| and ":wincmd w"
|:wincmd|.
Also see |tabpagewinnr()|.
*winrestcmd()*
winrestcmd() Returns a sequence of |:resize| commands that should restore
@ -5133,6 +5282,8 @@ There are three types of features:
Then the "patch123" feature means that patch 123 has been included for
this version. Example (checking version 6.2.148 or later): >
:if v:version > 602 || v:version == 602 && has("patch148")
< Note that it's possible for patch 147 to be omitted even though 148 is
included.
all_builtin_terms Compiled with all builtin terminals enabled.
amiga Amiga version of Vim.
@ -5434,7 +5585,7 @@ See |:verbose-cmd| for more information.
*function-argument* *a:var*
An argument can be defined by giving its name. In the function this can then
be used as "a:name" ("a:" for argument).
*a:0* *a:1* *a:000* *E740*
*a:0* *a:1* *a:000* *E740* *...*
Up to 20 arguments can be given, separated by commas. After the named
arguments an argument "..." can be specified, which means that more arguments
may optionally be following. In the function the extra arguments can be used
@ -5477,40 +5628,25 @@ This function can then be called with: >
call Table("Table", "line1", "line2")
call Table("Empty Table")
To return more than one value, pass the name of a global variable: >
:function Compute(n1, n2, divname)
To return more than one value, return a |List|: >
:function Compute(n1, n2)
: if a:n2 == 0
: return "fail"
: return ["fail", 0]
: endif
: let g:{a:divname} = a:n1 / a:n2
: return "ok"
: return ["ok", a:n1 / a:n2]
:endfunction
This function can then be called with: >
:let success = Compute(13, 1324, "div")
:let [success, div] = Compute(102, 6)
:if success == "ok"
: echo div
:endif
An alternative is to return a command that can be executed. This also works
with local variables in a calling function. Example: >
:function Foo()
: execute Bar()
: echo "line " . lnum . " column " . col
:endfunction
:function Bar()
: return "let lnum = " . line(".") . " | let col = " . col(".")
:endfunction
The names "lnum" and "col" could also be passed as argument to Bar(), to allow
the caller to set the names.
<
*:cal* *:call* *E107* *E117*
:[range]cal[l] {name}([arguments])
Call a function. The name of the function and its arguments
are as specified with |:function|. Up to 20 arguments can be
used.
used. The returned value is discarded.
Without a range and for functions that accept a range, the
function is called once. When a range is given the cursor is
positioned at the start of the first line before executing the
@ -5541,6 +5677,11 @@ the caller to set the names.
This function inserts the continuation character "\" in front
of all the lines in the range, except the first one.
When the function returns a composite value it can be further
dereferenced, but the range will not be used then. Example: >
:4,8call GetDict().method()
< Here GetDict() gets the range but method() does not.
*E132*
The recursiveness of user functions is restricted with the |'maxfuncdepth'|
option.
@ -5727,7 +5868,7 @@ This would call the function "my_func_whizz(parameter)".
Append {expr1} to register {reg-name}. If the
register was empty it's like setting it to {expr1}.
:let &{option-name} = {expr1} *:let-option* *:let-star*
:let &{option-name} = {expr1} *:let-option* *:let-&*
Set option {option-name} to the result of the
expression {expr1}. A String or Number value is
always converted to the type of the option.
@ -5817,7 +5958,7 @@ This would call the function "my_func_whizz(parameter)".
* Funcref
:unl[et][!] {name} ... *:unlet* *:unl* *E108*
:unl[et][!] {name} ... *:unlet* *:unl* *E108* *E795*
Remove the internal variable {name}. Several variable
names can be given, they are all removed. The name
may also be a |List| or |Dictionary| item.
@ -6087,11 +6228,14 @@ This would call the function "my_func_whizz(parameter)".
Cannot be followed by a comment.
Example: >
:echo "the value of 'shell' is" &shell
< A later redraw may make the message disappear again.
To avoid that a command from before the ":echo" causes
a redraw afterwards (redraws are often postponed until
you type something), force a redraw with the |:redraw|
command. Example: >
< *:echo-redraw*
A later redraw may make the message disappear again.
And since Vim mostly postpones redrawing until it's
finished with a sequence of commands this happens
quite often. To avoid that a command from before the
":echo" causes a redraw afterwards (redraws are often
postponed until you type something), force a redraw
with the |:redraw| command. Example: >
:new | redraw | echo "there is a new window"
<
*:echon*
@ -6131,10 +6275,16 @@ This would call the function "my_func_whizz(parameter)".
Spaces are placed between the arguments as with the
|:echo| command. But unprintable characters are
displayed, not interpreted.
The parsing works slightly different from |:echo|,
more like |:execute|. All the expressions are first
evaluated and concatenated before echoing anything.
The expressions must evaluate to a Number or String, a
Dictionary or List causes an error.
Uses the highlighting set by the |:echohl| command.
Example: >
:echomsg "It's a Zizzer Zazzer Zuzz, as you can plainly see."
<
< See |:echo-redraw| to avoid the message disappearing
when the screen is redrawn.
*:echoe* *:echoerr*
:echoe[rr] {expr1} .. Echo the expression(s) as an error message, saving the
message in the |message-history|. When used in a
@ -7185,106 +7335,51 @@ a "E600: Missing :endtry" error message is given, see |except-single-line|.
==============================================================================
9. Examples *eval-examples*
Printing in Hex ~
Printing in Binary ~
>
:" The function Nr2Hex() returns the Hex string of a number.
:func Nr2Hex(nr)
:" The function Nr2Bin() returns the Hex string of a number.
:func Nr2Bin(nr)
: let n = a:nr
: let r = ""
: while n
: let r = '0123456789ABCDEF'[n % 16] . r
: let n = n / 16
: let r = '01'[n % 2] . r
: let n = n / 2
: endwhile
: return r
:endfunc
:" The function String2Hex() converts each character in a string to a two
:" character Hex string.
:func String2Hex(str)
:" The function String2Bin() converts each character in a string to a
:" binary string, separated with dashes.
:func String2Bin(str)
: let out = ''
: let ix = 0
: while ix < strlen(a:str)
: let out = out . Nr2Hex(char2nr(a:str[ix]))
: let ix = ix + 1
: endwhile
: return out
: for ix in range(strlen(a:str))
: let out = out . '-' . Nr2Bin(char2nr(a:str[ix]))
: endfor
: return out[1:]
:endfunc
Example of its use: >
:echo Nr2Hex(32)
result: "20" >
:echo String2Hex("32")
result: "3332"
:echo Nr2Bin(32)
result: "100000" >
:echo String2Bin("32")
result: "110011-110010"
Sorting lines (by Robert Webb) ~
Sorting lines ~
Here is a Vim script to sort lines. Highlight the lines in Vim and type
":Sort". This doesn't call any external programs so it'll work on any
platform. The function Sort() actually takes the name of a comparison
function as its argument, like qsort() does in C. So you could supply it
with different comparison functions in order to sort according to date etc.
>
:" Function for use with Sort(), to compare two strings.
:func! Strcmp(str1, str2)
: if (a:str1 < a:str2)
: return -1
: elseif (a:str1 > a:str2)
: return 1
: else
: return 0
: endif
This example sorts lines with a specific compare function. >
:func SortBuffer()
: let lines = getline(1, '$')
: call sort(lines, function("Strcmp"))
: call setline(1, lines)
:endfunction
:" Sort lines. SortR() is called recursively.
:func! SortR(start, end, cmp)
: if (a:start >= a:end)
: return
: endif
: let partition = a:start - 1
: let middle = partition
: let partStr = getline((a:start + a:end) / 2)
: let i = a:start
: while (i <= a:end)
: let str = getline(i)
: exec "let result = " . a:cmp . "(str, partStr)"
: if (result <= 0)
: " Need to put it before the partition. Swap lines i and partition.
: let partition = partition + 1
: if (result == 0)
: let middle = partition
: endif
: if (i != partition)
: let str2 = getline(partition)
: call setline(i, str2)
: call setline(partition, str)
: endif
: endif
: let i = i + 1
: endwhile
As a one-liner: >
:call setline(1, sort(getline(1, '$'), function("Strcmp")))
: " Now we have a pointer to the "middle" element, as far as partitioning
: " goes, which could be anywhere before the partition. Make sure it is at
: " the end of the partition.
: if (middle != partition)
: let str = getline(middle)
: let str2 = getline(partition)
: call setline(middle, str2)
: call setline(partition, str)
: endif
: call SortR(a:start, partition - 1, a:cmp)
: call SortR(partition + 1, a:end, a:cmp)
:endfunc
:" To Sort a range of lines, pass the range to Sort() along with the name of a
:" function that will compare two lines.
:func! Sort(cmp) range
: call SortR(a:firstline, a:lastline, a:cmp)
:endfunc
:" :Sort takes a range of lines and sorts them.
:command! -nargs=0 -range Sort <line1>,<line2>call Sort("Strcmp")
<
scanf() replacement ~
*sscanf*
There is no sscanf() function in Vim. If you need to extract parts from a
line, you can use matchstr() and substitute() to do it. This example shows
@ -7302,6 +7397,35 @@ how to get the file name, line number and column number out of a line like
The input is in the variable "line", the results in the variables "file",
"lnum" and "col". (idea from Michael Geddes)
getting the scriptnames in a Dictionary ~
*scriptnames-dictionary*
The |:scriptnames| command can be used to get a list of all script files that
have been sourced. There is no equivalent function or variable for this
(because it's rarely needed). In case you need to manipulate the list this
code can be used: >
" Get the output of ":scriptnames" in the scriptnames_output variable.
let scriptnames_output = ''
redir => scriptnames_output
silent scriptnames
redir END
" Split the output into lines and parse each line. Add an entry to the
" "scripts" dictionary.
let scripts = {}
for line in split(scriptnames_output, "\n")
" Only do non-blank lines.
if line =~ '\S'
" Get the first number in the line.
let nr = matchstr(line, '\d\+')
" Get the file name, remove the script number " 123: ".
let name = substitute(line, '.\+:\s*', '', '')
" Add an item to the Dictionary
let scripts[nr] = name
endif
endfor
unlet scriptnames_output
==============================================================================
10. No +eval feature *no-eval-feature*
@ -7336,6 +7460,7 @@ These items are not allowed in the sandbox:
- changing the buffer text
- defining or changing mapping, autocommands, functions, user commands
- setting certain options (see |option-summary|)
- setting certain v: variables (see |v:var|) *E794*
- executing a shell command
- reading or writing a file
- jumping to another buffer or editing a file

View File

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

View File

@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.0. Last change: 2006 Apr 28
*filetype.txt* For Vim version 7.1. Last change: 2007 May 10
VIM REFERENCE MANUAL by Bram Moolenaar
@ -43,6 +43,8 @@ Detail: The ":filetype on" command will load one of these files:
BufNewFile and BufRead events. If the file type is not found by the
name, the file $VIMRUNTIME/scripts.vim is used to detect it from the
contents of the file.
When the GUI is running or will start soon, the menu.vim script is
also sourced. See |'go-M'| about avoiding that.
To add your own file types, see |new-filetype| below. To search for help on a
filetype prepend "ft-" and optionally append "-syntax", "-indent" or
@ -304,24 +306,28 @@ all loaded. For example, if this command: >
set runtimepath
produces this output: >
produces this output:
runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60
runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60 ~
then Vim will load all plugins in these directories: >
then Vim will load all plugins in these directories and below:
/etc/vim/plugin/
~/.vim/plugin/
/usr/local/share/vim/vim60/plugin/
/etc/vim/plugin/ ~
~/.vim/plugin/ ~
/usr/local/share/vim/vim60/plugin/ ~
Note that the last one is the value of $VIMRUNTIME which has been expanded.
What if it looks like your plugin is not being loaded? You can find out what
happens when Vim starts up by using the |-V| argument: >
vim -V1
vim -V2
You will see a lot of messages, in between them is a remark about loading the
plugins. It starts with: >
Searching for "plugin/*.vim" in
plugins. It starts with:
Searching for "plugin/**/*.vim" in ~
There you can see where Vim looks for your plugin scripts.
==============================================================================
@ -417,7 +423,8 @@ Global mappings:
same as the local <Leader>o described above.
Variables:
g:changelog_timeformat The date (and time) format used in ChangeLog entries.
g:changelog_timeformat Deprecated; use g:changelog_dateformat instead.
g:changelog_dateformat The date (and time) format used in ChangeLog entries.
The format accepted is the same as for the
|strftime()| function.
The default is "%Y-%m-%d" which is the standard format
@ -467,6 +474,14 @@ g:changelog_date_entry_search
|2003-01-14 Full Name <user@host>
< and some similar formats.
g:changelog_date_end_entry_search
The search pattern to use when searching for the end
of a date-entry.
The same tokens that can be used for
g:changelog_new_date_format can be used here as well.
The default is '^\s*$' which finds lines that contain
only whitespace or are completely empty.
The Changelog entries are inserted where they add the least amount of text.
After figuring out the current date and user, the file is searched for an
entry beginning with the current date and user and if found adds another item

View File

@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.0. Last change: 2006 Mar 29
*fold.txt* For Vim version 7.1. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -73,7 +73,7 @@ EXPR *fold-expr*
The folds are automatically defined by their foldlevel, like with the "indent"
method. The value of the 'foldexpr' option is evaluated to get the foldlevel
of a line. Examples:
This will create a fold for all consecutive lines that start with a Tab: >
This will create a fold for all consecutive lines that start with a tab: >
:set foldexpr=getline(v:lnum)[0]==\"\\t\"
This will call a function to compute the fold level: >
:set foldexpr=MyFoldLevel(v:lnum)

View File

@ -1,303 +0,0 @@
*getscript.txt* For Vim version 7.0. Last change: 2006 Apr 30
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.0. Last change: 2006 May 04
*gui.txt* For Vim version 7.1. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -510,7 +510,7 @@ floating menus that do not appear on the main menu bar.
*:ime* *:imenu* *:inoreme* *:inoremenu*
*:cme* *:cmenu* *:cnoreme* *:cnoremenu*
*E330* *E327* *E331* *E336* *E333*
*E328* *E329* *E337*
*E328* *E329* *E337* *E792*
To create a new menu item, use the ":menu" commands. They are mostly like
the ":map" set of commands but the first argument is a menu item name, given
as a path of menus and submenus with a '.' between them, e.g.: >
@ -532,7 +532,7 @@ Special characters in a menu name:
<Tab> Separates the menu name from right-aligned text. This can be
used to show the equivalent typed command. The text "<Tab>"
can be used here for convenience. If you are using a real
Tab, don't forget to put a backslash before it!
tab, don't forget to put a backslash before it!
Example: >
:amenu &File.&Open<Tab>:e :browse e<CR>

View File

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

View File

@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.0. Last change: 2005 Mar 29
*gui_w32.txt* For Vim version 7.1. Last change: 2007 Aug 14
VIM REFERENCE MANUAL by Bram Moolenaar
@ -53,6 +53,16 @@ vimrc or gvimrc file: >
There is a specific version of gvim.exe that runs under the Win32s subsystem
of Windows 3.1 or 3.11. See |win32s|.
Using Vim as a plugin *gui-w32-windowid*
When gvim starts up normally, it creates its own top level window. If you
pass Vim the command-line option |--windowid| with a decimal or hexadecimal
value, Vim will create a window that is a child of the window with the given
ID. This enables Vim to act as a plugin in another application. This really
is a programmer's interface, and is of no use without a supporting application
to spawn Vim correctly.
==============================================================================
2. Vim as default editor *vim-default-editor*
@ -233,7 +243,8 @@ $VIMRUNTIME/mswin.vim script. You could add this line to your _vimrc file: >
Since CTRL-C is used to copy the text to the clipboard, it can't be used to
cancel an operation. Use CTRL-Break for that.
CTRL-Z is used for undo. This means you can't suspend Vim.
CTRL-Z is used for undo. This means you can't suspend Vim with this key, use
|:suspend| instead (if it's supported at all).
*CTRL-V-alternative* *CTRL-Q*
Since CTRL-V is used to paste, you can't use it to start a blockwise Visual
@ -463,6 +474,8 @@ This maps Alt-Space to pop down the system menu for the Vim window. Note that
Maps Control-N to produce the keys Alt-Space followed by N. This minimizes the
Vim window via the system menu.
Note that the key changes depending on the language you are using.
*intellimouse-wheel-problems*
When using the Intellimouse mouse wheel causes Vim to stop accepting input, go
to:

View File

@ -1,4 +1,4 @@
*gui_x11.txt* For Vim version 7.0. Last change: 2006 Apr 30
*gui_x11.txt* For Vim version 7.1. Last change: 2006 Jul 12
VIM REFERENCE MANUAL by Bram Moolenaar
@ -406,8 +406,9 @@ These are the different looks:
- That means the menubar and toolbar handles are back! Yeah! And the
resizing grid still works too.
GNOME is automatically compiled with if it was found by configure.
(FIXME: Is this still true? Use --enable-gnome-check to force it to.)
GNOME is compiled with if it was found by configure and the
--enable-gnome-check argument was used.
GNOME session support *gui-gnome-session* *gnome-session*
@ -436,7 +437,7 @@ command line argument).
==============================================================================
7. KDE version *gui-kde* *kde* *KDE* *KVim*
*gui-x11-kde*
There is no KDE version of Vim. There has been some work on a port using the
Qt toolkit, but it never worked properly and it has been abandoned. Work
continues on Yzis: www.yzis.org.
@ -497,12 +498,6 @@ menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
scrollbars will remain the same, because Vim has its own, which are already
3D (in fact, they look more like Motif).
*gui-x11-kde*
For Vim-KDE, you need at least Qt(>=2.x) and the corresponding kdelibs.
To compile, you must use the --with-qt-dir configure flag because QTDIR is not
automatically detected yet. Giving KDE's directories to the configure script
may also help in some cases.
*gui-x11-neXtaw*
The neXtaw version is mostly like Athena, but uses different widgets.

View File

@ -1,4 +1,4 @@
*hangulin.txt* For Vim version 7.0. Last change: 2006 Apr 02
*hangulin.txt* For Vim version 7.1. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Chi-Deok Hwang and Sung-Hyun Nam

View File

@ -1,4 +1,4 @@
*hebrew.txt* For Vim version 7.0. Last change: 2003 May 11
*hebrew.txt* For Vim version 7.1. 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.0. Last change: 2006 May 07
*help.txt* For Vim version 7.1. Last change: 2006 Nov 07
VIM - main help file
k
@ -143,6 +143,7 @@ Special issues ~
|farsi.txt| Farsi (Persian) editing
|hebrew.txt| Hebrew language support and editing
|russian.txt| Russian language support and editing
|ada.txt| Ada (the programming language) support
|hangulin.txt| Hangul (Korean) input mode
|rileft.txt| right-to-left editing mode
@ -189,11 +190,13 @@ Remarks about specific systems ~
|os_win32.txt| MS-Windows 95/98/NT
*standard-plugin-list*
Standard plugins ~
|pi_gzip.txt| Reading and writing compressed files
|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
|pi_getscript.txt| Downloading latest version of Vim scripts
|pi_gzip.txt| Reading and writing compressed files
|pi_netrw.txt| Reading and writing files over a network
|pi_paren.txt| Highlight matching parens
|pi_tar.txt| Tar file explorer
|pi_vimball.txt| Create a self-installing Vim script
|pi_zip.txt| Zip archive explorer
LOCAL ADDITIONS: *local-additions*

View File

@ -1,4 +1,4 @@
*howto.txt* For Vim version 7.0. Last change: 2006 Apr 02
*howto.txt* For Vim version 7.1. Last change: 2006 Apr 02
VIM REFERENCE MANUAL by Bram Moolenaar

View File

@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 7.0. Last change: 2005 Mar 29
*if_cscop.txt* For Vim version 7.1. Last change: 2005 Mar 29
VIM REFERENCE MANUAL by Andy Kahn

View File

@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0. Last change: 2006 Apr 30
*if_mzsch.txt* For Vim version 7.1. Last change: 2007 May 03
VIM REFERENCE MANUAL by Sergey Khorev
@ -23,6 +23,8 @@ Dynamic loading added by Sergey Khorev
For downloading MzScheme and other info:
http://www.plt-scheme.org/software/mzscheme/
Note: On FreeBSD you should use the "drscheme" port.
==============================================================================
1. Commands *mzscheme-commands*
@ -262,8 +264,9 @@ In a console window type "path" to see what directories are used.
The names of the DLLs must match the MzScheme version Vim was compiled with.
For MzScheme version 209 they will be "libmzsch209_000.dll" and
"libmzgc209_000.dll". To know for sure edit "gvim.exe" and search for
"libmzsch\d\d\d_\d\d\d\.dll\c".
"libmzgc209_000.dll". To know for sure look at the output of the ":version"
command, look for -DDYNAMIC_MZSCH_DLL="something" and
-DDYNAMIC_MZGC_DLL="something" in the "Compilation" info.
======================================================================
vim:tw=78:ts=8:sts=4:ft=help:norl:

View File

@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.0. Last change: 2006 Apr 30
*if_ole.txt* For Vim version 7.1. Last change: 2007 May 10
VIM REFERENCE MANUAL by Paul Moore
@ -40,6 +40,12 @@ instance), code similar to the following should be used:
use Win32::OLE;
$vim = new Win32::OLE 'Vim.Application';
[C#] >
// Add a reference to VIM in your project.
// Choose the COM tab.
// Select "VIM Ole Interface 1.1 Type Library"
Vim.Vim vimobj = new Vim.Vim();
Vim does not support acting as a "hidden" OLE server, like some other OLE
Automation servers. When a client starts up an instance of Vim, that instance
is immediately visible. Simply closing the OLE connection to the Vim instance

View File

@ -1,4 +1,4 @@
*if_perl.txt* For Vim version 7.0. Last change: 2006 Mar 06
*if_perl.txt* For Vim version 7.1. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Sven Verdoolaege

View File

@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.0. Last change: 2006 Apr 30
*if_pyth.txt* For Vim version 7.1. Last change: 2006 Apr 30
VIM REFERENCE MANUAL by Paul Moore

View File

@ -1,4 +1,4 @@
*if_ruby.txt* For Vim version 7.0. Last change: 2006 Apr 30
*if_ruby.txt* For Vim version 7.1. Last change: 2006 Apr 30
VIM REFERENCE MANUAL by Shugo Maeda

View File

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

View File

@ -1,4 +1,4 @@
*if_tcl.txt* For Vim version 7.0. Last change: 2006 Mar 06
*if_tcl.txt* For Vim version 7.1. Last change: 2006 Mar 06
VIM REFERENCE MANUAL by Ingo Wilken

View File

@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.0. Last change: 2006 Apr 30
*indent.txt* For Vim version 7.1. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -113,7 +113,7 @@ If you really want to reindent when you type 'o', 'O', 'e', '0', '<', '>',
"<!>", respectively, for those keys.
For an emacs-style indent mode where lines aren't indented every time you
press Enter but only if you press Tab, I suggest:
press <Enter> but only if you press <Tab>, I suggest:
:set cinkeys=0{,0},:,0#,!<Tab>,!^F
You might also want to switch off 'autoindent' then.
@ -434,10 +434,15 @@ assume a 'shiftwidth' of 4.
limits the time needed to search for the start of a comment.
(default 30 lines).
#N When N is non-zero recognize shell/Perl comments, starting with
'#'. Default N is zero: don't recognizes '#' comments. Note
that lines starting with # will still be seen as preprocessor
lines.
The defaults, spelled out in full, are:
cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,c3,C0,
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30,#0
Vim puts a line in column 1 if:
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
@ -510,6 +515,28 @@ Indent for a continuation line: >
let g:pyindent_continue = '&sw * 2'
SHELL *ft-sh-indent*
The amount of indent applied under various circumstances in a shell file can
be configured by setting the following keys in the |Dictionary|
b:sh_indent_defaults to a specific amount or to a |Funcref| that references a
function that will return the amount desired:
b:sh_indent_options['default'] Default amount of indent.
b:sh_indent_options['continuation-line']
Amount of indent to add to a continued line.
b:sh_indent_options['case-labels']
Amount of indent to add for case labels.
b:sh_indent_options['case-statement']
Amount of indent to add for case statements.
b:sh_indent_options['case-breaks']
Amount of indent to add (or more likely
remove) for case breaks.
VERILOG *ft-verilog-indent*
General block statements such as if, for, case, always, initial, function,

View File

@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0. Last change: 2006 Apr 30
*index.txt* For Vim version 7.1. Last change: 2007 May 05
VIM REFERENCE MANUAL by Bram Moolenaar
@ -624,9 +624,10 @@ tag char note action in Normal mode ~
included files that contains the word under
the cursor, start searching at beginning of
current file
|[p| [p 2 like "P", but adjust indent to current line
|[m| [m 1 cursor N times back to start of member
function
|[p| [p 2 like "P", but adjust indent to current line
|[s| [s 1 move to the previous misspelled word
|[z| [z 1 move to start of open fold
|[{| [{ 1 cursor N times back to unmatched '{'
|[<MiddleMouse> [<MiddleMouse> 2 same as "[p"
@ -663,9 +664,10 @@ tag char note action in Normal mode ~
included files that contains the word under
the cursor, start searching at cursor
position
|]p| ]p 2 like "p", but adjust indent to current line
|]m| ]m 1 cursor N times forward to end of member
function
|]p| ]p 2 like "p", but adjust indent to current line
|]s| ]s 1 move to next misspelled word
|]z| ]z 1 move to end of open fold
|]}| ]} 1 cursor N times forward to unmatched '}'
|]<MiddleMouse> ]<MiddleMouse> 2 same as "]p"
@ -748,6 +750,8 @@ tag char note action in Normal mode ~
|gu| gu{motion} 2 make Nmove text lowercase
|gv| gv reselect the previous Visual area
|gw| gw{motion} 2 format Nmove text and keep cursor
|netrw-gx| gx execute application for file name under the
cursor (only with |netrw| plugin)
|g@| g@{motion} call 'operatorfunc'
|g~| g~{motion} 2 swap case for Nmove text
|g<Down>| g<Down> 1 same as "gj"
@ -984,7 +988,7 @@ file names, tags, commands etc. as appropriate.
{expr}
CTRL-\ f - z reserved for extensions
CTRL-\ others not used
CTRL-] not used
|c_CTRL-]| CTRL-] trigger abbreviation
|c_CTRL-^| CTRL-^ toggle use of |:lmap| mappings
|c_CTRL-_| CTRL-_ when 'allowrevins' set: change language
(Hebrew, Farsi)

View File

@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0. Last change: 2006 May 05
*insert.txt* For Vim version 7.1. Last change: 2007 May 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -219,8 +219,8 @@ CTRL-_ Switch between languages, as follows:
Please refer to |rileft.txt| for more information about
right-to-left mode.
{not in Vi}
Only if compiled with the |+rightleft| feature (which is not
the default).
Only if compiled with the |+rightleft| feature.
*i_CTRL-^*
CTRL-^ Toggle the use of typing language characters.
When language |:lmap| mappings are defined:
@ -1156,24 +1156,25 @@ any printable, non-white character:
In all three 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.
CTRL-E End completion, go back to what was there before selecting a
match (what was typed or longest common string).
<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.
space or <Tab> Stop completion without changing the match and insert the
<Space> or <Tab> Stop completion without changing the match and insert the
typed character.
The behavior of the Enter key depends on the state you are in:
The behavior of the <Enter> key depends on the state you are in:
first state: Use the text as it is and insert a line break.
second state: Insert the currently selected match.
third state: Use the text as it is and insert a line break.
In other words: If you used the cursor keys to select another entry in the
list of matches then the Enter key inserts that match. If you typed something
else then Enter inserts a line break.
list of matches then the <Enter> key inserts that match. If you typed
something else then <Enter> inserts a line break.
The colors of the menu can be changed with these highlight groups:
@ -1210,7 +1211,8 @@ C *ft-c-omni*
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/
it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended.
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
A compiled .exe for MS-Windows can be found at:
@ -1330,9 +1332,9 @@ 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/
Completion of PHP code requires a tags file for completion of data from
external files and for class aware completion. You should use Exuberant ctags
version 5.5.4 or newer. You can find it here: http://ctags.sourceforge.net/
Script completes:
@ -1390,8 +1392,10 @@ The completions provided by CTRL-X CTRL-O are sensitive to the context:
Notes:
- Vim will load/evaluate code in order to provide completions. This may
cause some code execution, which may be a concern.
- In context 1 above, Vim can parse the entire buffer to add a list of
cause some code execution, which may be a concern. This is no longer
enabled by default, to enable this feature add >
let g:rubycomplete_buffer_loading = 1
<- In context 1 above, Vim can parse the entire buffer to add a list of
classes to the completion results. This feature is turned off by default,
to enable it add >
let g:rubycomplete_classes_in_global = 1
@ -1407,8 +1411,13 @@ Notes:
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.
Vim has the ability to color syntax highlight nearly 500 languages. Part of
this highlighting includes knowing what keywords are part of a language. Many
filetypes already have custom completion scripts written for them, the
syntaxcomplete plugin provides basic completion for all other filetypes. It
does this by populating the omni completion list with the text Vim already
knows how to color highlight. It can be used for any filetype and provides a
minimal language-sensitive completion.
To enable syntax code completion you can run: >
setlocal omnifunc=syntaxcomplete#Complete
@ -1461,6 +1470,15 @@ groups: >
You can create as many of these variables as you need, varying only the
filetype at the end of the variable name.
The plugin uses the isKeyword option to determine where word boundaries are
for the syntax items. For example, in the Scheme language completion should
include the "-", call-with-output-file. Depending on your filetype, this may
not provide the words you are expecting. Setting the
g:omni_syntax_use_iskeyword option to 0 will force the syntax plugin to break
on word characters. This can be controlled adding the following to your
vimrc: >
let g:omni_syntax_use_iskeyword = 0
SQL *ft-sql-omni*
@ -1771,13 +1789,13 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
See |++opt| for the possible values of [++opt].
*:r!* *:read!*
:r[ead] !{cmd} Execute {cmd} and insert its standard output below
the cursor. A temporary file is used to store the
output of the command which is then read into the
buffer. 'shellredir' is used to save the output of
the command, which can be set to include stderr or
not. {cmd} is executed like with ":!{cmd}", any '!'
is replaced with the previous command |:!|.
:[range]r[ead] !{cmd} Execute {cmd} and insert its standard output below
the cursor or the specified line. A temporary file is
used to store the output of the command which is then
read into the buffer. 'shellredir' is used to save
the output of the command, which can be set to include
stderr or not. {cmd} is executed like with ":!{cmd}",
any '!' is replaced with the previous command |:!|.
These commands insert the contents of a file, or the output of a command,
into the buffer. They can be undone. They cannot be repeated with the "."

View File

@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.0. Last change: 2006 Apr 20
*intro.txt* For Vim version 7.1. Last change: 2007 May 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -235,7 +235,7 @@ Vim would never have become what it is now, without the help of these people!
David Leonard Port of Python extensions to Unix
Avner Lottem Edit in right-to-left windows
Flemming Madsen X11 client-server, various features and patches
MicroSoft Gave me a copy of DevStudio to compile Vim with
Microsoft Gave me a copy of DevStudio to compile Vim with
Paul Moore Python interface extensions, many patches
Katsuhito Nagano Work on multi-byte versions
Sung-Hyun Nam Work on multi-byte versions

View File

@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0. Last change: 2006 May 03
*map.txt* For Vim version 7.1. Last change: 2007 May 11
VIM REFERENCE MANUAL by Bram Moolenaar
@ -227,10 +227,12 @@ 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, you may very well make the command dysfunctional.
For this reason the following is blocked:
- changing the buffer text |textlock|
- editing another buffer
- the |:normal| command
- moving the cursor is allowed, but it is restored afterwards
- Changing the buffer text |textlock|.
- Editing another buffer.
- The |:normal| command.
- Moving the cursor is allowed, but it is restored afterwards.
- You can use getchar(), but the existing typeahead isn't seen and new
typeahead is discarded.
If you want the mapping to do any of these let the returned characters do
that.
@ -352,9 +354,11 @@ was already done when typing the mapping.
When listing mappings the characters in the first two columns are:
CHAR MODE ~
<Space> Normal, Visual and Operator-pending
<Space> Normal, Visual, Select and Operator-pending
n Normal
v Visual
v Visual and Select
s Select
x Visual
o Operator-pending
! Insert and Command-line
i Insert
@ -590,7 +594,18 @@ the '<' flag must not be present in 'cpoptions' for this to work). >
:map <M-g> /foo<CR>cwbar<Esc>
:map _x d/END/e<CR>
:map! qq quadrillion questions
<
Multiplying a count
When you type a count before triggering a mapping, it's like the count was
typed before the {lhs}. For example, with this mapping: >
:map <F4> 3w
Typing 2<F4> will result in "23w". Thus not moving 2 * 3 words but 23 words.
If you want to multiply counts use the expression register: >
:map <F4> @='3w'<CR>
The part between quotes is the expression being executed. |@=|
1.9 USING MAPPINGS *map-typing*
@ -777,7 +792,7 @@ stands for. This can be used to save typing for often used long words. And
you can use it to automatically correct obvious spelling errors.
Examples:
:iab ms MicroSoft
:iab ms Microsoft
:iab tihs this
There are three types of abbreviations:
@ -794,7 +809,7 @@ end-id The "end-id" type ends in a keyword character, but all the other
Examples: "#i", "..f", "$/7"
non-id The "non-id" type ends in a non-keyword character, the other
characters may be of any type, excluding space and Tab. {this type
characters may be of any type, excluding space and tab. {this type
is not supported by Vi}
Examples: "def#", "4/7$"
@ -819,12 +834,12 @@ an additional rule:
full-id In front of the match is a non-keyword character, or this is where
the line or insertion starts. Exception: When the abbreviation is
only one character, it is not recognized if there is a non-keyword
character in front of it, other than a space or a <Tab>.
character in front of it, other than a space or a tab.
end-id In front of the match is a keyword character, or a space or a <Tab>,
end-id In front of the match is a keyword character, or a space or a tab,
or this is where the line or insertion starts.
non-id In front of the match is a space, <Tab> or the start of the line or
non-id In front of the match is a space, tab or the start of the line or
the insertion.
Examples: ({CURSOR} is where you type a non-keyword character) >
@ -1127,7 +1142,7 @@ There are a number of attributes, split into four categories: argument
handling, completion behavior, range handling, and special cases. The
attributes are described below, by category.
Argument handling *E175* *E176*
Argument handling *E175* *E176* *:command-nargs*
By default, a user defined command will take no arguments (and an error is
reported if any are supplied). However, it is possible to specify that the
@ -1139,7 +1154,7 @@ command can take arguments, using the -nargs attribute. Valid cases are:
-nargs=? 0 or 1 arguments are allowed
-nargs=+ Arguments must be supplied, but any number are allowed
Arguments are considered to be separated by (unescaped) spaces or Tabs in this
Arguments are considered to be separated by (unescaped) spaces or tabs in this
context.
Note that arguments are used as text, not as expressions. Specifically,
@ -1155,8 +1170,8 @@ defined, not where it is invoked! Example:
Executing script2.vim will result in "None" to be echoed. Not what you
intended! Calling a function may be an alternative.
Completion behavior *:command-completion*
*E179* *E180* *E181*
Completion behavior *:command-completion* *E179*
*E180* *E181* *:command-complete*
By default, the arguments of user defined commands do not undergo completion.
However, by specifying one or the other of the following attributes, argument
completion can be enabled:
@ -1228,13 +1243,16 @@ the 'path' option: >
:endfun
<
Range handling *E177* *E178*
Range handling *E177* *E178* *:command-range*
*:command-count*
By default, user-defined commands do not accept a line number range. However,
it is possible to specify that the command does take a range (the -range
attribute), or that it takes an arbitrary count value, either in the line
number position (-range=N, like the |:split| command) or as a "count"
argument (-count=N, like the |:Next| command). Possible attributes are:
argument (-count=N, like the |:Next| command). The count will then be
available in the argument with |<count>|.
Possible attributes are:
-range Range allowed, default is current line
-range=% Range allowed, default is whole file (1,$)
@ -1247,8 +1265,8 @@ argument (-count=N, like the |:Next| command). Possible attributes are:
Note that -range=N and -count=N are mutually exclusive - only one should be
specified.
Special cases
Special cases *:command-bang* *:command-bar*
*:command-register* *:command-buffer*
There are some special cases as well:
-bang The command can take a ! modifier (like :q or :w)
@ -1303,12 +1321,28 @@ If the first two characters of an escape sequence are "q-" (for example,
<q-args>) then the value is quoted in such a way as to make it a valid value
for use in an expression. This uses the argument as one single value.
When there is no argument <q-args> is an empty string.
*<f-args>*
To allow commands to pass their arguments on to a user-defined function, there
is a special form <f-args> ("function args"). This splits the command
arguments at spaces and Tabs, quotes each argument individually, and the
arguments at spaces and tabs, quotes each argument individually, and the
<f-args> sequence is replaced by the comma-separated list of quoted arguments.
See the Mycmd example below. If no arguments are given <f-args> is removed.
To embed whitespace into an argument of <f-args>, prepend a backslash.
<f-args> replaces every pair of backslashes (\\) with one backslash. A
backslash followed by a character other than white space or a backslash
remains unmodified. Overview:
command <f-args> ~
XX ab 'ab'
XX a\b 'a\b'
XX a\ b 'a b'
XX a\ b 'a ', 'b'
XX a\\b 'a\b'
XX a\\ b 'a\', 'b'
XX a\\\b 'a\\b'
XX a\\\ b 'a\ b'
XX a\\\\b 'a\\b'
XX a\\\\ b 'a\\', 'b'
Examples >

View File

@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0. Last change: 2006 Apr 30
*mbyte.txt* For Vim version 7.1. Last change: 2006 Aug 11
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@ -403,7 +403,8 @@ depends on the system used, no detailed list can be given.
8bit 2byte MS-Windows: works for all codepages installed on your
system; you can only type 8bit characters;
Other systems: does NOT work.
8bit Unicode Works, but you can only type 8bit characters; in a
8bit Unicode Works, but only 8bit characters can be typed directly
(others through digraphs, keymaps, etc.); in a
terminal you can only see 8bit characters; the GUI can
show all characters that the 'guifont' supports.

View File

@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0. Last change: 2006 Apr 30
*message.txt* For Vim version 7.1. Last change: 2007 Mar 20
VIM REFERENCE MANUAL by Bram Moolenaar
@ -25,7 +25,8 @@ for other versions.
*g<*
The "g<" command can be used to see the last page of previous command output.
This is especially useful if you accidentally typed <Space> at the hit-enter
prompt.
prompt. You are then back at the hit-enter prompt and can then scroll further
back.
Note: when you stopped the output with "q" at the more prompt only up to that
point will be displayed.
The previous command output is cleared when another command produces output.

View File

@ -1,4 +1,4 @@
*mlang.txt* For Vim version 7.0. Last change: 2004 Feb 24
*mlang.txt* For Vim version 7.1. Last change: 2006 Jul 12
VIM REFERENCE MANUAL by Bram Moolenaar
@ -114,7 +114,7 @@ the language of your choice. use "en" to disable translations. >
==============================================================================
2. Menus *multilang-menus*
See |45.2| for the basics.
See |45.2| for the basics, esp. using 'langmenu'.
Note that if changes have been made to the menus after the translation was
done, some of the menus may be shown in English. Please try contacting the

View File

@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0. Last change: 2006 Apr 30
*motion.txt* For Vim version 7.1. Last change: 2006 Dec 07
VIM REFERENCE MANUAL by Bram Moolenaar
@ -169,15 +169,15 @@ l or *l*
*0*
0 To the first character of the line. |exclusive|
motion. When moving up or down, stay in same screen
column (if possible).
motion.
*<Home>* *<kHome>*
<Home> To the first character of the line. |exclusive|
motion. When moving up or down, stay in same text
column (if possible). Works like "1|", which differs
from "0" when the line starts with a <Tab>. {not in
Vi}
motion. When moving up or down next, stay in same
TEXT column (if possible). Most other commands stay
in the same SCREEN column. <Home> works like "1|",
which differs from "0" when the line starts with a
<Tab>. {not in Vi}
*^*
^ To the first non-blank character of the line.
@ -752,11 +752,11 @@ m[ or m] Set the |'[| or |']| mark. Useful when an operator is
be omitted.
*'* *'a* *`* *`a*
'{a-z} `{a-z} Jump to the mark {a-z}.
'{a-z} `{a-z} Jump to the mark {a-z} in the current buffer.
*'A* *'0* *`A* *`0*
'{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the correct file (not a motion
command when in another file). {not in Vi}
'{A-Z0-9} `{A-Z0-9} To the mark {A-Z0-9} in the file where it was set (not
a motion command when in another file). {not in Vi}
*g'* *g'a* *g`* *g`a*
g'{mark} g`{mark}

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