changeset 650:662e40bd2be1

updated for version 7.0191
author vimboss
date Wed, 01 Feb 2006 21:51:12 +0000
parents 8157079cea85
children bc95c6c4bac1
files runtime/autoload/netrw.vim runtime/autoload/netrwSettings.vim runtime/doc/autocmd.txt runtime/doc/eval.txt runtime/doc/options.txt runtime/doc/pi_netrw.txt runtime/doc/tags src/proto/eval.pro src/version.h
diffstat 9 files changed, 502 insertions(+), 193 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -1,7 +1,7 @@
 " netrw.vim: Handles file transfer and remote directory listing across a network
 "            AUTOLOAD PORTION
-" Date:		Nov 28, 2005
-" Version:	76
+" Date:		Jan 30, 2006
+" Version:	78
 " 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
@@ -23,7 +23,7 @@
 if &cp || exists("g:loaded_netrw")
   finish
 endif
-let g:loaded_netrw = "v76"
+let g:loaded_netrw = "v78"
 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
@@ -32,8 +32,12 @@ let s:keepcpo= &cpo
 set cpo&vim
 " call Decho("doing autoload/netrw.vim")
 
+" ======================
+"  Netrw Variables: {{{1
+" ======================
+
 " ---------------------------------------------------------------------
-" Default values for netrw's global protocol variables {{{1
+" Default values for netrw's global protocol variables {{{2
 if !exists("g:netrw_dav_cmd")
   let g:netrw_dav_cmd	= "cadaver"
 endif
@@ -84,14 +88,17 @@ if has("win32") || has("win95") || has("
 endif
 
 " ---------------------------------------------------------------------
-" Default values for netrw's global variables {{{1
-" Default values - a-c ---------- {{{2
+" Default values for netrw's global variables {{{2
+" Default values - a-c ---------- {{{3
 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_browse_split")
+ let g:netrw_browse_split= 0
+endif
 if !exists("g:netrw_cygwin")
  if has("win32") || has("win95") || has("win64") || has("win16")
   if &shell == "bash"
@@ -103,7 +110,7 @@ if !exists("g:netrw_cygwin")
   let g:netrw_cygwin= 0
  endif
 endif
-" Default values - d-f ---------- {{{2
+" Default values - d-f ---------- {{{3
 if !exists("g:NETRW_DIRHIST_CNT")
  let g:NETRW_DIRHIST_CNT= 0
 endif
@@ -123,7 +130,7 @@ endif
 if !exists("g:netrw_ftpmode")
  let g:netrw_ftpmode= "binary"
 endif
-" Default values - h-lh ---------- {{{2
+" Default values - h-lh ---------- {{{3
 if !exists("g:netrw_hide")
  let g:netrw_hide= 1
 endif
@@ -142,7 +149,7 @@ endif
 if !exists("g:netrw_list_hide")
  let g:netrw_list_hide= ""
 endif
-" Default values - lh-lz ---------- {{{2
+" Default values - lh-lz ---------- {{{3
 if !exists("g:netrw_local_mkdir")
  let g:netrw_local_mkdir= "mkdir"
 endif
@@ -159,7 +166,7 @@ endif
 if g:netrw_longlist == 1
  let g:netrw_list_cmd= g:netrw_list_cmd." -l"
 endif
-" Default values - m-r ---------- {{{2
+" Default values - m-r ---------- {{{3
 if !exists("g:netrw_maxfilenamelen")
  let g:netrw_maxfilenamelen= 32
 endif
@@ -178,7 +185,7 @@ endif
 if !exists("g:netrw_rmf_cmd")
  let g:netrw_rmf_cmd    = g:netrw_ssh_cmd." HOSTNAME rm -f"
 endif
-" Default values - s ---------- {{{2
+" Default values - s ---------- {{{3
 if exists("g:netrw_silent") && g:netrw_silent != 0
  let g:netrw_silentxfer= "silent "
 else
@@ -198,7 +205,7 @@ endif
 if !exists("g:netrw_ssh_browse_reject")
   let g:netrw_ssh_browse_reject='^total\s\+\d\+$'
 endif
-" Default values - t-w ---------- {{{2
+" Default values - t-w ---------- {{{3
 if !exists("g:netrw_timefmt")
  let g:netrw_timefmt= "%c"
 endif
@@ -209,7 +216,7 @@ if !exists("g:netrw_winsize")
  let g:netrw_winsize= ""
 endif
 " ---------------------------------------------------------------------
-" Default values for netrw's script variables: {{{1
+" Default values for netrw's script variables: {{{2
 if !exists("s:netrw_cd_escape")
  if has("win32") || has("win95") || has("win64") || has("win16")
   let s:netrw_cd_escape="#% "
@@ -230,8 +237,12 @@ endif
 "  files read by network transfer aren't appropriately highlighted.
 "let g:decho_bufenter = 1	"Decho
 
+" ==============================
+"  Netrw Utility Functions: {{{1
+" ==============================
+
 " ------------------------------------------------------------------------
-" NetSavePosn: saves position of cursor on screen {{{1
+" NetSavePosn: saves position of cursor on screen {{{2
 fun! netrw#NetSavePosn()
 "  call Dfunc("NetSavePosn()")
   " Save current line and column
@@ -248,7 +259,7 @@ fun! netrw#NetSavePosn()
 endfun
 
 " ------------------------------------------------------------------------
-" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{1
+" NetRestorePosn: restores the cursor and file position as saved by NetSavePosn() {{{2
 fun! netrw#NetRestorePosn()
 "  call Dfunc("NetRestorePosn() winnr=".w:netrw_winnr." line=".w:netrw_line." col=".w:netrw_col." hline=".w:netrw_hline)
   let eikeep= &ei
@@ -275,15 +286,19 @@ fun! netrw#NetRestorePosn()
 "  call Dret("NetRestorePosn")
 endfun
 
+" ===============================
+"  Netrw Transfer Functions: {{{1
+" ===============================
+
 " ------------------------------------------------------------------------
-" NetRead: responsible for reading a file over the net {{{1
+" NetRead: responsible for reading a file over the net {{{2
 fun! netrw#NetRead(...)
 "  call Dfunc("NetRead(a:1<".a:1.">)")
  
   " save options
   call s:NetOptionSave()
  
-  " Special Exception: if a file is named "0r", then
+  " Special Exception: if a file is named "0r", then {{{3
   "		      "0r" will be used to read the
   "		      following files instead of "r"
   if	a:0 == 0
@@ -297,7 +312,7 @@ fun! netrw#NetRead(...)
    let ichoice = 1
   endif
  
-  " get name of a temporary file and set up shell-quoting character
+  " get name of a temporary file and set up shell-quoting character {{{3
   let tmpfile= tempname()
   let tmpfile= substitute(tmpfile,'\','/','ge')
   if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
@@ -377,7 +392,7 @@ fun! netrw#NetRead(...)
     let tmpfile = fnamemodify(tmpfile,':t')
    endif
  
-   " Determine method of read (ftp, rcp, etc)
+   " Determine method of read (ftp, rcp, etc) {{{3
    call s:NetMethod(choice)
  
    " Check if NetBrowse() should be handling this request
@@ -389,21 +404,21 @@ fun! netrw#NetRead(...)
    endif
 
    " use filename's suffix for the temporary file
-   if b:netrw_fname =~ '\.[^./]\+'
-    let suffix = substitute(b:netrw_fname,'^.*\(\.[^./]\+\)','\1','e')
+   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)")
+"    call Decho("chgd tmpfile<".tmpfile."> (added ".suffix." suffix) netrw_fname<".b:netrw_fname.">")
    endif
  
    " ============
-   " Perform Read
-   " ============
+   " Perform Protocol-Based Read {{{3
+   " ===========================
    if exists("g:netrw_silent") && g:netrw_silent == 0 && &ch >= 1
     echo "(netrw) Processing your read request..."
    endif
  
    ".........................................
-   " rcp:  NetRead Method #1
+   " rcp:  NetRead Method #1 {{{3
    if  b:netrw_method == 1 " read with rcp
 "    call Decho("read via rcp (method #1)")
    " ER: noting done with g:netrw_uid yet?
@@ -430,7 +445,7 @@ fun! netrw#NetRead(...)
    let b:netrw_lastfile = choice
  
    ".........................................
-   " ftp + <.netrc>:  NetRead Method #2
+   " ftp + <.netrc>:  NetRead Method #2 {{{3
    elseif b:netrw_method  == 2		" read with ftp + <.netrc>
 "     call Decho("read via ftp+.netrc (method #2)")
      let netrw_fname= b:netrw_fname
@@ -460,7 +475,7 @@ fun! netrw#NetRead(...)
      let b:netrw_lastfile = choice
  
    ".........................................
-   " ftp + machine,id,passwd,filename:  NetRead Method #3
+   " ftp + machine,id,passwd,filename:  NetRead Method #3 {{{3
    elseif b:netrw_method == 3		" read with ftp + machine, id, passwd, and fname
     " Construct execution string (four lines) which will be passed through filter
 "    call Decho("read via ftp+mipf (method #3)")
@@ -512,7 +527,7 @@ fun! netrw#NetRead(...)
     let b:netrw_lastfile = choice
  
    ".........................................
-   " scp: NetRead Method #4
+   " scp: NetRead Method #4 {{{3
    elseif     b:netrw_method  == 4	" read with scp
 "    call Decho("read via scp (method #4)")
     if exists("g:netrw_port") && g:netrw_port != ""
@@ -522,17 +537,18 @@ fun! netrw#NetRead(...)
     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(b:netrw_fname,' ?&')." ".cygtmpfile)
-     exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')." ".cygtmpfile
+"     call  Decho("executing: !".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".cygtmpfile)
+     exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."' ".cygtmpfile
     else
-"     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
+"     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 b:netrw_lastfile = choice
  
    ".........................................
-   elseif     b:netrw_method  == 5	" read with http (wget)
+   " http: NetRead Method #5 (wget) {{{3
+   elseif     b:netrw_method  == 5
 "    call Decho("read via http (method #5)")
     if g:netrw_http_cmd == ""
      if !exists("g:netrw_quiet")
@@ -564,8 +580,8 @@ fun! netrw#NetRead(...)
     let b:netrw_lastfile = choice
  
    ".........................................
-   " cadaver: NetRead Method #6
-   elseif     b:netrw_method  == 6	" read with cadaver
+   " cadaver: NetRead Method #6 {{{3
+   elseif     b:netrw_method  == 6
 "    call Decho("read via cadaver (method #6)")
  
     " Construct execution string (four lines) which will be passed through filter
@@ -596,8 +612,8 @@ fun! netrw#NetRead(...)
     let b:netrw_lastfile = choice
  
    ".........................................
-   " rsync: NetRead Method #7
-   elseif     b:netrw_method  == 7	" read with rsync
+   " rsync: NetRead Method #7 {{{3
+   elseif     b:netrw_method  == 7
 "    call Decho("read via rsync (method #7)")
     if g:netrw_cygwin == 1
      let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
@@ -611,9 +627,9 @@ fun! netrw#NetRead(...)
     let b:netrw_lastfile = choice
  
    ".........................................
-   " fetch: NetRead Method #8
+   " fetch: NetRead Method #8 {{{3
    "    fetch://[user@]host[:http]/path
-   elseif     b:netrw_method  == 8	" read with fetch
+   elseif     b:netrw_method  == 8
     if g:netrw_fetch_cmd == ""
      if !exists("g:netrw_quiet")
       echohl Error | echo "***netrw*** fetch command not available" | echohl None
@@ -640,8 +656,8 @@ fun! netrw#NetRead(...)
     let b:netrw_lastfile = choice
  
    ".........................................
-   " sftp: NetRead Method #9
-   elseif     b:netrw_method  == 9	" read with sftp
+   " sftp: NetRead Method #9 {{{3
+   elseif     b:netrw_method  == 9
 "    call Decho("read via sftp (method #4)")
     if g:netrw_cygwin == 1
      let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
@@ -656,12 +672,13 @@ fun! netrw#NetRead(...)
     let b:netrw_lastfile = choice
  
    ".........................................
-   else " Complain
+   " Complain {{{3
+   else
     echo "***warning*** unable to comply with your request<" . choice . ">"
    endif
   endwhile
  
-  " cleanup
+  " cleanup {{{3
 "  call Decho("cleanup")
   if exists("b:netrw_method")
    unlet b:netrw_method
@@ -673,7 +690,7 @@ fun! netrw#NetRead(...)
 endfun
 
 " ------------------------------------------------------------------------
-" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{1
+" NetGetFile: Function to read temporary file "tfile" with command "readcmd". {{{2
 fun! s:NetGetFile(readcmd, tfile, method)
 "   call Dfunc("NetGetFile(readcmd<".a:readcmd.">,tfile<".a:tfile."> method<".a:method.">)")
 
@@ -715,13 +732,14 @@ fun! s:NetGetFile(readcmd, tfile, method
    elseif rfile =~ '\.tar$'
     call tar#Browse(tfile)
    else
+"    call Decho("edit temporary file")
     e
    endif
 
    " rename buffer back to remote filename
-   keepalt exe "file ".rfile
+   keepalt exe "file ".escape(rfile,' ')
    filetype detect
-"   call Dredir("ls!","renamed buffer back to remote filename<".rfile.">")
+"   call Dredir("ls!","renamed buffer back to remote filename<".rfile."> : expand(%)<".expand("%").">")
    let line1 = 1
    let line2 = line("$")
 
@@ -764,7 +782,7 @@ fun! s:NetGetFile(readcmd, tfile, method
 endfun
 
 " ------------------------------------------------------------------------
-" NetWrite: responsible for writing a file over the net {{{1
+" NetWrite: responsible for writing a file over the net {{{2
 fun! netrw#NetWrite(...) range
 "  call Dfunc("NetWrite(a:0=".a:0.")")
  
@@ -772,7 +790,7 @@ fun! netrw#NetWrite(...) range
   let mod= 0
   call s:NetOptionSave()
  
-  " Get Temporary Filename
+  " Get Temporary Filename {{{3
   let tmpfile= tempname()
   if !isdirectory(substitute(tmpfile,'[^/]\+$','','e'))
    echohl Error | echo "***netrw*** your ".substitute(tmpfile,'[^/]\+$','','e')." directory is missing!"
@@ -800,6 +818,7 @@ fun! netrw#NetWrite(...) range
  
   while ichoice <= a:0
  
+   " Process arguments: {{{3
    " attempt to repeat with previous host-file-etc
    if exists("b:netrw_lastfile") && a:0 == 0
 "    call Decho("using b:netrw_lastfile<" . b:netrw_lastfile . ">")
@@ -860,19 +879,19 @@ fun! netrw#NetWrite(...) range
     let tmpfile = fnamemodify(tmpfile,':t')
    endif
  
-   " Determine method of read (ftp, rcp, etc)
+   " Determine method of read (ftp, rcp, etc) {{{3
    call s:NetMethod(choice)
  
    " =============
-   " Perform Write
-   " =============
+   " Perform Protocol-Based Write {{{3
+   " ============================
    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
+   " rcp: NetWrite Method #1 {{{3
+   if  b:netrw_method == 1
 "    call Decho("write via rcp (method #1)")
     if s:netrw_has_nt_rcp == 1
      if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
@@ -892,8 +911,8 @@ fun! netrw#NetWrite(...) range
     let b:netrw_lastfile = choice
  
    ".........................................
-   " ftp + <.netrc>: NetWrite Method #2
-   elseif b:netrw_method == 2	" write with ftp + <.netrc>
+   " ftp + <.netrc>: NetWrite Method #2 {{{3
+   elseif b:netrw_method == 2
     let netrw_fname = b:netrw_fname
     new
     setlocal ff=unix
@@ -920,8 +939,8 @@ fun! netrw#NetWrite(...) range
     let b:netrw_lastfile = choice
  
    ".........................................
-   " ftp + machine, id, passwd, filename: NetWrite Method #3
-   elseif b:netrw_method == 3	" write with ftp + machine, id, passwd, and fname
+   " ftp + machine, id, passwd, filename: NetWrite Method #3 {{{3
+   elseif b:netrw_method == 3
     let netrw_fname= b:netrw_fname
     new
     setlocal ff=unix
@@ -964,8 +983,8 @@ fun! netrw#NetWrite(...) range
     bd!
  
    ".........................................
-   " scp: NetWrite Method #4
-   elseif     b:netrw_method == 4	" write with scp
+   " scp: NetWrite Method #4 {{{3
+   elseif     b:netrw_method == 4
     if exists("g:netrw_port") && g:netrw_port != ""
      let useport= " -P ".g:netrw_port
     else
@@ -973,16 +992,16 @@ fun! netrw#NetWrite(...) range
     endif
     if g:netrw_cygwin == 1
      let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
-"     call Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
-     exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
+"     call  Decho("executing: !".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'")
+     exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".cygtmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'"
     else
-"     call Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
-     exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&')
+"     call  Decho("executing: !".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'")
+     exe g:netrw_silentxfer."!".g:netrw_scp_cmd.useport." ".tmpfile." '".g:netrw_machine.":".escape(b:netrw_fname,' ?&')."'"
     endif
     let b:netrw_lastfile = choice
  
    ".........................................
-   " http: NetWrite Method #5
+   " http: NetWrite Method #5 {{{3
    elseif     b:netrw_method == 5
     if !exists("g:netrw_quiet")
      echohl Error | echo "***netrw*** currently <netrw.vim> does not support writing using http:" | echohl None
@@ -990,8 +1009,8 @@ fun! netrw#NetWrite(...) range
     endif
  
    ".........................................
-   " dav: NetWrite Method #6
-   elseif     b:netrw_method == 6	" write with cadaver
+   " dav: NetWrite Method #6 (cadaver) {{{3
+   elseif     b:netrw_method == 6
 "    call Decho("write via cadaver (method #6)")
  
     " Construct execution string (four lines) which will be passed through filter
@@ -1020,8 +1039,8 @@ fun! netrw#NetWrite(...) range
     let b:netrw_lastfile = choice
  
    ".........................................
-   " rsync: NetWrite Method #7
-   elseif     b:netrw_method == 7	" write with rsync
+   " rsync: NetWrite Method #7 {{{3
+   elseif     b:netrw_method == 7
     if g:netrw_cygwin == 1
      let cygtmpfile=substitute(tmpfile,'^\(\a\):','/cygdrive/\1/','e')
 "     call Decho("executing: !".g:netrw_rsync_cmd." ".cygtmpfile." ".g:netrw_machine.":".escape(b:netrw_fname,' ?&'))
@@ -1033,8 +1052,8 @@ fun! netrw#NetWrite(...) range
     let b:netrw_lastfile = choice
  
    ".........................................
-   " scp: NetWrite Method #9
-   elseif     b:netrw_method == 9	" write with sftp
+   " sftp: NetWrite Method #9 {{{3
+   elseif     b:netrw_method == 9
     let netrw_fname= b:netrw_fname
     if exists("g:netrw_uid") &&  ( g:netrw_uid != "" )
      let uid_machine = g:netrw_uid .'@'. g:netrw_machine
@@ -1051,12 +1070,13 @@ fun! netrw#NetWrite(...) range
     let b:netrw_lastfile= choice
  
    ".........................................
-   else " Complain
+   " Complain {{{3
+   else
     echo "***warning*** unable to comply with your request<" . choice . ">"
    endif
   endwhile
  
-  " cleanup
+  " cleanup {{{3
 "  call Decho("cleanup")
   let result=delete(tmpfile)
   call s:NetOptionRestore()
@@ -1072,6 +1092,7 @@ endfun
 "  Remote Directory Browsing Support:    {{{1
 " ===========================================
 
+" ---------------------------------------------------------------------
 " NetBrowse: This function uses the command in g:netrw_list_cmd to get a list {{{2
 "  of the contents of a remote directory.  It is assumed that the
 "  g:netrw_list_cmd has a string, HOSTNAME, that needs to be substituted
@@ -1235,10 +1256,10 @@ fun! s:NetBrowse(dirname)
 "  call Decho("exe file ".escape(bufname,s:netrw_cd_escape))
   exe 'file '.escape(bufname,s:netrw_cd_escape)
 "  call Decho("renaming file to bufname<".bufname.">")
-  setlocal bh=hide bt=nofile nobl nonu
+  setlocal bh=hide bt=nofile nobl nonu noswf
 
   " save current directory on directory history list
-  call <SID>NetBookmarkDir(3,expand("%"))
+  call s:NetBookmarkDir(3,expand("%"))
 
   " set up buffer-local mappings
 "  call Decho("set up buffer-local mappings")
@@ -1256,6 +1277,7 @@ fun! s:NetBrowse(dirname)
   nnoremap <buffer> <silent> i		:call <SID>NetLongList(0)<cr>
   nnoremap <buffer> <silent> o		:call <SID>NetSplit(0)<cr>
   nnoremap <buffer> <silent> O		:call <SID>NetObtain()<cr>
+  nnoremap <buffer> <silent> P		:call <SID>NetPrevWinOpen(0)<cr>
   nnoremap <buffer> <silent> q		:<c-u>call <SID>NetBookmarkDir(2,expand("%"))<cr>
   nnoremap <buffer> <silent> r		:let g:netrw_sort_direction= (g:netrw_sort_direction =~ 'n')? 'r' : 'n'<bar>exe "norm! 0"<bar>call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<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>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))<bar>call <SID>NetRestoreWordPosn()<cr>
@@ -1263,7 +1285,7 @@ fun! s:NetBrowse(dirname)
   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(1)<cr>
-  nnoremap <buffer> <silent> x		:call <SID>NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<cr>
+  nnoremap <buffer> <silent> x		:call netrw#NetBrowseX(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()),1)<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>'
@@ -1446,6 +1468,13 @@ fun! s:NetBrowseChgDir(dirname,newdir)
   if newdir !~ '[\/]$'
    " handling a file
    let dirname= dirname.newdir
+   if g:netrw_browse_split == 1
+    new
+    wincmd _
+   elseif g:netrw_browse_split == 2
+    rightb vert new
+    wincmd |
+   endif
 "   call Decho("handling a file: dirname<".dirname.">")
 
   elseif newdir == './'
@@ -1479,7 +1508,7 @@ fun! s:NetBrowseChgDir(dirname,newdir)
 endfun
 
 " ---------------------------------------------------------------------
-"  NetGetWord: it gets the directory named under the cursor
+"  NetGetWord: it gets the directory named under the cursor {{{2
 fun! s:NetGetWord()
 "  call Dfunc("NetGetWord() line#".line("."))
   call s:UseBufWinVars()
@@ -1651,7 +1680,7 @@ fun! s:NetBrowseRm(usrhost,path) range
   " refresh the directory
   let curline= line(".")-1
 "  call Decho("refresh the directory")
-  call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
+  call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
   exe curline
 
 "  call Dret("NetBrowseRm")
@@ -1692,7 +1721,7 @@ fun! s:NetBrowseRename(usrhost,path) ran
 
   " refresh the directory
   let curline= line(".")
-  call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),'./'))
+  call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
   exe "keepjumps ".curline
 "  call Dret("NetBrowseRename")
 endfun
@@ -1721,29 +1750,29 @@ endfun
 "           =2 : local and o
 "           =3 : local and v
 fun! s:NetSplit(mode)
-"  call Dfunc("NetSplit(mode=".a:mode.")")
+"  call Dfunc("NetSplit(mode=".a:mode.") alto=".g:netrw_alto." altv=".g:netrw_altv)
 
   call s:SaveWinVars()
   if a:mode == 0
    exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
    call s:CopyWinVars()
    exe "norm! 0"
-   call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))
+   call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord()))
   elseif a:mode ==1
    exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
    call s:CopyWinVars()
    exe "norm! 0"
-   call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),<SID>NetGetWord()))
+   call s:NetBrowse(s:NetBrowseChgDir(expand("%"),s:NetGetWord()))
   elseif a:mode ==2
    exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
    call s:CopyWinVars()
    exe "norm! 0"
-   call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))
+   call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord()))
   else
    exe (g:netrw_altv? "rightb " : "lefta ").g:netrw_winsize."wincmd v"
    call s:CopyWinVars()
    exe "norm! 0"
-   call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord()))
+   call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,s:NetGetWord()))
   endif
 
 "  call Dret("NetSplit")
@@ -1752,8 +1781,8 @@ endfun
 " ---------------------------------------------------------------------
 " NetBrowseX:  allows users to write custom functions to operate on {{{2
 "              files given their extension.  Passes 0=local, 1=remote
-fun! s:NetBrowseX(fname,remote)
-"  call Dfunc("NetBrowseX(".a:fname." remote=".a:remote.")")
+fun! netrw#NetBrowseX(fname,remote)
+"  call Dfunc("NetBrowseX(fname<".a:fname."> remote=".a:remote.")")
 
   " set up the filename
   " (lower case the extension, make a local copy of a remote file)
@@ -1764,6 +1793,23 @@ fun! s:NetBrowseX(fname,remote)
   let fname= escape(a:fname,"%#")
 "  call Decho("fname<".fname."> after escape()")
 
+  " seems kde systems often have gnome-open due to dependencies, even though
+  " gnome-open's subsidiary display tools are largely absent.  Kde systems
+  " usually have "kicker" running, though...  (tnx Mikolaj Machowski)
+  if !exists("s:haskicker")
+   if has("unix")
+    let v:shell_error=0
+    silent! let s:haskicker= system('ps -e') =~ 'kicker'
+    if v:shell_error
+     let s:haskicker   = 0
+     let v:shell_error = 0
+    endif
+   else
+    let s:haskicker= 0
+   endif
+"   call Decho("setting s:haskicker=".s:haskicker)
+  endif
+
   if a:remote == 1
    " create a local copy
    let fname= tempname().".".exten
@@ -1783,18 +1829,31 @@ fun! s:NetBrowseX(fname,remote)
   endif
 "  call Decho("redir:".redir.":")
 
+  if exists("g:netrw_browsex_viewer") && executable(g:netrw_browsex_viewer)
+   if g:netrw_browsex_viewer == '-'
+    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
+   else
+"    call Decho("exe silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."' ".redir)
+    exe "silent !".g:netrw_browsex_viewer." '".escape(fname,'%#')."'".redir
+    let ret= v:shell_error
+   endif
+
   " execute the file handler
-  if has("win32") || has("win64")
+  elseif has("win32") || has("win64")
 "   call Decho('exe silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"')
    exe 'silent !start rundll32 url.dll,FileProtocolHandler "'.escape(fname, '%#').'"'
    let ret= v:shell_error
 
-  elseif has("unix") && executable("gnome-open")
+  elseif has("unix") && executable("gnome-open") && !s:haskicker
 "   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")
+  elseif has("unix") && executable("kfmclient") && s:haskicker
 "   call Decho("exe silent !kfmclient exec '".escape(fname,'%#')."' ".redir)
    exe "silent !kfmclient exec '".escape(fname,'%#')."' ".redir
    let ret= v:shell_error
@@ -1969,7 +2028,7 @@ fun! s:NetHideEdit(islocal)
   if a:islocal == 0
    silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
   else
-   silent call s:NetRefresh(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
+   silent call s:NetRefresh(s:LocalBrowseChgDir(b:netrw_curdir,"./"),a:islocal)
   endif
 
 "  call Dret("NetHideEdit")
@@ -1989,7 +2048,7 @@ fun! s:NetSortSequence(mode)
   if a:mode == 0
    silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),'./'))
   else
-   silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
+   silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./"))
   endif
 
 "  call Dret("NetSortSequence")
@@ -2025,9 +2084,9 @@ fun! s:NetLongList(mode)
 
   " refresh the listing
   if a:mode == 0
-   silent call <SID>NetBrowse(<SID>NetBrowseChgDir(expand("%"),"./"))
+   silent call s:NetBrowse(s:NetBrowseChgDir(expand("%"),"./"))
   else
-   silent call s:LocalBrowse(<SID>LocalBrowseChgDir(b:netrw_curdir,"./"))
+   silent call s:LocalBrowse(s:LocalBrowseChgDir(b:netrw_curdir,"./"))
   endif
 
   " keep cursor on the filename
@@ -2434,6 +2493,82 @@ fun! s:NetObtain()
 "  call Dret("NetObtain")
 endfun
 
+" ---------------------------------------------------------------------
+" NetPrevWinOpen: opoen file/directory in previous window.  {{{2
+"   If there's only one window, then the window will first be split.
+fun! s:NetPrevWinOpen(islocal)
+"  call Dfunc("NetPrevWinOpen(islocal=".a:islocal.")")
+
+  " get last window number and the word currently under the cursor
+  let lastwinnr = winnr("$")
+  let curword   = s:NetGetWord()
+  let curdir    = b:netrw_curdir
+"  call Decho("lastwinnr=".lastwinnr." curword<".curword.">")
+
+  let didsplit  = 0
+  if lastwinnr == 1
+   " if only one window, open a new one first
+"   call Decho("only one window, so open a new one (g:netrw_alto=".g:netrw_alto.")")
+   exe (g:netrw_alto? "bel " : "abo ").g:netrw_winsize."wincmd s"
+   let didsplit  = 1
+
+  else
+   wincmd p
+   " if the previous window's buffer has been changed (is modified),
+   " and it doesn't appear in any other extant window, then ask the
+   " user if s/he wants to abandon modifications therein.
+   let bnr    = winbufnr(0)
+   let bnrcnt = 0
+   if &mod
+    windo if winbufnr(0) == bnr | let bnrcnt=bnrcnt+1 | endif
+"    call Decho("bnr=".bnr." bnrcnt=".bnrcnt)
+    if bnrcnt == 1
+     let bufname= bufname(winbufnr(winnr()))
+     let choice= confirm("Save modified file<".bufname.">?","&Yes\n&No\n&Cancel")
+
+     if choice == 1
+      " Yes -- write file & then browse
+      let v:errmsg= ""
+      silent w
+      if v:errmsg != ""
+       echohl Error | echo "***netrw*** "unable to write <".bufname.">!" | echohl None
+       call inputsave()|call input("Press <cr> to continue")|call inputrestore()
+       if didsplit
+       	q
+       else
+       	wincmd p
+       endif
+"       call Dret("NetPrevWinOpen : unable to write <".bufname.">")
+       return
+      endif
+
+     elseif choice == 2
+      " No -- don't worry about changed file, just browse anyway
+      set nomod
+      echohl WarningMsg | echo "***netrw*** ".bufname." changes abandoned" | echohl None
+
+     else
+      " Cancel -- don't do this
+      if didsplit
+       q
+      else
+       wincmd p
+      endif
+"      call Dret("NetPrevWinOpen : cancelled")
+      return
+     endif
+    endif
+   endif
+  endif
+
+  if a:islocal
+   call s:LocalBrowse(s:LocalBrowseChgDir(curdir,curword))
+  else
+   call s:NetBrowse(s:NetBrowseChgDir(expand("%"),curword))
+  endif
+"  call Dret("NetPrevWinOpen")
+endfun
+
 " ==========================================
 "  Local Directory Browsing Support:    {{{1
 " ==========================================
@@ -2445,7 +2580,7 @@ fun! s:LocalBrowse(dirname)
   " the BufEnter event causes triggering when attempts to write to
   " the DBG buffer are made.
   if isdirectory(a:dirname)
-   call netrw#DirBrowse(a:dirname)
+   silent! call netrw#DirBrowse(a:dirname)
   endif
   " not a directory, ignore it
 endfun
@@ -2462,6 +2597,7 @@ fun! netrw#DirBrowse(dirname)
 "   call Dret("DirBrowse")
    return
   endif
+
   call s:NetOptionSave()
 
   if v:version < 603
@@ -2550,10 +2686,13 @@ fun! netrw#DirBrowse(dirname)
   endif
 
   " change the name of the buffer to reflect the b:netrw_curdir
+  " Hmm.  When another vim is open to the same directory, I get
+  " a "Press ENTER" ... ok, setting "noswf" avoids it.
+"  call Decho('exe silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape))
   exe 'silent! file '.escape(b:netrw_curdir,s:netrw_cd_escape)
 
   " make this buffer not-a-file, modifiable, not line-numbered, etc
-  setlocal bh=hide bt=nofile nobl ma nonu
+  setlocal bh=hide bt=nofile nobl ma nonu noswf
   keepalt silent! %d
 
   " ---------------------------
@@ -2563,7 +2702,7 @@ fun! netrw#DirBrowse(dirname)
    endif
 
   " save current directory on directory history list
-  call <SID>NetBookmarkDir(3,b:netrw_curdir)
+  call s:NetBookmarkDir(3,b:netrw_curdir)
 
   " set up all the maps
 "  call Decho("Setting up local browser maps")
@@ -2584,6 +2723,7 @@ fun! netrw#DirBrowse(dirname)
   nnoremap <buffer> <silent> o		:call <SID>NetSplit(2)<cr>
   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> P		:call <SID>NetPrevWinOpen(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>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>
@@ -2591,7 +2731,7 @@ fun! netrw#DirBrowse(dirname)
   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> x		:call netrw#NetBrowseX(<SID>LocalBrowseChgDir(b:netrw_curdir,<SID>NetGetWord(),0),0)"<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>
@@ -2784,7 +2924,7 @@ fun! s:LocalBrowseList()
     let ft = strpart("000000000000000000",1,18-strlen(t)).t
 "    call Decho("exe keepjumps put ='".ft.'/'.filename."'")
     let ftpfile= ft.'/'.pfile
-    keepjumps put=ftpfile
+    keepjumps silent! put=ftpfile
 
    elseif g:netrw_sort_by =~ "^s"
     " sort by size (handles file sizes up to 1 quintillion bytes, US)
@@ -2793,12 +2933,12 @@ fun! s:LocalBrowseList()
     let fsz  = strpart("000000000000000000",1,18-strlen(sz)).sz
 "    call Decho("exe keepjumps put ='".fsz.'/'.filename."'")
     let fszpfile= fsz.'/'.pfile
-    keepjumps put =fszpfile
+    keepjumps silent! put =fszpfile
 
    else 
     " sort by name
 "    call Decho("exe keepjumps put ='".pfile."'")
-    keepjumps put=pfile
+    keepjumps silent! put=pfile
    endif
   endwhile
   
@@ -2833,6 +2973,13 @@ fun! s:LocalBrowseChgDir(dirname,newdir,
    if a:0 < 1
 "    call Decho("dirname<".dirname."> netrw_cd_escape<".s:netrw_cd_escape.">")
 "    call Decho("about to edit<".escape(dirname,s:netrw_cd_escape).">")
+    if g:netrw_browse_split == 1
+     new
+     wincmd _
+    elseif g:netrw_browse_split == 2
+     rightb vert new
+     wincmd |
+    endif
     exe "e! ".escape(dirname,s:netrw_cd_escape)
     set ma nomod
    endif
@@ -3063,7 +3210,7 @@ fun! netrw#Explore(indx,dosplit,style,..
 
   " if dosplit or file has been modified
   if a:dosplit || &modified
-   call <SID>SaveWinVars()
+   call s:SaveWinVars()
 
    if a:style == 0      " Explore, Sexplore
     exe g:netrw_winsize."wincmd s"
@@ -3275,7 +3422,7 @@ fun! s:NetGetcwd(doesc)
 endfun
 
 " ---------------------------------------------------------------------
-" NetMethod:  determine method of transfer {{{1
+" NetMethod:  determine method of transfer {{{2
 "  method == 1: rcp
 "	     2: ftp + <.netrc>
 "	     3: ftp + machine, id, password, and [path]filename
@@ -3475,7 +3622,7 @@ fun! s:NetMethod(choice)  " globals: met
 endfun
 
 " ------------------------------------------------------------------------
-" NetUserPass: set username and password for subsequent ftp transfer {{{1
+" NetUserPass: set username and password for subsequent ftp transfer {{{2
 "   Usage:  :call NetUserPass()			-- will prompt for userid and password
 "	    :call NetUserPass("uid")		-- will prompt for password
 "	    :call NetUserPass("uid","password") -- sets global userid and password
@@ -3506,7 +3653,7 @@ fun! NetUserPass(...)
 endfun
 
 " ------------------------------------------------------------------------
-" NetOptionSave: save options and set to "standard" form {{{1
+" NetOptionSave: save options and set to "standard" form {{{2
 fun! s:NetOptionSave()
 "  call Dfunc("NetOptionSave()")
   if !exists("w:netoptionsave")
@@ -3550,7 +3697,7 @@ fun! s:NetOptionSave()
 endfun
 
 " ------------------------------------------------------------------------
-" NetOptionRestore: restore options {{{1
+" NetOptionRestore: restore options {{{2
 fun! s:NetOptionRestore()
 "  call Dfunc("NetOptionRestore()")
   if !exists("w:netoptionsave")
@@ -3591,7 +3738,7 @@ fun! s:NetOptionRestore()
 endfun
 
 " ------------------------------------------------------------------------
-" NetReadFixup: this sort of function is typically written by the user {{{1
+" NetReadFixup: this sort of function is typically written by the user {{{2
 "               to handle extra junk that their system's ftp dumps
 "               into the transfer.  This function is provided as an
 "               example and as a fix for a Windows 95 problem: in my
@@ -3609,7 +3756,7 @@ if has("win95") && exists("g:netrw_win95
 endif
 
 " ---------------------------------------------------------------------
-" NetSort: Piet Delport's BISort2() function, modified to take a range {{{1
+" NetSort: Piet Delport's BISort2() function, modified to take a range {{{2
 if v:version < 700
  fun! s:NetSort() range
 " "  call Dfunc("NetSort()")
@@ -3654,7 +3801,7 @@ if v:version < 700
 endif
 
 " ---------------------------------------------------------------------
-" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{1
+" SetSort: sets up the sort based on the g:netrw_sort_sequence {{{2
 "          What this function does is to compute a priority for the patterns
 "          in the g:netrw_sort_sequence.  It applies a substitute to any
 "          "files" that satisfy each pattern, putting the priority / in
@@ -3711,7 +3858,7 @@ fun! s:SetSort()
 endfun
 
 " ---------------------------------------------------------------------
-" SaveWinVars: (used by Explore()) {{{1
+" SaveWinVars: (used by Explore()) {{{2
 fun! s:SaveWinVars()
 "  call Dfunc("SaveWinVars()")
   if exists("w:netrw_bannercnt")      |let s:bannercnt       = w:netrw_bannercnt      |endif
@@ -3727,7 +3874,7 @@ fun! s:SaveWinVars()
 endfun
 
 " ---------------------------------------------------------------------
-" CopyWinVars: (used by Explore()) {{{1
+" CopyWinVars: (used by Explore()) {{{2
 fun! s:CopyWinVars()
 "  call Dfunc("CopyWinVars()")
   if exists("s:bannercnt")      |let w:netrw_bannercnt       = s:bannercnt      |unlet s:bannercnt      |endif
@@ -3743,7 +3890,7 @@ fun! s:CopyWinVars()
 endfun
 
 " ---------------------------------------------------------------------
-" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{1
+" SetBufWinVars: (used by NetBrowse() and LocalBrowse()) {{{2
 "   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
@@ -3765,7 +3912,7 @@ fun! s:SetBufWinVars()
 endfun
 
 " ---------------------------------------------------------------------
-" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{1
+" UseBufWinVars: (used by NetBrowse() and LocalBrowse() {{{2
 "              Matching function to BufferWinVars()
 fun! s:UseBufWinVars()
 "  call Dfunc("UseBufWinVars()")
@@ -3783,7 +3930,7 @@ fun! s:UseBufWinVars()
 endfun
 
 " ---------------------------------------------------------------------
-"  RFC2396: converts %xx into characters
+"  RFC2396: converts %xx into characters {{{2
 fun! netrw#RFC2396(fname)
 "  call Dfunc("RFC2396(fname<".a:fname.">)")
   let fname = escape(substitute(a:fname,'%\(\x\x\)','\=nr2char("0x".submatch(1))','ge')," \t")
@@ -3792,7 +3939,7 @@ fun! netrw#RFC2396(fname)
 endfun
 
 " ------------------------------------------------------------------------
-" Settings Restoration: {{{1
+" Settings Restoration: {{{2
 let &cpo= s:keepcpo
 unlet s:keepcpo
 
--- a/runtime/autoload/netrwSettings.vim
+++ b/runtime/autoload/netrwSettings.vim
@@ -1,7 +1,7 @@
 " netrwSettings.vim: makes netrw settings simpler
-" Date:		Oct 12, 2005
+" Date:		Jan 26, 2006
 " Maintainer:	Charles E Campbell, Jr <drchipNOSPAM at campbellfamily dot biz>
-" Version:	4
+" Version:	6a	ASTRO-ONLY
 " 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
@@ -19,7 +19,7 @@
 if exists("g:loaded_netrwSettings") || &cp
   finish
 endif
-let g:loaded_netrwSettings  = "v4"
+let g:loaded_netrwSettings  = "v6a"
 
 " ---------------------------------------------------------------------
 " NetrwSettings: {{{1
@@ -56,10 +56,10 @@ fun! netrwSettings#NetrwSettings()
    let g:netrw_ignorenetrc= 0
   endif
 
-  put ='+ ---------------------------------------------'
-  put ='+ NetrwSettings:  (by Charles E. Campbell, Jr.)'
+  put ='+ --------------------------------------------'
+  put ='+ NetrwSettings:  by Charles E. Campbell, Jr.'
   put ='+  Press ? with cursor atop any line for help  '
-  put ='+ ---------------------------------------------'
+  put ='+ --------------------------------------------'
   let s:netrw_settings_stop= line(".")
 
   put =''
@@ -89,6 +89,12 @@ fun! netrwSettings#NetrwSettings()
   put ='+ Netrw Browser Control'
   put = 'let g:netrw_alto              = '.g:netrw_alto
   put = 'let g:netrw_altv              = '.g:netrw_altv
+  put = 'let g:netrw_browse_split      = '.g:netrw_browse_split
+  if exists("g:netrw_browsex_viewer")
+   put = 'let g:netrw_browsex_viewer    = '.g:netrw_browsex_viewer
+  else
+   put = 'let g:netrw_browsex_viewer    = (not defined)'
+  endif
   put = 'let g:netrw_dirhistmax        = '.g:netrw_dirhistmax
   put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
   put = 'let g:netrw_ftp_list_cmd      = '.g:netrw_ftp_list_cmd
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt*   For Vim version 7.0aa.  Last change: 2006 Jan 08
+*autocmd.txt*   For Vim version 7.0aa.  Last change: 2006 Feb 01
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -273,6 +273,7 @@ Name			triggered by ~
 |FileChangedRO|		before making the first change to a read-only file
 
 |FuncUndefined|		a user function is used but it isn't defined
+|SpellFileMissing|	a spell file is used but it can't be found
 
 |FocusGained|		Vim got input focus
 |FocusLost|		Vim lost input focus
@@ -643,6 +644,11 @@ RemoteReply			When a reply from a Vim th
 							*SessionLoadPost*
 SessionLoadPost			After loading the session file created using
 				the |:mksession| command.
+							*SpellFileMissing*
+SpellFileMissing		When trying to load a spell checking file and
+				it can't be found.  <amatch> is the language,
+				'encoding' also matters.  See
+				|spell-SpellFileMissing|.
 							*StdinReadPost*
 StdinReadPost			After reading from the stdin into the buffer,
 				before executing the modelines.  Only used
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Jan 29
+*eval.txt*      For Vim version 7.0aa.  Last change: 2006 Jan 31
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -2371,7 +2371,7 @@ filter({expr}, {string})					*filter()*
 
 		The operation is done in-place.  If you want a List or
 		Dictionary to remain unmodified make a copy first: >
-			:let l = filter(copy(mylist), '& =~ "KEEP"')
+			:let l = filter(copy(mylist), 'v:val =~ "KEEP"')
 
 <		Returns {expr}, the List or Dictionary that was filtered.
 		When an error is encountered while evaluating {string} no
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt*	For Vim version 7.0aa.  Last change: 2006 Jan 29
+*options.txt*	For Vim version 7.0aa.  Last change: 2006 Jan 31
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -5092,6 +5092,7 @@ A jump table for the options with a shor
 	  menu.vim	GUI menus |menu.vim|
 	  plugin/	plugin scripts |write-plugin|
 	  print/	files for printing |postscript-print-encoding|
+	  spell/	spell checking files |spell|
 	  syntax/	syntax files |mysyntaxfile|
 	  tutor/	files for vimtutor |tutor|
 
@@ -5727,7 +5728,7 @@ A jump table for the options with a shor
 	'shiftwidth'.  'tabstop' or 'softtabstop' is used in other places.  A
 	<BS> will delete a 'shiftwidth' worth of space at the start of the
 	line.
-	When off a <Tab> always inserts blanks according to 'tabstop' or
+	When off, a <Tab> always inserts blanks according to 'tabstop' or
 	'softtabstop'.  'shiftwidth' is only used for shifting text left or
 	right |shift-left-right|.
 	What gets inserted (a Tab or spaces) depends on the 'expandtab'
@@ -5836,7 +5837,8 @@ A jump table for the options with a shor
 
 	After this option has been set successfully, Vim will source the files
 	"spell/LANG.vim" in 'runtimepath'.  "LANG" is the value of 'spelllang'
-	up to the first comma, dot or underscore.  See |set-spc-auto|.
+	up to the first comma, dot or underscore.
+	Also see |set-spc-auto|.
 
 
 						*'spellsuggest'* *'sps'*
--- a/runtime/doc/pi_netrw.txt
+++ b/runtime/doc/pi_netrw.txt
@@ -1,4 +1,4 @@
-*pi_netrw.txt*  For Vim version 7.0.  Last change: Nov 28, 2005
+*pi_netrw.txt*  For Vim version 7.0.  Last change: Jan 27, 2006
 
 		VIM REFERENCE MANUAL    by Charles E. Campbell, Jr.
 
@@ -10,7 +10,8 @@
 ==============================================================================
 0. Contents						*netrw-contents*
 
-1.  Netrw Reference......................................|netrw-ref|
+1.  Starting With Netrw.................................|netrw-start|
+2.  Netrw Reference......................................|netrw-ref|
       CONTROLLING EXTERNAL APPLICTIONS...................|netrw-externapp|
       READING............................................|netrw-read|
       WRITING............................................|netrw-write|
@@ -18,14 +19,14 @@ 1.  Netrw Reference.....................
       CHANGING THE USERID AND PASSWORD...................|netrw-chgup|
       VARIABLES..........................................|netrw-variables|
       PATHS..............................................|netrw-path|
-2.  Network-Oriented File Transfer.......................|netrw-xfer|
+3.  Network-Oriented File Transfer.......................|netrw-xfer|
       NETRC..............................................|netrw-netrc|
       PASSWORD...........................................|netrw-passwd|
-3.  Activation...........................................|netrw-activate|
-4.  Transparent File Transfer............................|netrw-transparent|
-5.  Ex Commands..........................................|netrw-ex|
-6.  Variables and Options................................|netrw-var|
-7.  Directory Browsing...................................|netrw-browse| {{{1
+4.  Activation...........................................|netrw-activate|
+5.  Transparent File Transfer............................|netrw-transparent|
+6.  Ex Commands..........................................|netrw-ex|
+7.  Variables and Options................................|netrw-var|
+8.  Directory Browsing...................................|netrw-browse| {{{1
       Maps...............................................|netrw-maps|
       Exploring..........................................|netrw-explore-cmds|
       Quick Reference Commands Table.....................|netrw-browse-cmds|
@@ -41,7 +42,7 @@ 7.  Directory Browsing..................
       Deleting Files Or Directories......................|netrw-delete|
       Renaming Files Or Directories......................|netrw-move|
       Hiding Files Or Directories........................|netrw-a|
-      Edit File Or Directory Hiding List.................|netrw-h|
+      Edit File Or Directory Hiding List.................|netrw-ctrl-h|
       Browsing With A Horizontally Split Window..........|netrw-o|
       Preview Window.....................................|netrw-p|
       Selecting Sorting Style............................|netrw-s|
@@ -56,19 +57,19 @@ 7.  Directory Browsing..................
       Changing To A Bookmarked Directory.................|netrw-B| |netrw-NB|
       Listing Bookmarks And History......................|netrw-q|
       Improving Directory Browsing.......................|netrw-listhack| }}}1
-8.  Problems and Fixes...................................|netrw-problems|
-9.  Debugging............................................|netrw-debug|
-10. History..............................................|netrw-history|
-11. Credits..............................................|netrw-credits|
+9.  Problems and Fixes...................................|netrw-problems|
+10. Debugging............................................|netrw-debug|
+11. History..............................................|netrw-history|
+12. Credits..............................................|netrw-credits|
 
 The Netrw plugin is generally sourced automatically as it is a
 |standard-plugin|.  That said, to make use of netrw, one must
 have plugins available which can be done with the following
-two lines in your <.vimrc>:
+two lines in your <.vimrc>: >
 
 	set nocp                    " 'compatible' is not set
 	filetype plugin on          " plugins are enabled
-
+<
 You can avoid loading this plugin by setting the "loaded_netrw" variable
 in your <.vimrc> file: >
 
@@ -77,14 +78,66 @@ in your <.vimrc> file: >
 {Vi does not have any of this}
 
 ==============================================================================
-1. Netrw Reference						*netrw-ref*
+1. Starting With Netrw						*netrw-start*
+
+Netrw makes reading, writing, and browsing over a network connection easy!
+First, make sure that you have plugins enabled, so you'll need to have at
+least the following in your <.vimrc>: (or see |netrw-activate|) >
+
+	set nocp                    " 'compatible' is not set
+	filetype plugin on          " plugins are enabled
+<
+(see |'cp'| and |:filetype-plugin-on|)
+
+Netrw supports "transparent" editing of files on other machines using urls
+(see |netrw-transparent|). As an example of this, let's assume you have an
+account on some other machine; try >
+
+	vim scp://hostname/path/to/file
+<
+if you have an ssh connection.  Want to make ssh/scp easier to use? Check
+out |netrw-listhack|!
+
+What if you have ftp, not ssh/scp?  That's easy, too; try >
+
+	vim ftp://hostname/path/to/file
+<
+Want to make ftp simpler to use?  See if your ftp supports a file called
+<.netrc> -- typically it goes in your home directory, has read/write
+permissions for only the user to read (ie. not group, world, other, etc),
+and has lines resembling >
+
+	machine HOSTNAME login USERID password "PASSWORD"
+	machine HOSTNAME login USERID password "PASSWORD"
+	...
+	default          login USERID password "PASSWORD"
+<
+How about browsing -- ie. you just want to look around before editing a
+file.  For browsing on your current host, just "edit" a directory: >
+
+	vim .
+	vim /home/userid/path
+<
+For browsing on a remote host, "edit" a directory (but make sure that
+the directory name is followed by a "/"): >
+
+	vim scp://hostname/
+	vim ftp://hostname/path/to/dir/
+<
+See |netrw-browse| for more!
+
+There's more protocols supported than scp and ftp, too: see the next
+section, |netrw-externapp|.
+
+==============================================================================
+2. Netrw Reference						*netrw-ref*
 
 CONTROLLING EXTERNAL APPLICTIONS			*netrw-externapp*
 
 	Protocol  Variable	    Default Value
 	--------  ----------------  -------------
 	   dav:    *g:netrw_dav_cmd*  = "cadaver"
-	 fetch:  *g:netrw_fetch_cmd*  = "fetch -o"
+	 fetch:  *g:netrw_fetch_cmd*  = "fetch -o"    if fetch is available
 	   ftp:    *g:netrw_ftp_cmd*  = "ftp"
           http:   *g:netrw_http_cmd*  = "fetch -o"    if fetch is available
 	  http:    g:netrw_http_cmd   = "wget -q -O"  If wget  is available
@@ -191,7 +244,7 @@ file using root-relative paths, use the 
 <
 
 ==============================================================================
-2. Network-Oriented File Transfer				*netrw-xfer*
+3. 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
@@ -337,7 +390,7 @@ However, |netrw-listhack| can help with 
 
 
 ==============================================================================
-3. Activation						*netrw-activate*
+4. Activation						*netrw-activate*
 
 Network-oriented file transfers are available by default whenever
 |'nocompatible'| mode is enabled.  The <netrw.vim> file resides in your
@@ -351,7 +404,7 @@ up vim.  I suggest that, at a minimum, y
 <
 
 ==============================================================================
-4. Transparent File Transfer				*netrw-transparent*
+5. 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.
@@ -365,7 +418,7 @@ See |netrw-activate| for more on how to 
 such as netrw.
 
 ==============================================================================
-5. Ex Commands						*netrw-ex*
+6. Ex Commands						*netrw-ex*
 
 The usual read/write commands are supported.  There are also a couple of
 additional commands available.
@@ -403,7 +456,7 @@ additional commands available.
 
 
 ==============================================================================
-6. Variables and Options       			*netrw-options* *netrw-var*
+7. Variables and Options       			*netrw-options* *netrw-var*
 
 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:
@@ -476,10 +529,10 @@ variables listed below, and may be modif
                                                   transformed however they wish
                                                   by NetReadFixup()
     g:netrw_dav_cmd    variable   ="cadaver"
-    g:netrw_fetch_cmd  variable   ="fetch -o"
+    g:netrw_fetch_cmd  variable   ="fetch -o"     if fetch is available
     g:netrw_ftp_cmd    variable   ="ftp"
-    g:netrw_http_cmd   variable   ="fetch -o" else if fetch is executable
-    g:netrw_http_cmd   variable   ="wget -O"  if      wget  is executable
+    g:netrw_http_cmd   variable   ="fetch -o"     if      fetch is available
+    g:netrw_http_cmd   variable   ="wget -O"      else if wget  is available
     g:netrw_list_cmd   variable   ="ssh HOSTNAME ls -Fa"
     g:netrw_rcp_cmd    variable   ="rcp"
     g:netrw_rsync_cmd  variable   ="rsync -a"
@@ -488,9 +541,10 @@ 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 (netrw_ftp and NetReadFixup) 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.
@@ -572,7 +626,7 @@ itself:
 >
 
 ==============================================================================
-7. Directory Browsing	*netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
+8. Directory Browsing	*netrw-browse* *netrw-dir* *netrw-list* *netrw-help*
 
 MAPS   								*netrw-maps*
      ?................Help.......................................|netrw-help|
@@ -585,7 +639,7 @@ MAPS   								*netrw-maps*
      c................Make Browsing Directory The Current Dir....|netrw-c|
      d................Make A New Directory.......................|netrw-d|
      D................Deleting Files or Directories..............|netrw-D|
-     <c-h>............Edit File/Directory Hiding List............|netrw-h|
+     <c-h>............Edit File/Directory Hiding List............|netrw-ctrl-h|
      i................Long Listing...............................|netrw-i|
      <c-l>............Refreshing the Listing.....................|netrw-ctrl-l|
      o................Browsing with a Horizontal Split...........|netrw-o|
@@ -615,27 +669,38 @@ QUICK REFERENCE COMMANDS TABLE     			*n
 	Command	Explanation
         -------	-----------
 <          ?	Causes Netrw to issue help
-	 <cr>	Netrw will enter the directory or read the file
-	 <del>	Netrw will attempt to remove the file/directory
-	   d	Make a directory
-	   D	Netrw will attempt to remove the file(s)/directory(ies)
-	   R	Netrw will attempt to rename the file(s)/directory(ies)
-	   -	Makes Netrw go up one directory
-	   a	Toggles between normal display,
-	    	hiding (suppress display of files matching g:netrw_list_hide)
-	    	showing (display only files which match g:netrw_list_hide)
-	   c	Make current browsing directory the current directory
-	 <c-h>	Edit file hiding list
-	   i	Toggles between long and short listing
-	 <c-l>	Causes Netrw to refresh the directory listing
+	 <cr>	Netrw will enter the directory or read the file |netrw-cr|
+	 <del>	Netrw will attempt to remove the file/directory |netrw-del|
+	   -	Makes Netrw go up one directory |netrw--|
+	   a	Toggles between normal display, |netrw-a|
+		 hiding (suppress display of files matching g:netrw_list_hide)
+		 showing (display only files which match g:netrw_list_hide)
+	   b	bookmark current directory; use Nb if compact listing
+		 in use |netrw-b|
+	   B	go to previous bookmarked directory; use Nb if compact
+		 listing is in use |netrw-B|
+	   c	Make current browsing directory the current directory |netrw-c|
+	   d	Make a directory |netrw-d|
+	   D	Netrw will attempt to remove the file(s)/directory(ies) |netrw-D|
+	 <c-h>	Edit file hiding list |netrw-ctrl-h|
+	   i	Toggles between long and short listing |netrw-i|
+	 <c-l>	Causes Netrw to refresh the directory listing |netrw-ctrl-l|
+	  Nb	Same as b, but always available |netrw-Nb|
+	  NB	Same as B, but always available |netrw-NB|
 	   o	Enter the file/directory under the cursor in a new browser
-	   	window.  A horizontal split is used.
-	   p	Preview the file
-	   r	Reverse sorting order
-	   s	Select sorting style: by name, time, or file size
+		 window.  A horizontal split is used. |netrw-o|
+	   O	Obtain a file specified by cursor |netrw-O|
+	   p	Preview the file |netrw-p|
+	   P	Browse in the previously used window |netrw-P|
+	   r	Reverse sorting order |netrw-r|
+	   R	Rename the designed file(s)/directory(ies) |netrw-R|
+	   s	Select sorting style: by name, time, or file size |netrw-s|
+	   S	Specify suffix priority for name-sorting |netrw-S|
+	   u	Change to recently-visited directory |netrw-u|
+	   U	Change to subsequently-visited directory |netrw-U|
 	   v	Enter the file/directory under the cursor in a new browser
-	   	window.  A vertical split is used.
-	   x	Apply a function to a file.
+		 window.  A vertical split is used. |netrw-v|
+	   x	Apply a function to a file. (special browsers) |netrw-x|
 
 NETRW BROWSER VARIABLES					*netrw-browse-var*
 >
@@ -650,6 +715,19 @@ NETRW BROWSER VARIABLES					*netrw-brows
  				by setting this variable (see |netrw-v|)
 				 default: =0
 
+  *g:netrw_browse_split*	when browsing, <cr> will open the file by:
+				=0: re-using the same window
+				=1: horizontally splitting the window first  
+				=2: vertically   splitting the window first  
+  *g:netrw_browsex_viewer*	specify user's preference for a viewer: >
+					"kfmclient exec"
+					"gnome-open"
+<				If >
+					"-"
+<				is used, then netrwFileHandler() will look for
+				a script/function to handle the given
+				extension.  (see |netrw_filehandler|).
+<
   *g:netrw_ftp_browse_reject*	ftp can produce a number of errors and warnings
 				that can show up as "directories" and "files"
 				in the listing.  This pattern is used to
@@ -866,6 +944,11 @@ protocol given in the original read requ
   or more spaces embedded in it, or any trailing spaces, then you'll need to
   use the "thin" format to select it.
 
+The |g:netrw_browse_split| option, which is zero by default, may be used to
+cause the opening of files to be done in a new window.  The splitting will
+be done horizontally if the option is one and vertically if the option is
+two.
+
 
 OBTAINING A FILE						*netrw-O*
 
@@ -921,7 +1004,7 @@ directory.  Attempts to make a local dir
 a file or a directory) will be detected, reported on, and ignored.
 
 
-DELETING FILES OR DIRECTORIES			*netrw-delete* *netrw-D*
+DELETING FILES OR DIRECTORIES		*netrw-delete* *netrw-D* *netrw-del*
 
 Deleting/removing files and directories involves moving the cursor to the
 file/directory to be deleted and pressing "D".  Directories must be empty
@@ -971,7 +1054,7 @@ ways: ignore it, hide files which match,
 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
+\.obj) which specify the hiding list. (also see |netrw-ctrl-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"
@@ -979,7 +1062,7 @@ key to show all files, hide matching fil
 files.
 
 
-EDIT FILE OR DIRECTORY HIDING LIST		*netrw-h* *netrw-edithide*
+EDIT FILE OR DIRECTORY HIDING LIST		*netrw-ctrl-h* *netrw-edithide*
 
 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
@@ -1009,6 +1092,20 @@ One may use a preview window (currently 
 "p" key when the cursor is atop the desired filename to be previewed.
 
 
+PREVIOUS WINDOW					*netrw-P* *netrw-prvwin*
+
+To edit a file or directory in the previously used window (see :he |CTRL-W_P|),
+press a "P".  If there's only one window, then the one window will be
+horizontally split (above/below splitting is controlled by |g:netrw_alto|,
+and its initial size is controlled by |g:netrw_winsize|).
+
+If there's more than one window, the previous window will be re-used on
+the selected file/directory.  If the previous window's associated buffer
+has been modified, and there's only one window with that buffer, then
+the user will be asked if s/he wishes to save the buffer first (yes,
+no, or cancel).
+
+
 SELECTING SORTING STYLE				*netrw-s* *netrw-sort*
 
 One may select the sorting style by name, time, or (file) size.  The "s" map
@@ -1068,15 +1165,30 @@ window and cursor at the right, have
 in your <.vimrc>.
 
 
-CUSTOMIZING BROWSING WITH A USER FUNCTION	*netrw-x* *netrw-handler*
+CUSTOMIZING BROWSING WITH A USER FUNCTION	*netrw-x* *netrw-handler* *gx*
+
+Certain files, such as html, gif, jpeg, (word/office) doc, etc, files, are
+best seen with a special handler (ie. a tool provided with your computer).
+Netrw allows one to invoke such special handlers by: >
 
-One may "enter" a file with a special handler, thereby firing up a browser or
-other application, for example, on a file by hitting the "x" key.  The special
-handler varies:
+	* when Exploring, hit the "x" key
+	* when editing, hit gx with the cursor atop the special filename
+<
+Netrw determines which special handler by the following method:
+
+  * if |g:netrw_browsex_viewer| exists, then it will be used to attempt to
+    view files.  Examples of useful settings (place into your <.vimrc>): >
+
+	:let g:netrw_browsex_viewer= "kfmclient exec"
+<   or >
+	:let g:netrw_browsex_viewer= "gnome-open"
+<
+    If g:netrw_browsex_viewer == '-', then netrwFileHandler() will be
+    invoked first (see |netrw_filehandler|).
 
   * for Windows 32 or 64, the url and FileProtocolHandler dlls are used.  
+  * for Gnome (with gnome-open): gnome-open is used.
   * for KDE (with kfmclient): kfmclient is used.
-  * for Gnome (with gnome-open): gnome-open is used.
   * otherwise the netrwFileHandler plugin is used.
 
 The file's suffix is used by these various approaches to determine an
@@ -1084,6 +1196,7 @@ appropriate application to use to "handl
 OpenOffice (*.sfx), visualization (*.jpg, *.gif, etc), and PostScript (*.ps,
 *.eps) can be handled.
 
+							*netrw_filehandler*
 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!
 >
@@ -1093,10 +1206,12 @@ extension.  Of course, the handler funct
 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
-generally useful, please feel free to forward a copy to me for future
-inclusion in the distribution.
+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.
 
 
 MAKING THE BROWSING DIRECTORY THE CURRENT DIRECTORY	*netrw-c* *netrw-curdir*
@@ -1168,7 +1283,7 @@ help on what each of the variables do.
 
 
 ==============================================================================
-8. Problems and Fixes						*netrw-problems*
+9. Problems and Fixes						*netrw-problems*
 
 	(This section is likely to grow as I get feedback)
 	(also see |netrw-debug|)
@@ -1233,7 +1348,7 @@ 8. Problems and Fixes						*netrw-proble
 
 
 ==============================================================================
-9. Debugging						*netrw-debug*
+10. Debugging						*netrw-debug*
 
 The <netrw.vim> script is typically available as:
 >
@@ -1282,8 +1397,23 @@ which is loaded automatically at startup
 		NdrOchip at ScampbellPfamily.AbizM - NOSPAM
 
 ==============================================================================
-10. History						*netrw-history*
+11. History						*netrw-history* {{{1
 
+	v78: * progress has been made on allowing spaces inside directory
+	       names for remote work (reading, writing, browsing).  (scp)
+	v77: * Mikolaj Machowski fixed a bug in a substitute command
+	     * g:netrw_browsex_viewer implemented
+	     * Mikolaj Machowski pointed out that gnome-open is often
+	       executable under KDE systems, although it is effectively
+	       not functional.  NetBrowseX now looks for "kicker" as 
+	       a running process to determine if KDE is actually the
+	       really running.
+	     * Explorer's O functionality was inadvertently left out.
+	       Netrw now does the same thing, but with the "P" key.
+	     * added g:netrw_browse_split option
+	     * fixed a bug where the directory contained a "." but
+	       the file didn't (was treating the dirname from "."
+	       onwards as a suffix)
 	v76: * "directory is missing" error message now restores echo
 	       highlighting
 	v75: * file://... now conforms to RFC2396 (thanks to S. Zacchiroli)
@@ -1475,7 +1605,7 @@ 10. History						*netrw-history*
 
 
 ==============================================================================
-11. Credits						*netrw-credits*
+11. Credits						*netrw-credits* {{{1
 
 	Vim editor	by Bram Moolenaar (Thanks, Bram!)
 	dav		support by C Campbell
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -2181,6 +2181,8 @@ 90.5	usr_90.txt	/*90.5*
 :lr	quickfix.txt	/*:lr*
 :lrewind	quickfix.txt	/*:lrewind*
 :ls	windows.txt	/*:ls*
+:lt	tagsrch.txt	/*:lt*
+:ltag	tagsrch.txt	/*:ltag*
 :lu	map.txt	/*:lu*
 :lunmap	map.txt	/*:lunmap*
 :lw	quickfix.txt	/*:lw*
@@ -4051,6 +4053,7 @@ Select-mode-mapping	visual.txt	/*Select-
 Session	starting.txt	/*Session*
 SessionLoad-variable	starting.txt	/*SessionLoad-variable*
 SessionLoadPost	autocmd.txt	/*SessionLoadPost*
+SpellFileMissing	autocmd.txt	/*SpellFileMissing*
 StdinReadPost	autocmd.txt	/*StdinReadPost*
 StdinReadPre	autocmd.txt	/*StdinReadPre*
 SwapExists	autocmd.txt	/*SwapExists*
@@ -4559,6 +4562,7 @@ compl-spelling	insert.txt	/*compl-spelli
 compl-tag	insert.txt	/*compl-tag*
 compl-vim	insert.txt	/*compl-vim*
 compl-whole-line	insert.txt	/*compl-whole-line*
+complete-functions	insert.txt	/*complete-functions*
 complete_add()	eval.txt	/*complete_add()*
 complete_check()	eval.txt	/*complete_check()*
 complex-change	change.txt	/*complex-change*
@@ -5093,6 +5097,7 @@ ft-htmlos-syntax	syntax.txt	/*ft-htmlos-
 ft-ia64-syntax	syntax.txt	/*ft-ia64-syntax*
 ft-inform-syntax	syntax.txt	/*ft-inform-syntax*
 ft-java-syntax	syntax.txt	/*ft-java-syntax*
+ft-javascript-omni	insert.txt	/*ft-javascript-omni*
 ft-ksh-syntax	syntax.txt	/*ft-ksh-syntax*
 ft-lace-syntax	syntax.txt	/*ft-lace-syntax*
 ft-lex-syntax	syntax.txt	/*ft-lex-syntax*
@@ -5183,6 +5188,8 @@ g0	motion.txt	/*g0*
 g8	various.txt	/*g8*
 g:netrw_alto	pi_netrw.txt	/*g:netrw_alto*
 g:netrw_altv	pi_netrw.txt	/*g:netrw_altv*
+g:netrw_browse_split	pi_netrw.txt	/*g:netrw_browse_split*
+g:netrw_browsex_viewer	pi_netrw.txt	/*g:netrw_browsex_viewer*
 g:netrw_cygwin	pi_netrw.txt	/*g:netrw_cygwin*
 g:netrw_dav_cmd	pi_netrw.txt	/*g:netrw_dav_cmd*
 g:netrw_fetch_cmd	pi_netrw.txt	/*g:netrw_fetch_cmd*
@@ -5379,6 +5386,7 @@ gvimrc	gui.txt	/*gvimrc*
 gw	change.txt	/*gw*
 gwgw	change.txt	/*gwgw*
 gww	change.txt	/*gww*
+gx	pi_netrw.txt	/*gx*
 gzip	pi_gzip.txt	/*gzip*
 gzip-autocmd	pi_gzip.txt	/*gzip-autocmd*
 gzip-example	autocmd.txt	/*gzip-example*
@@ -5961,6 +5969,7 @@ netrw-D	pi_netrw.txt	/*netrw-D*
 netrw-NB	pi_netrw.txt	/*netrw-NB*
 netrw-Nb	pi_netrw.txt	/*netrw-Nb*
 netrw-O	pi_netrw.txt	/*netrw-O*
+netrw-P	pi_netrw.txt	/*netrw-P*
 netrw-R	pi_netrw.txt	/*netrw-R*
 netrw-S	pi_netrw.txt	/*netrw-S*
 netrw-U	pi_netrw.txt	/*netrw-U*
@@ -5979,10 +5988,12 @@ netrw-chgup	pi_netrw.txt	/*netrw-chgup*
 netrw-contents	pi_netrw.txt	/*netrw-contents*
 netrw-cr	pi_netrw.txt	/*netrw-cr*
 netrw-credits	pi_netrw.txt	/*netrw-credits*
+netrw-ctrl-h	pi_netrw.txt	/*netrw-ctrl-h*
 netrw-ctrl-l	pi_netrw.txt	/*netrw-ctrl-l*
 netrw-curdir	pi_netrw.txt	/*netrw-curdir*
 netrw-d	pi_netrw.txt	/*netrw-d*
 netrw-debug	pi_netrw.txt	/*netrw-debug*
+netrw-del	pi_netrw.txt	/*netrw-del*
 netrw-delete	pi_netrw.txt	/*netrw-delete*
 netrw-dir	pi_netrw.txt	/*netrw-dir*
 netrw-dirlist	pi_netrw.txt	/*netrw-dirlist*
@@ -5995,7 +6006,6 @@ netrw-externapp	pi_netrw.txt	/*netrw-ext
 netrw-file	pi_netrw.txt	/*netrw-file*
 netrw-fixup	pi_netrw.txt	/*netrw-fixup*
 netrw-ftp	pi_netrw.txt	/*netrw-ftp*
-netrw-h	pi_netrw.txt	/*netrw-h*
 netrw-handler	pi_netrw.txt	/*netrw-handler*
 netrw-help	pi_netrw.txt	/*netrw-help*
 netrw-hexplore	pi_netrw.txt	/*netrw-hexplore*
@@ -6026,6 +6036,7 @@ netrw-pexplore	pi_netrw.txt	/*netrw-pexp
 netrw-preview	pi_netrw.txt	/*netrw-preview*
 netrw-problems	pi_netrw.txt	/*netrw-problems*
 netrw-protocol	pi_netrw.txt	/*netrw-protocol*
+netrw-prvwin	pi_netrw.txt	/*netrw-prvwin*
 netrw-q	pi_netrw.txt	/*netrw-q*
 netrw-r	pi_netrw.txt	/*netrw-r*
 netrw-read	pi_netrw.txt	/*netrw-read*
@@ -6038,6 +6049,7 @@ netrw-sexplore	pi_netrw.txt	/*netrw-sexp
 netrw-sort	pi_netrw.txt	/*netrw-sort*
 netrw-sortsequence	pi_netrw.txt	/*netrw-sortsequence*
 netrw-starstar	pi_netrw.txt	/*netrw-starstar*
+netrw-start	pi_netrw.txt	/*netrw-start*
 netrw-transparent	pi_netrw.txt	/*netrw-transparent*
 netrw-u	pi_netrw.txt	/*netrw-u*
 netrw-uidpass	pi_netrw.txt	/*netrw-uidpass*
@@ -6051,6 +6063,7 @@ netrw-write	pi_netrw.txt	/*netrw-write*
 netrw-x	pi_netrw.txt	/*netrw-x*
 netrw-xfer	pi_netrw.txt	/*netrw-xfer*
 netrw.vim	pi_netrw.txt	/*netrw.vim*
+netrw_filehandler	pi_netrw.txt	/*netrw_filehandler*
 netterm-mouse	options.txt	/*netterm-mouse*
 network	pi_netrw.txt	/*network*
 new-5	version5.txt	/*new-5*
@@ -6605,6 +6618,7 @@ spell-SOFOTO	spell.txt	/*spell-SOFOTO*
 spell-SUGSWITHDOTS	spell.txt	/*spell-SUGSWITHDOTS*
 spell-SYLLABLE	spell.txt	/*spell-SYLLABLE*
 spell-SYLLABLENUM	spell.txt	/*spell-SYLLABLENUM*
+spell-SpellFileMissing	spell.txt	/*spell-SpellFileMissing*
 spell-TRY	spell.txt	/*spell-TRY*
 spell-UPP	spell.txt	/*spell-UPP*
 spell-VERSION	spell.txt	/*spell-VERSION*
@@ -6635,6 +6649,7 @@ spell-wordlist-format	spell.txt	/*spell-
 spell-yiddish	spell.txt	/*spell-yiddish*
 spell.txt	spell.txt	/*spell.txt*
 spellbadword()	eval.txt	/*spellbadword()*
+spellfile.vim	spell.txt	/*spellfile.vim*
 spellsuggest()	eval.txt	/*spellsuggest()*
 split()	eval.txt	/*split()*
 splitfind	windows.txt	/*splitfind*
@@ -6888,6 +6903,7 @@ tag-highlight	syntax.txt	/*tag-highlight
 tag-matchlist	tagsrch.txt	/*tag-matchlist*
 tag-old-static	tagsrch.txt	/*tag-old-static*
 tag-overloaded	version5.txt	/*tag-overloaded*
+tag-preview	tagsrch.txt	/*tag-preview*
 tag-priority	tagsrch.txt	/*tag-priority*
 tag-regexp	tagsrch.txt	/*tag-regexp*
 tag-search	tagsrch.txt	/*tag-search*
--- a/src/proto/eval.pro
+++ b/src/proto/eval.pro
@@ -46,6 +46,8 @@ void list_unref __ARGS((list_T *l));
 dictitem_T *dict_lookup __ARGS((hashitem_T *hi));
 int list_append_dict __ARGS((list_T *list, dict_T *dict));
 int garbage_collect __ARGS((void));
+list_T *list_alloc __ARGS((void));
+void list_free __ARGS((list_T *l));
 dict_T *dict_alloc __ARGS((void));
 int dict_add_nr_str __ARGS((dict_T *d, char *key, long nr, char_u *str));
 char_u *get_dict_string __ARGS((dict_T *d, char_u *key));
--- 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 (2006 Jan 29)"
-#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 29, compiled "
+#define VIM_VERSION_LONG	"VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 1)"
+#define VIM_VERSION_LONG_DATE	"VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 1, compiled "