Mercurial > hg > RemoteEditor > vim7
comparison runtime/doc/pi_netrw.txt @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children | e170173ecb68 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 *pi_netrw.txt* For Vim version 7.1. Last change: 2007 May 08 | |
2 | |
3 ----------------------------------------------------- | |
4 NETRW REFERENCE MANUAL by Charles E. Campbell, Jr. | |
5 ----------------------------------------------------- | |
6 | |
7 | |
8 *dav* *http* *network* *Nwrite* *netrw-file* | |
9 *fetch* *netrw* *Nread* *rcp* *scp* | |
10 *ftp* *netrw.vim* *Nsource* *rsync* *sftp* | |
11 | |
12 ============================================================================== | |
13 1. Contents *netrw-contents* | |
14 | |
15 1. Contents.............................................|netrw-contents| | |
16 2. Starting With Netrw..................................|netrw-start| | |
17 3. Netrw Reference......................................|netrw-ref| | |
18 CONTROLLING EXTERNAL APPLICATIONS..................|netrw-externapp| | |
19 READING............................................|netrw-read| | |
20 WRITING............................................|netrw-write| | |
21 DIRECTORY LISTING..................................|netrw-dirlist| | |
22 CHANGING THE USERID AND PASSWORD...................|netrw-chgup| | |
23 VARIABLES..........................................|netrw-variables| | |
24 PATHS..............................................|netrw-path| | |
25 4. Network-Oriented File Transfer.......................|netrw-xfer| | |
26 NETRC..............................................|netrw-netrc| | |
27 PASSWORD...........................................|netrw-passwd| | |
28 5. Activation...........................................|netrw-activate| | |
29 6. Transparent File Transfer............................|netrw-transparent| | |
30 7. Ex Commands..........................................|netrw-ex| | |
31 8. Variables and Options................................|netrw-var| | |
32 9. Directory Browsing...................................|netrw-browse| {{{1 | |
33 Maps...............................................|netrw-maps| | |
34 Exploring..........................................|netrw-explore-cmds| | |
35 Quick Reference Commands Table.....................|netrw-browse-cmds| | |
36 Netrw Browser Variables............................|netrw-browse-var| | |
37 Introduction To Directory Browsing.................|netrw-browse-intro| | |
38 Netrw Browsing And Option Incompatibilities........|netrw-incompatible| | |
39 Directory Exploring Commands.......................|netrw-explore| | |
40 Refreshing The Listing.............................|netrw-ctrl-l| | |
41 Going Up...........................................|netrw--| | |
42 Browsing...........................................|netrw-cr| | |
43 Obtaining A File...................................|netrw-O| | |
44 Change Listing Style...............................|netrw-i| | |
45 Making A New Directory.............................|netrw-d| | |
46 Deleting Files Or Directories......................|netrw-D| | |
47 Renaming Files Or Directories......................|netrw-move| | |
48 Hiding Files Or Directories........................|netrw-a| | |
49 Edit File Or Directory Hiding List.................|netrw-ctrl-h| | |
50 Browsing With A Horizontally Split Window..........|netrw-o| | |
51 Browsing With A Vertically Split Window............|netrw-v| | |
52 Browsing With A New Tab............................|netrw-t| | |
53 Preview Window.....................................|netrw-p| | |
54 Selecting Sorting Style............................|netrw-s| | |
55 Editing The Sorting Sequence.......................|netrw-S| | |
56 Reversing Sorting Order............................|netrw-r| | |
57 Changing To A Predecessor Directory................|netrw-u| | |
58 Changing To A Successor Directory..................|netrw-U| | |
59 Customizing Browsing With A User Function..........|netrw-x| | |
60 Making The Browsing Directory The Current Directory|netrw-c| | |
61 Bookmarking A Directory............................|netrw-mb| | |
62 Changing To A Bookmarked Directory.................|netrw-gb| | |
63 Listing Bookmarks And History......................|netrw-q| | |
64 Improving Directory Browsing.......................|netrw-listhack| }}}1 | |
65 10. Problems and Fixes...................................|netrw-problems| | |
66 11. Debugging............................................|netrw-debug| | |
67 12. History..............................................|netrw-history| | |
68 13. Credits..............................................|netrw-credits| | |
69 | |
70 The Netrw plugin is generally sourced automatically as it is a | |
71 |standard-plugin|. That said, to make use of netrw, one must | |
72 have plugins available which can be done with the following | |
73 two lines in your <.vimrc>: > | |
74 | |
75 set nocp " 'compatible' is not set | |
76 filetype plugin on " plugins are enabled | |
77 < | |
78 You can avoid loading this plugin by setting the "loaded_netrw" variable | |
79 in your <.vimrc> file: > | |
80 | |
81 :let loaded_netrw = 1 | |
82 | |
83 {Vi does not have any of this} | |
84 | |
85 ============================================================================== | |
86 2. Starting With Netrw *netrw-start* | |
87 | |
88 Netrw makes reading, writing, and browsing over a network connection easy! | |
89 First, make sure that you have plugins enabled, so you'll need to have at | |
90 least the following in your <.vimrc>: (or see |netrw-activate|) > | |
91 | |
92 set nocp " 'compatible' is not set | |
93 filetype plugin on " plugins are enabled | |
94 < | |
95 (see |'cp'| and |:filetype-plugin-on|) | |
96 | |
97 Netrw supports "transparent" editing of files on other machines using urls | |
98 (see |netrw-transparent|). As an example of this, let's assume you have an | |
99 account on some other machine; try > | |
100 | |
101 vim scp://hostname/path/to/file | |
102 < | |
103 if you have an ssh connection. Want to make ssh/scp easier to use? Check | |
104 out |netrw-listhack|! | |
105 | |
106 What if you have ftp, not ssh/scp? That's easy, too; try > | |
107 | |
108 vim ftp://hostname/path/to/file | |
109 < | |
110 Want to make ftp simpler to use? See if your ftp supports a file called | |
111 <.netrc> -- typically it goes in your home directory, has read/write | |
112 permissions for only the user to read (ie. not group, world, other, etc), | |
113 and has lines resembling > | |
114 | |
115 machine HOSTNAME login USERID password "PASSWORD" | |
116 machine HOSTNAME login USERID password "PASSWORD" | |
117 ... | |
118 default login USERID password "PASSWORD" | |
119 < | |
120 Now about browsing -- ie. when you just want to look around before editing a | |
121 file. For browsing on your current host, just "edit" a directory: > | |
122 | |
123 vim . | |
124 vim /home/userid/path | |
125 < | |
126 For browsing on a remote host, "edit" a directory (but make sure that | |
127 the directory name is followed by a "/"): > | |
128 | |
129 vim scp://hostname/ | |
130 vim ftp://hostname/path/to/dir/ | |
131 < | |
132 See |netrw-browse| for more! | |
133 | |
134 There's more protocols supported than scp and ftp, too: see the next | |
135 section, |netrw-externapp|. | |
136 | |
137 ============================================================================== | |
138 3. Netrw Reference *netrw-ref* | |
139 | |
140 CONTROLLING EXTERNAL APPLICATIONS *netrw-externapp* | |
141 | |
142 Protocol Variable Default Value | |
143 -------- ---------------- ------------- | |
144 dav: *g:netrw_dav_cmd* = "cadaver" | |
145 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available | |
146 ftp: *g:netrw_ftp_cmd* = "ftp" | |
147 http: *g:netrw_http_cmd* = "curl -o" if curl is available | |
148 http: g:netrw_http_cmd = "wget -q -O" else if wget is available | |
149 http: g:netrw_http_cmd = "fetch -o" else if fetch is available | |
150 rcp: *g:netrw_rcp_cmd* = "rcp" | |
151 rsync: *g:netrw_rsync_cmd* = "rsync -a" | |
152 scp: *g:netrw_scp_cmd* = "scp -q" | |
153 sftp: *g:netrw_sftp_cmd* = "sftp" | |
154 | |
155 READING *netrw-read* *netrw-nread* | |
156 :Nread ? give help | |
157 :Nread "machine:path" uses rcp | |
158 :Nread "machine path" uses ftp w/ <.netrc> | |
159 :Nread "machine id password path" uses ftp | |
160 :Nread "dav://machine[:port]/path" uses cadaver | |
161 :Nread "fetch://[user@]machine/path" uses fetch | |
162 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> | |
163 :Nread "http://[user@]machine/path" uses http uses wget | |
164 :Nread "rcp://[user@]machine/path" uses rcp | |
165 :Nread "rsync://[user@]machine[:port]/path" uses rsync | |
166 :Nread "scp://[user@]machine[[:#]port]/path" uses scp | |
167 :Nread "sftp://[user@]machine/path" uses sftp | |
168 | |
169 WRITING *netrw-write* *netrw-nwrite* | |
170 :Nwrite ? give help | |
171 :Nwrite "machine:path" uses rcp | |
172 :Nwrite "machine path" uses ftp w/ <.netrc> | |
173 :Nwrite "machine id password path" uses ftp | |
174 :Nwrite "dav://machine[:port]/path" uses cadaver | |
175 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> | |
176 :Nwrite "rcp://[user@]machine/path" uses rcp | |
177 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync | |
178 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp | |
179 :Nwrite "sftp://[user@]machine/path" uses sftp | |
180 http: not supported! | |
181 | |
182 SOURCING *netrw-source* | |
183 :Nsource ? give help | |
184 :Nsource "dav://machine[:port]/path" uses cadaver | |
185 :Nsource "fetch://[user@]machine/path" uses fetch | |
186 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc> | |
187 :Nsource "http://[user@]machine/path" uses http uses wget | |
188 :Nsource "rcp://[user@]machine/path" uses rcp | |
189 :Nsource "rsync://[user@]machine[:port]/path" uses rsync | |
190 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp | |
191 :Nsource "sftp://[user@]machine/path" uses sftp | |
192 | |
193 DIRECTORY LISTING *netrw-dirlist* | |
194 :Nread [protocol]://[user]@hostname/path/ | |
195 | |
196 *netrw-login* *netrw-password* | |
197 CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* | |
198 | |
199 Attempts to use ftp will prompt you for a user-id and a password. | |
200 These will be saved in global variables g:netrw_uid and | |
201 g:netrw_passwd; subsequent uses of ftp will re-use those two items to | |
202 simplify the further use of ftp. However, if you need to use a | |
203 different user id and/or password, you'll want to call NetUserPass() | |
204 first. To work around the need to enter passwords, check if your ftp | |
205 supports a <.netrc> file in your home directory. Also see | |
206 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how | |
207 to not need to use passwords, look at |netrw-listhack|). | |
208 | |
209 :NetUserPass [uid [password]] -- prompts as needed | |
210 :call NetUserPass() -- prompts for uid and password | |
211 :call NetUserPass("uid") -- prompts for password | |
212 :call NetUserPass("uid","password") -- sets global uid and password | |
213 | |
214 VARIABLES *netrw-variables* | |
215 | |
216 (also see: |netrw-browse-var| |netrw-protocol| |netrw-settings| |netrw-var|) | |
217 | |
218 *b:netrw_lastfile* last file Network-read/written retained on a per-buffer | |
219 basis (supports plain :Nw ) | |
220 | |
221 *g:netrw_ftp* if it doesn't exist, use default ftp | |
222 =0 use default ftp (uid password) | |
223 =1 use alternate ftp method (user uid password) | |
224 If you're having trouble with ftp, try changing the | |
225 value of this variable to see if the alternate ftp | |
226 method works for your setup. | |
227 | |
228 *g:netrw_extracmd* default: doesn't exist | |
229 If this variable exists, then any string it contains | |
230 will be placed into the commands set to your ftp | |
231 client. As an example: | |
232 ="passive" | |
233 | |
234 *g:netrw_ftpmode* ="binary" (default) | |
235 ="ascii" | |
236 | |
237 *g:netrw_ignorenetrc* =0 (default for linux, cygwin) | |
238 =1 If you have a <.netrc> file but it doesn't work and | |
239 you want it ignored, then set this variable as shown. | |
240 (default for Windows + cmd.exe) | |
241 | |
242 *g:netrw_menu* =0 disable netrw's menu | |
243 =1 (default) netrw's menu enabled | |
244 | |
245 *g:netrw_nogx* if this variable exists, then the "gx" map will not | |
246 be available (see |netrw-gx|) | |
247 | |
248 *g:netrw_uid* (ftp) user-id, retained on a per-session basis | |
249 *g:netrw_passwd* (ftp) password, retained on a per-session basis | |
250 | |
251 *g:netrw_shq* = "'" for Unix/Linux systems (ie. a single quote) | |
252 = "'" for Windows + cygwin systems (ie. a single quote) | |
253 = '"' for Windows systems, not using cygwin | |
254 (ie. a double quote) | |
255 Controls the quoting character used during scp and ftp | |
256 commands. | |
257 | |
258 *g:netrw_scpport* = "-P" : option to use to set port for scp | |
259 *g:netrw_sshport* = "-p" : option to use to set port for ssh | |
260 | |
261 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one | |
262 line window. This window provides reliable | |
263 delivery of messages. (default) | |
264 =0 : messages from netrw will use echoerr ; | |
265 messages don't always seem to show up this | |
266 way, but one doesn't have to quit the window. | |
267 | |
268 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank | |
269 lines that o/s's ftp "provides" on transfers | |
270 =0 force normal ftp behavior (no trailing line removal) | |
271 | |
272 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also | |
273 permits network browsing to use ls with time and | |
274 size sorting (default if windows) | |
275 =0 assume Windows' scp accepts windows-style paths | |
276 Network browsing uses dir instead of ls | |
277 This option is ignored if you're using unix | |
278 | |
279 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP | |
280 =1 use WinNT's rcp in binary mode (default) | |
281 | |
282 PATHS *netrw-path* | |
283 | |
284 Paths to files are generally user-directory relative for most protocols. | |
285 It is possible that some protocol will make paths relative to some | |
286 associated directory, however. | |
287 > | |
288 example: vim scp://user@host/somefile | |
289 example: vim scp://user@host/subdir1/subdir2/somefile | |
290 < | |
291 where "somefile" is the "user"'s home directory. If you wish to get a | |
292 file using root-relative paths, use the full path: | |
293 > | |
294 example: vim scp://user@host//somefile | |
295 example: vim scp://user@host//subdir1/subdir2/somefile | |
296 < | |
297 | |
298 ============================================================================== | |
299 4. Network-Oriented File Transfer *netrw-xfer* | |
300 | |
301 Network-oriented file transfer under Vim is implemented by a VimL-based script | |
302 (<netrw.vim>) using plugin techniques. It currently supports both reading and | |
303 writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch, | |
304 dav/cadaver, rsync, or sftp. | |
305 | |
306 http is currently supported read-only via use of wget or fetch. | |
307 | |
308 <netrw.vim> is a standard plugin which acts as glue between Vim and the | |
309 various file transfer programs. It uses autocommand events (BufReadCmd, | |
310 FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. > | |
311 | |
312 ex. vim ftp://hostname/path/to/file | |
313 < | |
314 The characters preceding the colon specify the protocol to use; in the | |
315 example, its ftp. The <netrw.vim> script then formulates a command or a | |
316 series of commands (typically ftp) which it issues to an external program | |
317 (ftp, scp, etc) which does the actual file transfer/protocol. Files are read | |
318 from/written to a temporary file (under Unix/Linux, /tmp/...) which the | |
319 <netrw.vim> script will clean up. | |
320 | |
321 *netrw-putty* *netrw-pscp* *netrw-psftp* | |
322 One may modify any protocol's implementing external application by setting a | |
323 variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to | |
324 "scp -q"). As an example, consider using PuTTY: > | |
325 | |
326 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch' | |
327 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"' | |
328 < | |
329 See |netrw-p8| for more about putty, pscp, psftp, etc. | |
330 | |
331 Ftp, an old protocol, seems to be blessed by numerous implementations. | |
332 Unfortunately, some implementations are noisy (ie., add junk to the end of the | |
333 file). Thus, concerned users may decide to write a NetReadFixup() function | |
334 that will clean up after reading with their ftp. Some Unix systems (ie., | |
335 FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is | |
336 not noisy and more convenient, actually, for <netrw.vim> to use. | |
337 Consequently, if "fetch" is executable, it will be used to do reads for | |
338 ftp://... (and http://...) . See |netrw-var| for more about this. | |
339 | |
340 For rcp, scp, sftp, and http, one may use network-oriented file transfers | |
341 transparently; ie. | |
342 > | |
343 vim rcp://[user@]machine/path | |
344 vim scp://[user@]machine/path | |
345 < | |
346 If your ftp supports <.netrc>, then it too can be just as transparently used | |
347 if the needed triad of machine name, user id, and password are present in | |
348 that file. Your ftp must be able to use the <.netrc> file on its own, however. | |
349 > | |
350 vim ftp://[user@]machine[[:#]portnumber]/path | |
351 < | |
352 However, ftp will often need to query the user for the userid and password. | |
353 The latter will be done "silently"; ie. asterisks will show up instead of | |
354 the actually-typed-in password. Netrw will retain the userid and password | |
355 for subsequent read/writes from the most recent transfer so subsequent | |
356 transfers (read/write) to or from that machine will take place without | |
357 additional prompting. | |
358 | |
359 *netrw-urls* | |
360 +=================================+============================+============+ | |
361 | Reading | Writing | Uses | | |
362 +=================================+============================+============+ | |
363 | DAV: | | | | |
364 | dav://host/path | | cadaver | | |
365 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver | | |
366 +---------------------------------+----------------------------+------------+ | |
367 | FETCH: | | | | |
368 | fetch://[user@]host/path | | | | |
369 | fetch://[user@]host:http/path | Not Available | fetch | | |
370 | :Nread fetch://[user@]host/path| | | | |
371 +---------------------------------+----------------------------+------------+ | |
372 | FILE: | | | | |
373 | file:///* | file:///* | | | |
374 | file://localhost/* | file://localhost/* | | | |
375 +---------------------------------+----------------------------+------------+ | |
376 | FTP: (*3) | (*3) | | | |
377 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) | | |
378 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc | | |
379 | :Nread host path | :Nwrite host path | ftp+.netrc | | |
380 | :Nread host uid pass path | :Nwrite host uid pass path | ftp | | |
381 +---------------------------------+----------------------------+------------+ | |
382 | HTTP: wget is executable: (*4) | | | | |
383 | http://[user@]host/path | Not Available | wget | | |
384 +---------------------------------+----------------------------+------------+ | |
385 | HTTP: fetch is executable (*4) | | | | |
386 | http://[user@]host/path | Not Available | fetch | | |
387 +---------------------------------+----------------------------+------------+ | |
388 | RCP: | | | | |
389 | rcp://[user@]host/path | rcp://[user@]host/path | rcp | | |
390 +---------------------------------+----------------------------+------------+ | |
391 | RSYNC: | | | | |
392 | rsync://[user@]host/path | rsync://[user@]host/path | rsync | | |
393 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync | | |
394 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp | | |
395 +---------------------------------+----------------------------+------------+ | |
396 | SCP: | | | | |
397 | scp://[user@]host/path | scp://[user@]host/path | scp | | |
398 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) | | |
399 +---------------------------------+----------------------------+------------+ | |
400 | SFTP: | | | | |
401 | sftp://[user@]host/path | sftp://[user@]host/path | sftp | | |
402 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) | | |
403 +=================================+============================+============+ | |
404 | |
405 (*1) For an absolute path use scp://machine//path. | |
406 | |
407 (*2) if <.netrc> is present, it is assumed that it will | |
408 work with your ftp client. Otherwise the script will | |
409 prompt for user-id and password. | |
410 | |
411 (*3) for ftp, "machine" may be machine#port or machine:port | |
412 if a different port is needed than the standard ftp port | |
413 | |
414 (*4) for http:..., if wget is available it will be used. Otherwise, | |
415 if fetch is available it will be used. | |
416 | |
417 Both the :Nread and the :Nwrite ex-commands can accept multiple filenames. | |
418 | |
419 | |
420 NETRC *netrw-netrc* | |
421 | |
422 The typical syntax for lines in a <.netrc> file is given as shown below. | |
423 Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't. | |
424 > | |
425 machine {full machine name} login {user-id} password "{password}" | |
426 default login {user-id} password "{password}" | |
427 | |
428 Your ftp client must handle the use of <.netrc> on its own, but if the | |
429 <.netrc> file exists, an ftp transfer will not ask for the user-id or | |
430 password. | |
431 | |
432 Note: | |
433 Since this file contains passwords, make very sure nobody else can | |
434 read this file! Most programs will refuse to use a .netrc that is | |
435 readable for others. Don't forget that the system administrator can | |
436 still read the file! | |
437 | |
438 | |
439 PASSWORD *netrw-passwd* | |
440 | |
441 The script attempts to get passwords for ftp invisibly using |inputsecret()|, | |
442 a built-in Vim function. See |netrw-uidpass| for how to change the password | |
443 after one has set it. | |
444 | |
445 Unfortunately there doesn't appear to be a way for netrw to feed a password to | |
446 scp. Thus every transfer via scp will require re-entry of the password. | |
447 However, |netrw-listhack| can help with this problem. | |
448 | |
449 | |
450 ============================================================================== | |
451 5. Activation *netrw-activate* | |
452 | |
453 Network-oriented file transfers are available by default whenever Vim's | |
454 |'nocompatible'| mode is enabled. The <netrw.vim> file resides in your | |
455 system's vim-plugin directory and is sourced automatically whenever you bring | |
456 up vim. I suggest that, at a minimum, you have at least the following in your | |
457 <.vimrc> customization file: > | |
458 | |
459 set nocp | |
460 if version >= 600 | |
461 filetype plugin indent on | |
462 endif | |
463 < | |
464 | |
465 ============================================================================== | |
466 6. Transparent File Transfer *netrw-transparent* | |
467 | |
468 Transparent file transfers occur whenever a regular file read or write | |
469 (invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made. | |
470 Thus one may use files across networks just as simply as if they were local. > | |
471 | |
472 vim ftp://[user@]machine/path | |
473 ... | |
474 :wq | |
475 | |
476 See |netrw-activate| for more on how to encourage your vim to use plugins | |
477 such as netrw. | |
478 | |
479 | |
480 ============================================================================== | |
481 7. Ex Commands *netrw-ex* | |
482 | |
483 The usual read/write commands are supported. There are also a few | |
484 additional commands available. Often you won't need to use Nw or | |
485 Nread as shown in |netrw-transparent| (ie. simply use > | |
486 :e url | |
487 :r url | |
488 :w url | |
489 instead, as appropriate) -- see |netrw-urls|. In the explanations | |
490 below, a {netfile} is an url to a remote file. | |
491 | |
492 :[range]Nw Write the specified lines to the current | |
493 file as specified in b:netrw_lastfile. | |
494 | |
495 :[range]Nw {netfile} [{netfile}]... | |
496 Write the specified lines to the {netfile}. | |
497 | |
498 :Nread Read the specified lines into the current | |
499 buffer from the file specified in | |
500 b:netrw_lastfile. | |
501 | |
502 :Nread {netfile} {netfile}... | |
503 Read the {netfile} after the current line. | |
504 | |
505 :Nsource {netfile} | |
506 Source the {netfile}. | |
507 To start up vim using a remote .vimrc, one may use | |
508 the following (all on one line) (tnx to Antoine Mechelynck) > | |
509 vim -u NORC -N | |
510 --cmd "runtime plugin/netrwPlugin.vim" | |
511 --cmd "source scp://HOSTNAME/.vimrc" | |
512 < *netrw-uidpass* | |
513 :call NetUserPass() | |
514 If b:netrw_uid and b:netrw_passwd don't exist, | |
515 this function query the user for them. | |
516 | |
517 :call NetUserPass("userid") | |
518 This call will set the b:netrw_uid and, if | |
519 the password doesn't exist, will query the user for it. | |
520 | |
521 :call NetUserPass("userid","passwd") | |
522 This call will set both the b:netrw_uid and b:netrw_passwd. | |
523 The user-id and password are used by ftp transfers. One may | |
524 effectively remove the user-id and password by using "" | |
525 strings. | |
526 | |
527 :NetrwSettings This command is described in |netrw-settings| -- used to | |
528 display netrw settings and change netrw behavior. | |
529 | |
530 | |
531 ============================================================================== | |
532 8. Variables and Options *netrw-options* *netrw-var* | |
533 | |
534 The <netrw.vim> script provides several variables which act as options to | |
535 ffect <netrw.vim>'s behavior. These variables typically may be set in the | |
536 user's <.vimrc> file: | |
537 (also see: | |
538 |netrw-settings| |netrw-browse-var| |netrw-protocol| |netrw-settings|) > | |
539 | |
540 ------------- | |
541 Netrw Options | |
542 ------------- | |
543 Option Meaning | |
544 -------------- ----------------------------------------------- | |
545 < | |
546 b:netrw_col Holds current cursor position (during NetWrite) | |
547 g:netrw_cygwin =1 assume scp under windows is from cygwin | |
548 (default/windows) | |
549 =0 assume scp under windows accepts windows | |
550 style paths (default/else) | |
551 g:netrw_ftp =0 use default ftp (uid password) | |
552 g:netrw_ftpmode ="binary" (default) | |
553 ="ascii" (your choice) | |
554 g:netrw_ignorenetrc =1 (default) | |
555 if you have a <.netrc> file but you don't | |
556 want it used, then set this variable. Its | |
557 mere existence is enough to cause <.netrc> | |
558 to be ignored. | |
559 b:netrw_lastfile Holds latest method/machine/path. | |
560 b:netrw_line Holds current line number (during NetWrite) | |
561 g:netrw_passwd Holds current password for ftp. | |
562 g:netrw_silent =0 transfers done normally | |
563 =1 transfers done silently | |
564 g:netrw_uid Holds current user-id for ftp. | |
565 =1 use alternate ftp (user uid password) | |
566 (see |netrw-options|) | |
567 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default) | |
568 =1 use WinNT/2K/XP's rcp, binary mode | |
569 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc | |
570 =1 use default method to do ftp > | |
571 ----------------------------------------------------------------------- | |
572 < | |
573 The script will also make use of the following variables internally, albeit | |
574 temporarily. | |
575 > | |
576 ------------------- | |
577 Temporary Variables | |
578 ------------------- | |
579 Variable Meaning | |
580 -------- ------------------------------------ | |
581 < | |
582 g:netrw_method Index indicating rcp/ftp+.netrc/ftp | |
583 g:netrw_machine Holds machine name parsed from input | |
584 g:netrw_fname Holds filename being accessed > | |
585 ------------------------------------------------------------ | |
586 < | |
587 *netrw-protocol* | |
588 | |
589 Netrw supports a number of protocols. These protocols are invoked using the | |
590 variables listed below, and may be modified by the user. | |
591 > | |
592 ------------------------ | |
593 Protocol Control Options | |
594 ------------------------ | |
595 Option Type Setting Meaning | |
596 --------- -------- -------------- --------------------------- | |
597 < | |
598 netrw_ftp variable =doesn't exist userid set by "user userid" | |
599 =0 userid set by "user userid" | |
600 =1 userid set by "userid" | |
601 NetReadFixup function =doesn't exist no change | |
602 =exists Allows user to have files | |
603 read via ftp automatically | |
604 transformed however they wish | |
605 by NetReadFixup() | |
606 g:netrw_dav_cmd variable ="cadaver" | |
607 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available | |
608 g:netrw_ftp_cmd variable ="ftp" | |
609 g:netrw_http_cmd variable ="fetch -o" if fetch is available | |
610 g:netrw_http_cmd variable ="wget -O" else if wget is available | |
611 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa" | |
612 g:netrw_rcp_cmd variable ="rcp" | |
613 g:netrw_rsync_cmd variable ="rsync -a" | |
614 g:netrw_scp_cmd variable ="scp -q" | |
615 g:netrw_sftp_cmd variable ="sftp" > | |
616 ------------------------------------------------------------------------- | |
617 < | |
618 *netrw-ftp* | |
619 | |
620 The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|) | |
621 specify the external program to use handle the ftp protocol. They may | |
622 include command line options (such as -p for passive mode). | |
623 | |
624 Browsing is supported by using the |g:netrw_list_cmd|; the substring | |
625 "HOSTNAME" will be changed via substitution with whatever the current request | |
626 is for a hostname. | |
627 | |
628 Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's | |
629 that give trouble . In order to best understand how to use these options if | |
630 ftp is giving you troubles, a bit of discussion is provided on how netrw does | |
631 ftp reads. | |
632 | |
633 For ftp, netrw typically builds up lines of one of the following formats in a | |
634 temporary file: | |
635 > | |
636 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1 | |
637 ---------------------------------- ------------------------------ | |
638 < | |
639 open machine [port] open machine [port] | |
640 user userid password userid password | |
641 [g:netrw_ftpmode] password | |
642 [g:netrw_extracmd] [g:netrw_ftpmode] | |
643 get filename tempfile [g:netrw_extracmd] | |
644 get filename tempfile > | |
645 --------------------------------------------------------------------- | |
646 < | |
647 The |g:netrw_ftpmode| and |g:netrw_extracmd| are optional. | |
648 | |
649 Netrw then executes the lines above by use of a filter: | |
650 > | |
651 :%! {g:netrw_ftp_cmd} -i [-n] | |
652 < | |
653 where | |
654 g:netrw_ftp_cmd is usually "ftp", | |
655 -i tells ftp not to be interactive | |
656 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>) | |
657 | |
658 If <.netrc> exists it will be used to avoid having to query the user for | |
659 userid and password. The transferred file is put into a temporary file. | |
660 The temporary file is then read into the main editing session window that | |
661 requested it and the temporary file deleted. | |
662 | |
663 If your ftp doesn't accept the "user" command and immediately just demands a | |
664 userid, then try putting "let netrw_ftp=1" in your <.vimrc>. | |
665 | |
666 *netrw-cadaver* | |
667 To handle the SSL certificate dialog for untrusted servers, one may pull | |
668 down the certificate and place it into /usr/ssl/cert.pem. This operation | |
669 renders the server treatment as "trusted". | |
670 | |
671 *netrw-fixup* *netreadfixup* | |
672 If your ftp for whatever reason generates unwanted lines (such as AUTH | |
673 messages) you may write a NetReadFixup(tmpfile) function: | |
674 > | |
675 function! NetReadFixup(method,line1,line2) | |
676 " a:line1: first new line in current file | |
677 " a:line2: last new line in current file | |
678 if a:method == 1 "rcp | |
679 elseif a:method == 2 "ftp + <.netrc> | |
680 elseif a:method == 3 "ftp + machine,uid,password,filename | |
681 elseif a:method == 4 "scp | |
682 elseif a:method == 5 "http/wget | |
683 elseif a:method == 6 "dav/cadaver | |
684 elseif a:method == 7 "rsync | |
685 elseif a:method == 8 "fetch | |
686 elseif a:method == 9 "sftp | |
687 else " complain | |
688 endif | |
689 endfunction | |
690 > | |
691 The NetReadFixup() function will be called if it exists and thus allows you to | |
692 customize your reading process. As a further example, <netrw.vim> contains | |
693 just such a function to handle Windows 95 ftp. For whatever reason, Windows | |
694 95's ftp dumps four blank lines at the end of a transfer, and so it is | |
695 desirable to automate their removal. Here's some code taken from <netrw.vim> | |
696 itself: | |
697 > | |
698 if has("win95") && g:netrw_win95ftp | |
699 fun! NetReadFixup(method, line1, line2) | |
700 if method == 3 " ftp (no <.netrc>) | |
701 let fourblanklines= line2 - 3 | |
702 silent fourblanklines.",".line2."g/^\s*/d" | |
703 endif | |
704 endfunction | |
705 endif | |
706 > | |
707 | |
708 ============================================================================== | |
709 9. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help* | |
710 | |
711 MAPS *netrw-maps* | |
712 <F1>.............Help.......................................|netrw-help| | |
713 <cr>.............Browsing...................................|netrw-cr| | |
714 <del>............Deleting Files or Directories..............|netrw-delete| | |
715 -................Going Up...................................|netrw--| | |
716 a................Hiding Files or Directories................|netrw-a| | |
717 mb...............Bookmarking a Directory....................|netrw-mb| | |
718 gb...............Changing to a Bookmarked Directory.........|netrw-gb| | |
719 c................Make Browsing Directory The Current Dir....|netrw-c| | |
720 d................Make A New Directory.......................|netrw-d| | |
721 D................Deleting Files or Directories..............|netrw-D| | |
722 <c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h| | |
723 i................Change Listing Style.......................|netrw-i| | |
724 <c-l>............Refreshing the Listing.....................|netrw-ctrl-l| | |
725 o................Browsing with a Horizontal Split...........|netrw-o| | |
726 p................Preview Window.............................|netrw-p| | |
727 q................Listing Bookmarks and History..............|netrw-q| | |
728 r................Reversing Sorting Order....................|netrw-r| | |
729 R................Renaming Files or Directories..............|netrw-R| | |
730 s................Selecting Sorting Style....................|netrw-s| | |
731 S................Editing the Sorting Sequence...............|netrw-S| | |
732 t................Browsing with a new tab....................|netrw-t| | |
733 u................Changing to a Predecessor Directory........|netrw-u| | |
734 U................Changing to a Successor Directory..........|netrw-U| | |
735 v................Browsing with a Vertical Split.............|netrw-v| | |
736 x................Customizing Browsing.......................|netrw-x| | |
737 | |
738 COMMANDS *netrw-explore-cmds* | |
739 :Explore[!] [dir] Explore directory of current file........|netrw-explore| | |
740 :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore| | |
741 :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore| | |
742 :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| | |
743 :Texplore[!] [dir] Tab & Explore............................|netrw-explore| | |
744 :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| | |
745 :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore| | |
746 :NetrwSettings.............................................|netrw-settings| | |
747 | |
748 QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds* | |
749 > | |
750 ------- ----------- | |
751 Command Explanation | |
752 ------- ----------- | |
753 < <F1> Causes Netrw to issue help | |
754 <cr> Netrw will enter the directory or read the file |netrw-cr| | |
755 <del> Netrw will attempt to remove the file/directory |netrw-del| | |
756 - Makes Netrw go up one directory |netrw--| | |
757 a Toggles between normal display, |netrw-a| | |
758 hiding (suppress display of files matching g:netrw_list_hide) | |
759 showing (display only files which match g:netrw_list_hide) | |
760 mb bookmark current directory | |
761 gb go to previous bookmarked directory | |
762 c Make current browsing directory the current directory |netrw-c| | |
763 d Make a directory |netrw-d| | |
764 D Netrw will attempt to remove the file(s)/directory(ies) |netrw-D| | |
765 <c-h> Edit file hiding list |netrw-ctrl-h| | |
766 i Cycle between thin, long, wide, and tree listings|netrw-i| | |
767 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l| | |
768 o Enter the file/directory under the cursor in a new browser | |
769 window. A horizontal split is used. |netrw-o| | |
770 O Obtain a file specified by cursor |netrw-O| | |
771 p Preview the file |netrw-p| | |
772 P Browse in the previously used window |netrw-P| | |
773 q List bookmarked directories and history |netrw-q| | |
774 r Reverse sorting order |netrw-r| | |
775 R Rename the designed file(s)/directory(ies) |netrw-R| | |
776 s Select sorting style: by name, time, or file size |netrw-s| | |
777 S Specify suffix priority for name-sorting |netrw-S| | |
778 t Enter the file/directory under the cursor in a new tab|netrw-t| | |
779 u Change to recently-visited directory |netrw-u| | |
780 U Change to subsequently-visited directory |netrw-U| | |
781 v Enter the file/directory under the cursor in a new browser | |
782 window. A vertical split is used. |netrw-v| | |
783 x Apply a function to a file. (special browsers) |netrw-x| | |
784 | |
785 NETRW BROWSER VARIABLES *netrw-browse-var* | |
786 > | |
787 --- ----------- | |
788 Var Explanation | |
789 --- ----------- | |
790 < *g:netrw_alto* change from above splitting to below splitting | |
791 by setting this variable (see |netrw-o|) | |
792 default: =&sb (see |'sb'|) | |
793 | |
794 *g:netrw_altv* change from left splitting to right splitting | |
795 by setting this variable (see |netrw-v|) | |
796 default: =&spr (see |'spr'|) | |
797 | |
798 *g:netrw_browse_split* when browsing, <cr> will open the file by: | |
799 =0: re-using the same window | |
800 =1: horizontally splitting the window first | |
801 =2: vertically splitting the window first | |
802 =3: open file in new tab | |
803 | |
804 *g:netrw_browsex_viewer* specify user's preference for a viewer: > | |
805 "kfmclient exec" | |
806 "gnome-open" | |
807 < If > | |
808 "-" | |
809 < is used, then netrwFileHandler() will look for | |
810 a script/function to handle the given | |
811 extension. (see |netrw_filehandler|). | |
812 | |
813 *g:netrw_fastbrowse* =0: slow speed browsing, never re-use | |
814 directory listings; always obtain | |
815 directory listings. | |
816 =1: medium speed browsing, re-use directory | |
817 listings only when remote browsing. | |
818 (default value) | |
819 =2: fast browsing, only obtains directory | |
820 listings when the directory hasn't been | |
821 seen before (or |netrw-ctrl-l| is used). | |
822 Fast browsing retains old directory listing | |
823 buffers so that they don't need to be | |
824 re-acquired. This feature is especially | |
825 important for remote browsing. However, if | |
826 a file is introduced or deleted into or from | |
827 such directories, the old directory buffer | |
828 becomes out-of-date. One may always refresh | |
829 such a directory listing with |netrw-ctrl-l|. | |
830 This option gives the choice of the trade-off | |
831 between accuracy and speed to the user. | |
832 | |
833 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings | |
834 that can show up as "directories" and "files" | |
835 in the listing. This pattern is used to | |
836 remove such embedded messages. By default its | |
837 value is: | |
838 '^total\s\+\d\+$\| | |
839 ^Trying\s\+\d\+.*$\| | |
840 ^KERBEROS_V\d rejected\| | |
841 ^Security extensions not\| | |
842 No such file\| | |
843 : connect to address [0-9a-fA-F:]* | |
844 : No route to host$' | |
845 | |
846 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory | |
847 listing. Defaults: | |
848 unix or g:netrw_cygwin set: : "ls -lF" | |
849 otherwise "dir" | |
850 | |
851 | |
852 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory | |
853 listing, sorted by size of file. | |
854 Defaults: | |
855 unix or g:netrw_cygwin set: : "ls -slF" | |
856 otherwise "dir" | |
857 | |
858 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory | |
859 listing, sorted by time of last modification. | |
860 Defaults: | |
861 unix or g:netrw_cygwin set: : "ls -tlF" | |
862 otherwise "dir" | |
863 | |
864 *g:netrw_hide* if true, the hiding list is used | |
865 default: =0 | |
866 | |
867 *g:netrw_keepdir* =1 (default) keep current directory immune from | |
868 the browsing directory. | |
869 =0 keep the current directory the same as the | |
870 browsing directory. | |
871 The current browsing directory is contained in | |
872 b:netrw_curdir (also see |netrw-c|) | |
873 | |
874 *g:netrw_list_cmd* command for listing remote directories | |
875 default: (if ssh is executable) | |
876 "ssh HOSTNAME ls -FLa" | |
877 | |
878 *g:netrw_liststyle* Set the default listing style: | |
879 = 0: thin listing (one file per line) | |
880 = 1: long listing (one file per line with time | |
881 stamp information and file size) | |
882 = 2: wide listing (multiple files in columns) | |
883 = 3: tree style listing | |
884 *g:netrw_list_hide* comma separated pattern list for hiding files | |
885 default: "" | |
886 | |
887 *g:netrw_local_mkdir* command for making a local directory | |
888 default: "mkdir" | |
889 | |
890 *g:netrw_local_rmdir* remove directory command (rmdir) | |
891 default: "rmdir" | |
892 | |
893 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long | |
894 listings fit on 80 column displays. | |
895 If your screen is wider, and you have file | |
896 or directory names longer than 32 bytes, | |
897 you may set this option to keep listings | |
898 columnar. | |
899 | |
900 *g:netrw_mkdir_cmd* command for making a remote directory | |
901 default: "ssh USEPORT HOSTNAME mkdir" | |
902 | |
903 *g:netrw_rm_cmd* command for removing files | |
904 default: "ssh USEPORT HOSTNAME rm" | |
905 | |
906 *g:netrw_rmdir_cmd* command for removing directories | |
907 default: "ssh USEPORT HOSTNAME rmdir" | |
908 | |
909 *g:netrw_rmf_cmd* command for removing softlinks | |
910 default: "ssh USEPORT HOSTNAME rm -f" | |
911 | |
912 *g:netrw_sort_by* sort by "name", "time", or "size" | |
913 default: "name" | |
914 | |
915 *g:netrw_sort_direction* sorting direction: "normal" or "reverse" | |
916 default: "normal" | |
917 | |
918 *g:netrw_sort_sequence* when sorting by name, first sort by the | |
919 comma-separated pattern sequence | |
920 default: '[\/]$,*,\.bak$,\.o$,\.h$, | |
921 \.info$,\.swp$,\.obj$' | |
922 | |
923 *g:netrw_ssh_cmd* One may specify an executable command | |
924 to use instead of ssh for remote actions | |
925 such as listing, file removal, etc. | |
926 default: ssh | |
927 | |
928 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines, | |
929 messages, banners, and whatnot that one doesn't | |
930 want masquerading as "directories" and "files". | |
931 Use this pattern to remove such embedded | |
932 messages. By default its value is: | |
933 '^total\s\+\d\+$' | |
934 | |
935 *g:netrw_use_noswf* netrw normally avoids writing swapfiles | |
936 for browser buffers. However, under some | |
937 systems this apparently is causing nasty | |
938 ml_get errors to appear; if you're getting | |
939 ml_get errors, try putting | |
940 let g:netrw_use_noswf= 0 | |
941 in your .vimrc. | |
942 | |
943 *g:netrw_timefmt* specify format string to strftime() (%c) | |
944 default: "%c" | |
945 | |
946 *g:netrw_winsize* specify initial size of new o/v windows | |
947 default: "" | |
948 | |
949 *g:NetrwTopLvlMenu* This variable specifies the top level | |
950 menu name; by default, its "Netrw.". If | |
951 you wish to change this, do so in your | |
952 .vimrc. | |
953 | |
954 INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro* | |
955 | |
956 Netrw supports the browsing of directories on the local system and on remote | |
957 hosts, including listing files and directories, entering directories, editing | |
958 files therein, deleting files/directories, making new directories, and moving | |
959 (renaming) files and directories. The Netrw browser generally implements the | |
960 previous explorer maps and commands for remote directories, although details | |
961 (such as pertinent global variable names) necessarily differ. | |
962 | |
963 The Netrw remote file and directory browser handles two protocols: ssh and | |
964 ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp | |
965 in its remote browsing. Any other protocol will be used for file transfers, | |
966 but otherwise the ssh protocol will be used to do remote directory browsing. | |
967 | |
968 To use Netrw's remote directory browser, simply attempt to read a "file" with a | |
969 trailing slash and it will be interpreted as a request to list a directory: | |
970 | |
971 vim [protocol]://[user@]hostname/path/ | |
972 | |
973 For local directories, the trailing slash is not required. | |
974 | |
975 If you'd like to avoid entering the password in for remote directory listings | |
976 with ssh or scp, see |netrw-listhack|. | |
977 | |
978 | |
979 NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* | |
980 | |
981 Netrw will not work properly with > | |
982 | |
983 :set acd | |
984 :set fo=...ta... | |
985 < | |
986 If either of these options are present when browsing is attempted, netrw | |
987 will change them by using noacd and removing the ta suboptions from the | |
988 |'formatoptions'|. | |
989 | |
990 *netrw-explore* *netrw-pexplore* *netrw-texplore* | |
991 *netrw-hexplore* *netrw-sexplore* *netrw-nexplore* | |
992 *netrw-vexplore* | |
993 DIRECTORY EXPLORING COMMANDS | |
994 | |
995 :Explore[!] [dir]... Explore directory of current file *:Explore* | |
996 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore* | |
997 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore* | |
998 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore* | |
999 :Texplore [dir]... Tab & Explore *:Texplore* | |
1000 | |
1001 Used with :Explore **/pattern : (also see |netrw-starstar|) | |
1002 :Nexplore............. go to next matching file *:Nexplore* | |
1003 :Pexplore............. go to previous matching file *:Pexplore* | |
1004 | |
1005 :Explore will open the local-directory browser on the current file's | |
1006 directory (or on directory [dir] if specified). The window will be | |
1007 split only if the file has been modified, otherwise the browsing | |
1008 window will take over that window. Normally the splitting is taken | |
1009 horizontally. | |
1010 :Explore! is like :Explore, but will use vertical splitting. | |
1011 :Sexplore will always split the window before invoking the local-directory | |
1012 browser. As with Explore, the splitting is normally done | |
1013 horizontally. | |
1014 :Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically. | |
1015 :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting. | |
1016 :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting. | |
1017 :Vexplore [dir] does an :Explore with |:leftabove| vertical splitting. | |
1018 :Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting. | |
1019 :Texplore [dir] does a tabnew before generating the browser window | |
1020 | |
1021 By default, these commands use the current file's directory. However, one | |
1022 may explicitly provide a directory (path) to use. | |
1023 | |
1024 *netrw-starstar* | |
1025 When Explore, Sexplore, Hexplore, or Vexplore are used with a **/filepat, | |
1026 such as: | |
1027 > | |
1028 :Explore **/filename_pattern | |
1029 < | |
1030 netrw will attempt to find a file in the current directory or any subdirectory | |
1031 which matches the filename pattern. Internally, it produces a list of files | |
1032 which match the pattern and their paths; to that extent it resembles the Unix | |
1033 operation: | |
1034 > | |
1035 find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null | |
1036 < | |
1037 The directory display is updated to show the subdirectory containing a | |
1038 matching file. One may then proceed to the next (or previous) matching files' | |
1039 directories by using Nexplore or Pexplore, respectively. If your console or | |
1040 gui produces recognizable shift-up or shift-down sequences, then you'll likely | |
1041 find using shift-downarrow and shift-uparrow convenient. They're mapped by | |
1042 netrw: | |
1043 | |
1044 <s-down> == Nexplore, and | |
1045 <s-up> == Pexplore. | |
1046 | |
1047 As an example, consider | |
1048 > | |
1049 :Explore **/*.c | |
1050 :Nexplore | |
1051 :Nexplore | |
1052 :Pexplore | |
1053 < | |
1054 The status line will show, on the right hand side of the status line, a | |
1055 message like "Match 3 of 20". | |
1056 | |
1057 *netrw-starpat* | |
1058 When Explore, Sexplore, Hexplore, or Vexplore are used with a */pattern, | |
1059 such as: | |
1060 > | |
1061 :Explore */pattern | |
1062 < | |
1063 netrw will use |:vimgrep| to find files which contain the given pattern. | |
1064 Like what happens with |netrw-starstar|, a list of files which contain | |
1065 matches to the given pattern is generated. The cursor will then jump | |
1066 to the first file with the given pattern; |:Nexplore|, |:Pexplore|, and | |
1067 the shifted-down and -up arrows work with the list to move to the next | |
1068 or previous files in that list. | |
1069 | |
1070 *netrw-starstarpat* | |
1071 When Explore, Sexplore, Hexplore, or Vexplore are used with a **//pattern, | |
1072 such as: | |
1073 > | |
1074 :Explore **//pattern | |
1075 < | |
1076 then Explore will use |:vimgrep| to find files like |netrw-starpat|; | |
1077 however, Explore will also search subdirectories as well as the current | |
1078 directory. | |
1079 | |
1080 | |
1081 REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* | |
1082 | |
1083 To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or | |
1084 hit the <cr> when atop the ./ directory entry in the listing. One may also | |
1085 refresh a local directory by using ":e .". | |
1086 | |
1087 | |
1088 GOING UP *netrw--* | |
1089 | |
1090 To go up a directory, press "-" or press the <cr> when atop the ../ directory | |
1091 entry in the listing. | |
1092 | |
1093 Netrw will use the command in |g:netrw_list_cmd| to perform the directory | |
1094 listing operation after changing HOSTNAME to the host specified by the | |
1095 user-provided url. By default netrw provides the command as: | |
1096 | |
1097 ssh HOSTNAME ls -FLa | |
1098 | |
1099 where the HOSTNAME becomes the [user@]hostname as requested by the attempt to | |
1100 read. Naturally, the user may override this command with whatever is | |
1101 preferred. The NetList function which implements remote directory browsing | |
1102 expects that directories will be flagged by a trailing slash. | |
1103 | |
1104 | |
1105 BROWSING *netrw-cr* | |
1106 | |
1107 Browsing is simple: move the cursor onto a file or directory of interest. | |
1108 Hitting the <cr> (the return key) will select the file or directory. | |
1109 Directories will themselves be listed, and files will be opened using the | |
1110 protocol given in the original read request. | |
1111 | |
1112 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes | |
1113 that two or more spaces delimit filenames and directory names for the long | |
1114 and wide listing formats. Thus, if your filename or directory name has two | |
1115 or more spaces embedded in it, or any trailing spaces, then you'll need to | |
1116 use the "thin" format to select it. | |
1117 | |
1118 The |g:netrw_browse_split| option, which is zero by default, may be used to | |
1119 cause the opening of files to be done in a new window or tab. When the option | |
1120 is one or two, the splitting will be taken horizontally or vertically, | |
1121 respectively. When the option is set to three, a <cr> will cause the file | |
1122 to appear in a new tab. | |
1123 | |
1124 | |
1125 OBTAINING A FILE *netrw-O* | |
1126 | |
1127 When browsing a remote directory, one may obtain a file under the cursor (ie. | |
1128 get a copy on your local machine, but not edit it) by pressing the O key. | |
1129 Only ftp and scp are supported for this operation (but since these two are | |
1130 available for browsing, that shouldn't be a problem). The status bar | |
1131 will then show, on its right hand side, a message like "Obtaining filename". | |
1132 The statusline will be restored after the transfer is complete. | |
1133 | |
1134 Netrw can also "obtain" a file using the local browser. Netrw's display | |
1135 of a directory is not necessarily the same as Vim's "current directory", | |
1136 unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select | |
1137 a file using the local browser (by putting the cursor on it) and pressing | |
1138 "O" will then "obtain" the file; ie. copy it to Vim's current directory. | |
1139 | |
1140 Related topics: | |
1141 * To see what the current directory is, use |:pwd| | |
1142 * To make the currently browsed directory the current directory, see |netrw-c| | |
1143 * To automatically make the currently browsed directory the current | |
1144 directory, see |g:netrw_keepdir|. | |
1145 | |
1146 | |
1147 CHANGE LISTING STYLE *netrw-i* | |
1148 | |
1149 The "i" map cycles between the thin, long, wide, and tree listing formats. | |
1150 | |
1151 The short listing format gives just the files' and directories' names. | |
1152 | |
1153 The long listing is either based on the "ls" command via ssh for remote | |
1154 directories or displays the filename, file size (in bytes), and the time and | |
1155 date of last modification for local directories. With the long listing | |
1156 format, netrw is not able to recognize filenames which have trailing spaces. | |
1157 Use the thin listing format for such files. | |
1158 | |
1159 The wide listing format uses two or more contiguous spaces to delineate | |
1160 filenames; when using that format, netrw won't be able to recognize or use | |
1161 filenames which have two or more contiguous spaces embedded in the name or any | |
1162 trailing spaces. The thin listing format will, however, work with such files. | |
1163 This listing format is the most compact. | |
1164 | |
1165 The tree listing format has a top directory followed by files and directories | |
1166 preceded by a "|". One may open and close directories by pressing the <cr> | |
1167 key while atop the directory name. There is only one tree listing buffer; | |
1168 hence, using "v" or "o" on a subdirectory will only show the same buffer, | |
1169 twice. | |
1170 | |
1171 | |
1172 MAKING A NEW DIRECTORY *netrw-d* | |
1173 | |
1174 With the "d" map one may make a new directory either remotely (which depends | |
1175 on the global variable g:netrw_mkdir_cmd) or locally (which depends on the | |
1176 global variable g:netrw_local_mkdir). Netrw will issue a request for the new | |
1177 directory's name. A bare <CR> at that point will abort the making of the | |
1178 directory. Attempts to make a local directory that already exists (as either | |
1179 a file or a directory) will be detected, reported on, and ignored. | |
1180 | |
1181 | |
1182 DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* | |
1183 | |
1184 Deleting/removing files and directories involves moving the cursor to the | |
1185 file/directory to be deleted and pressing "D". Directories must be empty | |
1186 first before they can be successfully removed. If the directory is a softlink | |
1187 to a directory, then netrw will make two requests to remove the directory | |
1188 before succeeding. Netrw will ask for confirmation before doing the | |
1189 removal(s). You may select a range of lines with the "V" command (visual | |
1190 selection), and then pressing "D". | |
1191 | |
1192 The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used | |
1193 to control the attempts to remove files and directories. The g:netrw_rm_cmd | |
1194 is used with files, and its default value is: | |
1195 | |
1196 g:netrw_rm_cmd: ssh HOSTNAME rm | |
1197 | |
1198 The g:netrw_rmdir_cmd variable is used to support the removal of directories. | |
1199 Its default value is: | |
1200 | |
1201 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir | |
1202 | |
1203 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt | |
1204 to remove it again using the g:netrw_rmf_cmd variable. Its default value is: | |
1205 | |
1206 g:netrw_rmf_cmd: ssh HOSTNAME rm -f | |
1207 | |
1208 | |
1209 RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* | |
1210 | |
1211 Renaming/moving files and directories involves moving the cursor to the | |
1212 file/directory to be moved (renamed) and pressing "R". You will then be | |
1213 queried for where you want the file/directory to be moved. You may select a | |
1214 range of lines with the "V" command (visual selection), and then pressing "R". | |
1215 | |
1216 The g:netrw_rename_cmd variable is used to implement renaming. By default its | |
1217 value is: | |
1218 | |
1219 ssh HOSTNAME mv | |
1220 | |
1221 One may rename a block of files and directories by selecting them with | |
1222 the V (|linewise-visual|). | |
1223 | |
1224 | |
1225 HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* | |
1226 | |
1227 Netrw's browsing facility allows one to use the hiding list in one of three | |
1228 ways: ignore it, hide files which match, and show only those files which | |
1229 match. The "a" map allows the user to cycle about these three ways. | |
1230 | |
1231 The g:netrw_list_hide variable holds a comma delimited list of patterns (ex. | |
1232 \.obj) which specify the hiding list. (also see |netrw-ctrl-h|) To set the | |
1233 hiding list, use the <c-h> map. As an example, to hide files which begin with | |
1234 a ".", one may use the <c-h> map to set the hiding list to '^\..*' (or one may | |
1235 put let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the | |
1236 "a" key to show all files, hide matching files, or to show only the matching | |
1237 files. | |
1238 | |
1239 Example: ^.*\.[ch] | |
1240 This hiding list command will hide/show all *.c and *.h files. | |
1241 | |
1242 Example: ^.*\.c,^.*\.h | |
1243 This hiding list command will also hide/show all *.c and *.h | |
1244 files. | |
1245 | |
1246 Don't forget to use the "a" map to select the normal/hiding/show mode you want! | |
1247 | |
1248 *netrw-ctrl_h* | |
1249 EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* | |
1250 | |
1251 The "<ctrl-h>" map brings up a requestor allowing the user to change the | |
1252 file/directory hiding list. The hiding list consists of one or more patterns | |
1253 delimited by commas. Files and/or directories satisfying these patterns will | |
1254 either be hidden (ie. not shown) or be the only ones displayed (see | |
1255 |netrw-a|). | |
1256 | |
1257 | |
1258 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* | |
1259 | |
1260 Normally one enters a file or directory using the <cr>. However, the "o" map | |
1261 allows one to open a new window to hold the new directory listing or file. A | |
1262 horizontal split is used. (for vertical splitting, see |netrw-v|) | |
1263 | |
1264 Normally, the o key splits the window horizontally with the new window and | |
1265 cursor at the top. To change to splitting the window horizontally with the | |
1266 new window and cursor at the bottom, have | |
1267 | |
1268 let g:netrw_alto = 1 | |
1269 | |
1270 in your <.vimrc>. (also see |netrw-t| |netrw-v| |g:netrw_alto|) | |
1271 | |
1272 There is only one tree listing buffer; using "o" on a displayed subdirectory | |
1273 will split the screen, but the same buffer will be shown twice. | |
1274 | |
1275 | |
1276 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* | |
1277 | |
1278 Normally one enters a file or directory using the <cr>. However, the "v" map | |
1279 allows one to open a new window to hold the new directory listing or file. A | |
1280 vertical split is used. (for horizontal splitting, see |netrw-o|) | |
1281 | |
1282 Normally, the v key splits the window vertically with the new window and | |
1283 cursor at the left. To change to splitting the window vertically with the new | |
1284 window and cursor at the right, have | |
1285 | |
1286 let g:netrw_altv = 1 | |
1287 | |
1288 in your <.vimrc>. (also see: |netrw-o| |netrw-t| |g:netrw_altv|) | |
1289 | |
1290 There is only one tree listing buffer; using "v" on a displayed subdirectory | |
1291 will split the screen, but the same buffer will be shown twice. | |
1292 | |
1293 | |
1294 BROWSING WITH A NEW TAB *netrw-t* | |
1295 | |
1296 Normally one enters a file or directory using the <cr>. The "t" map | |
1297 allows one to open a new window hold the new directory listing or file in a | |
1298 new tab. (also see: |netrw-o| |netrw-v|) | |
1299 | |
1300 | |
1301 PREVIEW WINDOW *netrw-p* *netrw-preview* | |
1302 | |
1303 One may use a preview window by using the "p" key when the cursor is atop the | |
1304 desired filename to be previewed. | |
1305 | |
1306 | |
1307 PREVIOUS WINDOW *netrw-P* *netrw-prvwin* | |
1308 | |
1309 To edit a file or directory in the previously used window (see :he |CTRL-W_P|), | |
1310 press a "P". If there's only one window, then the one window will be | |
1311 horizontally split (above/below splitting is controlled by |g:netrw_alto|, | |
1312 and its initial size is controlled by |g:netrw_winsize|). | |
1313 | |
1314 If there's more than one window, the previous window will be re-used on | |
1315 the selected file/directory. If the previous window's associated buffer | |
1316 has been modified, and there's only one window with that buffer, then | |
1317 the user will be asked if s/he wishes to save the buffer first (yes, | |
1318 no, or cancel). | |
1319 | |
1320 | |
1321 SELECTING SORTING STYLE *netrw-s* *netrw-sort* | |
1322 | |
1323 One may select the sorting style by name, time, or (file) size. The "s" map | |
1324 allows one to circulate amongst the three choices; the directory listing will | |
1325 automatically be refreshed to reflect the selected style. | |
1326 | |
1327 | |
1328 EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* | |
1329 | |
1330 When "Sorted by" is name, one may specify priority via the sorting sequence | |
1331 (g:netrw_sort_sequence). The sorting sequence typically prioritizes the | |
1332 name-listing by suffix, although any pattern will do. Patterns are delimited | |
1333 by commas. The default sorting sequence is: | |
1334 > | |
1335 [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$ | |
1336 < | |
1337 The lone * is where all filenames not covered by one of the other patterns | |
1338 will end up. One may change the sorting sequence by modifying the | |
1339 g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by | |
1340 using the "S" map. | |
1341 | |
1342 | |
1343 REVERSING SORTING ORDER *netrw-r* *netrw-reverse* | |
1344 | |
1345 One may toggle between normal and reverse sorting order by pressing the | |
1346 "r" key. | |
1347 | |
1348 | |
1349 CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* | |
1350 | |
1351 Every time you change to a new directory (new for the current session), | |
1352 netrw will save the directory in a recently-visited directory history | |
1353 list (unless g:netrw_dirhistmax is zero; by default, its ten). With the | |
1354 "u" map, one can change to an earlier directory (predecessor). To do | |
1355 the opposite, see |netrw-U|. | |
1356 | |
1357 | |
1358 CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* | |
1359 | |
1360 With the "U" map, one can change to a later directory (successor). | |
1361 This map is the opposite of the "u" map. (see |netrw-u|) Use the | |
1362 q map to list both the bookmarks and history. (see |netrw-q|) | |
1363 | |
1364 *netrw-gx* | |
1365 CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* | |
1366 (also see |netrw_filehandler|) | |
1367 | |
1368 Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are | |
1369 best seen with a special handler (ie. a tool provided with your computer). | |
1370 Netrw allows one to invoke such special handlers by: > | |
1371 | |
1372 * when Exploring, hit the "x" key | |
1373 * when editing, hit gx with the cursor atop the special filename | |
1374 < (not available if the |g:netrw_nogx| variable exists) | |
1375 | |
1376 Netrw determines which special handler by the following method: | |
1377 | |
1378 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to | |
1379 view files. Examples of useful settings (place into your <.vimrc>): > | |
1380 | |
1381 :let g:netrw_browsex_viewer= "kfmclient exec" | |
1382 < or > | |
1383 :let g:netrw_browsex_viewer= "gnome-open" | |
1384 < | |
1385 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be | |
1386 invoked first (see |netrw_filehandler|). | |
1387 | |
1388 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used. | |
1389 * for Gnome (with gnome-open): gnome-open is used. | |
1390 * for KDE (with kfmclient): kfmclient is used. | |
1391 * otherwise the netrwFileHandler plugin is used. | |
1392 | |
1393 The file's suffix is used by these various approaches to determine an | |
1394 appropriate application to use to "handle" these files. Such things as | |
1395 OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps, | |
1396 *.eps) can be handled. | |
1397 | |
1398 *netrw_filehandler* | |
1399 | |
1400 The "x" map applies a function to a file, based on its extension. Of course, | |
1401 the handler function must exist for it to be called! | |
1402 > | |
1403 Ex. mypgm.html x -> | |
1404 NFH_html("scp://user@host/some/path/mypgm.html") | |
1405 < | |
1406 Users may write their own netrw File Handler functions to support more | |
1407 suffixes with special handling. See <plugin/netrwFileHandlers.vim> for | |
1408 examples on how to make file handler functions. As an example: > | |
1409 | |
1410 " NFH_suffix(filename) | |
1411 fun! NFH_suffix(filename) | |
1412 ..do something special with filename.. | |
1413 endfun | |
1414 < | |
1415 These functions need to be defined in some file in your .vim/plugin | |
1416 (vimfiles\plugin) directory. Vim's function names may not have punctuation | |
1417 characters (except for the underscore) in them. To support suffices that | |
1418 contain such characters, netrw will first convert the suffix using the | |
1419 following table: > | |
1420 | |
1421 @ -> AT ! -> EXCLAMATION % -> PERCENT | |
1422 : -> COLON = -> EQUAL ? -> QUESTION | |
1423 , -> COMMA - -> MINUS ; -> SEMICOLON | |
1424 $ -> DOLLAR + -> PLUS ~ -> TILDE | |
1425 < | |
1426 So, for example: > | |
1427 | |
1428 file.rcs,v -> NFH_rcsCOMMAv() | |
1429 < | |
1430 If more such translations are necessary, please send me email: > | |
1431 NdrOchip at ScampbellPfamily.AbizM - NOSPAM | |
1432 with a request. | |
1433 | |
1434 | |
1435 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir* | |
1436 | |
1437 By default, |g:netrw_keepdir| is 1. This setting means that the current | |
1438 directory will not track the browsing directory. | |
1439 | |
1440 Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to | |
1441 track netrw's browsing directory. | |
1442 | |
1443 However, given the default setting for g:netrw_keepdir of 1 where netrw | |
1444 maintains its own separate notion of the current directory, in order to make | |
1445 the two directories the same, use the "c" map (just type c). That map will | |
1446 set Vim's notion of the current directory to netrw's current browsing | |
1447 directory. | |
1448 | |
1449 | |
1450 BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* | |
1451 One may easily "bookmark" a directory by using > | |
1452 | |
1453 {cnt}mb | |
1454 < | |
1455 Any count may be used. One may use viminfo's "!" option to retain bookmarks | |
1456 between vim sessions. See |netrw-gb| for how to return to a bookmark and | |
1457 |netrw-q| for how to list them. | |
1458 | |
1459 | |
1460 CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* | |
1461 | |
1462 To change directory back to a bookmarked directory, use | |
1463 | |
1464 {cnt}gb | |
1465 | |
1466 Any count may be used to reference any of the bookmarks. See |netrw-mb| on | |
1467 how to bookmark a directory and |netrw-q| on how to list bookmarks. | |
1468 | |
1469 | |
1470 LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark* | |
1471 | |
1472 Pressing "q" will list the bookmarked directories and directory traversal | |
1473 history (query). (see |netrw-mb|, |netrw-gb|, |netrw-u|, and |netrw-U|) | |
1474 | |
1475 | |
1476 IMPROVING DIRECTORY BROWSING *netrw-listhack* | |
1477 | |
1478 Especially with the remote directory browser, constantly entering the password | |
1479 is tedious. | |
1480 | |
1481 For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength | |
1482 tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip | |
1483 for setting up no-password ssh and scp and discusses associated security | |
1484 issues. It used to be available at http://hacks.oreilly.com/pub/h/66 , | |
1485 but apparently that address is now being redirected to some "hackzine". | |
1486 I'll attempt a summary: | |
1487 | |
1488 1. Generate a public/private key pair on the ssh server: | |
1489 ssh-keygen -t rsa | |
1490 (saving the file in ~/.ssh/id_rsa is ok) | |
1491 2. Just hit the <CR> when asked for passphrase (twice). | |
1492 3. This creates two files: | |
1493 ~/.ssh/id_rsa | |
1494 ~/.ssh/id_rsa.pub | |
1495 4. On the client: | |
1496 cd | |
1497 mkdir .ssh | |
1498 chmod 0700 .ssh | |
1499 scp {serverhostname}:.ssh/id_rsa.pub . | |
1500 cat id_rsa.pub >> .ssh/authorized_keys2 | |
1501 | |
1502 For Windows, folks on the vim mailing list have mentioned that Pageant helps | |
1503 with avoiding the constant need to enter the password. | |
1504 | |
1505 | |
1506 NETRW SETTINGS *netrw-settings* | |
1507 | |
1508 With the NetrwSettings.vim plugin, > | |
1509 :NetrwSettings | |
1510 will bring up a window with the many variables that netrw uses for its | |
1511 settings. You may change any of their values; when you save the file, the | |
1512 settings therein will be used. One may also press "?" on any of the lines for | |
1513 help on what each of the variables do. | |
1514 | |
1515 (also see: |netrw-browse-var| |netrw-protocol| |netrw-var| |netrw-variables|) | |
1516 | |
1517 | |
1518 ============================================================================== | |
1519 10. Problems and Fixes *netrw-problems* | |
1520 | |
1521 (This section is likely to grow as I get feedback) | |
1522 (also see |netrw-debug|) | |
1523 *netrw-p1* | |
1524 P1. I use windows 95, and my ftp dumps four blank lines at the | |
1525 end of every read. | |
1526 | |
1527 See |netrw-fixup|, and put the following into your | |
1528 <.vimrc> file: | |
1529 | |
1530 let g:netrw_win95ftp= 1 | |
1531 | |
1532 *netrw-p2* | |
1533 P2. I use Windows, and my network browsing with ftp doesn't sort by | |
1534 time or size! -or- The remote system is a Windows server; why | |
1535 don't I get sorts by time or size? | |
1536 | |
1537 Windows' ftp has a minimal support for ls (ie. it doesn't | |
1538 accept sorting options). It doesn't support the -F which | |
1539 gives an explanatory character (ABC/ for "ABC is a directory"). | |
1540 Netrw then uses "dir" to get both its short and long listings. | |
1541 If you think your ftp does support a full-up ls, put the | |
1542 following into your <.vimrc>: > | |
1543 | |
1544 let g:netrw_ftp_list_cmd = "ls -lF" | |
1545 let g:netrw_ftp_timelist_cmd= "ls -tlF" | |
1546 let g:netrw_ftp_sizelist_cmd= "ls -slF" | |
1547 < | |
1548 Alternatively, if you have cygwin on your Windows box, put | |
1549 into your <.vimrc>: > | |
1550 | |
1551 let g:netrw_cygwin= 1 | |
1552 < | |
1553 This problem also occurs when the remote system is Windows. | |
1554 In this situation, the various g:netrw_ftp_[time|size]list_cmds | |
1555 are as shown above, but the remote system will not correctly | |
1556 modify its listing behavior. | |
1557 | |
1558 | |
1559 *netrw-p3* | |
1560 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw | |
1561 used ssh! That wasn't what I asked for... | |
1562 | |
1563 Netrw has two methods for browsing remote directories: ssh | |
1564 and ftp. Unless you specify ftp specifically, ssh is used. | |
1565 When it comes time to do download a file (not just a directory | |
1566 listing), netrw will use the given protocol to do so. | |
1567 | |
1568 *netrw-p4* | |
1569 P4. I would like long listings to be the default. | |
1570 | |
1571 let g:netrw_liststyle= 1 | |
1572 | |
1573 Check out |netrw-browse-var| for more customizations that | |
1574 you can set. | |
1575 | |
1576 *netrw-p5* | |
1577 P5. My times come up oddly in local browsing | |
1578 | |
1579 Does your system's strftime() accept the "%c" to yield dates | |
1580 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime" | |
1581 and find out what option should be used. Then put it into | |
1582 your <.vimrc>: | |
1583 let g:netrw_timefmt= "%X" (where X is the option) | |
1584 | |
1585 *netrw-p6* | |
1586 P6. I want my current directory to track my browsing. | |
1587 How do I do that? | |
1588 | |
1589 let g:netrw_keepdir= 0 | |
1590 | |
1591 *netrw-p7* | |
1592 P7. I use Chinese (or other non-ascii) characters in my filenames, and | |
1593 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them! | |
1594 | |
1595 (taken from an answer provided by Wu Yongwei on the vim | |
1596 mailing list) | |
1597 I now see the problem. You code page is not 936, right? Vim | |
1598 seems only able to open files with names that are valid in the | |
1599 current code page, as are many other applications that do not | |
1600 use the Unicode version of Windows APIs. This is an OS-related | |
1601 issue. You should not have such problems when the system | |
1602 locale uses UTF-8, such as modern Linux distros. | |
1603 | |
1604 (...it is one more reason to recommend that people use utf-8!) | |
1605 | |
1606 *netrw-p8* | |
1607 P8. I'm getting "ssh is not executable on your system" -- what do I | |
1608 do? | |
1609 | |
1610 (Dudley Fox) Most people I know use putty for windows ssh. It | |
1611 is a free ssh/telnet application. You can read more about it | |
1612 here: | |
1613 | |
1614 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also: | |
1615 | |
1616 (Marlin Unruh) This program also works for me. It's a single | |
1617 executable, so he/she can copy it into the Windows\System32 | |
1618 folder and create a shortcut to it. | |
1619 | |
1620 (Dudley Fox) You might also wish to consider plink, as it | |
1621 sounds most similar to what you are looking for. plink is an | |
1622 application in the putty suite. | |
1623 | |
1624 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink | |
1625 | |
1626 (Vissale Neang) Maybe you can try OpenSSH for windows, which | |
1627 can be obtained from: | |
1628 | |
1629 http://sshwindows.sourceforge.net/ | |
1630 | |
1631 It doesn't need the full Cygwin package. | |
1632 | |
1633 (Antoine Mechelynck) For individual Unix-like programs needed | |
1634 for work in a native-Windows environment, I recommend getting | |
1635 them from the GnuWin32 project on sourceforge if it has them: | |
1636 | |
1637 http://gnuwin32.sourceforge.net/ | |
1638 | |
1639 Unlike Cygwin, which sets up a Unix-like virtual machine on | |
1640 top of Windows, GnuWin32 is a rewrite of Unix utilities with | |
1641 Windows system calls, and its programs works quite well in the | |
1642 cmd.exe "Dos box". | |
1643 | |
1644 (dave) Download WinSCP and use that to connect to the server. | |
1645 In Preferences > Editors, set gvim as your editor: | |
1646 | |
1647 - Click "Add..." | |
1648 - Set External Editor (adjust path as needed, include | |
1649 the quotes and !.! at the end): | |
1650 "c:\Program Files\Vim\vim70\gvim.exe" !.! | |
1651 - Check that the filetype in the box below is | |
1652 {asterisk}.{asterisk} (all files), or whatever types | |
1653 you want (cec: change {asterisk} to * ; I had to | |
1654 write it that way because otherwise the helptags | |
1655 system thinks its a tag) | |
1656 - Make sure its at the top of the listbox (click it, | |
1657 then click "Up" if its not) | |
1658 If using the Norton Commander style, you just have to hit <F4> | |
1659 to edit a file in a local copy of gvim. | |
1660 | |
1661 (Vit Gottwald) How to generate public/private key and save | |
1662 public key it on server: > | |
1663 http://www.tartarus.org/~simon/puttydoc/Chapter8.html#pubkey-gettingready | |
1664 8.3 Getting ready for public key authentication | |
1665 < | |
1666 How to use private key with 'pscp': > | |
1667 http://www.tartarus.org/~simon/puttydoc/Chapter5.html | |
1668 5.2.4 Using public key authentication with PSCP | |
1669 < | |
1670 (cec) To make proper use of these suggestions above, you will | |
1671 need to modify the following user-settable variables in your | |
1672 .vimrc: | |
1673 | |
1674 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd| | |
1675 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd| | |
1676 | |
1677 The first one (|g:netrw_ssh_cmd|) is the most important; most | |
1678 of the others will use the string in g:netrw_ssh_cmd by | |
1679 default. | |
1680 *netrw-p9* *netrw-ml_get* | |
1681 P9. I'm browsing, changing directory, and bang! ml_get errors | |
1682 appear and I have to kill vim. Any way around this? | |
1683 | |
1684 Normally netrw attempts to avoid writing swapfiles for | |
1685 its temporary directory buffers. However, on some systems | |
1686 this attempt appears to be causing ml_get errors to | |
1687 appear. Please try setting |g:netrw_use_noswf| to 0 | |
1688 in your <.vimrc>: > | |
1689 let g:netrw_use_noswf= 0 | |
1690 < | |
1691 | |
1692 ============================================================================== | |
1693 11. Debugging *netrw-debug* | |
1694 | |
1695 The <netrw.vim> script is typically available as: | |
1696 > | |
1697 /usr/local/share/vim/vim6x/plugin/netrw.vim | |
1698 < -or- > | |
1699 /usr/local/share/vim/vim7x/plugin/netrw.vim | |
1700 < | |
1701 which is loaded automatically at startup (assuming :set nocp). | |
1702 | |
1703 1. Get the <Decho.vim> script, available as: | |
1704 | |
1705 http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts | |
1706 as "Decho, a vimL debugging aid" | |
1707 or | |
1708 http://vim.sourceforge.net/scripts/script.php?script_id=120 | |
1709 | |
1710 and put it into your local plugin directory. | |
1711 | |
1712 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need | |
1713 to put it into your .vim/plugin, too. You may obtain it from: | |
1714 | |
1715 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs | |
1716 as "DrC's Utilities" | |
1717 | |
1718 3. Edit the <netrw.vim> file by typing: | |
1719 | |
1720 vim netrw.vim | |
1721 :DechoOn | |
1722 :wq | |
1723 | |
1724 To restore to normal non-debugging behavior, edit <netrw.vim> | |
1725 by typing | |
1726 | |
1727 vim netrw.vim | |
1728 :DechoOff | |
1729 :wq | |
1730 | |
1731 This command, provided by <Decho.vim>, will comment out all | |
1732 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()). | |
1733 | |
1734 4. Then bring up vim and attempt a transfer or do browsing. A set of | |
1735 messages should appear concerning the steps that <netrw.vim> took | |
1736 in attempting to read/write your file over the network. | |
1737 | |
1738 To save the file, use > | |
1739 :wincmd j | |
1740 :set bt= | |
1741 :w! DBG | |
1742 < Please send that information to <netrw.vim>'s maintainer, > | |
1743 NdrOchip at ScampbellPfamily.AbizM - NOSPAM | |
1744 < | |
1745 ============================================================================== | |
1746 12. History *netrw-history* {{{1 | |
1747 | |
1748 v109: Mar 26, 2007 * if a directory name includes a "$" character, | |
1749 Explore() will use expand() in an attempt to | |
1750 decipher the name. | |
1751 May 07, 2007 * g:netrw_use_errorwindow now allows one to | |
1752 have error messages go to a reliable window | |
1753 or to use a less reliable but recallable | |
1754 echoerr method | |
1755 May 07, 2007 * g:netrw_scpport and g:netrw_sshport support | |
1756 use of -P and -p, respectively, to set port | |
1757 for scp/ssh. | |
1758 v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting | |
1759 remote browsing | |
1760 * netrw can now source remote files | |
1761 Jan 26, 2007 * Colton Jamieson noted that remote directory | |
1762 browsing did not support alternate port | |
1763 selection. This feature has now been extended | |
1764 to apply to all remote browsing commands via ssh. | |
1765 (list, remove/delete, rename) | |
1766 Jan 31, 2007 * Luis Florit reported that @* was an invalid | |
1767 register. The @* register is now only saved and | |
1768 restored if |'guioptions'| contains "a". | |
1769 Feb 02, 2007 * Fixed a bug that cropped up when writing files | |
1770 via scp using cygwin | |
1771 Feb 08, 2007 * tree listing mode managed to stop working again; | |
1772 fixed again! | |
1773 Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't | |
1774 handle browsing well with M$ ftp servers. He even | |
1775 set up a temporary account for me to test with | |
1776 (thanks!). Netrw now can browse M$ ftp servers. | |
1777 v107: Oct 12, 2006 * bypassed the autowrite option | |
1778 Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2 | |
1779 files | |
1780 Nov 03, 2006 * Explore will highlight matching files when | |
1781 **/pattern is used (and if the |'hls'| option | |
1782 is set) | |
1783 Nov 09, 2006 * a debugging line, when enabled, was inadvertently | |
1784 bringing up help instead of simply reporting on | |
1785 list contents | |
1786 Nov 21, 2006 * tree listing improved (cursor remains put) | |
1787 Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were | |
1788 pressed. | |
1789 Dec 15, 2006 * considerable qty of changes, mostly to share more | |
1790 code between local and remote browsing. Includes | |
1791 support for tree-style listing for both remote | |
1792 and local browsing. | |
1793 Dec 15, 2006 * Included Peter Bengtsson's modifications to | |
1794 support the Amiga. | |
1795 v106: Sep 21, 2006 * removed old v:version<700 code as netrw now | |
1796 requires vim 7.0 | |
1797 * worked around a bug where register * was | |
1798 overwritten during local browsing | |
1799 v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and | |
1800 variants will position the cursor on the file | |
1801 just having been edited | |
1802 * changed default |g:netrw_sort_sequence| order | |
1803 * changed b, Nb to simply mb (see |netrw-mb|) | |
1804 * changed B, NB to simply gb (see |netrw-gb|) | |
1805 * tree listing style (see |g:netrw_liststyle|) | |
1806 * attempts to retain the alternate file | |
1807 v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw | |
1808 error message display | |
1809 * wide listings didn't handle files with backslashes | |
1810 in their names properly. A symptom was an | |
1811 inability to open files. | |
1812 Aug 09, 2006 * included "t" mapping for opening tabbed windows, | |
1813 both for remote and local browsing | |
1814 * changed netrw_longlist to netrw_liststyle | |
1815 Aug 15, 2006 * fixed one of the NB maps | |
1816 Aug 22, 2006 * changed *Explore commands to use -nargs=* instead | |
1817 of -nargs=?. Allows both -complete=dir _and_ the | |
1818 starstar arguments to work (-nargs=? seems to | |
1819 require one or the other). | |
1820 Aug 23, 2006 * copied all w:.. variables across splits to | |
1821 new windows | |
1822 Aug 25, 2006 * when g:netrw_browsex_viewer was '-' | |
1823 (see |g:netrw_browsex_viewer|) it wasn't causing | |
1824 netrwFileHandlers#Invoke() to be called as it | |
1825 was expected to. (tnx Steve Dugaro) | |
1826 Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf" | |
1827 instead of "set ... noswf" (tnx Benji Fisher) | |
1828 Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together. | |
1829 v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck() | |
1830 * bugfix: g:netrw_keepdir==0 had stopped working | |
1831 Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores | |
1832 the unnamed register (|registers|) | |
1833 Jul 07, 2006 * |g:netrw_menu| support included | |
1834 Jul 13, 2006 * :Texplore command implemented | |
1835 Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both | |
1836 splitting windows. This affected o, v, and | |
1837 g:netrw_browse_split. | |
1838 Jul 20, 2006 * works around wildignore setting (was causing | |
1839 netrw's local browser not to list wildignore'd | |
1840 files) | |
1841 Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file | |
1842 <rightmouse> acts as a <del> for deleting a file | |
1843 v100: May 14, 2006 * when using Windows and shell==cmd.exe, the | |
1844 default for g:netrw_ignorenetrc is now 1 | |
1845 * bugfix: unwanted ^Ms now removed | |
1846 (affected shell==cmd.exe - Windows) | |
1847 * added Bookmarks and History to the menu | |
1848 * an error message about non-existing | |
1849 w:netrw_longlist was appearing during attempts to | |
1850 Explore (fixed) | |
1851 * g:netrw_shq now available to make netrw use | |
1852 specified style of quotes for commands | |
1853 May 29, 2006 * user NFH_*() functions were inadvertently being | |
1854 ignored | |
1855 * fixed a Windows non-cygwin ftp handling problem. | |
1856 * hiding pattern candidate separators included some | |
1857 characters it shouldn't have (tnx to Osei Poku) | |
1858 Jun 01, 2006 * for browsing, netrw was supposed to use "dir" | |
1859 instead of "ls -lF" when using | |
1860 ftp+non-cygwin+windows. Fixed. | |
1861 * an inadvertently left-in-place debugging statement | |
1862 was preventing use of the "x" key with browsing. | |
1863 Jun 05, 2006 * g:netrw_nogx available to prevent making the gx | |
1864 map (see |g:netrw_nogx|) | |
1865 * bugfix, Explore wouldn't change directory | |
1866 properly (vim ., :Explore subdirname) | |
1867 Jun 06, 2006 * moved history to 2nd line in Netrw menu | |
1868 * fixed delete for unix-based systems | |
1869 Jun 07, 2006 * x key now works for windows-noncygwin-ftp | |
1870 Jun 08, 2006 * Explore */pat and **//pat now wraps | |
1871 v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new | |
1872 tabs implemented. | |
1873 May 12, 2006 * deletes temporary file at end of NetRead() | |
1874 * visual mode based Obtain implemented | |
1875 * added -complete=dir to the various Explore | |
1876 commands | |
1877 v98: May 02, 2006 * the "p" key didn't work properly when the browsing | |
1878 directory name had spaces in it. | |
1879 v97: May 01, 2006 * exists("&acd") now used to determine if | |
1880 the 'acd' option exists | |
1881 * "obtain" now works again under Windows | |
1882 v96: * bugfix - the |'acd'| option is not always defined but is | |
1883 now bypassed only when it is | |
1884 v95: * bugfix - Hiding mode worked correctly (don't show any file | |
1885 matching any of the g:netrw_hide patterns), but | |
1886 showing mode was showing only those files that didn't | |
1887 match any of the g:netrw_hide patterns. Instead, it now | |
1888 shows all files that match any of the g:netrw_hide patterns | |
1889 (the difference between a logical and and logical or). | |
1890 v94: * bugfix - a Decho() had a missing quote; only affects things | |
1891 when debugging was enabled. | |
1892 v93: * bugfix - removed FocusGained event from causing a slow-browser | |
1893 refresh for Windows | |
1894 v92: * :Explore **//pattern implemented (**/filepattern already taken) | |
1895 v91: * :Explore */pattern implemented | |
1896 * |'acd'| option bypassed | |
1897 v90: * mark ', as suggested by Yegappan Lakshmanan, used to help | |
1898 guarantee entry into the jump list when appropriate. | |
1899 * <s-down> and <s-up> are no longer defined until a | |
1900 :Explore **/pattern is used (if the user already has a map | |
1901 for them). They will be defined for new browser windows | |
1902 from that point forward. | |
1903 v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore without having | |
1904 first done an :Explore **/pattern (see |netrw-starstar|) caused | |
1905 a lot of unhelpful error messages to appear | |
1906 v88: * moved DrChip.Netrw menu to Netrw. Now has priority 80 by | |
1907 default. g:NetrwTopLvlMenu == "Netrw" and can be changed | |
1908 by the user to suit. The priority is g:NetrwMenuPriority. | |
1909 * Changed filetype for browser displays from netrwlist to netrw. | |
1910 v87: * bug fix -- menus were partially disappearing | |
1911 v85: * bug fix -- missing an endif | |
1912 * bug fix -- handles spaces in names and directories when using | |
1913 ftp-based browsing | |
1914 v83: * disabled stop-acd handling; the change in directory handling | |
1915 may allow acd to be used again. Awaiting feedback. | |
1916 * D was refusing to delete remote files/directories in wide | |
1917 listing mode. | |
1918 v81: * FocusGained also used to refresh/wipe local browser directory | |
1919 buffers | |
1920 * (bugfix) netrw was leaving [Scratch] buffers behind when the | |
1921 user had the "hidden" option set. The 'hidden' option is | |
1922 now bypassed. | |
1923 v80: * ShellCmdPost event used in conjunction with g:netrw_fastbrowse | |
1924 to refresh/wipe local browser directory buffers. | |
1925 v79: * directories are now displayed with nowrap | |
1926 * (bugfix) if the column width was smaller than the largest | |
1927 file's name, then netrw would hang when using wide-listing | |
1928 mode - fixed | |
1929 * g:netrw_fastbrowse introduced | |
1930 v78: * progress has been made on allowing spaces inside directory | |
1931 names for remote work (reading, writing, browsing). (scp) | |
1932 v77: * Mikolaj Machowski fixed a bug in a substitute command | |
1933 * g:netrw_browsex_viewer implemented | |
1934 * Mikolaj Machowski pointed out that gnome-open is often | |
1935 executable under KDE systems, although it is effectively | |
1936 not functional. NetBrowseX now looks for "kicker" as | |
1937 a running process to determine if KDE is actually the | |
1938 really running. | |
1939 * Explorer's O functionality was inadvertently left out. | |
1940 Netrw now does the same thing, but with the "P" key. | |
1941 * added g:netrw_browse_split option | |
1942 * fixed a bug where the directory contained a "." but | |
1943 the file didn't (was treating the dirname from "." | |
1944 onwards as a suffix) | |
1945 v76: * "directory is missing" error message now restores echo | |
1946 highlighting | |
1947 v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli) | |
1948 * if the binary option is set, then NetWrite() will only write | |
1949 the whole file (line numbers don't make sense with this). | |
1950 Supports writing of tar and zip files. | |
1951 v74: * bugfix (vim, then :Explore) now works | |
1952 * ctrl-L keeps cursor at same screen location (both local and | |
1953 remote browsing) | |
1954 * netrw now can read remote zip and tar files | |
1955 * Obtain now uses WinXP ftp+.netrc successfully | |
1956 v73: * bugfix -- scp://host/path/file was getting named incorrectly | |
1957 * netrw detects use of earlier-than-7.0 version of vim and issues | |
1958 a pertinent error message. | |
1959 * netrwSettings.vim is now uses autoloading. Only | |
1960 <netrwPlugin.vim> is needed as a pure plugin | |
1961 (ie. always loaded). | |
1962 v72: * bugfix -- formerly, one could prevent the loading of netrw | |
1963 by "let g:loaded_netrw=1"; when autoloading became supported, | |
1964 this feature was lost. It is now restored. | |
1965 v71: * bugfix -- made some "set nomodifiable"s into setlocal variants | |
1966 (allows :e somenewfile to be modifiable as usual) | |
1967 * NetrwSettings calls a netrw function, thereby assuring that | |
1968 netrw has loaded. However, if netrw does not load for whatever | |
1969 reason, then NetrwSettings will now issue a warning message. | |
1970 * For what reason I don't recall, when wget and fetch are both | |
1971 not present, and an attempt to read a http://... url is made, | |
1972 netrw exited. It now only returns. | |
1973 * When ch=1, on the second and subsequent uses of browsing Netrw | |
1974 would issue a blank line to clear the echo'd messages. This | |
1975 caused an annoying "Hit-Enter" prompt; now a blank line message | |
1976 is echo'd only if &ch>1. | |
1977 v70: * when using |netrw-O|, the "Obtaining filename" message is now | |
1978 shown using |hl-User9|. If User9 has not been defined, netrw | |
1979 will define it. | |
1980 v69: * Bugfix: win95/98 machines were experiencing a | |
1981 "E121: Undefined variable: g:netrw_win95ftp" message | |
1982 v68: * double-click-leftmouse selects word under mouse | |
1983 v67: * Passwords which contain blanks will now be surrounded by | |
1984 double-quotes automatically (Yongwei) | |
1985 v66: * Netrw now seems to work with a few more Windows situations | |
1986 * O now obtains a file: remote browsing file -> local copy, | |
1987 locally browsing file -> current directory (see :pwd) | |
1988 * i now cycles between thin, long, and wide listing styles | |
1989 * NB and Nb are maps that are always available; corresponding | |
1990 B and b maps are only available when not using wide listing | |
1991 in order to allow them to be used for motions | |
1992 v65: * Browser functions now use NetOptionSave/Restore; in particular, | |
1993 netrw now works around the report setting | |
1994 v64: * Bugfix - browsing a "/" directory (Unix) yielded buffers | |
1995 named "[Scratch]" instead of "/" | |
1996 * Bugfix - remote browsing with ftp was omitting the ./ and ../ | |
1997 v63: * netrw now takes advantage of autoload (and requires 7.0) | |
1998 * Bugfix - using r (to reverse sort) working again | |
1999 v62: * Bugfix - spaces allowed again in directory names with | |
2000 g:netrw_keepdir=0. In fact, I've tested netrw (again) | |
2001 with most ANSI punctuation marks for directory names. | |
2002 * Bugfix - NetrwSettings gave errors when g:netrw_silent | |
2003 had not be set. | |
2004 v61: * document upgrade -- netrw variable-based settings all should | |
2005 have tags. Supports NetrwSettings command. | |
2006 * several important variables are window-oriented. Netrw has | |
2007 to transfer these across a window split. See s:BufWinVars() | |
2008 and s:UseBufWinVars(). | |
2009 v60: * when using the i map to switch between long and short listings, | |
2010 netrw will now keep cursor on same line | |
2011 * "Match # of #" now uses status line | |
2012 * :Explore **/*.c will now work from a non-netrw-browser window | |
2013 * :Explore **/patterns can now be run in separate browser windows | |
2014 * active banner (hit <cr> will cause various things to happen) | |
2015 v59: * bugfix -- another keepalt work-around installed (for vim6.3) | |
2016 * "Match # of #" for Explore **/pattern matches | |
2017 v58: * Explore and relatives can now handle **/somefilepattern (v7) | |
2018 * Nexplore and Pexplore introduced (v7). shift-down and shift-up | |
2019 cursor keys will invoke Nexplore and Pexplore, respectively. | |
2020 * bug fixed with o and v | |
2021 * autochdir only worked around for vim when it has been | |
2022 compiled with either |+netbeans_intg| or |+sun_workshop| | |
2023 * Under Windows, all directories and files were being preceded | |
2024 with a "/" when local browsing. Fixed. | |
2025 * When: syntax highlighting is off, laststatus=2, and remote | |
2026 browsing is used, sometimes the laststatus highlighting | |
2027 bleeds into the entire display. Work around - do an extra | |
2028 redraw in that case. | |
2029 * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers, | |
2030 netrw didn't change the directory when it should've | |
2031 * Bugfix: D and R commands work again | |
2032 v57: * Explore and relatives can now handle RO files | |
2033 * reverse sort restored with vim7's sort command | |
2034 * g:netrw_keepdir now being used to keep the current directory | |
2035 unchanged as intended (sense change) | |
2036 * vim 6.3 still supported | |
2037 v56: * LocalBrowse now saves autochdir setting, unsets it, and | |
2038 restores it before returning. | |
2039 * using vim's rename() instead of system + local_rename variable | |
2040 * avoids changing directory when g:netrw_keepdir is false | |
2041 v55: * -bar used with :Explore :Sexplore etc to allow multiple | |
2042 commands to be separated by |s | |
2043 * browser listings now use the "nowrap" option | |
2044 * browser: some unuseful error messages now suppressed | |
2045 v54: * For backwards compatibility, Explore and Sexplore have been | |
2046 implemented. In addition, Hexplore and Vexplore commands | |
2047 are available, too. | |
2048 * <amatch> used instead of <afile> in the transparency | |
2049 support (BufReadCmd, FileReadCmd, FileWriteCmd) | |
2050 * ***netrw*** prepended to various error messages netrw may emit | |
2051 * g:netrw_port used instead of b:netrw_port for scp | |
2052 * any leading [:#] is removed from port numbers | |
2053 v53: * backslashes as well as slashes placed in various patterns | |
2054 (ex. g:netrw_sort_sequence) to better support Windows | |
2055 v52: * nonumber'ing now set for browsing buffers | |
2056 * when the hiding list hid all files, error messages ensued. Fixed | |
2057 * when browsing, swf is set, but directory is not set, when netrw | |
2058 was attempting to restore options, vim wanted to save a swapfile | |
2059 to a local directory using an url-style path. Fixed | |
2060 v51: * cygwin detection now automated (using windows and &shell is bash) | |
2061 * customizable browser "file" rejection patterns | |
2062 * directory history | |
2063 * :[range]w url now supported (ie. netrw has a FileWriteCmd event) | |
2064 * error messages have a "Press <cr> to continue" to allow them | |
2065 to be seen | |
2066 * directory browser displays no longer bother the swapfile | |
2067 * u/U commands to go up and down the history stack | |
2068 * history stack may be saved with viminfo with its "!" option | |
2069 * bugfixes associated with unwanted [No Files] entries | |
2070 v50: * directories now displayed using buftype=nofile; should keep the | |
2071 directory names as-is | |
2072 * attempts to remove empty "[No File]" buffers leftover | |
2073 from :file ..name.. commands | |
2074 * bugfix: a "caps-lock" editing difficulty left in v49 was fixed | |
2075 * syntax highlighting for "Showing:" the hiding list included | |
2076 * bookmarks can now be retained if "!" is in the viminfo option | |
2077 v49: * will use ftp for http://.../ browsing v48: | |
2078 * One may use ftp to do remote host file browsing | |
2079 * (windows and !cygwin) remote browsing with ftp can now use | |
2080 the "dir" command internally to provide listings | |
2081 * g:netrw_keepdir now allows one to keep the initial current | |
2082 directory as the current directory (normally the local file | |
2083 browser makes the currently viewed directory the current | |
2084 directory) | |
2085 * g:netrw_alto and g:netrw_altv now support alternate placement | |
2086 of windows started with o or v | |
2087 * Nread ? and Nwrite ? now uses echomsg (instead of echo) so | |
2088 :messages can repeat showing the help | |
2089 * bugfix: avoids problems with partial matches of directory names | |
2090 to prior buffers with longer names | |
2091 * one can suppress error messages with g:netrw_quiet ctrl-h used | |
2092 * instead of <Leader>h for editing hiding list one may edit the | |
2093 * sorting sequence with the S map now allows confirmation of | |
2094 * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles | |
2095 * special file viewing with: | |
2096 (windows) rundll32 url.dll (gnome) gnome-open (kde) | |
2097 kfmclient If none of these are on the executable path, then | |
2098 netrwFileHandlers.vim is used. | |
2099 * directory bookmarking during both local and remote browsing | |
2100 implemented | |
2101 * one may view all, use the hiding list to suppress, or use the | |
2102 hiding list to show-only remote and local file/directory | |
2103 listings | |
2104 * improved unusual file and directory name handling preview | |
2105 * window support | |
2106 v47: * now handles local directory browsing. | |
2107 v46: * now handles remote directory browsing | |
2108 * g:netrw_silent (if 1) will cause all transfers to be silent | |
2109 v45: * made the [user@]hostname:path form a bit more restrictive to | |
2110 better handle errors in using protocols (e.g. scp:usr@host:file | |
2111 was being recognized as an rcp request) v44: * changed from | |
2112 "rsync -a" to just "rsync" | |
2113 * somehow an editing error messed up the test to recognize | |
2114 use of the fetch method for NetRead. | |
2115 * more debugging statements included | |
2116 v43: * moved "Explanation" comments to <pi_netrw.txt> help file as | |
2117 "Network Reference" (|netrw-ref|) | |
2118 * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging | |
2119 * removed superfluous NetRestorePosn() calls | |
2120 v42: * now does BufReadPre and BufReadPost events on file:///* and | |
2121 file://localhost/* v41: * installed file:///* and | |
2122 file://localhost/* handling v40: * prevents redraw when a | |
2123 protocol error occurs so that the user may see it v39: * sftp | |
2124 support v38: * Now uses NetRestorePosn() calls with | |
2125 Nread/Nwrite commands | |
2126 * Temporary files now removed via bwipe! instead of bwipe | |
2127 (thanks to Dave Roberts) v37: * Claar's modifications which | |
2128 test if ftp is successful, otherwise give an error message | |
2129 * After a read, the alternate file was pointing to the temp file. | |
2130 The temp file buffer is now wiped out. | |
2131 * removed silent from transfer methods so user can see what's | |
2132 happening | |
2133 | |
2134 | |
2135 ============================================================================== | |
2136 12. Credits *netrw-credits* {{{1 | |
2137 | |
2138 Vim editor by Bram Moolenaar (Thanks, Bram!) | |
2139 dav support by C Campbell | |
2140 fetch support by Bram Moolenaar and C Campbell | |
2141 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> | |
2142 http support by Bram Moolenaar <bram@moolenaar.net> | |
2143 rcp | |
2144 rsync support by C Campbell (suggested by Erik Warendorph) | |
2145 scp support by raf <raf@comdyn.com.au> | |
2146 sftp support by C Campbell | |
2147 | |
2148 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell | |
2149 | |
2150 Jérôme Augé -- also using new buffer method with ftp+.netrc | |
2151 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, | |
2152 fetch,... | |
2153 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution | |
2154 Erik Warendorph -- for several suggestions (g:netrw_..._cmd | |
2155 variables, rsync etc) | |
2156 Doug Claar -- modifications to test for success with ftp | |
2157 operation | |
2158 | |
2159 ============================================================================== | |
2160 vim:tw=78:ts=8:ft=help:norl:fdm=marker |