1 *pi_netrw.txt* For Vim version 7.3. Last change: 2011 Sep 26
3 -----------------------------------------------------
4 NETRW REFERENCE MANUAL by Charles E. Campbell, Jr.
5 -----------------------------------------------------
6 Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
7 (remove NOSPAM from Campbell's email first)
9 Copyright: Copyright (C) 1999-2011 Charles E Campbell, Jr *netrw-copyright*
10 Permission is hereby granted to use and distribute this code, with
11 or without modifications, provided that this copyright notice is
12 copied with it. Like anything else that's free, netrw.vim,
13 netrwPlugin.vim, netrwFileHandlers.vim, netrwSettings.vim,
14 syntax/netrw.vim, and pi_netrw.txt are provided *as is* and comes
15 with no warranty of any kind, either expressed or implied. No
16 guarantees of merchantability. No guarantees of suitability for
17 any purpose. By using this plugin, you agree that in no event will
18 the copyright holder be liable for any damages resulting from the
22 *dav* *ftp* *netrw-file* *rcp* *scp*
23 *davs* *http* *netrw.vim* *rsync* *sftp*
24 *fetch* *netrw* *network*
26 ==============================================================================
27 1. Contents *netrw-contents* {{{1
29 1. Contents.............................................|netrw-contents|
30 2. Starting With Netrw..................................|netrw-start|
31 3. Netrw Reference......................................|netrw-ref|
32 EXTERNAL APPLICATIONS AND PROTOCOLS................|netrw-externapp|
33 READING............................................|netrw-read|
34 WRITING............................................|netrw-write|
35 SOURCING...........................................|netrw-source|
36 DIRECTORY LISTING..................................|netrw-dirlist|
37 CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
38 VARIABLES AND SETTINGS.............................|netrw-variables|
39 PATHS..............................................|netrw-path|
40 4. Network-Oriented File Transfer.......................|netrw-xfer|
41 NETRC..............................................|netrw-netrc|
42 PASSWORD...........................................|netrw-passwd|
43 5. Activation...........................................|netrw-activate|
44 6. Transparent Remote File Editing......................|netrw-transparent|
45 7. Ex Commands..........................................|netrw-ex|
46 8. Variables and Options................................|netrw-var|
47 9. Browsing.............................................|netrw-browse|
48 Introduction To Browsing...........................|netrw-intro-browse|
49 Quick Reference: Maps..............................|netrw-browse-maps|
50 Quick Reference: Commands..........................|netrw-browse-cmds|
51 Bookmarking A Directory............................|netrw-mb|
52 Browsing...........................................|netrw-cr|
53 Browsing With A Horizontally Split Window..........|netrw-o|
54 Browsing With A New Tab............................|netrw-t|
55 Browsing With A Vertically Split Window............|netrw-v|
56 Change Listing Style.(thin wide long tree).........|netrw-i|
57 Changing To A Bookmarked Directory.................|netrw-gb|
58 Changing To A Predecessor Directory................|netrw-u|
59 Changing To A Successor Directory..................|netrw-U|
60 Customizing Browsing With A User Function..........|netrw-x|
61 Deleting Bookmarks.................................|netrw-mB|
62 Deleting Files Or Directories......................|netrw-D|
63 Directory Exploring Commands.......................|netrw-explore|
64 Exploring With Stars and Patterns..................|netrw-star|
65 Displaying Information About File..................|netrw-qf|
66 Edit File Or Directory Hiding List.................|netrw-ctrl-h|
67 Editing The Sorting Sequence.......................|netrw-S|
68 Forcing treatment as a file or directory...........|netrw-gd| |netrw-gf|
69 Going Up...........................................|netrw--|
70 Hiding Files Or Directories........................|netrw-a|
71 Improving Browsing.................................|netrw-ssh-hack|
72 Listing Bookmarks And History......................|netrw-qb|
73 Making A New Directory.............................|netrw-d|
74 Making The Browsing Directory The Current Directory|netrw-c|
75 Marking Files......................................|netrw-mf|
76 Marking Files By Regular Expression................|netrw-mr|
77 Marked Files: Arbitrary Command....................|netrw-mx|
78 Marked Files: Compression And Decompression........|netrw-mz|
79 Marked Files: Copying..............................|netrw-mc|
80 Marked Files: Diff.................................|netrw-md|
81 Marked Files: Editing..............................|netrw-me|
82 Marked Files: Grep.................................|netrw-mg|
83 Marked Files: Hiding and Unhiding by Suffix........|netrw-mh|
84 Marked Files: Moving...............................|netrw-mm|
85 Marked Files: Printing.............................|netrw-mp|
86 Marked Files: Sourcing.............................|netrw-ms|
87 Marked Files: Tagging..............................|netrw-mT|
88 Marked Files: Setting the Target Directory.........|netrw-mt|
89 Marked Files: Unmarking............................|netrw-mu|
90 Netrw Browser Variables............................|netrw-browser-var|
91 Netrw Browsing And Option Incompatibilities........|netrw-incompatible|
92 Netrw Settings Window..............................|netrw-settings-window|
93 Obtaining A File...................................|netrw-O|
94 Preview Window.....................................|netrw-p|
95 Previous Window....................................|netrw-P|
96 Refreshing The Listing.............................|netrw-ctrl-l|
97 Renaming Files Or Directories......................|netrw-move|
98 Reversing Sorting Order............................|netrw-r|
99 Selecting Sorting Style............................|netrw-s|
100 Setting Editing Window.............................|netrw-C|
101 10. Problems and Fixes...................................|netrw-problems|
102 11. Debugging Netrw Itself...............................|netrw-debug|
103 12. History..............................................|netrw-history|
104 13. Todo.................................................|netrw-todo|
105 14. Credits..............................................|netrw-credits|
107 {Vi does not have any of this}
109 ==============================================================================
110 2. Starting With Netrw *netrw-start* {{{1
112 Netrw makes reading files, writing files, browsing over a network, and
113 local browsing easy! First, make sure that you have plugins enabled, so
114 you'll need to have at least the following in your <.vimrc>:
115 (or see |netrw-activate|) >
117 set nocp " 'compatible' is not set
118 filetype plugin on " plugins are enabled
120 (see |'cp'| and |:filetype-plugin-on|)
122 Netrw supports "transparent" editing of files on other machines using urls
123 (see |netrw-transparent|). As an example of this, let's assume you have an
124 account on some other machine; if you can use scp, try: >
126 vim scp://hostname/path/to/file
128 Want to make ssh/scp easier to use? Check out |netrw-ssh-hack|!
130 So, what if you have ftp, not ssh/scp? That's easy, too; try >
132 vim ftp://hostname/path/to/file
134 Want to make ftp simpler to use? See if your ftp supports a file called
135 <.netrc> -- typically it goes in your home directory, has read/write
136 permissions for only the user to read (ie. not group, world, other, etc),
137 and has lines resembling >
139 machine HOSTNAME login USERID password "PASSWORD"
140 machine HOSTNAME login USERID password "PASSWORD"
142 default login USERID password "PASSWORD"
144 Now about browsing -- when you just want to look around before editing a
145 file. For browsing on your current host, just "edit" a directory: >
148 vim /home/userid/path
150 For browsing on a remote host, "edit" a directory (but make sure that
151 the directory name is followed by a "/"): >
154 vim ftp://hostname/path/to/dir/
156 See |netrw-browse| for more!
158 There are more protocols supported by netrw than just scp and ftp, too: see the
159 next section, |netrw-externapp|, on how to use these external applications with
162 PREVENTING LOADING *netrw-noload*
164 If you want to use plugins, but for some reason don't wish to use netrw, then
165 you need to avoid loading both the plugin and the autoload portions of netrw.
166 You may do so by placing the following two lines in your <.vimrc>: >
168 :let g:loaded_netrw = 1
169 :let g:loaded_netrwPlugin = 1
172 ==============================================================================
173 3. Netrw Reference *netrw-ref* {{{1
175 Netrw supports several protocols in addition to scp and ftp as mentioned
176 in |netrw-start|. These include dav, fetch, http,... well, just look
177 at the list in |netrw-externapp|. Each protocol is associated with a
178 variable which holds the default command supporting that protocol.
180 EXTERNAL APPLICATIONS AND PROTOCOLS *netrw-externapp* {{{2
182 Protocol Variable Default Value
183 -------- ---------------- -------------
184 dav: *g:netrw_dav_cmd* = "cadaver" if cadaver is executable
185 dav: g:netrw_dav_cmd = "curl -o" elseif curl is available
186 fetch: *g:netrw_fetch_cmd* = "fetch -o" if fetch is available
187 ftp: *g:netrw_ftp_cmd* = "ftp"
188 http: *g:netrw_http_cmd* = "elinks" if elinks is available
189 http: g:netrw_http_cmd = "links" elseif links is available
190 http: g:netrw_http_cmd = "curl" elseif curl is available
191 http: g:netrw_http_cmd = "wget" elseif wget is available
192 http: g:netrw_http_cmd = "fetch" elseif fetch is available
193 rcp: *g:netrw_rcp_cmd* = "rcp"
194 rsync: *g:netrw_rsync_cmd* = "rsync -a"
195 scp: *g:netrw_scp_cmd* = "scp -q"
196 sftp: *g:netrw_sftp_cmd* = "sftp"
198 *g:netrw_http_xcmd* : the option string for http://... protocols are
199 specified via this variable and may be independently overridden. By
200 default, the option arguments for the http-handling commands are: >
208 For example, if your system has elinks, and you'd rather see the
209 page using an attempt at rendering the text, you may wish to have >
210 let g:netrw_http_xcmd= "-dump >"
214 READING *netrw-read* *netrw-nread* {{{2
216 Generally, one may just use the url notation with a normal editing
219 :e ftp://[user@]machine/path
221 Netrw also provides the Nread command:
224 :Nread "machine:path" uses rcp
225 :Nread "machine path" uses ftp w/ <.netrc>
226 :Nread "machine id password path" uses ftp
227 :Nread "dav://machine[:port]/path" uses cadaver
228 :Nread "fetch://[user@]machine/path" uses fetch
229 :Nread "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
230 :Nread "http://[user@]machine/path" uses http uses wget
231 :Nread "rcp://[user@]machine/path" uses rcp
232 :Nread "rsync://[user@]machine[:port]/path" uses rsync
233 :Nread "scp://[user@]machine[[:#]port]/path" uses scp
234 :Nread "sftp://[user@]machine/path" uses sftp
236 WRITING *netrw-write* *netrw-nwrite* {{{2
238 One may just use the url notation with a normal file writing
241 :w ftp://[user@]machine/path
243 Netrw also provides the Nwrite command:
246 :Nwrite "machine:path" uses rcp
247 :Nwrite "machine path" uses ftp w/ <.netrc>
248 :Nwrite "machine id password path" uses ftp
249 :Nwrite "dav://machine[:port]/path" uses cadaver
250 :Nwrite "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
251 :Nwrite "rcp://[user@]machine/path" uses rcp
252 :Nwrite "rsync://[user@]machine[:port]/path" uses rsync
253 :Nwrite "scp://[user@]machine[[:#]port]/path" uses scp
254 :Nwrite "sftp://[user@]machine/path" uses sftp
257 SOURCING *netrw-source* {{{2
259 One may just use the url notation with the normal file sourcing
262 :so ftp://[user@]machine/path
264 Netrw also provides the Nsource command:
267 :Nsource "dav://machine[:port]/path" uses cadaver
268 :Nsource "fetch://[user@]machine/path" uses fetch
269 :Nsource "ftp://[user@]machine[[:#]port]/path" uses ftp w/ <.netrc>
270 :Nsource "http://[user@]machine/path" uses http uses wget
271 :Nsource "rcp://[user@]machine/path" uses rcp
272 :Nsource "rsync://[user@]machine[:port]/path" uses rsync
273 :Nsource "scp://[user@]machine[[:#]port]/path" uses scp
274 :Nsource "sftp://[user@]machine/path" uses sftp
276 DIRECTORY LISTING *netrw-trailingslash* *netrw-dirlist* {{{2
278 One may browse a directory to get a listing by simply attempting to
279 edit the directory: >
281 :e scp://[user]@hostname/path/
282 :e ftp://[user]@hostname/path/
284 For remote directory listings (ie. those using scp or ftp), that
285 trailing "/" is necessary (the slash tells netrw to treat the argument
286 as a directory to browse instead of as a file to download).
288 The Nread command may also be used to accomplish this (again, that
289 trailing slash is necessary): >
291 :Nread [protocol]://[user]@hostname/path/
293 *netrw-login* *netrw-password*
294 CHANGING USERID AND PASSWORD *netrw-chgup* *netrw-userpass* {{{2
296 Attempts to use ftp will prompt you for a user-id and a password.
297 These will be saved in global variables |g:netrw_uid| and
298 |s:netrw_passwd|; subsequent use of ftp will re-use those two strings,
299 thereby simplifying use of ftp. However, if you need to use a
300 different user id and/or password, you'll want to call |NetUserPass()|
301 first. To work around the need to enter passwords, check if your ftp
302 supports a <.netrc> file in your home directory. Also see
303 |netrw-passwd| (and if you're using ssh/scp hoping to figure out how
304 to not need to use passwords for scp, look at |netrw-ssh-hack|).
306 :NetUserPass [uid [password]] -- prompts as needed
307 :call NetUserPass() -- prompts for uid and password
308 :call NetUserPass("uid") -- prompts for password
309 :call NetUserPass("uid","password") -- sets global uid and password
311 NETRW VARIABLES AND SETTINGS *netrw-variables* {{{2
312 (also see: |netrw-browser-var| |netrw-protocol| |netrw-settings| |netrw-var|)
314 Netrw provides a lot of variables which allow you to customize netrw to your
315 preferences. One way to look at them is via the command :NetrwSettings (see
316 |netrw-settings|) which will display your current netrw settings. Most such
317 settings are described below, in |netrw-browser-options|, and in
320 *b:netrw_lastfile* last file Network-read/written retained on a
321 per-buffer basis (supports plain :Nw )
323 *g:netrw_bufsettings* the settings that netrw buffers have
324 (default) noma nomod nonu nowrap ro nobl
326 *g:netrw_chgwin* specifies a window number where file edits will take
327 place. (also see |netrw-C|)
328 (default) not defined
330 *g:Netrw_funcref* specifies a function (or functions) to be called when
331 netrw edits a file. The file is first edited, and
332 then the function reference (|Funcref|) is called.
333 This variable may also hold a |List| of Funcrefs.
334 (default) not defined. (the capital in g:Netrw...
335 is required by its holding a function reference)
337 Example: place in .vimrc; affects all file opening
340 let g:Netrw_funcref= function("MyFuncRef")
342 *g:netrw_ftp* if it doesn't exist, use default ftp
343 =0 use default ftp (uid password)
344 =1 use alternate ftp method (user uid password)
345 If you're having trouble with ftp, try changing the
346 value of this variable to see if the alternate ftp
347 method works for your setup.
349 *g:netrw_ftpextracmd* default: doesn't exist
350 If this variable exists, then any string it contains
351 will be placed into the commands set to your ftp
352 client. As an example:
355 *g:netrw_ftpmode* ="binary" (default)
358 *g:netrw_ignorenetrc* =0 (default for linux, cygwin)
359 =1 If you have a <.netrc> file but it doesn't work and
360 you want it ignored, then set this variable as
361 shown. (default for Windows + cmd.exe)
363 *g:netrw_menu* =0 disable netrw's menu
364 =1 (default) netrw's menu enabled
366 *g:netrw_nogx* if this variable exists, then the "gx" map will not
367 be available (see |netrw-gx|)
369 *g:netrw_uid* (ftp) user-id, retained on a per-vim-session basis
370 *s:netrw_passwd* (ftp) password, retained on a per-vim-session basis
372 *g:netrw_preview* =0 (default) preview window shown in a horizontally
374 =1 preview window shown in a vertically split window.
375 Also affects the "previous window" (see |netrw-P|) in
378 *g:netrw_scpport* = "-P" : option to use to set port for scp
379 *g:netrw_sshport* = "-p" : option to use to set port for ssh
381 *g:netrw_sepchr* =\0xff
382 =\0x01 for enc == euc-jp (and perhaps it should be for
383 others, too, please let me
385 Separates priority codes from filenames internally.
388 *g:netrw_silent* =0 : transfers done normally
389 =1 : transfers done silently
391 *g:netrw_use_errorwindow* =1 : messages from netrw will use a separate one
392 line window. This window provides reliable
393 delivery of messages. (default)
394 =0 : messages from netrw will use echoerr ;
395 messages don't always seem to show up this
396 way, but one doesn't have to quit the window.
398 *g:netrw_win95ftp* =1 if using Win95, will remove four trailing blank
399 lines that o/s's ftp "provides" on transfers
400 =0 force normal ftp behavior (no trailing line removal)
402 *g:netrw_cygwin* =1 assume scp under windows is from cygwin. Also
403 permits network browsing to use ls with time and
404 size sorting (default if windows)
405 =0 assume Windows' scp accepts windows-style paths
406 Network browsing uses dir instead of ls
407 This option is ignored if you're using unix
409 *g:netrw_use_nt_rcp* =0 don't use the rcp of WinNT, Win2000 and WinXP
410 =1 use WinNT's rcp in binary mode (default)
412 PATHS *netrw-path* {{{2
414 Paths to files are generally user-directory relative for most protocols.
415 It is possible that some protocol will make paths relative to some
416 associated directory, however.
418 example: vim scp://user@host/somefile
419 example: vim scp://user@host/subdir1/subdir2/somefile
421 where "somefile" is in the "user"'s home directory. If you wish to get a
422 file using root-relative paths, use the full path:
424 example: vim scp://user@host//somefile
425 example: vim scp://user@host//subdir1/subdir2/somefile
428 ==============================================================================
429 4. Network-Oriented File Transfer *netrw-xfer* {{{1
431 Network-oriented file transfer under Vim is implemented by a VimL-based script
432 (<netrw.vim>) using plugin techniques. It currently supports both reading and
433 writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
434 dav/cadaver, rsync, or sftp.
436 http is currently supported read-only via use of wget or fetch.
438 <netrw.vim> is a standard plugin which acts as glue between Vim and the
439 various file transfer programs. It uses autocommand events (BufReadCmd,
440 FileReadCmd, BufWriteCmd) to intercept reads/writes with url-like filenames. >
442 ex. vim ftp://hostname/path/to/file
444 The characters preceding the colon specify the protocol to use; in the
445 example, it's ftp. The <netrw.vim> script then formulates a command or a
446 series of commands (typically ftp) which it issues to an external program
447 (ftp, scp, etc) which does the actual file transfer/protocol. Files are read
448 from/written to a temporary file (under Unix/Linux, /tmp/...) which the
449 <netrw.vim> script will clean up.
451 Now, a word about Jan Minář's "FTP User Name and Password Disclosure"; first,
452 ftp is not a secure protocol. User names and passwords are transmitted "in
453 the clear" over the internet; any snooper tool can pick these up; this is not
454 a netrw thing, this is a ftp thing. If you're concerned about this, please
455 try to use scp or sftp instead.
457 Netrw re-uses the user id and password during the same vim session and so long
458 as the remote hostname remains the same.
460 Jan seems to be a bit confused about how netrw handles ftp; normally multiple
461 commands are performed in a "ftp session", and he seems to feel that the
462 uid/password should only be retained over one ftp session. However, netrw
463 does every ftp operation in a separate "ftp session"; so remembering the
464 uid/password for just one "ftp session" would be the same as not remembering
465 the uid/password at all. IMHO this would rapidly grow tiresome as one
466 browsed remote directories, for example.
468 On the other hand, thanks go to Jan M. for pointing out the many
469 vulnerabilities that netrw (and vim itself) had had in handling "crafted"
470 filenames. The |shellescape()| and |fnameescape()| functions were written in
471 response by Bram Moolenaar to handle these sort of problems, and netrw has
472 been modified to use them. Still, my advice is, if the "filename" looks like
473 a vim command that you aren't comfortable with having executed, don't open it.
475 *netrw-putty* *netrw-pscp* *netrw-psftp*
476 One may modify any protocol's implementing external application by setting a
477 variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
478 "scp -q"). As an example, consider using PuTTY: >
480 let g:netrw_scp_cmd = '"c:\Program Files\PuTTY\pscp.exe" -q -batch'
481 let g:netrw_sftp_cmd= '"c:\Program Files\PuTTY\psftp.exe"'
483 (note: it has been reported that windows 7 with putty v0.6's "-batch" option
484 doesn't work, so its best to leave it off for that system)
486 See |netrw-p8| for more about putty, pscp, psftp, etc.
488 Ftp, an old protocol, seems to be blessed by numerous implementations.
489 Unfortunately, some implementations are noisy (ie., add junk to the end of the
490 file). Thus, concerned users may decide to write a NetReadFixup() function
491 that will clean up after reading with their ftp. Some Unix systems (ie.,
492 FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
493 not noisy and more convenient, actually, for <netrw.vim> to use.
494 Consequently, if "fetch" is available (ie. executable), it may be preferable
495 to use it for ftp://... based transfers.
497 For rcp, scp, sftp, and http, one may use network-oriented file transfers
500 vim rcp://[user@]machine/path
501 vim scp://[user@]machine/path
503 If your ftp supports <.netrc>, then it too can be transparently used
504 if the needed triad of machine name, user id, and password are present in
505 that file. Your ftp must be able to use the <.netrc> file on its own, however.
507 vim ftp://[user@]machine[[:#]portnumber]/path
509 Windows provides an ftp (typically c:\Windows\System32\ftp.exe) which uses
510 an option, -s:filename (filename can and probably should be a full path)
511 which contains ftp commands which will be automatically run whenever ftp
512 starts. You may use this feature to enter a user and password for one site: >
515 If |g:netrw_ftp_cmd| contains -s:[path/]MACHINE, then (on Windows machines only)
516 netrw will substitute the current machine name requested for ftp connection
517 for MACHINE. Hence one can have multiple machine.ftp files containing login
518 and password for ftp. Example: >
520 g:netrw_ftp_cmd= 'c:\Windows\System32\ftp -s:C:\Users\Myself\MACHINE'
521 vim ftp://myhost.somewhere.net/
523 C:\Users\Myself\myhost.ftp
525 Often, ftp will need to query the user for the userid and password.
526 The latter will be done "silently"; ie. asterisks will show up instead of
527 the actually-typed-in password. Netrw will retain the userid and password
528 for subsequent read/writes from the most recent transfer so subsequent
529 transfers (read/write) to or from that machine will take place without
530 additional prompting.
533 +=================================+============================+============+
534 | Reading | Writing | Uses |
535 +=================================+============================+============+
537 | dav://host/path | | cadaver |
538 | :Nread dav://host/path | :Nwrite dav://host/path | cadaver |
539 +---------------------------------+----------------------------+------------+
541 | davs://host/path | | cadaver |
542 | :Nread davs://host/path | :Nwrite davs://host/path | cadaver |
543 +---------------------------------+----------------------------+------------+
545 | fetch://[user@]host/path | | |
546 | fetch://[user@]host:http/path | Not Available | fetch |
547 | :Nread fetch://[user@]host/path| | |
548 +---------------------------------+----------------------------+------------+
550 | file:///* | file:///* | |
551 | file://localhost/* | file://localhost/* | |
552 +---------------------------------+----------------------------+------------+
553 | FTP: (*3) | (*3) | |
554 | ftp://[user@]host/path | ftp://[user@]host/path | ftp (*2) |
555 | :Nread ftp://host/path | :Nwrite ftp://host/path | ftp+.netrc |
556 | :Nread host path | :Nwrite host path | ftp+.netrc |
557 | :Nread host uid pass path | :Nwrite host uid pass path | ftp |
558 +---------------------------------+----------------------------+------------+
559 | HTTP: wget is executable: (*4) | | |
560 | http://[user@]host/path | Not Available | wget |
561 +---------------------------------+----------------------------+------------+
562 | HTTP: fetch is executable (*4) | | |
563 | http://[user@]host/path | Not Available | fetch |
564 +---------------------------------+----------------------------+------------+
566 | rcp://[user@]host/path | rcp://[user@]host/path | rcp |
567 +---------------------------------+----------------------------+------------+
569 | rsync://[user@]host/path | rsync://[user@]host/path | rsync |
570 | :Nread rsync://host/path | :Nwrite rsync://host/path | rsync |
571 | :Nread rcp://host/path | :Nwrite rcp://host/path | rcp |
572 +---------------------------------+----------------------------+------------+
574 | scp://[user@]host/path | scp://[user@]host/path | scp |
575 | :Nread scp://host/path | :Nwrite scp://host/path | scp (*1) |
576 +---------------------------------+----------------------------+------------+
578 | sftp://[user@]host/path | sftp://[user@]host/path | sftp |
579 | :Nread sftp://host/path | :Nwrite sftp://host/path | sftp (*1) |
580 +=================================+============================+============+
582 (*1) For an absolute path use scp://machine//path.
584 (*2) if <.netrc> is present, it is assumed that it will
585 work with your ftp client. Otherwise the script will
586 prompt for user-id and password.
588 (*3) for ftp, "machine" may be machine#port or machine:port
589 if a different port is needed than the standard ftp port
591 (*4) for http:..., if wget is available it will be used. Otherwise,
592 if fetch is available it will be used.
594 Both the :Nread and the :Nwrite ex-commands can accept multiple filenames.
599 The <.netrc> file, typically located in your home directory, contains lines
600 therein which map a hostname (machine name) to the user id and password you
601 prefer to use with it.
603 The typical syntax for lines in a <.netrc> file is given as shown below.
604 Ftp under Unix usually supports <.netrc>; ftp under Windows usually doesn't.
606 machine {full machine name} login {user-id} password "{password}"
607 default login {user-id} password "{password}"
609 Your ftp client must handle the use of <.netrc> on its own, but if the
610 <.netrc> file exists, an ftp transfer will not ask for the user-id or
614 Since this file contains passwords, make very sure nobody else can
615 read this file! Most programs will refuse to use a .netrc that is
616 readable for others. Don't forget that the system administrator can
617 still read the file! Ie. for Linux/Unix: chmod 600 .netrc
620 PASSWORD *netrw-passwd*
622 The script attempts to get passwords for ftp invisibly using |inputsecret()|,
623 a built-in Vim function. See |netrw-userpass| for how to change the password
624 after one has set it.
626 Unfortunately there doesn't appear to be a way for netrw to feed a password to
627 scp. Thus every transfer via scp will require re-entry of the password.
628 However, |netrw-ssh-hack| can help with this problem.
631 ==============================================================================
632 5. Activation *netrw-activate* {{{1
634 Network-oriented file transfers are available by default whenever Vim's
635 |'nocompatible'| mode is enabled. Netrw's script files reside in your
636 system's plugin, autoload, and syntax directories; just the
637 plugin/netrwPlugin.vim script is sourced automatically whenever you bring up
638 vim. The main script in autoload/netrw.vim is only loaded when you actually
639 use netrw. I suggest that, at a minimum, you have at least the following in
640 your <.vimrc> customization file: >
644 filetype plugin indent on
648 ==============================================================================
649 6. Transparent Remote File Editing *netrw-transparent* {{{1
651 Transparent file transfers occur whenever a regular file read or write
652 (invoked via an |:autocmd| for |BufReadCmd|, |BufWriteCmd|, or |SourceCmd|
653 events) is made. Thus one may read, write, or source files across networks
654 just as easily as if they were local files! >
656 vim ftp://[user@]machine/path
660 See |netrw-activate| for more on how to encourage your vim to use plugins
664 ==============================================================================
665 7. Ex Commands *netrw-ex* {{{1
667 The usual read/write commands are supported. There are also a few
668 additional commands available. Often you won't need to use Nwrite or
669 Nread as shown in |netrw-transparent| (ie. simply use >
673 instead, as appropriate) -- see |netrw-urls|. In the explanations
674 below, a {netfile} is an url to a remote file.
677 :[range]Nw[rite] Write the specified lines to the current
678 file as specified in b:netrw_lastfile.
679 (related: |netrw-nwrite|)
681 :[range]Nw[rite] {netfile} [{netfile}]...
682 Write the specified lines to the {netfile}.
685 :Nr[ead] Read the lines from the file specified in b:netrw_lastfile
686 into the current buffer. (related: |netrw-nread|)
688 :Nr[ead] {netfile} {netfile}...
689 Read the {netfile} after the current line.
693 Source the {netfile}.
694 To start up vim using a remote .vimrc, one may use
695 the following (all on one line) (tnx to Antoine Mechelynck) >
697 --cmd "runtime plugin/netrwPlugin.vim"
698 --cmd "source scp://HOSTNAME/.vimrc"
699 < (related: |netrw-source|)
701 :call NetUserPass() *NetUserPass()*
702 If g:netrw_uid and s:netrw_passwd don't exist,
703 this function will query the user for them.
704 (related: |netrw-userpass|)
706 :call NetUserPass("userid")
707 This call will set the g:netrw_uid and, if
708 the password doesn't exist, will query the user for it.
709 (related: |netrw-userpass|)
711 :call NetUserPass("userid","passwd")
712 This call will set both the g:netrw_uid and s:netrw_passwd.
713 The user-id and password are used by ftp transfers. One may
714 effectively remove the user-id and password by using empty
716 (related: |netrw-userpass|)
718 :NetrwSettings This command is described in |netrw-settings| -- used to
719 display netrw settings and change netrw behavior.
722 ==============================================================================
723 8. Variables and Options *netrw-settings* {{{1
725 (also see: |netrw-options| |netrw-variables| |netrw-protocol|
726 |netrw-browser-settings| |netrw-browser-options|
727 |netrw-browser-var| )
729 The <netrw.vim> script provides several variables which act as options to
730 affect <netrw.vim>'s file transfer behavior. These variables typically may be
731 set in the user's <.vimrc> file: (see also |netrw-settings| |netrw-protocol|)
738 -------------- -----------------------------------------------
740 b:netrw_col Holds current cursor position (during NetWrite)
741 g:netrw_cygwin =1 assume scp under windows is from cygwin
743 =0 assume scp under windows accepts windows
744 style paths (default/else)
745 g:netrw_ftp =0 use default ftp (uid password)
746 g:netrw_ftpmode ="binary" (default)
747 ="ascii" (your choice)
748 g:netrw_ignorenetrc =1 (default)
749 if you have a <.netrc> file but you don't
750 want it used, then set this variable. Its
751 mere existence is enough to cause <.netrc>
753 b:netrw_lastfile Holds latest method/machine/path.
754 b:netrw_line Holds current line number (during NetWrite)
755 g:netrw_silent =0 transfers done normally
756 =1 transfers done silently
757 g:netrw_uid Holds current user-id for ftp.
758 g:netrw_use_nt_rcp =0 don't use WinNT/2K/XP's rcp (default)
759 =1 use WinNT/2K/XP's rcp, binary mode
760 g:netrw_win95ftp =0 use unix-style ftp even if win95/98/ME/etc
761 =1 use default method to do ftp >
762 -----------------------------------------------------------------------
764 *netrw-internal-variables*
765 The script will also make use of the following variables internally, albeit
772 -------- ------------------------------------
774 b:netrw_method Index indicating rcp/ftp+.netrc/ftp
775 w:netrw_method (same as b:netrw_method)
776 g:netrw_machine Holds machine name parsed from input
777 b:netrw_fname Holds filename being accessed >
778 ------------------------------------------------------------
782 Netrw supports a number of protocols. These protocols are invoked using the
783 variables listed below, and may be modified by the user.
785 ------------------------
786 Protocol Control Options
787 ------------------------
788 Option Type Setting Meaning
789 --------- -------- -------------- ---------------------------
791 netrw_ftp variable =doesn't exist userid set by "user userid"
792 =0 userid set by "user userid"
793 =1 userid set by "userid"
794 NetReadFixup function =doesn't exist no change
795 =exists Allows user to have files
796 read via ftp automatically
797 transformed however they wish
799 g:netrw_dav_cmd variable ="cadaver" if cadaver is executable
800 g:netrw_dav_cmd variable ="curl -o" elseif curl is executable
801 g:netrw_fetch_cmd variable ="fetch -o" if fetch is available
802 g:netrw_ftp_cmd variable ="ftp"
803 g:netrw_http_cmd variable ="fetch -o" if fetch is available
804 g:netrw_http_cmd variable ="wget -O" else if wget is available
805 g:netrw_list_cmd variable ="ssh USEPORT HOSTNAME ls -Fa"
806 g:netrw_rcp_cmd variable ="rcp"
807 g:netrw_rsync_cmd variable ="rsync -a"
808 g:netrw_scp_cmd variable ="scp -q"
809 g:netrw_sftp_cmd variable ="sftp" >
810 -------------------------------------------------------------------------
814 The g:netrw_..._cmd options (|g:netrw_ftp_cmd| and |g:netrw_sftp_cmd|)
815 specify the external program to use handle the ftp protocol. They may
816 include command line options (such as -p for passive mode). Example: >
818 let g:netrw_ftp_cmd= "ftp -p"
820 Browsing is supported by using the |g:netrw_list_cmd|; the substring
821 "HOSTNAME" will be changed via substitution with whatever the current request
824 Two options (|g:netrw_ftp| and |netrw-fixup|) both help with certain ftp's
825 that give trouble . In order to best understand how to use these options if
826 ftp is giving you troubles, a bit of discussion is provided on how netrw does
829 For ftp, netrw typically builds up lines of one of the following formats in a
832 IF g:netrw_ftp !exists or is not 1 IF g:netrw_ftp exists and is 1
833 ---------------------------------- ------------------------------
835 open machine [port] open machine [port]
836 user userid password userid password
837 [g:netrw_ftpmode] password
838 [g:netrw_ftpextracmd] [g:netrw_ftpmode]
839 get filename tempfile [g:netrw_extracmd]
840 get filename tempfile >
841 ---------------------------------------------------------------------
843 The |g:netrw_ftpmode| and |g:netrw_ftpextracmd| are optional.
845 Netrw then executes the lines above by use of a filter:
847 :%! {g:netrw_ftp_cmd} -i [-n]
850 g:netrw_ftp_cmd is usually "ftp",
851 -i tells ftp not to be interactive
852 -n means don't use netrc and is used for Method #3 (ftp w/o <.netrc>)
854 If <.netrc> exists it will be used to avoid having to query the user for
855 userid and password. The transferred file is put into a temporary file.
856 The temporary file is then read into the main editing session window that
857 requested it and the temporary file deleted.
859 If your ftp doesn't accept the "user" command and immediately just demands a
860 userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
863 To handle the SSL certificate dialog for untrusted servers, one may pull
864 down the certificate and place it into /usr/ssl/cert.pem. This operation
865 renders the server treatment as "trusted".
867 *netrw-fixup* *netreadfixup*
868 If your ftp for whatever reason generates unwanted lines (such as AUTH
869 messages) you may write a NetReadFixup() function:
871 function! NetReadFixup(method,line1,line2)
872 " a:line1: first new line in current file
873 " a:line2: last new line in current file
874 if a:method == 1 "rcp
875 elseif a:method == 2 "ftp + <.netrc>
876 elseif a:method == 3 "ftp + machine,uid,password,filename
877 elseif a:method == 4 "scp
878 elseif a:method == 5 "http/wget
879 elseif a:method == 6 "dav/cadaver
880 elseif a:method == 7 "rsync
881 elseif a:method == 8 "fetch
882 elseif a:method == 9 "sftp
887 The NetReadFixup() function will be called if it exists and thus allows you to
888 customize your reading process. As a further example, <netrw.vim> contains
889 just such a function to handle Windows 95 ftp. For whatever reason, Windows
890 95's ftp dumps four blank lines at the end of a transfer, and so it is
891 desirable to automate their removal. Here's some code taken from <netrw.vim>
894 if has("win95") && g:netrw_win95ftp
895 fun! NetReadFixup(method, line1, line2)
896 if method == 3 " ftp (no <.netrc>)
897 let fourblanklines= line2 - 3
898 silent fourblanklines.",".line2."g/^\s*/d"
904 ==============================================================================
905 9. Browsing *netrw-browsing* *netrw-browse* *netrw-help* {{{1
906 *netrw-browser* *netrw-dir* *netrw-list*
908 INTRODUCTION TO BROWSING *netrw-intro-browse* {{{2
909 (Quick References: |netrw-quickmaps| |netrw-quickcoms|)
911 Netrw supports the browsing of directories on your local system and on remote
912 hosts; browsing includes listing files and directories, entering directories,
913 editing files therein, deleting files/directories, making new directories,
914 moving (renaming) files and directories, copying files and directories, etc.
915 One may mark files and execute any system command on them! The Netrw browser
916 generally implements the previous explorer's maps and commands for remote
917 directories, although details (such as pertinent global variable names)
918 necessarily differ. To browse a directory, simply "edit" it! >
922 vim c:\your\directory\
924 (Related topics: |netrw-cr| |netrw-o| |netrw-p| |netrw-P| |netrw-t|
925 |netrw-mf| |netrw-mx| |netrw-D| |netrw-R| |netrw-v| )
927 The Netrw remote file and directory browser handles two protocols: ssh and
928 ftp. The protocol in the url, if it is ftp, will cause netrw also to use ftp
929 in its remote browsing. Specifying any other protocol will cause it to be
930 used for file transfers; but the ssh protocol will be used to do remote
933 To use Netrw's remote directory browser, simply attempt to read a "file" with
934 a trailing slash and it will be interpreted as a request to list a directory:
936 vim [protocol]://[user@]hostname/path/
938 where [protocol] is typically scp or ftp. As an example, try: >
940 vim ftp://ftp.home.vim.org/pub/vim/
942 For local directories, the trailing slash is not required. Again, because it's
943 easy to miss: to browse remote directories, the url must terminate with a
946 If you'd like to avoid entering the password repeatedly for remote directory
947 listings with ssh or scp, see |netrw-ssh-hack|. To avoid password entry with
948 ftp, see |netrw-netrc| (if your ftp supports it).
950 There are several things you can do to affect the browser's display of files:
952 * To change the listing style, press the "i" key (|netrw-i|).
953 Currently there are four styles: thin, long, wide, and tree.
954 To make that change "permanent", see |g:netrw_liststyle|.
956 * To hide files (don't want to see those xyz~ files anymore?) see
959 * Press s to sort files by name, time, or size.
961 See |netrw-browse-cmds| for all the things you can do with netrw!
963 *netrw-getftype* *netrw-filigree* *netrw-ftype*
964 The |getftype()| function is used to append a bit of filigree to indicate
965 filetype to locally listed files:
973 The filigree also affects the |g:netrw_sort_sequence|.
976 QUICK HELP *netrw-quickhelp* {{{2
977 (Use ctrl-] to select a topic)~
978 Intro to Browsing...............................|netrw-intro-browse|
979 Quick Reference: Maps.........................|netrw-quickmap|
980 Quick Reference: Commands.....................|netrw-browse-cmds|
982 Edit hiding list..............................|netrw-ctrl-h|
983 Hiding Files or Directories...................|netrw-a|
984 Hiding/Unhiding by suffix.....................|netrw-mh|
985 Hiding dot-files.............................|netrw-gh|
987 Select listing style (thin/long/wide/tree)....|netrw-i|
988 Associated setting variable...................|g:netrw_liststyle|
989 Shell command used to perform listing.........|g:netrw_list_cmd|
990 Quick file info...............................|netrw-qf|
992 Select sorting style (name/time/size).........|netrw-s|
993 Editing the sorting sequence..................|netrw-S|
994 Sorting options...............................|g:netrw_sort_options|
995 Associated setting variable...................|g:netrw_sort_sequence|
996 Reverse sorting order.........................|netrw-r|
999 *netrw-quickmap* *netrw-quickmaps*
1000 QUICK REFERENCE: MAPS *netrw-browse-maps* {{{2
1002 --- ----------------- ----
1003 Map Quick Explanation Link
1004 --- ----------------- ----
1005 < <F1> Causes Netrw to issue help
1006 <cr> Netrw will enter the directory or read the file |netrw-cr|
1007 <del> Netrw will attempt to remove the file/directory |netrw-del|
1008 - Makes Netrw go up one directory |netrw--|
1009 a Toggles between normal display, |netrw-a|
1010 hiding (suppress display of files matching g:netrw_list_hide)
1011 showing (display only files which match g:netrw_list_hide)
1012 c Make browsing directory the current directory |netrw-c|
1013 C Setting the editing window |netrw-C|
1014 d Make a directory |netrw-d|
1015 D Attempt to remove the file(s)/directory(ies) |netrw-D|
1016 gb Go to previous bookmarked directory |netrw-gb|
1017 gh Quick hide/unhide of dot-files |netrw-gh|
1018 <c-h> Edit file hiding list |netrw-ctrl-h|
1019 i Cycle between thin, long, wide, and tree listings |netrw-i|
1020 <c-l> Causes Netrw to refresh the directory listing |netrw-ctrl-l|
1021 mb Bookmark current directory |netrw-mb|
1022 mc Copy marked files to marked-file target directory |netrw-mc|
1023 md Apply diff to marked files (up to 3) |netrw-md|
1024 me Place marked files on arg list and edit them |netrw-me|
1025 mf Mark a file |netrw-mf|
1026 mh Toggle marked file suffices' presence on hiding list |netrw-mh|
1027 mm Move marked files to marked-file target directory |netrw-mm|
1028 mp Print marked files |netrw-mp|
1029 mr Mark files satisfying a shell-style |regexp| |netrw-mr|
1030 mt Current browsing directory becomes markfile target |netrw-mt|
1031 mT Apply ctags to marked files |netrw-mT|
1032 mu Unmark all marked files |netrw-mu|
1033 mx Apply arbitrary shell command to marked files |netrw-mx|
1034 mz Compress/decompress marked files |netrw-mz|
1035 o Enter the file/directory under the cursor in a new |netrw-o|
1036 browser window. A horizontal split is used.
1037 O Obtain a file specified by cursor |netrw-O|
1038 p Preview the file |netrw-p|
1039 P Browse in the previously used window |netrw-P|
1040 qb List bookmarked directories and history |netrw-qb|
1041 qf Display information on file |netrw-qf|
1042 r Reverse sorting order |netrw-r|
1043 R Rename the designed file(s)/directory(ies) |netrw-R|
1044 s Select sorting style: by name, time, or file size |netrw-s|
1045 S Specify suffix priority for name-sorting |netrw-S|
1046 t Enter the file/directory under the cursor in a new tab|netrw-t|
1047 u Change to recently-visited directory |netrw-u|
1048 U Change to subsequently-visited directory |netrw-U|
1049 v Enter the file/directory under the cursor in a new |netrw-v|
1050 browser window. A vertical split is used.
1051 x View file with an associated program |netrw-x|
1053 % Open a new file in netrw's current directory |netrw-%|
1055 *netrw-mouse* *netrw-leftmouse* *netrw-middlemouse* *netrw-rightmouse*
1056 <leftmouse> (gvim only) selects word under mouse as if a <cr>
1057 had been pressed (ie. edit file, change directory)
1058 <middlemouse> (gvim only) same as P selecting word under mouse;
1060 <rightmouse> (gvim only) delete file/directory using word under
1062 <2-leftmouse> (gvim only) when:
1063 * in a netrw-selected file, AND
1064 * |g:netrw_retmap| == 1 AND
1065 * the user doesn't already have a <2-leftmouse> mapping
1066 defined before netrw is autoloaded,
1067 then a double clicked leftmouse button will return
1068 to the netrw browser window. See |g:netrw_retmap|.
1069 <s-leftmouse> (gvim only) like mf, will mark files
1071 (to disable mouse buttons while browsing: |g:netrw_mousemaps|)
1073 *netrw-quickcom* *netrw-quickcoms*
1074 QUICK REFERENCE: COMMANDS *netrw-explore-cmds* *netrw-browse-cmds* {{{2
1075 :NetrwClean[!] ...........................................|netrw-clean|
1076 :NetrwSettings ...........................................|netrw-settings|
1077 :Explore[!] [dir] Explore directory of current file......|netrw-explore|
1078 :Hexplore[!] [dir] Horizontal Split & Explore.............|netrw-explore|
1079 :Nexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1080 :Pexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1081 :Rexplore Return to Explorer.....................|netrw-explore|
1082 :Sexplore[!] [dir] Split & Explore directory .............|netrw-explore|
1083 :Texplore[!] [dir] Tab & Explore..........................|netrw-explore|
1084 :Vexplore[!] [dir] Vertical Split & Explore...............|netrw-explore|
1086 BOOKMARKING A DIRECTORY *netrw-mb* *netrw-bookmark* *netrw-bookmarks* {{{2
1088 One may easily "bookmark" a directory by using >
1092 Bookmarks are retained in between sessions in a $HOME/.netrwbook file, and are
1093 kept in sorted order.
1096 |netrw-gb| how to return (go) to a bookmark
1097 |netrw-mB| how to delete bookmarks
1098 |netrw-qb| how to list bookmarks
1101 BROWSING *netrw-cr* {{{2
1103 Browsing is simple: move the cursor onto a file or directory of interest.
1104 Hitting the <cr> (the return key) will select the file or directory.
1105 Directories will themselves be listed, and files will be opened using the
1106 protocol given in the original read request.
1108 CAVEAT: There are four forms of listing (see |netrw-i|). Netrw assumes that
1109 two or more spaces delimit filenames and directory names for the long and
1110 wide listing formats. Thus, if your filename or directory name has two or
1111 more sequential spaces embedded in it, or any trailing spaces, then you'll
1112 need to use the "thin" format to select it.
1114 The |g:netrw_browse_split| option, which is zero by default, may be used to
1115 cause the opening of files to be done in a new window or tab instead of the
1116 default. When the option is one or two, the splitting will be taken
1117 horizontally or vertically, respectively. When the option is set to three, a
1118 <cr> will cause the file to appear in a new tab.
1121 When using the gui (gvim), one may select a file by pressing the <leftmouse>
1122 button. In addition, if
1124 *|g:netrw_retmap| == 1 AND (its default value is 0)
1125 * in a netrw-selected file, AND
1126 * the user doesn't already have a <2-leftmouse> mapping defined before
1129 then a doubly-clicked leftmouse button will return to the netrw browser
1132 Netrw attempts to speed up browsing, especially for remote browsing where one
1133 may have to enter passwords, by keeping and re-using previously obtained
1134 directory listing buffers. The |g:netrw_fastbrowse| variable is used to
1135 control this behavior; one may have slow browsing (no buffer re-use), medium
1136 speed browsing (re-use directory buffer listings only for remote directories),
1137 and fast browsing (re-use directory buffer listings as often as possible).
1138 The price for such re-use is that when changes are made (such as new files
1139 are introduced into a directory), the listing may become out-of-date. One may
1140 always refresh directory listing buffers by pressing ctrl-L (see
1144 Related topics: |netrw-o| |netrw-p| |netrw-P| |netrw-t| |netrw-v|
1145 Associated setting variables: |g:netrw_browse_split| |g:netrw_fastbrowse|
1146 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1147 |g:netrw_ftp_timelist_cmd| |g:netrw_ssh_cmd|
1148 |g:netrw_ssh_browse_reject| |g:netrw_use_noswf|
1151 BROWSING WITH A HORIZONTALLY SPLIT WINDOW *netrw-o* *netrw-horiz* {{{2
1153 Normally one enters a file or directory using the <cr>. However, the "o" map
1154 allows one to open a new window to hold the new directory listing or file. A
1155 horizontal split is used. (for vertical splitting, see |netrw-v|)
1157 Normally, the o key splits the window horizontally with the new window and
1160 Associated setting variables: |g:netrw_alto| |g:netrw_winsize|
1162 Related Actions |netrw-cr| |netrw-p| |netrw-t| |netrw-T| |netrw-v|
1163 Associated setting variables:
1164 |g:netrw_alto| control above/below splitting
1165 |g:netrw_winsize| control initial sizing
1167 BROWSING WITH A NEW TAB *netrw-t* *netrw-T* {{{2
1169 Normally one enters a file or directory using the <cr>. The "t" map
1170 allows one to open a new window holding the new directory listing or file in
1171 a new tab. The "T" version puts the file or directory into a background tab
1174 Related Actions |netrw-cr| |netrw-o| |netrw-p| |netrw-v|
1175 Associated setting variables:
1176 |g:netrw_winsize| control initial sizing
1178 BROWSING WITH A VERTICALLY SPLIT WINDOW *netrw-v* {{{2
1180 Normally one enters a file or directory using the <cr>. However, the "v" map
1181 allows one to open a new window to hold the new directory listing or file. A
1182 vertical split is used. (for horizontal splitting, see |netrw-o|)
1184 Normally, the v key splits the window vertically with the new window and
1187 There is only one tree listing buffer; using "v" on a displayed subdirectory
1188 will split the screen, but the same buffer will be shown twice.
1190 Associated setting variable: |g:netrw_altv| |g:netrw_winsize|
1192 Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-T| |netrw-v|
1193 Associated setting variables:
1194 |g:netrw_altv| control right/left splitting
1195 |g:netrw_winsize| control initial sizing
1198 CHANGE LISTING STYLE (THIN LONG WIDE TREE) *netrw-i* {{{2
1200 The "i" map cycles between the thin, long, wide, and tree listing formats.
1202 The thin listing format gives just the files' and directories' names.
1204 The long listing is either based on the "ls" command via ssh for remote
1205 directories or displays the filename, file size (in bytes), and the time and
1206 date of last modification for local directories. With the long listing
1207 format, netrw is not able to recognize filenames which have trailing spaces.
1208 Use the thin listing format for such files.
1210 The wide listing format uses two or more contiguous spaces to delineate
1211 filenames; when using that format, netrw won't be able to recognize or use
1212 filenames which have two or more contiguous spaces embedded in the name or any
1213 trailing spaces. The thin listing format will, however, work with such files.
1214 This listing format is the most compact.
1216 The tree listing format has a top directory followed by files and directories
1217 preceded by a "|". One may open and close directories by pressing the <cr>
1218 key while atop the directory name.
1220 One may make a preferred listing style your default; see |g:netrw_liststyle|.
1221 As an example, by putting the following line in your .vimrc, >
1222 let g:netrw_liststyle= 4
1223 the tree style will become your default listing style.
1225 Associated setting variables: |g:netrw_liststyle| |g:netrw_maxfilenamelen|
1226 |g:netrw_timefmt| |g:netrw_list_cmd|
1228 CHANGE FILE PERMISSION *netrw-gp* {{{2
1230 "gp" will ask you for a new permission for the file named under the cursor.
1231 Currently, this only works for local files.
1233 Associated setting variables: |g:netrw_chgperm|
1236 CHANGING TO A BOOKMARKED DIRECTORY *netrw-gb* {{{2
1238 To change directory back to a bookmarked directory, use
1242 Any count may be used to reference any of the bookmarks.
1245 |netrw-mB| how to delete bookmarks
1246 |netrw-mb| how to make a bookmark
1247 |netrw-qb| how to list bookmarks
1250 CHANGING TO A PREDECESSOR DIRECTORY *netrw-u* *netrw-updir* {{{2
1252 Every time you change to a new directory (new for the current session),
1253 netrw will save the directory in a recently-visited directory history
1254 list (unless |g:netrw_dirhistmax| is zero; by default, it's ten). With the
1255 "u" map, one can change to an earlier directory (predecessor). To do
1256 the opposite, see |netrw-U|.
1259 CHANGING TO A SUCCESSOR DIRECTORY *netrw-U* *netrw-downdir* {{{2
1261 With the "U" map, one can change to a later directory (successor).
1262 This map is the opposite of the "u" map. (see |netrw-u|) Use the
1263 q map to list both the bookmarks and history. (see |netrw-qb|)
1266 NETRW CLEAN *netrw-clean* *:NetrwClean*
1268 With :NetrwClean one may easily remove netrw from one's home directory;
1269 more precisely, from the first directory on your |'runtimepath'|.
1271 With :NetrwClean!, netrw will remove netrw from all directories on your
1274 With either form of the command, netrw will first ask for confirmation
1275 that the removal is in fact what you want to do. If netrw doesn't have
1276 permission to remove a file, it will issue an error message.
1279 CUSTOMIZING BROWSING WITH A USER FUNCTION *netrw-x* *netrw-handler* {{{2
1280 (also see |netrw_filehandler|)
1282 Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
1283 best seen with a special handler (ie. a tool provided with your computer).
1284 Netrw allows one to invoke such special handlers by: >
1286 * when Exploring, hit the "x" key
1287 * when editing, hit gx with the cursor atop the special filename
1288 < (not available if the |g:netrw_nogx| variable exists)
1290 Netrw determines which special handler by the following method:
1292 * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
1293 view files. Examples of useful settings (place into your <.vimrc>): >
1295 :let g:netrw_browsex_viewer= "kfmclient exec"
1297 :let g:netrw_browsex_viewer= "gnome-open"
1299 If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
1300 invoked first (see |netrw_filehandler|).
1302 * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.
1303 * for Gnome (with gnome-open): gnome-open is used.
1304 * for KDE (with kfmclient) : kfmclient is used.
1305 * for Mac OS X : open is used.
1306 * otherwise the netrwFileHandler plugin is used.
1308 The file's suffix is used by these various approaches to determine an
1309 appropriate application to use to "handle" these files. Such things as
1310 OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
1311 *.eps) can be handled.
1315 The "x" map applies a function to a file, based on its extension. Of course,
1316 the handler function must exist for it to be called!
1319 NFH_html("scp://user@host/some/path/mypgm.html")
1321 Users may write their own netrw File Handler functions to support more
1322 suffixes with special handling. See <autoload/netrwFileHandlers.vim> for
1323 examples on how to make file handler functions. As an example: >
1325 " NFH_suffix(filename)
1326 fun! NFH_suffix(filename)
1327 ..do something special with filename..
1330 These functions need to be defined in some file in your .vim/plugin
1331 (vimfiles\plugin) directory. Vim's function names may not have punctuation
1332 characters (except for the underscore) in them. To support suffices that
1333 contain such characters, netrw will first convert the suffix using the
1336 @ -> AT ! -> EXCLAMATION % -> PERCENT
1337 : -> COLON = -> EQUAL ? -> QUESTION
1338 , -> COMMA - -> MINUS ; -> SEMICOLON
1339 $ -> DOLLAR + -> PLUS ~ -> TILDE
1343 file.rcs,v -> NFH_rcsCOMMAv()
1345 If more such translations are necessary, please send me email: >
1346 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
1349 Associated setting variable: |g:netrw_browsex_viewer|
1352 DELETING BOOKMARKS *netrw-mB* {{{2
1354 To delete a bookmark, use >
1359 |netrw-gb| how to return (go) to a bookmark
1360 |netrw-mb| how to make a bookmark
1361 |netrw-qb| how to list bookmarks
1364 DELETING FILES OR DIRECTORIES *netrw-delete* *netrw-D* *netrw-del* {{{2
1366 If files have not been marked with |netrw-mf|: (local marked file list)
1368 Deleting/removing files and directories involves moving the cursor to the
1369 file/directory to be deleted and pressing "D". Directories must be empty
1370 first before they can be successfully removed. If the directory is a
1371 softlink to a directory, then netrw will make two requests to remove the
1372 directory before succeeding. Netrw will ask for confirmation before doing
1373 the removal(s). You may select a range of lines with the "V" command
1374 (visual selection), and then pressing "D".
1376 If files have been marked with |netrw-mf|: (local marked file list)
1378 Marked files (and empty directories) will be deleted; again, you'll be
1379 asked to confirm the deletion before it actually takes place.
1381 The |g:netrw_rm_cmd|, |g:netrw_rmf_cmd|, and |g:netrw_rmdir_cmd| variables are
1382 used to control the attempts to remove files and directories. The
1383 g:netrw_rm_cmd is used with files, and its default value is:
1385 g:netrw_rm_cmd: ssh HOSTNAME rm
1387 The g:netrw_rmdir_cmd variable is used to support the removal of directories.
1388 Its default value is:
1390 g:netrw_rmdir_cmd: ssh HOSTNAME rmdir
1392 If removing a directory fails with g:netrw_rmdir_cmd, netrw then will attempt
1393 to remove it again using the g:netrw_rmf_cmd variable. Its default value is:
1395 g:netrw_rmf_cmd: ssh HOSTNAME rm -f
1397 Related topics: |netrw-d|
1398 Associated setting variable: |g:netrw_local_rmdir| |g:netrw_rm_cmd|
1399 |g:netrw_rmdir_cmd| |g:netrw_ssh_cmd|
1402 *netrw-explore* *netrw-hexplore* *netrw-nexplore* *netrw-pexplore*
1403 *netrw-rexplore* *netrw-sexplore* *netrw-texplore* *netrw-vexplore*
1404 DIRECTORY EXPLORATION COMMANDS {{{2
1406 :[N]Explore[!] [dir]... Explore directory of current file *:Explore*
1407 :[N]Hexplore[!] [dir]... Horizontal Split & Explore *:Hexplore*
1408 :Rexplore ... Return to Explorer *:Rexplore*
1409 :[N]Sexplore[!] [dir]... Split&Explore current file's directory *:Sexplore*
1410 :Texplore [dir]... Tab & Explore *:Texplore*
1411 :[N]Vexplore[!] [dir]... Vertical Split & Explore *:Vexplore*
1413 Used with :Explore **/pattern : (also see |netrw-starstar|)
1414 :Nexplore............. go to next matching file *:Nexplore*
1415 :Pexplore............. go to previous matching file *:Pexplore*
1417 :Explore will open the local-directory browser on the current file's
1418 directory (or on directory [dir] if specified). The window will be
1419 split only if the file has been modified, otherwise the browsing
1420 window will take over that window. Normally the splitting is taken
1422 :Explore! is like :Explore, but will use vertical splitting.
1423 :Sexplore will always split the window before invoking the local-directory
1424 browser. As with Explore, the splitting is normally done
1426 :Sexplore! [dir] is like :Sexplore, but the splitting will be done vertically.
1427 :Hexplore [dir] does an :Explore with |:belowright| horizontal splitting.
1428 :Hexplore! [dir] does an :Explore with |:aboveleft| horizontal splitting.
1429 :Vexplore [dir] does an :Explore with |:leftabove| vertical splitting.
1430 :Vexplore! [dir] does an :Explore with |:rightbelow| vertical splitting.
1431 :Texplore [dir] does a tabnew before generating the browser window
1433 By default, these commands use the current file's directory. However, one may
1434 explicitly provide a directory (path) to use.
1436 The [N] will override |g:netrw_winsize| to specify the quantity of rows and/or
1437 columns the new explorer window should have.
1439 Otherwise, the |g:netrw_winsize| variable, if it has been specified by the
1440 user, is used to control the quantity of rows and/or columns new explorer
1441 windows should have.
1443 :Rexplore This command is a little different from the others. When one
1444 edits a file, for example by pressing <cr> when atop a file in
1445 a netrw browser window, :Rexplore will return the display to
1446 that of the last netrw browser window. It is a command version
1447 of the <2-leftmouse> map (which is only available under gvim and
1451 *netrw-star* *netrw-starpat* *netrw-starstar* *netrw-starstarpat*
1452 EXPLORING WITH STARS AND PATTERNS
1454 When Explore, Sexplore, Hexplore, or Vexplore are used with one of the
1455 following four styles, Explore generates a list of files which satisfy
1458 */filepat files in current directory which satisfy filepat
1459 **/filepat files in current directory or below which satisfy the
1461 *//pattern files in the current directory which contain the
1462 pattern (vimgrep is used)
1463 **//pattern files in the current directory or below which contain
1464 the pattern (vimgrep is used)
1466 The cursor will be placed on the first file in the list. One may then
1467 continue to go to subsequent files on that list via |:Nexplore| or to
1468 preceding files on that list with |:Pexplore|. Explore will update the
1469 directory and place the cursor appropriately.
1473 will clear the explore list.
1475 If your console or gui produces recognizable shift-up or shift-down sequences,
1476 then you'll likely find using shift-downarrow and shift-uparrow convenient.
1477 They're mapped by netrw:
1479 <s-down> == Nexplore, and
1482 As an example, consider
1489 The status line will show, on the right hand side of the status line, a
1490 message like "Match 3 of 20".
1492 Associated setting variables: |g:netrw_keepdir| |g:netrw_browse_split|
1493 |g:netrw_fastbrowse| |g:netrw_ftp_browse_reject|
1494 |g:netrw_ftp_list_cmd| |g:netrw_ftp_sizelist_cmd|
1495 |g:netrw_ftp_timelist_cmd| |g:netrw_list_cmd|
1499 DISPLAYING INFORMATION ABOUT FILE *netrw-qf* {{{2
1501 With the cursor atop a filename, pressing "qf" will reveal the file's size
1502 and last modification timestamp. Currently this capability is only available
1506 EDIT FILE OR DIRECTORY HIDING LIST *netrw-ctrl-h* *netrw-edithide* {{{2
1508 The "<ctrl-h>" map brings up a requestor allowing the user to change the
1509 file/directory hiding list contained in |g:netrw_list_hide|. The hiding list
1510 consists of one or more patterns delimited by commas. Files and/or
1511 directories satisfying these patterns will either be hidden (ie. not shown) or
1512 be the only ones displayed (see |netrw-a|).
1514 The "gh" mapping (see |netrw-gh|) quickly alternates between the usual
1515 hiding list and the hiding of files or directories that begin with ".".
1518 let g:netrw_list_hide= '\(^\|\s\s\)\zs\.\S\+'
1519 Effectively, this makes the effect of a |netrw-gh| command the initial setting.
1522 \(^\|\s\s\) : if the line begins with the following, -or-
1523 two consecutive spaces are encountered
1524 \zs : start the hiding match now
1525 \. : if it now begins with a dot
1526 \S\+ : and is followed by one or more non-whitespace
1529 Associated setting variables: |g:netrw_hide| |g:netrw_list_hide|
1530 Associated topics: |netrw-a| |netrw-gh| |netrw-mh|
1532 *netrw-sort-sequence*
1533 EDITING THE SORTING SEQUENCE *netrw-S* *netrw-sortsequence* {{{2
1535 When "Sorted by" is name, one may specify priority via the sorting sequence
1536 (g:netrw_sort_sequence). The sorting sequence typically prioritizes the
1537 name-listing by suffix, although any pattern will do. Patterns are delimited
1538 by commas. The default sorting sequence is (all one line):
1541 '[\/]$,\<core\%(\.\d\+\)\=,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,
1542 \.info$,\.swp$,\.bak$,\~$'
1545 '[\/]$,\.[a-np-z]$,\.h$,\.c$,\.cpp$,*,\.o$,\.obj$,\.info$,
1548 The lone * is where all filenames not covered by one of the other patterns
1549 will end up. One may change the sorting sequence by modifying the
1550 g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
1553 Related topics: |netrw-s| |netrw-S|
1554 Associated setting variables: |g:netrw_sort_sequence| |g:netrw_sort_options|
1557 FORCING TREATMENT AS A FILE OR DIRECTORY *netrw-gd* *netrw-gf* {{{2
1559 Remote symbolic links (ie. those listed via ssh or ftp) are problematic
1560 in that it is difficult to tell whether they link to a file or to a
1563 To force treatment as a file: use >
1566 To force treatment as a directory: use >
1570 GOING UP *netrw--* {{{2
1572 To go up a directory, press "-" or press the <cr> when atop the ../ directory
1573 entry in the listing.
1575 Netrw will use the command in |g:netrw_list_cmd| to perform the directory
1576 listing operation after changing HOSTNAME to the host specified by the
1577 user-provided url. By default netrw provides the command as:
1579 ssh HOSTNAME ls -FLa
1581 where the HOSTNAME becomes the [user@]hostname as requested by the attempt to
1582 read. Naturally, the user may override this command with whatever is
1583 preferred. The NetList function which implements remote browsing
1584 expects that directories will be flagged by a trailing slash.
1587 HIDING FILES OR DIRECTORIES *netrw-a* *netrw-hiding* {{{2
1589 Netrw's browsing facility allows one to use the hiding list in one of three
1590 ways: ignore it, hide files which match, and show only those files which
1593 If no files have been marked via |netrw-mf|:
1595 The "a" map allows the user to cycle through the three hiding modes.
1597 The |g:netrw_list_hide| variable holds a comma delimited list of patterns
1598 based on regular expressions (ex. ^.*\.obj$,^\.) which specify the hiding list.
1599 (also see |netrw-ctrl-h|) To set the hiding list, use the <c-h> map. As an
1600 example, to hide files which begin with a ".", one may use the <c-h> map to
1601 set the hiding list to '^\..*' (or one may put let g:netrw_list_hide= '^\..*'
1602 in one's <.vimrc>). One may then use the "a" key to show all files, hide
1603 matching files, or to show only the matching files.
1606 This hiding list command will hide/show all *.c and *.h files.
1609 This hiding list command will also hide/show all *.c and *.h
1612 Don't forget to use the "a" map to select the mode (normal/hiding/show) you
1615 If files have been marked using |netrw-mf|, then this command will:
1617 if showing all files or non-hidden files:
1618 modify the g:netrw_list_hide list by appending the marked files to it
1619 and showing only non-hidden files.
1621 else if showing hidden files only:
1622 modify the g:netrw_list_hide list by removing the marked files from it
1623 and showing only non-hidden files.
1626 *netrw-gh* *netrw-hide*
1627 As a quick shortcut, one may press >
1629 to toggle between hiding files which begin with a period (dot) and not hiding
1632 Associated setting variable: |g:netrw_list_hide|
1633 Associated topics: |netrw-a| |netrw-ctrl-h| |netrw-mh|
1635 IMPROVING BROWSING *netrw-listhack* *netrw-ssh-hack* {{{2
1637 Especially with the remote directory browser, constantly entering the password
1640 For Linux/Unix systems, the book "Linux Server Hacks - 100 industrial strength
1641 tips & tools" by Rob Flickenger (O'Reilly, ISBN 0-596-00461-3) gives a tip
1642 for setting up no-password ssh and scp and discusses associated security
1643 issues. It used to be available at http://hacks.oreilly.com/pub/h/66 ,
1644 but apparently that address is now being redirected to some "hackzine".
1645 I'll attempt a summary based on that article and on a communication from
1648 1. Generate a public/private key pair on the local machine
1651 (saving the file in ~/.ssh/id_rsa as prompted)
1653 2. Just hit the <CR> when asked for passphrase (twice) for no
1654 passphrase. If you do use a passphrase, you will also need to use
1655 ssh-agent so you only have to type the passphrase once per session.
1656 If you don't use a passphrase, simply logging onto your local
1657 computer or getting access to the keyfile in any way will suffice
1658 to access any ssh servers which have that key authorized for login.
1660 3. This creates two files: >
1664 4. On the target machine (ssh server): >
1669 5. On your local machine (ssh client): (one line) >
1670 ssh {serverhostname}
1671 cat '>>' '~/.ssh/authorized_keys2' < ~/.ssh/id_rsa.pub
1673 or, for OpenSSH, (one line) >
1674 ssh {serverhostname}
1675 cat '>>' '~/.ssh/authorized_keys' < ~/.ssh/id_rsa.pub
1677 You can test it out with >
1678 ssh {serverhostname}
1679 and you should be log onto the server machine without further need to type
1682 If you decided to use a passphrase, do: >
1685 ssh {serverhostname}
1686 You will be prompted for your key passphrase when you use ssh-add, but not
1687 subsequently when you use ssh. For use with vim, you can use >
1689 and, when next within vim, use >
1691 Alternatively, you can apply ssh-agent to the terminal you're planning on
1694 and do ssh-add whenever you need.
1696 For Windows, folks on the vim mailing list have mentioned that Pageant helps
1697 with avoiding the constant need to enter the password.
1699 Kingston Fung wrote about another way to avoid constantly needing to enter
1702 In order to avoid the need to type in the password for scp each time, you
1703 provide a hack in the docs to set up a non password ssh account. I found a
1704 better way to do that: I can use a regular ssh account which uses a
1705 password to access the material without the need to key-in the password
1706 each time. It's good for security and convenience. I tried ssh public key
1707 authorization + ssh-agent, implementing this, and it works! Here are two
1708 links with instructions:
1710 http://www.ibm.com/developerworks/library/l-keyc2/
1711 http://sial.org/howto/openssh/publickey-auth/
1714 LISTING BOOKMARKS AND HISTORY *netrw-qb* *netrw-listbookmark* {{{2
1716 Pressing "qb" (query bookmarks) will list both the bookmarked directories and
1717 directory traversal history.
1720 |netrw-gb| how to return (go) to a bookmark
1721 |netrw-mb| how to make a bookmark
1722 |netrw-mB| how to delete bookmarks
1723 |netrw-u| change to a predecessor directory via the history stack
1724 |netrw-U| change to a successor directory via the history stack
1726 MAKING A NEW DIRECTORY *netrw-d* {{{2
1728 With the "d" map one may make a new directory either remotely (which depends
1729 on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
1730 global variable g:netrw_local_mkdir). Netrw will issue a request for the new
1731 directory's name. A bare <CR> at that point will abort the making of the
1732 directory. Attempts to make a local directory that already exists (as either
1733 a file or a directory) will be detected, reported on, and ignored.
1735 Related topics: |netrw-D|
1736 Associated setting variables: |g:netrw_local_mkdir| |g:netrw_mkdir_cmd|
1737 |g:netrw_remote_mkdir|
1740 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY *netrw-c* {{{2
1742 By default, |g:netrw_keepdir| is 1. This setting means that the current
1743 directory will not track the browsing directory.
1745 Setting g:netrw_keepdir to 0 tells netrw to make vim's current directory to
1746 track netrw's browsing directory.
1748 However, given the default setting for g:netrw_keepdir of 1 where netrw
1749 maintains its own separate notion of the current directory, in order to make
1750 the two directories the same, use the "c" map (just type c). That map will
1751 set Vim's notion of the current directory to netrw's current browsing
1754 Associated setting variable: |g:netrw_keepdir|
1756 MARKING FILES *netrw-mf* {{{2
1757 (also see |netrw-mr|)
1759 One may mark files with the cursor atop a filename and then pressing "mf".
1760 With gvim, one may also mark files with <s-leftmouse>. The following netrw
1761 maps make use of marked files:
1763 |netrw-a| Hide marked files/directories
1764 |netrw-D| Delete marked files/directories
1765 |netrw-mc| Copy marked files to target
1766 |netrw-md| Apply vimdiff to marked files
1767 |netrw-me| Edit marked files
1768 |netrw-mg| Apply vimgrep to marked files
1769 |netrw-mm| Move marked files
1770 |netrw-mp| Print marked files
1771 |netrw-mt| Set target for |netrw-mm| and |netrw-mc|
1772 |netrw-mT| Generate tags using marked files
1773 |netrw-mx| Apply shell command to marked files
1774 |netrw-mz| Compress/Decompress marked files
1775 |netrw-O| Obtain marked files
1776 |netrw-R| Rename marked files
1778 One may unmark files one at a time the same way one marks them; ie. place
1779 the cursor atop a marked file and press "mf". This process also works
1780 with <s-leftmouse> using gvim. One may unmark all files by pressing
1781 "mu" (see |netrw-mu|).
1783 Marked files are highlighted using the "netrwMarkFile" highlighting group,
1784 which by default is linked to "Identifier" (see Identifier under
1785 |group-name|). You may change the highlighting group by putting something
1788 highlight clear netrwMarkFile
1789 hi link netrwMarkFile ..whatever..
1791 into $HOME/.vim/after/syntax/netrw.vim .
1793 *markfilelist* *global_markfilelist* *local_markfilelist*
1794 All marked files are entered onto the global marked file list; there is only
1795 one such list. In addition, every netrw buffer also has its own local marked
1796 file list; since netrw buffers are associated with specific directories, this
1797 means that each directory has its own local marked file list. The various
1798 commands which operate on marked files use one or the other of the marked file
1802 MARKING FILES BY REGULAR EXPRESSION *netrw-mr* {{{2
1803 (also see |netrw-mf|)
1805 One may also mark files by pressing "mr"; netrw will then issue a prompt,
1806 "Enter regexp: ". You may then enter a shell-style regular expression such
1807 as *.c$ (see |glob()|). For remote systems, glob() doesn't work -- so netrw
1808 converts "*" into ".*" (see |regexp|) and marks files based on that. In the
1809 future I may make it possible to use |regexp|s instead of glob()-style
1810 expressions (yet-another-option).
1813 MARKED FILES: ARBITRARY COMMAND *netrw-mx* {{{2
1814 (See |netrw-mf| and |netrw-mr| for how to mark files)
1815 (uses the local marked-file list)
1817 Upon activation of the "mx" map, netrw will query the user for some (external)
1818 command to be applied to all marked files. All "%"s in the command will be
1819 substituted with the name of each marked file in turn. If no "%"s are in the
1820 command, then the command will be followed by a space and a marked filename.
1823 MARKED FILES: COMPRESSION AND DECOMPRESSION *netrw-mz* {{{2
1824 (See |netrw-mf| and |netrw-mr| for how to mark files)
1825 (uses the local marked file list)
1827 If any marked files are compressed, then "mz" will decompress them.
1828 If any marked files are decompressed, then "mz" will compress them
1829 using the command specified by |g:netrw_compress|; by default,
1832 For decompression, netrw provides a |Dictionary| of suffices and their
1833 associated decompressing utilities; see |g:netrw_decompress|.
1835 Associated setting variables: |g:netrw_compress| |g:netrw_decompress|
1837 MARKED FILES: COPYING *netrw-mc* {{{2
1838 (See |netrw-mf| and |netrw-mr| for how to mark files)
1839 (Uses the global marked file list)
1841 Select a target directory with mt (|netrw-mt|). Then change directory,
1842 select file(s) (see |netrw-mf|), and press "mc". The copy is done
1843 from the current window (where one does the mf) to the target.
1845 Associated setting variable: |g:netrw_localcopycmd| |g:netrw_ssh_cmd|
1847 MARKED FILES: DIFF *netrw-md* {{{2
1848 (See |netrw-mf| and |netrw-mr| for how to mark files)
1849 (uses the global marked file list)
1851 Use |vimdiff| to visualize difference between selected files (two or
1852 three may be selected for this). Uses the global marked file list.
1854 MARKED FILES: EDITING *netrw-me* {{{2
1855 (See |netrw-mf| and |netrw-mr| for how to mark files)
1856 (uses the global marked file list)
1858 This command will place the marked files on the |arglist| and commence
1859 editing them. One may return the to explorer window with |:Rexplore|.
1861 MARKED FILES: GREP *netrw-mg* {{{2
1862 (See |netrw-mf| and |netrw-mr| for how to mark files)
1863 (uses the global marked file list)
1865 This command will apply |:vimgrep| to the marked files. The command will ask
1866 for the requested pattern; one may enter: >
1871 MARKED FILES: HIDING AND UNHIDING BY SUFFIX *netrw-mh* {{{2
1872 (See |netrw-mf| and |netrw-mr| for how to mark files)
1873 (uses the local marked file list)
1875 This command extracts the suffices of the marked files and toggles their
1876 presence on the hiding list. Please note that marking the same suffix
1877 this way multiple times will result in the suffix's presence being toggled
1878 for each file (so an even quantity of marked files having the same suffix
1879 is the same as not having bothered to select them at all).
1881 Related topics: |netrw-a| |g:netrw_list_hide|
1883 MARKED FILES: MOVING *netrw-mm* {{{2
1884 (See |netrw-mf| and |netrw-mr| for how to mark files)
1885 (uses the global marked file list)
1887 WARNING: moving files is more dangerous than copying them.
1888 A file being moved is first copied and then deleted; if the
1889 copy operation fails and the delete succeeds, you will lose
1890 the file. Either try things out with unimportant files
1891 first or do the copy and then delete yourself using mc and D.
1892 Use at your own risk!
1894 Select a target directory with mt (|netrw-mt|). Then change directory,
1895 select file(s) (see |netrw-mf|), and press "mm". The move is done
1896 from the current window (where one does the mf) to the target.
1898 Associated setting variable: |g:netrw_localmovecmd| |g:netrw_ssh_cmd|
1900 MARKED FILES: PRINTING *netrw-mp* {{{2
1901 (See |netrw-mf| and |netrw-mr| for how to mark files)
1902 (uses the local marked file list)
1904 Netrw will apply the |:hardcopy| command to marked files. What it does
1905 is open each file in a one-line window, execute hardcopy, then close the
1909 MARKED FILES: SOURCING *netrw-ms* {{{2
1910 (See |netrw-mf| and |netrw-mr| for how to mark files)
1911 (uses the local marked file list)
1913 Netrw will source the marked files (using vim's |:source| command)
1916 MARKED FILES: TAGGING *netrw-mT* {{{2
1917 (See |netrw-mf| and |netrw-mr| for how to mark files)
1918 (uses the global marked file list)
1920 The "mT" mapping will apply the command in |g:netrw_ctags| (by default, it is
1921 "ctags") to marked files. For remote browsing, in order to create a tags file
1922 netrw will use ssh (see |g:netrw_ssh_cmd|), and so ssh must be available for
1923 this to work on remote systems. For your local system, see |ctags| on how to
1924 get a version. I myself use hdrtags, currently available at
1925 http://mysite.verizon.net/astronaut/src/index.html , and have >
1927 let g:netrw_ctags= "hdrtag"
1931 When a remote set of files are tagged, the resulting tags file is "obtained";
1932 ie. a copy is transferred to the local system's directory. The local tags
1933 file is then modified so that one may use it through the network. The
1934 modification is concerns the names of the files in the tags; each filename is
1935 preceded by the netrw-compatible url used to obtain it. When one subsequently
1936 uses one of the go to tag actions (|tags|), the url will be used by netrw to
1937 edit the desired file and go to the tag.
1939 Associated setting variables: |g:netrw_ctags| |g:netrw_ssh_cmd|
1942 MARKED FILES: SETTING THE TARGET DIRECTORY *netrw-mt* {{{2
1943 (See |netrw-mf| and |netrw-mr| for how to mark files)
1945 Set the marked file copy/move-to target (see |netrw-mc| and |netrw-mm|):
1947 * if the cursor is atop a file name, then the netrw window's currently
1948 displayed directory is used for the copy/move-to target.
1950 * also, if the cursor is in the banner, then the netrw window's currently
1951 displayed directory is used for the copy/move-to target.
1953 * however, if the cursor is atop a directory name, then that directory is
1954 used for the copy/move-to target
1956 There is only one copy/move-to target per vim session; ie. the target is a
1957 script variable (see |s:var|) and is shared between all netrw windows (in an
1960 MARKED FILES: UNMARKING *netrw-mu* {{{2
1961 (See |netrw-mf| and |netrw-mr| for how to mark files)
1963 The "mu" mapping will unmark all currently marked files.
1965 *netrw-browser-settings*
1966 NETRW BROWSER VARIABLES *netrw-browser-options* *netrw-browser-var* {{{2
1968 (if you're interested in the netrw file transfer settings, see |netrw-options|
1969 and |netrw-protocol|)
1971 The <netrw.vim> browser provides settings in the form of variables which
1972 you may modify; by placing these settings in your <.vimrc>, you may customize
1973 your browsing preferences. (see also: |netrw-settings|)
1978 < *g:netrw_alto* change from above splitting to below splitting
1979 by setting this variable (see |netrw-o|)
1980 default: =&sb (see |'sb'|)
1982 *g:netrw_altv* change from left splitting to right splitting
1983 by setting this variable (see |netrw-v|)
1984 default: =&spr (see |'spr'|)
1986 *g:netrw_banner* enable/suppress the banner
1987 =0: suppress the banner
1988 =1: banner is enabled (default)
1989 NOTE: suppressing the banner is a new feature
1990 which may cause problems.
1992 *g:netrw_browse_split* when browsing, <cr> will open the file by:
1993 =0: re-using the same window
1994 =1: horizontally splitting the window first
1995 =2: vertically splitting the window first
1996 =3: open file in new tab
1997 =4: act like "P" (ie. open previous window)
1998 Note that |g:netrw_preview| may be used
1999 to get vertical splitting instead of
2000 horizontal splitting.
2002 *g:netrw_browsex_viewer* specify user's preference for a viewer: >
2007 < is used, then netrwFileHandler() will look for
2008 a script/function to handle the given
2009 extension. (see |netrw_filehandler|).
2011 *g:netrw_chgperm* Unix/Linux: "chmod PERM FILENAME"
2012 Windows: "cacls FILENAME /e /p PERM"
2013 Used to change access permission for a file.
2015 *g:netrw_compress* ="gzip"
2016 Will compress marked files with this
2019 *g:Netrw_corehandler* Allows one to specify something additional
2020 to do when handling <core> files via netrw's
2021 browser's "x" command (see |netrw-x|). If
2022 present, g:Netrw_corehandler specifies
2023 either one or more function references
2024 (see |Funcref|). (the capital g:Netrw...
2025 is required its holding a function reference)
2028 *g:netrw_ctags* ="ctags"
2029 The default external program used to create tags
2031 *g:netrw_cursor* = 2 (default)
2032 This option controls the use of the
2033 |'cursorline'| (cul) and |'cursorcolumn'|
2034 (cuc) settings by netrw:
2036 Value Thin-Long-Tree Wide
2037 =0 u-cul u-cuc u-cul u-cuc
2038 =1 u-cul u-cuc cul u-cuc
2039 =2 cul u-cuc cul u-cuc
2040 =3 cul u-cuc cul cuc
2044 u-cul : user's |'cursorline'| setting used
2045 u-cuc : user's |'cursorcolumn'| setting used
2046 cul : |'cursorline'| locally set
2047 cuc : |'cursorcolumn'| locally set
2049 *g:netrw_decompress* = { ".gz" : "gunzip" ,
2050 ".bz2" : "bunzip2" ,
2053 A dictionary mapping suffices to
2054 decompression programs.
2056 *g:netrw_dirhistmax* =10: controls maximum quantity of past
2057 history. May be zero to supppress
2059 (related: |netrw-qb| |netrw-u| |netrw-U|)
2061 *g:netrw_fastbrowse* =0: slow speed directory browsing;
2062 never re-uses directory listings,
2063 always obtains directory listings.
2064 =1: medium speed directory browsing;
2065 re-use directory listings only
2066 when remote directory browsing.
2068 =2: fast directory browsing;
2069 only obtains directory listings when the
2070 directory hasn't been seen before
2071 (or |netrw-ctrl-l| is used).
2073 Fast browsing retains old directory listing
2074 buffers so that they don't need to be
2075 re-acquired. This feature is especially
2076 important for remote browsing. However, if
2077 a file is introduced or deleted into or from
2078 such directories, the old directory buffer
2079 becomes out-of-date. One may always refresh
2080 such a directory listing with |netrw-ctrl-l|.
2081 This option gives the user the choice of
2082 trading off accuracy (ie. up-to-date listing)
2085 *g:netrw_fname_escape* =' ?&;%'
2086 Used on filenames before remote reading/writing
2088 *g:netrw_ftp_browse_reject* ftp can produce a number of errors and warnings
2089 that can show up as "directories" and "files"
2090 in the listing. This pattern is used to
2091 remove such embedded messages. By default its
2094 ^Trying\s\+\d\+.*$\|
2095 ^KERBEROS_V\d rejected\|
2096 ^Security extensions not\|
2098 : connect to address [0-9a-fA-F:]*
2099 : No route to host$'
2101 *g:netrw_ftp_list_cmd* options for passing along to ftp for directory
2103 unix or g:netrw_cygwin set: : "ls -lF"
2107 *g:netrw_ftp_sizelist_cmd* options for passing along to ftp for directory
2108 listing, sorted by size of file.
2110 unix or g:netrw_cygwin set: : "ls -slF"
2113 *g:netrw_ftp_timelist_cmd* options for passing along to ftp for directory
2114 listing, sorted by time of last modification.
2116 unix or g:netrw_cygwin set: : "ls -tlF"
2119 *g:netrw_glob_escape* ='[]*?`{~$' (unix)
2121 These characters in directory names are
2122 escaped before applying glob()
2124 *g:netrw_hide* if true, the hiding list is used
2127 *g:netrw_home* The home directory for where bookmarks and
2128 history are saved (as .netrwbook and
2130 default: the first directory on the
2133 *g:netrw_keepdir* =1 (default) keep current directory immune from
2134 the browsing directory.
2135 =0 keep the current directory the same as the
2137 The current browsing directory is contained in
2138 b:netrw_curdir (also see |netrw-c|)
2140 *g:netrw_list_cmd* command for listing remote directories
2141 default: (if ssh is executable)
2142 "ssh HOSTNAME ls -FLa"
2144 *g:netrw_liststyle* Set the default listing style:
2145 = 0: thin listing (one file per line)
2146 = 1: long listing (one file per line with time
2147 stamp information and file size)
2148 = 2: wide listing (multiple files in columns)
2149 = 3: tree style listing
2150 *g:netrw_list_hide* comma separated pattern list for hiding files
2151 Patterns are regular expressions (see |regexp|)
2152 Example: let g:netrw_list_hide= '.*\.swp$'
2155 *g:netrw_localcopycmd* ="cp" Linux/Unix/MacOS/Cygwin
2157 Copies marked files (|netrw-mf|) to target
2158 directory (|netrw-mt|, |netrw-mc|)
2160 *g:netrw_localmovecmd* ="mv" Linux/Unix/MacOS/Cygwin
2162 Moves marked files (|netrw-mf|) to target
2163 directory (|netrw-mt|, |netrw-mm|)
2165 *g:netrw_local_mkdir* command for making a local directory
2168 *g:netrw_local_rmdir* remove directory command (rmdir)
2171 *g:netrw_maxfilenamelen* =32 by default, selected so as to make long
2172 listings fit on 80 column displays.
2173 If your screen is wider, and you have file
2174 or directory names longer than 32 bytes,
2175 you may set this option to keep listings
2178 *g:netrw_mkdir_cmd* command for making a remote directory
2179 via ssh (also see |g:netrw_remote_mkdir|)
2180 default: "ssh USEPORT HOSTNAME mkdir"
2182 *g:netrw_mousemaps* =1 (default) enables mouse buttons while
2184 leftmouse : open file/directory
2185 shift-leftmouse : mark file
2186 middlemouse : same as P
2187 rightmouse : remove file/directory
2188 =0: disables mouse maps
2190 *g:netrw_nobeval* doesn't exist (default)
2191 If this variable exists, then balloon
2192 evaluation will be suppressed
2193 (see |'ballooneval'|)
2195 *g:netrw_remote_mkdir* command for making a local directory
2196 via ftp (also see |g:netrw_mkdir_cmd|)
2199 *g:netrw_retmap* if it exists and is set to one, then:
2200 * if in a netrw-selected file, AND
2201 * no normal-mode <2-leftmouse> mapping exists,
2202 then the <2-leftmouse> will be mapped for easy
2203 return to the netrw browser window.
2204 example: click once to select and open a file,
2205 double-click to return.
2207 Note that one may instead choose to:
2208 * let g:netrw_retmap= 1, AND
2209 * nmap <silent> YourChoice <Plug>NetrwReturn
2210 and have another mapping instead of
2211 <2-leftmouse> to invoke the return.
2213 You may also use the |:Rexplore| command to do
2218 *g:netrw_rm_cmd* command for removing files
2219 default: "ssh USEPORT HOSTNAME rm"
2221 *g:netrw_rmdir_cmd* command for removing directories
2222 default: "ssh USEPORT HOSTNAME rmdir"
2224 *g:netrw_rmf_cmd* command for removing softlinks
2225 default: "ssh USEPORT HOSTNAME rm -f"
2227 *g:netrw_sort_by* sort by "name", "time", or "size"
2230 *g:netrw_sort_direction* sorting direction: "normal" or "reverse"
2233 *g:netrw_sort_options* sorting is done using |:sort|; this
2234 variable's value is appended to the
2235 sort command. Thus one may ignore case,
2236 for example, with the following in your
2238 let g:netrw_sort_options="i"
2241 *g:netrw_sort_sequence* when sorting by name, first sort by the
2242 comma-separated pattern sequence. Note that
2243 the filigree added to indicate filetypes
2244 should be accounted for in your pattern.
2245 default: '[\/]$,*,\.bak$,\.o$,\.h$,
2246 \.info$,\.swp$,\.obj$'
2248 *g:netrw_special_syntax* If true, then certain files will be shown
2249 in special syntax in the browser:
2252 netrwCompress: *.gz *.bz2 *.Z *.zip
2255 netrwLib : *.a *.so *.lib *.dll
2256 netrwMakefile: [mM]akefile *.mak
2257 netrwObj : *.o *.obj
2258 netrwTags : tags ANmenu ANtags
2260 netrwTmp : tmp* *tmp
2262 These syntax highlighting groups are linked
2263 to Folded or DiffChange by default
2264 (see |hl-Folded| and |hl-DiffChange|), but
2265 one may put lines like >
2266 hi link netrwCompress Visual
2267 < into one's <.vimrc> to use one's own
2270 *g:netrw_ssh_cmd* One may specify an executable command
2271 to use instead of ssh for remote actions
2272 such as listing, file removal, etc.
2275 *g:netrw_ssh_browse_reject* ssh can sometimes produce unwanted lines,
2276 messages, banners, and whatnot that one doesn't
2277 want masquerading as "directories" and "files".
2278 Use this pattern to remove such embedded
2279 messages. By default its value is:
2283 *g:netrw_tmpfile_escape* =' &;'
2284 escape() is applied to all temporary files
2285 to escape these characters.
2287 *g:netrw_timefmt* specify format string to vim's strftime().
2288 The default, "%c", is "the preferred date
2289 and time representation for the current
2290 locale" according to my manpage entry for
2291 strftime(); however, not all are satisfied
2292 with it. Some alternatives:
2294 " %a %Y-%m-%d %I-%M-%S %p"
2297 *g:netrw_use_noswf* netrw normally avoids writing swapfiles
2298 for browser buffers. However, under some
2299 systems this apparently is causing nasty
2300 ml_get errors to appear; if you're getting
2301 ml_get errors, try putting
2302 let g:netrw_use_noswf= 0
2305 *g:netrw_winsize* specify initial size of new windows made with
2306 "o" (see |netrw-o|), "v" (see |netrw-v|),
2307 |:Hexplore| or |:Vexplore|. The g:netrw_winsize
2308 is an integer describing the percentage of the
2309 current netrw buffer's window to be used for
2311 If g:netrw_winsize is less than zero, then
2312 the absolute value of g:netrw_winsize lines
2313 or columns will be used for the new window.
2314 default: 50 (for 50%)
2316 *g:netrw_xstrlen* Controls how netrw computes string lengths,
2317 including multi-byte characters' string
2318 length. (thanks to N Weibull, T Mechelynck)
2319 =0: uses Vim's built-in strlen()
2320 =1: number of codepoints (Latin a + combining
2321 circumflex is two codepoints) (DEFAULT)
2322 =2: number of spacing codepoints (Latin a +
2323 combining circumflex is one spacing
2324 codepoint; a hard tab is one; wide and
2325 narrow CJK are one each; etc.)
2326 =3: virtual length (counting tabs as anything
2327 between 1 and |'tabstop'|, wide CJK as 2
2328 rather than 1, Arabic alif as zero when
2329 immediately preceded by lam, one
2332 *g:NetrwTopLvlMenu* This variable specifies the top level
2333 menu name; by default, it's "Netrw.". If
2334 you wish to change this, do so in your
2337 NETRW BROWSING AND OPTION INCOMPATIBILITIES *netrw-incompatible* {{{2
2339 Netrw has been designed to handle user options by saving them, setting the
2340 options to something that's compatible with netrw's needs, and then restoring
2341 them. However, the autochdir option: >
2343 is problematical. Autochdir sets the current directory to that containing the
2344 file you edit; this apparently also applies to directories. In other words,
2345 autochdir sets the current directory to that containing the "file" (even if
2346 that "file" is itself a directory).
2348 NETRW SETTINGS WINDOW *netrw-settings-window* {{{2
2350 With the NetrwSettings.vim plugin, >
2352 will bring up a window with the many variables that netrw uses for its
2353 settings. You may change any of their values; when you save the file, the
2354 settings therein will be used. One may also press "?" on any of the lines for
2355 help on what each of the variables do.
2357 (also see: |netrw-browser-var| |netrw-protocol| |netrw-var| |netrw-variables|)
2360 ==============================================================================
2361 OBTAINING A FILE *netrw-O* {{{2
2363 If there are no marked files:
2365 When browsing a remote directory, one may obtain a file under the cursor
2366 (ie. get a copy on your local machine, but not edit it) by pressing the O
2369 If there are marked files:
2371 The marked files will be obtained (ie. a copy will be transferred to your
2372 local machine, but not set up for editing).
2374 Only ftp and scp are supported for this operation (but since these two are
2375 available for browsing, that shouldn't be a problem). The status bar will
2376 then show, on its right hand side, a message like "Obtaining filename". The
2377 statusline will be restored after the transfer is complete.
2379 Netrw can also "obtain" a file using the local browser. Netrw's display
2380 of a directory is not necessarily the same as Vim's "current directory",
2381 unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>. One may select
2382 a file using the local browser (by putting the cursor on it) and pressing
2383 "O" will then "obtain" the file; ie. copy it to Vim's current directory.
2386 * To see what the current directory is, use |:pwd|
2387 * To make the currently browsed directory the current directory, see |netrw-c|
2388 * To automatically make the currently browsed directory the current
2389 directory, see |g:netrw_keepdir|.
2392 OPEN A NEW FILE IN NETRW'S CURRENT DIRECTORY *netrw-%*
2394 To open a file in netrw's current directory, press "%". This map will
2395 query the user for a new filename; an empty file by that name will be
2396 placed in the netrw's current directory (ie. b:netrw_curdir).
2399 PREVIEW WINDOW *netrw-p* *netrw-preview* {{{2
2401 One may use a preview window by using the "p" key when the cursor is atop the
2402 desired filename to be previewed. The display will then split to show both
2403 the browser (where the cursor will remain) and the file (see |:pedit|).
2404 By default, the split will be taken horizontally; one may use vertical
2405 splitting if one has set |g:netrw_preview| first.
2407 An interesting set of netrw settings is: >
2409 let g:netrw_preview = 1
2410 let g:netrw_liststyle = 3
2411 let g:netrw_winsize = 30
2414 1. Make vertical splitting the default for previewing files
2415 2. Make the default listing style "tree"
2416 3. When a vertical preview window is opened, the directory listing
2417 will use only 30 columns; the rest of the window is used for the
2420 PREVIOUS WINDOW *netrw-P* *netrw-prvwin* {{{2
2422 To edit a file or directory in the previously used (last accessed) window (see
2423 :he |CTRL-W_p|), press a "P". If there's only one window, then the one window
2424 will be horizontally split (by default).
2426 If there's more than one window, the previous window will be re-used on
2427 the selected file/directory. If the previous window's associated buffer
2428 has been modified, and there's only one window with that buffer, then
2429 the user will be asked if s/he wishes to save the buffer first (yes,
2432 Related Actions |netrw-cr| |netrw-o| |netrw-t| |netrw-T| |netrw-v|
2433 Associated setting variables:
2434 |g:netrw_alto| control above/below splitting
2435 |g:netrw_altv| control right/left splitting
2436 |g:netrw_preview| control horizontal vs vertical splitting
2437 |g:netrw_winsize| control initial sizing
2440 REFRESHING THE LISTING *netrw-ctrl-l* *netrw-ctrl_l* {{{2
2442 To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or
2443 hit the <cr> when atop the ./ directory entry in the listing. One may also
2444 refresh a local directory by using ":e .".
2447 RENAMING FILES OR DIRECTORIES *netrw-move* *netrw-rename* *netrw-R* {{{2
2449 If there are no marked files: (see |netrw-mf|)
2451 Renaming/moving files and directories involves moving the cursor to the
2452 file/directory to be moved (renamed) and pressing "R". You will then be
2453 queried for where you want the file/directory to be moved. You may select
2454 a range of lines with the "V" command (visual selection), and then
2457 If there are marked files: (see |netrw-mf|)
2459 Marked files will be renamed (moved). You will be queried as above in
2460 order to specify where you want the file/directory to be moved.
2464 Note that moving files is a dangerous operation; copies are safer. That's
2465 because a "move" for remote files is actually a copy + delete -- and if
2466 the copy fails and the delete does not, you may lose the file.
2468 The g:netrw_rename_cmd variable is used to implement renaming. By default its
2473 One may rename a block of files and directories by selecting them with
2474 the V (|linewise-visual|).
2477 REVERSING SORTING ORDER *netrw-r* *netrw-reverse* {{{2
2479 One may toggle between normal and reverse sorting order by pressing the
2482 Related topics: |netrw-s|
2483 Associated setting variable: |g:netrw_sort_direction|
2486 SELECTING SORTING STYLE *netrw-s* *netrw-sort* {{{2
2488 One may select the sorting style by name, time, or (file) size. The "s" map
2489 allows one to circulate amongst the three choices; the directory listing will
2490 automatically be refreshed to reflect the selected style.
2492 Related topics: |netrw-r| |netrw-S|
2493 Associated setting variables: |g:netrw_sort_by| |g:netrw_sort_sequence|
2496 SETTING EDITING WINDOW *netrw-C* {{{2
2498 One may select a netrw window for editing with the "C" mapping, or by setting
2499 g:netrw_chgwin to the selected window number. Subsequent selection of a file
2500 to edit (|netrw-cr|) will use that window.
2502 Related topics: |netrw-cr|
2503 Associated setting variables: |g:netrw_chgwin|
2506 10. Problems and Fixes *netrw-problems* {{{1
2508 (This section is likely to grow as I get feedback)
2509 (also see |netrw-debug|)
2511 P1. I use windows 95, and my ftp dumps four blank lines at the
2514 See |netrw-fixup|, and put the following into your
2517 let g:netrw_win95ftp= 1
2520 P2. I use Windows, and my network browsing with ftp doesn't sort by
2521 time or size! -or- The remote system is a Windows server; why
2522 don't I get sorts by time or size?
2524 Windows' ftp has a minimal support for ls (ie. it doesn't
2525 accept sorting options). It doesn't support the -F which
2526 gives an explanatory character (ABC/ for "ABC is a directory").
2527 Netrw then uses "dir" to get both its thin and long listings.
2528 If you think your ftp does support a full-up ls, put the
2529 following into your <.vimrc>: >
2531 let g:netrw_ftp_list_cmd = "ls -lF"
2532 let g:netrw_ftp_timelist_cmd= "ls -tlF"
2533 let g:netrw_ftp_sizelist_cmd= "ls -slF"
2535 Alternatively, if you have cygwin on your Windows box, put
2536 into your <.vimrc>: >
2538 let g:netrw_cygwin= 1
2540 This problem also occurs when the remote system is Windows.
2541 In this situation, the various g:netrw_ftp_[time|size]list_cmds
2542 are as shown above, but the remote system will not correctly
2543 modify its listing behavior.
2547 P3. I tried rcp://user@host/ (or protocol other than ftp) and netrw
2548 used ssh! That wasn't what I asked for...
2550 Netrw has two methods for browsing remote directories: ssh
2551 and ftp. Unless you specify ftp specifically, ssh is used.
2552 When it comes time to do download a file (not just a directory
2553 listing), netrw will use the given protocol to do so.
2556 P4. I would like long listings to be the default.
2558 Put the following statement into your |.vimrc|: >
2560 let g:netrw_liststyle= 1
2562 Check out |netrw-browser-var| for more customizations that
2566 P5. My times come up oddly in local browsing
2568 Does your system's strftime() accept the "%c" to yield dates
2569 such as "Sun Apr 27 11:49:23 1997"? If not, do a "man strftime"
2570 and find out what option should be used. Then put it into
2573 let g:netrw_timefmt= "%X" (where X is the option)
2576 P6. I want my current directory to track my browsing.
2579 Put the following line in your |.vimrc|:
2581 let g:netrw_keepdir= 0
2584 P7. I use Chinese (or other non-ascii) characters in my filenames, and
2585 netrw (Explore, Sexplore, Hexplore, etc) doesn't display them!
2587 (taken from an answer provided by Wu Yongwei on the vim
2589 I now see the problem. You code page is not 936, right? Vim
2590 seems only able to open files with names that are valid in the
2591 current code page, as are many other applications that do not
2592 use the Unicode version of Windows APIs. This is an OS-related
2593 issue. You should not have such problems when the system
2594 locale uses UTF-8, such as modern Linux distros.
2596 (...it is one more reason to recommend that people use utf-8!)
2599 P8. I'm getting "ssh is not executable on your system" -- what do I
2602 (Dudley Fox) Most people I know use putty for windows ssh. It
2603 is a free ssh/telnet application. You can read more about it
2606 http://www.chiark.greenend.org.uk/~sgtatham/putty/ Also:
2608 (Marlin Unruh) This program also works for me. It's a single
2609 executable, so he/she can copy it into the Windows\System32
2610 folder and create a shortcut to it.
2612 (Dudley Fox) You might also wish to consider plink, as it
2613 sounds most similar to what you are looking for. plink is an
2614 application in the putty suite.
2616 http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter7.html#plink
2618 (Vissale Neang) Maybe you can try OpenSSH for windows, which
2619 can be obtained from:
2621 http://sshwindows.sourceforge.net/
2623 It doesn't need the full Cygwin package.
2625 (Antoine Mechelynck) For individual Unix-like programs needed
2626 for work in a native-Windows environment, I recommend getting
2627 them from the GnuWin32 project on sourceforge if it has them:
2629 http://gnuwin32.sourceforge.net/
2631 Unlike Cygwin, which sets up a Unix-like virtual machine on
2632 top of Windows, GnuWin32 is a rewrite of Unix utilities with
2633 Windows system calls, and its programs works quite well in the
2636 (dave) Download WinSCP and use that to connect to the server.
2637 In Preferences > Editors, set gvim as your editor:
2640 - Set External Editor (adjust path as needed, include
2641 the quotes and !.! at the end):
2642 "c:\Program Files\Vim\vim70\gvim.exe" !.!
2643 - Check that the filetype in the box below is
2644 {asterisk}.{asterisk} (all files), or whatever types
2645 you want (cec: change {asterisk} to * ; I had to
2646 write it that way because otherwise the helptags
2647 system thinks it's a tag)
2648 - Make sure it's at the top of the listbox (click it,
2649 then click "Up" if it's not)
2650 If using the Norton Commander style, you just have to hit <F4>
2651 to edit a file in a local copy of gvim.
2653 (Vit Gottwald) How to generate public/private key and save
2654 public key it on server: >
2655 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter8.html#pubkey-gettingready
2656 (8.3 Getting ready for public key authentication)
2658 How to use a private key with 'pscp': >
2660 http://www.chiark.greenend.org.uk/~sgtatham/putty/0.60/htmldoc/Chapter5.html
2661 (5.2.4 Using public key authentication with PSCP)
2663 (Ben Schmidt) I find the ssh included with cwRsync is
2664 brilliant, and install cwRsync or cwRsyncServer on most
2665 Windows systems I come across these days. I guess COPSSH,
2666 packed by the same person, is probably even better for use as
2667 just ssh on Windows, and probably includes sftp, etc. which I
2668 suspect the cwRsync doesn't, though it might
2670 (cec) To make proper use of these suggestions above, you will
2671 need to modify the following user-settable variables in your
2674 |g:netrw_ssh_cmd| |g:netrw_list_cmd| |g:netrw_mkdir_cmd|
2675 |g:netrw_rm_cmd| |g:netrw_rmdir_cmd| |g:netrw_rmf_cmd|
2677 The first one (|g:netrw_ssh_cmd|) is the most important; most
2678 of the others will use the string in g:netrw_ssh_cmd by
2680 *netrw-p9* *netrw-ml_get*
2681 P9. I'm browsing, changing directory, and bang! ml_get errors
2682 appear and I have to kill vim. Any way around this?
2684 Normally netrw attempts to avoid writing swapfiles for
2685 its temporary directory buffers. However, on some systems
2686 this attempt appears to be causing ml_get errors to
2687 appear. Please try setting |g:netrw_use_noswf| to 0
2689 let g:netrw_use_noswf= 0
2692 P10. I'm being pestered with "[something] is a directory" and
2693 "Press ENTER or type command to continue" prompts...
2695 The "[something] is a directory" prompt is issued by Vim,
2696 not by netrw, and there appears to be no way to work around
2697 it. Coupled with the default cmdheight of 1, this message
2698 causes the "Press ENTER..." prompt. So: read |hit-enter|;
2699 I also suggest that you set your |'cmdheight'| to 2 (or more) in
2703 P11. I want to have two windows; a thin one on the left and my editing
2704 window on the right. How may I accomplish this?
2706 * Put the following line in your <.vimrc>:
2707 let g:netrw_altv = 1
2708 * Edit the current directory: :e .
2709 * Select some file, press v
2710 * Resize the windows as you wish (see |CTRL-W_<| and
2711 |CTRL-W_>|). If you're using gvim, you can drag
2712 the separating bar with your mouse.
2713 * When you want a new file, use ctrl-w h to go back to the
2714 netrw browser, select a file, then press P (see |CTRL-W_h|
2715 and |netrw-P|). If you're using gvim, you can press
2716 <leftmouse> in the browser window and then press the
2717 <middlemouse> to select the file.
2720 P12. My directory isn't sorting correctly, or unwanted letters are
2721 appearing in the listed filenames, or things aren't lining
2722 up properly in the wide listing, ...
2724 This may be due to an encoding problem. I myself usually use
2725 utf-8, but really only use ascii (ie. bytes from 32-126).
2726 Multibyte encodings use two (or more) bytes per character.
2727 You may need to change |g:netrw_sepchr| and/or |g:netrw_xstrlen|.
2730 P13. I'm a Windows + putty + ssh user, and when I attempt to browse,
2731 the directories are missing trailing "/"s so netrw treats them
2732 as file transfers instead of as attempts to browse
2733 subdirectories. How may I fix this?
2735 (mikeyao) If you want to use vim via ssh and putty under Windows,
2736 try combining the use of pscp/psftp with plink. pscp/psftp will
2737 be used to connect and plink will be used to execute commands on
2738 the server, for example: list files and directory using 'ls'.
2740 These are the settings I use to do this:
2742 " list files, it's the key setting, if you haven't set,
2743 " you will get a blank buffer
2744 let g:netrw_list_cmd = "plink HOSTNAME ls -Fa"
2745 " if you haven't add putty directory in system path, you should
2746 " specify scp/sftp command. For examples:
2747 "let g:netrw_sftp_cmd = "d:\\dev\\putty\\PSFTP.exe"
2748 "let g:netrw_scp_cmd = "d:\\dev\\putty\\PSCP.exe"
2751 P14. I'd would like to speed up writes using Nwrite and scp/ssh
2752 style connections. How? (Thomer M. Gil)
2754 Try using ssh's ControlMaster and ControlPath (see the ssh_config
2755 man page) to share multiple ssh connections over a single network
2756 connection. That cuts out the cryptographic handshake on each
2757 file write, sometimes speeding it up by an order of magnitude.
2758 (see http://thomer.com/howtos/netrw_ssh.html)
2759 (included by permission)
2761 Add the following to your ~/.ssh/config: >
2763 # you change "*" to the hostname you care about
2766 ControlPath /tmp/%r@%h:%p
2768 < Then create an ssh connection to the host and leave it running: >
2770 ssh -N host.domain.com
2772 < Now remotely open a file with Vim's Netrw and enjoy the
2775 vim scp://host.domain.com//home/user/.bashrc
2778 P15. How may I use a double-click instead of netrw's usual single click
2779 to open a file or directory? (Ben Fritz)
2781 First, disable netrw's mapping with >
2782 let g:netrw_mousemaps= 0
2783 < and then create a netrw buffer only mapping in
2784 $HOME/.vim/after/ftplugin/netrw.vim: >
2785 nmap <buffer> <2-leftmouse> <CR>
2786 < Note that setting g:netrw_mousemaps to zero will turn off
2787 all netrw's mouse mappings, not just the <leftmouse> one.
2788 (see |g:netrw_mousemaps|)
2790 ==============================================================================
2791 11. Debugging Netrw Itself *netrw-debug* {{{1
2793 The <netrw.vim> script is typically available as something like:
2795 /usr/local/share/vim/vim7x/plugin/netrwPlugin.vim
2796 /usr/local/share/vim/vim7x/autoload/netrw.vim
2798 /usr/local/share/vim/vim6x/plugin/netrwPlugin.vim
2799 /usr/local/share/vim/vim6x/autoload/netrw.vim
2801 which is loaded automatically at startup (assuming :set nocp).
2803 1. Get the <Decho.vim> script, available as:
2805 http://mysite.verizon.net/astronaut/vim/index.html#DECHO
2807 http://vim.sourceforge.net/scripts/script.php?script_id=120
2809 It now comes as a "vimball"; if you're using vim 7.0 or earlier,
2810 you'll need to update vimball, too. See
2811 http://mysite.verizon.net/astronaut/vim/index.html#VIMBALL
2813 2. Edit the <netrw.vim> file by typing: >
2819 To restore to normal non-debugging behavior, re-edit <netrw.vim>
2826 This command, provided by <Decho.vim>, will comment out all
2827 Decho-debugging statements (Dfunc(), Dret(), Decho(), Dredir()).
2829 3. Then bring up vim and attempt to evoke the problem by doing a
2830 transfer or doing some browsing. A set of messages should appear
2831 concerning the steps that <netrw.vim> took in attempting to
2832 read/write your file over the network in a separate tab.
2834 To save the file, use >
2838 < Please send that information to <netrw.vim>'s maintainer, >
2839 NdrOchip at ScampbellPfamily.AbizM - NOSPAM
2841 ==============================================================================
2842 12. History *netrw-history* {{{1
2844 v143: Jun 01, 2011 * |g:netrw_winsize| will accept a negative
2845 number; the absolute value of it will then
2846 be used to specify lines/columns instead of
2848 Jul 05, 2011 * the "d" map now supports mkdir via ftp
2849 See |netrw-d| and |g:netrw_remote_mkdir|
2850 Jul 11, 2011 * Changed Explore!, Sexplore!, and Vexplore
2851 to use a percentage of |winwidth()| instead
2852 of a percentage of |winheight()|.
2853 Jul 11, 2011 * included support for https://... I'm just
2854 beginning to test this, however.
2855 Aug 01, 2011 * changed RestoreOptions to also restore
2856 cursor position in netrw buffers.
2857 Aug 12, 2011 * added a note about "%" to the balloon
2858 Aug 30, 2011 * if |g:netrw_nobeval| exists, then balloon
2859 evaluation is suppressed.
2860 Aug 31, 2011 * (Benjamin R Haskell) provided a patch that
2861 implements non-standard port handling for
2862 files opened via the remote browser.
2863 Aug 31, 2011 * Fixed a **//pattern Explorer bug
2864 Sep 15, 2011 * (reported by Francesco Campana) netrw
2865 now permits the "@" to be part of the
2866 user id (if there's an @ that appears
2868 v142: Apr 06, 2011 * I modified NetrwRemoteListing() to use
2869 shellescape(fnameescape(s:path),1) for
2870 the benefit of those using scp://.../
2871 with subdirectories having spaces.
2872 Problem reported by: Gilles Charron
2873 Apr 18, 2011 * s:NetrwMethod() attempts to issue an
2874 error message when given a malformed url
2875 Apr 29, 2011 * converted most mousemaps to use <Plug>s
2876 * |g:netrw_winsize|'s meaning changed
2877 v141: Aug 28, 2010 * added -s:... support for Windows ftp
2878 * restored 2-leftmouse for :Rex-like return
2879 * added balloon help for banner
2880 Oct 26, 2010 * :Texplore changed to start from netrw's idea
2881 of the current directory, not pwd's
2882 Feb 10, 2011 * netrwPlugin modified to use BufReadCmd
2883 when the "filename" ends with a "/" or a "\"
2884 Avoids "... is a directory" message, works
2885 inside a try-catch-endtry clause.
2886 Feb 22, 2011 * for menus, &go =~# used to insure correct case
2887 Apr 01, 2011 * changed g:netrw_cursorcolumn to g:netrw_cursor
2888 In addition, there's more supported settings for
2890 v140: Jul 27, 2010 * (Lech Lorens) unexpected change of window
2891 v139: May 14, 2010 * when viewing remote directory listings and
2892 changing listing style, going to tree listing
2893 mode was issuing two rather useless messages
2894 about the buffer name. They have now been
2896 * (Jean Johner) with "behave mswin", clicking
2897 on a filename in wide mode opened a new file
2898 with a missing first letter
2899 * (Britton Kerin) wanted netrw listings to be
2900 buflisted; the |g:netrw_bufsettings| option
2902 Jun 18, 2010 * (Jan Steffens) added support for xz compression
2903 Jun 23, 2010 * vimdiff dir1 dir2 now works
2904 Jul 27, 2010 * (John Orr) pointed out that the intended maparg
2905 test for gx was actually testing for g rather
2907 v138: May 01, 2010 * added the bomb setting to the Save-Set-Restore
2908 option handling (for Tony M)
2909 May 14, 2010 * (Bram Moolenaar) netrw optionally sets cursorline
2910 (and sometimes cursorcolumn) for its display.
2911 This option setting was leaking through with
2912 remote file handling.
2913 v137: Dec 28, 2009 * modified the preview window handling for
2914 vertically split windows. The preview
2915 window will take up all but g:netrw_winsize
2916 columns of the original window; those
2917 g:netrw_winsize columns will be used for
2919 * (Simon Dambe) removed "~" from
2920 |g:netrw_glob_escape| under Windows
2921 * (Bram Moolenaar) modified test for status bar
2922 click with leftmouse. Moved code to
2924 Feb 24, 2010 * (for Jean Johner) added insert-mode maps; one
2925 can get into insert mode with netrw via
2927 Mar 15, 2010 * (Dominique Pellé) Directory with backslashes such
2928 as foo\bar were not being entered/left properly
2929 Mar 15, 2010 * Using :Explore .. and causing two FocusGained
2930 events caused the directory to change. Fixed.
2931 Mar 22, 2010 * Last fix caused problems for *//pat and */filepat
2933 Mar 30, 2010 * With :set hidden and changing listing styles 8
2934 times, the tree listing buffer was being marked
2935 as modified upon exit. Fixed.
2936 v136: Jan 14, 2009 * extended |g:Netrw_funcref| to also handle lists
2937 of function references
2938 Jan 14, 2009 * (reported by Marvin Renich) with spell check
2939 enabled, some filenamess will still being
2940 displayed as spelling errors.
2941 Apr 13, 2009 * (Björn Winckler) writing a file using
2942 remote scp caused syntax highlighting problem.
2943 Solution: avoid syntax/syntax.vim's
2944 au Filetype * syntax setting autocommand by
2945 checking that the current buffer has the
2946 netrw filetype before attempting a doau
2947 in s:NetrwSafeOptions().
2948 Apr 14, 2009 * (asgeo1) suggested the "T" map (|netrw-T|)
2949 Apr 14, 2009 * marking wasn't working on executable and
2950 other special filenames
2951 Apr 20, 2009 * (Dennis Benzinger) files opened via http have
2952 their syntax filetype auto-detected
2953 Jun 19, 2009 * (Yukihiro Nakadaira) help document improvements
2954 Jul 22, 2009 * g:netrw_browse_split will honor the
2955 |'equalalways'| setting.
2956 Jul 29, 2009 * implemented "I" mapping to toggle banner
2957 (this is experimental and still being debugged)
2958 Sep 19, 2009 * (Mike McEwan) writes via ftp now send both
2959 g:netrw_ftpmode and g:netrw_ftpextracmd (if the
2961 Dec 02, 2009 * netrw uses vimgrep several places; it now uses
2962 "noautocmd vimgrep" (should be speedier).
2963 Dec 03, 2009 * changed back to using -source instead of -dump
2964 for elinks-using commands. (requested by James
2965 Vega and Karsten Hopp)
2966 v135: Oct 29, 2008 * using |simplify()| on directory names
2967 (supporting handling ".."s in directory names)
2968 Oct 31, 2008 * added special file highlighting for core dumps
2969 under Unix/Linux. The default sorting sequence
2970 now also gives core dumps priority.
2971 Nov 10, 2008 * uses a call to netrw#Nread() instead of Nread
2972 to avoid having to use fnameescape()
2973 * fixed a tree redrawing problem (open directory,
2974 open subdir, close subdir, close dir)
2975 Nov 19, 2008 * sprinkled some histdel("/",-1)s through the code
2976 in an attempt to prevent netrw from changing
2978 Jan 02, 2009 * |g:Netrw_funcref| included
2979 Jan 05, 2009 * Explore */ **/ *// **// all clear explorer
2981 Jan 05, 2009 * (Panagiotis Louridas) extended s:WinPath()
2982 to remove cygdrive from non-cygwin Windows
2983 paths. Improved the determination as to
2984 whether or not to do so.
2985 Jan 13, 2009 * included contains=@NoSpell in every syntax
2986 group for syntax/netrw.vim .
2987 v134: Sep 30, 2008 * (Sander Marechal) provided a bugfix involving
2988 the use of the |netrw-t| command with a remote
2990 Sep 30, 2008 * using "x" on a remote jpg was failing; fixed.
2991 Oct 03, 2008 * bookmarks now go on a list and are stored to
2992 the first directory on the |'runtimepath'| in
2993 the hopes of making their retention reliable.
2994 History now also goes to that directory.
2995 Oct 07, 2008 * Included check that vim 7.0 or later is in use.
2996 Oct 07, 2008 * Improved |g:netrw_retmap| handling.
2997 Oct 12, 2008 * Based upon Sébastien Migniot's suggestion, if
2998 cadaver isn't available then netrw will try to
2999 use curl for the dav://... protocol.
3000 Oct 13, 2008 * added @*/ to netrw buffers' |'iskeyword'|setting
3001 This lets mf (|netrw-mf|) mark directories, links
3003 Oct 13, 2008 * avoids a second NetrwBrowse() refresh when
3004 g:netrw_fastbrowse is <= 1 (slow, medium speed)
3005 Oct 22, 2008 * |g:netrw_http_xcmd| may now be overridden
3006 independently of |g:netrw_http_cmd|.
3007 Oct 23, 2008 * [N] added to the various Explore commands to
3008 let users specify the width/height of new
3009 explorer windows, overriding |g:netrw_winsize|.
3010 v133: Aug 10, 2008 * NetReadFixup() for win95 was missing some "a:"s
3011 Aug 12, 2008 * (Jan Minář) an error condition in NetrwMethod()
3012 wasn't being used, resulting in "b:netrw_fname
3014 Aug 12, 2008 * (François Ingeirest) asked that "hi link" be
3015 changed to hi default link in the netrw syntax
3017 Aug 12, 2008 * using s:NetrwUnmarkList() more often. Filenames
3018 were being left on the global list when removed
3019 from the buffer-local lists.
3020 Aug 14, 2008 * (Joshua Clayton) an errant extra ")" was left in
3021 the rcp-handling portion of NetRead().
3022 Sep 03, 2008 * added |'cursorline'| highlighting to thin, long,
3024 v132: Aug 06, 2008 * Fixed marked file-based obtain
3025 Aug 08, 2008 * sourcing a file via ftp from a netrw-generated
3026 buffer (or any buffer with |'nobl'|) left an
3027 empty no-name buffer in its wake. Fixed.
3028 v130: Jul 31, 2008 * trying out elinks/links for http://host/
3029 requests. One problem: in-page links
3030 (such as with ...#LABEL) are not supported
3031 * verified that Bram's modified netrwPlugin works
3032 Aug 01, 2008 * fixed a bug: when sourcing a file via ftp, the
3033 "filter window" was left behind.
3034 v129: Jul 31, 2008 * bug found in non-mouse enabled vim and some
3036 v128: Jul 30, 2008 * much work done in using shellescape() and
3038 v126: Jun 30, 2008 * after having gone to a remote directory,
3039 <f1> was no longer taking one to the correct
3040 entry in the help (|netrw-quickhelp|). Fixed.
3041 Jul 01, 2008 * extracting the last filename from a wide listing
3042 missed the last letter when |'virtualedit'| not
3044 Jul 01, 2008 * vim foo/bar was creating [Scratch] buffers,
3045 where bar was also a directory
3046 Jul 01, 2008 * numerous additional changes were made to netrw
3047 to use fnameescape() and shellescape() instead
3048 of escape(). Not all changes have been tested
3050 Jul 01, 2008 * (James Vega reported) some problems with
3051 :NetrwSettings (due to no longer used setting
3053 Jul 07, 2008 * Additional numerous changes to support security;
3054 shellescape(arg,1), etc.
3055 v125: Apr 07, 2008 * (Cristian Rigamonti) CR provides a patch; he
3056 noted that gx was failing since its call to
3057 netrw#NetBrowseX() wasn't updated to
3058 netrw#NetrwBrowseX().
3059 * (Stanis Trendelenburg) ST provides a patch to
3060 supports davs: (dav + ssl)
3061 * (Rick Choi) noted that directory names comprised
3062 of three digits were not being displayed by
3063 the internal browser. Fixed.
3064 * (Erik Falor) provided a patch to handle problems
3065 with changing directory and |'acd'| option.
3066 * (James Vega, Teemu Likonen) noted that netrw
3067 wasn't handling multi-byte filenames/directories
3069 * (Rick) found problem with g:netrw_maxfilenamelen
3071 * (James Vega) pointed out that netrw was
3072 misidentifying all files in a symbolically linked
3073 directory as being symbolically linked
3074 themselves. This particular problem was fixed;
3075 however, there are now situations where
3076 symbolically linked files will not be detected.
3077 Really need an internal vim function to do this
3079 Apr 17, 2008 * When g:netrw_keepdir==0, current directory
3080 doesn't necessarily equal b:netrw_curdir
3081 initially. Problem is due to the patch directly
3083 * Fixed qf to handle case where b:netrw_curdir
3084 isn't the same as the current directory under
3086 * New: |netrw-mg| (apply vimgrep to marked files)
3087 May 05, 2008 * (Rick) pointed out that a "setlocal ts=32" was
3088 interfering with g:netrw_maxfilenamelen
3089 May 05, 2008 * (James Vega) a file inside a linked directory
3090 was showing up as a symbolic link itself.
3091 May 22, 2008 * symbolic links, fifos, and sockets are now
3092 indicated by a trailing @, |, or =, respectively.
3093 Jun 06, 2008 * Removed numerous bugs from the marked file
3094 move and copy. Tested these changes under
3096 * :Rexplore returns to the screen position in the
3097 netrw listing from whence the file was edited
3098 v124: Apr 02, 2008 * (Adrian Rollett) change the line supporting the
3099 "x" action for mac to use g:netrw_shq
3100 v123: Feb 27, 2008 * Marked files now keeps a "global" marked file
3101 list. The global marked file list is used to
3102 support tag processing and vimdiff'ing
3103 (|netrw-md| |netrw-mt|)
3104 * Been insuring that mm and mc works with various
3105 combinations of local and remote directories
3106 * (Stefan Bittner) http://.../ should always have
3107 filetype "html" -- fixed.
3108 * (Stefan Bittner) a "?" in a http://.../ request
3109 wasn't being handled correctly. Fixed by
3110 removing ? from default |g:netrw_tmpfile_escape|.
3111 * (Nico Weber) % codes in http://.../ requests
3112 weren't being handled correctly. Fixed by
3113 including % in default |g:netrw_fname_escape|.
3114 * (Stefan Bittner) attempts to update Buffers.Refresh
3115 were failing because locale use changed the menu
3116 names. I implemented a workaround.
3117 v122: Feb 12, 2008 * bugfix - first sorting sequence match now has
3119 Feb 14, 2008 * bugfix - sorting sequence was effectively ignoring
3120 sequencing priority of anything following '*'
3121 * toggling a marked file was showing incorrect list
3122 (list was correct, but displayed matches weren't)
3123 * |g:netrw_special_syntax| implemented
3124 v121: Feb 11, 2008 * Bram M reported that :e file ... :e . would not
3125 retain the alternate file. Fixed -- I hope!
3126 * bugfix -- apparently v120 broke an explicit
3128 v120: Jan 21, 2008 * |netrw-mt| changed to allow for target selection
3129 based on whether or not word under cursor is a
3130 directory or file, or if cursor is in banner
3132 * |netrw-mh| included (hiding by marked-file suffix)
3133 * functions moved about a bit (improved
3135 * executable files now displayed with trailing (*)
3136 * symbolically linked files now displayed with
3138 * Somewhen, s:NetrwMarkFileMove() got damaged. It
3139 * is now restored (missing an endif, for example).
3140 * |netrw-mu| implemented (unmarking marked files)
3141 * many bugs have been removed from the marked file
3142 system (tnx to Mark S. for feedback)
3143 * |netrw-ms| implemented (sourcing marked files)
3144 * fixed use of P with tree listing style
3145 * multiple tree listing now supported
3147 * changed q -> qb (query bookmarks)
3148 * implemented |netrw-qf|
3149 * Explore now has four special list-generation
3150 modes: */filepat **/filepat
3151 *//pattern **//pattern
3152 * gh (|netrw-gh|) is a shortcut for toggling the
3153 hiding of files and directories beginning with a
3155 v119: Jan 10, 2008 * When g:netrw_keepdir is false,
3156 NetrwOptionsRestore() had a problem
3158 Jan 11, 2008 * Netrw now shows symbolic links with a trailing
3159 "@" and special highlighting.
3160 Jan 15, 2008 * Changed g:netrw_noretmap -> |g:netrw_retmap|.
3161 Changed: disabled by default at Bram's
3163 v118: Jan 02, 2008 * Fixed a problem with Windows;
3164 :Explore c:/path/ would not work,
3165 but :Explore c:/path would.
3166 * Fixed a bug in s:NetrwOptionRestore() - lcd's
3167 argument wasn't being properly escaped so it
3168 wouldn't handle spaces in directory names.
3170 v117: Jan 02, 2008 * Fixed a problem with P; had to include
3171 a b:netrw_curdir bypass (Bram Moolenaar)
3172 v116: Nov 27, 2007 * netrw#LocalBrowseCheck() has &ft=="netrw"
3173 check to prevent doing a directory listing
3174 (was getting unexpected directory refreshes
3175 in the middle of some function calls)
3176 * NetrwOptionRestore moved after e! filename
3177 in order to retain user options for editing
3178 in s:NetrwBrowseChgDir()
3179 Dec 12, 2007 * Bug fix -- netrw does a better job of retaining
3180 user options when editing files under the aegis
3182 v115: Oct 04, 2007 * Erik Remmelzwaal pointed out that the use of
3183 shellslash in s:GetTempfile() was incorrect
3184 Oct 11, 2007 * Tracked down and eliminated a bug with editing
3185 remote *.tar.gz and *.tar.bz2 files
3186 Oct 11, 2007 * g:netrw_localmovecmd wasn't being initialized
3187 properly, and g:netrw_localcopycmd was being
3189 Oct 12, 2007 * Placed all :Rexplore and <2-leftmouse> setup
3190 in a new support function (s:SetRexDir()).
3191 Oct 15, 2007 * new: g:netrw_browse_split == 4; means <cr>
3192 based selection will use previous window
3193 Oct 20, 2007 * also checks on |'shellxquote'| to set g:netrw_shq
3194 Oct 24, 2007 * Explore handles path/**/filename
3195 Oct 27, 2007 * sourcing remote files often didn't work with ftp,
3196 turns out that b:netrw_method was undefined, so
3197 s:SaveBufVars and s:RestoreBufVars() fixed it.
3198 v114: Sep 28, 2007 * mT, the map that invokes tags, has been improved
3199 to support use of remote tags files.
3200 Oct 02, 2007 * changed Netrw menu to use more submenus
3201 v113: Sep 07, 2007 * worked out why the cursor position wasn't being
3202 saved and restored as intended after doing such
3203 things as deleting and renaming files.
3204 Sep 11, 2007 * Fixed bug which effectively disabled <c-l> and
3206 Sep 18, 2007 * there used to be one NetrwOptionRestore() call at
3207 the end of the s:NetrwBrowseChgDir() function;
3208 they're now at the end of every if..elseif..else
3209 block. The edit-a-file one is not quite at the end
3210 of its block; instead, it's just before the edit.
3211 Restores user options, then this new placement
3212 allows ftplugins, autocmds, etc to change settings
3213 (ex. ftplugin/cpp.vim sets cindent).
3214 Sep 19, 2007 * changed all strlen() calls to use s:Strlen(), a
3215 function which handles utf-8 wide characters
3217 Sep 20, 2007 * (Nico Weber) the "x" command has been extended
3218 to Mac's OS/X (macunix); it now uses open to
3219 handle |netrw-x| browsing with special files.
3220 Sep 22, 2007 * Added g:netrw_noretmap to netrw at Tony M's
3222 * Included path to NetrwRemoteRmFile()
3223 v112: Aug 18, 2007 * added mx (|netrw-mx|) for executing arbitrary
3224 commands on marked files
3225 Aug 22, 2007 * more option save/restore work for
3226 s:NetrwBrowseChgDir(); s:NetrwOptionSave()
3227 and s:NetrwOptionRestore() now take a parameter
3228 specifying the type of variables to be used for
3229 saving and restoring (either "w:" or "s:")
3230 Sep 04, 2007 * added the :NetrwClean[!] command
3231 v111: Jul 25, 2007 * using Windows but not using Cygwin, netrw does a
3232 "file bufname" where the bufname uses /s
3233 instead of \s; Vim "fixes" it by changing the
3234 bufname to use \s anyway. This meant that
3235 NetrwGetBuffer() didn't find the appropriately
3236 named buffer, and so would generate a new
3237 buffer listing; hence the cursor would appear
3238 to have been moved when doing a preview.
3239 * added <2-leftmouse> map to return to netrw's
3241 Aug 16, 2007 * added the mark-file system, including
3242 maps for mf mp mt mz and mu. Modifications
3243 made to maps for a D O and R to support
3245 v110: May 10, 2007 * added [ and ] maps to NetrwTreeListing
3246 May 25, 2007 * |g:netrw_preview| included
3247 May 29, 2007 * modified netrw#NetBrowseX to consistently use
3248 g:netrw_shq instead of hardcoded quotes,
3249 and modified the snippet that sets up redir
3250 so Windows machines use "nul" instead of
3252 Jun 01, 2007 * fixed bug -- NetGetBuffer() wasn't always
3253 recognizing a buffer name match when it should,
3254 thus resulting in [Scratch] buffers.
3255 Jun 04, 2007 * Gary Johnson found a bugfix for the "c" mapping
3256 when the directory is to be made current but
3257 the name contains spaces.
3258 v109: Mar 26, 2007 * if a directory name includes a "$" character,
3259 Explore() will use expand() in an attempt to
3261 May 07, 2007 * g:netrw_use_errorwindow now allows one to
3262 have error messages go to a reliable window
3263 or to use a less reliable but recallable
3265 May 07, 2007 * g:netrw_scpport and g:netrw_sshport support
3266 use of -P and -p, respectively, to set port
3268 v108: Jan 03, 2007 * included preview map (|netrw-p|), supporting
3270 * netrw can now source remote files
3271 Jan 26, 2007 * Colton Jamieson noted that remote directory
3272 browsing did not support alternate port
3273 selection. This feature has now been extended
3274 to apply to all remote browsing commands via ssh.
3275 (list, remove/delete, rename)
3276 Jan 31, 2007 * Luis Florit reported that @* was an invalid
3277 register. The @* register is now only saved and
3278 restored if |'guioptions'| contains "a".
3279 Feb 02, 2007 * Fixed a bug that cropped up when writing files
3280 via scp using cygwin
3281 Feb 08, 2007 * tree listing mode managed to stop working again;
3283 Feb 15, 2007 * Guido Van Hoecke reported that netrw didn't
3284 handle browsing well with M$ ftp servers. He even
3285 set up a temporary account for me to test with
3286 (thanks!). Netrw now can browse M$ ftp servers.
3287 v107: Oct 12, 2006 * bypassed the autowrite option
3288 Oct 24, 2006 * handles automatic decompression of *.gz and *.bz2
3290 Nov 03, 2006 * Explore will highlight matching files when
3291 **/pattern is used (and if the |'hls'| option
3293 Nov 09, 2006 * a debugging line, when enabled, was inadvertently
3294 bringing up help instead of simply reporting on
3296 Nov 21, 2006 * tree listing improved (cursor remains put)
3297 Nov 27, 2006 * fixed b:netrw_curdir bug when repeated "i"s were
3299 Dec 15, 2006 * considerable qty of changes, mostly to share more
3300 code between local and remote browsing. Includes
3301 support for tree-style listing for both remote
3303 Dec 15, 2006 * Included Peter Bengtsson's modifications to
3305 v106: Sep 21, 2006 * removed old v:version<700 code as netrw now
3307 * worked around a bug where register * was
3308 overwritten during local browsing
3309 v104: Sep 05, 2006 * as suggested by Rodolfo Borges, :Explore and
3310 variants will position the cursor on the file
3311 just having been edited
3312 * changed default |g:netrw_sort_sequence| order
3313 * changed b, Nb to simply mb (see |netrw-mb|)
3314 * changed B, NB to simply gb (see |netrw-gb|)
3315 * tree listing style (see |g:netrw_liststyle|)
3316 * attempts to retain the alternate file
3317 v103: Jul 26, 2006 * used Yakov Lerner's tip#1289 to improve netrw
3318 error message display
3319 * wide listings didn't handle files with backslashes
3320 in their names properly. A symptom was an
3321 inability to open files.
3322 Aug 09, 2006 * included "t" mapping for opening tabbed windows,
3323 both for remote and local browsing
3324 * changed netrw_longlist to netrw_liststyle
3325 Aug 15, 2006 * fixed one of the NB maps
3326 Aug 22, 2006 * changed *Explore commands to use -nargs=* instead
3327 of -nargs=?. Allows both -complete=dir _and_ the
3328 starstar arguments to work (-nargs=? seems to
3329 require one or the other).
3330 Aug 23, 2006 * copied all w:.. variables across splits to
3332 Aug 25, 2006 * when g:netrw_browsex_viewer was '-'
3333 (see |g:netrw_browsex_viewer|) it wasn't causing
3334 netrwFileHandlers#Invoke() to be called as it
3335 was expected to. (tnx Steve Dugaro)
3336 Aug 29, 2006 * changed NetBrowseX() to use "setlocal ... noswf"
3337 instead of "set ... noswf" (tnx Benji Fisher)
3338 Aug 31, 2006 * tabs and fastbrowse<=1 didn't work together.
3339 v102: Jun 15, 2006 * chgd netrwPlugin to call netrw#LocalBrowseCheck()
3340 * bugfix: g:netrw_keepdir==0 had stopped working
3341 Jul 06, 2006 * bugfix: NetOptionSave/Restore now saves/restores
3342 the unnamed register (|registers|)
3343 Jul 07, 2006 * |g:netrw_menu| support included
3344 Jul 13, 2006 * :Texplore command implemented
3345 Jul 17, 2006 * NetSplit and (Local|Net)BrowseChgDir() were both
3346 splitting windows. This affected o, v, and
3347 g:netrw_browse_split.
3348 Jul 20, 2006 * works around wildignore setting (was causing
3349 netrw's local browser not to list wildignore'd
3351 Jul 24, 2006 * <leftmouse> acts as a <cr> for selecting a file
3352 <rightmouse> acts as a <del> for deleting a file
3353 v100: May 14, 2006 * when using Windows and shell==cmd.exe, the
3354 default for g:netrw_ignorenetrc is now 1
3355 * bugfix: unwanted ^Ms now removed
3356 (affected shell==cmd.exe - Windows)
3357 * added Bookmarks and History to the menu
3358 * an error message about non-existing
3359 w:netrw_longlist was appearing during attempts to
3361 * g:netrw_shq now available to make netrw use
3362 specified style of quotes for commands
3363 May 29, 2006 * user NFH_*() functions were inadvertently being
3365 * fixed a Windows non-cygwin ftp handling problem.
3366 * hiding pattern candidate separators included some
3367 characters it shouldn't have (tnx to Osei Poku)
3368 Jun 01, 2006 * for browsing, netrw was supposed to use "dir"
3369 instead of "ls -lF" when using
3370 ftp+non-cygwin+windows. Fixed.
3371 * an inadvertently left-in-place debugging statement
3372 was preventing use of the "x" key with browsing.
3373 Jun 05, 2006 * g:netrw_nogx available to prevent making the gx
3374 map (see |g:netrw_nogx|)
3375 * bugfix, Explore wouldn't change directory
3376 properly (vim ., :Explore subdirname)
3377 Jun 06, 2006 * moved history to 2nd line in Netrw menu
3378 * fixed delete for unix-based systems
3379 Jun 07, 2006 * x key now works for windows-noncygwin-ftp
3380 Jun 08, 2006 * Explore */pat and **//pat now wraps
3381 v99: May 09, 2006 * g:netrw_browse_split=3 for opening files in new
3383 May 12, 2006 * deletes temporary file at end of NetRead()
3384 * visual mode based Obtain implemented
3385 * added -complete=dir to the various Explore
3387 v98: May 02, 2006 * the "p" key didn't work properly when the browsing
3388 directory name had spaces in it.
3389 v97: May 01, 2006 * exists("&acd") now used to determine if
3390 the 'acd' option exists
3391 * "obtain" now works again under Windows
3392 v96: * bugfix - the |'acd'| option is not always defined
3393 but is now bypassed only when it is
3394 v95: * bugfix - Hiding mode worked correctly (don't show
3395 any file matching any of the g:netrw_hide
3396 patterns), but showing mode was showing only those
3397 files that didn't match any of the g:netrw_hide
3398 patterns. Instead, it now shows all files that
3399 match any of the g:netrw_hide patterns (the
3400 difference between a logical and and logical or).
3401 v94: * bugfix - a Decho() had a missing quote; only
3402 affects things when debugging was enabled.
3403 v93: * bugfix - removed FocusGained event from causing a
3404 slow-browser refresh for Windows
3405 v92: * :Explore **//pattern implemented
3406 (**/filepattern was already taken)
3407 v91: * :Explore */pattern implemented
3408 * |'acd'| option bypassed
3409 v90: * mark ', as suggested by Yegappan Lakshmanan, used
3410 to help guarantee entry into the jump list when
3412 * <s-down> and <s-up> are no longer defined until a
3413 :Explore **/pattern is used (if the user already
3414 has a map for them). They will be defined for new
3415 browser windows from that point forward.
3416 v89: * A <s-down>, <s-up>, :Nexplore, or a :Pexplore
3417 without having first done an :Explore **/pattern
3418 (see |netrw-starstar|) caused
3419 a lot of unhelpful error messages to appear
3420 v88: * moved DrChip.Netrw menu to Netrw. Now has
3421 priority 80 by default.
3422 g:NetrwTopLvlMenu == "Netrw" and can be changed
3423 by the user to suit. The priority is given by
3424 g:NetrwMenuPriority.
3425 * Changed filetype for browser displays from
3427 v87: * bug fix -- menus were partially disappearing
3428 v85: * bug fix -- missing an endif
3429 * bug fix -- handles spaces in names and directories
3430 when using ftp-based browsing
3431 v83: * disabled stop-acd handling; the change in directory
3432 handling may allow acd to be used again.
3433 * D was refusing to delete remote files/directories
3434 in wide listing mode.
3435 v81: * FocusGained also used to refresh/wipe local browser
3437 * (bugfix) netrw was leaving [Scratch] buffers behind
3438 when the user had the "hidden" option set. The
3439 'hidden' option is now bypassed.
3440 v80: * ShellCmdPost event used in conjunction with
3441 g:netrw_fastbrowse to refresh/wipe local browser
3443 v79: * directories are now displayed with nowrap
3444 * (bugfix) if the column width was smaller than the
3445 largest file's name, then netrw would hang when
3446 using wide-listing mode - fixed
3447 * g:netrw_fastbrowse introduced
3448 v78: * progress has been made on allowing spaces inside
3449 directory names for remote work (reading, writing,
3451 v77: * Mikolaj Machowski fixed a bug in a substitute cmd
3452 * g:netrw_browsex_viewer implemented
3453 * Mikolaj Machowski pointed out that gnome-open is
3454 often executable under KDE systems, although it is
3455 effectively not functional. NetBrowseX now looks
3456 for "kicker" as a running process to determine if
3457 KDE is actually running.
3458 * Explorer's O functionality was inadvertently left
3459 out. Netrw now does the same thing, but with the
3461 * added g:netrw_browse_split option
3462 * fixed a bug where the directory contained a "." but
3463 the file didn't (was treating the dirname from "."
3464 onwards as a suffix)
3465 v76: * "directory is missing" error message now restores
3467 v75: * file://... now conforms to RFC2396 (thanks to
3469 * if the binary option is set, then NetWrite() will
3470 only write the whole file (line numbers don't make
3471 sense with this). Supports writing of tar and zip
3473 v74: * bugfix (vim, then :Explore) now works
3474 * ctrl-L keeps cursor at same screen location (both
3475 local and remote browsing)
3476 * netrw now can read remote zip and tar files
3477 * Obtain now uses WinXP ftp+.netrc successfully
3478 v73: * bugfix -- scp://host/path/file was getting named
3480 * netrw detects use of earlier-than-7.0 version of
3481 vim and issues a pertinent error message.
3482 * netrwSettings.vim is now uses autoloading. Only
3483 <netrwPlugin.vim> is needed as a pure plugin
3484 (ie. always loaded).
3485 v72: * bugfix -- formerly, one could prevent the loading
3486 of netrw by "let g:loaded_netrw=1"; when
3487 autoloading became supported, this feature was
3488 lost. It is now restored.
3489 v71: * bugfix -- made some "set nomodifiable"s into
3490 setlocal variants (allows :e somenewfile to be
3491 modifiable as usual)
3492 * NetrwSettings calls a netrw function, thereby
3493 assuring that netrw has loaded. However, if netrw
3494 does not load for whatever reason, then
3495 NetrwSettings will now issue a warning message.
3496 * For what reason I don't recall, when wget and fetch
3497 are both not present, and an attempt to read a
3498 http://... url is made, netrw exited. It now only
3500 * When ch=1, on the second and subsequent uses of
3501 browsing Netrw would issue a blank line to clear
3502 the echo'd messages. This caused an annoying
3503 "Hit-Enter" prompt; now a blank line message
3504 is echo'd only if &ch>1.
3505 v70: * when using |netrw-O|, the "Obtaining filename"
3506 message is now shown using |hl-User9|. If User9
3507 has not been defined, netrw itself will define it.
3508 v69: * Bugfix: win95/98 machines were experiencing a
3509 "E121: Undefined variable: g:netrw_win95ftp"
3511 v68: * double-click-leftmouse selects word under mouse
3512 v67: * Passwords which contain blanks will now be
3513 surrounded by double-quotes automatically (Yongwei)
3514 v66: * Netrw now seems to work with a few more Windows
3516 * O now obtains a file: remote browsing
3517 file -> local copy, locally browsing
3518 file -> current directory (see :pwd)
3519 * i now cycles between thin, long, and wide listing
3521 * NB and Nb are maps that are always available;
3522 corresponding B and b maps are only available when
3523 not using wide listing in order to allow them to
3525 v65: * Browser functions now use NetOptionSave/Restore; in
3526 particular, netrw now works around the report
3528 v64: * Bugfix - browsing a "/" directory (Unix) yielded
3529 buffers named "[Scratch]" instead of "/"
3530 * Bugfix - remote browsing with ftp was omitting
3532 v63: * netrw now takes advantage of autoload (needs 7.0)
3533 * Bugfix - using r (to reverse sort) working again
3534 v62: * Bugfix - spaces allowed again in directory names
3535 with g:netrw_keepdir=0. In fact, I've tested netrw
3536 with most ANSI punctuation marks for directory
3538 * Bugfix - NetrwSettings gave errors when
3539 g:netrw_silent had not be set.
3540 v61: * Document upgrade -- netrw variable-based settings
3541 all should have tags. Supports NetrwSettings cmd.
3542 * Several important variables are window-oriented.
3543 Netrw has to transfer these across a window split.
3544 See s:BufWinVars() and s:UseBufWinVars().
3545 v60: * When using the i map to switch between long and
3546 short listings, netrw will now keep cursor on same
3548 * "Match # of #" now uses status line
3549 * :Explore **/*.c will now work from a
3550 non-netrw-browser window
3551 * :Explore **/patterns can now be run in separate
3553 * active banner (hit <cr> will cause various things
3555 v59: * bugfix -- another keepalt work-around installed
3557 * "Match # of #" for Explore **/pattern matches
3558 v58: * Explore and relatives can now handle
3559 **/somefilepattern (v7)
3560 * Nexplore and Pexplore introduced (v7). shift-down
3561 and shift-up cursor keys will invoke Nexplore and
3562 Pexplore, respectively.
3563 * bug fixed with o and v
3564 * autochdir only worked around for vim when it has
3565 been compiled with either
3566 |+netbeans_intg| or |+sun_workshop|
3567 * Under Windows, all directories and files were
3568 being preceded with a "/" when local browsing.
3570 * When: syntax highlighting is off, laststatus=2, and
3571 remote browsing is used, sometimes the laststatus
3572 highlighting bleeds into the entire display. Work
3573 around - do an extra redraw in that case.
3574 * Bugfix: when g:netrw_keepdir=0, due to re-use of
3575 buffers, netrw didn't change the directory when it
3577 * Bugfix: D and R commands work again
3578 v57: * Explore and relatives can now handle RO files
3579 * reverse sort restored with vim7's sort command
3580 * g:netrw_keepdir now being used to keep the current
3581 directory unchanged as intended (sense change)
3582 * vim 6.3 still supported
3583 v56: * LocalBrowse now saves autochdir setting, unsets it,
3584 and restores it before returning.
3585 * using vim's rename() instead of system +
3586 local_rename variable
3587 * avoids changing directory when g:netrw_keepdir is
3589 v55: * -bar used with :Explore :Sexplore etc to allow
3590 multiple commands to be separated by |s
3591 * browser listings now use the "nowrap" option
3592 * browser: some unuseful error messages now
3594 v54: * For backwards compatibility, Explore and Sexplore
3595 have been implemented. In addition, Hexplore and
3596 Vexplore commands are available, too.
3597 * <amatch> used instead of <afile> in the
3598 transparency support (BufReadCmd, FileReadCmd,
3600 * ***netrw*** prepended to various error messages
3602 * g:netrw_port used instead of b:netrw_port for scp
3603 * any leading [:#] is removed from port numbers
3604 v53: * backslashes as well as slashes placed in various
3605 patterns (ex. g:netrw_sort_sequence) to better
3607 v52: * nonumber'ing now set for browsing buffers
3608 * when the hiding list hid all files, error messages
3610 * when browsing, swf is set, but directory is not
3611 set, when netrw was attempting to restore options,
3612 vim wanted to save a swapfile to a local directory
3613 using an url-style path. Fixed
3614 v51: * cygwin detection now automated
3615 (using windows and &shell is bash)
3616 * customizable browser "file" rejection patterns
3618 * :[range]w url now supported (ie. netrw uses a
3620 * error messages have a "Press <cr> to continue" to
3621 allow them to be seen
3622 * directory browser displays no longer bother the
3624 * u/U commands to go up and down the history stack
3625 * history stack may be saved with viminfo with it's
3627 * bugfixes associated with unwanted [No Files]
3629 v50: * directories now displayed using buftype=nofile;
3630 should keep the directory names as-is
3631 * attempts to remove empty "[No File]" buffers
3632 leftover from :file ..name.. commands
3633 * bugfix: a "caps-lock" editing difficulty left in
3635 * syntax highlighting for "Showing:" the hiding list
3637 * bookmarks can now be retained if "!" is in the
3639 v49: * will use ftp for http://.../ browsing
3640 v48: * One may use ftp to do remote host file browsing
3641 * (windows and !cygwin) remote browsing with ftp can
3642 now use the "dir" command internally to provide
3644 * g:netrw_keepdir now allows one to keep the initial
3645 current directory as the current directory
3646 (normally the local file browser makes the
3647 currently viewed directory the current directory)
3648 * g:netrw_alto and g:netrw_altv now support
3649 alternate placement of windows started with o or v
3650 * Nread ? and Nwrite ? now uses echomsg (instead of
3651 echo) so :messages can repeat showing the help
3652 * bugfix: avoids problems with partial matches of
3653 directory names to prior buffers with longer names
3654 * one can suppress error messages with g:netrw_quiet
3656 * instead of <Leader>h for editing hiding list one
3657 may edit the sorting sequence with the S map, which
3658 now allows confirmation of deletion with
3659 [y(es) n(o) a(ll) q(uit)]
3660 * the "x" map now handles special file viewing with:
3661 (windows) rundll32 url.dll (gnome) gnome-open (kde)
3662 kfmclient If none of these are on the executable
3663 path, then netrwFileHandlers.vim is used.
3664 * directory bookmarking during both local and remote
3665 browsing implemented
3666 * one may view all, use the hiding list to suppress,
3667 or use the hiding list to show-only remote and
3668 local file/directory listings
3669 * improved unusual file and directory name handling
3670 preview window support
3671 v47: * now handles local browsing.
3672 v46: * now handles remote browsing
3673 * g:netrw_silent (if 1) will cause all transfers to
3675 v45: * made the [user@]hostname:path form a bit more
3676 restrictive to better handle errors in using
3677 protocols (e.g. scp:usr@host:file was being
3678 recognized as an rcp request)
3679 v44: * changed from "rsync -a" to just "rsync"
3680 * somehow an editing error messed up the test to
3681 recognize use of the fetch method for NetRead.
3682 * more debugging statements included
3683 v43: * moved "Explanation" comments to <pi_netrw.txt> help
3684 file as "Network Reference" (|netrw-ref|)
3685 * <netrw.vim> now uses Dfunc() Decho() and Dret() for
3687 * removed superfluous NetRestorePosn() calls
3688 v42: * now does BufReadPre and BufReadPost events on
3689 file:///* and file://localhost/*
3690 v41: * installed file:///* and file://localhost/* handling
3691 v40: * prevents redraw when a protocol error occurs so
3692 that the user may see it
3694 v38: * Now uses NetRestorePosn() calls with Nread/Nwrite
3696 * Temporary files now removed via bwipe! instead of
3697 bwipe (thanks to Dave Roberts)
3698 v37: * Claar's modifications which test if ftp is
3699 successful, otherwise give an error message
3700 * After a read, the alternate file was pointing to
3701 the temp file. The temp file buffer is now wiped
3703 * removed silent from transfer methods so user can
3704 see what's happening
3707 ==============================================================================
3708 13. Todo *netrw-todo* {{{1
3710 07/29/09 : banner :|g:netrw_banner| can be used to suppress the
3711 suppression banner. This feature is new and experimental,
3712 so its in the process of being debugged.
3713 09/04/09 : "gp" : See if it can be made to work for remote systems.
3714 : See if it can be made to work with marked files.
3716 ==============================================================================
3717 14. Credits *netrw-credits* {{{1
3719 Vim editor by Bram Moolenaar (Thanks, Bram!)
3720 dav support by C Campbell
3721 fetch support by Bram Moolenaar and C Campbell
3722 ftp support by C Campbell <NdrOchip@ScampbellPfamily.AbizM>
3723 http support by Bram Moolenaar <bram@moolenaar.net>
3725 rsync support by C Campbell (suggested by Erik Warendorph)
3726 scp support by raf <raf@comdyn.com.au>
3727 sftp support by C Campbell
3729 inputsecret(), BufReadCmd, BufWriteCmd contributed by C Campbell
3731 Jérôme Augé -- also using new buffer method with ftp+.netrc
3732 Bram Moolenaar -- obviously vim itself, :e and v:cmdarg use,
3734 Yasuhiro Matsumoto -- pointing out undo+0r problem and a solution
3735 Erik Warendorph -- for several suggestions (g:netrw_..._cmd
3736 variables, rsync etc)
3737 Doug Claar -- modifications to test for success with ftp
3740 ==============================================================================
3742 vim:tw=78:ts=8:ft=help:norl:fdm=marker