changeset 559:8ec588470508

updated for version 7.0159
author vimboss
date Fri, 25 Nov 2005 19:54:28 +0000
parents 7ccb59c211b7
children 8b84fe17e147
files runtime/autoload/netrw.vim runtime/doc/pi_netrw.txt src/version.h
diffstat 3 files changed, 721 insertions(+), 481 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,36 +1,96 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            AUTOLOAD PORTION
-" Last Change:	Aug 31, 2005
+" Date:		Nov 18, 2005
+" Version:	75
 " Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
 "               Permission is hereby granted to use and distribute this code,
 "               with or without modifications, provided that this copyright
 "               notice is copied with it. Like anything else that's free,
-"               netrw.vim is provided *as is* and comes with no warranty
-"               of any kind, either expressed or implied. By using this
-"               plugin, you agree that in no event will the copyright
-"               holder be liable for any damages resulting from the use
+"               netrw.vim, netrwPlugin.vim, and netrwSettings.vim are provided
+"               *as is* and comes with no warranty of any kind, either
+"               expressed or implied. By using this plugin, you agree that
+"               in no event will the copyright holder be liable for any damages
+"               resulting from the use of this software.
 "               of this software.
 "
 "  But be doers of the Word, and not only hearers, deluding your own selves {{{1
 "  (James 1:22 RSV)
 " =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-let s:keepcpo= &cpo
-set cpo&vim
-" call Decho("doing autoload/netrw.vim")
+
+" Exception for &cp: {{{1
+if &cp || exists("g:loaded_netrw")
+  finish
+endif
+let g:loaded_netrw = "v75"
 if v:version < 700
  echohl WarningMsg | echo "***netrw*** you need vim version 7.0 or later for version ".g:loaded_netrw." of netrw" | echohl None
  finish
 endif
+let s:keepcpo= &cpo
+set cpo&vim
+" call Decho("doing autoload/netrw.vim")
 
 " ---------------------------------------------------------------------
-" Default values for global netrw variables {{{1
-if !exists("g:netrw_ftpmode")
- let g:netrw_ftpmode= "binary"
+" Default values for netrw's global protocol variables {{{1
+if !exists("g:netrw_dav_cmd")
+  let g:netrw_dav_cmd	= "cadaver"
+endif
+if !exists("g:netrw_fetch_cmd")
+ if executable("fetch")
+  let g:netrw_fetch_cmd	= "fetch -o"
+ else
+  let g:netrw_fetch_cmd	= ""
+ endif
+endif
+if !exists("g:netrw_ftp_cmd")
+  let g:netrw_ftp_cmd	= "ftp"
+endif
+if !exists("g:netrw_http_cmd")
+ if executable("wget")
+  let g:netrw_http_cmd	= "wget -q -O"
+ elseif executable("fetch")
+  let g:netrw_http_cmd	= "fetch -o"
+ else
+  let g:netrw_http_cmd	= ""
+ endif
+endif
+if !exists("g:netrw_rcp_cmd")
+  let g:netrw_rcp_cmd	= "rcp"
+endif
+if !exists("g:netrw_rsync_cmd")
+  let g:netrw_rsync_cmd	= "rsync"
 endif
-if !exists("g:netrw_win95ftp")
- let g:netrw_win95ftp= 1
+if !exists("g:netrw_scp_cmd")
+  let g:netrw_scp_cmd	= "scp -q"
+endif
+if !exists("g:netrw_sftp_cmd")
+  let g:netrw_sftp_cmd	= "sftp"
+endif
+if !exists("g:netrw_ssh_cmd")
+ let g:netrw_ssh_cmd= "ssh"
+endif
+
+if has("win32") || has("win95") || has("win64") || has("win16")
+  \ && exists("g:netrw_use_nt_rcp")
+  \ && g:netrw_use_nt_rcp
+  \ && executable( $SystemRoot .'/system32/rcp.exe')
+ let s:netrw_has_nt_rcp = 1
+ let s:netrw_rcpmode    = '-b'
+ else
+ let s:netrw_has_nt_rcp = 0
+ let s:netrw_rcpmode    = ''
+endif
+
+" ---------------------------------------------------------------------
+" Default values for netrw's global variables {{{1
+" Default values - a-c ---------- {{{2
+if !exists("g:netrw_alto")
+ let g:netrw_alto= 0
+endif
+if !exists("g:netrw_altv")
+ let g:netrw_altv= 0
 endif
 if !exists("g:netrw_cygwin")
  if has("win32") || has("win95") || has("win64") || has("win16")
@@ -43,14 +103,15 @@ if !exists("g:netrw_cygwin")
   let g:netrw_cygwin= 0
  endif
 endif
-if !exists("g:netrw_list_cmd")
- if executable("ssh")
-  " provide a default listing command
-  let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
- else
-"  call Decho("ssh is not executable, can't do remote directory exploring with ssh")
-  let g:netrw_list_cmd= ""
- endif
+" Default values - d-f ---------- {{{2
+if !exists("g:NETRW_DIRHIST_CNT")
+ let g:NETRW_DIRHIST_CNT= 0
+endif
+if !exists("g:netrw_dirhistmax")
+ let g:netrw_dirhistmax= 10
+endif
+if !exists("g:netrw_ftp_browse_reject")
+ let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
 endif
 if !exists("g:netrw_ftp_list_cmd")
  if has("unix") || exists("g:netrw_cygwin")
@@ -59,75 +120,96 @@ if !exists("g:netrw_ftp_list_cmd")
   let g:netrw_ftp_list_cmd= "dir"
  endif
 endif
+if !exists("g:netrw_ftpmode")
+ let g:netrw_ftpmode= "binary"
+endif
+" Default values - h-lh ---------- {{{2
+if !exists("g:netrw_hide")
+ let g:netrw_hide= 1
+endif
+if !exists("g:netrw_keepdir")
+ let g:netrw_keepdir= 1
+endif
+if !exists("g:netrw_list_cmd")
+ if executable(g:netrw_ssh_cmd)
+  " provide a default listing command
+  let g:netrw_list_cmd= g:netrw_ssh_cmd." HOSTNAME ls -FLa"
+ else
+"  call Decho(g:netrw_ssh_cmd." is not executable, can't do remote directory exploring)
+  let g:netrw_list_cmd= ""
+ endif
+endif
+if !exists("g:netrw_list_hide")
+ let g:netrw_list_hide= ""
+endif
+" Default values - lh-lz ---------- {{{2
+if !exists("g:netrw_local_mkdir")
+ let g:netrw_local_mkdir= "mkdir"
+endif
+if !exists("g:netrw_local_rmdir")
+ let g:netrw_local_rmdir= "rmdir"
+endif
+if !exists("g:netrw_longlist")
+ let g:netrw_longlist= 0
+endif
+if g:netrw_longlist < 0 || g:netrw_longlist > 2
+ " sanity check
+ let g:netrw_longlist= 0
+endif
+if g:netrw_longlist == 1
+ let g:netrw_list_cmd= g:netrw_list_cmd." -l"
+endif
+" Default values - m-r ---------- {{{2
+if !exists("g:netrw_maxfilenamelen")
+ let g:netrw_maxfilenamelen= 32
+endif
+if !exists("g:netrw_mkdir_cmd")
+ let g:netrw_mkdir_cmd= g:netrw_ssh_cmd." HOSTNAME mkdir"
+endif
+if !exists("g:netrw_rename_cmd")
+ let g:netrw_rename_cmd= g:netrw_ssh_cmd." HOSTNAME mv"
+endif
 if !exists("g:netrw_rm_cmd")
- let g:netrw_rm_cmd    = "ssh HOSTNAME rm"
+ let g:netrw_rm_cmd    = g:netrw_ssh_cmd." HOSTNAME rm"
+endif
+if !exists("g:netrw_rmdir_cmd")
+ let g:netrw_rmdir_cmd = g:netrw_ssh_cmd." HOSTNAME rmdir"
 endif
 if !exists("g:netrw_rmf_cmd")
- let g:netrw_rmf_cmd    = "ssh HOSTNAME rm -f"
+ let g:netrw_rmf_cmd    = g:netrw_ssh_cmd." HOSTNAME rm -f"
 endif
-if !exists("g:netrw_rmdir_cmd")
- let g:netrw_rmdir_cmd = "ssh HOSTNAME rmdir"
-endif
-if !exists("g:netrw_rename_cmd")
- let g:netrw_rename_cmd= "ssh HOSTNAME mv"
-endif
+" Default values - s ---------- {{{2
 if exists("g:netrw_silent") && g:netrw_silent != 0
  let g:netrw_silentxfer= "silent "
 else
  let g:netrw_silentxfer= ""
 endif
-if !exists("g:netrw_winsize")
- let g:netrw_winsize= ""
-endif
-if !exists("g:netrw_list_hide")
- let g:netrw_list_hide= ""
-endif
 if !exists("g:netrw_sort_by")
  " alternatives: date size
  let g:netrw_sort_by= "name"
 endif
-if !exists("g:netrw_sort_sequence")
- let g:netrw_sort_sequence= '[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$'
-endif
 if !exists("g:netrw_sort_direction")
  " alternative: reverse  (z y x ...)
  let g:netrw_sort_direction= "normal"
 endif
-if !exists("g:netrw_longlist")
- let g:netrw_longlist= 0
-endif
-if g:netrw_longlist == 0 || g:netrw_longlist == 2
- let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
-else
- let g:netrw_longlist= 1
- let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa -l"
-endif
-if !exists("g:netrw_list_cmd")
-endif
-if !exists("g:netrw_timefmt")
- let g:netrw_timefmt= "%c"
-endif
-if !exists("g:netrw_local_rmdir")
- let g:netrw_local_rmdir= "rmdir"
-endif
-if !exists("g:netrw_local_mkdir")
- let g:netrw_local_mkdir= "mkdir"
-endif
-if !exists("g:netrw_mkdir_cmd")
- let g:netrw_mkdir_cmd= "ssh HOSTNAME mkdir"
-endif
-if !exists("g:netrw_hide")
- let g:netrw_hide= 1
-endif
-if !exists("g:netrw_ftp_browse_reject")
- let g:netrw_ftp_browse_reject='^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$'
+if !exists("g:netrw_sort_sequence")
+ let g:netrw_sort_sequence= '[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$'
 endif
 if !exists("g:netrw_ssh_browse_reject")
   let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
 endif
-if !exists("g:netrw_keepdir")
- let g:netrw_keepdir= 1
+" Default values - t-w ---------- {{{2
+if !exists("g:netrw_timefmt")
+ let g:netrw_timefmt= "%c"
 endif
+if !exists("g:netrw_win95ftp")
+ let g:netrw_win95ftp= 1
+endif
+if !exists("g:netrw_winsize")
+ let g:netrw_winsize= ""
+endif
+" ---------------------------------------------------------------------
+" Default values for netrw's script variables: {{{1
 if !exists("s:netrw_cd_escape")
  if has("win32") || has("win95") || has("win64") || has("win16")
   let s:netrw_cd_escape="#% "
@@ -142,75 +224,12 @@ if !exists("s:netrw_glob_escape")
   let s:netrw_glob_escape= '[]*?`{~$'
  endif
 endif
-if !exists("g:netrw_alto")
- let g:netrw_alto= 0
-endif
-if !exists("g:netrw_altv")
- let g:netrw_altv= 0
-endif
-if !exists("g:netrw_maxfilenamelen")
- let g:netrw_maxfilenamelen= 32
-endif
-if !exists("g:netrw_dirhistmax")
- let g:netrw_dirhistmax= 10
-endif
-if !exists("g:NETRW_DIRHIST_CNT")
- let g:NETRW_DIRHIST_CNT= 0
-endif
 
 " BufEnter event ignored by decho when following variable is true
 "  Has a side effect that doau BufReadPost doesn't work, so
 "  files read by network transfer aren't appropriately highlighted.
 "let g:decho_bufenter = 1	"Decho
 
-" ---------------------------------------------------------------------
-" Default values for global protocol variables {{{1
-if !exists("g:netrw_rcp_cmd")
-  let g:netrw_rcp_cmd	= "rcp"
-endif
-if !exists("g:netrw_ftp_cmd")
-  let g:netrw_ftp_cmd	= "ftp"
-endif
-if !exists("g:netrw_scp_cmd")
-  let g:netrw_scp_cmd	= "scp -q"
-endif
-if !exists("g:netrw_sftp_cmd")
-  let g:netrw_sftp_cmd	= "sftp"
-endif
-if !exists("g:netrw_http_cmd")
- if executable("wget")
-  let g:netrw_http_cmd	= "wget -q -O"
- elseif executable("fetch")
-  let g:netrw_http_cmd	= "fetch -o"
- else
-  let g:netrw_http_cmd	= ""
- endif
-endif
-if !exists("g:netrw_dav_cmd")
-  let g:netrw_dav_cmd	= "cadaver"
-endif
-if !exists("g:netrw_rsync_cmd")
-  let g:netrw_rsync_cmd	= "rsync"
-endif
-if !exists("g:netrw_fetch_cmd")
- if executable("fetch")
-  let g:netrw_fetch_cmd	= "fetch -o"
- else
-  let g:netrw_fetch_cmd	= ""
- endif
-endif
-
-if has("win32") || has("win95") || has("win64") || has("win16")
-  \ && exists("g:netrw_use_nt_rcp")
-  \ && g:netrw_use_nt_rcp
-  \ && executable( $SystemRoot .'/system32/rcp.exe')
- let s:netrw_has_nt_rcp = 1
- let s:netrw_rcpmode    = '-b'
- else
- let s:netrw_has_nt_rcp = 0
- let s:netrw_rcpmode    = ''
-endif
-
 " ------------------------------------------------------------------------
 " NetSavePosn: saves position of cursor on screen {{{1
 fun! netrw#NetSavePosn()
@@ -368,10 +387,20 @@ fun! netrw#NetRead(...)
 "    call Dret("NetRead")
     return
    endif
+
+   " use filename's suffix for the temporary file
+   if b:netrw_fname =~ '\.[^./]\+'
+    let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)','\1','e')
+    let tmpfile= substitute(tmpfile,"$",suffix,'e')
+"    call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix)")
+   endif
  
    " ============
    " Perform Read
    " ============
+   if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
+    echo "(netrw) Processing your read request..."
+   endif
  
    ".........................................
    " rcp:  NetRead Method #1
@@ -403,12 +432,14 @@ fun! netrw#NetRead(...)
    ".........................................
    " ftp + <.netrc>:  NetRead Method #2
    elseif b:netrw_method  == 2		" read with ftp + <.netrc>
-"    call Decho("read via ftp+.netrc (method #2)")
+"     call Decho("read via ftp+.netrc (method #2)")
      let netrw_fname= b:netrw_fname
      new
      setlocal ff=unix
      exe "put ='".g:netrw_ftpmode."'"
-     exe "put ='"."get ".netrw_fname." ".tmpfile."'"
+"     call Decho("filter input: ".getline("."))
+     exe "put ='".'get \"'.netrw_fname.'\" '.tmpfile."'"
+"     call Decho("filter input: ".getline("."))
      if exists("g:netrw_port") && g:netrw_port != ""
 "      call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
       exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
@@ -425,7 +456,7 @@ fun! netrw#NetRead(...)
       let &debug= debugkeep
      endif
      bd!
-     let result = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+     let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
      let b:netrw_lastfile = choice
  
    ".........................................
@@ -438,27 +469,33 @@ fun! netrw#NetRead(...)
     setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
+"     call Decho("filter input: ".getline("."))
     else
      put ='open '.g:netrw_machine
+"     call Decho("filter input: ".getline("."))
     endif
  
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-     put =g:netrw_passwd
+"     call Decho("filter input: ".getline("."))
+     put ='\"'.g:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline("."))
     else
-     put ='user '.g:netrw_uid.' '.g:netrw_passwd
+     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline("."))
     endif
  
     if exists("g:netrw_ftpmode") && g:netrw_ftpmode != ""
      put =g:netrw_ftpmode
+"     call Decho("filter input: ".getline("."))
     endif
-    put ='get '.netrw_fname.' '.tmpfile
+    put ='get \"'.netrw_fname.'\" '.tmpfile
+"     call Decho("filter input: ".getline("."))
  
     " perform ftp:
     " -i       : turns off interactive prompting from ftp
     " -n  unix : DON'T use <.netrc>, even though it exists
     " -n  win32: quit being obnoxious about password
-"    call Decho('performing ftp -i -n')
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
     exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
@@ -491,7 +528,7 @@ fun! netrw#NetRead(...)
 "     call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile)
      exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".tmpfile
     endif
-    let result		= s:NetGetFile(readcmd, tmpfile, b:netrw_method)
+    let result           = s:NetGetFile(readcmd, tmpfile, b:netrw_method)
     let b:netrw_lastfile = choice
  
    ".........................................
@@ -502,7 +539,8 @@ fun! netrw#NetRead(...)
       echohl Error | echo "***netrw*** neither wget nor fetch command is available" | echohl None
       call inputsave()|call input("Press <cr> to continue")|call inputrestore()
      endif
-     exit
+"     call Dret("NetRead")
+     return
     endif
  
     if match(b:netrw_fname,"#") == -1
@@ -581,7 +619,7 @@ fun! netrw#NetRead(...)
       echohl Error | echo "***netrw*** fetch command not available" | echohl None
       call inputsave()|call input("Press <cr> to continue")|call inputrestore()
      endif
-     exit
+"     call Dret("NetRead")
     endif
     if exists("g:netrw_option") && g:netrw_option == ":http"
      let netrw_option= "http"
@@ -635,9 +673,13 @@ fun! netrw#NetRead(...)
 endfun
 
 " ------------------------------------------------------------------------
-" NetGetFile: Function to read file "fname" with command "readcmd". {{{1
-fun! s:NetGetFile(readcmd, fname, method)
-"   call Dfunc("NetGetFile(readcmd<".a:readcmd.">,fname<".a:fname."> method<".a:method.">)")
+" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{1
+fun! s:NetGetFile(readcmd, tfile, method)
+"   call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
+
+  " get name of remote filename (ie. url and all)
+  let rfile= bufname("%")
+"  call Decho("rfile<".rfile.">")
  
   if exists("*NetReadFixup")
    " for the use of NetReadFixup (not otherwise used internally)
@@ -647,50 +689,57 @@ fun! s:NetGetFile(readcmd, fname, method
   " transform paths from / to \ for Windows (except for cygwin)
   if &term == "win32"
    if g:netrw_cygwin
-    let fname= a:fname
-"    call Decho("(win32 && cygwin) fname<".fname.">")
+    let tfile= a:tfile
+"    call Decho("(win32 && cygwin) tfile<".tfile.">")
    else
-    let fname= substitute(a:fname,'/','\\\\','ge')
-"    call Decho("(win32 && !cygwin) fname<".fname.">")
+    let tfile= substitute(a:tfile,'/','\\\\','ge')
+"    call Decho("(win32 && !cygwin) tfile<".tfile.">")
    endif
   else
-   let fname= a:fname
-"   call Decho("(copied) fname<".fname.">")
+   let tfile= a:tfile
+"   call Decho("tfile=a:tfile<".tfile.">")
   endif
  
   if a:readcmd[0] == '0'
   " get file into buffer
 
-   " record remote filename
-   let rfile= bufname(".")
-"   call Decho("remotefile<".rfile.">")
 "   call Dredir("ls!","starting buffer list")
 
-   " rename the current buffer to the temp file (ie. fname)
-   keepalt exe "file ".fname
-"   call Dredir("ls!","after renaming current buffer to <".fname.">")
-
-   " edit temporary file
-   e
-"   call Dredir("ls!","after editing temporary file")
+   " rename the current buffer to the temp file (ie. tfile)
+   keepalt exe "file ".tfile
+"   call Dredir("ls!","after renaming current buffer to <".tfile.">")
+
+   " edit temporary file (ie. read the temporary file in)
+   if     rfile =~ '\.zip$'
+    call zip#Browse(tfile)
+   elseif rfile =~ '\.tar$'
+    call tar#Browse(tfile)
+   else
+    e
+   endif
 
    " rename buffer back to remote filename
    keepalt exe "file ".rfile
-"   call Dredir("ls!","renaming buffer back to remote filename<".rfile.">")
+   filetype detect
+"   call Dredir("ls!","renamed buffer back to remote filename<".rfile.">")
    let line1 = 1
    let line2 = line("$")
 
-  elseif filereadable(fname)
+  elseif filereadable(tfile)
    " read file after current line
    let curline = line(".")
    let lastline= line("$")
-"   call Decho("exe<".a:readcmd." ".v:cmdarg." ".fname.">  line#".curline)
-   exe a:readcmd." ".v:cmdarg." ".fname
+"   call Decho("exe<".a:readcmd." ".v:cmdarg." ".tfile.">  line#".curline)
+   exe a:readcmd." ".v:cmdarg." ".tfile
    let line1        = curline + 1
    let line2        = line("$") - lastline + 1
+
   else
    " not readable
-"   call Dret("NetGetFile : fname<".fname."> not readable")
+"   call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
+   echohl WarningMsg | echo "***netrw*** file <".tfile."> not readable"| echohl None
+   call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+"   call Dret("NetGetFile : tfile<".tfile."> not readable")
    return
   endif
  
@@ -707,10 +756,9 @@ fun! s:NetGetFile(readcmd, fname, method
    silent! emenu Buffers.Refresh\ menu
   endif
  
-"  call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> fname<".a:fname."> readable=".filereadable(a:fname))
+"  call Decho("readcmd<".a:readcmd."> cmdarg<".v:cmdarg."> tfile<".a:tfile."> readable=".filereadable(a:tfile))
  
- " insure that we have the right filetype and that its being displayed
-  filetype detect
+ " make sure file is being displayed
   redraw!
 "  call Dret("NetGetFile")
 endfun
@@ -729,7 +777,7 @@ fun! netrw#NetWrite(...) range
   if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
    echohl Error | echo "***netrw*** your ".substitute(tmpfile,'[^/]\+$','','e')." directory is missing!"
    call inputsave()|call input("Press <cr> to continue")|call inputrestore()
-"   call Dret("NetRead")
+"   call Dret("NetWrite")
    return
   endif
  
@@ -739,8 +787,16 @@ fun! netrw#NetWrite(...) range
    let ichoice = 1
   endif
  
-  " write (selected portion of) file to temporary
-  silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile
+  if &binary
+   " for binary writes, write entire file.  Line numbers don't really make sense.
+   " Supports the writing of tar and zip files.
+"   call Decho("silent exe w! ".v:cmdarg." ".tmpfile)
+   silent exe "w! ".v:cmdarg." ".tmpfile
+  else
+   " write (selected portion of) file to temporary
+"   call Decho("silent exe ".a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile)
+   silent exe a:firstline."," . a:lastline . "w! ".v:cmdarg." ".tmpfile
+  endif
  
   while ichoice <= a:0
  
@@ -810,11 +866,14 @@ fun! netrw#NetWrite(...) range
    " =============
    " Perform Write
    " =============
+   if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
+    echo "(netrw) Processing your write request..."
+   endif
  
    ".........................................
    " rcp: NetWrite Method #1
    if  b:netrw_method == 1	" write with rcp
-" Decho "write via rcp (method #1)"
+"    call Decho("write via rcp (method #1)")
     if s:netrw_has_nt_rcp == 1
      if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
       let uid_machine = g:netrw_machine .'.'. g:netrw_uid
@@ -839,9 +898,9 @@ fun! netrw#NetWrite(...) range
     new
     setlocal ff=unix
     exe "put ='".g:netrw_ftpmode."'"
-"    call Decho(" NetWrite: put ='".g:netrw_ftpmode."'")
-    exe "put ='"."put ".tmpfile." ".netrw_fname."'"
-"    call Decho("put ='"."put ".tmpfile." ".netrw_fname."'")
+"    call Decho(" filter input: ".getline("."))
+    exe "put ='"."put ".tmpfile.' \"'.netrw_fname.'\"'."'"
+"    call Decho(" filter input: ".getline("."))
     if exists("g:netrw_port") && g:netrw_port != ""
 "     call Decho("executing: %!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
      exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port
@@ -868,16 +927,22 @@ fun! netrw#NetWrite(...) range
     setlocal ff=unix
     if exists("g:netrw_port") && g:netrw_port != ""
      put ='open '.g:netrw_machine.' '.g:netrw_port
+"     call Decho("filter input: ".getline("."))
     else
      put ='open '.g:netrw_machine
+"     call Decho("filter input: ".getline("."))
     endif
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-     put =g:netrw_passwd
+"     call Decho("filter input: ".getline("."))
+     put ='\"'.g:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline("."))
     else
-     put ='user '.g:netrw_uid.' '.g:netrw_passwd
+     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
+"     call Decho("filter input: ".getline("."))
     endif
-    put ='put '.tmpfile.' '.netrw_fname
+    put ='put '.tmpfile.' \"'.netrw_fname.'\"'
+"    call Decho("filter input: ".getline("."))
     " save choice/id/password for future use
     let b:netrw_lastfile = choice
  
@@ -885,7 +950,6 @@ fun! netrw#NetWrite(...) range
     " -i       : turns off interactive prompting from ftp
     " -n  unix : DON'T use <.netrc>, even though it exists
     " -n  win32: quit being obnoxious about password
-"    call Decho('performing ftp -i -n')
     norm! 1Gdd
 "    call Decho("executing: %!".g:netrw_ftp_cmd." -i -n")
     exe g:netrw_silentxfer."%!".g:netrw_ftp_cmd." -i -n"
@@ -1038,7 +1102,7 @@ fun! s:NetBrowse(dirname)
    endif
   elseif !exists("g:netrw_list_cmd") || g:netrw_list_cmd == ''
    if !exists("g:netrw_quiet")
-    echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ssh" | echohl None
+    echohl Error | echo "***netrw*** this system doesn't support remote directory listing via ".g:netrw_list_cmd | echohl None
     call inputsave()|call input("Press <cr> to continue")|call inputrestore()
    endif
 
@@ -1056,7 +1120,7 @@ fun! s:NetBrowse(dirname)
   " analyze a:dirname and g:netrw_list_cmd
   let dirpat  = '^\(\w\{-}\)://\(\w\+@\)\=\([^/]\+\)/\(.*\)$'
   let dirname = substitute(a:dirname,'\\','/','ge')
-"  call Decho("dirpat<".dirpat.">")
+"  call Decho("dirname<".dirname.">")
   if dirname !~ dirpat
    if !exists("g:netrw_quiet")
     echohl Error | echo "***netrw*** netrw doesn't understand your dirname<".dirname.">" | echohl None
@@ -1126,9 +1190,9 @@ fun! s:NetBrowse(dirname)
 "   call Decho("new path<".path.">")
 
    " remote-read the requested file into current buffer
-   enew!
+   keepjumps keepalt enew!
    set ma
-"   call Decho("exe file .method."://".user.machine."/".escape(path,s:netrw_cd_escape))
+"   call Decho("exe file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape))
    exe "file ".method."://".user.machine."/".escape(path,s:netrw_cd_escape)
    exe "silent doau BufReadPre ".fname
    silent call netrw#NetRead(method."://".user.machine."/".path)
@@ -1136,7 +1200,7 @@ fun! s:NetBrowse(dirname)
    keepjumps 1d
 
    " save certain window-oriented variables into buffer-oriented variables
-   call s:BufWinVars()
+   call s:SetBufWinVars()
    call s:NetOptionRestore()
    setlocal nomod
 
@@ -1162,7 +1226,7 @@ fun! s:NetBrowse(dirname)
    endif
   else
 "   call Decho("generate a new buffer")
-   enew!
+   keepjumps keepalt enew!
   endif
 
   " rename file to reflect where its from
@@ -1179,7 +1243,7 @@ fun! s:NetBrowse(dirname)
   " set up buffer-local mappings
 "  call Decho("set up buffer-local mappings")
   nnoremap <buffer> <silent> <cr>	:call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
-  nnoremap <buffer> <silent> <c-l>	:call <SID>NetRefresh(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
+  nnoremap <buffer> <silent> <c-l>	:call <SID>NetRefresh(<SID>NetBrowseChgDir(expand("%"),'./'),0)<cr>
   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'../'))<cr>
   nnoremap <buffer> <silent> a		:let g:netrw_hide=(g:netrw_hide+1)%3<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<cr>
   if w:netrw_longlist != 2
@@ -1200,7 +1264,7 @@ fun! s:NetBrowse(dirname)
   nnoremap <buffer> <silent> U		:<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
   nnoremap <buffer> <silent> v		:call <SID>NetSplit(1)<cr>
   nnoremap <buffer> <silent> x		:call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
-  nnoremap <buffer> <silent> <2-leftmouse> :call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
+  nnoremap <buffer> <silent> <2-leftmouse>	:call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))<cr>
   exe 'nnoremap <buffer> <silent> <del>	:call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'vnoremap <buffer> <silent> <del>	:call <SID>NetBrowseRm("'.user.machine.'","'.path.'")<cr>'
   exe 'nnoremap <buffer> <silent> d	:call <SID>NetMakeDir("'.user.machine.'")<cr>'
@@ -1232,6 +1296,7 @@ fun! s:NetBrowse(dirname)
    keepjumps put ='\"   Sorted by '.sortby
   endif
   if g:netrw_list_hide != "" && g:netrw_hide
+"   call Decho("g:netrw_hide=".g:netrw_hide)
    if g:netrw_hide == 1
     keepjumps put ='\"   Hiding:        '.g:netrw_list_hide
    else
@@ -1260,6 +1325,7 @@ fun! s:NetBrowse(dirname)
     if g:netrw_ftp_browse_reject != ""
      exe "silent! g/".g:netrw_ftp_browse_reject."/keepjumps d"
     endif
+    silent! keepjumps %s/\r$//e
 
     " if there's no ../ listed, then put ./ and ../ in
     let line1= line(".")
@@ -1274,9 +1340,9 @@ fun! s:NetBrowse(dirname)
     keepjumps norm! 0
 
     " more cleanup
-    exe 'keepjumps silent! '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e'
-    exe "keepjumps silent! ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e'
-    exe "keepjumps silent! ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e'
+    exe 'silent! keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2/e'
+    exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*/$#/#e'
+    exe "silent! keepjumps ".w:netrw_bannercnt.',$g/ -> /s# -> .*$#/#e'
    endif
 
   else
@@ -1333,33 +1399,33 @@ fun! s:NetBrowse(dirname)
     keepjumps norm! 0
     endif
 
-    exe 'keepjumps silent '.w:netrw_bannercnt.',$s/ -> .*$//e'
-    exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
-    exe w:netrw_bannercnt
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$s/ -> .*$//e'
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\%(\S\+\s\+\)\{7}\S\+\)\s\+\(\S.*\)$/\2\t\1/e'
+    exe 'silent keepjumps '.w:netrw_bannercnt
    endif
 
    if line("$") >= w:netrw_bannercnt
     if g:netrw_sort_by =~ "^n"
      call s:SetSort()
      if g:netrw_sort_direction =~ 'n'
-      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort'
+      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
      else
-      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort!'
+      exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
      endif
-     exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
+     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
     endif
     if w:netrw_longlist == 1
      " shorten the list to keep its width <= winwidth characters
-     exe "keepjumps silent ".w:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
+     exe "silent keepjumps ".w:netrw_bannercnt.',$s/\t[-dstrwx]\+/\t/e'
     endif
    endif
   endif
 
-  " cleanup any windows mess at end-of-line
-  keepjumps silent! %s/\r$//e
   call s:NetrwWideListing()
   if line("$") >= w:netrw_bannercnt
+   " place cursor on the top-left corner of the file listing
    exe "keepjumps ".w:netrw_bannercnt
+   norm! 0
   endif
 
   call s:NetOptionRestore()
@@ -1449,7 +1515,7 @@ fun! s:NetGetWord()
     let s:netrw_skipbrowse= 1
     echo 'Pressing "a" also works'
    elseif line("$") > w:netrw_bannercnt
-    exe w:netrw_bannercnt
+    exe 'silent keepjumps '.w:netrw_bannercnt
    endif
 
   elseif w:netrw_longlist == 0
@@ -1513,6 +1579,9 @@ fun! s:NetBrowseRm(usrhost,path) range
      let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
      call inputrestore()
      echohl NONE
+     if ok == ""
+      let ok="no"
+     endif
      let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
      if ok =~ 'a\%[ll]'
       let all= 1
@@ -1539,6 +1608,9 @@ fun! s:NetBrowseRm(usrhost,path) range
      call inputsave()
      let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
      call inputrestore()
+     if ok == ""
+      let ok="no"
+     endif
      let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
      if ok =~ 'a\%[ll]'
       let all= 1
@@ -1627,11 +1699,17 @@ endfun
 
 " ---------------------------------------------------------------------
 " NetRefresh: {{{2
-fun! s:NetRefresh(dirname)
-"  call Dfunc("NetRefresh(dirname<".a:dirname.">)")
+fun! s:NetRefresh(dirname,islocal)
+"  call Dfunc("NetRefresh(dirname<".a:dirname.">,islocal=".a:islocal.")")
+  call netrw#NetSavePosn()
   set ma
   %d
-  call <SID>NetBrowse(dirname)
+  if a:islocal
+   call s:LocalBrowse(a:dirname)
+  else
+   call s:NetBrowse(a:dirname)
+  endif
+  call netrw#NetRestorePosn()
   redraw!
 "  call Dret("NetRefresh")
 endfun
@@ -1690,12 +1768,12 @@ fun! s:NetBrowseX(fname,remote)
    " create a local copy
    let fname= tempname().".".exten
 "   call Decho("create a local copy of <".a:fname."> as <".fname.">")
-   exe "keepjumps silent bot 1new ".a:fname
+   exe "silent keepjumps bot 1new ".a:fname
    set bh=delete
    exe "w! ".fname
    q
   endif
-"  call Decho("exten<".exten."> "."NetrwFileHandler_".exten."():exists=".exists("*NetrwFileHandler_".exten))
+"  call Decho("exten<".exten."> "."netrwFileHandlers#NFH_".exten."():exists=".exists("*netrwFileHandlers#NFH_".exten))
 
   " set up redirection
   if &srr =~ "%s"
@@ -1711,19 +1789,22 @@ fun! s:NetBrowseX(fname,remote)
    exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"'
    let ret= v:shell_error
 
+  elseif has("unix") && executable("gnome-open")
+"   call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir)
+   exe "silent !gnome-open '".escape(fname,'%#')."'".redir
+   let ret= v:shell_error
+
   elseif has("unix") && executable("kfmclient")
 "   call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
    exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
    let ret= v:shell_error
 
-  elseif has("unix") && executable("gnome-open")
-"   call Decho("exe silent !gnome-open '".escape(fname,'%#')."' ".redir)
-   exe "silent !gnome-open '".escape(fname,'%#')."'".redir
-   let ret= v:shell_error
-
-  elseif exten != "" && exists("*NetrwFileHandler_".exten)
-"   call Decho("let ret= NetrwFileHandler_".exten.'("'.fname.'")')
-   exe "let ret= NetrwFileHandler_".exten.'("'.fname.'")'
+  else
+   call netrwFileHandlers#Init()
+   if exten != "" && exists("*netrwFileHandlers#NFH_".exten)
+"    call Decho("let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")')
+    exe "let ret= netrwFileHandlers#NFH_".exten.'("'.fname.'")'
+   endif
   endif
   redraw!
 
@@ -1765,11 +1846,11 @@ fun! s:NetBrowseFtpCmd(path,cmd)
   if w:netrw_method == 2 || w:netrw_method == 5 
    " ftp + <.netrc>:  Method #2
    if a:path != ""
-    put ='cd '.a:path
-"    call Decho("ftp:  cd ".a:path)
+    put ='cd \"'.a:path.'\"'
+"    call Decho('ftp:  '.getline("."))
    endif
    exe "put ='".a:cmd."'"
-"   call Decho("ftp:  ".a:cmd)
+"   call Decho("ftp:  ".getline("."))
 "    redraw!|call inputsave()|call input("Pausing...")|call inputrestore()
    if exists("g:netrw_port") && g:netrw_port != ""
 "    call Decho("exe ".g:netrw_silentxfer.curline.",$!".g:netrw_ftp_cmd." -i ".g:netrw_machine." ".g:netrw_port)
@@ -1791,13 +1872,13 @@ fun! s:NetBrowseFtpCmd(path,cmd)
  
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-     put =g:netrw_passwd
+     put ='\"'.g:netrw_passwd.'\"'
     else
-     put ='user '.g:netrw_uid.' '.g:netrw_passwd
+     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
     endif
  
    if a:path != ""
-    put ='cd '.a:path
+    put ='cd \"'.a:path.'\"'
    endif
    exe "put ='".a:cmd."'"
  
@@ -1815,14 +1896,14 @@ fun! s:NetBrowseFtpCmd(path,cmd)
 
   " cleanup for Windows
   if has("win32") || has("win95") || has("win64") || has("win16")
-   keepjumps silent!! %s/\r$//e
+   silent! keepjumps! %s/\r$//e
   endif
   if a:cmd == "dir"
    " infer directory/link based on the file permission string
-   keepjumps silent! g/d\%([-r][-w][-x]\)\{3}/s@$@/@
-   keepjumps silent! g/l\%([-r][-w][-x]\)\{3}/s/$/@/
+   silent! keepjumps g/d\%([-r][-w][-x]\)\{3}/s@$@/@
+   silent! keepjumps g/l\%([-r][-w][-x]\)\{3}/s/$/@/
    if w:netrw_longlist == 0 || w:netrw_longlist == 2
-    exe "keepjumps silent! ".curline.',$s/^\%(\S\+\s\+\)\{8}//e'
+    exe "silent! keepjumps ".curline.',$s/^\%(\S\+\s\+\)\{8}//e'
    endif
   endif
 
@@ -1845,7 +1926,7 @@ endfun
 " NetrwListHide: uses [range]g~...~d to delete files that match comma {{{2
 " separated patterns given in g:netrw_list_hide
 fun! s:NetrwListHide()
-"  call Dfunc("NetrwListHide() listhide<".g:netrw_list_hide.">")
+"  call Dfunc("NetrwListHide() hide=".g:netrw_hide." listhide<".g:netrw_list_hide.">")
 
   let listhide= g:netrw_list_hide
   while listhide != ""
@@ -1858,11 +1939,14 @@ fun! s:NetrwListHide()
    endif
 
    " Prune the list by hiding any files which match
-"   call Decho("pruning <".hide."> listhide<".listhide.">")
    if g:netrw_hide == 1
-    exe 'keepjumps silent '.w:netrw_bannercnt.',$g~'.hide.'~d'
+"    call Decho("hiding<".hide."> listhide<".listhide.">")
+"    call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$g~'.hide.'~d')
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g~'.hide.'~d'
    elseif g:netrw_hide == 2
-    exe 'keepjumps silent '.w:netrw_bannercnt.',$v~'.hide.'~d'
+"    call Decho("showing<".hide."> listhide<".listhide.">")
+"    call Decho('exe silent keepjumps '.w:netrw_bannercnt.',$v~'.hide.'~d')
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$v~'.hide.'~d'
    endif
   endwhile
 
@@ -1871,19 +1955,21 @@ endfun
 
 " ---------------------------------------------------------------------
 " NetHideEdit: allows user to edit the file/directory hiding list
-fun! s:NetHideEdit(mode)
-"  call Dfunc("NetHideEdit(mode=".a:mode.")")
-
+fun! s:NetHideEdit(islocal)
+"  call Dfunc("NetHideEdit(islocal=".a:islocal.")")
+
+  " get new hiding list from user
   call inputsave()
   let newhide= input("Edit Hiding List: ",g:netrw_list_hide)
   call inputrestore()
+  let g:netrw_list_hide= newhide
+"  call Decho("new g:netrw_list_hide<".g:netrw_list_hide.">")
 
   " refresh the listing
-  let g:netrw_list_hide= newhide
-  if a:mode == 0
+  if a:islocal == 0
    silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
   else
-   silent call s:LocalRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
+   silent call s:NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
   endif
 
 "  call Dret("NetHideEdit")
@@ -1958,7 +2044,7 @@ endfun
 " ---------------------------------------------------------------------
 " NetrwWideListing: {{{2
 fun! s:NetrwWideListing()
-"  call Dfunc("NetrwWideListing()")
+"  call Dfunc("NetrwWideListing() w:netrw_longlist=".w:netrw_longlist)
 
   if w:netrw_longlist == 2
    " look for longest filename (cpf=characters per filename)
@@ -1996,10 +2082,10 @@ fun! s:NetrwWideListing()
      exe "silent keepjumps norm! 0\<c-v>".newcolqty.'j$hx'.w:netrw_bannercnt.'G$p'
     endif
     exe "silent keepjumps ".newcolstart.','.newcolend.'d'
-    exe w:netrw_bannercnt
+    exe 'silent keepjumps '.w:netrw_bannercnt
    endwhile
    exe "silent keepjumps ".w:netrw_bannercnt.',$s/\s\+$//e'
-   set noma nomod
+   setlocal noma nomod
   endif
 
 "  call Dret("NetrwWideListing")
@@ -2130,9 +2216,12 @@ fun! s:NetBookmarkDir(chg,curdir)
   if exists("w:netrw_bannercnt") && line(".") <= w:netrw_bannercnt
    " looks like a "b" was pressed while in the banner region
    if line("$") > w:netrw_bannercnt
-    exe w:netrw_bannercnt
+    exe 'silent keepjumps '.w:netrw_bannercnt
    endif
-   echo ""
+   if &ch > 1
+    " "clear" the message
+    echo ""
+   endif
 "  call Dret("NetBookmarkDir - ignoring")
    return
   endif
@@ -2229,12 +2318,10 @@ endfun
 " ---------------------------------------------------------------------
 " NetObtain: obtain file under cursor (for remote browsing support) {{{2
 fun! s:NetObtain()
-  if !exists("s:netrw_users_stl")
-   let s:netrw_users_stl= &stl
-  endif
   let fname= expand("<cWORD>")
-  exe 'set stl=%f\ %h%m%r%=Obtaining\ '.escape(fname,' ')
-  redraw!
+
+  " NetrwStatusLine support - for obtaining support
+  call s:SetupNetrwStatusLine('%f %h%m%r%=%9*Obtaining '.fname)
 
 "  call Dfunc("NetObtain() method=".w:netrw_method)
   if exists("w:netrw_method") && w:netrw_method =~ '[235]'
@@ -2249,6 +2336,7 @@ fun! s:NetObtain()
     ".........................................
     if w:netrw_method == 2
      " ftp + <.netrc>: Method #2
+     setlocal ff=unix
      if path != ""
       put ='cd '.path
 "      call Decho("ftp:  cd ".path)
@@ -2277,11 +2365,11 @@ fun! s:NetObtain()
  
     if exists("g:netrw_ftp") && g:netrw_ftp == 1
      put =g:netrw_uid
-     put =g:netrw_passwd
+     put ='\"'.g:netrw_passwd.'\"'
 "     call Decho('ftp:  g:netrw_uid')
 "     call Decho('ftp:  g:netrw_passwd')
     else
-     put ='user '.g:netrw_uid.' '.g:netrw_passwd
+     put ='user \"'.g:netrw_uid.'\" \"'.g:netrw_passwd.'\"'
 "     call Decho('user '.g:netrw_uid.' '.g:netrw_passwd)
     endif
  
@@ -2306,12 +2394,14 @@ fun! s:NetObtain()
     " restore
     exe "silent! ".endline.",$d"
     exe "keepjumps ".curline
-    set noma nomod
+    setlocal noma nomod
    else
     if !exists("g:netrw_quiet")
      echohl Error | echo "***netrw*** this system doesn't support ftp" | echohl None
      call inputsave()|call input("Press <cr> to continue")|call inputrestore()
     endif
+    let &stl        = s:netrw_users_stl
+    let &laststatus = s:netrw_users_ls
 "    call Dret("NetObtain")
     return
    endif
@@ -2319,6 +2409,8 @@ fun! s:NetObtain()
   ".........................................
   else
    " scp: Method#4
+   let curdir = expand("%")
+   let path   = substitute(curdir,'scp://[^/]\+/','','e')
    if exists("g:netrw_port") && g:netrw_port != ""
     let useport= " -P ".g:netrw_port
    else
@@ -2326,16 +2418,17 @@ fun! s:NetObtain()
    endif
    if g:netrw_cygwin == 1
     let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
-"    call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." .")
-    exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." ."
+"    call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .")
+    exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ."
    else
-"    call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." .")
-    exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(fname,' ?&')." ."
+"    call Decho("executing: !".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." .")
+    exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".path.escape(fname,' ?&')." ."
    endif
   endif
 
   " restore status line
-  let &stl= s:netrw_users_stl
+  let &stl        = s:netrw_users_stl
+  let &laststatus = s:netrw_users_ls
   redraw!
 
 "  call Dret("NetObtain")
@@ -2404,7 +2497,7 @@ fun! netrw#DirBrowse(dirname)
 
   " get cleared buffer
   if bufnum < 0 || !bufexists(bufnum)
-   keepalt enew!
+   keepjumps keepalt enew!
 "   call Decho("enew buffer")
   else
    exe "keepalt b ".bufnum
@@ -2465,6 +2558,9 @@ fun! netrw#DirBrowse(dirname)
 
   " ---------------------------
   "  Perform Directory Listing:
+   if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
+    echo "(netrw) Processing your browsing request..."
+   endif
 
   " save current directory on directory history list
   call <SID>NetBookmarkDir(3,b:netrw_curdir)
@@ -2472,9 +2568,9 @@ fun! netrw#DirBrowse(dirname)
   " set up all the maps
 "  call Decho("Setting up local browser maps")
   nnoremap <buffer> <silent> <cr>	:call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
-  nnoremap <buffer> <silent> <c-l>	:set ma<bar>%d<bar>call <SID>LocalRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<bar>redraw!<cr>
+  nnoremap <buffer> <silent> <c-l>	:call <SID>NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'),1)<cr>
   nnoremap <buffer> <silent> -		:exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'../'))<cr>
-  nnoremap <buffer> <silent> a		:let g:netrw_hide=(g:netrw_hide+1)%3<bar>exe "norm! 0"<bar>call <SID>LocalRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<cr>
+  nnoremap <buffer> <silent> a		:let g:netrw_hide=(g:netrw_hide+1)%3<bar>exe "norm! 0"<bar>call <SID>NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'),1)<cr>
   if w:netrw_longlist != 2
    nnoremap <buffer> <silent> b		:<c-u>call <SID>NetBookmarkDir(0,b:netrw_curdir)<cr>
    nnoremap <buffer> <silent> B		:<c-u>call <SID>NetBookmarkDir(1,b:netrw_curdir)<cr>
@@ -2489,14 +2585,14 @@ fun! netrw#DirBrowse(dirname)
   nnoremap <buffer> <silent> O		:call <SID>LocalObtain()<cr>
   nnoremap <buffer> <silent> p		:call <SID>LocalPreview(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),1))<cr>
   nnoremap <buffer> <silent> q		:<c-u>call <SID>NetBookmarkDir(2,b:netrw_curdir)<cr>
-  nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>LocalRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<cr>
+  nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'),1)<cr>
   nnoremap <buffer> <silent> s		:call <SID>NetSaveWordPosn()<bar>let g:netrw_sort_by= (g:netrw_sort_by =~ 'n')? 'time' : (g:netrw_sort_by =~ 't')? 'size' : 'name'<bar>exe "norm! 0"<bar>call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
   nnoremap <buffer> <silent> S		:call <SID>NetSortSequence(1)<cr>
   nnoremap <buffer> <silent> u		:<c-u>call <SID>NetBookmarkDir(4,expand("%"))<cr>
   nnoremap <buffer> <silent> U		:<c-u>call <SID>NetBookmarkDir(5,expand("%"))<cr>
   nnoremap <buffer> <silent> v		:call <SID>NetSplit(3)<cr>
   nnoremap <buffer> <silent> x		:call <SID>NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<cr>
-  nnoremap <buffer> <silent> <2-leftmouse> :exe "call <SID>LocalRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))"<cr>
+  nnoremap <buffer> <silent> <2-leftmouse>	:call <SID>LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))<cr>
   nnoremap <buffer> <silent> <s-up>	:Pexplore<cr>
   nnoremap <buffer> <silent> <s-down>	:Nexplore<cr>
   exe 'nnoremap <buffer> <silent> <del>	:call <SID>LocalBrowseRm("'.b:netrw_curdir.'")<cr>'
@@ -2573,20 +2669,24 @@ fun! netrw#DirBrowse(dirname)
     if g:netrw_sort_by =~ "^n"
      call s:SetSort()
 
-     if g:netrw_sort_direction =~ 'n'
-      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort'
-     else
-      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort!'
+     if w:netrw_bannercnt < line("$")
+      if g:netrw_sort_direction =~ 'n'
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      else
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      endif
      endif
-     exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
+     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{3}\///e'
 
     else
-     if g:netrw_sort_direction =~ 'n'
-      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort'
-     else
-      exe 'keepjumps silent '.w:netrw_bannercnt.',$sort!'
+     if w:netrw_bannercnt < line("$")
+      if g:netrw_sort_direction =~ 'n'
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort'
+      else
+       exe 'silent keepjumps '.w:netrw_bannercnt.',$sort!'
+      endif
      endif
-     exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
+     exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\d\{-}\///e'
     endif
 
    endif
@@ -2594,14 +2694,16 @@ fun! netrw#DirBrowse(dirname)
 
   call s:NetrwWideListing()
   if exists("w:netrw_bannercnt") && line("$") > w:netrw_bannercnt
-   exe w:netrw_bannercnt
+   " place cursor on the top-left corner of the file listing
+   exe 'silent '.w:netrw_bannercnt
+   norm! 0
   endif
 
   " record previous current directory
   let w:netrw_prvdir= b:netrw_curdir
 
   " save certain window-oriented variables into buffer-oriented variables
-  call s:BufWinVars()
+  call s:SetBufWinVars()
   call s:NetOptionRestore()
   setlocal noma nomod nonu bh=hide nobl
 
@@ -2701,7 +2803,7 @@ fun! s:LocalBrowseList()
   endwhile
   
   " cleanup any windows mess at end-of-line
-  keepjumps silent! %s/\r$//e
+  silent! keepjumps %s/\r$//e
   setlocal ts=32
 
 "  call Dret("LocalBrowseList")
@@ -2792,7 +2894,12 @@ fun! s:LocalBrowseRm(path) range
      let ok= input("Confirm deletion of file<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
      call inputrestore()
      echohl NONE
+     if ok == ""
+      let ok="no"
+     endif
+"     call Decho("response: ok<".ok.">")
      let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
+"     call Decho("response: ok<".ok."> (after sub)")
      if ok =~ 'a\%[ll]'
       let all= 1
      endif
@@ -2813,6 +2920,9 @@ fun! s:LocalBrowseRm(path) range
      let ok= input("Confirm deletion of directory<".rmfile."> ","[{y(es)},n(o),a(ll),q(uit)] ")
      call inputrestore()
      let ok= substitute(ok,'\[{y(es)},n(o),a(ll),q(uit)]\s*','','e')
+     if ok == ""
+      let ok="no"
+     endif
      if ok =~ 'a\%[ll]'
       let all= 1
      endif
@@ -2855,7 +2965,7 @@ endif
   " refresh the directory
   let curline= line(".")
 "  call Decho("refresh the directory")
-  call s:LocalRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'))
+  call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'),1)
   exe curline
 
 "  call Dret("LocalBrowseRm")
@@ -2901,7 +3011,7 @@ fun! s:LocalBrowseRename(path) range
   " refresh the directory
   let curline= line(".")
 "  call Decho("refresh the directory listing")
-  call s:LocalRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'))
+  call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,'./'),1)
   exe "keepjumps ".curline
 "  call Dret("LocalBrowseRename")
 endfun
@@ -2943,17 +3053,6 @@ fun! s:LocalPreview(path) range
 endfun
 
 " ---------------------------------------------------------------------
-" LocalRefresh: {{{2
-fun! s:LocalRefresh(dirname)
-"  call Dfunc("LocalRefresh(dirname<".a:dirname.">)")
-  set ma
-  %d
-  call s:LocalBrowse(a:dirname)
-  redraw!
-"  call Dret("LocalRefresh")
-endfun
-
-" ---------------------------------------------------------------------
 " Explore: launch the local browser in the directory of the current file {{{2
 "          dosplit==0: the window will be split iff the current file has
 "                      been modified
@@ -2996,17 +3095,20 @@ fun! netrw#Explore(indx,dosplit,style,..
 
   if a:1 == "" && a:indx >= 0
    " Explore Hexplore Vexplore Sexplore
+"   call Decho("Explore Hexplore Vexplore Sexplore")
    let newdir= substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e')
    if newdir =~ '^scp:' || newdir =~ '^ftp:'
 "    call Decho("calling NetBrowse(newdir<".newdir.">)")
     call s:NetBrowse(newdir)
    else
+    if newdir == ""|let newdir= getcwd()|endif
 "    call Decho("calling LocalBrowse(newdir<".newdir.">)")
     call s:LocalBrowse(newdir)
    endif
 
   elseif a:1 =~ '\*\*/' || a:indx < 0
    " Nexplore Pexplore -or-  Explore **/...
+"   call Decho("Nexplore Pexplore -or-  Explore **/...")
 
    if has("path_extra")
     if !exists("w:netrw_explore_indx")
@@ -3032,12 +3134,8 @@ fun! netrw#Explore(indx,dosplit,style,..
      endif
     endif
 
-    " NetrwStatusLine support
+    " NetrwStatusLine support - for exploring support
     let w:netrw_explore_indx= indx
-    if !exists("s:netrw_users_stl")
-     let s:netrw_users_stl= &stl
-    endif
-    set stl=%f\ %h%m%r%=%{NetrwStatusLine()}
 "    call Decho("explorelist<".join(w:netrw_explore_list,',')."> len=".w:netrw_explore_listlen)
 
     " sanity check
@@ -3050,15 +3148,21 @@ fun! netrw#Explore(indx,dosplit,style,..
     endif
 
     exe "let dirfile= w:netrw_explore_list[".indx."]"
-"    call Decho("dirfile<".dirfile."> indx=".indx)
+"    call Decho("dirfile=w:netrw_explore_list[indx=".indx."]= <".dirfile.">")
     let newdir= substitute(dirfile,'/[^/]*$','','e')
 "    call Decho("newdir<".newdir.">")
+
 "    call Decho("calling LocalBrowse(newdir<".newdir.">)")
     call s:LocalBrowse(newdir)
-    call search(substitute(dirfile,"^.*/","",""),"W")
+    if w:netrw_longlist == 0 || w:netrw_longlist == 1
+     call search('^'.substitute(dirfile,"^.*/","","").'\>',"W")
+    else
+     call search('\<'.substitute(dirfile,"^.*/","","").'\>',"w")
+    endif
     let w:netrw_explore_mtchcnt = indx + 1
     let w:netrw_explore_bufnr   = bufnr(".")
     let w:netrw_explore_line    = line(".")
+    call s:SetupNetrwStatusLine('%f %h%m%r%=%9*%{NetrwStatusLine()}')
 "    call Decho("explore: mtchcnt=".w:netrw_explore_mtchcnt." bufnr=".w:netrw_explore_bufnr." line#".w:netrw_explore_line)
 
    else
@@ -3069,8 +3173,8 @@ fun! netrw#Explore(indx,dosplit,style,..
    endif
 
   else
+"   call Decho("Explore newdir<".a:1.">")
    let newdir= a:1
-"   call Decho("calling LocalBrowse(newdir<".newdir.">)")
    call s:LocalBrowse(newdir)
   endif
 
@@ -3078,12 +3182,73 @@ fun! netrw#Explore(indx,dosplit,style,..
 endfun
 
 " ---------------------------------------------------------------------
+" SetupNetrwStatusLine: {{{2
+fun! s:SetupNetrwStatusLine(statline)
+"  call Dfunc("SetupNetrwStatusLine(statline<".a:statline.">)")
+
+  if !exists("s:netrw_setup_statline")
+   let s:netrw_setup_statline= 1
+"   call Decho("do first-time status line setup")
+
+   if !exists("s:netrw_users_stl")
+    let s:netrw_users_stl= &stl
+   endif
+   if !exists("s:netrw_users_ls")
+    let s:netrw_users_ls= &laststatus
+   endif
+
+   " set up User9 highlighting as needed
+   let keepa= @a
+   redir @a
+   try
+    hi User9
+   catch /^Vim\%((\a\+)\)\=:E411/
+    if &bg == "dark"
+     hi User9 ctermfg=yellow ctermbg=blue guifg=yellow guibg=blue
+    else
+     hi User9 ctermbg=yellow ctermfg=blue guibg=yellow guifg=blue
+    endif
+   endtry
+   redir END
+   let @a= keepa
+  endif
+
+  " set up status line (may use User9 highlighting)
+  " insure that windows have a statusline
+  " make sure statusline is displayed
+  let &stl=a:statline
+  set laststatus=2
+"  call Decho("stl=".&stl)
+  redraw!
+
+"  call Dret("SetupNetrwStatusLine : stl=".&stl)
+endfun
+
+" ---------------------------------------------------------------------
 " NetrwStatusLine: {{{2
 fun! NetrwStatusLine()
-"  let g:stlmsg= "Xbufnr=".w:netrw_explore_bufnr." bufnr=".bufnr(".")." Xline#".w:netrw_explore_line." line#".line(".")
+
+  " vvv NetrwStatusLine() debugging vvv
+"  let g:stlmsg=""
+"  if !exists("w:netrw_explore_bufnr")
+"   let g:stlmsg="!X<explore_bufnr>"
+"  elseif w:netrw_explore_bufnr != bufnr(".")
+"   let g:stlmsg="explore_bufnr!=".bufnr(".")
+"  endif
+"  if !exists("w:netrw_explore_line")
+"   let g:stlmsg=" !X<explore_line>"
+"  elseif w:netrw_explore_line != line(".")
+"   let g:stlmsg=" explore_line!={line(.)<".line(".").">"
+"  endif
+"  if !exists("w:netrw_explore_list")
+"   let g:stlmsg=" !X<explore_list>"
+"  endif
+  " ^^^ NetrwStatusLine() debugging ^^^
+
   if !exists("w:netrw_explore_bufnr") || w:netrw_explore_bufnr != bufnr(".") || !exists("w:netrw_explore_line") || w:netrw_explore_line != line(".") || !exists("w:netrw_explore_list")
    " restore user's status line
-   let &stl= s:netrw_users_stl
+   let &stl        = s:netrw_users_stl
+   let &laststatus = s:netrw_users_ls
    if exists("w:netrw_explore_bufnr")|unlet w:netrw_explore_bufnr|endif
    if exists("w:netrw_explore_line")|unlet w:netrw_explore_line|endif
    return ""
@@ -3146,7 +3311,7 @@ fun! s:NetMethod(choice)  " globals: met
   let ftpurm   = '^ftp://\(\([^/@]\{-}\)@\)\=\([^/#:]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
   let rcpurm   = '^rcp://\%(\([^/@]\{-}\)@\)\=\([^/]\{-}\)/\(.*\)$'
   let rcphf    = '^\(\(\h\w*\)@\)\=\(\h\w*\):\([^@]\+\)$'
-  let scpurm   = '^scp://\([^/]\{-}\)\([#:]\d\+\)\=/\(.*\)$'
+  let scpurm   = '^scp://\([^/#:]\+\)\%([#:]\(\d\+\)\)\=/\(.*\)$'
   let httpurm  = '^http://\([^/]\{-}\)\(/.*\)\=$'
   let davurm   = '^s\=dav://\([^/]\+\)/\(.*/\)\([-_.~[:alnum:]]\+\)$'
   let rsyncurm = '^rsync://\([^/]\{-}\)/\(.*\)\=$'
@@ -3290,11 +3455,6 @@ fun! s:NetMethod(choice)  " globals: met
    let b:netrw_method  = -1
   endif
 
-  " surround password with double-quotes if it contains embedded blanks
-  if g:netrw_passwd !~ '^"' && g:netrw_passwd =~ ' '
-   let g:netrw_passwd= '"'.g:netrw_passwd.'"'
-  endif
-
   " remove any leading [:#] from port number
   if g:netrw_port != ""
     let g:netrw_port = substitute(g:netrw_port,'[#:]\+','','')
@@ -3341,6 +3501,7 @@ fun! NetUserPass(...)
 "  call Decho("a:0=".a:0." case >1: a:2<".a:2.">")
   let g:netrw_passwd=a:2
  endif
+
 "  call Dret("NetUserPass")
 endfun
 
@@ -3362,20 +3523,21 @@ fun! s:NetOptionSave()
    let w:acdkeep = &autochdir
    set noautochdir
   endif
-  let w:cinkeep  = &cin
-  let w:cinokeep = &cino
-  let w:comkeep  = &com
-  let w:cpokeep  = &cpo
+  let w:cinkeep   = &cin
+  let w:cinokeep  = &cino
+  let w:comkeep   = &com
+  let w:cpokeep   = &cpo
   if !g:netrw_keepdir
-   let w:dirkeep = getcwd()
+   let w:dirkeep  = getcwd()
   endif
-  let w:gdkeep   = &gd
-  let w:repkeep  = &report
-  let w:twkeep   = &tw
+  let w:gdkeep    = &gd
+  let w:repkeep   = &report
+  let w:spellkeep = &spell
+  let w:twkeep    = &tw
   setlocal cino =
   setlocal com  =
   setlocal cpo -=aA
-  setlocal nocin noai
+  setlocal nocin noai nospell
   setlocal tw   =0
   setlocal report=10000
   if has("win32") && !has("win95")
@@ -3397,22 +3559,22 @@ fun! s:NetOptionRestore()
   endif
   unlet w:netoptionsave
  
-  let &ai	= w:aikeep
-  if has("netbeans_intg") || has("sun_workshop")
-   let &acd     = w:acdkeep
+  if exists("w:aikeep")| let &ai= w:aikeep|endif
+  if (has("netbeans_intg") || has("sun_workshop")) && exists("w:acdkeep")
+   let &acd= w:acdkeep
+   unlet w:acdkeep
   endif
-  let &cin	= w:cinkeep
-  let &cino	= w:cinokeep
-  let &com	= w:comkeep
-  let &cpo	= w:cpokeep
-  if exists("w:dirkeep")
-   exe "lcd ".w:dirkeep
-  endif
-  let &gd	= w:gdkeep
-  let &report   = w:repkeep
-  let &tw	= w:twkeep
+  if exists("w:cinkeep")  |let &cin    = w:cinkeep     |unlet w:cinkeep  |endif
+  if exists("w:cinokeep") |let &cino   = w:cinokeep    |unlet w:cinokeep |endif
+  if exists("w:comkeep")  |let &com    = w:comkeep     |unlet w:comkeep  |endif
+  if exists("w:cpokeep")  |let &cpo    = w:cpokeep     |unlet w:cpokeep  |endif
+  if exists("w:dirkeep")  |exe "lcd ".w:dirkeep        |unlet w:dirkeep  |endif
+  if exists("w:gdkeep")   |let &gd     = w:gdkeep      |unlet w:gdkeep   |endif
+  if exists("w:repkeep")  |let &report = w:repkeep     |unlet w:repkeep  |endif
+  if exists("w:spellkeep")|let &spell  = w:spellkeep   |unlet w:spellkeep|endif
+  if exists("w:twkeep")   |let &tw     = w:twkeep      |unlet w:twkeep   |endif
   if exists("w:swfkeep")
-   if &directory == ""
+   if &directory == "" && exists("w:swfkeep")
     " user hasn't specified a swapfile directory;
     " netrw will temporarily make the swapfile
     " directory the current local one.
@@ -3424,17 +3586,6 @@ fun! s:NetOptionRestore()
    endif
    unlet w:swfkeep
   endif
-  unlet w:aikeep
-  unlet w:cinkeep
-  unlet w:cinokeep
-  unlet w:comkeep
-  unlet w:cpokeep
-  unlet w:gdkeep
-  unlet w:repkeep
-  unlet w:twkeep
-  if exists("w:dirkeep")
-   unlet w:dirkeep
-  endif
  
 "  call Dret("NetOptionRestore")
 endfun
@@ -3446,7 +3597,7 @@ endfun
 "               example and as a fix for a Windows 95 problem: in my
 "               experience, win95's ftp always dumped four blank lines
 "               at the end of the transfer.
-if has("win95") && g:netrw_win95ftp
+if has("win95") && exists("g:netrw_win95ftp") && g:netrw_win95ftp
  fun! NetReadFixup(method, line1, line2)
 "   call Dfunc("NetReadFixup(method<".a:method."> line1=".a:line1." line2=".a:line2.")")
    if method == 3   " ftp (no <.netrc>)
@@ -3547,14 +3698,14 @@ fun! s:SetSort()
     return
    endif
    if seq == '*'
-    exe 'keepjumps silent '.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$v/^\d\{3}\//s/^/'.spriority.'/'
    else
-    exe 'keepjumps silent '.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
+    exe 'silent keepjumps '.w:netrw_bannercnt.',$g/'.eseq.'/s/^/'.spriority.'/'
    endif
    let priority = priority + 1
   endwhile
 
-  exe 'keepjumps silent '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
+  exe 'silent keepjumps '.w:netrw_bannercnt.',$s/^\(\d\{3}\/\)\%(\d\{3}\/\)\+/\1/e'
 
 "  call Dret("SetSort")
 endfun
@@ -3592,14 +3743,14 @@ fun! s:CopyWinVars()
 endfun
 
 " ---------------------------------------------------------------------
-" BufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
+" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
 "   To allow separate windows to have their own activities, such as
 "   Explore **/pattern, several variables have been made window-oriented.
 "   However, when the user splits a browser window (ex: ctrl-w s), these
-"   variables are not inherited by the new window.  BufWinVars() and
+"   variables are not inherited by the new window.  SetBufWinVars() and
 "   UseBufWinVars() get around that.
-fun! s:BufWinVars()
-"  call Dfunc("BufWinVars()")
+fun! s:SetBufWinVars()
+"  call Dfunc("SetBufWinVars()")
   if exists("w:netrw_longlist")       |let b:netrw_longlist        = w:netrw_longlist       |endif
   if exists("w:netrw_bannercnt")      |let b:netrw_bannercnt       = w:netrw_bannercnt      |endif
   if exists("w:netrw_method")         |let b:netrw_method          = w:netrw_method         |endif
@@ -3610,7 +3761,7 @@ fun! s:BufWinVars()
   if exists("w:netrw_explore_bufnr")  |let b:netrw_explore_bufnr   = w:netrw_explore_bufnr  |endif
   if exists("w:netrw_explore_line")   |let b:netrw_explore_line    = w:netrw_explore_line   |endif
   if exists("w:netrw_explore_list")   |let b:netrw_explore_list    = w:netrw_explore_list   |endif
-"  call Dret("BufWinVars")
+"  call Dret("SetBufWinVars")
 endfun
 
 " ---------------------------------------------------------------------
@@ -3631,6 +3782,15 @@ fun! s:UseBufWinVars()
 "  call Dret("UseBufWinVars")
 endfun
 
+" ---------------------------------------------------------------------
+"  RFC2396: converts %xx into characters
+fun! netrw#RFC2396(fname)
+"  call Dfunc("RFC2396(fname<".a:fname.">)")
+  let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
+"  call Dret("RFC2396 ".fname)
+  return fname
+endfun
+
 " ------------------------------------------------------------------------
 " Settings Restoration: {{{1
 let &cpo= s:keepcpo
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,8 +1,8 @@
-*pi_netrw.txt*  For Vim version 7.0.  Last change: Aug 31, 2005
-
+*pi_netrw.txt*  For Vim version 7.0.  Last change: Oct 19, 2005
 
 		VIM REFERENCE MANUAL    by Charles E. Campbell, Jr.
 
+
 *dav*           *http*          *network*       *rcp*           *scp*
 *fetch*         *netrw*         *Nread*         *rsync*         *sftp*
 *ftp*           *netrw.vim*     *Nwrite*        *netrw-file*
@@ -25,7 +25,7 @@ 3.  Activation..........................
 4.  Transparent File Transfer............................|netrw-transparent|
 5.  Ex Commands..........................................|netrw-ex|
 6.  Variables and Options................................|netrw-var|
-7.  Directory Browser....................................|netrw-browse| {{{1
+7.  Directory Browsing...................................|netrw-browse| {{{1
       Maps...............................................|netrw-maps|
       Exploring..........................................|netrw-explore-cmds|
       Quick Reference Commands Table.....................|netrw-browse-cmds|
@@ -194,8 +194,8 @@ file using root-relative paths, use the 
 2. Network-Oriented File Transfer				*netrw-xfer*
 
 Network-oriented file transfer under Vim is implemented by a VimL-based script
-(<netrw.vim>) using plugin techniques.  It currently supports both reading
-and writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
+(<netrw.vim>) using plugin techniques.  It currently supports both reading and
+writing across networks using rcp, scp, ftp or ftp+<.netrc>, scp, fetch,
 dav/cadaver, rsync, or sftp.
 
 http is currently supported read-only via use of wget or fetch.
@@ -206,24 +206,23 @@ FileReadCmd, BufWriteCmd) to intercept r
 
 	ex. vim ftp://hostname/path/to/file
 <
-The characters preceding the colon specify the protocol to use;
-in the example, its ftp.  The <netrw.vim> script then formulates
-a command or a series of commands (typically ftp) which it issues
-to an external program (ftp, scp, etc) which does the actual file
-transfer/protocol.  Files are read from/written to a temporary file
-(under Unix/Linux, /tmp/...) which the <netrw.vim> script will
-clean up.
+The characters preceding the colon specify the protocol to use; in the
+example, its ftp.  The <netrw.vim> script then formulates a command or a
+series of commands (typically ftp) which it issues to an external program
+(ftp, scp, etc) which does the actual file transfer/protocol.  Files are read
+from/written to a temporary file (under Unix/Linux, /tmp/...) which the
+<netrw.vim> script will clean up.
 
-One may modify any protocol's implementing external application
-by setting a variable (ex. scp uses the variable g:netrw_scp_cmd,
-which is defaulted to "scp -q").
+One may modify any protocol's implementing external application by setting a
+variable (ex. scp uses the variable g:netrw_scp_cmd, which is defaulted to
+"scp -q").
 
 Ftp, an old protocol, seems to be blessed by numerous implementations.
-Unfortunately, some implementations are noisy (ie., add junk to the end
-of the file).  Thus, concerned users may decide to write a NetReadFixup()
-function that will clean up after reading with their ftp.  Some Unix systems
-(ie., FreeBSD) provide a utility called "fetch" which uses the ftp protocol
-but is not noisy and more convenient, actually, for <netrw.vim> to use.
+Unfortunately, some implementations are noisy (ie., add junk to the end of the
+file).  Thus, concerned users may decide to write a NetReadFixup() function
+that will clean up after reading with their ftp.  Some Unix systems (ie.,
+FreeBSD) provide a utility called "fetch" which uses the ftp protocol but is
+not noisy and more convenient, actually, for <netrw.vim> to use.
 Consequently, if "fetch" is executable, it will be used to do reads for
 ftp://... (and http://...) .  See |netrw-var| for more about this.
 
@@ -332,8 +331,9 @@ The script attempts to get passwords for
 a built-in Vim function.  See |netrw-uidpass| for how to change the password
 after one has set it.
 
-Unfortunately there doesn't appear to be a way for netrw to feed a password
-to scp.  Thus every transfer via scp will require re-entry of the password.
+Unfortunately there doesn't appear to be a way for netrw to feed a password to
+scp.  Thus every transfer via scp will require re-entry of the password.
+However, |netrw-listhack| can help with this problem.
 
 
 ==============================================================================
@@ -341,21 +341,28 @@ 3. Activation						*netrw-activate*
 
 Network-oriented file transfers are available by default whenever
 |'nocompatible'| mode is enabled.  The <netrw.vim> file resides in your
-system's vim-plugin directory and is sourced automatically whenever you
-bring up vim.
-
+system's vim-plugin directory and is sourced automatically whenever you bring
+up vim.  I suggest that, at a minimum, you have at least the following in your
+<.vimrc> customization file: >
+	set nocp
+	if version >= 600
+	  filetype plugin indent on
+	endif
+<
 
 ==============================================================================
 4. Transparent File Transfer				*netrw-transparent*
 
 Transparent file transfers occur whenever a regular file read or write
 (invoked via an |:autocmd| for |BufReadCmd| or |BufWriteCmd| events) is made.
-Thus one may use files across networks as if they were local. >
+Thus one may use files across networks just as simply as if they were local. >
 
 	vim ftp://[user@]machine/path
 	...
 	:wq
 
+See |netrw-activate| for more on how to encourage your vim to use plugins
+such as netrw.
 
 ==============================================================================
 5. Ex Commands						*netrw-ex*
@@ -369,8 +376,7 @@ additional commands available.
 :[range]Nw {netfile} [{netfile}]...
 		Write the specified lines to the {netfile}.
 
-:Nread
-		Read the specified lines into the current
+:Nread		Read the specified lines into the current
 		buffer from the file specified in
 		b:netrw_lastfile.
 
@@ -401,10 +407,11 @@ 6. Variables and Options       			*netrw
 
 The script <netrw.vim> uses several variables which can affect <netrw.vim>'s
 behavior.  These variables typically may be set in the user's <.vimrc> file:
->
-                                -------------
-                           	Netrw Options
-                                -------------
+(also see |netrw-settings|) >
+
+                        -------------
+                        Netrw Options
+                        -------------
 	Option			Meaning
 	--------------		-----------------------------------------------
 <
@@ -481,12 +488,12 @@ variables listed below, and may be modif
     -------------------------------------------------------------------------
 <
 								*netrw-ftp*
-The first two options both help with certain ftp's that give trouble otherwise.
-In order to best understand how to use these options if ftp is giving you
-troubles, a bit of discussion follows on how netrw does ftp reads.
+The first two options both help with certain ftp's that give trouble
+otherwise.  In order to best understand how to use these options if ftp is
+giving you troubles, a bit of discussion follows on how netrw does ftp reads.
 
-The g:netrw_..._cmd variables specify the external program to use handle
-the associated protocol (rcp, ftp, etc), plus any options.
+The g:netrw_..._cmd variables specify the external program to use handle the
+associated protocol (rcp, ftp, etc), plus any options.
 
 The g:netrw_list_cmd's HOSTNAME entry will be changed via substitution with
 whatever the current request is for a hostname.
@@ -519,8 +526,8 @@ userid and password.  The transferred fi
 The temporary file is then read into the main editing session window that
 requested it and the temporary file deleted.
 
-If your ftp doesn't accept the "user" command and immediately just demands
-a userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
+If your ftp doesn't accept the "user" command and immediately just demands a
+userid, then try putting "let netrw_ftp=1" in your <.vimrc>.
 
 								*netrw-cadaver*
 To handle the SSL certificate dialog for untrusted servers, one may pull
@@ -547,12 +554,12 @@ messages) you may write a NetReadFixup(t
       endif
     endfunction
 >
-The NetReadFixup() function will be called if it exists and thus allows
-you to customize your reading process.  As a further example, <netrw.vim>
-contains just such a function to handle Windows 95 ftp.  For whatever
-reason, Windows 95's ftp dumps four blank lines at the end of a transfer,
-and so it is desirable to automate their removal.  Here's some code taken
-from <netrw.vim> itself:
+The NetReadFixup() function will be called if it exists and thus allows you to
+customize your reading process.  As a further example, <netrw.vim> contains
+just such a function to handle Windows 95 ftp.  For whatever reason, Windows
+95's ftp dumps four blank lines at the end of a transfer, and so it is
+desirable to automate their removal.  Here's some code taken from <netrw.vim>
+itself:
 >
     if has("win95") && g:netrw_win95ftp
      fun! NetReadFixup(method, line1, line2)
@@ -565,7 +572,7 @@ from <netrw.vim> itself:
 >
 
 ==============================================================================
-7. Directory Browser	*netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
+7. Directory Browsing	*netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
 
 MAPS   								*netrw-maps*
      ?................Help.......................................|netrw-help|
@@ -656,12 +663,13 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				 : connect to address [0-9a-fA-F:]*
 				 : No route to host$'
 
-  *g:netrw_ssh_browse_reject*	ssh can sometimes produce unwanted lines,
-				messages, banners, and whatnot that one doesn't
-				want masquerading as "directories" and "files".
-				Use this pattern to remove such embedded
-				messages.  By default its value is:
- 					 '^total\s\+\d\+$'
+  *g:netrw_ftp_list_cmd*	options for passing along to ftp for directory
+				listing.  Defaults:
+				 unix or g:netrw_cygwin set: : "ls -lF"
+				 otherwise                     "dir"
+
+  *g:netrw_hide*			if true, the hiding list is used
+				 default: =0
 
   *g:netrw_keepdir*		=1 (default) keep current directory immune from
 				   the browsing directory.
@@ -676,16 +684,11 @@ NETRW BROWSER VARIABLES					*netrw-brows
 
   *g:netrw_longlist*		if =1, then long listing will be default
 
-  *g:netrw_ftp_list_cmd*	options for passing along to ftp for directory
-				listing.  Defaults:
-				 unix or g:netrw_cygwin set: : "ls -lF"
-				 otherwise                     "dir"
-
   *g:netrw_list_hide*		comma separated pattern list for hiding files
 				 default: ""
 
   *g:netrw_local_mkdir*		command for making a local directory
-				 default: "ssh HOSTNAME mkdir"
+				 default: "mkdir"
 
   *g:netrw_local_rmdir*		remove directory command (rmdir)
 				 default: "rmdir"
@@ -709,9 +712,6 @@ NETRW BROWSER VARIABLES					*netrw-brows
   *g:netrw_rmf_cmd*		 command for removing softlinks
 				 default: "ssh HOSTNAME rm -f"
 
-  *g:netrw_hide*			if true, the hiding list is used
-				 default: =0
-
   *g:netrw_sort_by*		sort by "name", "time", or "size"
 				 default: "name"
 
@@ -723,6 +723,18 @@ NETRW BROWSER VARIABLES					*netrw-brows
 				 default: '[\/]$,*,\.bak$,\.o$,\.h$,
 				           \.info$,\.swp$,\.obj$'
 
+  *g:netrw_ssh_cmd*		One may specify an executable command
+  				to use instead of ssh for remote actions
+				such as listing, file removal, etc.
+				 default: ssh
+
+  *g:netrw_ssh_browse_reject*	ssh can sometimes produce unwanted lines,
+				messages, banners, and whatnot that one doesn't
+				want masquerading as "directories" and "files".
+				Use this pattern to remove such embedded
+				messages.  By default its value is:
+ 					 '^total\s\+\d\+$'
+
   *g:netrw_timefmt*		specify format string to strftime() (%c)
 				 default: "%c"
 
@@ -732,7 +744,7 @@ NETRW BROWSER VARIABLES					*netrw-brows
 INTRODUCTION TO DIRECTORY BROWSING			*netrw-browse-intro*
 
 Netrw supports the browsing of directories on the local system and on remote
-hosts, including generating listing directories, entering directories, editing
+hosts, including listing files and directories, entering directories, editing
 files therein, deleting files/directories, making new directories, and moving
 (renaming) files and directories.  The Netrw browser generally implements the
 previous explorer maps and commands for remote directories, although details
@@ -743,13 +755,15 @@ ftp.  The protocol in the url, if it is 
 in its remote browsing.  Any other protocol will be used for file transfers,
 but otherwise the ssh protocol will be used to do remote directory browsing.
 
-To enter the netrw directory browser, simply attempt to read a "file" with a
+To use Netrw's remote directory browser, simply attempt to read a "file" with a
 trailing slash and it will be interpreted as a request to list a directory:
 
 	vim [protocol]://[user@]hostname/path/
 
-If you'd like to avoid entering the password in for directory listings, scp,
-ssh interaction, etc, see |netrw-listhack|.
+For local directories, the trailing slash is not required.
+
+If you'd like to avoid entering the password in for remote directory listings
+with ssh or scp, see |netrw-listhack|.
 
 				*netrw-explore*  *netrw-pexplore*
 				*netrw-hexplore* *netrw-sexplore*
@@ -783,7 +797,8 @@ By default, these commands use the curre
 may explicitly provide a directory (path) to use.
 
 (Following needs v7.0 or later)			*netrw-starstar*
-When Explore, Sexplore, Hexplore, or Vexplore are used like
+When Explore, Sexplore, Hexplore, or Vexplore are used with a **,
+such as:
 >
 	:Explore **/filename_pattern
 <
@@ -797,7 +812,8 @@ The directory display is updated to show
 matching file.  One may then proceed to the next (or previous) matching files'
 directories by using Nexplore or Pexplore, respectively.  If your console or
 gui produces recognizable shift-up or shift-down sequences, then you'll likely
-find the following mappings convenient:
+find using shift-downarrow and shift-uparrow convenient.  They're mapped by
+netrw:
 
 	<s-down>  == Nexplore, and
 	<s-up>    == Pexplore.
@@ -822,11 +838,12 @@ refresh a local directory by using ":e .
 
 GOING UP						*netrw--*
 
-To go up a directory, press - or his the <cr> when atop the ../ directory
+To go up a directory, press "-" or press the <cr> when atop the ../ directory
 entry in the listing.
 
-Netrw will modify the command in |g:netrw_list_cmd| to perform the directory
-listing operation.  By default the command is:
+Netrw will use the command in |g:netrw_list_cmd| to perform the directory
+listing operation after changing HOSTNAME to the host specified by the
+user-provided url.  By default netrw provides the command as:
 
 	ssh HOSTNAME ls -FLa
 
@@ -841,7 +858,13 @@ BROWSING 							*netrw-cr*
 Browsing is simple: move the cursor onto a file or directory of interest.
 Hitting the <cr> (the return key) will select the file or directory.
 Directories will themselves be listed, and files will be opened using the
-protocol given in the original read request.
+protocol given in the original read request.  
+
+  CAVEAT: There are three forms of listing (see |netrw-i|).  Netrw assumes
+  that two or more spaces delimit filenames and directory names for the long
+  and wide listing formats.  Thus, if your filename or directory name has two
+  or more spaces embedded in it, or any trailing spaces, then you'll need to
+  use the "thin" format to select it.
 
 
 OBTAINING A FILE						*netrw-O*
@@ -849,7 +872,21 @@ OBTAINING A FILE						*netrw-O*
 When browsing a remote directory, one may obtain a file under the cursor (ie.
 get a copy on your local machine, but not edit it) by pressing the O key.
 Only ftp and scp are supported for this operation (but since these two are
-available for browsing, that shouldn't be a problem).
+available for browsing, that shouldn't be a problem).  The status bar
+will then show, on its right hand side, a message like "Obtaining filename".
+The statusline will be restored after the transfer is complete.
+
+Netrw can also "obtain" a file using the local browser.  Netrw's display
+of a directory is not necessarily the same as Vim's "current directory",
+unless |g:netrw_keepdir| is set to 0 in the user's <.vimrc>.  One may select
+a file using the local browser (by putting the cursor on it) and pressing
+"O" will then "obtain" the file; ie. copy it to Vim's current directory.
+
+Related topics:
+ * To see what the current directory is, use |:pwd|
+ * To make the currently browsed directory the current directory, see |netrw-c|
+ * To automatically make the currently browsed directory the current
+   directory, see |g:netrw_keepdir|.
 
 
 THIN, LONG, AND WIDE LISTINGS					*netrw-i*
@@ -859,21 +896,27 @@ The "i" map cycles between the thin, lon
 The short listing format gives just the files' and directories' names.
 
 The long listing is either based on the "ls" command via ssh for remote
-directories or displays the filename, file size (in bytes), and the
-time and date of last modification for local directories.
+directories or displays the filename, file size (in bytes), and the time and
+date of last modification for local directories.  With the long listing
+format, netrw is not able to recognize filenames which have trailing spaces.
+Use the thin listing format for such files.
 
-The wide listing format has a multi-column display of the various
-files in the netrw current directory, rather like the Unix "ls" presents.
-In this mode the "b" and "B" maps are not available; instead, use
-Nb (|netrw-Nb|) and NB (|netrw-NB|).
+The wide listing format has a multi-column display of the various files in the
+netrw current directory, rather like the Unix "ls" presents.  In this mode the
+"b" and "B" maps are not available; instead, use Nb (|netrw-Nb|) and NB
+(|netrw-NB|).  The wide listing format uses two or more contiguous spaces to
+delineate filenames; when using that format, netrw won't be able to recognize
+or use filenames which have two or more contiguous spaces embedded in the name
+or any trailing spaces.  The thin listing format will, however, work with such
+files.
 
 
 MAKING A NEW DIRECTORY						*netrw-d*
 
-With the "d" map one may make a new directory either remotely (which
-depends on the global variable g:netrw_mkdir_cmd) or locally (which depends on
-the global variable g:netrw_local_mkdir).  Netrw will issue a request for the
-new directory's name.  A bare <CR> at that point will abort the making of the
+With the "d" map one may make a new directory either remotely (which depends
+on the global variable g:netrw_mkdir_cmd) or locally (which depends on the
+global variable g:netrw_local_mkdir).  Netrw will issue a request for the new
+directory's name.  A bare <CR> at that point will abort the making of the
 directory.  Attempts to make a local directory that already exists (as either
 a file or a directory) will be detected, reported on, and ignored.
 
@@ -881,12 +924,12 @@ a file or a directory) will be detected,
 DELETING FILES OR DIRECTORIES			*netrw-delete* *netrw-D*
 
 Deleting/removing files and directories involves moving the cursor to the
-file/directory to be deleted and pressing "D".  Directories must be empty first
-before they can be successfully removed.  If the directory is a softlink to a
-directory, then netrw will make two requests to remove the directory before
-succeeding.  Netrw will ask for confirmation before doing the removal(s).
-You may select a range of lines with the "V" command (visual selection),
-and then pressing "D".
+file/directory to be deleted and pressing "D".  Directories must be empty
+first before they can be successfully removed.  If the directory is a softlink
+to a directory, then netrw will make two requests to remove the directory
+before succeeding.  Netrw will ask for confirmation before doing the
+removal(s).  You may select a range of lines with the "V" command (visual
+selection), and then pressing "D".
 
 The g:netrw_rm_cmd, g:netrw_rmf_cmd, and g:netrw_rmdir_cmd variables are used
 to control the attempts to remove files and directories.  The g:netrw_rm_cmd
@@ -923,17 +966,17 @@ the V (|linewise-visual|).
 
 HIDING FILES OR DIRECTORIES				*netrw-a*
 
-Netrw's browsing facility allows one to use the hiding list in one of
-three ways: ignore it, hide files which match, and show only those files
-which match.  The "a" map allows the user to cycle about these three ways.
+Netrw's browsing facility allows one to use the hiding list in one of three
+ways: ignore it, hide files which match, and show only those files which
+match.  The "a" map allows the user to cycle about these three ways.
 
-The g:netrw_list_hide variable holds a comma delimited list of patterns
-(ex. \.obj) which specify the hiding list. (also see |netrw-h|)  To
-set the hiding list, use the <c-h> map.  As an example, to hide files
-which begin with a ".", one may use the <c-h> map to set the hiding
-list to '^\..*' (or one may put  let g:netrw_list_hide= '^\..*' in
-one's <.vimrc>).  One may then use the "a" key to show all files,
-hide matching files, or to show only the matching files.
+The g:netrw_list_hide variable holds a comma delimited list of patterns (ex.
+\.obj) which specify the hiding list. (also see |netrw-h|)  To set the hiding
+list, use the <c-h> map.  As an example, to hide files which begin with a ".",
+one may use the <c-h> map to set the hiding list to '^\..*' (or one may put
+let g:netrw_list_hide= '^\..*' in one's <.vimrc>).  One may then use the "a"
+key to show all files, hide matching files, or to show only the matching
+files.
 
 
 EDIT FILE OR DIRECTORY HIDING LIST		*netrw-h* *netrw-edithide*
@@ -941,7 +984,8 @@ EDIT FILE OR DIRECTORY HIDING LIST		*net
 The "<ctrl-h>" map brings up a requestor allowing the user to change the
 file/directory hiding list.  The hiding list consists of one or more patterns
 delimited by commas.  Files and/or directories satisfying these patterns will
-either be hidden (ie. not shown) or be the only ones displayed (see |netrw-a|).
+either be hidden (ie. not shown) or be the only ones displayed (see
+|netrw-a|).
 
 
 BROWSING WITH A HORIZONTALLY SPLIT WINDOW		*netrw-o* *netrw-horiz*
@@ -950,9 +994,9 @@ Normally one enters a file or directory 
 allows one to open a new window to hold the new directory listing or file.  A
 horizontal split is used.  (for vertical splitting, see |netrw-v|)
 
-Normally, the o key splits the window horizontally with the new window
-and cursor at the top.  To change to splitting the window horizontally
-with the new window and cursor at the bottom, have
+Normally, the o key splits the window horizontally with the new window and
+cursor at the top.  To change to splitting the window horizontally with the
+new window and cursor at the bottom, have
 
 	let g:netrw_alto = 1
 
@@ -961,30 +1005,30 @@ in your <.vimrc>.
 
 PREVIEW WINDOW					*netrw-p* *netrw-preview*
 
-One may use a preview window (currently only for local browsing) by using
-the "p" key when the cursor is atop the desired filename to be previewed.
+One may use a preview window (currently only for local browsing) by using the
+"p" key when the cursor is atop the desired filename to be previewed.
 
 
 SELECTING SORTING STYLE				*netrw-s* *netrw-sort*
 
-One may select the sorting style by name, time, or (file) size.  The
-"s" map allows one to circulate amongst the three choices; the directory
-listing will automatically be refreshed to reflect the selected style.
+One may select the sorting style by name, time, or (file) size.  The "s" map
+allows one to circulate amongst the three choices; the directory listing will
+automatically be refreshed to reflect the selected style.
 
 
 EDITING THE SORTING SEQUENCE		*netrw-S* *netrw-sortsequence*
 
-When "Sorted by" is name, one may specify priority via the sorting
-sequence (g:netrw_sort_sequence).  The sorting sequence typically
-prioritizes the name-listing by suffix, although any pattern will do.
-Patterns are delimited by commas.  The default sorting sequence is:
+When "Sorted by" is name, one may specify priority via the sorting sequence
+(g:netrw_sort_sequence).  The sorting sequence typically prioritizes the
+name-listing by suffix, although any pattern will do.  Patterns are delimited
+by commas.  The default sorting sequence is:
 >
 	[\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$
 <
-The lone * is where all filenames not covered by one of the other
-patterns will end up.  One may change the sorting sequence by modifying
-the g:netrw_sort_sequence variable (either manually or in your <.vimrc>)
-or by using the "S" map.
+The lone * is where all filenames not covered by one of the other patterns
+will end up.  One may change the sorting sequence by modifying the
+g:netrw_sort_sequence variable (either manually or in your <.vimrc>) or by
+using the "S" map.
 
 
 REVERSING SORTING ORDER			*netrw-r* *netrw-reverse*
@@ -1011,13 +1055,13 @@ q map to list both the bookmarks and his
 
 BROWSING WITH A VERTICALLY SPLIT WINDOW				*netrw-v*
 
-Normally one enters a file or directory using the <cr>.  However, the "v"
-map allows one to open a new window to hold the new directory listing or
-file.  A vertical split is used.  (for horizontal splitting, see |netrw-o|)
+Normally one enters a file or directory using the <cr>.  However, the "v" map
+allows one to open a new window to hold the new directory listing or file.  A
+vertical split is used.  (for horizontal splitting, see |netrw-o|)
 
-Normally, the v key splits the window vertically with the new window
-and cursor at the left.  To change to splitting the window vertically
-with the new window and cursor at the right, have
+Normally, the v key splits the window vertically with the new window and
+cursor at the left.  To change to splitting the window vertically with the new
+window and cursor at the right, have
 
 	let g:netrw_altv = 1
 
@@ -1033,24 +1077,24 @@ handler varies:
   * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.  
   * for KDE (with kfmclient): kfmclient is used.
   * for Gnome (with gnome-open): gnome-open is used.
-  * otherwise the NetrwFileHandler plugin is used.
+  * otherwise the netrwFileHandler plugin is used.
 
 The file's suffix is used by these various approaches to determine an
-appropriate application to use to "handle" these files.  Such things
-as OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript
-(*.ps, *.eps) can be handled.
+appropriate application to use to "handle" these files.  Such things as
+OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
+*.eps) can be handled.
 
-The NetrwFileHandler applies a user-defined function to a file, based on its
+The netrwFileHandler applies a user-defined function to a file, based on its
 extension.  Of course, the handler function must exist for it to be called!
 >
  Ex. mypgm.html   x ->
-                  NetrwFileHandler_html("scp://user@host/some/path/mypgm.html")
+                  netrwFileHandler_html("scp://user@host/some/path/mypgm.html")
 <
-See the <plugin/NetrwFileHandlers.vim> for an example of how to handle an html
+See the <plugin/netrwFileHandlers.vim> for an example of how to handle an html
 file with mozilla.
 
-One may write custom NetrwFileHandlers; please look at the
-plugin/NetrwFileHandlers.vim script for examples.  If its likely to be
+One may write custom netrwFileHandlers; please look at the
+plugin/netrwFileHandlers.vim script for examples.  If its likely to be
 generally useful, please feel free to forward a copy to me for future
 inclusion in the distribution.
 
@@ -1063,8 +1107,8 @@ g:netrw_keepdir to 0 (say, in your <.vim
 currently browsed directory be the current directory.
 
 With the default setting for g:netrw_keepdir, in order to make the two
-directories the same, use the "c" map (just type c).  That map will set
-the current directory to the current browsing directory.
+directories the same, use the "c" map (just type c).  That map will set the
+current directory to the current browsing directory.
 
 
 BOOKMARKING A DIRECTORY		*netrw-b* *netrw-bookmark* *netrw-bookmarks*
@@ -1087,8 +1131,8 @@ To change directory back to a bookmarked
 
 	{cnt}B
 
-Any count may be used to reference any of the bookmarks.  See |netrw-b|
-for how to bookmark a directory and |netrw-q| for how to list them.
+Any count may be used to reference any of the bookmarks.  See |netrw-b| on
+how to bookmark a directory and |netrw-q| on how to list bookmarks.
 
 When wide listing is in use (see |netrw-i|), then the B map is not available;
 instead, use {cnt}NB.
@@ -1118,9 +1162,9 @@ NETRW SETTINGS						*netrw-settings*
 With the NetrwSettings.vim plugin, >
 	:NetrwSettings
 will bring up a window with the many variables that netrw uses for its
-settings.  You may change any of their values; when you save the file,
-the settings therein will be used.  One may also press "?" on any of
-the lines for help on what each of the variables do.
+settings.  You may change any of their values; when you save the file, the
+settings therein will be used.  One may also press "?" on any of the lines for
+help on what each of the variables do.
 
 
 ==============================================================================
@@ -1240,6 +1284,42 @@ which is loaded automatically at startup
 ==============================================================================
 10. History						*netrw-history*
 
+	v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
+	     * if the binary option is set, then NetWrite() will only write
+	       the whole file (line numbers don't make sense with this).
+	       Supports writing of tar and zip files.
+	v74: * bugfix (vim, then :Explore) now works
+	     * ctrl-L keeps cursor at same screen location (both local and
+	       remote browsing)
+	     * netrw now can read remote zip and tar files
+	     * Obtain now uses WinXP ftp+.netrc successfully
+	v73: * bugfix -- scp://host/path/file was getting named incorrectly
+	     * netrw detects use of earlier-than-7.0 version of vim and issues
+	       a pertinent error message.
+	     * netrwSettings.vim is now uses autoloading.  Only
+	       <netrwPlugin.vim> is needed as a pure plugin
+	       (ie. always loaded).
+	v72: * bugfix -- formerly, one could prevent the loading of netrw
+	       by "let g:loaded_netrw=1"; when autoloading became supported,
+	       this feature was lost.  It is now restored.
+	v71: * bugfix -- made some "set nomodifiable"s into setlocal variants
+	       (allows :e somenewfile  to be modifiable as usual)
+	     * NetrwSettings calls a netrw function, thereby assuring that
+	       netrw has loaded.  However, if netrw does not load for whatever
+	       reason, then NetrwSettings will now issue a warning message.
+	     * For what reason I don't recall, when wget and fetch are both
+	       not present, and an attempt to read a http://... url is made,
+	       netrw exited.  It now only returns.
+	     * When ch=1, on the second and subsequent uses of browsing Netrw
+	       would issue a blank line to clear the echo'd messages.  This
+	       caused an annoying "Hit-Enter" prompt; now a blank line message
+	       is echo'd only if &ch>1.
+	v70: * when using |netrw-O|, the "Obtaining filename" message is now
+	       shown using |hl-User9|.  If User9 has not been defined, netrw
+	       will define it.
+	v69: * Bugfix: win95/98 machines were experiencing a
+	       "E121: Undefined variable: g:netrw_win95ftp" message
+	v68: * double-click-leftmouse selects word under mouse
 	v67: * Passwords which contain blanks will now be surrounded by
 	       double-quotes automatically (Yongwei)
 	v66: * Netrw now seems to work with a few more Windows situations
@@ -1355,7 +1435,7 @@ 10. History						*netrw-history*
 	     * special file viewing with:
 	       (windows) rundll32 url.dll (gnome)   gnome-open (kde)
 	       kfmclient If none of these are on the executable path, then
-	       NetrwFileHandlers.vim is used.
+	       netrwFileHandlers.vim is used.
 	     * directory bookmarking during both local and remote browsing
 	       implemented
 	     * one may view all, use the hiding list to suppress, or use the
--- a/src/version.h
+++ b/src/version.h
@@ -36,5 +36,5 @@
 #define VIM_VERSION_NODOT	"vim70aa"
 #define VIM_VERSION_SHORT	"7.0aa"
 #define VIM_VERSION_MEDIUM	"7.0aa ALPHA"
-#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Oct 12)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Oct 12, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2005 Nov 25)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2005 Nov 25, compiled "