blob: 435d51b009114f9de73c2b0033d2a817352521b2 [file] [log] [blame]
Bram Moolenaar488c6512005-08-11 20:09:58 +00001*pi_netrw.txt* For Vim version 7.0. Last change: Aug 09, 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
83 Controlling External Applications
84
Bram Moolenaar69a7cb42004-06-20 12:51:53 +000085 Protocol Variable Default Value
86 -------- ---------------- -------------
87 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"
Bram Moolenaar071d4272004-06-13 20:20:40 +000095 sftp: g:netrw_sftp_cmd = "sftp"
96
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 Moolenaar071d4272004-06-13 20:20:40 +0000139 b:netrw_lastfile last file Network-read/written retained on
140 a per-buffer basis (supports plain :Nw )
141 s:netrw_line during Nw/NetWrite, holds current line number
142 s:netrw_col during Nw/NetWrite, holds current column number
143 s:netrw_line and s:netrw_col are used to
144 restore the cursor position on writes
145 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 g:netrw_ftpmode ="binary" (default)
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000149 ="ascii"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150 g:netrw_uid (ftp) user-id, retained on a per-session basis
151 g:netrw_passwd (ftp) password, retained on a per-session basis
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000152 g:netrw_win95ftp =1 if using Win95, will remove four trailing blank
153 lines that o/s's ftp "provides" on transfers
154 =0 force normal ftp behavior (no trailing line
155 removal)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000156 g:netrw_cygwin =1 assume scp under windows is from cygwin
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000157 Also permits network browsing to use
158 ls with time and size sorting
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159 (default if windows)
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000160 =0 assume Windows' scp accepts windows-style paths
161 Network browsing uses dir instead of ls
162 This option is ignored if you're using unix
163 g:netrw_use_nt_rcp=0 don't use the rcp of WinNT, Win2000 and WinXP
164 =1 use WinNT's rcp in binary mode (default)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000165
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000166 PATHS *netrw-path*
167
168 Paths to files are generally user-directory relative for most protocols.
169 It is possible that some protocol will make paths relative to some
170 associated directory, however.
171
172 example: vim scp://user@host/somefile
173 example: vim scp://user@host/subdir1/subdir2/somefile
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000174
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000175 where "somefile" is the "user"'s home directory. If you wish to get a
176 file using root-relative paths, use the full path:
177
178 example: vim scp://user@host//somefile
179 example: vim scp://user@host//subdir1/subdir2/somefile
180
Bram Moolenaar071d4272004-06-13 20:20:40 +0000181
182==============================================================================
1832. Network-Oriented File Transfer *netrw-xfer*
184
185Network-oriented file transfer under Vim is implemented by a VimL-based script
186(<netrw.vim>) using plugin techniques. It currently supports both reading
187and writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
188dav/cadaver, rsync, or sftp.
189
190http is currently supported read-only via use of wget or fetch.
191
192<netrw.vim> is a standard plugin which acts as glue between Vim and the
193various file transfer programs. It uses autocommand events (BufReadCmd,
194FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
195
196 ex. vim ftp://hostname/path/to/file
197<
198The characters preceding the colon specify the protocol to use;
199in the example, its ftp. The <netrw.vim> script then formulates
200a command or a series of commands (typically ftp) which it issues
201to an external program (ftp, scp, etc) which does the actual file
202transfer/protocol. Files are read from/written to a temporary file
203(under Unix/Linux, /tmp/...) which the <netrw.vim> script will
204clean up.
205
206One may modify any protocol's implementing external application
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000207by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000208which is defaulted to "scp -q").
209
210Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000211Unfortunately, some implementations are noisy (ie., add junk to the end
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212of the file). Thus, concerned users may decide to write a NetReadFixup()
213function that will clean up after reading with their ftp. Some Unix systems
Bram Moolenaar83bab712005-08-01 21:58:57 +0000214(ie., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215but is not noisy and more convenient, actually, for <netrw.vim> to use.
216Consequently, if "fetch" is executable, it will be used to do reads for
217ftp://... (and http://...) . See |netrw-var| for more about this.
218
219For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000220transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221>
222 vim rcp://[user@]machine/path
223 vim scp://[user@]machine/path
224<
225If your ftp supports <.netrc>, then it too can be just as transparently used
226if the needed triad of machine name, user id, and password are present in
227that file. Your ftp must be able to use the <.netrc> file on its own, however.
228>
229 vim ftp://[user@]machine[[:#]portnumber]/path
230<
231However, ftp will often need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000232The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233the actually-typed-in password. Netrw will retain the userid and password
234for subsequent read/writes from the most recent transfer so subsequent
235transfers (read/write) to or from that machine will take place without
236additional prompting.
237
238 *netrw-urls*
239 +=================================+============================+============+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000240 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000241 +=================================+============================+============+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000242 | DAV: | | |
243 | dav://host/path | | cadaver |
244 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000245 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000246 | FETCH: | | |
247 | fetch://[user@]host/path | | |
248 | fetch://[user@]host:http/path | Not Available | fetch |
249 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000250 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000251 | FILE: | | |
252 | file:///* | file:///* | |
253 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000254 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000255 | FTP: (*3) | (*3) | |
256 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
257 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
258 | :Nread host path | :Nwrite host path | ftp+.netrc |
259 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000260 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000261 | HTTP: wget is executable: (*4) | | |
262 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000264 | HTTP: fetch is executable (*4) | | |
265 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000267 | RCP: | | |
268 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000269 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000270 | RSYNC: | | |
271 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
272 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
273 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000274 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000275 | SCP: | | |
276 | scp://[user@]host/path | scp://[user@]host/path | scp |
277 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000278 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000279 | SFTP: | | |
280 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
281 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000282 +=================================+============================+============+
283
284 (*1) For an absolute path use scp://machine//path.
285
286 (*2) if <.netrc> is present, it is assumed that it will
287 work with your ftp client. Otherwise the script will
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000288 prompt for user-id and pasword.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000289
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000290 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000291 if a different port is needed than the standard ftp port
292
293 (*4) for http:..., if wget is available it will be used. Otherwise,
294 if fetch is available it will be used.
295
296Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
297
298
299NETRC *netrw-netrc*
300
301The typical syntax for lines in a <.netrc> file is given as shown below.
302Ftp under Unix usually support <.netrc>; Windows' ftp usually doesn't.
303>
304 machine {full machine name} login {user-id} password "{password}"
305 default login {user-id} password "{password}"
306
307Your ftp client must handle the use of <.netrc> on its own, but if the
308<.netrc> file exists, an ftp transfer will not ask for the user-id or
309password.
310
311 Note:
312 Since this file contains passwords, make very sure nobody else can
313 read this file! Most programs will refuse to use a .netrc that is
314 readable for others. Don't forget that the system administrator can
315 still read the file!
316
317
318PASSWORD *netrw-passwd*
319
320The script attempts to get passwords for ftp invisibly using |inputsecret()|,
321a built-in Vim function. See |netrw-uidpass| for how to change the password
322after one has set it.
323
324Unfortunately there doesn't appear to be a way for netrw to feed a password
325to scp. Thus every transfer via scp will require re-entry of the password.
326
327
328==============================================================================
3293. Activation *netrw-activate*
330
331Network-oriented file transfers are available by default whenever
332|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
333system's vim-plugin directory and is sourced automatically whenever you
334bring up vim.
335
336
337==============================================================================
3384. Transparent File Transfer *netrw-transparent*
339
340Transparent file transfers occur whenever a regular file read or write
341(invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
342Thus one may use files across networks as if they were local. >
343
344 vim ftp://[user@]machine/path
345 ...
346 :wq
347
348
349==============================================================================
3505. Ex Commands *netrw-ex*
351
352The usual read/write commands are supported. There are also a couple of
353additional commands available.
354
355:[range]Nw Write the specified lines to the current
356 file as specified in b:netrw_lastfile.
357
358:[range]Nw {netfile} [{netfile}]...
359 Write the specified lines to the {netfile}.
360
361:Nread
362 Read the specified lines into the current
363 buffer from the file specified in
364 b:netrw_lastfile.
365
366:Nread {netfile} {netfile}...
367 Read the {netfile} after the current line.
368
369 *netrw-uidpass*
370:call NetUserPass()
371 If b:netrw_uid and b:netrw_passwd don't exist,
372 this function query the user for them.
373
374:call NetUserPass("userid")
375 This call will set the b:netrw_uid and, if
376 the password doesn't exist, will query the user for it.
377
378:call NetUserPass("userid","passwd")
379 This call will set both the b:netrw_uid and b:netrw_passwd.
380 The user-id and password are used by ftp transfers. One may
381 effectively remove the user-id and password by using ""
382 strings.
383
384
385==============================================================================
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00003866. Variables and Options *netrw-options* *netrw-var*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000387
388The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
389behavior. These variables typically may be set in the user's <.vimrc> file:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000390>
391 -------------
392 Netrw Options
393 -------------
394 Option Meaning
395 -------------- -----------------------------------------------
396<
397 b:netrw_col Holds current cursor position (during NetWrite)
398 g:netrw_cygwin =1 assume scp under windows is from cygwin
399 (default/windows)
400 =0 assume scp under windows accepts windows
401 style paths (default/else)
402 g:netrw_ftp =0 use default ftp (uid password)
403 g:netrw_ftpmode ="binary" (default)
404 ="ascii" (your choice)
405 g:netrw_ignorenetrc =1 (default)
406 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000407 want it used, then set this variable. Its
408 mere existence is enough to cause <.netrc>
409 to be ignored.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000410 b:netrw_lastfile Holds latest method/machine/path.
411 b:netrw_line Holds current line number (during NetWrite)
412 g:netrw_passwd Holds current password for ftp.
413 g:netrw_silent =0 transfers done normally
414 =1 transfers done silently
415 g:netrw_uid Holds current user-id for ftp.
416 =1 use alternate ftp (user uid password)
417 (see |netrw-options|)
418 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
419 =1 use WinNT/2K/XP's rcp, binary mode
420 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
421 =1 use default method to do ftp >
422 -----------------------------------------------------------------------
423<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424The script will also make use of the following variables internally, albeit
425temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000426>
427 -------------------
428 Temporary Variables
429 -------------------
430 Variable Meaning
431 -------- ------------------------------------
432<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000433 g:netrw_method Index indicating rcp/ftp+.netrc/ftp
434 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000435 g:netrw_fname Holds filename being accessed >
436 ------------------------------------------------------------
437<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000439
440Netrw supports a number of protocols. These protocols are invoked using the
441variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000442>
443 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000444 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000446 Option Type Setting Meaning
447 --------- -------- -------------- ---------------------------
448<
449 netrw_ftp variable =doesn't exist userid set by "user userid"
450 =0 userid set by "user userid"
451 =1 userid set by "userid"
452 NetReadFixup function =doesn't exist no change
453 =exists Allows user to have files
454 read via ftp automatically
455 transformed however they wish
456 by NetReadFixup()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457 g:netrw_dav_cmd variable ="cadaver"
458 g:netrw_fetch_cmd variable ="fetch -o"
459 g:netrw_ftp_cmd variable ="ftp"
460 g:netrw_http_cmd variable ="fetch -o" else if fetch is executable
461 g:netrw_http_cmd variable ="wget -O" if wget is executable
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000462 g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000463 g:netrw_rcp_cmd variable ="rcp"
464 g:netrw_rsync_cmd variable ="rsync -a"
465 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000466 g:netrw_sftp_cmd variable ="sftp" >
467 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000468<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000469 *netrw-ftp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000470The first two options both help with certain ftp's that give trouble otherwise.
471In order to best understand how to use these options if ftp is giving you
472troubles, a bit of discussion follows on how netrw does ftp reads.
473
474The g:netrw_..._cmd variables specify the external program to use handle
475the associated protocol (rcp, ftp, etc), plus any options.
476
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000477The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
478whatever the current request is for a hostname.
479
480For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000481temporary file:
482>
483 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
484 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000485<
486 open machine [port] open machine [port]
487 user userid password userid password
488 [g:netrw_ftpmode] password
489 get filename tempfile [g:netrw_ftpmode]
490 get filename tempfile >
491 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000492<
493Netrw then executes the lines above by use of a filter:
494>
495 :%! {g:netrw_ftp_cmd} -i [-n]
496<
497
498where
499 g:netrw_ftp_cmd is usually "ftp",
500 -i tells ftp not to be interactive
501 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
502
503If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000504userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000505The temporary file is then read into the main editing session window that
506requested it and the temporary file deleted.
507
508If your ftp doesn't accept the "user" command and immediately just demands
509a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
510
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000511 *netrw-cadaver*
512To handle the SSL certificate dialog for untrusted servers, one may pull
513down the certificate and place it into /usr/ssl/cert.pem. This operation
514renders the server treatment as "trusted".
515
Bram Moolenaar83bab712005-08-01 21:58:57 +0000516 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000517If your ftp for whatever reason generates unwanted lines (such as AUTH
518messages) you may write a NetReadFixup(tmpfile) function:
519>
520 function! NetReadFixup(method,line1,line2)
521 " a:line1: first new line in current file
522 " a:line2: last new line in current file
523 if a:method == 1 "rcp
524 elseif a:method == 2 "ftp + <.netrc>
525 elseif a:method == 3 "ftp + machine,uid,password,filename
526 elseif a:method == 4 "scp
527 elseif a:method == 5 "http/wget
528 elseif a:method == 6 "dav/cadaver
529 elseif a:method == 7 "rsync
530 elseif a:method == 8 "fetch
531 elseif a:method == 9 "sftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000532 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000533 endif
534 endfunction
535>
536The NetReadFixup() function will be called if it exists and thus allows
537you to customize your reading process. As a further example, <netrw.vim>
538contains just such a function to handle Windows 95 ftp. For whatever
539reason, Windows 95's ftp dumps four blank lines at the end of a transfer,
540and so it is desirable to automate their removal. Here's some code taken
541from <netrw.vim> itself:
542>
543 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000544 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000545 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000546 let fourblanklines= line2 - 3
547 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548 endif
549 endfunction
550 endif
551>
552
553==============================================================================
Bram Moolenaard4755bb2004-09-02 19:12:26 +00005547. Directory Browser *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000555
556MAPS *netrw-maps*
557 ?................Help.......................................|netrw-help|
558 <cr>.............Browsing...................................|netrw-cr|
559 <del>............Deleting Files or Directories..............|netrw-delete|
560 -................Going Up...................................|netrw--|
561 a................Hiding Files or Directories................|netrw-a|
562 b................Bookmarking a Directory....................|netrw-b|
563 B................Changing to a Bookmarked Directory.........|netrw-B|
564 c................Make Browsing Directory The Current Dir....|netrw-c|
565 d................Make A New Directory.......................|netrw-d|
566 D................Deleting Files or Directories..............|netrw-D|
567 <c-h>............Edit File/Directory Hiding List............|netrw-h|
568 i................Long Listing...............................|netrw-i|
569 <c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
570 o................Browsing with a Horizontal Split...........|netrw-o|
571 p................Preview Window.............................|netrw-p|
572 q................Listing Bookmarks and History..............|netrw-q|
573 r................Reversing Sorting Order....................|netrw-r|
574 R................Renaming Files or Directories..............|netrw-R|
575 s................Selecting Sorting Style....................|netrw-s|
576 S................Editing the Sorting Sequence...............|netrw-S|
577 u................Changing to a Predecessor Directory........|netrw-u|
578 U................Changing to a Successor Directory..........|netrw-U|
579 v................Browsing with a Vertical Split.............|netrw-v|
580 x................Customizing Browsing.......................|netrw-x|
581
582 COMMANDS *netrw-explore-cmds*
Bram Moolenaar488c6512005-08-11 20:09:58 +0000583 :Explore[!] [dir] Explore directory of current file........|netrw-explore|
584 :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore|
585 :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore|
586 :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
587 :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
588 :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
Bram Moolenaar269ec652004-07-29 08:43:53 +0000589
590QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000591>
Bram Moolenaar8299df92004-07-10 09:47:34 +0000592 ------- -----------
Bram Moolenaar843ee412004-06-30 16:16:41 +0000593 Command Explanation
594 ------- -----------
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000595< ? Causes Netrw to issue help
Bram Moolenaar843ee412004-06-30 16:16:41 +0000596 <cr> Netrw will enter the directory or read the file
597 <del> Netrw will attempt to remove the file/directory
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000598 d Make a directory
Bram Moolenaar843ee412004-06-30 16:16:41 +0000599 D Netrw will attempt to remove the file(s)/directory(ies)
600 R Netrw will attempt to rename the file(s)/directory(ies)
601 - Makes Netrw go up one directory
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000602 a Toggles between normal display,
603 hiding (suppress display of files matching g:netrw_list_hide)
604 showing (display only files which match g:netrw_list_hide)
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000605 c Make current browsing directory the current directory
606 <c-h> Edit file hiding list
Bram Moolenaar8299df92004-07-10 09:47:34 +0000607 i Toggles between long and short listing
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000608 <c-l> Causes Netrw to refresh the directory listing
Bram Moolenaar843ee412004-06-30 16:16:41 +0000609 o Enter the file/directory under the cursor in a new browser
610 window. A horizontal split is used.
Bram Moolenaar572cb562005-08-05 21:35:02 +0000611 p Preview the file
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000612 r Reverse sorting order
613 s Select sorting style: by name, time, or file size
Bram Moolenaar843ee412004-06-30 16:16:41 +0000614 v Enter the file/directory under the cursor in a new browser
615 window. A vertical split is used.
616 x Apply a function to a file.
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000617
Bram Moolenaar269ec652004-07-29 08:43:53 +0000618NETRW BROWSER VARIABLES *netrw-browse-var*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000619>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000620 --- -----------
621 Var Explanation
622 --- -----------
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000623< g:netrw_alto change from above splitting to
624 below splitting by setting this
625 variable (see |netrw-o|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000626 default: =0
627
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000628 g:netrw_altv change from left splitting to
629 right splitting by setting this
630 variable (see |netrw-v|)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000631 default: =0
632
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000633 g:netrw_ftp_browse_reject ftp can produce a number of errors
634 and warnings that can show up as
635 "directories" and "files" in the
636 listing. This pattern is used to
Bram Moolenaar83bab712005-08-01 21:58:57 +0000637 remove such embedded messages. By
638 default its value is:
639 '^total\s\+\d\+$\|
640 ^Trying\s\+\d\+.*$\|
641 ^KERBEROS_V\d rejected\|
642 ^Security extensions not\|
643 No such file\|
644 : connect to address [0-9a-fA-F:]*
645 : No route to host$'
646
647 g:netrw_ssh_browse_reject ssh can sometimes produce unwanted
648 lines/messages/banners/and whatnot
649 that one doesn't want masquerading
650 as "directories" and "files". Use
651 this pattern to remove such embedded
652 messages. By default its value is:
653 '^total\s\+\d\+$'
654
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000655 g:netrw_keepdir =1 (default) keep current directory
656 immune from the browsing directory.
657 =0 keep the current directory the
658 same as the browsing directory.
659 The browsing directory is contained in
660 b:netrw_curdir
Bram Moolenaar83bab712005-08-01 21:58:57 +0000661
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000662 g:netrw_list_cmd command for listing remote directories
Bram Moolenaar83bab712005-08-01 21:58:57 +0000663 default: (if ssh is executable)
664 "ssh HOSTNAME ls -FLa"
665
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000666 g:netrw_longlist if =1, then long listing will be default
Bram Moolenaar83bab712005-08-01 21:58:57 +0000667
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000668 g:netrw_ftp_list_cmd options for passing along to ftp for
669 directory listing. Defaults:
670 unix or g:netrw_cygwin set: : "ls -lF"
671 otherwise "dir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000672
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000673 g:netrw_list_hide comma separated list of patterns for
674 hiding files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000675 default: ""
676
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000677 g:netrw_local_mkdir command for making a local directory
Bram Moolenaar83bab712005-08-01 21:58:57 +0000678 default: "ssh HOSTNAME mkdir"
679
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000680 g:netrw_local_rmdir remove directory command (rmdir)
Bram Moolenaar83bab712005-08-01 21:58:57 +0000681 default: "rmdir"
682
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +0000683 g:netrw_maxfilenamelen =32 by default, selected so as to make
684 long listings fit on 80 column displays.
685 If your screen is wider, and you have
686 file/directory names longer than 32 bytes,
687 you may set this option to keep listings
688 columnar.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000689
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000690 g:netrw_mkdir_cmd command for making a remote directory
Bram Moolenaar83bab712005-08-01 21:58:57 +0000691 default: "ssh HOSTNAME mkdir"
692
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000693 g:netrw_rm_cmd command for removing files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000694 default: "ssh HOSTNAME rm"
695
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000696 g:netrw_rmdir_cmd command for removing directories
Bram Moolenaar83bab712005-08-01 21:58:57 +0000697 default: "ssh HOSTNAME rmdir"
698
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000699 g:netrw_rmf_cmd command for removing softlinks
Bram Moolenaar83bab712005-08-01 21:58:57 +0000700 default: "ssh HOSTNAME rm -f"
701
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000702 g:netrw_hide if true, the hiding list is used
Bram Moolenaar83bab712005-08-01 21:58:57 +0000703 default: =0
704
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000705 g:netrw_sort_by sort by "name", "time", or "size"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000706 default: "name"
707
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000708 g:netrw_sort_direction sorting direction: "normal" or "reverse"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000709 default: "normal"
710
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000711 g:netrw_sort_sequence when sorting by name, first sort by the
712 comma-separated pattern sequence
Bram Moolenaar83bab712005-08-01 21:58:57 +0000713 default: '[\/]$,*,\.bak$,\.o$,\.h$,
714 \.info$,\.swp$,\.obj$'
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000715
Bram Moolenaar83bab712005-08-01 21:58:57 +0000716 g:netrw_timefmt specify format string to strftime() (%c)
717 default: "%c"
718
719 g:netrw_winsize specify initial size of new o/v windows
720 default: ""
721
722INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000723
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000724Netrw supports the browsing of directories on the local system and on remote
725hosts, including generating listing directories, entering directories, editing
726files therein, deleting files/directories, making new directories, and moving
727(renaming) files and directories. The Netrw browser generally implements the
728previous explorer maps and commands for remote directories, although details
729(such as pertinent global variable names) necessarily differ.
730
731The Netrw remote file and directory browser handles two protocols: ssh and
732ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
733in its remote browsing. Any other protocol will be used for file transfers,
734but otherwise the ssh protocol will be used to do remote directory browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000735
Bram Moolenaar843ee412004-06-30 16:16:41 +0000736To enter the netrw directory browser, simply attempt to read a "file" with a
737trailing slash and it will be interpreted as a request to list a directory:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000738
739 vim [protocol]://[user@]hostname/path/
740
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000741If you'd like to avoid entering the password in for directory listings, scp,
742ssh interaction, etc, see |netrw-list-hack|.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000743
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000744 *netrw-explore* *netrw-pexplore*
745 *netrw-hexplore* *netrw-sexplore*
746DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000747
Bram Moolenaar488c6512005-08-11 20:09:58 +0000748 :Explore[!] [dir]... Explore directory of current file *:Explore*
749 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
750 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
751 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000752
Bram Moolenaar488c6512005-08-11 20:09:58 +0000753 Used with :Explore **/pattern :
754 :Nexplore............. go to next matching file *:Nexplore*
755 :Pexplore............. go to previous matching file *:Pexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000756
Bram Moolenaar488c6512005-08-11 20:09:58 +0000757:Explore will open the local-directory browser on the current file's
758 directory (or on directory [dir] if specified). The window will be
759 split only if the file has been modified, otherwise the browsing
760 window will take over that window. Normally the splitting is taken
761 horizontally.
762:Explore! is like :Explore, but will use vertical splitting.
763:Sexplore will always split the window before invoking the local-directory
764 browser. As with Explore, the splitting is normally done
765 horizontally.
766:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
767:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
768:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
769:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
770:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000771
Bram Moolenaar488c6512005-08-11 20:09:58 +0000772By default, these commands use the current file's directory. However, one
773may explicitly provide a directory (path) to use.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000774
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000775(Following needs v7.0 or later) *netrw-starstar*
776When Explore, Sexplore, Hexplore, or Vexplore are used like
777>
778 :Explore **/filename_pattern
779<
780netrw will attempt to find a (sub)directory which matches the filename
781pattern. Internally, it produces a list of files which match the pattern
782and their paths; to that extent it resembles the Unix operation:
783>
784 find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null
785<
786The directory display is updated to show the subdirectory containing a
787matching file. One may then proceed to the next (or previous) matching files'
788directories by using Nexplore or Pexplore, respectively. If your console or
789gui produces recognizable shift-up or shift-down sequences, then you'll likely
790find the following mappings convenient:
Bram Moolenaar572cb562005-08-05 21:35:02 +0000791
792 <s-down> == Nexplore, and
793 <s-up> == Pexplore.
794
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000795As an example, consider
796>
Bram Moolenaar572cb562005-08-05 21:35:02 +0000797 :Explore **/*.c
798 :Nexplore
799 :Nexplore
800 :Pexplore
801<
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000802The status line will show, on the right hand side of the status line, a
803message like "Match 3 of 20".
804
Bram Moolenaar83bab712005-08-01 21:58:57 +0000805
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000806REFRESHING THE LISTING *netrw-ctrl-l*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000807
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000808To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
809hit the <cr> when atop the ./ directory entry in the listing. One may also
810refresh a local directory by using ":e .".
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000811
812
813GOING UP *netrw--*
814
815To go up a directory, press - or his the <cr> when atop the ../ directory
816entry in the listing.
817
818Netrw will modify the command in *g:netrw_list_cmd* to perform the directory
Bram Moolenaar843ee412004-06-30 16:16:41 +0000819listing operation. By default the command is:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000820
Bram Moolenaar843ee412004-06-30 16:16:41 +0000821 ssh HOSTNAME ls -FLa
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000822
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000823where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
824read. Naturally, the user may override this command with whatever is
825preferred. The NetList function which implements remote directory browsing
826expects that directories will be flagged by a trailing slash.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000827
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000828
Bram Moolenaar8299df92004-07-10 09:47:34 +0000829BROWSING *netrw-cr*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000830
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000831Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000832Hitting the <cr> (the return key) will select the file or directory.
833Directories will themselves be listed, and files will be opened using the
834protocol given in the original read request.
835
Bram Moolenaar83bab712005-08-01 21:58:57 +0000836
Bram Moolenaar8299df92004-07-10 09:47:34 +0000837LONG VS SHORT LISTING *netrw-i*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000838
Bram Moolenaar8299df92004-07-10 09:47:34 +0000839The short listing format gives just the files' and directories' names.
840The long listing is either based on the "ls" command via ssh for remote
841directories or displays the filename, file size (in bytes), and the
842time and date of last modification for local directories.
843
844
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000845MAKING A NEW DIRECTORY *netrw-d*
Bram Moolenaar8299df92004-07-10 09:47:34 +0000846
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000847With the "d" map one may make a new directory either remotely (which
Bram Moolenaar8299df92004-07-10 09:47:34 +0000848depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
849the global variable g:netrw_local_mkdir). Netrw will issue a request for the
850new directory's name. A bare <CR> at that point will abort the making of the
851directory. Attempts to make a local directory that already exists (as either
852a file or a directory) will be detected, reported on, and ignored.
853
Bram Moolenaar83bab712005-08-01 21:58:57 +0000854
Bram Moolenaar269ec652004-07-29 08:43:53 +0000855DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000856
857Deleting/removing files and directories involves moving the cursor to the
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000858file/directory to be deleted and pressing "D". Directories must be empty first
859before they can be successfully removed. If the directory is a softlink to a
860directory, then netrw will make two requests to remove the directory before
861succeeding. Netrw will ask for confirmation before doing the removal(s).
862You may select a range of lines with the "V" command (visual selection),
863and then pressing "D".
Bram Moolenaar843ee412004-06-30 16:16:41 +0000864
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000865 *g:netrw_rm_cmd*
866The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
867to control the attempts to remove files and directories. The g:netrw_rm_cmd
868is used with files, and its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000869
870 g:netrw_rm_cmd: ssh HOSTNAME rm
871
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000872 *g:netrw_rmdir_cmd*
873The g:netrw_rmdir_cmd variable is used to support the removal of directories.
874Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000875
876 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
877
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000878 *g:netrw_rmf_cmd*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000879If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000880to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +0000881
882 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
883
Bram Moolenaar843ee412004-06-30 16:16:41 +0000884
Bram Moolenaar8299df92004-07-10 09:47:34 +0000885RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000886
887Renaming/moving files and directories involves moving the cursor to the
888file/directory to be moved (renamed) and pressing "R". You will then be
889queried for where you want the file/directory to be moved. You may select a
890range of lines with the "V" command (visual selection), and then pressing "R".
891
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000892The g:netrw_rename_cmd variable is used to implement renaming. By default its
Bram Moolenaar843ee412004-06-30 16:16:41 +0000893value is:
894
895 ssh HOSTNAME mv
896
Bram Moolenaar269ec652004-07-29 08:43:53 +0000897One may rename a block of files and directories by selecting them with
898the V (|linewise-visual|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000899
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000900
Bram Moolenaar83bab712005-08-01 21:58:57 +0000901HIDING FILES OR DIRECTORIES *g:netrw-a* *g:netrw_list_hide*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000902
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000903Netrw's browsing facility allows one to use the hiding list in one of
904three ways: ignore it, hide files which match, and show only those files
Bram Moolenaar83bab712005-08-01 21:58:57 +0000905which match. The "a" map allows the user to cycle about these three ways.
906
907The g:netrw_list_hide variable holds a comma delimited list of patterns
908(ex. \.obj) which specify the hiding list. (also see |netrw-h|) To
909set the hiding list, use the <c-h> map. As an example, to hide files
910which begin with a ".", one may use the <c-h> map to set the hiding
911list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*' in
912one's <.vimrc>). One may then use the "a" key to show all files,
913hide matching files, or to show only the matching files.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000914
915
Bram Moolenaar83bab712005-08-01 21:58:57 +0000916EDIT FILE OR DIRECTORY HIDING LIST *netrw-h* *netrw-edithide*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000917
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000918The "<ctrl-h>" map brings up a requestor allowing the user to change the
Bram Moolenaar269ec652004-07-29 08:43:53 +0000919file/directory hiding list. The hiding list consists of one or more patterns
920delimited by commas. Files and/or directories satisfying these patterns will
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000921either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000922
923
Bram Moolenaar83bab712005-08-01 21:58:57 +0000924BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000925
Bram Moolenaar269ec652004-07-29 08:43:53 +0000926Normally one enters a file or directory using the <cr>. However, the "o" map
927allows one to open a new window to hold the new directory listing or file. A
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000928horizontal split is used. (for vertical splitting, see |netrw-v|)
929
930Normally, the o key splits the window horizontally with the new window
931and cursor at the top. To change to splitting the window horizontally
932with the new window and cursor at the bottom, have
933
934 let g:netrw_alto = 1
935
936in your <.vimrc>.
937
Bram Moolenaar83bab712005-08-01 21:58:57 +0000938
939PREVIEW WINDOW *netrw-p* *netrw-preview*
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000940
941One may use a preview window (currently only for local browsing) by using
942the "p" key when the cursor is atop the desired filename to be previewed.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000943
944
Bram Moolenaar83bab712005-08-01 21:58:57 +0000945SELECTING SORTING STYLE *netrw-s* *netrw-sort*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000946
947One may select the sorting style by name, time, or (file) size. The
Bram Moolenaar488c6512005-08-11 20:09:58 +0000948"s" map allows one to circulate amongst the three choices; the directory
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000949listing will automatically be refreshed to reflect the selected style.
950
951
Bram Moolenaar83bab712005-08-01 21:58:57 +0000952EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence*
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000953
954When "Sorted by" is name, one may specify priority via the sorting
955sequence (g:netrw_sort_sequence). The sorting sequence typically
956prioritizes the name-listing by suffix, although any pattern will do.
957Patterns are delimited by commas. The default sorting sequence is:
958>
Bram Moolenaar488c6512005-08-11 20:09:58 +0000959 [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000960<
961The lone * is where all filenames not covered by one of the other
962patterns will end up. One may change the sorting sequence by modifying
963the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
964or by using the "S" map.
965
966
Bram Moolenaar83bab712005-08-01 21:58:57 +0000967REVERSING SORTING ORDER *netrw-r* *netrw-reverse*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000968
969One may toggle between normal and reverse sorting order by pressing the
970"r" key.
971
972
Bram Moolenaar83bab712005-08-01 21:58:57 +0000973CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000974
975Every time you change to a new directory (new for the current session),
976netrw will save the directory in a recently-visited directory history
977list (unless g:netrw_dirhistmax is zero; by default, its ten). With the
978"u" map, one can change to an earlier directory (predecessor). To do
979the opposite, see |netrw-U|.
980
981
Bram Moolenaar83bab712005-08-01 21:58:57 +0000982CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000983
984With the "U" map, one can change to a later directory (successor).
985This map is the opposite of the "u" map. (see |netrw-u|) Use the
986q map to list both the bookmarks and history. (see |netrw-q|)
987
988
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000989BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
990
991Normally one enters a file or directory using the <cr>. However, the "v"
992map allows one to open a new window to hold the new directory listing or
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000993file. A vertical split is used. (for horizontal splitting, see |netrw-o|)
994
995Normally, the v key splits the window vertically with the new window
996and cursor at the left. To change to splitting the window vertically
997with the new window and cursor at the right, have
998
999 let g:netrw_altv = 1
1000
1001in your <.vimrc>.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001002
1003
Bram Moolenaar83bab712005-08-01 21:58:57 +00001004CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001005
1006One may "enter" a file with a special handler, thereby firing up a browser or
1007other application, for example, on a file by hitting the "x" key. Presumably
1008one could write handlers that would start OpenOffice programs (oowriter), etc,
1009based on the file's extension coupled with the user's hitting the "x" key atop
1010the file.
1011
1012The Netrw executor applies a user-defined function to a file, based on its
1013extension. Of course, the handler function must exist for it to be called!
1014>
1015 Ex. mypgm.html x ->
1016 NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
1017<
1018See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
1019file with mozilla.
1020
1021
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001022MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001023
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001024By default, g:netrw_keepdir is 1. This setting means that the current
1025directory will not track the browsing directory. However, setting
1026g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
1027currently browsed directory be the current directory.
1028
1029With the default setting for g:netrw_keepdir, in order to make the two
1030directories the same, use the "c" map (just type c). That map will set
1031the current directory to the current browsing directory.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001032
1033
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001034BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001035
Bram Moolenaar572cb562005-08-05 21:35:02 +00001036One may easily "bookmark" a directory by using >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001037
1038 {cnt}b
Bram Moolenaar572cb562005-08-05 21:35:02 +00001039<
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001040Any count may be used. One may use viminfo's "!" option to retain bookmarks
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001041between vim sessions. See |netrw-B| for how to return to a bookmark and
1042|netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001043
1044
1045CHANGING TO A BOOKMARKED DIRECTORY *netrw-B*
1046
1047To change directory back to a bookmarked directory, use
1048
1049 {cnt}B
1050
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001051Any count may be used to reference any of the bookmarks. See |netrw-b|
1052for how to bookmark a directory and |netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001053
1054
Bram Moolenaar83bab712005-08-01 21:58:57 +00001055LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001056
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001057Pressing "q" will list the bookmarked directories and directory traversal
1058history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001059
1060
Bram Moolenaar83bab712005-08-01 21:58:57 +00001061IMPROVING DIRECTORY BROWSING *netrw-listhack*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001062
1063Especially with the remote directory browser, constantly entering the password
1064is tedious.
1065
Bram Moolenaar843ee412004-06-30 16:16:41 +00001066For Linux/Unix systems, I suggest looking into
1067
1068 http://hacks.oreilly.com/pub/h/66
1069
1070It gives a tip for setting up password-less use of ssh and scp, and discusses
1071the associated security issues.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001072
1073
1074==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +000010758. Problems and Fixes *netrw-problems*
1076
1077 (This section is likely to grow as I get feedback)
1078 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00001079 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001080 P1. I use windows 95, and my ftp dumps four blank lines at the
1081 end of every read.
1082
1083 See |netrw-fixup|, and put the following into your
1084 <.vimrc> file:
1085
1086 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001087
Bram Moolenaar488c6512005-08-11 20:09:58 +00001088 *netrw-p2*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001089 P2. I use windows, and my network browsing with ftp doesn't sort by
1090 time or size
1091
1092 Windows' ftp has a minimal support for ls (ie. it doesn't
1093 accept sorting options). It doesn't support the -F which
1094 gives an explanatory character (ABC/ for "ABC is a directory").
1095 Netrw uses dir to get its short and long listings. If you
1096 think your ftp does support a full-up ls, put the following
1097 into your <.vimrc>:
1098
1099 let g:netrw_ftp_list_cmd= "ls -lF"
1100
1101 Alternatively, if you have cygwin on your Windows box, put
1102 into your <.vimrc>:
1103
1104 let g:netrw_cygwin= 1
1105
Bram Moolenaar488c6512005-08-11 20:09:58 +00001106 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001107 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
1108 used ssh! That wasn't what I asked for...
1109
1110 Netrw has two methods for browsing remote directories: ssh
1111 and ftp. Unless you specify ftp specifically, ssh is used.
1112 When it comes time to do download a file (not just a directory
1113 listing), netrw will use the given protocol to do so.
1114
Bram Moolenaar488c6512005-08-11 20:09:58 +00001115 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001116 P4. I would like long listings to be the default.
1117
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001118 let g:netrw_longlist=1
1119
1120 Check out |netrw-browse-var| for more customizations that
1121 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001122
Bram Moolenaar488c6512005-08-11 20:09:58 +00001123 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001124 P5. My times come up oddly in local browsing
1125
1126 Does your system's strftime() accept the "%c" to yield dates
1127 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
1128 and find out what option should be used. Then put it into
1129 your <.vimrc>:
1130 let g:netrw_timefmt= "%X" (where X is the option)
1131
Bram Moolenaar488c6512005-08-11 20:09:58 +00001132 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001133 P6. I want my current directory to track my browsing.
1134 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001135
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001136 let g:netrw_keepdir= 0
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001137
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001138
1139==============================================================================
11409. Debugging *netrw-debug*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001141
1142The <netrw.vim> script is typically available as:
Bram Moolenaar488c6512005-08-11 20:09:58 +00001143>
Bram Moolenaar071d4272004-06-13 20:20:40 +00001144 /usr/local/share/vim/vim6x/plugin/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00001145< -or- >
1146 /usr/local/share/vim/vim7x/plugin/netrw.vim
1147<
Bram Moolenaar071d4272004-06-13 20:20:40 +00001148which is loaded automatically at startup (assuming :set nocp).
1149
1150 1. Get the <Decho.vim> script, available as:
1151
1152 http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
1153 as "Decho, a vimL debugging aid"
1154 or
1155 http://vim.sourceforge.net/scripts/script.php?script_id=120
1156
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001157 and put it into your local plugin directory.
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001158
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001159 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
1160 to put it into your .vim/plugin, too. You may obtain it from:
Bram Moolenaar071d4272004-06-13 20:20:40 +00001161
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001162 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
1163 as "DrC's Utilities"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001164
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001165 3. Edit the <netrw.vim> file by typing:
1166
1167 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00001168 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001169 :wq
Bram Moolenaar071d4272004-06-13 20:20:40 +00001170
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001171 To restore to normal non-debugging behavior, edit <netrw.vim>
1172 by typing
Bram Moolenaar071d4272004-06-13 20:20:40 +00001173
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001174 vim netrw.vim
1175 :DechoOff
1176 :wq
1177
1178 This command, provided by <Decho.vim>, will comment out all
1179 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
1180
1181 4. Then bring up vim and attempt a transfer. A set of messages
Bram Moolenaar071d4272004-06-13 20:20:40 +00001182 should appear concerning the steps that <netrw.vim> took in
1183 attempting to read/write your file over the network. Please
1184 send that information to <netrw.vim>'s maintainer,
1185
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001186 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar071d4272004-06-13 20:20:40 +00001187
1188==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000118910. History *netrw-history*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001190
Bram Moolenaar488c6512005-08-11 20:09:58 +00001191 v60: * when using the i map to switch between long and short listings,
1192 netrw will now keep cursor on same line
1193 * "Match # of #" now uses status line
1194 * :Explore **/*.c will now work from a non-netrw-browser window
1195 * :Explore **/patterns can now be run in separate browser windows
1196 * active banner (hit <cr> will cause various things to happen)
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001197 v59: * bugfix -- another keepalt work-around installed (for vim6.3)
1198 * "Match # of #" for Explore **/pattern matches
Bram Moolenaar572cb562005-08-05 21:35:02 +00001199 v58: * Explore and relatives can now handle **/somefilepattern (v7)
1200 * Nexplore and Pexplore introduced (v7). shift-down and shift-up
1201 cursor keys will invoke Nexplore and Pexplore, respectively.
1202 * bug fixed with o and v
1203 * autochdir only worked around for vim when it has been
1204 compiled with either |+netbeans_intg| or |+sun_workshop|
1205 * Under Windows, all directories and files were being preceded
1206 with a "/" when local browsing. Fixed.
1207 * When: syntax highlighting is off, laststatus=2, and remote
1208 browsing is used, sometimes the laststatus highlighting
1209 bleeds into the entire display. Work around - do an extra
1210 redraw in that case.
1211 * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers,
1212 netrw didn't change the directory when it should've
1213 * Bugfix: D and R commands work again
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001214 v57: * Explore and relatives can now handle RO files
1215 * reverse sort restored with vim7's sort command
1216 * g:netrw_keepdir now being used to keep the current directory
1217 unchanged as intended (sense change)
1218 * vim 6.3 still supported
Bram Moolenaar83bab712005-08-01 21:58:57 +00001219 v56: * LocalBrowse now saves autochdir setting, unsets it, and
1220 restores it before returning.
1221 * using vim's rename() instead of system + local_rename variable
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001222 * avoids changing directory when g:netrw_keepdir is false
Bram Moolenaar83bab712005-08-01 21:58:57 +00001223 v55: * -bar used with :Explore :Sexplore etc to allow multiple
1224 commands to be separated by |s
1225 * browser listings now use the "nowrap" option
1226 * browser: some unuseful error messages now suppressed
1227 v54: * For backwards compatibility, Explore and Sexplore have been
1228 implemented. In addition, Hexplore and Vexplore commands
1229 are available, too.
1230 * <amatch> used instead of <afile> in the transparency
1231 support (BufReadCmd, FileReadCmd, FileWriteCmd)
1232 * ***netrw*** prepended to various error messages netrw may emit
1233 * g:netrw_port used instead of b:netrw_port for scp
1234 * any leading [:#] is removed from port numbers
1235 v53: * backslashes as well as slashes placed in various patterns
1236 (ex. g:netrw_sort_sequence) to better support Windows
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001237 v52: * nonumber'ing now set for browsing buffers
1238 * when the hiding list hid all files, error messages ensued. Fixed
1239 * when browsing, swf is set, but directory is not set, when netrw
1240 was attempting to restore options, vim wanted to save a swapfile
1241 to a local directory using an url-style path. Fixed
1242 v51: * cygwin detection now automated (using windows and &shell is bash)
1243 * customizable browser "file" rejection patterns
1244 * directory history
1245 * :[range]w url now supported (ie. netrw has a FileWriteCmd event)
1246 * error messages have a "Press <cr> to continue" to allow them
1247 to be seen
1248 * directory browser displays no longer bother the swapfile
1249 * u/U commands to go up and down the history stack
1250 * history stack may be saved with viminfo with its "!" option
1251 * bugfixes associated with unwanted [No Files] entries
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001252 v50: * directories now displayed using buftype=nofile; should keep the
1253 directory names as-is
1254 * attempts to remove empty "[No File]" buffers leftover
1255 from :file ..name.. commands
1256 * bugfix: a "caps-lock" editing difficulty left in v49 was fixed
1257 * syntax highlighting for "Showing:" the hiding list included
1258 * bookmarks can now be retained if "!" is in the viminfo option
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001259 v49: * will use ftp for http://.../ browsing v48:
1260 * One may use ftp to do remote host file browsing
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001261 * (windows and !cygwin) remote browsing with ftp can now use
1262 the "dir" command internally to provide listings
1263 * g:netrw_keepdir now allows one to keep the initial current
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001264 directory as the current directory (normally the local file
1265 browser makes the currently viewed directory the current
1266 directory)
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001267 * g:netrw_alto and g:netrw_altv now support alternate placement
1268 of windows started with o or v
1269 * Nread ? and Nwrite ? now uses echomsg (instead of echo) so
1270 :messages can repeat showing the help
1271 * bugfix: avoids problems with partial matches of directory names
1272 to prior buffers with longer names
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001273 * one can suppress error messages with g:netrw_quiet ctrl-h used
1274 * instead of <Leader>h for editing hiding list one may edit the
1275 * sorting sequence with the S map now allows confirmation of
1276 * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
1277 * special file viewing with:
1278 (windows) rundll32 url.dll (gnome) gnome-open (kde)
1279 kfmclient If none of these are on the executable path, then
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001280 NetrwFileHandlers.vim is used.
1281 * directory bookmarking during both local and remote browsing
1282 implemented
1283 * one may view all, use the hiding list to suppress, or use the
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001284 hiding list to show-only remote and local file/directory
1285 listings
1286 * improved unusual file and directory name handling preview
1287 * window support
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001288 v47: * now handles local directory browsing.
1289 v46: * now handles remote directory browsing
1290 * g:netrw_silent (if 1) will cause all transfers to be silent
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001291 v45: * made the [user@]hostname:path form a bit more restrictive to
1292 better handle errors in using protocols (e.g. scp:usr@host:file
1293 was being recognized as an rcp request) v44: * changed from
1294 "rsync -a" to just "rsync"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001295 * somehow an editing error messed up the test to recognize
1296 use of the fetch method for NetRead.
1297 * more debugging statements included
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001298 v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
1299 "Network Reference" (|netrw-ref|)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001300 * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
1301 * removed superfluous NetRestorePosn() calls
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001302 v42: * now does BufReadPre and BufReadPost events on file:///* and
1303 file://localhost/* v41: * installed file:///* and
1304 file://localhost/* handling v40: * prevents redraw when a
1305 protocol error occurs so that the user may see it v39: * sftp
1306 support v38: * Now uses NetRestorePosn() calls with
1307 Nread/Nwrite commands
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001308 * Temporary files now removed via bwipe! instead of bwipe
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001309 (thanks to Dave Roberts) v37: * Claar's modifications which
1310 test if ftp is successful, otherwise give an error message
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001311 * After a read, the alternate file was pointing to the temp file.
1312 The temp file buffer is now wiped out.
1313 * removed silent from transfer methods so user can see what's
1314 happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00001315
1316
1317==============================================================================
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000131811. Credits *netrw-credits*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001319
1320 Vim editor by Bram Moolenaar (Thanks, Bram!)
1321 dav support by C Campbell
1322 fetch support by Bram Moolenaar and C Campbell
1323 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM> - NOSPAM
1324 http support by Bram Moolenaar <bram@moolenaar.net>
1325 rcp
1326 rsync support by C Campbell (suggested by Erik Warendorph)
1327 scp support by raf <raf@comdyn.com.au>
1328 sftp support by C Campbell
1329
1330 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
1331
1332 Jérôme Augé -- also using new buffer method with ftp+.netrc
1333 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use, fetch,...
1334 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
1335 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
1336 variables, rsync etc)
1337 Doug Claar -- modifications to test for success with ftp operation
1338
1339==============================================================================
Bram Moolenaar83bab712005-08-01 21:58:57 +00001340 vim:tw=78:ts=8:ft=help:norl:fdm=marker