blob: 4cc59c3e927805d8c1076c3148307df40b258184 [file] [log] [blame]
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00001*pi_netrw.txt* For Vim version 7.0. Last change: Aug 11, 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|
142. Network-Oriented File Transfer.......................|netrw-xfer|
15 NETRC..............................................|netrw-netrc|
16 PASSWORD...........................................|netrw-passwd|
173. Activation...........................................|netrw-activate|
184. Transparent File Transfer............................|netrw-transparent|
195. Ex Commands..........................................|netrw-ex|
206. Variables and Options................................|netrw-var|
217. Directory Browser....................................|netrw-browse| {{{1
22 Maps...............................................|netrw-maps|
23 Exploring..........................................|netrw-explore-cmds|
24 Quick Reference Commands Table.....................|netrw-browse-cmds|
25 Netrw Browser Variables............................|netrw-browse-var|
26 Introduction To Directory Browsing.................|netrw-browse-intro|
27 Directory Exploring Commands.......................|netrw-explore|
28 Refreshing The Listing.............................|netrw-ctrl-l|
29 Going Up...........................................|netrw--|
30 Browsing...........................................|netrw-cr|
31 Long Vs Short Listing..............................|netrw-i|
32 Making A New Directory.............................|netrw-d|
33 Deleting Files Or Directories......................|netrw-delete|
34 Renaming Files Or Directories......................|netrw-move|
35 Hiding Files Or Directories........................|g:netrw-a|
36 Edit File Or Directory Hiding List.................|netrw-h|
37 Browsing With A Horizontally Split Window..........|netrw-o|
38 Preview Window.....................................|netrw-p|
39 Selecting Sorting Style............................|netrw-s|
40 Editing The Sorting Sequence.......................|netrw-S|
41 Reversing Sorting Order............................|netrw-r|
42 Changing To A Predecessor Directory................|netrw-u|
43 Changing To A Successor Directory..................|netrw-U|
44 Browsing With A Vertically Split Window............|netrw-v|
45 Customizing Browsing With A User Function..........|netrw-x|
46 Making The Browsing Directory The Current Directory|netrw-c|
47 Bookmarking A Directory............................|netrw-b|
48 Changing To A Bookmarked Directory.................|netrw-B|
49 Listing Bookmarks And History......................|netrw-q|
50 Improving Directory Browsing.......................|netrw-list-hack| }}}1
518. Problems and Fixes...................................|netrw-problems|
529. Debugging............................................|netrw-debug|
5310. History..............................................|netrw-history|
5411. Credits..............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +000055
56The functionality mentioned here is done via using |standard-plugin|
57techniques. This plugin is only available if
58
Bram Moolenaar69a7cb42004-06-20 12:51:53 +000059 set nocp " 'compatible' is not set
60 filetype plugin on " plugins are enabled
Bram Moolenaar071d4272004-06-13 20:20:40 +000061
62You can avoid loading this plugin by setting the "loaded_netrw" variable
63in your <.vimrc> file: >
64
65 :let loaded_netrw = 1
66
67{Vi does not have any of this}
68
69==============================================================================
701. Netrw Reference *netrw-ref*
71
72 OPTIONS
73 let g:netrw_ftp =0 use ftp (default) (uid password)
74 =1 use alternate ftp method (user uid password)
75 If you're having trouble with ftp, try changing the value
76 of this variable in your <.vimrc> to change methods
77
78 let g:netrw_ignorenetrc= 1
79 If you have a <.netrc> file but it doesn't work and you
80 want it ignored, then set this variable as shown. Its mere
81 existence is enough to cause <.netrc> to be ignored.
82
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +000083 Controlling External Applications *netrw-externapp*
Bram Moolenaar071d4272004-06-13 20:20:40 +000084
Bram Moolenaar69a7cb42004-06-20 12:51:53 +000085 Protocol Variable Default Value
86 -------- ---------------- -------------
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +000087 dav: *g:netrw_dav_cmd* = "cadaver"
88 fetch: *g:netrw_fetch_cmd* = "fetch -o"
89 ftp: *g:netrw_ftp_cmd* = "ftp"
90 http: *g:netrw_http_cmd* = "fetch -o" if fetch is available
91 http: g:netrw_http_cmd = "wget -q -O" If wget is available
92 rcp: *g:netrw_rcp_cmd* = "rcp"
93 rsync: *g:netrw_rsync_cmd* = "rsync -a"
94 scp: *g:netrw_scp_cmd* = "scp -q"
95 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar071d4272004-06-13 20:20:40 +000096
Bram Moolenaard4755bb2004-09-02 19:12:26 +000097 READING *netrw-read* *netrw-nread*
Bram Moolenaar071d4272004-06-13 20:20:40 +000098 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +000099 :Nread "machine:path" uses rcp
100 :Nread "machine path" uses ftp with <.netrc>
101 :Nread "machine id password path" uses ftp
102 :Nread "dav://machine[:port]/path" uses cadaver
103 :Nread "fetch://[user@]machine/path" uses fetch
104 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp autodetects <.netrc>
105 :Nread "http://[user@]machine/path" uses http uses wget
106 :Nread "rcp://[user@]machine/path" uses rcp
107 :Nread "rsync://[user@]machine[:port]/path" uses rsync
108 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
109 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000110
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000111 WRITING *netrw-write* *netrw-nwrite*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000112 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000113 :Nwrite "machine:path" uses rcp
114 :Nwrite "machine path" uses ftp with <.netrc>
115 :Nwrite "machine id password path" uses ftp
116 :Nwrite "dav://machine[:port]/path" uses cadaver
117 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp autodetects <.netrc>
118 :Nwrite "rcp://[user@]machine/path" uses rcp
119 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
120 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
121 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000122 http: not supported!
123
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000124 DIRECTORY LISTING
125 :Nread [protocol]://[user]@hostname/path/
126
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127 USER AND PASSWORD CHANGING
128 Attempts to use ftp will prompt you for a user-id and a password.
129 These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses
130 of ftp will re-use those. If you need to use a different user id
131 and/or password, you'll want to call NetUserPass() first.
132
133 :NetUserPass [uid [password]] -- prompts as needed
134 :call NetUserPass() -- prompts for uid and password
135 :call NetUserPass("uid") -- prompts for password
136 :call NetUserPass("uid","password") -- sets global uid and password
137
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000138 VARIABLES *netrw-variables*
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000139 *b:netrw_lastfile*
140 last file Network-read/written retained on
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141 a per-buffer basis (supports plain :Nw )
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000142 *s:netrw_line*
143 during :Nw/NetWrite, holds current line number
144 *s:netrw_col*
145 during :Nw/NetWrite, holds current column number
Bram Moolenaar071d4272004-06-13 20:20:40 +0000146 s:netrw_line and s:netrw_col are used to
147 restore the cursor position on writes
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000148 *g:netrw_ftp*
149 if it doesn't exist, use default ftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150 =0 use default ftp (uid password)
151 =1 use alternate ftp method (user uid password)
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000152 *g:netrw_ftpmode*
153 ="binary" (default)
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000154 ="ascii"
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000155 *g:netrw_uid*
156 (ftp) user-id, retained on a per-session basis
157 *g:netrw_passwd*
158 (ftp) password, retained on a per-session basis
159 *g:netrw_win95ftp*
160 =1 if using Win95, will remove four trailing blank
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000161 lines that o/s's ftp "provides" on transfers
162 =0 force normal ftp behavior (no trailing line
163 removal)
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000164 *g:netrw_cygwin*
165 =1 assume scp under windows is from cygwin
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000166 Also permits network browsing to use
167 ls with time and size sorting
Bram Moolenaar071d4272004-06-13 20:20:40 +0000168 (default if windows)
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000169 =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
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000172 *g:netrw_use_nt_rcp*
173 =0 don't use the rcp of WinNT, Win2000 and WinXP
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000174 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000175
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000176 PATHS *netrw-path*
177
178 Paths to files are generally user-directory relative for most protocols.
179 It is possible that some protocol will make paths relative to some
180 associated directory, however.
181
182 example: vim scp://user@host/somefile
183 example: vim scp://user@host/subdir1/subdir2/somefile
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000184
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000185 where "somefile" is the "user"'s home directory. If you wish to get a
186 file 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
394
395==============================================================================
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00003966. Variables and Options *netrw-options* *netrw-var*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000397
398The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
399behavior. These variables typically may be set in the user's <.vimrc> file:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000400>
401 -------------
402 Netrw Options
403 -------------
404 Option Meaning
405 -------------- -----------------------------------------------
406<
407 b:netrw_col Holds current cursor position (during NetWrite)
408 g:netrw_cygwin =1 assume scp under windows is from cygwin
409 (default/windows)
410 =0 assume scp under windows accepts windows
411 style paths (default/else)
412 g:netrw_ftp =0 use default ftp (uid password)
413 g:netrw_ftpmode ="binary" (default)
414 ="ascii" (your choice)
415 g:netrw_ignorenetrc =1 (default)
416 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000417 want it used, then set this variable. Its
418 mere existence is enough to cause <.netrc>
419 to be ignored.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000420 b:netrw_lastfile Holds latest method/machine/path.
421 b:netrw_line Holds current line number (during NetWrite)
422 g:netrw_passwd Holds current password for ftp.
423 g:netrw_silent =0 transfers done normally
424 =1 transfers done silently
425 g:netrw_uid Holds current user-id for ftp.
426 =1 use alternate ftp (user uid password)
427 (see |netrw-options|)
428 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
429 =1 use WinNT/2K/XP's rcp, binary mode
430 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
431 =1 use default method to do ftp >
432 -----------------------------------------------------------------------
433<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434The script will also make use of the following variables internally, albeit
435temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000436>
437 -------------------
438 Temporary Variables
439 -------------------
440 Variable Meaning
441 -------- ------------------------------------
442<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000443 g:netrw_method Index indicating rcp/ftp+.netrc/ftp
444 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000445 g:netrw_fname Holds filename being accessed >
446 ------------------------------------------------------------
447<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000448 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000449
450Netrw supports a number of protocols. These protocols are invoked using the
451variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452>
453 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000454 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000455 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000456 Option Type Setting Meaning
457 --------- -------- -------------- ---------------------------
458<
459 netrw_ftp variable =doesn't exist userid set by "user userid"
460 =0 userid set by "user userid"
461 =1 userid set by "userid"
462 NetReadFixup function =doesn't exist no change
463 =exists Allows user to have files
464 read via ftp automatically
465 transformed however they wish
466 by NetReadFixup()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467 g:netrw_dav_cmd variable ="cadaver"
468 g:netrw_fetch_cmd variable ="fetch -o"
469 g:netrw_ftp_cmd variable ="ftp"
470 g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
471 g:netrw_http_cmd variable ="wget -O" if wget is executable
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000472 g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000473 g:netrw_rcp_cmd variable ="rcp"
474 g:netrw_rsync_cmd variable ="rsync -a"
475 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000476 g:netrw_sftp_cmd variable ="sftp" >
477 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000478<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000479 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000480The first two options both help with certain ftp's that give trouble otherwise.
481In order to best understand how to use these options if ftp is giving you
482troubles, a bit of discussion follows on how netrw does ftp reads.
483
484The g:netrw_..._cmd variables specify the external program to use handle
485the associated protocol (rcp, ftp, etc), plus any options.
486
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000487The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
488whatever the current request is for a hostname.
489
490For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000491temporary file:
492>
493 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
494 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000495<
496 open machine [port] open machine [port]
497 user userid password userid password
498 [g:netrw_ftpmode] password
499 get filename tempfile [g:netrw_ftpmode]
500 get filename tempfile >
501 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000502<
503Netrw then executes the lines above by use of a filter:
504>
505 :%! {g:netrw_ftp_cmd} -i [-n]
506<
507
508where
509 g:netrw_ftp_cmd is usually "ftp",
510 -i tells ftp not to be interactive
511 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
512
513If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000514userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000515The temporary file is then read into the main editing session window that
516requested it and the temporary file deleted.
517
518If your ftp doesn't accept the "user" command and immediately just demands
519a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
520
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000521 *netrw-cadaver*
522To handle the SSL certificate dialog for untrusted servers, one may pull
523down the certificate and place it into /usr/ssl/cert.pem. This operation
524renders the server treatment as "trusted".
525
Bram Moolenaar83bab712005-08-01 21:58:57 +0000526 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527If your ftp for whatever reason generates unwanted lines (such as AUTH
528messages) you may write a NetReadFixup(tmpfile) function:
529>
530 function! NetReadFixup(method,line1,line2)
531 " a:line1: first new line in current file
532 " a:line2: last new line in current file
533 if a:method == 1 "rcp
534 elseif a:method == 2 "ftp + <.netrc>
535 elseif a:method == 3 "ftp + machine,uid,password,filename
536 elseif a:method == 4 "scp
537 elseif a:method == 5 "http/wget
538 elseif a:method == 6 "dav/cadaver
539 elseif a:method == 7 "rsync
540 elseif a:method == 8 "fetch
541 elseif a:method == 9 "sftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000542 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000543 endif
544 endfunction
545>
546The NetReadFixup() function will be called if it exists and thus allows
547you to customize your reading process. As a further example, <netrw.vim>
548contains just such a function to handle Windows 95 ftp. For whatever
549reason, Windows 95's ftp dumps four blank lines at the end of a transfer,
550and so it is desirable to automate their removal. Here's some code taken
551from <netrw.vim> itself:
552>
553 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000554 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000555 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000556 let fourblanklines= line2 - 3
557 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000558 endif
559 endfunction
560 endif
561>
562
563==============================================================================
Bram Moolenaard4755bb2004-09-02 19:12:26 +00005647. Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000565
566MAPS *netrw-maps*
567 ?................Help.......................................|netrw-help|
568 <cr>.............Browsing...................................|netrw-cr|
569 <del>............Deleting Files or Directories..............|netrw-delete|
570 -................Going Up...................................|netrw--|
571 a................Hiding Files or Directories................|netrw-a|
572 b................Bookmarking a Directory....................|netrw-b|
573 B................Changing to a Bookmarked Directory.........|netrw-B|
574 c................Make Browsing Directory The Current Dir....|netrw-c|
575 d................Make A New Directory.......................|netrw-d|
576 D................Deleting Files or Directories..............|netrw-D|
577 <c-h>............Edit File/Directory Hiding List............|netrw-h|
578 i................Long Listing...............................|netrw-i|
579 <c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
580 o................Browsing with a Horizontal Split...........|netrw-o|
581 p................Preview Window.............................|netrw-p|
582 q................Listing Bookmarks and History..............|netrw-q|
583 r................Reversing Sorting Order....................|netrw-r|
584 R................Renaming Files or Directories..............|netrw-R|
585 s................Selecting Sorting Style....................|netrw-s|
586 S................Editing the Sorting Sequence...............|netrw-S|
587 u................Changing to a Predecessor Directory........|netrw-u|
588 U................Changing to a Successor Directory..........|netrw-U|
589 v................Browsing with a Vertical Split.............|netrw-v|
590 x................Customizing Browsing.......................|netrw-x|
591
592 COMMANDS *netrw-explore-cmds*
Bram Moolenaar488c6512005-08-11 20:09:58 +0000593 :Explore[!] [dir] Explore directory of current file........|netrw-explore|
594 :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore|
595 :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore|
596 :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
597 :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
598 :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
Bram Moolenaar269ec652004-07-29 08:43:53 +0000599
600QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000601>
Bram Moolenaar8299df92004-07-10 09:47:34 +0000602 ------- -----------
Bram Moolenaar843ee412004-06-30 16:16:41 +0000603 Command Explanation
604 ------- -----------
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000605< ? Causes Netrw to issue help
Bram Moolenaar843ee412004-06-30 16:16:41 +0000606 <cr> Netrw will enter the directory or read the file
607 <del> Netrw will attempt to remove the file/directory
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000608 d Make a directory
Bram Moolenaar843ee412004-06-30 16:16:41 +0000609 D Netrw will attempt to remove the file(s)/directory(ies)
610 R Netrw will attempt to rename the file(s)/directory(ies)
611 - Makes Netrw go up one directory
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000612 a Toggles between normal display,
613 hiding (suppress display of files matching g:netrw_list_hide)
614 showing (display only files which match g:netrw_list_hide)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000615 c Make current browsing directory the current directory
616 <c-h> Edit file hiding list
Bram Moolenaar8299df92004-07-10 09:47:34 +0000617 i Toggles between long and short listing
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000618 <c-l> Causes Netrw to refresh the directory listing
Bram Moolenaar843ee412004-06-30 16:16:41 +0000619 o Enter the file/directory under the cursor in a new browser
620 window. A horizontal split is used.
Bram Moolenaar572cb562005-08-05 21:35:02 +0000621 p Preview the file
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000622 r Reverse sorting order
623 s Select sorting style: by name, time, or file size
Bram Moolenaar843ee412004-06-30 16:16:41 +0000624 v Enter the file/directory under the cursor in a new browser
625 window. A vertical split is used.
626 x Apply a function to a file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000627
Bram Moolenaar269ec652004-07-29 08:43:53 +0000628NETRW BROWSER VARIABLES *netrw-browse-var*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000629>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000630 --- -----------
631 Var Explanation
632 --- -----------
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000633< *g:netrw_alto* change from above splitting to
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000634 below splitting by setting this
635 variable (see |netrw-o|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000636 default: =0
637
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000638 *g:netrw_altv* change from left splitting to
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000639 right splitting by setting this
640 variable (see |netrw-v|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000641 default: =0
642
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000643 *g:netrw_ftp_browse_reject* ftp can produce a number of errors
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000644 and warnings that can show up as
645 "directories" and "files" in the
646 listing. This pattern is used to
Bram Moolenaar83bab712005-08-01 21:58:57 +0000647 remove such embedded messages. By
648 default its value is:
649 '^total\s\+\d\+$\|
650 ^Trying\s\+\d\+.*$\|
651 ^KERBEROS_V\d rejected\|
652 ^Security extensions not\|
653 No such file\|
654 : connect to address [0-9a-fA-F:]*
655 : No route to host$'
656
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000657 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted
Bram Moolenaar83bab712005-08-01 21:58:57 +0000658 lines/messages/banners/and whatnot
659 that one doesn't want masquerading
660 as "directories" and "files". Use
661 this pattern to remove such embedded
662 messages. By default its value is:
663 '^total\s\+\d\+$'
664
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000665 *g:netrw_keepdir* =1 (default) keep current directory
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000666 immune from the browsing directory.
667 =0 keep the current directory the
668 same as the browsing directory.
669 The browsing directory is contained in
670 b:netrw_curdir
Bram Moolenaar83bab712005-08-01 21:58:57 +0000671
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000672 *g:netrw_list_cmd* command for listing remote directories
Bram Moolenaar83bab712005-08-01 21:58:57 +0000673 default: (if ssh is executable)
674 "ssh HOSTNAME ls -FLa"
675
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000676 *g:netrw_longlist* if =1, then long listing will be default
Bram Moolenaar83bab712005-08-01 21:58:57 +0000677
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000678 *g:netrw_ftp_list_cmd* options for passing along to ftp for
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000679 directory listing. Defaults:
680 unix or g:netrw_cygwin set: : "ls -lF"
681 otherwise "dir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000682
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000683 *g:netrw_list_hide* comma separated list of patterns for
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000684 hiding files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000685 default: ""
686
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000687 *g:netrw_local_mkdir* command for making a local directory
Bram Moolenaar83bab712005-08-01 21:58:57 +0000688 default: "ssh HOSTNAME mkdir"
689
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000690 *g:netrw_local_rmdir* remove directory command (rmdir)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000691 default: "rmdir"
692
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000693 *g:netrw_maxfilenamelen* =32 by default, selected so as to make
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000694 long listings fit on 80 column displays.
695 If your screen is wider, and you have
696 file/directory names longer than 32 bytes,
697 you may set this option to keep listings
698 columnar.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000699
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000700 *g:netrw_mkdir_cmd* command for making a remote directory
Bram Moolenaar83bab712005-08-01 21:58:57 +0000701 default: "ssh HOSTNAME mkdir"
702
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000703 *g:netrw_rm_cmd* command for removing files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000704 default: "ssh HOSTNAME rm"
705
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000706 *g:netrw_rmdir_cmd* command for removing directories
Bram Moolenaar83bab712005-08-01 21:58:57 +0000707 default: "ssh HOSTNAME rmdir"
708
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000709 *g:netrw_rmf_cmd* command for removing softlinks
Bram Moolenaar83bab712005-08-01 21:58:57 +0000710 default: "ssh HOSTNAME rm -f"
711
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000712 *g:netrw_hide* if true, the hiding list is used
Bram Moolenaar83bab712005-08-01 21:58:57 +0000713 default: =0
714
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000715 *g:netrw_sort_by* sort by "name", "time", or "size"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000716 default: "name"
717
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000718 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000719 default: "normal"
720
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000721 *g:netrw_sort_sequence* when sorting by name, first sort by the
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000722 comma-separated pattern sequence
Bram Moolenaar83bab712005-08-01 21:58:57 +0000723 default: '[\/]$,*,\.bak$,\.o$,\.h$,
724 \.info$,\.swp$,\.obj$'
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000725
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000726 *g:netrw_timefmt* specify format string to strftime() (%c)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000727 default: "%c"
728
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000729 *g:netrw_winsize* specify initial size of new o/v windows
Bram Moolenaar83bab712005-08-01 21:58:57 +0000730 default: ""
731
732INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000733
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000734Netrw supports the browsing of directories on the local system and on remote
735hosts, including generating listing directories, entering directories, editing
736files therein, deleting files/directories, making new directories, and moving
737(renaming) files and directories. The Netrw browser generally implements the
738previous explorer maps and commands for remote directories, although details
739(such as pertinent global variable names) necessarily differ.
740
741The Netrw remote file and directory browser handles two protocols: ssh and
742ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
743in its remote browsing. Any other protocol will be used for file transfers,
744but otherwise the ssh protocol will be used to do remote directory browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000745
Bram Moolenaar843ee412004-06-30 16:16:41 +0000746To enter the netrw directory browser, simply attempt to read a "file" with a
747trailing slash and it will be interpreted as a request to list a directory:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000748
749 vim [protocol]://[user@]hostname/path/
750
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000751If you'd like to avoid entering the password in for directory listings, scp,
752ssh interaction, etc, see |netrw-list-hack|.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000753
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000754 *netrw-explore* *netrw-pexplore*
755 *netrw-hexplore* *netrw-sexplore*
756DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000757
Bram Moolenaar488c6512005-08-11 20:09:58 +0000758 :Explore[!] [dir]... Explore directory of current file *:Explore*
759 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
760 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
761 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000762
Bram Moolenaar488c6512005-08-11 20:09:58 +0000763 Used with :Explore **/pattern :
764 :Nexplore............. go to next matching file *:Nexplore*
765 :Pexplore............. go to previous matching file *:Pexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000766
Bram Moolenaar488c6512005-08-11 20:09:58 +0000767:Explore will open the local-directory browser on the current file's
768 directory (or on directory [dir] if specified). The window will be
769 split only if the file has been modified, otherwise the browsing
770 window will take over that window. Normally the splitting is taken
771 horizontally.
772:Explore! is like :Explore, but will use vertical splitting.
773:Sexplore will always split the window before invoking the local-directory
774 browser. As with Explore, the splitting is normally done
775 horizontally.
776:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
777:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
778:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
779:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
780:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000781
Bram Moolenaar488c6512005-08-11 20:09:58 +0000782By default, these commands use the current file's directory. However, one
783may explicitly provide a directory (path) to use.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000784
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000785(Following needs v7.0 or later) *netrw-starstar*
786When Explore, Sexplore, Hexplore, or Vexplore are used like
787>
788 :Explore **/filename_pattern
789<
790netrw will attempt to find a (sub)directory which matches the filename
791pattern. Internally, it produces a list of files which match the pattern
792and their paths; to that extent it resembles the Unix operation:
793>
794 find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null
795<
796The directory display is updated to show the subdirectory containing a
797matching file. One may then proceed to the next (or previous) matching files'
798directories by using Nexplore or Pexplore, respectively. If your console or
799gui produces recognizable shift-up or shift-down sequences, then you'll likely
800find the following mappings convenient:
Bram Moolenaar572cb562005-08-05 21:35:02 +0000801
802 <s-down> == Nexplore, and
803 <s-up> == Pexplore.
804
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000805As an example, consider
806>
Bram Moolenaar572cb562005-08-05 21:35:02 +0000807 :Explore **/*.c
808 :Nexplore
809 :Nexplore
810 :Pexplore
811<
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000812The status line will show, on the right hand side of the status line, a
813message like "Match 3 of 20".
814
Bram Moolenaar83bab712005-08-01 21:58:57 +0000815
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000816REFRESHING THE LISTING *netrw-ctrl-l*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000817
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000818To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
819hit the <cr> when atop the ./ directory entry in the listing. One may also
820refresh a local directory by using ":e .".
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000821
822
823GOING UP *netrw--*
824
825To go up a directory, press - or his the <cr> when atop the ../ directory
826entry in the listing.
827
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000828Netrw will modify the command in |g:netrw_list_cmd| to perform the directory
Bram Moolenaar843ee412004-06-30 16:16:41 +0000829listing operation. By default the command is:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000830
Bram Moolenaar843ee412004-06-30 16:16:41 +0000831 ssh HOSTNAME ls -FLa
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000832
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000833where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
834read. Naturally, the user may override this command with whatever is
835preferred. The NetList function which implements remote directory browsing
836expects that directories will be flagged by a trailing slash.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000837
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000838
Bram Moolenaar8299df92004-07-10 09:47:34 +0000839BROWSING *netrw-cr*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000840
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000841Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000842Hitting the <cr> (the return key) will select the file or directory.
843Directories will themselves be listed, and files will be opened using the
844protocol given in the original read request.
845
Bram Moolenaar83bab712005-08-01 21:58:57 +0000846
Bram Moolenaar8299df92004-07-10 09:47:34 +0000847LONG VS SHORT LISTING *netrw-i*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000848
Bram Moolenaar8299df92004-07-10 09:47:34 +0000849The short listing format gives just the files' and directories' names.
850The long listing is either based on the "ls" command via ssh for remote
851directories or displays the filename, file size (in bytes), and the
852time and date of last modification for local directories.
853
854
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000855MAKING A NEW DIRECTORY *netrw-d*
Bram Moolenaar8299df92004-07-10 09:47:34 +0000856
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000857With the "d" map one may make a new directory either remotely (which
Bram Moolenaar8299df92004-07-10 09:47:34 +0000858depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
859the global variable g:netrw_local_mkdir). Netrw will issue a request for the
860new directory's name. A bare <CR> at that point will abort the making of the
861directory. Attempts to make a local directory that already exists (as either
862a file or a directory) will be detected, reported on, and ignored.
863
Bram Moolenaar83bab712005-08-01 21:58:57 +0000864
Bram Moolenaar269ec652004-07-29 08:43:53 +0000865DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000866
867Deleting/removing files and directories involves moving the cursor to the
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000868file/directory to be deleted and pressing "D". Directories must be empty first
869before they can be successfully removed. If the directory is a softlink to a
870directory, then netrw will make two requests to remove the directory before
871succeeding. Netrw will ask for confirmation before doing the removal(s).
872You may select a range of lines with the "V" command (visual selection),
873and then pressing "D".
Bram Moolenaar843ee412004-06-30 16:16:41 +0000874
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000875The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
876to control the attempts to remove files and directories. The g:netrw_rm_cmd
877is used with files, and its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000878
879 g:netrw_rm_cmd: ssh HOSTNAME rm
880
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000881The g:netrw_rmdir_cmd variable is used to support the removal of directories.
882Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000883
884 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
885
886If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000887to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000888
889 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
890
Bram Moolenaar843ee412004-06-30 16:16:41 +0000891
Bram Moolenaar8299df92004-07-10 09:47:34 +0000892RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000893
894Renaming/moving files and directories involves moving the cursor to the
895file/directory to be moved (renamed) and pressing "R". You will then be
896queried for where you want the file/directory to be moved. You may select a
897range of lines with the "V" command (visual selection), and then pressing "R".
898
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000899The g:netrw_rename_cmd variable is used to implement renaming. By default its
Bram Moolenaar843ee412004-06-30 16:16:41 +0000900value is:
901
902 ssh HOSTNAME mv
903
Bram Moolenaar269ec652004-07-29 08:43:53 +0000904One may rename a block of files and directories by selecting them with
905the V (|linewise-visual|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000906
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000907
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +0000908HIDING FILES OR DIRECTORIES *g:netrw-a*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000909
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000910Netrw's browsing facility allows one to use the hiding list in one of
911three ways: ignore it, hide files which match, and show only those files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000912which match. The "a" map allows the user to cycle about these three ways.
913
914The g:netrw_list_hide variable holds a comma delimited list of patterns
915(ex. \.obj) which specify the hiding list. (also see |netrw-h|) To
916set the hiding list, use the <c-h> map. As an example, to hide files
917which begin with a ".", one may use the <c-h> map to set the hiding
918list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*' in
919one's <.vimrc>). One may then use the "a" key to show all files,
920hide matching files, or to show only the matching files.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000921
922
Bram Moolenaar83bab712005-08-01 21:58:57 +0000923EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* *netrw-edithide*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000924
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000925The "<ctrl-h>" map brings up a requestor allowing the user to change the
Bram Moolenaar269ec652004-07-29 08:43:53 +0000926file/directory hiding list. The hiding list consists of one or more patterns
927delimited by commas. Files and/or directories satisfying these patterns will
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000928either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000929
930
Bram Moolenaar83bab712005-08-01 21:58:57 +0000931BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000932
Bram Moolenaar269ec652004-07-29 08:43:53 +0000933Normally one enters a file or directory using the <cr>. However, the "o" map
934allows one to open a new window to hold the new directory listing or file. A
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000935horizontal split is used. (for vertical splitting, see |netrw-v|)
936
937Normally, the o key splits the window horizontally with the new window
938and cursor at the top. To change to splitting the window horizontally
939with the new window and cursor at the bottom, have
940
941 let g:netrw_alto = 1
942
943in your <.vimrc>.
944
Bram Moolenaar83bab712005-08-01 21:58:57 +0000945
946PREVIEW WINDOW *netrw-p* *netrw-preview*
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000947
948One may use a preview window (currently only for local browsing) by using
949the "p" key when the cursor is atop the desired filename to be previewed.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000950
951
Bram Moolenaar83bab712005-08-01 21:58:57 +0000952SELECTING SORTING STYLE *netrw-s* *netrw-sort*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000953
954One may select the sorting style by name, time, or (file) size. The
Bram Moolenaar488c6512005-08-11 20:09:58 +0000955"s" map allows one to circulate amongst the three choices; the directory
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000956listing will automatically be refreshed to reflect the selected style.
957
958
Bram Moolenaar83bab712005-08-01 21:58:57 +0000959EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence*
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000960
961When "Sorted by" is name, one may specify priority via the sorting
962sequence (g:netrw_sort_sequence). The sorting sequence typically
963prioritizes the name-listing by suffix, although any pattern will do.
964Patterns are delimited by commas. The default sorting sequence is:
965>
Bram Moolenaar488c6512005-08-11 20:09:58 +0000966 [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000967<
968The lone * is where all filenames not covered by one of the other
969patterns will end up. One may change the sorting sequence by modifying
970the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
971or by using the "S" map.
972
973
Bram Moolenaar83bab712005-08-01 21:58:57 +0000974REVERSING SORTING ORDER *netrw-r* *netrw-reverse*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000975
976One may toggle between normal and reverse sorting order by pressing the
977"r" key.
978
979
Bram Moolenaar83bab712005-08-01 21:58:57 +0000980CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000981
982Every time you change to a new directory (new for the current session),
983netrw will save the directory in a recently-visited directory history
984list (unless g:netrw_dirhistmax is zero; by default, its ten). With the
985"u" map, one can change to an earlier directory (predecessor). To do
986the opposite, see |netrw-U|.
987
988
Bram Moolenaar83bab712005-08-01 21:58:57 +0000989CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000990
991With the "U" map, one can change to a later directory (successor).
992This map is the opposite of the "u" map. (see |netrw-u|) Use the
993q map to list both the bookmarks and history. (see |netrw-q|)
994
995
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000996BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
997
998Normally one enters a file or directory using the <cr>. However, the "v"
999map allows one to open a new window to hold the new directory listing or
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001000file. A vertical split is used. (for horizontal splitting, see |netrw-o|)
1001
1002Normally, the v key splits the window vertically with the new window
1003and cursor at the left. To change to splitting the window vertically
1004with the new window and cursor at the right, have
1005
1006 let g:netrw_altv = 1
1007
1008in your <.vimrc>.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001009
1010
Bram Moolenaar83bab712005-08-01 21:58:57 +00001011CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001012
1013One may "enter" a file with a special handler, thereby firing up a browser or
1014other application, for example, on a file by hitting the "x" key. Presumably
1015one could write handlers that would start OpenOffice programs (oowriter), etc,
1016based on the file's extension coupled with the user's hitting the "x" key atop
1017the file.
1018
1019The Netrw executor applies a user-defined function to a file, based on its
1020extension. Of course, the handler function must exist for it to be called!
1021>
1022 Ex. mypgm.html x ->
1023 NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
1024<
1025See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
1026file with mozilla.
1027
1028
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001029MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001030
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001031By default, g:netrw_keepdir is 1. This setting means that the current
1032directory will not track the browsing directory. However, setting
1033g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
1034currently browsed directory be the current directory.
1035
1036With the default setting for g:netrw_keepdir, in order to make the two
1037directories the same, use the "c" map (just type c). That map will set
1038the current directory to the current browsing directory.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001039
1040
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001041BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001042
Bram Moolenaar572cb562005-08-05 21:35:02 +00001043One may easily "bookmark" a directory by using >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001044
1045 {cnt}b
Bram Moolenaar572cb562005-08-05 21:35:02 +00001046<
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001047Any count may be used. One may use viminfo's "!" option to retain bookmarks
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001048between vim sessions. See |netrw-B| for how to return to a bookmark and
1049|netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001050
1051
1052CHANGING TO A BOOKMARKED DIRECTORY *netrw-B*
1053
1054To change directory back to a bookmarked directory, use
1055
1056 {cnt}B
1057
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001058Any count may be used to reference any of the bookmarks. See |netrw-b|
1059for how to bookmark a directory and |netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001060
1061
Bram Moolenaar83bab712005-08-01 21:58:57 +00001062LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001063
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001064Pressing "q" will list the bookmarked directories and directory traversal
1065history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001066
1067
Bram Moolenaar83bab712005-08-01 21:58:57 +00001068IMPROVING DIRECTORY BROWSING *netrw-listhack*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001069
1070Especially with the remote directory browser, constantly entering the password
1071is tedious.
1072
Bram Moolenaar843ee412004-06-30 16:16:41 +00001073For Linux/Unix systems, I suggest looking into
1074
1075 http://hacks.oreilly.com/pub/h/66
1076
1077It gives a tip for setting up password-less use of ssh and scp, and discusses
1078the associated security issues.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001079
1080
1081==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +000010828. Problems and Fixes *netrw-problems*
1083
1084 (This section is likely to grow as I get feedback)
1085 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00001086 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001087 P1. I use windows 95, and my ftp dumps four blank lines at the
1088 end of every read.
1089
1090 See |netrw-fixup|, and put the following into your
1091 <.vimrc> file:
1092
1093 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001094
Bram Moolenaar488c6512005-08-11 20:09:58 +00001095 *netrw-p2*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001096 P2. I use windows, and my network browsing with ftp doesn't sort by
1097 time or size
1098
1099 Windows' ftp has a minimal support for ls (ie. it doesn't
1100 accept sorting options). It doesn't support the -F which
1101 gives an explanatory character (ABC/ for "ABC is a directory").
1102 Netrw uses dir to get its short and long listings. If you
1103 think your ftp does support a full-up ls, put the following
1104 into your <.vimrc>:
1105
1106 let g:netrw_ftp_list_cmd= "ls -lF"
1107
1108 Alternatively, if you have cygwin on your Windows box, put
1109 into your <.vimrc>:
1110
1111 let g:netrw_cygwin= 1
1112
Bram Moolenaar488c6512005-08-11 20:09:58 +00001113 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001114 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
1115 used ssh! That wasn't what I asked for...
1116
1117 Netrw has two methods for browsing remote directories: ssh
1118 and ftp. Unless you specify ftp specifically, ssh is used.
1119 When it comes time to do download a file (not just a directory
1120 listing), netrw will use the given protocol to do so.
1121
Bram Moolenaar488c6512005-08-11 20:09:58 +00001122 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001123 P4. I would like long listings to be the default.
1124
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001125 let g:netrw_longlist=1
1126
1127 Check out |netrw-browse-var| for more customizations that
1128 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001129
Bram Moolenaar488c6512005-08-11 20:09:58 +00001130 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001131 P5. My times come up oddly in local browsing
1132
1133 Does your system's strftime() accept the "%c" to yield dates
1134 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
1135 and find out what option should be used. Then put it into
1136 your <.vimrc>:
1137 let g:netrw_timefmt= "%X" (where X is the option)
1138
Bram Moolenaar488c6512005-08-11 20:09:58 +00001139 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001140 P6. I want my current directory to track my browsing.
1141 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001142
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001143 let g:netrw_keepdir= 0
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001144
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001145
1146==============================================================================
11479. Debugging *netrw-debug*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001148
1149The <netrw.vim> script is typically available as:
Bram Moolenaar488c6512005-08-11 20:09:58 +00001150>
Bram Moolenaar071d4272004-06-13 20:20:40 +00001151 /usr/local/share/vim/vim6x/plugin/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00001152< -or- >
1153 /usr/local/share/vim/vim7x/plugin/netrw.vim
1154<
Bram Moolenaar071d4272004-06-13 20:20:40 +00001155which is loaded automatically at startup (assuming :set nocp).
1156
1157 1. Get the <Decho.vim> script, available as:
1158
1159 http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
1160 as "Decho, a vimL debugging aid"
1161 or
1162 http://vim.sourceforge.net/scripts/script.php?script_id=120
1163
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001164 and put it into your local plugin directory.
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001165
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001166 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
1167 to put it into your .vim/plugin, too. You may obtain it from:
Bram Moolenaar071d4272004-06-13 20:20:40 +00001168
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001169 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
1170 as "DrC's Utilities"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001171
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001172 3. Edit the <netrw.vim> file by typing:
1173
1174 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00001175 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001176 :wq
Bram Moolenaar071d4272004-06-13 20:20:40 +00001177
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001178 To restore to normal non-debugging behavior, edit <netrw.vim>
1179 by typing
Bram Moolenaar071d4272004-06-13 20:20:40 +00001180
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001181 vim netrw.vim
1182 :DechoOff
1183 :wq
1184
1185 This command, provided by <Decho.vim>, will comment out all
1186 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
1187
1188 4. Then bring up vim and attempt a transfer. A set of messages
Bram Moolenaar071d4272004-06-13 20:20:40 +00001189 should appear concerning the steps that <netrw.vim> took in
1190 attempting to read/write your file over the network. Please
1191 send that information to <netrw.vim>'s maintainer,
1192
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001193 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar071d4272004-06-13 20:20:40 +00001194
1195==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000119610. History *netrw-history*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001197
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00001198 v61: * document upgrade -- netrw variable-based settings all should
1199 have tags. Supports NetrwSettings command.
1200 * several important variables are window-oriented. Netrw has
1201 to transfer these across a window split. See s:BufWinVars()
1202 and s:UseBufWinVars().
Bram Moolenaar488c6512005-08-11 20:09:58 +00001203 v60: * when using the i map to switch between long and short listings,
1204 netrw will now keep cursor on same line
1205 * "Match # of #" now uses status line
1206 * :Explore **/*.c will now work from a non-netrw-browser window
1207 * :Explore **/patterns can now be run in separate browser windows
1208 * active banner (hit <cr> will cause various things to happen)
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001209 v59: * bugfix -- another keepalt work-around installed (for vim6.3)
1210 * "Match # of #" for Explore **/pattern matches
Bram Moolenaar572cb562005-08-05 21:35:02 +00001211 v58: * Explore and relatives can now handle **/somefilepattern (v7)
1212 * Nexplore and Pexplore introduced (v7). shift-down and shift-up
1213 cursor keys will invoke Nexplore and Pexplore, respectively.
1214 * bug fixed with o and v
1215 * autochdir only worked around for vim when it has been
1216 compiled with either |+netbeans_intg| or |+sun_workshop|
1217 * Under Windows, all directories and files were being preceded
1218 with a "/" when local browsing. Fixed.
1219 * When: syntax highlighting is off, laststatus=2, and remote
1220 browsing is used, sometimes the laststatus highlighting
1221 bleeds into the entire display. Work around - do an extra
1222 redraw in that case.
1223 * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers,
1224 netrw didn't change the directory when it should've
1225 * Bugfix: D and R commands work again
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001226 v57: * Explore and relatives can now handle RO files
1227 * reverse sort restored with vim7's sort command
1228 * g:netrw_keepdir now being used to keep the current directory
1229 unchanged as intended (sense change)
1230 * vim 6.3 still supported
Bram Moolenaar83bab712005-08-01 21:58:57 +00001231 v56: * LocalBrowse now saves autochdir setting, unsets it, and
1232 restores it before returning.
1233 * using vim's rename() instead of system + local_rename variable
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001234 * avoids changing directory when g:netrw_keepdir is false
Bram Moolenaar83bab712005-08-01 21:58:57 +00001235 v55: * -bar used with :Explore :Sexplore etc to allow multiple
1236 commands to be separated by |s
1237 * browser listings now use the "nowrap" option
1238 * browser: some unuseful error messages now suppressed
1239 v54: * For backwards compatibility, Explore and Sexplore have been
1240 implemented. In addition, Hexplore and Vexplore commands
1241 are available, too.
1242 * <amatch> used instead of <afile> in the transparency
1243 support (BufReadCmd, FileReadCmd, FileWriteCmd)
1244 * ***netrw*** prepended to various error messages netrw may emit
1245 * g:netrw_port used instead of b:netrw_port for scp
1246 * any leading [:#] is removed from port numbers
1247 v53: * backslashes as well as slashes placed in various patterns
1248 (ex. g:netrw_sort_sequence) to better support Windows
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001249 v52: * nonumber'ing now set for browsing buffers
1250 * when the hiding list hid all files, error messages ensued. Fixed
1251 * when browsing, swf is set, but directory is not set, when netrw
1252 was attempting to restore options, vim wanted to save a swapfile
1253 to a local directory using an url-style path. Fixed
1254 v51: * cygwin detection now automated (using windows and &shell is bash)
1255 * customizable browser "file" rejection patterns
1256 * directory history
1257 * :[range]w url now supported (ie. netrw has a FileWriteCmd event)
1258 * error messages have a "Press <cr> to continue" to allow them
1259 to be seen
1260 * directory browser displays no longer bother the swapfile
1261 * u/U commands to go up and down the history stack
1262 * history stack may be saved with viminfo with its "!" option
1263 * bugfixes associated with unwanted [No Files] entries
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001264 v50: * directories now displayed using buftype=nofile; should keep the
1265 directory names as-is
1266 * attempts to remove empty "[No File]" buffers leftover
1267 from :file ..name.. commands
1268 * bugfix: a "caps-lock" editing difficulty left in v49 was fixed
1269 * syntax highlighting for "Showing:" the hiding list included
1270 * bookmarks can now be retained if "!" is in the viminfo option
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001271 v49: * will use ftp for http://.../ browsing v48:
1272 * One may use ftp to do remote host file browsing
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001273 * (windows and !cygwin) remote browsing with ftp can now use
1274 the "dir" command internally to provide listings
1275 * g:netrw_keepdir now allows one to keep the initial current
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001276 directory as the current directory (normally the local file
1277 browser makes the currently viewed directory the current
1278 directory)
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001279 * g:netrw_alto and g:netrw_altv now support alternate placement
1280 of windows started with o or v
1281 * Nread ? and Nwrite ? now uses echomsg (instead of echo) so
1282 :messages can repeat showing the help
1283 * bugfix: avoids problems with partial matches of directory names
1284 to prior buffers with longer names
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001285 * one can suppress error messages with g:netrw_quiet ctrl-h used
1286 * instead of <Leader>h for editing hiding list one may edit the
1287 * sorting sequence with the S map now allows confirmation of
1288 * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
1289 * special file viewing with:
1290 (windows) rundll32 url.dll (gnome) gnome-open (kde)
1291 kfmclient If none of these are on the executable path, then
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001292 NetrwFileHandlers.vim is used.
1293 * directory bookmarking during both local and remote browsing
1294 implemented
1295 * one may view all, use the hiding list to suppress, or use the
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001296 hiding list to show-only remote and local file/directory
1297 listings
1298 * improved unusual file and directory name handling preview
1299 * window support
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001300 v47: * now handles local directory browsing.
1301 v46: * now handles remote directory browsing
1302 * g:netrw_silent (if 1) will cause all transfers to be silent
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001303 v45: * made the [user@]hostname:path form a bit more restrictive to
1304 better handle errors in using protocols (e.g. scp:usr@host:file
1305 was being recognized as an rcp request) v44: * changed from
1306 "rsync -a" to just "rsync"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001307 * somehow an editing error messed up the test to recognize
1308 use of the fetch method for NetRead.
1309 * more debugging statements included
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001310 v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
1311 "Network Reference" (|netrw-ref|)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001312 * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
1313 * removed superfluous NetRestorePosn() calls
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001314 v42: * now does BufReadPre and BufReadPost events on file:///* and
1315 file://localhost/* v41: * installed file:///* and
1316 file://localhost/* handling v40: * prevents redraw when a
1317 protocol error occurs so that the user may see it v39: * sftp
1318 support v38: * Now uses NetRestorePosn() calls with
1319 Nread/Nwrite commands
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001320 * Temporary files now removed via bwipe! instead of bwipe
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001321 (thanks to Dave Roberts) v37: * Claar's modifications which
1322 test if ftp is successful, otherwise give an error message
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001323 * After a read, the alternate file was pointing to the temp file.
1324 The temp file buffer is now wiped out.
1325 * removed silent from transfer methods so user can see what's
1326 happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00001327
1328
1329==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000133011. Credits *netrw-credits*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001331
1332 Vim editor by Bram Moolenaar (Thanks, Bram!)
1333 dav support by C Campbell
1334 fetch support by Bram Moolenaar and C Campbell
1335 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM
1336 http support by Bram Moolenaar <bram@moolenaar.net>
1337 rcp
1338 rsync support by C Campbell (suggested by Erik Warendorph)
1339 scp support by raf <raf@comdyn.com.au>
1340 sftp support by C Campbell
1341
1342 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
1343
1344 Jérôme Augé -- also using new buffer method with ftp+.netrc
1345 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, fetch,...
1346 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
1347 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
1348 variables, rsync etc)
1349 Doug Claar -- modifications to test for success with ftp operation
1350
1351==============================================================================
Bram Moolenaar83bab712005-08-01 21:58:57 +00001352 vim:tw=78:ts=8:ft=help:norl:fdm=marker