blob: 00718833fe73dc491db8346f96e755b1269efaee [file] [log] [blame]
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001*pi_netrw.txt* For Vim version 7.0. Last change: Aug 15, 2005
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
5
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00006*dav* *http* *network* *rcp* *scp*
7*fetch* *netrw* *Nread* *rsync* *sftp*
8*ftp* *netrw.vim* *Nwrite* *netrw-file*
Bram Moolenaar071d4272004-06-13 20:20:40 +00009
10==============================================================================
110. Contents *netrw-contents*
12
Bram Moolenaar83bab712005-08-01 21:58:57 +0000131. Netrw Reference......................................|netrw-ref|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000014 CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp|
15 READING............................................|netrw-read|
16 WRITING............................................|netrw-write|
17 DIRECTORY LISTING..................................|netrw-dirlist|
18 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
19 VARIABLES..........................................|netrw-variables|
20 PATHS..............................................|netrw-path|
Bram Moolenaar83bab712005-08-01 21:58:57 +0000212. Network-Oriented File Transfer.......................|netrw-xfer|
22 NETRC..............................................|netrw-netrc|
23 PASSWORD...........................................|netrw-passwd|
243. Activation...........................................|netrw-activate|
254. Transparent File Transfer............................|netrw-transparent|
265. Ex Commands..........................................|netrw-ex|
276. Variables and Options................................|netrw-var|
287. Directory Browser....................................|netrw-browse| {{{1
29 Maps...............................................|netrw-maps|
30 Exploring..........................................|netrw-explore-cmds|
31 Quick Reference Commands Table.....................|netrw-browse-cmds|
32 Netrw Browser Variables............................|netrw-browse-var|
33 Introduction To Directory Browsing.................|netrw-browse-intro|
34 Directory Exploring Commands.......................|netrw-explore|
35 Refreshing The Listing.............................|netrw-ctrl-l|
36 Going Up...........................................|netrw--|
37 Browsing...........................................|netrw-cr|
38 Long Vs Short Listing..............................|netrw-i|
39 Making A New Directory.............................|netrw-d|
40 Deleting Files Or Directories......................|netrw-delete|
41 Renaming Files Or Directories......................|netrw-move|
42 Hiding Files Or Directories........................|g:netrw-a|
43 Edit File Or Directory Hiding List.................|netrw-h|
44 Browsing With A Horizontally Split Window..........|netrw-o|
45 Preview Window.....................................|netrw-p|
46 Selecting Sorting Style............................|netrw-s|
47 Editing The Sorting Sequence.......................|netrw-S|
48 Reversing Sorting Order............................|netrw-r|
49 Changing To A Predecessor Directory................|netrw-u|
50 Changing To A Successor Directory..................|netrw-U|
51 Browsing With A Vertically Split Window............|netrw-v|
52 Customizing Browsing With A User Function..........|netrw-x|
53 Making The Browsing Directory The Current Directory|netrw-c|
54 Bookmarking A Directory............................|netrw-b|
55 Changing To A Bookmarked Directory.................|netrw-B|
56 Listing Bookmarks And History......................|netrw-q|
57 Improving Directory Browsing.......................|netrw-list-hack| }}}1
588. Problems and Fixes...................................|netrw-problems|
599. Debugging............................................|netrw-debug|
6010. History..............................................|netrw-history|
6111. Credits..............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +000062
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000063The Netrw plugin is generally sourced automatically as it is a
64|standard-plugin|. That said, to make use of netrw, one must
65have plugins available which can be done with the following
66two lines in your <.vimrc>:
Bram Moolenaar071d4272004-06-13 20:20:40 +000067
Bram Moolenaar69a7cb42004-06-20 12:51:53 +000068 set nocp " 'compatible' is not set
69 filetype plugin on " plugins are enabled
Bram Moolenaar071d4272004-06-13 20:20:40 +000070
71You can avoid loading this plugin by setting the "loaded_netrw" variable
72in your <.vimrc> file: >
73
74 :let loaded_netrw = 1
75
76{Vi does not have any of this}
77
78==============================================================================
791. Netrw Reference *netrw-ref*
80
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000081CONTROLLING EXTERNAL APPLICTIONS *netrw-externapp*
Bram Moolenaar071d4272004-06-13 20:20:40 +000082
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000083 Protocol Variable Default Value
84 -------- ---------------- -------------
85 dav: *g:netrw_dav_cmd* = "cadaver"
86 fetch: *g:netrw_fetch_cmd* = "fetch -o"
87 ftp: *g:netrw_ftp_cmd* = "ftp"
88 http: *g:netrw_http_cmd* = "fetch -o" if fetch is available
89 http: g:netrw_http_cmd = "wget -q -O" If wget is available
90 rcp: *g:netrw_rcp_cmd* = "rcp"
91 rsync: *g:netrw_rsync_cmd* = "rsync -a"
92 scp: *g:netrw_scp_cmd* = "scp -q"
93 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar071d4272004-06-13 20:20:40 +000094
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000095READING *netrw-read* *netrw-nread*
Bram Moolenaar071d4272004-06-13 20:20:40 +000096 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +000097 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000098 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +000099 :Nread "machine id password path" uses ftp
100 :Nread "dav://machine[:port]/path" uses cadaver
101 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000102 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000103 :Nread "http://[user@]machine/path" uses http uses wget
104 :Nread "rcp://[user@]machine/path" uses rcp
105 :Nread "rsync://[user@]machine[:port]/path" uses rsync
106 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
107 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000108
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000109WRITING *netrw-write* *netrw-nwrite*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000110 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000111 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000112 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000113 :Nwrite "machine id password path" uses ftp
114 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000115 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000116 :Nwrite "rcp://[user@]machine/path" uses rcp
117 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
118 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
119 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000120 http: not supported!
121
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000122DIRECTORY LISTING *netrw-dirlist*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000123 :Nread [protocol]://[user]@hostname/path/
124
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000125 CHANGING USERID AND PASSWORD *netrw-chgup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000126 Attempts to use ftp will prompt you for a user-id and a password.
127 These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses
128 of ftp will re-use those. If you need to use a different user id
129 and/or password, you'll want to call NetUserPass() first.
130
131 :NetUserPass [uid [password]] -- prompts as needed
132 :call NetUserPass() -- prompts for uid and password
133 :call NetUserPass("uid") -- prompts for password
134 :call NetUserPass("uid","password") -- sets global uid and password
135
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000136VARIABLES *netrw-variables*
137 *b:netrw_lastfile* last file Network-read/written retained on a per-buffer
138 basis (supports plain :Nw )
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000140 *s:netrw_line* during :Nw/NetWrite, holds current line number
141 *s:netrw_col* during :Nw/NetWrite, holds current column number
142 s:netrw_line and s:netrw_col are used to
143 restore the cursor position on writes
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000144
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000145 *g:netrw_ftp* if it doesn't exist, use default ftp
146 =0 use default ftp (uid password)
147 =1 use alternate ftp method (user uid password)
148 If you're having trouble with ftp, try changing the
149 value of this variable to see if the alternate ftp
150 method works for your setup.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000151
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000152 *g:netrw_ftpmode* ="binary" (default)
153 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000154
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000155 *g:netrw_ignorenetrc* =0 (default)
156 =1 If you have a <.netrc> file but it doesn't work and
157 you want it ignored, then set this variable as shown.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000158
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000159 *g:netrw_uid* (ftp) user-id, retained on a per-session basis
160 *g:netrw_passwd* (ftp) password, retained on a per-session basis
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000161
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000162 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
163 lines that o/s's ftp "provides" on transfers
164 =0 force normal ftp behavior (no trailing line removal)
165
166 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
167 permits network browsing to use ls with time and
168 size sorting (default if windows)
169 =0 assume Windows' scp accepts windows-style paths
170 Network browsing uses dir instead of ls
171 This option is ignored if you're using unix
172
173 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
174 =1 use WinNT's rcp in binary mode (default)
175
176PATHS *netrw-path*
177
178Paths to files are generally user-directory relative for most protocols.
179It is possible that some protocol will make paths relative to some
180associated directory, however.
181>
182 example: vim scp://user@host/somefile
183 example: vim scp://user@host/subdir1/subdir2/somefile
184<
185where "somefile" is the "user"'s home directory. If you wish to get a
186file using root-relative paths, use the full path:
187>
188 example: vim scp://user@host//somefile
189 example: vim scp://user@host//subdir1/subdir2/somefile
190<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000191
192==============================================================================
1932. Network-Oriented File Transfer *netrw-xfer*
194
195Network-oriented file transfer under Vim is implemented by a VimL-based script
196(<netrw.vim>) using plugin techniques. It currently supports both reading
197and writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
198dav/cadaver, rsync, or sftp.
199
200http is currently supported read-only via use of wget or fetch.
201
202<netrw.vim> is a standard plugin which acts as glue between Vim and the
203various file transfer programs. It uses autocommand events (BufReadCmd,
204FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
205
206 ex. vim ftp://hostname/path/to/file
207<
208The characters preceding the colon specify the protocol to use;
209in the example, its ftp. The <netrw.vim> script then formulates
210a command or a series of commands (typically ftp) which it issues
211to an external program (ftp, scp, etc) which does the actual file
212transfer/protocol. Files are read from/written to a temporary file
213(under Unix/Linux, /tmp/...) which the <netrw.vim> script will
214clean up.
215
216One may modify any protocol's implementing external application
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000217by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000218which is defaulted to "scp -q").
219
220Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000221Unfortunately, some implementations are noisy (ie., add junk to the end
Bram Moolenaar071d4272004-06-13 20:20:40 +0000222of the file). Thus, concerned users may decide to write a NetReadFixup()
223function that will clean up after reading with their ftp. Some Unix systems
Bram Moolenaar83bab712005-08-01 21:58:57 +0000224(ie., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
Bram Moolenaar071d4272004-06-13 20:20:40 +0000225but is not noisy and more convenient, actually, for <netrw.vim> to use.
226Consequently, if "fetch" is executable, it will be used to do reads for
227ftp://... (and http://...) . See |netrw-var| for more about this.
228
229For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000230transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231>
232 vim rcp://[user@]machine/path
233 vim scp://[user@]machine/path
234<
235If your ftp supports <.netrc>, then it too can be just as transparently used
236if the needed triad of machine name, user id, and password are present in
237that file. Your ftp must be able to use the <.netrc> file on its own, however.
238>
239 vim ftp://[user@]machine[[:#]portnumber]/path
240<
241However, ftp will often need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000242The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000243the actually-typed-in password. Netrw will retain the userid and password
244for subsequent read/writes from the most recent transfer so subsequent
245transfers (read/write) to or from that machine will take place without
246additional prompting.
247
248 *netrw-urls*
249 +=================================+============================+============+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000250 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000251 +=================================+============================+============+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000252 | DAV: | | |
253 | dav://host/path | | cadaver |
254 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000255 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000256 | FETCH: | | |
257 | fetch://[user@]host/path | | |
258 | fetch://[user@]host:http/path | Not Available | fetch |
259 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000260 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000261 | FILE: | | |
262 | file:///* | file:///* | |
263 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000264 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000265 | FTP: (*3) | (*3) | |
266 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
267 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
268 | :Nread host path | :Nwrite host path | ftp+.netrc |
269 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000270 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000271 | HTTP: wget is executable: (*4) | | |
272 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000274 | HTTP: fetch is executable (*4) | | |
275 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000276 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000277 | RCP: | | |
278 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000280 | RSYNC: | | |
281 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
282 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
283 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000285 | SCP: | | |
286 | scp://[user@]host/path | scp://[user@]host/path | scp |
287 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000288 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000289 | SFTP: | | |
290 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
291 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292 +=================================+============================+============+
293
294 (*1) For an absolute path use scp://machine//path.
295
296 (*2) if <.netrc> is present, it is assumed that it will
297 work with your ftp client. Otherwise the script will
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000298 prompt for user-id and pasword.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000300 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000301 if a different port is needed than the standard ftp port
302
303 (*4) for http:..., if wget is available it will be used. Otherwise,
304 if fetch is available it will be used.
305
306Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
307
308
309NETRC *netrw-netrc*
310
311The typical syntax for lines in a <.netrc> file is given as shown below.
312Ftp under Unix usually support <.netrc>; Windows' ftp usually doesn't.
313>
314 machine {full machine name} login {user-id} password "{password}"
315 default login {user-id} password "{password}"
316
317Your ftp client must handle the use of <.netrc> on its own, but if the
318<.netrc> file exists, an ftp transfer will not ask for the user-id or
319password.
320
321 Note:
322 Since this file contains passwords, make very sure nobody else can
323 read this file! Most programs will refuse to use a .netrc that is
324 readable for others. Don't forget that the system administrator can
325 still read the file!
326
327
328PASSWORD *netrw-passwd*
329
330The script attempts to get passwords for ftp invisibly using |inputsecret()|,
331a built-in Vim function. See |netrw-uidpass| for how to change the password
332after one has set it.
333
334Unfortunately there doesn't appear to be a way for netrw to feed a password
335to scp. Thus every transfer via scp will require re-entry of the password.
336
337
338==============================================================================
3393. Activation *netrw-activate*
340
341Network-oriented file transfers are available by default whenever
342|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
343system's vim-plugin directory and is sourced automatically whenever you
344bring up vim.
345
346
347==============================================================================
3484. Transparent File Transfer *netrw-transparent*
349
350Transparent file transfers occur whenever a regular file read or write
351(invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
352Thus one may use files across networks as if they were local. >
353
354 vim ftp://[user@]machine/path
355 ...
356 :wq
357
358
359==============================================================================
3605. Ex Commands *netrw-ex*
361
362The usual read/write commands are supported. There are also a couple of
363additional commands available.
364
365:[range]Nw Write the specified lines to the current
366 file as specified in b:netrw_lastfile.
367
368:[range]Nw {netfile} [{netfile}]...
369 Write the specified lines to the {netfile}.
370
371:Nread
372 Read the specified lines into the current
373 buffer from the file specified in
374 b:netrw_lastfile.
375
376:Nread {netfile} {netfile}...
377 Read the {netfile} after the current line.
378
379 *netrw-uidpass*
380:call NetUserPass()
381 If b:netrw_uid and b:netrw_passwd don't exist,
382 this function query the user for them.
383
384:call NetUserPass("userid")
385 This call will set the b:netrw_uid and, if
386 the password doesn't exist, will query the user for it.
387
388:call NetUserPass("userid","passwd")
389 This call will set both the b:netrw_uid and b:netrw_passwd.
390 The user-id and password are used by ftp transfers. One may
391 effectively remove the user-id and password by using ""
392 strings.
393
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000394:NetrwSettings This command is desribed in |netrw-settings| -- used to
395 display netrw settings and change netrw behavior
396
Bram Moolenaar071d4272004-06-13 20:20:40 +0000397
398==============================================================================
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00003996. Variables and Options *netrw-options* *netrw-var*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000400
401The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
402behavior. These variables typically may be set in the user's <.vimrc> file:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000403>
404 -------------
405 Netrw Options
406 -------------
407 Option Meaning
408 -------------- -----------------------------------------------
409<
410 b:netrw_col Holds current cursor position (during NetWrite)
411 g:netrw_cygwin =1 assume scp under windows is from cygwin
412 (default/windows)
413 =0 assume scp under windows accepts windows
414 style paths (default/else)
415 g:netrw_ftp =0 use default ftp (uid password)
416 g:netrw_ftpmode ="binary" (default)
417 ="ascii" (your choice)
418 g:netrw_ignorenetrc =1 (default)
419 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000420 want it used, then set this variable. Its
421 mere existence is enough to cause <.netrc>
422 to be ignored.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000423 b:netrw_lastfile Holds latest method/machine/path.
424 b:netrw_line Holds current line number (during NetWrite)
425 g:netrw_passwd Holds current password for ftp.
426 g:netrw_silent =0 transfers done normally
427 =1 transfers done silently
428 g:netrw_uid Holds current user-id for ftp.
429 =1 use alternate ftp (user uid password)
430 (see |netrw-options|)
431 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
432 =1 use WinNT/2K/XP's rcp, binary mode
433 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
434 =1 use default method to do ftp >
435 -----------------------------------------------------------------------
436<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000437The script will also make use of the following variables internally, albeit
438temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000439>
440 -------------------
441 Temporary Variables
442 -------------------
443 Variable Meaning
444 -------- ------------------------------------
445<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000446 g:netrw_method Index indicating rcp/ftp+.netrc/ftp
447 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000448 g:netrw_fname Holds filename being accessed >
449 ------------------------------------------------------------
450<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000451 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000452
453Netrw supports a number of protocols. These protocols are invoked using the
454variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000455>
456 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000457 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000458 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000459 Option Type Setting Meaning
460 --------- -------- -------------- ---------------------------
461<
462 netrw_ftp variable =doesn't exist userid set by "user userid"
463 =0 userid set by "user userid"
464 =1 userid set by "userid"
465 NetReadFixup function =doesn't exist no change
466 =exists Allows user to have files
467 read via ftp automatically
468 transformed however they wish
469 by NetReadFixup()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000470 g:netrw_dav_cmd variable ="cadaver"
471 g:netrw_fetch_cmd variable ="fetch -o"
472 g:netrw_ftp_cmd variable ="ftp"
473 g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
474 g:netrw_http_cmd variable ="wget -O" if wget is executable
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000475 g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476 g:netrw_rcp_cmd variable ="rcp"
477 g:netrw_rsync_cmd variable ="rsync -a"
478 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000479 g:netrw_sftp_cmd variable ="sftp" >
480 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000481<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000482 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000483The first two options both help with certain ftp's that give trouble otherwise.
484In order to best understand how to use these options if ftp is giving you
485troubles, a bit of discussion follows on how netrw does ftp reads.
486
487The g:netrw_..._cmd variables specify the external program to use handle
488the associated protocol (rcp, ftp, etc), plus any options.
489
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000490The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
491whatever the current request is for a hostname.
492
493For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000494temporary file:
495>
496 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
497 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000498<
499 open machine [port] open machine [port]
500 user userid password userid password
501 [g:netrw_ftpmode] password
502 get filename tempfile [g:netrw_ftpmode]
503 get filename tempfile >
504 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000505<
506Netrw then executes the lines above by use of a filter:
507>
508 :%! {g:netrw_ftp_cmd} -i [-n]
509<
510
511where
512 g:netrw_ftp_cmd is usually "ftp",
513 -i tells ftp not to be interactive
514 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
515
516If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000517userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000518The temporary file is then read into the main editing session window that
519requested it and the temporary file deleted.
520
521If your ftp doesn't accept the "user" command and immediately just demands
522a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
523
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000524 *netrw-cadaver*
525To handle the SSL certificate dialog for untrusted servers, one may pull
526down the certificate and place it into /usr/ssl/cert.pem. This operation
527renders the server treatment as "trusted".
528
Bram Moolenaar83bab712005-08-01 21:58:57 +0000529 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000530If your ftp for whatever reason generates unwanted lines (such as AUTH
531messages) you may write a NetReadFixup(tmpfile) function:
532>
533 function! NetReadFixup(method,line1,line2)
534 " a:line1: first new line in current file
535 " a:line2: last new line in current file
536 if a:method == 1 "rcp
537 elseif a:method == 2 "ftp + <.netrc>
538 elseif a:method == 3 "ftp + machine,uid,password,filename
539 elseif a:method == 4 "scp
540 elseif a:method == 5 "http/wget
541 elseif a:method == 6 "dav/cadaver
542 elseif a:method == 7 "rsync
543 elseif a:method == 8 "fetch
544 elseif a:method == 9 "sftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000545 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000546 endif
547 endfunction
548>
549The NetReadFixup() function will be called if it exists and thus allows
550you to customize your reading process. As a further example, <netrw.vim>
551contains just such a function to handle Windows 95 ftp. For whatever
552reason, Windows 95's ftp dumps four blank lines at the end of a transfer,
553and so it is desirable to automate their removal. Here's some code taken
554from <netrw.vim> itself:
555>
556 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000557 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000558 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000559 let fourblanklines= line2 - 3
560 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000561 endif
562 endfunction
563 endif
564>
565
566==============================================================================
Bram Moolenaard4755bb2004-09-02 19:12:26 +00005677. Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000568
569MAPS *netrw-maps*
570 ?................Help.......................................|netrw-help|
571 <cr>.............Browsing...................................|netrw-cr|
572 <del>............Deleting Files or Directories..............|netrw-delete|
573 -................Going Up...................................|netrw--|
574 a................Hiding Files or Directories................|netrw-a|
575 b................Bookmarking a Directory....................|netrw-b|
576 B................Changing to a Bookmarked Directory.........|netrw-B|
577 c................Make Browsing Directory The Current Dir....|netrw-c|
578 d................Make A New Directory.......................|netrw-d|
579 D................Deleting Files or Directories..............|netrw-D|
580 <c-h>............Edit File/Directory Hiding List............|netrw-h|
581 i................Long Listing...............................|netrw-i|
582 <c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
583 o................Browsing with a Horizontal Split...........|netrw-o|
584 p................Preview Window.............................|netrw-p|
585 q................Listing Bookmarks and History..............|netrw-q|
586 r................Reversing Sorting Order....................|netrw-r|
587 R................Renaming Files or Directories..............|netrw-R|
588 s................Selecting Sorting Style....................|netrw-s|
589 S................Editing the Sorting Sequence...............|netrw-S|
590 u................Changing to a Predecessor Directory........|netrw-u|
591 U................Changing to a Successor Directory..........|netrw-U|
592 v................Browsing with a Vertical Split.............|netrw-v|
593 x................Customizing Browsing.......................|netrw-x|
594
595 COMMANDS *netrw-explore-cmds*
Bram Moolenaar488c6512005-08-11 20:09:58 +0000596 :Explore[!] [dir] Explore directory of current file........|netrw-explore|
597 :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore|
598 :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore|
599 :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
600 :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
601 :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000602 :NetrwSettings.............................................|netrw-settings|
Bram Moolenaar269ec652004-07-29 08:43:53 +0000603
604QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000605>
Bram Moolenaar8299df92004-07-10 09:47:34 +0000606 ------- -----------
Bram Moolenaar843ee412004-06-30 16:16:41 +0000607 Command Explanation
608 ------- -----------
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000609< ? Causes Netrw to issue help
Bram Moolenaar843ee412004-06-30 16:16:41 +0000610 <cr> Netrw will enter the directory or read the file
611 <del> Netrw will attempt to remove the file/directory
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000612 d Make a directory
Bram Moolenaar843ee412004-06-30 16:16:41 +0000613 D Netrw will attempt to remove the file(s)/directory(ies)
614 R Netrw will attempt to rename the file(s)/directory(ies)
615 - Makes Netrw go up one directory
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000616 a Toggles between normal display,
617 hiding (suppress display of files matching g:netrw_list_hide)
618 showing (display only files which match g:netrw_list_hide)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000619 c Make current browsing directory the current directory
620 <c-h> Edit file hiding list
Bram Moolenaar8299df92004-07-10 09:47:34 +0000621 i Toggles between long and short listing
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000622 <c-l> Causes Netrw to refresh the directory listing
Bram Moolenaar843ee412004-06-30 16:16:41 +0000623 o Enter the file/directory under the cursor in a new browser
624 window. A horizontal split is used.
Bram Moolenaar572cb562005-08-05 21:35:02 +0000625 p Preview the file
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000626 r Reverse sorting order
627 s Select sorting style: by name, time, or file size
Bram Moolenaar843ee412004-06-30 16:16:41 +0000628 v Enter the file/directory under the cursor in a new browser
629 window. A vertical split is used.
630 x Apply a function to a file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000631
Bram Moolenaar269ec652004-07-29 08:43:53 +0000632NETRW BROWSER VARIABLES *netrw-browse-var*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000633>
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000634 --- -----------
635 Var Explanation
636 --- -----------
637< *g:netrw_alto* change from above splitting to below splitting
638 by setting this variable (see |netrw-o|)
639 default: =0
Bram Moolenaar83bab712005-08-01 21:58:57 +0000640
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000641 *g:netrw_altv* change from left splitting to right splitting
642 by setting this variable (see |netrw-v|)
643 default: =0
Bram Moolenaar83bab712005-08-01 21:58:57 +0000644
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000645 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
646 that can show up as "directories" and "files"
647 in the listing. This pattern is used to
648 remove such embedded messages. By default its
649 value is:
650 '^total\s\+\d\+$\|
651 ^Trying\s\+\d\+.*$\|
652 ^KERBEROS_V\d rejected\|
653 ^Security extensions not\|
654 No such file\|
655 : connect to address [0-9a-fA-F:]*
656 : No route to host$'
Bram Moolenaar83bab712005-08-01 21:58:57 +0000657
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000658 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
659 messages, banners, and whatnot that one doesn't
660 want masquerading as "directories" and "files".
661 Use this pattern to remove such embedded
662 messages. By default its value is:
Bram Moolenaar83bab712005-08-01 21:58:57 +0000663 '^total\s\+\d\+$'
664
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000665 *g:netrw_keepdir* =1 (default) keep current directory immune from
666 the browsing directory.
667 =0 keep the current directory the same as the
668 browsing directory.
669 The current browsing directory is contained in
670 b:netrw_curdir
Bram Moolenaar83bab712005-08-01 21:58:57 +0000671
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000672 *g:netrw_list_cmd* command for listing remote directories
673 default: (if ssh is executable)
674 "ssh HOSTNAME ls -FLa"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000675
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000676 *g:netrw_longlist* if =1, then long listing will be default
Bram Moolenaar83bab712005-08-01 21:58:57 +0000677
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000678 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
679 listing. Defaults:
680 unix or g:netrw_cygwin set: : "ls -lF"
681 otherwise "dir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000682
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000683 *g:netrw_list_hide* comma separated pattern list for hiding files
684 default: ""
Bram Moolenaar83bab712005-08-01 21:58:57 +0000685
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000686 *g:netrw_local_mkdir* command for making a local directory
687 default: "ssh HOSTNAME mkdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000688
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000689 *g:netrw_local_rmdir* remove directory command (rmdir)
690 default: "rmdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000691
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000692 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
693 listings fit on 80 column displays.
694 If your screen is wider, and you have file
695 or directory names longer than 32 bytes,
696 you may set this option to keep listings
697 columnar.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000698
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000699 *g:netrw_mkdir_cmd* command for making a remote directory
700 default: "ssh HOSTNAME mkdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000701
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000702 *g:netrw_rm_cmd* command for removing files
703 default: "ssh HOSTNAME rm"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000704
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000705 *g:netrw_rmdir_cmd* command for removing directories
706 default: "ssh HOSTNAME rmdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000707
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000708 *g:netrw_rmf_cmd* command for removing softlinks
709 default: "ssh HOSTNAME rm -f"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000710
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000711 *g:netrw_hide* if true, the hiding list is used
712 default: =0
Bram Moolenaar83bab712005-08-01 21:58:57 +0000713
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000714 *g:netrw_sort_by* sort by "name", "time", or "size"
715 default: "name"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000716
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000717 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
718 default: "normal"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000719
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000720 *g:netrw_sort_sequence* when sorting by name, first sort by the
721 comma-separated pattern sequence
722 default: '[\/]$,*,\.bak$,\.o$,\.h$,
723 \.info$,\.swp$,\.obj$'
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000724
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000725 *g:netrw_timefmt* specify format string to strftime() (%c)
726 default: "%c"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000727
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000728 *g:netrw_winsize* specify initial size of new o/v windows
729 default: ""
Bram Moolenaar83bab712005-08-01 21:58:57 +0000730
731INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000732
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000733Netrw supports the browsing of directories on the local system and on remote
734hosts, including generating listing directories, entering directories, editing
735files therein, deleting files/directories, making new directories, and moving
736(renaming) files and directories. The Netrw browser generally implements the
737previous explorer maps and commands for remote directories, although details
738(such as pertinent global variable names) necessarily differ.
739
740The Netrw remote file and directory browser handles two protocols: ssh and
741ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
742in its remote browsing. Any other protocol will be used for file transfers,
743but otherwise the ssh protocol will be used to do remote directory browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000744
Bram Moolenaar843ee412004-06-30 16:16:41 +0000745To enter the netrw directory browser, simply attempt to read a "file" with a
746trailing slash and it will be interpreted as a request to list a directory:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000747
748 vim [protocol]://[user@]hostname/path/
749
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000750If you'd like to avoid entering the password in for directory listings, scp,
751ssh interaction, etc, see |netrw-list-hack|.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000752
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000753 *netrw-explore* *netrw-pexplore*
754 *netrw-hexplore* *netrw-sexplore*
755DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000756
Bram Moolenaar488c6512005-08-11 20:09:58 +0000757 :Explore[!] [dir]... Explore directory of current file *:Explore*
758 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
759 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
760 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000761
Bram Moolenaar488c6512005-08-11 20:09:58 +0000762 Used with :Explore **/pattern :
763 :Nexplore............. go to next matching file *:Nexplore*
764 :Pexplore............. go to previous matching file *:Pexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000765
Bram Moolenaar488c6512005-08-11 20:09:58 +0000766:Explore will open the local-directory browser on the current file's
767 directory (or on directory [dir] if specified). The window will be
768 split only if the file has been modified, otherwise the browsing
769 window will take over that window. Normally the splitting is taken
770 horizontally.
771:Explore! is like :Explore, but will use vertical splitting.
772:Sexplore will always split the window before invoking the local-directory
773 browser. As with Explore, the splitting is normally done
774 horizontally.
775:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
776:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
777:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
778:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
779:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000780
Bram Moolenaar488c6512005-08-11 20:09:58 +0000781By default, these commands use the current file's directory. However, one
782may explicitly provide a directory (path) to use.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000783
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000784(Following needs v7.0 or later) *netrw-starstar*
785When Explore, Sexplore, Hexplore, or Vexplore are used like
786>
787 :Explore **/filename_pattern
788<
789netrw will attempt to find a (sub)directory which matches the filename
790pattern. Internally, it produces a list of files which match the pattern
791and their paths; to that extent it resembles the Unix operation:
792>
793 find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null
794<
795The directory display is updated to show the subdirectory containing a
796matching file. One may then proceed to the next (or previous) matching files'
797directories by using Nexplore or Pexplore, respectively. If your console or
798gui produces recognizable shift-up or shift-down sequences, then you'll likely
799find the following mappings convenient:
Bram Moolenaar572cb562005-08-05 21:35:02 +0000800
801 <s-down> == Nexplore, and
802 <s-up> == Pexplore.
803
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000804As an example, consider
805>
Bram Moolenaar572cb562005-08-05 21:35:02 +0000806 :Explore **/*.c
807 :Nexplore
808 :Nexplore
809 :Pexplore
810<
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000811The status line will show, on the right hand side of the status line, a
812message like "Match 3 of 20".
813
Bram Moolenaar83bab712005-08-01 21:58:57 +0000814
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000815REFRESHING THE LISTING *netrw-ctrl-l*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000816
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000817To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
818hit the <cr> when atop the ./ directory entry in the listing. One may also
819refresh a local directory by using ":e .".
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000820
821
822GOING UP *netrw--*
823
824To go up a directory, press - or his the <cr> when atop the ../ directory
825entry in the listing.
826
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000827Netrw will modify the command in |g:netrw_list_cmd| to perform the directory
Bram Moolenaar843ee412004-06-30 16:16:41 +0000828listing operation. By default the command is:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000829
Bram Moolenaar843ee412004-06-30 16:16:41 +0000830 ssh HOSTNAME ls -FLa
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000831
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000832where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
833read. Naturally, the user may override this command with whatever is
834preferred. The NetList function which implements remote directory browsing
835expects that directories will be flagged by a trailing slash.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000836
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000837
Bram Moolenaar8299df92004-07-10 09:47:34 +0000838BROWSING *netrw-cr*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000839
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000840Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000841Hitting the <cr> (the return key) will select the file or directory.
842Directories will themselves be listed, and files will be opened using the
843protocol given in the original read request.
844
Bram Moolenaar83bab712005-08-01 21:58:57 +0000845
Bram Moolenaar8299df92004-07-10 09:47:34 +0000846LONG VS SHORT LISTING *netrw-i*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000847
Bram Moolenaar8299df92004-07-10 09:47:34 +0000848The short listing format gives just the files' and directories' names.
849The long listing is either based on the "ls" command via ssh for remote
850directories or displays the filename, file size (in bytes), and the
851time and date of last modification for local directories.
852
853
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000854MAKING A NEW DIRECTORY *netrw-d*
Bram Moolenaar8299df92004-07-10 09:47:34 +0000855
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000856With the "d" map one may make a new directory either remotely (which
Bram Moolenaar8299df92004-07-10 09:47:34 +0000857depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
858the global variable g:netrw_local_mkdir). Netrw will issue a request for the
859new directory's name. A bare <CR> at that point will abort the making of the
860directory. Attempts to make a local directory that already exists (as either
861a file or a directory) will be detected, reported on, and ignored.
862
Bram Moolenaar83bab712005-08-01 21:58:57 +0000863
Bram Moolenaar269ec652004-07-29 08:43:53 +0000864DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000865
866Deleting/removing files and directories involves moving the cursor to the
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000867file/directory to be deleted and pressing "D". Directories must be empty first
868before they can be successfully removed. If the directory is a softlink to a
869directory, then netrw will make two requests to remove the directory before
870succeeding. Netrw will ask for confirmation before doing the removal(s).
871You may select a range of lines with the "V" command (visual selection),
872and then pressing "D".
Bram Moolenaar843ee412004-06-30 16:16:41 +0000873
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000874The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
875to control the attempts to remove files and directories. The g:netrw_rm_cmd
876is used with files, and its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000877
878 g:netrw_rm_cmd: ssh HOSTNAME rm
879
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000880The g:netrw_rmdir_cmd variable is used to support the removal of directories.
881Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000882
883 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
884
885If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000886to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000887
888 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
889
Bram Moolenaar843ee412004-06-30 16:16:41 +0000890
Bram Moolenaar8299df92004-07-10 09:47:34 +0000891RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000892
893Renaming/moving files and directories involves moving the cursor to the
894file/directory to be moved (renamed) and pressing "R". You will then be
895queried for where you want the file/directory to be moved. You may select a
896range of lines with the "V" command (visual selection), and then pressing "R".
897
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000898The g:netrw_rename_cmd variable is used to implement renaming. By default its
Bram Moolenaar843ee412004-06-30 16:16:41 +0000899value is:
900
901 ssh HOSTNAME mv
902
Bram Moolenaar269ec652004-07-29 08:43:53 +0000903One may rename a block of files and directories by selecting them with
904the V (|linewise-visual|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000905
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000906
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000907HIDING FILES OR DIRECTORIES *g:netrw-a*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000908
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000909Netrw's browsing facility allows one to use the hiding list in one of
910three ways: ignore it, hide files which match, and show only those files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000911which match. The "a" map allows the user to cycle about these three ways.
912
913The g:netrw_list_hide variable holds a comma delimited list of patterns
914(ex. \.obj) which specify the hiding list. (also see |netrw-h|) To
915set the hiding list, use the <c-h> map. As an example, to hide files
916which begin with a ".", one may use the <c-h> map to set the hiding
917list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*' in
918one's <.vimrc>). One may then use the "a" key to show all files,
919hide matching files, or to show only the matching files.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000920
921
Bram Moolenaar83bab712005-08-01 21:58:57 +0000922EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* *netrw-edithide*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000923
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000924The "<ctrl-h>" map brings up a requestor allowing the user to change the
Bram Moolenaar269ec652004-07-29 08:43:53 +0000925file/directory hiding list. The hiding list consists of one or more patterns
926delimited by commas. Files and/or directories satisfying these patterns will
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000927either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000928
929
Bram Moolenaar83bab712005-08-01 21:58:57 +0000930BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000931
Bram Moolenaar269ec652004-07-29 08:43:53 +0000932Normally one enters a file or directory using the <cr>. However, the "o" map
933allows one to open a new window to hold the new directory listing or file. A
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000934horizontal split is used. (for vertical splitting, see |netrw-v|)
935
936Normally, the o key splits the window horizontally with the new window
937and cursor at the top. To change to splitting the window horizontally
938with the new window and cursor at the bottom, have
939
940 let g:netrw_alto = 1
941
942in your <.vimrc>.
943
Bram Moolenaar83bab712005-08-01 21:58:57 +0000944
945PREVIEW WINDOW *netrw-p* *netrw-preview*
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000946
947One may use a preview window (currently only for local browsing) by using
948the "p" key when the cursor is atop the desired filename to be previewed.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000949
950
Bram Moolenaar83bab712005-08-01 21:58:57 +0000951SELECTING SORTING STYLE *netrw-s* *netrw-sort*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000952
953One may select the sorting style by name, time, or (file) size. The
Bram Moolenaar488c6512005-08-11 20:09:58 +0000954"s" map allows one to circulate amongst the three choices; the directory
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000955listing will automatically be refreshed to reflect the selected style.
956
957
Bram Moolenaar83bab712005-08-01 21:58:57 +0000958EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence*
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000959
960When "Sorted by" is name, one may specify priority via the sorting
961sequence (g:netrw_sort_sequence). The sorting sequence typically
962prioritizes the name-listing by suffix, although any pattern will do.
963Patterns are delimited by commas. The default sorting sequence is:
964>
Bram Moolenaar488c6512005-08-11 20:09:58 +0000965 [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000966<
967The lone * is where all filenames not covered by one of the other
968patterns will end up. One may change the sorting sequence by modifying
969the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
970or by using the "S" map.
971
972
Bram Moolenaar83bab712005-08-01 21:58:57 +0000973REVERSING SORTING ORDER *netrw-r* *netrw-reverse*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000974
975One may toggle between normal and reverse sorting order by pressing the
976"r" key.
977
978
Bram Moolenaar83bab712005-08-01 21:58:57 +0000979CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000980
981Every time you change to a new directory (new for the current session),
982netrw will save the directory in a recently-visited directory history
983list (unless g:netrw_dirhistmax is zero; by default, its ten). With the
984"u" map, one can change to an earlier directory (predecessor). To do
985the opposite, see |netrw-U|.
986
987
Bram Moolenaar83bab712005-08-01 21:58:57 +0000988CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000989
990With the "U" map, one can change to a later directory (successor).
991This map is the opposite of the "u" map. (see |netrw-u|) Use the
992q map to list both the bookmarks and history. (see |netrw-q|)
993
994
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000995BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
996
997Normally one enters a file or directory using the <cr>. However, the "v"
998map allows one to open a new window to hold the new directory listing or
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000999file. A vertical split is used. (for horizontal splitting, see |netrw-o|)
1000
1001Normally, the v key splits the window vertically with the new window
1002and cursor at the left. To change to splitting the window vertically
1003with the new window and cursor at the right, have
1004
1005 let g:netrw_altv = 1
1006
1007in your <.vimrc>.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001008
1009
Bram Moolenaar83bab712005-08-01 21:58:57 +00001010CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001011
1012One may "enter" a file with a special handler, thereby firing up a browser or
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001013other application, for example, on a file by hitting the "x" key. The special
1014handler varies:
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001015
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001016 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
1017 * for KDE (with kfmclient): kfmclient is used.
1018 * for Gnome (with gnome-open): gnome-open is used.
1019 * otherwise the NetrwFileHandler plugin is used.
1020
1021The file's suffix is used by these various approaches to determine an
1022appropriate application to use to "handle" these files. Such things
1023as OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript
1024(*.ps, *.eps) can be handled.
1025
1026The NetrwFileHandler applies a user-defined function to a file, based on its
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001027extension. Of course, the handler function must exist for it to be called!
1028>
1029 Ex. mypgm.html x ->
1030 NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
1031<
1032See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
1033file with mozilla.
1034
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001035One may write custom NetrwFileHandlers; please look at the
1036plugin/NetrwFileHandlers.vim script for examples. If its likely to be
1037generally useful, please feel free to forward a copy to me for future
1038inclusion in the distribution.
1039
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001040
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001041MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001042
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001043By default, g:netrw_keepdir is 1. This setting means that the current
1044directory will not track the browsing directory. However, setting
1045g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
1046currently browsed directory be the current directory.
1047
1048With the default setting for g:netrw_keepdir, in order to make the two
1049directories the same, use the "c" map (just type c). That map will set
1050the current directory to the current browsing directory.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001051
1052
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001053BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001054
Bram Moolenaar572cb562005-08-05 21:35:02 +00001055One may easily "bookmark" a directory by using >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001056
1057 {cnt}b
Bram Moolenaar572cb562005-08-05 21:35:02 +00001058<
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001059Any count may be used. One may use viminfo's "!" option to retain bookmarks
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001060between vim sessions. See |netrw-B| for how to return to a bookmark and
1061|netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001062
1063
1064CHANGING TO A BOOKMARKED DIRECTORY *netrw-B*
1065
1066To change directory back to a bookmarked directory, use
1067
1068 {cnt}B
1069
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001070Any count may be used to reference any of the bookmarks. See |netrw-b|
1071for how to bookmark a directory and |netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001072
1073
Bram Moolenaar83bab712005-08-01 21:58:57 +00001074LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001075
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001076Pressing "q" will list the bookmarked directories and directory traversal
1077history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001078
1079
Bram Moolenaar83bab712005-08-01 21:58:57 +00001080IMPROVING DIRECTORY BROWSING *netrw-listhack*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001081
1082Especially with the remote directory browser, constantly entering the password
1083is tedious.
1084
Bram Moolenaar843ee412004-06-30 16:16:41 +00001085For Linux/Unix systems, I suggest looking into
1086
1087 http://hacks.oreilly.com/pub/h/66
1088
1089It gives a tip for setting up password-less use of ssh and scp, and discusses
1090the associated security issues.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001091
1092
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001093NETRW SETTINGS *netrw-settings*
1094
1095With the NetrwSettings.vim plugin, >
1096 :NetrwSettings
1097will bring up a window with the many variables that netrw uses for its
1098settings. You may change any of their values; when you save the file,
1099the settings therein will be used. One may also press "?" on any of
1100the lines for help on what each of the variables do.
1101
1102
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001103==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +000011048. Problems and Fixes *netrw-problems*
1105
1106 (This section is likely to grow as I get feedback)
1107 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00001108 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001109 P1. I use windows 95, and my ftp dumps four blank lines at the
1110 end of every read.
1111
1112 See |netrw-fixup|, and put the following into your
1113 <.vimrc> file:
1114
1115 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001116
Bram Moolenaar488c6512005-08-11 20:09:58 +00001117 *netrw-p2*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001118 P2. I use windows, and my network browsing with ftp doesn't sort by
1119 time or size
1120
1121 Windows' ftp has a minimal support for ls (ie. it doesn't
1122 accept sorting options). It doesn't support the -F which
1123 gives an explanatory character (ABC/ for "ABC is a directory").
1124 Netrw uses dir to get its short and long listings. If you
1125 think your ftp does support a full-up ls, put the following
1126 into your <.vimrc>:
1127
1128 let g:netrw_ftp_list_cmd= "ls -lF"
1129
1130 Alternatively, if you have cygwin on your Windows box, put
1131 into your <.vimrc>:
1132
1133 let g:netrw_cygwin= 1
1134
Bram Moolenaar488c6512005-08-11 20:09:58 +00001135 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001136 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
1137 used ssh! That wasn't what I asked for...
1138
1139 Netrw has two methods for browsing remote directories: ssh
1140 and ftp. Unless you specify ftp specifically, ssh is used.
1141 When it comes time to do download a file (not just a directory
1142 listing), netrw will use the given protocol to do so.
1143
Bram Moolenaar488c6512005-08-11 20:09:58 +00001144 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001145 P4. I would like long listings to be the default.
1146
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001147 let g:netrw_longlist=1
1148
1149 Check out |netrw-browse-var| for more customizations that
1150 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001151
Bram Moolenaar488c6512005-08-11 20:09:58 +00001152 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001153 P5. My times come up oddly in local browsing
1154
1155 Does your system's strftime() accept the "%c" to yield dates
1156 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
1157 and find out what option should be used. Then put it into
1158 your <.vimrc>:
1159 let g:netrw_timefmt= "%X" (where X is the option)
1160
Bram Moolenaar488c6512005-08-11 20:09:58 +00001161 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001162 P6. I want my current directory to track my browsing.
1163 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001164
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001165 let g:netrw_keepdir= 0
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001166
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001167
1168==============================================================================
11699. Debugging *netrw-debug*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001170
1171The <netrw.vim> script is typically available as:
Bram Moolenaar488c6512005-08-11 20:09:58 +00001172>
Bram Moolenaar071d4272004-06-13 20:20:40 +00001173 /usr/local/share/vim/vim6x/plugin/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00001174< -or- >
1175 /usr/local/share/vim/vim7x/plugin/netrw.vim
1176<
Bram Moolenaar071d4272004-06-13 20:20:40 +00001177which is loaded automatically at startup (assuming :set nocp).
1178
1179 1. Get the <Decho.vim> script, available as:
1180
1181 http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
1182 as "Decho, a vimL debugging aid"
1183 or
1184 http://vim.sourceforge.net/scripts/script.php?script_id=120
1185
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001186 and put it into your local plugin directory.
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001187
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001188 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
1189 to put it into your .vim/plugin, too. You may obtain it from:
Bram Moolenaar071d4272004-06-13 20:20:40 +00001190
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001191 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
1192 as "DrC's Utilities"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001193
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001194 3. Edit the <netrw.vim> file by typing:
1195
1196 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00001197 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001198 :wq
Bram Moolenaar071d4272004-06-13 20:20:40 +00001199
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001200 To restore to normal non-debugging behavior, edit <netrw.vim>
1201 by typing
Bram Moolenaar071d4272004-06-13 20:20:40 +00001202
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001203 vim netrw.vim
1204 :DechoOff
1205 :wq
1206
1207 This command, provided by <Decho.vim>, will comment out all
1208 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
1209
1210 4. Then bring up vim and attempt a transfer. A set of messages
Bram Moolenaar071d4272004-06-13 20:20:40 +00001211 should appear concerning the steps that <netrw.vim> took in
1212 attempting to read/write your file over the network. Please
1213 send that information to <netrw.vim>'s maintainer,
1214
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001215 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar071d4272004-06-13 20:20:40 +00001216
1217==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000121810. History *netrw-history*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001219
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001220 v63: * netrw now takes advantage of autoload (and requires 7.0)
1221 * Bugfix - using r (to reverse sort) working again
1222 v62: * Bugfix - spaces allowed again in directory names with
1223 g:netrw_keepdir=0. In fact, I've tested netrw (again)
1224 with most ANSI punctuation marks for directory names.
1225 * Bugfix - NetrwSettings gave errors when g:netrw_silent
1226 had not be set.
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00001227 v61: * document upgrade -- netrw variable-based settings all should
1228 have tags. Supports NetrwSettings command.
1229 * several important variables are window-oriented. Netrw has
1230 to transfer these across a window split. See s:BufWinVars()
1231 and s:UseBufWinVars().
Bram Moolenaar488c6512005-08-11 20:09:58 +00001232 v60: * when using the i map to switch between long and short listings,
1233 netrw will now keep cursor on same line
1234 * "Match # of #" now uses status line
1235 * :Explore **/*.c will now work from a non-netrw-browser window
1236 * :Explore **/patterns can now be run in separate browser windows
1237 * active banner (hit <cr> will cause various things to happen)
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001238 v59: * bugfix -- another keepalt work-around installed (for vim6.3)
1239 * "Match # of #" for Explore **/pattern matches
Bram Moolenaar572cb562005-08-05 21:35:02 +00001240 v58: * Explore and relatives can now handle **/somefilepattern (v7)
1241 * Nexplore and Pexplore introduced (v7). shift-down and shift-up
1242 cursor keys will invoke Nexplore and Pexplore, respectively.
1243 * bug fixed with o and v
1244 * autochdir only worked around for vim when it has been
1245 compiled with either |+netbeans_intg| or |+sun_workshop|
1246 * Under Windows, all directories and files were being preceded
1247 with a "/" when local browsing. Fixed.
1248 * When: syntax highlighting is off, laststatus=2, and remote
1249 browsing is used, sometimes the laststatus highlighting
1250 bleeds into the entire display. Work around - do an extra
1251 redraw in that case.
1252 * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers,
1253 netrw didn't change the directory when it should've
1254 * Bugfix: D and R commands work again
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001255 v57: * Explore and relatives can now handle RO files
1256 * reverse sort restored with vim7's sort command
1257 * g:netrw_keepdir now being used to keep the current directory
1258 unchanged as intended (sense change)
1259 * vim 6.3 still supported
Bram Moolenaar83bab712005-08-01 21:58:57 +00001260 v56: * LocalBrowse now saves autochdir setting, unsets it, and
1261 restores it before returning.
1262 * using vim's rename() instead of system + local_rename variable
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001263 * avoids changing directory when g:netrw_keepdir is false
Bram Moolenaar83bab712005-08-01 21:58:57 +00001264 v55: * -bar used with :Explore :Sexplore etc to allow multiple
1265 commands to be separated by |s
1266 * browser listings now use the "nowrap" option
1267 * browser: some unuseful error messages now suppressed
1268 v54: * For backwards compatibility, Explore and Sexplore have been
1269 implemented. In addition, Hexplore and Vexplore commands
1270 are available, too.
1271 * <amatch> used instead of <afile> in the transparency
1272 support (BufReadCmd, FileReadCmd, FileWriteCmd)
1273 * ***netrw*** prepended to various error messages netrw may emit
1274 * g:netrw_port used instead of b:netrw_port for scp
1275 * any leading [:#] is removed from port numbers
1276 v53: * backslashes as well as slashes placed in various patterns
1277 (ex. g:netrw_sort_sequence) to better support Windows
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001278 v52: * nonumber'ing now set for browsing buffers
1279 * when the hiding list hid all files, error messages ensued. Fixed
1280 * when browsing, swf is set, but directory is not set, when netrw
1281 was attempting to restore options, vim wanted to save a swapfile
1282 to a local directory using an url-style path. Fixed
1283 v51: * cygwin detection now automated (using windows and &shell is bash)
1284 * customizable browser "file" rejection patterns
1285 * directory history
1286 * :[range]w url now supported (ie. netrw has a FileWriteCmd event)
1287 * error messages have a "Press <cr> to continue" to allow them
1288 to be seen
1289 * directory browser displays no longer bother the swapfile
1290 * u/U commands to go up and down the history stack
1291 * history stack may be saved with viminfo with its "!" option
1292 * bugfixes associated with unwanted [No Files] entries
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001293 v50: * directories now displayed using buftype=nofile; should keep the
1294 directory names as-is
1295 * attempts to remove empty "[No File]" buffers leftover
1296 from :file ..name.. commands
1297 * bugfix: a "caps-lock" editing difficulty left in v49 was fixed
1298 * syntax highlighting for "Showing:" the hiding list included
1299 * bookmarks can now be retained if "!" is in the viminfo option
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001300 v49: * will use ftp for http://.../ browsing v48:
1301 * One may use ftp to do remote host file browsing
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001302 * (windows and !cygwin) remote browsing with ftp can now use
1303 the "dir" command internally to provide listings
1304 * g:netrw_keepdir now allows one to keep the initial current
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001305 directory as the current directory (normally the local file
1306 browser makes the currently viewed directory the current
1307 directory)
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001308 * g:netrw_alto and g:netrw_altv now support alternate placement
1309 of windows started with o or v
1310 * Nread ? and Nwrite ? now uses echomsg (instead of echo) so
1311 :messages can repeat showing the help
1312 * bugfix: avoids problems with partial matches of directory names
1313 to prior buffers with longer names
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001314 * one can suppress error messages with g:netrw_quiet ctrl-h used
1315 * instead of <Leader>h for editing hiding list one may edit the
1316 * sorting sequence with the S map now allows confirmation of
1317 * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
1318 * special file viewing with:
1319 (windows) rundll32 url.dll (gnome) gnome-open (kde)
1320 kfmclient If none of these are on the executable path, then
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001321 NetrwFileHandlers.vim is used.
1322 * directory bookmarking during both local and remote browsing
1323 implemented
1324 * one may view all, use the hiding list to suppress, or use the
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001325 hiding list to show-only remote and local file/directory
1326 listings
1327 * improved unusual file and directory name handling preview
1328 * window support
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001329 v47: * now handles local directory browsing.
1330 v46: * now handles remote directory browsing
1331 * g:netrw_silent (if 1) will cause all transfers to be silent
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001332 v45: * made the [user@]hostname:path form a bit more restrictive to
1333 better handle errors in using protocols (e.g. scp:usr@host:file
1334 was being recognized as an rcp request) v44: * changed from
1335 "rsync -a" to just "rsync"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001336 * somehow an editing error messed up the test to recognize
1337 use of the fetch method for NetRead.
1338 * more debugging statements included
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001339 v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
1340 "Network Reference" (|netrw-ref|)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001341 * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
1342 * removed superfluous NetRestorePosn() calls
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001343 v42: * now does BufReadPre and BufReadPost events on file:///* and
1344 file://localhost/* v41: * installed file:///* and
1345 file://localhost/* handling v40: * prevents redraw when a
1346 protocol error occurs so that the user may see it v39: * sftp
1347 support v38: * Now uses NetRestorePosn() calls with
1348 Nread/Nwrite commands
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001349 * Temporary files now removed via bwipe! instead of bwipe
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001350 (thanks to Dave Roberts) v37: * Claar's modifications which
1351 test if ftp is successful, otherwise give an error message
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001352 * After a read, the alternate file was pointing to the temp file.
1353 The temp file buffer is now wiped out.
1354 * removed silent from transfer methods so user can see what's
1355 happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00001356
1357
1358==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000135911. Credits *netrw-credits*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001360
1361 Vim editor by Bram Moolenaar (Thanks, Bram!)
1362 dav support by C Campbell
1363 fetch support by Bram Moolenaar and C Campbell
1364 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM
1365 http support by Bram Moolenaar <bram@moolenaar.net>
1366 rcp
1367 rsync support by C Campbell (suggested by Erik Warendorph)
1368 scp support by raf <raf@comdyn.com.au>
1369 sftp support by C Campbell
1370
1371 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
1372
1373 Jérôme Augé -- also using new buffer method with ftp+.netrc
1374 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, fetch,...
1375 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
1376 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
1377 variables, rsync etc)
1378 Doug Claar -- modifications to test for success with ftp operation
1379
1380==============================================================================
Bram Moolenaar83bab712005-08-01 21:58:57 +00001381 vim:tw=78:ts=8:ft=help:norl:fdm=marker