Compare commits

...

188 Commits

Author SHA1 Message Date
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
Bram Moolenaar
3fdfa4a9a5 updated for version 7.0017 2004-10-07 21:02:47 +00:00
Bram Moolenaar
e5f258eb4c updated for version 7.0017 2004-10-07 20:45:47 +00:00
Bram Moolenaar
c0197e2815 updated for version 7.0016 2004-09-13 20:26:32 +00:00
Bram Moolenaar
15d0a8c77d updated for version 7.0015 2004-09-06 17:44:46 +00:00
Bram Moolenaar
d4755bb0e0 updated for version 7.0014 2004-09-02 19:12:26 +00:00
Bram Moolenaar
269ec658f0 updated for version 7.0013 2004-07-29 08:43:53 +00:00
Bram Moolenaar
5eb86f9199 updated for version 7.0012 2004-07-26 12:53:41 +00:00
Bram Moolenaar
89cb5e0f64 updated for version 7.0011 2004-07-19 20:55:54 +00:00
Bram Moolenaar
ab79bcbac3 updated for version 7.0010 2004-07-18 21:34:53 +00:00
Bram Moolenaar
21cf823a90 updated for version 7.0009 2004-07-16 20:18:37 +00:00
Bram Moolenaar
2df6dcc596 updated for version 7.0008 2004-07-12 15:53:54 +00:00
Bram Moolenaar
8299df966a updated for version 7.0007 2004-07-10 09:47:34 +00:00
Bram Moolenaar
325b7a2fb5 updated for version 7.0006 2004-07-05 15:58:32 +00:00
Bram Moolenaar
592e0a2a1d updated for version 7.0005 2004-07-03 16:05:59 +00:00
Bram Moolenaar
cfbc5ee48e updated for version 7.0004 2004-07-02 15:38:35 +00:00
Bram Moolenaar
843ee41eb8 updated for version 7.0003 2004-06-30 16:16:41 +00:00
Bram Moolenaar
f4b8e57ffd updated for version 7.0002 2004-06-24 15:53:16 +00:00
486 changed files with 119484 additions and 37006 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 \
@@ -73,7 +74,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 +93,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 \
@@ -130,6 +132,7 @@ SRC_UNIX = \
pixmaps/gen-inline-pixbufs.sh \
pixmaps/stock_icons.h \
src/INSTALL \
src/INSTALLkde.txt \
src/Makefile \
src/auto/configure \
src/config.aap.in \
@@ -146,13 +149,25 @@ SRC_UNIX = \
src/gui_gtk_f.c \
src/gui_gtk_f.h \
src/gui_gtk_x11.c \
src/gui_kde.cc \
src/gui_kde_wid.cc \
src/gui_kde_wid.h \
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 \
@@ -164,7 +179,10 @@ SRC_UNIX = \
src/proto/gui_athena.pro \
src/proto/gui_gtk.pro \
src/proto/gui_gtk_x11.pro \
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 \
@@ -189,12 +207,15 @@ SRC_UNIX = \
SRC_DOS_UNIX = \
src/if_cscope.c \
src/if_cscope.h \
src/if_mzsch.c \
src/if_mzsch.h \
src/if_perl.xs \
src/if_perlsfio.c \
src/if_python.c \
src/if_ruby.c \
src/if_tcl.c \
src/proto/if_cscope.pro \
src/proto/if_mzsch.pro \
src/proto/if_perl.pro \
src/proto/if_perlsfio.pro \
src/proto/if_python.pro \
@@ -204,7 +225,19 @@ SRC_DOS_UNIX = \
# source files for DOS (also in the extra archive)
SRC_DOS = \
src/GvimExt \
src/GvimExt/*.mak \
src/GvimExt/GvimExt.reg \
src/GvimExt/Makefile \
src/GvimExt/README.txt \
src/GvimExt/gvimext.cpp \
src/GvimExt/gvimext.def \
src/GvimExt/gvimext.h \
src/GvimExt/gvimext.inf \
src/GvimExt/gvimext.rc \
src/GvimExt/gvimext_ming.def \
src/GvimExt/gvimext_ming.rc \
src/GvimExt/resource.h \
src/GvimExt/uninst.bat \
README_srcdos.txt \
src/INSTALLpc.txt \
src/Make_bc3.mak \
@@ -292,7 +325,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 \
@@ -311,17 +344,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 \
@@ -335,7 +363,14 @@ SRC_MAC = \
src/gui_mac.c \
src/gui_mac.icns \
src/gui_mac.r \
src/os_mac* \
src/os_mac.build \
src/os_mac.c \
src/os_mac.h \
src/os_mac.rsr.hqx \
src/os_mac.sit.hqx \
src/os_mac_conv.c \
src/os_macosx.c \
src/os_mac.pbproj/project.pbxproj \
src/proto/gui_mac.pro \
src/proto/os_mac.pro \
@@ -384,8 +419,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 \
@@ -398,9 +431,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 \
@@ -492,6 +523,13 @@ RT_SCRIPTS = \
# Unix runtime
RT_UNIX = \
README_unix.txt \
runtime/KVim.desktop \
runtime/hi16-action-make.png \
runtime/hi22-action-make.png \
runtime/kde-tips \
runtime/kvim32x32.png \
runtime/kvim48x48.png \
runtime/kvim64x64.png \
runtime/vim16x16.png \
runtime/vim16x16.xpm \
runtime/vim32x32.png \
@@ -618,12 +656,11 @@ EXTRA = \
src/tee/Makefile* \
src/tee/tee.c \
csdpmi4b.zip \
emx.dll \
emxlibcs.dll \
# generic language files
LANG_GEN = \
README_lang.txt \
runtime/doc/*-it.1 \
runtime/lang/README.txt \
runtime/lang/menu_*.vim \
runtime/keymap/README.txt \

View File

@@ -354,6 +354,7 @@ lang: dist prepare
touch dist/$(VIMRTDIR)/src/po/sk.cp1250.po
touch dist/$(VIMRTDIR)/src/po/zh_CN.cp936.po
touch dist/$(VIMRTDIR)/src/po/ru.cp1251.po
touch dist/$(VIMRTDIR)/src/po/uk.cp1251.po
cd dist && tar cf $(VIMVER)-lang.tar $(VIMRTDIR)
gzip -9 dist/$(VIMVER)-lang.tar
@@ -568,9 +569,9 @@ doslang: dist prepare no_title.vim dist/$(COMMENT_LANG)
find dist/vim/$(VIMRTDIR) -type f -exec $(VIM) -e -u no_title.vim -c ":set tx|wq" {} \;
# Add the message translations. Trick: skip ja.mo and use ja.sjis.mo instead.
# Same for cs.mo / cs.cp1250.mo, pl.mo / pl.cp1250.mo, sk.mo / sk.cp1250.mo,
# zh_CN.mo / zh_CN.cp936.mo and ru.mo / ru.cp1251.mo.
# zh_CN.mo / zh_CN.cp936.mo, uk.mo / uk.cp1251.mo and ru.mo / ru.cp1251.mo.
for i in $(LANG_DOS); do \
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo"; then \
if test "$$i" != "src/po/ja.mo" -a "$$i" != "src/po/pl.mo" -a "$$i" != "src/po/cs.mo" -a "$$i" != "src/po/sk.mo" -a "$$i" != "src/po/zh_CN.mo" -a "$$i" != "src/po/ru.mo" -a "$$i" != "src/po/uk.mo"; then \
n=`echo $$i | sed -e "s+src/po/\([-a-zA-Z0-9_]*\(.UTF-8\)*\)\(.sjis\)*\(.cp1250\)*\(.cp1251\)*\(.cp936\)*.mo+\1+"`; \
mkdir dist/vim/$(VIMRTDIR)/lang/$$n; \
mkdir dist/vim/$(VIMRTDIR)/lang/$$n/LC_MESSAGES; \

BIN
emx.dll

Binary file not shown.

Binary file not shown.

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. ",

44
runtime/KVim.desktop Normal file
View File

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

View File

@@ -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

28
runtime/compiler/php.vim Normal file
View File

@@ -0,0 +1,28 @@
" Vim compiler file
" Compiler: PHP
" 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
endif
let current_compiler = "php"
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif
let s:cpo_save = &cpo
set cpo-=C
CompilerSet makeprg=php\ -lq
CompilerSet errorformat=%E<b>Parse\ error</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,
\%W<b>Notice</b>:\ %m\ in\ <b>%f</b>\ on\ line\ <b>%l</b><br\ />,
\%EParse\ error:\ %m\ in\ %f\ on\ line\ %l,
\%WNotice:\ %m\ in\ %f</b>\ on\ line\ %l,
\%-G%.%#
let &cpo = s:cpo_save
unlet s:cpo_save

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

@@ -2,7 +2,7 @@
" Compiler: splint/lclint (C source code checker)
" Maintainer: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
" Splint Home: http://www.splint.org/
" Last Change: $Date$
" Last Change: 2004 Oct 02
" $Revision$
if exists("current_compiler")
@@ -64,7 +64,7 @@ CompilerSet errorformat=%OLCLint*m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f,
\%C\ \ %m
\%C\ %#%m
let &cpo = s:cpo_save
unlet s:cpo_save

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,10 +68,10 @@ DOCS = \
os_vms.txt \
os_win32.txt \
pattern.txt \
pi_expl.txt \
pi_gzip.txt \
pi_netrw.txt \
pi_spec.txt \
print.txt \
quickfix.txt \
quickref.txt \
quotes.txt \
@@ -126,6 +127,7 @@ DOCS = \
version4.txt \
version5.txt \
version6.txt \
version7.txt \
vi_diff.txt \
visual.txt \
windows.txt \
@@ -154,6 +156,7 @@ HTMLS = \
help.html \
howto.html \
if_cscop.html \
if_mzsch.html \
if_ole.html \
if_perl.html \
if_pyth.html \
@@ -185,10 +188,10 @@ HTMLS = \
os_vms.html \
os_win32.html \
pattern.html \
pi_expl.html \
pi_gzip.html \
pi_netrw.html \
pi_spec.html \
print.html \
quickfix.html \
quickref.html \
quotes.html \
@@ -245,6 +248,7 @@ HTMLS = \
version4.html \
version5.html \
version6.html \
version7.html \
vi_diff.html \
visual.html \
windows.html \

View File

@@ -1,4 +1,4 @@
*autocmd.txt* For Vim version 7.0aa. Last change: 2004 Apr 20
*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}
@@ -24,10 +25,10 @@ For a basic explanation, see section |40.3| in the user manual.
==============================================================================
1. Introduction *autocmd-intro*
You can specify commands to be executed automatically for when reading or
writing a file, when entering or leaving a buffer or window, and when exiting
Vim. For example, you can create an autocommand to set the 'cindent' option
for files matching *.c. You can also use autocommands to implement advanced
You can specify commands to be executed automatically when reading or writing
a file, when entering or leaving a buffer or window, and when exiting Vim.
For example, you can create an autocommand to set the 'cindent' option for
files matching *.c. You can also use autocommands to implement advanced
features, such as editing compressed files (see |gzip-example|). The usual
place to put autocommands is in your .vimrc or .exrc file.
@@ -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,26 +239,32 @@ 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.
whole buffer. Use the '[ and '] marks for the
range of lines.
*FileWritePost*
FileWritePost After writing to a file, when not writing the
whole buffer.
*FileWriteCmd*
FileWriteCmd Before writing to a file, when not writing the
whole buffer. Should do the writing to the
file. Should not change the buffer.
file. Should not change the buffer. Use the
'[ and '] marks for the range of lines.
|Cmd-event|
*FileAppendPre*
FileAppendPre Before appending to a file.
FileAppendPre Before appending to a file. Use the '[ and ']
marks for the range of lines.
*FileAppendPost*
FileAppendPost After appending to a file.
*FileAppendCmd*
FileAppendCmd Before appending to a file. Should do the
appending to the file. |Cmd-event|
appending to the file. Use the '[ and ']
marks for the range of lines.|Cmd-event|
*FilterWritePre*
FilterWritePre Before writing a file for a filter command or
making a diff.
@@ -257,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.
@@ -269,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
@@ -277,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>".
@@ -304,12 +324,14 @@ FocusGained When Vim got input focus. Only for the GUI
*FocusLost*
FocusLost When Vim lost input focus. Only for the GUI
version and a few console versions where this
can be detected.
can be detected. May also happen when a
dialog pops up.
*FuncUndefined*
FuncUndefined When a user function is used but it isn't
defined. Useful for defining a function only
when it's used. Both <amatch> and <afile> are
set to the name of the function.
See |autoload-functions|.
*CursorHold*
CursorHold When the user doesn't press a key for the time
specified with 'updatetime'. Not re-triggered
@@ -467,9 +489,26 @@ VimLeave Before exiting Vim, just after writing the
*EncodingChanged*
EncodingChanged Fires off when the 'encoding' option is
changed. Useful to set up fonts, for example.
*InsertEnter*
InsertEnter When starting Insert mode. Also for Replace
mode and Virtual Replace mode. The
|v:insertmode| variable indicates the mode.
Be careful not to move the cursor or do
anything else that the user does not expect.
*InsertChange*
InsertChange When typing <Insert> while in Insert or
Replace mode. The |v:insertmode| variable
indicates the new mode.
Be careful not to move the cursor or do
anything else that the user does not expect.
*InsertLeave*
InsertLeave When leaving Insert mode. Also when using
CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.
*FileEncoding*
FileEncoding Obsolete. It still works and is equivalent
to |EncodingChanged|.
*ColorScheme*
ColorScheme After loading a color scheme. |:colorscheme|
*RemoteReply*
RemoteReply When a reply from a Vim that functions as
server was received |server2client()|.
@@ -489,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*
@@ -529,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. >
@@ -584,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: >
@@ -597,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
@@ -646,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
@@ -689,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:
@@ -720,8 +831,9 @@ The '[ and '] marks have a special position:
the new lines will be inserted.
- Before the *ReadPost event the '[ mark is set to the first line that was
just read, the '] mark to the last line.
- Before executing the *WritePre and *AppendPre autocommands the '[ mark is
set to the first line that will be written, the '] mark to the last line.
- Before executing the *WriteCmd, *WritePre and *AppendPre autocommands the '[
mark is set to the first line that will be written, the '] mark to the last
line.
Careful: '[ and '] change when using commands that change the buffer.
In commands which expect a file name, you can use "<afile>" for the file name
@@ -901,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 Jun 16
*change.txt* For Vim version 7.0aa. Last change: 2005 Feb 23
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/\&*
@@ -659,7 +693,7 @@ magic nomagic action ~
\0 replaced with the whole matched pattern *\0* *s/\0*
\1 replaced with the matched pattern in the first
pair of () *s/\1*
\2 replaced with the matched pattern in the first
\2 replaced with the matched pattern in the second
pair of () *s/\2*
.. .. *s/\3*
\9 replaced with the matched pattern in the ninth
@@ -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",
@@ -1312,10 +1354,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 Mar 31
*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*
@@ -45,12 +46,13 @@ thus you cannot edit beyond that.
*cmdline-history* *history*
The command-lines that you enter are remembered in a history table. You can
recall them with the up and down cursor keys. There are actually four
recall them with the up and down cursor keys. There are actually five
history tables:
- one for ':' commands
- one for search strings
- one for expressions
- one for input lines, typed for the |input()| function.
- one for debug mode commands
These are completely separate. Each history can only be accessed when
entering the same type of line.
Use the 'history' option to set the number of lines that are remembered
@@ -152,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>*
@@ -163,6 +169,8 @@ CTRL-R CTRL-A *c_CTRL-R_CTRL-A* *c_<C-R>_<C-A>*
'path' as in |gf|
CTRL-W the Word under the cursor
CTRL-A the WORD under the cursor; see |WORD|
When 'incsearch' is set the cursor position of the currently
displayed match is used.
{not in Vi}
CTRL-F and CTRL-P: {only when +file_in_path feature is
included}
@@ -305,6 +313,7 @@ terminals)
s[earch] or / search string history
e[xpr] or = expression register history
i[nput] or @ input line history
d[ebug] or > debug command history
a[ll] all of the above
{not in Vi}
@@ -351,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
@@ -658,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 May 01
*diff.txt* For Vim version 7.0aa. Last change: 2005 Mar 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -83,7 +83,7 @@ While already in Vim you can start diff mode in three ways.
*:difft* *:diffthis*
:diffthis Make the current window part of the diff windows. This sets
the option like for "vimdiff".
the options like for "vimdiff".
:diffpatch {patchfile} *:diffp* *:diffpatch*
Use the current buffer, patch it with the diff found in
@@ -109,10 +109,22 @@ There can be up to four buffers with 'diff' set.
Since the option values are remembered with the buffer, you can edit another
file for a moment and come back to the same file and be in diff mode again.
If you don't want diff mode, reset the 'diff' option. And you probably want
to get rid of the fold column: >
:set nodiff foldcolumn=0
*:diffo* *:diffoff*
:diffoff Switch off diff mode for the current window.
:diffoff! Switch off diff mode for all windows.
The ":diffoff" command resets the relevant options to their default value.
This may be different from what the values were before diff mode was started,
the old values are not remembered.
'diff' off
'scrollbind' off
'scrollopt' without "hor"
'wrap' on
'foldmethod' "manual"
'foldcolumn' 0
==============================================================================
2. Viewing diffs *view-diffs*
@@ -145,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
@@ -332,6 +344,10 @@ get an error message. Possible causes:
If it's not clear what the problem is set the 'verbose' option to see more
messages.
The self-installing Vim includes a diff program. If you don't have it you
might want to download a diff.exe. For example from
http://jlb.twu.net/code/unixkit.php.
USING PATCHES *diff-patchexpr*

View File

@@ -1,4 +1,4 @@
*digraph.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
*digraph.txt* For Vim version 7.0aa. Last change: 2005 Mar 06
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -28,7 +28,8 @@ An alternative is using the 'keymap' option.
*E104* *E39*
:dig[raphs] {char1}{char2} {number} ...
Add digraph {char1}{char2} to the list. {number} is
the decimal representation of the character.
the decimal representation of the character. Normally
it is the Unicode character, see |digraph-encoding|.
Example: >
:digr e: 235 a: 228
< Avoid defining a digraph with '_' (underscore) as the
@@ -48,7 +49,24 @@ In the middle of each column is the resulting character. This may be mangled
if you look at it on a system that does not support digraphs or if you print
this file.
The decimal number is the number of the character.
*digraph-encoding*
The decimal number normally is the Unicode number of the character. Note that
the meaning doesn't change when 'encoding' changes. The character will be
converted from Unicode to 'encoding' when needed. This does require the
conversion to be available, it might fail.
When Vim was compiled without the +multi_byte feature, you need to specify the
character in the encoding given with 'encoding'. You might want to use
something like this: >
if has("multi_byte")
digraph oe 339
elseif &encoding == "iso-8859-15"
digraph oe 189
endif
This defines the "oe" digraph for a character that is number 339 in Unicode
and 189 in latin9 (iso-8859-15).
==============================================================================
2. Using digraphs *digraphs-use*
@@ -142,6 +160,14 @@ Example: a: is
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. 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 Jun 17
*editing.txt* For Vim version 7.0aa. Last change: 2005 Feb 14
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8,68 +8,95 @@ 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
*current-file*
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".
remembered as the "current file name". This is also known as the name of the
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. 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}
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
name. Note that commands invoked indirectly (e.g.,
with a function) may still set the alternate file
name. {not in Vi}
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}
:f[ile]! like |:file|, but don't truncate the name even when
'shortmess' indicates this.
{count}CTRL-G Like CTRL-G, but prints the current file name with
full path. If the count is higher than 1 the current
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}.
: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}
:buffers
:files
@@ -87,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
@@ -194,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}
@@ -237,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,
@@ -258,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.
@@ -314,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
@@ -330,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.
@@ -339,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
@@ -449,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.
@@ -860,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}
@@ -873,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.
@@ -967,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.
@@ -1011,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
@@ -1149,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
@@ -1241,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*
@@ -1373,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
@@ -1430,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<69>
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 <20> in grado di lavorare con Vim nella
maniera usuale.
La modifica file sar<61> molto meno efficiente.
.PP
.B eview
come sopra, ma parte in modalit<69> "Sola Lettura". Funziona come evim -R.
.PP
Vedere vim(1) per dettagli riguardo a Vim, opzioni, etc.
.PP
L'opzione 'insertmode' <20> 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
<EFBFBD> stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere il Menu "Aiuto/Crediti".

View File

@@ -1,4 +1,4 @@
*filetype.txt* For Vim version 7.0aa. Last change: 2004 May 05
*filetype.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -82,6 +82,9 @@ You can disable it again with: >
The filetype detection is not switched off then. But if you do switch off
filetype detection, the indent files will not be loaded either.
This actually loads the file "indoff.vim" in 'runtimepath'.
This disables auto-indenting for files you will open. It will keep working in
already opened files. Reset 'autoindent', 'cindent', 'smartindent' and/or
'indentexpr' to disable indenting in an opened file.
*:filetype-off*
To disable file type detection, use this command: >
@@ -147,15 +150,15 @@ is used. The default value is set like this: >
This means that the contents of compressed files are not inspected.
*new-filetype*
If a file type that you want to use is not detected yet, there are three ways
to add it. In any way, it's better not modify the $VIMRUNTIME/filetype.vim
If a file type that you want to use is not detected yet, there are four ways
to add it. In any way, it's better not to modify the $VIMRUNTIME/filetype.vim
file. It will be overwritten when installing a new version of Vim.
A. If you want to overrule all default file type checks.
This works by writing one file for each filetype. The disadvantage is that
means there can be many files. The advantage is that you can simply drop
this file in the right directory to make it work.
*ftdetect*
1. Create your user runtime directory. You would normally use the first
item of the 'runtimepath' option. Then create the directory "ftdetect"
inside it. Example for Unix: >

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
@@ -25,8 +25,8 @@ Other GUI documentation:
First you must make sure you actually have a version of Vim with the GUI code
included. You can check this with the ":version" command, it should include
"+GUI_Athena", "+GUI_BeOS", "+GUI_GTK", "+GUI_Motif" or "MS-Windows ... bit
GUI version".
"+GUI_Athena", "+GUI_BeOS", "+GUI_GTK", "+GUI_KDE", "+GUI_Motif" or
"MS-Windows ... bit GUI version".
How to start the GUI depends on the system used. Mostly you can run the
GUI version of Vim with:
@@ -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|.
@@ -94,8 +95,8 @@ There are a number of options which only have meaning in the GUI version of
Vim. These are 'guicursor', 'guifont', 'guipty' and 'guioptions'. They are
documented in |options.txt| with all the other options.
If using the Motif or Athena version of the GUI (but not for the GTK+ or Win32
version), a number of X resources are available. See |gui-resources|.
If using the Motif or Athena version of the GUI (but not for the KDE, GTK+ or
Win32 version), a number of X resources are available. See |gui-resources|.
Another way to set the colors for different occasions is with highlight
groups. The "Normal" group is used to set the background and foreground
@@ -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,
@@ -479,7 +480,7 @@ a menu entry. Hit <Enter> to execute it. Hit <Esc> if you want to cancel.
This does require the |+menu| feature enabled at compile time.
*tear-off-menus*
GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
KDE, GTK+ and Motif support Tear-off menus. These are sort of sticky menus or
pop-up menus that are present all the time. If the resizing does not work
correctly, this may be caused by using something like "Vim*geometry" in the
defaults. Use "Vim.geometry" instead.
@@ -646,8 +647,8 @@ because the item will never be selected. Use a single colon to keep it
simple.
*gui-toolbar*
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11) and
Photon GUI. It should turn up in other GUIs in due course. The default
The toolbar is currently available in the Win32, Athena, Motif, GTK+ (X11),
KDE and Photon GUI. It should turn up in other GUIs in due course. The default
toolbar is setup in menu.vim.
The display of the toolbar is controlled by the 'guioptions' letter 'T'. You
can thus have menu & toolbar together, or either on its own, or neither.
@@ -735,7 +736,7 @@ from the main menu bar. You must then use the |:popup| or |:tearoff| command
to display it.
*popup-menu*
In the Win32, GTK+, Motif, Athena and Photon GUI, you can define the special
In the Win32, KDE, GTK+, Motif, Athena and Photon GUI, you can define the special
menu "PopUp". This is the menu that is displayed when the right mouse button
is pressed, if 'mousemodel' is set to popup or popup_setpos.

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 Mar 16
*gui_x11.txt* For Vim version 7.0aa. Last change: 2004 Dec 29
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -12,8 +12,9 @@ Vim's Graphical User Interface *gui-x11* *GUI-X11*
4. Various |gui-x11-various|
5. GTK version |gui-gtk|
6. GNOME version |gui-gnome|
7. Compiling |gui-x11-compiling|
8. X11 selection mechanism |x11-selection|
7. KDE version |gui-kde|
8. Compiling |gui-x11-compiling|
9. X11 selection mechanism |x11-selection|
Other relevant documentation:
|gui.txt| For generic items of the GUI.
@@ -59,7 +60,7 @@ flag in 'guioptions'. |-f|.
==============================================================================
2. GUI Resources *gui-resources* *.Xdefaults*
If using the Motif or Athena version of the GUI (not for the GTK+ or Win32
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32
version), a number of X resources are available. You should use Vim's class
"Vim" when setting these. They are as follows:
@@ -434,7 +435,64 @@ the WM to identify the window by restoring the window role (using the |--role|
command line argument).
==============================================================================
7. Compiling *gui-x11-compiling*
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.
Most important difference is the font handling, KVim uses QFont to display the
text. To set your font use the following syntax :
>
:set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
<
the '10' value is the font size, other settings concerns more specific Qt
options which you should not need to care with.
The suggested way to choose your font is through the font selection dialog
available with the command :
:set guifont=*
Note: X Font names are not supported any more, so if you use GVim too, you'll
have to set something like this in your ~/.gvimrc : >
if has("gui_kde")
:set guifont=Fixed\ [Misc]/10/-1/5/50/0/0/0/1/0
else if has("gui_gtk")
:set guifont=-misc-fixed-medium-r-normal-*-*-100-*-*-c-*-iso10646-1
endif
<
*antialias*
KVim uses antialias for its font, so that the text looks better, to disable
this you have to refer to Qt's documentation (export QT_XFT=0 for QT 2.x).
KDE provides some other features, like being able to move the menubar and the
toolbar wherever you want around the text area.
*kde-toolbar*
KVim can be used with a KDE-look toolbar instead of Vim's default toolbar. To
enable this feature you have to run the configure script with the
--enable-kde-toolbar switch. It may be moved to a runtime option in the
future.
*DCOP*
Since Vim 6.0, the new ClientServer feature has been added, it works fine in
KVim too. KVim also provides its own communication scheme based on DCOP. This
is mainly used by the |vimpart| but can freely be used by other applications
or manually through KDE's DCOP tools. The DCOP servername is synchronized with
the X11 servername so that it's easier to identify the same KVim through the
two communication systems.
*vimpart* *vim-kpart*
KVim developers are also working on a component to allow embedding of Vim into
KDE's applications. As of this writing, the component is working and can be
used in different KDE applications. New KDE applications should support it
soon. To get more information about this component, refer to
http://freehackers.org/kvim or to the KDE project.
==============================================================================
8. Compiling *gui-x11-compiling*
If using X11, Vim's Makefile will by default first try to find the necessary
GTK+ files on your system. If the GTK+ files cannot be found, then the Motif
@@ -489,6 +547,12 @@ menus look a bit better. Edit the Makefile and look for "XAW_LIB". The
scrollbars will remain the same, because Vim has its own, which are already
3D (in fact, they look more like Motif).
*gui-x11-kde*
For Vim-KDE, you need at least Qt(>=2.x) and the corresponding kdelibs.
To compile, you must use the --with-qt-dir configure flag because QTDIR is not
automatically detected yet. Giving KDE's directories to the configure script
may also help in some cases.
*gui-x11-neXtaw*
The neXtaw version is mostly like Athena, but uses different widgets.
@@ -499,7 +563,7 @@ X11R5 with a library for X11R6 probably doesn't work (although the linking
won't give an error message, Vim will crash later).
==============================================================================
8. X11 selection mechanism *x11-selection*
9. X11 selection mechanism *x11-selection*
If using X11, in either the GUI or an xterm with an X11-aware Vim, then Vim
provides varied access to the X11 selection and clipboard. These are accessed

View File

@@ -96,6 +96,6 @@ Bug or Comment
Send comments, patches and suggestions to:
Chi-Deok Hwang <hwang@mizi.co.kr>
Nam SungHyun <namsh@lge.com>
Nam SungHyun <namsh@kldp.org>
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*help.txt* For Vim version 7.0aa. Last change: 2004 May 04
*help.txt* For Vim version 7.0aa. Last change: 2004 Dec 30
VIM - main help file
k
@@ -129,6 +129,7 @@ Advanced editing ~
|fold.txt| hide (fold) ranges of lines
Special issues ~
|print.txt| printing
|remote.txt| using Vim as a server or client
|term.txt| using different terminals and mice
|digraph.txt| list of available digraphs
@@ -148,7 +149,8 @@ GUI ~
|gui_x11.txt| X11 GUI
Interfaces ~
|if_cscop.txt| using cscope with Vim
|if_cscop.txt| using Cscope with Vim
|if_mzsch.txt| MzScheme interface
|if_perl.txt| Perl interface
|if_pyth.txt| Python interface
|if_sniff.txt| SNiFF+ interface

View File

@@ -1,4 +1,4 @@
*if_cscop.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
*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
@@ -335,6 +336,9 @@ cscope version for Win32 see:
http://iamphet.nm.ru/cscope/index.html
The DJGPP-built version from http://cscope.sourceforge.net is known to not
work with Vim.
There are a couple of hard-coded limitations:
1. The maximum number of cscope connections allowed is 8. Do you
@@ -468,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:

244
runtime/doc/if_mzsch.txt Normal file
View File

@@ -0,0 +1,244 @@
*if_mzsch.txt* For Vim version 7.0aa. Last change: 2005 Jan 23
VIM REFERENCE MANUAL by Sergey Khorev
The MzScheme Interface to Vim *mzscheme* *MzScheme*
1. Commands |mzscheme-commands|
2. Examples |mzscheme-examples|
3. Threads |mzscheme-threads|
4. The Vim access procedures |mzscheme-vim|
{Vi does not have any of these commands}
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/
==============================================================================
1. Commands *mzscheme-commands*
*:mzscheme* *:mz*
:[range]mz[scheme] {stmt}
Execute MzScheme statement {stmt}. {not in Vi}
:[range]mz[scheme] << {endmarker}
{script}
{endmarker}
Execute inlined MzScheme script {script}.
Note: This command doesn't work if the MzScheme
feature wasn't compiled in. To avoid errors, see
|script-here|.
*:mzfile* *:mzf*
:[range]mzf[ile] {file} Execute the MzScheme script in {file}. {not in Vi}
All statements are executed in the namespace of the
buffer that was current during :mzfile start.
If you want to access other namespaces, use
'parameterize'.
All of these commands do essentially the same thing - they execute a piece of
MzScheme code, with the "current range" set to the given line
range.
In the case of :mzscheme, the code to execute is in the command-line.
In the case of :mzfile, the code to execute is the contents of the given file.
Each buffer has its own MzScheme namespace. Global namespace is bound to
the `global-namespace' value from the 'vimext' module.
MzScheme interface defines exception exn:vim, derived from exn.
It is raised for various Vim errors.
During compilation, the MzScheme interface will remember the current MzScheme
collection path. If you want to specify additional paths use the
'current-library-collection-paths' parameter. E.g., to cons the user-local
MzScheme collection path: >
:mz << EOF
(current-library-collection-paths
(cons
(build-path (find-system-path 'addon-dir) (version) "collects")
(current-library-collection-paths)))
EOF
<
All functionality is provided through module vimext.
The exn:vim is available without explicit import.
To avoid clashes with MzScheme, consider using prefix when requiring module,
e.g.: >
:mzscheme (require (prefix vim- vimext))
<
All the examples below assume this naming scheme. Note that you need to do
this again for every buffer.
The auto-instantiation can be achieved with autocommands, e.g. you can put
something like this in your .vimrc (EOFs should not have indentation): >
function s:MzRequire()
if has("mzscheme")
:mz << EOF
(require (prefix vim- vimext))
(let ((buf (vim-get-buff-by-name (vim-eval "expand(\"<afile>\")"))))
(when (and buf (not (eq? buf (vim-curr-buff))))
(parameterize ((current-namespace (vim-get-buff-namespace buf)))
(namespace-attach-module vim-global-namespace 'vimext)
(namespace-require '(prefix vim vimext)))))
EOF
endif
endfunction
function s:MzStartup()
if has("mzscheme")
au BufNew,BufNewFile,BufAdd,BufReadPre * :call s:MzRequire()
:mz << EOF
(current-library-collection-paths
(cons
(build-path (find-system-path 'addon-dir) (version) "collects")
(current-library-collection-paths)))
EOF
endif
endfunction
call s:MzStartup()
<
The global namespace just instantiated this module with the prefix "vimext:".
==============================================================================
2. Examples *mzscheme-examples*
>
:mzscheme (display "Hello")
:mzscheme (vim-set-buff-line 10 "This is line #10")
<
Inline script usage: >
function! <SID>SetFirstLine()
:mz << EOF
(display "!!!")
(vim-set-buff-line 1 "This is line #1")
(vim-beep)
EOF
endfunction
nmap <F9> :call <SID>SetFirstLine() <CR>
<
File execution: >
:mzfile supascript.scm
<
Accessing the current buffer namespace from an MzScheme program running in
another buffer within |:mzfile|-executed script : >
; Move to the window below
(vim-command "wincmd j")
; execute in the context of buffer, to which window belongs
; assume that buffer has 'textstring' defined
(parameterize ((current-namespace
(vim-get-buff-namespace (vim-curr-buff))))
(eval '(vim-set-buff-line 1 textstring)))
<
==============================================================================
3. Threads *mzscheme-threads*
The MzScheme interface supports threads. They are independent from OS threads,
thus scheduling is required. The option 'mzquantum' determines how often
Vim should poll for available MzScheme threads.
NOTE
Thread scheduling in the console version of Vim is less reliable than in the
GUI version.
==============================================================================
5. VIM Functions *mzscheme-vim*
*mzscheme-vimext*
The 'vimext' module provides access to procedures defined in the MzScheme
interface.
Common
------
(command {command-string}) Perform the vim ":Ex" style command.
(eval {expr-string}) Evaluate the vim command string.
NOTE clashes with MzScheme eval
(range-start) Start/End of the range passed with
(range-end) the Scheme command.
(beep) beep
(get-option {option-name} [buffer-or-window]) Get Vim option value (either
local or global, see set-option).
(set-option {string} [buffer-or-window])
Set a Vim option. String must have option
setting form (like optname=optval, or
optname+=optval, etc.) When called with
{buffer} or {window} the local option will
be set. The symbol 'global can be passed
as {buffer-or-window}. Then |:setglobal|
will be used.
global-namespace The MzScheme main namespace.
Buffers *mzscheme-buffer*
-------
(buff? {object}) Is object a buffer?
(buff-valid? {object}) Is object a valid buffer? (i.e.
corresponds to the real Vim buffer)
(get-buff-line {linenr} [buffer])
Get line from a buffer.
(set-buff-line {linenr} {string} [buffer])
Set a line in a buffer. If {string} is #f,
the line gets deleted. The [buffer]
argument is optional. If omitted, the
current buffer will be used.
(get-buff-line-list {start} {end} [buffer])
Get a list of lines in a buffer. {Start}
and {end} are 1-based. {Start} is
inclusive, {end} - exclusive.
(set-buff-line-list {start} {end} {string-list} [buffer])
Set a list of lines in a buffer. If
string-list is #f or null, the lines get
deleted. If a list is shorter than
{end}-{start} the remaining lines will
be deleted.
(get-buff-name [buffer]) Get a buffer's text name.
(get-buff-num [buffer]) Get a buffer's number.
(get-buff-size [buffer]) Get buffer line count.
(insert-buff-line-list {linenr} {string/string-list} [buffer])
Insert a list of lines into a buffer after
{linenr}. If {linenr} is 0, lines will be
inserted at start.
(curr-buff) Get the current buffer. Use procedures
from `vimcmd' module to change it.
(buff-count) Get count of total buffers in the editor.
(get-next-buff [buffer]) Get next buffer.
(get-prev-buff [buffer]) Get previous buffer. Return #f when there
are no more buffers.
(open-buff {filename}) Open a new buffer (for file "name")
(get-buff-by-name {buffername}) Get a buffer by its filename or #f
if there is no such buffer.
(get-buff-by-num {buffernum}) Get a buffer by its number (return #f if
there is no buffer with this number).
(get-buff-namespace [buffer]) Get buffer namespace.
Windows *mzscheme-window*
------
(win? {object}) Is object a window?
(win-valid? {object}) Is object a valid window (i.e. corresponds
to the real Vim window)?
(curr-win) Get the current window.
(win-count) Get count of windows.
(get-win-num [window]) Get window number.
(get-win-by-num {windownum}) Get window by its number.
(get-win-buffer [window]) Get the buffer for a given window.
(get-win-height [window])
(set-win-height {height} [window]) Get/Set height of window.
(get-win-width [window])
(set-win-width {width} [window])Get/Set width of window.
(get-win-list [buffer]) Get list of windows for a buffer.
(get-cursor [window]) Get cursor position in a window as
a pair (linenr . column).
(set-cursor (line . col) [window]) Set cursor position.
======================================================================
vim:tw=78:ts=8:sts=4:ft=help:norl:

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 @@
*if_perl.txt* For Vim version 7.0aa. Last change: 2004 May 01
*if_perl.txt* For Vim version 7.0aa. Last change: 2004 Aug 30
VIM REFERENCE MANUAL by Sven Verdoolaege
@@ -156,6 +156,8 @@ VIM::Buffers([{bn}...]) With no arguments, returns a list of all the buffers
numbers {bn}, returns a list of the buffers matching
{bn}, using the same rules as Vim's internal
|bufname()| function.
WARNING: the list becomes invalid when |:bwipe| is
used. Using it anyway may crash Vim.
*perl-Windows*
VIM::Windows([{wn}...]) With no arguments, returns a list of all the windows
@@ -163,6 +165,8 @@ VIM::Windows([{wn}...]) With no arguments, returns a list of all the windows
in a scalar context. For a list of window numbers
{wn}, returns a list of the windows with those
numbers.
WARNING: the list becomes invalid when a window is
closed. Using it anyway may crash Vim.
*perl-DoCommand*
VIM::DoCommand({cmd}) Executes Ex command {cmd}.

View File

@@ -1,4 +1,4 @@
*if_pyth.txt* For Vim version 7.0aa. Last change: 2004 Feb 28
*if_pyth.txt* For Vim version 7.0aa. Last change: 2004 Jul 25
VIM REFERENCE MANUAL by Paul Moore
@@ -91,23 +91,23 @@ module before using it: >
:python import vim
Overview >
print "Hello" # displays a message
vim.command(cmd) # execute an ex command
w = vim.windows[n] # gets window "n"
cw = vim.current.window # gets the current window
b = vim.buffers[n] # gets buffer "n"
cb = vim.current.buffer # gets the current buffer
w.height = lines # sets the window height
w.cursor = (row, col) # sets the window cursor position
pos = w.cursor # gets a tuple (row, col)
name = b.name # gets the buffer file name
line = b[n] # gets a line from the buffer
lines = b[n:m] # gets a list of lines
num = len(b) # gets the number of lines
b[n] = str # sets a line in the buffer
b[n:m] = [str1, str2, str3] # sets a number of lines at once
del b[n] # deletes a line
del b[n:m] # deletes a number of lines
:py print "Hello" # displays a message
:py vim.command(cmd) # execute an ex command
:py w = vim.windows[n] # gets window "n"
:py cw = vim.current.window # gets the current window
:py b = vim.buffers[n] # gets buffer "n"
:py cb = vim.current.buffer # gets the current buffer
:py w.height = lines # sets the window height
:py w.cursor = (row, col) # sets the window cursor position
:py pos = w.cursor # gets a tuple (row, col)
:py name = b.name # gets the buffer file name
:py line = b[n] # gets a line from the buffer
:py lines = b[n:m] # gets a list of lines
:py num = len(b) # gets the number of lines
:py b[n] = str # sets a line in the buffer
:py b[n:m] = [str1, str2, str3] # sets a number of lines at once
:py del b[n] # deletes a line
:py del b[n:m] # deletes a number of lines
Methods of the "vim" module
@@ -115,8 +115,8 @@ Methods of the "vim" module
vim.command(str) *python-command*
Executes the vim (ex-mode) command str. Returns None.
Examples: >
vim.command("set tw=72")
vim.command("%s/aaa/bbb/g")
:py vim.command("set tw=72")
:py vim.command("%s/aaa/bbb/g")
< The following definition executes Normal mode commands: >
def normal(str):
vim.command("normal "+str)
@@ -126,15 +126,15 @@ vim.command(str) *python-command*
< *E659*
The ":python" command cannot be used recursively with Python 2.2 and
older. This only works with Python 2.3 and later: >
:python vim.command("python print 'Hello again Python'")
:py vim.command("python print 'Hello again Python'")
vim.eval(str) *python-eval*
Evaluates the expression str using the vim internal expression
evaluator (see |expression|). Returns the expression result as a
string.
Examples: >
text_width = vim.eval("&tw")
str = vim.eval("12+12") # NB result is a string! Use
:py text_width = vim.eval("&tw")
:py str = vim.eval("12+12") # NB result is a string! Use
# string.atoi() to convert to
# a number.
@@ -158,18 +158,18 @@ Constants of the "vim" module
vim.buffers *python-buffers*
A sequence object providing access to the list of vim buffers. The
object supports the following operations: >
b = vim.buffers[i] # Indexing (read-only)
b in vim.buffers # Membership test
n = len(vim.buffers) # Number of elements
for b in vim.buffers: # Sequential access
:py b = vim.buffers[i] # Indexing (read-only)
:py b in vim.buffers # Membership test
:py n = len(vim.buffers) # Number of elements
:py for b in vim.buffers: # Sequential access
<
vim.windows *python-windows*
A sequence object providing access to the list of vim windows. The
object supports the following operations: >
w = vim.windows[i] # Indexing (read-only)
w in vim.windows # Membership test
n = len(vim.windows) # Number of elements
for w in vim.windows: # Sequential access
:py w = vim.windows[i] # Indexing (read-only)
:py w in vim.windows # Membership test
:py n = len(vim.windows) # Number of elements
:py for w in vim.windows: # Sequential access
<
vim.current *python-current*
An object providing access (via specific attributes) to various
@@ -236,17 +236,21 @@ The buffer object methods are:
represents the part of the given buffer between line
numbers s and e |inclusive|.
Note that when adding a line it must not contain a line break character '\n'.
A trailing '\n' is allowed and ignored, so that you can do: >
:py b.append(f.readlines())
Examples (assume b is the current buffer) >
print b.name # write the buffer file name
b[0] = "hello!!!" # replace the top line
b[:] = None # delete the whole buffer
del b[:] # delete the whole buffer (same as above)
b[0:0] = [ "a line" ] # add a line at the top
del b[2] # delete a line (the third)
b.append("bottom") # add a line at the bottom
n = len(b) # number of lines
(row,col) = b.mark('a') # named mark
r = b.range(1,5) # a sub-range of the buffer
:py print b.name # write the buffer file name
:py b[0] = "hello!!!" # replace the top line
:py b[:] = None # delete the whole buffer
:py del b[:] # delete the whole buffer
:py b[0:0] = [ "a line" ] # add a line at the top
:py del b[2] # delete a line (the third)
:py b.append("bottom") # add a line at the bottom
:py n = len(b) # number of lines
:py (row,col) = b.mark('a') # named mark
:py r = b.range(1,5) # a sub-range of the buffer
==============================================================================
4. Range objects *python-range*

View File

@@ -1,4 +1,4 @@
*indent.txt* For Vim version 7.0aa. Last change: 2004 Apr 25
*indent.txt* For Vim version 7.0aa. Last change: 2005 Feb 24
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -425,8 +425,8 @@ assume a 'shiftwidth' of 4.
The defaults, spelled out in full, are:
cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,gs,hs,ps,ts,+s,c3,C0,(2s,us,
\U0,w0,m0,j0,)20,*30
cinoptions=>s,e0,n0,f0,{0,}0,^0,:s,=s,l0,b0,gs,hs,ps,ts,is,+s,c3,C0,
/0,(2s,us,U0,w0,W0,m0,j0,)20,*30
Vim puts a line in column 1 if:
- It starts with '#' (preprocessor directives), if 'cinkeys' contains '#'.
@@ -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,
@@ -519,4 +533,15 @@ In addition, you can turn the verbose mode for debug issue: >
Make sure to do ":set cmdheight=2" first to allow the display of the message.
VIM *vim-indent*
For indenting Vim scripts there is one variable that specifies the amount of
indent for a continuation line, a line that starts with a backslash: >
:let g:vim_indent_cont = &sw * 3
Three times shiftwidth is the default value.
vim:tw=78:ts=8:ft=help:norl:

View File

@@ -1,4 +1,4 @@
*index.txt* For Vim version 7.0aa. Last change: 2004 Jun 16
*index.txt* For Vim version 7.0aa. Last change: 2005 Feb 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -89,7 +89,7 @@ tag char action ~
|i_CTRL-V_digit| CTRL-V {number} insert three digit decimal number as a single
byte.
|i_CTRL-W| CTRL-W delete word before the cursor
|i_CTRL-X| CTRL-X {mode} enter CTRL-X sub mode, see below
|i_CTRL-X| CTRL-X {mode} enter CTRL-X sub mode, see |i_CTRL-X_index|
|i_CTRL-Y| CTRL-Y insert the character which is above the cursor
|i_CTRL-Z| CTRL-Z when 'insertmode' set: suspend Vim
|i_<Esc>| <Esc> end insert mode (unless 'insertmode' set)
@@ -141,7 +141,7 @@ tag char action ~
|i_<MouseUp>| <MouseUp> scroll three lines upwards
|i_<S-MouseUp>| <S-MouseUp> scroll a full page upwards
commands in CTRL-X submode
commands in CTRL-X submode *i_CTRL-X_index*
|i_CTRL-X_CTRL-D| CTRL-X CTRL-D complete defined identifiers
|i_CTRL-X_CTRL-E| CTRL-X CTRL-E scroll up
@@ -153,6 +153,8 @@ commands in CTRL-X submode
|i_CTRL-X_CTRL-P| CTRL-X CTRL-P previous completion
|i_CTRL-X_CTRL-T| CTRL-X CTRL-T complete identifiers from thesaurus
|i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down
|i_CTRL-X_CTRL-U| CTRL-X CTRL-U complete with 'completefunc'
|i_CTRL-X_CTRL-V| CTRL-X CTRL-V complete like in : command line
|i_CTRL-X_CTRL-]| CTRL-X CTRL-] complete tags
{not available when compiled without the +insert_expand feature}
@@ -326,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
@@ -423,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"
@@ -449,6 +450,8 @@ These can be used after an operator or in Visual mode to select an object.
tag command action in Normal mode ~
------------------------------------------------------------------------------
|v_aquote| a" double quoted string
|v_a'| a' single quoted string
|v_a(| a( same as ab
|v_a)| a) same as ab
|v_a<| a< "a <>" from '<' to the matching '>'
@@ -457,12 +460,15 @@ tag command action in Normal mode ~
|v_aW| aW "a WORD" (with white space)
|v_a[| a[ "a []" from '[' to the matching ']'
|v_a]| a] same as a[
|v_a`| a` string in backticks
|v_ab| ab "a block" from "[(" to "])" (with braces)
|v_ap| ap "a paragraph" (with white space)
|v_as| as "a sentence" (with white space)
|v_aw| aw "a word" (with white space)
|v_a{| a{ same as aB
|v_a}| a} same as aB
|v_iquote| i" double quoted string without the quotes
|v_i'| i' single quoted string without the quotes
|v_i(| i( same as ib
|v_i)| i) same as ib
|v_i<| i< "inner <>" from '<' to the matching '>'
@@ -471,6 +477,7 @@ tag command action in Normal mode ~
|v_iW| iW "inner WORD"
|v_i[| i[ "inner []" from '[' to the matching ']'
|v_i]| i] same as i[
|v_i`| i` string in backticks without the backticks
|v_ib| ib "inner block" from "[(" to "])"
|v_ip| ip "inner paragraph"
|v_is| is "inner sentence"
@@ -800,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>
@@ -807,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}
@@ -1052,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
@@ -1095,12 +1105,14 @@ The commands are sorted on the non-optional part of their name.
|:cunmenu| :cunme[nu] remove menu for Command-line mode
|:cwindow| :cw[indow] open or close quickfix window
|:delete| :d[elete] delete lines
|:delmarks| :delm[arks] delete marks
|:debug| :deb[ug] run a command in debugging mode
|:debuggreedy| :debugg[reedy] read debug mode commands from normal input
|:delcommand| :delc[ommand] delete user-defined command
|:delfunction| :delf[unction] delete a user function
|:diffupdate| :dif[fupdate] update 'diff' buffers
|:diffget| :diffg[et] remove differences in current buffer
|:diffoff| :diffo[ff] switch off diff mode
|:diffpatch| :diffp[atch] apply a patch and show differences
|:diffput| :diffpu[t] remove differences in other buffer
|:diffsplit| :diffs[plit] show differences with another file
@@ -1132,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
@@ -1198,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
@@ -1216,6 +1230,8 @@ The commands are sorted on the non-optional part of their name.
|:mkvimrc| :mkv[imrc] write current mappings and settings to a file
|:mkview| :mkvie[w] write view of current window to a file
|:mode| :mod[e] show or change the screen mode
|:mzscheme| :mz[scheme] execute MzScheme command
|:mzfile| :mzf[ile] execute MzScheme script file
|:next| :n[ext] go to next file in the argument list
|:new| :new create a new empty window
|:nmap| :nm[ap] like ":map" but for Normal mode
@@ -1242,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
@@ -1344,6 +1363,7 @@ The commands are sorted on the non-optional part of their name.
|:stop| :st[op] suspend the editor or escape to a shell
|:stag| :sta[g] split window and jump to a tag
|:startinsert| :star[tinsert] start Insert mode
|:startreplace| :startr[eplace] start Replace mode
|:stopinsert|| :stopi[nsert] stop Insert mode
|:stjump| :stj[ump] do ":tjump" and split window
|:stselect| :sts[elect] do ":tselect" and split window
@@ -1379,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
@@ -1387,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 Jun 16
*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*
@@ -375,6 +379,11 @@ This redefines the backspace key to start a new undo sequence. You can now
undo the effect of the backspace key, without changing what you typed before
that, with CTRL-O u.
Using CTRL-O splits undo: the text typed before and after it is undone
separately. If you want to avoid this (e.g., in a mapping) you might be able
to use CTRL-R = |i_CTRL-R|. E.g., to call a function: >
:imap <F2> <C-R>=MyFunc()<CR>
When the 'whichwrap' option is set appropriately, the <Left> and <Right>
keys on the first/last character in the line make the cursor wrap to the
previous/next line.
@@ -849,6 +858,23 @@ CTRL-X CTRL-V Guess what kind of item is in front of the cursor and
completion, for example: >
:imap <Tab> <C-X><C-V>
User defined completing *compl-function*
Completion is done by a function that can be defined by the user with the
'completefunc' option. See the option for how the function is called and an
example.
*i_CTRL-X_CTRL-U*
CTRL-X CTRL-U Guess what kind of item is in front of the cursor and
find the first match for it.
CTRL-U or
CTRL-N Use the next match. This match replaces the previous
one.
CTRL-P Use the previous match. This match replaces the
previous one.
Completing keywords from different sources *compl-generic*
*i_CTRL-N*
@@ -896,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}
@@ -915,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.
@@ -937,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.
@@ -969,6 +1013,19 @@ NOTE: ":append" and ":insert" don't work properly in between ":if" and
typing <Esc> in Insert mode.
Can be used in an autocommand, example: >
:au BufEnter scratch stopinsert
<
*replacing-ex* *:startreplace*
:startr[eplace][!] Start Replace mode just after executing this command.
Works just like typing "R" in Normal mode. When the
! is included it acts just like "$R" had been typed
(ie. begin replace mode at the end-of-line). Other-
wise replacement begins at the cursor position.
Note that when using this command in a function or
script that the replacement will only start after
the function or script is finished.
{not in Vi}
{not available when compiled without the +ex_extra
feature}
==============================================================================
10. Inserting a file *inserting-file*

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 Jun 16
*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
@@ -742,6 +744,8 @@ is suitable for complex input, such as CJK.
Traditional and Simplified Chinese characters. And it can accept other
locale if you make a correct input table. Xcin can be found at:
http://xcin.linux.org.tw/
Others are scim: http://scim.freedesktop.org/ and fcitx:
http://www.fcitx.org/
- Conversion Server
*conversion-server*
@@ -1315,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.
@@ -1360,7 +1364,7 @@ options.txt for detailed information.
Contributions specifically for the multi-byte features by:
Chi-Deok Hwang <hwang@mizi.co.kr>
Nam SungHyun <namsh@lge.com>
Nam SungHyun <namsh@kldp.org>
K.Nagano <nagano@atese.advantest.co.jp>
Taro Muraoka <koron@tka.att.ne.jp>
Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>

View File

@@ -1,4 +1,4 @@
*message.txt* For Vim version 7.0aa. Last change: 2004 Jan 17
*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
@@ -412,6 +414,12 @@ abandon the buffer forcefully, e.g., with ":qa!". Careful, make sure you
don't throw away changes you really want to keep. You might have forgotten
about a buffer, especially when 'hidden' is set.
>
[No write since last change]
This appears when executing a shell command while at least one buffer was
changed. To avoid the message reset the 'warn' option.
*E38* >
Null argument
@@ -643,6 +651,7 @@ and |+X11| features.
A command line started with a backslash or the range of a command contained a
backslash in a wrong place. This is often caused by command-line continuation
being disabled. Remove the 'C' flag from the 'cpoptions' option to enable it.
Or use ":set nocp".
*E471* >
Argument required

View File

@@ -1,4 +1,4 @@
*motion.txt* For Vim version 7.0aa. Last change: 2004 Jun 17
*motion.txt* For Vim version 7.0aa. Last change: 2005 Feb 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -83,6 +83,7 @@ are however, two general exceptions:
end of the motion is moved to the end of the previous line and the motion
becomes inclusive. Example: "}" moves to the first line after a paragraph,
but "d}" will not include that line.
*exclusive-linewise*
2. If the motion is exclusive, the end of the motion is in column 1 and the
start of the motion was at or before the first non-blank in the line, the
motion becomes linewise. Example: If a paragraph begins with some blanks
@@ -349,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*
@@ -424,20 +429,24 @@ between Vi and Vim.
*]]*
]] [count] sections forward or to the next '{' in the
first column. When used after an operator, then the
'}' in the first column. |linewise|
first column. When used after an operator, then also
stops below a '}' in the first column. |exclusive|
Note that |exclusive-linewise| often applies.
*][*
][ [count] sections forward or to the next '}' in the
first column. |linewise|
first column. |exclusive|
Note that |exclusive-linewise| often applies.
*[[*
[[ [count] sections backward or to the previous '{' in
the first column. |linewise|
the first column. |exclusive|
Note that |exclusive-linewise| often applies.
*[]*
[] [count] sections backward or to the previous '}' in
the first column. |linewise|
the first column. |exclusive|
Note that |exclusive-linewise| often applies.
These commands move over three kinds of text objects.
@@ -456,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
@@ -597,6 +609,26 @@ iB "inner Block", select [count] Blocks, from "[count] [{"
|[{|).
When used in Visual mode it is made characterwise.
a" *v_aquote* *aquote*
a' *v_a'* *a'*
a` *v_a`* *a`*
"a quoted string". Selects the text from the previous
quote until the next quote. The 'quoteescape' is used
to skip escaped quotes.
When the cursor starts on a quote, Vim will figure out
which quote pairs form a string by searching from the
start of the line.
Any trailing or leading white space is included.
When used in Visual mode it is made characterwise.
Repeating this object in Visual mode another string is
included. A count is currently not used.
i" *v_iquote* *iquote*
i' *v_i'* *i'*
i` *v_i`* *i`*
Like a", a' and a`, but exclude the quotes and
repeating won't extend the Visual selection.
When used after an operator:
For non-block objects:
For the "a" commands: The operator applies to the object and the white
@@ -707,6 +739,24 @@ g'{mark} g`{mark}
:marks aB
< to list marks 'a' and 'B'. {not in Vi}
*:delm* *:delmarks*
:delm[arks] {marks} Delete the specified marks. Marks that can be deleted
include A-Z and 0-9. You cannot delete the ' mark.
They can be specified by giving the list of mark
names, or with a range, separated with a dash. Spaces
are ignored. Examples: >
:delmarks a deletes mark a
:delmarks a b 1 deletes marks a, b and 1
:delmarks Aa deletes marks A and a
:delmarks p-z deletes marks in the range p to z
:delmarks ^.[] deletes marks ^ . [ ]
:delmarks \" deletes mark "
< {not in Vi}
:delm[arks]! Delete all marks for the current buffer, but not marks
A-Z or 0-9.
{not in Vi}
A mark is not visible in any way. It is just a position in the file that is
remembered. Do not confuse marks with named registers, they are totally
unrelated.
@@ -771,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|.
@@ -788,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}
*'.* *`.*
@@ -895,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*
@@ -1197,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.

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
*os_amiga.txt* For Vim version 7.0aa. Last change: 2004 Apr 25
*os_amiga.txt* For Vim version 7.0aa. Last change: 2004 Jun 28
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,6 +30,12 @@ the |+digraphs| feature. If you want to use Vim with other terminals you can
recompile with the TERMCAP option. Vim compiles with Manx 5.x and SAS 6.x.
See the makefiles and feature.h.
If you notice Vim crashes on some files when syntax highlighting is on, or
when using a search pattern with nested wildcards, it might be that the stack
is too small. Try increasing the stack size. In a shell use the Stack
command before launching Vim. On the Workbench, select the Vim icon, use the
workbench "Info" menu and change the Stack field in the form.
If you want to use different colors set the termcap codes:
t_mr (for inverted text)
t_md (for bold text)

View File

@@ -1,4 +1,4 @@
*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Jun 19
*os_mac.txt* For Vim version 7.0aa. Last change: 2004 Dec 13
VIM REFERENCE MANUAL by Bram Moolenaar et al.
@@ -9,7 +9,7 @@
This file documents the particularities of the Macintosh version of Vim.
NOTE: This file is a bit outdated. You might find more useful info here:
http://macvim.swdev.org/
http://macvim.org/
1. Filename Convention |mac-filename|
2. .vimrc an .vim files |mac-vimfile|
@@ -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_msdos.txt* For Vim version 7.0aa. Last change: 2001 Sep 03
*os_msdos.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -207,18 +207,24 @@ in such a way that it becomes too long may give unexpected results.
8. Symbolically linked files *msdos-linked-files*
When using Vim to edit a symbolically linked file on a unix NFS file server,
you may run into problems.
When writing the file, Vim does not "write through" the symlink. Instead, it
deletes the symbolic link and creates a new file in its place.
On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
the original file is made and then the original file is overwritten. This
assures that all properties of the file remain the same. On non-Unix systems,
the original file is renamed and a new file is written. Only the protection
bits are set like the original file. However, this doesn't work properly when
you may run into problems. When writing the file, Vim does not "write
through" the symlink. Instead, it deletes the symbolic link and creates a new
file in its place.
On Unix, Vim is prepared for links (symbolic or hard). A backup copy of the
original file is made and then the original file is overwritten. This assures
that all properties of the file remain the same. On non-Unix systems, the
original file is renamed and a new file is written. Only the protection bits
are set like the original file. However, this doesn't work properly when
working on an NFS-mounted file system where links and other things exist. The
only way to fix this in the current version is not making a backup file, by
":set nobackup nowritebackup" |'writebackup'|
A similar problem occurs when mounting a Unix filesystem through Samba or a
similar system. When Vim creates a new file it will get the default user ID
for the mounted file system. This may be different from the original user ID.
To avoid this set the 'backupcopy' option to "yes".
==============================================================================
9. Copy/paste in a dos box *msdos-copy-paste*

View File

@@ -1,4 +1,4 @@
*os_win32.txt* For Vim version 7.0aa. Last change: 2004 May 01
*os_win32.txt* For Vim version 7.0aa. Last change: 2004 Aug 31
VIM REFERENCE MANUAL by George Reilly
@@ -184,8 +184,9 @@ A. There are no good reasons to run the 16-bit DOS version on NT. The Win32
runs on top of an 80x86 emulator.
Q. How do I change the font?
A. In the GUI version, you can use the 'guifont' option.
In the console version, you need to set the font of the console itself.
A. In the GUI version, you can use the 'guifont' option. Example: >
:set guifont=Lucida_Console:h15:cDEFAULT
< In the console version, you need to set the font of the console itself.
You cannot do this from within Vim.
Q. When I change the size of the console window with ':set lines=xx' or
@@ -249,6 +250,16 @@ A. On Unix, Vim is prepared for links (symbolic or hard). A backup copy of
things exist. The only way to fix this in the current version is not
making a backup file, by ":set nobackup nowritebackup" |'writebackup'|
Q. I'm using Vim to edit a file on a Unix file server through Samba. When I
write the file, the owner of the file is changed. Why?
A. When writing a file Vim renames the original file, this is a backup (in
case writing the file fails halfway). Then the file is written as a new
file. Samba then gives it the default owner for the file system, which may
differ from the original owner.
To avoid this set the 'backupcopy' option to "yes". Vim will then make a
copy of the file for the backup, and overwrite the original file. The
owner isn't changed then.
Q. How do I get to see the output of ":make" while it's running?
A. Basically what you need is to put a tee program that will copy its input
(the output from make) to both stdout and to the errorfile. You can find a

View File

@@ -1,4 +1,4 @@
*pattern.txt* For Vim version 7.0aa. Last change: 2004 May 09
*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|.
@@ -382,7 +387,7 @@ More explanation and examples below, follow the links.
|/\%c| \%23c \%23c in column 23 |/zero-width|
|/\%v| \%23v \%23v in virtual column 23 |/zero-width|
Character classes {not in Vi}:
Character classes {not in Vi}: */character-classes*
|/\i| \i \i identifier character (see 'isident' option)
|/\I| \I \I like "\i", but excluding digits
|/\k| \k \k keyword character (see 'iskeyword' option)
@@ -431,7 +436,7 @@ Character classes {not in Vi}:
x x a character with no special meaning matches itself
|/[]| [] \[] any character specified inside the []
|/\%[]| \%[] \%[] a list of optionally matched atoms
|/\%[]| \%[] \%[] a sequence of optionally matched atoms
|/\c| \c \c ignore case
|/\C| \C \C match case
@@ -442,6 +447,12 @@ Character classes {not in Vi}:
|/\Z| \Z \Z ignore differences in Unicode "combining characters".
Useful when searching voweled Hebrew or Arabic text.
|/\%d| \%d \%d match specified decimal character (eg \%d123
|/\%x| \%x \%x match specified hex character (eg \%x2a)
|/\%o| \%o \%o match specified octal character (eg \%o040)
|/\%u| \%u \%u match specified multibyte character (eg \%u20ac)
|/\%U| \%U \%U match specified large multibyte character (eg
\%U12345678)
Example matches ~
\<\I\i* or
@@ -511,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.
@@ -566,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
@@ -971,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\\]".
@@ -988,6 +1005,11 @@ x A single character, with no special meaning, matches itself
\t <Tab>
\r <CR> (NOT end-of-line!)
\b <BS>
\d123 decimal number of character
\o40 octal number of character up to 0377
\x20 hexadecimal number of character up to 0xff
\u20AC hex. number of multibyte character up to 0xffff
\U1234 hex. number of multibyte character up to 0xffffffff
NOTE: The other backslash codes mentioned above do not work inside
[]!
- Matching with a collection can be slow, because each character in
@@ -996,7 +1018,7 @@ x A single character, with no special meaning, matches itself
much faster than "[0-9]" and matches the same characters.
*/\%[]* *E69* *E70* *E369*
\%[] A list of optionally matched atoms. This always matches.
\%[] A sequence of optionally matched atoms. This always matches.
It matches as much of the list of atoms it contains as possible. Thus
it stops at the first atom that doesn't match. For example: >
/r\%[ead]
@@ -1011,6 +1033,17 @@ 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*
\%d123 Matches the character specified with a decimal number. Must be
followed by a non-digit.
\%o40 Matches the character specified with an octal number up to 0377.
Numbers below 040 must be followed by a non-octal digit or a non-digit.
\%x2a Matches the character specified with up to two hexadecimal characters.
\%u20AC Matches the character specified with up to four hexadecimal
characters.
\%U1234abcd Matches the character specified with up to eight hexadecimal
characters.
==============================================================================
7. Ignoring case in a pattern */ignorecase*

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: Jun 15, 2004
*pi_netrw.txt* For Vim version 6.3. Last change: Oct 08, 2004
VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
@@ -16,10 +16,11 @@
4. Transparent File Transfer...........................|netrw-transparent|
5. Ex Commands.........................................|netrw-ex|
6. Variables and Options...............................|netrw-var|
7. Remote Directory Listing............................|netrw-dir|
8. Debugging...........................................|netrw-debug|
9. History.............................................|netrw-history|
10. Credits.............................................|netrw-credits|
7. Directory Browser...................................|netrw-browse|
8. Problems and Fixes..................................|netrw-problems|
9. Debugging...........................................|netrw-debug|
10. History.............................................|netrw-history|
11. Credits.............................................|netrw-credits|
The functionality mentioned here is done via using |standard-plugin|
techniques. This plugin is only available if
@@ -62,31 +63,31 @@ in your <.vimrc> file: >
scp: g:netrw_scp_cmd = "scp -q"
sftp: g:netrw_sftp_cmd = "sftp"
READING
READING *netrw-read* *netrw-nread*
:Nread ? give help
:Nread "machine:file" uses rcp
:Nread "machine file" uses ftp with <.netrc>
:Nread "machine id password file" uses ftp
:Nread "dav://machine[:port]/file" uses cadaver
:Nread "fetch://[user@]machine/file" uses fetch
:Nread "ftp://[user@]machine[[:#]port]/file" uses ftp autodetects <.netrc>
:Nread "http://[user@]machine/file" uses http uses wget
:Nread "rcp://[user@]machine/file" uses rcp
:Nread "rsync://[user@]machine[:port]/file" uses rsync
:Nread "scp://[user@]machine[[:#]port]/file" uses scp
:Nread "sftp://[user@]machine/file" uses sftp
:Nread "machine:path" uses rcp
:Nread "machine path" uses ftp with <.netrc>
:Nread "machine id password path" uses ftp
:Nread "dav://machine[:port]/path" uses cadaver
:Nread "fetch://[user@]machine/path" uses fetch
:Nread "ftp://[user@]machine[[:#]port]/path" uses ftp autodetects <.netrc>
:Nread "http://[user@]machine/path" uses http uses wget
:Nread "rcp://[user@]machine/path" uses rcp
:Nread "rsync://[user@]machine[:port]/path" uses rsync
:Nread "scp://[user@]machine[[:#]port]/path" uses scp
:Nread "sftp://[user@]machine/path" uses sftp
WRITING
WRITING *netrw-write* *netrw-nwrite*
:Nwrite ? give help
:Nwrite "machine:file" uses rcp
:Nwrite "machine file" uses ftp with <.netrc>
:Nwrite "machine id password file" uses ftp
:Nwrite "dav://machine[:port]/file" uses cadaver
:Nwrite "ftp://[user@]machine[[:#]port]/file" uses ftp autodetects <.netrc>
:Nwrite "rcp://[user@]machine/file" uses rcp
:Nwrite "rsync://[user@]machine[:port]/file" uses rsync
:Nwrite "scp://[user@]machine[[:#]port]/file" uses scp
:Nwrite "sftp://[user@]machine/file" uses sftp
:Nwrite "machine:path" uses rcp
:Nwrite "machine path" uses ftp with <.netrc>
:Nwrite "machine id password path" uses ftp
:Nwrite "dav://machine[:port]/path" uses cadaver
:Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp autodetects <.netrc>
:Nwrite "rcp://[user@]machine/path" uses rcp
:Nwrite "rsync://[user@]machine[:port]/path" uses rsync
:Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
:Nwrite "sftp://[user@]machine/path" uses sftp
http: not supported!
DIRECTORY LISTING
@@ -103,7 +104,7 @@ in your <.vimrc> file: >
:call NetUserPass("uid") -- prompts for password
:call NetUserPass("uid","password") -- sets global uid and password
VARIABLES
VARIABLES *netrw-variables*
b:netrw_lastfile last file Network-read/written retained on
a per-buffer basis (supports plain :Nw )
s:netrw_line during Nw/NetWrite, holds current line number
@@ -114,17 +115,37 @@ in your <.vimrc> file: >
=0 use default ftp (uid password)
=1 use alternate ftp method (user uid password)
g:netrw_ftpmode ="binary" (default)
="ascii" (or your choice)
="ascii"
g:netrw_uid (ftp) user-id, retained on a per-session basis
g:netrw_passwd (ftp) password, retained on a per-session basis
g:netrw_win95ftp =0 use unix-style ftp even if win95/win98/winME
=1 use default method to do ftp
g:netrw_win95ftp =1 if using Win95, will remove four trailing blank
lines that o/s's ftp "provides" on transfers
=0 force normal ftp behavior (no trailing line
removal)
g:netrw_cygwin =1 assume scp under windows is from cygwin
Also permits network browsing to use
ls with time and size sorting
(default if windows)
=0 assume scp under windows accepts
windows-style paths (default otherwise)
g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP (default)
=1 use the rcp of WinNT,... in binary mode
=0 assume Windows' scp accepts windows-style paths
Network browsing uses dir instead of ls
This option is ignored if you're using unix
g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP
=1 use WinNT's rcp in binary mode (default)
PATHS *netrw-path*
Paths to files are generally user-directory relative for most protocols.
It is possible that some protocol will make paths relative to some
associated directory, however.
example: vim scp://user@host/somefile
example: vim scp://user@host/subdir1/subdir2/somefile
where "somefile" is the "user"'s home directory. If you wish to get a
file using root-relative paths, use the full path:
example: vim scp://user@host//somefile
example: vim scp://user@host//subdir1/subdir2/somefile
==============================================================================
@@ -152,7 +173,7 @@ transfer/protocol. Files are read from/written to a temporary file
clean up.
One may modify any protocol's implementing external application
by settinbg a variable (ex. scp uses the variable g:netrw_scp_cmd,
by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
which is defaulted to "scp -q").
Ftp, an old protocol, seems to be blessed by numerous implementations.
@@ -414,6 +435,7 @@ variables listed below, and may be modified by the user.
g:netrw_sftp_cmd variable ="sftp" >
-------------------------------------------------------------------------
<
*netrw-ftp*
The first two options both help with certain ftp's that give trouble otherwise.
In order to best understand how to use these options if ftp is giving you
troubles, a bit of discussion follows on how netrw does ftp reads.
@@ -455,6 +477,11 @@ requested it and the temporary file deleted.
If your ftp doesn't accept the "user" command and immediately just demands
a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
*netrw-cadaver*
To handle the SSL certificate dialog for untrusted servers, one may pull
down the certificate and place it into /usr/ssl/cert.pem. This operation
renders the server treatment as "trusted".
*netrw-fixup*
If your ftp for whatever reason generates unwanted lines (such as AUTH
messages) you may write a NetReadFixup(tmpfile) function:
@@ -493,32 +520,455 @@ from <netrw.vim> itself:
>
==============================================================================
7. Remote Directory Listing *netrw-dir* *netrw-list*
7. Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
?..........Help....................................|netrw-help|
<cr>.......Browsing................................|netrw-cr|
<del>......Deleting Files or Directories...........|netrw-delete|
-..........Going Up................................|netrw--|
a..........Hiding Files or Directories.............|netrw-a|
b..........Bookmarking a Directory.................|netrw-b|
B..........Changing to a Bookmarked Directory......|netrw-B|
c..........Make Browsing Directory The Current Dir.|netrw-c|
d..........Make A New Directory....................|netrw-d|
D..........Deleting Files or Directories...........|netrw-D|
<c-h>......Edit File/Directory Hiding List.........|netrw-h|
i..........Long Listing............................|netrw-i|
<c-l>......Refreshing the Listing..................|netrw-ctrl-l|
o..........Browsing with a Horizontal Split........|netrw-o|
p..........Preview Window..........................|netrw-p|
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|
Netrw supports listing (browsing) directories on remote hosts; simply attempt
to read a "file" with a trailing slash and it will be interpreted as a
request to browse a directory:
QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
>
------- -----------
Command Explanation
------- -----------
< ? Causes Netrw to issue help
<cr> Netrw will enter the directory or read the file
<del> Netrw will attempt to remove the file/directory
d Make a directory
D Netrw will attempt to remove the file(s)/directory(ies)
R Netrw will attempt to rename the file(s)/directory(ies)
- Makes Netrw go up one directory
a Toggles between normal display,
hiding (suppress display of files matching g:netrw_list_hide)
showing (display only files which match g:netrw_list_hide)
c Make current browsing directory the current directory
<c-h> Edit file hiding list
i Toggles between long and short listing
<c-l> Causes Netrw to refresh the directory listing
o Enter the file/directory under the cursor in a new browser
window. A horizontal split is used.
r Reverse sorting order
s Select sorting style: by name, time, or file size
v Enter the file/directory under the cursor in a new browser
window. A vertical split is used.
x Apply a function to a file.
NETRW BROWSER VARIABLES *netrw-browse-var*
>
--- -----------
Var Explanation
--- -----------
< g:netrw_alto change from above splitting to
below splitting by setting this
variable (see |netrw-o|)
g:netrw_altv change from left splitting to
right splitting by setting this
variable (see |netrw-v|)
g:netrw_ftp_browse_reject ftp can produce a number of errors
and warnings that can show up as
"directories" and "files" in the
listing. This pattern is used to
remove such embedded messages.
g:netrw_keepdir =1 (default) keep current directory
immune from the browsing directory.
=0 keep the current directory the
same as the browsing directory.
The browsing directory is contained in
b:netrw_curdir
g:netrw_list_cmd command for listing remote directories
g:netrw_longlist if =1, then long listing will be default
g:netrw_ftp_list_cmd options for passing along to ftp for
directory listing. Defaults:
unix or g:netrw_cygwin set: : "ls -lF"
otherwise "dir"
g:netrw_list_hide comma separated list of patterns for
hiding files
g:netrw_local_mkdir command for making a local directory
g:netrw_local_rmdir remove directory command (rmdir)
g:netrw_local_rename rename file/directory command
unix-default: rm win32-default: ren
g:netrw_maxfilenamelen =32 by default, selected so as to make
long listings fit on 80 column displays.
If your screen is wider, and you have
file/directory names longer than 32 bytes,
you may set this option to keep listings
columnar.
g:netrw_mkdir_cmd command for making a remote directory
g:netrw_rm_cmd command for removing files
g:netrw_rmdir_cmd command for removing directories
g:netrw_rmf_cmd command for removing softlinks
g:netrw_hide if true, the hiding list is used
g:netrw_sort_by sort by "name", "time", or "size"
g:netrw_sort_direction sorting direction: "normal" or "reverse"
g:netrw_sort_sequence when sorting by name, first sort by the
comma-separated pattern sequence
g:netrw_timefmt specify format string to strftime() (%c)
g:netrw_winsize specify initial size of new o/v windows
INTRODUCTION TO DIRECTORY BROWSING
Netrw supports the browsing of directories on the local system and on remote
hosts, including generating listing directories, entering directories, editing
files therein, deleting files/directories, making new directories, and moving
(renaming) files and directories. The Netrw browser generally implements the
previous explorer maps and commands for remote directories, although details
(such as pertinent global variable names) necessarily differ.
The Netrw remote file and directory browser handles two protocols: ssh and
ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
in its remote browsing. Any other protocol will be used for file transfers,
but otherwise the ssh protocol will be used to do remote directory browsing.
To enter the netrw directory browser, simply attempt to read a "file" with a
trailing slash and it will be interpreted as a request to list a directory:
vim [protocol]://[user@]hostname/path/
Netrw will modify the command in g:netrw_list to perform the directory listing
operation. By default the command is:
If you'd like to avoid entering the password in for directory listings, scp,
ssh interaction, etc, see |netrw-list-hack|.
ssh HOSTNAME ls -Fa
REFRESHING THE LISTING *netrw-ctrl-l*
where the HOSTNAME becomes the hostname as requested by the attempted
To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
hit the <cr> when atop the ./ directory entry in the listing. One may also
refresh a local directory by using ":e .".
GOING UP *netrw--*
To go up a directory, press - or his the <cr> when atop the ../ directory
entry in the listing.
Netrw will modify the command in *g:netrw_list_cmd* to perform the directory
listing operation. By default the command is:
ssh HOSTNAME ls -FLa
where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
read. Naturally, the user may override this command with whatever is
preferred. The NetList function which implements remote directory
browsing expects that directories will be flagged by a trailing slash.
preferred. The NetList function which implements remote directory browsing
expects that directories will be flagged by a trailing slash.
BROWSING *netrw-cr*
Browsing is simple: move the cursor onto a file or directory of interest.
Hitting the <cr> (the return key) will select the file or directory. Directories
will themselves be listed, and files will be opened using the protocol given
in the original read request.
Hitting the <cr> (the return key) will select the file or directory.
Directories will themselves be listed, and files will be opened using the
protocol given in the original read request.
LONG VS SHORT LISTING *netrw-i*
The short listing format gives just the files' and directories' names.
The long listing is either based on the "ls" command via ssh for remote
directories or displays the filename, file size (in bytes), and the
time and date of last modification for local directories.
MAKING A NEW DIRECTORY *netrw-d*
With the "d" map one may make a new directory either remotely (which
depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
the global variable g:netrw_local_mkdir). Netrw will issue a request for the
new directory's name. A bare <CR> at that point will abort the making of the
directory. Attempts to make a local directory that already exists (as either
a file or a directory) will be detected, reported on, and ignored.
DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
Deleting/removing files and directories involves moving the cursor to the
file/directory to be deleted and pressing "D". Directories must be empty first
before they can be successfully removed. If the directory is a softlink to a
directory, then netrw will make two requests to remove the directory before
succeeding. Netrw will ask for confirmation before doing the removal(s).
You may select a range of lines with the "V" command (visual selection),
and then pressing "D".
*g:netrw_rm_cmd*
The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
to control the attempts to remove files and directories. The g:netrw_rm_cmd
is used with files, and its default value is:
g:netrw_rm_cmd: ssh HOSTNAME rm
*g:netrw_rmdir_cmd*
The g:netrw_rmdir_cmd variable is used to support the removal of directories.
Its default value is:
g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
*g:netrw_rmf_cmd*
If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
g:netrw_rmf_cmd: ssh HOSTNAME rm -f
RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R*
Renaming/moving files and directories involves moving the cursor to the
file/directory to be moved (renamed) and pressing "R". You will then be
queried for where you want the file/directory to be moved. You may select a
range of lines with the "V" command (visual selection), and then pressing "R".
The g:netrw_rename_cmd variable is used to implement renaming. By default its
value is:
ssh HOSTNAME mv
One may rename a block of files and directories by selecting them with
the V (|linewise-visual|).
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
which match. The g:netrw_list_hide variable holds a comma delimited list
of patterns (ex. \.obj) which specify the hiding list. (also see |netrw-h|)
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
either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o*
Normally one enters a file or directory using the <cr>. However, the "o" map
allows one to open a new window to hold the new directory listing or file. A
horizontal split is used. (for vertical splitting, see |netrw-v|)
Normally, the o key splits the window horizontally with the new window
and cursor at the top. To change to splitting the window horizontally
with the new window and cursor at the bottom, have
let g:netrw_alto = 1
in your <.vimrc>.
PREVIEW WINDOW
One may use a preview window (currently only for local browsing) by using
the "p" key when the cursor is atop the desired filename to be previewed.
SELECTING SORTING STYLE *netrw-s*
One may select the sorting style by name, time, or (file) size. The
"s" map allows one to circulate among the three choices; the directory
listing will automatically be refreshed to reflect the selected style.
EDITING THE SORTING SEQUENCE *netrw-S*
When "Sorted by" is name, one may specify priority via the sorting
sequence (g:netrw_sort_sequence). The sorting sequence typically
prioritizes the name-listing by suffix, although any pattern will do.
Patterns are delimited by commas. The default sorting sequence is:
>
/$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
<
The lone * is where all filenames not covered by one of the other
patterns will end up. One may change the sorting sequence by modifying
the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
or by using the "S" map.
REVERSING SORTING ORDER *netrw-r*
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"
map allows one to open a new window to hold the new directory listing or
file. A vertical split is used. (for horizontal splitting, see |netrw-o|)
Normally, the v key splits the window vertically with the new window
and cursor at the left. To change to splitting the window vertically
with the new window and cursor at the right, have
let g:netrw_altv = 1
in your <.vimrc>.
CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x*
One may "enter" a file with a special handler, thereby firing up a browser or
other application, for example, on a file by hitting the "x" key. Presumably
one could write handlers that would start OpenOffice programs (oowriter), etc,
based on the file's extension coupled with the user's hitting the "x" key atop
the file.
The Netrw executor applies a user-defined function to a file, based on its
extension. Of course, the handler function must exist for it to be called!
>
Ex. mypgm.html x ->
NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
<
See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
file with mozilla.
MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
By default, g:netrw_keepdir is 1. This setting means that the current
directory will not track the browsing directory. However, setting
g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
currently browsed directory be the current directory.
With the default setting for g:netrw_keepdir, in order to make the two
directories the same, use the "c" map (just type c). That map will set
the current directory to the current browsing directory.
BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks*
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. 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*
To change directory back to a bookmarked directory, use
{cnt}B
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 AND HISTORY *netrw-q*
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*
Especially with the remote directory browser, constantly entering the password
is tedious.
For Linux/Unix systems, I suggest looking into
http://hacks.oreilly.com/pub/h/66
It gives a tip for setting up password-less use of ssh and scp, and discusses
the associated security issues.
==============================================================================
8. Debugging *netrw-debug*
8. Problems and Fixes *netrw-problems*
(This section is likely to grow as I get feedback)
(also see |netrw-debug|)
P1. I use windows 95, and my ftp dumps four blank lines at the
end of every read.
See |netrw-fixup|, and put the following into your
<.vimrc> file:
let g:netrw_win95ftp= 1
P2. I use windows, and my network browsing with ftp doesn't sort by
time or size
Windows' ftp has a minimal support for ls (ie. it doesn't
accept sorting options). It doesn't support the -F which
gives an explanatory character (ABC/ for "ABC is a directory").
Netrw uses dir to get its short and long listings. If you
think your ftp does support a full-up ls, put the following
into your <.vimrc>:
let g:netrw_ftp_list_cmd= "ls -lF"
Alternatively, if you have cygwin on your Windows box, put
into your <.vimrc>:
let g:netrw_cygwin= 1
P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
used ssh! That wasn't what I asked for...
Netrw has two methods for browsing remote directories: ssh
and ftp. Unless you specify ftp specifically, ssh is used.
When it comes time to do download a file (not just a directory
listing), netrw will use the given protocol to do so.
P4. I would like long listings to be the default.
let g:netrw_longlist=1
Check out |netrw-browse-var| for more customizations that
you can set.
P5. My times come up oddly in local browsing
Does your system's strftime() accept the "%c" to yield dates
such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
and find out what option should be used. Then put it into
your <.vimrc>:
let g:netrw_timefmt= "%X" (where X is the option)
P6. I want my current directory to track my browsing.
How do I do that?
let g:netrw_keepdir= 0
==============================================================================
9. Debugging *netrw-debug*
The <netrw.vim> script is typically available as:
@@ -533,48 +983,114 @@ which is loaded automatically at startup (assuming :set nocp).
or
http://vim.sourceforge.net/scripts/script.php?script_id=120
and put it into your local plugin directory
and put it into your local plugin directory.
2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
to put it into your .vim/plugin, too. You may obtain it from:
2. Edit the <netrw.vim> file as follows:
http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
as "DrC's Utilities"
3. Edit the <netrw.vim> file by typing:
vim netrw.vim
:DechoOn
:wq
(to restore to normal, use :DechoOff )
To restore to normal non-debugging behavior, edit <netrw.vim>
by typing
3. Then bring up vim and attempt a transfer. A set of messages
vim netrw.vim
:DechoOff
:wq
This command, provided by <Decho.vim>, will comment out all
Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
4. Then bring up vim and attempt a transfer. A set of messages
should appear concerning the steps that <netrw.vim> took in
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
==============================================================================
9. History *netrw-history*
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
from :file ..name.. commands
* 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
* (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
directory as the current directory (normally the local file
browser makes the currently viewed directory the current
directory)
* g:netrw_alto and g:netrw_altv now support alternate placement
of windows started with o or v
* Nread ? and Nwrite ? now uses echomsg (instead of echo) so
:messages can repeat showing the help
* bugfix: avoids problems with partial matches of directory names
to prior buffers with longer names
* one can suppress error messages with g:netrw_quiet ctrl-h used
* instead of <Leader>h for editing hiding list one may edit the
* sorting sequence with the S map now allows confirmation of
* deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
* special file viewing with:
(windows) rundll32 url.dll (gnome) gnome-open (kde)
kfmclient If none of these are on the executable path, then
NetrwFileHandlers.vim is used.
* directory bookmarking during both local and remote browsing
implemented
* one may view all, use the hiding list to suppress, or use the
hiding list to show-only remote and local file/directory
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
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 "rsync -a" to just "rsync"
* 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
"rsync -a" to just "rsync"
* somehow an editing error messed up the test to recognize
use of the fetch method for NetRead.
* more debugging statements included
v43: * moved "Explanation" comments to <pi_netrw.txt> help file
as "Network Reference" (|netrw-ref|)
v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
"Network Reference" (|netrw-ref|)
* <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
* removed superfluous NetRestorePosn() calls
v42: * now does BufReadPre and BufReadPost events on file:///*
and file://localhost/*
v41: * installed file:///* and file://localhost/* handling
v40: * prevents redraw when a protocol error occurs so that the
user may see it
v39: * sftp support
v38: * Now uses NetRestorePosn() calls with Nread/Nwrite commands
v42: * now does BufReadPre and BufReadPost events on file:///* and
file://localhost/* v41: * installed file:///* and
file://localhost/* handling v40: * prevents redraw when a
protocol error occurs so that the user may see it v39: * sftp
support v38: * Now uses NetRestorePosn() calls with
Nread/Nwrite commands
* Temporary files now removed via bwipe! instead of bwipe
(thanks to Dave Roberts)
v37: * Claar's modifications which test if ftp is successful, otherwise
give an error message
(thanks to Dave Roberts) v37: * Claar's modifications which
test if ftp is successful, otherwise give an error message
* After a read, the alternate file was pointing to the temp file.
The temp file buffer is now wiped out.
* removed silent from transfer methods so user can see what's
@@ -582,7 +1098,7 @@ which is loaded automatically at startup (assuming :set nocp).
==============================================================================
10. Credits *netrw-credits*
11. Credits *netrw-credits*
Vim editor by Bram Moolenaar (Thanks, Bram!)
dav support by C Campbell

751
runtime/doc/print.txt Normal file
View File

@@ -0,0 +1,751 @@
*print.txt* For Vim version 7.0aa. Last change: 2004 Jul 05
VIM REFERENCE MANUAL by Bram Moolenaar
Printing *printing*
1. Introduction |print-intro|
2. Print options |print-options|
3. PostScript Printing |postscript-printing|
4. PostScript Printing Encoding |postscript-print-encoding|
5. PostScript CJK Printing |postscript-cjk-printing|
6. PostScript Printing Troubleshooting |postscript-print-trouble|
7. PostScript Utilities |postscript-print-util|
8. Formfeed Characters |printing-formfeed|
{Vi has None of this}
{only available when compiled with the |+printer| feature}
==============================================================================
1. Introduction *print-intro*
On MS-Windows Vim can print your text on any installed printer. On other
systems a PostScript file is produced. This can be directly sent to a
PostScript printer. For other printers a program like ghostscript needs to be
used.
*:ha* *:hardcopy* *E237* *E238* *E324*
:[range]ha[rdcopy][!] [arguments]
Send [range] lines (default whole file) to the
printer.
On MS-Windows a dialog is displayed to allow selection
of printer, paper size etc. To skip the dialog, use
the [!]. In this case the printer defined by
'printdevice' is used, or, if 'printdevice' is empty,
the system default printer.
For systems other than MS-Windows, PostScript is
written in a temp file and 'printexpr' is used to
actually print it. Then [arguments] can be used by
'printexpr' through |v:cmdarg|. Otherwise [arguments]
is ignored. 'printoptions' can be used to specify
paper size, duplex, etc.
:[range]ha[rdcopy][!] >{filename}
As above, but write the resulting PostScript in file
{filename}.
Things like "%" are expanded |cmdline-special|
Careful: An existing file is silently overwritten.
{only available when compiled with the |+postscript|
feature}
On MS-Windows use the "print to file" feature of the
printer driver.
Progress is displayed during printing as a page number and a percentage. To
abort printing use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).
Printer output is controlled by the 'printfont' and 'printoptions' options.
'printheader' specifies the format of a page header.
The printed file is always limited to the selected margins, irrespective of
the current window's 'wrap' or 'linebreak' settings. The "wrap" item in
'printoptions' can be used to switch wrapping off.
The current highlighting colors are used in the printout, with the following
considerations:
1) The normal background is always rendered as white (i.e. blank paper.)
2) White text or the default foreground is rendered as black, so that it shows
up!
3) If 'background' is "dark", then the colours are darkened to compensate for
the fact that otherwise they would be too bright to show up clearly on
white paper.
==============================================================================
2. Print options *print-options*
Here are the details for the options that change the way printing is done.
For generic info about setting options see |options.txt|.
*pdev-option*
'printdevice' 'pdev' string (default empty)
global
This defines the name of the printer to be used when the |:hardcopy| command
is issued with a bang (!) to skip the printer selection dialog. On Win32, it
should be the printer name exactly as it appears in the standard printer
dialog.
If the option is empty, then vim will use the system default printer for
":hardcopy!"
*penc-option* *E620*
'printencoding' 'penc' String (default empty, except for:
Windows, OS/2: cp1252,
Macintosh: mac-roman,
VMS: dec-mcs,
HPUX: hp-roman8,
EBCDIC: ebcdic-uk)
global
Sets the character encoding used when printing. This option tells VIM which
print character encoding file from the "print" directory in 'runtimepath' to
use.
This option will accept any value from |encoding-names|. Any recognized names
are converted to VIM standard names - see 'encoding' for more details. Names
not recognized by VIM will just be converted to lower case and underscores
replaced with '-' signs.
If 'printencoding' is empty or VIM cannot find the file then it will use
'encoding' (if VIM is compiled with |+multi_byte| and it is set an 8-bit
encoding) to find the print character encoding file. If VIM is unable to find
a character encoding file then it will use the "latin1" print character
encoding file.
When 'encoding' is set to a multi-byte encoding, VIM will try to convert
characters to the printing encoding for printing (if 'printencoding' is empty
then the conversion will be to latin1). Conversion to a printing encoding
other than latin1 will require VIM to be compiled with the |+iconv| feature.
If no conversion is possible then printing will fail. Any characters that
cannot be converted will be replaced with upside down question marks.
Four print character encoding files are provided to support default Mac, VMS,
HPUX, and EBCDIC character encodings and are used by default on these
platforms. Code page 1252 print character encoding is used by default on
Windows and OS/2 platforms.
*pexpr-option*
'printexpr' 'pexpr' String (default: see below)
global
Expression that is evaluated to print the PostScript produced with
|:hardcopy|.
The file name to be printed is in |v:fname_in|.
The arguments to the ":hardcopy" command are in |v:cmdarg|.
The expression must take care of deleting the file after printing it.
When there is an error, the expression must return a non-zero number.
If there is no error, return zero or an empty string.
The default for non MS-Windows or VMS systems is to simply use "lpr" to print
the file: >
system('lpr' . (&printdevice == '' ? '' : ' -P' . &printdevice)
. ' ' . v:fname_in) . delete(v:fname_in) + v:shell_error
On MS-Dos, MS-Windows and OS/2 machines the default is to copy the file to the
currently specified printdevice: >
system('copy' . ' ' . v:fname_in . (&printdevice == ''
? ' LPT1:' : (' \"' . &printdevice . '\"')))
. delete(v:fname_in)
On VMS machines the default is to send the file to either the default or
currently specified printdevice: >
system('print' . (&printdevice == '' ? '' : ' /queue=' .
&printdevice) . ' ' . v:fname_in) . delete(v:fname_in)
If you change this option, using a function is an easy way to avoid having to
escape all the spaces. Example: >
:set printexpr=PrintFile(v:fname_in)
:function PrintFile(fname)
: call system("ghostview " . a:fname)
: call delete(a:fname)
: return v:shell_error
:endfunc
Be aware that some print programs return control before they have read the
file. If you delete the file too soon it will not be printed. These programs
usually offer an option to have them remove the file when printing is done.
*E365*
If evaluating the expression fails or it results in a non-zero number, you get
an error message. In that case Vim will delete the file. In the default
value for non-MS-Windows a trick is used: Adding "v:shell_error" will result
in a non-zero number when the system() call fails.
This option cannot be set from a |modeline| or in the |sandbox|, for security
reasons.
*pfn-option* *E613*
'printfont' 'pfn' string (default "courier")
global
This is the name of the font that will be used for the |:hardcopy| command's
output. It has the same format as the 'guifont' option, except that only one
font may be named, and the special "guifont=*" syntax is not available.
In the Win32 GUI version this specifies a font name with its extra attributes,
as with the 'guifont' option.
For other systems, only ":h11" is recognized, where "11" is the point size of
the font. When omitted, the point size is 10.
*pheader-option*
'printheader' 'pheader' string (default "%<%f%h%m%=Page %N")
global
This defines the format of the header produced in |:hardcopy| output. The
option is defined in the same way as the 'statusline' option. If Vim has not
been compiled with the |+statusline| feature, this option has no effect and a
simple default header is used, which shows the page number.
*pmbcs-option*
'printmbcharset' 'pmbcs' string (default "")
global
Sets the CJK character set to be used when generating CJK output from
|:hardcopy|. The following predefined values are currently recognised by VIM:
Value Description ~
Chinese GB_2312-80
(Simplified) GBT_12345-90
MAC Apple Mac Simplified Chinese
GBT-90_MAC GB/T 12345-90 Apple Mac Simplified
Chinese
GBK GBK (GB 13000.1-93)
ISO10646 ISO 10646-1:1993
Chinese CNS_1993 CNS 11643-1993, Planes 1 & 2
(Traditional) BIG5
ETEN Big5 with ETen extensions
ISO10646 ISO 10646-1:1993
Japanese JIS_C_1978
JIS_X_1983
JIS_X_1990
MSWINDOWS Win3.1/95J (JIS X 1997 + NEC +
IBM extensions)
KANJITALK6 Apple Mac KanjiTalk V6.x
KANJITALK7 Apple Mac KanjiTalk V7.x
Korean KS_X_1992
MAC Apple Macintosh Korean
MSWINDOWS KS X 1992 with MS extensions
ISO10646 ISO 10646-1:1993
Only certain combinations of the above values and 'printencoding' are
possible. The following tables show the valid combinations:
euc-cn gbk ucs-2 utf-8 ~
Chinese GB_2312-80 x
(Simplified) GBT_12345-90 x
MAC x
GBT-90_MAC x
GBK x
ISO10646 x x
euc-tw big5 ucs-2 utf-8 ~
Chinese CNS_1993 x
(Traditional) BIG5 x
ETEN x
ISO10646 x x
euc-jp sjis ucs-2 utf-8 ~
Japanese JIS_C_1978 x x
JIS_X_1983 x x
JIS_X_1990 x x x
MSWINDOWS x
KANJITALK6 x
KANJITALK7 x
euc-kr cp949 ucs-2 utf-8 ~
Korean KS_X_1992 x
MAC x
MSWINDOWS x
ISO10646 x x
To set up the correct encoding and character set for printing some
Japanese text you would do the following; >
:set printencoding=euc-jp
:set printmbcharset=JIS_X_1983
If 'printmbcharset' is not one of the above values then it is assumed to
specify a custom multi-byte character set and no check will be made that it is
compatible with the value for 'printencoding'. VIM will look for a file
defining the character set in the "print" directory in 'runtimepath'.
*pmbfn-option*
'printmbfont' 'pmbfn' string (default "")
global
This is a comma-separated list of fields for font names to be used when
generating CJK output from |:hardcopy|. Each font name has to be preceded
with a letter indicating the style the font is to be used for as follows:
r:{font-name} font to use for normal characters
b:{font-name} font to use for bold characters
i:{font-name} font to use for italic characters
o:{font-name} font to use for bold-italic characters
A field with the r: prefix must be specified when doing CJK printing. The
other fontname specifiers are optional. If a specifier is missing then
another font will be used as follows:
if b: is missing, then use r:
if i: is missing, then use r:
if o: is missing, then use i:
Some CJK fonts do not contain characters for codes in the ASCII code range.
Also, some characters in the CJK ASCII code ranges differ in a few code points
from traditional ASCII characters. There are two additional fields to control
printing of characters in the ASCII code range.
c:yes Use Courier font for characters in the ASCII
c:no (default) code range.
a:yes Use ASCII character set for codes in the ASCII
a:no (default) code range.
The following is an example of specifying two multi-byte fonts, one for normal
and italic printing and one for bold and bold-italic printing, and using
Courier to print codes in the ASCII code range but using the national
character set: >
:set printmbfont=r:WadaMin-Regular,b:WadaMin-Bold,c:yes
<
*popt-option*
'printoptions' 'popt' string (default "")
global
This is a comma-separated list of items that control the format of the output
of |:hardcopy|:
left:{spec} left margin (default: 10pc)
right:{spec} right margin (default: 5pc)
top:{spec} top margin (default: 5pc)
bottom:{spec} bottom margin (default: 5pc)
{spec} is a number followed by "in" for inches, "pt"
for points (1 point is 1/72 of an inch), "mm" for
millimeters or "pc" for a percentage of the media
size.
Weird example:
left:2in,top:30pt,right:16mm,bottom:3pc
If the unit is not recognized there is no error and
the default value is used.
header:{nr} Number of lines to reserve for the header.
Only the first line is actually filled, thus when {nr}
is 2 there is one empty line. The header is formatted
according to 'printheader'.
header:0 Do not print a header.
header:2 (default) Use two lines for the header
syntax:n Do not use syntax highlighting. This is faster and
thus useful when printing large files.
syntax:y Do syntax highlighting.
syntax:a (default) Use syntax highlighting if the printer appears to be
able to print color or grey.
number:y Include line numbers in the printed output.
number:n (default) No line numbers.
wrap:y (default) Wrap long lines.
wrap:n Truncate long lines.
duplex:off Print on one side.
duplex:long (default) Print on both sides (when possible), bind on long
side.
duplex:short Print on both sides (when possible), bind on short
side.
collate:y (default) Collating: 1 2 3, 1 2 3, 1 2 3
collate:n No collating: 1 1 1, 2 2 2, 3 3 3
jobsplit:n (default) Do all copies in one print job
jobsplit:y Do each copy as a separate print job. Useful when
doing N-up postprocessing.
portrait:y (default) Orientation is portrait.
portrait:n Orientation is landscape.
*a4* *letter*
paper:A4 (default) Paper size: A4
paper:{name} Paper size from this table:
{name} size in cm size in inch ~
10x14 25.4 x 35.57 10 x 14
A3 29.7 x 42 11.69 x 16.54
A4 21 x 29.7 8.27 x 11.69
A5 14.8 x 21 5.83 x 8.27
B4 25 x 35.3 10.12 x 14.33
B5 17.6 x 25 7.17 x 10.12
executive 18.42 x 26.67 7.25 x 10.5
folio 21 x 33 8.27 x 13
ledger 43.13 x 27.96 17 x 11
legal 21.59 x 35.57 8.5 x 14
letter 21.59 x 27.96 8.5 x 11
quarto 21.59 x 27.5 8.5 x 10.83
statement 13.97 x 21.59 5.5 x 8.5
tabloid 27.96 x 43.13 11 x 17
formfeed:n (default) Treat form feed characters (0x0c) as a normal print
character.
formfeed:y When a form feed character is encountered, continue
printing of the current line at the beginning of the
first line on a new page.
The item indicated with (default) is used when the item is not present. The
values are not always used, especially when using a dialog to select the
printer and options.
Example: >
:set printoptions=paper:letter,duplex:off
==============================================================================
3. PostScript Printing *postscript-printing*
*E455* *E456* *E457* *E624*
Provided you have enough disk space there should be no problems generating a
PostScript file. You need to have the runtime files correctly installed (if
you can find the help files, they probably are).
There are currently a number of limitations with PostScript printing:
- 'printfont' - The font name is ignored (the Courier family is always used -
it should be available on all PostScript printers) but the font size is
used.
- 'printoptions' - The duplex setting is used when generating PostScript
output, but it is up to the printer to take notice of the setting. If the
printer does not support duplex printing then it should be silently ignored.
Some printers, however, don't print at all.
- 8-bit support - While a number of 8-bit print character encodings are
supported it is possible that some characters will not print. Whether a
character will print depends on the font in the printer knowing the
character. Missing characters will be replaced with an upside down question
mark, or a space if that character is also not known by the font. It may be
possible to get all the characters in an encoding to print by installing a
new version of the Courier font family.
- Multi-byte support - Currently VIM will try to convert multi-byte characters
to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
empty). Any characters that are not successfully converted are shown as
unknown characters. Printing will fail if VIM cannot convert the multi-byte
to the 8-bit encoding.
==============================================================================
4. Custom 8-bit Print Character Encodings *postscript-print-encoding*
*E618* *E619*
To use your own print character encoding when printing 8-bit character data
you need to define your own PostScript font encoding vector. Details on how
to to define a font encoding vector is beyond the scope of this help file, but
you can find details in the PostScript Language Reference Manual, 3rd Edition,
published by Addison-Wesley and available in PDF form at
http://www.adobe.com/. The following describes what you need to do for VIM to
locate and use your print character encoding.
i. Decide on a unique name for your encoding vector, one that does not clash
with any of the recognized or standard encoding names that VIM uses (see
|encoding-names| for a list), and that no one else is likely to use.
ii. Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
'runtimepath' and rename it with your unique name.
iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
with your unique name (don't forget the line starting %%Title:), and
modify the array of glyph names to define your new encoding vector. The
array must have exactly 256 entries or you will not be able to print!
iv. Within VIM, set 'printencoding' to your unique encoding name and then
print your file. VIM will now use your custom print character encoding.
VIM will report an error with the resource file if you change the order or
content of the first 3 lines, other than the name of the encoding on the line
starting %%Title: or the version number on the line starting %%Version:.
[Technical explanation for those that know PostScript - VIM looks for a file
with the same name as the encoding it will use when printing. The file
defines a new PostScript Encoding resource called /VIM-name, where name is the
print character encoding VIM will use.]
==============================================================================
5. PostScript CJK Printing *postscript-cjk-printing*
*E673* *E674* *E675*
VIM supports printing of Chinese, Japanese, and Korean files. Setting up VIM
to correctly print CJK files requires setting up a few more options.
Each of these countries has many standard character sets and encodings which
require that both be specified when printing. In addition, CJK fonts normally
do not have the concept of italic glyphs and use different weight or stroke
style to achieve emphasis when printing. This in turn requires a different
approach to specifying fonts to use when printing.
The encoding and character set are specified with the 'printencoding' and
'printmbcharset' options. If 'printencoding' is not specified then 'encoding'
is used as normal. If 'printencoding' is specified then characters will be
translated to this encoding for printing. You should ensure that the encoding
is compatible with the character set needed for the file contents or some
characters may not appear when printed.
The fonts to use for CJK printing are specified with 'printmbfont'. This
option allows you to specify different fonts to use when printing characters
which are syntax highlighted with the font styles normal, italic, bold and
bold-italic.
No CJK fonts are supplied with VIM. There are some free Korean, Japanese, and
Traditional Chinese fonts available at:
http://examples.oreilly.com/cjkvinfo/adobe/samples/
You can find descriptions of the various fonts in the read me file at
http://examples.oreilly.com/cjkvinfo/adobe/00README
Please read your printer documentation on how to install new fonts.
CJK fonts can be large containing several thousand glyphs, and it is not
uncommon to find that they only contain a subset of a national standard. It
is not unusual to find the fonts to not include characters for codes in the
ASCII code range. If you find half-width Roman characters are not appearing
in your printout then you should configure VIM to use the Courier font the
half-width ASCII characters with 'printmbfont'. If your font does not include
other characters then you will need to find another font that does.
Another issue with ASCII characters, is that the various national character
sets specify a couple of different glyphs in the ASCII code range. If you
print ASCII text using the national character set you may see some unexpected
characters. If you want true ASCII code printing then you need to configure
VIM to output ASCII characters for the ASCII code range with 'printmbfont'.
It is possible to define your own multi-byte character set although this
should not be attempted lightly. A discussion on the process if beyond the
scope of these help files. You can find details on CMap (character map) files
in the document 'Adobe CMap and CIDFont Files Specification, Version 1.0',
available from http://www.adobe.com as a PDF file.
==============================================================================
6. PostScript Printing Troubleshooting *postscript-print-trouble*
*E621*
Usually the only sign of a problem when printing with PostScript is that your
printout does not appear. If you are lucky you may get a printed page that
tells you the PostScript operator that generated the error that prevented the
print job completing.
There are a number of possible causes as to why the printing may have failed:
- Wrong version of the prolog resource file. The prolog resource file
contains some PostScript that VIM needs to be able to print. Each version
of VIM needs one particular version. Make sure you have correctly installed
the runtime files, and don't have any old versions of a file called prolog
in the print directory in your 'runtimepath' directory.
- Paper size. Some PostScript printers will abort printing a file if they do
not support the requested paper size. By default VIM uses A4 paper. Find
out what size paper your printer normally uses and set the appropriate paper
size with 'printoptions'. If you cannot find the name of the paper used,
measure a sheet and compare it with the table of supported paper sizes listed
for 'printoptions', using the paper that is closest in both width AND height.
Note: The dimensions of actual paper may vary slightly from the ones listed.
If there is no paper listed close enough, then you may want to try psresize
from PSUtils, discussed below.
- Two-sided printing (duplex). Normally a PostScript printer that does not
support two-sided printing will ignore any request to do it. However, some
printers may abort the job altogether. Try printing with duplex turned off.
Note: Duplex prints can be achieved manually using PS utils - see below.
- Collated printing. As with Duplex printing, most PostScript printers that
do not support collating printouts will ignore a request to do so. Some may
not. Try printing with collation turned off.
- Syntax highlighting. Some print management code may prevent the generated
PostScript file from being printed on a black and white printer when syntax
highlighting is turned on, even if solid black is the only color used. Try
printing with syntax highlighting turned off.
A safe printoptions setting to try is: >
:set printoptions=paper:A4,duplex:off,collate:n,syntax:n
Replace "A4" with the paper size that best matches your printer paper.
==============================================================================
7. PostScript Utilities *postscript-print-util*
7.1 Ghostscript
Ghostscript is a PostScript and PDF interpreter that can be used to display
and print on non-PostScript printers PostScript and PDF files. It can also
generate PDF files from PostScript.
Ghostscript will run on a wide variety of platforms.
There are three available versions:
- AFPL Ghostscript (formerly Aladdin Ghostscript) which is free for
non-commercial use. It can be obtained from:
http://www.cs.wisc.edu/~ghost/
- GNU Ghostscript which is available under the GNU General Public License. It
can be obtained from:
ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/
- A commercial version for inclusion in commercial products.
Additional information on Ghostscript can also be found at:
http://www.ghostscript.com/
Support for a number of non PostScript printers is provided in the
distribution as standard, but if you cannot find support for your printer
check the Ghostscript site for other printers not included by default.
7.2 Ghostscript Previewers.
The interface to Ghostscript is very primitive so a number of graphical front
ends have been created. These allow easier PostScript file selection,
previewing at different zoom levels, and printing. Check supplied
documentation for full details.
X11
- Ghostview. Obtainable from:
http://www.cs.wisc.edu/~ghost/gv/
- gv. Derived from Ghostview. Obtainable from:
http://wwwthep.physik.uni-mainz.de/~plass/gv/
Copies (possibly not the most recent) can be found at:
http://www.cs.wisc.edu/~ghost/gv/
OpenVMS
- Is apparently supported in the main code now (untested). See:
http://wwwthep.physik.uni-mainz.de/~plass/gv/
Windows and OS/2
- GSview. Obtainable from:
http://www.cs.wisc.edu/~ghost/gsview/
DOS
- ps_view. Obtainable from:
ftp://ftp.pg.gda.pl/pub/TeX/support/ps_view/
ftp://ftp.dante.de/tex-archive/support/ps_view/
Linux
- GSview. Linux version of the popular Windows and OS/2 previewer.
Obtainable from:
http://www.cs.wisc.edu/~ghost/gsview/
- BMV. Different from Ghostview and gv in that it doesn't use X but svgalib.
Obtainable from:
ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz
7.3 PSUtils
PSUtils is a collection of utility programs for manipulating PostScript
documents. Binary distributions are available for many platforms, as well as
the full source. PSUtils can be found at:
http://knackered.org/angus/psutils
The utilities of interest include:
- psnup. Convert PS files for N-up printing.
- psselect. Select page range and order of printing.
- psresize. Change the page size.
- psbook. Reorder and lay out pages ready for making a book.
The output of one program can be used as the input to the next, allowing for
complex print document creation.
N-UP PRINTING
The psnup utility takes an existing PostScript file generated from VIM and
convert it to an n-up version. The simplest way to create a 2-up printout is
to first create a PostScript file with: >
:hardcopy > test.ps
Then on your command line execute: >
psnup -n 2 test.ps final.ps
Note: You may get warnings from some Ghostscript previewers for files produced
by psnup - these may safely be ignored.
Finally print the file final.ps to your PostScript printer with your
platform's print command. (You will need to delete the two PostScript files
afterwards yourself.) 'printexpr' could be modified to perform this extra
step before printing.
ALTERNATE DUPLEX PRINTING
It is possible to achieve a poor man's version of duplex printing using the PS
utility psselect. This utility has options -e and -o for printing just the
even or odd pages of a PS file respectively.
First generate a PS file with the 'hardcopy' command, then generate a new
files with all the odd and even numbered pages with: >
psselect -o test.ps odd.ps
psselect -e test.ps even.ps
Next print odd.ps with your platform's normal print command. Then take the
print output, turn it over and place it back in the paper feeder. Now print
even.ps with your platform's print command. All the even pages should now
appear on the back of the odd pages.
There a couple of points to bear in mind:
1. Position of the first page. If the first page is on top of the printout
when printing the odd pages then you need to reverse the order that the odd
pages are printed. This can be done with the -r option to psselect. This
will ensure page 2 is printed on the back of page 1.
Note: it is better to reverse the odd numbered pages rather than the even
numbered in case there are an odd number of pages in the original PS file.
2. Paper flipping. When turning over the paper with the odd pages printed on
them you may have to either flip them horizontally (along the long edge) or
vertically (along the short edge), as well as possibly rotating them 180
degrees. All this depends on the printer - it will be more obvious for
desktop ink jets than for small office laser printers where the paper path
is hidden from view.
==============================================================================
8. Formfeed Characters *printing-formfeed*
By default VIM does not do any special processing of |formfeed| control
characters. Setting the 'printoptions' formfeed item will make VIM recognize
formfeed characters and continue printing the current line at the beginning
of the first line on a new page. The use of formfeed characters provides
rudimentary print control but there are certain things to be aware of.
VIM will always start printing a line (including a line number if enabled)
containing a formfeed character, even if it is the first character on the
line. This means if a line starting with a formfeed character is the first
line of a page then VIM will print a blank page.
Since the line number is printed at the start of printing the line containing
the formfeed character, the remainder of the line printed on the new page
will not have a line number printed for it (in the same way as the wrapped
lines of a long line when wrap in 'printoptions' is enabled).
If the formfeed character is the last character on a line, then printing will
continue on the second line of the new page, not the first. This is due to
VIM processing the end of the line after the formfeed character and moving
down a line to continue printing.
Due to the points made above it is recommended that when formfeed character
processing is enabled, printing of line numbers is disabled, and that form
feed characters are not the last character on a line. Even then you may need
to adjust the number of lines before a formfeed character to prevent
accidental blank pages.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:

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 Feb 24
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 |errorlist()| 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.

View File

@@ -1,4 +1,4 @@
*quickref.txt* For Vim version 7.0aa. Last change: 2004 May 05
*quickref.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -18,10 +18,10 @@
|Q_sc| Scrolling |Q_ce| Ex: Command-line editing
|Q_in| insert: Inserting text |Q_ra| Ex: Ranges
|Q_ai| insert: Keys |Q_ex| Ex: Special characters
|Q_ss| insert: Special keys |Q_ed| Editing a file
|Q_di| insert: Digraphs |Q_fl| Using the argument list
|Q_si| insert: Special inserts |Q_wq| Writing and quitting
|Q_de| change: Deleting text |Q_st| Starting VIM
|Q_ss| insert: Special keys |Q_st| Starting VIM
|Q_di| insert: Digraphs |Q_ed| Editing a file
|Q_si| insert: Special inserts |Q_fl| Using the argument list
|Q_de| change: Deleting text |Q_wq| Writing and quitting
|Q_cm| change: Copying and moving |Q_ac| Automatic commands
|Q_ch| change: Changing text |Q_wi| Multi-window commands
|Q_co| change: Complex |Q_bu| Buffer list commands
@@ -255,6 +255,7 @@ These only work when 'wrap' is off:
|o| N o open a new line below the current line, append text (N times)
|O| N O open a new line above the current line, append text (N times)
|:startinsert| :star[tinsert][!] start Insert mode, append when [!] used
|:startreplace| :startr[eplace][!] start Replace mode, at EOL when [!] used
in Visual block mode:
|v_b_I| I insert the same text in front of all the selected lines
@@ -606,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
@@ -630,6 +632,7 @@ Short explanation of each option: *option-list*
|'commentstring'| |'cms'| template for comments; used for fold marker
|'compatible'| |'cp'| behave Vi-compatible as much as possible
|'complete'| |'cpt'| specify how Insert mode completion works
|'completefunc'| |'cfu'| function to be used for Insert mode completion
|'confirm'| |'cf'| ask what to do about unsaved/read-only files
|'conskey'| |'consk'| get keys directly from console (MS-DOS only)
|'copyindent'| |'ci'| make 'autoindent' use existing indent structure
@@ -748,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
@@ -761,8 +765,10 @@ Short explanation of each option: *option-list*
|'mousemodel'| |'mousem'| changes meaning of mouse buttons
|'mouseshape'| |'mouses'| shape of the mouse pointer in different modes
|'mousetime'| |'mouset'| max time between mouse double-click
|'mzquantum'| |'mzq'| the interval between polls for MzScheme threads
|'nrformats'| |'nf'| number formats recognized for CTRL-A command
|'number'| |'nu'| print the line number in front of each line
|'numberwidth'| |'nuw'| number of columns used for the line number
|'osfiletype'| |'oft'| operating system-specific filetype information
|'paragraphs'| |'para'| nroff macros that separate paragraphs
|'paste'| allow pasting text
@@ -778,7 +784,10 @@ Short explanation of each option: *option-list*
|'printexpr'| |'pexpr'| expression used to print PostScript for :hardcopy
|'printfont'| |'pfn'| name of the font to be used for :hardcopy
|'printheader'| |'pheader'| format of the header used for :hardcopy
|'printmbcharset'| |'pmbcs'| CJK character set to be used for :hardcopy
|'printmbfont'| |'pmbfn'| font names to be used for CJK output of :hardcopy
|'printoptions'| |'popt'| controls the format of :hardcopy output
|'quoteescape'| |'qe'| escape characters used in a string
|'readonly'| |'ro'| disallow writing the buffer
|'remap'| allow mappings to work recursively
|'report'| threshold for reporting nr. of lines changed
@@ -927,6 +936,8 @@ Short explanation of each option: *option-list*
position
|ga| ga show ascii value of character under cursor in
decimal, hex, and octal
|g8| g8 for utf-8 encoding: show byte sequence for
character under cursor in hex.
|g_CTRL-G| g CTRL-G show cursor column, line, and character
position
|CTRL-C| CTRL-C during searches: Interrupt the search
@@ -1039,6 +1050,55 @@ Context-sensitive completion on the command-line:
|::e| :e extension
|::s| :s/{pat}/{repl}/ substitute {pat} with {repl}
------------------------------------------------------------------------------
*Q_st* Starting VIM
|-vim| vim [options] start editing with an empty buffer
|-file| vim [options] {file} .. start editing one or more files
|--| vim [options] - read file from stdin
|-tag| vim [options] -t {tag} edit the file associated with {tag}
|-qf| vim [options] -q [fname] start editing in QuickFix mode,
display the first error
Most useful Vim arguments (for full list see |startup-options|)
|-gui| -g start GUI (also allows other options)
|-+| +[num] put the cursor at line [num] (default: last line)
|-+c| +{command} execute {command} after loading the file
|-+/| +/{pat} {file} .. put the cursor at the first occurrence of {pat}
|-v| -v Vi mode, start ex in Normal mode
|-e| -e Ex mode, start vim in Ex mode
|-R| -R Read-only mode, implies -n
|-m| -m modifications not allowed (resets 'write' option)
|-d| -d diff mode |diff|
|-b| -b binary mode
|-l| -l lisp mode
|-A| -A Arabic mode ('arabic' is set)
|-F| -F Farsi mode ('fkmap' and 'rightleft' are set)
|-H| -H Hebrew mode ('hkmap' and 'rightleft' are set)
|-V| -V Verbose, give informative messages
|-C| -C Compatible, set the 'compatible' option
|-N| -N Nocompatible, reset the 'compatible' option
|-r| -r give list of swap files
|-r| -r {file} .. recover aborted edit session
|-n| -n do not create a swap file
|-o| -o [num] open [num] windows (default: one for each file)
|-f| -f GUI: foreground process, don't fork
Amiga: do not restart VIM to open a window (for
e.g., mail)
|-s| -s {scriptin} first read commands from the file {scriptin}
|-w| -w {scriptout} write typed chars to file {scriptout} (append)
|-W| -W {scriptout} write typed chars to file {scriptout} (overwrite)
|-T| -T {terminal} set terminal name
|-d| -d {device} Amiga: open {device} to be used as a console
|-u| -u {vimrc} read inits from {vimrc} instead of other inits
|-U| -U {gvimrc} idem, for when starting the GUI
|-i| -i {viminfo} read info from {viminfo} instead of other files
|---| -- end of options, other arguments are file names
|--help| --help show list of arguments and exit
|--version| --version show version info and exit
|--| - Read file from stdin.
------------------------------------------------------------------------------
*Q_ed* Editing a file
Without !: Fail if changes has been made to the current buffer.
@@ -1115,54 +1175,6 @@ Context-sensitive completion on the command-line:
is set and [!] not given write the buffer.
|CTRL-Z| CTRL-Z Same as ":stop"
------------------------------------------------------------------------------
*Q_st* Starting VIM
|-vim| vim [options] start editing with an empty buffer
|-file| vim [options] {file} .. start editing one or more files
|--| vim [options] - read file from stdin
|-tag| vim [options] -t {tag} edit the file associated with {tag}
|-qf| vim [options] -q [fname] start editing in QuickFix mode,
display the first error
Vim arguments:
|-gui| -g start GUI (also allows other options)
|-+| +[num] put the cursor at line [num] (default: last line)
|-+c| +{command} execute {command} after loading the file
|-+/| +/{pat} {file} .. put the cursor at the first occurrence of {pat}
|-v| -v Vi mode, start ex in Normal mode
|-e| -e Ex mode, start vim in Ex mode
|-R| -R Read-only mode, implies -n
|-m| -m modifications not allowed (resets 'write' option)
|-b| -b binary mode
|-l| -l lisp mode
|-A| -A Arabic mode ('arabic' is set)
|-F| -F Farsi mode ('fkmap' and 'rightleft' are set)
|-H| -H Hebrew mode ('hkmap' and 'rightleft' are set)
|-V| -V Verbose, give informative messages
|-C| -C Compatible, set the 'compatible' option
|-N| -N Nocompatible, reset the 'compatible' option
|-r| -r give list of swap files
|-r| -r {file} .. recover aborted edit session
|-n| -n do not create a swap file
|-o| -o [num] open [num] windows (default: one for each file)
|-f| -f GUI: foreground process, don't fork
Amiga: do not restart VIM to open a window (for
e.g., mail)
|-s| -s {scriptin} first read commands from the file {scriptin}
|-w| -w {scriptout} write typed chars to file {scriptout} (append)
|-W| -W {scriptout} write typed chars to file {scriptout} (overwrite)
|-T| -T {terminal} set terminal name
|-d| -d {device} Amiga: open {device} to be used as a console
|-u| -u {vimrc} read inits from {vimrc} instead of other inits
|-U| -U {gvimrc} idem, for when starting the GUI
|-i| -i {viminfo} read info from {viminfo} instead of other files
|---| -- end of options, other arguments are file names
|--help| --help show list of arguments and exit
|--version| --version show version info and exit
|--| - Read file from stdin.
------------------------------------------------------------------------------
*Q_ac* Automatic Commands
|viminfo-file| Read registers, marks, history at startup, save when exiting.

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 Apr 02
*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*
@@ -20,7 +21,8 @@ Chapter 26 of the user manual introduces repeating |usr_26.txt|.
*.*
. Repeat last change, with count replaced with [count].
Also repeat a yank command, when the 'y' flag is
included in 'cpoptions'.
included in 'cpoptions'. Does not repeat a
command-line command.
Simple changes can be repeated with the "." command. Without a count, the
count of the last change is used. If you enter a count, it will replace the
@@ -80,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*
@@ -101,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*
@@ -467,27 +474,40 @@ DEFINING BREAKPOINTS
Set a breakpoint in a sourced file. Example: >
:breakadd file 43 .vimrc
:breaka[dd] here
Set a breakpoint in the current line of the current file.
Like doing: >
:breakadd file <cursor-line> <current-file>
< Note that this only works for commands that are executed when
sourcing the file, not for a function defined in that file.
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
of characters. 'ignorecase' is not used, but "\c" can be used in the pattern
to ignore case |/\c|. Don't include the () for the function name!
The match for sourced scripts is done against the full file name. Examples: >
breakadd file explorer
won't match, the path is missing. >
The match for sourced scripts is done against the full file name. If no path
is specified the current directory is used. Examples: >
breakadd file explorer.vim
matches "explorer.vim" in the current directory. >
breakadd file *explorer.vim
matches ".../plugin/explorer.vim" and ".../plugin/iexplorer.vim". >
matches ".../plugin/explorer.vim", ".../plugin/iexplorer.vim", etc. >
breakadd file */explorer.vim
matches ".../plugin/explorer.vim" only.
matches ".../plugin/explorer.vim" and "explorer.vim" in any other directory.
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*
@@ -501,6 +521,9 @@ DELETING BREAKPOINTS
:breakd[el] file [lnum] {name}
Delete a breakpoint in a sourced file.
:breakd[el] here
Delete a breakpoint at the current line of the current file.
When [lnum] is omitted, the first breakpoint in the function or file is
deleted.
The {name} must be exactly the same as what was typed for the ":breakadd"
@@ -526,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

View File

@@ -1,4 +1,4 @@
*starting.txt* For Vim version 7.0aa. Last change: 2004 Jun 18
*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.
@@ -746,7 +753,7 @@ accordingly. Vim proceeds in this order:
"home:.vimrc" (for Amiga) (*)
"$VIM/.vimrc" (for OS/2 and Amiga) (*)
"$HOME/_vimrc" (for MS-DOS and Win32) (*)
"$VIM\_vimrc" (for MS-DOS and Win32) (*)
"$VIM/_vimrc" (for MS-DOS and Win32) (*)
Note: For Unix, OS/2 and Amiga, when ".vimrc" does not exist,
"_vimrc" is also tried, in case an MS-DOS compatible file
system is used. For MS-DOS and Win32 ".vimrc" is checked
@@ -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 Jun 16
*syntax.txt* For Vim version 7.0aa. Last change: 2005 Feb 21
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: >
@@ -664,13 +688,21 @@ an the "after" directory in 'runtimepath'. For Unix this would be
syn sync fromstart
set foldmethod=syntax
CH *ch.vim* *ch-syntax*
C/C++ interpreter. Ch has similar syntax highlighting to C and builds upon
the C syntax file. See |c.vim| for all the settings that are available for C.
By setting a variable you can tell Vim to use Ch syntax for *.h files, instead
of C or C++: >
:let ch_syntax_for_h = 1
CHILL *chill.vim* *chill-syntax*
Chill syntax highlighting is similar to C. See |c.vim| for all the settings
that are available. Additionally there is:
chill_syntax_for_h use Ch syntax for *.h files, instead of C or C++
chill_space_errors like c_space_errors
chill_comment_string like c_comment_strings
chill_minlines like c_minlines
@@ -812,11 +844,20 @@ is controlled by the variable dosbatch_cmdextversion. For Windows NT
this should have the value 1, and for Windows 2000 it should be 2.
Select the version you want with the following line: >
:let dosbatch_cmdextversion = 1
:let dosbatch_cmdextversion = 1
If this variable is not defined it defaults to a value of 2 to support
Windows 2000.
A second option covers whether *.btm files should be detected as type
"dosbatch" (MS-DOS batch files) or type "btm" (4DOS batch files). The latter
is used by default. You may select the former with the following line: >
:let g:dosbatch_syntax_for_btm = 1
If this variable is undefined or zero, btm syntax is selected.
DTD *dtd.vim* *dtd-syntax*
@@ -1767,14 +1808,22 @@ If you use POD files or POD segments, you might: >
:let perl_include_pod = 1
To handle package references in variable and function names differently from
the rest of the name (like 'PkgName::' in '$PkgName::VarName'): >
The reduce the complexity of parsing (and increase performance) you can switch
off two elements in the parsing of variable names and contents. >
:let perl_want_scope_in_variables = 1
To handle package references in variable and function names not differently
from the rest of the name (like 'PkgName::' in '$PkgName::VarName'): >
If you want complex things like '@{${"foo"}}' to be parsed: >
:let perl_no_scope_in_variables = 1
:let perl_extended_vars = 1
(In Vim 6.x it was the other way around: "perl_want_scope_in_variables"
enabled it.)
If you do not want complex things like '@{${"foo"}}' to be parsed: >
:let perl_no_extended_vars = 1
(In Vim 6.x it was the other way around: "perl_extended_vars" enabled it.)
The coloring strings can be changed. By default strings and qq friends will be
highlighted like the first line. If you set the variable
@@ -1804,7 +1853,11 @@ its attempts in syntax highlighting. >
If you want to use folding with perl, set perl_fold: >
:let perl_fold = 1
:let perl_fold = 1
If you want to fold blocks in if statements, etc. as well set the following: >
:let perl_fold_blocks = 1
PHP3 and PHP4 *php.vim* *php3.vim* *php-syntax* *php3-syntax*
@@ -2080,6 +2133,17 @@ This will prevent highlighting of special identifiers like "ConstantName",
"$global_var", "@instance_var", "| iterator |", and ":symbol".
SCHEME *scheme.vim* *scheme-syntax*
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*
The SDL highlighting probably misses a few keywords, but SDL has so many
@@ -2247,6 +2311,17 @@ fast enough, you can increase minlines and/or maxlines near the end of
the syntax file.
SQL *sql.vim* *sql-syntax*
*sqlinformix.vim* *sqlinformix-syntax*
While there is an ANSI standard for SQL, most database engines add their
own custom extensions. Vim currently supports the Oracle and Informix
dialects of SQL. Vim assumes "*.sql" files are Oracle SQL by default.
If you want to use the Informix dialect, put this in your startup vimrc: >
:let g:filetype_sql = "sqlinformix"
TCSH *tcsh.vim* *tcsh-syntax*
This covers the shell named "tcsh". It is a superset of csh. See |csh.vim|
@@ -2507,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: >
@@ -3434,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
@@ -3495,6 +3571,10 @@ in their own color.
:echo g:colors_name
< Doesn't work recursively, thus you can't use
":colorscheme" in a color scheme script.
After the color scheme has been loaded the
|ColorScheme| autocommand event is triggered.
For info about writing a colorscheme file: >
:edit $VIMRUNTIME/colors/README.txt
:hi[ghlight] List all the current highlight groups that have
attributes set.
@@ -3962,6 +4042,11 @@ For Unix you can use the file ~/.vim/after/syntax/syncolor.vim. Example: >
highlight comment ctermfg=green guifg=green
endif
*E679*
Do make sure this syncolor.vim script does not use a "syntax on", set the
'background' option or uses a "colorscheme" command, because it results in an
endless loop.
Note that when a color scheme is used, there might be some confusion whether
your defined colors are to be used or the colors from the scheme. This
depends on the color scheme file. See |:colorscheme|.

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 Apr 29
*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:
@@ -468,6 +468,7 @@ a tag for each "#defined" macro, typedefs, enums, etc.
Some programs that generate tags files:
ctags As found on most Unix systems. Only supports C. Only
does the basic work.
*Exuberant_ctags*
exuberant ctags This a very good one. It works for C, C++, Java,
Fortran, Eiffel and others. It can generate tags for
many items. See http://ctags.sourceforge.net.
@@ -743,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 05
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
@@ -275,6 +287,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 +301,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 +390,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 +413,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 May 12
*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.
@@ -214,7 +214,7 @@ Check the ICCF web site for the latest information! See |iccf| for the URL.
USA and Canada: Contact Kibaale Children's Fund (KCF) in Surrey, Canada. They
take care of the Canadian sponsors for the children in
Kibaale. You can send them a one time donation directly.
Please send me a note so that know what has been donated
Please send me a note so that I know what has been donated
because of Vim. Ask KCF for information about sponsorship.
Kibaale Children's Fund c/o Pacific Academy
10238-168 Street

View File

@@ -1,4 +1,4 @@
*usr_01.txt* For Vim version 7.0aa. Last change: 2004 May 01
*usr_01.txt* For Vim version 7.0aa. Last change: 2004 Sep 09
VIM USER MANUAL - by Bram Moolenaar
@@ -104,11 +104,13 @@ Instead of reading the text (boring!) you can use the vimtutor to learn your
first Vim commands. This is a 30 minute tutorial that teaches the most basic
Vim functionality hands-on.
On Unix and MS-Windows, if Vim has been properly installed, you can start it
from the shell:
On Unix, if Vim has been properly installed, you can start it from the shell:
>
vimtutor
On MS-Windows you can find it in the Program/Vim menu. Or execute
vimtutor.bat in the $VIMRUNTIME directory.
This will make a copy of the tutor file, so that you can edit it without
the risk of damaging the original.
There are a few translated versions of the tutor. To find out if yours is

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 Mar 12
*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>
@@ -369,8 +368,8 @@ adding. If it's OK, you can give the new one another name: >
mv thefile ~/.vim/ftplugin/stuff_too.vim
The underscore is used to separate the name of the filetype from the rest,
which can be anything. If you would use "otherstuff.vim" it wouldn't work, it
would be loaded for the "otherstuff" filetype.
which can be anything. If you use "otherstuff.vim" it wouldn't work, it would
be loaded for the "otherstuff" filetype.
On MS-DOS you cannot use long filenames. You would run into trouble if you
add a second plugin and the filetype has more than six characters. You can
@@ -427,6 +426,8 @@ you already have the directory.) >
:!mkdir ~/.vim/plugin
:!cp $VIMRUNTIME/macros/matchit.vim ~/.vim/plugin
The "cp" command is for Unix, on MS-DOS you can use "copy".
Now create a "doc" directory in one of the directories in 'runtimepath'. >
:!mkdir ~/.vim/doc
@@ -505,7 +506,7 @@ before and after the option name. For example: >
:help 'wrap'
In case you have messed up an option value, you can set it back to the
default by putting a ampersand (&) after the option name. Example: >
default by putting an ampersand (&) after the option name. Example: >
:set iskeyword&
@@ -514,8 +515,8 @@ NOT WRAPPING LINES
Vim normally wraps long lines, so that you can see all of the text. Sometimes
it's better to let the text continue right of the window. Then you need to
scroll the text left-right to see all of a long line. Switch wrapping of with
this command: >
scroll the text left-right to see all of a long line. Switch wrapping off
with this command: >
:set nowrap

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: 2003 Oct 28
*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, resulting in "\{-}". This matches the item before it zero or
more times, as few as possible. The item by itself always match 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 May 06
*usr_41.txt* For Vim version 7.0aa. Last change: 2005 Feb 23
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 taken literally. 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
@@ -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
errorlist() 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
@@ -734,6 +818,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 +914,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 +953,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 +1330,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 +1488,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 +1901,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 +2087,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 +2132,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 Jun 18
*various.txt* For Vim version 7.0aa. Last change: 2005 Mar 07
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -8,8 +8,7 @@ Various commands *various*
1. Various commands |various-cmds|
2. Online help |online-help|
3. Printing |printing|
4. Using Vim like less or more |less|
3. Using Vim like less or more |less|
==============================================================================
1. Various commands *various-cmds*
@@ -67,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
@@ -111,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
@@ -123,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
@@ -141,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}.
@@ -241,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|
@@ -306,6 +317,7 @@ N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
B *+multi_byte* Korean and other languages |multibyte|
*+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
N *+multi_lang* non-English language support |multi-lang|
m *+mzscheme* Mzscheme interface |mzscheme|
m *+netbeans_intg* |netbeans|
m *+ole* Win32 GUI only: |ole-interface|
*+osfiletype* Support for the 'osfiletype' option and filetype
@@ -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"
@@ -720,369 +754,6 @@ Hints for translators:
- Use the |:helptags| command to generate the tags files. It will find all
languages in the specified directory.
==============================================================================
3. Printing *printing*
On MS-Windows Vim can print your text on any installed printer. On other
systems a PostScript file is produced. This can be directly sent to a
PostScript printer. For other printers a program like ghostscript needs to be
used.
3.1 PostScript Printing |postscript-printing|
3.2 PostScript Printing Encoding |postscript-print-encoding|
3.3 PostScript Printing Troubleshooting |postscript-print-trouble|
3.4 PostScript Utilities |postscript-print-util|
3.5 Formfeed Characters |printing-formfeed|
{not in Vi}
{only available when compiled with |+printer| feature}
*:ha* *:hardcopy* *E237* *E238* *E324*
:[range]ha[rdcopy][!] [arguments]
Send [range] lines (default whole file) to the
printer.
On MS-Windows a dialog is displayed to allow selection
of printer, paper size etc. To skip the dialog, use
the [!]. In this case the printer defined by
'printdevice' is used, or, if 'printdevice' is empty,
the system default printer.
For systems other than MS-Windows, PostScript is
written in a temp file and 'printexpr' is used to
actually print it. Then [arguments] can be used by
'printexpr' through |v:cmdarg|. Otherwise [arguments]
is ignored. 'printoptions' can be used to specify
paper size, duplex, etc.
:[range]ha[rdcopy][!] >{filename}
As above, but write the resulting PostScript in file
{filename}.
Things like "%" are expanded |cmdline-special|
Careful: An existing file is silently overwritten.
{only available when compiled with the |+postscript|
feature}
On MS-Windows use the "print to file" feature of the
printer driver.
Progress is displayed during printing as a page number and a percentage. To
abort printing use the interrupt key (CTRL-C or, on MS-systems, CTRL-Break).
Printer output is controlled by the 'printfont' and 'printoptions' options.
'printheader' specifies the format of a page header.
The printed file is always limited to the selected margins, irrespective of
the current window's 'wrap' or 'linebreak' settings. The "wrap" item in
'printoptions' can be used to switch wrapping off.
The current highlighting colors are used in the printout, with the following
considerations:
1) The normal background is always rendered as white (i.e. blank paper.)
2) White text or the default foreground is rendered as black, so that it shows
up!
3) If 'background' is "dark", then the colours are darkened to compensate for
the fact that otherwise they would be too bright to show up clearly on
white paper.
3.1 PostScript Printing *postscript-printing*
*E455* *E456* *E457* *E624*
Provided you have enough disk space there should be no problems generating a
PostScript file. You need to have the runtime files correctly installed (if
you can find the help files, they probably are).
There are currently a number of limitations with PostScript printing:
- 'printfont' - The font name is ignored (the Courier family is always used -
it should be available on all PostScript printers) but the font size is
used.
- 'printoptions' - The duplex setting is used when generating PostScript
output, but it is up to the printer to take notice of the setting. If the
printer does not support duplex printing then it should be silently ignored.
Some printers, however, don't print at all.
- 8-bit support - While a number of 8-bit print character encodings are
supported it is possible that some characters will not print. Whether a
character will print depends on the font in the printer knowing the
character. Missing characters will be replaced with an upside down question
mark, or a space if that character is also not known by the font. It may be
possible to get all the characters in an encoding to print by installing a
new version of the Courier font family.
- Multi-byte support - Currently VIM will try to convert multi-byte characters
to the 8-bit encoding specified by 'printencoding' (or latin1 if it is
empty). Any characters that are not successfully converted are shown as
unknown characters. Printing will fail if VIM cannot convert the multi-byte
to the 8-bit encoding.
3.2 Custom 8-bit Print Character Encodings *postscript-print-encoding*
*E618* *E619*
To use your own print character encoding when printing 8-bit character data
you need to define your own PostScript font encoding vector. Details on how
to to define a font encoding vector is beyond the scope of this help file, but
you can find details in the PostScript Language Reference Manual, 3rd Edition,
published by Addison-Wesley and available in PDF form at
http://www.adobe.com/. The following describes what you need to do for VIM to
locate and use your print character encoding.
i. Decide on a unique name for your encoding vector, one that does not clash
with any of the recognized or standard encoding names that VIM uses (see
|encoding-names| for a list), and that no one else is likely to use.
ii. Copy $VIMRUNTIME/print/latin1.ps to the print subdirectory in your
'runtimepath' and rename it with your unique name.
iii. Edit your renamed copy of latin1.ps, replacing all occurrences of latin1
with your unique name (don't forget the line starting %%Title:), and
modify the array of glyph names to define your new encoding vector. The
array must have exactly 256 entries or you will not be able to print!
iv. Within VIM, set 'printencoding' to your unique encoding name and then
print your file. VIM will now use your custom print character encoding.
VIM will report an error with the resource file if you change the order or
content of the first 3 lines, other than the name of the encoding on the line
starting %%Title: or the version number on the line starting %%Version:.
[Technical explanation for those that know PostScript - VIM looks for a file
with the same name as the encoding it will use when printing. The file
defines a new PostScript Encoding resource called /VIM-name, where name is the
print character encoding VIM will use.]
3.3 PostScript Printing Troubleshooting *postscript-print-trouble*
*E621*
Usually the only sign of a problem when printing with PostScript is that your
printout does not appear. If you are lucky you may get a printed page that
tells you the PostScript operator that generated the error that prevented the
print job completing.
There are a number of possible causes as to why the printing may have failed:
- Wrong version of the prolog resource file. The prolog resource file
contains some PostScript that VIM needs to be able to print. Each version
of VIM needs one particular version. Make sure you have correctly installed
the runtime files, and don't have any old versions of a file called prolog
in the print directory in your 'runtimepath' directory.
- Paper size. Some PostScript printers will abort printing a file if they do
not support the requested paper size. By default VIM uses A4 paper. Find
out what size paper your printer normally uses and set the appropriate paper
size with 'printoptions'. If you cannot find the name of the paper used,
measure a sheet and compare it with the table of supported paper sizes listed
for 'printoptions', using the paper that is closest in both width AND height.
Note: The dimensions of actual paper may vary slightly from the ones listed.
If there is no paper listed close enough, then you may want to try psresize
from PSUtils, discussed below.
- Two-sided printing (duplex). Normally a PostScript printer that does not
support two-sided printing will ignore any request to do it. However, some
printers may abort the job altogether. Try printing with duplex turned off.
Note: Duplex prints can be achieved manually using PS utils - see below.
- Collated printing. As with Duplex printing, most PostScript printers that
do not support collating printouts will ignore a request to do so. Some may
not. Try printing with collation turned off.
- Syntax highlighting. Some print management code may prevent the generated
PostScript file from being printed on a black and white printer when syntax
highlighting is turned on, even if solid black is the only color used. Try
printing with syntax highlighting turned off.
A safe printoptions setting to try is: >
:set printoptions=paper:A4,duplex:off,collate:n,syntax:n
Replace "A4" with the paper size that best matches your printer paper.
3.4 PostScript Utilities *postscript-print-util*
3.4.1 Ghostscript
Ghostscript is a PostScript and PDF interpreter that can be used to display
and print on non-PostScript printers PostScript and PDF files. It can also
generate PDF files from PostScript.
Ghostscript will run on a wide variety of platforms.
There are three available versions:
- AFPL Ghostscript (formerly Aladdin Ghostscript) which is free for
non-commercial use. It can be obtained from:
http://www.cs.wisc.edu/~ghost/
- GNU Ghostscript which is available under the GNU General Public License. It
can be obtained from:
ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/gnu/
- A commercial version for inclusion in commercial products.
Additional information on Ghostscript can also be found at:
http://www.ghostscript.com/
Support for a number of non PostScript printers is provided in the
distribution as standard, but if you cannot find support for your printer
check the Ghostscript site for other printers not included by default.
3.4.2 Ghostscript Previewers.
The interface to Ghostscript is very primitive so a number of graphical front
ends have been created. These allow easier PostScript file selection,
previewing at different zoom levels, and printing. Check supplied
documentation for full details.
X11
- Ghostview. Obtainable from:
http://www.cs.wisc.edu/~ghost/gv/
- gv. Derived from Ghostview. Obtainable from:
http://wwwthep.physik.uni-mainz.de/~plass/gv/
Copies (possibly not the most recent) can be found at:
http://www.cs.wisc.edu/~ghost/gv/
OpenVMS
- Is apparently supported in the main code now (untested). See:
http://wwwthep.physik.uni-mainz.de/~plass/gv/
Windows and OS/2
- GSview. Obtainable from:
http://www.cs.wisc.edu/~ghost/gsview/
DOS
- ps_view. Obtainable from:
ftp://ftp.pg.gda.pl/pub/TeX/support/ps_view/
ftp://ftp.dante.de/tex-archive/support/ps_view/
Linux
- GSview. Linux version of the popular Windows and OS/2 previewer.
Obtainable from:
http://www.cs.wisc.edu/~ghost/gsview/
- BMV. Different from Ghostview and gv in that it doesn't use X but svgalib.
Obtainable from:
ftp://sunsite.unc.edu/pub/Linux/apps/graphics/viewers/svga/bmv-1.2.tgz
3.4.3 PSUtils
PSUtils is a collection of utility programs for manipulating PostScript
documents. Binary distributions are available for many platforms, as well as
the full source. PSUtils can be found at:
http://knackered.org/angus/psutils
The utilities of interest include:
- psnup. Convert PS files for N-up printing.
- psselect. Select page range and order of printing.
- psresize. Change the page size.
- psbook. Reorder and lay out pages ready for making a book.
The output of one program can be used as the input to the next, allowing for
complex print document creation.
N-UP PRINTING
The psnup utility takes an existing PostScript file generated from VIM and
convert it to an n-up version. The simplest way to create a 2-up printout is
to first create a PostScript file with: >
:hardcopy > test.ps
Then on your command line execute: >
psnup -n 2 test.ps final.ps
Note: You may get warnings from some Ghostscript previewers for files produced
by psnup - these may safely be ignored.
Finally print the file final.ps to your PostScript printer with your
platform's print command. (You will need to delete the two PostScript files
afterwards yourself.) 'printexpr' could be modified to perform this extra
step before printing.
ALTERNATE DUPLEX PRINTING
It is possible to achieve a poor man's version of duplex printing using the PS
utility psselect. This utility has options -e and -o for printing just the
even or odd pages of a PS file respectively.
First generate a PS file with the 'hardcopy' command, then generate a new
files with all the odd and even numbered pages with: >
psselect -o test.ps odd.ps
psselect -e test.ps even.ps
Next print odd.ps with your platform's normal print command. Then take the
print output, turn it over and place it back in the paper feeder. Now print
even.ps with your platform's print command. All the even pages should now
appear on the back of the odd pages.
There a couple of points to bear in mind:
1. Position of the first page. If the first page is on top of the printout
when printing the odd pages then you need to reverse the order that the odd
pages are printed. This can be done with the -r option to psselect. This
will ensure page 2 is printed on the back of page 1.
Note: it is better to reverse the odd numbered pages rather than the even
numbered in case there are an odd number of pages in the original PS file.
2. Paper flipping. When turning over the paper with the odd pages printed on
them you may have to either flip them horizontally (along the long edge) or
vertically (along the short edge), as well as possibly rotating them 180
degrees. All this depends on the printer - it will be more obvious for
desktop ink jets than for small office laser printers where the paper path
is hidden from view.
3.5 Formfeed Characters *printing-formfeed*
By default VIM does not do any special processing of |formfeed| control
characters. Setting the 'printoptions' formfeed item will make VIM recognize
formfeed characters and continue printing the current line at the beginning
of the first line on a new page. The use of formfeed characters provides
rudimentary print control but there are certain things to be aware of.
VIM will always start printing a line (including a line number if enabled)
containing a formfeed character, even if it is the first character on the
line. This means if a line starting with a formfeed character is the first
line of a page then VIM will print a blank page.
Since the line number is printed at the start of printing the line containing
the formfeed character, the remainder of the line printed on the new page
will not have a line number printed for it (in the same way as the wrapped
lines of a long line when wrap in 'printoptions' is enabled).
If the formfeed character is the last character on a line, then printing will
continue on the second line of the new page, not the first. This is due to
VIM processing the end of the line after the formfeed character and moving
down a line to continue printing.
Due to the points made above it is recommended that when formfeed character
processing is enabled, printing of line numbers is disabled, and that form
feed characters are not the last character on a line. Even then you may need
to adjust the number of lines before a formfeed character to prevent
accidental blank pages.
==============================================================================
4. Using Vim like less or more *less*

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 Jun 07
*version7.txt* For Vim version 7.0aa. Last change: 2005 Mar 08
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,7 +18,12 @@ INCOMPATIBLE CHANGES |incompatible-7|
NEW FEATURES |new-7|
New data types |new-data-types|
Vim script enhancements |new-vim-script|
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|
@@ -30,55 +36,913 @@ 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:
For filetype detection: For many types, instead of ~/.dir/filename use
*/.dir/filename, so that it also works for other user's files.
":0verbose" now sets 'verbose' to zero instead of one.
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.
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.
KDE support *new-KDE*
-----------
Kvim is the KDE version of Vim. It uses the Qt toolkit. See |KVim|.
(Thomas Capricelli, Philippe Fremy, Mickael Marchand, Mark Westcott, et al.)
MzScheme interface *new-MzScheme*
------------------
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*
------------------
The |:hardcopy| command now supports printing multi-byte characters.
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
Italian (translated by Antonio Colombo). More languages will follow.
The Unix Makefile installs the Italian manual pages in .../man/it/man1/.
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
|errorlist()| 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*
-----------------
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
mode completion. CTRL-X CTRL-U can be used in Insert
mode to do any kind of completion. (Taro Muraoka)
'quoteescape' Characters used to escape quotes inside a string.
Used for the a", a' and a` text objects. |a'|
'numberwidth' Minimal width of the space used for the 'number'
option. (Emmanuel Renieris)
'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)
Ex commands: ~
Win32: The ":winpos" command now also works in the console. (Vipin Aravind)
|:startreplace| Start Replace mode. (Charles Campbell)
|:0file| Removes the name of the buffer. (Charles Campbell)
|:diffoff| Switch off diff mode in the current window or in all
windows.
|:keepalt| Do not change the alternate file.
|: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: ~
|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
|errorlist()| 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
|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.
|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: ~
|InsertEnter| starting Insert or Replace mode
|InsertChange| going from Insert to Replace mode or back
|InsertLeave| leaving Insert or Replace mode
New Syntax files: ~
|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: ~
|/\%d| \%d123 search for character with decimal number
|/\]| [\d123] idem, in a colletion
|/\%o| \%o103 search for character with octal number
|/\]| [\o1o3] idem, in a colletion
|/\%x| \%x1a search for character with 2 pos. hex number
|/\]| [\x1a] idem, in a colletion
|/\%u| \%u12ab search for character with 4 pos. hex number
|/\]| [\u12ab] idem, in a colletion
|/\%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: ~
MuPAD source syntax, indent and ftplugin. (Dave Silvia)
ABAB/4 syntax file. (Marius van Wyk)
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: ~
Mac: Add the selection type to the clipboard, so that Block, line and
character selections can be used between two Vims. (Eckehard Berns)
Also fixes the problem that setting 'clipboard' to "unnamed" breaks using
"yyp".
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*
":helpgrep" accepts a language specifier after the pattern: "pat@it".
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.
The tutor was updated to make it simpler to use and added text to explain a
few more important commands. Used ideas from Gabriel Zachmann.
Unix: When libcall() fails obtain an error message with dlerror() and display
it. (Johannes Zellner)
Added "nbsp" in 'listchars'. (David Blanchet)
Added the "acwrite" value for the 'buftype' option. This is for a buffer that
doesn not have a name that refers to a file and is written with BufWriteCmd
autocommands.
For lisp indenting and matching parenthesis: (Sergey Khorev)
- square brackets are recognized properly
- #\(, #\), #\[ and #\] are recognized as character literals
- Lisp line comments (delimited by semicolon) are recognized
Added the "count" argument to match(), matchend() and matchstr(). (Ilya Sher)
winnr() takes an optional "$" and "#" arguments. (Nikolai Weibull, Yegappan
Lakshmanan)
Added 'n' flag to search(): don't move the cursor. (Nikolai Weibull)
When uncompressing fails in the gzip plugin, give an error message but don't
delete the raw text. Helps if the file has a .gz extension but is not
actually compressed. (Andrew Pimlott)
When C, C++ or IDL syntax is used, may additionally load doxygen syntax.
Also support setting the filetype to "cdoxygen" for C plus doxygen syntax.
(Michael Geddes)
The ":registers" command now displays multi-byte characters properly.
VMS: In the usage message mention that a slash can be used to make a flag
upper case. Add color support to the builtin vt320 terminal codes.
(Zoltan Arpadffy)
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.
==============================================================================
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)
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*
When using PostScript printing on MS-DOS the default 'printexpr' used "lpr"
instead of "copy". When 'printdevice' was empty the copy command did not
work. Use "LPT1" then.
The GTK font dialog uses a font size zero when the font name doesn't include a
size. Use a default size of 10.
This example in the documentation didn't work:
:e `=foo . ".c" `
Skip over the expression in `=expr` when looking for comments, |, % and #.
When ":helpgrep" doesn't find anything there is no error message.
"L" and "H" did not take closed folds into account.
Win32: The "-P title" argument stopped at the first title that matched, even
when it doesn't support MDI.
Mac GUI: CTRL-^ and CTRL-@ did not work.
"2daw" on "word." at the end of a line didn't include the preceding white
space.
Win32: Using FindExecutable() doesn't work to find a program. Use
SearchPath() instead. For executable() use $PATHEXT when the program searched
for doesn't have an extension.
When 'virtualedit' is set, moving the cursor up after appending a character
may move it to a different column. Was caused by auto-formatting moving the
cursor and not putting it back where it was.
When indent was added automatically and then moving the cursor, the indent was
not deleted (like when pressing ESC). The "I" flag in 'cpoptions' can be used
to make it work the old way.
When opening a command-line window, 'textwidth' gets set to 78 by the Vim
filetype plugin. Reset 'textwidth' to 0 to avoid lines are broken.
After using cursor(line, col) moving up/down doesn't keep the same column.
Win32: Borland C before 5.5 requires using ".u." for LowPart and HighPart
fields. (Walter Briscoe)
On Sinix SYS_NMLN isn't always defined. Define it ourselves. (Cristiano De
Michele)
Printing with PostScript may keep the printer waiting for more. Append a
CTRL-D to the printer output. (Mike Williams)
When converting a string with a hex or octal number the leading '-' was
ignored. ":echo '-05' + 0" resulted in 5 instead of -5.
Using "@:" to repeat a command line didn't work when it contains control
characters.
When using file completion for a user command, it would not expand environment
variables like for a regular command with a file argument.
'cindent': When the argument of a #define looks like a C++ class the next line
is indented too much.
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.
When 'bin' is set and 'eol' is not set then line2byte() added the line break
after the last line while it's not there.
Using foldlevel() in a WinEnter autocommand may not work. Noticed when
resizing the GUI shell upon startup.
Python: Using buffer.append(f.readlines()) didn't work. Allow appending a
string with a trailing newline. The newline is ignored.
When using the ":saveas f2" command for buffer "f1", the Buffers menu would
contain "f2" twice, one of them leading to "f1". Also trigger the BufFilePre
and BufFilePost events for the alternate buffer that gets the old name.
strridx() did not work well when the needle is empty. (Ciaran McCreesh)
GTK: Avoid a potential hang in gui_mch_wait_for_chars() when input arrives
just before it is invoked
VMS: Occasionally CR characters were inserted in the file. Expansion of
environment variables was not correct. (Zoltan Arpadffy)
UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
from the first character of the word.
When using ":sball" in an autocommand only the filetype in one buffer was
detected. Reset did_filetype in enter_buffer().
When using ":argdo" and the window already was at the first argument index,
but not actually editing it, the current buffer would be used instead.
When ":next dir/*" includes many matches, adding the names to the argument
list may take an awful lot of time and can't be interrupted. Allow
interrupting this.
When editing a file that was already loaded in a buffer, modelines were not
used. Now window-local options in the modeline are set. Buffer-local options
and global options remain unmodified.
Win32: When 'encoding' is set to "utf-8" in the vimrc file, files from the
command line with non-ASCII characters are not used correctly. Recode the
file names when 'encoding' is set, using the Unicode command line.
Win32 console: When the default for 'encoding' ends up to be "latin1", the
default value of 'isprint' was wrong.
When an error message is given while waiting for a character (e.g., when an
xterm reports the number of colors), the hit-enter prompt overwrote the last
line. Don't reset msg_didout in normal_cmd() for K_IGNORE.
Mac GUI: Shift-Tab didn't work.
When defining tooltip text, don't translate terminal codes, since it's not
going to be used like a command.
GTK 2: Check the tooltip text for valid utf-8 characters to avoid getting a
GTK error. Invalid characters may appear when 'encoding' is changed.
GTK 2: Add a safety check for invalid utf-8 sequences, they can crash pango.
Win32: When 'encoding' is changed while starting up, use the Unicode command
line to convert the file arguments to 'encoding'. Both for the GUI and the
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".
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:

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

@@ -0,0 +1,558 @@
.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<EFBFBD> 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<69>
di modificare la linea di comando, completamento nomi file, help
in linea, selezione testi in modalit<69> 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<EFBFBD> in generale
.B Vim
viene invocato con:
.PP
vim [opzioni] [lista_file]
.PP
Se lista_file non <20> presente, l'editor inizia aprendo un buffer vuoto.
Altrimenti, una e una sola delle quattro maniere indicate qui sotto pu<70>
essere usata per scegliere uno o pi<70> file da modificare.
.TP 12
file ..
Una lista di nomi di file.
Il primo di questi sar<61> il file corrente, e verr<72> letto nel buffer.
Il cursore sar<61> 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 <20> 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 <20> che il file contenente quella funzione diventa il file corrente
e il cursore <20> posizionato all'inizio della funzione.
Vedere ":help tag-commands".
.TP
-q [file_errori]
Inizia nella modalit<69> quickFix [correzione veloce].
Il file [file_errori] <20> letto e il primo errore <20> visualizzato.
Se [file_errori] non <20> indicato, il suo nome <20> ottenuto dal valore
dell'opzione 'errorfile' (che, se non specificata, vale "AztecC.Err"
per l'Amiga, "errors.err" su altri sistemi).
Si pu<70> 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<70> essere sempre lo stesso).
.TP 10
vim
Modalit<EFBFBD> "Normal", comportamento normale.
.TP
ex
Inizia in modalit<69> "Ex".
Si pu<70> passare in modalit<69> "Normal" col comandi ":vi".
Si pu<70> invocare la modalit<69> "Ex" anche con l'argomento "-e".
.TP
view
Inizia in modalit<69> "Sola Lettura". Non potete modificare i file.
Si pu<70> invocare la modalit<69> "Sola Lettura" anche con l'argomento "-R".
.TP
gvim gview
La versione GUI [Graphical User Interface].
Apre una nuova finestra.
Si pu<70> invocare la modalit<69> "GUI" anche con l'argomento "-g".
.TP
evim eview
La versione GUI in modalit<69> "Facile" (semplificata).
Apre una nuova finestra.
Si pu<70> invocare la modalit<69> "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<70> invocare la modalit<69> "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<61> posizionato sulla linea "numero".
Se "numero" manca, il cursore sar<61> posizionato sull'ultima linea del file.
.TP
+/{espressione}
Per il primo file il cursore sar<61> posizionato alla
prima occorrenza di {espressione}.
Vedere ":help search-pattern" per come specificare l'espressione.
.TP
+{comando}
.TP
-c {comando}
{comando} sar<61> eseguito dopo che il
primo file <20> stato letto.
{comando} <20> 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<70> avere un nome che inizia per '-'.
Se {file} <20> omesso si usa "Session.vim" (funziona solo se -S <20> l'ultimo
argomento specificato).
.TP
--cmd {comando}
Come "-c", ma il comando <20> 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
<EFBFBD> stato compilato con supporto ARABIC per editare file con orientamento
destra-sinistra e tastiera con mappatura Araba, questa opzione inizia
.B Vim
in modalit<69> "Arabic", cio<69> impostando 'arabic'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
-b
Modalit<EFBFBD> "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<69> "Diff" [differenze].
Dovrebbero esserci come argomenti due o tre nomi di file.
.B Vim
aprir<EFBFBD> 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<69> "debugging" a partire
dall'esecuzione del primo comando da uno script.
.TP
-e
Eseguire
.B Vim
in modalit<69> "Ex", come se il programma eseguito sia "ex".
.TP
-E
Eseguire
.B Vim
in modalit<69> "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 <20> fatto ripartire per aprire una nuova finestra.
Opzione da usare quando
.B Vim
<EFBFBD> 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
<EFBFBD> stato compilato con supporto FKMAP per editare file con orientamento
destra-sinistra e tastiera con mappatura Farsi, questa opzione inizia
.B Vim
in modalit<69> "Farsi", cio<69> impostando 'fkmap' e 'rightleft'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
-g
Se
.B Vim
<EFBFBD> stato compilato con supporto GUI, questa opzione chiede di usarla.
Se Vim <20> 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
<EFBFBD> stato compilato col supporto RIGHTLEFT per editare file con orientamento
destra-sinistra e tastiera con mappatura Ebraica, questa opzione inizia
.B Vim
in modalit<69> "Ebraica", cio<69> impostando 'hkmap' e 'rightleft'.
Altrimenti viene dato un messaggio di errore e
.B Vim
termina in modo anormale.
.TP
-i {viminfo}
Se <20> abilitato l'uso di un file viminfo, questa opzione indica il nome
del file da usare invece di quello predefinito "~/.viminfo".
Si pu<70> anche evitare l'uso di un file .viminfo, dando come nome "NONE".
.TP
-L
Equivalente a -r.
.TP
-l
Modalit<EFBFBD> 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<6F> modifiche.
.TP
-N
Modalit<EFBFBD> "Non-compatibile". Annulla l'opzione 'compatible'.
Cos<EFBFBD>
.B Vim
va un po' meglio, ma <20> 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<EFBFBD> "Sola Lettura".
Imposta l'opzione 'readonly'.
Si pu<70> 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<70> 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<EFBFBD> "Recovery".
Il file di swap <20> usato per recuperare una sessione di edit finita male.
Il file di swap <20> un file con lo stesso nome file del file di testo
editato, col suffisso ".swp".
Vedere ":help recovery".
.TP
-s
Modalit<EFBFBD> silenziosa. Solo quando invocato come "Ex" o quando l'opzione
"-e" <20> stata data prima dell'opzione "-s".
.TP
-s {scriptin}
Lo script file {scriptin} <20> letto.
I caratteri nel file sono interpretati come se immessi da voi.
Lo stesso si pu<70> 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<EFBFBD> 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<EFBFBD> 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 <20> il valore
dell'opzione 'verbose'.
Il valore predefinito <20> 10.
.TP
-v
Inizia
.B Vim
in modalit<69> "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<EFBFBD> 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<70> rapidamente,
ma il titolo della finestra e la clipboard non sono disponibili.
.TP
-y
Eseguire
.B Vim
in modalit<69> "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<EFBFBD> "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<70> 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<63> 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<6F>. Ad es.:
":help syntax.txt".
.SH FILE
.TP 15
/usr/local/lib/vim/doc/*.txt
I file di cocumentaziona 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
/usr/local/lib/vim/gvimrc
Inizializzazioni gvim a livello di sistema.
.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
<EFBFBD> stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere ":help credits" in
.B Vim.
.br
.B Vim
<EFBFBD> basato su Stevie, scritto da: Tim Thompson,
Tony Andrews e G.R. (Fred) Walter.
In verit<69>, poco o nulla <20> 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<63> 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.

View File

@@ -392,7 +392,7 @@ If the {scriptout} file exists, characters are appended.
Like -w, but an existing file is overwritten.
.TP
-x
Use encryption when writing files. Will prompt for a crypt key.
Use encryption when writing files. Will prompt for a crypt key.
.TP
-X
Don't connect to the X server. Shortens startup time in a terminal, but the
@@ -415,14 +415,14 @@ Arguments after this will be handled as a file name.
This can be used to edit a filename that starts with a '-'.
.TP
--echo-wid
GTK GUI only: Echo the Window ID on stdout
GTK GUI only: Echo the Window ID on stdout.
.TP
--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.
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.
@@ -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<61> utilizzata, se disponibile.
.PP
In ogni finestra l'opzione 'diff' <20> impostata, evidenziando cos<6F> le
differenze.
.br
Le opzioni 'wrap' e 'scrollbind' sono impostate per migliorare la
visibilit<EFBFBD> del testo.
.br
L'opzione 'foldmethod' <20> impostata al valore "diff", che mette gruppi di
linee uguali fra i diversi file in una piegatura. 'foldcolumn' <20> impostato
a due per poter facilmente visualizzare le piegature, aprirle e chiuderle.
.SH OPZIONI
Lo schermo <20> 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
<EFBFBD> stato scritto da Bram Moolenaar, con molto aiuto da altri.
Vedere ":help credits" in
.B Vim.

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
<EFBFBD> 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

@@ -1,9 +1,7 @@
VIMTUTOR(1) VIMTUTOR(1)
VIMTUTOR(1) VIMTUTOR(1)
NAME
vimtutor - the Vim tutor
@@ -11,18 +9,17 @@ SYNOPSIS
vimtutor [language]
DESCRIPTION
Vimtutor starts the Vim tutor. It copies the tutor file
first, so that it can be modified without changing the
original file.
Vimtutor starts the Vim tutor. It copies the tutor file first, so that
it can be modified without changing the original file.
The Vimtutor is useful for people that want to learn their
first Vim commands.
The Vimtutor is useful for people that want to learn their first Vim
commands.
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.
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.
Vim is always started in Vi compatible mode.
@@ -31,36 +28,19 @@ FILES
The Vimtutor text file(s).
/usr/local/lib/vim/tutor/tutor.vim
The Vim script used to copy the Vimtutor
text file.
The Vim script used to copy the Vimtutor text file.
AUTHOR
The Vimtutor was originally written for Vi by Michael C.
Pierce and Robert K. Ware, Colorado School of Mines using
ideas supplied by Charles Smith, Colorado State Univer-
sity. E-mail: bware@mines.colorado.edu.
It was modified for Vim by Bram Moolenaar. For the names
of the translators see the tutor files.
The Vimtutor was originally written for Vi by Michael C. Pierce and
Robert K. Ware, Colorado School of Mines using ideas supplied by
Charles Smith, Colorado State University. E-mail: bware@mines.col-
orado.edu.
It was modified for Vim by Bram Moolenaar. For the names of the trans-
lators see the tutor files.
SEE ALSO
vim(1)
2001 April 2 1
2001 April 2 VIMTUTOR(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<EFBFBD> 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<70> 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
<EFBFBD> specificato come il carattere
.RB \` \- '
, l'input <20> 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 <20> "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 <20> 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<69> normale [esadecimale] e \fI1\fP in modalit<69> 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 <20> 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 <20> 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
.I \-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" <20> 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 <20> di usare
lettere minuscole.
.TP
.IR \-v " | " \-version
visualizza la stringa contenente la versione del programma.
.SH ATTENZIONE
.PP
.I xxd \-r
<EFBFBD> capace di operare "magie" nell'utilizzare l'informazione "numero di linea".
Se sul file di output ci si pu<70> posizionare usando la "seek", il numero di
linea all'inizio di ogni riga esadecimale pu<70> essere non ordinato, delle
linee possono mancare delle linee, oppure esserci delle sovrapposizioni.
In simili casi xxd user<65> 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<43> 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
<EFBFBD> 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<EFBFBD> comportarsi in modo diverso da
.I xxd \-s seek
, perch<63> lseek(2) <20> usata per tornare indietro nel file di input. Il '+'
fa differenza se il file di input <20> lo "standard input", e se la pozione nel
file di "standard input" non <20> all'inizio del file quando xxd <20> 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<63> `cat'
ha gi<67> 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 <20> 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<70> 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

View File

@@ -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
@@ -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
@@ -186,7 +185,7 @@ Hexdump from file position 0x100 ( = 1024-768) on.
\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 posi-
tions 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
position.
start at <seek> bytes abs. (or rel.) infile offset. + indicates
that the seek is relative to the current 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 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 Jun 10
" Last Change: 2005 Mar 06
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -63,6 +63,9 @@ endfun
" A-A-P recipe
au BufNewFile,BufRead *.aap setf aap
" ABAB/4
au BufNewFile,BufRead *.abap setf abap
" ABC music notation
au BufNewFile,BufRead *.abc setf abc
@@ -88,7 +91,7 @@ au BufNewFile,BufRead build.xml setf ant
au BufNewFile,BufRead proftpd.conf* setf apachestyle
" Apache config file
au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,.htaccess,apache.conf* setf apache
au BufNewFile,BufRead httpd.conf*,srm.conf*,access.conf*,.htaccess,apache.conf*,apache2.conf*,/etc/apache2/*.conf* setf apache
" XA65 MOS6510 cross assembler
au BufNewFile,BufRead *.a65 setf a65
@@ -97,6 +100,9 @@ au BufNewFile,BufRead *.a65 setf a65
au BufNewFile,BufRead *.am
\ if expand("<afile>") !~? 'Makefile.am\>' | setf elf | endif
" ALSA configuration
au BufNewFile,BufRead ~/.asoundrc,/usr/share/alsa/alsa.conf,/etc/asound.conf setf alsaconf
" Arc Macro Language
au BufNewFile,BufRead *.aml setf aml
@@ -205,13 +211,20 @@ endfun
au BufNewFile,BufRead *.vbs,*.dsm,*.ctl setf vb
" Batch file for MSDOS.
au BufNewFile,BufRead *.bat,*.btm,*.sys setf dosbatch
au BufNewFile,BufRead *.bat,*.sys setf dosbatch
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
au BufNewFile,BufRead *.cmd
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
" Batch file for 4DOS
au BufNewFile,BufRead *.btm setf btm
au BufNewFile,BufRead *.btm call <SID>FTbtm()
fun! <SID>FTbtm()
if exists("g:dosbatch_syntax_for_btm") && g:dosbatch_syntax_for_btm
setf dosbatch
else
setf btm
endif
endfun
" BC calculator
au BufNewFile,BufRead *.bc setf bc
@@ -223,7 +236,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
@@ -499,6 +512,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
@@ -528,7 +544,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
@@ -582,8 +598,8 @@ 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 <SID>FTCheck_html()
" Distinguish between HTML and XHTML
fun! <SID>FTCheck_html()
@@ -634,15 +650,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
@@ -865,6 +884,9 @@ au BufNewFile,BufRead *.mysql setf mysql
" M$ Resource files
au BufNewFile,BufRead *.rc setf rc
" MuPAD source
au BufRead,BufNewFile *.mu setf mupad
" Mush
au BufNewFile,BufRead *.mush setf mush
@@ -877,6 +899,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
@@ -956,6 +981,7 @@ if has("fname_case")
else
au BufNewFile,BufRead *.pl call FTCheck_pl()
endif
au BufNewFile,BufRead *.plx setf perl
fun! FTCheck_pl()
if exists("g:filetype_pl")
@@ -1264,6 +1290,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
@@ -1322,22 +1351,41 @@ fun! SetFileTypeSH(name)
unlet b:is_bash
endif
endif
setf sh
call SetFileTypeShell("sh")
endfun
" For shell-like file types, check for an "exec" command hidden in a comment,
" as used for Tcl.
fun! SetFileTypeShell(name)
let l = 2
while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)'
" Skip empty and comment lines.
let l = l + 1
endwhile
if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$'
" Found an "exec" line after a comment with continuation
let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '')
if n =~ '\<tclsh\|\<wish'
setf tcl
return
endif
endif
exe "setf " . a:name
endfun
" tcsh scripts
au BufNewFile,BufRead .tcshrc*,*.tcsh,tcsh.tcshrc,tcsh.login setf tcsh
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()
fun! SetFileTypeCSH()
if exists("g:filetype_csh")
exe "setf " . g:filetype_csh
call SetFileTypeShell(g:filetype_csh)
elseif &shell =~ "tcsh"
setf tcsh
call SetFileTypeShell("tcsh")
else
setf csh
call SetFileTypeShell("csh")
endif
endfun
@@ -1415,8 +1463,19 @@ au BufNewFile,BufRead *.spy,*.spi setf spyce
" Squid
au BufNewFile,BufRead squid.conf setf squid
" SQL (all but the first one for Oracle Designer)
au BufNewFile,BufRead *.sql,*.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
" SQL for Oracle Designer
au BufNewFile,BufRead *.tyb,*.typ,*.tyc,*.pkb,*.pks setf sql
" SQL
au BufNewFile,BufRead *.sql call SetFileTypeSQL()
fun! SetFileTypeSQL()
if exists("g:filetype_sql")
exe "setf " . g:filetype_sql
else
setf sql
endif
endfun
" SQLJ
au BufNewFile,BufRead *.sqlj setf sqlj
@@ -1436,6 +1495,9 @@ 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
@@ -1473,6 +1535,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
@@ -1689,7 +1754,7 @@ au BufNewFile,BufRead *termcap*
au BufNewFile,BufRead *vimrc* setf 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

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: 2004 Nov 22
if exists("did_load_ftplugin")
finish
@@ -14,7 +14,7 @@ augroup filetypeplugin
if expand("<amatch>") != ""
if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet b:undo_ftplugin b:did_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

View File

@@ -0,0 +1,125 @@
" Vim filetype plugin file utility
" Language: * (various)
" Maintainer: Dave Silvia <dsilvia@mchsi.com>
" Date: 6/30/2004
" The start of match (b:SOM) default is:
" '\<'
" The end of match (b:EOM) default is:
" '\>'
"
" If you want to use some other start/end of match, just assign the
" value to the b:SOM|EOM variable in your filetype script.
"
" SEE: :h pattern.txt
" :h pattern-searches
" :h regular-expression
" :h matchit
let s:myName=expand("<sfile>:t")
" matchit.vim not loaded -- don't do anyting
if !exists("loaded_matchit")
echomsg s:myName.": matchit.vim not loaded -- finishing without loading"
finish
endif
" already been here -- don't redefine
if exists("*AppendMatchGroup")
finish
endif
" Function To Build b:match_words
" The following function, 'AppendMatchGroup', helps to increase
" readability of your filetype script if you choose to use matchit.
" It also precludes many construction errors, reducing the
" construction to simply invoking the function with the match words.
" As an example, let's take the ubiquitous if/then/else/endif type
" of construct. This is how the entry in your filetype script would look.
"
" " source the AppendMatchGroup function file
" runtime ftplugin/AppendMatchGroup.vim
"
" " fill b:match_words
" call AppendMatchGroup('if,then,else,endif')
"
" And the b:match_words constructed would look like:
"
" \<if\>:\<then\>:\<else\>:\<endif\>
"
" Use of AppendMatchGroup makes your filetype script is a little
" less busy and a lot more readable. Additionally, it
" checks three critical things:
"
" 1) Do you have at least 2 entries in your match group.
"
" 2) Does the buffer variable 'b:match_words' exist? if not, create it.
"
" 3) If the buffer variable 'b:match_words' does exist, is the last
" character a ','? If not, add it before appending.
"
" You should now be able to match 'if/then/else/endif' in succession
" in your source file, in just about any construction you may have
" chosen for them.
"
" To add another group, simply call 'AppendMatchGroup again. E.G.:
"
" call AppendMatchGroup('while,do,endwhile')
function AppendMatchGroup(mwordList)
let List=a:mwordList
let Comma=match(List,',')
if Comma == -1 || Comma == strlen(List)-1
echoerr "Must supply a comma separated list of at least 2 entries."
echoerr "Supplied list: <".List.">"
return
endif
let listEntryBegin=0
let listEntryEnd=Comma
let listEntry=strpart(List,listEntryBegin,listEntryEnd-listEntryBegin)
let List=strpart(List,Comma+1)
let Comma=match(List,',')
" if listEntry is all spaces || List is empty || List is all spaces
if (match(listEntry,'\s\+') == 0 && match(listEntry,'\S\+') == -1)
\ || List == '' || (match(List,'\s\+') == 0 && match(List,'\S\+') == -1)
echoerr "Can't use all spaces for an entry <".listEntry.">"
echoerr "Remaining supplied list: <".List.">"
return
endif
if !exists("b:SOM")
let b:SOM='\<'
endif
if !exists("b:EOM")
let b:EOM='\>'
endif
if !exists("b:match_words")
let b:match_words=''
endif
if b:match_words != '' && match(b:match_words,',$') == -1
let b:match_words=b:match_words.','
endif
" okay, all set add first entry in this list
let b:match_words=b:match_words.b:SOM.listEntry.b:EOM.':'
while Comma != -1
let listEntryEnd=Comma
let listEntry=strpart(List,listEntryBegin,listEntryEnd-listEntryBegin)
let List=strpart(List,Comma+1)
let Comma=match(List,',')
" if listEntry is all spaces
if match(listEntry,'\s\+') == 0 && match(listEntry,'\S\+') == -1
echoerr "Can't use all spaces for an entry <".listEntry."> - skipping"
echoerr "Remaining supplied list: <".List.">"
continue
endif
let b:match_words=b:match_words.b:SOM.listEntry.b:EOM.':'
endwhile
let listEntry=List
let b:match_words=b:match_words.b:SOM.listEntry.b:EOM
endfunction
" TODO: Write a wrapper to handle multiple groups in one function call.
" Don't see a lot of utility in this as it would undoubtedly warrant
" continuation lines in the filetype script and it would be a toss
" up as to which is more readable: individual calls one to a line or
" a single call with continuation lines. I vote for the former.

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: Abaqus finite element input file (www.abaqus.com)
" Maintainer: Carl Osterwisch <osterwischc@asme.org>
" Last Change: 2004 May
" Last Change: 2004 Jul 06
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin") | finish | endif
@@ -27,6 +27,10 @@ setlocal include=\\<\\cINPUT\\s*=
" Remove characters up to the first = when evaluating filenames
setlocal includeexpr=substitute(v:fname,'.\\{-}=','','')
" Remove comma from valid filename characters since it is used to
" separate keyword parameters
setlocal isfname-=,
" Define format of comment lines (see 'formatoptions' for uses)
setlocal comments=:**
setlocal commentstring=**%s

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: aspvbs
" Maintainer: Dan Sharp <dwsharp at hotmail dot com>
" Last Changed: 2003 Sep 29
" Last Changed: 2004 Jun 28
" URL: http://mywebpage.netscape.com/sharppeople/vim/ftplugin
if exists("b:did_ftplugin") | finish | endif
@@ -35,15 +35,16 @@ endif
" thanks to Gontran BAERTS
if exists("loaded_matchit")
let s:notend = '\%(\<end\s\+\)\@<!'
let b:match_ignorecase = 1
let b:match_words =
\ s:notend . '\<If\>:^\s\+\<Else\>:\<ElseIf\>:\<end\s\+\<if\>,' .
\ s:notend . '\<Select\s\+\<Case\>:\<Case\>:\<Case\s\+\<Else\>:\<End\s\+\<Select\>,' .
\ '^\s*\<Sub\>:\<End\s\+\<Sub\>,' .
\ '^\s*\<Function\>:\<End\s\+\<Function\>,' .
\ '\<Class\>:\<End\s\+\<Class\>,' .
\ '^\s*\<Do\>:\<Loop\>,' .
\ '^\s*\<For\>:\<Next\>,' .
\ '\<While\>:\<Wend\>,' .
\ s:notend . '\<if\>\%(.\{-}then\s\+\w\)\@!:\<elseif\>:^\s*\<else\>:\<end\s\+\<if\>,' .
\ s:notend . '\<select\s\+case\>:\<case\>:\<case\s\+else\>:\<end\s\+select\>,' .
\ '^\s*\<sub\>:\<end\s\+sub\>,' .
\ '^\s*\<function\>:\<end\s\+function\>,' .
\ '\<class\>:\<end\s\+class\>,' .
\ '^\s*\<do\>:\<loop\>,' .
\ '^\s*\<for\>:\<next\>,' .
\ '\<while\>:\<wend\>,' .
\ s:match_words
endif
@@ -52,7 +53,7 @@ if has("gui_win32")
let b:browsefilter="ASP Files (*.asp)\t*.asp\n" . s:browsefilter
endif
let b:undo_ftplugin = "unlet! b:match_words b:browsefilter | " . s:undo_ftplugin
let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " . s:undo_ftplugin
" Restore the saved compatibility options.
let &cpo = s:save_cpo

12
runtime/ftplugin/btm.vim Normal file
View File

@@ -0,0 +1,12 @@
" Vim filetype plugin file
" Language: BTM
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2004 Jul 06
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
finish
endif
" Behaves just like dosbatch
runtime! ftplugin/dosbatch.vim ftplugin/dosbatch_*.vim ftplugin/dosbatch/*.vim

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2004 May 16
" Last Change: 2004 Sep 01
" Only do this when not done yet for this buffer
if exists("b:did_ftplugin")
@@ -37,7 +37,7 @@ if has("gui_win32") && !exists("b:browsefilter")
\ "C Header Files (*.h)\t*.h\n" .
\ "C Source Files (*.c)\t*.c\n" .
\ "All Files (*.*)\t*.*\n"
elseif &ft == "chscript"
elseif &ft == "ch"
let b:browsefilter = "Ch Source Files (*.ch *.chf)\t*.ch;*.chf\n" .
\ "C Header Files (*.h)\t*.h\n" .
\ "C Source Files (*.c)\t*.c\n" .

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