blob: 86593e6ca0113ffb4d618e5ae9c433a2efce7901 [file] [log] [blame]
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001*pi_netrw.txt* For Vim version 7.0. Last change: Jan 27, 2006
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3 VIM REFERENCE MANUAL by Charles E. Campbell, Jr.
4
Bram Moolenaar1afcace2005-11-25 19:54:28 +00005
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 Moolenaarafeb4fa2006-02-01 21:51:12 +0000131. Starting With Netrw.................................|netrw-start|
142. Netrw Reference......................................|netrw-ref|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000015 CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp|
16 READING............................................|netrw-read|
17 WRITING............................................|netrw-write|
18 DIRECTORY LISTING..................................|netrw-dirlist|
19 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
20 VARIABLES..........................................|netrw-variables|
21 PATHS..............................................|netrw-path|
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000223. Network-Oriented File Transfer.......................|netrw-xfer|
Bram Moolenaar83bab712005-08-01 21:58:57 +000023 NETRC..............................................|netrw-netrc|
24 PASSWORD...........................................|netrw-passwd|
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000254. Activation...........................................|netrw-activate|
265. Transparent File Transfer............................|netrw-transparent|
276. Ex Commands..........................................|netrw-ex|
287. Variables and Options................................|netrw-var|
298. Directory Browsing...................................|netrw-browse| {{{1
Bram Moolenaar83bab712005-08-01 21:58:57 +000030 Maps...............................................|netrw-maps|
31 Exploring..........................................|netrw-explore-cmds|
32 Quick Reference Commands Table.....................|netrw-browse-cmds|
33 Netrw Browser Variables............................|netrw-browse-var|
34 Introduction To Directory Browsing.................|netrw-browse-intro|
35 Directory Exploring Commands.......................|netrw-explore|
36 Refreshing The Listing.............................|netrw-ctrl-l|
37 Going Up...........................................|netrw--|
38 Browsing...........................................|netrw-cr|
Bram Moolenaar578b49e2005-09-10 19:22:57 +000039 Obtaining A File...................................|netrw-O|
40 Thin, Long, and Wide Listings......................|netrw-i|
Bram Moolenaar83bab712005-08-01 21:58:57 +000041 Making A New Directory.............................|netrw-d|
42 Deleting Files Or Directories......................|netrw-delete|
43 Renaming Files Or Directories......................|netrw-move|
Bram Moolenaar482aaeb2005-09-29 18:26:07 +000044 Hiding Files Or Directories........................|netrw-a|
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +000045 Edit File Or Directory Hiding List.................|netrw-ctrl-h|
Bram Moolenaar83bab712005-08-01 21:58:57 +000046 Browsing With A Horizontally Split Window..........|netrw-o|
47 Preview Window.....................................|netrw-p|
48 Selecting Sorting Style............................|netrw-s|
49 Editing The Sorting Sequence.......................|netrw-S|
50 Reversing Sorting Order............................|netrw-r|
51 Changing To A Predecessor Directory................|netrw-u|
52 Changing To A Successor Directory..................|netrw-U|
53 Browsing With A Vertically Split Window............|netrw-v|
54 Customizing Browsing With A User Function..........|netrw-x|
55 Making The Browsing Directory The Current Directory|netrw-c|
Bram Moolenaar578b49e2005-09-10 19:22:57 +000056 Bookmarking A Directory............................|netrw-b| |netrw-Nb|
57 Changing To A Bookmarked Directory.................|netrw-B| |netrw-NB|
Bram Moolenaar83bab712005-08-01 21:58:57 +000058 Listing Bookmarks And History......................|netrw-q|
Bram Moolenaar578b49e2005-09-10 19:22:57 +000059 Improving Directory Browsing.......................|netrw-listhack| }}}1
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000609. Problems and Fixes...................................|netrw-problems|
6110. Debugging............................................|netrw-debug|
6211. History..............................................|netrw-history|
6312. Credits..............................................|netrw-credits|
Bram Moolenaar071d4272004-06-13 20:20:40 +000064
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +000065The Netrw plugin is generally sourced automatically as it is a
66|standard-plugin|. That said, to make use of netrw, one must
67have plugins available which can be done with the following
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +000068two lines in your <.vimrc>: >
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
Bram Moolenaar69a7cb42004-06-20 12:51:53 +000070 set nocp " 'compatible' is not set
71 filetype plugin on " plugins are enabled
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +000072<
Bram Moolenaar071d4272004-06-13 20:20:40 +000073You can avoid loading this plugin by setting the "loaded_netrw" variable
74in your <.vimrc> file: >
75
76 :let loaded_netrw = 1
77
78{Vi does not have any of this}
79
80==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000811. Starting With Netrw *netrw-start*
82
83Netrw makes reading, writing, and browsing over a network connection easy!
84First, make sure that you have plugins enabled, so you'll need to have at
85least the following in your <.vimrc>: (or see |netrw-activate|) >
86
87 set nocp " 'compatible' is not set
88 filetype plugin on " plugins are enabled
89<
90(see |'cp'| and |:filetype-plugin-on|)
91
92Netrw supports "transparent" editing of files on other machines using urls
93(see |netrw-transparent|). As an example of this, let's assume you have an
94account on some other machine; try >
95
96 vim scp://hostname/path/to/file
97<
98if you have an ssh connection. Want to make ssh/scp easier to use? Check
99out |netrw-listhack|!
100
101What if you have ftp, not ssh/scp? That's easy, too; try >
102
103 vim ftp://hostname/path/to/file
104<
105Want to make ftp simpler to use? See if your ftp supports a file called
106<.netrc> -- typically it goes in your home directory, has read/write
107permissions for only the user to read (ie. not group, world, other, etc),
108and has lines resembling >
109
110 machine HOSTNAME login USERID password "PASSWORD"
111 machine HOSTNAME login USERID password "PASSWORD"
112 ...
113 default login USERID password "PASSWORD"
114<
115How about browsing -- ie. you just want to look around before editing a
116file. For browsing on your current host, just "edit" a directory: >
117
118 vim .
119 vim /home/userid/path
120<
121For browsing on a remote host, "edit" a directory (but make sure that
122the directory name is followed by a "/"): >
123
124 vim scp://hostname/
125 vim ftp://hostname/path/to/dir/
126<
127See |netrw-browse| for more!
128
129There's more protocols supported than scp and ftp, too: see the next
130section, |netrw-externapp|.
131
132==============================================================================
1332. Netrw Reference *netrw-ref*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000134
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000135CONTROLLING EXTERNAL APPLICTIONS *netrw-externapp*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000136
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000137 Protocol Variable Default Value
138 -------- ---------------- -------------
139 dav: *g:netrw_dav_cmd* = "cadaver"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000140 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000141 ftp: *g:netrw_ftp_cmd* = "ftp"
142 http: *g:netrw_http_cmd* = "fetch -o" if fetch is available
143 http: g:netrw_http_cmd = "wget -q -O" If wget is available
144 rcp: *g:netrw_rcp_cmd* = "rcp"
145 rsync: *g:netrw_rsync_cmd* = "rsync -a"
146 scp: *g:netrw_scp_cmd* = "scp -q"
147 sftp: *g:netrw_sftp_cmd* = "sftp"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000148
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000149READING *netrw-read* *netrw-nread*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150 :Nread ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000151 :Nread "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000152 :Nread "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000153 :Nread "machine id password path" uses ftp
154 :Nread "dav://machine[:port]/path" uses cadaver
155 :Nread "fetch://[user@]machine/path" uses fetch
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000156 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000157 :Nread "http://[user@]machine/path" uses http uses wget
158 :Nread "rcp://[user@]machine/path" uses rcp
159 :Nread "rsync://[user@]machine[:port]/path" uses rsync
160 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
161 :Nread "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000162
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000163WRITING *netrw-write* *netrw-nwrite*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000164 :Nwrite ? give help
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000165 :Nwrite "machine:path" uses rcp
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000166 :Nwrite "machine path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000167 :Nwrite "machine id password path" uses ftp
168 :Nwrite "dav://machine[:port]/path" uses cadaver
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000169 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000170 :Nwrite "rcp://[user@]machine/path" uses rcp
171 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
172 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
173 :Nwrite "sftp://[user@]machine/path" uses sftp
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174 http: not supported!
175
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000176DIRECTORY LISTING *netrw-dirlist*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000177 :Nread [protocol]://[user]@hostname/path/
178
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000179 CHANGING USERID AND PASSWORD *netrw-chgup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000180 Attempts to use ftp will prompt you for a user-id and a password.
181 These will be saved in g:netrw_uid and g:netrw_passwd Subsequent uses
182 of ftp will re-use those. If you need to use a different user id
183 and/or password, you'll want to call NetUserPass() first.
184
185 :NetUserPass [uid [password]] -- prompts as needed
186 :call NetUserPass() -- prompts for uid and password
187 :call NetUserPass("uid") -- prompts for password
188 :call NetUserPass("uid","password") -- sets global uid and password
189
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000190VARIABLES *netrw-variables*
191 *b:netrw_lastfile* last file Network-read/written retained on a per-buffer
192 basis (supports plain :Nw )
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000194 *s:netrw_line* during :Nw/NetWrite, holds current line number
195 *s:netrw_col* during :Nw/NetWrite, holds current column number
196 s:netrw_line and s:netrw_col are used to
197 restore the cursor position on writes
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000198
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000199 *g:netrw_ftp* if it doesn't exist, use default ftp
200 =0 use default ftp (uid password)
201 =1 use alternate ftp method (user uid password)
202 If you're having trouble with ftp, try changing the
203 value of this variable to see if the alternate ftp
204 method works for your setup.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000205
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000206 *g:netrw_ftpmode* ="binary" (default)
207 ="ascii"
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000208
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000209 *g:netrw_ignorenetrc* =0 (default)
210 =1 If you have a <.netrc> file but it doesn't work and
211 you want it ignored, then set this variable as shown.
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000212
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000213 *g:netrw_uid* (ftp) user-id, retained on a per-session basis
214 *g:netrw_passwd* (ftp) password, retained on a per-session basis
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000215
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000216 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
217 lines that o/s's ftp "provides" on transfers
218 =0 force normal ftp behavior (no trailing line removal)
219
220 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
221 permits network browsing to use ls with time and
222 size sorting (default if windows)
223 =0 assume Windows' scp accepts windows-style paths
224 Network browsing uses dir instead of ls
225 This option is ignored if you're using unix
226
227 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
228 =1 use WinNT's rcp in binary mode (default)
229
230PATHS *netrw-path*
231
232Paths to files are generally user-directory relative for most protocols.
233It is possible that some protocol will make paths relative to some
234associated directory, however.
235>
236 example: vim scp://user@host/somefile
237 example: vim scp://user@host/subdir1/subdir2/somefile
238<
239where "somefile" is the "user"'s home directory. If you wish to get a
240file using root-relative paths, use the full path:
241>
242 example: vim scp://user@host//somefile
243 example: vim scp://user@host//subdir1/subdir2/somefile
244<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000245
246==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00002473. Network-Oriented File Transfer *netrw-xfer*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000248
249Network-oriented file transfer under Vim is implemented by a VimL-based script
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000250(<netrw.vim>) using plugin techniques. It currently supports both reading and
251writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000252dav/cadaver, rsync, or sftp.
253
254http is currently supported read-only via use of wget or fetch.
255
256<netrw.vim> is a standard plugin which acts as glue between Vim and the
257various file transfer programs. It uses autocommand events (BufReadCmd,
258FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
259
260 ex. vim ftp://hostname/path/to/file
261<
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000262The characters preceding the colon specify the protocol to use; in the
263example, its ftp. The <netrw.vim> script then formulates a command or a
264series of commands (typically ftp) which it issues to an external program
265(ftp, scp, etc) which does the actual file transfer/protocol. Files are read
266from/written to a temporary file (under Unix/Linux, /tmp/...) which the
267<netrw.vim> script will clean up.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000268
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000269One may modify any protocol's implementing external application by setting a
270variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
271"scp -q").
Bram Moolenaar071d4272004-06-13 20:20:40 +0000272
273Ftp, an old protocol, seems to be blessed by numerous implementations.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000274Unfortunately, some implementations are noisy (ie., add junk to the end of the
275file). Thus, concerned users may decide to write a NetReadFixup() function
276that will clean up after reading with their ftp. Some Unix systems (ie.,
277FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
278not noisy and more convenient, actually, for <netrw.vim> to use.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279Consequently, if "fetch" is executable, it will be used to do reads for
280ftp://... (and http://...) . See |netrw-var| for more about this.
281
282For rcp, scp, sftp, and http, one may use network-oriented file transfers
Bram Moolenaar83bab712005-08-01 21:58:57 +0000283transparently; ie.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284>
285 vim rcp://[user@]machine/path
286 vim scp://[user@]machine/path
287<
288If your ftp supports <.netrc>, then it too can be just as transparently used
289if the needed triad of machine name, user id, and password are present in
290that file. Your ftp must be able to use the <.netrc> file on its own, however.
291>
292 vim ftp://[user@]machine[[:#]portnumber]/path
293<
294However, ftp will often need to query the user for the userid and password.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000295The latter will be done "silently"; ie. asterisks will show up instead of
Bram Moolenaar071d4272004-06-13 20:20:40 +0000296the actually-typed-in password. Netrw will retain the userid and password
297for subsequent read/writes from the most recent transfer so subsequent
298transfers (read/write) to or from that machine will take place without
299additional prompting.
300
301 *netrw-urls*
302 +=================================+============================+============+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000303 | Reading | Writing | Uses |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304 +=================================+============================+============+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000305 | DAV: | | |
306 | dav://host/path | | cadaver |
307 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000308 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000309 | FETCH: | | |
310 | fetch://[user@]host/path | | |
311 | fetch://[user@]host:http/path | Not Available | fetch |
312 | :Nread fetch://[user@]host/path| | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000313 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000314 | FILE: | | |
315 | file:///* | file:///* | |
316 | file://localhost/* | file://localhost/* | |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000317 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000318 | FTP: (*3) | (*3) | |
319 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
320 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
321 | :Nread host path | :Nwrite host path | ftp+.netrc |
322 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000323 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000324 | HTTP: wget is executable: (*4) | | |
325 | http://[user@]host/path | Not Available | wget |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000326 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000327 | HTTP: fetch is executable (*4) | | |
328 | http://[user@]host/path | Not Available | fetch |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000329 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000330 | RCP: | | |
331 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000332 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000333 | RSYNC: | | |
334 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
335 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
336 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000338 | SCP: | | |
339 | scp://[user@]host/path | scp://[user@]host/path | scp |
340 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341 +---------------------------------+----------------------------+------------+
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000342 | SFTP: | | |
343 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
344 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
Bram Moolenaar071d4272004-06-13 20:20:40 +0000345 +=================================+============================+============+
346
347 (*1) For an absolute path use scp://machine//path.
348
349 (*2) if <.netrc> is present, it is assumed that it will
350 work with your ftp client. Otherwise the script will
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000351 prompt for user-id and pasword.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000353 (*3) for ftp, "machine" may be machine#port or machine:port
Bram Moolenaar071d4272004-06-13 20:20:40 +0000354 if a different port is needed than the standard ftp port
355
356 (*4) for http:..., if wget is available it will be used. Otherwise,
357 if fetch is available it will be used.
358
359Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
360
361
362NETRC *netrw-netrc*
363
364The typical syntax for lines in a <.netrc> file is given as shown below.
365Ftp under Unix usually support <.netrc>; Windows' ftp usually doesn't.
366>
367 machine {full machine name} login {user-id} password "{password}"
368 default login {user-id} password "{password}"
369
370Your ftp client must handle the use of <.netrc> on its own, but if the
371<.netrc> file exists, an ftp transfer will not ask for the user-id or
372password.
373
374 Note:
375 Since this file contains passwords, make very sure nobody else can
376 read this file! Most programs will refuse to use a .netrc that is
377 readable for others. Don't forget that the system administrator can
378 still read the file!
379
380
381PASSWORD *netrw-passwd*
382
383The script attempts to get passwords for ftp invisibly using |inputsecret()|,
384a built-in Vim function. See |netrw-uidpass| for how to change the password
385after one has set it.
386
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000387Unfortunately there doesn't appear to be a way for netrw to feed a password to
388scp. Thus every transfer via scp will require re-entry of the password.
389However, |netrw-listhack| can help with this problem.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000390
391
392==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00003934. Activation *netrw-activate*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000394
395Network-oriented file transfers are available by default whenever
396|'nocompatible'| mode is enabled. The <netrw.vim> file resides in your
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000397system's vim-plugin directory and is sourced automatically whenever you bring
398up vim. I suggest that, at a minimum, you have at least the following in your
399<.vimrc> customization file: >
400 set nocp
401 if version >= 600
402 filetype plugin indent on
403 endif
404<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000405
406==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00004075. Transparent File Transfer *netrw-transparent*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000408
409Transparent file transfers occur whenever a regular file read or write
410(invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000411Thus one may use files across networks just as simply as if they were local. >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000412
413 vim ftp://[user@]machine/path
414 ...
415 :wq
416
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000417See |netrw-activate| for more on how to encourage your vim to use plugins
418such as netrw.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000419
420==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00004216. Ex Commands *netrw-ex*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000422
423The usual read/write commands are supported. There are also a couple of
424additional commands available.
425
426:[range]Nw Write the specified lines to the current
427 file as specified in b:netrw_lastfile.
428
429:[range]Nw {netfile} [{netfile}]...
430 Write the specified lines to the {netfile}.
431
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000432:Nread Read the specified lines into the current
Bram Moolenaar071d4272004-06-13 20:20:40 +0000433 buffer from the file specified in
434 b:netrw_lastfile.
435
436:Nread {netfile} {netfile}...
437 Read the {netfile} after the current line.
438
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000439 *netrw-uidpass*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000440:call NetUserPass()
441 If b:netrw_uid and b:netrw_passwd don't exist,
442 this function query the user for them.
443
444:call NetUserPass("userid")
445 This call will set the b:netrw_uid and, if
446 the password doesn't exist, will query the user for it.
447
448:call NetUserPass("userid","passwd")
449 This call will set both the b:netrw_uid and b:netrw_passwd.
450 The user-id and password are used by ftp transfers. One may
451 effectively remove the user-id and password by using ""
452 strings.
453
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000454:NetrwSettings This command is desribed in |netrw-settings| -- used to
455 display netrw settings and change netrw behavior
456
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457
458==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00004597. Variables and Options *netrw-options* *netrw-var*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000460
461The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
462behavior. These variables typically may be set in the user's <.vimrc> file:
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000463(also see |netrw-settings|) >
464
465 -------------
466 Netrw Options
467 -------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000468 Option Meaning
469 -------------- -----------------------------------------------
470<
471 b:netrw_col Holds current cursor position (during NetWrite)
472 g:netrw_cygwin =1 assume scp under windows is from cygwin
473 (default/windows)
474 =0 assume scp under windows accepts windows
475 style paths (default/else)
476 g:netrw_ftp =0 use default ftp (uid password)
477 g:netrw_ftpmode ="binary" (default)
478 ="ascii" (your choice)
479 g:netrw_ignorenetrc =1 (default)
480 if you have a <.netrc> file but you don't
Bram Moolenaar071d4272004-06-13 20:20:40 +0000481 want it used, then set this variable. Its
482 mere existence is enough to cause <.netrc>
483 to be ignored.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000484 b:netrw_lastfile Holds latest method/machine/path.
485 b:netrw_line Holds current line number (during NetWrite)
486 g:netrw_passwd Holds current password for ftp.
487 g:netrw_silent =0 transfers done normally
488 =1 transfers done silently
489 g:netrw_uid Holds current user-id for ftp.
Bram Moolenaar482aaeb2005-09-29 18:26:07 +0000490 =1 use alternate ftp (user uid password)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000491 (see |netrw-options|)
492 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
493 =1 use WinNT/2K/XP's rcp, binary mode
494 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
495 =1 use default method to do ftp >
496 -----------------------------------------------------------------------
497<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000498The script will also make use of the following variables internally, albeit
499temporarily.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000500>
501 -------------------
502 Temporary Variables
503 -------------------
504 Variable Meaning
505 -------- ------------------------------------
506<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000507 g:netrw_method Index indicating rcp/ftp+.netrc/ftp
508 g:netrw_machine Holds machine name parsed from input
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000509 g:netrw_fname Holds filename being accessed >
510 ------------------------------------------------------------
511<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000512 *netrw-protocol*
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000513
514Netrw supports a number of protocols. These protocols are invoked using the
515variables listed below, and may be modified by the user.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000516>
517 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000518 Protocol Control Options
Bram Moolenaar071d4272004-06-13 20:20:40 +0000519 ------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000520 Option Type Setting Meaning
521 --------- -------- -------------- ---------------------------
522<
523 netrw_ftp variable =doesn't exist userid set by "user userid"
524 =0 userid set by "user userid"
525 =1 userid set by "userid"
526 NetReadFixup function =doesn't exist no change
527 =exists Allows user to have files
528 read via ftp automatically
529 transformed however they wish
530 by NetReadFixup()
Bram Moolenaar071d4272004-06-13 20:20:40 +0000531 g:netrw_dav_cmd variable ="cadaver"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000532 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
Bram Moolenaar071d4272004-06-13 20:20:40 +0000533 g:netrw_ftp_cmd variable ="ftp"
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000534 g:netrw_http_cmd variable ="fetch -o" if fetch is available
535 g:netrw_http_cmd variable ="wget -O" else if wget is available
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000536 g:netrw_list_cmd variable ="ssh HOSTNAME ls -Fa"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000537 g:netrw_rcp_cmd variable ="rcp"
538 g:netrw_rsync_cmd variable ="rsync -a"
539 g:netrw_scp_cmd variable ="scp -q"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000540 g:netrw_sftp_cmd variable ="sftp" >
541 -------------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542<
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000543 *netrw-ftp*
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000544The first two options (netrw_ftp and NetReadFixup) both help with certain
545ftp's that give trouble otherwise. In order to best understand how to use
546these options if ftp is giving you troubles, a bit of discussion follows on
547how netrw does ftp reads.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000549The g:netrw_..._cmd variables specify the external program to use handle the
550associated protocol (rcp, ftp, etc), plus any options.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000551
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000552The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
553whatever the current request is for a hostname.
554
555For ftp, netrw typically builds up lines of one of the following formats in a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000556temporary file:
557>
558 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
559 ---------------------------------- ------------------------------
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000560<
561 open machine [port] open machine [port]
562 user userid password userid password
563 [g:netrw_ftpmode] password
564 get filename tempfile [g:netrw_ftpmode]
565 get filename tempfile >
566 ---------------------------------------------------------------------
Bram Moolenaar071d4272004-06-13 20:20:40 +0000567<
568Netrw then executes the lines above by use of a filter:
569>
570 :%! {g:netrw_ftp_cmd} -i [-n]
571<
572
573where
574 g:netrw_ftp_cmd is usually "ftp",
575 -i tells ftp not to be interactive
576 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
577
578If <.netrc> exists it will be used to avoid having to query the user for
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000579userid and password. The transferred file is put into a temporary file.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000580The temporary file is then read into the main editing session window that
581requested it and the temporary file deleted.
582
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000583If your ftp doesn't accept the "user" command and immediately just demands a
584userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000585
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000586 *netrw-cadaver*
587To handle the SSL certificate dialog for untrusted servers, one may pull
588down the certificate and place it into /usr/ssl/cert.pem. This operation
589renders the server treatment as "trusted".
590
Bram Moolenaar83bab712005-08-01 21:58:57 +0000591 *netrw-fixup* *netreadfixup*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000592If your ftp for whatever reason generates unwanted lines (such as AUTH
593messages) you may write a NetReadFixup(tmpfile) function:
594>
595 function! NetReadFixup(method,line1,line2)
596 " a:line1: first new line in current file
597 " a:line2: last new line in current file
598 if a:method == 1 "rcp
599 elseif a:method == 2 "ftp + <.netrc>
600 elseif a:method == 3 "ftp + machine,uid,password,filename
601 elseif a:method == 4 "scp
602 elseif a:method == 5 "http/wget
603 elseif a:method == 6 "dav/cadaver
604 elseif a:method == 7 "rsync
605 elseif a:method == 8 "fetch
606 elseif a:method == 9 "sftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000607 else " complain
Bram Moolenaar071d4272004-06-13 20:20:40 +0000608 endif
609 endfunction
610>
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000611The NetReadFixup() function will be called if it exists and thus allows you to
612customize your reading process. As a further example, <netrw.vim> contains
613just such a function to handle Windows 95 ftp. For whatever reason, Windows
61495's ftp dumps four blank lines at the end of a transfer, and so it is
615desirable to automate their removal. Here's some code taken from <netrw.vim>
616itself:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000617>
618 if has("win95") && g:netrw_win95ftp
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000619 fun! NetReadFixup(method, line1, line2)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000620 if method == 3 " ftp (no <.netrc>)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000621 let fourblanklines= line2 - 3
622 silent fourblanklines.",".line2."g/^\s*/d"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000623 endif
624 endfunction
625 endif
626>
627
628==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00006298. Directory Browsing *netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000630
631MAPS *netrw-maps*
632 ?................Help.......................................|netrw-help|
633 <cr>.............Browsing...................................|netrw-cr|
634 <del>............Deleting Files or Directories..............|netrw-delete|
635 -................Going Up...................................|netrw--|
636 a................Hiding Files or Directories................|netrw-a|
637 b................Bookmarking a Directory....................|netrw-b|
638 B................Changing to a Bookmarked Directory.........|netrw-B|
639 c................Make Browsing Directory The Current Dir....|netrw-c|
640 d................Make A New Directory.......................|netrw-d|
641 D................Deleting Files or Directories..............|netrw-D|
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000642 <c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
Bram Moolenaar83bab712005-08-01 21:58:57 +0000643 i................Long Listing...............................|netrw-i|
644 <c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
645 o................Browsing with a Horizontal Split...........|netrw-o|
646 p................Preview Window.............................|netrw-p|
647 q................Listing Bookmarks and History..............|netrw-q|
648 r................Reversing Sorting Order....................|netrw-r|
649 R................Renaming Files or Directories..............|netrw-R|
650 s................Selecting Sorting Style....................|netrw-s|
651 S................Editing the Sorting Sequence...............|netrw-S|
652 u................Changing to a Predecessor Directory........|netrw-u|
653 U................Changing to a Successor Directory..........|netrw-U|
654 v................Browsing with a Vertical Split.............|netrw-v|
655 x................Customizing Browsing.......................|netrw-x|
656
657 COMMANDS *netrw-explore-cmds*
Bram Moolenaar488c6512005-08-11 20:09:58 +0000658 :Explore[!] [dir] Explore directory of current file........|netrw-explore|
659 :Sexplore[!] [dir] Split & Explore directory ...............|netrw-explore|
660 :Hexplore[!] [dir] Horizontal Split & Explore...............|netrw-explore|
661 :Vexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
662 :Pexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
663 :Nexplore[!] [dir] Vertical Split & Explore.................|netrw-explore|
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000664 :NetrwSettings.............................................|netrw-settings|
Bram Moolenaar269ec652004-07-29 08:43:53 +0000665
666QUICK REFERENCE COMMANDS TABLE *netrw-browse-cmds*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000667>
Bram Moolenaar8299df92004-07-10 09:47:34 +0000668 ------- -----------
Bram Moolenaar843ee412004-06-30 16:16:41 +0000669 Command Explanation
670 ------- -----------
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000671< ? Causes Netrw to issue help
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000672 <cr> Netrw will enter the directory or read the file |netrw-cr|
673 <del> Netrw will attempt to remove the file/directory |netrw-del|
674 - Makes Netrw go up one directory |netrw--|
675 a Toggles between normal display, |netrw-a|
676 hiding (suppress display of files matching g:netrw_list_hide)
677 showing (display only files which match g:netrw_list_hide)
678 b bookmark current directory; use Nb if compact listing
679 in use |netrw-b|
680 B go to previous bookmarked directory; use Nb if compact
681 listing is in use |netrw-B|
682 c Make current browsing directory the current directory |netrw-c|
683 d Make a directory |netrw-d|
684 D Netrw will attempt to remove the file(s)/directory(ies) |netrw-D|
685 <c-h> Edit file hiding list |netrw-ctrl-h|
686 i Toggles between long and short listing |netrw-i|
687 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
688 Nb Same as b, but always available |netrw-Nb|
689 NB Same as B, but always available |netrw-NB|
Bram Moolenaar843ee412004-06-30 16:16:41 +0000690 o Enter the file/directory under the cursor in a new browser
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000691 window. A horizontal split is used. |netrw-o|
692 O Obtain a file specified by cursor |netrw-O|
693 p Preview the file |netrw-p|
694 P Browse in the previously used window |netrw-P|
695 r Reverse sorting order |netrw-r|
696 R Rename the designed file(s)/directory(ies) |netrw-R|
697 s Select sorting style: by name, time, or file size |netrw-s|
698 S Specify suffix priority for name-sorting |netrw-S|
699 u Change to recently-visited directory |netrw-u|
700 U Change to subsequently-visited directory |netrw-U|
Bram Moolenaar843ee412004-06-30 16:16:41 +0000701 v Enter the file/directory under the cursor in a new browser
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000702 window. A vertical split is used. |netrw-v|
703 x Apply a function to a file. (special browsers) |netrw-x|
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000704
Bram Moolenaar269ec652004-07-29 08:43:53 +0000705NETRW BROWSER VARIABLES *netrw-browse-var*
Bram Moolenaar843ee412004-06-30 16:16:41 +0000706>
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000707 --- -----------
708 Var Explanation
709 --- -----------
710< *g:netrw_alto* change from above splitting to below splitting
711 by setting this variable (see |netrw-o|)
712 default: =0
Bram Moolenaar83bab712005-08-01 21:58:57 +0000713
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000714 *g:netrw_altv* change from left splitting to right splitting
715 by setting this variable (see |netrw-v|)
716 default: =0
Bram Moolenaar83bab712005-08-01 21:58:57 +0000717
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000718 *g:netrw_browse_split* when browsing, <cr> will open the file by:
719 =0: re-using the same window
720 =1: horizontally splitting the window first
721 =2: vertically splitting the window first
722 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
723 "kfmclient exec"
724 "gnome-open"
725< If >
726 "-"
727< is used, then netrwFileHandler() will look for
728 a script/function to handle the given
729 extension. (see |netrw_filehandler|).
730<
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000731 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
732 that can show up as "directories" and "files"
733 in the listing. This pattern is used to
734 remove such embedded messages. By default its
735 value is:
736 '^total\s\+\d\+$\|
737 ^Trying\s\+\d\+.*$\|
738 ^KERBEROS_V\d rejected\|
739 ^Security extensions not\|
740 No such file\|
741 : connect to address [0-9a-fA-F:]*
742 : No route to host$'
Bram Moolenaar83bab712005-08-01 21:58:57 +0000743
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000744 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
745 listing. Defaults:
746 unix or g:netrw_cygwin set: : "ls -lF"
747 otherwise "dir"
748
749 *g:netrw_hide* if true, the hiding list is used
750 default: =0
Bram Moolenaar83bab712005-08-01 21:58:57 +0000751
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000752 *g:netrw_keepdir* =1 (default) keep current directory immune from
753 the browsing directory.
754 =0 keep the current directory the same as the
755 browsing directory.
756 The current browsing directory is contained in
757 b:netrw_curdir
Bram Moolenaar83bab712005-08-01 21:58:57 +0000758
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000759 *g:netrw_list_cmd* command for listing remote directories
760 default: (if ssh is executable)
761 "ssh HOSTNAME ls -FLa"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000762
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000763 *g:netrw_longlist* if =1, then long listing will be default
Bram Moolenaar83bab712005-08-01 21:58:57 +0000764
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000765 *g:netrw_list_hide* comma separated pattern list for hiding files
766 default: ""
Bram Moolenaar83bab712005-08-01 21:58:57 +0000767
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000768 *g:netrw_local_mkdir* command for making a local directory
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000769 default: "mkdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000770
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000771 *g:netrw_local_rmdir* remove directory command (rmdir)
772 default: "rmdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000773
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000774 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
775 listings fit on 80 column displays.
776 If your screen is wider, and you have file
777 or directory names longer than 32 bytes,
778 you may set this option to keep listings
779 columnar.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000780
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000781 *g:netrw_mkdir_cmd* command for making a remote directory
782 default: "ssh HOSTNAME mkdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000783
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000784 *g:netrw_rm_cmd* command for removing files
785 default: "ssh HOSTNAME rm"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000786
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000787 *g:netrw_rmdir_cmd* command for removing directories
788 default: "ssh HOSTNAME rmdir"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000789
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000790 *g:netrw_rmf_cmd* command for removing softlinks
791 default: "ssh HOSTNAME rm -f"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000792
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000793 *g:netrw_sort_by* sort by "name", "time", or "size"
794 default: "name"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000795
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000796 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
797 default: "normal"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000798
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000799 *g:netrw_sort_sequence* when sorting by name, first sort by the
800 comma-separated pattern sequence
801 default: '[\/]$,*,\.bak$,\.o$,\.h$,
802 \.info$,\.swp$,\.obj$'
Bram Moolenaarc0197e22004-09-13 20:26:32 +0000803
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000804 *g:netrw_ssh_cmd* One may specify an executable command
805 to use instead of ssh for remote actions
806 such as listing, file removal, etc.
807 default: ssh
808
809 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
810 messages, banners, and whatnot that one doesn't
811 want masquerading as "directories" and "files".
812 Use this pattern to remove such embedded
813 messages. By default its value is:
814 '^total\s\+\d\+$'
815
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000816 *g:netrw_timefmt* specify format string to strftime() (%c)
817 default: "%c"
Bram Moolenaar83bab712005-08-01 21:58:57 +0000818
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +0000819 *g:netrw_winsize* specify initial size of new o/v windows
820 default: ""
Bram Moolenaar83bab712005-08-01 21:58:57 +0000821
822INTRODUCTION TO DIRECTORY BROWSING *netrw-browse-intro*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000823
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000824Netrw supports the browsing of directories on the local system and on remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000825hosts, including listing files and directories, entering directories, editing
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000826files therein, deleting files/directories, making new directories, and moving
827(renaming) files and directories. The Netrw browser generally implements the
828previous explorer maps and commands for remote directories, although details
829(such as pertinent global variable names) necessarily differ.
830
831The Netrw remote file and directory browser handles two protocols: ssh and
832ftp. The protocol in the url, if it is ftp, will cause netrw to use ftp
833in its remote browsing. Any other protocol will be used for file transfers,
834but otherwise the ssh protocol will be used to do remote directory browsing.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000835
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000836To use Netrw's remote directory browser, simply attempt to read a "file" with a
Bram Moolenaar843ee412004-06-30 16:16:41 +0000837trailing slash and it will be interpreted as a request to list a directory:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000838
839 vim [protocol]://[user@]hostname/path/
840
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000841For local directories, the trailing slash is not required.
842
843If you'd like to avoid entering the password in for remote directory listings
844with ssh or scp, see |netrw-listhack|.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000845
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000846 *netrw-explore* *netrw-pexplore*
847 *netrw-hexplore* *netrw-sexplore*
848DIRECTORY EXPLORING COMMANDS *netrw-nexplore* *netrw-vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000849
Bram Moolenaar488c6512005-08-11 20:09:58 +0000850 :Explore[!] [dir]... Explore directory of current file *:Explore*
851 :Sexplore[!] [dir]... Split&Explore directory of current file *:Sexplore*
852 :Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
853 :Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000854
Bram Moolenaar488c6512005-08-11 20:09:58 +0000855 Used with :Explore **/pattern :
856 :Nexplore............. go to next matching file *:Nexplore*
857 :Pexplore............. go to previous matching file *:Pexplore*
Bram Moolenaar83bab712005-08-01 21:58:57 +0000858
Bram Moolenaar488c6512005-08-11 20:09:58 +0000859:Explore will open the local-directory browser on the current file's
860 directory (or on directory [dir] if specified). The window will be
861 split only if the file has been modified, otherwise the browsing
862 window will take over that window. Normally the splitting is taken
863 horizontally.
864:Explore! is like :Explore, but will use vertical splitting.
865:Sexplore will always split the window before invoking the local-directory
866 browser. As with Explore, the splitting is normally done
867 horizontally.
868:Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
869:Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
870:Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
871:Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
872:Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000873
Bram Moolenaar488c6512005-08-11 20:09:58 +0000874By default, these commands use the current file's directory. However, one
875may explicitly provide a directory (path) to use.
Bram Moolenaar83bab712005-08-01 21:58:57 +0000876
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000877(Following needs v7.0 or later) *netrw-starstar*
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000878When Explore, Sexplore, Hexplore, or Vexplore are used with a **,
879such as:
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000880>
881 :Explore **/filename_pattern
882<
883netrw will attempt to find a (sub)directory which matches the filename
884pattern. Internally, it produces a list of files which match the pattern
885and their paths; to that extent it resembles the Unix operation:
886>
887 find $(pwd) -name "$1" -exec "echo" "{}" ";" 2> /dev/null
888<
889The directory display is updated to show the subdirectory containing a
890matching file. One may then proceed to the next (or previous) matching files'
891directories by using Nexplore or Pexplore, respectively. If your console or
892gui produces recognizable shift-up or shift-down sequences, then you'll likely
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000893find using shift-downarrow and shift-uparrow convenient. They're mapped by
894netrw:
Bram Moolenaar572cb562005-08-05 21:35:02 +0000895
896 <s-down> == Nexplore, and
897 <s-up> == Pexplore.
898
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000899As an example, consider
900>
Bram Moolenaar572cb562005-08-05 21:35:02 +0000901 :Explore **/*.c
902 :Nexplore
903 :Nexplore
904 :Pexplore
905<
Bram Moolenaarf6cf9872005-08-08 22:00:59 +0000906The status line will show, on the right hand side of the status line, a
907message like "Match 3 of 20".
908
Bram Moolenaar83bab712005-08-01 21:58:57 +0000909
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000910REFRESHING THE LISTING *netrw-ctrl-l*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000911
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000912To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
913hit the <cr> when atop the ./ directory entry in the listing. One may also
914refresh a local directory by using ":e .".
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000915
916
917GOING UP *netrw--*
918
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000919To go up a directory, press "-" or press the <cr> when atop the ../ directory
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000920entry in the listing.
921
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000922Netrw will use the command in |g:netrw_list_cmd| to perform the directory
923listing operation after changing HOSTNAME to the host specified by the
924user-provided url. By default netrw provides the command as:
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000925
Bram Moolenaar843ee412004-06-30 16:16:41 +0000926 ssh HOSTNAME ls -FLa
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000927
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000928where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
929read. Naturally, the user may override this command with whatever is
930preferred. The NetList function which implements remote directory browsing
931expects that directories will be flagged by a trailing slash.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000932
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000933
Bram Moolenaar8299df92004-07-10 09:47:34 +0000934BROWSING *netrw-cr*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000935
Bram Moolenaar69a7cb42004-06-20 12:51:53 +0000936Browsing is simple: move the cursor onto a file or directory of interest.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000937Hitting the <cr> (the return key) will select the file or directory.
938Directories will themselves be listed, and files will be opened using the
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000939protocol given in the original read request.
940
941 CAVEAT: There are three forms of listing (see |netrw-i|). Netrw assumes
942 that two or more spaces delimit filenames and directory names for the long
943 and wide listing formats. Thus, if your filename or directory name has two
944 or more spaces embedded in it, or any trailing spaces, then you'll need to
945 use the "thin" format to select it.
Bram Moolenaar843ee412004-06-30 16:16:41 +0000946
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000947The |g:netrw_browse_split| option, which is zero by default, may be used to
948cause the opening of files to be done in a new window. The splitting will
949be done horizontally if the option is one and vertically if the option is
950two.
951
Bram Moolenaar83bab712005-08-01 21:58:57 +0000952
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000953OBTAINING A FILE *netrw-O*
954
955When browsing a remote directory, one may obtain a file under the cursor (ie.
956get a copy on your local machine, but not edit it) by pressing the O key.
957Only ftp and scp are supported for this operation (but since these two are
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000958available for browsing, that shouldn't be a problem). The status bar
959will then show, on its right hand side, a message like "Obtaining filename".
960The statusline will be restored after the transfer is complete.
961
962Netrw can also "obtain" a file using the local browser. Netrw's display
963of a directory is not necessarily the same as Vim's "current directory",
964unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
965a file using the local browser (by putting the cursor on it) and pressing
966"O" will then "obtain" the file; ie. copy it to Vim's current directory.
967
968Related topics:
969 * To see what the current directory is, use |:pwd|
970 * To make the currently browsed directory the current directory, see |netrw-c|
971 * To automatically make the currently browsed directory the current
972 directory, see |g:netrw_keepdir|.
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000973
974
975THIN, LONG, AND WIDE LISTINGS *netrw-i*
976
977The "i" map cycles between the thin, long, and wide listing formats.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +0000978
Bram Moolenaar8299df92004-07-10 09:47:34 +0000979The short listing format gives just the files' and directories' names.
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000980
Bram Moolenaar8299df92004-07-10 09:47:34 +0000981The long listing is either based on the "ls" command via ssh for remote
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000982directories or displays the filename, file size (in bytes), and the time and
983date of last modification for local directories. With the long listing
984format, netrw is not able to recognize filenames which have trailing spaces.
985Use the thin listing format for such files.
Bram Moolenaar578b49e2005-09-10 19:22:57 +0000986
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000987The wide listing format has a multi-column display of the various files in the
988netrw current directory, rather like the Unix "ls" presents. In this mode the
989"b" and "B" maps are not available; instead, use Nb (|netrw-Nb|) and NB
990(|netrw-NB|). The wide listing format uses two or more contiguous spaces to
991delineate filenames; when using that format, netrw won't be able to recognize
992or use filenames which have two or more contiguous spaces embedded in the name
993or any trailing spaces. The thin listing format will, however, work with such
994files.
Bram Moolenaar8299df92004-07-10 09:47:34 +0000995
996
Bram Moolenaard4755bb2004-09-02 19:12:26 +0000997MAKING A NEW DIRECTORY *netrw-d*
Bram Moolenaar8299df92004-07-10 09:47:34 +0000998
Bram Moolenaar1afcace2005-11-25 19:54:28 +0000999With the "d" map one may make a new directory either remotely (which depends
1000on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
1001global variable g:netrw_local_mkdir). Netrw will issue a request for the new
1002directory's name. A bare <CR> at that point will abort the making of the
Bram Moolenaar8299df92004-07-10 09:47:34 +00001003directory. Attempts to make a local directory that already exists (as either
1004a file or a directory) will be detected, reported on, and ignored.
1005
Bram Moolenaar83bab712005-08-01 21:58:57 +00001006
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001007DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del*
Bram Moolenaar843ee412004-06-30 16:16:41 +00001008
1009Deleting/removing files and directories involves moving the cursor to the
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001010file/directory to be deleted and pressing "D". Directories must be empty
1011first before they can be successfully removed. If the directory is a softlink
1012to a directory, then netrw will make two requests to remove the directory
1013before succeeding. Netrw will ask for confirmation before doing the
1014removal(s). You may select a range of lines with the "V" command (visual
1015selection), and then pressing "D".
Bram Moolenaar843ee412004-06-30 16:16:41 +00001016
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001017The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
1018to control the attempts to remove files and directories. The g:netrw_rm_cmd
1019is used with files, and its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001020
1021 g:netrw_rm_cmd: ssh HOSTNAME rm
1022
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001023The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1024Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001025
1026 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
1027
1028If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001029to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
Bram Moolenaar843ee412004-06-30 16:16:41 +00001030
1031 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
1032
Bram Moolenaar843ee412004-06-30 16:16:41 +00001033
Bram Moolenaar8299df92004-07-10 09:47:34 +00001034RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R*
Bram Moolenaar843ee412004-06-30 16:16:41 +00001035
1036Renaming/moving files and directories involves moving the cursor to the
1037file/directory to be moved (renamed) and pressing "R". You will then be
1038queried for where you want the file/directory to be moved. You may select a
1039range of lines with the "V" command (visual selection), and then pressing "R".
1040
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001041The g:netrw_rename_cmd variable is used to implement renaming. By default its
Bram Moolenaar843ee412004-06-30 16:16:41 +00001042value is:
1043
1044 ssh HOSTNAME mv
1045
Bram Moolenaar269ec652004-07-29 08:43:53 +00001046One may rename a block of files and directories by selecting them with
1047the V (|linewise-visual|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001048
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001049
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001050HIDING FILES OR DIRECTORIES *netrw-a*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001051
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001052Netrw's browsing facility allows one to use the hiding list in one of three
1053ways: ignore it, hide files which match, and show only those files which
1054match. The "a" map allows the user to cycle about these three ways.
Bram Moolenaar83bab712005-08-01 21:58:57 +00001055
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001056The g:netrw_list_hide variable holds a comma delimited list of patterns (ex.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001057\.obj) which specify the hiding list. (also see |netrw-ctrl-h|) To set the hiding
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001058list, use the <c-h> map. As an example, to hide files which begin with a ".",
1059one may use the <c-h> map to set the hiding list to '^\..*' (or one may put
1060let g:netrw_list_hide= '^\..*' in one's <.vimrc>). One may then use the "a"
1061key to show all files, hide matching files, or to show only the matching
1062files.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001063
1064
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001065EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001066
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001067The "<ctrl-h>" map brings up a requestor allowing the user to change the
Bram Moolenaar269ec652004-07-29 08:43:53 +00001068file/directory hiding list. The hiding list consists of one or more patterns
1069delimited by commas. Files and/or directories satisfying these patterns will
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001070either be hidden (ie. not shown) or be the only ones displayed (see
1071|netrw-a|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001072
1073
Bram Moolenaar83bab712005-08-01 21:58:57 +00001074BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001075
Bram Moolenaar269ec652004-07-29 08:43:53 +00001076Normally one enters a file or directory using the <cr>. However, the "o" map
1077allows one to open a new window to hold the new directory listing or file. A
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001078horizontal split is used. (for vertical splitting, see |netrw-v|)
1079
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001080Normally, the o key splits the window horizontally with the new window and
1081cursor at the top. To change to splitting the window horizontally with the
1082new window and cursor at the bottom, have
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001083
1084 let g:netrw_alto = 1
1085
1086in your <.vimrc>.
1087
Bram Moolenaar83bab712005-08-01 21:58:57 +00001088
1089PREVIEW WINDOW *netrw-p* *netrw-preview*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001090
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001091One may use a preview window (currently only for local browsing) by using the
1092"p" key when the cursor is atop the desired filename to be previewed.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001093
1094
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001095PREVIOUS WINDOW *netrw-P* *netrw-prvwin*
1096
1097To edit a file or directory in the previously used window (see :he |CTRL-W_P|),
1098press a "P". If there's only one window, then the one window will be
1099horizontally split (above/below splitting is controlled by |g:netrw_alto|,
1100and its initial size is controlled by |g:netrw_winsize|).
1101
1102If there's more than one window, the previous window will be re-used on
1103the selected file/directory. If the previous window's associated buffer
1104has been modified, and there's only one window with that buffer, then
1105the user will be asked if s/he wishes to save the buffer first (yes,
1106no, or cancel).
1107
1108
Bram Moolenaar83bab712005-08-01 21:58:57 +00001109SELECTING SORTING STYLE *netrw-s* *netrw-sort*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001110
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001111One may select the sorting style by name, time, or (file) size. The "s" map
1112allows one to circulate amongst the three choices; the directory listing will
1113automatically be refreshed to reflect the selected style.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001114
1115
Bram Moolenaar83bab712005-08-01 21:58:57 +00001116EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001117
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001118When "Sorted by" is name, one may specify priority via the sorting sequence
1119(g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1120name-listing by suffix, although any pattern will do. Patterns are delimited
1121by commas. The default sorting sequence is:
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001122>
Bram Moolenaar488c6512005-08-11 20:09:58 +00001123 [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001124<
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001125The lone * is where all filenames not covered by one of the other patterns
1126will end up. One may change the sorting sequence by modifying the
1127g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1128using the "S" map.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001129
1130
Bram Moolenaar83bab712005-08-01 21:58:57 +00001131REVERSING SORTING ORDER *netrw-r* *netrw-reverse*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001132
1133One may toggle between normal and reverse sorting order by pressing the
1134"r" key.
1135
1136
Bram Moolenaar83bab712005-08-01 21:58:57 +00001137CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001138
1139Every time you change to a new directory (new for the current session),
1140netrw will save the directory in a recently-visited directory history
1141list (unless g:netrw_dirhistmax is zero; by default, its ten). With the
1142"u" map, one can change to an earlier directory (predecessor). To do
1143the opposite, see |netrw-U|.
1144
1145
Bram Moolenaar83bab712005-08-01 21:58:57 +00001146CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir*
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001147
1148With the "U" map, one can change to a later directory (successor).
1149This map is the opposite of the "u" map. (see |netrw-u|) Use the
1150q map to list both the bookmarks and history. (see |netrw-q|)
1151
1152
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001153BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v*
1154
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001155Normally one enters a file or directory using the <cr>. However, the "v" map
1156allows one to open a new window to hold the new directory listing or file. A
1157vertical split is used. (for horizontal splitting, see |netrw-o|)
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001158
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001159Normally, the v key splits the window vertically with the new window and
1160cursor at the left. To change to splitting the window vertically with the new
1161window and cursor at the right, have
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001162
1163 let g:netrw_altv = 1
1164
1165in your <.vimrc>.
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001166
1167
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001168CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* *gx*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001169
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001170Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1171best seen with a special handler (ie. a tool provided with your computer).
1172Netrw allows one to invoke such special handlers by: >
1173
1174 * when Exploring, hit the "x" key
1175 * when editing, hit gx with the cursor atop the special filename
1176<
1177Netrw determines which special handler by the following method:
1178
1179 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1180 view files. Examples of useful settings (place into your <.vimrc>): >
1181
1182 :let g:netrw_browsex_viewer= "kfmclient exec"
1183< or >
1184 :let g:netrw_browsex_viewer= "gnome-open"
1185<
1186 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1187 invoked first (see |netrw_filehandler|).
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001188
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001189 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001190 * for Gnome (with gnome-open): gnome-open is used.
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001191 * for KDE (with kfmclient): kfmclient is used.
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001192 * otherwise the netrwFileHandler plugin is used.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001193
1194The file's suffix is used by these various approaches to determine an
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001195appropriate application to use to "handle" these files. Such things as
1196OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1197*.eps) can be handled.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001198
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001199 *netrw_filehandler*
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001200The netrwFileHandler applies a user-defined function to a file, based on its
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001201extension. Of course, the handler function must exist for it to be called!
1202>
1203 Ex. mypgm.html x ->
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001204 netrwFileHandler_html("scp://user@host/some/path/mypgm.html")
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001205<
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001206See the <plugin/netrwFileHandlers.vim> for an example of how to handle an html
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001207file with mozilla.
1208
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001209One may write custom netrwFileHandlers; please look at the >
1210
1211 plugin/netrwFileHandlers.vim
1212
1213script for examples. If its likely to be generally useful, please feel free
1214to forward a copy to me for future inclusion in the distribution.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001215
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001216
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001217MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* *netrw-curdir*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001218
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001219By default, g:netrw_keepdir is 1. This setting means that the current
1220directory will not track the browsing directory. However, setting
1221g:netrw_keepdir to 0 (say, in your <.vimrc>) will tell netrw to have the
1222currently browsed directory be the current directory.
1223
1224With the default setting for g:netrw_keepdir, in order to make the two
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001225directories the same, use the "c" map (just type c). That map will set the
1226current directory to the current browsing directory.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001227
1228
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001229BOOKMARKING A DIRECTORY *netrw-b* *netrw-bookmark* *netrw-bookmarks*
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001230 *netrw-Nb*
Bram Moolenaar572cb562005-08-05 21:35:02 +00001231One may easily "bookmark" a directory by using >
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001232
1233 {cnt}b
Bram Moolenaar572cb562005-08-05 21:35:02 +00001234<
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001235Any count may be used. One may use viminfo's "!" option to retain bookmarks
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001236between vim sessions. See |netrw-B| for how to return to a bookmark and
1237|netrw-q| for how to list them.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001238
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001239When wide listing is in use (see |netrw-i|), then the b map is not available;
1240instead, use {cnt}Nb.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001241
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001242
1243CHANGING TO A BOOKMARKED DIRECTORY *netrw-NB* *netrw-B*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001244
1245To change directory back to a bookmarked directory, use
1246
1247 {cnt}B
1248
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001249Any count may be used to reference any of the bookmarks. See |netrw-b| on
1250how to bookmark a directory and |netrw-q| on how to list bookmarks.
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001251
1252When wide listing is in use (see |netrw-i|), then the B map is not available;
1253instead, use {cnt}NB.
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001254
1255
Bram Moolenaar83bab712005-08-01 21:58:57 +00001256LISTING BOOKMARKS AND HISTORY *netrw-q* *netrw-listbookmark*
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001257
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001258Pressing "q" will list the bookmarked directories and directory traversal
1259history (query). (see |netrw-b|, |netrw-B|, |netrw-u|, and |netrw-U|)
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001260
1261
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001262IMPROVING DIRECTORY BROWSING *netrw-listhack*
Bram Moolenaarcfbc5ee2004-07-02 15:38:35 +00001263
1264Especially with the remote directory browser, constantly entering the password
1265is tedious.
1266
Bram Moolenaar843ee412004-06-30 16:16:41 +00001267For Linux/Unix systems, I suggest looking into
1268
1269 http://hacks.oreilly.com/pub/h/66
1270
1271It gives a tip for setting up password-less use of ssh and scp, and discusses
1272the associated security issues.
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001273
1274
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001275NETRW SETTINGS *netrw-settings*
1276
1277With the NetrwSettings.vim plugin, >
1278 :NetrwSettings
1279will bring up a window with the many variables that netrw uses for its
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001280settings. You may change any of their values; when you save the file, the
1281settings therein will be used. One may also press "?" on any of the lines for
1282help on what each of the variables do.
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001283
1284
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001285==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +000012869. Problems and Fixes *netrw-problems*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001287
1288 (This section is likely to grow as I get feedback)
1289 (also see |netrw-debug|)
Bram Moolenaar488c6512005-08-11 20:09:58 +00001290 *netrw-p1*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001291 P1. I use windows 95, and my ftp dumps four blank lines at the
1292 end of every read.
1293
1294 See |netrw-fixup|, and put the following into your
1295 <.vimrc> file:
1296
1297 let g:netrw_win95ftp= 1
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001298
Bram Moolenaar488c6512005-08-11 20:09:58 +00001299 *netrw-p2*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001300 P2. I use windows, and my network browsing with ftp doesn't sort by
1301 time or size
1302
1303 Windows' ftp has a minimal support for ls (ie. it doesn't
1304 accept sorting options). It doesn't support the -F which
1305 gives an explanatory character (ABC/ for "ABC is a directory").
1306 Netrw uses dir to get its short and long listings. If you
1307 think your ftp does support a full-up ls, put the following
1308 into your <.vimrc>:
1309
1310 let g:netrw_ftp_list_cmd= "ls -lF"
1311
1312 Alternatively, if you have cygwin on your Windows box, put
1313 into your <.vimrc>:
1314
1315 let g:netrw_cygwin= 1
1316
Bram Moolenaar488c6512005-08-11 20:09:58 +00001317 *netrw-p3*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001318 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
1319 used ssh! That wasn't what I asked for...
1320
1321 Netrw has two methods for browsing remote directories: ssh
1322 and ftp. Unless you specify ftp specifically, ssh is used.
1323 When it comes time to do download a file (not just a directory
1324 listing), netrw will use the given protocol to do so.
1325
Bram Moolenaar488c6512005-08-11 20:09:58 +00001326 *netrw-p4*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001327 P4. I would like long listings to be the default.
1328
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001329 let g:netrw_longlist=1
1330
1331 Check out |netrw-browse-var| for more customizations that
1332 you can set.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001333
Bram Moolenaar488c6512005-08-11 20:09:58 +00001334 *netrw-p5*
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001335 P5. My times come up oddly in local browsing
1336
1337 Does your system's strftime() accept the "%c" to yield dates
1338 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
1339 and find out what option should be used. Then put it into
1340 your <.vimrc>:
1341 let g:netrw_timefmt= "%X" (where X is the option)
1342
Bram Moolenaar488c6512005-08-11 20:09:58 +00001343 *netrw-p6*
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001344 P6. I want my current directory to track my browsing.
1345 How do I do that?
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001346
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001347 let g:netrw_keepdir= 0
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001348
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001349
1350==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000135110. Debugging *netrw-debug*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001352
1353The <netrw.vim> script is typically available as:
Bram Moolenaar488c6512005-08-11 20:09:58 +00001354>
Bram Moolenaar071d4272004-06-13 20:20:40 +00001355 /usr/local/share/vim/vim6x/plugin/netrw.vim
Bram Moolenaar488c6512005-08-11 20:09:58 +00001356< -or- >
1357 /usr/local/share/vim/vim7x/plugin/netrw.vim
1358<
Bram Moolenaar071d4272004-06-13 20:20:40 +00001359which is loaded automatically at startup (assuming :set nocp).
1360
1361 1. Get the <Decho.vim> script, available as:
1362
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001363 http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_scripts
1364 as "Decho, a vimL debugging aid"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001365 or
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001366 http://vim.sourceforge.net/scripts/script.php?script_id=120
Bram Moolenaar071d4272004-06-13 20:20:40 +00001367
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001368 and put it into your local plugin directory.
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001369
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001370 2. <Decho.vim> itself needs the <cecutil.vim> script, so you'll need
1371 to put it into your .vim/plugin, too. You may obtain it from:
Bram Moolenaar071d4272004-06-13 20:20:40 +00001372
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001373 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
1374 as "DrC's Utilities"
Bram Moolenaar071d4272004-06-13 20:20:40 +00001375
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001376 3. Edit the <netrw.vim> file by typing:
1377
1378 vim netrw.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00001379 :DechoOn
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001380 :wq
Bram Moolenaar071d4272004-06-13 20:20:40 +00001381
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001382 To restore to normal non-debugging behavior, edit <netrw.vim>
1383 by typing
Bram Moolenaar071d4272004-06-13 20:20:40 +00001384
Bram Moolenaard4755bb2004-09-02 19:12:26 +00001385 vim netrw.vim
1386 :DechoOff
1387 :wq
1388
1389 This command, provided by <Decho.vim>, will comment out all
1390 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
1391
1392 4. Then bring up vim and attempt a transfer. A set of messages
Bram Moolenaar071d4272004-06-13 20:20:40 +00001393 should appear concerning the steps that <netrw.vim> took in
1394 attempting to read/write your file over the network. Please
1395 send that information to <netrw.vim>'s maintainer,
1396
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001397 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
Bram Moolenaar071d4272004-06-13 20:20:40 +00001398
1399==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000140011. History *netrw-history* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00001401
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +00001402 v78: * progress has been made on allowing spaces inside directory
1403 names for remote work (reading, writing, browsing). (scp)
1404 v77: * Mikolaj Machowski fixed a bug in a substitute command
1405 * g:netrw_browsex_viewer implemented
1406 * Mikolaj Machowski pointed out that gnome-open is often
1407 executable under KDE systems, although it is effectively
1408 not functional. NetBrowseX now looks for "kicker" as
1409 a running process to determine if KDE is actually the
1410 really running.
1411 * Explorer's O functionality was inadvertently left out.
1412 Netrw now does the same thing, but with the "P" key.
1413 * added g:netrw_browse_split option
1414 * fixed a bug where the directory contained a "." but
1415 the file didn't (was treating the dirname from "."
1416 onwards as a suffix)
Bram Moolenaar36c31f72005-11-28 23:01:53 +00001417 v76: * "directory is missing" error message now restores echo
1418 highlighting
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001419 v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
1420 * if the binary option is set, then NetWrite() will only write
1421 the whole file (line numbers don't make sense with this).
1422 Supports writing of tar and zip files.
1423 v74: * bugfix (vim, then :Explore) now works
1424 * ctrl-L keeps cursor at same screen location (both local and
1425 remote browsing)
1426 * netrw now can read remote zip and tar files
1427 * Obtain now uses WinXP ftp+.netrc successfully
1428 v73: * bugfix -- scp://host/path/file was getting named incorrectly
1429 * netrw detects use of earlier-than-7.0 version of vim and issues
1430 a pertinent error message.
1431 * netrwSettings.vim is now uses autoloading. Only
1432 <netrwPlugin.vim> is needed as a pure plugin
1433 (ie. always loaded).
1434 v72: * bugfix -- formerly, one could prevent the loading of netrw
1435 by "let g:loaded_netrw=1"; when autoloading became supported,
1436 this feature was lost. It is now restored.
1437 v71: * bugfix -- made some "set nomodifiable"s into setlocal variants
1438 (allows :e somenewfile to be modifiable as usual)
1439 * NetrwSettings calls a netrw function, thereby assuring that
1440 netrw has loaded. However, if netrw does not load for whatever
1441 reason, then NetrwSettings will now issue a warning message.
1442 * For what reason I don't recall, when wget and fetch are both
1443 not present, and an attempt to read a http://... url is made,
1444 netrw exited. It now only returns.
1445 * When ch=1, on the second and subsequent uses of browsing Netrw
1446 would issue a blank line to clear the echo'd messages. This
1447 caused an annoying "Hit-Enter" prompt; now a blank line message
1448 is echo'd only if &ch>1.
1449 v70: * when using |netrw-O|, the "Obtaining filename" message is now
1450 shown using |hl-User9|. If User9 has not been defined, netrw
1451 will define it.
1452 v69: * Bugfix: win95/98 machines were experiencing a
1453 "E121: Undefined variable: g:netrw_win95ftp" message
1454 v68: * double-click-leftmouse selects word under mouse
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001455 v67: * Passwords which contain blanks will now be surrounded by
1456 double-quotes automatically (Yongwei)
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001457 v66: * Netrw now seems to work with a few more Windows situations
1458 * O now obtains a file: remote browsing file -> local copy,
1459 locally browsing file -> current directory (see :pwd)
1460 * i now cycles between thin, long, and wide listing styles
1461 * NB and Nb are maps that are always available; corresponding
1462 B and b maps are only available when not using wide listing
1463 in order to allow them to be used for motions
1464 v65: * Browser functions now use NetOptionSave/Restore; in particular,
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00001465 netrw now works around the report setting
Bram Moolenaar578b49e2005-09-10 19:22:57 +00001466 v64: * Bugfix - browsing a "/" directory (Unix) yielded buffers
Bram Moolenaar8aff23a2005-08-19 20:40:30 +00001467 named "[Scratch]" instead of "/"
1468 * Bugfix - remote browsing with ftp was omitting the ./ and ../
Bram Moolenaar5b8d8fd2005-08-16 23:01:50 +00001469 v63: * netrw now takes advantage of autoload (and requires 7.0)
1470 * Bugfix - using r (to reverse sort) working again
1471 v62: * Bugfix - spaces allowed again in directory names with
1472 g:netrw_keepdir=0. In fact, I've tested netrw (again)
1473 with most ANSI punctuation marks for directory names.
1474 * Bugfix - NetrwSettings gave errors when g:netrw_silent
1475 had not be set.
Bram Moolenaar90cfdbe2005-08-12 19:59:19 +00001476 v61: * document upgrade -- netrw variable-based settings all should
1477 have tags. Supports NetrwSettings command.
1478 * several important variables are window-oriented. Netrw has
1479 to transfer these across a window split. See s:BufWinVars()
1480 and s:UseBufWinVars().
Bram Moolenaar488c6512005-08-11 20:09:58 +00001481 v60: * when using the i map to switch between long and short listings,
1482 netrw will now keep cursor on same line
1483 * "Match # of #" now uses status line
1484 * :Explore **/*.c will now work from a non-netrw-browser window
1485 * :Explore **/patterns can now be run in separate browser windows
1486 * active banner (hit <cr> will cause various things to happen)
Bram Moolenaarf6cf9872005-08-08 22:00:59 +00001487 v59: * bugfix -- another keepalt work-around installed (for vim6.3)
1488 * "Match # of #" for Explore **/pattern matches
Bram Moolenaar572cb562005-08-05 21:35:02 +00001489 v58: * Explore and relatives can now handle **/somefilepattern (v7)
1490 * Nexplore and Pexplore introduced (v7). shift-down and shift-up
1491 cursor keys will invoke Nexplore and Pexplore, respectively.
1492 * bug fixed with o and v
1493 * autochdir only worked around for vim when it has been
1494 compiled with either |+netbeans_intg| or |+sun_workshop|
1495 * Under Windows, all directories and files were being preceded
1496 with a "/" when local browsing. Fixed.
1497 * When: syntax highlighting is off, laststatus=2, and remote
1498 browsing is used, sometimes the laststatus highlighting
1499 bleeds into the entire display. Work around - do an extra
1500 redraw in that case.
1501 * Bugfix: when g:netrw_keepdir=0, due to re-use of buffers,
1502 netrw didn't change the directory when it should've
1503 * Bugfix: D and R commands work again
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001504 v57: * Explore and relatives can now handle RO files
1505 * reverse sort restored with vim7's sort command
1506 * g:netrw_keepdir now being used to keep the current directory
1507 unchanged as intended (sense change)
1508 * vim 6.3 still supported
Bram Moolenaar83bab712005-08-01 21:58:57 +00001509 v56: * LocalBrowse now saves autochdir setting, unsets it, and
1510 restores it before returning.
1511 * using vim's rename() instead of system + local_rename variable
Bram Moolenaar1d94f9b2005-08-04 21:29:45 +00001512 * avoids changing directory when g:netrw_keepdir is false
Bram Moolenaar83bab712005-08-01 21:58:57 +00001513 v55: * -bar used with :Explore :Sexplore etc to allow multiple
1514 commands to be separated by |s
1515 * browser listings now use the "nowrap" option
1516 * browser: some unuseful error messages now suppressed
1517 v54: * For backwards compatibility, Explore and Sexplore have been
1518 implemented. In addition, Hexplore and Vexplore commands
1519 are available, too.
1520 * <amatch> used instead of <afile> in the transparency
1521 support (BufReadCmd, FileReadCmd, FileWriteCmd)
1522 * ***netrw*** prepended to various error messages netrw may emit
1523 * g:netrw_port used instead of b:netrw_port for scp
1524 * any leading [:#] is removed from port numbers
1525 v53: * backslashes as well as slashes placed in various patterns
1526 (ex. g:netrw_sort_sequence) to better support Windows
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001527 v52: * nonumber'ing now set for browsing buffers
1528 * when the hiding list hid all files, error messages ensued. Fixed
1529 * when browsing, swf is set, but directory is not set, when netrw
1530 was attempting to restore options, vim wanted to save a swapfile
1531 to a local directory using an url-style path. Fixed
1532 v51: * cygwin detection now automated (using windows and &shell is bash)
1533 * customizable browser "file" rejection patterns
1534 * directory history
1535 * :[range]w url now supported (ie. netrw has a FileWriteCmd event)
1536 * error messages have a "Press <cr> to continue" to allow them
1537 to be seen
1538 * directory browser displays no longer bother the swapfile
1539 * u/U commands to go up and down the history stack
1540 * history stack may be saved with viminfo with its "!" option
1541 * bugfixes associated with unwanted [No Files] entries
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001542 v50: * directories now displayed using buftype=nofile; should keep the
1543 directory names as-is
1544 * attempts to remove empty "[No File]" buffers leftover
1545 from :file ..name.. commands
1546 * bugfix: a "caps-lock" editing difficulty left in v49 was fixed
1547 * syntax highlighting for "Showing:" the hiding list included
1548 * bookmarks can now be retained if "!" is in the viminfo option
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001549 v49: * will use ftp for http://.../ browsing v48:
1550 * One may use ftp to do remote host file browsing
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001551 * (windows and !cygwin) remote browsing with ftp can now use
1552 the "dir" command internally to provide listings
1553 * g:netrw_keepdir now allows one to keep the initial current
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001554 directory as the current directory (normally the local file
1555 browser makes the currently viewed directory the current
1556 directory)
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001557 * g:netrw_alto and g:netrw_altv now support alternate placement
1558 of windows started with o or v
1559 * Nread ? and Nwrite ? now uses echomsg (instead of echo) so
1560 :messages can repeat showing the help
1561 * bugfix: avoids problems with partial matches of directory names
1562 to prior buffers with longer names
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001563 * one can suppress error messages with g:netrw_quiet ctrl-h used
1564 * instead of <Leader>h for editing hiding list one may edit the
1565 * sorting sequence with the S map now allows confirmation of
1566 * deletion with [y(es) n(o) a(ll) q(uit)] the "x" map now handles
1567 * special file viewing with:
1568 (windows) rundll32 url.dll (gnome) gnome-open (kde)
1569 kfmclient If none of these are on the executable path, then
Bram Moolenaar1afcace2005-11-25 19:54:28 +00001570 netrwFileHandlers.vim is used.
Bram Moolenaarc0197e22004-09-13 20:26:32 +00001571 * directory bookmarking during both local and remote browsing
1572 implemented
1573 * one may view all, use the hiding list to suppress, or use the
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001574 hiding list to show-only remote and local file/directory
1575 listings
1576 * improved unusual file and directory name handling preview
1577 * window support
Bram Moolenaar293ee4d2004-12-09 21:34:53 +00001578 v47: * now handles local directory browsing.
1579 v46: * now handles remote directory browsing
1580 * g:netrw_silent (if 1) will cause all transfers to be silent
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001581 v45: * made the [user@]hostname:path form a bit more restrictive to
1582 better handle errors in using protocols (e.g. scp:usr@host:file
1583 was being recognized as an rcp request) v44: * changed from
1584 "rsync -a" to just "rsync"
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001585 * somehow an editing error messed up the test to recognize
1586 use of the fetch method for NetRead.
1587 * more debugging statements included
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001588 v43: * moved "Explanation" comments to <pi_netrw.txt> help file as
1589 "Network Reference" (|netrw-ref|)
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001590 * <netrw.vim> now uses Dfunc() Decho() and Dret() for debugging
1591 * removed superfluous NetRestorePosn() calls
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001592 v42: * now does BufReadPre and BufReadPost events on file:///* and
1593 file://localhost/* v41: * installed file:///* and
1594 file://localhost/* handling v40: * prevents redraw when a
1595 protocol error occurs so that the user may see it v39: * sftp
1596 support v38: * Now uses NetRestorePosn() calls with
1597 Nread/Nwrite commands
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001598 * Temporary files now removed via bwipe! instead of bwipe
Bram Moolenaar3fdfa4a2004-10-07 21:02:47 +00001599 (thanks to Dave Roberts) v37: * Claar's modifications which
1600 test if ftp is successful, otherwise give an error message
Bram Moolenaar69a7cb42004-06-20 12:51:53 +00001601 * After a read, the alternate file was pointing to the temp file.
1602 The temp file buffer is now wiped out.
1603 * removed silent from transfer methods so user can see what's
1604 happening
Bram Moolenaar071d4272004-06-13 20:20:40 +00001605
1606
1607==============================================================================
Bram Moolenaarafeb4fa2006-02-01 21:51:12 +0000160811. Credits *netrw-credits* {{{1
Bram Moolenaar071d4272004-06-13 20:20:40 +00001609
1610 Vim editor by Bram Moolenaar (Thanks, Bram!)
1611 dav support by C Campbell
1612 fetch support by Bram Moolenaar and C Campbell
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001613 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
Bram Moolenaar071d4272004-06-13 20:20:40 +00001614 http support by Bram Moolenaar <bram@moolenaar.net>
1615 rcp
1616 rsync support by C Campbell (suggested by Erik Warendorph)
1617 scp support by raf <raf@comdyn.com.au>
1618 sftp support by C Campbell
1619
1620 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
1621
1622 Jérôme Augé -- also using new buffer method with ftp+.netrc
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001623 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
1624 fetch,...
Bram Moolenaar071d4272004-06-13 20:20:40 +00001625 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
1626 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
1627 variables, rsync etc)
Bram Moolenaar482aaeb2005-09-29 18:26:07 +00001628 Doug Claar -- modifications to test for success with ftp
1629 operation
Bram Moolenaar071d4272004-06-13 20:20:40 +00001630
1631==============================================================================
Bram Moolenaar83bab712005-08-01 21:58:57 +00001632 vim:tw=78:ts=8:ft=help:norl:fdm=marker