Compare commits

...

205 Commits

Author SHA1 Message Date
Bram Moolenaar
2641f77fbc updated for version 7.0064 2005-03-25 21:58:17 +00:00
Bram Moolenaar
68b76a69aa updated for version 7.0064 2005-03-25 21:53:48 +00:00
Bram Moolenaar
a88d968da1 updated for version 7.0064 2005-03-25 21:45:43 +00:00
Bram Moolenaar
43b604cddc updated for version 7.0063 2005-03-22 23:06:55 +00:00
Bram Moolenaar
6bb683663a updated for version 7.0063 2005-03-22 23:03:44 +00:00
Bram Moolenaar
fc73515f7b updated for version 7.0063 2005-03-22 22:54:12 +00:00
Bram Moolenaar
dbc08a3459 updated for version 7.0063 2005-03-22 22:52:07 +00:00
Bram Moolenaar
2d3c0a9daa updated for version 7.0062 2005-03-21 08:27:48 +00:00
Bram Moolenaar
e19defe17a updated for version 7.0062 2005-03-21 08:23:33 +00:00
Bram Moolenaar
60c78929eb updated for version 7.0062 2005-03-20 22:40:14 +00:00
Bram Moolenaar
217ad920dd updated for version 7.0062 2005-03-20 22:37:15 +00:00
Bram Moolenaar
2e4096b077 updated for version 7.0062 2005-03-20 22:25:45 +00:00
Bram Moolenaar
a0dea674b8 updated for version 7.0062 2005-03-20 22:23:10 +00:00
Bram Moolenaar
c07611362a updated for version 7.0061 2005-03-18 20:30:32 +00:00
Bram Moolenaar
5409c051a5 updated for version 7.0061 2005-03-18 20:27:04 +00:00
Bram Moolenaar
4317d9b486 updated for version 7.0061 2005-03-18 20:25:31 +00:00
Bram Moolenaar
a5319aed9b updated for version 7.0061 2005-03-18 20:15:36 +00:00
Bram Moolenaar
a008465995 updated for version 7.0060 2005-03-16 09:57:51 +00:00
Bram Moolenaar
ef53c02238 updated for version 7.0060 2005-03-16 09:53:56 +00:00
Bram Moolenaar
916b7afcbb updated for version 7.0060 2005-03-16 09:52:38 +00:00
Bram Moolenaar
da5d740e92 updated for version 7.0060 2005-03-16 09:50:44 +00:00
Bram Moolenaar
58e7f2bb4c updated for version 7.0060 2005-03-16 09:48:18 +00:00
Bram Moolenaar
eafefe4fb0 updated for version 7.0060 2005-03-16 09:47:09 +00:00
Bram Moolenaar
5b743bfc4d updated for version 7.0060 2005-03-15 22:50:43 +00:00
Bram Moolenaar
f36d3693dd updated for version 7.0060 2005-03-15 22:48:14 +00:00
Bram Moolenaar
fb26980c31 updated for version 7.0060 2005-03-15 22:46:30 +00:00
Bram Moolenaar
e2cc9702a6 updated for version 7.0060 2005-03-15 22:43:58 +00:00
Bram Moolenaar
152c9dd52b updated for version 7.0060 2005-03-15 22:37:00 +00:00
Bram Moolenaar
3918c950c9 updated for version 7.0060 2005-03-15 22:34:55 +00:00
Bram Moolenaar
28a37ffcf7 updated for version 7.0060 2005-03-15 22:28:00 +00:00
Bram Moolenaar
11cbeb1326 updated for version 7.0059 2005-03-11 22:51:16 +00:00
Bram Moolenaar
4ad237ddc8 updated for version 7.0059 2005-03-11 22:49:40 +00:00
Bram Moolenaar
cd71fa3c1e updated for version 7.0059 2005-03-11 22:46:48 +00:00
Bram Moolenaar
df7b1ffe99 updated for version 7.0059 2005-03-11 22:40:50 +00:00
Bram Moolenaar
9062a9dfbf updated for version 7.0058 2005-03-08 22:46:26 +00:00
Bram Moolenaar
2f6b0b8fce updated for version 7.0058 2005-03-08 22:43:10 +00:00
Bram Moolenaar
111ff9f40e updated for version 7.0058 2005-03-08 22:40:03 +00:00
Bram Moolenaar
9be038da7d updated for version 7.0058 2005-03-08 22:34:32 +00:00
Bram Moolenaar
95fb60ac58 updated for version 7.0058 2005-03-08 22:29:20 +00:00
Bram Moolenaar
e2ac10d732 updated for version 7.0057 2005-03-07 23:26:06 +00:00
Bram Moolenaar
4d34b432db updated for version 7.0057 2005-03-07 23:22:00 +00:00
Bram Moolenaar
f1f8bc5b63 updated for version 7.0057 2005-03-07 23:20:08 +00:00
Bram Moolenaar
e4efc3b270 updated for version 7.0057 2005-03-07 23:16:51 +00:00
Bram Moolenaar
44ecf65f74 updated for version 7.0057 2005-03-07 23:09:59 +00:00
Bram Moolenaar
fd91ecbbe0 updated for version 7.0057 2005-03-07 23:06:25 +00:00
Bram Moolenaar
5ea7e8b730 updated for version 7.0057 2005-03-07 23:04:48 +00:00
Bram Moolenaar
408fb62450 updated for version 7.0057 2005-03-07 23:03:19 +00:00
Bram Moolenaar
52b4b557a2 updated for version 7.0057 2005-03-07 23:00:57 +00:00
Bram Moolenaar
d62bec86bf updated for version 7.0057 2005-03-07 22:56:57 +00:00
Bram Moolenaar
fdac490def updated for version 7.0056 2005-03-06 23:42:22 +00:00
Bram Moolenaar
8bf59b9507 updated for version 7.0056 2005-03-06 23:40:56 +00:00
Bram Moolenaar
bc7aa85d8a updated for version 7.0056 2005-03-06 23:38:09 +00:00
Bram Moolenaar
19a09a1893 updated for version 7.0055 2005-03-04 23:39:37 +00:00
Bram Moolenaar
7383034c0a updated for version 7.0054 2005-02-28 22:48:19 +00:00
Bram Moolenaar
8cd06cabf3 updated for version 7.0054 2005-02-28 22:44:58 +00:00
Bram Moolenaar
4d01d630a5 updated for version 7.0054 2005-02-28 22:39:03 +00:00
Bram Moolenaar
038eb0ed16 updated for version 7.0053 2005-02-27 22:43:26 +00:00
Bram Moolenaar
2be221fa5e updated for version 7.0053 2005-02-27 22:41:14 +00:00
Bram Moolenaar
a21b29a2fc updated for version 7.0053 2005-02-27 22:40:05 +00:00
Bram Moolenaar
78cb7d249e updated for version 7.0053 2005-02-27 22:38:23 +00:00
Bram Moolenaar
32e7b2d575 updated for version 7.0053 2005-02-27 22:36:47 +00:00
Bram Moolenaar
05159a0c6a updated for version 7.0052 2005-02-26 23:04:13 +00:00
Bram Moolenaar
5313dcb75a updated for version 7.0051 2005-02-22 08:56:13 +00:00
Bram Moolenaar
26a60b4524 updated for version 7.0051 2005-02-22 08:49:11 +00:00
Bram Moolenaar
df177f679e updated for version 7.0051 2005-02-22 08:39:57 +00:00
Bram Moolenaar
6bdcfc08cb updated for version 7.0051 2005-02-22 08:28:13 +00:00
Bram Moolenaar
81bf708341 updated for version 7.0050 2005-02-12 14:31:42 +00:00
Bram Moolenaar
4399ef4764 updated for version 7.0050 2005-02-12 14:29:27 +00:00
Bram Moolenaar
b11bd7e43f updated for version 7.0049 2005-02-07 22:05:52 +00:00
Bram Moolenaar
bee0c5b29f updated for version 7.0049 2005-02-07 22:03:36 +00:00
Bram Moolenaar
7c62692d43 updated for version 7.0049 2005-02-07 22:01:03 +00:00
Bram Moolenaar
f97ca8f066 updated for version 7.0049 2005-02-07 21:49:25 +00:00
Bram Moolenaar
2a8d1f877c updated for version 7.0048 2005-02-05 21:43:56 +00:00
Bram Moolenaar
3a7c85bc13 updated for version 7.0048 2005-02-05 21:39:53 +00:00
Bram Moolenaar
8089cae03b updated for version 7.0048 2005-02-05 21:35:05 +00:00
Bram Moolenaar
758711c5dc updated for version 7.0047 2005-02-02 23:11:38 +00:00
Bram Moolenaar
f583668da1 updated for version 7.0047 2005-02-02 23:09:45 +00:00
Bram Moolenaar
6ac5429d3b updated for version 7.0047 2005-02-02 23:07:25 +00:00
Bram Moolenaar
748bf0374b updated for version 7.0047 2005-02-02 23:04:36 +00:00
Bram Moolenaar
24c088a284 updated for version 7.0047 2005-02-02 22:55:47 +00:00
Bram Moolenaar
2e6aff38e0 updated for version 7.0046 2005-01-31 19:25:36 +00:00
Bram Moolenaar
485db9bbb2 updated for version 7.0046 2005-01-31 19:23:41 +00:00
Bram Moolenaar
d438e91c93 updated for version 7.0046 2005-01-31 19:21:46 +00:00
Bram Moolenaar
2ce06f6eb9 updated for version 7.0046 2005-01-31 19:19:04 +00:00
Bram Moolenaar
b23c33872a updated for version 7.0046 2005-01-31 19:09:12 +00:00
Bram Moolenaar
65c1b01669 updated for version 7.0046 2005-01-31 19:02:28 +00:00
Bram Moolenaar
0182465bc0 updated for version 7.0046 2005-01-31 18:58:23 +00:00
Bram Moolenaar
929224039f updated for version 7.0046 2005-01-31 18:57:18 +00:00
Bram Moolenaar
5b625c53a5 updated for version 7.0046 2005-01-31 18:55:55 +00:00
Bram Moolenaar
532c780ef0 updated for version 7.0045 2005-01-27 14:44:31 +00:00
Bram Moolenaar
b2956cd218 updated for version 7.0045 2005-01-27 14:42:53 +00:00
Bram Moolenaar
677ee6890d updated for version 7.0045 2005-01-27 14:41:15 +00:00
Bram Moolenaar
10de2da0f5 updated for version 7.0045 2005-01-27 14:33:00 +00:00
Bram Moolenaar
410d0286f4 updated for version 7.0045 2005-01-27 14:31:44 +00:00
Bram Moolenaar
33570924ba updated for version 7.0044 2005-01-25 22:26:29 +00:00
Bram Moolenaar
b71ec9fc70 updated for version 7.0044 2005-01-25 22:22:02 +00:00
Bram Moolenaar
7df2d6629f updated for version 7.0044 2005-01-25 22:18:08 +00:00
Bram Moolenaar
dad6b69c00 updated for version 7.0044 2005-01-25 22:14:34 +00:00
Bram Moolenaar
8f999f1999 updated for version 7.0044 2005-01-25 22:12:55 +00:00
Bram Moolenaar
df3267e4e1 updated for version 7.0044 2005-01-25 22:07:05 +00:00
Bram Moolenaar
495de9c1ae updated for version 7.0044 2005-01-25 22:03:25 +00:00
Bram Moolenaar
6ebb114c0c updated for version 7.0044 2005-01-25 21:58:26 +00:00
Bram Moolenaar
9d75c83f8f updated for version 7.0044 2005-01-25 21:57:23 +00:00
Bram Moolenaar
281bdcec60 updated for version 7.0044 2005-01-25 21:53:18 +00:00
Bram Moolenaar
aab21c3533 updated for version 7.0044 2005-01-25 21:46:35 +00:00
Bram Moolenaar
1fad5d49c9 updated for version 7.0044 2005-01-25 21:44:33 +00:00
Bram Moolenaar
623fd5e206 updated for version 7.0044 2005-01-25 21:42:15 +00:00
Bram Moolenaar
a7043832f3 updated for version 7.0043 2005-01-21 11:56:39 +00:00
Bram Moolenaar
dcaf10e19a updated for version 7.0043 2005-01-21 11:55:25 +00:00
Bram Moolenaar
ca4729948b updated for version 7.0043 2005-01-21 11:46:23 +00:00
Bram Moolenaar
ce5e58e601 updated for version 7.0042 2005-01-19 22:24:34 +00:00
Bram Moolenaar
6abd8e9735 updated for version 7.0042 2005-01-19 22:21:15 +00:00
Bram Moolenaar
383f9bc302 updated for version 7.0042 2005-01-19 22:18:32 +00:00
Bram Moolenaar
c92ad2e2c2 updated for version 7.0042 2005-01-19 22:08:28 +00:00
Bram Moolenaar
9ef486dbf3 updated for version 7.0041 2005-01-17 22:23:00 +00:00
Bram Moolenaar
bac234ead6 updated for version 7.0041 2005-01-17 22:21:07 +00:00
Bram Moolenaar
d6754643d0 updated for version 7.0041 2005-01-17 22:18:45 +00:00
Bram Moolenaar
3a3a72348d updated for version 7.0041 2005-01-17 22:16:15 +00:00
Bram Moolenaar
f3bae6935a updated for version 7.0041 2005-01-17 22:13:48 +00:00
Bram Moolenaar
af7f641de4 updated for version 7.0041 2005-01-17 22:11:23 +00:00
Bram Moolenaar
89e5d68d42 updated for version 7.0041 2005-01-17 22:06:23 +00:00
Bram Moolenaar
7480b5cefe updated for version 7.0040 2005-01-16 22:07:38 +00:00
Bram Moolenaar
798c5a7a84 updated for version 7.0040 2005-01-16 22:06:30 +00:00
Bram Moolenaar
9cd15160b8 updated for version 7.0040 2005-01-16 22:02:49 +00:00
Bram Moolenaar
0cf6f545ac updated for version 7.0040 2005-01-16 21:59:36 +00:00
Bram Moolenaar
32e4e1f1d8 updated for version 7.0040 2005-01-16 21:57:33 +00:00
Bram Moolenaar
1d817d0321 updated for version 7.0040 2005-01-16 21:56:27 +00:00
Bram Moolenaar
e9a4126498 updated for version 7.0039 2005-01-15 22:18:47 +00:00
Bram Moolenaar
f1ab380df5 updated for version 7.0039 2005-01-15 22:17:32 +00:00
Bram Moolenaar
2fda12f0fa updated for version 7.0039 2005-01-15 22:14:15 +00:00
Bram Moolenaar
6d14ccda51 updated for version 7.0039 2005-01-15 22:08:30 +00:00
Bram Moolenaar
8c711458a6 updated for version 7.0038 2005-01-14 21:53:12 +00:00
Bram Moolenaar
d8b0273231 updated for version 7.0038 2005-01-14 21:48:43 +00:00
Bram Moolenaar
fd371684fa updated for version 7.0038 2005-01-14 21:42:54 +00:00
Bram Moolenaar
31c67ef813 updated for version 7.0037 2005-01-11 21:34:41 +00:00
Bram Moolenaar
2a41f3a19f updated for version 7.0037 2005-01-11 21:30:59 +00:00
Bram Moolenaar
5f2bb9f584 updated for version 7.0037 2005-01-11 21:29:04 +00:00
Bram Moolenaar
f7889b6c73 updated for version 7.0037 2005-01-11 21:23:08 +00:00
Bram Moolenaar
c5a1e80ca2 updated for version 7.0037 2005-01-11 21:21:40 +00:00
Bram Moolenaar
ab7013c8d8 updated for version 7.0036 2005-01-09 21:23:56 +00:00
Bram Moolenaar
b7d6e72b85 updated for version 7.0036 2005-01-09 21:22:45 +00:00
Bram Moolenaar
540d6e3a01 updated for version 7.0036 2005-01-09 21:20:18 +00:00
Bram Moolenaar
a40c500a4c updated for version 7.0036 2005-01-09 21:16:21 +00:00
Bram Moolenaar
6cc1619799 updated for version 7.0035 2005-01-08 21:49:45 +00:00
Bram Moolenaar
9588a0f72b updated for version 7.0035 2005-01-08 21:45:39 +00:00
Bram Moolenaar
e49b69a091 updated for version 7.0034 2005-01-08 16:11:57 +00:00
Bram Moolenaar
13065c4e70 updated for version 7.0034 2005-01-08 16:08:21 +00:00
Bram Moolenaar
cf3630f2d0 updated for version 7.0034 2005-01-08 16:04:29 +00:00
Bram Moolenaar
0d6602271c updated for version 7.0033 2005-01-07 21:51:51 +00:00
Bram Moolenaar
a14de3dd5b updated for version 7.0033 2005-01-07 21:48:26 +00:00
Bram Moolenaar
6f7926cd2a updated for version 7.0033 2005-01-07 21:45:22 +00:00
Bram Moolenaar
8a283e5059 updated for version 7.0032 2005-01-06 23:28:25 +00:00
Bram Moolenaar
de8866baa8 updated for version 7.0032 2005-01-06 23:24:37 +00:00
Bram Moolenaar
8a7e52f4c2 updated for version 7.0032 2005-01-06 23:22:30 +00:00
Bram Moolenaar
bb761a783f updated for version 7.0032 2005-01-06 23:19:09 +00:00
Bram Moolenaar
3d60ec2aaf updated for version 7.0031 2005-01-05 22:19:46 +00:00
Bram Moolenaar
1280586e4b updated for version 7.0031 2005-01-05 22:16:17 +00:00
Bram Moolenaar
06fb435a1c updated for version 7.0031 2005-01-05 22:10:30 +00:00
Bram Moolenaar
f4c01101e7 updated for version 7.0031 2005-01-05 22:08:40 +00:00
Bram Moolenaar
b32ce2d7e8 updated for version 7.0031 2005-01-05 22:07:01 +00:00
Bram Moolenaar
c70646c652 updated for version 7.0030 2005-01-04 21:52:38 +00:00
Bram Moolenaar
0a56cb85a6 updated for version 7.0030 2005-01-04 21:45:14 +00:00
Bram Moolenaar
2079a601eb updated for version 7.0030 2005-01-04 21:43:22 +00:00
Bram Moolenaar
fca34d6d94 updated for version 7.0030 2005-01-04 21:38:36 +00:00
Bram Moolenaar
b11160ef88 updated for version 7.0030 2005-01-04 21:31:43 +00:00
Bram Moolenaar
a0a83bea65 updated for version 7.0030 2005-01-04 21:26:43 +00:00
Bram Moolenaar
323850cc6d updated for version 7.0030 2005-01-04 21:24:54 +00:00
Bram Moolenaar
2fa15e6c7b updated for version 7.0030 2005-01-04 21:23:48 +00:00
Bram Moolenaar
fa4fd1bf97 updated for version 7.0030 2005-01-04 21:21:28 +00:00
Bram Moolenaar
c83c455ee7 updated for version 7.0030 2005-01-04 21:19:20 +00:00
Bram Moolenaar
2317284d1b updated for version 7.0030 2005-01-04 21:16:35 +00:00
Bram Moolenaar
b4022957c1 updated for version 7.0030 2005-01-04 21:14:57 +00:00
Bram Moolenaar
bac9684e42 updated for version 7.0030 2005-01-04 21:13:16 +00:00
Bram Moolenaar
e8dcf625b9 updated for version 7.0030 2005-01-04 21:12:13 +00:00
Bram Moolenaar
87c1948243 updated for version 7.0030 2005-01-04 21:07:44 +00:00
Bram Moolenaar
49cd957922 updated for version 7.0029 2005-01-03 21:06:01 +00:00
Bram Moolenaar
d7ee7ce231 updated for version 7.0029 2005-01-03 21:02:03 +00:00
Bram Moolenaar
f9980f116b updated for version 7.0029 2005-01-03 20:58:59 +00:00
Bram Moolenaar
306cf5720e updated for version 7.0029 2005-01-03 20:56:17 +00:00
Bram Moolenaar
0a77e47767 updated for version 7.0029 2005-01-03 20:55:08 +00:00
Bram Moolenaar
1c2fda2097 updated for version 7.0028 2005-01-02 11:43:19 +00:00
Bram Moolenaar
ec2dad6329 updated for version 7.0028 2005-01-02 11:36:03 +00:00
Bram Moolenaar
b78b0b095e updated for version 7.0028 2005-01-02 11:32:29 +00:00
Bram Moolenaar
b7fcef5607 updated for version 7.0028 2005-01-02 11:31:05 +00:00
Bram Moolenaar
3411469dd2 updated for version 7.0028 2005-01-02 11:28:13 +00:00
Bram Moolenaar
567e4dec2c updated for version 7.0027 2004-12-31 21:01:02 +00:00
Bram Moolenaar
def9e829de updated for version 7.0027 2004-12-31 20:58:58 +00:00
Bram Moolenaar
dfccaf0f00 updated for version 7.0027 2004-12-31 20:56:11 +00:00
Bram Moolenaar
8fc061c7f7 updated for version 7.0026 2004-12-29 21:03:02 +00:00
Bram Moolenaar
81695250ef updated for version 7.0026 2004-12-29 20:58:21 +00:00
Bram Moolenaar
86b6835997 updated for version 7.0025 2004-12-27 21:59:20 +00:00
Bram Moolenaar
b5bf5b8fae updated for version 7.0024 2004-12-24 14:35:23 +00:00
Bram Moolenaar
1cd871b534 updated for version 7.0023 2004-12-19 22:46:22 +00:00
Bram Moolenaar
46c9c73de8 updated for version 7.0022 2004-12-12 11:37:09 +00:00
Bram Moolenaar
d8b0cf1cc5 updated for version 7.0022 2004-12-12 11:33:30 +00:00
Bram Moolenaar
293ee4d421 updated for version 7.0021 2004-12-09 21:34:53 +00:00
Bram Moolenaar
741b07e009 updated for version 7.0021 2004-12-09 21:09:42 +00:00
Bram Moolenaar
35a9aaab4a updated for version 7.0020 2004-10-24 19:23:07 +00:00
Bram Moolenaar
009b2592f7 updated for version 7.0020 2004-10-24 19:18:58 +00:00
Bram Moolenaar
47136d70fa updated for version 7.0019 2004-10-12 20:02:24 +00:00
Bram Moolenaar
5c4e21cf4d updated for version 7.0019 2004-10-12 19:54:52 +00:00
Bram Moolenaar
7102bf0752 updated for version 7.0019 2004-10-12 19:53:42 +00:00
Bram Moolenaar
7b0294cb9f updated for version 7.0018 2004-10-11 10:16:09 +00:00
Bram Moolenaar
7171abea1a updated for version 7.0018 2004-10-11 10:06:20 +00:00
Bram Moolenaar
349b2f643a updated for version 7.0018 2004-10-11 10:00:50 +00:00
401 changed files with 273452 additions and 32914 deletions

View File

@@ -30,6 +30,7 @@ SRC_ALL1 = \
src/gui.h \
src/gui_beval.c \
src/gui_beval.h \
src/hashtable.c \
src/keymap.h \
src/macros.h \
src/main.c \
@@ -56,6 +57,7 @@ SRC_ALL1 = \
src/screen.c \
src/search.c \
src/structs.h \
src/spell.c \
src/syntax.c \
src/tag.c \
src/term.c \
@@ -73,7 +75,7 @@ SRC_ALL2 = \
src/main.aap \
src/testdir/main.aap \
src/testdir/*.in \
src/testdir/*.ok \
src/testdir/test[0-9]*.ok \
src/testdir/test49.vim \
src/proto.h \
src/proto/buffer.pro \
@@ -92,6 +94,7 @@ SRC_ALL2 = \
src/proto/getchar.pro \
src/proto/gui.pro \
src/proto/gui_beval.pro \
src/proto/hashtable.pro \
src/proto/main.pro \
src/proto/mark.pro \
src/proto/mbyte.pro \
@@ -110,6 +113,7 @@ SRC_ALL2 = \
src/proto/regexp.pro \
src/proto/screen.pro \
src/proto/search.pro \
src/proto/spell.pro \
src/proto/syntax.pro \
src/proto/tag.pro \
src/proto/term.pro \
@@ -153,12 +157,19 @@ SRC_UNIX = \
src/gui_kde_x11.cc \
src/kvim_iface.h \
src/gui_motif.c \
src/gui_xmdlg.c \
src/gui_xmebw.c \
src/gui_xmebw.h \
src/gui_xmebwp.h \
src/gui_x11.c \
src/gui_x11_pm.h \
src/hangulin.c \
src/if_xcmdsrv.c \
src/integration.c \
src/integration.h \
src/link.sh \
src/installman.sh \
src/installml.sh \
src/mkinstalldirs \
src/os_unix.c \
src/os_unix.h \
@@ -173,6 +184,7 @@ SRC_UNIX = \
src/proto/gui_kde.pro \
src/proto/gui_kde_x11.pro \
src/proto/gui_motif.pro \
src/proto/gui_xmdlg.pro \
src/proto/gui_x11.pro \
src/proto/hangulin.pro \
src/proto/if_xcmdsrv.pro \
@@ -315,7 +327,7 @@ SRC_DOS = \
# source files for DOS without CR/LF translation (also in the extra archive)
SRC_DOS_BIN = \
src/VisVim/Res \
src/VisVim/Res/*.bmp \
src/tearoff.bmp \
src/tools.bmp \
src/tools16.bmp \
@@ -334,17 +346,12 @@ SRC_AMI = \
README_amisrc.txt.info \
src.info \
src/INSTALLami.txt \
src/Make_agui.mak \
src/Make_aros.mak \
src/Make_dice.mak \
src/Make_manx.mak \
src/Make_morph.mak \
src/Make_sas.mak \
src/gui_amiga.c \
src/gui_amiga.h \
src/os_amiga.c \
src/os_amiga.h \
src/proto/gui_amiga.pro \
src/proto/os_amiga.pro \
src/testdir/Make_amiga.mak \
src/testdir/amiga.vim \
@@ -414,8 +421,6 @@ SRC_EXTRA = \
README_os390.txt \
src/Make_mint.mak \
src/Make_ro.mak \
src/gui_beos.cc \
src/gui_beos.h \
src/gui_riscos.c \
src/gui_riscos.h \
src/if_sniff.c \
@@ -428,9 +433,7 @@ SRC_EXTRA = \
src/os_mint.h \
src/os_riscos.c \
src/os_riscos.h \
src/proto/gui_beos.pro \
src/proto/gui_riscos.pro \
src/proto/os_beos.pro \
src/proto/os_riscos.pro \
src/os_vms_fix.com \
src/toolbar.phi \
@@ -659,6 +662,10 @@ EXTRA = \
# generic language files
LANG_GEN = \
README_lang.txt \
runtime/doc/*-it.1 \
runtime/doc/*-it.UTF-8.1 \
runtime/doc/*-ru.1 \
runtime/doc/*-ru.UTF-8.1 \
runtime/lang/README.txt \
runtime/lang/menu_*.vim \
runtime/keymap/README.txt \
@@ -672,6 +679,7 @@ LANG_GEN = \
runtime/tutor/tutor.pl.* \
runtime/tutor/tutor.ru.* \
runtime/tutor/tutor.zh.* \
runtime/spell/en.spl \
# all files for lang archive
LANG_SRC = \

View File

@@ -5,19 +5,19 @@ static char * tb_print_xpm[] = {
/* colors */
" s none m none c none",
". s iconColor1 m black c #000000",
"X s iconColor2 m none c #FFFFFF",
"o s iconGray2 m none c #bdbdbd",
"X s iconColor2 m none c #FFFFFF",
"o s iconGray2 m none c #bdbdbd",
"O s iconGray5 m black c #737373",
"+ s bottomShadowColor m black c #5D6069",
"@ c #FF1144",
/* pixels */
" ....... ",
" .XXXXX.. ",
" .X...X.X. ",
" .XXXXX.X. ",
" .XXXXX.... ",
" .X...XXXX.O ",
" .XXXXXXXX.O ",
" .X.....XX.O ",
" .XXXXXXXX. ",
" .XXXXXXXX. ",
" ..XXXXXXXX.. ",
" .XXXXXXXX.O ",
"................ ",
".XXXXXXXXXXXXXO. ",

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: Checkstyle
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/checkstyle.vim
" Last Change: 2004 Mar 27
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/checkstyle.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: javac
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/javac.vim
" Last Change: 2004 Apr 15
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/javac.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: PHP
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/php.vim
" Last Change: 2004 Sep 05
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/php.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish

View File

@@ -10,7 +10,7 @@
"
" Contributors:
" Hugh Sasse <hgs@dmu.ac.uk>
" Doug Kearns <djkea2@mugca.its.monash.edu.au>
" Doug Kearns <djkea2@gus.gscit.monash.edu.au>
"
" Todo:
" match error type %m

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: se (SmartEiffel Compiler)
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/se.vim
" Last Change: 2004 May 16
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/se.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: tcl
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/tcl.vim
" Last Change: 2004 Mar 27
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tcl.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: HTML Tidy
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/tidy.vim
" Last Change: 2004 Mar 27
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/tidy.vim
" Last Change: 2004 Nov 27
" NOTE: set 'tidy_compiler_040800' if you are using the 4th August 2000 release
" of HTML Tidy.

View File

@@ -1,8 +1,8 @@
" Vim compiler file
" Compiler: xmllint
" Maintainer: Doug Kearns <djkea2@mugca.its.monash.edu.au>
" URL: http://mugca.its.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
" Last Change: 2004 Mar 27
" Maintainer: Doug Kearns <djkea2@gus.gscit.monash.edu.au>
" URL: http://gus.gscit.monash.edu.au/~djkea2/vim/compiler/xmllint.vim
" Last Change: 2004 Nov 27
if exists("current_compiler")
finish

View File

@@ -36,6 +36,7 @@ DOCS = \
help.txt \
howto.txt \
if_cscop.txt \
if_mzsch.txt \
if_ole.txt \
if_perl.txt \
if_pyth.txt \
@@ -67,7 +68,6 @@ DOCS = \
os_vms.txt \
os_win32.txt \
pattern.txt \
pi_expl.txt \
pi_gzip.txt \
pi_netrw.txt \
pi_spec.txt \
@@ -84,6 +84,7 @@ DOCS = \
sign.txt \
sponsor.txt \
starting.txt \
spell.txt \
syntax.txt \
tagsrch.txt \
term.txt \
@@ -156,6 +157,7 @@ HTMLS = \
help.html \
howto.html \
if_cscop.html \
if_mzsch.html \
if_ole.html \
if_perl.html \
if_pyth.html \
@@ -187,7 +189,6 @@ HTMLS = \
os_vms.html \
os_win32.html \
pattern.html \
pi_expl.html \
pi_gzip.html \
pi_netrw.html \
pi_spec.html \
@@ -204,6 +205,7 @@ HTMLS = \
sign.html \
sponsor.html \
starting.html \
spell.html \
syntax.html \
tagsrch.html \
tags.html \
@@ -254,10 +256,22 @@ HTMLS = \
windows.html \
workshop.html
CONVERTED = \
vim-it.UTF-8.1 \
evim-it.UTF-8.1 \
vimdiff-it.UTF-8.1 \
vimtutor-it.UTF-8.1 \
xxd-it.UTF-8.1 \
vim-ru.UTF-8.1 \
evim-ru.UTF-8.1 \
vimdiff-ru.UTF-8.1 \
vimtutor-ru.UTF-8.1 \
xxd-ru.UTF-8.1 \
.SUFFIXES:
.SUFFIXES: .c .o .txt .html
all: tags vim.man vimdiff.man vimtutor.man xxd.man
all: tags vim.man vimdiff.man vimtutor.man xxd.man $(CONVERTED)
# Use Vim to generate the tags file. Can only be used when Vim has been
# compiled and installed. Supports multiple languages.
@@ -365,3 +379,33 @@ os_risc.txt:
os_win32.txt:
touch os_win32.txt
vim-it.UTF-8.1: vim-it.1
iconv -f latin1 -t utf-8 $> >$@
evim-it.UTF-8.1: evim-it.1
iconv -f latin1 -t utf-8 $> >$@
vimdiff-it.UTF-8.1: vimdiff-it.1
iconv -f latin1 -t utf-8 $> >$@
vimtutor-it.UTF-8.1: vimtutor-it.1
iconv -f latin1 -t utf-8 $> >$@
xxd-it.UTF-8.1: xxd-it.1
iconv -f latin1 -t utf-8 $> >$@
vim-ru.UTF-8.1: vim-ru.1
iconv -f KOI8-R -t utf-8 $> >$@
evim-ru.UTF-8.1: evim-ru.1
iconv -f KOI8-R -t utf-8 $> >$@
vimdiff-ru.UTF-8.1: vimdiff-ru.1
iconv -f KOI8-R -t utf-8 $> >$@
vimtutor-ru.UTF-8.1: vimtutor-ru.1
iconv -f KOI8-R -t utf-8 $> >$@
xxd-ru.UTF-8.1: xxd-ru.1
iconv -f KOI8-R -t utf-8 $> >$@

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Sep 17
*autocmd.txt* For Vim version 7.0aa. Last change: 2005 Mar 04
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -14,9 +14,10 @@ For a basic explanation, see section |40.3| in the user manual.
4. Listing autocommands |autocmd-list|
5. Events |autocmd-events|
6. Patterns |autocmd-patterns|
7. Groups |autocmd-groups|
8. Executing autocommands |autocmd-execute|
9. Using autocommands |autocmd-use|
7. Buffer-local autocommands |autocmd-buflocal|
8. Groups |autocmd-groups|
9. Executing autocommands |autocmd-execute|
10. Using autocommands |autocmd-use|
{Vi does not have any of these commands}
{only when the |+autocmd| feature has not been disabled at compile time}
@@ -62,6 +63,9 @@ Note: The ":autocmd" command cannot be followed by another command, since any
order in which they were given. See |autocmd-nested|
for [nested].
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
See |autocmd-buflocal|.
Note that special characters (e.g., "%", "<cword>") in the ":autocmd"
arguments are not expanded when the autocommand is defined. These will be
expanded when the Event is recognized, and the {cmd} is executed. The only
@@ -148,6 +152,9 @@ If you provide the [group] argument, Vim lists only the autocommands for
[group]; otherwise, Vim lists the autocommands for ALL groups. Note that this
argument behavior differs from that for defining and removing autocommands.
In order to list buffer-local autocommands, use a pattern in the form <buffer>
or <buffer=N>. See |autocmd-buflocal|.
==============================================================================
5. Events *autocmd-events* *E215* *E216*
@@ -197,10 +204,12 @@ FilterReadPre Before reading a file from a filter command.
the current buffer, not the name of the
temporary file that is the output of the
filter command.
Not triggered when 'shelltemp' is off.
*FilterReadPost*
FilterReadPost After reading a file from a filter command.
Vim checks the pattern against the name of
the current buffer as with FilterReadPre.
Not triggered when 'shelltemp' is off.
*FileType*
FileType When the 'filetype' option has been set.
<afile> can be used for the name of the file
@@ -230,8 +239,10 @@ BufWritePost After writing the whole buffer to a file
*BufWriteCmd*
BufWriteCmd Before writing the whole buffer to a file.
Should do the writing of the file and reset
'modified' if successful. The buffer contents
should not be changed. |Cmd-event|
'modified' if successful, unless '+' is in
'cpo' and writing to another file |cpo-+|.
The buffer contents should not be changed.
|Cmd-event|
*FileWritePre*
FileWritePre Before writing to a file, when not writing the
whole buffer. Use the '[ and '] marks for the
@@ -261,11 +272,13 @@ FilterWritePre Before writing a file for a filter command or
the current buffer, not the name of the
temporary file that is the output of the
filter command.
Not triggered when 'shelltemp' is off.
*FilterWritePost*
FilterWritePost After writing a file for a filter command or
making a diff.
Vim checks the pattern against the name of
the current buffer as with FilterWritePre.
Not triggered when 'shelltemp' is off.
*FileChangedShell*
FileChangedShell When Vim notices that the modification time of
a file has changed since editing started.
@@ -273,7 +286,7 @@ FileChangedShell When Vim notices that the modification time of
change. |timestamp|
Mostly triggered after executing a shell
command, but also with a |:checktime| command
or when Vim regains input focus.
or when Gvim regains input focus.
This autocommand is triggered for each changed
file. It is not used when 'autoread' is set
and the buffer was not changed. If a
@@ -281,6 +294,9 @@ FileChangedShell When Vim notices that the modification time of
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.
NOTE: When this autocommand is executed, the
current buffer "%" may be different from the
buffer that was changed "<afile>".
@@ -315,6 +331,7 @@ 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.
See |autoload-functions|.
*CursorHold*
CursorHold When the user doesn't press a key for the time
specified with 'updatetime'. Not re-triggered
@@ -486,7 +503,7 @@ InsertChange When typing <Insert> while in Insert or
anything else that the user does not expect.
*InsertLeave*
InsertLeave When leaving Insert mode. Also when using
CTRL-O |i_CTRL-O|.
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
to |EncodingChanged|.
@@ -511,6 +528,20 @@ TermResponse After the response to |t_RV| is received from
the terminal. The value of |v:termresponse|
can be used to do things depending on the
terminal version.
QuickFixCmdPre *QuickFixCmdPre*
Before a quickfix command is run (|:make|,
|:grep|, |:grepadd|, |:vimgrep|,
|:vimgrepadd|). The pattern is matched against
the command being run. When |:grep| is used
but 'grepprg' is set to "internal" it still
matches "grep".
This command cannot be used to set the
'makeprg' and 'grepprg' variables.
If this command causes an error, the quickfix
command is not executed.
QuickFixCmdPost *QuickFixCmdPost*
like QuickFixCmdPre, but after a quickfix
command is run.
*UserGettingBored*
UserGettingBored When the user hits CTRL-C. Just kidding! :-)
*User*
@@ -551,6 +582,10 @@ two ways:
both short file name (as you typed it) and the full file name (after
expanding it to a full path and resolving symbolic links).
The special pattern <buffer> or <buffer=N> is used for buffer-local
autocommands |autocmd-buflocal|. This pattern is not matched against the name
of a buffer.
Examples: >
:autocmd BufRead *.txt set et
Set the 'et' option for all text files. >
@@ -606,7 +641,7 @@ Note that for all systems the '/' character is used for path separator (even
MS-DOS and OS/2). This was done because the backslash is difficult to use
in a pattern and to make the autocommands portable across different systems.
*autocmd-changes*
Matching with the pattern is done when an event is triggered. Changing the
buffer name in one of the autocommands, or even deleting the buffer, does not
change which autocommands will be executed. Example: >
@@ -619,8 +654,62 @@ the current buffer instead. Vim doesn't take into account that "*.foo"
doesn't match with that buffer name. It matches "*.foo" with the name of the
buffer at the moment the event was triggered.
However, buffer-local autocommands will not be executed for a buffer that has
been wiped out with |:bwipe|. After deleting the buffer with |:bdel| the
buffer actually still exists (it becomes unlisted), thus the autocommands are
still executed.
==============================================================================
7. Groups *autocmd-groups*
7. Buffer-local autocommands *autocmd-buflocal* *autocmd-buffer-local*
*<buffer=N>* *<buffer=abuf>* *E680*
Buffer-local autocommands are attached to a specific buffer. They are useful
if the buffer does not have a name and when the name does not match a specific
pattern. But it also means they must be explicitly added to each buffer.
Instead of a pattern buffer-local autocommands use one of these forms:
<buffer> current buffer
<buffer=99> buffer number 99
<buffer=abuf> using <abuf> (only when executing autocommands)
|<abuf>|
Examples: >
:au CursorHold <buffer> echo 'hold'
:au CursorHold <buffer=33> echo 'hold'
:au CursorHold <buffer=abuf> echo 'hold'
All the commands for autocommands also work with buffer-local autocommands,
simply use the special string instead of the pattern. Examples: >
:au! * <buffer> " remove buffer-local autotommands for
" current buffer
:au! * <buffer=33> " remove buffer-local autotommands for
" buffer #33
:dobuf :au! CursorHold <buffer> " remove autocmd for given event for all
" buffers
:au * <buffer> " list buffer-local autocommands for
" current buffer
Note that when an autocommand is defined for the current buffer, it is stored
with the buffer number. Thus it uses the form "<buffer=12>", where 12 is the
number of the current buffer. You will see this when listing autocommands,
for example.
To test for presence of buffer-local autocommands use the |exists()| function
as follows: >
:if exists("#CursorHold#<buffer=12>") | ... | endif
:if exists("#CursorHold#<buffer>") | ... | endif " for current buffer
When a buffer is wiped out its buffer-local autocommands are also gone, of
course. Note that when deleting a buffer, e.g., with ":bdel", it is only
unlisted, the autocommands are still present. In order to see the removal of
buffer-local autocommands: >
:set verbose=6
It is not possible to define buffer-local autocommands for a non-existent
buffer.
==============================================================================
8. Groups *autocmd-groups*
Autocommands can be put together in a group. This is useful for removing or
executing a group of autocommands. For example, all the autocommands for
@@ -668,7 +757,7 @@ This prevents having the autocommands defined twice (e.g., after sourcing the
.vimrc file again).
==============================================================================
8. Executing autocommands *autocmd-execute*
9. Executing autocommands *autocmd-execute*
Vim can also execute Autocommands non-automatically. This is useful if you
have changed autocommands, or when Vim has executed the wrong autocommands
@@ -711,7 +800,7 @@ option will not cause any commands to be executed.
options, change highlighting, and things like that.
==============================================================================
9. Using autocommands *autocmd-use*
10. Using autocommands *autocmd-use*
For WRITING FILES there are four possible sets of events. Vim uses only one
of these sets for a write command:
@@ -924,4 +1013,5 @@ The |v:cmdbang| variable is one when "!" was used, zero otherwise.
See the $VIMRUNTIME/plugin/netrw.vim for examples.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.0aa. Last change: 2004 Sep 16
*change.txt* For Vim version 7.0aa. Last change: 2005 Mar 16
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -13,6 +13,10 @@ commands with the "." command.
2. Delete and insert |delete-insert|
3. Simple changes |simple-change| *changing*
4. Complex changes |complex-change|
4.1 Filter commands |filter|
4.2 Substitute |:substitute|
4.3 Search and replace |search-replace|
4.4 Changing tabs |change-tabs|
5. Copying and moving text |copy-move|
6. Formatting text |formatting|
@@ -48,6 +52,8 @@ For inserting text see |insert.txt|.
of the line and [count]-1 more lines [into register
x]; synonym for "d$".
(not |linewise|)
When the '#' flag is in 'cpoptions' the count is
ignored.
{Visual}["x]x or *v_x* *v_d* *v_<Del>*
{Visual}["x]d or
@@ -106,19 +112,22 @@ gJ Join [count] lines, with a minimum of two lines.
Vi}
*:j* *:join*
:[range]j[oin][!] Join [range] lines. Same as "J", except with [!]
:[range]j[oin][!] [flags]
Join [range] lines. Same as "J", except with [!]
the join does not insert or delete any spaces.
If a [range] has equal start and end values, this
command does nothing. The default behavior is to
join the current line with the line below it.
{not in Vi: !}
See |ex-flags| for [flags].
:[range]j[oin][!] {count}
:[range]j[oin][!] {count} [flags]
Join {count} lines, starting with [range] (default:
current line |cmdline-ranges|). Same as "J", except
with [!] the join does not insert or delete any
spaces.
{not in Vi: !}
See |ex-flags| for [flags].
These commands delete the <EOL> between lines. This has the effect of joining
multiple lines into one line. You can repeat these commands (except ":j") and
@@ -230,10 +239,12 @@ If you prefer "cw" to include the space after a word, use this mapping: >
:map cw dwi
<
*:c* *:ch* *:change*
:{range}c[hange] Replace lines of text with some different text.
:{range}c[hange][!] Replace lines of text with some different text.
Type a line containing only "." to stop replacing.
Without {range}, this command changes only the current
line.
Adding [!] toggles 'autoindent' for the time this
command is executed.
==============================================================================
3. Simple changes *simple-change*
@@ -346,29 +357,35 @@ CTRL-X Subtract [count] from the number or alphabetic
The CTRL-A and CTRL-X commands work for (signed) decimal numbers, unsigned
octal and hexadecimal numbers and alphabetic characters. This depends on the
'nrformats' option.
- When 'nrformats' includes "alpha", Vim will change the alphabetic character
under or after the cursor. This is useful to make lists with an alphabetic
index.
- When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
to be octal, unless the number includes a '8' or '9'. Other numbers are
decimal and may have a preceding minus sign.
If the cursor is on a number, the commands apply to that number; otherwise
Vim uses the number to the right of the cursor.
- When 'nrformats' includes "hex", Vim assumes numbers starting with '0x' or
'0X' are hexadecimal. The case of the rightmost letter in the number
determines the case of the resulting hexadecimal number. If there is no
letter in the current number, Vim uses the previously detected case.
- When 'nrformats' includes "octal", Vim considers numbers starting with a '0'
to be octal. Other numbers are decimal and may have a preceding minus sign.
If the cursor is on a number, the commands apply to that number; otherwise
Vim uses the number to the right of the cursor.
- When 'nrformats' includes "alpha", Vim will change the alphabetic character
under or after the cursor. This is useful to make lists with an alphabetic
index.
For numbers with leading zeros (including all octal and hexadecimal numbers),
Vim preserves the number of characters in the number when possible. CTRL-A on
"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff". Note that
when 'nrformats' includes "octal", decimal numbers with leading zeros are
impossible because they are indistinguishable from octal numbers.
"0077" results in "0100", CTRL-X on "0x100" results in "0x0ff".
There is one exception: When a number that starts with a zero is found not to
be octal (it contains a '8' or '9'), but 'nrformats' does include "octal",
leading zeros are removed to avoid that the result may be recognized as an
octal number.
Note that when 'nrformats' includes "octal", decimal numbers with leading
zeros cause mistakes, because they can be confused with octal numbers.
The CTRL-A command is very useful in a macro. Example: Use the following
steps to make a numbered list.
1. Create the first list entry, make sure it starts with a number.
2. qa - start recording into buffer 'a'
2. qa - start recording into register 'a'
3. Y - yank the entry
4. p - put a copy of the entry below the first one
5. CTRL-A - increment the number
@@ -412,12 +429,15 @@ SHIFTING LINES LEFT OR RIGHT *shift-left-right*
lines to [indent] (default 0). {not in Vi}
*:>*
:[range]> Shift {count} [range] lines one 'shiftwidth' right.
:[range]> [flags] Shift {count} [range] lines one 'shiftwidth' right.
Repeat '>' for shifting multiple 'shiftwidth's.
See |ex-flags| for [flags].
:[range]> {count} Shift {count} lines one 'shiftwidth' right, starting
:[range]> {count} [flags]
Shift {count} lines one 'shiftwidth' right, starting
with [range] (default current line |cmdline-ranges|).
Repeat '>' for shifting multiple 'shiftwidth's.
See |ex-flags| for [flags].
The ">" and "<" commands are handy for changing the indentation within
programs. Use the 'shiftwidth' option to set the size of the white space
@@ -449,7 +469,19 @@ For example: >
==============================================================================
4. Complex changes *complex-change*
*!* *filter*
4.1 Filter commands *filter*
A filter is a program that accepts text at standard input, changes it in some
way, and sends it to standard output. You can use the commands below to send
some text through a filter, so that it is replace by the filter output.
Examples of filters are "sort", which sorts lines alphabetically, and
"indent", which formats C program files (you need a version of indent that
works like a filter; not all versions do). The 'shell' option specifies the
shell Vim uses to execute the filter command (See also the 'shelltype'
option). You can repeat filter commands with ".". Vim does not recognize a
comment (starting with '"') after the ":!" command.
*!*
!{motion}{filter} Filter {motion} text lines through the external
program {filter}.
@@ -492,18 +524,10 @@ For example: >
{Visual}= Filter the highlighted lines like with ={motion}.
{not in Vi}
A filter is a program that accepts text at standard input, changes it in some
way, and sends it to standard output. You can use the commands above to send
some text through a filter. Examples of filters are "sort", which sorts lines
alphabetically, and "indent", which formats C program files (you need a
version of indent that works like a filter; not all versions do). The 'shell'
option specifies the shell Vim uses to execute the filter command (See also
the 'shelltype' option). You can repeat filter commands with ".". Vim does
not recognize a comment (starting with '"') after the ":!" command.
*:s* *:su* *:substitute*
:[range]s[ubstitute]/{pattern}/{string}/[&][c][e][g][p][r][i][I] [count]
4.2 Substitute *:substitute*
*:s* *:su*
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
For each line in [range] replace a match of {pattern}
with {string}.
For the {pattern} see |pattern|.
@@ -515,31 +539,31 @@ not recognize a comment (starting with '"') after the ":!" command.
starting with the last line in [range]. When [range]
is omitted start in the current line.
Also see |cmdline-ranges|.
See |:s_flags| for the flags.
See |:s_flags| for [flags].
:[range]s[ubstitute] [c][e][g][p][r][i][I] [count]
:[range]&[&][c][e][g][p][r][i][I] [count] *:&*
:[range]s[ubstitute] [flags] [count]
:[range]&[&][flags] [count] *:&*
Repeat last :substitute with same search pattern and
substitute string, but without the same flags. You
may add extra flags (see |:s_flags|).
may add [flags], see |:s_flags|.
Note that after ":substitute" the '&' flag can't be
used, it's recognized as a pattern separator.
The space between ":substitute" and the 'c', 'g' and
'r' flags isn't required, but in scripts it's a good
idea to keep it to avoid confusion.
:[range]~[&][c][e][g][p][r][i][I] [count] *:~*
:[range]~[&][flags] [count] *:~*
Repeat last substitute with same substitute string
but with last used search pattern. This is like
":&r". See |:s_flags| for the flags.
":&r". See |:s_flags| for [flags].
*&*
*&*
& Synonym for ":s//~/" (repeat last substitute). Note
that the flags are not remembered, thus it might
actually work differently. You can use ":&&" to keep
the flags.
*g&*
*g&*
g& Synonym for ":%s//~/&" (repeat last substitute on all
lines with the same flags).
Mnemonic: global substitute. {not in Vi}
@@ -605,8 +629,15 @@ The flags that you can use for the substitute commands:
options are not used.
{not in Vi}
[n] Report the number of matches, do not actually substitute. The [c]
flag is ignored. The matches are reported as if 'report' is zero.
Useful to |count-items|.
[p] Print the line containing the last substitute.
{not in Vi}
[#] Like [p] and prepend the line number.
[l] Like [l] 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
@@ -652,6 +683,9 @@ For the definition of a pattern, see |pattern|.
When the {string} starts with "\=" it is evaluated as an expression, see
|sub-replace-expression|. Otherwise these characters in {string} have a
special meaning:
*:s%*
When {string} is equal to "%" and '/' is included with the 'cpotions' option,
then the {string} of the previous substitute command is used. |cpo-/|
magic nomagic action ~
& \& replaced with the whole matched pattern *s/\&*
@@ -741,7 +775,9 @@ Example: >
This replaces an end-of-line with a new line containing the value of $HOME.
*:pro* *:promptfind*
4.3 Search and replace *search-replace*
*:pro* *:promptfind*
:promptf[ind] [string]
Put up a Search dialog. When [string] is given, it is
used as the initial search string.
@@ -753,6 +789,8 @@ This replaces an end-of-line with a new line containing the value of $HOME.
given, it is used as the initial search string.
{only for Win32, Motif and GTK GUI}
4.4 Changing tabs *change-tabs*
*:ret* *:retab*
:[range]ret[ab][!] [new_tabstop]
Replace all sequences of white-space containing a
@@ -851,8 +889,10 @@ inside of strings can change! Also see 'softtabstop' option. >
*<MiddleMouse>*
["x]<MiddleMouse> Put the text from a register before the cursor [count]
times. Uses the "* register, unless another is
specified. Using the mouse only works when 'mouse'
contains 'n' or 'a'.
specified.
Leaves the cursor at the end of the new text.
Using the mouse only works when 'mouse' contains 'n'
or 'a'.
{not in Vi}
If you have a scrollwheel and often accidentally paste
text, you can use these mappings to disable the
@@ -965,10 +1005,11 @@ Vim fills this register with text deleted with the "d", "c", "s", "x" commands
or copied with the yank "y" command, regardless of whether or not a specific
register was used (e.g. "xdd). This is like the unnamed register is pointing
to the last used register. An exception is the '_' register: "_dd does not
store the deleted text in any register. Vim uses the contents of this
register for any put command (p or P) which does not specify a register.
Additionally you can access it with the name '"'. This means you have to type
two double quotes. Writing to the "" register writes to register "0.
store the deleted text in any register.
Vim uses the contents of the unnamed register for any put command (p or P)
which does not specify a register. Additionally you can access it with the
name '"'. This means you have to type two double quotes. Writing to the ""
register writes to register "0.
{Vi: register contents are lost when changing files, no '"'}
2. Numbered registers "0 to "9 *quote_number* *quote0* *quote1*
@@ -979,9 +1020,9 @@ unless the command specified another register with ["x].
Numbered register 1 contains the text deleted by the most recent delete or
change command, unless the command specified another register or the text is
less than one line (the small delete register is used then). An exception is
made for these commands: |%|, |(|, |)|, |`|, |/|, |?|, |n|, |N|, |{| and |}|.
Register "1 is always used then (this is Vi compatible). The "- register is
used as well if the delete is within a line.
made for the delete operator with these movement commands: |%|, |(|, |)|, |`|,
|/|, |?|, |n|, |N|, |{| and |}|. Register "1 is always used then (this is Vi
compatible). The "- register is used as well if the delete is within a line.
With each successive deletion or change, Vim shifts the previous contents
of register 1 into register 2, 2 into 3, and so forth, losing the previous
contents of register 9.
@@ -996,7 +1037,8 @@ except when the command specifies a register with ["x].
4. Named registers "a to "z or "A to "Z *quote_alpha* *quotea*
Vim fills these registers only when you say so. Specify them as lowercase
letters to replace their previous contents or as uppercase letters to append
to their previous contents.
to their previous contents. When the '>' flag is present in 'cpoptions' then
a line break is inserted before the appended text.
5. Read-only registers ":, "., "% and "#
These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
@@ -1113,13 +1155,17 @@ The next three commands always work on whole lines.
compile time.
*gq*
gq{motion} Format the lines that {motion} moves over. The
'textwidth' option controls the length of each
formatted line (see below). If the 'textwidth' option
is 0, the formatted line length is the screen width
(with a maximum width of 79). {not in Vi}
gq{motion} Format the lines that {motion} moves over.
If 'formatprg' is empty formatting is done internally
and the 'textwidth' option controls the length of each
formatted line (see below).
If the 'textwidth' option is 0, the formatted line
length is the screen width (with a maximum width of
79). {not in Vi}
The 'formatoptions' option controls the type of
formatting |fo-table|.
The cursor is left on the first non-blank of the last
formatted line.
NOTE: The "Q" command formerly performed this
function. If you still want to use "Q" for
formatting, use this mapping: >
@@ -1312,10 +1358,12 @@ a Automatic formatting of paragraphs. Every time text is inserted or
deleted the paragraph will be reformatted. See |auto-format|.
When the 'c' flag is present this only happens for recognized
comments.
n When formatting text, recognize numbered lists. The indent of the
text after the number is used for the next line. The number may
optionally be followed by '.', ':', ')', ']' or '}'. Note that
'autoindent' must be set too. Doesn't work well together with "2".
n When formatting text, recognize numbered lists. This actually uses
the 'formatlistpat' option, thus any kind of list can be used. The
indent of the text after the number is used for the next line. The
default is to find a number, optionally be followed by '.', ':', ')',
']' or '}'. Note that 'autoindent' must be set too. Doesn't work
well together with "2".
Example: >
1. the first item
wraps

View File

@@ -1,4 +1,4 @@
*cmdline.txt* For Vim version 7.0aa. Last change: 2004 Jul 14
*cmdline.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -17,8 +17,9 @@ Basic command line editing is explained in chapter 20 of the user manual
2. Command-line completion |cmdline-completion|
3. Ex command-lines |cmdline-lines|
4. Ex command-line ranges |cmdline-ranges|
5. Ex special characters |cmdline-special|
6. Command-line window |cmdline-window|
5. Ex command-line flags |ex-flags|
6. Ex special characters |cmdline-special|
7. Command-line window |cmdline-window|
==============================================================================
1. Command-line editing *cmdline-editing*
@@ -153,6 +154,10 @@ CTRL-R {0-9a-z"%#:-=.} *c_CTRL-R* *c_<C-R>*
'=' the expression register: you are prompted to
enter an expression (see |expression|)
See |registers| about registers. {not in Vi}
Implementation detail: When using the |expression| register
and invoking setcmdpos(), this sets the position before
inserting the resulting string. Use CTRL-R CTRL-R to set the
position afterwards.
CTRL-R CTRL-F *c_CTRL-R_CTRL-F* *c_<C-R>_<C-F>*
CTRL-R CTRL-P *c_CTRL-R_CTRL-P* *c_<C-R>_<C-P>*
@@ -355,6 +360,8 @@ CTRL-D List names that match the pattern in front of the cursor.
When showing file names, directories are highlighted (see
'highlight' option). Names where 'suffixes' matches are moved
to the end.
The 'wildoptions' option can be set to "tagfile" to list the
file of matching tags.
*c_CTRL-I* *c_wildchar* *c_<Tab>*
'wildchar' option
A match is done on the pattern in front of the cursor. The
@@ -662,7 +669,20 @@ Visual Mode and Range *v_:*
lines.
==============================================================================
5. Ex special characters *cmdline-special*
5. Ex command-line flags *ex-flags*
These flags are supported by a selection of Ex commands. They print the line
that the cursor ends up after executing the command:
l output like for |:list|
# add line number
p output like for |:print|
The flags can be combined, thus "l#" uses both a line number and |:list| style
output.
==============================================================================
6. Ex special characters *cmdline-special*
In Ex commands, at places where a file name can be used, the following
characters have a special meaning. These can also be used in the expression

View File

@@ -1,4 +1,4 @@
*debugger.txt* For Vim version 7.0aa. Last change: 2001 Dec 22
*debugger.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
VIM REFERENCE MANUAL by Gordon Prieur
@@ -90,20 +90,23 @@ was to allow Sun's Visual WorkShop debugger to display expression evaluations.
However, the feature was implemented in as general a manner as possible and
could be used for displaying other information as well.
The Balloon Evaluation has some settable parameters too. The font list and
colors can be set via X resources (XmNballoonEvalFontList,
The Balloon Evaluation has some settable parameters too. For Motif the font
list and colors can be set via X resources (XmNballoonEvalFontList,
XmNballoonEvalBackground, and XmNballoonEvalForeground).
The 'balloondelay' option sets the delay before an attempt is made to show a
balloon.
The 'ballooneval' option needs to be set to switch it on.
Balloon evaluation is only available when compiled with the |+balloon_eval|
and |+sun_workshop| features.
feature.
The Balloon evaluation functions are also used to show a tooltip for the
toolbar. The 'ballooneval' option does not need to be set for this. But the
other settings apply.
Another way to use the balloon is with the 'balloonexpr' option. This is
completely user definable.
==============================================================================
2. Vim Compile Options *debugger-compilation*
@@ -129,7 +132,9 @@ all the above flags:
==============================================================================
3. Integrated Debuggers *debugger-integration*
Currently the only fully integrated debugger/IPE/IDE is Sun's Visual WorkShop
Integrated Programming Environment.
One fully integrated debugger/IPE/IDE is Sun's Visual WorkShop Integrated
Programming Environment.
For Sun NetBeans support see |netbeans|.
vim:tw=78:sw=4:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.0aa. Last change: 2004 Jul 20
*diff.txt* For Vim version 7.0aa. Last change: 2005 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -157,8 +157,8 @@ original file and diff with that. For example: >
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
buffer.
buffer. If you don't want a buffer to remain used for the diff do ":set
nodiff" before hiding it.
*:diffu* *:diffupdate*
Vim attempts to keep the differences updated when you make changes to the

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.0aa. Last change: 2004 Oct 07
*digraph.txt* For Vim version 7.0aa. Last change: 2005 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -161,8 +161,13 @@ These are the RFC1345 digraphs for the one-byte characters. See the output of
":digraphs" for the others. The characters above 255 are only available when
Vim was compiled with the |+multi_byte| feature.
EURO
Exception: RFC1345 doesn't specify the euro sign. In Vim the digraph =e was
added for this.
added for this. Note the difference between latin1, where the digraph Cu is
used for the currency sign, and latin9 (iso-8859-15), where the digraph =e is
used for the euro sign, while both of them are the character 164, 0xa4.
*digraph-table*
char digraph hex dec official name ~
^@ NU 0x00 0 NULL (NUL)

View File

@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.0aa. Last change: 2004 Aug 29
*editing.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8,21 +8,22 @@ Editing files *edit-files*
1. Introduction |edit-intro|
2. Editing a file |edit-a-file|
3. Dialogs |edit-dialogs|
4. The current directory |current-directory|
5. The argument list |argument-list|
6. Writing |writing|
7. Writing and quitting |write-quit|
3. The argument list |argument-list|
4. Writing |writing|
5. Writing and quitting |write-quit|
6. Dialogs |edit-dialogs|
7. The current directory |current-directory|
8. Editing binary files |edit-binary|
9. Encryption |encryption|
10. Timestamps |timestamps|
11. File Searching |file-searching|
==============================================================================
1. Introduction *edit-intro*
Editing a file with Vim means:
1. reading the file into the internal buffer
1. reading the file into a buffer
2. changing the buffer with editor commands
3. writing the buffer into a file
@@ -30,12 +31,13 @@ Editing a file with Vim means:
As long as you don't write the buffer, the original file remains unchanged.
If you start editing a file (read a file into the buffer), the file name is
remembered as the "current file name". This is also known as the name of the
current buffer.
current buffer. It can be used with "%" on the command line |:_%|.
*alternate-file*
If there already was a current file name, then that one becomes the alternate
file name. It can later be used with "#" on the command line |:_#|. However,
the alternate file name is not changed when |:keepalt| is used.
file name. It can be used with "#" on the command line |:_#| and you can use
the |CTRL-^| command to toggle between the current and the alternate file.
However, the alternate file name is not changed when |:keepalt| is used.
*:keepalt* *:keepa*
:keepalt {cmd} Execute {cmd} while keeping the current alternate file
@@ -43,18 +45,19 @@ the alternate file name is not changed when |:keepalt| is used.
with a function) may still set the alternate file
name. {not in Vi}
All file names are remembered in the file list. When you enter a file name,
for editing (e.g., with ":e filename") or writing (e.g., with (:w file name"),
the file name is added to the list. You can use this list to remember which
files you edited and to quickly switch from one file to another with the
CTRL-^ command (e.g., to copy text). First type the number of the file and
then hit CTRL-^. {Vi: only one alternate file name}
All file names are remembered in the buffer list. When you enter a file name,
for editing (e.g., with ":e filename") or writing (e.g., with ":w file name"),
the file name is added to the list. You can use the buffer list to remember
which files you edited and to quickly switch from one file to another (e.g.,
to copy text) with the |CTRL-^| command. First type the number of the file
and then hit CTRL-^. {Vi: only one alternate file name is remembered}
CTRL-G or *CTRL-G* *:f* *:fi* *:file*
:f[ile] Prints the current file name (as typed), the
cursor position (unless the 'ruler' option is set),
and the file status (readonly, modified, read errors,
new file)). See the 'shortmess' option about how tho
new file). See the 'shortmess' option about how tho
make this message shorter. {Vi does not include
column number}
@@ -66,25 +69,31 @@ CTRL-G or *CTRL-G* *:f* *:fi* *:file*
buffer number is also given. {not in Vi}
*g_CTRL-G* *word-count* *byte-count*
g CTRL-G Prints the current position of the cursor in four
ways: Column, Line, Word and Byte. If there are
characters in the line that take more than one
position on the screen (<Tab> or special character),
both the "real" column and the screen column are
shown, separated with a dash. See also 'ruler'
option. {not in Vi}
g CTRL-G Prints the current position of the cursor in five
ways: Column, Line, Word, Character and Byte. If the
number of Characters and Bytes is the same then the
Character position is omitted.
If there are characters in the line that take more
than one position on the screen (<Tab> or special
character), both the "real" column and the screen
column are shown, separated with a dash.
See also 'ruler' option. {not in Vi}
*v_g_CTRL-G*
{Visual}g CTRL-G Similar to "g CTRL-G", but Word, Line, and Byte counts
for the visually selected region are displayed. In
Blockwise mode, Column count is also shown. (For
{Visual}g CTRL-G Similar to "g CTRL-G", but Word, Character, Line, and
Byte counts for the visually selected region are
displayed.
In Blockwise mode, Column count is also shown. (For
{Visual} see |Visual-mode|.)
{not in VI}
*:file_f*
:f[ile][!] {name} Sets the current file name to {name}. The optional !
avoids truncating the message, as with |:file|.
If the buffer did have a name, that name becomes the
|alternate-file| name. An unlisted buffer is created
to hold the old name.
*:0file*
:0f[ile][!] Remove the name of the current buffer. The optional !
avoids truncating the message, as with |:file|. {not
in Vi}
@@ -105,7 +114,7 @@ string, it is often displayed with HOME replaced with "~". This was done to
keep file names short. When reading or writing files the full name is still
used, the "~" is only used when displaying file names. When replacing the
file name would result in just "~", "~/" is used instead (to avoid confusion
with 'backupext' set to "~").
between options set to $HOME with 'backupext' set to "~").
When writing the buffer, the default is to use the current file name. Thus
when you give the "ZZ" or ":wq" command, the original file will be
@@ -212,11 +221,10 @@ If you want to keep the changed buffer without saving it, switch on the
{Vi: no ++opt}
:e[dit] [++opt] [+cmd] #[count]
Edit the [count]th alternate file name (as shown by
:files). This command does the same as
[count] CTRL-^. But ":e #" doesn't work if the
alternate buffer doesn't have a file name, while
CTRL-^ still works then.
Edit the [count]th buffer (as shown by |:files|).
This command does the same as [count] CTRL-^. But ":e
#" doesn't work if the alternate buffer doesn't have a
file name, while CTRL-^ still works then.
Also see |++opt| and |+cmd|.
{Vi: no ++opt}
@@ -255,20 +263,20 @@ If you want to keep the changed buffer without saving it, switch on the
*:vi* *:visual*
:vi[sual][!] [++opt] [+cmd] [file]
When entered in Ex mode: Leave |Ex-mode|, go back to
When used in Ex mode: Leave |Ex-mode|, go back to
Normal mode. Otherwise same as |:edit|.
*:vie* *:view*
:vie[w] [++opt] [+cmd] file
When entered in Ex mode: Leave Ex mode, go back to
When used in Ex mode: Leave |Ex mode|, go back to
Normal mode. Otherwise same as |:edit|, but set
'readonly' option for this buffer. {not in Vi}
*CTRL-^* *CTRL-6*
[count]CTRL-^ Edit [count]th alternate file (equivalent to ":e
#[count]"). Without count this gets you to the
previously edited file. This is a quick way to toggle
between two (or more) files.
CTRL-^ Edit the alternate file (equivalent to ":e #").
Mostly the alternate file is the previously edited
file. This is a quick way to toggle between two
files.
If the 'autowrite' or 'autowriteall' option is on and
the buffer was changed, write it.
Mostly the ^ character is positioned on the 6 key,
@@ -276,6 +284,12 @@ If you want to keep the changed buffer without saving it, switch on the
But on some non-US keyboards CTRL-^ is produced in
another way.
{count}CTRL-^ Edit [count]th file in the buffer list (equivalent to
":e #[count]"). This is a quick way to switch between
files.
See |CTRL-^| above for further details.
{not in Vi}
[count]]f *]f* *[f*
[count][f Same as "gf". Deprecated.
@@ -332,11 +346,12 @@ current file name.
Note for systems other than Unix and MS-DOS: When using a command that
accepts a single file name (like ":edit file") spaces in the file name are
allowed, but trailing spaces are ignored. This is useful on systems that
allow file names with embedded spaces (like the Amiga). Example: The command
":e Long File Name " will edit the file "Long File Name". When using a
command that accepts more than one file name (like ":next file1 file2")
embedded spaces must be escaped with a backslash.
allow file names with embedded spaces (like MS-Windows and the Amiga).
Example: The command ":e Long File Name " will edit the file "Long File
Name". When using a command that accepts more than one file name (like ":next
file1 file2") embedded spaces must be escaped with a backslash.
*wildcard*
Wildcards in {file} are expanded. Which wildcards are supported depends on
the system. These are the common ones:
* matches anything, including nothing
@@ -348,7 +363,8 @@ as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this
is to use "path\[[]abc]". Then the file "path[abc]" literally.
*backtick-expansion* *`-expansion*
On Unix you can also use backticks in the file name, for example: >
On Unix and a few other systems you can also use backticks in the file name,
for example: >
:e `find . -name ver\\*.c -print`
The backslashes before the star are required to prevent "ver*.c" to be
expanded by the shell before executing the find program.
@@ -357,12 +373,11 @@ backticks must be around the whole item. It is not possible to have text
directly before the first or just after the last backtick.
*`=*
You can have the backticks expanded as a Vim expression, instead of
an external command, by using the syntax `={expr}` e.g.: >
:let foo='bar'
:e `=foo . ".c" `
This will edit "bar.c". The expression can contain just about anything, thus
this can also be used to avoid the special meaning of '"', '|', '%' and '#'.
You can have the backticks expanded as a Vim expression, instead of an
external command, by using the syntax `={expr}` e.g.: >
:e `=tempname()`
The expression can contain just about anything, thus this can also be used to
avoid the special meaning of '"', '|', '%' and '#'.
*++opt* *[++opt]*
The [++opt] argument can be used to force the value of 'fileformat' or
@@ -467,241 +482,17 @@ You can encrypt files that are written by setting the 'key' option. This
provides some security against others reading your files. |encryption|
File Searching *file-searching*
{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:
1) Downward search:
Downward search uses the wildcards '*', '**' and possibly others
supported by your operating system. '*' and '**' are handled inside Vim, so
they work on all operating systems.
The usage of '*' is quite simple: It matches 0 or more characters.
'**' is more sophisticated:
- It ONLY matches directories.
- It matches up to 30 directories deep, so you can use it to search an
entire directory tree
- The maximum number of levels matched can be given by appending a number
to '**'.
Thus '/usr/**2' can match: >
/usr
/usr/include
/usr/include/sys
/usr/include/g++
/usr/lib
/usr/lib/X11
....
< It does NOT match '/usr/include/g++/std' as this would be three
levels.
The allowed number range is 0 ('**0' is removed) to 255.
If the given number is smaller than 0 it defaults to 30, if it's
bigger than 255 it defaults to 255.
- '**' can only be at the end of the path or be followed by a path
separator or by a number and a path separator.
You can combine '*' and '**' in any order: >
/usr/**/sys/*
/usr/*/sys/**
/usr/**2/sys/*
2) Upward search:
Here you can give a directory and then search the directory tree upward for
a file. You could give stop-directories to limit the upward search. The
stop-directories are appended to the path (for the 'path' option) or to
the filename (for the 'tags' option) with a ';'. If you want several
stop-directories separate them with ';'. If you want no stop-directory
("search upward till the root directory) just use ';'. >
/usr/include/sys;/usr
< will search in: >
/usr/include/sys
/usr/include
/usr
<
If you use a relative path the upward search is started in Vim's current
directory or in the directory of the current file (if the relative path
starts with './' and 'd' is not included in 'cpoptions').
If Vim's current path is /u/user_x/work/release and you do >
:set path=include;/u/user_x
< and then search for a file with |gf| the file is searched in: >
/u/user_x/work/release/include
/u/user_x/work/include
/u/user_x/include
3) Combined up/downward search
If Vim's current path is /u/user_x/work/release and you do >
set path=**;/u/user_x
< and then search for a file with |gf| the file is searched in: >
/u/user_x/work/release/**
/u/user_x/work/**
/u/user_x/**
<
BE CAREFUL! This might consume a lot of time, as the search of
'/u/user_x/**' includes '/u/user_x/work/**' and
'/u/user_x/work/release/**'. So '/u/user_x/work/release/**' is searched
three and '/u/user_x/work/**' is searched two times.
In the above example you might want to set path to: >
:set path=**,/u/user_x/**
< This searches: >
/u/user_x/work/release/**
/u/user_x/**
< This searches the same directories, but in a different order.
==============================================================================
3. Dialogs *edit-dialogs*
*:confirm* *:conf*
:conf[irm] {command} Execute {command}, and use a dialog when an
operation has to be confirmed. Can be used on the
":q", ":qa" and ":w" commands (the latter to over-ride
a read-only setting).
Examples: >
:confirm w foo
< Will ask for confirmation when "foo" already exists. >
:confirm q
< Will ask for confirmation when there are changes. >
:confirm qa
< If any modified, unsaved buffers exist, you will be prompted to save
or abandon each one. There are also choices to "save all" or "abandon
all".
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|.
{only in Win32, Athena, Motif, GTK and Mac GUI}
When ":browse" is not possible you get an error
message. If the |+browse| feature is missing or the
{command} doesn't support browsing, the {command} is
executed without a dialog.
":browse set" works like |:options|.
The syntax is best shown via some examples: >
:browse e $vim/foo
< Open the browser in the $vim/foo directory, and edit the
file chosen. >
:browse e
< Open the browser in the directory specified with 'browsedir',
and edit the file chosen. >
:browse w
< Open the browser in the directory of the current buffer,
with the current buffer filename as default, and save the
buffer under the filename chosen. >
:browse w C:/bar
< Open the browser in the C:/bar directory, with the current
buffer filename as default, and save the buffer under the
filename chosen.
Also see the |'browsedir'| option.
For versions of Vim where browsing is not supported, the command is executed
unmodified.
*browsefilter*
For MS Windows, you can modify the filters that are used in the browse dialog.
By setting the g:browsefilter or b:browsefilter variables, you can change the
filters globally or locally to the buffer. The variable is set to a string in
the format "{filter label}\t{pattern};{pattern}\n" where {filter label} is the
text that appears in the "Files of Type" comboBox, and {pattern} is the
pattern which filters the filenames. Several patterns can be given, separated
by ';'.
For Motif the same format is used, but only the very first pattern is actually
used (Motif only offers one pattern, but you can edit it).
For example, to have only Vim files in the dialog, you could use the following
command: >
let g:browsefilter="Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n"
You can override the filter setting on a per-buffer basis by setting the
b:browsefilter variable. You would most likely set b:browsefilter in a
filetype plugin, so that the browse dialog would contain entries related to
the type of file you are currently editing. Disadvantage: This makes it
difficult to start editing a file of a different type. To overcome this, you
may want to add "All Files\t*.*\n" as the final filter, so that the user can
still access any desired file.
==============================================================================
4. The current directory *current-directory*
You may use the |:cd| and |:lcd| commands to change to another directory, so
you will not have to type that directory name in front of the file names. It
also makes a difference for executing external commands, e.g. ":!ls".
*:cd* *E472*
:cd On non-Unix systems: Print the current directory
name. On Unix systems: Change the current directory
to the home directory. Use |:pwd| to print the
current directory on all systems.
:cd {path} Change the current directory to {path}.
If {path} is relative, it is searched for in the
directories listed in |'cdpath'|.
Does not change the meaning of an already opened file,
because its full path name is remembered. Files from
the |arglist| may change though!
On MS-DOS this also changes the active drive.
To change to the directory of the current file: >
:cd %:h
<
*:cd-* *E186*
:cd - Change to the previous current directory (before the
previous ":cd {path}" command). {not in Vi}
*:chd* *:chdir*
:chd[ir] [path] Same as |:cd|.
*:lc* *:lcd*
:lc[d] {path} Like |:cd|, but only set the current directory for the
current window. The current directory for other
windows is not changed. {not in Vi}
*:lch* *:lchdir*
:lch[dir] Same as |:lcd|. {not in Vi}
*:pw* *:pwd* *E187*
:pw[d] Print the current directory name. {Vi: no pwd}
Also see |getcwd()|.
So long as no |:lcd| command has been used, all windows share the same current
directory. Using a command to jump to another window doesn't change anything
for the current directory.
When a |:lcd| command has been used for a window, the specified directory
becomes the current directory for that window. Windows where the |:lcd|
command has not been used stick to the global current directory. When jumping
to another window the current directory will become the last specified local
current directory. If none was specified, the global current directory is
used.
When a |:cd| command is used, the current window will lose his local current
directory and will use the global current directory from now on.
After using |:cd| the full path name will be used for reading and writing
files. On some networked file systems this may cause problems. The result of
using the full path name is that the file names currently in use will remain
referring to the same file. Example: If you have a file a:test and a
directory a:vim the commands ":e test" ":cd vim" ":w" will overwrite the file
a:test and not write a:vim/test. But if you do ":w test" the file a:vim/test
will be written, because you gave a new file name and did not refer to a
filename before the ":cd".
==============================================================================
5. The argument list *argument-list* *arglist*
3. The argument list *argument-list* *arglist*
If you give more than one file name when starting Vim, this list is remembered
as the argument list. You can jump to each file in this list.
Do not confuse this with the buffer list, which you can see with the
|:buffers| command. The argument list was already present in Vi, the buffer
list is new in Vim. A file name in the argument list will also be present in
the buffer list (unless it was deleted with ":bdel").
list is new in Vim. Every file name in the argument list will also be present
in the buffer list (unless it was deleted with |:bdel| or |:bwipe|). But it's
common that names in the buffer list are not in the argument list.
This subject is introduced in section |07.2| of the user manual.
@@ -878,7 +669,7 @@ list of the current window.
in Vi}
:[count]wN[ext][!] [++opt] [+cmd] [file] *:wN* *:wNext*
:[count]wp[revous][!] [++opt] [+cmd] [file] *:wp* *:wprevious*
:[count]wp[revious][!] [++opt] [+cmd] [file] *:wp* *:wprevious*
Same as :wnext, but go to previous file instead of
next. {not in Vi}
@@ -891,11 +682,17 @@ positioned at the first non-blank in the line, otherwise the last know column
is used. If there is no last known cursor position the cursor will be in the
first line (the last line in Ex mode).
*{arglist}*
The wildcards in the argument list are expanded and the file names are sorted.
Thus you can use the command "vim *.c" to edit all the C files. From within
Vim the command ":n *.c" does the same. On Unix you can also use backticks,
for example: >
:n `find . -name \\*.c -print`
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": >
:next foo\ bar
On Unix and a few other systems you can also use backticks, for example: >
:next `find . -name \\*.c -print`
The backslashes before the star are required to prevent "*.c" to be expanded
by the shell before executing the find program.
@@ -985,7 +782,7 @@ flag is used for the ":substitute" command to avoid an error for files where
"my_foo" isn't used. ":update" writes the file only if changes were made.
==============================================================================
6. Writing *writing* *save-file*
4. Writing *writing* *save-file*
Note: When the 'write' option is off, you are not able to write any file.
@@ -1029,7 +826,10 @@ Note: When the 'write' option is off, you are not able to write any file.
executed like with ":!{cmd}", any '!' is replaced with
the previous command |:!|.
The default [range] for the ":w" command is the whole buffer (1,$).
The default [range] for the ":w" command is the whole buffer (1,$). If you
write the whole buffer, it is no longer considered changed. Also when you
write it to a different file with ":w somefile"!
If a file name is given with ":w" it becomes the alternate file. This can be
used, for example, when the write fails and you want to try again later with
":w #". This can be switched off by removing the 'A' flag from the
@@ -1167,7 +967,7 @@ For MS-DOS and MS-Windows the device is detected by its name:
The names can be in upper- or lowercase.
==============================================================================
7. Writing and quitting *write-quit*
5. Writing and quitting *write-quit*
*:q* *:quit*
:q[uit] Quit the current window. Quit Vim if this is the last
@@ -1259,6 +1059,149 @@ MULTIPLE WINDOWS AND BUFFERS *window-exit*
which cannot be written for another reason, Vim will not quit.
{not in Vi}
==============================================================================
6. Dialogs *edit-dialogs*
*:confirm* *:conf*
:conf[irm] {command} Execute {command}, and use a dialog when an
operation has to be confirmed. Can be used on the
":q", ":qa" and ":w" commands (the latter to over-ride
a read-only setting).
Examples: >
:confirm w foo
< Will ask for confirmation when "foo" already exists. >
:confirm q
< Will ask for confirmation when there are changes. >
:confirm qa
< If any modified, unsaved buffers exist, you will be prompted to save
or abandon each one. There are also choices to "save all" or "abandon
all".
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|.
{only in Win32, Athena, Motif, GTK and Mac GUI}
When ":browse" is not possible you get an error
message. If the |+browse| feature is missing or the
{command} doesn't support browsing, the {command} is
executed without a dialog.
":browse set" works like |:options|.
The syntax is best shown via some examples: >
:browse e $vim/foo
< Open the browser in the $vim/foo directory, and edit the
file chosen. >
:browse e
< Open the browser in the directory specified with 'browsedir',
and edit the file chosen. >
:browse w
< Open the browser in the directory of the current buffer,
with the current buffer filename as default, and save the
buffer under the filename chosen. >
:browse w C:/bar
< Open the browser in the C:/bar directory, with the current
buffer filename as default, and save the buffer under the
filename chosen.
Also see the |'browsedir'| option.
For versions of Vim where browsing is not supported, the command is executed
unmodified.
*browsefilter*
For MS Windows, you can modify the filters that are used in the browse dialog.
By setting the g:browsefilter or b:browsefilter variables, you can change the
filters globally or locally to the buffer. The variable is set to a string in
the format "{filter label}\t{pattern};{pattern}\n" where {filter label} is the
text that appears in the "Files of Type" comboBox, and {pattern} is the
pattern which filters the filenames. Several patterns can be given, separated
by ';'.
For Motif the same format is used, but only the very first pattern is actually
used (Motif only offers one pattern, but you can edit it).
For example, to have only Vim files in the dialog, you could use the following
command: >
let g:browsefilter="Vim Scripts\t*.vim\nVim Startup Files\t*vimrc\n"
You can override the filter setting on a per-buffer basis by setting the
b:browsefilter variable. You would most likely set b:browsefilter in a
filetype plugin, so that the browse dialog would contain entries related to
the type of file you are currently editing. Disadvantage: This makes it
difficult to start editing a file of a different type. To overcome this, you
may want to add "All Files\t*.*\n" as the final filter, so that the user can
still access any desired file.
==============================================================================
7. The current directory *current-directory*
You may use the |:cd| and |:lcd| commands to change to another directory, so
you will not have to type that directory name in front of the file names. It
also makes a difference for executing external commands, e.g. ":!ls".
Changing directory fails when the current buffer is modified, the '.' flag is
present in 'cpoptions' and "!" is not used in the command.
*:cd* *E472*
:cd[!] On non-Unix systems: Print the current directory
name. On Unix systems: Change the current directory
to the home directory. Use |:pwd| to print the
current directory on all systems.
:cd[!] {path} Change the current directory to {path}.
If {path} is relative, it is searched for in the
directories listed in |'cdpath'|.
Does not change the meaning of an already opened file,
because its full path name is remembered. Files from
the |arglist| may change though!
On MS-DOS this also changes the active drive.
To change to the directory of the current file: >
:cd %:h
<
*:cd-* *E186*
:cd[!] - Change to the previous current directory (before the
previous ":cd {path}" command). {not in Vi}
*:chd* *:chdir*
:chd[ir][!] [path] Same as |:cd|.
*:lc* *:lcd*
:lc[d][!] {path} Like |:cd|, but only set the current directory for the
current window. The current directory for other
windows is not changed. {not in Vi}
*:lch* *:lchdir*
:lch[dir][!] Same as |:lcd|. {not in Vi}
*:pw* *:pwd* *E187*
:pw[d] Print the current directory name. {Vi: no pwd}
Also see |getcwd()|.
So long as no |:lcd| command has been used, all windows share the same current
directory. Using a command to jump to another window doesn't change anything
for the current directory.
When a |:lcd| command has been used for a window, the specified directory
becomes the current directory for that window. Windows where the |:lcd|
command has not been used stick to the global current directory. When jumping
to another window the current directory will become the last specified local
current directory. If none was specified, the global current directory is
used.
When a |:cd| command is used, the current window will lose his local current
directory and will use the global current directory from now on.
After using |:cd| the full path name will be used for reading and writing
files. On some networked file systems this may cause problems. The result of
using the full path name is that the file names currently in use will remain
referring to the same file. Example: If you have a file a:test and a
directory a:vim the commands ":e test" ":cd vim" ":w" will overwrite the file
a:test and not write a:vim/test. But if you do ":w test" the file a:vim/test
will be written, because you gave a new file name and did not refer to a
filename before the ":cd".
==============================================================================
8. Editing binary files *edit-binary*
@@ -1391,9 +1334,9 @@ file though, only when the file wasn't changed inside of Vim.
Note that if a FileChangedShell autocommand is defined you will not get a
warning message or prompt. The autocommand is expected to handle this.
There is no warning for a directory (e.g., in the |file-explorer|). But you
do get warned if you started editing a new file and it was created as a
directory later.
There is no warning for a directory (e.g., with |netrw-browse|). But you do
get warned if you started editing a new file and it was created as a directory
later.
When Vim notices the timestamp of a file has changed, and the file is being
edited in a buffer but has not changed, Vim checks if the contents of the file
@@ -1448,5 +1391,91 @@ It is also possible that you modified the file yourself, from another edit
session or with another command (e.g., a filter command). Then you will know
which version of the file you want to keep.
==============================================================================
11. File Searching *file-searching*
{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:
1) Downward search:
Downward search uses the wildcards '*', '**' and possibly others
supported by your operating system. '*' and '**' are handled inside Vim, so
they work on all operating systems.
The usage of '*' is quite simple: It matches 0 or more characters.
'**' is more sophisticated:
- It ONLY matches directories.
- It matches up to 30 directories deep, so you can use it to search an
entire directory tree
- The maximum number of levels matched can be given by appending a number
to '**'.
Thus '/usr/**2' can match: >
/usr
/usr/include
/usr/include/sys
/usr/include/g++
/usr/lib
/usr/lib/X11
....
< It does NOT match '/usr/include/g++/std' as this would be three
levels.
The allowed number range is 0 ('**0' is removed) to 255.
If the given number is smaller than 0 it defaults to 30, if it's
bigger than 255 it defaults to 255.
- '**' can only be at the end of the path or be followed by a path
separator or by a number and a path separator.
You can combine '*' and '**' in any order: >
/usr/**/sys/*
/usr/*/sys/**
/usr/**2/sys/*
2) Upward search:
Here you can give a directory and then search the directory tree upward for
a file. You could give stop-directories to limit the upward search. The
stop-directories are appended to the path (for the 'path' option) or to
the filename (for the 'tags' option) with a ';'. If you want several
stop-directories separate them with ';'. If you want no stop-directory
("search upward till the root directory) just use ';'. >
/usr/include/sys;/usr
< will search in: >
/usr/include/sys
/usr/include
/usr
<
If you use a relative path the upward search is started in Vim's current
directory or in the directory of the current file (if the relative path
starts with './' and 'd' is not included in 'cpoptions').
If Vim's current path is /u/user_x/work/release and you do >
:set path=include;/u/user_x
< and then search for a file with |gf| the file is searched in: >
/u/user_x/work/release/include
/u/user_x/work/include
/u/user_x/include
3) Combined up/downward search
If Vim's current path is /u/user_x/work/release and you do >
set path=**;/u/user_x
< and then search for a file with |gf| the file is searched in: >
/u/user_x/work/release/**
/u/user_x/work/**
/u/user_x/**
<
BE CAREFUL! This might consume a lot of time, as the search of
'/u/user_x/**' includes '/u/user_x/work/**' and
'/u/user_x/work/release/**'. So '/u/user_x/work/release/**' is searched
three and '/u/user_x/work/**' is searched two times.
In the above example you might want to set path to: >
:set path=**,/u/user_x/**
< This searches: >
/u/user_x/work/release/**
/u/user_x/**
< This searches the same directories, but in a different order.
vim:tw=78:ts=8:ft=help:norl:

File diff suppressed because it is too large Load Diff

54
runtime/doc/evim-it.1 Executable file
View File

@@ -0,0 +1,54 @@
.TH EVIM 1 "16 febbraio 2002 "
.SH NOME
evim \- Vim "facile", Vim impostato in modo da poter essere usato
facilmente per modificare file, anche da chi non abbia familiarità
con i comandi.
.SH SINTASSI
.br
.B evim
[opzioni] [file ..]
.br
.B eview
.SH DESCRIZIONE
.B evim
Inizia
.B Vim
e imposta le opzioni per farlo comportare come un editore "modeless".
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
Simile all'uso di Notepad in MS-Windows.
.B evim
richiede la presenza della GUI, per avere a disposizione menu e barra
strumenti.
.PP
Da usarsi solo da parte di chi non è in grado di lavorare con Vim nella
maniera usuale.
La modifica file sarà molto meno efficiente.
.PP
.B eview
come sopra, ma parte in modalità "Sola Lettura". Funziona come evim \-R.
.PP
Vedere vim(1) per dettagli riguardo a Vim, opzioni, etc.
.PP
L'opzione 'insertmode' è impostata per poter immettere del testo direttamente.
.br
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
familiari tasti usati sotto MS-Windows.
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
.SH OPZIONI
Vedere vim(1).
.SH FILE
.TP 15
/usr/local/lib/vim/evim.vim
Lo script caricato per inizializzare eVim.
.SH NAC [NOTO ANCHE COME]
Noto Anche Come "Vim per semplici".
Quando usate evim si suppone che prendiate un fazzoletto,
facciate un nodo ad ogni angolo e ve lo mettiate in testa.
.SH VEDERE ANCHE
vim(1)
.SH AUTORE
Buona parte di
.B Vim
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere il Menu "Aiuto/Crediti".

View File

@@ -0,0 +1,54 @@
.TH EVIM 1 "16 febbraio 2002 "
.SH NOME
evim \- Vim "facile", Vim impostato in modo da poter essere usato
facilmente per modificare file, anche da chi non abbia familiarità
con i comandi.
.SH SINTASSI
.br
.B evim
[opzioni] [file ..]
.br
.B eview
.SH DESCRIZIONE
.B evim
Inizia
.B Vim
e imposta le opzioni per farlo comportare come un editore "modeless".
State sempre usando Vim, ma come un editore "posizionati-e-clicca".
Simile all'uso di Notepad in MS-Windows.
.B evim
richiede la presenza della GUI, per avere a disposizione menu e barra
strumenti.
.PP
Da usarsi solo da parte di chi non è in grado di lavorare con Vim nella
maniera usuale.
La modifica file sarà molto meno efficiente.
.PP
.B eview
come sopra, ma parte in modalità "Sola Lettura". Funziona come evim \-R.
.PP
Vedere vim(1) per dettagli riguardo a Vim, opzioni, etc.
.PP
L'opzione 'insertmode' è impostata per poter immettere del testo direttamente.
.br
Sono definite delle mappature che consentono di usare COPIA e INCOLLA con i
familiari tasti usati sotto MS-Windows.
CTRL-X taglia testo, CTRL-C copia testo e CTRL-V incolla testo.
Usate CTRL-Q per ottenere quello chs si ottierrebbe con CTRL-V in Vim nativo.
.SH OPZIONI
Vedere vim(1).
.SH FILE
.TP 15
/usr/local/lib/vim/evim.vim
Lo script caricato per inizializzare eVim.
.SH NAC [NOTO ANCHE COME]
Noto Anche Come "Vim per semplici".
Quando usate evim si suppone che prendiate un fazzoletto,
facciate un nodo ad ogni angolo e ve lo mettiate in testa.
.SH VEDERE ANCHE
vim(1)
.SH AUTORE
Buona parte di
.B Vim
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere il Menu "Aiuto/Crediti".

59
runtime/doc/evim-ru.1 Normal file
View File

@@ -0,0 +1,59 @@
.TH EVIM 1 "2002 February 16"
.SH ИМЯ
evim \- простой Vim, позволяет редактировать файл с помощью Vim в безрежимном режиме
.SH КОМАНДНАЯ СТРОКА
.br
.B evim
[ключи] [файл ..]
.br
.B eview
.SH ОПИСАНИЕ
Команда
.B evim
запускает
.B Vim
и настраивает ряд опций таким образом, что он начинает вести себя
как обычный безрежимный редактор. В этом режиме Vim напоминает
Notepad из MS-Windows.
.B eVim
всегда запускается с поддержкой графического интерфейса, чтобы обеспечить
использование меню и инструментальной панели.
.PP
Эта команда создана для тех, кто по каким-то причинам не в состоянии
работать с Vim в обычном режиме. Редактирование файлов при этом происходит
гораздо менее эффективно, чем при использовании обычного Vim.
.PP
Команда
.B eview
выполняет почти ту же самую задачу, но файл открывается в режиме "только
для чтения". Использование этой команды полностью идентично использованию
evim \-R.
.PP
Подробнее о Vim, ключах запуска и т.п. смотрите на странице справочника
vim(1).
.PP
При использовании
.B evim
включается опция 'insertmode', что позволяет вводить текст напрямую.
.br
Кроме того, настраиваются привязки, позволяющие использовать кнопки MS-Windows
для выполнения команд копирования и вклейки. CTRL-X используется для вырезания
текста, CTRL-C для копирования и CTRL-V для вклейки. Чтобы воспользоваться
изначальным значением кнопки CTRL-V, используйте CTRL-Q.
.SH ПАРАМЕТРЫ ЗАПУСКА
См. vim(1).
.SH ФАЙЛЫ
.TP 15
/usr/local/lib/vim/evim.vim
Сценарий, который загружается для инициализации eVim.
.SH AKA
eVim также известен как "Vim для чайников".
Для наилучшего эффекта рекомендуется во время использования повязать
на голове платок, предварительно завязав на каждом конце по узелку.
.SH СМОТРИ ТАКЖЕ
vim(1)
.SH АВТОРЫ
Большая часть
.B Vim
создана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное
количество людей. См. меню Справка/Благодарности.

View File

@@ -0,0 +1,59 @@
.TH EVIM 1 "2002 February 16"
.SH ИМЯ
evim \- простой Vim, позволяет редактировать файл с помощью Vim в безрежимном режиме
.SH КОМАНДНАЯ СТРОКА
.br
.B evim
[ключи] [файл ..]
.br
.B eview
.SH ОПИСАНИЕ
Команда
.B evim
запускает
.B Vim
и настраивает ряд опций таким образом, что он начинает вести себя
как обычный безрежимный редактор. В этом режиме Vim напоминает
Notepad из MS-Windows.
.B eVim
всегда запускается с поддержкой графического интерфейса, чтобы обеспечить
использование меню и инструментальной панели.
.PP
Эта команда создана для тех, кто по каким-то причинам не в состоянии
работать с Vim в обычном режиме. Редактирование файлов при этом происходит
гораздо менее эффективно, чем при использовании обычного Vim.
.PP
Команда
.B eview
выполняет почти ту же самую задачу, но файл открывается в режиме "только
для чтения". Использование этой команды полностью идентично использованию
evim \-R.
.PP
Подробнее о Vim, ключах запуска и т.п. смотрите на странице справочника
vim(1).
.PP
При использовании
.B evim
включается опция 'insertmode', что позволяет вводить текст напрямую.
.br
Кроме того, настраиваются привязки, позволяющие использовать кнопки MS-Windows
для выполнения команд копирования и вклейки. CTRL-X используется для вырезания
текста, CTRL-C для копирования и CTRL-V для вклейки. Чтобы воспользоваться
изначальным значением кнопки CTRL-V, используйте CTRL-Q.
.SH ПАРАМЕТРЫ ЗАПУСКА
См. vim(1).
.SH ФАЙЛЫ
.TP 15
/usr/local/lib/vim/evim.vim
Сценарий, который загружается для инициализации eVim.
.SH AKA
eVim также известен как "Vim для чайников".
Для наилучшего эффекта рекомендуется во время использования повязать
на голове платок, предварительно завязав на каждом конце по узелку.
.SH СМОТРИ ТАКЖЕ
vim(1)
.SH АВТОРЫ
Большая часть
.B Vim
создана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное
количество людей. См. меню Справка/Благодарности.

View File

@@ -21,7 +21,7 @@ Only to be used for people who really can't work with Vim in the normal way.
Editing will be much less efficient.
.PP
.B eview
is the same, but starts in read-only mode. It works just like evim -R.
is the same, but starts in read-only mode. It works just like evim \-R.
.PP
See vim(1) for details about Vim, options, etc.
.PP

View File

@@ -1,4 +1,4 @@
*fold.txt* For Vim version 7.0aa. Last change: 2004 Jun 14
*fold.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -190,11 +190,11 @@ and the level given by the marker:
3. if a marker with a lower fold level is found, all folds up to and including
this level end and a fold with the specified level starts.
The number indicates the fold level. A zero cannot be used.
You can use "}}}" with a digit to indicate the level of the fold that
ends. The fold level of the following line will be one less than the
indicated level. Note that Vim doesn't look back to the level of the matching
marker (that would take too much time). Example: >
The number indicates the fold level. A zero cannot be used (a marker with
level zero is ignored). You can use "}}}" with a digit to indicate the level
of the fold that ends. The fold level of the following line will be one less
than the indicated level. Note that Vim doesn't look back to the level of the
matching marker (that would take too much time). Example: >
{{{1
fold level here is 1
@@ -279,7 +279,7 @@ zF Create a fold for N lines. Works like "zf".
Create a fold for the lines in {range}. Works like "zf".
*zd* *E351*
zd Delete one fold at the cursor. When the cursor is on folded
zd Delete one fold at the cursor. When the cursor is on a folded
line, that fold is deleted. Nested folds are moved one level
up. In Visual mode all folds (partially) in the selected area
are deleted. Careful: This easily deletes more folds than you
@@ -457,7 +457,7 @@ FOLDLEVEL *fold-foldlevel*
'foldlevel' is a number option: The higher the more folded regions are open.
When 'foldlevel' is 0, all folds are closed.
When 'foldlevel' is positive, some folds closed.
When 'foldlevel' is positive, some folds are closed.
When 'foldlevel' is very high, all folds are open.
'foldlevel' is applied when it is changed. After that manually folds can be
opened and closed.

View File

@@ -1,4 +1,4 @@
*gui.txt* For Vim version 7.0aa. Last change: 2004 Jun 15
*gui.txt* For Vim version 7.0aa. Last change: 2005 Jan 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52,7 +52,8 @@ When the GUI starts up initializations are carried out, in this order:
:let bmenu_max_pathlen = 50
- If the "-U {gvimrc}" command-line option has been used when starting Vim,
the {gvimrc} file will be read for initializations. The following
initializations are skipped.
initializations are skipped. When {gvimrc} is "NONE" no file will be read
for initializations.
- For Unix and MS-Windows, if the system gvimrc exists, it is sourced. The
name of this file is normally "$VIM/gvimrc". You can check this with
":version". Also see |$VIM|.
@@ -143,7 +144,7 @@ window Vim is running in with this command: >
==============================================================================
2. Scrollbars *gui-scrollbars*
There are vertical scrollbars and a horizontal scrollbars. You may
There are vertical scrollbars and a horizontal scrollbar. You may
configure which ones appear with the 'guioptions' option.
The interface looks like this (with ":set guioptions=mlrb"):
@@ -202,11 +203,11 @@ scrolled as far as possible left and right. The cursor is moved when
necessary, it must remain on a visible character (unless 'virtualedit' is
set).
Computing the length of the longest visible takes quite a bit of computation,
and it has to be done every time something changes. If this takes too much
time or you don't like the cursor jumping to another line, include the 'h'
flag in 'guioptions'. Then the scrolling is limited by the text of the
current cursor line.
Computing the length of the longest visible line takes quite a bit of
computation, and it has to be done every time something changes. If this
takes too much time or you don't like the cursor jumping to another line,
include the 'h' flag in 'guioptions'. Then the scrolling is limited by the
text of the current cursor line.
*athena-intellimouse*
If you have an Intellimouse and an X server that supports using the wheel,

View File

@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.0aa. Last change: 2004 May 03
*gui_w32.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -233,7 +233,9 @@ $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-V-alternative*
CTRL-Z is used for undo. This means you can't suspend Vim.
*CTRL-V-alternative* *CTRL-Q*
Since CTRL-V is used to paste, you can't use it to start a blockwise Visual
selection. You can use CTRL-Q instead. You can also use CTRL-Q in Insert
mode and Command-line mode to get the old meaning of CTRL-V. But CTRL-Q

View File

@@ -1,4 +1,4 @@
*gui_x11.txt* For Vim version 7.0aa. Last change: 2004 Jul 02
*gui_x11.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -437,6 +437,9 @@ command line argument).
==============================================================================
7. KDE version *gui-kde* *kde* *KDE* *KVim*
NOTE: The KDE version is still under development. It is not recommended for
daily work.
The KDE version of Vim works with KDE 2.x and KDE 3.x.
KVim (name code for gui-kde) does not use traditional X settings for its
configuration.

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
*help.txt* For Vim version 7.0aa. Last change: 2005 Mar 19
VIM - main help file
k
@@ -122,6 +122,7 @@ Advanced editing ~
|quickfix.txt| commands for a quick edit-compile-fix cycle
|windows.txt| commands for using multiple windows and buffers
|syntax.txt| syntax highlighting
|spell.txt| spell checking
|diff.txt| working with two or three versions of the same file
|autocmd.txt| automatically executing commands on an event
|filetype.txt| settings done specifically for a type of file
@@ -189,12 +190,6 @@ Standard plugins ~
|pi_expl.txt| File explorer
LOCAL ADDITIONS: *local-additions*
|engspchk.txt| English Spelling Checker (v57) May 25, 2004
|example.txt| Example for a locally added help file
|matchit.txt| Extended "%" matching
|test.txt| Testing the hélp cömmånd nôw
|typecorr.txt| Plugin for correcting typing mistakes
|helpp.txt| Dummy line to avoid an error message
------------------------------------------------------------------------------
*bars* Bars example

View File

@@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 7.0aa. Last change: 2004 Jul 23
*if_cscop.txt* For Vim version 7.0aa. Last change: 2004 Oct 21
VIM REFERENCE MANUAL by Andy Kahn
@@ -245,8 +245,9 @@ results. This is a list of comma-separated values. Each item consists of
'-' implies previous results clearance, '0' or command absence - don't use
quickfix. Search is performed from start until first command occurrence.
The default value is "" (don't use quickfix anyway). The following value
seems to be useful: "s-,c-,d-,i-,t-,e-".
seems to be useful: >
:set cscopequickfix=s-,c-,d-,i-,t-,e-
<
*cscopetag* *cst*
If 'cscopetag' set, the commands ":tag" and CTRL-] as well as "vim -t" will
always use |:cstag| instead of the default :tag behavior. Effectively, by
@@ -471,7 +472,7 @@ cscope within Vim to him.
*cscope-win32*
For a cscope version for Win32 see: http://iamphet.nm.ru/cscope/index.html
Win32 support was added by Sergey Khorev <khorev@softlab.ru>. Contact him
if you have Win32-specific issues.
Win32 support was added by Sergey Khorev <sergey.khorev@gmail.com>. Contact
him if you have Win32-specific issues.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2005 Jan 23
VIM REFERENCE MANUAL by Sergey Khorev
@@ -17,6 +17,7 @@ The MzScheme interface is available only if Vim was compiled with the
|+mzscheme| feature.
Based on the work of Brent Fulgham.
Dynamic loading added by Sergey Khorev
For downloading MzScheme and other info:
http://www.plt-scheme.org/software/mzscheme/

View File

@@ -1,4 +1,4 @@
*if_ole.txt* For Vim version 7.0aa. Last change: 2003 Jun 19
*if_ole.txt* For Vim version 7.0aa. Last change: 2004 Dec 09
VIM REFERENCE MANUAL by Paul Moore
@@ -158,5 +158,41 @@ Studio. This is called "VisVim". It is included in the archive that contains
the OLE version. The documentation can be found in the runtime directory, the
README_VisVim.txt file.
Using Vim with Visual Studio .Net~
With .Net you no longer really need VisVim, since .Net studio has support for
external editors. Follow these directions:
In .Net Studio choose from the menu Tools->External Tools...
Add
Title - Vim
Command - c:\vim\vim63\gvim.exe
Arguments - --servername VS_NET --remote-silent "+call cursor($(CurLine), $(CurCol))" $(ItemPath)
Init Dir - Empty
Now, when you open a file in .Net, you can choose from the .Net menu:
Tools->Vim
That will open the file in Vim.
You can then add this external command as an icon and place it anywhere you
like. You might also be able to set this as your default editor.
If you refine this further, please post back to the Vim maillist so we have a
record of it.
--servername VS_NET
This will create a new instance of vim called VS_NET. So if you open multiple
files from VS, they will use the same instance of Vim. This allows you to
have multiple copies of Vim running, but you can control which one has VS
files in it.
--remote-silent "+call cursor(10, 27)"
- Places the cursor on line 10 column 27
In Vim >
:h --remote-silent for mor details
[.Net remarks provided by Dave Fishburn and Brian Sturk]
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.0aa. Last change: 2004 Sep 02
*indent.txt* For Vim version 7.0aa. Last change: 2005 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -485,6 +485,20 @@ to get do loops indented in .f90 files and left alone in Fortran files with
other extensions such as .for.
PYTHON *python-indent*
The amount of indent can be set for the following situations. The examples
given are de the defaults. Note that the variables are set to an expression,
so that you can change the value of 'shiftwidth' later.
Indent after an open paren: >
let g:pyindent_open_paren = '&sw * 2'
Indent after a nested paren: >
let g:pyindent_nested_paren = '&sw'
Indent for a continuation line: >
let g:pyindent_continue = '&sw * 2'
VERILOG *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.0aa. Last change: 2004 Sep 07
*index.txt* For Vim version 7.0aa. Last change: 2005 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -328,8 +328,7 @@ tag char note action in Normal mode ~
characters, repeat the entered text N-1
times
|S| ["x]S 2 delete N lines [into buffer x] and start
insert; synonym for "^cc" or "0cc",
depending on autoindent
insert; synonym for "cc".
|T| T{char} 1 cursor till after Nth occurrence of {char}
to the left
|U| U 2 undo all latest changes on one line
@@ -425,7 +424,7 @@ tag char note action in Normal mode ~
|<Insert>| <Insert> 2 same as "i"
|<Left>| <Left> 1 same as "h"
|<LeftMouse>| <LeftMouse> 1 move cursor to the mouse click position
|<MiddleMouse>| <MiddleMouse> 2 same as "P" at the mouse click position
|<MiddleMouse>| <MiddleMouse> 2 same as "gP" at the mouse click position
|<PageDown>| <PageDown> same as CTRL-F
|<PageUp>| <PageUp> same as CTRL-B
|<Right>| <Right> 1 same as "l"
@@ -808,6 +807,7 @@ tag command note action in Visual mode ~
------------------------------------------------------------------------------
|v_CTRL-\_CTRL-N| CTRL-\ CTRL-N stop Visual mode
|v_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode'
|v_CTRL-C| CTRL-C stop Visual mode
|v_CTRL-G| CTRL-G toggle between Visual mode and Select mode
|v_<BS>| <BS> 2 Select mode: delete highlighted area
|v_CTRL-H| CTRL-H 2 same as <BS>
@@ -815,6 +815,7 @@ tag command note action in Visual mode ~
command
|v_CTRL-V| CTRL-V make Visual mode blockwise or stop Visual
mode
|v_<Esc>| <Esc> stop Visual mode
|v_CTRL-]| CTRL-] jump to highlighted tag
|v_!| !{filter} 2 filter the highlighted lines through the
external command {filter}
@@ -1060,6 +1061,7 @@ The commands are sorted on the non-optional part of their name.
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
|:call| :cal[l] call a function
|:catch| :cat[ch] part of a :try command
|:cbuffer| :cb[uffer] parse error messages and jump to first error
|:cc| :cc go to specific error
|:cclose| :ccl[ose] close quickfix window
|:cd| :cd change directory
@@ -1142,6 +1144,7 @@ The commands are sorted on the non-optional part of their name.
|:ex| :ex same as ":edit"
|:execute| :exe[cute] execute result of expressions
|:exit| :exi[t] same as ":xit"
|:exusage| :exu[sage] overview of Ex commands
|:file| :f[ile] show or set the current file name
|:files| :files list all files in the buffer list
|:filetype| :filet[ype] switch file type detection on/off
@@ -1208,6 +1211,7 @@ The commands are sorted on the non-optional part of their name.
|:loadkeymap| :loadk[eymap] load the following keymaps until EOF
|:loadview| :lo[adview] load view for current window from a file
|:lockmarks| :loc[kmarks] following command keeps marks where they are
|:lockvar| :lockv[ar] lock variables
|:ls| :ls list all buffers
|:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode
|:move| :m[ove] move lines
@@ -1254,10 +1258,13 @@ The commands are sorted on the non-optional part of their name.
|:options| :opt[ions] open the options-window
|:ounmap| :ou[nmap] like ":unmap" but for Operator-pending mode
|:ounmenu| :ounme[nu] remove menu for Operator-pending mode
|:print| :p[rint] print lines
|:pclose| :pc[lose] close preview window
|:pedit| :ped[it] edit file in the preview window
|:perl| :pe[rl] execute Perl command
|:print| :p[rint] print lines
|:profile| :prof[ile] profiling functions and scripts
|:promptfind| :pro[mtfind] open GUI dialog for searching
|:promptrepl| :promtr[epl] open GUI dialog for search/replace
|:perldo| :perld[o] execute Perl command for each line
|:pop| :po[p] jump to older entry in tag stack
|:popup| :pop[up] popup a menu by name
@@ -1392,6 +1399,7 @@ The commands are sorted on the non-optional part of their name.
|:unhide| :unh[ide] open a window for each loaded file in the
buffer list
|:unlet| :unl[et] delete variable
|:unlockvar| :unlo[ckvar] unlock variables
|:unmap| :unm[ap] remove mapping
|:unmenu| :unme[nu] remove menu
|:update| :up[date] write buffer if modified
@@ -1400,6 +1408,7 @@ The commands are sorted on the non-optional part of their name.
|:verbose| :verb[ose] execute command with 'verbose' set
|:vertical| :vert[ical] make following command split vertically
|:visual| :vi[sual] same as ":edit", but turns off "Ex" mode
|:viusage| :viu[sage] overview of Normal mode commands
|:view| :vie[w] edit a file read-only
|:vmap| :vm[ap] like ":map" but for Visual mode
|:vmapclear| :vmapc[lear] remove all mappings for Visual mode

View File

@@ -1,4 +1,4 @@
*insert.txt* For Vim version 7.0aa. Last change: 2004 Jul 04
*insert.txt* For Vim version 7.0aa. Last change: 2005 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -53,7 +53,8 @@ char action ~
yourself to use CTRL-[.
*i_CTRL-C*
CTRL-C Quit insert mode, go back to Normal mode. Do not check for
abbreviations.
abbreviations. Does not trigger the |InsertLeave| autocommand
event.
*i_CTRL-@*
CTRL-@ Insert previously inserted text and stop insert. {Vi: only
@@ -124,6 +125,9 @@ CTRL-R {0-9a-z"%#*+:.-=} *i_CTRL-R*
'-' the last small (less than a line) delete
'=' the expression register: you are prompted to
enter an expression (see |expression|)
Note that 0x80 (128 decimal) is used for
special keys, use CTRL-R CTRL-R to insert it
literally.
See |registers| about registers. {not in Vi}
CTRL-R CTRL-R {0-9a-z"%#*+/:.-=} *i_CTRL-R_CTRL-R*
@@ -918,6 +922,9 @@ i Insert text before the cursor [count] times.
*I*
I Insert text before the first non-blank in the line
[count] times.
When the 'H' flag is present in 'cpoptions' and the
line only contains blanks, insert start just before
the last blank.
*gI*
gI Insert text in column 1 [count] times. {not in Vi}
@@ -937,11 +944,15 @@ gi Insert text in the same position as where Insert mode
o Begin a new line below the cursor and insert text,
repeat [count] times. {Vi: blank [count] screen
lines}
When the '#' flag is in 'cpoptions' the count is
ignored.
*O*
O Begin a new line above the cursor and insert text,
repeat [count] times. {Vi: blank [count] screen
lines}
When the '#' flag is in 'cpoptions' the count is
ignored.
These commands are used to start inserting text. You can end insert mode with
<Esc>. See |mode-ins-repl| for the other special characters in Insert mode.
@@ -959,20 +970,31 @@ too long when appending characters a line break is automatically inserted.
9. Ex insert commands *inserting-ex*
*:a* *:append*
:{range}a[ppend] Insert several lines of text below the specified
:{range}a[ppend][!] Insert several lines of text below the specified
line. If the {range} is missing, the text will be
inserted after the current line.
Adding [!] toggles 'autoindent' for the time this
command is executed.
*:i* *:in* *:insert*
:{range}i[nsert] Insert several lines of text above the specified
:{range}i[nsert][!] Insert several lines of text above the specified
line. If the {range} is missing, the text will be
inserted before the current line.
Adding [!] toggles 'autoindent' for the time this
command is executed.
These two commands will keep on asking for lines, until you type a line
containing only a ".". Watch out for lines starting with a backslash, see
|line-continuation|.
When these commands are used with |:global| or |:vglobal| then the lines are
obtained from the text following the command. Separate lines with a NL
escaped with a backslash: >
:global/abc/insert\
one line\
another line
The final "." is not needed then.
NOTE: ":append" and ":insert" don't work properly in between ":if" and
":endif".
":endif", ":for" and ":endfor", ":while" and ":endwhile".
*:start* *:startinsert*
:star[tinsert][!] Start Insert mode just after executing this command.

View File

@@ -1,4 +1,4 @@
*intro.txt* For Vim version 7.0aa. Last change: 2004 Jun 12
*intro.txt* For Vim version 7.0aa. Last change: 2005 Feb 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -226,12 +226,14 @@ Vim would never have become what it is now, without the help of these people!
Kayhan Demirel sent me news in Uganda
Chris & John Downey xvi (ideas for multi-windows version)
Henk Elbers first VMS port
Daniel Elstner GTK+ 2 port
Eric Fischer Mac port, 'cindent', and other improvements
Benji Fisher Answering lots of user questions
Bill Foster Athena GUI port
Loic Grenie xvim (ideas for multi windows version)
Sven Guckes Vim promotor and previous WWW page maintainer
Darren Hiebert Exuberant ctags
Jason Hildebrand GTK+ 2 port
Bruce Hunsaker improvements for VMS port
Andy Kahn Cscope support, GTK+ GUI port
Oezguer Kesim Maintainer of Vim Mailing Lists
@@ -276,7 +278,7 @@ the ideas from all these people: They keep Vim alive!
In this documentation there are several references to other versions of Vi:
*Vi*
*Vi* *vi*
Vi "the original". Without further remarks this is the version
of Vi that appeared in Sun OS 4.x. ":version" returns
"Version 3.7, 6/7/85". Sometimes other versions are referred
@@ -287,8 +289,7 @@ Vi "the original". Without further remarks this is the version
Posix From the IEEE standard 1003.2, Part 2: Shell and utilities.
Generally known as "Posix". This is a textual description of
how Vi is supposed to work.
The version used is a draft from beginning 1996, so all remarks are
"expected to comply to" this. Anything can change though...
See |posix-compliance|.
*Nvi*
Nvi The "New" Vi. The version of Vi that comes with BSD 4.4 and FreeBSD.
Very good compatibility with the original Vi, with a few extensions.
@@ -348,7 +349,7 @@ and <> are part of what you type, the context should make this clear.
concatenated. For example, {a-zA-Z0-9} is any alphanumeric
character.
*{motion}*
*{motion}* *movement*
{motion} A command that moves the cursor. These are explained in
|motion.txt|. Examples:
w to start of next word
@@ -689,9 +690,9 @@ Q Switch to "Ex" mode. This is a bit like typing ":"
|vimrc_example.vim| script "Q" works like "gq".
*gQ*
gQ Switch to "Ex" mode, but really behave like typing ":"
commands after another. All command line editing,
completion etc. is available.
gQ Switch to "Ex" mode like with "Q", but really behave
like typing ":" commands after another. All command
line editing, completion etc. is available.
Use the ":vi" command |:visual| to exit "Ex" mode.
{not in Vi}

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.0aa. Last change: 2004 May 21
*map.txt* For Vim version 7.0aa. Last change: 2005 Feb 27
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -232,8 +232,6 @@ command line (not a search pattern) the mappings are disabled until a CTRL-^
is typed. The state last used is remembered for Insert mode and Search
patterns separately. The state for Insert mode is also used when typing a
character as an argument to command like "f" or "t".
When adding a ":lmap" mapping the use of these mappings in Insert mode and
for Search patterns will be switched on.
Language mappings will never be applied to already mapped characters. They
are only used for typed characters. This assumes that the language mapping
was already done when typing the mapping.
@@ -615,7 +613,7 @@ Examples: ({CURSOR} is where you type a non-keyword character) >
< "#i{CURSOR}" is expanded to "#include"
">#i{CURSOR}" is not expanded
>
:ab ;; <endofline>"
:ab ;; <endofline>
< "test;;" is not expanded
"test ;;" is expanded to "test <endofline>"
@@ -737,7 +735,7 @@ You see: ab esc ^V^V^[
how it should appear in your .exrc file, if you choose to go that
route. The first ^V is there to quote the second ^V; the :ab
command uses ^V as its own quote character, so you can include quoted
whitespace or the | character in the abbreviation. The :ab command
whitespace or the | character in the abbreviation. The :ab command
doesn't do anything special with the ^[ character, so it doesn't need
to be quoted. (Although quoting isn't harmful; that's why typing 7
[but not 8!] ^Vs works.)
@@ -752,7 +750,7 @@ Stored as: esc ^V^[
Later, when the abbreviation is expanded because the user typed in
the word "esc", the long form is subjected to the same type of
^V interpretation as keyboard input. So the ^V protects the ^[
character from being interpreted as the "exit input-mode" character.
character from being interpreted as the "exit Insert mode" character.
Instead, the ^[ is inserted into the text.
Expands to: ^[
@@ -780,7 +778,7 @@ make it local to the script. But when a mapping is executed from outside of
the script, it doesn't know in which script the function was defined. To
avoid this problem, use "<SID>" instead of "s:". The same translation is done
as for mappings. This makes it possible to define a call to the function in
mapping.
a mapping.
When a local function is executed, it runs in the context of the script it was
defined in. This means that new functions and mappings it defines can also
@@ -974,7 +972,7 @@ argument (-count=N, like the |:Next| command). Possible attributes are:
-range=N A count (default N) which is specified in the line
number position (like |:split|)
-count=N A count (default N) which is specified either in the line
number position, or as an initial argument (like |:Next|)
number position, or as an initial argument (like |:Next|).
Specifying -count (without a default) acts like -count=0
Note that -range=N and -count=N are mutually exclusive - only one should be
@@ -1056,7 +1054,7 @@ Examples >
Replace <line1>-pu_|<line1>,<line2>d|r <args>|<line1>d
" Count the number of lines in the range
:com! -range -nargs=0 Lines :echo <line2> - <line1> + 1 "lines"
:com! -range -nargs=0 Lines echo <line2> - <line1> + 1 "lines"
" Call a user function (example of <f-args>)
:com -nargs=* Mycmd call Myfunc(<f-args>)

View File

@@ -1,4 +1,4 @@
*mbyte.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
*mbyte.txt* For Vim version 7.0aa. Last change: 2005 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -328,6 +328,8 @@ u unicode same as ucs-2
u ucs2be same as ucs-2 (big endian)
u ucs-2be same as ucs-2 (big endian)
u ucs-4be same as ucs-4 (big endian)
default stands for the default value of 'encoding', depends on the
environment
For the UCS codes the byte order matters. This is tricky, use UTF-8 whenever
you can. The default is to use big-endian (most significant byte comes
@@ -1317,7 +1319,7 @@ a zero if necessary.
COMMAND ARGUMENTS *utf-8-char-arg*
Commands like |f|, |F|, |t| and |r| take an argument of one character. For
UTF-8 this argument may include one or two composing characters. These needs
UTF-8 this argument may include one or two composing characters. These need
to be produced together with the base character, Vim doesn't wait for the next
character to be typed to find out if it is a composing character or not.
Using 'keymap' or |:lmap| is a nice way to type these characters.

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0aa. Last change: 2004 Aug 26
*message.txt* For Vim version 7.0aa. Last change: 2005 Feb 13
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -55,7 +55,7 @@ or view a list of recent messages with: >
LIST OF MESSAGES
*E222* *E228* *E232* *E256* *E293* *E298* *E304* *E317*
*E318* *E356* *E438* *E439* *E440* *E316* *E320* *E322*
*E323* *E341* *E473* *E570* >
*E323* *E341* *E473* *E570* *E685* >
Add to read buffer
makemap: Illegal mode
Cannot create BalloonEval with both message and callback
@@ -74,6 +74,7 @@ LIST OF MESSAGES
line number out of range: {N} past the end
line count wrong in block {N}
Internal error
Internal error: {function}
fatal error in cs_manage_matches
This is an internal error. If you can reproduce it, please send in a bug
@@ -363,7 +364,8 @@ cannot be written. You need to give the buffer a file name: >
When using the '~' character in a pattern, it is replaced with the previously
used pattern in a ":substitute" command. This fails when no such command has
been used yet. See |/~|.
been used yet. See |/~|. This also happens when using ":s/pat/%/", where the
"%" stands for the previous substitute string.
*E35* >
No previous regular expression

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0aa. Last change: 2004 Sep 07
*motion.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -350,6 +350,10 @@ or the last line. The first two commands put the cursor in the same column
except after the "$" command, then the cursor will be put on the last
character of the line.
If "k", "-" or CTRL-P is used with a [count] and there are less than [count]
lines above the cursor and the 'cpo' option includes the "-" flag it is an
error. |cpo--|.
==============================================================================
4. Word motions *word-motions*
@@ -461,9 +465,12 @@ A paragraph begins after each empty line, and also at each of a set of
paragraph macros, specified by the pairs of characters in the 'paragraphs'
option. The default is "IPLPPPQPP LIpplpipbp", which corresponds to the
macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in the
first column). A section boundary is also a paragraph boundary. Note that
this does not include a '{' or '}' in the first column. Also note that a
blank line (only containing white space) is NOT a paragraph boundary.
first column). A section boundary is also a paragraph boundary.
Note that a blank line (only containing white space) is NOT a paragraph
boundary.
Also note that this does not include a '{' or '}' in the first column. When
the '{' flag is in 'cpoptions' then '{' in the first column is used as a
paragraph boundary |posix|.
*section*
A section begins after a form-feed (<C-L>) in the first column and at each of
@@ -814,8 +821,8 @@ was made yet in the current file.
area in the current buffer. {not in Vi}.
*''* *``*
'' `` To the position before latest jump, or where the last
"m'" or "m`" command was given. Not set when the
'' `` To the position before the latest jump, or where the
last "m'" or "m`" command was given. Not set when the
|:keepjumps| command modifier was used.
Also see |restore-position|.
@@ -831,8 +838,8 @@ was made yet in the current file.
*'^* *`^*
'^ `^ To the position where the cursor was the last time
when Insert mode was stopped This is used by the |gi|
command. Not set when the |:keepjumps| command
when Insert mode was stopped. This is used by the
|gi| command. Not set when the |:keepjumps| command
modifier was used. {not in Vi}
*'.* *`.*
@@ -938,7 +945,9 @@ These commands are not marks themselves, but jump to a mark:
<
Note that ":keepjumps" must be used for every command.
When invoking a function the commands in that function
can still change the jumplist.
can still change the jumplist. Also, for
":keepjumps exe 'command '" the "command" won't keep
jumps. Instead use: ":exe 'keepjumps command'"
==============================================================================
8. Jumps *jump-motions*
@@ -1240,7 +1249,7 @@ L To line [count] from bottom of window (default: Last
Cursor is adjusted for 'scrolloff' option.
<LeftMouse> Moves to the position on the screen where the mouse
click is |inclusive|. See also |<LeftMouse>|. If the
click is |exclusive|. See also |<LeftMouse>|. If the
position is in a status line, that window is made the
active window and the cursor is not moved. {not in Vi}

View File

@@ -1,4 +1,4 @@
*netbeans.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*netbeans.txt* For Vim version 7.0aa. Last change: 2005 Jan 31
VIM REFERENCE MANUAL by Gordon Prieur
@@ -16,7 +16,8 @@ NetBeans ExternalEditor Integration Features *netbeans*
8. Messages |netbeans-messages|
9. Running Vim from NetBeans |netbeans-run|
10. NetBeans protocol |netbeans-protocol|
11. Known problems |netbeans-problems|
11. NetBeans commands |netbeans-commands|
12. Known problems |netbeans-problems|
{Vi does not have any of these features}
{only available when compiled with the |+netbeans_intg| feature}
@@ -197,6 +198,14 @@ NetBeans connection lost for this buffer
for saving changes to this file and NetBeans will no longer
know of these changes.
*E744*
NetBeans does not allow changes in read-only files
Vim normally allows changes to a read-only file and only
enforces the read-only rule if you try to write the file.
However, NetBeans does not let you make changes to a file
which is read-only and becomes confused if vim does this.
So vim does not allow modifications to files when run with
NetBeans.
==============================================================================
9. Running Vim from NetBeans *netbeans-run*
@@ -417,6 +426,12 @@ guard off len
initDone Mark the buffer as ready for use. Implicitly makes the buffer
the current buffer. Fires the BufReadPost autocommand event.
insertDone
Sent by NetBeans to tell vim an initial file insert is done.
This triggers a read message being printed. Prior to version
2.3, no read messages were displayed after opening a file.
New in version 2.3.
moveAnnoToFront serNum
Not implemented.
@@ -450,6 +465,12 @@ save Save the buffer when it was modified. The other side of the
- 'buftype' disallows writing
New in version 2.2.
saveDone
Sent by NetBeans to tell vim a save is done. This triggers
a save message being printed. Prior to version 2.3, no save
messages were displayed after a save.
New in version 2.3.
setAsUser Not implemented.
setBufferNumber pathname
@@ -473,6 +494,7 @@ setExitDelay seconds
This delay is used to give the IDE a chance to handle things
before really exiting. The default delay is two seconds.
New in version 2.1.
Obsolete in version 2.3.
setFullName pathname
Set the file name to be used for a buffer to "pathname", a
@@ -490,7 +512,14 @@ setModified modified
When the boolean argument "modified" is "T" mark the buffer as
modified, when it is "F" mark it as unmodified.
setReadOnly Not implemented.
setModtime time
Update a buffers modification time after NetBeans saves the
file.
New in version 2.3.
setReadOnly
Passed by NetBeans to tell vim a file is readonly.
Implemented in verion 2.3.
setStyle Not implemented.
@@ -508,7 +537,11 @@ showBalloon text
disappear when the mouse is moved more than a few pixels.
New in version 2.1.
specialKeys Not implemented.
specialKeys
Map a set of keys (mostly function keys) to be passed back
to NetBeans for processing. This lets NetBeans hotkeys be
used from vim.
Implemented in version 2.3.
startAtomic Begin an atomic operation. The screen will not be updated
until "endAtomic" is given.
@@ -527,6 +560,9 @@ stopCaretListen
stopDocumentListen
Mark the buffer to stop reporting changes to the IDE.
Opposite of startDocumentListen.
NOTE: if "netbeansBuffer" was used to mark this buffer as a
NetBeans buffer, then the buffer is deleted in Vim. This is
for compatibility with Sun Studio 10.
unguard off len
Opposite of "guard", remove guarding for a text area.
@@ -620,6 +656,11 @@ buttonRelease button lnum col
in the sign area.
New in version 2.2.
disconnect
Tell NetBeans that vim is exiting and not to try and read or
write more commands.
New in version 2.3.
fileClosed Not implemented.
fileModified Not implemented.
@@ -726,7 +767,18 @@ DETACH IDE -> editor: break the connection without exiting the
REJECT Not used.
==============================================================================
11. Known problems *netbeans-problems*
11. NetBeans Commands *netbeans-commands*
*:nbkey*
:nbkey key Pass the key to NetBeans for processing
Pass the key to NetBeans for hot-key processing. You should not need to use
this command directly. However, NetBeans passes a list of hot-keys to Vim at
startup and when one of these keys is pressed, this command is generated to
send the key press back to NetBeans.
==============================================================================
12. Known problems *netbeans-problems*
NUL bytes are not possible. For editor -> IDE they will appear as NL
characters. For IDE -> editor they cannot be inserted.

View File

@@ -1,4 +1,4 @@
*options.txt* For Vim version 7.0aa. Last change: 2004 Oct 07
*options.txt* For Vim version 7.0aa. Last change: 2005 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -139,6 +139,9 @@ example, if Alt-b produces <Esc>b, use this: >
(the ^[ is a real <Esc> here, use CTRL-V <Esc> to enter it)
The advantage over a mapping is that it works in all situations.
The t_xx options cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
The listing from ":set" looks different from Vi. Long string options are put
at the end of the list. The number of options is quite large. The output of
"set all" probably does not fit on the screen, causing Vim to give the
@@ -288,10 +291,11 @@ For buffer-local and window-local options:
Global options with a local value *global-local*
Options are global when you mostly use one value for all buffers. For some
global options it's useful to sometimes have a different local value. You can
set the local value with ":setlocal". That buffer will then use the local
value, while other buffers continue using the global value.
Options are global when you mostly use one value for all buffers and windows.
For some global options it's useful to sometimes have a different local value.
You can set the local value with ":setlocal". That buffer or window will then
use the local value, while other buffers and windows continue using the global
value.
For example, you have two windows, both on C source code. They use the global
'makeprg' option. If you do this in one of the two windows: >
@@ -918,7 +922,7 @@ A jump table for the options with a short description can be found at |Q_op|.
impossible!). Writing may fail because of this.
- A directory "." means to put the backup file in the same directory
as the edited file.
- A directory starting with "./" (or ".\" for MS-DOS et.al.) means to
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
put the backup file relative to where the edited file is. The
leading "." is replaced with the path name of the edited file.
("." inside a directory name has no special meaning).
@@ -953,6 +957,7 @@ A jump table for the options with a short description can be found at |Q_op|.
accidentally overwriting existing files with a backup file. You might
prefer using ".bak", but make sure that you don't have files with
".bak" that you want to keep.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
If you like to keep a lot of backups, you could use a BufWritePre
autocommand to change 'backupext' just before writing the file to
@@ -987,9 +992,40 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
{only available when compiled with the |+balloon_eval|
and |+sun_workshop| or |+netbeans_intg| features}
feature}
Switch on the |balloon-eval| functionality.
*'balloonexpr'* *'bexpr'*
'balloonexpr' 'bexpr' string (default "")
global
{not in Vi}
{only available when compiled with the |+balloon_eval|
feature}
Expression to show in evaluation balloon. It is only used when
'ballooneval' is on. These variables can be used:
v:beval_bufnr number of the buffer in which balloon is going to show
v:beval_winnr number of the window
v:beval_lnum line number
v:beval_col column number (byte index)
v:beval_text word under or after the mouse pointer
The evaluation of the expression must not have side effects!
Example: >
function! MyBalloonExpr()
return 'Cursor is at line ' . v:beval_lnum .
\', column ' . v:beval_col .
\ ' of file ' . bufname(v:beval_bufnr) .
\ ' on word "' . v:beval_text . '"'
endfunction
set bexpr=MyBalloonExpr()
set ballooneval
<
NOTE: The balloon is displayed only if the cursor is on a text
character. If the result of evaluating 'balloonexpr' is not empty,
Vim does not try to send a message to an external debugger (Netbeans
or Sun Workshop).
*'binary'* *'bin'* *'nobinary'* *'nobin'*
'binary' 'bin' boolean (default off)
local to buffer
@@ -1062,7 +1098,7 @@ A jump table for the options with a short description can be found at |Q_op|.
break if 'linebreak' is on.
*'browsedir'* *'bsdir'*
'browsedir' 'bsdir' string (default for "last")
'browsedir' 'bsdir' string (default: "last")
global
{not in Vi} {only for Motif and Win32 GUI}
Which directory to use for the file browser:
@@ -1091,6 +1127,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'hidden' is set or using |:hide|, like using
|:bwipeout|
CAREFUL: when "unload", "delete" or "wipe" is used changes in a buffer
are lost without a warning.
This option is used together with 'buftype' and 'swapfile' to specify
special kinds of buffers. See |special-buffers|.
@@ -1375,7 +1413,8 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
Number of columns of the screen. Normally this is set by the terminal
initialization and does not have to be set by hand.
initialization and does not have to be set by hand. Also see
|posix-screen-size|.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
@@ -1424,7 +1463,7 @@ A jump table for the options with a short description can be found at |Q_op|.
to the Vim defaults. Effectively, this means that when a ".vimrc"
file exists, Vim will use the Vim defaults, otherwise it will use the
Vi defaults. (Note: This doesn't happen for the system-wide vimrc
file). Also see |compatible-default|.
file). Also see |compatible-default| and |posix-compliance|.
You can also set this option with the "-C" argument, and reset it with
"-N". See |-C| and |-N|.
Switching this option off makes the Vim defaults be used for options
@@ -1632,6 +1671,10 @@ A jump table for the options with a short description can be found at |Q_op|.
"+=" and "-=" feature of ":set" |add-option-flags|.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
NOTE: This option is set to the POSIX default value at startup when
the Vi default value would be used and the $VIM_POSIX environment
variable exists |posix|. This means tries to behave like the POSIX
specification.
contains behavior ~
*cpo-a*
@@ -1700,6 +1743,10 @@ A jump table for the options with a short description can be found at |Q_op|.
yet.
*cpo-g*
g Goto line 1 when using ":edit" without argument.
*cpo-H*
H When using "I" on a line with only blanks, insert
before the last blank. Without this flag insert after
the last blank.
*cpo-i*
i When included, interrupting the reading of a file will
leave it modified.
@@ -1729,9 +1776,11 @@ A jump table for the options with a short description can be found at |Q_op|.
enables cancelling the mapping by typing <F1><Esc>.
*cpo-l*
l Backslash in a [] range in a search pattern is taken
literally, only "\]" is special See |/[]|
literally, only "\]", "\^", "\-" and "\\" are special.
See |/[]|
'l' included: "/[ \t]" finds <Space>, '\' and 't'
'l' excluded: "/[ \t]" finds <Space> and <Tab>
Also see |cpo-\|.
*cpo-L*
L When the 'list' option is set, 'wrapmargin',
'textwidth', 'softtabstop' and Virtual Replace mode
@@ -1760,6 +1809,9 @@ A jump table for the options with a short description can be found at |Q_op|.
*cpo-p*
p Vi compatible Lisp indenting. When not present, a
slightly better algorithm is used.
*cpo-q*
q When joining multiple lines leave the cursor at the
position where it would be when joining two lines.
*cpo-r*
r Redo ("." command) uses "/" to repeat a search
command, instead of the actually used search string.
@@ -1808,8 +1860,15 @@ A jump table for the options with a short description can be found at |Q_op|.
x <Esc> on the command-line executes the command-line.
The default in Vim is to abandon the command-line,
because <Esc> normally aborts a command. |c_<Esc>|
*cpo-X*
X When using a count with "R" the replaced text is
deleted only once. Also when repeating "R" with "."
and a count.
*cpo-y*
y A yank command can be redone with ".".
*cpo-Z*
Z When using "w!" while the 'readonly' option is set,
don't reset 'readonly'.
*cpo-!*
! When redoing a filter command, use the last used
external command, whatever it was. Otherwise the last
@@ -1835,7 +1894,20 @@ A jump table for the options with a short description can be found at |Q_op|.
everything inside quotes is ignored. When matching a
paren inside quotes, it will find the matching one (if
there is one). This works very well for C programs.
*cpo-star*
This flag is also used for other features, such as
C-indenting.
*cpo--*
- When included, a vertical movement command fails when
it would above the first line or below the last line.
Without it the cursor moves to the first or last line,
unless it already was in that line.
Applies to the commands "-", "k", CTRL-P, "+", "j",
CTRL-N and CTRL-J.
*cpo-+*
+ When included, a ":write file" command will reset the
'modified' flag of the buffer, even though the buffer
itself may still be different from its file.
*cpo-star*
* Use ":*" in the same way as ":@". When not included,
":*" is an alias for ":'<,'>", select the Visual area.
*cpo-<*
@@ -1846,6 +1918,42 @@ A jump table for the options with a short description can be found at |Q_op|.
'<' included: "<Tab>" (5 characters)
'<' excluded: "^I" (^I is a real <Tab>)
Also see the 'k' flag above.
*cpo->*
> When appending to a register, put a line break before
the appended text.
POSIX flags. These are not included in the Vi default value, except
when $VIM_POSIX was set on startup. |posix|
contains behavior ~
*cpo-#*
# A count before "D", "o" and "O" has no effect.
*cpo-&*
& When ":preserve" was used keep the swap file when
exiting normally while this buffer is still loaded.
This flag is tested when exiting.
*cpo-\*
\ Backslash in a [] range in a search pattern is taken
literally, only "\]" is special See |/[]|
'l' included: "/[ \t]" finds <Space>, '\' and 't'
'l' excluded: "/[ \t]" finds <Space> and <Tab>
Also see |cpo-\|.
*cpo-/*
/ When "%" is used as the replacement string in a |:s|
command, use the previous replacement string. |:s%|
*cpo-{*
{ The |{| and |}| commands also stop at a "{" character
at the start of a line.
*cpo-.*
. The ":chdir" and ":cd" commands fail if the current
buffer is modified, unless ! is used. Vim doesn't
need this, since it remembers the full path of an
opened file.
*cpo-bar*
| The value of the $LINES and $COLUMNS environment
variables overrule the terminal size values obtained
with system specific functions.
*'cscopepathcomp'* *'cspc'*
'cscopepathcomp' 'cspc' number (default 0)
@@ -1911,6 +2019,9 @@ A jump table for the options with a short description can be found at |Q_op|.
When set to "msg", error messages that would otherwise be omitted will
be given anyway. This is useful when debugging 'foldexpr' or
'indentexpr'.
When set to "beep", a message will be given when otherwise only a beep
would be produced.
The values can be combined, separated by a comma.
*'define'* *'def'*
'define' 'def' string (default "^\s*#\s*define")
@@ -1956,6 +2067,7 @@ A jump table for the options with a short description can be found at |Q_op|.
To include a comma in a file name precede it with a backslash. Spaces
after a comma are ignored, otherwise spaces are included in the file
name. See |option-backslash| about using backslashes.
This has nothing to do with the |Dictionary| variable type.
Where to find a list of words?
- On FreeBSD, there is the file "/usr/share/dict/words".
- In the Simtel archive, look in the "msdos/linguist" directory.
@@ -2046,7 +2158,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the edited file. On Unix, a dot is prepended to the file name, so
it doesn't show in a directory listing. On MS-Windows the "hidden"
attribute is set and a dot prepended if possible.
- A directory starting with "./" (or ".\" for MS-DOS et.al.) means to
- A directory starting with "./" (or ".\" for MS-DOS et al.) means to
put the swap file relative to where the edited file is. The leading
"." is replaced with the path name of the edited file.
- For Unix and Win32, if a directory ends in two path separators, the
@@ -2121,7 +2233,7 @@ A jump table for the options with a short description can be found at |Q_op|.
with. See |encoding-names| for the possible values.
NOTE: Changing this option will not change the encoding of the
existing text in Vim. It may cause multi-byte text to become invalid.
existing text in Vim. It may cause non-ASCII text to become invalid.
It should normally be kept at its default value, or set when Vim
starts up. See |multibyte|.
@@ -2187,10 +2299,11 @@ A jump table for the options with a short description can be found at |Q_op|.
global
{not in Vi}
When on, all the windows are automatically made the same size after
splitting or closing a window. When off, splitting a window will
reduce the size of the current window and leave the other windows the
same. When closing a window the extra lines are given to the window
next to it (depending on 'splitbelow' and 'splitright').
splitting or closing a window. This also happens the moment the
option is switched on. When off, splitting a window will reduce the
size of the current window and leave the other windows the same. When
closing a window the extra lines are given to the window next to it
(depending on 'splitbelow' and 'splitright').
When mixing vertically and horizontally split windows, a minimal size
is computed and some windows may be larger if there is room. The
'eadirection' option tells in which direction the size is affected.
@@ -2331,8 +2444,9 @@ A jump table for the options with a short description can be found at |Q_op|.
old short name was 'fe', which is no longer used.
*'fileencodings'* *'fencs'*
'fileencodings' 'fencs' string (default: "ucs-bom", "ucs-bom,utf-8,latin1"
when 'encoding' is set to a Unicode value)
'fileencodings' 'fencs' string (default: "ucs-bom",
"ucs-bom,utf-8,default,latin1" when
'encoding' is set to a Unicode value)
global
{only available when compiled with the |+multi_byte|
feature}
@@ -2366,6 +2480,10 @@ A jump table for the options with a short description can be found at |Q_op|.
An entry for an 8-bit encoding (e.g., "latin1") should be the last,
because Vim cannot detect an error, thus the encoding is always
accepted.
The special value "default" can be used for the encoding from the
environment. This is the default value for 'encoding'. It is useful
when 'encoding' is set to "utf-8" and your environment uses a
non-latin1 encoding, such as Russian.
WRONG VALUES: WHAT'S WRONG:
latin1,utf-8 "latin1" will always be used
utf-8,ucs-bom,latin1 BOM won't be recognized in an utf-8
@@ -2478,6 +2596,7 @@ A jump table for the options with a short description can be found at |Q_op|.
type that is actually stored with the file.
This option is not copied to another buffer, independent of the 's' or
'S' flag in 'cpoptions'.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'fillchars'* *'fcs'*
'fillchars' 'fcs' string (default "vert:|,fold:-")
@@ -2710,6 +2829,20 @@ A jump table for the options with a short description can be found at |Q_op|.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
*'formatlistpat'* *'flp'*
'formatlistpat' 'flp' string (default: "^\s*\d\+[\]:.)}\t ]\s*")
local to buffer
{not in Vi}
A pattern that is used to recognize a list header. This is used for
the "n" flag in 'formatoptions'.
The pattern must match exactly the text that will be the indent for
the line below it. You can use |/\ze| to mark the end of the match
while still checking more characters. There must be a character
following the pattern, when it matches the whole line it is handled
like there is no match.
The default recognizes a number, followed by an optional punctuation
character and white space.
*'formatprg'* *'fp'*
'formatprg' 'fp' string (default "")
global
@@ -2724,6 +2857,20 @@ A jump table for the options with a short description can be found at |Q_op|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'fsync'* *'fs'*
'fsync' 'fs' boolean (default on)
global
{not in Vi}
When on, the library function fsync() will be called after writing a
file. This will flush a file to disk, ensuring that it is safely
written even on filesystems which do metadata-only journaling. This
will force the harddrive to spin up on Linux systems running in laptop
mode, so it may be undesirable in some situations. Be warned that
turning this off increases the chances of data loss after a crash. On
systems without an fsync() implementation, this variable is always
off.
Also see 'swapsync' for controlling fsync() on swap files.
*'gdefault'* *'gd'* *'nogdefault'* *'nogd'*
'gdefault' 'gd' boolean (default off)
global
@@ -2755,7 +2902,7 @@ A jump table for the options with a short description can be found at |Q_op|.
VMS: "SEARCH/NUMBERS ")
global or local to buffer |global-local|
{not in Vi}
Program to use for the ":grep" command. This option may contain '%'
Program to use for the |:grep| command. This option may contain '%'
and '#' characters, which are expanded like when used in a command-
line. The placeholder "$*" is allowed to specify where the arguments
will be included. Environment variables are expanded |:set_env|. See
@@ -2763,7 +2910,9 @@ A jump table for the options with a short description can be found at |Q_op|.
When your "grep" accepts the "-H" argument, use this to make ":grep"
also work well with a single file: >
:set grepprg=grep\ -nH
< See also the section |:make_makeprg|, since most of the comments there
< Special value: When 'grepprg' is set to "internal" the |:grep| command
works like |:vimgrep| and |:grepadd| like |:vimgrepadd|.
See also the section |:make_makeprg|, since most of the comments there
apply equally to 'grepprg'.
For Win32, the default is "findstr /n" if "findstr.exe" can be found,
otherwise it's "grep -n".
@@ -2790,6 +2939,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the height of the cursor can be changed. This can be done by
specifying a block cursor, or a percentage for a vertical or
horizontal cursor.
For a console the 't_SI' and 't_EI' escape sequences are used.
The option is a comma separated list of parts. Each part consist of a
mode-list and an argument-list:
@@ -2867,7 +3017,8 @@ A jump table for the options with a short description can be found at |Q_op|.
font names a list can be specified, font names separated with commas.
The first valid font is used.
When 'guifontset' is not empty, 'guifont' is not used.
On systems where 'guifontset' is supported (X11) and 'guifontset' is
not empty, then 'guifont' is not used.
Spaces after a comma are ignored. To include a comma in a font name
precede it with a backslash. Setting an option requires an extra
@@ -2884,7 +3035,7 @@ A jump table for the options with a short description can be found at |Q_op|.
the case of X). The font names given should be "normal" fonts. Vim
will try to find the related bold and italic fonts.
For Win32, GTK and Photon only: >
For Win32, GTK, Mac OS and Photon: >
:set guifont=*
< will bring up a font requester, where you can pick the font you want.
@@ -2894,7 +3045,10 @@ A jump table for the options with a short description can be found at |Q_op|.
For the GTK+ 2 GUI the font name looks like this: >
:set guifont=Andale\ Mono\ 11
< That's all. XLFDs are no longer accepted.
*E236*
For Mac OSX you can use something like this: >
:set guifont=Monaco:h10
< *E236*
Note that the fonts must be mono-spaced (all characters have the same
width). An exception is GTK 2: all fonts are accepted, but
mono-spaced fonts look best.
@@ -3195,6 +3349,9 @@ A jump table for the options with a short description can be found at |Q_op|.
|hl-Folded| f line used for closed folds
|hl-FoldColumn| F 'foldcolumn'
|hl-SignColumn| > column used for |signs|
|hl-SpellBad| B misspelled word |spell|
|hl-SpellRare| R rare word |spell|
|hl-SpellLocal| L word from other region |spell|
The display modes are:
r reverse (termcap entry "mr" and "me")
@@ -3202,6 +3359,7 @@ A jump table for the options with a short description can be found at |Q_op|.
b bold (termcap entry "md" and "me")
s standout (termcap entry "so" and "se")
u underline (termcap entry "us" and "ue")
c undercurl (termcap entry "Cs" and "Ce")
n no highlighting
- no highlighting
: use a highlight group
@@ -3685,6 +3843,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Setting this option to a valid keymap name has the side effect of
setting 'iminsert' to one, so that the keymap becomes effective.
'imsearch' is also set to one, unless it was -1
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'keymodel'* *'km'*
'keymodel' 'km' string (default "")
@@ -3776,6 +3935,7 @@ A jump table for the options with a short description can be found at |Q_op|.
matter what $LANG is set to: >
:set langmenu=nl_NL.ISO_8859-1
< When 'langmenu' is empty, |v:lang| is used.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
If your $LANG is set to a non-English language but you do want to use
the English menus: >
:set langmenu=none
@@ -3828,7 +3988,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global
Number of lines of the Vim window.
Normally you don't need to set this. It is done automatically by the
terminal initialization code.
terminal initialization code. Also see |posix-screen-size|.
When Vim is running in the GUI or in a resizable window, setting this
option will cause the window size to be changed. When you only want
to use the size for the GUI, put the command in your |gvimrc| file.
@@ -3847,6 +4007,10 @@ A jump table for the options with a short description can be found at |Q_op|.
Number of pixel lines inserted between characters. Useful if the font
uses the full character cell height, making lines touch each other.
When non-zero there is room for underlining.
With some fonts there can be too much room between lines (to have
space for ascents and descents). Then it makes sense to set
'linespace' to a negative value. This may cause display problems
though!
*'lisp'* *'nolisp'*
'lisp' boolean (default off)
@@ -4031,6 +4195,20 @@ A jump table for the options with a short description can be found at |Q_op|.
other memory to be freed. Maximum value 2000000. Use this to work
without a limit. Also see 'maxmemtot'.
*'maxmempattern'* *'mmp'*
'maxmempattern' 'mmp' number (default 1000)
global
{not in Vi}
Maximum amount of memory (in Kbyte) to use for pattern matching.
Maximum value 2000000. Use this to work without a limit.
*E363*
When Vim runs into the limit it gives an error message mostly behaves
like CTRL-C was typed.
Running into the limit often means that the pattern is very
inefficient or too complex. This may already happen with the pattern
"\(.\)*" on a very long line. ".*" works much better.
Vim may run out of memory before hitting the 'maxmempattern' limit.
*'maxmemtot'* *'mmt'*
'maxmemtot' 'mmt' number (default between 2048 and 10240 (system
dependent) or half the amount of memory
@@ -4348,6 +4526,10 @@ A jump table for the options with a short description can be found at |Q_op|.
knows about pasting and will mostly do the right thing without 'paste'
being set. The same is true for a terminal where Vim handles the
mouse clicks itself.
This option is reset when starting the GUI. Thus if you set it in
your .vimrc it will work in a terminal, but not in the GUI. Setting
'paste' in the GUI has side effects: e.g., the Paste toolbar button
will no longer work in Insert mode, because it uses a mapping.
When the 'paste' option is switched on (also when it was already on):
- mapping in Insert mode and Command-line mode is disabled
- abbreviations are disabled
@@ -4426,6 +4608,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Using 'patchmode' for compressed files appends the extension at the
end (e.g., "file.gz.orig"), thus the resulting name isn't always
recognized as a compressed file.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'path'* *'pa'* *E343* *E345* *E347*
'path' 'pa' string (default on Unix: ".,/usr/include,,"
@@ -4536,6 +4719,8 @@ A jump table for the options with a short description can be found at |Q_op|.
feature}
The name of the printer to be used for |:hardcopy|.
See |pdev-option|.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'printencoding'* *'penc'*
'printencoding' 'penc' String (default empty, except for some systems)
@@ -4577,8 +4762,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'printmbcharset' 'pmbcs' string (default "")
global
{not in Vi}
{only available when compiled with the |+printer|
and |+multi_byte| features}
{only available when compiled with the |+printer|,
|+postscript| and |+multi_byte| features}
The CJK character set to be used for CJK output from |:hardcopy|.
See |pmbcs-option|.
@@ -4586,8 +4771,8 @@ A jump table for the options with a short description can be found at |Q_op|.
'printmbfont' 'pmbfn' string (default "")
global
{not in Vi}
{only available when compiled with the |+printer|
and |+multi_byte| features}
{only available when compiled with the |+printer|,
|+postscript| and |+multi_byte| features}
List of font names to be used for CJK output from |:hardcopy|.
See |pmbfn-option|.
@@ -4599,7 +4784,12 @@ A jump table for the options with a short description can be found at |Q_op|.
List of items that control the format of the output of |:hardcopy|.
See |popt-option|.
*'quoteescape''* *'qe'*
*'prompt'* *'noprompt'*
'prompt' boolean (default on)
global
When on a ":" prompt is used in Ex mode.
*'quoteescape'* *'qe'*
'quoteescape' 'qe' string (default "\")
local to buffer
{not in Vi}
@@ -4615,9 +4805,10 @@ A jump table for the options with a short description can be found at |Q_op|.
If on, writes fail unless you use a '!'. Protects you from
accidentally overwriting a file. Default on when Vim is started
in read-only mode ("vim -R") or when the executable is called "view".
When using ":w!" the 'readonly' option is reset for the current
buffer, unless the 'Z' flag is in 'cpoptions'.
{not in Vi:} When using the ":view" command the 'readonly' option is
set for the newly edited buffer. When using ":w!" the 'readonly'
option is reset for the current buffer.
set for the newly edited buffer.
*'remap'* *'noremap'*
'remap' boolean (default on)
@@ -4766,6 +4957,7 @@ A jump table for the options with a short description can be found at |Q_op|.
files:
filetype.vim filetypes by file name |new-filetype|
scripts.vim filetypes by file contents |new-filetype-scripts|
autoload/ automatically loaded scripts |autoload-functions|
colors/ color scheme files |:colorscheme|
compiler/ compiler files |:compiler|
doc/ documentation |write-local-help|
@@ -4965,7 +5157,8 @@ A jump table for the options with a short description can be found at |Q_op|.
folds manually created folds, opened/closed folds and local
fold options
globals global variables that start with an uppercase letter
and contain at least one lowercase letter.
and contain at least one lowercase letter. Only
String and Number types are stored.
help the help window
localoptions options and mappings local to a window or buffer (not
global values for local options)
@@ -5127,6 +5320,22 @@ A jump table for the options with a short description can be found at |Q_op|.
separator. To test if this is so use: >
if exists('+shellslash')
<
*'shelltemp'* *'stmp'* *'noshelltemp'* *'nostmp'*
'shelltemp' 'stmp' boolean (Vi default off, Vim default on)
global
{not in Vi}
When on, use temp files for shell commands. When off use a pipe.
When using a pipe is not possible temp files are used anyway.
Currently a pipe is only supported on Unix. You can check it with: >
:if has("filterpipe")
< The advantage of using a pipe is that nobody can read the temp file
and the 'shell' command does not need to support redirection.
The advantage of using a temp file is that the file type and encoding
can be detected.
The |FilterReadPre|, |FilterReadPost| and |FilterWritePre|,
|FilterWritePost| autocommands event are not triggered when
'shelltemp' is off.
*'shelltype'* *'st'*
'shelltype' 'st' number (default 0)
global
@@ -5176,7 +5385,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|'cindent'|, |>>|, |<<|, etc.
*'shortmess'* *'shm'*
'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "")
'shortmess' 'shm' string (Vim default "filnxtToO", Vi default: "",
POSIX default: "A")
global
{not in Vi}
This option helps to avoid all the |hit-enter| prompts caused by file
@@ -5414,6 +5624,30 @@ A jump table for the options with a short description can be found at |Q_op|.
set.
NOTE: This option is set to 0 when 'compatible' is set.
*'spell'* *'nospell'*
'spell' boolean (default off)
local to window
{not in Vi}
{not available when compiled without the |+syntax|
feature}
When on spell checking will be done. See |spell|.
The languages used are specified with 'spelllang'.
*'spelllang'* *'spl'*
'spelllang' 'spl' string (default empty)
local to buffer
{not in Vi}
{not available when compiled without the |+syntax|
feature}
A comma separated list of languages. when the 'spell' option is on
spellchecking will be done for these languages. Example: >
set spelllang=en_us,nl
< This means both US English and Dutch words are recognized. Words that
are not recognized will be highlighted.
When 'encoding' is set the word lists are loaded again. Thus it's a
good idea to set 'spelllang' after setting 'encoding'.
More info at |spell|.
*'splitbelow'* *'sb'* *'nosplitbelow'* *'nosb'*
'splitbelow' 'sb' boolean (default off)
global
@@ -5449,7 +5683,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'statusline'* *'stl'* *E540* *E541* *E542*
'statusline' 'stl' string (default empty)
global
global or local to window |global-local|
{not in Vi}
{not available when compiled without the |+statusline|
feature}
@@ -5565,7 +5799,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Otherwise the result is taken as flag text and applied to the rules
described above.
Watch out for errors in expressions. They may render Vim unusable !
Watch out for errors in expressions. They may render Vim unusable!
If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and
edit your .vimrc or whatever with "vim -u NONE" to get it right.
@@ -5646,6 +5880,7 @@ A jump table for the options with a short description can be found at |Q_op|.
systems the swap file will not be written at all. For a unix system
setting it to "sync" will use the sync() call instead of the default
fsync(), which may work better on some systems.
The 'fsync' option is used for the actual file.
*'switchbuf'* *'swb'*
'switchbuf' 'swb' string (default "")
@@ -5686,6 +5921,7 @@ A jump table for the options with a short description can be found at |Q_op|.
Syntax autocommand event is triggered with the value as argument.
This option is not copied to another buffer, independent of the 's' or
'S' flag in 'cpoptions'.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
*'tabstop'* *'ts'*
'tabstop' 'ts' number (default 8)
@@ -6064,6 +6300,8 @@ A jump table for the options with a short description can be found at |Q_op|.
This option will be used for the window title when exiting Vim if the
original title cannot be restored. Only happens if 'title' is on or
'titlestring' is not empty.
This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons.
*'titlestring'*
'titlestring' string (default "")
global
@@ -6180,10 +6418,12 @@ A jump table for the options with a short description can be found at |Q_op|.
"s" = button state
"c" = column plus 33
"r" = row plus 33
This only works up to 223 columns! See "dec" for a
solution.
xterm2 Works like "xterm", but with the xterm reporting the
mouse position while the mouse is dragged. This works
much faster and more precise. Your xterm must at
least at patchlevel 88 / XFree 3.3.3 for this to
least at patchlevel 88 / XFree 3.3.3 for this to
work. See below for how Vim detects this
automatically.
*netterm-mouse*
@@ -6193,6 +6433,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*dec-mouse*
dec DEC terminal mouse handling. The mouse generates a
rather complex sequence, starting with "<Esc>[".
This is also available for an Xterm, if it was
configured with "--enable-dec-locator".
*jsbterm-mouse*
jsbterm JSB term mouse handling.
*pterm-mouse*
@@ -6352,7 +6594,8 @@ A jump table for the options with a short description can be found at |Q_op|.
! When included, save and restore global variables that start
with an uppercase letter, and don't contain a lowercase
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
and "_K_L_M" are not.
and "_K_L_M" are not. Only String and Number types are
stored.
" Maximum number of lines saved for each register. Old name of
the '<' item, with the disadvantage that you need to put a
backslash before the ", otherwise it will be recognized as the
@@ -6629,6 +6872,21 @@ A jump table for the options with a short description can be found at |Q_op|.
:set wildmode=longest,list
< Complete longest common string, then list alternatives.
*'wildoptions'* *'wop'*
'wildoptions' 'wop' string (default "")
global
{not in Vi}
{not available when compiled without the |+wildignore|
feature}
A list of words that change how command line completion is done.
Currently only one word is allowed:
tagfile When using CTRL-D to list matching tags, the kind of
tag and the file of the tag is listed. Only one match
is displayed per line. Often used tag kinds are:
d #define
f function
Also see |cmdline-completion|.
*'winaltkeys'* *'wak'*
'winaltkeys' 'wak' string (default "menu")
global
@@ -6648,8 +6906,22 @@ A jump table for the options with a short description can be found at |Q_op|.
keys can be mapped.
If the menu is disabled by excluding 'm' from 'guioptions', the ALT
key is never used for the menu.
In the Win32 version, the <F10> key is handled like this too, since
Windows uses it to select a menu.
This option is not used for <F10>; on Win32 and with GTK <F10> will
select the menu, unless it has been mapped.
*'window'* *'wi'*
'window' 'wi' number (default screen height - 1)
global
Window height. Do not confuse this with the height of the Vim window,
use 'lines' for that.
Used for |CTRL-F| and |CTRL-B| when there is only one window and the
value is smaller than 'lines' minus one. The screen will scroll
'window' minus two lines, with a minimum of one.
When 'window' is equal to 'lines' minus one CTRL-F and CTRL-B scroll
in a much smarter way, taking care of wrapping lines.
When resizing the Vim window, the value is smaller than 1 or more than
or equal to 'lines' it will be set to 'lines' minus 1.
{Vi also uses the option to specify the number of displayed lines}
*'winheight'* *'wh'* *E591*
'winheight' 'wh' number (default 1)

View File

@@ -1,4 +1,4 @@
*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jul 19
*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -71,6 +71,12 @@ Q: I can't enter non-ASCII character in Apple Terminal.
A: Under Window Settings, Emulation, make sure that "Escape non-ASCII
characters" is not checked.
Q: How do I start the GUI from the command line?
A: Assuming that Vim.app is located in /Applications:
open /Applications/Vim.app
Or:
/Applications/Vim.app/Contents/MacOS/Vim -g {arguments}
==============================================================================
4. Mac Lack *mac-lack*

View File

@@ -1,4 +1,4 @@
*os_unix.txt* For Vim version 7.0aa. Last change: 2003 Mar 15
*os_unix.txt* For Vim version 7.0aa. Last change: 2005 Mar 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -54,7 +54,7 @@ supports colors, but "T_Co" is empty or zero): >
For real color terminals the ":highlight" command can be used.
The file "tools/Vim132" is a shell script that can be used to put Vim in 132
The file "tools/vim132" is a shell script that can be used to put Vim in 132
column mode on a vt100 and lookalikes.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2004 Sep 07
*pattern.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -153,6 +153,7 @@ The offset gives the cursor position relative to the found match:
s[-num] [num] characters to the left of the start of the match
b[+num] [num] identical to s[+num] above (mnemonic: begin)
b[-num] [num] identical to s[-num] above (mnemonic: begin)
;{pattern} perform another searcn, see |//;|
If a '-' or '+' is given but [num] is omitted, a count of one will be used.
When including an offset with 'e', the search becomes inclusive (the
@@ -216,7 +217,7 @@ To clear the last used search pattern: >
This will not set the pattern to an empty string, because that would match
everywhere. The pattern is really cleared, like when starting Vim.
The search usual skips matches that don't move the cursor. Whether the next
The search usually skips matches that don't move the cursor. Whether the next
match is found at the next character or after the skipped match depends on the
'c' flag in 'cpoptions'. See |cpo-c|.
with 'c' flag: "/..." advances 1 to 3 characters
@@ -224,6 +225,10 @@ match is found at the next character or after the skipped match depends on the
The unpredictability with the 'c' flag is caused by starting the search in the
first column, skipping matches until one is found past the cursor position.
When searching backwards, searching starts at the start of the line, using the
'c' flag in 'cpoptions' as described above. Then the last match before the
cursor position is used.
In Vi the ":tag" command sets the last search pattern when the tag is searched
for. In Vim this is not done, the previous search pattern is still remembered,
unless the 't' flag is present in 'cpoptions'. The search pattern is always
@@ -267,7 +272,7 @@ the "*" is under your right hand middle finger (search to the right and down).
==============================================================================
2. The definition of a pattern *search-pattern* *pattern* *[pattern]*
*regular-expression* *regexp* *Pattern*
*E76* *E361* *E363* *E383* *E476*
*E76* *E383* *E476*
For starters, read chapter 27 of the user manual |usr_27.txt|.
@@ -517,11 +522,6 @@ An atom can be followed by an indication of how many times the atom can be
matched and in what way. This is called a multi. See |/multi| for an
overview.
It is not possible to use a multi that can match more than one time after an
atom that can match an empty string. That's because this could result in an
endless loop. If you try it, you will get this error message: >
*, \+ or \{ operand could be empty
<
*/star* */\star* *E56*
* (use \* when 'magic' is not set)
Matches 0 or more of the preceding atom, as many as possible.
@@ -572,7 +572,7 @@ endless loop. If you try it, you will get this error message: >
\{-} matches 0 or more of the preceding atom, as few as possible
{Vi does not have any of these}
n and m are positive decimal numbers
n and m are positive decimal numbers or zero
If a "-" appears immediately after the "{", then a shortest match
first algorithm is used (see example below). In particular, "\{-}" is
@@ -977,6 +977,17 @@ x A single character, with no special meaning, matches itself
a list of at least one character, each of which is either '-', '.',
'/', alphabetic, numeric, '_' or '~'.
These items only work for 8-bit characters.
*/[[=* *[==]*
- An equivalence class. This means that characters are matched that
have almost the same meaning, e.g., when ignoring accents. The form
is:
[=a=]
Currrently this is only implemented for latin1. Also works for the
latin1 characters in utf-8 and latin9.
*/[[.* *[..]*
- A collation element. This currently simply accepts a single
character in the form:
[.a.]
*/\]*
- To include a literal ']', '^', '-' or '\' in the collection, put a
backslash before it: "[xyz\]]", "[\^xyz]", "[xy\-z]" and "[xyz\\]".
@@ -1022,7 +1033,7 @@ x A single character, with no special meaning, matches itself
< Matches the words "r", "re", "ro", "rea", "roa", "read" and "road".
{not available when compiled without the +syntax feature}
*/\%d* */\%x* */\%o* */\%u* */\%U/* *E678*
*/\%d* */\%x* */\%o* */\%u* */\%U* *E678*
\%d123 Matches the character specified with a decimal number. Must be
followed by a non-digit.

View File

@@ -1,215 +0,0 @@
*pi_expl.txt* For Vim version 7.0aa. Last change: 2002 Nov 08
VIM REFERENCE MANUAL by M A Aziz Ahmed
updated by Mark Waggoner
*file-explorer* *file-browser*
Plugin for exploring (or browsing) directories and files
1. Starting the file explorer |expl-starting|
The functionality mentioned here is a |standard-plugin|.
This plugin is only available if 'compatible' is not set.
You can avoid loading this plugin by setting the "loaded_explorer" variable: >
:let loaded_explorer = 1
{Vi does not have any of this}
==============================================================================
1. Starting the file explorer *expl-starting*
This plugin is used to explore directories inside Vim. The file explorer is
launched whenever the user tries to edit a directory.
*:Explore* *:Sexplore*
To launch the explorer in the directory of the file currently edited: >
:Explore
If the file has changes the window is split. To always split the window: >
:Sexplore
To launch the explorer in a specific directory: >
:Explore dirname
:Sexplore dirname
From inside the explorer move your cursor to a line containing a file or
directory name. The following command keys are available:
<enter> will open the file in the window the explorer is currently
occupying.
'o' will split a new window and open the file in the new window.
'O' will open the file chosen using the window that the cursor was in just
before you started or entered the explorer window. If the explorer is
the only window, it will first split a new window to use for the file to
be opened.
'p' will open (or use) the preview window showing the file
'x' will execute the file with the system tools. Only when supported
(currently MS-Windows and KDE).
When splitting off a new window, you can control where the split window will
go relative to the explorer window using the variables g:explVertical,
g:explSplitBelow and g:explSplitRight.
*g:explVertical*
*g:explSplitBelow*
*g:explSplitRight*
*g:explStartBelow*
*g:explStartRight*
To control whether the split is made horizontally or vertically, use: >
let g:explVertical=1 " Split vertically
let g:explVertical=0 " Split horizontally (default)
To control where the window goes relative to the explorer window when
splitting horizontally, use the variable: >
let g:explSplitBelow=1 " Put new window below explorer window
let g:explSplitBelow=0 " Put new window above explorer window
The default for this is the setting of splitbelow at the time the plugin is
loaded.
To control where the windows goes relative to the explorer window when
splitting vertically, use the variable: >
let g:explSplitRight=1 " Put new window to the right of the explorer
let g:explSplitRight=0 " Put new window to the left of the explorer
The default for this is the setting of splitright at the time the plugin is
loaded.
To use a different split method for the explorer window, use: >
let g:explStartRight=1 " Put new explorer window to the right of the
" current window
let g:explStartRight=0 " Put new explorer window to the left of the
" current window
The default for this set to g:explSplitRight at the time the plugin is loaded.
To use a different split method for the explorer window, use: >
let g:explStartBelow=1 " Put new explorer window below the
" current window
let g:explStartBelow=0 " Put new explorer window above the
" current window
The default for this set to g:explSplitBelow at the time the plugin is loaded.
The start splits allow for the explorer window to be placed in a file browser
type arrangement, where the directories are shown on the left and the contents
opened on the right. The start split settings are only used when issuing
the Sexplore command.
Note that the window split is done a little bit differently than window splits
are usually done. Ordinarily, when splitting a window, the space occupied by
the current window will be split to give space for the new window. The
explorer attempts to instead split from a window adjacent to the explorer
window so that the explorer window will not change sizes. If there is not an
adjacent window in the direction you are splitting, the explorer window is
split.
*g:explWinSize*
After opening a file with the 'o' command, you might want to resize the
explorer window. This can be done by setting the variable >
let g:explWinSize=N
N is the number of rows (when the window is split horizontally) or the number
of columns (when the window is split vertically). If g:explWinSize is set to
an empty string (""), resizing will not be done. g:explWinSize defaults to
15.
*g:explDetailedList*
The file size (in bytes) and modification time can be displayed inside the
file explorer window. By pressing 'i', you can toggle between the name only
display and the more lengthy display. If you want the size and date to show
by default, use >
let g:explDetailedList=1
Doing this may slightly slow down explorer. The difference may or may not be
noticeable depending on your system and whether the directory is local or on
the network and on the size of the directory.
*g:explDateFormat*
The format of date displayed is configurable using the variable
g:explDateFormat. explorer uses this variable to pass to strftime() to fetch
the date information. |strftime()| The default is >
let g:explDateFormat="%d %b %Y %H:%M"
Note that for sorting purposes, the date is always placed at the end of the
line in its 'raw' form. If you have syntax highlighting turned on, this raw
date should be invisible.
*g:explHideFiles*
You can hide some files by filling the variable g:explHidFiles with regular
expressions. A filename that matches any of these regular expressions will not
be shown. For example, >
let g:explHideFiles='^\.,\.gz$,\.exe$,\.zip$'
will not show files that begin with "." and those that end in .gz, .exe or
.zip. However, all directory names will always be shown. If while exploring,
you'd like to see the hidden files as well, use the command "a".
The explorer header will indicate if filtering is being done.
*g:explDetailedHelp*
The help information spanning a few lines can be turned off (and just a single
help message enabled) using the option >
let g:explDetailedHelp=0
You can anytime switch to the detailed help format by pressing ?.
*explorer-delete*
Pressing 'D' inside explorer deletes the file under the cursor. You can delete
many files by visually selecting them and using 'D'. The deletion is
interactive in the form y/n/a/q. Directory deletion is not supported (mainly
because there is no way to delete a directory using a vim built-in function).
*explorer-rename*
Pressing 'R' inside explorer will allow you to rename the file under the
cursor.
*g:explSortBy*
The display in the file explorer can be sorted in forward or reverse order by
name, size, or modification date. You can set the default sorting direction
with the option >
let g:explSortBy='name' " alphabetically
let g:explSortBy='reverse name' " reverse alphabetically
let g:explSortBy='date' " newest first
let g:explSortBy='reverse date' " oldest first
let g:explSortBy='size' " largest first
let g:explSortBy='reverse size' " smallest first
While in the explorer, you can rotate through the sort fields by pressing the
's' key and you can reverse the current sort order by pressing the 'r' key.
Sorting on fields other than the name will be faster if the size and date are
displayed (using 'i' or g:explDetailedList).
The explorer heading will indicate the current sort order.
*g:explDirsFirst*
To control the segregation of directories and files, you can set this option >
let g:explDirsFirst=1 " Directories at the top of the list (default)
let g:explDirsFirst=0 " Directories mixed in with files
let g:explDirsFirst=-1 " Directories at the bottom of the list
*g:explSuffixesLast*
To control the segregation of files matching the suffixes option, you can set
this option >
let g:explSuffixesLast=1 " Files matching suffixes sorted at the bottom
" of the list (default)
let g:explSuffixesLast=0 " Files matching suffixes sorted normally
let g:explSuffixesLast=-1 " Files matching suffixes sorted at the top of
" the list
The heading will indicate if suffixes have been moved to the end (or start) of
the list.
*g:explUseSeparators*
Directories and files matching the suffixes list will be highlighted. If you
have the directories, files, and suffixes separated, and you would like a
separator line between the groups, you can set the option >
let g:explUseSeparators=1 " Use separator lines
let g:explUseSeparators=0 " Don't use separator lines
<
*g:explFileHandler*
If you set the "g:explFileHandler" variable to the name of a function, typing
'x' will call this function. The file or directory under the cursor will be
passed as an argument to the function. Suppose you have KDE, you could use
this: >
function MyFileHandler(fn)
exec "silent! !kfmclient exec " . escape(a:fn,' \%#')
endfunction
let g:explFileHandler = 'MyFileHandler'
For Win32 the variable is set by default to invoke the execute action. If you
type 'x' on a HTML file, Microsoft Internet Explorer will start (or whatever
application you have associated with HTML files).
==============================================================================
vim:tw=78:noet:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*pi_netrw.txt For Vim version 6.2. Last change: Sep 13, 2004
*pi_netrw.txt* For Vim version 6.3. Last change: Oct 08, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -536,11 +536,13 @@ from <netrw.vim> itself:
<c-l>......Refreshing the Listing..................|netrw-ctrl-l|
o..........Browsing with a Horizontal Split........|netrw-o|
p..........Preview Window..........................|netrw-p|
q..........Listing Bookmarks.......................|netrw-q|
q..........Listing Bookmarks and History...........|netrw-q|
r..........Reversing Sorting Order.................|netrw-r|
R..........Renaming Files or Directories...........|netrw-R|
s..........Selecting Sorting Style.................|netrw-s|
S..........Editing the Sorting Sequence............|netrw-S|
u..........Changing to a Predecessor Directory.....|netrw-u|
U..........Changing to a Successor Directory.......|netrw-U|
v..........Browsing with a Vertical Split..........|netrw-v|
x..........Customizing Browsing....................|netrw-x|
@@ -738,7 +740,7 @@ One may rename a block of files and directories by selecting them with
the V (|linewise-visual|).
HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide*
HIDING FILES OR DIRECTORIES *netrw-a* *g:netrw_list_hide*
Netrw's browsing facility allows one to use the hiding list in one of
three ways: ignore it, hide files which match, and show only those files
@@ -751,7 +753,7 @@ EDIT FILE OR DIRECTORY HIDING LIST *netrw-h*
The "<ctrl-h>" map brings up a requestor allowing the user to change the
file/directory hiding list. The hiding list consists of one or more patterns
delimited by commas. Files and/or directories satisfying these patterns will
be hidden (ie. not shown).
either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o*
@@ -802,6 +804,22 @@ One may toggle between normal and reverse sorting order by pressing the
"r" key.
CHANGING TO A PREDECESSOR DIRECTORY *netrw-u*
Every time you change to a new directory (new for the current session),
netrw will save the directory in a recently-visited directory history
list (unless g:netrw_dirhistmax is zero; by default, its ten). With the
"u" map, one can change to an earlier directory (predecessor). To do
the opposite, see |netrw-U|.
CHANGING TO A SUCCESSOR DIRECTORY *netrw-U*
With the "U" map, one can change to a later directory (successor).
This map is the opposite of the "u" map. (see |netrw-u|) Use the
q map to list both the bookmarks and history. (see |netrw-q|)
BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
Normally one enters a file or directory using the <cr>. However, the "v"
@@ -854,7 +872,8 @@ One may easily "bookmark" a directory by using
{cnt}b
Any count may be used. One may use viminfo's "!" option to retain bookmarks
between vim sessions.
between vim sessions. See |netrw-B| for how to return to a bookmark and
|netrw-q| for how to list them.
CHANGING TO A BOOKMARKED DIRECTORY *netrw-B*
@@ -863,12 +882,14 @@ To change directory back to a bookmarked directory, use
{cnt}B
Any count may be used.
Any count may be used to reference any of the bookmarks. See |netrw-b|
for how to bookmark a directory and |netrw-q| for how to list them.
LISTING BOOKMARKS *netrw-q*
LISTING BOOKMARKS AND HISTORY *netrw-q*
Pressing "q" will list the bookmarked directories. (query)
Pressing "q" will list the bookmarked directories and directory traversal
history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|)
IMPROVING DIRECTORY BROWSING *netrw-list-hack*
@@ -991,11 +1012,26 @@ which is loaded automatically at startup (assuming :set nocp).
attempting to read/write your file over the network. Please
send that information to <netrw.vim>'s maintainer,
drchipNOSPAM at campbellfamily.biz - NOSPAM
NdrOchip at ScampbellPfamily.AbizM - NOSPAM
==============================================================================
10. History *netrw-history*
v52: * nonumber'ing now set for browsing buffers
* when the hiding list hid all files, error messages ensued. Fixed
* when browsing, swf is set, but directory is not set, when netrw
was attempting to restore options, vim wanted to save a swapfile
to a local directory using an url-style path. Fixed
v51: * cygwin detection now automated (using windows and &shell is bash)
* customizable browser "file" rejection patterns
* directory history
* :[range]w url now supported (ie. netrw has a FileWriteCmd event)
* error messages have a "Press <cr> to continue" to allow them
to be seen
* directory browser displays no longer bother the swapfile
* u/U commands to go up and down the history stack
* history stack may be saved with viminfo with its "!" option
* bugfixes associated with unwanted [No Files] entries
v50: * directories now displayed using buftype=nofile; should keep the
directory names as-is
* attempts to remove empty "[No File]" buffers leftover
@@ -1003,8 +1039,8 @@ which is loaded automatically at startup (assuming :set nocp).
* bugfix: a "caps-lock" editing difficulty left in v49 was fixed
* syntax highlighting for "Showing:" the hiding list included
* bookmarks can now be retained if "!" is in the viminfo option
v49: * will use ftp for http://.../ browsing v48: * One may use ftp to
do remote host file browsing
v49: * will use ftp for http://.../ browsing v48:
* One may use ftp to do remote host file browsing
* (windows and !cygwin) remote browsing with ftp can now use
the "dir" command internally to provide listings
* g:netrw_keepdir now allows one to keep the initial current
@@ -1032,9 +1068,9 @@ which is loaded automatically at startup (assuming :set nocp).
listings
* improved unusual file and directory name handling preview
* window support
v47: * now handles local directory browsing. v46: * now handles
remote directory browsing
* g:netrw_silent (if 1) will cause all transfers to be silent'd
v47: * now handles local directory browsing.
v46: * now handles remote directory browsing
* g:netrw_silent (if 1) will cause all transfers to be silent
v45: * made the [user@]hostname:path form a bit more restrictive to
better handle errors in using protocols (e.g. scp:usr@host:file
was being recognized as an rcp request) v44: * changed from

View File

@@ -1,4 +1,4 @@
*quickfix.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*quickfix.txt* For Vim version 7.0aa. Last change: 2005 Mar 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,11 @@ The idea is to save the error messages from the compiler in a file and use Vim
to jump to the errors one by one. You can examine each problem and fix it,
without having to remember all the error messages.
In Vim the quickfix commands are used more generally to find a list of
positions in files. For example, |:vimgrep| finds pattern matches. You can
use the positions in a script with the |getqflist()| function. Thus you can
do a lot more than the edit/compile/fix cycle!
If you are using Manx's Aztec C compiler on the Amiga look here for how to use
it with Vim: |quickfix-manx|. If you are using another compiler you should
save the error messages in a file and start Vim with "vim -q filename". An
@@ -105,6 +110,14 @@ The following quickfix commands can be used:
Read the error file. Just like ":cfile" but don't
jump to the first error.
*:cb* *:cbuffer* *E681*
:cb[uffer] [bufnr] Read the error list from the current buffer.
When [bufnr] is given it must be the number of a
loaded buffer. That buffer will then be used instead
of the current buffer.
A range can be specified for the lines to be used.
Otherwise all lines in the buffer are used.
*:cl* *:clist*
:cl[ist] [from] [, [to]]
List all errors that are valid |quickfix-valid|.
@@ -123,6 +136,10 @@ deleted for some reason, the message "line changed" is shown to warn you that
the error location may not be correct. If you quit Vim and start again the
marks are lost and the error locations may not be correct anymore.
If vim is built with |+autocmd| support, two autocommands are available for
running commands before and after a quickfix command (':make', ':grep' and so
on) is executed. See |QuickFixCmdPre| and |QuickFixCmdPost| for details.
=============================================================================
2. The error window *quickfix-window*
@@ -158,12 +175,14 @@ height manually (e.g., by dragging the status line above it with the mouse).
In the quickfix window, each line is one error. The line number is equal to
the error number. You can use ":.cc" to jump to the error under the cursor.
Hitting the <CR> key or double-clicking the mouse on a line has the same
Hitting the <Enter> key or double-clicking the mouse on a line has the same
effect. The file containing the error is opened in the window above the
quickfix window. If there already is a window for that file, it is used
instead. If the buffer in the used window has changed, and the error is in
another file, jumping to the error will fail. You will first have to make
sure the window contains a buffer which can be abandoned.
*CTRL-W_<Enter>* *CTRL-W_<CR>*
You can use CTRL-W <Enter> to open a new window and jump to the error there.
When the quickfix window has been filled, two autocommand events are
triggered. First the 'filetype' option is set to "qf", which triggers the
@@ -212,20 +231,24 @@ lists, use ":cnewer 99" first.
4. Using :make *:make_makeprg*
*:mak* *:make*
:mak[e][!] [arguments] 1. If the 'autowrite' option is on, write any changed
:mak[e][!] [arguments] 1. If vim was built with |+autocmd|, all relevant
|QuickFixCmdPre| autocommands are executed.
2. If the 'autowrite' option is on, write any changed
buffers
2. An errorfile name is made from 'makeef'. If
3. An errorfile name is made from 'makeef'. If
'makeef' doesn't contain "##", and a file with this
name already exists, it is deleted.
3. The program given with the 'makeprg' option is
4. The program given with the 'makeprg' option is
started (default "make") with the optional
[arguments] and the output is saved in the
errorfile (for Unix it is also echoed on the
screen).
4. The errorfile is read using 'errorformat'.
5. If [!] is not given the first error is jumped to.
6. The errorfile is deleted.
7. You can now move through the errors with commands
5. The errorfile is read using 'errorformat'.
6. If [!] is not given the first error is jumped to.
7. The errorfile is deleted.
8. If vim was built with |+autocmd|, all relevant
|QuickFixCmdPost| autocommands are executed.
9. You can now move through the errors with commands
like |:cnext| and |:cprevious|, see above.
This command does not accept a comment, any "
characters are considered part of the arguments.
@@ -266,7 +289,68 @@ If 'shellpipe' is empty, the {errorfile} part will be omitted. This is useful
for compilers that write to an errorfile themselves (e.g., Manx's Amiga C).
==============================================================================
5. Using :grep *grep* *lid*
5. Using :vimgrep and :grep *grep* *lid*
Vim has two ways to find matches for a pattern: Internal and external. The
advantage of the internal grep is that it works on all systems and uses the
powerful Vim search patterns. An external grep program can be used when the
Vim grep does not do what you want.
The internal method will be slower, because files are read into memory. The
advantages are:
- Line separators and encoding are automatically recognized, as if a file is
being edited.
- Uses Vim search patterns. Multi-line patterns can be used.
- When plugins are enabled: compressed and remote files can be searched.
|gzip| |netrw|
- When 'hidden' is set the files are kept loaded, thus repeating a search is
much faster. Uses a lot of memory though!
5.1 using Vim's internal grep
*:vim* *:vimgrep* *E682* *E683*
:vim[grep][!] /{pattern}/[g][j] {file} ...
Search for {pattern} in the files {file} ... and set
the error list to the matches.
Without the 'g' flag each line is added only once.
With 'g' every match is added.
{pattern} is a Vim search pattern. Instead of
enclosing it in / any non-ID character (see
|'isident'|) can be used, so long as it does not
appear in {pattern}.
'ignorecase' applies. To overrule it put |/\c| in the
pattern to ignore case or |/\C| to match case.
'smartcase' is not used.
Without the 'j' flag Vim jumps to the first match.
With 'j' only the quickfix list is updated.
With the [!] any changes in the current buffer are
abandoned.
Every second or so the searched file name is displayed
to give you an idea of the progress made.
Examples: >
:vimgrep /an error/ *.c
:vimgrep /\<FileName\>/ *.h include/*
:vim[grep][!] {pattern} {file} ...
Like above, but instead of enclosing the pattern in a
non-ID character use a white-separated pattern. The
pattern must start with an ID character.
Example: >
:vimgrep Error *.c
<
*:vimgrepa* *:vimgrepadd*
:vimgrepa[dd][!] /{pattern}/[g][j] {file} ...
:vimgrepa[dd][!] {pattern} {file} ...
Just like ":vimgrep", but instead of making a new list
of errors the matches are appended to the current
list.
5.2 External grep
Vim can interface with "grep" and grep-like programs (such as the GNU
id-utils) in a similar way to its compiler integration (see |:make| above).
@@ -277,6 +361,9 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
*:gr* *:grep*
:gr[ep][!] [arguments] Just like ":make", but use 'grepprg' instead of
'makeprg' and 'grepformat' instead of 'errorformat'.
When 'grepprg' is "internal" this works like
|:vimgrep|. Note that the pattern needs to be
enclosed in separator characters then.
*:grepa* *:grepadd*
:grepa[dd][!] [arguments]
Just like ":grep", but instead of making a new list of
@@ -290,7 +377,7 @@ id-utils) in a similar way to its compiler integration (see |:make| above).
":grepadd" jumps to the first error, which is not
allowed with |:bufdo|.
5.1 Setting up grep
5.3 Setting up external grep
If you have a standard "grep" program installed, the :grep command may work
well with the defaults. The syntax is very similar to the standard command: >
@@ -322,7 +409,7 @@ error in |quickfix| mode. You can then use the |:cnext|, |:clist|, etc.
commands to see the other matches.
5.2 Using :grep with id-utils
5.4 Using :grep with id-utils
You can set up :grep to work with the GNU id-utils like this: >
@@ -336,31 +423,31 @@ works just as you'd expect.
(provided you remembered to mkid first :)
5.3 Browsing source code with :grep
5.5 Browsing source code with :vimgrep or :grep
Using the stack of error lists that Vim keeps, you can browse your files to
look for functions and the functions they call. For example, suppose that you
have to add an argument to the read_file() function. You enter this command: >
:grep read_file *.c
:vimgrep /\<read_file\>/ *.c
You use ":cn" to go along the list of matches and add the argument. At one
place you have to get the new argument from a higher level function msg(), and
need to change that one too. Thus you use: >
:grep msg *.c
:vimgrep /\<msg\>/ *.c
While changing the msg() functions, you find another function that needs to
get the argument from a higher level. You can again use ":grep" to find these
functions. Once you are finished with one function, you can use >
get the argument from a higher level. You can again use ":vimgrep" to find
these functions. Once you are finished with one function, you can use >
:colder
to go back to the previous one.
This works like browsing a tree: ":grep" goes one level deeper, creating a
This works like browsing a tree: ":vimgrep" goes one level deeper, creating a
list of branches. ":colder" goes back to the previous level. You can mix
this use of ":grep" and "colder" to browse all the locations in a tree-like
this use of ":vimgrep" and "colder" to browse all the locations in a tree-like
way. If you do this consistently, you will find all locations without the
need to write down a "todo" list.
@@ -392,7 +479,7 @@ not "b:current_compiler". What the command actually does is the following:
- Execute ":runtime! compiler/{name}.vim". The plugins are expected to set
options with "CompilerSet" and set the "current_compiler" variable to the
name of the compiler.
- Delete the "CompilerSet user command.
- Delete the "CompilerSet" user command.
- Set "b:current_compiler" to the value of "current_compiler".
- Without "!" the old value of "current_compiler" is restored.
@@ -522,6 +609,7 @@ Basic items
uses the length for the column number)
%*{conv} any scanf non-assignable conversion
%% the single '%' character
%s search text (finds a string)
The "%f" conversion depends on the current 'isfname' setting.
@@ -544,6 +632,13 @@ or >
to indicate the column of the error. This is to be used in a multi-line error
message. See |errorformat-javac| for a useful example.
The "%s" conversion specifies the text to search for to locate the error line.
The text is used as a literal string. The anchors "^" and "$" are added to
the text to locate the error line exactly matching the search text and the
text is prefixed with the "\V" atom to make it "very nomagic". The "%s"
conversion can be used to locate lines without a line number in the error
output. Like the output of the "grep" shell command.
When the pattern is present the line number will not be used.
Changing directory

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2004 Jul 27
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -607,6 +607,7 @@ Short explanation of each option: *option-list*
|'backupskip'| |'bsk'| no backup for files that match these patterns
|'balloondelay'| |'bdlay'| delay in mS before a balloon may pop up
|'ballooneval'| |'beval'| switch on balloon evaluation
|'balloonexpr'| |'bexpr'| expression to show in balloon
|'binary'| |'bin'| read/write/edit file in binary mode
|'bioskey'| |'biosk'| MS-DOS: use bios calls for input characters
|'bomb'| prepend a Byte Order Mark to the file
@@ -750,6 +751,7 @@ Short explanation of each option: *option-list*
|'maxfuncdepth'| |'mfd'| maximum recursive depth for user functions
|'maxmapdepth'| |'mmd'| maximum recursive depth for mapping
|'maxmem'| |'mm'| maximum memory (in Kbyte) used for one buffer
|'maxmempattern'| |'mmp'| maximum memory (in Kbyte) used for pattern search
|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers
|'menuitems'| |'mis'| maximum number of items in a menu
|'modeline'| |'ml'| recognize modelines at start or end of file

View File

@@ -1,4 +1,4 @@
*recover.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*recover.txt* For Vim version 7.0aa. Last change: 2005 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -116,8 +116,12 @@ command:
*:pre* *:preserve* *E313* *E314*
:pre[serve] Write all text for all buffers into swap file. The
original file is no longer needed for recovery. {Vi:
emergency exit}
original file is no longer needed for recovery.
This sets a flag in the current buffer. When the '&'
flag is present in 'cpoptions' the swap file will not
be deleted for this buffer when Vim exits and the
buffer is still loaded |cpo-&|.
{Vi: might also exit}
A Vim swap file can be recognized by the first six characters: "b0VIM ".
After that comes the version number, e.g., "3.0".

View File

@@ -1,4 +1,4 @@
*repeat.txt* For Vim version 7.0aa. Last change: 2004 Jul 30
*repeat.txt* For Vim version 7.0aa. Last change: 2005 Feb 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -13,6 +13,7 @@ Chapter 26 of the user manual introduces repeating |usr_26.txt|.
3. Complex repeats |complex-repeat|
4. Using Vim scripts |using-scripts|
5. Debugging scripts |debug-scripts|
6. Profiling |profiling|
==============================================================================
1. Single repeats *single-repeat*
@@ -81,6 +82,11 @@ This replaces all occurrences of "pat" with "PAT". The same can be done with:
:%s/pat/PAT/g
Which is two characters shorter!
A special case is using ":visual" as a command. This will move to a matching
line, go to Normal mode to let you execute commands there until you use |Q| to
return to Ex mode. This will be repeated for each matching line. While doing
this you cannot use ":global".
==============================================================================
3. Complex repeats *complex-repeat*
@@ -102,7 +108,7 @@ q Stops recording. (Implementation note: The 'q' that
expression. The result of the expression is then
executed. See also |@:|. {Vi: only named registers}
*@@*
*@@* *E748*
@@ Repeat the previous @{0-9a-z":*} [count] times.
:[addr]*{0-9a-z".=} *:@* *:star*
@@ -478,6 +484,7 @@ DEFINING BREAKPOINTS
The [lnum] is the line number of the breakpoint. Vim will stop at or after
this line. When omitted line 1 is used.
*:debug-name*
{name} is a pattern that is matched with the file or function name. The
pattern is like what is used for autocommands. There must be a full match (as
if the pattern starts with "^" and ends in "$"). A "*" matches any sequence
@@ -497,6 +504,10 @@ The match for functions is done against the name as it's shown in the output
of ":function". For local functions this means that something like "<SNR>99_"
is prepended.
Note that functions are first loaded and later executed. When they are loaded
the "file" breakpoints are checked, when they are executed the "func"
breakpoints.
DELETING BREAKPOINTS
*:breakd* *:breakdel* *E161*
@@ -538,4 +549,91 @@ OBSCURE
Undo ":debuggreedy": get debug mode commands directly from the
user, don't use typeahead for debug commands.
==============================================================================
6. Profiling *profile* *profiling*
Profiling means that Vim measures the time that is spend on executing
functions and/or scripts. The |+profile| feature is required for this.
It is only included when Vim was compiled with "huge" features.
{Vi does not have profiling}
:prof[ile] start {fname} *:prof* *:profile* *E750*
Start profiling, write the output in {fname} upon exit.
If {fname} already exists it will be overwritten.
The variable |v:profiling| is set to one.
:prof[ile] func {pattern}
Profile function that matches the pattern {pattern}.
See |:debug-name| for how {pattern} is used.
:prof[ile][!] file {pattern}
Profile script file that matches the pattern {pattern}.
See |:debug-name| for how {pattern} is used.
This only profiles the script itself, not the functions
defined in it.
When the [!] is added then all functions defined in the script
will also be profiled. But only if the script is loaded after
this command.
You must always start with a ":profile start fname" command. The resulting
file is written when Vim exits. Here is an example of the output, with line
numbers prepended for the explanation:
1 FUNCTION Test2() ~
2 Called 1 time ~
3 Total time: 0.155251 ~
4 Self time: 0.002006 ~
5 ~
6 count total (s) self (s) ~
7 9 0.000096 for i in range(8) ~
8 8 0.153655 0.000410 call Test3() ~
9 8 0.000070 endfor ~
10 " Ask a question ~
11 1 0.001341 echo input("give me an answer: ") ~
The header (lines 1-4) gives the time for the whole function. The "Total"
time is the time passed while the function was executing. The "Self" time is
the "Total" time reduced by time spent in:
- other user defined functions
- sourced scripts
- executed autocommands
- external (shell) commands
Lines 7-11 show the time spent in each executed line. Lines that are not
executed do not count. Thus a comment line is never counted.
The Count column shows how many times a line was executed. Note that the
"for" command in line 7 is executed one more time as the following lines.
That is because the line is also executed to detect the end of the loop.
The time Vim spends waiting for user input isn't counted at all. Thus how
long you take to respond to the input() prompt is irrelevant.
Profiling should give a good indication of where time is spent, but keep in
mind there are various things that may clobber the results:
- The accuracy of the time measured depends on the gettimeofday() system
function. It may only be as accurate as 1/100 second, even though the times
are displayed in micro seconds.
- Real elapsed time is measured, if other processes are busy they may cause
delays at unpredictable moments. You may want to run the profiling several
times and use the lowest results.
- If you have several commands in one line you only get one time. Split the
line to see the time for the individual commands.
- The time of the lines added up is mostly less than the time of the whole
function. There is some overhead in between.
- Functions that are deleted before Vim exits will not produce profiling
information. You can check the |v:profiling| variable if needed: >
:if !v:profiling
: delfunc MyFunc
:endif
<
- Profiling may give weird results on multi-processor systems, when sleep
mode kicks in or the processor frequency is reduced to save power.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*russian.txt* For Vim version 7.0aa. Last change: 2004 Jun 09
*russian.txt* For Vim version 7.0aa. Last change: 2004 Dec 22
VIM REFERENCE MANUAL by Vassily Ragosin
@@ -70,14 +70,5 @@ In order to use the Russian documentation, make sure you have set the
is related to a bug in GNU gettext library and may be fixed in the future
releases of gettext.
-- When using the Win32 console version of Vim you may experience a problem
with many Cyrillic glyphs being replaced by whitespaces for some unknown
reason. Sergey Khorev suggested a registry hack to avoid this:
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage]
"1252"="c_1251.nls"
===============================================================================
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*scroll.txt* For Vim version 7.0aa. Last change: 2004 Jun 08
*scroll.txt* For Vim version 7.0aa. Last change: 2005 Feb 10
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -52,6 +52,8 @@ CTRL-D Scroll window Downwards in the buffer. The number of
<PageDown> or *<PageDown>* *CTRL-F*
CTRL-F Scroll window [count] pages Forwards (downwards) in
the buffer. See also 'startofline' option.
When there is only one window the 'window' option
might be used.
*z+*
z+ Without [count]: Redraw with the line just below the
@@ -89,6 +91,8 @@ CTRL-U Scroll window Upwards in the buffer. The number of
<PageUp> or *<PageUp>* *CTRL-B*
CTRL-B Scroll window [count] pages Backwards (upwards) in the
buffer. See also 'startofline' option.
When there is only one window the 'window' option
might be used.
*z^*
z^ Without [count]: Redraw with the line just above the

158
runtime/doc/spell.txt Normal file
View File

@@ -0,0 +1,158 @@
*spell.txt* For Vim version 7.0aa. Last change: 2005 Mar 22
VIM REFERENCE MANUAL by Bram Moolenaar
Spell checking *spell*
1. Quick start |spell-quickstart|
X. Spell file format |spell-file-format|
{Vi does not have any of these commands}
Spell checking is not available when the |+syntax| feature has been disabled
at compile time.
==============================================================================
1. Quick start *spell-quickstart*
This command switches on spell checking: >
:setlocal spell spelllang=en_us
This switches the 'spell' option on and specifies to check for US English.
The words that are not recognized are highlighted with one of these:
SpellBad word not recognized
SpellRare rare word
SpellLocal wrong spelling for selected region
PERFORMANCE
Note that Vim does on-the-fly spellchecking. To make this work fast the
word list is loaded in memory. Thus this uses a lot of memory (2 Mbyte or
more). There might also be a noticable delay when the word list is loaded,
which happens when 'spelllang' is set. Each word list is only loaded once,
they are not deleted when 'spelllang' is made empty. When 'encoding' is set
the word lists are reloaded, thus you may notice a delay then too.
REGIONS
A word may be spelled differently in various regions. For example, English
comes in (at least) these variants:
en all regions
en_us US
en_gb Great Britain
en_ca Canada
Words that are not used in one region but are used in another region are
highlighted with SpellLocal.
Always use lowercase letters.
SPELL FILES
Vim searches for spell files in the "spell" subdirectory of the directories in
'runtimepath'. The name is: xx.yyy.spl, where:
xx the language name
yyy the value of 'encoding'
Exception: Vim uses "latin1" when 'encoding' is "iso-8859-15". The euro sign
doesn't matter for spelling.
Spelling for EBCDIC is currently not supported.
A spell file might not be available in the current 'encoding'. You may try
using the "iconv" program to create one: >
iconv -f latin1 -t koi8-r de.latin1.spl >de.koi8-r.spl
However, if some characters cannot be presented in the target encoding this
will give wrong results.
If a spell file only uses ASCII characters the encoding can be omitted. This
is useful for English: "en.spl" The file with encoding is checked first, thus
you could have one with encoding that includes words with non-ASCII characters
and use the ASCII file as a fall-back.
WORDS
Vim uses a fixed method to recognize a word. This is independent of
'iskeyword', so that it also works in help files and for languages that
include characters like '-' in 'iskeyword'. The word characters do depend on
'encoding'.
A word that starts with a digit is always ignored.
SYNTAX HIGHLIGHTING
Files that use syntax highlighting can specify where spell checking should be
done:
everywhere default
in specific items use "contains=@Spell"
everywhere but specific items use "contains=@NoSpell"
Note that mixing @Spell and @NoSpell doesn't make sense.
==============================================================================
X. Spell file format *spell-file-format*
*E751*
The spelling for a language is specified in file with a specific format.
The first character of a line specifies what follows in the line:
line meaning ~
-xx[-yy]... words for region xx (and region yy, etc.) follow
<word> normal word
><word> rare word
+<word> optional addition after a word
!<word> normal word, keep upper/lower case
!><word> rare word, keep upper/lower case
!+<word> optional word addition, keep upper/lower case
#<anything> comment
Empty lines are ignored. The word continues until the end of the line. Watch
out for trailing white space!
Words that start with an upper-case letter will be required to start with an
upper-case letter. Otherwise, words must be in lower-case and case is
ignored.
It is possible that a word appears both with an upper-case letter and as a
rare word. This means that the word with an upper-case letter is OK and the
word without the upper-case letter is rare.
*E753*
The region is specified with "-xx". For example, in the "en.spl" file "-us"
starts the word for "en_us". This can be repeated for words that are used in
more than one region. For example "-ca-us" is used for Canadian and US
English words. Use "---" to go back to the words for all regions.
Vim supports up to eight regions. *E752*
It is possible to have a match that starts with a valid word. In that case
the match is used, because it is longer. Example:
we
=we're
"re" is not a word, thus "=we're" is needed to avoid it gets highlighted.
The "+" items may appear after any word. For English "'s" is used. Be
careful with this, it may hide mistakes.
Vim will check for duplicate words in the files used, but you will only get
warnings if the 'verbose' option is set to 1 or more.
Note that the "=" and "+" words will slow down the operation. Use them only
when really needed.
vim:tw=78:sw=4:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2004 Jul 13
*starting.txt* For Vim version 7.0aa. Last change: 2005 Feb 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -263,8 +263,14 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
To be used when Vim is used to execute Ex commands from a file
instead of a terminal. Switches off most prompts and
informative messages. Also warnings and error messages.
But ":print" output is displayed. And when 'verbose' is
non-zero messages are printed (for debugging).
The output of these commands is displayed (to stdout):
:print
:list
:number
:set to display option values.
When 'verbose' is non-zero messages are printed (for
debugging, to stderr).
'term' and $TERM are not used.
If Vim appears to be stuck try typing "qa!<Enter>". You don't
get a prompt thus you can't see Vim is waiting for you to type
something.
@@ -423,8 +429,8 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-U* *E230*
-U {gvimrc} The file "gvimrc" is read for initializations when the GUI
starts. Other GUI initializations are skipped. When {gvimrc}
is equal to "NONE", no file is read for initializations at
all.
is equal to "NONE", no file is read for GUI initializations at
all. |gui-init|
Exception: Reading the system-wide menu file is always done.
{not in Vi}
@@ -469,22 +475,23 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
started in Ex mode, see |-s-ex|. See also |complex-repeat|.
{not in Vi}
*-w_nr*
-w {number}
-w{number} Set the 'window' option to {number}.
*-w*
-w {scriptout} All the characters that you type are recorded in the file
"scriptout", until you exit Vim. This is useful if you want
to create a script file to be used with "vim -s" or
":source!". When the "scriptout" file already exists, new
characters are appended. See also |complex-repeat|.
{scriptout} cannot start with a digit.
{not in Vi}
*-W*
-W {scriptout} Like -w, but do not append, overwrite an existing file.
{not in Vi}
*-w_nr*
-w{number} Does nothing. This was included for Vi-compatibility. In Vi
it sets the 'window' option, which is not implemented in Vim.
--remote [+{cmd}] {file} ...
Open the {file} in another Vim that functions as a server.
Any non-file arguments must come before this.
@@ -1033,6 +1040,7 @@ CTRL-Z Suspend Vim, like ":stop".
Command-line mode, the CTRL-Z is inserted as a normal
character. In Visual mode Vim goes back to Normal
mode.
Note: if CTRL-Z undoes a change see |mswin.vim|.
:sus[pend][!] or *:sus* *:suspend* *:st* *:stop*
@@ -1192,7 +1200,7 @@ This saves the current Session, and starts off the command to load another.
When [file] is omitted or is a number from 1 to 9, a
name is generated and 'viewdir' prepended. When last
directory name in 'viewdir' does not exist, this
directory is created.
directory is created. *E739*
An existing file is always overwritten then. Use
|:loadview| to load this view again.
When [file] is the name of a file ('viewdir' is not
@@ -1264,7 +1272,7 @@ The viminfo file is used to store:
- The command line history.
- The search string history.
- The input-line history.
- Contents of registers.
- Contents of non-empty registers.
- Marks for several files.
- File marks, pointing to locations in files.
- Last search/substitute pattern (for 'n' and '&').

View File

@@ -1,4 +1,4 @@
*syntax.txt* For Vim version 7.0aa. Last change: 2004 Sep 18
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Mar 19
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -184,6 +184,11 @@ add a few items or change the highlighting, follow these steps:
That's it. The next time you edit a C file the Comment color will be
different. You don't even have to restart Vim.
If you have multiple files, you can use the filetype as the directory name.
All the "*.vim" files in this directory will be used, for example:
~/.vim/after/syntax/c/one.vim
~/.vim/after/syntax/c/two.vim
REPLACING AN EXISTING SYNTAX FILE *mysyntaxfile-replace*
@@ -393,6 +398,9 @@ Force to omit the line numbers by using a zero value: >
Go back to the default to use 'number' by deleting the variable: >
:unlet html_number_lines
Closed folds are put in the HTML as they are displayed. If you don't want
this, use the "zR" command before invoking 2html.
By default, HTML optimized for old browsers is generated. If you prefer using
cascading style sheets (CSS1) for the attributes (resulting in considerably
shorter and valid HTML 4 file), use: >
@@ -417,6 +425,16 @@ To go back to the automatic mechanism, delete the g:html_use_encoding
variable: >
:unlet html_use_encoding
<
Closed folds are kept as they are displayed. If you don't want closed folds
in the HTML use the |zR| command before converting.
For diff mode a sequence of more than 3 filler lines is displayed as three
lines with the middle line mentioning the total number of inserted lines. If
you prefer to see all the inserted lines use: >
:let html_whole_filler = 1
And to go back to displaying up to three lines again: >
:unlet html_whole_filler
*convert-to-XML* *convert-to-XHTML*
An alternative is to have the script generate XHTML (XML compliant HTML). To
do this set the "use_xhtml" variable: >
@@ -618,6 +636,8 @@ c_space_errors trailing white space and spaces before a <Tab>
c_no_trail_space_error ... but no trailing spaces
c_no_tab_space_error ... but no spaces before a <Tab>
c_no_bracket_error don't highlight {}; inside [] as errors
c_no_curly_error don't highlight {}; inside [] and () as errors;
except { and } in first column
c_no_ansi don't do standard ANSI types and constants
c_ansi_typedefs ... but do standard ANSI types
c_ansi_constants ... but do standard ANSI constants
@@ -627,6 +647,10 @@ c_no_if0 don't highlight "#if 0" blocks as comments
c_no_cformat don't highlight %-formats in strings
c_no_c99 don't highlight C99 standard items
When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will
become a fold. If you don't want comments to become a fold use: >
:let c_no_comment_fold = 1
If you notice highlighting errors while scrolling backwards, which are fixed
when redrawing with CTRL-L, try setting the "c_minlines" internal variable
to a larger number: >
@@ -2115,6 +2139,9 @@ By default only R5RS keywords are highlighted and properly indented.
MzScheme-specific stuff will be used if b:is_mzscheme or g:is_mzscheme
variables are defined.
Also scheme.vim supports keywords of the Chicken Scheme->C compiler. Define
b:is_chicken or g:is_chicken, if you need them.
SDL *sdl.vim* *sdl-syntax*
@@ -2555,7 +2582,7 @@ DEFINING KEYWORDS *:syn-keyword*
:syntax keyword Type contained int long char
:syntax keyword Type int long contained char
:syntax keyword Type int long char contained
<
< *E747*
When you have a keyword with an optional tail, like Ex commands in
Vim, you can put the optional characters inside [], to define all the
variations at once: >
@@ -3482,6 +3509,7 @@ faster.]
Without a "groupthere" argument. Define a region or match that is
skipped while searching for a sync point.
*syn-sync-linecont*
:syntax sync linecont {pattern}
When {pattern} matches in a line, it is considered to continue in
@@ -3604,6 +3632,7 @@ term={attr-list} *attr-list* *highlight-term* *E418*
following items (in any order):
bold
underline
undercurl not always available
reverse
inverse same as reverse
italic
@@ -3612,6 +3641,9 @@ term={attr-list} *attr-list* *highlight-term* *E418*
Note that "bold" can be used here and by using a bold font. They
have the same effect.
"undercurl" is a curly underline. When "undercurl" is not possible
then "underline" is used. In general "undercurl" is only available in
the GUI.
start={term-list} *highlight-start* *E422*
stop={term-list} *term-list* *highlight-stop*
@@ -3767,8 +3799,10 @@ font={font-name} *highlight-font*
guifg={color-name} *highlight-guifg*
guibg={color-name} *highlight-guibg*
These give the foreground (guifg) and background (guibg) color to
use in the GUI. There are a few special names:
guisp={color-name} *highlight-guisp*
These give the foreground (guifg), background (guibg) and special
(guisp) color to use in the GUI. "guisp" is used for underline and
undercurl. There are a few special names:
NONE no color (transparent)
bg use normal background color
background use normal background color
@@ -3797,8 +3831,8 @@ guibg={color-name} *highlight-guibg*
You can also specify a color by its Red, Green and Blue values.
The format is "#rrggbb", where
"rr" is the Red value
"bb" is the Blue value
"gg" is the Green value
"bb" is the Blue value
All values are hexadecimal, range from "00" to "ff". Examples: >
:highlight Comment guifg=#11f0c3 guibg=#ff00ff
<
@@ -3859,6 +3893,17 @@ SpecialKey Meta and special keys listed with ":map", also for text used
to show unprintable characters in the text, 'listchars'.
Generally: text that is displayed differently from what it
really is.
*hl-SpellBad*
SpellBad Word that is not recognized by the spellchecker. |spell|
This will be combined with the highlighting used otherwise.
*hl-SpellLocal*
SpellLocal Word that is recognized by the spellchecker as one that is
used in another region. |spell|
This will be combined with the highlighting used otherwise.
*hl-SpellRare*
SpellRare Word that is recognized by the spellchecker as one that is
hardly ever used. |spell|
This will be combined with the highlighting used otherwise.
*hl-StatusLine*
StatusLine status line of current window
*hl-StatusLineNC*

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*tagsrch.txt* For Vim version 7.0aa. Last change: 2004 Jul 23
*tagsrch.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -60,7 +60,7 @@ tag, you will get the telnet prompt instead. Most versions of telnet allow
changing or disabling the default escape key. See the telnet man page. You
can 'telnet -E {Hostname}' to disable the escape character, or 'telnet -e
{EscapeCharacter} {Hostname}' to specify another escape character. If
possible, try to use "rsh" instead of "telnet" to avoid this problem.
possible, try to use "ssh" instead of "telnet" to avoid this problem.
*tag-priority*
When there are multiple matches for a tag, this priority is used:
@@ -744,11 +744,13 @@ CTRL-W i Open a new window, with the cursor on the first line
]D like "[D", but start at the current cursor position.
{not in Vi}
*:dl* *:dlist*
*:dli* *:dlist*
:[range]dl[ist][!] [/]string[/]
Like "[D" and "]D", but search in [range] lines
(default: whole file).
See |:search-args| for [/] and [!]. {not in Vi}
Note that ":dl" works like ":delete" with the "l"
flag.
*[_CTRL-D*
[ CTRL-D Jump to the first macro definition that contains the

View File

@@ -1,4 +1,4 @@
*term.txt* For Vim version 7.0aa. Last change: 2004 Jan 09
*term.txt* For Vim version 7.0aa. Last change: 2005 Mar 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -146,7 +146,7 @@ sequence of bytes.
*vt100-function-keys* *xterm-function-keys*
An xterm can send function keys F1 to F4 in two modes: vt100 compatible or
not. Because Vim cannot know what the xterm is sending, both types of keys
not. Because Vim may not know what the xterm is sending, both types of keys
are recognized. The same happens for the <Home> and <End> keys.
normal vt100 ~
<F1> t_k1 <Esc>[11~ <xF1> <Esc>OP *<xF1>-xterm*
@@ -167,6 +167,18 @@ recognizes most of them. Use ":set termcap" to check which are supported and
what the codes are. Mostly these are not in a termcap, they are only
supported by the builtin_xterm termcap.
*xterm-modifier-keys*
Newer versions of xterm support Alt and Ctrl for most function keys. To avoid
having to add all combinations of Alt, Ctrl and Shift for every key a special
sequence is recognized at the end of a termcap entry: ";*X". The "X" can be
any character, often '~' is used. The ";*" stands for an optional modifier
argument. ";2" is Shift, ";3" is Alt, ";5" is Ctrl and ";9" is Meta (when
it's different from Alt). They can be combined. Examples: >
:set <F8>=^[[19;*~
:set <Home>=^[[1;*H
Another speciality about these codes is that they are not overwritten by
another code. That is to avoid that the codes obtained from xterm directly
|t_RV| overwrite them.
*xterm-scroll-region*
The default termcap entry for xterm on Sun and other platforms does not
contain the entry for scroll regions. Add ":cs=\E[%i%d;%dr:" to the xterm
@@ -260,6 +272,8 @@ OUTPUT CODES
t_ts set window title start (to status line) *t_ts* *'t_ts'*
t_ue underline end *t_ue* *'t_ue'*
t_us underline mode *t_us* *'t_us'*
t_Ce undercurl end *t_Ce* *'t_Ce'*
t_Cs undercurl mode *t_Cs* *'t_Cs'*
t_ut clearing uses the current background color *t_ut* *'t_ut'*
t_vb visual bell *t_vb* *'t_vb'*
t_ve cursor visible *t_ve* *'t_ve'*
@@ -275,6 +289,8 @@ Added by Vim (there are no standard codes for these):
t_IE set icon text end *t_IE* *'t_IE'*
t_WP set window position (Y, X) in pixels *t_WP* *'t_WP'*
t_WS set window size (height, width) in characters *t_WS* *'t_WS'*
t_SI start insert mode (bar cursor shape) *t_SI* *'t_SI'*
t_EI end insert mode (block cursor shape) *t_EI* *'t_EI'*
t_RV request terminal version string (for xterm) *t_RV* *'t_RV'*
|xterm-8bit| |v:termresponse| |'ttymouse'| |xterm-codes|
@@ -287,6 +303,10 @@ Note: Use the <> form if possible
t_kd <Down> arrow down *t_kd* *'t_kd'*
t_kr <Right> arrow right *t_kr* *'t_kr'*
t_kl <Left> arrow left *t_kl* *'t_kl'*
<xUp> alternate arrow up *<xUp>*
<xDown> alternate arrow down *<xDown>*
<xRight> alternate arrow right *<xRight>*
<xLeft> alternate arrow left *<xLeft>*
<S-Up> shift arrow up
<S-Down> shift arrow down
t_%i <S-Right> shift arrow right *t_%i* *'t_%i'*
@@ -372,9 +392,13 @@ If your terminal supports both inversion and standout mode, you can see two
different modes. If your terminal supports only one of the modes, both will
look the same.
*keypad-comma*
The keypad keys, when they are not mapped, behave like the equivalent normal
key.
*xterm-codes*
key. There is one exception: if you have a comma on the keypad instead of a
decimal point, Vim will use a dot anyway. Use these mappings to fix that: >
:noremap <kPoint> ,
:noremap! <kPoint> ,
< *xterm-codes*
There is a special trick to obtain the key codes which currently only works
for xterm. When |t_RV| is defined and a response is received which indicates
an xterm with patchlevel 141 or higher, Vim uses special escape sequences to
@@ -391,6 +415,19 @@ When it is non-zero, the 't_AB' and 't_AF' options are used to set the color.
If one of these is not available, 't_Sb' and 't_Sf' are used. 't_me' is used
to reset to the default colors.
*termcap-cursor-shape* *termcap-cursor-color*
When Vim enters Insert mode the 't_SI' escape sequence is sent. When leaving
Insert mode 't_EI' is used. But only if both are defined. This can be used
to change the shape or color of the cursor in Insert mode. These are not
standard termcap/terminfo entries, you need to set them yourself.
Example for an xterm, this changes the color of the cursor: >
if &term =~ "xterm"
let &t_SI = "\<Esc>]12;purple\x7"
let &t_EI = "\<Esc>]12;blue\x7"
endif
NOTE: When Vim exits the shape for Normal mode will remain. The shape from
before Vim started will not be restored.
*termcap-title*
The 't_ts' and 't_fs' options are used to set the window title if the terminal
allows title setting via sending strings. They are sent before and after the

View File

@@ -1,4 +1,4 @@
*tips.txt* For Vim version 7.0aa. Last change: 2004 Feb 17
*tips.txt* For Vim version 7.0aa. Last change: 2005 Feb 23
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -201,21 +201,22 @@ abbreviations that correct them. For example: >
==============================================================================
Counting words, lines, etc. *count-items*
To count how often any pattern occurs in a buffer, set 'report' to 0, and use
the substitute command to replace the pattern with itself. The reported
number of substitutions is the number of items. Examples: >
To count how often any pattern occurs in the current buffer use the substitute
command and add the 'n' flag to avoid the substitution. The reported number
of substitutions is the number of items. Examples: >
:set report=0
:%s/./&/g characters
:%s/\i\+/&/g words
:%s/^ lines
:%s/the/&/g "the" anywhere
:%s/\<the\>/&/g "the" as a word
:%s/./&/gn characters
:%s/\i\+/&/gn words
:%s/^//n lines
:%s/the/&/gn "the" anywhere
:%s/\<the\>/&/gn "the" as a word
You might want to reset 'hlsearch' or do ":nohlsearch".
Add the 'e' flag if you don't want an error when there are no matches.
This does not work if the 'modifiable' option is off. An alternative is using
|v_g_CTRL-G| in Visual mode.
An alternative is using |v_g_CTRL-G| in Visual mode.
If you want to find matches in multiple files use |:vimgrep|.
*count-bytes*
If you want to count bytes, you can use this:

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*uganda.txt* For Vim version 7.0aa. Last change: 2004 Aug 29
*uganda.txt* For Vim version 7.0aa. Last change: 2005 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -172,7 +172,7 @@ There is a small clinic at the project, which provides children and their
family with medical help. When needed, transport to a hospital is offered.
Immunization programs are carried out and help is provided when an epidemic is
breaking out (measles and cholera have been a problem).
*donate*
Summer 1994 to summer 1995 I spent a whole year at the centre, working as a
volunteer. I have helped to expand the centre and worked in the area of water
and sanitation. I learned that the help that the KCC provides really helps.

View File

@@ -1,4 +1,4 @@
*usr_03.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
*usr_03.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
VIM USER MANUAL - by Bram Moolenaar
@@ -13,7 +13,7 @@ these commands below |Q_lr|.
|03.1| Word movement
|03.2| Moving to the start or end of a line
|03.3| Moving to a character
|03.4| Matching a paren
|03.4| Matching a parenthesis
|03.5| Moving to a specific line
|03.6| Telling where you are
|03.7| Scrolling around
@@ -145,7 +145,7 @@ aborted forward search and doesn't do anything. Note: <Esc> cancels most
operations, not just searches.
==============================================================================
*03.4* Matching a paren
*03.4* Matching a parenthesis
When writing a program you often end up with nested () constructs. Then the
"%" command is very handy: It moves to the matching paren. If the cursor is

View File

@@ -1,4 +1,4 @@
*usr_05.txt* For Vim version 7.0aa. Last change: 2004 Aug 27
*usr_05.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
VIM USER MANUAL - by Bram Moolenaar
@@ -7,7 +7,7 @@
Vim can be tuned to work like you want it to. This chapter shows you how to
make Vim start with options set to different values. Add plugins to extend
Vims capabilities. Or define your own macros.
Vim's capabilities. Or define your own macros.
|05.1| The vimrc file
|05.2| The example vimrc file explained
@@ -150,12 +150,11 @@ it worked before Vim 5.0. Otherwise the "Q" command starts Ex mode, but you
will not need it.
>
vnoremap p <Esc>:let current_reg = @"<CR>gvs<C-R>=current_reg<CR><Esc>
vnoremap _g y:exe "grep /" . escape(@", '\\/') . "/ *.c *.h"<CR>
This is a complicated mapping. It will not be explained how it works here.
What it does is to make "p" in Visual mode overwrite the selected text with
the previously yanked text. You can see that mappings can be used to do quite
complicated things. Still, it is just a sequence of commands that are
This mapping yanks the visually selected text and searches for it in C files.
This is a complicated mapping. You can see that mappings can be used to do
quite complicated things. Still, it is just a sequence of commands that are
executed like you typed them.
>
@@ -252,8 +251,8 @@ you use an existing Vim command, that command will no longer be available.
You better avoid that.
One key that can be used with mappings is the backslash. Since you
probably want to define more than one mapping, add another character. You
could map "\p" to add parens around a word, and "\c" to add curly braces, for
example: >
could map "\p" to add parentheses around a word, and "\c" to add curly braces,
for example: >
:map \p i(<Esc>ea)<Esc>
:map \c i{<Esc>ea}<Esc>

View File

@@ -1,4 +1,4 @@
*usr_10.txt* For Vim version 7.0aa. Last change: 2004 Mar 12
*usr_10.txt* For Vim version 7.0aa. Last change: 2005 Mar 15
VIM USER MANUAL - by Bram Moolenaar
@@ -437,7 +437,8 @@ If the string you insert contains a newline, the "I" acts just like a Normal
insert command and affects only the first line of the block.
The "A" command works the same way, except that it appends after the right
side of the block.
side of the block. And it does insert text in a short line. Thus you can
make a choice whether you do or don't want to append text to a short line.
There is one special case for "A": Select a Visual block and then use "$"
to make the block extend to the end of each line. Using "A" now will append
the text to the end of each line.

View File

@@ -1,4 +1,4 @@
*usr_12.txt* For Vim version 7.0aa. Last change: 2004 May 01
*usr_12.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM USER MANUAL - by Bram Moolenaar
@@ -345,7 +345,7 @@ program files, for example, enter the following command: >
This causes Vim to search for the string "error_string" in all the specified
files (*.c). The editor will now open the first file where a match is found
and position the cursor on the first matching line. To go to the next
matching line (no matter in what it is file), use the ":cnext" command. To go
matching line (no matter in what file it is), use the ":cnext" command. To go
to the previous match, use the ":cprev" command. Use ":clist" to see all the
matches and where they are.
The ":grep" command uses the external commands grep (on Unix) or findstr

View File

@@ -1,4 +1,4 @@
*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*usr_21.txt* For Vim version 7.0aa. Last change: 2004 Oct 10
VIM USER MANUAL - by Bram Moolenaar
@@ -65,7 +65,7 @@ a look at an overview:
:w !{program} execute {program} and send text to its input
:[range]!{program} filter text through {program}
Notice that the presense of a range before "!{program}" makes a big
Notice that the presence of a range before "!{program}" makes a big
difference. Without it executes the program normally, with the range a number
of text lines is filtered through the program.

View File

@@ -1,4 +1,4 @@
*usr_27.txt* For Vim version 7.0aa. Last change: 2004 Jun 26
*usr_27.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
VIM USER MANUAL - by Bram Moolenaar
@@ -304,9 +304,9 @@ Will match "ab" in "abbb". Actually, it will never match more than one b,
because there is no reason to match more. It requires something else to force
it to match more than the lower limit.
The same rules apply to removing "n" and "m". It's even possible to remove
both of the numbes, resulting in "\{-}". This matches the item before it zero
or more times, as few as possible. The item by itself always matches zero
times. It is useful when combined with something else. Example: >
both of the numbers, resulting in "\{-}". This matches the item before it
zero or more times, as few as possible. The item by itself always matches
zero times. It is useful when combined with something else. Example: >
/a.\{-}b

View File

@@ -1,4 +1,4 @@
*usr_40.txt* For Vim version 7.0aa. Last change: 2004 Feb 13
*usr_40.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM USER MANUAL - by Bram Moolenaar
@@ -60,7 +60,8 @@ It looks a lot like the mapping for <F2> in Normal mode, only the start is
different. The <F2> mapping for Normal mode is still there. Thus you can map
the same key differently for each mode.
Notice that, although this mapping starts in Insert mode, it ends in Normal
mode. If you want it to continue in Insert mode, append a "a" to the mapping.
mode. If you want it to continue in Insert mode, append an "a" to the
mapping.
Here is an overview of map commands and in which mode they work:

View File

@@ -1,4 +1,4 @@
*usr_41.txt* For Vim version 7.0aa. Last change: 2004 Oct 06
*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Mar 25
VIM USER MANUAL - by Bram Moolenaar
@@ -16,18 +16,21 @@ script. There are a lot of them, thus this is a long chapter.
|41.5| Executing an expression
|41.6| Using functions
|41.7| Defining a function
|41.8| Exceptions
|41.9| Various remarks
|41.10| Writing a plugin
|41.11| Writing a filetype plugin
|41.12| Writing a compiler plugin
|41.8| Lists and Dictionaries
|41.9| Exceptions
|41.10| Various remarks
|41.11| Writing a plugin
|41.12| Writing a filetype plugin
|41.13| Writing a compiler plugin
|41.14| Writing a plugin that loads quickly
|41.15| Writing library scripts
Next chapter: |usr_42.txt| Add new menus
Previous chapter: |usr_40.txt| Make new commands
Table of contents: |usr_toc.txt|
==============================================================================
*41.1* Introduction *vim-script-intro*
*41.1* Introduction *vim-script-intro* *script*
Your first experience with Vim scripts is the vimrc file. Vim reads it when
it starts up and executes the commands. You can set options to values you
@@ -42,7 +45,7 @@ Let's start with a simple example: >
:let i = 1
:while i < 5
: echo "count is" i
: let i = i + 1
: let i += 1
:endwhile
<
Note:
@@ -50,8 +53,19 @@ Let's start with a simple example: >
them when you type a command. In a Vim script file they can be left
out. We will use them here anyway to make clear these are colon
commands and make them stand out from Normal mode commands.
Note:
You can try out the examples by yanking the lines from the text here
and executing them with :@"
The ":let" command assigns a value to a variable. The generic form is: >
The output of the example code is:
count is 1 ~
count is 2 ~
count is 3 ~
count is 4 ~
In the first line the ":let" command assigns a value to a variable. The
generic form is: >
:let {variable} = {expression}
@@ -66,48 +80,52 @@ the number one.
The statements until the matching ":endwhile" are executed for as long as the
condition is true. The condition used here is the expression "i < 5". This
is true when the variable i is smaller than five.
The ":echo" command prints its arguments. In this case the string "count
is" and the value of the variable i. Since i is one, this will print:
count is 1 ~
Then there is another ":let i =" command. The value used is the expression "i
+ 1". This adds one to the variable i and assigns the new value to the same
variable.
The output of the example code is:
count is 1 ~
count is 2 ~
count is 3 ~
count is 4 ~
Note:
If you happen to write a while loop that keeps on running, you can
interrupt it by pressing CTRL-C (CTRL-Break on MS-Windows).
The ":echo" command prints its arguments. In this case the string "count is"
and the value of the variable i. Since i is one, this will print:
count is 1 ~
Then there is the ":let i += 1" command. This does the same thing as
":let i = i + 1". This adds one to the variable i and assigns the new value
to the same variable.
The example was given to explain the commands, but would you really want to
make such a loop it can be written much more compact: >
:for i in range(1, 4)
: echo "count is" i
:endfor
We won't explain how |:for| and |range()| work until later. Follow the links
if you are impatient.
THREE KINDS OF NUMBERS
Numbers can be decimal, hexadecimal or octal. A hexadecimal number starts
with "0x" or "0X". For example "0x1f" is 31. An octal number starts with a
zero. "017" is 15. Careful: don't put a zero before a decimal number, it
will be interpreted as an octal number!
with "0x" or "0X". For example "0x1f" is decimal 31. An octal number starts
with a zero. "017" is decimal 15. Careful: don't put a zero before a decimal
number, it will be interpreted as an octal number!
The ":echo" command always prints decimal numbers. Example: >
:echo 0x7f 036
< 127 30 ~
A number is made negative with a minus sign. This also works for hexadecimal
and octal numbers. A minus sign is also for subtraction. Compare this with
the previous example: >
and octal numbers. A minus sign is also used for subtraction. Compare this
with the previous example: >
:echo 0x7f -036
< 97 ~
White space in an expression is ignored. However, it's recommended to use it
for separating items, to make the expression easier to read. For example, to
avoid the confusion with a negative number, put a space between the minus sign
and the following number: >
avoid the confusion with a negative number above, put a space between the
minus sign and the following number: >
:echo 0x7f - 036
@@ -138,7 +156,7 @@ example, one script contains this code: >
:let s:count = 1
:while s:count < 5
: source other.vim
: let s:count = s:count + 1
: let s:count += 1
:endwhile
Since "s:count" is local to this script, you can be sure that sourcing the
@@ -189,15 +207,21 @@ exists() checks. That's not what you want.
The exclamation mark ! negates a value. When the value was true, it
becomes false. When it was false, it becomes true. You can read it as "not".
Thus "if !exists()" can be read as "if not exists()".
What Vim calls true is anything that is not zero. Only zero is false.
What Vim calls true is anything that is not zero. Zero is false.
Note:
Vim automatically converts a string to a number when it is looking for
a number. When using a string that doesn't start with a digit the
resulting number is zero. Thus look out for this: >
:if "true"
< The "true" will be interpreted as a zero, thus as false!
STRING VARIABLES AND CONSTANTS
So far only numbers were used for the variable value. Strings can be used as
well. Numbers and strings are the only two types of variables that Vim
supports. The type is dynamic, it is set each time when assigning a value to
the variable with ":let".
well. Numbers and strings are the basic types of variables that Vim supports.
The type is dynamic, it is set each time when assigning a value to the
variable with ":let". More about types in |41.8|.
To assign a string value to a variable, you need to use a string constant.
There are two types of these. First the string in double quotes: >
@@ -218,9 +242,9 @@ To avoid the need for a backslash, you can use a string in single quotes: >
:echo name
< "peter" ~
Inside a single-quote string all the characters are as they are. The drawback
is that it's impossible to include a single quote. A backslash is taken
literally as well, thus you can't use it to change the meaning of the
Inside a single-quote string all the characters are as they are. Only the
single quote itself is special: you need to use two to get one. A backslash
is taken literally, thus you can't use it to change the meaning of the
character after it.
In double-quote strings it is possible to use special characters. Here are
a few useful ones:
@@ -268,7 +292,8 @@ do something and restore the old value. Example: >
:let &ic = save_ic
This makes sure the "The Start" pattern is used with the 'ignorecase' option
off. Still, it keeps the value that the user had set.
off. Still, it keeps the value that the user had set. (Another way to do
this would be to add "\C" to the pattern, see |/\C|.)
MATHEMATICS
@@ -374,7 +399,7 @@ ones:
The result is one if the condition is met and zero otherwise. An example: >
:if v:version >= 600
:if v:version >= 700
: echo "congratulations"
:else
: echo "you are using an old version, upgrade!"
@@ -415,8 +440,8 @@ pattern, like what's used for searching. Example: >
:endif
Notice the use of a single-quote string for the pattern. This is useful,
because backslashes need to be doubled in a double-quote string and patterns
tend to contain many backslashes.
because backslashes would need to be doubled in a double-quote string and
patterns tend to contain many backslashes.
The 'ignorecase' option is used when comparing strings. When you don't want
that, append "#" to match case and "?" to ignore case. Thus "==?" compares
@@ -451,6 +476,8 @@ Example: >
The ":sleep" command makes Vim take a nap. The "50m" specifies fifty
milliseconds. Another example is ":sleep 4", which sleeps for four seconds.
Even more looping can be done with the ":for" command, see below in |41.8|.
==============================================================================
*41.5* Executing an expression
@@ -490,6 +517,17 @@ This inserts "new text " in the current line. Notice the use of the special
key "\<Esc>". This avoids having to enter a real <Esc> character in your
script.
If you don't want to execute a string but evaluate it to get its expression
value, you can use the eval() function: >
:let optname = "path"
:let optval = eval('&' . optname)
A "&" character is prepended to "path", thus the argument to eval() is
"&path". The result will then be the value of the 'path' option.
The same thing can be done with: >
:exe 'let optval = &' . optname
==============================================================================
*41.6* Using functions
@@ -513,9 +551,9 @@ A function can be called in an expression. Example: >
:let repl = substitute(line, '\a', "*", "g")
:call setline(".", repl)
The getline() function obtains a line from the current file. Its argument is
a specification of the line number. In this case "." is used, which means the
line where the cursor is.
The getline() function obtains a line from the current buffer. Its argument
is a specification of the line number. In this case "." is used, which means
the line where the cursor is.
The substitute() function does something similar to the ":substitute"
command. The first argument is the string on which to perform the
substitution. The second argument is the pattern, the third the replacement
@@ -554,9 +592,50 @@ String manipulation:
submatch() get a specific match in a ":substitute"
strpart() get part of a string
expand() expand special keywords
type() type of a variable
iconv() convert text from one encoding to another
List manipulation:
get() get an item without error for wrong index
len() number of items in a List
empty() check if List is empty
insert() insert an item somewhere in a List
add() append an item to a List
extend() append a List to a List
remove() remove one or more items from a List
copy() make a shallow copy of a List
deepcopy() make a full copy of a List
filter() remove selected items from a List
map() change each List item
sort() sort a List
reverse() reverse the order of a List
split() split a String into a List
join() join List items into a String
string() String representation of a List
call() call a function with List as arguments
index() index of a value in a list
max() maximum value in a List
min() minimum value in a List
count() count number of times a value appears in a List
Dictionary manipulation:
get() get an entries without error for wrong key
len() number of entries in a Dictionary
has_key() check whether a key appears in a Dictionary
empty() check if Dictionary is empty
remove() remove an entry from a Dictionary
extend() add entries from one Dictionary to another
filter() remove selected entries from a Dictionary
map() change each Dictionary entry
keys() get List of Dictionary keys
values() get List of Dictionary values
items() get List of Dictionary key-value pairs
copy() make a shallow copy of a Dictionary
deepcopy() make a full copy of a Dictionary
string() String representation of a Dictionary
max() maximum value in a Dictionary
min() minimum value in a Dictionary
count() count number of times a value appears
Working with text in the current buffer:
byte2line() get line number at a specific byte count
line2byte() byte count at a specific line
@@ -566,9 +645,9 @@ Working with text in the current buffer:
wincol() window column number of the cursor
winline() window line number of the cursor
cursor() position the cursor at a line/column
getline() get a line from the buffer
getline() get a line or list of lines from the buffer
setline() replace a line in the buffer
append() append {string} below line {lnum}
append() append line or list of lines in the buffer
indent() indent of a specific line
cindent() indent according to C indenting
lispindent() indent according to Lisp indenting
@@ -586,6 +665,7 @@ System functions and manipulation of files:
executable() check if an executable program exists
filereadable() check if a file can be read
filewritable() check if a file can be written to
mkdir() create a new directory
isdirectory() check if a directory exists
getcwd() get the current working directory
getfsize() get the size of a file
@@ -597,6 +677,8 @@ System functions and manipulation of files:
rename() rename a file
system() get the result of a shell command
hostname() name of the system
readfile() read a file into a List of lines
writefile() write a List of lines into a file
Buffers, windows and the argument list:
argc() number of entries in the argument list
@@ -641,7 +723,7 @@ Interactive:
input() get a line from the user
inputsecret() get a line from the user without showing it
inputdialog() get a line from the user in a dialog
inputresave save and clear typeahead
inputsave() save and clear typeahead
inputrestore() restore typeahead
Vim server:
@@ -655,6 +737,7 @@ Vim server:
remote_foreground() move the Vim server window to the foreground
Various:
type() type of a variable
mode() get current editing mode
visualmode() last visual mode used
hasmapto() check if a mapping exists
@@ -662,6 +745,7 @@ Various:
maparg() get rhs of a mapping
exists() check if a variable, function, etc. exists
has() check if a feature is supported in Vim
getqflist() list of quickfix errors
cscope_connection() check if a cscope connection exists
did_filetype() check if a FileType autocommand was used
eventhandler() check if invoked by an event handler
@@ -673,7 +757,9 @@ Various:
libcallnr() idem, returning a number
getreg() get contents of a register
getregtype() get type of a register
setqflist() create a quickfix list
setreg() set contents and type of a register
taglist() get list of matching tags
==============================================================================
*41.7* Defining a function
@@ -734,6 +820,15 @@ The complete function definition is as follows: >
: return smaller
:endfunction
For people who like short functions, this does the same thing: >
:function Min(num1, num2)
: if a:num1 < a:num2
: return a:num1
: endif
: return a:num2
:endfunction
A user defined function is called in exactly the same way as a builtin
function. Only the name is different. The Min function can be used like
this: >
@@ -821,6 +916,9 @@ This uses the ":echohl" command to specify the highlighting used for the
following ":echo" command. ":echohl None" stops it again. The ":echon"
command works like ":echo", but doesn't output a line break.
You can also use the a:000 variable, it is a List of all the "..." arguments.
See |a:000|.
LISTING FUNCTIONS
@@ -857,8 +955,327 @@ To delete the Show() function: >
You get an error when the function doesn't exist.
FUNCTION REFERENCES
Sometimes it can be useful to have a variable point to one function or
another. You can do it with the function() function. It turns the name of a
function into a reference: >
:let result = 0 " or 1
:function! Right()
: return 'Right!'
:endfunc
:function! Wrong()
: return 'Wrong!'
:endfunc
:
:if result == 1
: let Afunc = function('Right')
:else
: let Afunc = function('Wrong')
:endif
:echo call(Afunc, [])
< Wrong! ~
Note that the name of a variable that holds a function reference must start
with a capital. Otherwise it could be confused with the name of a builtin
function.
The way to invoke a function that a variable refers to is with the call()
function. Its first argument is the function reference, the second argument
is a List with arguments.
Function references are most useful in combination with a Dictionary, as is
explained in the next section.
==============================================================================
*41.8* Exceptions
*41.8* Lists and Dictionaries
So far we have used the basic types String and Number. Vim also supports two
composite types: List and Dictionary.
A List is an ordered sequence of things. The things can be any kind of value,
thus you can make a List of numbers, a List of Lists and even a List of mixed
items. To create a List with three strings: >
:let alist = ['aap', 'mies', 'noot']
The List items are enclosed in square brackets and separated by commas. To
create an empty List: >
:let alist = []
You can add items to a List with the add() function: >
:let alist = []
:call add(alist, 'foo')
:call add(alist, 'bar')
:echo alist
< ['foo', 'bar'] ~
List concatenation is done with +: >
:echo alist + ['foo', 'bar']
< ['foo', 'bar', 'foo', 'bar'] ~
Or, if you want to extend a List directly: >
:let alist = ['one']
:call extend(alist, ['two', 'three'])
:echo alist
< ['one', 'two', 'three'] ~
Notice that using add() will have a different effect: >
:let alist = ['one']
:call add(alist, ['two', 'three'])
:echo alist
< ['one', ['two', 'three']] ~
The second argument of add() is added as a single item.
FOR LOOP
One of the nice things you can do with a List is iterate over it: >
:let alist = ['one', 'two', 'three']
:for n in alist
: echo n
:endfor
< one ~
two ~
three ~
This will loop over each element in List "alist", assigning the value to
variable "n". The generic form of a for loop is: >
:for {varname} in {listexpression}
: {commands}
:endfor
To loop a certain number of times you need a List of a specific length. The
range() function creates one for you: >
:for a in range(3)
: echo a
:endfor
< 0 ~
1 ~
2 ~
Notice that the first item of the List that range() produces is zero, thus the
last item is one less than the length of the list.
You can also specify the maximum value, the stride and even go backwards: >
:for a in range(8, 4, -2)
: echo a
:endfor
< 8 ~
6 ~
4 ~
A more useful example, looping over lines in the buffer: >
:for line in getline(1, 20)
: if line =~ "Date: "
: echo matchstr(line, 'Date: \zs.*')
: endif
:endfor
This looks into lines 1 to 20 (inclusive) and echoes any date found in there.
DICTIONARIES
A Dictionary stores key-value pairs. You can quickly lookup a value if you
know the key. A Dictionary is created with curly braces: >
:let uk2nl = {'one': 'een', 'two': 'twee', 'three': 'drie'}
Now you can lookup words by putting the key in square brackets: >
:echo uk2nl['two']
< twee ~
The generic form for defining a Dictionary is: >
{<key> : <value>, ...}
An empty Dictionary is one without any keys: >
{}
The possibilities with Dictionaries are numerous. There are various functions
for them as well. For example, you can obtain a list of the keys and loop
over them: >
:for key in keys(uk2nl)
: echo key
:endfor
< three ~
one ~
two ~
The will notice the items are not ordered. You can sort the list to get a
specific order: >
:for key in sort(keys(uk2nl))
: echo key
:endfor
< one ~
three ~
two ~
But you can never get back the order in which items are defined. For that you
need to use a List, it stores items in an ordered sequence.
DICTIONARY FUNCTIONS
The items in a Dictionary can normally be obtained with an index in square
brackets: >
:echo uk2nl['one']
< een ~
A method that does the same, but without so many punctuation characters: >
:echo uk2nl.one
< een ~
This only works for a key that is made of ASCII letters, digits and the
underscore. You can also assign a new value this way: >
:let uk2nl.four = 'vier'
:echo uk2nl
< {'three': 'drie', 'four': 'vier', 'one': 'een', 'two': 'twee'} ~
And now for something special: you can directly define a function and store a
reference to it in the dictionary: >
:function uk2nl.translate(line) dict
: return join(map(split(a:line), 'get(self, v:val, "???")'))
:endfunction
Let's first try it out: >
:echo uk2nl.translate('three two five one')
< drie twee ??? een ~
The first special thing you notice is the "dict" at the end of the ":function"
line. This marks the function as being used from a Dictionary. The "self"
local variable will then refer to that Dictionary.
Now let's break up the complicated return command: >
split(a:line)
The split() function takes a string, chops it into white separated words
and returns a list with these words. Thus in the example it returns: >
:echo split('three two five one')
< ['three', 'two', 'five', 'one'] ~
This list is the first argument to the map() function. This will go through
the list, evaluating its second argument with "v:val" set to the value of each
item. This is a shortcut to using a for loop. This command: >
:let alist = map(split(a:line), 'get(self, v:val, "???")')
Is equivalent to: >
:let alist = split(a:line)
:for idx in range(len(alist))
: let alist[idx] = get(self, alist[idx], "???")
:endfor
The get() function checks if a key is present in a Dictionary. If it is, then
the value is retrieved. If it isn't, then the default value is returned, in
the example it's '???'. This is a convenient way to handle situations where a
key may not be present and you don't want an error message.
The join() function does the opposite of split(): it joins together a list of
words, putting a space in between.
This combination of split(), map() and join() is a nice way to filter a line
of words in a very compact way.
OBJECT ORIENTED PROGRAMMING
Now that you can put both values and functions in a Dictionary, you can
actually use a Dictionary like an object.
Above we used a Dictionary for translating Dutch to English. We might want
to do the same for other languages. Let's first make an object (aka
Dictionary) that has the translate function, but no words to translate: >
:let transdict = {}
:function transdict.translate(line) dict
: return join(map(split(a:line), 'get(self.words, v:val, "???")'))
:endfunction
It's slightly different from the function above, using 'self.words' to lookup
word translations. But we don't have a self.words. Thus you could call this
an abstract class.
Now we can instantiate a Dutch translation object: >
:let uk2nl = copy(transdict)
:let uk2nl.words = {'one': 'een', 'two': 'twee', 'three': 'drie'}
:echo uk2nl.translate('three one')
< drie een ~
And a German translator: >
:let uk2de = copy(transdict)
:let uk2de.words = {'one': 'ein', 'two': 'zwei', 'three': 'drei'}
:echo uk2de.translate('three one')
< drei ein ~
You see that the copy() function is used to make a copy of the "transdict"
Dictionary and then the copy is changed to add the words. The original
remains the same, of course.
Now you can go one step further, and use your preferred translator: >
:if $LANG =~ "de"
: let trans = uk2de
:else
: let trans = uk2nl
:endif
:echo trans.translate('one two three')
< een twee drie ~
Here "trans" refers to one of the two objects (Dictionaries). No copy is
made. More about List and Dictionary identity can be found at |list-identity|
and |dict-identity|.
Now you might use a language that isn't supported. You can overrule the
translate() function to do nothing: >
:let uk2uk = copy(transdict)
:function! uk2uk.translate(line)
: return a:line
:endfunction
:echo uk2uk.translate('three one wladiwostok')
< three one wladiwostok ~
Notice that a ! was used to overwrite the existing function reference. Now
use "uk2uk" when no recognized language is found: >
:if $LANG =~ "de"
: let trans = uk2de
:elseif $LANG =~ "nl"
: let trans = uk2nl
:else
: let trans = uk2uk
:endif
:echo trans.translate('one two three')
< one two three ~
For further reading see |Lists| and |Dictionaries|.
==============================================================================
*41.9* Exceptions
Let's start with an example: >
@@ -915,7 +1332,7 @@ More information about exception handling can be found in the reference
manual: |exception-handling|.
==============================================================================
*41.9* Various remarks
*41.10* Various remarks
Here is a summary of items that apply to Vim scripts. They are also mentioned
elsewhere, but form a nice checklist.
@@ -1073,7 +1490,7 @@ Example: >
let XXX_loaded = 1
==============================================================================
*41.10* Writing a plugin *write-plugin*
*41.11* Writing a plugin *write-plugin*
You can write a Vim script in such a way that many people can use it. This is
called a plugin. Vim users can drop your script in their plugin directory and
@@ -1486,13 +1903,13 @@ hasmapto() Function to test if the user already defined a mapping
exists(":Cmd") Check if a user command already exists.
==============================================================================
*41.11* Writing a filetype plugin *write-filetype-plugin* *ftplugin*
*41.12* Writing a filetype plugin *write-filetype-plugin* *ftplugin*
A filetype plugin is like a global plugin, except that it sets options and
defines mappings for the current buffer only. See |add-filetype-plugin| for
how this type of plugin is used.
First read the section on global plugins above |41.10|. All that is said there
First read the section on global plugins above |41.11|. All that is said there
also applies to filetype plugins. There are a few extras, which are explained
here. The essential thing is that a filetype plugin should only have an
effect on the current buffer.
@@ -1672,7 +2089,7 @@ exists("*s:Func") Check if a function was already defined.
Also see |plugin-special|, the special things used for all plugins.
==============================================================================
*41.12* Writing a compiler plugin *write-compiler-plugin*
*41.13* Writing a compiler plugin *write-compiler-plugin*
A compiler plugin sets options for use with a specific compiler. The user can
load it with the |:compiler| command. The main use is to set the
@@ -1717,6 +2134,143 @@ don't check "current_compiler". This plugin is supposed to be loaded
last, thus it should be in a directory at the end of 'runtimepath'. For Unix
that could be ~/.vim/after/compiler.
==============================================================================
*41.14* Writing a plugin that loads quickly *write-plugin-quickload*
A plugin may grow and become quite long. The startup delay may become
noticable, while you hardly every use the plugin. Then it's time for a
quickload plugin.
The basic idea is that the plugin is loaded twice. The first time user
commands and mappings are defined that offer the functionality. The second
time the functions that implement the functionality are defined.
It may sound surprising that quickload means loading a script twice. What we
mean is that it loads quickly the first time, postponing the bulk of the
script to the second time, which only happens when you actually use it. When
you always use the functionality it actually gets slower!
The following example shows how it's done: >
" Vim global plugin for demonstrating quick loading
" Last Change: 2005 Feb 25
" Maintainer: Bram Moolenaar <Bram@vim.org>
" License: This file is placed in the public domain.
if !exists("s:did_load")
command -nargs=* BNRead call BufNetRead(<f-args>)
map <F19> :call BufNetWrite('something')<CR>
let s:did_load = 1
exe 'au FuncUndefined BufNet* source ' . expand('<sfile>')
finish
endif
function BufNetRead(...)
echo 'BufNetRead(' . string(a:000) . ')'
" read functionality here
endfunction
function BufNetWrite(...)
echo 'BufNetWrite(' . string(a:000) . ')'
" write functionality here
endfunction
When the script is first loaded "s:did_load" is not set. The commands between
the "if" and "endif" will be executed. This ends in a |:finish| command, thus
the rest of the script is not executed.
The second time the script is loaded "s:did_load" exists and the commands
after the "endif" are executed. This defines the (possible long)
BufNetRead() and BufNetWrite() functions.
If you drop this script in your plugin directory Vim will execute it on
startup. This is the sequence of events that happens:
1. The "BNRead" command is defined and the <F19> key is mapped when the script
is sourced at startup. A |FuncUndefined| autocommand is defined. The
":finish" command causes the script to terminate early.
2. The user types the BNRead command or presses the <F19> key. The
BufNetRead() or BufNetWrite() function will be called.
3. Vim can't find the function and triggers the |FuncUndefined| autocommand
event. Since the pattern "BufNet*" matches the invoked function, the
command "source fname" will be executed. "fname" will be equal to the name
of the script, no matter where it is located, because it comes from
expanding "<sfile>" (see |expand()|).
4. The script is sourced again, the "s:did_load" variable exists and the
functions are defined.
Notice that the functions that are loaded afterwards match the pattern in the
|FuncUndefined| autocommand. You must make sure that no other plugin defines
functions that match this pattern.
==============================================================================
*41.15* Writing library scripts *write-library-script*
Some functionality will be required in several places. When this becomes more
than a few lines you will want to put it in one script and use it from many
scripts. We will call that one script a library script.
Manually loading a library script is possible, so long as you avoid loading it
when it's already done. You can do this with the |exists()| function.
Example: >
if !exists('*MyLibFunction')
runtime library/mylibscript.vim
endif
call MyLibFunction(arg)
Here you need to know that MyLibFunction() is defined in a script
"library/mylibscript.vim" in one of the directories in 'runtimepath'.
To make this a bit simpler Vim offers the autoload mechanism. Then the
example looks like this: >
call mylib:myfunction(arg)
That's a lot simpler, isn't it? Vim will recognize the function name and when
it's not defined search for the script "autoload/mylib.vim" in 'runtimepath'.
That script must define the "mylib:myfunction()" function.
You can put many other functions in the mylib.vim script, you are free to
organize your functions in library scripts. But you must use function names
where the part before the colon matches the script name. Otherwise Vim
would not know what script to load.
If you get really enthousiastic and write lots of library scripts, you may
want to use subdirectories. Example: >
call netlib:ftp:read('somefile')
For Unix the library script used for this could be:
~/.vim/autoload/netlib/ftp.vim
Where the function is defined like this: >
function netlib:ftp:read(fname)
" Read the file fname through ftp
endfunction
Notice that the name the function is defined with is exactly the same as the
name used for calling the function. And the part before the last colon
exactly matches the subdirectory and script name.
You can use the same mechanism for variables: >
let weekdays = dutch:weekdays
This will load the script "autoload/dutch.vim", which should contain something
like: >
let dutch:weekdays = ['zondag', 'maandag', 'dinsdag', 'woensdag',
\ 'donderdag', 'vrijdag', 'zaterdag']
Further reading: |autoload|.
==============================================================================
Next chapter: |usr_42.txt| Add new menus

View File

@@ -1,4 +1,4 @@
*usr_toc.txt* For Vim version 7.0aa. Last change: 2003 Aug 18
*usr_toc.txt* For Vim version 7.0aa. Last change: 2005 Feb 22
VIM USER MANUAL - by Bram Moolenaar
@@ -286,11 +286,14 @@ Make Vim work as you like it.
|41.5| Executing an expression
|41.6| Using functions
|41.7| Defining a function
|41.8| Exceptions
|41.9| Various remarks
|41.10| Writing a plugin
|41.11| Writing a filetype plugin
|41.12| Writing a compiler plugin
|41.8| Lists and Dictionaries
|41.9| Exceptions
|41.10| Various remarks
|41.11| Writing a plugin
|41.12| Writing a filetype plugin
|41.13| Writing a compiler plugin
|41.14| Writing a plugin that loads quickly
|41.15| Writing library scripts
|usr_42.txt| Add new menus
|42.1| Introduction

View File

@@ -1,4 +1,4 @@
*various.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
*various.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -66,40 +66,47 @@ g8 Print the hex values of the bytes used in the
{not in Vi}
*:p* *:pr* *:print*
:[range]p[rint] Print [range] lines (default current line).
:[range]p[rint] [flags]
Print [range] lines (default current line).
Note: If you are looking for a way to print your text
file, you need an external program for that. In the
GUI you can use the File.Print menu entry.
(For printing on paper see |:hardcopy|)
on paper see |:hardcopy|. In the GUI you can use the
File.Print menu entry.
See |ex-flags| for [flags].
:[range]p[rint] {count}
:[range]p[rint] {count} [flags]
Print {count} lines, starting with [range] (default
current line |cmdline-ranges|).
See |ex-flags| for [flags].
*:P* *:Print*
:[range]P[rint] [count]
:[range]P[rint] [count] [flags]
Just as ":print". Was apparently added to Vi for
people that keep the shift key pressed too long...
See |ex-flags| for [flags].
*:l* *:list*
:[range]l[ist] [count]
:[range]l[ist] [count] [flags]
Same as :print, but display unprintable characters
with '^'.
with '^' and put $ after the line.
See |ex-flags| for [flags].
*:nu* *:number*
:[range]nu[mber] [count]
:[range]nu[mber] [count] [flags]
Same as :print, but precede each line with its line
number. (See also 'highlight' option).
See |ex-flags| for [flags].
*:#*
:[range]# [count] synonym for :number.
:[range]# [count] [flags]
synonym for :number.
*:z* *E144*
:{range}z[+-^.=]{count} Display several lines of text surrounding the line
specified with {range}, or around the current line
if there is no {range}. If there is a {count}, that's
how many lines you'll see; otherwise, the current
window size is used.
how many lines you'll see; if there is only one window
then the 'window' option is used, otherwise the
current window size is used.
:z can be used either alone or followed by any of
several punctuation marks. These have the following
@@ -110,8 +117,8 @@ g8 Print the hex values of the bytes used in the
+ current line 1 scr forward 1 scr forward
- 1 scr back current line current line
^ 2 scr back 1 scr back 1 scr back
. 1/2 scr back 1/2 scr fwd 1/2 src fwd
= 1/2 src back 1/2 scr fwd current line
. 1/2 scr back 1/2 scr fwd 1/2 scr fwd
= 1/2 scr back 1/2 scr fwd current line
Specifying no mark at all is the same as "+".
If the mark is "=", a line of dashes is printed
@@ -122,11 +129,13 @@ g8 Print the hex values of the bytes used in the
{not in all versions of Vi, not with these arguments}
*:=*
:= Print the last line number.
:= [flags] Print the last line number.
See |ex-flags| for [flags].
:{range}= Prints the last line number in {range}. For example,
:{range}= [flags] Prints the last line number in {range}. For example,
this prints the current line number: >
:.=
< See |ex-flags| for [flags].
:norm[al][!] {commands} *:norm* *:normal*
Execute Normal mode commands {commands}. This makes
@@ -140,7 +149,8 @@ g8 Print the hex values of the bytes used in the
The display isn't updated while ":normal" is busy.
This implies that an insert command must be completed
(to start Insert mode, see |:startinsert|). A ":"
command must be completed as well.
command must be completed as well. And you can't use
"Q" or "gQ" to start Ex mode.
{commands} cannot start with a space. Put a 1 (one)
before it, 1 space is one space.
The 'insertmode' option is ignored for {commands}.
@@ -240,7 +250,9 @@ g8 Print the hex values of the bytes used in the
*+ARP* Amiga only: ARP support included
B *+arabic* |Arabic| language support
N *+autocmd* |:autocmd|, automatic commands
m *+balloon_eval* |balloon-eval| support
m *+balloon_eval* |balloon-eval| support. Included when compiling with
supported GUI (Motif, GTK, GUI) and either
Netbeans/Sun Workshop integration or |+eval| feature.
N *+browse* |:browse| command
N *+builtin_terms* some terminals builtin |builtin-terms|
B *++builtin_terms* maximal terminals builtin |builtin-terms|
@@ -314,6 +326,7 @@ N *+path_extra* Up/downwards search in 'path' and 'tags'
m *+perl* Perl interface |perl|, may have |/dyn|
*+postscript* |:hardcopy| writes a PostScript file
N *+printer* |:hardcopy| command
H *+profile* |:profile| command
m *+python* Python interface |python|, may have |/dyn|
N *+quickfix* |:make| and |quickfix| commands
B *+rightleft* Right to left typing |'rightleft'|
@@ -387,10 +400,24 @@ N *+X11* Unix only: can restore window title |X11|
:redi[r] @{a-zA-Z} Redirect messages to register {a-z}. Append to the
contents of the register if its name is given
uppercase {A-Z}. {not in Vi}
:redi[r] @{a-z}> Append messages to register {a-z}. {not in Vi}
:redi[r] @* Redirect messages to the clipboard. {not in Vi}
:redi[r] @*> Append messages to the clipboard. {not in Vi}
:redi[r] @" Redirect messages to the unnamed register. {not in Vi}
:redi[r] @"> Append messages to the unnamed register. {not in Vi}
:redi[r] => {var} Redirect messages to a variable. If the variable
doesn't exist, then it is created. If the variable
exists, then it is initialized to an empty string.
Only string variables can be used. After the
redirection starts, if the variable is removed or
locked or the variable type is changed, then further
command output messages will cause errors. {not in Vi}
:redi[r] =>> {var} Append messages to an existing variable. Only string
variables can be used. {not in Vi}
:redi[r] END End redirecting messages. {not in Vi}
@@ -489,9 +516,9 @@ K Run a program to lookup the keyword under the
:sleep 100m "sleep for a hundred milliseconds
10gs "sleep for ten seconds
< Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
"gs" stands for "goto sleep". While sleeping the
cursor is positioned in the text (if visible). {not
in Vi}
"gs" stands for "goto sleep".
While sleeping the cursor is positioned in the text,
if at a visible position. {not in Vi}
*g_CTRL-A*
g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
@@ -595,6 +622,13 @@ g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
compresses the help files).
{not in Vi}
*:exu* *:exusage*
:exu[sage] Show help on Ex commands. Added to simulate the Nvi
command. {not in Vi}
*:viu* *:viusage*
:viu[sage] Show help on Normal mode commands. Added to simulate
the Nvi command. {not in Vi}
When no argument is given to |:help| the file given with the 'helpfile' option
will be opened. Otherwise the specified tag is searched for in all "doc/tags"

View File

@@ -1,4 +1,4 @@
*version6.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*version6.txt* For Vim version 7.0aa. Last change: 2005 Jan 26
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -865,8 +865,6 @@ on a directory moves the browser to that directory.
There are several other possibilities, such as opening a file in the preview
window, renaming files and deleting files.
See |file-explorer|.
Editing files over a network *new-network-files*
----------------------------
@@ -1703,7 +1701,7 @@ GUI:
is used. Required for dead key support (and multi-byte input).
- After a file selection dialog, check that the edited files were not changed
or deleted. The Win32 dialog allows deleting and renaming files.
- Motif and Athena: Added support for "editres". (Martin Dalecki)
- Motif and Athena: Added support for "editres". (Marcin Dalecki)
- Motif and Athena: Added "menuFont" to be able to specify a font or fontset
for the menus. Can also be set with the "Menu" highlight group. Useful
when the locale is different from 'encoding'. (David Harrison)
@@ -1756,7 +1754,7 @@ GTK GUI: (partly by Marcin Dalecki)
- When dropping a file on Vim, remove extra slashes from the start of the
path. Also shorten the file name if possible.
Motif: (Martin Dalecki)
Motif: (Marcin Dalecki)
- Made the dialog layout better.
- Added find and find/replace dialogs.
- For the menus, change "iso-8859" to "iso_8859", Linux appears to need this.
@@ -3050,7 +3048,7 @@ Win32: Without scrollbars present, the MS mouse scroll wheel didn't work.
Also handle the scrollbars when they are not visible.
Motif: When there is no right scrollbar, the bottom scrollbar would still
leave room for it. (Martin Dalecki)
leave room for it. (Marcin Dalecki)
When changing 'guicursor' and the value is invalid, some of the effects would
still take place. Now first check for errors and only make the new value
@@ -3136,7 +3134,7 @@ would crash.
When doing ":view file" and it fails, the current buffer was made read-only.
Motif: For some people the separators in the toolbar disappeared when resizing
the Vim window. (Martin Dalecki)
the Vim window. (Marcin Dalecki)
Win32 GUI: when setting 'lines' to a huge number, would not compute the
available space correctly. Was counting the menu height twice.
@@ -3187,7 +3185,7 @@ second time it replaced all matches. Removed the use of ":s///c".
GTK: Similar problems with the find/replace dialog, moved the code to a common
function.
X11: Use shared GC's for text. (Martin Dalecki)
X11: Use shared GC's for text. (Marcin Dalecki)
"]i" found the match under the cursor, instead of the first one below it.
Same for "]I", "] CTRL-I", "]d", "]D" and "] CTRL-D".

View File

@@ -1,4 +1,4 @@
*version7.txt* For Vim version 7.0aa. Last change: 2004 Oct 07
*version7.txt* For Vim version 7.0aa. Last change: 2005 Mar 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -6,7 +6,8 @@
Welcome to Vim 7! A large number of features has been added. This file
mentions all the new items, changes to existing features and bug fixes
compared to Vim 6.x.
compared to Vim 6.x. Use this command to see the version you are using: >
:version
See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.
See |version4.txt| for differences between Vim 3.x and Vim 4.x.
@@ -17,8 +18,13 @@ INCOMPATIBLE CHANGES |incompatible-7|
NEW FEATURES |new-7|
New data types |new-data-types|
Vim script enhancements |new-vim-script|
Spell checking |new-spell|
KDE support |new-KDE|
Translated manual pages |new-manpage-trans|
Internal grep |new-vimgrep|
POSIX compatibility |new-posix|
Debugger support |new-debug-support|
Various new items |new-items-7|
IMPROVEMENTS |improvements-7|
@@ -31,10 +37,28 @@ BUG FIXES |bug-fixes-7|
INCOMPATIBLE CHANGES *incompatible-7*
These changes are incompatible with previous releases. Check this list if you
run into a problem when upgrading from Vim 6.x to 7.0
run into a problem when upgrading from Vim 6.x to 7.0.
A ":write file" command no longer resets the 'modified' flag of the buffer,
unless the '+' flag is in 'cpoptions' |cpo-+|. This was illogical, since the
buffer is still modified compared to the original file. And when undoing
all changes the file would actually be marked modified. It does mean that
":quit" fails now.
":helpgrep" now uses a help window to display a match.
In an argument list double quotes could be used to include spaces in a file
name. This caused a difference between ":edit" and ":next" for escaping
double quotes and it is incompatible with some versions of Vi.
Command Vim 6.x file name Vim 7.x file name ~
:edit foo\"888 'foo"888' 'foo"888'
:next foo\"888 'foo888' 'foo"888'
:next a\"b c\"d 'ab cd' 'a"b' and 'c"d'
In a |literal-string| a single quote can be doubled to get one.
":echo 'a''b'" would result in "a b", but now that two quotes stand for one it
results in "a'b".
Minor incompatibilities:
@@ -48,21 +72,83 @@ Removed the old and incomplete "VimBuddy" code.
Buffers without a name report "No Name" instead of "No File". It was
confusing for buffers with a name and 'buftype' set to "nofile".
When ":file xxx" is used in a buffer without a name, the alternate file name
isn't set. This avoids creating buffers without a name that are not useful.
The "2html.vim" script now converts closed folds to HTML. This means the HTML
looks like its displayed, with the same folds open and closed. Use "zR" if no
folds should appear in the HTML. (partly by Carl Osterwisch)
Diff mode now is also converted as it is displayed.
Win32: The effect of the <F10> key depended on 'winaltkeys'. Now it depends
on whether <F10> has been mapped or not. This allows mapping <F10> without
changing 'winaltkeys'.
When 'octal' is in 'nrformats' and using CTRL-A on "08" it became "018", which
is illogical. Now it becomes "9". The leading zero(s) is(are) removed to
avoid the number becoming octal after incrementing "009" to "010".
When 'encoding' is set to a Unicode encoding, the value for 'fileencodings'
now includes "default" before "latin1". This means that for files with 8-bit
encodings the default is to use the encoding specified by the environment, if
possible. Previously latin1 would always be used, which is wrong in a
non-latin1 environment, such as Russian.
Previously Vim would exit when there are two windows, both of them displaying
a help file, and using ":quit". Now only the window is closed.
"-w {scriptout}" only works when {scriptout} doesn't start with a digit.
Otherwise it's used to set the 'window' option.
Previously <Home> and <xHome> could be mapped separately. This had the
disadvantage that all mappings (with modifiers) had to be duplicated, since
you can't be sure what the keyboard generates. Now all <xHome> are internally
translated to <Home>, both for the keys and for mappings. Also for <xEnd>,
<xF1>, etc.
==============================================================================
NEW FEATURES *new-7*
New data types *new-data-types*
--------------
Vim script enhancements *new-vim-script*
-----------------------
In Vim scripts the following types have been added:
list ordered list of items
dictionary associative array of items
function reference to a function
List ordered list of items |List|
Dictionary associative array of items |Dictionary|
Funcref reference to a function |Funcref|
Many functions and commands have been added to support the new types.
NOT IMPLEMENTED YET!
The |string()| function can be used to get a string representation of a
variable. Works for Numbers, Strings and composites of them. Then |eval()|
can be used to turn the string back into the variable value.
The |:let| command can now use ":let var += expr" like using ":let var = var +
expr". "-=" and ".=" works in a similar way.
With the |:profile| command you can find out where your function or script
wastes its time.
Spell checking *new-spell*
--------------
Spell checking has been integrated in Vim. There were a few implementations
with scripts, but they were slow and/or required an external program.
The 'spell' option is used to switch spell checking on or off.
The 'spelllang' option is used to specify the languages that are accepted.
The "undercurl" highlighting attribute was added to nicely point out spelling
mistakes in the GUI (based on patch from Marcin Dalecki).
The "guisp" color can be used to give it a color different from foreground and
background.
The number of possible different highlight attributes was raised from about
220 to over 30000. This allows for the attributes of spelling to be combined
with syntax highlighting attributes.
Much more info here: |spell|.
KDE support *new-KDE*
@@ -79,6 +165,7 @@ The MzScheme interpreter is supported. |MzScheme|
The |:mzscheme| command can be used to execute MzScheme commands.
The |:mzfile| command can be used to execute an MzScheme script file.
Printing multi-byte text *new-print-multi-byte*
------------------
@@ -87,6 +174,86 @@ The 'printmbcharset' and 'printmbfont' options are used for this.
Also see |postscript-cjk-printing|. (Mike Williams)
Translated manual pages *new-manpage-trans*
-----------------------
The manual page of Vim and associated programs is now also available in
several other languages.
Italian - translated by Antonio Colombo
Russian - translated by Vassily Ragosin
The Unix Makefile installs the Italian manual pages in .../man/it/man1/.
Other languages in similar places.
Internal grep *new-vimgrep*
-------------
The ":vimgrep" command can be used to search for a pattern in a list of files.
This is like the ":grep" command, but no external program is used. Besides
better portability, handling of different file encodings and using multi-line
patterns, this also allows grepping in compressed and remote files.
|:vimgrep|.
If you want to use the search results in a script you can use the
|getqflist()| function.
POSIX compatibility *new-posix*
-------------------
The POSIX test suite was used to verify POSIX compatibility. A number of
problems have been fixed to make Vim more POSIX compatible. Some of them
conflict with traditional Vi or expected behavior. The $VIM_POSIX environment
variable can be set to get POSIX compatibility. See |posix|.
Items that were fixed for both Vi and POSIX compatibilty:
- repeating "R" with a count only overwrites text once; added the 'X' flag to
'cpoptions' |cpo-X|
- a vertical movement command that moves to a non-existing line fails; added
the '-' flag to 'cpoptions' |cpo--|
- when preserving a file and doing ":q!" the file can be recovered; added the
'&' flag to 'cpoptions' |cpo-&|
- The 'window' option is partly implemented. It specifies how much CTRL-F and
CTRL-B scroll when there is one window. The "-w {number}" argument is now
accepted. "-w {scriptout}" only works when {scriptout} doesn't start with a
digit.
- Allow "-c{command}" argument, no space between "-c" and {command}.
- When writing a file with ":w!" don't reset 'readonly' when 'Z' is present in
'cpoptions'.
- Allow 'l' and '#' flags for ":list", ":print" and ":number".
- Added the '.' flag to 'cpoptions': ":cd" fails when the buffer is modified.
- In Ex mode with an empty buffer ":read file" doesn't keep an empty line
above or below the new lines.
- Remove a backslash before a NL for the ":global" command.
- When ":append", ":insert" or ":change" is used with ":global", get the
inserted lines from the command. Can use backslash-NL to separate lines.
- Can use ":global /pat/ visual" to execute Normal mode commands at each
matched line. Use "Q" to continue and go to the next line.
- The |:open| command has been partially implemented. It stops Ex mode, but
redraws the whole screen, not just one line as open mode is supposed to do.
- Support using a pipe to read the output from and write input to an external
command. Added the 'shelltemp' option and has("filterpipe").
- In ex silent mode the ":set" command output is displayed.
- The ":@@" and ":**" give an error message when no register was used before.
- The search pattern "[]-`]" matches ']', '^', '_' and '`'.
- Autoindent for ":insert" is using the line below the insert.
- Autoindent for ":change" is using the first changed line.
- Editing Ex command lines is not done in cooked mode, because CTRL-D and
CTRL-T cannot be handled then.
- In Ex mode, "1,3" prints three lines.
- Implemented the 'prompt' option.
Debugger support *new-debug-support*
----------------
The 'balloonexpr' option has been added. This is a generic way to implement
balloon functionality. You can use it to show info for the word under the
mouse pointer.
Various new items *new-items-7*
-----------------
@@ -95,6 +262,9 @@ Normal mode commands: ~
a", a' and a` New text objects to select quoted strings. |a'|
i", i' and i' (Taro Muraoka)
CTRL-W <Enter> In the quickfix window: opens a new window to show the
location of the error under the cursor.
Options: ~
'completefunc' The name of a function used for user-specified Insert
@@ -107,6 +277,15 @@ Options: ~
'mzquantum' Time in msec to schedule MzScheme threads.
'printmbcharset' CJK character set to be used for :hardcopy
'printmbfont' font names to be used for CJK output of :hardcopy
'fsync' Whether fsync() is called after writing a file.
(Ciaran McCreesh)
'wildoptions' "tagfile" value enables listing the file name of
matching tags for CTRL-D command line completion.
(based on an idea from Yegappan Lakshmanan)
'formatlistpat' pattern to recognize a numbered list for formatting.
(idea by Hugo Haas)
'spell' switch spell checking on/off
'spelllang' languages to check spelling for
Ex commands: ~
@@ -124,21 +303,66 @@ Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:delmarks| Delete marks.
|:sandbox| Command modifier: execute the argument in the sandbox.
|:exusage| Help for Ex commands (Nvi command).
|:viusage| Help for Vi commands (Nvi command).
|:cbuffer| Read error lines from a buffer. (partly by Yegappan
Lakshmanan)
New functions: ~
byteidx(expr, nr) |byteidx()| Index of a character. (Ilya Sher)
finddir(name) |finddir()| Find a directory in 'path'.
findfile(name) |findfile()| Find a file in 'path'. (Johannes
Zellner)
getfperm(fname) |getfperm()| Get file permission string. (Nikolai
Weibull)
getftype(fname) |getftype()| Get type of file. (Nikolai Weibull)
repeat(expr, count) |repeat()| Repeat "expr" "count" times.
(Christophe Poucet)
tr(expr, from, to) |tr()| Translate characters. (Ron Aaron)
system(cmd, input) |system()| Filters {input} through a shell
command.
|add()| append an item to a List
|append()| append List of lines to the buffer
|browsedir()| Dialog to select a directory.
|byteidx()| Index of a character. (Ilya Sher)
|call()| call a function with List as arguments
|copy()| make a shallow copy of a List or Dictionary
|count()| count nr of times a value is in a List or Dictionary
|deepcopy()| make a full copy of a List or Dictionary
|empty()| check if List or Dictionary is empty
|getqflist()| list of quickfix errors
|extend()| append one List to another or add items from one
Dictionary to another
|filter()| remove selected items from a List or Dictionary
|finddir()| Find a directory in 'path'.
|findfile()| Find a file in 'path'. (Johannes Zellner)
|foldtextresult()| The text displayed for a closed fold at line "lnum".
|function()| make a Funcref out of a function name
|get()| get an item from a List or Dictionary
|getfontname()| Get actual font name being used.
|getfperm()| Get file permission string. (Nikolai Weibull)
|getftype()| Get type of file. (Nikolai Weibull)
|getline()| With second argument: get List with buffer lines
|has_key()| check whether a key appears in a Dictionary
|insert()| insert an item somewhere in a List
|items()| get List of Dictionary key-value pairs
|join()| join List items into a String
|keys()| get List of Dictionary keys
|len()| number of items in a List or Dictionary
|map()| change each List or Dictionary item
|matchlist()| list with match and submatches of a pattern in a string
|max()| maximum value in a List or Dictionary
|min()| minimum value in a List or Dictionary
|mkdir()| create a directory
|readfile()| read a file into a list of lines
|remove()| remove one or more items from a List or Dictionary
|repeat()| Repeat "expr" "count" times. (Christophe Poucet)
|reverse()| reverse the order of a List
|setqflist()| create a quickfix list
|sort()| sort a List
|split()| split a String into a List
|string()| String representation of a List or Dictionary
|system()| Filters {input} through a shell command.
|taglist()| Get list of matching tags. (Yegappan Lakshmanan)
|tr()| Translate characters. (Ron Aaron)
|values()| get List of Dictionary values
|writefile()| write a list of lines into a file
User defined functions can now be loaded automatically from the "autoload"
directory in 'runtimepath'. See |autoload-functions|.
New autocommand events: ~
@@ -148,6 +372,8 @@ New autocommand events: ~
|InsertLeave| leaving Insert or Replace mode
|ColorScheme| after loading a color scheme
|QuickFixCmdPre| before :make, :grep et al. (Ciaran McCreesh)
|QuickFixCmdPost| after :make, :grep et al. (Ciaran McCreesh)
New items in search patterns: ~
@@ -162,6 +388,13 @@ New items in search patterns: ~
|/\%U| \%U1234abcd search for character with 8 pos. hex number
|/\]| [\U1234abcd] idem, in a colletion
(The above partly by Ciaran McCreesh)
|/[=| [[=a=]] an equivalence class (only for latin1 characters)
|/[.| [[.a.]] a collation element (only works with single char)
Nesting |/multi| items no longer is an error when an empty match is possible.
It is now possible to use \{0}, it matches the preceding atom zero times. Not
useful, just for compatibility.
New Syntax/Indent/FTplugin files: ~
@@ -174,11 +407,22 @@ SQL-Informix syntax file. (Dean L Hill)
PHP compiler plugin. (Doug Kearns)
Sive syntax file. (Nikolai Weibull)
New Keymaps: ~
Sinhala (Sri Lanka) (Harshula Jayasuriya)
New message translations: ~
The Ukranian messages are now also available in cp1251.
Irish message translations. (Kevin Patrick Scannell)
Vietnamese message translations and menu. (Phan Vinh Thinh)
Others: ~
@@ -189,9 +433,32 @@ Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
Mac: GUI font selector. (Peter "Rain Dog" Cucka)
Mac: support for multi-byte characters. (Da Woon Jung)
GUI font selector for Motif. (Marcin Dalecki)
Nicer toolbar buttons for Motif. (Marcin Dalecki)
Mnemonics for the Motif find/replace dialog. (Marcin Dalecki)
Mac: better integration with Xcode. Post a fake mouse-up event after the odoc
event and the drag receive handler to work around a stall after Vim loads a
file. Fixed an off-by-one line number error. (Da Woon Jung)
The netrw plugin now also supports viewing a directory, when "scp://" is used.
Deleting and renaming files is possible. (Charles Campbell)
Added the t_SI and t_EI escape sequences for starting and ending Insert mode.
To be used to set the cursor shape to a bar or a block. No default values,
they are not supported by termcap/terminfo.
Autocommands can be defined local to a buffer. This means they will also work
when the buffer does not have a name or no specific name. See
|autocmd-buflocal|. (Yakov Lerner)
For xterm most combinations of modifiers with function keys are recognized.
|xterm-modifier-keys|
==============================================================================
IMPROVEMENTS *improvements-7*
@@ -199,6 +466,11 @@ IMPROVEMENTS *improvements-7*
Move the help for printing to a separate help file. It's quite a lot now.
The pattern matching code was changed from a recursive function to an
iterative mechanism. This avoids out-of-stack errors. State is stored in
allocated memory, running out of memory can always be detected. Allows
matching more complex things, but Vim may seem to hang while doing that.
":breakadd here" and ":breakdel here" can be used to set or delete a
breakpoint at the cursor.
@@ -243,15 +515,105 @@ upper case. Add color support to the builtin vt320 terminal codes.
For the '%' item in 'viminfo', allow a number to set a maximum for the number
of buffers.
The 'statusline' option can be local to the window, so that each window can
have a different value. (partly by Yegappan Lakshmanan)
When a file looks like a shell script, check for an "exec" command that starts
the tcl interpreter. (suggested by Alexios Zavras)
Support conversion between utf-8 and latin9 (iso-8859-15) internally, so that
digraphs still work when iconv is not available.
When a session file is loaded while editing an unnamed, empty buffer that
buffer is wiped out. Avoids that there is an unused buffer in the buffer
list.
Win32: When libintl.dll supports bind_textdomain_codeset(), use it.
(NAKADAIRA Yukihiro)
When foldtext() finds no text after removing the comment leader, use the
second line of the fold. Helps for C-style /* */ comments where the first
line is just "/*".
When editing the same file from two systems (e.g., Unix and MS-Windows) there
mostly was no warning for an existing swap file, because the name of the
edited file differs (e.g., y:\dir\file vs /home/me/dir/file). Added a flag to
the swap file to indicate it is in the same directory as the edited file. The
used path then doesn't matter and the check for editing the same file is much
more reliable.
Client-server communication now supports 'encoding'. When setting 'encoding'
in a Vim server to "utf-8", and using "vim --remote fname" in a console,
"fname" is converted from the console encoding to utf-8. Also allows Vims
with different 'encoding' settings to exchange messages.
Internal: Changed ga_room into ga_maxlen, so that it doesn't need to be
incremented/decremented each time.
Included a few improvements for Motif from Marcin Dalecki. Draw label
contents ourselves to make them handle fonts in a way configurable by Vim and
a bit less dependent on the X11 font management.
When a register is empty it is not stored in the viminfo file.
Removed the tcltags script, it's obsolete.
":redir @*>" and ":redir @+>" append to the clipboard. Better check for
invalid characters after the register name. |:redir|
":redir => variable" and ":redir =>> variable" write or append to a variable.
(Yegappan Lakshmanan) |:redir|
":let g:" lists global variables.
":let b:" lists buffer-local variables.
":let w:" lists window-local variables.
":let v:" lists Vim variables.
The stridx() and strridx() functions take a third argument, where to start
searching. (Yegappan Lakshmanan)
g CTRL-G also shows the number of characters if it differs from the number of
bytes.
Completion for ":debug" and entering an expression for the '=' register. Skip
":" between range and command name. (Peter winters)
CTRL-Q in Insert mode now works like CTRL-V by default. Previously it was
ignored.
When "beep" is included in 'debug' a function or script that causes a beep
will result in a message with the source of the error.
When completing buffer names, match with "\(^\|[\/]\)" instead of "^", so that
":buf stor<Tab>" finds both "include/storage.h" and "storage/main.c".
To count items (pattern matches) without changing the buffer the 'n' flag has
been added to |:substitute|. See |count-items|.
The "screen.linux" $TERM name is recognized to set the default for
'background' to "dark". (Ciaran McCreesh) Also for "cygwin".
The |FileChangedShell| autocommand event can now use the |v:fcs_reason|
variable that specifies what triggered the event. |v:fcs_choice| can be used
to reload the buffer or ask the user what to do.
Not all modifiers were recognized for xterm function keys. Added the
possibility in term codes to end in ";*X" or "O*X", where X is any character
and the * stands for the modifier code.
Added the <xUp>, <xDown>, <xLeft> and <xRight> keys, to be able to recognize
the two forms that xterm can send their codes in and still handle all possible
modifiers.
getwinvar() now also works to obtain a buffer-local option from the specified
window.
==============================================================================
COMPILE TIME CHANGES *compile-changes-7*
Dropped the support for the BeOS and Amiga GUI. They were not maintained and
probably didn't work. If you want to work on this: get the Vim 6.x version
and merge it back in.
Mac: "make" now creates the Vim.app directory and "make install" copies it to
its final destination. (Raf)
@@ -259,6 +621,9 @@ Mac: Made it possible to compile with Motif, Athena or GTK without tricks and
still being able to use the MacRoman conversion. Added the os_mac_conv.c
file.
When running the tests and one of them fails to produce "test.out" the
following tests are still executed. This helps when running out of memory.
==============================================================================
BUG FIXES *bug-fixes-7*
@@ -327,6 +692,9 @@ When 'comments' includes multi-byte characters inserting the middle part and
alignment may go wrong. 'cindent' also suffers from this for right-aligned
items.
Win32: when 'encoding' is set to "utf-8" getenv() still returns strings in the
active codepage. Convert to utf-8. Also for $HOME.
The default for 'helplang' was "zh" for both "zh_cn" and "zh_tw". Now use
"cn" or "tw" as intended.
@@ -396,4 +764,257 @@ console version.
Win32 GUI: latin9 text (iso-8859-15) was not displayed correctly, because
there is no codepage for latin9. Do our own conversion from latin9 to UCS2.
When two versions of GTK+ 2 are installed it was possible to use the header
files from one and the library from the other. Use GTK_LIBDIR to put the
directory for the library early in the link flags.
With the GUI find/replace dialog a replace only worked if the pattern was
literal text. Now it works for any pattern.
When 'equalalways' is set and 'eadirection' is "hor", ":quit" would still
cause equalizing window heights in the vertical direction.
When ":emenu" is used in a startup script the command was put in the typeahead
buffer, causing a prompt for the crypt key to be messed up.
Mac OS/X: The default for 'isprint' included characters 128-160, causes
problems for Terminal.app.
When a syntax item with "containedin" is used, it may match in the start or
end of a region with a matchgroup, while this doesn't happen for a "contains"
argument.
When a transparent syntax items matches in another item where the highlighting
has already stopped (because of a he= argument), the highlighting would come
back.
When cscope is used to set the quickfix error list, it didn't get set if there
was only one match. (Sergey Khorev)
When 'confirm' is set and using ":bdel" in a modified buffer, then selecting
"cancel", would still give an error message.
The PopUp menu items that started Visual mode didn't work when not in Normal
mode. Switching between selecting a word and a line was not possible.
Win32: The keypad decimal point always resulted in a '.', while on some
keyboards it's a ','. Use MapVirtualKey(VK_DECIMAL, 2).
Removed unused function DisplayCompStringOpaque() from gui_w32.c
In Visual mode there is not always an indication whether the line break is
selected or not. Highlight the character after the line when the line break
is included, e.g., after "v$o".
GTK: The <F10> key can't be mapped, it selects the menu. Disable that with a
GTK setting and do select the menu when <F10> isn't mapped. (David Necas)
After "Y" '[ and '] were not at start/end of the yanked text.
When a telnet connection is dropped Vim preserves files and exits. While
doing that a SIGHUP may arrive and disturbe us, thus ignore it. (Scott
Anderson) Also postpone SIGHUP, SIGQUIT and SIGTERM until it's safe to
handle. Added handle_signal().
When using "set laststatus=2 cmdheight=2" in the .gvimrc you may only get one
line for the cmdline. (Christian Robinson) Invoke command_height() after the
GUI has started up.
When completing a file name on the command line backslashes are required for
white space. Was only done for a space, not for a Tab.
When configure could not find a terminal library, compiling continued for a
long time before reporting the problem. Added a configure check for tgetent()
being found in a library.
When the cursor is on the first char of the last line a ":g/pat/s///" command
may cause the cursor to be displayed below the text.
Win32: Editing a file with non-ASCII characters doesn't work when 'encoding'
is "utf-8". use _wfullpath() instead of _fullpath(). (Yu-sung Moon)
When recovering the 'fileformat' and 'fileencoding' were taken from the
original file instead of from the swapfile. When the file didn't exist, was
empty or the option was changed (e.g., with ":e ++fenc=cp123 file") it could
be wrong. Now store 'fileformat' and 'fileencoding' in the swapfile and use
the values when recovering.
":bufdo g/something/p" overwrites each last printed text line with the file
message for the next buffer. Temporarily clear 'shortmess' to avoid that.
Win32: Cannot edit a file starting with # with --remote. Do escape % and #
when building the ":drop" command.
A comment or | just after a expresion-backtick argument was not recognized.
E.g. in :e `="foo"`"comment.
"(" does not stop at an empty sentence (single dot and white space) while ")"
does. Also breaks "das" on that dot.
When doing "yy" with the cursor on a TAB the ruler could be wrong and "k"
moved the cursor to another column.
When 'commentstring' is '"%s' and there is a double quote in the line a double
quote before the fold marker isn't removed in the text displayed for a closed
fold.
In Visual mode, when 'bin' and 'eol' set, g CTRL-G counted the last line
break, resulting in "selected 202 of 201 bytes".
Motif: fonts were not used for dialog components. (Marcin Dalecki)
Motif: After using a toolbar button the keyboard focus would be on the toolbar
(Lesstif problem). (Marcin Dalecki)
When using "y<C-V>`x" where mark x is in the first column, the last line was
not included.
Not all test scripts work properly on MS-Windows when checked out from CVS.
Use a Vim command to fix all fileformats to dos before executing the tests.
When using ":new" and the file fits in the window, lines could still be above
the window. Now remove empty lines instead of keeping the relative position.
Cmdline completion didn't work after ":let var1 var<Tab>".
When using ":startinsert" or ":startreplace" when already in Insert mode
(possible when using CTRL-R =), pressing Esc would directly restart Insert
mode. (Peter Winters)
"2daw" didn't work at end of file if the last word is a single character.
Completion for ":next a'<Tab>" put a backslash before single quote, but it was
not removed when editing a file. Now halve backslashes in save_patterns().
Also fix expanding a file name with the shell that contains "\'".
When doing "1,6d|put" only "fewer lines" was reported. Now a following "more
lines" overwrites the message.
Configure could not handle "-Dfoo=long\ long" in the TCL config output.
When searching backwards, using a pattern that matches a newline and uses \zs
after that, didn't find a match. Could also get a hang or end up in the right
column in the wrong line.
When $LANG is "sl" for slovenian, the slovak menu was used, since "slovak"
starts with "sl".
When 'paste' is set in the GUI the Paste toolbar button doesn't work. Clear
'paste' when starting the GUI.
A message about a wrong viminfo line included the trailing NL.
When 'paste' is set in the GUI the toolbar button doesn't work in Insert mode.
Use ":exe" in menu.vim to avoid duplicating the commands, instead of using a
mapping.
Treat "mlterm" as an xterm-like terminal. (Seiichi Sato)
":z.4" and ":z=4" didn't work Vi compatible.
When sourcing a file, editing it and sourcing it again, it could appear twice
in ":scriptnames" and get a new <SID>, because the inode has changed.
When $SHELL is set but empty the 'shell' option would be empty. Don't use an
empty $SHELL value.
A command "w! file" in .vimrc or $EXINIT didn't work. Now it writes an empty
file.
When a CTRL-F command at the end of the file failed, the cursor was still
moved to the start of the line. Now it remains where it is.
When using ":s" or "&" to repeat the last substitute and "$" was used to put
the cursor in the last column, put the cursor in the last column again. This
is Vi compatible.
Vim is not fully POSIX compliant but sticks with traditional Vi behavior.
Added a few flags in 'cpoptions' to behave the POSIX way when wanted. The
$VIM_POSIX environment variable is checked to set the default.
Appending to a register didn't insert a line break like Vi. Added the '>'
flag to 'cpoptions' for this.
Using "I" in a line with only blanks appended to the line. This is not Vi
compatible. Added the 'H' flag in 'coptions' for this.
When joining multiple lines the cursor would be at the last joint, but Vi
leaves it at the position where "J" would put it. Added the 'q' flag in
'cpoptions' for this.
Autoindent didn't work for ":insert" and ":append".
Using ":append" in an empty buffer kept the dummy line. Now it's deleted to
be Vi compatible.
When reading commands from a file and stdout goes to a terminal, would still
request the xterm version. Vim can't read it, thus the output went to the
shell and caused trouble there.
When redirecting to a register with an invalid name the redirection would
still be done (after an error message). Now reset "redir_reg". (Yegappan
Lakshmanan)
It was not possible to use a NL after a backslash in Ex mode. This is
sometimes used to feed multiple lines to a shell command.
When 'cmdheight' is set to 2 in .vimrc and the GUI uses the number of lines
from the terminal we actually get 3 lines for the cmdline in gvim.
When setting $HOME allocated memory would leak.
Win32: bold characters may sometimes write in another character cell. Use
unicodepdy[] as for UTF-8. (Taro Muraoka)
":w fname" didn't work for files with 'buftype' set to "nofile".
The method used to locate user commands for completion differed from when they
are executed. Abiguous command names were not completed properly.
Incremental search may cause a crash when there is a custom statusline that
indirectly invokes ":normal".
Diff mode failed when $DIFF_OPTIONS was set in the environment. Unset it
before invoking "diff".
Completion didn't work after ":argdo", ":windo" and ":bufdo". Also for ":set
&l:opt" and ":set &g:opt". (Peter Winters)
When setting 'ttymouse' to "dec" in an xterm that supports the DEC mouse
locator it doesn't work. Now switch off the mouse before selecting another
mouse model.
When the CursorHold event is triggered and the commands peek for typed
characters the typeahead buffer may be messed up, e.g., when a mouse-up event
is received. Avoid invoking the autocommands from the function waiting for a
character, let it put K_CURSORHOLD in the input buffer.
Removed the "COUNT" flag from ":argadd", to avoid ":argadd 1*" to be used like
":1argadd *". Same for ":argdelete" and ":argedit".
Avoid that $LANG is used for the menus when LC_MESSAGES is "en_US".
Added backslashes before dashes in the vim.1 manual page to make the appear as
real dashes. (Pierr Habouzit)
Where "gq" left the cursor depended on the value of 'formatprg'. Now "gq"
always leaves the cursor at the last line of the formatted text.
When editing a compressed file, such as "changelog.Debian.gz" file, filetype
detection may try to check the contents of the file while it's still
compressed. Skip setting 'filetype' for compressed files until they have been
decompressed. Required for patterns that end in a "*".
Starting with an argument "+cmd" or "-S script" causes the cursor the be moved
to the first line. That breaks a BufReadPost autocommand that uses g`".
Don't move the cursor if it's somewhere past the first line.
"gg=G" while 'modifiable' is off was uninterruptable.
When 'encoding' is "sjis" inserting CTRL-V u d800 a few times causes a crash.
Don't insert a DBCS character with a NUL second byte.
In Insert mode CTRL-O <Home> didn't move the cursor. Made "ins_at_eol" global
and reset it in nv_home().
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*vi_diff.txt* For Vim version 7.0aa. Last change: 2004 Jun 08
*vi_diff.txt* For Vim version 7.0aa. Last change: 2005 Feb 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -14,19 +14,31 @@ Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing
is ":open". There are probably a lot of small differences (either because Vim
is missing something or because Posix is beside the mark).
1. Missing commands |missing-commands|
1. Simulated command |simulated-command|
2. Missing options |missing-options|
3. Limits |limits|
4. The most interesting additions |vim-additions|
5. Other vim features |other-features|
6. Command-line arguments |cmdline-arguments|
7. POSIX compliance |posix-compliance|
==============================================================================
1. Missing commands *missing-commands*
1. Simulated command *simulated-command*
This command is in Vi, but not in Vim:
This command is in Vi, but Vim only simuates it:
:o[pen] {Vi: start editing in open mode} *:o* *:op* *:open*
*:o* *:op* *:open*
:[range]o[pen] Works like |:visual|: end Ex mode.
{Vi: start editing in open mode}
:[range]o[pen] /pattern/ As above, additionally move the cursor to the
column where "pattern" matches in the cursor
line.
Vim does not support open mode, since it's not really useful. For those
situations where ":open" would start open mode Vim will leave Ex mode, which
allows executing the same commands, but updates the whole screen instead of
only one line.
==============================================================================
2. Missing options *missing-options*
@@ -45,11 +57,9 @@ mesg boolean (default on) *'mesg'*
novice boolean (default off) *'novice'*
open boolean (default on) *'open'*
optimize (op) boolean (default off) *'optimize'* *'op'*
prompt boolean (default on) *'prompt'*
redraw boolean (default off) *'redraw'*
slowopen (slow) boolean (default off) *'slowopen'* *'slow'*
sourceany boolean (default off) *'sourceany'*
window (wi) number (default 23) *'window'* *'wi'*
w300 number (default 23) *'w300'*
w1200 number (default 23) *'w1200'*
w9600 number (default 23) *'w9600'*
@@ -881,4 +891,57 @@ Only Vim is able to accept options in between and after the file names.
@{cmdfile} Vile: use {cmdfile} as startup file.
==============================================================================
7. POSIX compliance *posix* *posix-compliance*
In 2005 the POSIX test suite was run to check the compatiblity of Vim. Most
of the test was executed properly. There are the few things where Vim
is not POSIX compliant, even when run in Vi compatibility mode.
Set the $VIM_POSIX environment variable to have 'cpoptions' include the POSIX
flags when Vim starts up. This makes Vim run as POSIX as it can. That's
a bit different from being Vi compatible.
This is where Vim does not behave as POSIX specifies and why:
*posix-screen-size*
The $COLUMNS and $LINES environment variables are ignored by Vim if
the size can be obtained from the terminal in a more reliable way.
Add the '|' flag to 'cpoptions' to have $COLUMNS and $LINES overrule
sizes obtained in another way.
The "{" and "}" commands don't stop at a "{" in the original Vi, but
POSIX specifies it does. Add the '{' flag to 'cpoptions' if you want
it the POSIX way.
The "D", "o" and "O" commands accept a count. Also when repeated.
Add the '#' flag to 'cpoptions' if you want to ignore the count.
The ":cd" command fails if the current buffer is modified when the '.'
flag is present in 'cpoptions'.
There is no ATTENTION message, the "A" flag is added to 'shortmess'.
These are remarks about running the POSIX test suite:
- vi test 33 sometimes fails for unknown reasons
- vi test 250 fails; behavior will be changed in a new revision
http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html
- vi test 310 fails; exit code non-zero when any error occurred?
- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3.
- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent
mode and $EXINIT isn't used.
- ex tests 76, 78 fail because echo is used instead of printf. (fixed)
Also: problem with \s not changed to space.
- ex test 355 fails because 'window' isn't used for "30z".
- ex test 368 fails because shell command isn't echoed in silent mode.
- ex test 394 fails because "=" command output isn't visible in silent mode.
- ex test 411 fails because test file is wrong, contains stray ':'.
- ex test 475 and 476 fail because reprint output isn't visible in silent mode.
- ex test 480 and 481 fail because the tags file has spaces instead of a tab.
- ex test 502 fails because .exrc isn't read in silent mode.
- ex test 509 fails because .exrc isn't read in silent mode. and exit code is
1 instead of 2.
- ex test 534 fails because .exrc isn't read in silent mode.
vim:tw=78:ts=8:ft=help:norl:

566
runtime/doc/vim-it.1 Executable file
View File

@@ -0,0 +1,566 @@
.TH VIM 1 "22 febbraio 2002"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
.br
.B vim
[opzioni] [file ..]
.br
.B vim
[opzioni] \-
.br
.B vim
[opzioni] \-t tag
.br
.B vim
[opzioni] \-q [file_errori]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH DESCRIZIONE
.B Vim
Un editore di testi, compatibile con, e migliore di, Vi.
Può essere usato per editare qualsiasi file di testo.
Particolarmente utile per editare programmi.
.PP
Ci sono parecchi miglioramenti rispetto a Vi: undo multipli,
finestre e buffer multipli, evidenziazione sintattica, possibilità
di modificare la linea di comando, completamento nomi file, help
in linea, selezione testi in modalità visuale, etc..
Vedere ":help vi_diff.txt" per un sommario delle differenze fra
.B Vim
e Vi.
.PP
Mentre usate
.B Vim
potete ricevere molto aiuto dal sistema di help online, col comando ":help".
Vedere qui sotto la sezione AIUTO ONLINE.
.PP
Quasi sempre
.B Vim
viene invocato, per modificare un file, col comando
.PP
vim file
.PP
Più in generale
.B Vim
viene invocato con:
.PP
vim [opzioni] [lista_file]
.PP
Se lista_file non è presente, l'editor inizia aprendo un buffer vuoto.
Altrimenti, una e una sola delle quattro maniere indicate qui sotto può
essere usata per scegliere uno o più file da modificare.
.TP 12
file ..
Una lista di nomi di file.
Il primo di questi sarà il file corrente, e verrà letto nel buffer.
Il cursore sarà posizionato sulla prima linea del buffer.
Potete arrivare agli altri file col comando ":next".
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla
lista_file.
.TP
\-
Il file da editare è letto dallo "stdin" [di solito, ma non
necessriamente, il terminale \- NdT]. I comandi sono letti da "stderr",
che dovrebbe essere un terminale [tty].
.TP
\-t {tag}
Il file da editare e la posizione iniziale del cursore dipendono da "tag",
una specie di "etichetta" a cui saltare.
{tag} viene cercata nel file tags, ed il file ad essa associato diventa
quello corrente, ed il comando ad essa associato viene eseguito.
Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
nome di funzione.
L'effetto è che il file contenente quella funzione diventa il file corrente
e il cursore è posizionato all'inizio della funzione.
Vedere ":help tag-commands".
.TP
\-q [file_errori]
Inizia nella modalità quickFix [correzione veloce].
Il file [file_errori] è letto e il primo errore è visualizzato.
Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
per l'Amiga, "errors.err" su altri sistemi).
Si può saltare all'errore successivo col comando ":cn".
Vedere ":help quickfix".
.PP
.B Vim
si comporta in modo diverso se invocato con nomi differenti (il programma
eseguibile "sottostante" può essere sempre lo stesso).
.TP 10
vim
Modalità "Normal", comportamento normale.
.TP
ex
Inizia in modalità "Ex".
Si può passare in modalità "Normal" col comandi ":vi".
Si può invocare la modalità "Ex" anche con l'argomento "\-e".
.TP
view
Inizia in modalità "Sola Lettura". Non potete modificare i file.
Si può invocare la modalità "Sola Lettura" anche con l'argomento "\-R".
.TP
gvim gview
La versione GUI [Graphical User Interface].
Apre una nuova finestra.
Si può invocare la modalità "GUI" anche con l'argomento "\-g".
.TP
evim eview
La versione GUI in modalità "Facile" (semplificata).
Apre una nuova finestra.
Si può invocare la modalità "Facile" anche con l'argomento "\-y".
.TP
rvim rview rgvim rgview
Come sopra, ma con restrizioni ai comandi. Non si potrnno eseguire comandi
dello shell o sospendere
.B Vim.
Si può invocare la modalità "Ristretta" anche con l'argomento "\-Z".
.SH OPZIONI
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di
file. Opzioni che non necessitano un argomento possono essere raggruppate
dietro a un solo "\-".
.TP 12
+[numero]
Per il primo file il cursore sarà posizionato sulla linea "numero".
Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
.TP
+/{espressione}
Per il primo file il cursore sarà posizionato alla
prima occorrenza di {espressione}.
Vedere ":help search-pattern" per come specificare l'espressione.
.TP
+{comando}
.TP
\-c {comando}
{comando} sarà eseguito dopo che il
primo file è stato letto.
{comando} è interpretato come un comando Ex.
Se il {comando} contiene spazi deve essere incluso fra doppi apici
(o altro delimitatore, a seconda dello shell che si sta usando).
Esempio: Vim "+set si" main.c
.br
Note: Si possono avere fino a 10 comandi "+" o "\-c".
.TP
\-S {file}
I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
Equivalente a \-c "source {file}".
{file} non può avere un nome che inizia per '\-'.
Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo
argomento specificato).
.TP
\-\-cmd {comando}
Come "\-c", ma il comando è eseguito PRIMA
di eseguire qualsiasi file vimrc.
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
"\-c".
.TP
\-A
Se
.B Vim
è stato compilato con supporto ARABIC per editare file con orientamento
destra-sinistra e tastiera con mappatura Araba, questa opzione inizia
.B Vim
in modalità "Arabic", cioè impostando 'arabic'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-b
Modalità "Binaria".
Vengono impostate alcune opzioni che permettono di modificare un file
binario o un programma eseguibile.
.TP
\-C
Compatibile. Imposta l'opzione 'compatible'.
In questo modo
.B Vim
ha quasi lo stesso comportamento di Vi, anche in presenza di un file
di configurazione .vimrc [proprio di Vim \- NdT].
.TP
\-d
Inizia in modalità "Diff" [differenze].
Dovrebbero esserci come argomenti due o tre nomi di file.
.B Vim
aprirà tutti i file evidenziando le differenze fra gli stessi.
Funziona come vimdiff(1).
.TP
\-d {dispositivo}
Apre {dispositivo} per usarlo come terminale.
Solo per l'Amiga.
Esempio:
"\-d con:20/30/600/150".
.TP
\-D
Debugging. Vim si mette in modalità "debugging" a partire
dall'esecuzione del primo comando da uno script.
.TP
\-e
Eseguire
.B Vim
in modalità "Ex", come se il programma eseguito sia "ex".
.TP
\-E
Eseguire
.B Vim
in modalità "Ex" migliorata, come se il programma eseguito sia "exim".
.TP
\-f
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dallo shell di invocazione.
Per l'Amiga,
.B Vim
non è fatto ripartire per aprire una nuova finestra.
Opzione da usare quando
.B Vim
è eseguito da un programma che attende la fine della
sessione di edit (ad es. mail).
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
.TP
\-\-nofork
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dallo shell di invocazione.
.TP
\-F
Se
.B Vim
è stato compilato con supporto FKMAP per editare file con orientamento
destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia
.B Vim
in modalità "Farsi", cioè impostando 'fkmap' e 'rightleft'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-g
Se
.B Vim
è stato compilato con supporto GUI, questa opzione chiede di usarla.
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-h
Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
Subito dopo
.B Vim
esce.
.TP
\-H
Se
.B Vim
è stato compilato col supporto RIGHTLEFT per editare file con orientamento
destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia
.B Vim
in modalità "Ebraica", cioè impostando 'hkmap' e 'rightleft'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-i {viminfo}
Se è abilitato l'uso di un file viminfo, questa opzione indica il nome
del file da usare invece di quello predefinito "~/.viminfo".
Si può anche evitare l'uso di un file .viminfo, dando come nome "NONE".
.TP
\-L
Equivalente a \-r.
.TP
\-l
Modalità Lisp.
Imposta le opzini 'lisp' e 'showmatch'.
.TP
\-m
Inibisce modifica file.
Annulla l'opzione 'write'.
E' ancora possibile modificare un buffer [in memoria \- Ndt], ma non scriverlo.
.TP
\-M
Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
in modo da impedire sia modifiche che riscritture. Da notare che queste
opzioni possono essere abilitate in seguito, permettendo così modifiche.
.TP
\-N
Modalità "Non-compatibile". Annulla l'opzione 'compatible'.
Così
.B Vim
va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
file .vimrc.
.TP
\-n
Inibisce l'uso di un file di swap.
Il recupero dopo una caduta di macchina diventa impossibile.
Utile per editare un file su un supporto molto lento (ad es. floppy).
Il comando ":set uc=0" ha lo stesso effetto.
Per abilitare il recupero usare ":set uc=200".
.TP
\-nb
Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
.TP
\-o[N]
Apri N finestre in orizzontale.
Se N manca, apri una finestra per ciascun file.
.TP
\-O[N]
Apri N finestre, in verticale.
Se N manca, apri una finestra per ciascun file.
.TP
\-R
Modalità "Sola Lettura".
Imposta l'opzione 'readonly'.
Si può ancora modificare il buffer, ma siete protetti da una riscrittura
involontaria.
Se volete davvero riscrivere il file, aggiungete un punto esclamativo
al comando "Ex", come in ":w!".
L'opzione \-R implica anche l'opzione \-n (vedere sotto).
L'opzione 'readonly' può essere annullata con ":set noro".
Vedere ":help 'readonly'".
.TP
\-r
Lista file di swap, assieme a dati utili per un recupero.
.TP
\-r {file}
Modalità "Recovery".
Il file di swap è usato per recuperare una sessione di edit finita male.
Il file di swap è un file con lo stesso nome file del file di testo
editato, col suffisso ".swp".
Vedere ":help recovery".
.TP
\-s
Modalità silenziosa. Solo quando invocato come "Ex" o quando l'opzione
"\-e" è stata data prima dell'opzione "\-s".
.TP
\-s {scriptin}
Lo script file {scriptin} è letto.
I caratteri nel file sono interpretati come se immessi da voi.
Lo stesso si può ottenere col comando ":source! {scriptin}".
Se la fine del file di input viene raggiunta prima che Vim termini,
l'ulteriore input viene preso dalla tastiera.
.TP
\-T {terminale}
Dice a
.B Vim
quale tipo di terminale state usando.
Utile solo se il terminale non viene riconosciuto correttamente da Vim.
Dovrebbe essere un terminale noto a
.B Vim
(internamente) o definito nel file termcap o terminfo.
.TP
\-u {vimrc}
Usa i comandi nel file {vimrc} per inizializzazioni.
Tutte le altre inizializzazioni non sono eseguite.
Usate questa opzione per editare qualche file di tipo speciale.
Può anche essere usato per non fare alcuna inizializzazione dando
come nome "NONE".
Vedere ":help initialization" da vim per ulteriori dettagli.
.TP
\-U {gvimrc}
Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
Tutte le altre inizializzazioni GUI non sono eseguite.
Può anche essere usata per non fare alcuna inizializzazione GUI dando
come nome "NONE".
Vedere ":help gui-init" da vim per ulteriori dettagli.
.TP
\-V[N]
Verboso. Vim manda messaggi relativi agli script file che esegue
e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
dell'opzione 'verbose'.
Il valore predefinito è 10.
.TP
\-v
Inizia
.B Vim
in modalità "Vi", come se il programma eseguibile fosse "vi". Questo ha
effetto solo quando Vim viene invocato con il nome "ex".
.TP
\-w {scriptout}
Ogni carattere immesso viene registrato nel file {scriptout},
finché non uscite da
.B Vim.
Utile se si vuole creare uno script file da usare con "vim \-s" o
":source!".
Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo.
.TP
\-W {scriptout}
Come \-w, ma uno script file esistente viene sovrascritto.
.TP
\-x
Uso di cifratura nella scrittura dei file. E' necessario immettere
una chiave di cifratura.
.TP
\-X
Non connetterti al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono disponibili.
.TP
\-y
Eseguire
.B Vim
in modalità "Facile" (semplificata), come se l'eseguibile invocato
sia "evim" o "eview".
Fa sì che
.B Vim
si comporti come un editor che usa solo il mouse e i caratteri.
.TP
\-Z
Modalità "Ristretta". Vim si comporta come se invocato con un nome
che inizia per "r".
.TP
\-\-
Specifica la fine delle opzioni.
Argomenti specificati dopo questo sono considerati nomi file.
Si può usare per editare un file il cui nome inizi per '-'.
.TP
\-\-echo\-wid
Solo con GUI GTK: Visualizza Window ID su "stdout".
.TP
\-\-help
Vim dà un messaggio ed esce, come con l'argomento "-h".
.TP
\-\-literal
Considera i nomi passati come argomenti letterai, senza espandere
metacaratteri. Non necessario in Unix, lo shell espande i metacaratteri.
.TP
\-\-noplugin
Non caricare plugin. Implicito se si specifica \-u NONE.
.TP
\-\-remote
Connettersi a un server Vim e chiedere di editare i file elencati come altri
argomenti. Se non si trova un server viene dato un messaggio e i file sono
editati nel Vim corrente.
.TP
\-\-remote\-expr {expr}
Connettersi a un server Vim, valutare ivi {expr} e stampare il risultatoi
su "stdout".
.TP
\-\-remote\-send {chiavi}
Connettersi a un server Vim e spedirgli {chiavi}.
.TP
\-\-remote\-silent
Come \-\-remote, ma senza avvisare se non si trova un server.
.TP
\-\-remote-wait
Come \-\-remote, ma Vim non termina finché i file non sono stati editati.
.TP
\-\-remote\-wait\-silent
Come \-\-remote\-wait, ma senza avvisare se non si trova un server.
.TP
\-\-serverlist
Lista i nomi di tutti i server Vim disponibili.
.TP
\-\-servername {nome}
Usa {nome} come nome server. Usato per il Vim corrente, a meno che sia
usato con l'argomento \-\-remote, nel qual caso indica il server a cui
connettersi.
.TP
\-\-socketid {id}
Solo con GUI GTK: Usa il meccanismo GtkPlug per eseguire gvim in un'altra
finestra.
.TP
\-\-version
Stampa la versione di Vim ed esci.
.SH AIUTO ONLINE
Battere ":help" in
.B Vim
per iniziare.
Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
Usare <Tab> e CTRL\-D per completare gli argomenti
(":help cmdline\-completion").
Ci sono "tag" nei file di help per saltare da un argomento a un altro
(simili a legami ipertestuali, vedere ":help").
Tutti i file di documentazione possono essere navigati così. Ad es.:
":help syntax.txt".
.SH FILE
.TP 15
/usr/local/lib/vim/doc/*.txt
I file di documentazione di
.B Vim
.
Usate ":help doc\-file\-list" per avere la lista completa.
.TP
/usr/local/lib/vim/doc/tags
Il file di tags usato per trovare informazioni nei file di documentazione.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Inizializzazioni sintattiche a livello di sistema.
.TP
/usr/local/lib/vim/syntax/*.vim
File di colorazione sintattica per vari linguaggi.
.TP
/usr/local/lib/vim/vimrc
Inizializzazioni
.B Vim
a livello di sistema.
.TP
~/.vimrc
Le vostre personali inizializzazioni di
.B Vim
.
.TP
/usr/local/lib/vim/gvimrc
Inizializzazioni gvim a livello di sistema.
.TP
~/.gvimrc
Le vostre personali inizializzazioni di gvim.
.TP
/usr/local/lib/vim/optwin.vim
Script Vim usato dal comando ":options", un modo semplice
per visualizzare e impostare opzioni.
.TP
/usr/local/lib/vim/menu.vim
Inzializzazioni del menu gvim a livello di sistema.
.TP
/usr/local/lib/vim/bugreport.vim
Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Script Vim per determinare il tipo di un file a partire dal suo nome.
Vedere ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Script Vim per determinare il tipo di un file a partire dal suo contenuto.
Vedere ":help 'filetype'".
.TP
/usr/local/lib/vim/*.ps
File usati per stampa PostScript.
.PP
Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim:
.br
<URL:http://www.vim.org/>
.SH VEDERE ANCHE
vimtutor(1)
.SH AUTORE
Buona parte di
.B Vim
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere ":help credits" in
.B Vim.
.br
.B Vim
è basato su Stevie, scritto da: Tim Thompson,
Tony Andrews e G.R. (Fred) Walter.
In verità, poco o nulla è rimasto del loro codice originale.
.SH BACHI
Probabili.
Vedere ":help todo" per una lista di problemi noti.
.PP
Si noti che un certo numero di comportamenti che possono essere considerati
errori da qualcuno, sono in effetti causati da una riproduzione fin troppo
fedele del comportamento di Vi.
Se ritenete che altre cose siano errori "perché Vi si comporta diversamente",
date prima un'occhiata al file vi_diff.txt
(o battere :help vi_diff.txt da Vim).
Date anche un'occhiata alle opzioni 'compatible' e 'cpoptions.

566
runtime/doc/vim-it.UTF-8.1 Normal file
View File

@@ -0,0 +1,566 @@
.TH VIM 1 "22 febbraio 2002"
.SH NOME
vim \- VI Migliorato, un editor di testi per programmatori
.SH SINTASSI
.br
.B vim
[opzioni] [file ..]
.br
.B vim
[opzioni] \-
.br
.B vim
[opzioni] \-t tag
.br
.B vim
[opzioni] \-q [file_errori]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.B evim
.B eview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH DESCRIZIONE
.B Vim
Un editore di testi, compatibile con, e migliore di, Vi.
Può essere usato per editare qualsiasi file di testo.
Particolarmente utile per editare programmi.
.PP
Ci sono parecchi miglioramenti rispetto a Vi: undo multipli,
finestre e buffer multipli, evidenziazione sintattica, possibilità
di modificare la linea di comando, completamento nomi file, help
in linea, selezione testi in modalità visuale, etc..
Vedere ":help vi_diff.txt" per un sommario delle differenze fra
.B Vim
e Vi.
.PP
Mentre usate
.B Vim
potete ricevere molto aiuto dal sistema di help online, col comando ":help".
Vedere qui sotto la sezione AIUTO ONLINE.
.PP
Quasi sempre
.B Vim
viene invocato, per modificare un file, col comando
.PP
vim file
.PP
Più in generale
.B Vim
viene invocato con:
.PP
vim [opzioni] [lista_file]
.PP
Se lista_file non è presente, l'editor inizia aprendo un buffer vuoto.
Altrimenti, una e una sola delle quattro maniere indicate qui sotto può
essere usata per scegliere uno o più file da modificare.
.TP 12
file ..
Una lista di nomi di file.
Il primo di questi sarà il file corrente, e verrà letto nel buffer.
Il cursore sarà posizionato sulla prima linea del buffer.
Potete arrivare agli altri file col comando ":next".
Per editare un file il cui nome inizia per "\-" premettete "\-\-" alla
lista_file.
.TP
\-
Il file da editare è letto dallo "stdin" [di solito, ma non
necessriamente, il terminale \- NdT]. I comandi sono letti da "stderr",
che dovrebbe essere un terminale [tty].
.TP
\-t {tag}
Il file da editare e la posizione iniziale del cursore dipendono da "tag",
una specie di "etichetta" a cui saltare.
{tag} viene cercata nel file tags, ed il file ad essa associato diventa
quello corrente, ed il comando ad essa associato viene eseguito.
Di solito si usa per programmi C, nel qual caso {tag} potrebbe essere un
nome di funzione.
L'effetto è che il file contenente quella funzione diventa il file corrente
e il cursore è posizionato all'inizio della funzione.
Vedere ":help tag-commands".
.TP
\-q [file_errori]
Inizia nella modalità quickFix [correzione veloce].
Il file [file_errori] è letto e il primo errore è visualizzato.
Se [file_errori] non è indicato, il suo nome è ottenuto dal valore
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
per l'Amiga, "errors.err" su altri sistemi).
Si può saltare all'errore successivo col comando ":cn".
Vedere ":help quickfix".
.PP
.B Vim
si comporta in modo diverso se invocato con nomi differenti (il programma
eseguibile "sottostante" può essere sempre lo stesso).
.TP 10
vim
Modalità "Normal", comportamento normale.
.TP
ex
Inizia in modalità "Ex".
Si può passare in modalità "Normal" col comandi ":vi".
Si può invocare la modalità "Ex" anche con l'argomento "\-e".
.TP
view
Inizia in modalità "Sola Lettura". Non potete modificare i file.
Si può invocare la modalità "Sola Lettura" anche con l'argomento "\-R".
.TP
gvim gview
La versione GUI [Graphical User Interface].
Apre una nuova finestra.
Si può invocare la modalità "GUI" anche con l'argomento "\-g".
.TP
evim eview
La versione GUI in modalità "Facile" (semplificata).
Apre una nuova finestra.
Si può invocare la modalità "Facile" anche con l'argomento "\-y".
.TP
rvim rview rgvim rgview
Come sopra, ma con restrizioni ai comandi. Non si potrnno eseguire comandi
dello shell o sospendere
.B Vim.
Si può invocare la modalità "Ristretta" anche con l'argomento "\-Z".
.SH OPZIONI
Le opzioni possono essere in un ordine qualsiasi, prima o dopo i nomi di
file. Opzioni che non necessitano un argomento possono essere raggruppate
dietro a un solo "\-".
.TP 12
+[numero]
Per il primo file il cursore sarà posizionato sulla linea "numero".
Se "numero" manca, il cursore sarà posizionato sull'ultima linea del file.
.TP
+/{espressione}
Per il primo file il cursore sarà posizionato alla
prima occorrenza di {espressione}.
Vedere ":help search-pattern" per come specificare l'espressione.
.TP
+{comando}
.TP
\-c {comando}
{comando} sarà eseguito dopo che il
primo file è stato letto.
{comando} è interpretato come un comando Ex.
Se il {comando} contiene spazi deve essere incluso fra doppi apici
(o altro delimitatore, a seconda dello shell che si sta usando).
Esempio: Vim "+set si" main.c
.br
Note: Si possono avere fino a 10 comandi "+" o "\-c".
.TP
\-S {file}
I comandi contenuti in {file} sono eseguiti dopo la lettura del primo file.
Equivalente a \-c "source {file}".
{file} non può avere un nome che inizia per '\-'.
Se {file} è omesso si usa "Session.vim" (funziona solo se \-S è l'ultimo
argomento specificato).
.TP
\-\-cmd {comando}
Come "\-c", ma il comando è eseguito PRIMA
di eseguire qualsiasi file vimrc.
Si possono usare fino a 10 di questi comandi, indipendentemente dai comandi
"\-c".
.TP
\-A
Se
.B Vim
è stato compilato con supporto ARABIC per editare file con orientamento
destra-sinistra e tastiera con mappatura Araba, questa opzione inizia
.B Vim
in modalità "Arabic", cioè impostando 'arabic'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-b
Modalità "Binaria".
Vengono impostate alcune opzioni che permettono di modificare un file
binario o un programma eseguibile.
.TP
\-C
Compatibile. Imposta l'opzione 'compatible'.
In questo modo
.B Vim
ha quasi lo stesso comportamento di Vi, anche in presenza di un file
di configurazione .vimrc [proprio di Vim \- NdT].
.TP
\-d
Inizia in modalità "Diff" [differenze].
Dovrebbero esserci come argomenti due o tre nomi di file.
.B Vim
aprirà tutti i file evidenziando le differenze fra gli stessi.
Funziona come vimdiff(1).
.TP
\-d {dispositivo}
Apre {dispositivo} per usarlo come terminale.
Solo per l'Amiga.
Esempio:
"\-d con:20/30/600/150".
.TP
\-D
Debugging. Vim si mette in modalità "debugging" a partire
dall'esecuzione del primo comando da uno script.
.TP
\-e
Eseguire
.B Vim
in modalità "Ex", come se il programma eseguito sia "ex".
.TP
\-E
Eseguire
.B Vim
in modalità "Ex" migliorata, come se il programma eseguito sia "exim".
.TP
\-f
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dallo shell di invocazione.
Per l'Amiga,
.B Vim
non è fatto ripartire per aprire una nuova finestra.
Opzione da usare quando
.B Vim
è eseguito da un programma che attende la fine della
sessione di edit (ad es. mail).
Sull'Amiga i comandi ":sh" e ":!" non sono disponibili.
.TP
\-\-nofork
Direttamente [Foreground]. Per la versione GUI,
.B Vim
non crea [fork] una nuova finestra, indipendente dallo shell di invocazione.
.TP
\-F
Se
.B Vim
è stato compilato con supporto FKMAP per editare file con orientamento
destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia
.B Vim
in modalità "Farsi", cioè impostando 'fkmap' e 'rightleft'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-g
Se
.B Vim
è stato compilato con supporto GUI, questa opzione chiede di usarla.
Se Vim è stato compilato senza supporto GUI viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-h
Un po' di aiuto su opzioni e argomenti che si possono dare invocando Vim.
Subito dopo
.B Vim
esce.
.TP
\-H
Se
.B Vim
è stato compilato col supporto RIGHTLEFT per editare file con orientamento
destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia
.B Vim
in modalità "Ebraica", cioè impostando 'hkmap' e 'rightleft'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
\-i {viminfo}
Se è abilitato l'uso di un file viminfo, questa opzione indica il nome
del file da usare invece di quello predefinito "~/.viminfo".
Si può anche evitare l'uso di un file .viminfo, dando come nome "NONE".
.TP
\-L
Equivalente a \-r.
.TP
\-l
Modalità Lisp.
Imposta le opzini 'lisp' e 'showmatch'.
.TP
\-m
Inibisce modifica file.
Annulla l'opzione 'write'.
E' ancora possibile modificare un buffer [in memoria \- Ndt], ma non scriverlo.
.TP
\-M
Modifiche non permesse. Le opzioni 'modifiable' e 'write' sono annullate,
in modo da impedire sia modifiche che riscritture. Da notare che queste
opzioni possono essere abilitate in seguito, permettendo così modifiche.
.TP
\-N
Modalità "Non-compatibile". Annulla l'opzione 'compatible'.
Così
.B Vim
va un po' meglio, ma è meno compatibile con Vi, anche in assenza di un
file .vimrc.
.TP
\-n
Inibisce l'uso di un file di swap.
Il recupero dopo una caduta di macchina diventa impossibile.
Utile per editare un file su un supporto molto lento (ad es. floppy).
Il comando ":set uc=0" ha lo stesso effetto.
Per abilitare il recupero usare ":set uc=200".
.TP
\-nb
Diviene un Editor server per NetBeans. Vedere la documentazione per dettagli.
.TP
\-o[N]
Apri N finestre in orizzontale.
Se N manca, apri una finestra per ciascun file.
.TP
\-O[N]
Apri N finestre, in verticale.
Se N manca, apri una finestra per ciascun file.
.TP
\-R
Modalità "Sola Lettura".
Imposta l'opzione 'readonly'.
Si può ancora modificare il buffer, ma siete protetti da una riscrittura
involontaria.
Se volete davvero riscrivere il file, aggiungete un punto esclamativo
al comando "Ex", come in ":w!".
L'opzione \-R implica anche l'opzione \-n (vedere sotto).
L'opzione 'readonly' può essere annullata con ":set noro".
Vedere ":help 'readonly'".
.TP
\-r
Lista file di swap, assieme a dati utili per un recupero.
.TP
\-r {file}
Modalità "Recovery".
Il file di swap è usato per recuperare una sessione di edit finita male.
Il file di swap è un file con lo stesso nome file del file di testo
editato, col suffisso ".swp".
Vedere ":help recovery".
.TP
\-s
Modalità silenziosa. Solo quando invocato come "Ex" o quando l'opzione
"\-e" è stata data prima dell'opzione "\-s".
.TP
\-s {scriptin}
Lo script file {scriptin} è letto.
I caratteri nel file sono interpretati come se immessi da voi.
Lo stesso si può ottenere col comando ":source! {scriptin}".
Se la fine del file di input viene raggiunta prima che Vim termini,
l'ulteriore input viene preso dalla tastiera.
.TP
\-T {terminale}
Dice a
.B Vim
quale tipo di terminale state usando.
Utile solo se il terminale non viene riconosciuto correttamente da Vim.
Dovrebbe essere un terminale noto a
.B Vim
(internamente) o definito nel file termcap o terminfo.
.TP
\-u {vimrc}
Usa i comandi nel file {vimrc} per inizializzazioni.
Tutte le altre inizializzazioni non sono eseguite.
Usate questa opzione per editare qualche file di tipo speciale.
Può anche essere usato per non fare alcuna inizializzazione dando
come nome "NONE".
Vedere ":help initialization" da vim per ulteriori dettagli.
.TP
\-U {gvimrc}
Usa i comandi nel file {gvimrc} per inizializzazioni GUI.
Tutte le altre inizializzazioni GUI non sono eseguite.
Può anche essere usata per non fare alcuna inizializzazione GUI dando
come nome "NONE".
Vedere ":help gui-init" da vim per ulteriori dettagli.
.TP
\-V[N]
Verboso. Vim manda messaggi relativi agli script file che esegue
e quando legge o scrive un file viminfo. Il numero opzionale N è il valore
dell'opzione 'verbose'.
Il valore predefinito è 10.
.TP
\-v
Inizia
.B Vim
in modalità "Vi", come se il programma eseguibile fosse "vi". Questo ha
effetto solo quando Vim viene invocato con il nome "ex".
.TP
\-w {scriptout}
Ogni carattere immesso viene registrato nel file {scriptout},
finché non uscite da
.B Vim.
Utile se si vuole creare uno script file da usare con "vim \-s" o
":source!".
Se il file {scriptout} esiste, quel che immettete viene aggiunto in fondo.
.TP
\-W {scriptout}
Come \-w, ma uno script file esistente viene sovrascritto.
.TP
\-x
Uso di cifratura nella scrittura dei file. E' necessario immettere
una chiave di cifratura.
.TP
\-X
Non connetterti al server X. Vim parte più rapidamente,
ma il titolo della finestra e la clipboard non sono disponibili.
.TP
\-y
Eseguire
.B Vim
in modalità "Facile" (semplificata), come se l'eseguibile invocato
sia "evim" o "eview".
Fa sì che
.B Vim
si comporti come un editor che usa solo il mouse e i caratteri.
.TP
\-Z
Modalità "Ristretta". Vim si comporta come se invocato con un nome
che inizia per "r".
.TP
\-\-
Specifica la fine delle opzioni.
Argomenti specificati dopo questo sono considerati nomi file.
Si può usare per editare un file il cui nome inizi per '-'.
.TP
\-\-echo\-wid
Solo con GUI GTK: Visualizza Window ID su "stdout".
.TP
\-\-help
Vim dà un messaggio ed esce, come con l'argomento "-h".
.TP
\-\-literal
Considera i nomi passati come argomenti letterai, senza espandere
metacaratteri. Non necessario in Unix, lo shell espande i metacaratteri.
.TP
\-\-noplugin
Non caricare plugin. Implicito se si specifica \-u NONE.
.TP
\-\-remote
Connettersi a un server Vim e chiedere di editare i file elencati come altri
argomenti. Se non si trova un server viene dato un messaggio e i file sono
editati nel Vim corrente.
.TP
\-\-remote\-expr {expr}
Connettersi a un server Vim, valutare ivi {expr} e stampare il risultatoi
su "stdout".
.TP
\-\-remote\-send {chiavi}
Connettersi a un server Vim e spedirgli {chiavi}.
.TP
\-\-remote\-silent
Come \-\-remote, ma senza avvisare se non si trova un server.
.TP
\-\-remote-wait
Come \-\-remote, ma Vim non termina finché i file non sono stati editati.
.TP
\-\-remote\-wait\-silent
Come \-\-remote\-wait, ma senza avvisare se non si trova un server.
.TP
\-\-serverlist
Lista i nomi di tutti i server Vim disponibili.
.TP
\-\-servername {nome}
Usa {nome} come nome server. Usato per il Vim corrente, a meno che sia
usato con l'argomento \-\-remote, nel qual caso indica il server a cui
connettersi.
.TP
\-\-socketid {id}
Solo con GUI GTK: Usa il meccanismo GtkPlug per eseguire gvim in un'altra
finestra.
.TP
\-\-version
Stampa la versione di Vim ed esci.
.SH AIUTO ONLINE
Battere ":help" in
.B Vim
per iniziare.
Battere ":help argomento" per ricevere aiuto su uno specifico argomento.
Per esempio: ":help ZZ" per ricevere aiuto sul comando "ZZ".
Usare <Tab> e CTRL\-D per completare gli argomenti
(":help cmdline\-completion").
Ci sono "tag" nei file di help per saltare da un argomento a un altro
(simili a legami ipertestuali, vedere ":help").
Tutti i file di documentazione possono essere navigati così. Ad es.:
":help syntax.txt".
.SH FILE
.TP 15
/usr/local/lib/vim/doc/*.txt
I file di documentazione di
.B Vim
.
Usate ":help doc\-file\-list" per avere la lista completa.
.TP
/usr/local/lib/vim/doc/tags
Il file di tags usato per trovare informazioni nei file di documentazione.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Inizializzazioni sintattiche a livello di sistema.
.TP
/usr/local/lib/vim/syntax/*.vim
File di colorazione sintattica per vari linguaggi.
.TP
/usr/local/lib/vim/vimrc
Inizializzazioni
.B Vim
a livello di sistema.
.TP
~/.vimrc
Le vostre personali inizializzazioni di
.B Vim
.
.TP
/usr/local/lib/vim/gvimrc
Inizializzazioni gvim a livello di sistema.
.TP
~/.gvimrc
Le vostre personali inizializzazioni di gvim.
.TP
/usr/local/lib/vim/optwin.vim
Script Vim usato dal comando ":options", un modo semplice
per visualizzare e impostare opzioni.
.TP
/usr/local/lib/vim/menu.vim
Inzializzazioni del menu gvim a livello di sistema.
.TP
/usr/local/lib/vim/bugreport.vim
Script Vim per generare una segnalazione di errore. Vedere ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Script Vim per determinare il tipo di un file a partire dal suo nome.
Vedere ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Script Vim per determinare il tipo di un file a partire dal suo contenuto.
Vedere ":help 'filetype'".
.TP
/usr/local/lib/vim/*.ps
File usati per stampa PostScript.
.PP
Per informazioni aggiornate [in inglese \- NdT] vedere la home page di Vim:
.br
<URL:http://www.vim.org/>
.SH VEDERE ANCHE
vimtutor(1)
.SH AUTORE
Buona parte di
.B Vim
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere ":help credits" in
.B Vim.
.br
.B Vim
è basato su Stevie, scritto da: Tim Thompson,
Tony Andrews e G.R. (Fred) Walter.
In verità, poco o nulla è rimasto del loro codice originale.
.SH BACHI
Probabili.
Vedere ":help todo" per una lista di problemi noti.
.PP
Si noti che un certo numero di comportamenti che possono essere considerati
errori da qualcuno, sono in effetti causati da una riproduzione fin troppo
fedele del comportamento di Vi.
Se ritenete che altre cose siano errori "perché Vi si comporta diversamente",
date prima un'occhiata al file vi_diff.txt
(o battere :help vi_diff.txt da Vim).
Date anche un'occhiata alle opzioni 'compatible' e 'cpoptions.

489
runtime/doc/vim-ru.1 Normal file
View File

@@ -0,0 +1,489 @@
.TH VIM 1 "2002 Feb 22"
.SH ИМЯ
vim \- Vi IMproved (Улучшенный Vi), текстовый редактор для программистов
.SH КОМАНДНАЯ СТРОКА
.br
.B vim
[ключи] [файл ..]
.br
.B vim
[ключи] -
.br
.B vim
[ключи] \-t метка
.br
.B vim
[ключи] \-q [файл ошибок]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH ОПИСАНИЕ
.B Vim
-- текстовый редактор, обратно-совместимый с Vi.
Он может быть использован для правки всех видов простого текста.
Особенно он хорош для правки исходных текстов программ.
.PP
По сравнению с Vi,
.B Vim
имеет много усовершенствований: многократная отмена операций,
множественность окон и буферов, подсветка синтаксиса, правка командной строки,
автодополнение имён файлов, встроенная справка, визуальное выделение и т.п.
См. ":help vi_diff.txt" для получения полного списка различий между
.B Vim
и Vi.
.PP
Во время работы в
.B Vim
можно получить справку с помощью системы встроенной справки (команда ":help").
См. раздел "ВСТРОЕННАЯ СПРАВКА" ниже по тексту.
.PP
Чаще всего
.B Vim
запускают для правки одного файла при помощи команды
.PP
vim файл
.PP
В общем виде команда запуска
.B Vim
выглядит так:
.PP
vim [ключи] [список файлов]
.PP
Если список файлов отсутствует, редактор начнёт работу с пустым буфером.
В противном случае имя файла должно быть указано одним из следующих четырёх способов:
.TP 12
файл ..
Список имён файлов.
Первый файл будет объявлен активным и загружен в буфер. Курсор будет помещён
в первой строке буфера. Доступ к другим файлам может быть осуществлён при
помощи команды ":next". Чтобы править файл, имя которого начинается с символа
"дефис" (-), перед списком файлов необходимо поставить "--".
.TP
-
Файл будет прочитан из потока стандартного ввода. Команды будут считываться
из стандартного потока диагностики (stderr), который должен быть
терминалом.
.TP
-t {метка}
Имя файла и начальная позиция курсора зависят от "метки", похожей на метку goto.
{метка} ищется в файле меток, соответствующий файл становится активным, а
соответствующая команда исполняется.
Чаще всего используется в программах на языке Си, где {метка} может быть именем
функции.
Файл, содержащий функцию, становится активным, а курсор помещается в начало функции.
См. ":help tag-commands".
.TP
-q [файл ошибок]
Начать работу в режиме быстрого исправления.
При этом считывается [файл ошибок] и первая ошибка выводится на экран.
Если [файл ошибок] не указан, имя файла берётся из значения опции 'errorfile'
(по умолчанию: "AztecC.Err" для Amiga, "errors.err" для других систем).
К следующим ошибкам можно перейти по команде ":cn".
См. ":help quickfix".
.PP
.B Vim
ведёт себя по-разному в зависимости от имени команды (исполняемый файл может
быть одним и тем же).
.TP 10
vim
"Нормальный" запуск, всё по умолчанию.
.TP
ex
Запуск в режиме Ex. Для перехода в нормальный режим
необходимо выполнить команду ":vi". Режим Ex включает
также ключ "-e".
.TP
view
Запуск в режиме "только для чтения". Вы будете защищены от случайной записи
файла. То же самое можно сделать ключом "-R".
.TP
gvim gview
Версия с графическим интерфейсом. Запускается в новом окне.
То же самое можно сделать при запуске с ключом "-g".
.TP
rvim rview rgvim rgview
Как и предыдущие команды, но с ограничениями. Нельзя запускать команды оболочки
или приостанавливать работу
.B Vim.
Вместо приставки "r" можно использовать ключ "-Z".
.SH КЛЮЧИ
Ключи могут быть указаны в любом порядке, до или после имён
файлов. Ключи без аргументов могут быть объединены под одним
дефисом.
.TP 12
+[номер]
В первом файле курсор будет помещён на строку с указанным номером.
Если "номер" не указан, курсор будет помещён на последнюю строку.
.TP
+/{шаблон}
В первом файле курсор будет помещён на место первого совпадения
с указанным шаблоном. См. ":help search-pattern" для получения
списка допустимых шаблонов.
.TP
+{команда}
.TP
-c {команда}
{команда} исполняется после загрузки первого файла как команда Ex.
Если {команда} содержит пробелы, то она должна быть заключена в
двойные кавычки (в зависимости от используемой оболочки).
Пример: vim "+set si" main.c
.br
Примечание: Можно указывать до десяти команд "+" или "-c".
.TP
--cmd {команда}
Как "-c", но команда исполняется перед обработкой любого файла
настроек (vimrc).
Можно указывать до десяти таких команд, независимо от количества
команд "-c".
.TP
-A
Если
.B Vim
был собран с поддержкой арабского языка для правки файлов,
набранных справа налево, и с поддержкой арабской клавиатуры,
этот ключ запускает
.B Vim
в арабском режиме, с включенной опцией 'arabic'. В противном
случае
.B Vim
завершает работу с ошибкой.
.TP
-b
Двоичный режим.
Производится настройка некоторых опций, делающих возможной правку
двоичного или исполняемого файла.
.TP
-C
Режим совместимости. Включает опцию 'compatible'.
.B Vim
будет работать почти как Vi, даже если существует файл .vimrc.
.TP
-d
Режим поиска различий.
Должно быть указано два или три имени файла.
.B Vim
откроет все файлы и покажет различия между ними
(как vimdiff(1)).
.TP
-d {устройство}
Открыть {устройство} для использования в качестве терминала (только на Amiga).
Пример:
"\-d con:20/30/600/150".
.TP
-e
Запустить
.B Vim
в режиме Ex, как будто исполняемый файл имеет имя "ex".
.TP
-f
Режим активного приложения. Версия
.B Vim
с графическим интерфейсом не будет ветвиться и отключаться
от запустившей её оболочки. На платформе Amiga
.B Vim
не будет создавать новое окно. Этот ключ нужно использовать,
когда
.B Vim
запускается программой, которая должна ждать завершения
сеанса правки (например, программа для работы с электронной почтой).
На платформе Amiga команды ":sh" и ":!" не будут работать.
.TP
--nofork
Режим активного приложения. Версия
.B Vim
с графическим интерфейсом не будет ветвиться и отключаться
от запустившей её оболочки.
.TP
-F
Если
.B Vim
был собран с поддержкой FKMAP для правки текста справа налево
и настроек клавиатуры для языка фарси, этот ключ запускает
.B Vim
в режиме фарси, иначе говоря, с включёнными опциями
'fkmap' и 'rightleft'.
В противном случае
.B Vim
завершает работу с сообщением об ошибке.
.TP
-g
Если
.B Vim
был собран с поддержкой графического интерфейса, этот ключ
включает графический интерфейс. В противном случае
.B Vim
завершает работу с сообщением об ошибке.
.TP
-h
Выводит краткую информацию об аргументах и ключах командной строки.
После этого
.B Vim
завершает работу.
.TP
-H
Если
.B Vim
был собран с поддержкой правки текста справа налево
и настроек клавиатуры для иврита, этот ключ запускает
.B Vim
в режиме иврита, иначе говоря, с включёнными опциями 'hkmap' и 'rightleft'.
В противном случае
.B Vim
завершает работу с сообщением об ошибке.
.TP
-i {viminfo}
Если используется файл viminfo, то этот ключ задаёт имя такого файла (вместо
"~/.viminfo" по умолчанию). Можно также избежать использования файла viminfo
путём указания имени "NONE".
.TP
-L
То же, что и -r.
.TP
-l
Режим Lisp. Включаются опции 'lisp' и 'showmatch'.
.TP
-m
Изменение файлов запрещено. При этом отключается опция 'write', поэтому
запись файлов становится невозможной.
.TP
-N
Режим неполной совместимости. Отключается 'compatible'.
.B Vim
будет работать лучше, но не будет полностью совместим с Vi, даже если
отсутствует файл сценария настроек (.vimrc).
.TP
-n
Не использовать своп-файл. Восстановление при сбое в работе будет невозможно.
Удобно для правки файла на очень медленном носителе (например, гибком диске).
То же самое можно сделать командой ":set uc=0". Отмена -- ":set uc=200".
.TP
-o[N]
Открыть N окон, разделённых по горизонтали. Если N не указано, то открывается
по одному окну на каждый файл.
.TP
-O[N]
Открыть N окон, разделённых по вертикали. Если N не указано, то открывается
по одному окну на каждый файл.
.TP
-R
Режим "только для чтения". Включается опция 'readonly'.
Файл в буфере доступен для редактирования, но его копию на диске нельзя
случайно перезаписать. Для сохранения файла необходимо добавить восклицательный
знак к соответствующей команде Ex (например, ":w!").
Ключ "-R" подразумевает также, что используется и ключ "-n" (см. выше).
Опция 'readonly' может быть выключена по команде ":set noro".
См. ":help 'readonly'".
.TP
-r
Вывести список своп-файлов и информацию об их использовании для восстановления после сбоя.
.TP
-r {файл}
Режим восстановления.
Для восстановления после сбоя будет использован своп-файл.
Своп-файл имеет то же имя, что и текстовый файл, но с добавлением расширения ".swp".
См. ":help recovery".
.TP
-s
Тихий режим. Только при запуске как "Ex" или если перед "-s" указан ключ "-e".
.TP
-s {scriptin}
Считывается файл сценария {scriptin}. При этом, содержимое файла воспринимается
в виде команд, как если бы они были набраны на консоли.
То же самое достигается командой ":source! {scriptin}".
Если конец файла считывается до завершения работы редактора, то в дальнейшем
ввод осуществляется с клавиатуры.
.TP
-T {terminal}
Сообщает
.B Vim
тип используемого терминала. Необходимо только в тех ситуациях, когда
автоматическое определение терминала не работает. Имя терминала должно быть
известно
.B Vim
(встроено в него) или определено в файлах termcap или terminfo.
.TP
-u {vimrc}
Использовать команды из файла сценария {vimrc} для настройки.
Все остальные файлы настроек пропускаются.
Удобно для редактирования специальных типов файлов.
Чтобы избежать использования сценариев настроек вообще, можно использовать
имя "NONE". См. ":help initialization".
.TP
-U {gvimrc}
Использовать команды из файла сценария {gvimrc} для настройки графического
интерфейса.
Все остальные файлы настроек для графического интерфейса пропускаются.
Чтобы избежать использования сценариев настроек графического интерфейса вообще,
можно использовать имя "NONE". См. ":help gui-init".
.TP
-V
"Болтливый" режим. Выводить сообщения о том, какие файлы читаются, и о
чтении-записи файла viminfo.
.TP
-v
Запустить
.B Vim
в режиме Vi, как будто исполняемый файл имеет имя "vi". Имеет смысл только если
исполняемый файл имеет имя "ex".
.TP
-w {scriptout}
Все символы, введённые с клавиатуры вплоть до момента завершения работы,
записываются в файл {scriptout}.
Удобно в том случае, когда вы хотите создать файл сценария для последующего
использования с "vim -s" или ":source!". Если файл {scriptout} уже существует,
то новые символы будут добавляются в конец файла.
.TP
-W {scriptout}
Как "-w", но уже существующий файл будет перезаписан.
.TP
-x
Шифровать записываемые файлы. Будет выдано приглашение ввести пароль.
.TP
-X
Не подключаться к X-серверу. Ускоряет загрузку на консоли, но делает невозможным
использование заголовка окна и буфера обмена.
.TP
-Z
Ограниченный режим. Работает так же, как и программы, начинающиеся с "r".
.TP
--
Конец ключей. Все остальные аргументы рассматриваются как имена файлов.
Может быть использовано для правки файлов, имена которых начинаются с дефиса.
.TP
--help
Вывести краткую справку и завершить работу. То же, что и "-h".
.TP
--version
Вывести информацию о версии программы и завершить работу.
.TP
--remote
Подключиться к серверу Vim и заставить его править файлы, указанные в
последующих аргументах. Если сервер не найден, выводится предупреждение,
а файлы правятся в местной копии Vim.
.TP
--remote-expr {выражение}
Подключиться к серверу Vim и вычислить на нём указанное {выражение}.
Результат вычисления будет выведен в поток стандартного вывода (stdout).
.TP
--remote-send {ключи}
Подключиться к серверу Vim и передать ему указанные {ключи}.
.TP
--remote-silent
Как "--remote", но без вывода предупреждения, если сервер не найден.
.TP
--remote-wait
Как "--remote", но Vim не будет завершать работу до тех пор, пока не будет
выполнена правка всех файлов.
.TP
--remote-wait-silent
Как "--remote-wait", но без вывода предупреждения, если сервер не найден.
.TP
--serverlist
Вывести список всех доступных серверов Vim.
.TP
--servername {имя}
Использовать указанное {имя} в качестве имени сервера. Если ключ
"--remote" не указан, то {имя} присваивается данной копии Vim,
в противном случае указывает на имя сервера, к которому следует
подключиться.
.TP
--socketid {id}
Только для графического интерфейса GTK: использовать механизм GtkPlug для
запуска gvim в отдельном окне.
.TP
--echo-wid
Только для графического интерфейса GTK: вывести идентификатор окна (Window ID)
в поток стандартного вывода (stdout).
.SH ВСТРОЕННАЯ СПРАВКА
Для начала, наберите команду ":help".
Введите ":help тема", чтобы получить справку по конкретной теме.
Например, команда ":help ZZ" выведет информацию о команде "ZZ".
Используйте <Tab> и CTRL-D для автоматического дополнения
названий тем (":help cmdline-completion").
Для быстрого перемещения по справочнику используются метки (что-то
вроде гипертекстовых ссылок, см. ":help"). Таким образом можно
просматривать все файлы справки, например ":help syntax.txt".
.SH ФАЙЛЫ
.TP 15
/usr/local/lib/vim/doc/*.txt
Файлы справочника
.B Vim.
См. ":help doc-file-list" для получения полного списка.
.TP
/usr/local/lib/vim/doc/tags
Файл меток, используемый для поиска информации в файлах справки.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Системные настройки синтаксиса.
.TP
/usr/local/lib/vim/syntax/*.vim
Файлы синтаксиса для разных языков.
.TP
/usr/local/lib/vim/vimrc
Системные настройки
.B Vim.
.TP
/usr/local/lib/vim/gvimrc
Системный настройки графического интерфейса.
.TP
/usr/local/lib/vim/optwin.vim
Сценарий, используемый при выполнении команды ":options".
Хороший способ просматривать и изменять настройки.
.TP
/usr/local/lib/vim/menu.vim
Системные настройки меню для gvim.
.TP
/usr/local/lib/vim/bugreport.vim
Сценарий для создания отчёта об обнаруженных глюках. См. ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Сценарий для определения типа файла по имени. См. ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Сценарий для определения типа файла по содержимому. См. ":help 'filetype'".
.TP
/usr/local/lib/vim/*.ps
Файлы для печати PostScript.
.PP
Более свежая информация -- на сайте VIM:
.br
<URL:http://www.vim.org/>
.SH СМОТРИ ТАКЖЕ
vimtutor(1)
.SH АВТОРЫ
Большая часть
.B Vim
создана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное
количество людей. См. ":help credits" в
.B Vim.
.br
.B Vim
базируется на коде редактора Stevie, написанного Тимом Томпсоном (Tim Thompson),
Тони Эндрюсом (Tony Andrews) и Г. Р. (Фредом) Уолтером (G.R. (Fred) Walter).
Однако, в настоящее время в Vim почти не осталось ничего от исторического кода
его предшественника.
.br
Русская локализация
.B Vim
выполняется в рамках проекта "РуВим",
см. <URL:http://sourceforge.net/projects/ruvim/>.
.SH ГЛЮКИ
Скорее всего есть.
См. ":help todo" -- список известных проблем.
.PP
Заметим, что многие вещи, которые считаются глюками, на самом деле
являются результатом слишком полного воспроизведения поведения Vi.
Если вы думаете, что что-то является ошибкой только потому, что
"Vi делает это по-другому", внимательно прочитайте файл vi_diff.txt
(или наберите ":help vi_diff.txt" в Vim) и используйте опции 'compatible'
и 'cpoptions'.

489
runtime/doc/vim-ru.UTF-8.1 Normal file
View File

@@ -0,0 +1,489 @@
.TH VIM 1 "2002 Feb 22"
.SH ИМЯ
vim \- Vi IMproved (Улучшенный Vi), текстовый редактор для программистов
.SH КОМАНДНАЯ СТРОКА
.br
.B vim
[ключи] [файл ..]
.br
.B vim
[ключи] -
.br
.B vim
[ключи] \-t метка
.br
.B vim
[ключи] \-q [файл ошибок]
.PP
.br
.B ex
.br
.B view
.br
.B gvim
.B gview
.br
.B rvim
.B rview
.B rgvim
.B rgview
.SH ОПИСАНИЕ
.B Vim
-- текстовый редактор, обратно-совместимый с Vi.
Он может быть использован для правки всех видов простого текста.
Особенно он хорош для правки исходных текстов программ.
.PP
По сравнению с Vi,
.B Vim
имеет много усовершенствований: многократная отмена операций,
множественность окон и буферов, подсветка синтаксиса, правка командной строки,
автодополнение имён файлов, встроенная справка, визуальное выделение и т.п.
См. ":help vi_diff.txt" для получения полного списка различий между
.B Vim
и Vi.
.PP
Во время работы в
.B Vim
можно получить справку с помощью системы встроенной справки (команда ":help").
См. раздел "ВСТРОЕННАЯ СПРАВКА" ниже по тексту.
.PP
Чаще всего
.B Vim
запускают для правки одного файла при помощи команды
.PP
vim файл
.PP
В общем виде команда запуска
.B Vim
выглядит так:
.PP
vim [ключи] [список файлов]
.PP
Если список файлов отсутствует, редактор начнёт работу с пустым буфером.
В противном случае имя файла должно быть указано одним из следующих четырёх способов:
.TP 12
файл ..
Список имён файлов.
Первый файл будет объявлен активным и загружен в буфер. Курсор будет помещён
в первой строке буфера. Доступ к другим файлам может быть осуществлён при
помощи команды ":next". Чтобы править файл, имя которого начинается с символа
"дефис" (-), перед списком файлов необходимо поставить "--".
.TP
-
Файл будет прочитан из потока стандартного ввода. Команды будут считываться
из стандартного потока диагностики (stderr), который должен быть
терминалом.
.TP
-t {метка}
Имя файла и начальная позиция курсора зависят от "метки", похожей на метку goto.
{метка} ищется в файле меток, соответствующий файл становится активным, а
соответствующая команда исполняется.
Чаще всего используется в программах на языке Си, где {метка} может быть именем
функции.
Файл, содержащий функцию, становится активным, а курсор помещается в начало функции.
См. ":help tag-commands".
.TP
-q [файл ошибок]
Начать работу в режиме быстрого исправления.
При этом считывается [файл ошибок] и первая ошибка выводится на экран.
Если [файл ошибок] не указан, имя файла берётся из значения опции 'errorfile'
(по умолчанию: "AztecC.Err" для Amiga, "errors.err" для других систем).
К следующим ошибкам можно перейти по команде ":cn".
См. ":help quickfix".
.PP
.B Vim
ведёт себя по-разному в зависимости от имени команды (исполняемый файл может
быть одним и тем же).
.TP 10
vim
"Нормальный" запуск, всё по умолчанию.
.TP
ex
Запуск в режиме Ex. Для перехода в нормальный режим
необходимо выполнить команду ":vi". Режим Ex включает
также ключ "-e".
.TP
view
Запуск в режиме "только для чтения". Вы будете защищены от случайной записи
файла. То же самое можно сделать ключом "-R".
.TP
gvim gview
Версия с графическим интерфейсом. Запускается в новом окне.
То же самое можно сделать при запуске с ключом "-g".
.TP
rvim rview rgvim rgview
Как и предыдущие команды, но с ограничениями. Нельзя запускать команды оболочки
или приостанавливать работу
.B Vim.
Вместо приставки "r" можно использовать ключ "-Z".
.SH КЛЮЧИ
Ключи могут быть указаны в любом порядке, до или после имён
файлов. Ключи без аргументов могут быть объединены под одним
дефисом.
.TP 12
+[номер]
В первом файле курсор будет помещён на строку с указанным номером.
Если "номер" не указан, курсор будет помещён на последнюю строку.
.TP
+/{шаблон}
В первом файле курсор будет помещён на место первого совпадения
с указанным шаблоном. См. ":help search-pattern" для получения
списка допустимых шаблонов.
.TP
+{команда}
.TP
-c {команда}
{команда} исполняется после загрузки первого файла как команда Ex.
Если {команда} содержит пробелы, то она должна быть заключена в
двойные кавычки (в зависимости от используемой оболочки).
Пример: vim "+set si" main.c
.br
Примечание: Можно указывать до десяти команд "+" или "-c".
.TP
--cmd {команда}
Как "-c", но команда исполняется перед обработкой любого файла
настроек (vimrc).
Можно указывать до десяти таких команд, независимо от количества
команд "-c".
.TP
-A
Если
.B Vim
был собран с поддержкой арабского языка для правки файлов,
набранных справа налево, и с поддержкой арабской клавиатуры,
этот ключ запускает
.B Vim
в арабском режиме, с включенной опцией 'arabic'. В противном
случае
.B Vim
завершает работу с ошибкой.
.TP
-b
Двоичный режим.
Производится настройка некоторых опций, делающих возможной правку
двоичного или исполняемого файла.
.TP
-C
Режим совместимости. Включает опцию 'compatible'.
.B Vim
будет работать почти как Vi, даже если существует файл .vimrc.
.TP
-d
Режим поиска различий.
Должно быть указано два или три имени файла.
.B Vim
откроет все файлы и покажет различия между ними
(как vimdiff(1)).
.TP
-d {устройство}
Открыть {устройство} для использования в качестве терминала (только на Amiga).
Пример:
"\-d con:20/30/600/150".
.TP
-e
Запустить
.B Vim
в режиме Ex, как будто исполняемый файл имеет имя "ex".
.TP
-f
Режим активного приложения. Версия
.B Vim
с графическим интерфейсом не будет ветвиться и отключаться
от запустившей её оболочки. На платформе Amiga
.B Vim
не будет создавать новое окно. Этот ключ нужно использовать,
когда
.B Vim
запускается программой, которая должна ждать завершения
сеанса правки (например, программа для работы с электронной почтой).
На платформе Amiga команды ":sh" и ":!" не будут работать.
.TP
--nofork
Режим активного приложения. Версия
.B Vim
с графическим интерфейсом не будет ветвиться и отключаться
от запустившей её оболочки.
.TP
-F
Если
.B Vim
был собран с поддержкой FKMAP для правки текста справа налево
и настроек клавиатуры для языка фарси, этот ключ запускает
.B Vim
в режиме фарси, иначе говоря, с включёнными опциями
'fkmap' и 'rightleft'.
В противном случае
.B Vim
завершает работу с сообщением об ошибке.
.TP
-g
Если
.B Vim
был собран с поддержкой графического интерфейса, этот ключ
включает графический интерфейс. В противном случае
.B Vim
завершает работу с сообщением об ошибке.
.TP
-h
Выводит краткую информацию об аргументах и ключах командной строки.
После этого
.B Vim
завершает работу.
.TP
-H
Если
.B Vim
был собран с поддержкой правки текста справа налево
и настроек клавиатуры для иврита, этот ключ запускает
.B Vim
в режиме иврита, иначе говоря, с включёнными опциями 'hkmap' и 'rightleft'.
В противном случае
.B Vim
завершает работу с сообщением об ошибке.
.TP
-i {viminfo}
Если используется файл viminfo, то этот ключ задаёт имя такого файла (вместо
"~/.viminfo" по умолчанию). Можно также избежать использования файла viminfo
путём указания имени "NONE".
.TP
-L
То же, что и -r.
.TP
-l
Режим Lisp. Включаются опции 'lisp' и 'showmatch'.
.TP
-m
Изменение файлов запрещено. При этом отключается опция 'write', поэтому
запись файлов становится невозможной.
.TP
-N
Режим неполной совместимости. Отключается 'compatible'.
.B Vim
будет работать лучше, но не будет полностью совместим с Vi, даже если
отсутствует файл сценария настроек (.vimrc).
.TP
-n
Не использовать своп-файл. Восстановление при сбое в работе будет невозможно.
Удобно для правки файла на очень медленном носителе (например, гибком диске).
То же самое можно сделать командой ":set uc=0". Отмена -- ":set uc=200".
.TP
-o[N]
Открыть N окон, разделённых по горизонтали. Если N не указано, то открывается
по одному окну на каждый файл.
.TP
-O[N]
Открыть N окон, разделённых по вертикали. Если N не указано, то открывается
по одному окну на каждый файл.
.TP
-R
Режим "только для чтения". Включается опция 'readonly'.
Файл в буфере доступен для редактирования, но его копию на диске нельзя
случайно перезаписать. Для сохранения файла необходимо добавить восклицательный
знак к соответствующей команде Ex (например, ":w!").
Ключ "-R" подразумевает также, что используется и ключ "-n" (см. выше).
Опция 'readonly' может быть выключена по команде ":set noro".
См. ":help 'readonly'".
.TP
-r
Вывести список своп-файлов и информацию об их использовании для восстановления после сбоя.
.TP
-r {файл}
Режим восстановления.
Для восстановления после сбоя будет использован своп-файл.
Своп-файл имеет то же имя, что и текстовый файл, но с добавлением расширения ".swp".
См. ":help recovery".
.TP
-s
Тихий режим. Только при запуске как "Ex" или если перед "-s" указан ключ "-e".
.TP
-s {scriptin}
Считывается файл сценария {scriptin}. При этом, содержимое файла воспринимается
в виде команд, как если бы они были набраны на консоли.
То же самое достигается командой ":source! {scriptin}".
Если конец файла считывается до завершения работы редактора, то в дальнейшем
ввод осуществляется с клавиатуры.
.TP
-T {terminal}
Сообщает
.B Vim
тип используемого терминала. Необходимо только в тех ситуациях, когда
автоматическое определение терминала не работает. Имя терминала должно быть
известно
.B Vim
(встроено в него) или определено в файлах termcap или terminfo.
.TP
-u {vimrc}
Использовать команды из файла сценария {vimrc} для настройки.
Все остальные файлы настроек пропускаются.
Удобно для редактирования специальных типов файлов.
Чтобы избежать использования сценариев настроек вообще, можно использовать
имя "NONE". См. ":help initialization".
.TP
-U {gvimrc}
Использовать команды из файла сценария {gvimrc} для настройки графического
интерфейса.
Все остальные файлы настроек для графического интерфейса пропускаются.
Чтобы избежать использования сценариев настроек графического интерфейса вообще,
можно использовать имя "NONE". См. ":help gui-init".
.TP
-V
"Болтливый" режим. Выводить сообщения о том, какие файлы читаются, и о
чтении-записи файла viminfo.
.TP
-v
Запустить
.B Vim
в режиме Vi, как будто исполняемый файл имеет имя "vi". Имеет смысл только если
исполняемый файл имеет имя "ex".
.TP
-w {scriptout}
Все символы, введённые с клавиатуры вплоть до момента завершения работы,
записываются в файл {scriptout}.
Удобно в том случае, когда вы хотите создать файл сценария для последующего
использования с "vim -s" или ":source!". Если файл {scriptout} уже существует,
то новые символы будут добавляются в конец файла.
.TP
-W {scriptout}
Как "-w", но уже существующий файл будет перезаписан.
.TP
-x
Шифровать записываемые файлы. Будет выдано приглашение ввести пароль.
.TP
-X
Не подключаться к X-серверу. Ускоряет загрузку на консоли, но делает невозможным
использование заголовка окна и буфера обмена.
.TP
-Z
Ограниченный режим. Работает так же, как и программы, начинающиеся с "r".
.TP
--
Конец ключей. Все остальные аргументы рассматриваются как имена файлов.
Может быть использовано для правки файлов, имена которых начинаются с дефиса.
.TP
--help
Вывести краткую справку и завершить работу. То же, что и "-h".
.TP
--version
Вывести информацию о версии программы и завершить работу.
.TP
--remote
Подключиться к серверу Vim и заставить его править файлы, указанные в
последующих аргументах. Если сервер не найден, выводится предупреждение,
а файлы правятся в местной копии Vim.
.TP
--remote-expr {выражение}
Подключиться к серверу Vim и вычислить на нём указанное {выражение}.
Результат вычисления будет выведен в поток стандартного вывода (stdout).
.TP
--remote-send {ключи}
Подключиться к серверу Vim и передать ему указанные {ключи}.
.TP
--remote-silent
Как "--remote", но без вывода предупреждения, если сервер не найден.
.TP
--remote-wait
Как "--remote", но Vim не будет завершать работу до тех пор, пока не будет
выполнена правка всех файлов.
.TP
--remote-wait-silent
Как "--remote-wait", но без вывода предупреждения, если сервер не найден.
.TP
--serverlist
Вывести список всех доступных серверов Vim.
.TP
--servername {имя}
Использовать указанное {имя} в качестве имени сервера. Если ключ
"--remote" не указан, то {имя} присваивается данной копии Vim,
в противном случае указывает на имя сервера, к которому следует
подключиться.
.TP
--socketid {id}
Только для графического интерфейса GTK: использовать механизм GtkPlug для
запуска gvim в отдельном окне.
.TP
--echo-wid
Только для графического интерфейса GTK: вывести идентификатор окна (Window ID)
в поток стандартного вывода (stdout).
.SH ВСТРОЕННАЯ СПРАВКА
Для начала, наберите команду ":help".
Введите ":help тема", чтобы получить справку по конкретной теме.
Например, команда ":help ZZ" выведет информацию о команде "ZZ".
Используйте <Tab> и CTRL-D для автоматического дополнения
названий тем (":help cmdline-completion").
Для быстрого перемещения по справочнику используются метки (что-то
вроде гипертекстовых ссылок, см. ":help"). Таким образом можно
просматривать все файлы справки, например ":help syntax.txt".
.SH ФАЙЛЫ
.TP 15
/usr/local/lib/vim/doc/*.txt
Файлы справочника
.B Vim.
См. ":help doc-file-list" для получения полного списка.
.TP
/usr/local/lib/vim/doc/tags
Файл меток, используемый для поиска информации в файлах справки.
.TP
/usr/local/lib/vim/syntax/syntax.vim
Системные настройки синтаксиса.
.TP
/usr/local/lib/vim/syntax/*.vim
Файлы синтаксиса для разных языков.
.TP
/usr/local/lib/vim/vimrc
Системные настройки
.B Vim.
.TP
/usr/local/lib/vim/gvimrc
Системный настройки графического интерфейса.
.TP
/usr/local/lib/vim/optwin.vim
Сценарий, используемый при выполнении команды ":options".
Хороший способ просматривать и изменять настройки.
.TP
/usr/local/lib/vim/menu.vim
Системные настройки меню для gvim.
.TP
/usr/local/lib/vim/bugreport.vim
Сценарий для создания отчёта об обнаруженных глюках. См. ":help bugs".
.TP
/usr/local/lib/vim/filetype.vim
Сценарий для определения типа файла по имени. См. ":help 'filetype'".
.TP
/usr/local/lib/vim/scripts.vim
Сценарий для определения типа файла по содержимому. См. ":help 'filetype'".
.TP
/usr/local/lib/vim/*.ps
Файлы для печати PostScript.
.PP
Более свежая информация -- на сайте VIM:
.br
<URL:http://www.vim.org/>
.SH СМОТРИ ТАКЖЕ
vimtutor(1)
.SH АВТОРЫ
Большая часть
.B Vim
создана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное
количество людей. См. ":help credits" в
.B Vim.
.br
.B Vim
базируется на коде редактора Stevie, написанного Тимом Томпсоном (Tim Thompson),
Тони Эндрюсом (Tony Andrews) и Г. Р. (Фредом) Уолтером (G.R. (Fred) Walter).
Однако, в настоящее время в Vim почти не осталось ничего от исторического кода
его предшественника.
.br
Русская локализация
.B Vim
выполняется в рамках проекта "РуВим",
см. <URL:http://sourceforge.net/projects/ruvim/>.
.SH ГЛЮКИ
Скорее всего есть.
См. ":help todo" -- список известных проблем.
.PP
Заметим, что многие вещи, которые считаются глюками, на самом деле
являются результатом слишком полного воспроизведения поведения Vi.
Если вы думаете, что что-то является ошибкой только потому, что
"Vi делает это по-другому", внимательно прочитайте файл vi_diff.txt
(или наберите ":help vi_diff.txt" в Vim) и используйте опции 'compatible'
и 'cpoptions'.

View File

@@ -7,7 +7,7 @@ vim \- Vi IMproved, a programmers text editor
[options] [file ..]
.br
.B vim
[options] -
[options] \-
.br
.B vim
[options] \-t tag
@@ -69,13 +69,13 @@ A list of filenames.
The first one will be the current file and read into the buffer.
The cursor will be positioned on the first line of the buffer.
You can get to the other files with the ":next" command.
To edit a file that starts with a dash, precede the filelist with "--".
To edit a file that starts with a dash, precede the filelist with "\-\-".
.TP
-
\-
The file to edit is read from stdin. Commands are read from stderr, which
should be a tty.
.TP
-t {tag}
\-t {tag}
The file to edit and the initial cursor position depends on a "tag", a sort
of goto label.
{tag} is looked up in the tags file, the associated file becomes the current
@@ -86,7 +86,7 @@ The effect is that the file containing that function becomes the current file
and the cursor is positioned on the start of the function.
See ":help tag-commands".
.TP
-q [errorfile]
\-q [errorfile]
Start in quickFix mode.
The file [errorfile] is read and the first error is displayed.
If [errorfile] is omitted, the filename is obtained from the 'errorfile'
@@ -105,27 +105,27 @@ The "normal" way, everything is default.
ex
Start in Ex mode.
Go to Normal mode with the ":vi" command.
Can also be done with the "-e" argument.
Can also be done with the "\-e" argument.
.TP
view
Start in read-only mode. You will be protected from writing the files. Can
also be done with the "-R" argument.
also be done with the "\-R" argument.
.TP
gvim gview
The GUI version.
Starts a new window.
Can also be done with the "-g" argument.
Can also be done with the "\-g" argument.
.TP
evim eview
The GUI version in easy mode.
Starts a new window.
Can also be done with the "-y" argument.
Can also be done with the "\-y" argument.
.TP
rvim rview rgvim rgview
Like the above, but with restrictions. It will not be possible to start shell
commands, or suspend
.B Vim.
Can also be done with the "-Z" argument.
Can also be done with the "\-Z" argument.
.SH OPTIONS
The options may be given in any order, before or after filenames.
Options without an argument can be combined after a single dash.
@@ -141,7 +141,7 @@ See ":help search-pattern" for the available search patterns.
.TP
+{command}
.TP
-c {command}
\-c {command}
{command} will be executed after the
first file has been read.
{command} is interpreted as an Ex command.
@@ -149,21 +149,21 @@ If the {command} contains spaces it must be enclosed in double quotes (this
depends on the shell that is used).
Example: Vim "+set si" main.c
.br
Note: You can use up to 10 "+" or "-c" commands.
Note: You can use up to 10 "+" or "\-c" commands.
.TP
-S {file}
\-S {file}
{file} will be sourced after the first file has been read.
This is equivalent to -c "source {file}".
{file} cannot start with '-'.
If {file} is omitted "Session.vim" is used (only works when -S is the last
This is equivalent to \-c "source {file}".
{file} cannot start with '\-'.
If {file} is omitted "Session.vim" is used (only works when \-S is the last
argument).
.TP
--cmd {command}
Like using "-c", but the command is executed just before
\-\-cmd {command}
Like using "\-c", but the command is executed just before
processing any vimrc file.
You can use up to 10 of these commands, independently from "-c" commands.
You can use up to 10 of these commands, independently from "\-c" commands.
.TP
-A
\-A
If
.B Vim
has been compiled with ARABIC support for editing right-to-left
@@ -174,45 +174,45 @@ message is given and
.B Vim
aborts.
.TP
-b
\-b
Binary mode.
A few options will be set that makes it possible to edit a binary or
executable file.
.TP
-C
\-C
Compatible. Set the 'compatible' option.
This will make
.B Vim
behave mostly like Vi, even though a .vimrc file exists.
.TP
-d
\-d
Start in diff mode.
There should be two or three file name arguments.
.B Vim
will open all the files and show differences between them.
Works like vimdiff(1).
.TP
-d {device}
\-d {device}
Open {device} for use as a terminal.
Only on the Amiga.
Example:
"\-d con:20/30/600/150".
.TP
-D
\-D
Debugging. Go to debugging mode when executing the first command from a
script.
.TP
-e
\-e
Start
.B Vim
in Ex mode, just like the executable was called "ex".
.TP
-E
\-E
Start
.B Vim
in improved Ex mode, just like the executable was called "exim".
.TP
-f
\-f
Foreground. For the GUI version,
.B Vim
will not fork and detach from the shell it was started in.
@@ -225,12 +225,12 @@ is executed by a program that will wait for the edit
session to finish (e.g. mail).
On the Amiga the ":sh" and ":!" commands will not work.
.TP
--nofork
\-\-nofork
Foreground. For the GUI version,
.B Vim
will not fork and detach from the shell it was started in.
.TP
-F
\-F
If
.B Vim
has been compiled with FKMAP support for editing right-to-left
@@ -241,7 +241,7 @@ Otherwise an error message is given and
.B Vim
aborts.
.TP
-g
\-g
If
.B Vim
has been compiled with GUI support, this option enables the GUI.
@@ -249,13 +249,13 @@ If no GUI support was compiled in, an error message is given and
.B Vim
aborts.
.TP
-h
\-h
Give a bit of help about the command line arguments and options.
After this
.B Vim
exits.
.TP
-H
\-H
If
.B Vim
has been compiled with RIGHTLEFT support for editing right-to-left
@@ -266,87 +266,87 @@ Otherwise an error message is given and
.B Vim
aborts.
.TP
-i {viminfo}
\-i {viminfo}
When using the viminfo file is enabled, this option sets the filename to use,
instead of the default "~/.viminfo".
This can also be used to skip the use of the .viminfo file, by giving the name
"NONE".
.TP
-L
Same as -r.
\-L
Same as \-r.
.TP
-l
\-l
Lisp mode.
Sets the 'lisp' and 'showmatch' options on.
.TP
-m
\-m
Modifying files is disabled.
Resets the 'write' option.
You can still modify the buffer, but writing a file is not possible.
.TP
-M
\-M
Modifications not allowed. The 'modifiable' and 'write' options will be unset,
so that changes are not allowed and files can not be written. Note that these
options can be set to enable making modifications.
.TP
-N
\-N
No-compatible mode. Reset the 'compatible' option.
This will make
.B Vim
behave a bit better, but less Vi compatible, even though a .vimrc file does
not exist.
.TP
-n
\-n
No swap file will be used.
Recovery after a crash will be impossible.
Handy if you want to edit a file on a very slow medium (e.g. floppy).
Can also be done with ":set uc=0".
Can be undone with ":set uc=200".
.TP
-nb
\-nb
Become an editor server for NetBeans. See the docs for details.
.TP
-o[N]
\-o[N]
Open N windows stacked.
When N is omitted, open one window for each file.
.TP
-O[N]
\-O[N]
Open N windows side by side.
When N is omitted, open one window for each file.
.TP
-R
\-R
Read-only mode.
The 'readonly' option will be set.
You can still edit the buffer, but will be prevented from accidently
overwriting a file.
If you do want to overwrite a file, add an exclamation mark to the Ex command,
as in ":w!".
The -R option also implies the -n option (see below).
The \-R option also implies the \-n option (see below).
The 'readonly' option can be reset with ":set noro".
See ":help 'readonly'".
.TP
-r
\-r
List swap files, with information about using them for recovery.
.TP
-r {file}
\-r {file}
Recovery mode.
The swap file is used to recover a crashed editing session.
The swap file is a file with the same filename as the text file with ".swp"
appended.
See ":help recovery".
.TP
-s
Silent mode. Only when started as "Ex" or when the "-e" option was given
before the "-s" option.
\-s
Silent mode. Only when started as "Ex" or when the "\-e" option was given
before the "\-s" option.
.TP
-s {scriptin}
\-s {scriptin}
The script file {scriptin} is read.
The characters in the file are interpreted as if you had typed them.
The same can be done with the command ":source! {scriptin}".
If the end of the file is reached before the editor exits, further characters
are read from the keyboard.
.TP
-T {terminal}
\-T {terminal}
Tells
.B Vim
the name of the terminal you are using.
@@ -356,49 +356,49 @@ to
.B Vim
(builtin) or defined in the termcap or terminfo file.
.TP
-u {vimrc}
\-u {vimrc}
Use the commands in the file {vimrc} for initializations.
All the other initializations are skipped.
Use this to edit a special kind of files.
It can also be used to skip all initializations by giving the name "NONE".
See ":help initialization" within vim for more details.
.TP
-U {gvimrc}
\-U {gvimrc}
Use the commands in the file {gvimrc} for GUI initializations.
All the other GUI initializations are skipped.
It can also be used to skip all GUI initializations by giving the name "NONE".
See ":help gui-init" within vim for more details.
.TP
-V[N]
\-V[N]
Verbose. Give messages about which files are sourced and for reading and
writing a viminfo file. The optional number N is the value for 'verbose'.
Default is 10.
.TP
-v
\-v
Start
.B Vim
in Vi mode, just like the executable was called "vi". This only has effect
when the executable is called "ex".
.TP
-w {scriptout}
\-w {scriptout}
All the characters that you type are recorded in the file
{scriptout}, until you exit
.B Vim.
This is useful if you want to create a script file to be used with "vim -s" or
This is useful if you want to create a script file to be used with "vim \-s" or
":source!".
If the {scriptout} file exists, characters are appended.
.TP
-W {scriptout}
Like -w, but an existing file is overwritten.
\-W {scriptout}
Like \-w, but an existing file is overwritten.
.TP
-x
Use encryption when writing files. Will prompt for a crypt key.
\-x
Use encryption when writing files. Will prompt for a crypt key.
.TP
-X
\-X
Don't connect to the X server. Shortens startup time in a terminal, but the
window title and clipboard will not be used.
.TP
-y
\-y
Start
.B Vim
in easy mode, just like the executable was called "evim" or "eview".
@@ -406,58 +406,58 @@ Makes
.B Vim
behave like a click-and-type editor.
.TP
-Z
\-Z
Restricted mode. Works like the executable starts with "r".
.TP
--
\-\-
Denotes the end of the options.
Arguments after this will be handled as a file name.
This can be used to edit a filename that starts with a '-'.
This can be used to edit a filename that starts with a '\-'.
.TP
--echo-wid
GTK GUI only: Echo the Window ID on stdout
\-\-echo\-wid
GTK GUI only: Echo the Window ID on stdout.
.TP
--help
Give a help message and exit, just like "-h".
\-\-help
Give a help message and exit, just like "\-h".
.TP
--literal
Take file name arguments literally, do not expand wildcards. Not needed on
Unix, the shell expand wildcards.
\-\-literal
Take file name arguments literally, do not expand wildcards. This has no
effect on Unix where the shell expands wildcards.
.TP
--noplugin
Skip loading plugins. Implied by -u NONE.
\-\-noplugin
Skip loading plugins. Implied by \-u NONE.
.TP
--remote
\-\-remote
Connect to a Vim server and make it edit the files given in the rest of the
arguments. If no server is found a warning is given and the files are edited
in the current Vim.
.TP
--remote-expr {expr}
\-\-remote\-expr {expr}
Connect to a Vim server, evaluate {expr} in it and print the result on stdout.
.TP
--remote-send {keys}
\-\-remote\-send {keys}
Connect to a Vim server and send {keys} to it.
.TP
--remote-silent
As --remote, but without the warning when no server is found.
\-\-remote\-silent
As \-\-remote, but without the warning when no server is found.
.TP
--remote-wait
As --remote, but Vim does not exit until the files have been edited.
\-\-remote\-wait
As \-\-remote, but Vim does not exit until the files have been edited.
.TP
--remote-wait-silent
As --remote-wait, but without the warning when no server is found.
\-\-remote\-wait\-silent
As \-\-remote\-wait, but without the warning when no server is found.
.TP
--serverlist
\-\-serverlist
List the names of all Vim servers that can be found.
.TP
--servername {name}
\-\-servername {name}
Use {name} as the server name. Used for the current Vim, unless used with a
--remote argument, then it's the name of the server to connect to.
\-\-remote argument, then it's the name of the server to connect to.
.TP
--socketid {id}
\-\-socketid {id}
GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
.TP
--version
\-\-version
Print version information and exit.
.SH ON-LINE HELP
Type ":help" in
@@ -465,7 +465,7 @@ Type ":help" in
to get started.
Type ":help subject" to get help on a specific subject.
For example: ":help ZZ" to get help for the "ZZ" command.
Use <Tab> and CTRL-D to complete subjects (":help cmdline-completion").
Use <Tab> and CTRL\-D to complete subjects (":help cmdline\-completion").
Tags are present to jump from one place to another (sort of hypertext links,
see ":help").
All documentation files can be viewed in this way, for example
@@ -476,7 +476,7 @@ All documentation files can be viewed in this way, for example
The
.B Vim
documentation files.
Use ":help doc-file-list" to get the complete list.
Use ":help doc\-file\-list" to get the complete list.
.TP
/usr/local/lib/vim/doc/tags
The tags file used for finding information in the documentation files.
@@ -492,9 +492,17 @@ System wide
.B Vim
initializations.
.TP
~/.vimrc
Your personal
.B Vim
initializations.
.TP
/usr/local/lib/vim/gvimrc
System wide gvim initializations.
.TP
~/.gvimrc
Your personal gvim initializations.
.TP
/usr/local/lib/vim/optwin.vim
Script used for the ":options" command, a nice way to view and set options.
.TP

View File

@@ -279,8 +279,8 @@ OPTIONS
-W {scriptout}
Like -w, but an existing file is overwritten.
-x Use encryption when writing files. Will prompt for a
crypt key.
-x Use encryption when writing files. Will prompt for a crypt
key.
-X Don't connect to the X server. Shortens startup time in a
terminal, but the window title and clipboard will not be
@@ -297,12 +297,13 @@ OPTIONS
be handled as a file name. This can be used to edit a
filename that starts with a '-'.
--echo-wid GTK GUI only: Echo the Window ID on stdout
--echo-wid GTK GUI only: Echo the Window ID on stdout.
--help Give a help message and exit, just like "-h".
--literal Take file name arguments literally, do not expand wild-
cards. Not needed on Unix, the shell expand wildcards.
cards. This has no effect on Unix where the shell expands
wildcards.
--noplugin Skip loading plugins. Implied by -u NONE.
@@ -311,18 +312,18 @@ OPTIONS
is given and the files are edited in the current Vim.
--remote-expr {expr}
Connect to a Vim server, evaluate {expr} in it and print
Connect to a Vim server, evaluate {expr} in it and print
the result on stdout.
--remote-send {keys}
Connect to a Vim server and send {keys} to it.
--remote-silent
As --remote, but without the warning when no server is
As --remote, but without the warning when no server is
found.
--remote-wait
As --remote, but Vim does not exit until the files have
As --remote, but Vim does not exit until the files have
been edited.
--remote-wait-silent
@@ -333,31 +334,31 @@ OPTIONS
List the names of all Vim servers that can be found.
--servername {name}
Use {name} as the server name. Used for the current Vim,
Use {name} as the server name. Used for the current Vim,
unless used with a --remote argument, then it's the name of
the server to connect to.
--socketid {id}
GTK GUI only: Use the GtkPlug mechanism to run gvim in
GTK GUI only: Use the GtkPlug mechanism to run gvim in
another window.
--version Print version information and exit.
ON-LINE HELP
Type ":help" in Vim to get started. Type ":help subject" to get help
on a specific subject. For example: ":help ZZ" to get help for the
"ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd-
line-completion"). Tags are present to jump from one place to another
Type ":help" in Vim to get started. Type ":help subject" to get help
on a specific subject. For example: ":help ZZ" to get help for the
"ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd-
line-completion"). Tags are present to jump from one place to another
(sort of hypertext links, see ":help"). All documentation files can be
viewed in this way, for example ":help syntax.txt".
FILES
/usr/local/lib/vim/doc/*.txt
The Vim documentation files. Use ":help doc-file-list"
The Vim documentation files. Use ":help doc-file-list"
to get the complete list.
/usr/local/lib/vim/doc/tags
The tags file used for finding information in the docu-
The tags file used for finding information in the docu-
mentation files.
/usr/local/lib/vim/syntax/syntax.vim
@@ -369,11 +370,15 @@ FILES
/usr/local/lib/vim/vimrc
System wide Vim initializations.
~/.vimrc Your personal Vim initializations.
/usr/local/lib/vim/gvimrc
System wide gvim initializations.
~/.gvimrc Your personal gvim initializations.
/usr/local/lib/vim/optwin.vim
Script used for the ":options" command, a nice way to
Script used for the ":options" command, a nice way to
view and set options.
/usr/local/lib/vim/menu.vim
@@ -383,11 +388,11 @@ FILES
Script to generate a bug report. See ":help bugs".
/usr/local/lib/vim/filetype.vim
Script to detect the type of a file by its name. See
Script to detect the type of a file by its name. See
":help 'filetype'".
/usr/local/lib/vim/scripts.vim
Script to detect the type of a file by its contents.
Script to detect the type of a file by its contents.
See ":help 'filetype'".
/usr/local/lib/vim/*.ps
@@ -402,17 +407,17 @@ SEE ALSO
AUTHOR
Most of Vim was made by Bram Moolenaar, with a lot of help from others.
See ":help credits" in Vim.
Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
G.R. (Fred) Walter. Although hardly any of the original code remains.
Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
G.R. (Fred) Walter. Although hardly any of the original code remains.
BUGS
Probably. See ":help todo" for a list of known problems.
Note that a number of things that may be regarded as bugs by some, are
in fact caused by a too-faithful reproduction of Vi's behaviour. And
if you think other things are bugs "because Vi does it differently",
you should take a closer look at the vi_diff.txt file (or type :help
vi_diff.txt when in Vim). Also have a look at the 'compatible' and
Note that a number of things that may be regarded as bugs by some, are
in fact caused by a too-faithful reproduction of Vi's behaviour. And
if you think other things are bugs "because Vi does it differently",
you should take a closer look at the vi_diff.txt file (or type :help
vi_diff.txt when in Vim). Also have a look at the 'compatible' and
'cpoptions' options.

48
runtime/doc/vimdiff-it.1 Executable file
View File

@@ -0,0 +1,48 @@
.TH VIMDIFF 1 "30 marzo 2001"
.SH NOME
vimdiff \- modifica due o tre versioni di un file con Vim, visualizzando le
differenze
.SH SINTASSI
.br
.B vimdiff
[opzioni] file1 file2 [file3]
.PP
.B gvimdiff
.SH DESCRIZIONE
.B Vimdiff
inizia
.B Vim
per due (o tre) file.
Ogni file ha una sua finestra.
Le differenze fra file sono evidenziate.
E' una maniera elegante per controllare modifiche e portare modifiche
verso un'altra versione dello stesso file.
.PP
Vedere vim(1) per dettagli su Vim in generale.
.PP
Se iniziato con
.B gvimdiff
la GUI sarà utilizzata, se disponibile.
.PP
In ogni finestra l'opzione 'diff' è impostata, evidenziando così le
differenze.
.br
Le opzioni 'wrap' e 'scrollbind' sono impostate per migliorare la
visibilità del testo.
.br
L'opzione 'foldmethod' è impostata al valore "diff", che mette gruppi di
linee uguali fra i diversi file in una piegatura. 'foldcolumn' è impostato
a due per poter facilmente visualizzare le piegature, aprirle e chiuderle.
.SH OPZIONI
Lo schermo è diviso verticalmente, come se aveste usato l'opzione "\-O".
Per dividerlo orizzontalmente, usare l'opzione "\-o".
.PP
Per tutte le altre opzioni, vedere vim(1).
.SH VEDERE ANCHE
vim(1)
.SH AUTORE
Buona parte di
.B Vim
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere ":help credits" in
.B Vim.

View File

@@ -0,0 +1,48 @@
.TH VIMDIFF 1 "30 marzo 2001"
.SH NOME
vimdiff \- modifica due o tre versioni di un file con Vim, visualizzando le
differenze
.SH SINTASSI
.br
.B vimdiff
[opzioni] file1 file2 [file3]
.PP
.B gvimdiff
.SH DESCRIZIONE
.B Vimdiff
inizia
.B Vim
per due (o tre) file.
Ogni file ha una sua finestra.
Le differenze fra file sono evidenziate.
E' una maniera elegante per controllare modifiche e portare modifiche
verso un'altra versione dello stesso file.
.PP
Vedere vim(1) per dettagli su Vim in generale.
.PP
Se iniziato con
.B gvimdiff
la GUI sarà utilizzata, se disponibile.
.PP
In ogni finestra l'opzione 'diff' è impostata, evidenziando così le
differenze.
.br
Le opzioni 'wrap' e 'scrollbind' sono impostate per migliorare la
visibilità del testo.
.br
L'opzione 'foldmethod' è impostata al valore "diff", che mette gruppi di
linee uguali fra i diversi file in una piegatura. 'foldcolumn' è impostato
a due per poter facilmente visualizzare le piegature, aprirle e chiuderle.
.SH OPZIONI
Lo schermo è diviso verticalmente, come se aveste usato l'opzione "\-O".
Per dividerlo orizzontalmente, usare l'opzione "\-o".
.PP
Per tutte le altre opzioni, vedere vim(1).
.SH VEDERE ANCHE
vim(1)
.SH AUTORE
Buona parte di
.B Vim
è stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere ":help credits" in
.B Vim.

50
runtime/doc/vimdiff-ru.1 Normal file
View File

@@ -0,0 +1,50 @@
.TH VIMDIFF 1 "2001 March 30"
.SH ИМЯ
vimdiff \- позволяет редактировать две или три версии файла с помощью Vim
с отображением различий.
.SH КОМАНДНАЯ СТРОКА
.br
.B vimdiff
[ключи] файл1 файл2 [файл3]
.PP
.B gvimdiff
.SH ОПИСАНИЕ
Команда
.B vimdiff
загружает в
.B Vim
два (или три) файла. Каждый файл открывается в собственном окне.
Различия между файлами отображаются с помощью подсветки синтаксиса.
Эта команда позволяет наглядно отображать внесённые изменения и переносить
различающиеся фрагменты из одной версии файла в другую.
.PP
Подробнее о Vim см. на странице справочника vim(1).
.PP
При запуске с помощью команды
.B gvimdiff
редактор запускается в режиме графического интерфейса, если это возможно.
.PP
В каждом окне включается опция 'diff', что позволяет использовать подсветку
синтаксиса для отображения различий между файлами.
.br
Для улучшения работы с файлами в режиме отображения отличий также включаются
опции 'wrap' и 'scrollbind'.
.br
Значение опции 'foldmethod' устанавливается равным "diff", что позволяет
прятать в складку области текста, которые не отличаются в различных версиях файла.
Значение опции 'foldcolumn' устанавливается равным 2, чтобы было проще
находить, открывать и закрывать такие складки.
.SH КЛЮЧИ ЗАПУСКА
Для выравнивания строк между окнами используется вертикальное разделение окон,
как если бы использовался ключ "-O". Для того, чтобы использовать разделение
окон по горизонтали, следует указать в командной строке ключ "-o".
.PP
Остальные ключи командной строки рассматриваются на странице справочника vim(1).
.SH СМОТРИ ТАКЖЕ
vim(1)
.SH АВТОРЫ
Большая часть
.B Vim
создана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное
количество людей. См. ":help credits" в
.B Vim.

View File

@@ -0,0 +1,50 @@
.TH VIMDIFF 1 "2001 March 30"
.SH ИМЯ
vimdiff \- позволяет редактировать две или три версии файла с помощью Vim
с отображением различий.
.SH КОМАНДНАЯ СТРОКА
.br
.B vimdiff
[ключи] файл1 файл2 [файл3]
.PP
.B gvimdiff
.SH ОПИСАНИЕ
Команда
.B vimdiff
загружает в
.B Vim
два (или три) файла. Каждый файл открывается в собственном окне.
Различия между файлами отображаются с помощью подсветки синтаксиса.
Эта команда позволяет наглядно отображать внесённые изменения и переносить
различающиеся фрагменты из одной версии файла в другую.
.PP
Подробнее о Vim см. на странице справочника vim(1).
.PP
При запуске с помощью команды
.B gvimdiff
редактор запускается в режиме графического интерфейса, если это возможно.
.PP
В каждом окне включается опция 'diff', что позволяет использовать подсветку
синтаксиса для отображения различий между файлами.
.br
Для улучшения работы с файлами в режиме отображения отличий также включаются
опции 'wrap' и 'scrollbind'.
.br
Значение опции 'foldmethod' устанавливается равным "diff", что позволяет
прятать в складку области текста, которые не отличаются в различных версиях файла.
Значение опции 'foldcolumn' устанавливается равным 2, чтобы было проще
находить, открывать и закрывать такие складки.
.SH КЛЮЧИ ЗАПУСКА
Для выравнивания строк между окнами используется вертикальное разделение окон,
как если бы использовался ключ "-O". Для того, чтобы использовать разделение
окон по горизонтали, следует указать в командной строке ключ "-o".
.PP
Остальные ключи командной строки рассматриваются на странице справочника vim(1).
.SH СМОТРИ ТАКЖЕ
vim(1)
.SH АВТОРЫ
Большая часть
.B Vim
создана Брамом Мооленааром (Bram Moolenaar), которому помогает огромное
количество людей. См. ":help credits" в
.B Vim.

View File

@@ -32,8 +32,8 @@ The 'foldmethod' option is set to "diff", which puts ranges of lines without
changes in a fold. 'foldcolumn' is set to two to make it easy to spot the
folds and open or close them.
.SH OPTIONS
Vertical splits are used to align the lines, as if the "-O" argument was used.
To use horizontal splits intead, use the "-o" argument.
Vertical splits are used to align the lines, as if the "\-O" argument was used.
To use horizontal splits intead, use the "\-o" argument.
.PP
For all other arguments see vim(1).
.SH SEE ALSO

54
runtime/doc/vimtutor-it.1 Executable file
View File

@@ -0,0 +1,54 @@
.TH VIMTUTOR 1 "2001 April 2"
.SH NOME
vimtutor \- the Vim tutor
.SH SINTASSI
.br
.B vimtutor [lingua]
.SH DESCRIZIONE
.B Vimtutor
inizia il
.B Vim
tutor.
It copies the tutor file first, so that it can be modified without changing
the original file.
.PP
The
.B Vimtutor
is useful for people that want to learn their first
.B Vim
commands.
.PP
The optional [language] argument is the two\-letter name of a language, like
"it" or "es".
If the [language] argument is missing, the language of the current locale will
be used.
If a tutor in this language is available, it will be used.
Otherwise the English version will be used.
.PP
.B Vim
is always started in Vi compatible mode.
.SH FILE
.TP 15
/usr/local/lib/vim/tutor/tutor[.language]
The
.B Vimtutor
text file(s).
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
The Vim script used to copy the
.B Vimtutor
text file.
.SH AUTORE
The
.B Vimtutor
è stato scritto in origine per Vi da Michael C. Pierce e Robert K. Ware,
Colorado School of Mines, usando idee fornite da Charles Smith,
Colorado State University.
E\-mail: bware@mines.colorado.edu.
.br
E' stato modificato per
.B Vim
da Bram Moolenaar.
Per i nomi dei traduttori, vedere i file usati nelle rispettive lingue.
.SH VEDERE ANCHE
vim(1)

View File

@@ -0,0 +1,54 @@
.TH VIMTUTOR 1 "2001 April 2"
.SH NOME
vimtutor \- the Vim tutor
.SH SINTASSI
.br
.B vimtutor [lingua]
.SH DESCRIZIONE
.B Vimtutor
inizia il
.B Vim
tutor.
It copies the tutor file first, so that it can be modified without changing
the original file.
.PP
The
.B Vimtutor
is useful for people that want to learn their first
.B Vim
commands.
.PP
The optional [language] argument is the two\-letter name of a language, like
"it" or "es".
If the [language] argument is missing, the language of the current locale will
be used.
If a tutor in this language is available, it will be used.
Otherwise the English version will be used.
.PP
.B Vim
is always started in Vi compatible mode.
.SH FILE
.TP 15
/usr/local/lib/vim/tutor/tutor[.language]
The
.B Vimtutor
text file(s).
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
The Vim script used to copy the
.B Vimtutor
text file.
.SH AUTORE
The
.B Vimtutor
è stato scritto in origine per Vi da Michael C. Pierce e Robert K. Ware,
Colorado School of Mines, usando idee fornite da Charles Smith,
Colorado State University.
E\-mail: bware@mines.colorado.edu.
.br
E' stato modificato per
.B Vim
da Bram Moolenaar.
Per i nomi dei traduttori, vedere i file usati nelle rispettive lingue.
.SH VEDERE ANCHE
vim(1)

51
runtime/doc/vimtutor-ru.1 Normal file
View File

@@ -0,0 +1,51 @@
.TH VIMTUTOR 1 "2001 April 2"
.SH ИМЯ
vimtutor \- учебник по Vim
.SH КОМАНДНАЯ СТРОКА
.br
.B vimtutor [язык]
.SH ОПИСАНИЕ
Команда
.B vimtutor
запускает учебник по
.B Vim.
При этом сначала происходит создание копии файла учебника,
чтобы его можно было редактировать без опасения потерять исходный файл.
.PP
Программа
.B vimtutor
полезна для новичков, желающих научиться самым основным командам
.B Vim.
.PP
Необязательный параметр [язык] представляет собой двухсимвольный код языка,
например "ru" или "it".
Если параметр [язык] не указан, то используется язык активной в настоящий
момент локали. Если учебник на этом языке не существует, то по умолчанию
используется учебник на английском языке.
.PP
При работе с учебником
.B Vim
всегда запускается в режиме совместимости с Vi.
.SH ФАЙЛЫ
.TP 15
/usr/local/lib/vim/tutor/tutor[.язык]
Текст учебника
.B vimtutor.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Сценарий Vim, который используется для создания рабочей
копии текста учебника
.B vimtutor.
.SH АВТОРЫ
.B Vimtutor
был впервые написан для Vi Майклом К. Пирсом (Michael C. Pierce) и
Робертом К. Уэа (Robert K. Ware) из Colorado School of Mines по
идее Чарльза Смита (Charles Smith) из Colorado State University.
E-mail: bware@mines.colorado.edu.
.br
Впоследствии учебник был доработан для использования в
.B Vim
Брамом Мооленааром (Bram Moolenaar).
Имена переводчиков учебника упоминаются в соответствующих файлах.
.SH СМОТРИ ТАКЖЕ
vim(1)

View File

@@ -0,0 +1,51 @@
.TH VIMTUTOR 1 "2001 April 2"
.SH ИМЯ
vimtutor \- учебник по Vim
.SH КОМАНДНАЯ СТРОКА
.br
.B vimtutor [язык]
.SH ОПИСАНИЕ
Команда
.B vimtutor
запускает учебник по
.B Vim.
При этом сначала происходит создание копии файла учебника,
чтобы его можно было редактировать без опасения потерять исходный файл.
.PP
Программа
.B vimtutor
полезна для новичков, желающих научиться самым основным командам
.B Vim.
.PP
Необязательный параметр [язык] представляет собой двухсимвольный код языка,
например "ru" или "it".
Если параметр [язык] не указан, то используется язык активной в настоящий
момент локали. Если учебник на этом языке не существует, то по умолчанию
используется учебник на английском языке.
.PP
При работе с учебником
.B Vim
всегда запускается в режиме совместимости с Vi.
.SH ФАЙЛЫ
.TP 15
/usr/local/lib/vim/tutor/tutor[.язык]
Текст учебника
.B vimtutor.
.TP 15
/usr/local/lib/vim/tutor/tutor.vim
Сценарий Vim, который используется для создания рабочей
копии текста учебника
.B vimtutor.
.SH АВТОРЫ
.B Vimtutor
был впервые написан для Vi Майклом К. Пирсом (Michael C. Pierce) и
Робертом К. Уэа (Robert K. Ware) из Colorado School of Mines по
идее Чарльза Смита (Charles Smith) из Colorado State University.
E-mail: bware@mines.colorado.edu.
.br
Впоследствии учебник был доработан для использования в
.B Vim
Брамом Мооленааром (Bram Moolenaar).
Имена переводчиков учебника упоминаются в соответствующих файлах.
.SH СМОТРИ ТАКЖЕ
vim(1)

View File

@@ -1,4 +1,4 @@
*visual.txt* For Vim version 7.0aa. Last change: 2004 Jun 08
*visual.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -46,7 +46,7 @@ However, when the 'selection' option is set to "exclusive" and the cursor is
after the Visual area, the character under the cursor is not included.
With "v" the text before the start position and after the end position will
not be highlighted. However, All uppercase and non-alpha operators, except
not be highlighted. However, all uppercase and non-alpha operators, except
"~" and "U", will work on whole lines anyway. See the list of operators
below.
@@ -139,6 +139,9 @@ extended to the rightmost column of the longest line.
If you want to highlight exactly the same area as the last time, you can use
"gv" |gv| |v_gv|.
*v_<Esc>*
<Esc> In Visual mode: Stop Visual mode.
*v_CTRL-C*
CTRL-C In Visual mode: Stop Visual mode. When insert mode is
pending (the mode message shows
@@ -176,7 +179,7 @@ When switching to another window on the same buffer, the cursor position in
that window is adjusted, so that the same Visual area is still selected. This
is especially useful to view the start of the Visual area in one window, and
the end in another. You can then use <RightMouse> (or <S-LeftMouse> when
'mousemodel' is "popup") to move either end of the Visual area.
'mousemodel' is "popup") to drag either end of the Visual area.
==============================================================================
4. Operating on the Visual area *visual-operators*
@@ -362,7 +365,7 @@ Note that special characters (like '.' and '*') will cause problems.
Visual-block Examples *blockwise-examples*
With the following text, I will indicate the commands to produce the block and
the results below. In all cases, the cursor begins on the 'a' in the first
line if the test text.
line of the test text.
The following modeline settings are assumed ":ts=8:sw=4:".
It will be helpful to

View File

@@ -1,4 +1,4 @@
*windows.txt* For Vim version 7.0aa. Last change: 2004 Apr 29
*windows.txt* For Vim version 7.0aa. Last change: 2005 Feb 18
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -101,6 +101,8 @@ when the last window also has a status line:
'laststatus' = 2 always a status line
You can change the contents of the status line with the 'statusline' option.
This option can be local to the window, so that you can have a different
status line in each window.
Normally, inversion is used to display the status line. This can be changed
with the 's' character in the 'highlight' option. For example, "sb" sets it to
@@ -585,7 +587,7 @@ can also get to them with the buffer list commands, like ":bnext".
not split. Also see |++opt| and |+cmd|.
*:sfir* *:sfirst*
:sfir[st [++opt] [+cmd]
:sfir[st] [++opt] [+cmd]
Same as ":srewind".
*:sla* *:slast*
@@ -875,7 +877,7 @@ list of buffers. |unlisted-buffer|
1 #h "/test/text" line 1 ~
2u "asdf" line 0 ~
3 %l+ "version.c" line 1 ~
3 %a+ "version.c" line 1 ~
When the [!] is included the list will show unlisted buffers
(the term "unlisted" is a bit confusing then...).
@@ -1096,7 +1098,7 @@ help Contains a help file. Will only be created with the |:help|
and can't be changed. The 'buflisted' option will be reset
for a help buffer.
directory Displays directory contents. Used by the |file-explorer|
directory Displays directory contents. Can be used by a file explorer
plugin. The buffer is created with these settings: >
:set buftype=nowrite
:set bufhidden=delete

402
runtime/doc/xxd-it.1 Executable file
View File

@@ -0,0 +1,402 @@
.TH XXD 1 "Agosto 1996" "Pagina di manuale per xxd"
.\"
.\" 21 Maggio 1996
.\" Autore della pagina di manuale:
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.\" Modificato da Bram Moolenaar <Bram@vim.org>
.SH NOME
.I xxd
\- Produce esadecimale da un file binario o viceversa.
.SH SINTASSI
.B xxd
\-h[elp]
.br
.B xxd
[opzioni] [input_file [output_file]]
.br
.B xxd
\-r[evert] [opzioni] [input_file [output_file]]
.SH DESCRIZIONE
.I xxd
crea un'immagine esadecimale di un dato file o dello "standard input".
Può anche ottenere da un'immagine esadecimale il file binario originale.
Come
.BR uuencode (1)
e
.BR uudecode (1)
permette di trasmettere dati binari in una rapresentazione ASCII "a prova
di email", ma ha anche il vantaggio di poter decodificare sullo "standard
output". Inoltre, può essere usato per effettuare delle modifiche (patch)
a file binari.
.SH OPZIONI
Se non si specifica un
.I input_file
il programma legge dallo "standard input".
Se
.I input_file
è specificato come il carattere
.RB \` \- '
, l'input è letto dallo "standard input".
Se non si specifica un
.I output_file
(o si mette al suo posto il carattere
.RB \` \- '
), i risultati sono inviati allo "standard output".
.PP
Si noti che la scansione dei caratteri è "pigra", e non controlla oltre
la prima lettera dell'opzione, a meno che l'opzione sia seguita da un
parametro.
Gli spazi fra una singola lettera di opzione e il corrispondente parametro
dopo di essa sono facoltativi.
I parametri delle opzioni possono essere specificati usando la notazione
decimale, esadecimale oppure ottale.
Pertanto
.BR \-c8 ,
.BR "\-c 8" ,
.B \-c 010
e
.B \-cols 8
sono notazioni equivalenti fra loro.
.PP
.TP
.IR \-a " | " \-autoskip
Richiesta di autoskip: Un singolo '*' rimpiazza linee di zeri binari.
Valore predefinito: off.
.TP
.IR \-b " | " \-bits
Richiesta di una immagine binaria (cifre binarie), invece che esadecimale.
Questa opzione scrive un byte come otto cifre "1" e "0" invece di usare i
numeri esadecimali. Ogni linea è preceduta da un indirizzo in esadecimale e
seguita da una decodifica ascii (o ebcdic). Le opzioni specificabili dalla
linea comando \-r, \-p, \-i non funzionano in questo modo.
.TP
.IR "\-c colonne " | " \-cols colonne"
.IR "\-c colonne " | " \-cols colonne"
In ogni linea sono formattate
.RI < colonne >
colonne. Valore predefinito 16 (\-i: 12, \-ps: 30, \-b: 6).
Valore massimo 256.
.TP
.IR \-E " | " \-EBCDIC
Cambia la codifica della colonna di destra da ASCII a EBCDIC.
Questo non modifica la rappresentazione esadecimale. Non ha senso
specificare questa opzione in combinazione con \-r, \-p o \-i.
.TP
.IR "\-g bytes " | " \-groupsize bytes"
Inserisci ogni
.RI < bytes >
bytes di output (di due caratteri esadecimali o otto numeri binari ognuno)
uno spazio bianco.
Specificando
.I \-g 0
i bytes di output non sono separati da alcuno spazio.
.RI < Bytes "> ha come valore predefinito " 2
in modalità normale [esadecimale] e \fI1\fP in modalità binaria.
Il raggruppamento non si applica agli stili "PostScript" e "include".
.TP
.IR \-h " | " \-help
stampa un sommario dei comandi disponibili ed esce. Non viene fatto
null'altro.
.TP
.IR \-i " | " \-include
L'output è nello stile dei file "include" in C. Viene preparata la
definizione completa di un "array" [vettore], dandogli il nome del
file di input), tranne che nel caso in cui xxd legga dallo "standard input".
.TP
.IR "\-l lunghezza " | " \-len lunghezza"
Il programma esce dopo aver scritto
.RI < lunghezza >
bytes.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
L'output è nello stile di un dump continuo sotto postscript.
Noto anche come stile esadecimale semplice [plain].
.TP
.IR \-r " | " \-revert
ricostruzione: converte (o mette una patch) a partire dall'immagine
esadecimale, creando [o modificando] il file binario.
Se non diretto allo "standard output", xxd scrive nel suo file di output
in maniera continua, senza interruzioni. Usare la combinazione
.I \-r \-p
per leggere dump in stile esadecimale semplice [plain], senza l'informazione
di numero di linea e senza un particolare tracciato di colonna. Degli spazi
o delle linee vuote possono essere inserite a piacere [e vengono ingorate].
.TP
.I \-seek distanza
Usato con l'opzione
.IR \-r :
(ricostruzione),
.RI < distanza >
viene aggiunta alla posizione nel file trovata nella immagine
esadecimale.
.TP
.I \-s [+][\-]seek
Inizia a
.RI < seek >
bytes assoluti (o relativi) di distanza all'interno di input_file.
\fI+ \fRindica che il "seek" è relativo alla posizione corrente nel file
"standard input" (non significativa quando non si legge da "standard input").
\fI\- \fRindica che il "seek" dovrebbe posizionarsi ad quel numero di
caratteri dalla fine dell'input (o se in combinazione con
\fI+ \fR: prime della posizione corrente nel file "standard input").
Se non si specifica una opzione \-s option, xxd inizia alla posizione
corrente all'interno del file.
.TP
.I \-u
usa lettere esadecimali maiuscole. Il valore predefinito è di usare
lettere minuscole.
.TP
.IR \-v " | " \-version
visualizza la stringa contenente la versione del programma.
.SH ATTENZIONE
.PP
.I xxd \-r
è capace di operare "magie" nell'utilizzare l'informazione "numero di linea".
Se sul file di output ci si può posizionare usando la "seek", il numero di
linea all'inizio di ogni riga esadecimale può essere non ordinato, delle
linee possono mancare delle linee, oppure esserci delle sovrapposizioni.
In simili casi xxd userà lseek(2) per raggiungere la posizione d'inizio.
Se il file di output non consente di usare "seek", sono permessi solo dei
"buchi", che saranno riempiti con zeri binari.
.PP
.I xxd \-r
non genera mai errori di specifica parametri. I parametri non riconosciuti
sono silenziosamente ignorati.
.PP
Nel modificare immagini esadecimali, tenete conto che
.I xxd \-r
salta il resto della linea, dopo aver letto abbastanza caratteri contenenti
dati esadecimali (vedere opzione \-c). Ciò implica pure che le modifiche alle
colonne di caratteri stampabili ascii (o ebcdic) sono sempre ignorate.
La ricostruzione da un file immagine esadecimale in stile semplice
(postscript) con xxd \-r \-p non dipende dal numero corrretto di colonne.
IN questo caso, qualsiasi cosa assomigli a una coppia di cifre esadecimali
è interpretata [e utilizzata].
.PP
Notare la differenza fra
.br
\fI% xxd \-i file\fR
.br
e
.br
\fI% xxd \-i \< file\fR
.PP
.I xxd \-s \+seek
può comportarsi in modo diverso da
.IR "xxd \-s seek"
, perché lseek(2) è usata per tornare indietro nel file di input. Il '+'
fa differenza se il file di input è lo "standard input", e se la pozione nel
file di "standard input" non è all'inizio del file quando xxd è eseguito,
con questo input.
I seguenti esempi possono contribuire a chiarire il concetto
(o ad oscurarlo!)...
.PP
Riavvolge lo "standard input" prima di leggere; necessario perché `cat'
ha già letto lo stesso file ["file"] fino alla fine dello "standard input".
.br
\fI% sh \-c 'cat > copia_normale; xxd \-s 0 > copia_esadecimale' < file
.PP
Stampa immagine esadecimale dalla posizione file 0x480 (=1024+128) in poi.
Il segno `+' vuol dire "rispetto alla posizione corrente", quindi il `128'
si aggiunge a 1k (1024) dove `dd' si era fermato.
.br
\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +128 > esadecimale' < file
.PP
Immagine esadecimale dalla posizione 0x100 ( = 1024\-768 ) del file in avanti.
.br
\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +-768 > esadecimale' < file
.PP
Comunque, questo capita raramente, e l'uso del `+' di rado.
L'autore preferisce monitorare il comportamento di xxd con strace(1) o
truss(1), quando si usa l'opzione \-s.
.SH ESEMPI
.PP
.br
Stampa tutto tranne le prime tre linee (0x30 bytes esadecimali) di
.B file
\.
.br
\fI% xxd \-s 0x30 file
.PP
.br
Stampa 3 linee (0x30 bytes esadecimali) alla fine di
.B file
\.
.br
\fI% xxd \-s \-0x30 file
.PP
.br
Stampa 120 bytes come immagine esadecimale continua con 40 bytes per linea.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e54482058584420312022417567757374203139
.br
39362220224d616e75616c207061676520666f72
.br
20787864220a2e5c220a2e5c222032317374204d
.br
617920313939360a2e5c22204d616e2070616765
.br
20617574686f723a0a2e5c2220202020546f6e79
.br
204e7567656e74203c746f6e79407363746e7567
.br
.br
Stampa i primi 120 bytes della pagina di manuale vim.1 a 12 bytes per linea.
.br
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
.br
000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
.br
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
.br
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
.br
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
.br
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
.br
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
.br
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
.br
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
.br
000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
.PP
.br
Visualizza la data dal file xxd.1
.br
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
.PP
.br
Copiare
.B input_file
su
.B output_file
premettendogli 100 bytes a 0x00.
.br
\fI% xxd input_file | xxd \-r \-s 100 \> output_file\fR
.br
.br
Modificare (patch) la data nel file xxd.1
.br
\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR
.br
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
.PP
.br
Creare un file di 65537 tutto a 0x00,
tranne che l'ultimo carattere che è una 'A' (esadecimale 0x41).
.br
\fI% echo '010000: 41' | xxd \-r \> file\fR
.PP
.br
Stampa una immagine esadecimale del file di cui sopra con opzione autoskip.
.br
\fI% xxd \-a \-c 12 file\fR
.br
0000000: 0000 0000 0000 0000 0000 0000 ............
.br
*
.br
000fffc: 0000 0000 40 ....A
.PP
Crea un file di 1 byte che contiene il solo carattere 'A'.
Il numero dopo '\-r \-s' viene aggiunto a quello trovato nel file;
in pratica, i bytes precedenti non sono stampati.
.br
\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR
.PP
Usare xxd come filtro all'interno di un editor come
.B vim(1)
per ottenere una immagine esadecimale di una parte di file
delimitata dai mark `a' e `z'.
.br
\fI:'a,'z!xxd\fR
.PP
Usare xxd come filtro all'interno di un editor come
.B vim(1)
per ricostruire un pezzo di file binario da una immagine esadecimale
delimitata dai mark `a' e `z'.
.br
\fI:'a,'z!xxd \-r\fR
.PP
Usare xxd come filtro all'interno di un editor come
.B vim(1)
per ricostruire una sola linea di file binario da una immagine esadecimale,
Portare il cursore sopra la linea e battere:
.br
\fI!!xxd \-r\fR
.PP
Per leggere singoli charatteri da una linea seriale
.br
\fI% xxd \-c1 < /dev/term/b &\fR
.br
\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
.SH CODICI DI RITORNO
Il programma può restituire questi codici di errore:
.TP
0
nessun errore rilevato.
.TP
\-1
operazione non supportata (
.I xxd \-r \-i
non ancora possible).
.TP
1
errore durante la scansione parametri.
.TP
2
problemi con il file di input.
.TP
3
problemi con il file di output.
.TP
4,5
posizione "seek" specificata non raggiungibile all'interno del file.
.SH VEDERE ANCHE
uuencode(1), uudecode(1), patch(1)
.br
.SH AVVERTIMENTI
La stranezza dello strumento rispecchia la mente del suo creatore.
Usate a vostro rischio e pericolo. Copiate i file. Tracciate l'esecuzione.
Diventate un mago.
.br
.SH VERSIONE
Questa pagina di manuale documenta la versione 1.7 di xxd.
.SH AUTORE
.br
(c) 1990-1997 Juergen Weigert
.br
<jnweiger@informatik.uni-erlangen.de>
.LP
Distribuite liberamente ed attribuitemi il credito,
.br
fate soldi e condivideteli con me
.br
perdete soldi e non venite a chiederli a me.
.PP
Pagina di manuale messa in piedi da Tony Nugent
.br
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.br
Piccole modifiche di Bram Moolenaar.
Modificato da Juergen Weigert.
.PP

402
runtime/doc/xxd-it.UTF-8.1 Normal file
View File

@@ -0,0 +1,402 @@
.TH XXD 1 "Agosto 1996" "Pagina di manuale per xxd"
.\"
.\" 21 Maggio 1996
.\" Autore della pagina di manuale:
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.\" Modificato da Bram Moolenaar <Bram@vim.org>
.SH NOME
.I xxd
\- Produce esadecimale da un file binario o viceversa.
.SH SINTASSI
.B xxd
\-h[elp]
.br
.B xxd
[opzioni] [input_file [output_file]]
.br
.B xxd
\-r[evert] [opzioni] [input_file [output_file]]
.SH DESCRIZIONE
.I xxd
crea un'immagine esadecimale di un dato file o dello "standard input".
Può anche ottenere da un'immagine esadecimale il file binario originale.
Come
.BR uuencode (1)
e
.BR uudecode (1)
permette di trasmettere dati binari in una rapresentazione ASCII "a prova
di email", ma ha anche il vantaggio di poter decodificare sullo "standard
output". Inoltre, può essere usato per effettuare delle modifiche (patch)
a file binari.
.SH OPZIONI
Se non si specifica un
.I input_file
il programma legge dallo "standard input".
Se
.I input_file
è specificato come il carattere
.RB \` \- '
, l'input è letto dallo "standard input".
Se non si specifica un
.I output_file
(o si mette al suo posto il carattere
.RB \` \- '
), i risultati sono inviati allo "standard output".
.PP
Si noti che la scansione dei caratteri è "pigra", e non controlla oltre
la prima lettera dell'opzione, a meno che l'opzione sia seguita da un
parametro.
Gli spazi fra una singola lettera di opzione e il corrispondente parametro
dopo di essa sono facoltativi.
I parametri delle opzioni possono essere specificati usando la notazione
decimale, esadecimale oppure ottale.
Pertanto
.BR \-c8 ,
.BR "\-c 8" ,
.B \-c 010
e
.B \-cols 8
sono notazioni equivalenti fra loro.
.PP
.TP
.IR \-a " | " \-autoskip
Richiesta di autoskip: Un singolo '*' rimpiazza linee di zeri binari.
Valore predefinito: off.
.TP
.IR \-b " | " \-bits
Richiesta di una immagine binaria (cifre binarie), invece che esadecimale.
Questa opzione scrive un byte come otto cifre "1" e "0" invece di usare i
numeri esadecimali. Ogni linea è preceduta da un indirizzo in esadecimale e
seguita da una decodifica ascii (o ebcdic). Le opzioni specificabili dalla
linea comando \-r, \-p, \-i non funzionano in questo modo.
.TP
.IR "\-c colonne " | " \-cols colonne"
.IR "\-c colonne " | " \-cols colonne"
In ogni linea sono formattate
.RI < colonne >
colonne. Valore predefinito 16 (\-i: 12, \-ps: 30, \-b: 6).
Valore massimo 256.
.TP
.IR \-E " | " \-EBCDIC
Cambia la codifica della colonna di destra da ASCII a EBCDIC.
Questo non modifica la rappresentazione esadecimale. Non ha senso
specificare questa opzione in combinazione con \-r, \-p o \-i.
.TP
.IR "\-g bytes " | " \-groupsize bytes"
Inserisci ogni
.RI < bytes >
bytes di output (di due caratteri esadecimali o otto numeri binari ognuno)
uno spazio bianco.
Specificando
.I \-g 0
i bytes di output non sono separati da alcuno spazio.
.RI < Bytes "> ha come valore predefinito " 2
in modalità normale [esadecimale] e \fI1\fP in modalità binaria.
Il raggruppamento non si applica agli stili "PostScript" e "include".
.TP
.IR \-h " | " \-help
stampa un sommario dei comandi disponibili ed esce. Non viene fatto
null'altro.
.TP
.IR \-i " | " \-include
L'output è nello stile dei file "include" in C. Viene preparata la
definizione completa di un "array" [vettore], dandogli il nome del
file di input), tranne che nel caso in cui xxd legga dallo "standard input".
.TP
.IR "\-l lunghezza " | " \-len lunghezza"
Il programma esce dopo aver scritto
.RI < lunghezza >
bytes.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
L'output è nello stile di un dump continuo sotto postscript.
Noto anche come stile esadecimale semplice [plain].
.TP
.IR \-r " | " \-revert
ricostruzione: converte (o mette una patch) a partire dall'immagine
esadecimale, creando [o modificando] il file binario.
Se non diretto allo "standard output", xxd scrive nel suo file di output
in maniera continua, senza interruzioni. Usare la combinazione
.I \-r \-p
per leggere dump in stile esadecimale semplice [plain], senza l'informazione
di numero di linea e senza un particolare tracciato di colonna. Degli spazi
o delle linee vuote possono essere inserite a piacere [e vengono ingorate].
.TP
.I \-seek distanza
Usato con l'opzione
.IR \-r :
(ricostruzione),
.RI < distanza >
viene aggiunta alla posizione nel file trovata nella immagine
esadecimale.
.TP
.I \-s [+][\-]seek
Inizia a
.RI < seek >
bytes assoluti (o relativi) di distanza all'interno di input_file.
\fI+ \fRindica che il "seek" è relativo alla posizione corrente nel file
"standard input" (non significativa quando non si legge da "standard input").
\fI\- \fRindica che il "seek" dovrebbe posizionarsi ad quel numero di
caratteri dalla fine dell'input (o se in combinazione con
\fI+ \fR: prime della posizione corrente nel file "standard input").
Se non si specifica una opzione \-s option, xxd inizia alla posizione
corrente all'interno del file.
.TP
.I \-u
usa lettere esadecimali maiuscole. Il valore predefinito è di usare
lettere minuscole.
.TP
.IR \-v " | " \-version
visualizza la stringa contenente la versione del programma.
.SH ATTENZIONE
.PP
.I xxd \-r
è capace di operare "magie" nell'utilizzare l'informazione "numero di linea".
Se sul file di output ci si può posizionare usando la "seek", il numero di
linea all'inizio di ogni riga esadecimale può essere non ordinato, delle
linee possono mancare delle linee, oppure esserci delle sovrapposizioni.
In simili casi xxd userà lseek(2) per raggiungere la posizione d'inizio.
Se il file di output non consente di usare "seek", sono permessi solo dei
"buchi", che saranno riempiti con zeri binari.
.PP
.I xxd \-r
non genera mai errori di specifica parametri. I parametri non riconosciuti
sono silenziosamente ignorati.
.PP
Nel modificare immagini esadecimali, tenete conto che
.I xxd \-r
salta il resto della linea, dopo aver letto abbastanza caratteri contenenti
dati esadecimali (vedere opzione \-c). Ciò implica pure che le modifiche alle
colonne di caratteri stampabili ascii (o ebcdic) sono sempre ignorate.
La ricostruzione da un file immagine esadecimale in stile semplice
(postscript) con xxd \-r \-p non dipende dal numero corrretto di colonne.
IN questo caso, qualsiasi cosa assomigli a una coppia di cifre esadecimali
è interpretata [e utilizzata].
.PP
Notare la differenza fra
.br
\fI% xxd \-i file\fR
.br
e
.br
\fI% xxd \-i \< file\fR
.PP
.I xxd \-s \+seek
può comportarsi in modo diverso da
.IR "xxd \-s seek"
, perché lseek(2) è usata per tornare indietro nel file di input. Il '+'
fa differenza se il file di input è lo "standard input", e se la pozione nel
file di "standard input" non è all'inizio del file quando xxd è eseguito,
con questo input.
I seguenti esempi possono contribuire a chiarire il concetto
(o ad oscurarlo!)...
.PP
Riavvolge lo "standard input" prima di leggere; necessario perché `cat'
ha già letto lo stesso file ["file"] fino alla fine dello "standard input".
.br
\fI% sh \-c 'cat > copia_normale; xxd \-s 0 > copia_esadecimale' < file
.PP
Stampa immagine esadecimale dalla posizione file 0x480 (=1024+128) in poi.
Il segno `+' vuol dire "rispetto alla posizione corrente", quindi il `128'
si aggiunge a 1k (1024) dove `dd' si era fermato.
.br
\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +128 > esadecimale' < file
.PP
Immagine esadecimale dalla posizione 0x100 ( = 1024\-768 ) del file in avanti.
.br
\fI% sh \-c 'dd of=normale bs=1k count=1; xxd \-s +-768 > esadecimale' < file
.PP
Comunque, questo capita raramente, e l'uso del `+' di rado.
L'autore preferisce monitorare il comportamento di xxd con strace(1) o
truss(1), quando si usa l'opzione \-s.
.SH ESEMPI
.PP
.br
Stampa tutto tranne le prime tre linee (0x30 bytes esadecimali) di
.B file
\.
.br
\fI% xxd \-s 0x30 file
.PP
.br
Stampa 3 linee (0x30 bytes esadecimali) alla fine di
.B file
\.
.br
\fI% xxd \-s \-0x30 file
.PP
.br
Stampa 120 bytes come immagine esadecimale continua con 40 bytes per linea.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e54482058584420312022417567757374203139
.br
39362220224d616e75616c207061676520666f72
.br
20787864220a2e5c220a2e5c222032317374204d
.br
617920313939360a2e5c22204d616e2070616765
.br
20617574686f723a0a2e5c2220202020546f6e79
.br
204e7567656e74203c746f6e79407363746e7567
.br
.br
Stampa i primi 120 bytes della pagina di manuale vim.1 a 12 bytes per linea.
.br
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
.br
000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
.br
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
.br
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
.br
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
.br
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
.br
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
.br
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
.br
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
.br
000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
.PP
.br
Visualizza la data dal file xxd.1
.br
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
.PP
.br
Copiare
.B input_file
su
.B output_file
premettendogli 100 bytes a 0x00.
.br
\fI% xxd input_file | xxd \-r \-s 100 \> output_file\fR
.br
.br
Modificare (patch) la data nel file xxd.1
.br
\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR
.br
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
.PP
.br
Creare un file di 65537 tutto a 0x00,
tranne che l'ultimo carattere che è una 'A' (esadecimale 0x41).
.br
\fI% echo '010000: 41' | xxd \-r \> file\fR
.PP
.br
Stampa una immagine esadecimale del file di cui sopra con opzione autoskip.
.br
\fI% xxd \-a \-c 12 file\fR
.br
0000000: 0000 0000 0000 0000 0000 0000 ............
.br
*
.br
000fffc: 0000 0000 40 ....A
.PP
Crea un file di 1 byte che contiene il solo carattere 'A'.
Il numero dopo '\-r \-s' viene aggiunto a quello trovato nel file;
in pratica, i bytes precedenti non sono stampati.
.br
\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR
.PP
Usare xxd come filtro all'interno di un editor come
.B vim(1)
per ottenere una immagine esadecimale di una parte di file
delimitata dai mark `a' e `z'.
.br
\fI:'a,'z!xxd\fR
.PP
Usare xxd come filtro all'interno di un editor come
.B vim(1)
per ricostruire un pezzo di file binario da una immagine esadecimale
delimitata dai mark `a' e `z'.
.br
\fI:'a,'z!xxd \-r\fR
.PP
Usare xxd come filtro all'interno di un editor come
.B vim(1)
per ricostruire una sola linea di file binario da una immagine esadecimale,
Portare il cursore sopra la linea e battere:
.br
\fI!!xxd \-r\fR
.PP
Per leggere singoli charatteri da una linea seriale
.br
\fI% xxd \-c1 < /dev/term/b &\fR
.br
\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
.SH CODICI DI RITORNO
Il programma può restituire questi codici di errore:
.TP
0
nessun errore rilevato.
.TP
\-1
operazione non supportata (
.I xxd \-r \-i
non ancora possible).
.TP
1
errore durante la scansione parametri.
.TP
2
problemi con il file di input.
.TP
3
problemi con il file di output.
.TP
4,5
posizione "seek" specificata non raggiungibile all'interno del file.
.SH VEDERE ANCHE
uuencode(1), uudecode(1), patch(1)
.br
.SH AVVERTIMENTI
La stranezza dello strumento rispecchia la mente del suo creatore.
Usate a vostro rischio e pericolo. Copiate i file. Tracciate l'esecuzione.
Diventate un mago.
.br
.SH VERSIONE
Questa pagina di manuale documenta la versione 1.7 di xxd.
.SH AUTORE
.br
(c) 1990-1997 Juergen Weigert
.br
<jnweiger@informatik.uni-erlangen.de>
.LP
Distribuite liberamente ed attribuitemi il credito,
.br
fate soldi e condivideteli con me
.br
perdete soldi e non venite a chiederli a me.
.PP
Pagina di manuale messa in piedi da Tony Nugent
.br
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.br
Piccole modifiche di Bram Moolenaar.
Modificato da Juergen Weigert.
.PP

408
runtime/doc/xxd-ru.1 Normal file
View File

@@ -0,0 +1,408 @@
.TH XXD 1 "August 1996" "Страница man для xxd"
.\"
.\" 21st May 1996
.\" Man page author:
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.\" Changes by Bram Moolenaar <Bram@vim.org>
.SH ИМЯ
.I xxd
\- создаёт представление файла в виде шестнадцатеричных кодов или выполняет
обратное преобразование.
.SH КОМАНДНАЯ СТРОКА
.B xxd
\-h[elp]
.br
.B xxd
[ключи] [входной_файл [выходной_файл]]
.br
.B xxd
\-r[evert] [ключи] [входной_файл [выходной_файл]]
.SH ОПИСАНИЕ
.I xxd
создаёт представление указанного файла или данных, прочитанных из потока
стандартного ввода, в виде шестнадцатеричных кодов. Эта команда также может
выполнить обратное преобразование заданных шестнадцатеричными кодами данных
в исходный бинарный формат.
Подобно командам
.BR uuencode(1)
и
.BR uudecode(1),
она позволяет выполнять преобразование бинарных данных в ASCII-код,
который можно передавать по электронной почте, однако, помимо этого, программа
xxd позволяет выполнять декодирование в поток стандартного вывода,
а также может применяться для создания заплаток для бинарных файлов.
.SH КЛЮЧИ ЗАПУСКА
Если
.I входной_файл
не задан, то соответствующие данные читаются из потока стандартного ввода.
В случае, если в качестве
.I входногоайла
используется символ
.RB \` \- ',
источником данных также выступает поток стандартного ввода.
В том случае, если не указан
.I выходной_файл
(или вместо него используется символ
.RB \` \- '
), результат преобразования направляется в поток стандартного вывода.
.PP
Обратите внимание, что используется "ленивый" алгоритм разбора ключей, который не
проверяет более одной буквы ключа, если в этом ключе не используется параметр.
Пробелы между единственным символом ключа и соответствующим параметром не являются
обязательными. Параметры ключей могут быть заданы с использованием десятичного,
шестнадцатеричного или восьмеричного формата.
Таким образом, ключи
.BR \-c8 ,
.BR "\-c 8" ,
.B \-c 010
и
.B \-cols 8
являются равнозначными.
.PP
.TP
.IR \-a " | " \-autoskip
Включает автоматический пропуск: вместо последовательности
нулевых строк используется одиночный символ '*'. По умолчанию
не применяется.
.TP
.IR \-b " | " \-bits
Вместо шестнадцатеричного кода используются биты (двоичные цифры).
При использовании этого ключа вместо обычного шестнадцатеричного представления
октетов используются наборы из восьми символов "1" и "0". Каждая строка
предваряется номером строки в шестнадцатеричном виде, а завершается символьным
представлением (в виде ascii или ebcdic). Ключи \-r, \-p, \-i в этом режиме
не работают.
.TP
.IR "\-c кол " | " \-cols кол"
Задаёт количество октетов
.RI < кол >,
которое выводится на каждой строке. По умолчанию используется значение 16
(\-i: 12, \-ps: 30, \-b: 6).
Максимально допустимое значение: 256.
.TP
.IR \-E " | " \-EBCDIC
Изменяет способ кодирования символов в правой колонке с ASCII на EBCDIC. Этот ключ
не изменяет шестнадцатеричное представление. Данный ключ не имеет смысла,
если используются ключи \-r, \-p или \-i.
.TP
.IR "\-g байт " | " \-groupsize байт"
Позволяет выполнять группировку указанного количества
.RI < байтов >
(две шестнадцатеричные цифры или восемь битов), отделяя группы друг от друга пробелами.
Значение
.I \-g 0
применяется для отказа от использования группировки.
По умолчанию используется значение
.RI < байт "> равное " 2
в обычном режиме и \fI1\fP в битовом режиме. Группировка не применяется
в режимах postscript и include.
.TP
.IR \-h " | " \-help
Выводит справку по доступным ключам командной строки и завершает работу программы.
Создание шестнадцатеричного представления не выполняется.
.TP
.IR \-i " | " \-include
Позволяет создавать вывод в стиле подключаемых заголовочных файлов языка C.
Вывод содержит полноценное определение статического массива данных, имя которого
соответствует имени входного файла, если xxd не считывает данные из потока стандартного
ввода.
.TP
.IR "\-l длина " | " \-len длина"
Завершает работу после записи заданного в параметре
.RI < длина >
количества октетов.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
Использует непрерывный формат вывода шестнадцатеричного кода,
известный как "простой" стиль или стиль "postscript".
.TP
.IR \-r " | " \-revert
Изменяет смысл операции на противоположный: позволяет выполнять преобразование
шестнадцатеричного представления в бинарный код (или применять результат в качестве заплаты).
Если вывод происходит не в поток стандартного вывода, то xxd выполняет добавление кода
к соответствующему файлу. При использовании комбинации ключей
.I \-r \-p
происходит чтение "простого" шестнадцатеричного представления без использования
информации о номерах строк и какого-либо специального раскроя колонок. Пробелы
и символы новой строки могут встречаться в любом месте исходных данных.
.TP
.I \-seek смещение
При использовании после ключа
.I \-r
: добавлять указанное
.RI < смещение >
к файловым позициям, обнаруженным в исходных данных.
.TP
.I \-s [\+][\-]seek
Начинает работу с указанного абсолютного (или относительного)
.RI < смещения >
в байтах во входном_файле.
\fI\+ \fRуказывает, что смещение является относительным по отношению
к текущей файловой позиции в потоке стандартного ввода (бессмысленно, если чтение
происходит не из потока стандартного ввода). \fI\- \fRуказывает, что должно быть прочитано
указанное количество символов от конца ввода (либо, если сочетается с \fI \+ \fR:
перед текущей позиции файла в потоке стандартного ввода).
Если ключ \-s не используется, то xxd начинает работу от текущей позиции в файле.
.TP
.I \-u
Использует шестнадцатеричные цифры в верхнем регистре. По умолчанию используются цифры в
нижнем регистре символов.
.TP
.IR \-v " | " \-version
Отображает информацию о версии программы.
.SH ПОДВОДНЫЕ КАМНИ
.PP
.I xxd \-r
обладает встроенным интеллектом для распознавания информации о номерах строк.
Если возможен поиск по входному файлу, то номера строк в начале каждой строки
шестнадцатеричного представления могут быть неупорядоченными, некоторые строки могут
быть пропущены или пересекаться друг с другом. В этих случаях xxd использует
lseek(2) для перехода к следующей позиции. Если поиск по входному файлу
невозможен, то допустимы только пропуски строк, которые заполняются нулевыми
байтами.
.PP
.I xxd \-r
никогда не выводит сообщений об ошибках. Мусор пропускается молча.
.PP
При редактировании шестнадцатеричных представлений бинарных файлов обращайте
внимание, что
.I xxd \-r
пропускает в строке ввода любые данные после прочтения достаточного количества
колонок шестнадцатеричных данных (см. ключ \-c). Это означает, что изменения,
внесенные в колонки с печатными символами ascii (или ebcdic), всегда игнорируются.
При обратном преобразовании шестнадцатеричного представления в стиле
postscript с помощью команды xxd \-r \-p количество колонок не учитывается.
В этом случае распознаются все символы, которые похожи на пары шестнадцатеричных цифр.
.PP
Обратите внимание на различие между командами
.PP
\fI% xxd \-i файл\fR
.PP
и
.PP
\fI% xxd \-i \< файл\fR
.PP
Команда
.I xxd \-s \+seek
может отличаться от
.I xxd \-s seek,
поскольку для того, чтобы "отмотать" данные на входе назад, используется вызов lseek(2).
При использовании `+' поведение будет отличаться, если входные данные
поступают с потока стандартного ввода, а позиция в файле стандартного ввода не находится
в начале файла к тому моменту, когда программа xxd запущена и приступает к чтению ввода.
Нижеследующие примеры помогут прояснить (или ещё больше запутать!) ситуацию...
.PP
Отмотка назад потока стандартного ввода; необходимо, поскольку 'cat' уже выполнила
чтение до конца потока стандартного ввода:
.PP
\fI% sh \-c 'cat > plain_copy; xxd \-s 0 > hex_copy' < file
.PP
Вывод шестнадцатеричного представления от позиции в файле 0x480
(= 1024+128).
Символ `+' означает "относительно текущей позиции", таким образом `128' добавляется
к первому килобайту, где завершает работу dd:
.PP
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file
.PP
Вывод шестнадцатеричного представления от позиции в файле 0x100
(= 1024-768):
.PP
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file
.PP
В то же время, следует заметить, что подобные ситуации встречаются довольно редко,
так что символ `+' обычно не используется. Автор предпочитает наблюдать за работой
xxd с помощью strace(1) или truss(1) в тех случаях, когда применяется ключ
\-s.
.SH ПРИМЕРЫ
.PP
.br
Вывести всё, кроме первых трёх строк (0x30 байтов) файла
.B file
:
.PP
\fI% xxd \-s 0x30 file
.PP
.br
Вывести три строки (0x30 байтов) от конца файла
.B file
:
.PP
\fI% xxd \-s \-0x30 file
.PP
.br
Вывести 120 байтов в виде непрерывного шестнадцатеричного представления
по 40 октетов в строке:
.PP
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e544820585844203120224d616e75616c207061
.br
676520666f7220787864220a2e5c220a2e5c2220
.br
32317374204d617920313939360a2e5c22204d61
.br
6e207061676520617574686f723a0a2e5c222020
.br
2020546f6e79204e7567656e74203c746f6e7940
.br
7363746e7567656e2e7070702e67752e6564752e
.br
.PP
.br
Вывести первые 120 байтов этой страницы справочника по 12 октетов в строке:
.PP
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
000000c: 616e 7561 6c20 7061 6765 2066 anual page f
.br
0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\".
.br
0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May
.br
0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma
.br
000003c: 6e20 7061 6765 2061 7574 686f n page autho
.br
0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To
.br
0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
.br
0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
.br
000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
.PP
.br
Показать дату из файла xxd.1:
.PP
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
.br
0000028: 3231 7374 204d 6179 2031 3939 21st May 199
.PP
.br
Скопировать
.B входной_файл
в
.B выходной_файл
с добавлением 100 байтов со значением 0x00 в начало файла:
.PP
\fI% xxd входной_файл | xxd \-r \-s 100 \> выходной_файл\fR
.br
.PP
.br
Заменить дату в файле xxd.1:
.PP
\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR
.br
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
.br
0000028: 3235 7468 204d 6179 2031 3939 25th May 199
.PP
.br
Создать 65537-байтный файл, все байты которого имеют значение
0x00, кроме последнего байта, который должен иметь значение 'A'
(0x41):
.PP
\fI% echo '010000: 41' | xxd \-r \> file\fR
.PP
.br
Создать шестнадцатеричное представление этого файла с
использованием автоматического пропуска:
.PP
\fI% xxd \-a \-c 12 file\fR
.br
0000000: 0000 0000 0000 0000 0000 0000 ............
.br
*
.br
000fffc: 0000 0000 40 ....A
.PP
Создать 1-байтный файл, содержащий символ 'A'.
Число после '\-r \-s' добавляется к номерам строк, найденным в файле;
иначе говоря, предшествующие байты пропускаются:
.PP
\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR
.PP
xxd можно использовать в качестве фильтра в редакторе, например в
.B vim(1),
чтобы создать шестнадцатеричное представление области между
отметками `a' и `z':
.PP
\fI:'a,'z!xxd\fR
.PP
Вы можете использовать xxd в качестве фильтра в редакторе, например в
.B vim(1),
для восстановления данных из шестнадцатеричного представления
между отметками `a' и `z':
.PP
\fI:'a,'z!xxd \-r\fR
.PP
Вы можете использовать xxd в качестве фильтра в редакторе, например в
.B vim(1),
для восстановления данных из единственной строки
шестнадцатеричного представления. Поместите курсор в соответствующую строку
и наберите
.PP
\fI!!xxd \-r\fR
.PP
Чтобы прочитать единственный символ из канала связи:
.PP
\fI% xxd \-c1 < /dev/term/b &\fR
.br
\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
.SH ВОЗВРАЩАЕМЫЕ ЗНАЧЕНИЯ
Программа xxd завершает работу со следующими значениями:
.TP
0
Ошибки не обнаружены.
.TP
\-1
Операция не поддерживается (выполнение
.I xxd \-r \-i
пока невозможно).
.TP
1
Ошибка при разборе ключей командной строки.
.TP
2
Проблемы во входном файле.
.TP
3
Проблемы в выходном файле.
.TP
4,5
Желательная позиция поиска недостижима.
.SH СМОТРИ ТАКЖЕ
uuencode(1), uudecode(1), patch(1)
.br
.SH ПРЕДУПРЕЖДЕНИЕ
Странность этой программы соответствует особенностям мозга её создателя.
Используйте её на свой страх и риск. Копируйте файлы, отслеживайте
вызовы, становитесь волшебником.
.br
.SH ВЕРСИЯ
Эта страница справочника документирует xxd версии 1.7.
.SH АВТОР
.br
(c) 1990-1997 Юрген Вайгерт (Juergen Weigert)
.br
<jnweiger@informatik.uni-erlangen.de>
.LP
Вы можете свободно распространять программу со ссылкой на меня.
.br
Если использование этой программы принесло вам какой-то доход,
поделитесь со мной.
.br
Если вы потеряли деньги, то я тут не причём.
.PP
Первый вариант страницы справочника написан Тони Наджентом (Tony Nugent)
.br
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.br
Небольшие изменения внесены Брамом Мооленааром (Bram Moolenaar).
Страница отредактирована Юргеном Вайгертом (Juergen Weigert).
.PP

408
runtime/doc/xxd-ru.UTF-8.1 Normal file
View File

@@ -0,0 +1,408 @@
.TH XXD 1 "August 1996" "Страница man для xxd"
.\"
.\" 21st May 1996
.\" Man page author:
.\" Tony Nugent <tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.\" Changes by Bram Moolenaar <Bram@vim.org>
.SH ИМЯ
.I xxd
\- создаёт представление файла в виде шестнадцатеричных кодов или выполняет
обратное преобразование.
.SH КОМАНДНАЯ СТРОКА
.B xxd
\-h[elp]
.br
.B xxd
[ключи] [входной_файл [выходной_файл]]
.br
.B xxd
\-r[evert] [ключи] [входной_файл [выходной_файл]]
.SH ОПИСАНИЕ
.I xxd
создаёт представление указанного файла или данных, прочитанных из потока
стандартного ввода, в виде шестнадцатеричных кодов. Эта команда также может
выполнить обратное преобразование заданных шестнадцатеричными кодами данных
в исходный бинарный формат.
Подобно командам
.BR uuencode(1)
и
.BR uudecode(1),
она позволяет выполнять преобразование бинарных данных в ASCII-код,
который можно передавать по электронной почте, однако, помимо этого, программа
xxd позволяет выполнять декодирование в поток стандартного вывода,
а также может применяться для создания заплаток для бинарных файлов.
.SH КЛЮЧИ ЗАПУСКА
Если
.I входной_файл
не задан, то соответствующие данные читаются из потока стандартного ввода.
В случае, если в качестве
.I входногоайла
используется символ
.RB \` \- ',
источником данных также выступает поток стандартного ввода.
В том случае, если не указан
.I выходной_файл
(или вместо него используется символ
.RB \` \- '
), результат преобразования направляется в поток стандартного вывода.
.PP
Обратите внимание, что используется "ленивый" алгоритм разбора ключей, который не
проверяет более одной буквы ключа, если в этом ключе не используется параметр.
Пробелы между единственным символом ключа и соответствующим параметром не являются
обязательными. Параметры ключей могут быть заданы с использованием десятичного,
шестнадцатеричного или восьмеричного формата.
Таким образом, ключи
.BR \-c8 ,
.BR "\-c 8" ,
.B \-c 010
и
.B \-cols 8
являются равнозначными.
.PP
.TP
.IR \-a " | " \-autoskip
Включает автоматический пропуск: вместо последовательности
нулевых строк используется одиночный символ '*'. По умолчанию
не применяется.
.TP
.IR \-b " | " \-bits
Вместо шестнадцатеричного кода используются биты (двоичные цифры).
При использовании этого ключа вместо обычного шестнадцатеричного представления
октетов используются наборы из восьми символов "1" и "0". Каждая строка
предваряется номером строки в шестнадцатеричном виде, а завершается символьным
представлением (в виде ascii или ebcdic). Ключи \-r, \-p, \-i в этом режиме
не работают.
.TP
.IR "\-c кол " | " \-cols кол"
Задаёт количество октетов
.RI < кол >,
которое выводится на каждой строке. По умолчанию используется значение 16
(\-i: 12, \-ps: 30, \-b: 6).
Максимально допустимое значение: 256.
.TP
.IR \-E " | " \-EBCDIC
Изменяет способ кодирования символов в правой колонке с ASCII на EBCDIC. Этот ключ
не изменяет шестнадцатеричное представление. Данный ключ не имеет смысла,
если используются ключи \-r, \-p или \-i.
.TP
.IR "\-g байт " | " \-groupsize байт"
Позволяет выполнять группировку указанного количества
.RI < байтов >
(две шестнадцатеричные цифры или восемь битов), отделяя группы друг от друга пробелами.
Значение
.I \-g 0
применяется для отказа от использования группировки.
По умолчанию используется значение
.RI < байт "> равное " 2
в обычном режиме и \fI1\fP в битовом режиме. Группировка не применяется
в режимах postscript и include.
.TP
.IR \-h " | " \-help
Выводит справку по доступным ключам командной строки и завершает работу программы.
Создание шестнадцатеричного представления не выполняется.
.TP
.IR \-i " | " \-include
Позволяет создавать вывод в стиле подключаемых заголовочных файлов языка C.
Вывод содержит полноценное определение статического массива данных, имя которого
соответствует имени входного файла, если xxd не считывает данные из потока стандартного
ввода.
.TP
.IR "\-l длина " | " \-len длина"
Завершает работу после записи заданного в параметре
.RI < длина >
количества октетов.
.TP
.IR \-p " | " \-ps " | " \-postscript " | " \-plain
Использует непрерывный формат вывода шестнадцатеричного кода,
известный как "простой" стиль или стиль "postscript".
.TP
.IR \-r " | " \-revert
Изменяет смысл операции на противоположный: позволяет выполнять преобразование
шестнадцатеричного представления в бинарный код (или применять результат в качестве заплаты).
Если вывод происходит не в поток стандартного вывода, то xxd выполняет добавление кода
к соответствующему файлу. При использовании комбинации ключей
.I \-r \-p
происходит чтение "простого" шестнадцатеричного представления без использования
информации о номерах строк и какого-либо специального раскроя колонок. Пробелы
и символы новой строки могут встречаться в любом месте исходных данных.
.TP
.I \-seek смещение
При использовании после ключа
.I \-r
: добавлять указанное
.RI < смещение >
к файловым позициям, обнаруженным в исходных данных.
.TP
.I \-s [\+][\-]seek
Начинает работу с указанного абсолютного (или относительного)
.RI < смещения >
в байтах во входном_файле.
\fI\+ \fRуказывает, что смещение является относительным по отношению
к текущей файловой позиции в потоке стандартного ввода (бессмысленно, если чтение
происходит не из потока стандартного ввода). \fI\- \fRуказывает, что должно быть прочитано
указанное количество символов от конца ввода (либо, если сочетается с \fI \+ \fR:
перед текущей позиции файла в потоке стандартного ввода).
Если ключ \-s не используется, то xxd начинает работу от текущей позиции в файле.
.TP
.I \-u
Использует шестнадцатеричные цифры в верхнем регистре. По умолчанию используются цифры в
нижнем регистре символов.
.TP
.IR \-v " | " \-version
Отображает информацию о версии программы.
.SH ПОДВОДНЫЕ КАМНИ
.PP
.I xxd \-r
обладает встроенным интеллектом для распознавания информации о номерах строк.
Если возможен поиск по входному файлу, то номера строк в начале каждой строки
шестнадцатеричного представления могут быть неупорядоченными, некоторые строки могут
быть пропущены или пересекаться друг с другом. В этих случаях xxd использует
lseek(2) для перехода к следующей позиции. Если поиск по входному файлу
невозможен, то допустимы только пропуски строк, которые заполняются нулевыми
байтами.
.PP
.I xxd \-r
никогда не выводит сообщений об ошибках. Мусор пропускается молча.
.PP
При редактировании шестнадцатеричных представлений бинарных файлов обращайте
внимание, что
.I xxd \-r
пропускает в строке ввода любые данные после прочтения достаточного количества
колонок шестнадцатеричных данных (см. ключ \-c). Это означает, что изменения,
внесенные в колонки с печатными символами ascii (или ebcdic), всегда игнорируются.
При обратном преобразовании шестнадцатеричного представления в стиле
postscript с помощью команды xxd \-r \-p количество колонок не учитывается.
В этом случае распознаются все символы, которые похожи на пары шестнадцатеричных цифр.
.PP
Обратите внимание на различие между командами
.PP
\fI% xxd \-i файл\fR
.PP
и
.PP
\fI% xxd \-i \< файл\fR
.PP
Команда
.I xxd \-s \+seek
может отличаться от
.I xxd \-s seek,
поскольку для того, чтобы "отмотать" данные на входе назад, используется вызов lseek(2).
При использовании `+' поведение будет отличаться, если входные данные
поступают с потока стандартного ввода, а позиция в файле стандартного ввода не находится
в начале файла к тому моменту, когда программа xxd запущена и приступает к чтению ввода.
Нижеследующие примеры помогут прояснить (или ещё больше запутать!) ситуацию...
.PP
Отмотка назад потока стандартного ввода; необходимо, поскольку 'cat' уже выполнила
чтение до конца потока стандартного ввода:
.PP
\fI% sh \-c 'cat > plain_copy; xxd \-s 0 > hex_copy' < file
.PP
Вывод шестнадцатеричного представления от позиции в файле 0x480
(= 1024+128).
Символ `+' означает "относительно текущей позиции", таким образом `128' добавляется
к первому килобайту, где завершает работу dd:
.PP
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file
.PP
Вывод шестнадцатеричного представления от позиции в файле 0x100
(= 1024-768):
.PP
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file
.PP
В то же время, следует заметить, что подобные ситуации встречаются довольно редко,
так что символ `+' обычно не используется. Автор предпочитает наблюдать за работой
xxd с помощью strace(1) или truss(1) в тех случаях, когда применяется ключ
\-s.
.SH ПРИМЕРЫ
.PP
.br
Вывести всё, кроме первых трёх строк (0x30 байтов) файла
.B file
:
.PP
\fI% xxd \-s 0x30 file
.PP
.br
Вывести три строки (0x30 байтов) от конца файла
.B file
:
.PP
\fI% xxd \-s \-0x30 file
.PP
.br
Вывести 120 байтов в виде непрерывного шестнадцатеричного представления
по 40 октетов в строке:
.PP
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e544820585844203120224d616e75616c207061
.br
676520666f7220787864220a2e5c220a2e5c2220
.br
32317374204d617920313939360a2e5c22204d61
.br
6e207061676520617574686f723a0a2e5c222020
.br
2020546f6e79204e7567656e74203c746f6e7940
.br
7363746e7567656e2e7070702e67752e6564752e
.br
.PP
.br
Вывести первые 120 байтов этой страницы справочника по 12 октетов в строке:
.PP
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
.br
000000c: 616e 7561 6c20 7061 6765 2066 anual page f
.br
0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\".
.br
0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May
.br
0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma
.br
000003c: 6e20 7061 6765 2061 7574 686f n page autho
.br
0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To
.br
0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
.br
0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
.br
000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
.PP
.br
Показать дату из файла xxd.1:
.PP
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
.br
0000028: 3231 7374 204d 6179 2031 3939 21st May 199
.PP
.br
Скопировать
.B входной_файл
в
.B выходной_файл
с добавлением 100 байтов со значением 0x00 в начало файла:
.PP
\fI% xxd входной_файл | xxd \-r \-s 100 \> выходной_файл\fR
.br
.PP
.br
Заменить дату в файле xxd.1:
.PP
\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR
.br
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
.br
0000028: 3235 7468 204d 6179 2031 3939 25th May 199
.PP
.br
Создать 65537-байтный файл, все байты которого имеют значение
0x00, кроме последнего байта, который должен иметь значение 'A'
(0x41):
.PP
\fI% echo '010000: 41' | xxd \-r \> file\fR
.PP
.br
Создать шестнадцатеричное представление этого файла с
использованием автоматического пропуска:
.PP
\fI% xxd \-a \-c 12 file\fR
.br
0000000: 0000 0000 0000 0000 0000 0000 ............
.br
*
.br
000fffc: 0000 0000 40 ....A
.PP
Создать 1-байтный файл, содержащий символ 'A'.
Число после '\-r \-s' добавляется к номерам строк, найденным в файле;
иначе говоря, предшествующие байты пропускаются:
.PP
\fI% echo '010000: 41' | xxd \-r \-s \-0x10000 \> file\fR
.PP
xxd можно использовать в качестве фильтра в редакторе, например в
.B vim(1),
чтобы создать шестнадцатеричное представление области между
отметками `a' и `z':
.PP
\fI:'a,'z!xxd\fR
.PP
Вы можете использовать xxd в качестве фильтра в редакторе, например в
.B vim(1),
для восстановления данных из шестнадцатеричного представления
между отметками `a' и `z':
.PP
\fI:'a,'z!xxd \-r\fR
.PP
Вы можете использовать xxd в качестве фильтра в редакторе, например в
.B vim(1),
для восстановления данных из единственной строки
шестнадцатеричного представления. Поместите курсор в соответствующую строку
и наберите
.PP
\fI!!xxd \-r\fR
.PP
Чтобы прочитать единственный символ из канала связи:
.PP
\fI% xxd \-c1 < /dev/term/b &\fR
.br
\fI% stty < /dev/term/b \-echo \-opost \-isig \-icanon min 1\fR
.br
\fI% echo \-n foo > /dev/term/b\fR
.PP
.SH ВОЗВРАЩАЕМЫЕ ЗНАЧЕНИЯ
Программа xxd завершает работу со следующими значениями:
.TP
0
Ошибки не обнаружены.
.TP
\-1
Операция не поддерживается (выполнение
.I xxd \-r \-i
пока невозможно).
.TP
1
Ошибка при разборе ключей командной строки.
.TP
2
Проблемы во входном файле.
.TP
3
Проблемы в выходном файле.
.TP
4,5
Желательная позиция поиска недостижима.
.SH СМОТРИ ТАКЖЕ
uuencode(1), uudecode(1), patch(1)
.br
.SH ПРЕДУПРЕЖДЕНИЕ
Странность этой программы соответствует особенностям мозга её создателя.
Используйте её на свой страх и риск. Копируйте файлы, отслеживайте
вызовы, становитесь волшебником.
.br
.SH ВЕРСИЯ
Эта страница справочника документирует xxd версии 1.7.
.SH АВТОР
.br
(c) 1990-1997 Юрген Вайгерт (Juergen Weigert)
.br
<jnweiger@informatik.uni-erlangen.de>
.LP
Вы можете свободно распространять программу со ссылкой на меня.
.br
Если использование этой программы принесло вам какой-то доход,
поделитесь со мной.
.br
Если вы потеряли деньги, то я тут не причём.
.PP
Первый вариант страницы справочника написан Тони Наджентом (Tony Nugent)
.br
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
.br
Небольшие изменения внесены Брамом Мооленааром (Bram Moolenaar).
Страница отредактирована Юргеном Вайгертом (Juergen Weigert).
.PP

View File

@@ -21,9 +21,9 @@
creates a hex dump of a given file or standard input.
It can also convert a hex dump back to its original binary form.
Like
.BR uuencode(1)
.BR uuencode (1)
and
.BR uudecode(1)
.BR uudecode (1)
it allows the transmission of binary data in a `mail-safe' ASCII representation,
but has the advantage of decoding to standard output.
Moreover, it can be used to perform binary file patching.
@@ -62,12 +62,11 @@ toggle autoskip: A single '*' replaces nul-lines. Default off.
.IR \-b " | " \-bits
Switch to bits (binary digits) dump, rather than hexdump.
This option writes octets as eight digits "1"s and "0"s instead of a normal
hexacecimal dump. Each line is preceded by a line number in hexadecimal and
hexadecimal dump. Each line is preceded by a line number in hexadecimal and
followed by an ascii (or ebcdic) representation. The command line switches
\-r, \-p, \-i do not work with this mode.
.TP
.IR "\-c cols " | " \-cols cols"
.IR "\-c cols " | " \-cols cols"
format
.RI < cols >
octets per line. Default 16 (\-i: 12, \-ps: 30, \-b: 6). Max 256.
@@ -78,7 +77,7 @@ This does not change the hexadecimal representation. The option is
meaningless in combinations with \-r, \-p or \-i.
.TP
.IR "\-g bytes " | " \-groupsize bytes"
seperate the output of every
separate the output of every
.RI < bytes >
bytes (two hex characters or eight bit-digits each) by a whitespace.
Specify
@@ -115,19 +114,19 @@ anywhere.
.TP
.I \-seek offset
When used after
.I \-r
: revert with
.IR \-r :
revert with
.RI < offset >
added to file positions found in hexdump.
.TP
.I \-s [\+][\-]seek
.I \-s [+][\-]seek
start at
.RI < seek >
bytes abs. (or rel.) infile offset.
\fI\+ \fRindicates that the seek is relative to the current stdin file position
\fI+ fRindicates that the seek is relative to the current stdin file position
(meaningless when not reading from stdin). \fI\- \fRindicates that the seek
should be that many characters from the end of the input (or if combined with
\fI \+ \fR: before the current stdin file position).
\fI+\fR: before the current stdin file position).
Without \-s option, xxd starts at the current file position.
.TP
.I \-u
@@ -139,7 +138,7 @@ show version string.
.PP
.I xxd \-r
has some builtin magic while evaluating line number information.
If the ouput file is seekable, then the linenumbers at the start of each
If the output file is seekable, then the linenumbers at the start of each
hexdump line may be out of order, lines may be missing, or overlapping. In
these cases xxd will lseek(2) to the next position. If the output file is not
seekable, only gaps are allowed, which will be filled by null-bytes.
@@ -152,7 +151,7 @@ When editing hexdumps, please note that
skips everything on the input line after reading enough columns of hexadecimal
data (see option \-c). This also means, that changes to the printable ascii (or
ebcdic) columns are always ignored. Reverting a plain (or postscript) style
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here an thing that looks like a pair of hex-digits is interpreted.
hexdump with xxd \-r \-p does not depend on the correct number of columns. Here anything that looks like a pair of hex-digits is interpreted.
.PP
Note the difference between
.br
@@ -160,12 +159,12 @@ Note the difference between
.br
and
.br
\fI% xxd \-i \< file\fR
\fI% xxd \-i < file\fR
.PP
.I xxd \-s \+seek
may be different from
.I xxd \-s seek
, as lseek(2) is used to "rewind" input. A '+'
.IR "xxd \-s seek" ,
as lseek(2) is used to "rewind" input. A '+'
makes a difference if the input source is stdin, and if stdin's file position
is not at the start of the file by the time xxd is started and given its input.
The following examples may help to clarify (or further confuse!)...
@@ -181,12 +180,12 @@ the 1k where dd left off.
.br
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +128 > hex_snippet' < file
.PP
Hexdump from file position 0x100 ( = 1024-768) on.
Hexdump from file position 0x100 ( = 1024\-768) on.
.br
\fI% sh \-c 'dd of=plain_snippet bs=1k count=1; xxd \-s +-768 > hex_snippet' < file
.PP
However, this is a rare situation and the use of `+' is rarely needed.
the author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
The author prefers to monitor the effect of xxd with strace(1) or truss(1), whenever \-s is used.
.SH EXAMPLES
.PP
.br
@@ -208,17 +207,17 @@ Print 120 bytes as continuous hexdump with 40 octets per line.
.br
\fI% xxd \-l 120 \-ps \-c 20 xxd.1\fR
.br
2e544820585844203120224d616e75616c207061
2e54482058584420312022417567757374203139
.br
676520666f7220787864220a2e5c220a2e5c2220
39362220224d616e75616c207061676520666f72
.br
32317374204d617920313939360a2e5c22204d61
20787864220a2e5c220a2e5c222032317374204d
.br
6e207061676520617574686f723a0a2e5c222020
617920313939360a2e5c22204d616e2070616765
.br
2020546f6e79204e7567656e74203c746f6e7940
20617574686f723a0a2e5c2220202020546f6e79
.br
7363746e7567656e2e7070702e67752e6564752e
204e7567656e74203c746f6e79407363746e7567
.br
.br
@@ -226,32 +225,32 @@ Hexdump the first 120 bytes of this man page with 12 octets per line.
.br
\fI% xxd \-l 120 \-c 12 xxd.1\fR
.br
0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
.br
000000c: 616e 7561 6c20 7061 6765 2066 anual page f
000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
.br
0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\\".
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
.br
0000024: 2e5c 2220 3231 7374 204d 6179 .\\" 21st May
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\\
.br
0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\\" Ma
0000030: 220a 2e5c 2220 3231 7374 204d "..\\" 21st M
.br
000003c: 6e20 7061 6765 2061 7574 686f n page autho
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\\"
.br
0000048: 723a 0a2e 5c22 2020 2020 546f r:..\\" To
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
.br
0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\\"
.br
0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
.br
000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
.PP
.br
Display just the date from the file xxd.1
.br
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
0000028: 3231 7374 204d 6179 2031 3939 21st May 199
0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
.PP
.br
Copy
@@ -266,11 +265,11 @@ and prepend 100 bytes of value 0x00.
.br
Patch the date in the file xxd.1
.br
\fI% echo '0000029: 3574 68' | xxd \-r \- xxd.1\fR
\fI% echo '0000037: 3574 68' | xxd \-r \- xxd.1\fR
.br
\fI% xxd \-s 0x28 \-l 12 \-c 12 xxd.1\fR
\fI% xxd \-s 0x36 \-l 13 \-c 13 xxd.1\fR
.br
0000028: 3235 7468 204d 6179 2031 3939 25th May 199
0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
.PP
.br
Create a 65537 byte file with all bytes 0x00,

View File

@@ -1,9 +1,7 @@
XXD(1) XXD(1)
XXD(1) XXD(1)
NAME
xxd - make a hexdump or do the reverse.
@@ -13,239 +11,184 @@ SYNOPSIS
xxd -r[evert] [options] [infile [outfile]]
DESCRIPTION
xxd creates a hex dump of a given file or standard input.
It can also convert a hex dump back to its original binary
form. Like uuencode(1) and uudecode(1) it allows the
transmission of binary data in a `mail-safe' ASCII repre-
sentation, but has the advantage of decoding to standard
output. Moreover, it can be used to perform binary file
patching.
xxd creates a hex dump of a given file or standard input. It can also
convert a hex dump back to its original binary form. Like uuencode(1)
and uudecode(1) it allows the transmission of binary data in a `mail-
safe' ASCII representation, but has the advantage of decoding to stan-
dard output. Moreover, it can be used to perform binary file patching.
OPTIONS
If no infile is given, standard input is read. If infile
is specified as a `-' character, then input is taken from
standard input. If no outfile is given (or a `-' charac-
ter is in its place), results are sent to standard output.
If no infile is given, standard input is read. If infile is specified
as a `-' character, then input is taken from standard input. If no
outfile is given (or a `-' character is in its place), results are sent
to standard output.
Note that a "lazy" parser is used which does not check for
more than the first option letter, unless the option is
followed by a parameter. Spaces between a single option
letter and its parameter are optional. Parameters to
options can be specified in decimal, hexadecimal or octal
notation. Thus -c8, -c 8, -c 010 and -cols 8 are all
equivalent.
Note that a "lazy" parser is used which does not check for more than
the first option letter, unless the option is followed by a parameter.
Spaces between a single option letter and its parameter are optional.
Parameters to options can be specified in decimal, hexadecimal or octal
notation. Thus -c8, -c 8, -c 010 and -cols 8 are all equivalent.
-a | -autoskip
toggle autoskip: A single '*' replaces nul-lines.
Default off.
toggle autoskip: A single '*' replaces nul-lines. Default off.
-b | -bits
Switch to bits (binary digits) dump, rather than
hexdump. This option writes octets as eight digits
"1"s and "0"s instead of a normal hexacecimal dump.
Each line is preceded by a line number in hexadeci-
mal and followed by an ascii (or ebcdic) represen-
tation. The command line switches -r, -p, -i do not
work with this mode.
Switch to bits (binary digits) dump, rather than hexdump. This
option writes octets as eight digits "1"s and "0"s instead of a
normal hexadecimal dump. Each line is preceded by a line number
in hexadecimal and followed by an ascii (or ebcdic) representa-
tion. The command line switches -r, -p, -i do not work with this
mode.
-c cols | -cols cols
-c cols | -cols cols format <cols> octets per line.
Default 16 (-i: 12, -ps: 30, -b: 6). Max 256.
format <cols> octets per line. Default 16 (-i: 12, -ps: 30, -b:
6). Max 256.
-E | -EBCDIC
Change the character encoding in the righthand col-
umn from ASCII to EBCDIC. This does not change the
hexadecimal representation. The option is meaning-
less in combinations with -r, -p or -i.
Manual page for xxd August 1996 1
XXD(1) XXD(1)
Change the character encoding in the righthand column from ASCII
to EBCDIC. This does not change the hexadecimal representation.
The option is meaningless in combinations with -r, -p or -i.
-g bytes | -groupsize bytes
seperate the output of every <bytes> bytes (two hex
characters or eight bit-digits each) by a whites-
pace. Specify -g 0 to suppress grouping. <Bytes>
defaults to 2 in normal mode and 1 in bits mode.
Grouping does not apply to postscript or include
separate the output of every <bytes> bytes (two hex characters
or eight bit-digits each) by a whitespace. Specify -g 0 to sup-
press grouping. <Bytes> defaults to 2 in normal mode and 1 in
bits mode. Grouping does not apply to postscript or include
style.
-h | -help
print a summary of available commands and exit. No
hex dumping is performed.
print a summary of available commands and exit. No hex dumping
is performed.
-i | -include
output in C include file style. A complete static
array definition is written (named after the input
file), unless xxd reads from stdin.
output in C include file style. A complete static array defini-
tion is written (named after the input file), unless xxd reads
from stdin.
-l len | -len len
stop after writing <len> octets.
-p | -ps | -postscript | -plain
output in postscript continuous hexdump style. Also
known as plain hexdump style.
output in postscript continuous hexdump style. Also known as
plain hexdump style.
-r | -revert
reverse operation: convert (or patch) hexdump into
binary. If not writing to stdout, xxd writes into
its output file without truncating it. Use the com-
bination -r -p to read plain hexadecimal dumps
without line number information and without a par-
ticular column layout. Additional Whitespace and
line-breaks are allowed anywhere.
reverse operation: convert (or patch) hexdump into binary. If
not writing to stdout, xxd writes into its output file without
truncating it. Use the combination -r -p to read plain hexadeci-
mal dumps without line number information and without a particu-
lar column layout. Additional Whitespace and line-breaks are
allowed anywhere.
-seek offset
When used after -r : revert with <offset> added to
file positions found in hexdump.
When used after -r: revert with <offset> added to file positions
found in hexdump.
-s [+][-]seek
start at <seek> bytes abs. (or rel.) infile offset.
+ indicates that the seek is relative to the cur-
rent stdin file position (meaningless when not
reading from stdin). - indicates that the seek
should be that many characters from the end of the
input (or if combined with
+ : before the current stdin file position).
Without -s option, xxd starts at the current file
start at <seek> bytes abs. (or rel.) infile offset. + fRindi-
cates that the seek is relative to the current stdin file posi-
tion (meaningless when not reading from stdin). - indicates
that the seek should be that many characters from the end of the
input (or if combined with +: before the current stdin file
position). Without -s option, xxd starts at the current file
position.
-u use upper case hex letters. Default is lower case.
-u use upper case hex letters. Default is lower case.
-v | -version
show version string.
Manual page for xxd August 1996 2
XXD(1) XXD(1)
CAVEATS
xxd -r has some builtin magic while evaluating line number
information. If the ouput file is seekable, then the
linenumbers at the start of each hexdump line may be out
of order, lines may be missing, or overlapping. In these
cases xxd will lseek(2) to the next position. If the out-
put file is not seekable, only gaps are allowed, which
will be filled by null-bytes.
xxd -r has some builtin magic while evaluating line number information.
If the output file is seekable, then the linenumbers at the start of
each hexdump line may be out of order, lines may be missing, or over-
lapping. In these cases xxd will lseek(2) to the next position. If the
output file is not seekable, only gaps are allowed, which will be
filled by null-bytes.
xxd -r never generates parse errors. Garbage is silently
skipped.
xxd -r never generates parse errors. Garbage is silently skipped.
When editing hexdumps, please note that xxd -r skips
everything on the input line after reading enough columns
of hexadecimal data (see option -c). This also means, that
changes to the printable ascii (or ebcdic) columns are
always ignored. Reverting a plain (or postscript) style
hexdump with xxd -r -p does not depend on the correct num-
ber of columns. Here an thing that looks like a pair of
hex-digits is interpreted.
When editing hexdumps, please note that xxd -r skips everything on the
input line after reading enough columns of hexadecimal data (see option
-c). This also means, that changes to the printable ascii (or ebcdic)
columns are always ignored. Reverting a plain (or postscript) style
hexdump with xxd -r -p does not depend on the correct number of col-
umns. Here anything that looks like a pair of hex-digits is inter-
preted.
Note the difference between
% xxd -i file
and
% xxd -i < file
xxd -s +seek may be different from xxd -s seek , as
lseek(2) is used to "rewind" input. A '+' makes a differ-
ence if the input source is stdin, and if stdin's file
position is not at the start of the file by the time xxd
is started and given its input. The following examples
may help to clarify (or further confuse!)...
xxd -s +seek may be different from xxd -s seek, as lseek(2) is used to
"rewind" input. A '+' makes a difference if the input source is stdin,
and if stdin's file position is not at the start of the file by the
time xxd is started and given its input. The following examples may
help to clarify (or further confuse!)...
Rewind stdin before reading; needed because the `cat' has
already read to the end of stdin.
Rewind stdin before reading; needed because the `cat' has already read
to the end of stdin.
% sh -c 'cat > plain_copy; xxd -s 0 > hex_copy' < file
Hexdump from file position 0x480 (=1024+128) onwards. The
`+' sign means "relative to the current position", thus
the `128' adds to the 1k where dd left off.
% sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +128 >
hex_snippet' < file
Hexdump from file position 0x480 (=1024+128) onwards. The `+' sign
means "relative to the current position", thus the `128' adds to the 1k
where dd left off.
% sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +128 > hex_snippet'
< file
Hexdump from file position 0x100 ( = 1024-768) on.
% sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +-768 >
hex_snippet' < file
% sh -c 'dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet'
< file
However, this is a rare situation and the use of `+' is
rarely needed. the author prefers to monitor the effect
of xxd with strace(1) or truss(1), whenever -s is used.
However, this is a rare situation and the use of `+' is rarely needed.
The author prefers to monitor the effect of xxd with strace(1) or
truss(1), whenever -s is used.
EXAMPLES
Print everything but the first three lines (hex 0x30
bytes) of file
Manual page for xxd August 1996 3
XXD(1) XXD(1)
Print everything but the first three lines (hex 0x30 bytes) of file
% xxd -s 0x30 file
Print 3 lines (hex 0x30 bytes) from the end of file
% xxd -s -0x30 file
Print 120 bytes as continuous hexdump with 40 octets per
line.
Print 120 bytes as continuous hexdump with 40 octets per line.
% xxd -l 120 -ps -c 20 xxd.1
2e544820585844203120224d616e75616c207061
676520666f7220787864220a2e5c220a2e5c2220
32317374204d617920313939360a2e5c22204d61
6e207061676520617574686f723a0a2e5c222020
2020546f6e79204e7567656e74203c746f6e7940
7363746e7567656e2e7070702e67752e6564752e
2e54482058584420312022417567757374203139
39362220224d616e75616c207061676520666f72
20787864220a2e5c220a2e5c222032317374204d
617920313939360a2e5c22204d616e2070616765
20617574686f723a0a2e5c2220202020546f6e79
204e7567656e74203c746f6e79407363746e7567
Hexdump the first 120 bytes of this man page with 12
octets per line.
Hexdump the first 120 bytes of this man page with 12 octets per line.
% xxd -l 120 -c 12 xxd.1
0000000: 2e54 4820 5858 4420 3120 224d .TH XXD 1 "M
000000c: 616e 7561 6c20 7061 6765 2066 anual page f
0000018: 6f72 2078 7864 220a 2e5c 220a or xxd"..\".
0000024: 2e5c 2220 3231 7374 204d 6179 .\" 21st May
0000030: 2031 3939 360a 2e5c 2220 4d61 1996..\" Ma
000003c: 6e20 7061 6765 2061 7574 686f n page autho
0000048: 723a 0a2e 5c22 2020 2020 546f r:..\" To
0000054: 6e79 204e 7567 656e 7420 3c74 ny Nugent <t
0000060: 6f6e 7940 7363 746e 7567 656e ony@sctnugen
000006c: 2e70 7070 2e67 752e 6564 752e .ppp.gu.edu.
0000000: 2e54 4820 5858 4420 3120 2241 .TH XXD 1 "A
000000c: 7567 7573 7420 3139 3936 2220 ugust 1996"
0000018: 224d 616e 7561 6c20 7061 6765 "Manual page
0000024: 2066 6f72 2078 7864 220a 2e5c for xxd"..\
0000030: 220a 2e5c 2220 3231 7374 204d "..\" 21st M
000003c: 6179 2031 3939 360a 2e5c 2220 ay 1996..\"
0000048: 4d61 6e20 7061 6765 2061 7574 Man page aut
0000054: 686f 723a 0a2e 5c22 2020 2020 hor:..\"
0000060: 546f 6e79 204e 7567 656e 7420 Tony Nugent
000006c: 3c74 6f6e 7940 7363 746e 7567 <tony@sctnug
Display just the date from the file xxd.1
% xxd -s 0x28 -l 12 -c 12 xxd.1
0000028: 3231 7374 204d 6179 2031 3939 21st May 199
% xxd -s 0x36 -l 13 -c 13 xxd.1
0000036: 3231 7374 204d 6179 2031 3939 36 21st May 1996
Copy input_file to output_file and prepend 100 bytes of
value 0x00.
Copy input_file to output_file and prepend 100 bytes of value 0x00.
% xxd input_file | xxd -r -s 100 > output_file
Patch the date in the file xxd.1
% echo '0000029: 3574 68' | xxd -r - xxd.1
% xxd -s 0x28 -l 12 -c 12 xxd.1
0000028: 3235 7468 204d 6179 2031 3939 25th May 199
% echo '0000037: 3574 68' | xxd -r - xxd.1
% xxd -s 0x36 -l 13 -c 13 xxd.1
0000036: 3235 7468 204d 6179 2031 3939 36 25th May 1996
Create a 65537 byte file with all bytes 0x00, except for
the last one which is 'A' (hex 0x41).
Create a 65537 byte file with all bytes 0x00, except for the last one
which is 'A' (hex 0x41).
% echo '010000: 41' | xxd -r > file
Hexdump this file with autoskip.
@@ -254,34 +197,21 @@ XXD(1) XXD(1)
*
000fffc: 0000 0000 40 ....A
Create a 1 byte file containing a single 'A' character.
The number after '-r -s' adds to the linenumbers found in
Manual page for xxd August 1996 4
XXD(1) XXD(1)
the file; in effect, the leading bytes are suppressed.
Create a 1 byte file containing a single 'A' character. The number
after '-r -s' adds to the linenumbers found in the file; in effect, the
leading bytes are suppressed.
% echo '010000: 41' | xxd -r -s -0x10000 > file
Use xxd as a filter within an editor such as vim(1) to
hexdump a region marked between `a' and `z'.
Use xxd as a filter within an editor such as vim(1) to hexdump a region
marked between `a' and `z'.
:'a,'z!xxd
Use xxd as a filter within an editor such as vim(1) to
recover a binary hexdump marked between `a' and `z'.
Use xxd as a filter within an editor such as vim(1) to recover a binary
hexdump marked between `a' and `z'.
:'a,'z!xxd -r
Use xxd as a filter within an editor such as vim(1) to
recover one line of a hexdump. Move the cursor over the
line and type:
Use xxd as a filter within an editor such as vim(1) to recover one line
of a hexdump. Move the cursor over the line and type:
!!xxd -r
Read single characters from a serial line
@@ -295,8 +225,7 @@ RETURN VALUES
0 no errors encountered.
-1 operation not supported ( xxd -r -i still impossi-
ble).
-1 operation not supported ( xxd -r -i still impossible).
1 error while parsing options.
@@ -310,9 +239,8 @@ SEE ALSO
uuencode(1), uudecode(1), patch(1)
WARNINGS
The tools weirdness matches its creators brain. Use
entirely at your own risk. Copy files. Trace it. Become a
wizard.
The tools weirdness matches its creators brain. Use entirely at your
own risk. Copy files. Trace it. Become a wizard.
VERSION
This manual page documents xxd version 1.7
@@ -322,75 +250,14 @@ AUTHOR
<jnweiger@informatik.uni-erlangen.de>
Distribute freely and credit me,
Manual page for xxd August 1996 5
XXD(1) XXD(1)
make money and share with me,
lose money and don't ask me.
Manual page started by Tony Nugent
<tony@sctnugen.ppp.gu.edu.au> <T.Nugent@sct.gu.edu.au>
Small changes by Bram Moolenaar. Edited by Juergen
Weigert.
Small changes by Bram Moolenaar. Edited by Juergen Weigert.
Manual page for xxd August 1996 6
Manual page for xxd August 1996 XXD(1)

View File

@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2004 Oct 02
" Last Change: 2005 Mar 20
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -37,10 +37,18 @@ if !exists("g:ft_ignore_pat")
let g:ft_ignore_pat = '\.\(Z\|gz\|bz2\|zip\|tgz\)$'
endif
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call FTCheck_inp()
" Function used for patterns that end in a star: don't set the filetype if the
" file name matches ft_ignore_pat.
fun! s:StarSetf(ft)
if expand("<amatch>") !~ g:ft_ignore_pat
exe 'setf ' . a:ft
endif
endfun
fun! FTCheck_inp()
" Abaqus or Trasys
au BufNewFile,BufRead *.inp call s:Check_inp()
fun! s:Check_inp()
if getline(1) =~ '^\*'
setf abaqus
else
@@ -88,10 +96,11 @@ au BufNewFile,BufRead *.run setf ampl
au BufNewFile,BufRead build.xml setf ant
" Apache style config file
au BufNewFile,BufRead proftpd.conf* setf apachestyle
au BufNewFile,BufRead proftpd.conf* call s:StarSetf('apachestyle')
" Apache config file
au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,.htaccess,apache.conf* setf apache
au BufNewFile,BufRead .htaccess setf apache
au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,apache.conf*,apache2.conf*,/etc/apache2/*.conf* call s:StarSetf('apache')
" XA65 MOS6510 cross assembler
au BufNewFile,BufRead *.a65 setf a65
@@ -138,18 +147,18 @@ au BufNewFile,BufRead /boot/grub/menu.lst,/boot/grub/grub.conf setf grub
" Assembly (all kinds)
" *.lst is not pure assembly, it has two extra columns (address, byte codes)
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call <SID>FTasm()
au BufNewFile,BufRead *.asm,*.[sS],*.[aA],*.mac,*.lst call s:FTasm()
" This function checks for the kind of assembly that is wanted by the user, or
" can be detected from the first five lines of the file.
fun! <SID>FTasm()
fun! s:FTasm()
" make sure b:asmsyntax exists
if !exists("b:asmsyntax")
let b:asmsyntax = ""
endif
if b:asmsyntax == ""
call FTCheck_asmsyntax()
call s:FTasmsyntax()
endif
" if b:asmsyntax still isn't set, default to asmsyntax or GNU
@@ -164,7 +173,7 @@ fun! <SID>FTasm()
exe "setf " . b:asmsyntax
endfun
fun! FTCheck_asmsyntax()
fun! s:FTasmsyntax()
" see if file contains any asmsyntax=foo overrides. If so, change
" b:asmsyntax appropriately
let head = " ".getline(1)." ".getline(2)." ".getline(3)." ".getline(4).
@@ -195,11 +204,11 @@ au BufNewFile,BufRead *.awk setf awk
au BufNewFile,BufRead *.mch,*.ref,*.imp setf b
" BASIC or Visual Basic
au BufNewFile,BufRead *.bas call <SID>FTVB("basic")
au BufNewFile,BufRead *.bas call s:FTVB("basic")
" Check if one of the first five lines contains "VB_Name". In that case it is
" probably a Visual Basic file. Otherwise it's assumed to be "alt" filetype.
fun! <SID>FTVB(alt)
fun! s:FTVB(alt)
if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)'
setf vb
else
@@ -217,8 +226,8 @@ au BufNewFile,BufRead *.cmd
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
" Batch file for 4DOS
au BufNewFile,BufRead *.btm call <SID>FTbtm()
fun! <SID>FTbtm()
au BufNewFile,BufRead *.btm call s:FTbtm()
fun! s:FTbtm()
if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm
setf dosbatch
else
@@ -236,7 +245,7 @@ au BufNewFile,BufRead *.bdf setf bdf
au BufNewFile,BufRead *.bib setf bib
" BIND configuration
au BufNewFile,BufRead named.conf setf named
au BufNewFile,BufRead named.conf,rndc.conf setf named
" BIND zone
au BufNewFile,BufRead named.root setf bindzone
@@ -245,9 +254,9 @@ au BufNewFile,BufRead named.root setf bindzone
au BufNewFile,BufRead *.bl setf blank
" C or lpc
au BufNewFile,BufRead *.c call <SID>FTlpc()
au BufNewFile,BufRead *.c call s:FTlpc()
fun! <SID>FTlpc()
fun! s:FTlpc()
if exists("g:lpc_syntax_for_c")
let lnum = 1
while lnum <= 12
@@ -262,9 +271,10 @@ fun! <SID>FTlpc()
endfun
" Calendar
au BufNewFile,BufRead calendar,*/.calendar/*,
au BufNewFile,BufRead calendar setf calendar
au BufNewFile,BufRead */.calendar/*,
\*/share/calendar/*/calendar.*,*/share/calendar/calendar.*
\ setf calendar
\ call s:StarSetf('calendar')
" C#
au BufNewFile,BufRead *.cs setf cs
@@ -320,14 +330,14 @@ au BufNewFile,BufRead [cC]hange[lL]og if getline(1) =~ '; urgency='
au BufNewFile,BufRead *..ch setf chill
" Changes for WEB and CWEB or CHILL
au BufNewFile,BufRead *.ch call <SID>FTchange()
au BufNewFile,BufRead *.ch call s:FTchange()
" This function checks if one of the first ten lines start with a '@'. In
" that case it is probably a change file.
" If the first line starts with # or ! it's probably a ch file.
" If a line has "main", "include", "//" ir "/*" it's probably ch.
" Otherwise CHILL is assumed.
fun! <SID>FTchange()
fun! s:FTchange()
let lnum = 1
while lnum <= 10
if getline(lnum)[0] == '@'
@@ -358,9 +368,9 @@ au BufNewFile,BufRead *.dcl,*.icl setf clean
au BufNewFile,BufRead *.eni setf cl
" Clever or dtd
au BufNewFile,BufRead *.ent call <SID>FTent()
au BufNewFile,BufRead *.ent call s:FTent()
fun! <SID>FTent()
fun! s:FTent()
" This function checks for valid cl syntax in the first five lines.
" Look for either an opening comment, '#', or a block start, '{".
" If not found, assume SGML.
@@ -489,12 +499,12 @@ au BufNewFile,BufRead *.ed\(f\|if\|n\|o\) setf edif
au BufNewFile,BufRead *.ecd setf ecd
" Eiffel or Specman
au BufNewFile,BufRead *.e,*.E call FTCheck_e()
au BufNewFile,BufRead *.e,*.E call s:FTe()
" Elinks configuration
au BufNewFile,BufRead */etc/elinks.conf,*/.elinks/elinks.conf setf elinks
fun! FTCheck_e()
fun! s:FTe()
let n = 1
while n < 100 && n < line("$")
if getline(n) =~ "^\\s*\\(<'\\|'>\\)\\s*$"
@@ -512,6 +522,9 @@ au BufNewFile,BufRead *.erl setf erlang
" Elm Filter Rules file
au BufNewFile,BufRead filter-rules setf elmfilt
" ESMTP rc file
au BufNewFile,BufRead *esmtprc setf esmtprc
" ESQL-C
au BufNewFile,BufRead *.ec,*.EC setf esqlc
@@ -541,7 +554,7 @@ au BufNewFile,BufRead *.mas,*.master setf master
au BufNewFile,BufRead *.fs,*.ft setf forth
" Fortran
au BufNewFile,BufRead *.f,*.F,*.for,*.fpp,*.ftn,*.f77,*.F77,*.f90,*.F90,*.f95,*.F95 setf fortran
au BufNewFile,BufRead *.f,*.F,*.for,*.fpp,*.FPP*.ftn,*.f77,*.F77,*.f90,*.F90,*.f95,*.F95 setf fortran
" FStab
au BufNewFile,BufRead fstab setf fstab
@@ -595,11 +608,11 @@ au BufNewFile,BufRead *.hex,*.h32 setf hex
" Tilde (must be before HTML)
au BufNewFile,BufRead *.t.html setf tilde
" HTML (.shtml and .stm for server side)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.stm call <SID>FTCheck_html()
" HTML (.shtml and .stm for server side, .rhtml for Ruby html)
au BufNewFile,BufRead *.html,*.htm,*.shtml,*.rhtml,*.stm call s:FThtml()
" Distinguish between HTML and XHTML
fun! <SID>FTCheck_html()
fun! s:FThtml()
let n = 1
while n < 10 && n < line("$")
if getline(n) =~ '\<DTD\s\+XHTML\s'
@@ -625,10 +638,10 @@ au BufNewFile,BufRead *.hb setf hb
au BufNewFile,BufRead *.icn setf icon
" IDL (Interface Description Language)
au BufNewFile,BufRead *.idl call <SID>FTCheck_idl()
au BufNewFile,BufRead *.idl call s:FTidl()
" Distinguish between standard IDL and MS-IDL
fun! <SID>FTCheck_idl()
fun! s:FTidl()
let n = 1
while n < 50 && n < line("$")
if getline(n) =~ '^\s*import\s\+"\(unknwn\|objidl\)\.idl"'
@@ -647,15 +660,18 @@ au BufNewFile,BufRead *.odl,*.mof setf msidl
" Icewm menu
au BufNewFile,BufRead */.icewm/menu setf icemenu
" Inform
au BufNewFile,BufRead .indent.pro setf indent
" IDL (Interactive Data Language)
au BufNewFile,BufRead *.pro setf idlang
" Inform
au BufNewFile,BufRead .indent.pro setf indent
" Inform
au BufNewFile,BufRead *.inf,*.INF setf inform
" Ipfilter
au BufNewFile,BufRead ipf.conf,ipf.rules setf ipfilter
" Informix 4GL (source - canonical, include file, I4GL+M4 preproc.)
au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl setf fgl
@@ -687,7 +703,8 @@ au BufNewFile,BufRead *.js,*.javascript setf javascript
au BufNewFile,BufRead *.jsp setf jsp
" Java Properties resource file (note: doesn't catch font.properties.pl)
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_??,*.properties_??_??_* setf jproperties
au BufNewFile,BufRead *.properties,*.properties_??,*.properties_??_?? setf jproperties
au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')
" Jess
au BufNewFile,BufRead *.clp setf jess
@@ -729,7 +746,7 @@ au BufNewFile,BufRead lftp.conf,.lftprc,*lftp/rc setf lftp
au BufNewFile,BufRead *.ll setf lifelines
" Lilo: Linux loader
au BufNewFile,BufRead lilo.conf* setf lilo
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
" Lisp (*.el = ELisp, *.cl = Common Lisp, *.jl = librep Lisp)
if has("fname_case")
@@ -785,9 +802,9 @@ au BufNewFile,BufRead *.mv,*.mpl,*.mws setf maple
au BufNewFile,BufRead *.mason,*.mhtml setf mason
" Matlab or Objective C
au BufNewFile,BufRead *.m call FTCheck_m()
au BufNewFile,BufRead *.m call s:FTm()
fun! FTCheck_m()
fun! s:FTm()
let n = 1
while n < 10
let line = getline(n)
@@ -818,9 +835,9 @@ au BufNewFile,BufRead *.mf setf mf
au BufNewFile,BufRead *.mp setf mp
" MMIX or VMS makefile
au BufNewFile,BufRead *.mms call FTCheck_mms()
au BufNewFile,BufRead *.mms call s:FTmms()
fun! FTCheck_mms()
fun! s:FTmms()
let n = 1
while n < 10
let line = getline(n)
@@ -861,7 +878,9 @@ au BufNewFile,BufRead *.moo setf moo
" Modconf
au BufNewFile,BufRead /etc/modules.conf,/etc/conf.modules setf modconf
au BufNewFile,BufRead /etc/modutils/*
\ if executable(expand("<afile>")) != 1 | setf modconf | endif
\ if executable(expand("<afile>")) != 1
\| call s:StarSetf('modconf')
\|endif
" Mplayer config
au BufNewFile,BufRead mplayer.conf,*/.mplayer/config setf mplayerconf
@@ -885,7 +904,8 @@ au BufRead,BufNewFile *.mu setf mupad
au BufNewFile,BufRead *.mush setf mush
" Mutt setup file
au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc*,Muttrc setf muttrc
au BufNewFile,BufRead Muttrc setf muttrc
au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc* call s:StarSetf('muttrc')
" Nastran input/DMAP
"au BufNewFile,BufRead *.dat setf nastran
@@ -893,6 +913,9 @@ au BufNewFile,BufRead .muttrc*,*/.mutt/muttrc*,Muttrc setf muttrc
" Natural
au BufNewFile,BufRead *.NS[ACGLMNPS] setf natural
" Netrc
au BufNewFile,BufRead .netrc setf netrc
" Novell netware batch files
au BufNewFile,BufRead *.ncf setf ncf
@@ -902,11 +925,11 @@ au BufNewFile,BufRead *.me
\ setf nroff |
\ endif
au BufNewFile,BufRead *.tr,*.nr,*.roff,*.tmac,*.mom setf nroff
au BufNewFile,BufRead *.[1-9] call <SID>FTnroff()
au BufNewFile,BufRead *.[1-9] call s:FTnroff()
" This function checks if one of the first five lines start with a dot. In
" that case it is probably an nroff file: 'filetype' is set and 1 is returned.
fun! <SID>FTnroff()
fun! s:FTnroff()
if getline(1)[0] . getline(2)[0] . getline(3)[0] . getline(4)[0] . getline(5)[0] =~ '\.'
setf nroff
return 1
@@ -915,9 +938,9 @@ fun! <SID>FTnroff()
endfun
" Nroff or Objective C++
au BufNewFile,BufRead *.mm call <SID>FTcheck_mm()
au BufNewFile,BufRead *.mm call s:FTmm()
fun! <SID>FTcheck_mm()
fun! s:FTmm()
let n = 1
while n < 10
let line = getline(n)
@@ -968,13 +991,13 @@ au BufNewFile,BufRead *.dpr setf pascal
" Perl
if has("fname_case")
au BufNewFile,BufRead *.pl,*.PL call FTCheck_pl()
au BufNewFile,BufRead *.pl,*.PL call s:FTpl()
else
au BufNewFile,BufRead *.pl call FTCheck_pl()
au BufNewFile,BufRead *.pl call s:FTpl()
endif
au BufNewFile,BufRead *.plx setf perl
fun! FTCheck_pl()
fun! s:FTpl()
if exists("g:filetype_pl")
exe "setf " . g:filetype_pl
else
@@ -1048,9 +1071,9 @@ au BufNewFile,BufRead *.pov setf pov
au BufNewFile,BufRead .povrayrc setf povini
" Povray, PHP or assembly
au BufNewFile,BufRead *.inc call FTCheck_inc()
au BufNewFile,BufRead *.inc call s:FTinc()
fun! FTCheck_inc()
fun! s:FTinc()
if exists("g:filetype_inc")
exe "setf " . g:filetype_inc
else
@@ -1062,7 +1085,7 @@ fun! FTCheck_inc()
elseif lines =~ "<?"
setf php
else
call FTCheck_asmsyntax()
call s:FTasmsyntax()
if exists("b:asmsyntax")
exe "setf " . b:asmsyntax
else
@@ -1092,9 +1115,9 @@ au BufNewFile,BufRead .pc setf proc
au BufNewFile,BufRead .procmail,.procmailrc setf procmail
" Progress or CWEB
au BufNewFile,BufRead *.w call <SID>FTprogress_cweb()
au BufNewFile,BufRead *.w call s:FTprogress_cweb()
function! <SID>FTprogress_cweb()
function! s:FTprogress_cweb()
if exists("g:filetype_w")
exe "setf " . g:filetype_w
return
@@ -1107,9 +1130,9 @@ function! <SID>FTprogress_cweb()
endfun
" Progress or assembly
au BufNewFile,BufRead *.i call <SID>FTprogress_asm()
au BufNewFile,BufRead *.i call s:FTprogress_asm()
function! <SID>FTprogress_asm()
function! s:FTprogress_asm()
if exists("g:filetype_i")
exe "setf " . g:filetype_i
return
@@ -1120,7 +1143,7 @@ function! <SID>FTprogress_asm()
while lnum <= 10
let line = getline(lnum)
if line =~ '^\s*;' || line =~ '^\*'
call FTCheck_asm()
call s:FTasm()
return
elseif line !~ '^\s*$' || line =~ '^/\*'
" Not an empty line: Doesn't look like valid assembly code.
@@ -1133,9 +1156,9 @@ function! <SID>FTprogress_asm()
endfun
" Progress or Pascal
au BufNewFile,BufRead *.p call <SID>FTprogress_pascal()
au BufNewFile,BufRead *.p call s:FTprogress_pascal()
function! <SID>FTprogress_pascal()
function! s:FTprogress_pascal()
if exists("g:filetype_p")
exe "setf " . g:filetype_p
return
@@ -1203,9 +1226,9 @@ au BufNewFile,BufRead *.rexx,*.rex setf rexx
au BufNewFile,BufRead *.s,*.S setf r
" Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call <SID>FTCheck_r()
au BufNewFile,BufRead *.r,*.R call s:FTr()
fun! <SID>FTCheck_r()
fun! s:FTr()
if getline(1) =~ '^REBOL'
setf rebol
else
@@ -1234,7 +1257,7 @@ fun! <SID>FTCheck_r()
endfun
" Remind
au BufNewFile,BufRead .reminders* setf remind
au BufNewFile,BufRead .reminders* call s:StarSetf('remind')
" Resolv.conf
au BufNewFile,BufRead resolv.conf setf resolv
@@ -1281,6 +1304,9 @@ au BufNewFile,BufRead *.sdl,*.pr setf sdl
" sed
au BufNewFile,BufRead *.sed setf sed
" Sieve (RFC 3028)
au BufNewFile,BufRead *.siv setf sieve
" Sendmail
au BufNewFile,BufRead sendmail.cf setf sm
@@ -1305,7 +1331,8 @@ au BufNewFile,BufRead *.decl,*.dcl,*.dec
\ endif
" SGML catalog file
au BufNewFile,BufRead sgml.catalog*,catalog setf catalog
au BufNewFile,BufRead catalog setf catalog
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
" Gentoo ebuilds are actually bash scripts
@@ -1313,7 +1340,11 @@ au BufNewFile,BufRead .bashrc*,bashrc,bash.bashrc,.bash_profile*,.bash_logout*,*
au BufNewFile,BufRead .kshrc*,*.ksh call SetFileTypeSH("ksh")
au BufNewFile,BufRead /etc/profile,.profile*,*.sh,*.env call SetFileTypeSH(getline(1))
" Also called from scripts.vim.
fun! SetFileTypeSH(name)
if expand("<amatch>") =~ g:ft_ignore_pat
return
endif
if a:name =~ '\<ksh\>'
let b:is_kornshell = 1
if exists("b:is_bash")
@@ -1344,7 +1375,11 @@ endfun
" For shell-like file types, check for an "exec" command hidden in a comment,
" as used for Tcl.
" Also called from scripts.vim, thus can't be local to this script.
fun! SetFileTypeShell(name)
if expand("<amatch>") =~ g:ft_ignore_pat
return
endif
let l = 2
while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
" Skip empty and comment lines.
@@ -1365,9 +1400,9 @@ endfun
au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login call SetFileTypeShell("tcsh")
" csh scripts, but might also be tcsh scripts (on some systems csh is tcsh)
au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call SetFileTypeCSH()
au BufNewFile,BufRead .login*,.cshrc*,csh.cshrc,csh.login,csh.logout,*.csh,.alias call s:CSH()
fun! SetFileTypeCSH()
fun! s:CSH()
if exists("g:filetype_csh")
call SetFileTypeShell(g:filetype_csh)
elseif &shell =~ "tcsh"
@@ -1378,7 +1413,8 @@ fun! SetFileTypeCSH()
endfun
" Z-Shell script
au BufNewFile,BufRead .zsh*,.zlog*,.zprofile,/etc/zprofile,.zfbfmarks,.zcompdump* setf zsh
au BufNewFile,BufRead .zprofile,/etc/zprofile,.zfbfmarks setf zsh
au BufNewFile,BufRead .zsh*,.zlog*,.zcompdump* call s:StarSetf('zsh')
" Scheme
au BufNewFile,BufRead *.scm,*.ss setf scheme
@@ -1448,6 +1484,9 @@ au BufNewFile,BufRead *.sp,*.spice setf spice
" Spyce
au BufNewFile,BufRead *.spy,*.spi setf spyce
" Vim spell file
au BufNewFile,BufRead *.spl setf vimspell
" Squid
au BufNewFile,BufRead squid.conf setf squid
@@ -1455,9 +1494,9 @@ au BufNewFile,BufRead squid.conf setf squid
au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
" SQL
au BufNewFile,BufRead *.sql call SetFileTypeSQL()
au BufNewFile,BufRead *.sql call s:SQL()
fun! SetFileTypeSQL()
fun! s:SQL()
if exists("g:filetype_sql")
exe "setf " . g:filetype_sql
else
@@ -1483,9 +1522,12 @@ au BufNewFile,BufRead *.stp setf stp
" Standard ML
au BufNewFile,BufRead *.sml setf sml
" Sudoers
au BufNewFile,BufRead /etc/sudoers,sudoers.tmp setf sudoers
" Tads (or Nroff)
au BufNewFile,BufRead *.t
\ if !<SID>FTnroff() | setf tads | endif
\ if !s:FTnroff() | setf tads | endif
" Tags
au BufNewFile,BufRead tags setf tags
@@ -1520,6 +1562,9 @@ au BufNewFile,BufRead .tidyrc,tidyrc setf tidy
" TF mud client
au BufNewFile,BufRead *.tf,.tfrc,tfrc setf tf
" TPP - Text Presentation Program
au BufNewFile,BufReadPost *.tpp setf tpp
" TSS - Geometry
au BufNewFile,BufReadPost *.tssgm setf tssgm
@@ -1539,7 +1584,8 @@ au BufNewFile,BufRead *.uc setf uc
au BufNewFile,BufRead *.v setf verilog
" VHDL
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vhdl_[0-9]*,*.vbe,*.vst setf vhdl
au BufNewFile,BufRead *.hdl,*.vhd,*.vhdl,*.vbe,*.vst setf vhdl
au BufNewFile,BufRead *.vhdl_[0-9]* call s:StarSetf('vhdl')
" Vim script
au BufNewFile,BufRead *.vim,.exrc,_exrc setf vim
@@ -1551,7 +1597,7 @@ au BufNewFile,BufRead .viminfo,_viminfo setf viminfo
au BufRead,BufNewFile *.hw,*.module,*.pkg setf virata
" Visual Basic (also uses *.bas) or FORM
au BufNewFile,BufRead *.frm call <SID>FTVB("form")
au BufNewFile,BufRead *.frm call s:FTVB("form")
" SaxBasic is close to Visual Basic
au BufNewFile,BufRead *.sba setf vb
@@ -1623,7 +1669,7 @@ au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xd
" Xmath
au BufNewFile,BufRead *.msc,*.msf setf xmath
au BufNewFile,BufRead *.ms
\ if !<SID>FTnroff() | setf xmath | endif
\ if !s:FTnroff() | setf xmath | endif
" XML
au BufNewFile,BufRead *.xml
@@ -1663,7 +1709,7 @@ augroup END
" Source the user-specified filetype file, for backwards compatibility with
" Vim 5.x.
if exists("myfiletypefile") && file_readable(expand(myfiletypefile))
if exists("myfiletypefile") && filereadable(expand(myfiletypefile))
execute "source " . myfiletypefile
endif
@@ -1681,80 +1727,93 @@ au StdinReadPost * if !did_filetype() | runtime! scripts.vim | endif
" Extra checks for when no filetype has been detected now. Mostly used for
" patterns that end in "*". E.g., "zsh*" matches "zsh.vim", but that's a Vim
" script file.
" Most of these should call s:StarSetf() to avoid names ending in .gz and the
" like are used.
" BIND zone
au BufNewFile,BufRead /var/named/* setf bindzone
au BufNewFile,BufRead /var/named/* call s:StarSetf('bindzone')
" Changelog
au BufNewFile,BufRead [cC]hange[lL]og* if getline(1) =~ '; urgency='
\| setf debchangelog | else | setf changelog | endif
au BufNewFile,BufRead [cC]hange[lL]og*
\ if getline(1) =~ '; urgency='
\| call s:StarSetf('debchangelog')
\|else
\| call s:StarSetf('changelog')
\|endif
" Crontab
au BufNewFile,BufRead crontab,crontab.* setf crontab
au BufNewFile,BufRead crontab,crontab.* call s:StarSetf('crontab')
" Dracula
au BufNewFile,BufRead drac.* setf dracula
au BufNewFile,BufRead drac.* call s:StarSetf('dracula')
" Fvwm
au BufNewFile,BufRead *fvwmrc*,*fvwm95*.hook
\ let b:fvwm_version = 1 | setf fvwm
\ let b:fvwm_version = 1 | call s:StarSetf('fvwm')
au BufNewFile,BufRead *fvwm2rc*
\ if expand("<afile>:e") == "m4" | setf fvwm2m4 | else |
\ let b:fvwm_version = 2 | setf fvwm | endif
\ if expand("<afile>:e") == "m4"
\| call s:StarSetf('fvwm2m4')
\|else
\| let b:fvwm_version = 2 | call s:StarSetf('fvwm')
\|endif
" GTK RC
au BufNewFile,BufRead .gtkrc*,gtkrc* setf gtkrc
au BufNewFile,BufRead .gtkrc*,gtkrc* call s:StarSetf('gtkrc')
" Jam
au BufNewFile,BufRead Prl*.*,JAM*.* setf jam
au BufNewFile,BufRead Prl*.*,JAM*.* call s:StarSetf('jam')
" Jargon
au! BufNewFile,BufRead *jarg*
\ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE' |
\ setf jargon |
\ endif
\ if getline(1).getline(2).getline(3).getline(4).getline(5) =~? 'THIS IS THE JARGON FILE'
\| call s:StarSetf('jargon')
\|endif
" Makefile
au BufNewFile,BufRead [mM]akefile* setf make
au BufNewFile,BufRead [mM]akefile* call s:StarSetf('make')
" Ruby Makefile
au BufNewFile,BufRead [rR]akefile* setf ruby
au BufNewFile,BufRead [rR]akefile* call s:StarSetf('ruby')
" Mutt setup file
au BufNewFile,BufRead muttrc*,Muttrc* setf muttrc
au BufNewFile,BufRead muttrc*,Muttrc* call s:StarSetf('muttrc')
" Nroff macros
au BufNewFile,BufRead tmac.* setf nroff
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
" Printcap and Termcap
au BufNewFile,BufRead *printcap*
\ if !did_filetype() | let b:ptcap_type = "print" | setf ptcap | endif
\ if !did_filetype()
\| let b:ptcap_type = "print" | call s:StarSetf('ptcap')
\|endif
au BufNewFile,BufRead *termcap*
\ if !did_filetype() | let b:ptcap_type = "term" | setf ptcap | endif
\ if !did_filetype()
\| let b:ptcap_type = "term" | call s:StarSetf('ptcap')
\|endif
" Vim script
au BufNewFile,BufRead *vimrc* setf vim
au BufNewFile,BufRead *vimrc* call s:StarSetf('vim')
" Subversion commit file
au BufNewFile,BufRead svn-commit.*.tmp setf svn
au BufNewFile,BufRead svn-commit*.tmp setf svn
" X resources file
au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* setf xdefaults
au BufNewFile,BufRead Xresources*,*/app-defaults/*,*/Xresources/* call s:StarSetf('xdefaults')
" XFree86 config
au BufNewFile,BufRead XF86Config-4*
\ let b:xf86c_xfree86_version = 4 | setf xf86conf
\ let b:xf86c_xfree86_version = 4 | call s:StarSetf('xf86conf')
au BufNewFile,BufRead XF86Config*
\ if getline(1) =~ '\<XConfigurator\>' |
\ let b:xf86c_xfree86_version = 3 |
\ endif |
\ setf xf86conf
\ if getline(1) =~ '\<XConfigurator\>'
\| let b:xf86c_xfree86_version = 3
\|endif
\|call s:StarSetf('xf86conf')
" X11 xmodmap
au BufNewFile,BufRead *xmodmap* setf xmodmap
au BufNewFile,BufRead *xmodmap* call s:StarSetf('xmodmap')
" Z-Shell script
au BufNewFile,BufRead zsh*,zlog* setf zsh
au BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')
" Generic configuration file (check this last, it's just guessing!)

View File

@@ -1,7 +1,7 @@
" Vim support file to switch on loading plugins for file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last change: 2003 May 10
" Last change: 2005 Mar 25
if exists("did_load_ftplugin")
finish
@@ -11,11 +11,11 @@ let did_load_ftplugin = 1
augroup filetypeplugin
au FileType * call s:LoadFTPlugin()
func! s:LoadFTPlugin()
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet! b:undo_ftplugin b:did_ftplugin
endif
if expand("<amatch>") != ""
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet b:undo_ftplugin b:did_ftplugin
endif
if &cpo =~# "S" && exists("b:did_ftplugin")
" In compatible mode options are reset to the global values, need to
" set the local values also when a plugin was already used.

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